Current File : /pages/54/47/d0016649/home/private/Daten/images/driversolutionpack/DriverPack_17.7.4.10/bin/drp.js |
!function(modules) {
function __webpack_require__(moduleId) {
if (installedModules[moduleId]) return installedModules[moduleId].exports;
var module = installedModules[moduleId] = {
exports: {},
id: moduleId,
loaded: !1
};
modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
module.loaded = !0;
return module.exports;
}
var installedModules = {};
__webpack_require__.m = modules;
__webpack_require__.c = installedModules;
__webpack_require__.p = "";
return __webpack_require__(0);
}([ function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
var _this = this;
__webpack_require__(1);
__webpack_require__(46);
__webpack_require__(48);
var _systemScanner = __webpack_require__(50), _systemScanner2 = _interopRequireDefault(_systemScanner), _softPack = __webpack_require__(103), _softPack2 = _interopRequireDefault(_softPack), _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _drpCoreLogs = __webpack_require__(4), _drpCoreStatistics = __webpack_require__(13), _drpCoreStatistics2 = _interopRequireDefault(_drpCoreStatistics), _reduxStoreCreator = __webpack_require__(250), _reduxStoreCreator2 = _interopRequireDefault(_reduxStoreCreator), _reduxProvider = __webpack_require__(287), _reduxProvider2 = _interopRequireDefault(_reduxProvider), _componentsApp = __webpack_require__(290), _componentsApp2 = _interopRequireDefault(_componentsApp), _utilsOnunload = __webpack_require__(303), _drpCoreOs = __webpack_require__(9), _utilsRetryPromise = __webpack_require__(102), _utilsRetryPromise2 = _interopRequireDefault(_utilsRetryPromise);
__webpack_require__(471);
__webpack_require__(472);
__webpack_require__(473);
_drpCoreLogs.log("DriverPack Solution " + window.version + " " + window.verType);
_drpCoreLogs.log("Build " + window.env + " " + window.sha + " " + window.buildDate);
_drpCoreLogs.log("Soft endpoint " + window.softEndpoint);
_drpCoreLogs.log(_drpCoreOs.OSCaption + " x" + _drpCoreOs.arch);
__webpack_require__(474);
_drpCoreStatistics2["default"].init();
if (!0) _drpCoreStatistics2["default"].experiment = "(not set)";
_drpCoreStatistics2["default"].sendOpenedEvent();
try {
_utilsOnunload.addUnloadListener(function() {
_drpCoreStatistics2["default"].event({
action: "application closed"
});
});
} catch (e) {}
window.addUnloadListener = _utilsOnunload.addUnloadListener;
var store = _reduxStoreCreator2["default"]();
window.store = store;
if (!1) {
require("drp-core/logs").log = console.log.bind(console);
require("./debug")(store);
}
window.offscreenBuffering = !1;
var run = function() {
var reactRender;
return regeneratorRuntime.async(function(context$1$0) {
for (;;) switch (context$1$0.prev = context$1$0.next) {
case 0:
context$1$0.prev = 0;
context$1$0.next = 3;
return regeneratorRuntime.awrap(window.loadLanguage());
case 3:
window.store.dispatch({
type: "CURRENT_LANGUAGE_UPDATED",
payload: window.lang
});
reactRender = !1 ? _react2["default"].render : _react2["default"].renderComponent;
reactRender(_reduxProvider2["default"]({
store: store
}, function() {
return _componentsApp2["default"](null);
}), document.getElementById("app"));
context$1$0.next = 8;
return regeneratorRuntime.awrap(_systemScanner2["default"].run());
case 8:
context$1$0.prev = 8;
context$1$0.next = 11;
return regeneratorRuntime.awrap(_utilsRetryPromise2["default"](function() {
return _softPack2["default"].run();
}, 3));
case 11:
context$1$0.next = 18;
break;
case 13:
context$1$0.prev = 13;
context$1$0.t0 = context$1$0["catch"](8);
_drpCoreLogs.log("[SoftPack] soft.js failed", context$1$0.t0);
_drpCoreStatistics2["default"].event({
action: "soft.js failed"
});
throw context$1$0.t0;
case 18:
window.store.dispatch({
type: "NAVIGATE",
page: "START"
});
context$1$0.next = 32;
break;
case 21:
context$1$0.prev = 21;
context$1$0.t1 = context$1$0["catch"](0);
if (!("HttpError" === context$1$0.t1.type && "status" in context$1$0.t1)) {
context$1$0.next = 29;
break;
}
_drpCoreLogs.log("[SystemScanner] screen opened NoInternet", context$1$0.t1);
_drpCoreStatistics2["default"].event({
action: "Screen opened NoInternet"
});
window.store.dispatch({
type: "NO_INTERNET_DETECTED"
});
context$1$0.next = 32;
break;
case 29:
_drpCoreLogs.log("DriverPack running failed", context$1$0.t1);
window.store.dispatch({
type: "RUN_ERROR_DETECTED"
});
throw context$1$0.t1;
case 32:
case "end":
return context$1$0.stop();
}
}, null, _this, [ [ 0, 21 ], [ 8, 13 ] ]);
};
setTimeout(function() {
run().done();
}, 100);
}, function(module, exports, __webpack_require__) {
"use strict";
var _ = __webpack_require__(2);
Object.assign(window, _.wmi, _.os, _.system);
Object.assign(window, {
logs: _.logs,
statistics: _.statistics,
wmi: _.wmi,
log: _.logs.log,
os: _.os,
system: _.system,
diagnostics: _.diagnostics,
wget: _.wget
});
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) return obj; else {
var newObj = {};
if (null != obj) for (var key in obj) if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
newObj["default"] = obj;
return newObj;
}
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _config2 = __webpack_require__(3), _config3 = _interopRequireDefault(_config2);
exports.config = _config3["default"];
var _logs2 = __webpack_require__(4), _logs3 = _interopRequireDefault(_logs2);
exports.logs = _logs3["default"];
var _statistics2 = __webpack_require__(13), _statistics3 = _interopRequireDefault(_statistics2);
exports.statistics = _statistics3["default"];
var _system2 = __webpack_require__(27), _system = _interopRequireWildcard(_system2);
exports.system = _system;
var _wmi2 = __webpack_require__(10), _wmi = _interopRequireWildcard(_wmi2);
exports.wmi = _wmi;
var _os2 = __webpack_require__(9), _os = _interopRequireWildcard(_os2);
exports.os = _os;
var _diagnostics2 = __webpack_require__(35), _diagnostics = _interopRequireWildcard(_diagnostics2);
exports.diagnostics = _diagnostics;
}, function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = !0;
var context = "undefined" == typeof window ? {} : window, version = context.version || "1.0", verType = context.verType, config = {
application: {
AppFolder: "DRPSu",
DisplayVersion: verType ? version + " " + verType : version
},
analytics: {
category: "desktop",
identifier: "clientId",
google: {},
yandex: {
enabled: !1
}
},
logging: !0
};
try {
Object.assign(config, {
analytics: {
events: {
url: "http://api.drp.su/api/events"
},
google: {
shared: "UA-58593486-1",
primary: "UA-68879973-3"
},
yandex: {
shared: "33423178",
primary: "33217588",
enabled: !0,
url: "http://camaro.drp.su/"
},
category: "driverpack offline",
identifier: "clientId"
},
wget: {
paths: [ "tools\\driverpack-wget.exe", "tools\\wget.exe" ]
}
});
} catch (err) {}
exports["default"] = config;
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = !0;
var _systemFso = __webpack_require__(5), _systemSpecialFolders = __webpack_require__(6), _systemLocalFiles = __webpack_require__(12), _config = __webpack_require__(3), toFixed = function(num) {
return ("0" + num).slice(-2);
}, htmlHeader = "<html>\n<head>\n <meta charset='windows-1251'/>\n <script type='text/javascript' src='http://static.drp.su/update/logs/script.js'></script>\n <link rel='stylesheet' type='text/css' href='http://static.drp.su/update/logs/style.css'/>\n</head>\n<body>\n", htmlFooter = "\n</body>\n</html>\n", logs = {
logging: _config.logging,
logFolder: _systemSpecialFolders.AppFolder + "\\Logs\\",
logfile: null,
htmlHeader: htmlHeader,
htmlFooter: htmlFooter,
fileNameEnding: function() {
var today = new Date();
return "_" + [ today.getFullYear(), toFixed(today.getMonth() + 1), toFixed(today.getDate()), toFixed(today.getHours()), toFixed(today.getMinutes()), toFixed(today.getSeconds()) ].join("-");
},
init: function() {
try {
_systemLocalFiles.ensurePath(logs.logFolder);
var filename = logs.logFolder + "log__" + logs.fileNameEnding() + ".html";
logs.logfile = _systemFso.fso.CreateTextFile(filename, !0);
logs.logfile.WriteLine(logs.htmlHeader);
} catch (e) {
logs.logfile = null;
logs.logging = !1;
}
},
onunload: function() {
if (logs.logfile) {
logs.logfile.WriteLine(logs.htmlFooter);
logs.logfile.Close();
}
},
log: function() {
if (null === logs.logfile && logs.logging) logs.init();
if (logs.logfile) {
for (var _len = arguments.length, args = Array(_len), _key = 0; _len > _key; _key++) args[_key] = arguments[_key];
var str = args.map(function(part, ind) {
if ("object" == typeof part) {
if (part instanceof Error) part = {
name: part.name || "Error",
message: part.message
};
try {
return '<pre class="code">' + JSON.stringify(part, null, " ") + "</pre>";
} catch (err) {
return "";
}
} else return (0 === ind ? "" : ", ") + String(part);
}).join("").replace(/[^\x00-\x7F]/g, ""), className = -1 !== str.indexOf("!!! ERROR !!!") ? "error" : "info", today = new Date(), time = [ toFixed(today.getHours()), toFixed(today.getMinutes()), toFixed(today.getSeconds()) ].join(":"), timestamp = '<span class="timeStamp">' + time + "</span>", res = '<div class="logs ' + className + '">' + timestamp + (str || "") + "</div>";
try {
logs.logfile.WriteLine(res);
} catch (e) {}
}
}
};
exports["default"] = logs;
module.exports = exports["default"];
}, function(module, exports) {
"use strict";
exports.__esModule = !0;
var fso = new ActiveXObject("Scripting.FileSystemObject");
exports.fso = fso;
}, function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = !0;
var _shell = __webpack_require__(7), _config = __webpack_require__(3), _os = __webpack_require__(9), AppData = _shell.WshShell.SpecialFolders("AppData");
exports.AppData = AppData;
var localAppData = _shell.objShell.NameSpace(28).Self.Path;
exports.localAppData = localAppData;
var AppFolder = AppData + "\\" + _config.application.AppFolder;
exports.AppFolder = AppFolder;
var ProgramFiles = _os.is64 ? _shell.WshShell.ExpandEnvironmentStrings("%PROGRAMFILES(x86)%") : _shell.WshShell.ExpandEnvironmentStrings("%PROGRAMFILES%");
exports.ProgramFiles = ProgramFiles;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _libWshShell = __webpack_require__(8), _libWshShell2 = _interopRequireDefault(_libWshShell), objShell = new ActiveXObject("Shell.Application");
exports.objShell = objShell;
exports.WshShell = _libWshShell2["default"];
}, function(module, exports) {
"use strict";
exports.__esModule = !0;
exports["default"] = new ActiveXObject("WScript.Shell");
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _libWshShell = __webpack_require__(8), _libWshShell2 = _interopRequireDefault(_libWshShell), _wmi = __webpack_require__(10), is64 = "AMD64" === _libWshShell2["default"].ExpandEnvironmentStrings("%PROCESSOR_ARCHITECTURE%") || "%PROCESSOR_ARCHITEW6432%" !== _libWshShell2["default"].ExpandEnvironmentStrings("%PROCESSOR_ARCHITEW6432%");
exports.is64 = is64;
var arch = is64 ? "64" : "86";
exports.arch = arch;
var _getWMIObjects = _wmi.getWMIObjects([ "Version", "CSDVersion", "Caption", "OSArchitecture" ], "Win32_OperatingSystem"), _getWMIObjects$0 = _getWMIObjects[0], Version = _getWMIObjects$0.Version, CSDVersion = _getWMIObjects$0.CSDVersion, Caption = _getWMIObjects$0.Caption, OSVersionS = Version.replace(/.\d\d.*/, "");
exports.OSVersionS = OSVersionS;
var OSVersion = parseFloat(OSVersionS) || 5;
exports.OSVersion = OSVersion;
var OSCSDVersion = CSDVersion || "";
exports.OSCSDVersion = OSCSDVersion;
var OSArchitecture = OSArchitecture || "";
exports.OSArchitecture = OSArchitecture;
var versions = {
"5.0": "2000",
"5.1": "XP",
"5.2": "Server 2003",
"6.0": "Vista",
"6.1": "7",
"6.2": "8",
"6.3": "8.1",
"6.4": "9",
"10.0": "10"
}, OSName = versions[OSVersionS] || OSVersionS;
exports.OSName = OSName;
var m = CSDVersion && /^Service Pack (\d+)$/i.exec(CSDVersion), OSVersionSP = m ? parseInt(m[1], 10) : 0;
exports.OSVersionSP = OSVersionSP;
var OSCaption = Caption.replace(/Microsoft /i, "");
exports.OSCaption = OSCaption;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _libIterate = __webpack_require__(11), _libIterate2 = _interopRequireDefault(_libIterate), locator = new ActiveXObject("WbemScripting.SWbemLocator");
exports.locator = locator;
var objWMIService = function() {
var wmi = void 0, namespace = "root\\cimv2";
try {
wmi = locator.ConnectServer(null, namespace);
} catch (err) {}
if (!wmi) {
var cmd = "net start winmgmt";
new ActiveXObject("WScript.Shell").Run(cmd, 0, !0);
wmi = locator.ConnectServer(null, namespace);
}
return wmi;
}.call();
exports.objWMIService = objWMIService;
var getWMIObjects = function(names, source, where) {
var wmi = arguments.length <= 3 || void 0 === arguments[3] ? objWMIService : arguments[3];
try {
var _ret = function() {
var results = [], query = "SELECT * FROM " + source;
if (where) query += " WHERE " + where;
var colItems = wmi.ExecQuery(query, "WQL");
_libIterate2["default"](colItems, function(objItem) {
var obj = {};
names.forEach(function(name) {
try {
if (objItem[name] || objItem[name].toArray) if (objItem[name].toArray) obj[name] = objItem[name].toArray(); else obj[name] = objItem[name];
} catch (e) {}
});
results.push(obj);
});
return {
v: results
};
}();
if ("object" == typeof _ret) return _ret.v;
} catch (e) {
return [];
}
};
exports.getWMIObjects = getWMIObjects;
}, function(module, exports) {
"use strict";
exports.__esModule = !0;
exports["default"] = function(collection, iterator) {
var colItems = new Enumerator(collection);
for (colItems.moveFirst(); !colItems.atEnd(); colItems.moveNext()) iterator(colItems.item());
};
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = !0;
var _fso = __webpack_require__(5), createFile = function(path, fileName, fileContent) {
ensurePath(path);
var FSfile = _fso.fso.OpenTextFile(path + fileName, 2, !0, -1);
FSfile.WriteLine(fileContent);
FSfile.Close();
};
exports.createFile = createFile;
var deleteFile = function(fullPath) {
if (_fso.fso.FileExists(fullPath) === !0) _fso.fso.DeleteFile(fullPath);
};
exports.deleteFile = deleteFile;
var queryFile = function(fullPath, overdueInterval) {
if (_fso.fso.FileExists(fullPath) && _fso.fso.GetFile(fullPath).Size > 0) if (overdueInterval && isFileOverdue(fullPath, overdueInterval)) throw new Error("File is overdue"); else {
var file = _fso.fso.OpenTextFile(fullPath, 1, !0, -1), data = file.ReadAll();
file.Close();
return data;
} else throw new Error("File is not found");
};
exports.queryFile = queryFile;
var isFileOverdue = function(fullPath, overdueInterval) {
if (_fso.fso.FileExists(fullPath) === !0) {
var now = new Date();
if (now.getTime() - _fso.fso.GetFile(fullPath).DateLastModified > overdueInterval) return !0; else return !1;
} else return !0;
};
exports.isFileOverdue = isFileOverdue;
var ensurePath = function(path) {
for (var parts = path.split("\\"), stack = []; parts.length > 0; ) {
var current = parts.join("\\");
if (parts.pop()) if (_fso.fso.FolderExists(current)) break; else stack.push(current); else ;
}
for (;stack.length > 0; ) {
var current = stack.pop();
try {
_fso.fso.CreateFolder(current);
} catch (err) {
if (!_fso.fso.FolderExists(current)) throw err;
}
}
return path;
};
exports.ensurePath = ensurePath;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _libStatistics = __webpack_require__(14), _libStatistics2 = _interopRequireDefault(_libStatistics), _config = __webpack_require__(3);
exports["default"] = new _libStatistics2["default"](_config.analytics, _config.application.DisplayVersion, window.lang);
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
exports.__esModule = !0;
var _GoogleAnalytics = __webpack_require__(15), _OnlineStatistics2 = __webpack_require__(22), _OnlineStatistics3 = _interopRequireDefault(_OnlineStatistics2), _OfflineStore = __webpack_require__(34), _OfflineStore2 = _interopRequireDefault(_OfflineStore), Statistics = function(_OnlineStatistics) {
function Statistics() {
_classCallCheck(this, Statistics);
_OnlineStatistics.apply(this, arguments);
}
_inherits(Statistics, _OnlineStatistics);
Statistics.prototype.init = function(opts) {
var _this = this;
_OnlineStatistics.prototype.init.call(this, opts);
this._initialized = this.checkConnection().then(function(isOnline) {
if (isOnline) return _OfflineStore2["default"].dispatch().then(function() {
return !0;
}); else {
_this._offlineStore = new _OfflineStore2["default"](_this);
return !1;
}
});
};
Statistics.prototype.checkConnection = function() {
return _GoogleAnalytics.sendUrl(_GoogleAnalytics.endpoint).then(function() {
return !0;
}, function() {
return !1;
});
};
Statistics.prototype.send = function(event, dimensions, important) {
var _this2 = this;
return this._initialized.then(function(isOnline) {
if (!isOnline && _this2._offlineStore) _this2._offlineStore.event(event, dimensions, important); else return _OnlineStatistics.prototype.send.call(_this2, event, dimensions, important);
});
};
Statistics.prototype.sendOpenedEvent = function() {
this.event({
action: "application opened",
label: this.drpVersion
}, [], !0);
};
return Statistics;
}(_OnlineStatistics3["default"]);
exports["default"] = Statistics;
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
exports.__esModule = !0;
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1;
descriptor.configurable = !0;
if ("value" in descriptor) descriptor.writable = !0;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);
if (staticProps) defineProperties(Constructor, staticProps);
return Constructor;
};
}(), _systemHttp = __webpack_require__(16), _systemSendImg = __webpack_require__(21), _logs = __webpack_require__(4), _os = __webpack_require__(9), GoogleAnalytics = function() {
function GoogleAnalytics(parent) {
_classCallCheck(this, GoogleAnalytics);
this.session = {};
this.parent = parent;
this.options = this.parent.options;
}
GoogleAnalytics.sendUrl = function(url) {
return _systemSendImg.sendImg(url)["catch"](function() {
return _systemHttp.httpget(url);
});
};
_createClass(GoogleAnalytics, null, [ {
key: "endpoint",
value: "http://www.google-analytics.com/collect",
enumerable: !0
} ]);
GoogleAnalytics.prototype.init = function(_ref) {
var shared = _ref.shared, primary = _ref.primary, session = _ref.session;
this.counters = {
shared: shared,
primary: primary
};
this.session[primary] = session;
this.session[shared] = "prolonged";
};
GoogleAnalytics.prototype.getCID = function() {
if ("computerId" === this.options.identifier) return this.parent.computerId; else return this.parent.clientId;
};
GoogleAnalytics.prototype.send = function(event) {
var dimensions = arguments.length <= 1 || void 0 === arguments[1] ? [] : arguments[1], important = arguments.length <= 2 || void 0 === arguments[2] ? !1 : arguments[2], _counters = this.counters, shared = _counters.shared, primary = _counters.primary;
return Promise.all([ important ? this._sendHit(shared, this.parent.clientId, event, dimensions) : !1, this._sendHit(primary, this.getCID(), event, dimensions) ]);
};
GoogleAnalytics.prototype._sendHit = function(counter, cid, event, dimensions) {
if (counter) {
dimensions = (dimensions || []).concat([ [ this.parent.config.userIdDimension, cid ], [ this.parent.config.drpVersionDimension, this.parent.drpVersion.trim() ], [ this.parent.config.osDimension, _os.OSName + " x" + _os.arch ], [ this.parent.config.spDimension, "SP " + _os.OSVersionSP ], [ this.parent.config.captionDimension, _os.OSCaption ], [ this.parent.config.experimentDimension, this.parent.experiment ] ]);
var url = this._compileUrl(counter, cid, event, dimensions);
_logs.log("[Statistics] [GoogleAnalytics] Send event " + counter + " GA: " + event.action, event, dimensions, [ url ]);
return GoogleAnalytics.sendUrl(url);
}
};
GoogleAnalytics.prototype._compileUrl = function(tid, cid, event, dimensions) {
var params = {
v: 1,
tid: tid,
cid: cid,
t: "event",
ec: event.category.toLowerCase(),
ea: event.action.toLowerCase(),
el: event.label.toLowerCase(),
ul: this.parent.lang,
z: Math.random().toString().slice(2)
};
if (!this.session[tid]) {
this.session[tid] = "started";
params.sc = "start";
}
var parts = Object.entries(params).concat(dimensions);
return GoogleAnalytics.endpoint + "?" + parts.map(function(pair) {
return pair.map(encodeURIComponent).join("=");
}).join("&");
};
return GoogleAnalytics;
}();
exports["default"] = GoogleAnalytics;
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _registry = __webpack_require__(17), _superagentLibClient = __webpack_require__(18), _superagentLibClient2 = _interopRequireDefault(_superagentLibClient), getXMLHttp = _superagentLibClient2["default"].getXHR;
exports.getXMLHttp = getXMLHttp;
var httprequest = function(send) {
var originalCORS = Number(_registry.RegRead(_registry.REG_CORS));
_registry.RegWrite(_registry.REG_CORS, 0, "REG_DWORD");
var promise = new Promise(function(resolve, reject) {
send().then(resolve, function(err) {
err.type = "HttpError";
reject(err);
});
});
if (0 !== originalCORS) _registry.RegWrite(_registry.REG_CORS, originalCORS, "REG_DWORD");
return promise;
}, httpget = function(url) {
return httprequest(function() {
return _superagentLibClient2["default"].get(url).set("Connection", "close");
});
};
exports.httpget = httpget;
var httppost = function(url, data, statistics) {
return httprequest(function() {
var req = _superagentLibClient2["default"].post(url).set("Connection", "close");
if (statistics) {
var clientId = statistics.clientId, computerId = statistics.computerId, sessionId = statistics.sessionId, options = statistics.options, drpVersion = statistics.drpVersion, experiment = statistics.experiment, lang = statistics.lang;
req.set({
"x-drp-client-id": clientId,
"x-drp-computer-id": computerId,
"x-drp-session-id": sessionId,
"x-drp-application": options.category,
"x-drp-version": drpVersion,
"x-drp-experiment": experiment,
"x-drp-lang": lang
});
}
return req.send(data);
});
};
exports.httppost = httppost;
var httphead = function(url) {
return httprequest(function() {
return _superagentLibClient2["default"].head(url).set("Connection", "close");
});
};
exports.httphead = httphead;
}, function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = !0;
var _shell = __webpack_require__(7), _wmi = __webpack_require__(10), REG_CORS = "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\1\\1406";
exports.REG_CORS = REG_CORS;
var RegExists = function(path) {
try {
_shell.WshShell.RegRead(path);
return !0;
} catch (err) {
return !1;
}
};
exports.RegExists = RegExists;
var RegRead = function(path) {
try {
return _shell.WshShell.RegRead(path);
} catch (err) {}
};
exports.RegRead = RegRead;
var RegWrite = function(path, value) {
var type = arguments.length <= 2 || void 0 === arguments[2] ? "REG_SZ" : arguments[2];
try {
return _shell.WshShell.RegWrite(path, value, type);
} catch (err) {}
};
exports.RegWrite = RegWrite;
var RegDelete = function(path) {
try {
return _shell.WshShell.RegDelete(path);
} catch (err) {}
};
exports.RegDelete = RegDelete;
var RegReadSmart = function(path) {
var result = void 0;
path = path.replace("HKEY_LOCAL_MACHINE\\", "HKLM\\").replace("HKEY_CURRENT_USER\\", "HKCU\\");
result = RegRead32(path);
if (!result && -1 !== path.indexOf("\\SOFTWARE\\Microsoft\\")) {
var tmpPath = path.replace("\\SOFTWARE\\Microsoft\\", "\\SOFTWARE\\Wow6432Node\\Microsoft\\");
result = RegRead32(tmpPath);
}
if (!result) result = RegRead64(path);
return result;
};
exports.RegReadSmart = RegReadSmart;
var RegRead32 = function(path) {
var result = void 0;
try {
result = _shell.WshShell.RegRead(path);
} catch (err) {
result = "";
}
return result;
};
exports.RegRead32 = RegRead32;
var RegRead64 = function(path) {
var HKEY_LOCAL_MACHINE = 2147483650, HKEY_CURRENT_USER = 2147483649, context = new ActiveXObject("WbemScripting.SWbemNamedValueSet");
context.Add("__ProviderArchitecture", 64);
context.Add("__RequiredArchitecture", !0);
var wbem = _wmi.locator.ConnectServer(null, "root\\default", null, null, null, null, null, context), StdRegProv = wbem.Get("StdRegProv"), method = StdRegProv.Methods_.Item("GetStringValue"), inParameters = method.InParameters.SpawnInstance_();
if (0 === path.indexOf("HKLM\\")) inParameters.hDefKey = HKEY_LOCAL_MACHINE; else if (0 === path.indexOf("HKCU\\")) inParameters.hDefKey = HKEY_CURRENT_USER;
inParameters.sSubKeyName = path.substring(5);
inParameters.sValueName = "";
var outParameters = StdRegProv.ExecMethod_("GetStringValue", inParameters, 0, context);
return outParameters.sValue;
};
exports.RegRead64 = RegRead64;
}, function(module, exports, __webpack_require__) {
function noop() {}
function isHost(obj) {
var str = {}.toString.call(obj);
switch (str) {
case "[object File]":
case "[object Blob]":
case "[object FormData]":
return !0;
default:
return !1;
}
}
function isObject(obj) {
return obj === Object(obj);
}
function serialize(obj) {
if (!isObject(obj)) return obj;
var pairs = [];
for (var key in obj) if (null != obj[key]) pushEncodedKeyValuePair(pairs, key, obj[key]);
return pairs.join("&");
}
function pushEncodedKeyValuePair(pairs, key, val) {
if (Array.isArray(val)) return val.forEach(function(v) {
pushEncodedKeyValuePair(pairs, key, v);
});
pairs.push(encodeURIComponent(key) + "=" + encodeURIComponent(val));
}
function parseString(str) {
for (var parts, pair, obj = {}, pairs = str.split("&"), i = 0, len = pairs.length; len > i; ++i) {
pair = pairs[i];
parts = pair.split("=");
obj[decodeURIComponent(parts[0])] = decodeURIComponent(parts[1]);
}
return obj;
}
function parseHeader(str) {
var index, line, field, val, lines = str.split(/\r?\n/), fields = {};
lines.pop();
for (var i = 0, len = lines.length; len > i; ++i) {
line = lines[i];
index = line.indexOf(":");
field = line.slice(0, index).toLowerCase();
val = trim(line.slice(index + 1));
fields[field] = val;
}
return fields;
}
function isJSON(mime) {
return /[\/+]json\b/.test(mime);
}
function type(str) {
return str.split(/ *; */).shift();
}
function params(str) {
return reduce(str.split(/ *; */), function(obj, str) {
var parts = str.split(/ *= */), key = parts.shift(), val = parts.shift();
if (key && val) obj[key] = val;
return obj;
}, {});
}
function Response(req, options) {
options = options || {};
this.req = req;
this.xhr = this.req.xhr;
this.text = "HEAD" != this.req.method && ("" === this.xhr.responseType || "text" === this.xhr.responseType) || "undefined" == typeof this.xhr.responseType ? this.xhr.responseText : null;
this.statusText = this.req.xhr.statusText;
this.setStatusProperties(this.xhr.status);
this.header = this.headers = parseHeader(this.xhr.getAllResponseHeaders());
this.header["content-type"] = this.xhr.getResponseHeader("content-type");
this.setHeaderProperties(this.header);
this.body = "HEAD" != this.req.method ? this.parseBody(this.text ? this.text : this.xhr.response) : null;
}
function Request(method, url) {
var self = this;
Emitter.call(this);
this._query = this._query || [];
this.method = method;
this.url = url;
this.header = {};
this._header = {};
this.on("end", function() {
var err = null, res = null;
try {
res = new Response(self);
} catch (e) {
err = new Error("Parser is unable to parse the response");
err.parse = !0;
err.original = e;
err.rawResponse = self.xhr && self.xhr.responseText ? self.xhr.responseText : null;
return self.callback(err);
}
self.emit("response", res);
if (err) return self.callback(err, res);
if (res.status >= 200 && res.status < 300) return self.callback(err, res);
var new_err = new Error(res.statusText || "Unsuccessful HTTP response");
new_err.original = err;
new_err.response = res;
new_err.status = res.status;
self.callback(new_err, res);
});
}
function request(method, url) {
if ("function" == typeof url) return new Request("GET", method).end(url);
if (1 == arguments.length) return new Request("GET", method); else return new Request(method, url);
}
function del(url, fn) {
var req = request("DELETE", url);
if (fn) req.end(fn);
return req;
}
var root, Emitter = __webpack_require__(19), reduce = __webpack_require__(20);
if ("undefined" != typeof window) root = window; else if ("undefined" != typeof self) root = self; else root = this;
request.getXHR = function() {
if (root.XMLHttpRequest && (!root.location || "file:" != root.location.protocol || !root.ActiveXObject)) return new XMLHttpRequest(); else {
try {
return new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
try {
return new ActiveXObject("Msxml2.XMLHTTP.6.0");
} catch (e) {}
try {
return new ActiveXObject("Msxml2.XMLHTTP.3.0");
} catch (e) {}
try {
return new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {}
}
return !1;
};
var trim = "".trim ? function(s) {
return s.trim();
} : function(s) {
return s.replace(/(^\s*|\s*$)/g, "");
};
request.serializeObject = serialize;
request.parseString = parseString;
request.types = {
html: "text/html",
json: "application/json",
xml: "application/xml",
urlencoded: "application/x-www-form-urlencoded",
form: "application/x-www-form-urlencoded",
"form-data": "application/x-www-form-urlencoded"
};
request.serialize = {
"application/x-www-form-urlencoded": serialize,
"application/json": JSON.stringify
};
request.parse = {
"application/x-www-form-urlencoded": parseString,
"application/json": JSON.parse
};
Response.prototype.get = function(field) {
return this.header[field.toLowerCase()];
};
Response.prototype.setHeaderProperties = function(header) {
var ct = this.header["content-type"] || "";
this.type = type(ct);
var obj = params(ct);
for (var key in obj) this[key] = obj[key];
};
Response.prototype.parseBody = function(str) {
var parse = request.parse[this.type];
return parse && str && (str.length || str instanceof Object) ? parse(str) : null;
};
Response.prototype.setStatusProperties = function(status) {
if (1223 === status) status = 204;
var type = status / 100 | 0;
this.status = this.statusCode = status;
this.statusType = type;
this.info = 1 == type;
this.ok = 2 == type;
this.clientError = 4 == type;
this.serverError = 5 == type;
this.error = 4 == type || 5 == type ? this.toError() : !1;
this.accepted = 202 == status;
this.noContent = 204 == status;
this.badRequest = 400 == status;
this.unauthorized = 401 == status;
this.notAcceptable = 406 == status;
this.notFound = 404 == status;
this.forbidden = 403 == status;
};
Response.prototype.toError = function() {
var req = this.req, method = req.method, url = req.url, msg = "cannot " + method + " " + url + " (" + this.status + ")", err = new Error(msg);
err.status = this.status;
err.method = method;
err.url = url;
return err;
};
request.Response = Response;
Emitter(Request.prototype);
Request.prototype.use = function(fn) {
fn(this);
return this;
};
Request.prototype.timeout = function(ms) {
this._timeout = ms;
return this;
};
Request.prototype.clearTimeout = function() {
this._timeout = 0;
clearTimeout(this._timer);
return this;
};
Request.prototype.abort = function() {
if (!this.aborted) {
this.aborted = !0;
this.xhr.abort();
this.clearTimeout();
this.emit("abort");
return this;
}
};
Request.prototype.set = function(field, val) {
if (isObject(field)) {
for (var key in field) this.set(key, field[key]);
return this;
}
this._header[field.toLowerCase()] = val;
this.header[field] = val;
return this;
};
Request.prototype.unset = function(field) {
delete this._header[field.toLowerCase()];
delete this.header[field];
return this;
};
Request.prototype.getHeader = function(field) {
return this._header[field.toLowerCase()];
};
Request.prototype.type = function(type) {
this.set("Content-Type", request.types[type] || type);
return this;
};
Request.prototype.parse = function(fn) {
this._parser = fn;
return this;
};
Request.prototype.accept = function(type) {
this.set("Accept", request.types[type] || type);
return this;
};
Request.prototype.auth = function(user, pass) {
var str = btoa(user + ":" + pass);
this.set("Authorization", "Basic " + str);
return this;
};
Request.prototype.query = function(val) {
if ("string" != typeof val) val = serialize(val);
if (val) this._query.push(val);
return this;
};
Request.prototype.field = function(name, val) {
if (!this._formData) this._formData = new root.FormData();
this._formData.append(name, val);
return this;
};
Request.prototype.attach = function(field, file, filename) {
if (!this._formData) this._formData = new root.FormData();
this._formData.append(field, file, filename || file.name);
return this;
};
Request.prototype.send = function(data) {
var obj = isObject(data), type = this.getHeader("Content-Type");
if (obj && isObject(this._data)) for (var key in data) this._data[key] = data[key]; else if ("string" == typeof data) {
if (!type) this.type("form");
type = this.getHeader("Content-Type");
if ("application/x-www-form-urlencoded" == type) this._data = this._data ? this._data + "&" + data : data; else this._data = (this._data || "") + data;
} else this._data = data;
if (!obj || isHost(data)) return this;
if (!type) this.type("json");
return this;
};
Request.prototype.callback = function(err, res) {
var fn = this._callback;
this.clearTimeout();
fn(err, res);
};
Request.prototype.crossDomainError = function() {
var err = new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");
err.crossDomain = !0;
err.status = this.status;
err.method = this.method;
err.url = this.url;
this.callback(err);
};
Request.prototype.timeoutError = function() {
var timeout = this._timeout, err = new Error("timeout of " + timeout + "ms exceeded");
err.timeout = timeout;
this.callback(err);
};
Request.prototype.withCredentials = function() {
this._withCredentials = !0;
return this;
};
Request.prototype.end = function(fn) {
var self = this, xhr = this.xhr = request.getXHR(), query = this._query.join("&"), timeout = this._timeout, data = this._formData || this._data;
this._callback = fn || noop;
xhr.onreadystatechange = function() {
if (4 == xhr.readyState) {
var status;
try {
status = xhr.status;
} catch (e) {
status = 0;
}
if (0 == status) {
if (self.timedout) return self.timeoutError();
if (self.aborted) return;
return self.crossDomainError();
}
self.emit("end");
}
};
var handleProgress = function(e) {
if (e.total > 0) e.percent = e.loaded / e.total * 100;
e.direction = "download";
self.emit("progress", e);
};
if (this.hasListeners("progress")) xhr.onprogress = handleProgress;
try {
if (xhr.upload && this.hasListeners("progress")) xhr.upload.onprogress = handleProgress;
} catch (e) {}
if (timeout && !this._timer) this._timer = setTimeout(function() {
self.timedout = !0;
self.abort();
}, timeout);
if (query) {
query = request.serializeObject(query);
this.url += ~this.url.indexOf("?") ? "&" + query : "?" + query;
}
xhr.open(this.method, this.url, !0);
if (this._withCredentials) xhr.withCredentials = !0;
if ("GET" != this.method && "HEAD" != this.method && "string" != typeof data && !isHost(data)) {
var contentType = this.getHeader("Content-Type"), serialize = this._parser || request.serialize[contentType ? contentType.split(";")[0] : ""];
if (!serialize && isJSON(contentType)) serialize = request.serialize["application/json"];
if (serialize) data = serialize(data);
}
for (var field in this.header) if (null != this.header[field]) xhr.setRequestHeader(field, this.header[field]); else ;
this.emit("request", this);
xhr.send("undefined" != typeof data ? data : null);
return this;
};
Request.prototype.then = function(fulfill, reject) {
return this.end(function(err, res) {
err ? reject(err) : fulfill(res);
});
};
request.Request = Request;
request.get = function(url, data, fn) {
var req = request("GET", url);
if ("function" == typeof data) fn = data, data = null;
if (data) req.query(data);
if (fn) req.end(fn);
return req;
};
request.head = function(url, data, fn) {
var req = request("HEAD", url);
if ("function" == typeof data) fn = data, data = null;
if (data) req.send(data);
if (fn) req.end(fn);
return req;
};
request.del = del;
request["delete"] = del;
request.patch = function(url, data, fn) {
var req = request("PATCH", url);
if ("function" == typeof data) fn = data, data = null;
if (data) req.send(data);
if (fn) req.end(fn);
return req;
};
request.post = function(url, data, fn) {
var req = request("POST", url);
if ("function" == typeof data) fn = data, data = null;
if (data) req.send(data);
if (fn) req.end(fn);
return req;
};
request.put = function(url, data, fn) {
var req = request("PUT", url);
if ("function" == typeof data) fn = data, data = null;
if (data) req.send(data);
if (fn) req.end(fn);
return req;
};
module.exports = request;
}, function(module, exports, __webpack_require__) {
function Emitter(obj) {
if (obj) return mixin(obj); else ;
}
function mixin(obj) {
for (var key in Emitter.prototype) obj[key] = Emitter.prototype[key];
return obj;
}
if (!0) module.exports = Emitter;
Emitter.prototype.on = Emitter.prototype.addEventListener = function(event, fn) {
this._callbacks = this._callbacks || {};
(this._callbacks["$" + event] = this._callbacks["$" + event] || []).push(fn);
return this;
};
Emitter.prototype.once = function(event, fn) {
function on() {
this.off(event, on);
fn.apply(this, arguments);
}
on.fn = fn;
this.on(event, on);
return this;
};
Emitter.prototype.off = Emitter.prototype.removeListener = Emitter.prototype.removeAllListeners = Emitter.prototype.removeEventListener = function(event, fn) {
this._callbacks = this._callbacks || {};
if (0 == arguments.length) {
this._callbacks = {};
return this;
}
var callbacks = this._callbacks["$" + event];
if (!callbacks) return this;
if (1 == arguments.length) {
delete this._callbacks["$" + event];
return this;
}
for (var cb, i = 0; i < callbacks.length; i++) {
cb = callbacks[i];
if (cb === fn || cb.fn === fn) {
callbacks.splice(i, 1);
break;
}
}
return this;
};
Emitter.prototype.emit = function(event) {
this._callbacks = this._callbacks || {};
var args = [].slice.call(arguments, 1), callbacks = this._callbacks["$" + event];
if (callbacks) {
callbacks = callbacks.slice(0);
for (var i = 0, len = callbacks.length; len > i; ++i) callbacks[i].apply(this, args);
}
return this;
};
Emitter.prototype.listeners = function(event) {
this._callbacks = this._callbacks || {};
return this._callbacks["$" + event] || [];
};
Emitter.prototype.hasListeners = function(event) {
return !!this.listeners(event).length;
};
}, function(module, exports) {
module.exports = function(arr, fn, initial) {
for (var idx = 0, len = arr.length, curr = 3 == arguments.length ? initial : arr[idx++]; len > idx; ) curr = fn.call(null, curr, arr[idx], ++idx, arr);
return curr;
};
}, function(module, exports) {
"use strict";
exports.__esModule = !0;
var sendImg = function(url) {
return new Promise(function(resolve, reject) {
var img = document.createElement("img");
img.className = "ga-image";
img.onload = resolve;
img.onerror = reject;
img.src = url;
document.body.appendChild(img);
});
};
exports.sendImg = sendImg;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
exports.__esModule = !0;
var _clientIdStorage = __webpack_require__(23), _clientIdStorage2 = _interopRequireDefault(_clientIdStorage), _GoogleAnalytics = __webpack_require__(15), _GoogleAnalytics2 = _interopRequireDefault(_GoogleAnalytics), _YaMetrika = __webpack_require__(32), _YaMetrika2 = _interopRequireDefault(_YaMetrika), _EventsAPI = __webpack_require__(33), _EventsAPI2 = _interopRequireDefault(_EventsAPI), OnlineStatistics = function() {
function OnlineStatistics(options) {
var drpVersion = arguments.length <= 1 || void 0 === arguments[1] ? "" : arguments[1], lang = arguments.length <= 2 || void 0 === arguments[2] ? "" : arguments[2];
_classCallCheck(this, OnlineStatistics);
this.clientId = "";
this.computerId = "";
this.experiment = "(not set)";
this.config = {
userIdDimension: "cd1",
drpVersionDimension: "cd2",
osDimension: "cd3",
spDimension: "cd4",
captionDimension: "cd5",
experimentDimension: "cd6",
driversInstallFailed: "cd7",
installationTime: "cd8",
errorDevicesApiFailed: "cd9",
nps: "cd10",
driversInstallFailedMetric: "cm1",
installationTimeMetric: "cm2",
errorDevicesApiFailedMetric: "cm3"
};
this.options = {
google: {},
yandex: {},
events: {}
};
this.counters = {
google: new _GoogleAnalytics2["default"](this),
yandex: new _YaMetrika2["default"](this),
events: new _EventsAPI2["default"](this)
};
Object.assign(this, {
lang: lang,
drpVersion: drpVersion.trim()
});
Object.assign(this.options, options);
}
OnlineStatistics.prototype.generateSessionId = function() {
var d = new Date().getTime(), uuid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
var r = (d + 16 * Math.random()) % 16 | 0;
d = Math.floor(d / 16);
return ("x" === c ? r : 3 & r | 8).toString(16);
});
return uuid;
};
OnlineStatistics.prototype.init = function() {
var _ref = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0], clientId = _ref.clientId, computerId = _ref.computerId, offline = _ref.offline;
if (offline) this.offline = !0;
this.clientId = _clientIdStorage2["default"].init("clientId", clientId);
this.computerId = _clientIdStorage2["default"].init("computerId", computerId, [ "HKLM", "HKCU" ]);
this.sessionId = this.generateSessionId();
var experiments = this.options.experiments || [];
if (experiments.length > 0) {
var seed = this.computerId.replace(/[^\d]/g, "").slice(-15), ind = parseInt(seed, 10) % experiments.length;
this.experiment = this.options.experiments[ind || 0];
}
for (var _name in this.counters) this.counters[_name].init(this.options[_name]);
this._initialized = Promise.resolve(!0);
};
OnlineStatistics.prototype.event = function(_event, dimensions, important) {
if (!_event.action) return Promise.reject(new Error("event.action is undefined"));
if (!this._initialized) this.init();
_event = Object.assign({
category: this.options.category,
action: "",
label: this.drpVersion
}, _event);
if (this.offline) _event.label += " [offline]";
var promise = this.send(_event, dimensions, important);
if ("function" == typeof _event.callback) promise.then(function() {
_event.callback();
}, function(err) {
_event.callback(err);
});
return promise;
};
OnlineStatistics.prototype.send = function(event, dimensions, important) {
var counters = Object.values(this.counters);
return Promise.all(counters.map(function(counter) {
return counter.send(event, dimensions, important);
}));
};
return OnlineStatistics;
}();
exports["default"] = OnlineStatistics;
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _RegistryStore = __webpack_require__(24), _RegistryStore2 = _interopRequireDefault(_RegistryStore), _FileStore = __webpack_require__(25), _FileStore2 = _interopRequireDefault(_FileStore), _logs = __webpack_require__(4);
exports["default"] = {
stores: {
File: new _FileStore2["default"](),
HKCU: new _RegistryStore2["default"]("HKCU\\SOFTWARE\\drpsu\\"),
HKLM: new _RegistryStore2["default"]("HKLM\\SOFTWARE\\drpsu\\")
},
get: function(key, stores) {
var _this = this, res = void 0;
stores.forEach(function(name) {
if (!res) {
res = _this.stores[name].get(key);
if (res) _logs.log("[clientIdStorage] got " + key + " from " + name + ": " + res);
}
});
if (!res) {
res = this.generate();
_logs.log("[clientIdStorage] generated " + key + ": " + res);
}
return res;
},
set: function(key, value, stores) {
var _this2 = this;
stores.forEach(function(name) {
_this2.stores[name].set(key, value);
});
},
init: function(key, value) {
if (void 0 === key) key = "clientId";
var stores = arguments.length <= 2 || void 0 === arguments[2] ? [ "File", "HKCU", "HKLM" ] : arguments[2];
if (value) {
_logs.log("[clientIdStorage] got " + key + " from init(): " + value);
this[key] = value;
} else if (this[key]) return; else this[key] = this.get(key, stores);
this.set(key, this[key], stores);
return this[key];
},
generate: function() {
var d = new Date().getTime(), uuid = "xxxxxxxxx.xxxxxxxxxx".replace(/[xy]/g, function(c) {
var r = (d + 10 * Math.random()) % 10 | 0;
return ("x" === c ? r : 7 & r | 8).toString();
});
return uuid;
}
};
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
exports.__esModule = !0;
var _systemRegistry = __webpack_require__(17), RegistryStore = function() {
function RegistryStore(Reg) {
_classCallCheck(this, RegistryStore);
this.Reg = Reg;
}
RegistryStore.prototype.getPath = function(key) {
return this.Reg + key;
};
RegistryStore.prototype.get = function(key) {
return _systemRegistry.RegRead(this.getPath(key));
};
RegistryStore.prototype.set = function(key, clientId) {
_systemRegistry.RegWrite(this.getPath(key), clientId);
};
return RegistryStore;
}();
exports["default"] = RegistryStore;
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
exports.__esModule = !0;
var _utils = __webpack_require__(26), _systemFso = __webpack_require__(5), FileStore = function() {
function FileStore() {
_classCallCheck(this, FileStore);
}
FileStore.prototype.parseClientIdJs = function(text) {
var start = text.indexOf('"') + 1, end = text.indexOf('"', start), filename = text.substr(start, end - start), _ParseSFXName = _utils.ParseSFXName(filename), clientId = _ParseSFXName[0];
return clientId;
};
FileStore.prototype.get = function(key) {
var file = "tools\\modules\\" + key.toLowerCase() + ".js";
if (_systemFso.fso.FileExists(file)) {
var text = _systemFso.fso.GetFile(file);
if (text.Size > 0) {
var contents = text.OpenAsTextStream(1).ReadAll();
return this.parseClientIdJs(contents);
}
}
};
FileStore.prototype.set = function() {};
return FileStore;
}();
exports["default"] = FileStore;
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = !0;
var _system = __webpack_require__(27), _systemShell = __webpack_require__(7), _systemRegistry = __webpack_require__(17), _os = __webpack_require__(9), _logs = __webpack_require__(4), ParseSFXName = function(sfxName) {
sfxName = sfxName.replace(/(\s*(\(|\[)\d+(\)|\]))?.exe$/i, "");
return sfxName.split("_").slice(1);
};
exports.ParseSFXName = ParseSFXName;
var ParseCMDString = function() {
var cmd = arguments.length <= 0 || void 0 === arguments[0] ? "" : arguments[0], args = [], current = "", quoted = "", quoteType = null, addcurrent = function() {
if (current) args.push(current.trim());
current = "";
};
cmd = cmd.replace(/\\\n/g, "");
Array.from(cmd).forEach(function(c) {
if (quoteType) if (quoteType === c && "\\" !== quoted.slice(-1)) {
args.push(quoted);
quoted = "";
quoteType = null;
} else quoted += c; else if (" " === c) addcurrent(); else if (current) current += c; else if ("'" === c || '"' === c) quoteType = c; else current = c;
});
addcurrent();
return args;
};
exports.ParseCMDString = ParseCMDString;
var cleanFolder = function(path) {
var sync = arguments.length <= 1 || void 0 === arguments[1] ? !0 : arguments[1], correctedPath = /\\$/.test(path) ? path : path + "\\";
_systemShell.WshShell.Run('cmd /C del /F /S /Q "' + correctedPath + '" && FOR /D %p IN ("' + correctedPath + '*") DO rmdir "%p" /s /q', 0, sync);
};
exports.cleanFolder = cleanFolder;
var wrapInCmd = function(command) {
return 'cmd /c "' + command + '"';
};
exports.wrapInCmd = wrapInCmd;
var generateJobId = function() {
return +Math.round(1e5 * Math.random());
};
exports.generateJobId = generateJobId;
var inc = function(filename) {
var head = document.getElementsByTagName("head").item(0), script = void 0;
if ("css" === _system.fso.GetFileName(filename).split(".")[1].toLowerCase()) {
script = document.createElement("link");
script.setAttribute("rel", "stylesheet");
script.setAttribute("type", "text/css");
script.setAttribute("href", filename);
} else {
script = document.createElement("script");
script.src = filename;
script.type = "text/javascript";
}
if ("undefined" != typeof script) head.appendChild(script);
};
exports.inc = inc;
var winRun = function(src, hideMode, wait, bit64) {
if (!src) return !1;
hideMode = !!hideMode;
wait = !!wait;
if (bit64 && _os.is64) {
hideMode = !0;
wait = !1;
src = '"%windir%\\sysnative\\cmd.exe" /C ' + src;
}
return _systemShell.WshShell.Run(src, hideMode ? 0 : 1, wait);
};
exports.winRun = winRun;
var goToUrl = function(url) {
_logs.log("Opening " + url);
try {
var defBrowser = _systemRegistry.RegRead("HKCU\\SOFTWARE\\Clients\\StartMenuInternet\\");
if (!defBrowser) defBrowser = _systemRegistry.RegRead("HKLM\\SOFTWARE\\Clients\\StartMenuInternet\\");
var runComm = _systemRegistry.RegRead("HKLM\\SOFTWARE\\Clients\\StartMenuInternet\\" + defBrowser + "\\shell\\open\\command\\");
runComm = runComm.replace(/"/gi, "");
if (runComm) _systemShell.WshShell.Run('"' + runComm + '" "' + url + '"', 1, !1); else window.open(url);
} catch (e) {
_logs.log("Failed to open " + url);
_systemShell.WshShell.Run("rundll32 url.dll,FileProtocolHandler " + url, 1, !1);
}
return !1;
};
exports.goToUrl = goToUrl;
var getInternetExplorerVersion = function() {
var rv = void 0, ua = void 0, re = void 0;
try {
rv = parseInt(_systemRegistry.RegRead("HKLM\\SOFTWARE\\Microsoft\\Internet Explorer\\svcVersion").split(".")[0], 10);
} catch (e) {}
if ("number" != typeof rv) try {
rv = parseInt(_systemRegistry.RegRead("HKLM\\SOFTWARE\\Microsoft\\Internet Explorer\\Version").split(".")[0], 10);
} catch (e) {}
if ("number" != typeof rv) if ("Microsoft Internet Explorer" === navigator.appName) {
ua = navigator.userAgent;
re = new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");
if (null != re.exec(ua)) rv = parseFloat(RegExp.$1);
} else if ("Netscape" === navigator.appName) {
ua = navigator.userAgent;
re = new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})");
if (null != re.exec(ua)) rv = parseFloat(RegExp.$1);
}
if ("number" != typeof rv) rv = -1;
return rv;
};
exports.getInternetExplorerVersion = getInternetExplorerVersion;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequire(obj) {
return obj && obj.__esModule ? obj["default"] : obj;
}
function _interopExportWildcard(obj, defaults) {
var newObj = defaults({}, obj);
delete newObj["default"];
return newObj;
}
function _defaults(obj, defaults) {
for (var keys = Object.getOwnPropertyNames(defaults), i = 0; i < keys.length; i++) {
var key = keys[i], value = Object.getOwnPropertyDescriptor(defaults, key);
if (value && value.configurable && void 0 === obj[key]) Object.defineProperty(obj, key, value);
}
return obj;
}
exports.__esModule = !0;
var _cmd = __webpack_require__(28);
_defaults(exports, _interopExportWildcard(_cmd, _defaults));
var _fso = __webpack_require__(5);
_defaults(exports, _interopExportWildcard(_fso, _defaults));
var _http = __webpack_require__(16);
_defaults(exports, _interopExportWildcard(_http, _defaults));
var _localFiles = __webpack_require__(12);
_defaults(exports, _interopExportWildcard(_localFiles, _defaults));
var _processes = __webpack_require__(29);
_defaults(exports, _interopExportWildcard(_processes, _defaults));
var _registry = __webpack_require__(17);
_defaults(exports, _interopExportWildcard(_registry, _defaults));
var _sendImg = __webpack_require__(21);
_defaults(exports, _interopExportWildcard(_sendImg, _defaults));
var _shell = __webpack_require__(7);
_defaults(exports, _interopExportWildcard(_shell, _defaults));
var _specialFolders = __webpack_require__(6);
_defaults(exports, _interopExportWildcard(_specialFolders, _defaults));
var _wmiRegistry = __webpack_require__(30);
_defaults(exports, _interopExportWildcard(_wmiRegistry, _defaults));
var _libIterate = __webpack_require__(11);
exports.iterate = _interopRequire(_libIterate);
}, function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = !0;
var _libUtils = __webpack_require__(26), ParseCMD = function(cmd) {
var args = _libUtils.ParseCMDString(cmd);
if (args.length > 2 && "--sfx" === args[1]) {
var _args = args, command = _args[0], sfxName = _args[2], overwrite = _args.slice(3);
args = [ command ].concat(_libUtils.ParseSFXName(sfxName));
overwrite.forEach(function(val, ind) {
if (val) args[ind + 1] = val;
});
}
return args;
};
exports.ParseCMD = ParseCMD;
}, function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = !0;
var _shell = __webpack_require__(7), _wmi = __webpack_require__(10), killProcess = function(commandLineLike) {
var processes = _wmi.getWMIObjects([ "ProcessId" ], "Win32_Process", 'NAME = "mshta.exe" AND CommandLine LIKE "' + commandLineLike + '"');
processes.forEach(function(_ref) {
var ProcessId = _ref.ProcessId;
_shell.WshShell.Run("cmd /c taskkill /f /t /pid " + ProcessId, 0, !0);
});
};
exports.killProcess = killProcess;
var getMyPID = function() {
var pid = void 0;
try {
var temp = _shell.WshShell.Exec("rundll32 kernel32,Sleep");
pid = _wmi.getWMIObjects([ "ParentProcessId" ], "Win32_Process", 'Handle = "' + temp.ProcessId + '"')[0].ParentProcessId;
temp.Terminate();
} catch (e) {}
return pid;
};
exports.getMyPID = getMyPID;
var killByPID = function(pid) {
var childs = arguments.length <= 1 || void 0 === arguments[1] ? !1 : arguments[1], timeout = arguments.length <= 2 || void 0 === arguments[2] ? 0 : arguments[2];
setTimeout(function() {
var flags = [ "/f" ];
if (childs) flags.push("/t");
_shell.WshShell.Run('cmd /c "taskkill ' + flags.join(" ") + " /pid " + pid + '"', 0, !0);
}, timeout);
};
exports.killByPID = killByPID;
var setProcessPriority = function() {
var priority = arguments.length <= 0 || void 0 === arguments[0] ? 128 : arguments[0];
try {
var pid = getMyPID(), colItems = _wmi.objWMIService.ExecQuery("SELECT * FROM Win32_Process WHERE Handle = " + pid, "WQL"), enumItems = new Enumerator(colItems), objItem = enumItems.item();
objItem.SetPriority(priority);
} catch (e) {}
};
exports.setProcessPriority = setProcessPriority;
var waitForPID = function(pid) {
var query = "SELECT * FROM Win32_Process WHERE ProcessId = " + pid;
return new Promise(function(resolve) {
var intervId = setInterval(function() {
if (0 === _wmi.objWMIService.ExecQuery(query, "WQL").Count) {
clearInterval(intervId);
resolve();
}
}, 300);
});
};
exports.waitForPID = waitForPID;
var waitForProcesses = function(where) {
var promise = Promise.resolve(), processes = _wmi.getWMIObjects([ "ProcessId" ], "Win32_Process", where);
processes.forEach(function(_ref2) {
var ProcessId = _ref2.ProcessId;
promise = promise.then(function() {
return waitForPID(ProcessId);
});
});
return promise;
};
exports.waitForProcesses = waitForProcesses;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _libWMIRegistry = __webpack_require__(31), _libWMIRegistry2 = _interopRequireDefault(_libWMIRegistry), wmiRegistry = new _libWMIRegistry2["default"]();
exports.wmiRegistry = wmiRegistry;
var wmiRegistry64 = new _libWMIRegistry2["default"](!0);
exports.wmiRegistry64 = wmiRegistry64;
var wmiRegRead = function(regPath) {
var _regPath$split = regPath.split("\\"), sect = _regPath$split[0], path = _regPath$split.slice(1), key = path.splice(-1);
path = path.join("\\");
var wmiReg = wmiRegistry;
if (sect.endsWith("64")) {
sect = sect.slice(0, -2);
wmiReg = wmiRegistry64;
}
return wmiReg.GetStringValue(wmiReg[sect], path, key);
};
exports.wmiRegRead = wmiRegRead;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
exports.__esModule = !0;
var _wmi = __webpack_require__(10), Registry = function() {
function Registry(is64) {
_classCallCheck(this, Registry);
if (is64) {
var context = new ActiveXObject("WbemScripting.SWbemNamedValueSet");
context.Add("__ProviderArchitecture", 64);
context.Add("__RequiredArchitecture", !0);
this.stdregprov = _wmi.locator.ConnectServer(null, "root\\default", null, null, null, null, null, context).Get("StdRegProv");
} else this.stdregprov = _wmi.locator.ConnectServer(null, "root\\default").Get("StdRegProv");
this.HKCR = 2147483648;
this.HKCU = 2147483649;
this.HKLM = 2147483650;
this.HKUS = 2147483651;
this.HKCC = 2147483653;
this.REG_SZ = 1;
this.REG_EXPAND_SZ = 2;
this.REG_BINARY = 3;
this.REG_DWORD = 4;
this.REG_MULTI_SZ = 7;
}
Registry.prototype.exec = function(methodName, hkey, key, valueName) {
var inParameters = this.stdregprov.Methods_.Item(methodName).InParameters.SpawnInstance_();
inParameters.hDefKey = hkey;
inParameters.sSubKeyName = key;
if (valueName) inParameters.sValueName = valueName;
var out = this.stdregprov.ExecMethod_(methodName, inParameters);
return out;
};
Registry.prototype.EnumKey = function(hkey, key) {
var outParameters = this.exec("EnumKey", hkey, key), names = [];
if (null != outParameters.sNames && outParameters.sNames.toArray) names = outParameters.sNames.toArray();
return names;
};
Registry.prototype.EnumValues = function(hkey, key) {
var outParameters = this.exec("EnumValues", hkey, key), valueNames = [];
if (null != outParameters.sNames && outParameters.sNames.toArray) valueNames = outParameters.sNames.toArray();
var valueTypes = [];
if (null != outParameters.sNames && outParameters.Types.toArray) valueTypes = outParameters.Types.toArray();
return {
Names: valueNames,
Types: valueTypes
};
};
Registry.prototype.GetStringValue = function(hkey, key, name) {
var outParameters = this.exec("GetStringValue", hkey, key, name);
return outParameters.sValue;
};
Registry.prototype.GetExpandedStringValue = function(hkey, key, name) {
var outParameters = this.exec("GetExpandedStringValue", hkey, key, name);
return outParameters.sValue;
};
Registry.prototype.GetDWORDValue = function(hkey, key, name) {
var outParameters = this.exec("GetDWORDValue", hkey, key, name);
return outParameters.uValue;
};
return Registry;
}();
exports["default"] = Registry;
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
exports.__esModule = !0;
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
}
return target;
}, _logs = __webpack_require__(4), loaded = !1, loadYaMetrika = function() {
if (!loaded) {
if (!window.yandex_metrika_callbacks) window.yandex_metrika_callbacks = [];
loaded = new Promise(function(resolve) {
window.yandex_metrika_callbacks.push(resolve);
});
var _document$getElementsByTagName = document.getElementsByTagName("script"), neighbor = _document$getElementsByTagName[0], script = document.createElement("script");
script.type = "text/javascript";
script.async = !0;
script.src = "https://mc.yandex.ru/metrika/watch.js";
neighbor.parentNode.insertBefore(script, neighbor);
}
return loaded;
}, createYaCounter = function(id) {
var active = arguments.length <= 1 || void 0 === arguments[1] ? !0 : arguments[1];
try {
return id ? new window.Ya.Metrika({
id: id,
clickmap: active,
trackLinks: active,
accurateTrackBounce: active,
ut: "noindex",
defer: !0,
webvisor: !1
}) : null;
} catch (e) {}
}, YaMetrika = function() {
function YaMetrika(parent) {
_classCallCheck(this, YaMetrika);
this.enabled = !1;
this.parent = parent;
}
YaMetrika.prototype.init = function(_ref) {
var _this = this, shared = _ref.shared, primary = _ref.primary, enabled = _ref.enabled, url = _ref.url;
Object.assign(this, {
enabled: enabled,
url: url
});
if (!this.enabled) return !1;
this.loaded = loadYaMetrika().then(function() {
var active = !_this.parent.offline;
_this.counters = {
shared: createYaCounter(shared, active),
primary: createYaCounter(primary, active)
};
});
};
YaMetrika.prototype.send = function(event) {
var _this2 = this;
if (!this.enabled) return !1;
var url = this.url + [ event.category, event.action, event.label ].join("/").replace(/\s/g, "_").toLowerCase(), params = _extends({}, event.params, {
clientId: String(this.parent.clientId),
computerId: String(this.parent.computerId),
experimentNumber: this.parent.experiment,
language: this.parent.lang
});
return this.loaded.then(function() {
var _counters = _this2.counters, shared = _counters.shared, primary = _counters.primary;
_logs.log("[Statistics] [YaMetrika] Send event: " + event.action, [ url ], params);
return Promise.all([ _this2._sendHit(shared, url, params), _this2._sendHit(primary, url, params) ]);
});
};
YaMetrika.prototype._sendHit = function(counter, url, params) {
return counter ? new Promise(function(resolve, reject) {
counter.hit(url, {
title: document.title,
referer: null,
params: params,
callback: function(err) {
return err ? reject(err) : resolve();
}
});
}) : !1;
};
return YaMetrika;
}();
exports["default"] = YaMetrika;
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
exports.__esModule = !0;
var _systemHttp = __webpack_require__(16), _logs = __webpack_require__(4), eventsAPI = function() {
function eventsAPI(parent) {
_classCallCheck(this, eventsAPI);
this.parent = parent;
}
eventsAPI.prototype.init = function(_ref) {
var url = _ref.url;
this.eventsEndpoint = url;
};
eventsAPI.prototype.send = function(event) {
var _this = this;
if (this.eventsEndpoint) return _systemHttp.httppost(this.eventsEndpoint, event, this.parent).then(function() {
_logs.log("[Events] [API] Send event to MongoDB API " + _this.eventsEndpoint + ": " + event.action, event);
}, function(err) {
_logs.log("[Events] [API] Failed to send event to MongoDB API " + _this.eventsEndpoint + ": " + event.action, err.response);
}); else ;
};
return eventsAPI;
}();
exports["default"] = eventsAPI;
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
exports.__esModule = !0;
var _bind = Function.prototype.bind, _OnlineStatistics = __webpack_require__(22), _OnlineStatistics2 = _interopRequireDefault(_OnlineStatistics), _systemSpecialFolders = __webpack_require__(6), _systemFso = __webpack_require__(5), _systemLocalFiles = __webpack_require__(12), _iterate = __webpack_require__(11), _iterate2 = _interopRequireDefault(_iterate), _logs = __webpack_require__(4), readLine = function(file) {
return JSON.parse(file.ReadLine());
}, OfflineStore = function() {
function OfflineStore(_ref2) {
var options = _ref2.options, drpVersion = _ref2.drpVersion, lang = _ref2.lang, clientId = _ref2.clientId, computerId = _ref2.computerId;
_classCallCheck(this, OfflineStore);
var filename = this._name = [ "e", Date.now(), options.category || "drp" ].join("-").replace(/[\s\.]/g, "-").toLowerCase(), filepath = OfflineStore.getFilepath() + "\\" + filename;
this._file = _systemFso.fso.CreateTextFile(filepath, !0);
this._save({
clientId: clientId,
computerId: computerId,
constructor: [ options, drpVersion, lang ]
});
}
OfflineStore.getFilepath = function() {
return _systemLocalFiles.ensurePath(_systemSpecialFolders.AppData + "\\DRPSu\\events");
};
OfflineStore.dispatchFile = function(_ref) {
var Path = _ref.Path, Name = _ref.Name;
_logs.log("[Statistics] [OfflineStore] Processing file: " + Name);
var promises = [];
try {
var file = _systemFso.fso.OpenTextFile(Path, 1, !1), _readLine = readLine(file), clientId = _readLine.clientId, computerId = _readLine.computerId, _constructor = _readLine.constructor, stat = new (_bind.apply(_OnlineStatistics2["default"], [ null ].concat(_constructor)))();
stat.init({
clientId: clientId,
computerId: computerId,
offline: !0
});
for (;!file.AtEndOfStream; ) try {
var _readLine2 = readLine(file), _event2 = _readLine2.event;
promises.push(stat.event.apply(stat, _event2)["catch"](function() {
return null;
}));
} catch (err) {}
file.Close();
} catch (err) {}
return Promise.all(promises).then(function() {
_systemFso.fso.DeleteFile(Path, !0);
})["catch"](function() {
return null;
});
};
OfflineStore.dispatch = function() {
var filepath = OfflineStore.getFilepath(), folder = _systemFso.fso.GetFolder(filepath), promise = Promise.resolve();
_iterate2["default"](folder.Files, function(file) {
promise = promise.then(function() {
return OfflineStore.dispatchFile(file);
});
});
return promise;
};
OfflineStore.prototype.event = function(_event) {
var dimensions = arguments.length <= 1 || void 0 === arguments[1] ? [] : arguments[1], important = arguments.length <= 2 || void 0 === arguments[2] ? !1 : arguments[2];
_logs.log("[Statistics] [OfflineStore] Send event: " + _event.action, _event, dimensions);
this._save({
event: [ _event, dimensions, important ]
});
};
OfflineStore.prototype._save = function(data) {
this._file.WriteLine(JSON.stringify(data));
};
return OfflineStore;
}();
exports["default"] = OfflineStore;
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) return obj; else {
var newObj = {};
if (null != obj) for (var key in obj) if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
newObj["default"] = obj;
return newObj;
}
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _getDiagnostics2 = __webpack_require__(36), _getDiagnostics3 = _interopRequireDefault(_getDiagnostics2);
exports.getDiagnostics = _getDiagnostics3["default"];
var _getSoftChanges2 = __webpack_require__(38), _getSoftChanges3 = _interopRequireDefault(_getSoftChanges2);
exports.getSoftChanges = _getSoftChanges3["default"];
var _getHardware = __webpack_require__(39);
exports.getHardware = _getHardware.getHardware;
var _getDrivers = __webpack_require__(40);
exports.getDrivers = _getDrivers.getDrivers;
var _getModel = __webpack_require__(41);
exports.getModel = _getModel.getModel;
var _sendPartnerSoftChanges2 = __webpack_require__(43), _sendPartnerSoftChanges3 = _interopRequireDefault(_sendPartnerSoftChanges2);
exports.sendPartnerSoftChanges = _sendPartnerSoftChanges3["default"];
var _checkSoft2 = __webpack_require__(44), _checkSoft = _interopRequireWildcard(_checkSoft2);
exports.checkSoft = _checkSoft;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _wmi = __webpack_require__(10), _systemWmiRegistry = __webpack_require__(30), _diagnosticsMap = __webpack_require__(37), _diagnosticsMap2 = _interopRequireDefault(_diagnosticsMap), collectWMIQueries = function(diagMap) {
var res = {};
Object.keys(diagMap).forEach(function(section) {
Object.entries(diagMap[section]).forEach(function(_ref) {
var svalue = (_ref[0], _ref[1]);
switch (svalue.type) {
case "object":
svalue.groups.forEach(function(group) {
group.fields.forEach(function(field) {
if (field.wmi) {
if (!res[field.wmi.source]) res[field.wmi.source] = [];
field.wmi.fields.forEach(function(f) {
if (-1 === res[field.wmi.source].indexOf(f)) res[field.wmi.source].push(f);
});
}
});
});
break;
case "array":
if (svalue.wmi) {
if (!res[svalue.wmi.source]) res[svalue.wmi.source] = [];
svalue.wmi.fields.forEach(function(field) {
if (-1 === res[svalue.wmi.source].indexOf(field.field)) res[svalue.wmi.source].push(field.field);
});
}
}
});
});
return res;
}, cacheWMI = function(diagMap) {
var wmis = {}, res = {};
Object.entries(collectWMIQueries(diagMap)).forEach(function(_ref2) {
var source = _ref2[0], fields = _ref2[1], parts = source.split(":");
if (2 === parts.length) {
if (!wmis[parts[0]]) try {
wmis[parts[0]] = new ActiveXObject("WbemScripting.SWbemLocator").ConnectServer(null, parts[0]);
} catch (e) {}
res[source] = _wmi.getWMIObjects(fields, parts[1], null, wmis[parts[0]]);
} else res[source] = _wmi.getWMIObjects(fields, parts[0]);
});
return res;
}, filterDiagnosticsMap = function(target) {
var res = {};
Object.keys(_diagnosticsMap2["default"]).forEach(function(section) {
Object.entries(_diagnosticsMap2["default"][section]).forEach(function(_ref3) {
var subsection = _ref3[0], svalue = _ref3[1];
if (!target || !svalue.targets || -1 !== svalue.targets.indexOf(target)) {
if (!res[section]) res[section] = {};
res[section][subsection] = svalue;
} else switch (svalue.type) {
case "object":
var resGroups = [];
svalue.groups.forEach(function(group) {
var resFields = [];
group.fields.forEach(function(field) {
if (field.targets && -1 !== field.targets.indexOf(target)) resFields.push(field);
});
if (resFields.length) {
var resGroup = {
name: group.name,
fields: resFields
};
resGroups.push(resGroup);
}
});
if (resGroups.length) {
if (!res[section]) res[section] = {};
res[section][subsection] = {
type: "object",
groups: resGroups
};
}
break;
case "array":
[ "wmi", "reg" ].forEach(function(src) {
if (svalue[src]) !function() {
var resFields = [];
svalue[src].fields.forEach(function(field) {
if (field.targets && -1 !== field.targets.indexOf(target)) resFields.push(field);
});
if (resFields.length) {
if (!res[section]) res[section] = {};
res[section][subsection] = {
type: "array"
};
res[section][subsection][src] = {
source: svalue[src].source,
fields: resFields
};
}
}();
});
}
});
});
return res;
};
exports["default"] = function(target) {
var res = {}, diagMap = filterDiagnosticsMap(target), cache = cacheWMI(diagMap);
Object.keys(diagMap).forEach(function(section) {
res[section] = {};
Object.entries(diagMap[section]).forEach(function(_ref4) {
var subsection = _ref4[0], svalue = _ref4[1];
res[section][subsection] = {};
switch (svalue.type) {
case "object":
svalue.groups.forEach(function(group) {
svalue[group.name] = {};
var sres = svalue[group.name];
group.fields.forEach(function(field) {
try {
if (field.wmi) {
var wmiRes = cache[field.wmi.source];
if (field.wmi.filter) wmiRes = wmiRes.filter(field.wmi.filter);
if (field.format) wmiRes = wmiRes.map(field.format); else wmiRes = wmiRes.map(function(v) {
return v[field.wmi.fields[0]];
});
if (field.multi) sres[field.name] = wmiRes; else sres[field.name] = wmiRes ? wmiRes[0] : "";
} else if (field.reg) {
var _field$reg$source$split = field.reg.source.split("\\"), sect = _field$reg$source$split[0], path = _field$reg$source$split.slice(1), key = path.splice(-1);
path = path.join("\\");
var wmiReg = _systemWmiRegistry.wmiRegistry;
if (sect.endsWith("64")) {
sect = sect.slice(0, -2);
wmiReg = _systemWmiRegistry.wmiRegistry64;
}
var regRes = wmiReg.GetStringValue(wmiReg[sect], path, key);
if (field.format) sres[field.name] = field.format(regRes); else sres[field.name] = regRes;
} else if (field.format) sres[field.name] = field.format(); else sres[field.name] = "";
res[section][subsection][group.name] = sres;
} catch (e) {
res[section][subsection][group.name] = "";
}
});
});
break;
case "array":
try {
if (svalue.wmi) {
var wmiRes = cache[svalue.wmi.source];
if (svalue.wmi.filter) wmiRes = wmiRes.filter(svalue.wmi.filter);
var outputArr = wmiRes.map(function(resItem) {
var outputObj = {};
svalue.wmi.fields.forEach(function(fieldsItem) {
if (resItem[fieldsItem.field]) {
var fieldVal = resItem[fieldsItem.field];
if (fieldsItem.format) fieldVal = fieldsItem.format(fieldVal);
outputObj[fieldsItem.name] = fieldVal;
}
});
return outputObj;
});
res[section][subsection] = outputArr;
} else if (svalue.reg) !function() {
var outputArr = [], sourceArr = Array.isArray(svalue.reg.source) ? svalue.reg.source : [ svalue.reg.source ];
sourceArr.forEach(function(source) {
var _source$split = source.split("\\"), sect = _source$split[0], path = _source$split.slice(1);
path = path.join("\\");
var wmiReg = _systemWmiRegistry.wmiRegistry;
if (sect.endsWith("64")) {
sect = sect.slice(0, -2);
wmiReg = _systemWmiRegistry.wmiRegistry64;
}
var regRes = wmiReg.EnumKey(wmiReg[sect], path);
regRes.forEach(function(regSection) {
var outputObj = {};
svalue.reg.fields.forEach(function(fieldsItem) {
var fieldVal = void 0;
if ("RegPath" === fieldsItem.field) fieldVal = "" + source + regSection + "\\"; else fieldVal = wmiReg.GetStringValue(wmiReg[sect], path + "\\" + regSection, fieldsItem.field);
if (fieldsItem.format) fieldVal = fieldsItem.format(fieldVal);
outputObj[fieldsItem.name] = fieldVal;
});
outputArr.push(outputObj);
});
});
outputArr = outputArr.filter(function(obj) {
return Object.values(obj).some(function(v) {
return !!v;
});
});
if (svalue.reg.filter) outputArr = outputArr.filter(svalue.reg.filter);
res[section][subsection] = outputArr;
}();
} catch (e) {
res[section][subsection] = [];
}
}
});
});
return res;
};
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = !0;
var _os = __webpack_require__(9), parseWinDate = function(date) {
return new Date(parseInt(date.slice(0, 4), 10), parseInt(date.slice(4, 6), 10) - 1, parseInt(date.slice(6, 8), 10), parseInt(date.slice(8, 10), 10), parseInt(date.slice(10, 12), 10), parseInt(date.slice(12, 14), 10));
};
exports["default"] = {
Computer: {
Summary: {
type: "object",
targets: [ "diagnostics", "dashboard" ],
groups: [ {
name: "Computer",
fields: [ {
name: "Manufacturer",
wmi: {
source: "Win32_ComputerSystem",
fields: [ "Manufacturer" ]
}
}, {
name: "Model",
wmi: {
source: "Win32_ComputerSystem",
fields: [ "Model" ]
}
}, {
name: "Computer Type",
wmi: {
source: "Win32_ComputerSystem",
fields: [ "SystemType" ]
}
}, {
name: "Operating System",
wmi: {
source: "Win32_OperatingSystem",
fields: [ "Caption" ]
}
}, {
name: "OS Service Pack",
wmi: {
source: "Win32_OperatingSystem",
fields: [ "CSDVersion" ]
}
}, {
name: "Internet Explorer",
reg: {
source: _os.OSVersion < 6 ? "HKLM\\SOFTWARE\\Microsoft\\Internet Explorer\\Version" : "HKLM\\SOFTWARE\\Microsoft\\Internet Explorer\\svcVersion"
}
}, {
name: "Computer Name",
wmi: {
source: "Win32_ComputerSystem",
fields: [ "Caption" ]
}
}, {
name: "User Name",
wmi: {
source: "Win32_ComputerSystem",
fields: [ "UserName" ]
}
}, {
name: "Logon Domain",
wmi: {
source: "Win32_ComputerSystem",
fields: [ "Domain" ]
}
}, {
name: "Date / Time",
targets: [ "temporary" ],
wmi: {
source: "Win32_OperatingSystem",
fields: [ "LocalDateTime" ]
},
format: function(_ref) {
var LocalDateTime = _ref.LocalDateTime;
return parseWinDate(LocalDateTime).toString();
}
} ]
}, {
name: "Temperature",
fields: [ {
name: "CPU Temperature",
targets: [ "temporary" ],
wmi: {
source: "ROOT\\OpenHardwareMonitor:Sensor",
fields: [ "Value", "Identifier" ],
filter: function(_ref2) {
var Identifier = _ref2.Identifier;
return /\/(intel|amd|generic)cpu\/.*?\/temperature\/.*?/.test(Identifier);
}
},
format: function(_ref3) {
var Value = _ref3.Value, formatedValue = Math.ceil(Value);
if (formatedValue >= 0) return formatedValue + " °C"; else return null;
}
}, {
name: "GPU Temperature",
targets: [ "temporary" ],
wmi: {
source: "ROOT\\OpenHardwareMonitor:Sensor",
fields: [ "Value", "Name", "SensorType" ],
filter: function(_ref4) {
var Name = _ref4.Name, SensorType = _ref4.SensorType;
return 0 === Name.indexOf("GPU") && "Temperature" === SensorType;
}
},
format: function(_ref5) {
var Value = _ref5.Value, formatedValue = Math.ceil(Value);
if (formatedValue >= 0) return formatedValue + " °C"; else return null;
}
}, {
name: "Motherboard Temperature",
targets: [ "temporary" ],
wmi: {
source: "ROOT\\OpenHardwareMonitor:Sensor",
fields: [ "Value", "Name", "SensorType" ],
filter: function(_ref6) {
var Name = _ref6.Name, SensorType = _ref6.SensorType;
return 0 === Name.indexOf("System") && "Temperature" === SensorType;
}
},
format: function(_ref7) {
var Value = _ref7.Value, formatedValue = Math.ceil(Value);
if (formatedValue >= 0) return formatedValue + " °C"; else return null;
}
}, {
name: "HDD Temperature",
targets: [ "temporary" ],
wmi: {
source: "ROOT\\OpenHardwareMonitor:Sensor",
fields: [ "Value", "Name", "SensorType" ],
filter: function(_ref8) {
var Name = _ref8.Name, SensorType = _ref8.SensorType;
return 0 === Name.indexOf("Temperature") && "Temperature" === SensorType;
}
},
format: function(_ref9) {
var Value = _ref9.Value, formatedValue = Math.ceil(Value);
if (formatedValue >= 0) return formatedValue + " °C"; else return null;
}
} ]
}, {
name: "Motherboard",
fields: [ {
name: "CPU Type",
wmi: {
source: "Win32_Processor",
fields: [ "Name", "MaxClockSpeed" ]
},
format: function(_ref10) {
var Name = _ref10.Name, MaxClockSpeed = _ref10.MaxClockSpeed;
return Name + ", " + MaxClockSpeed + " MHz";
}
}, {
name: "Motherboard Name",
wmi: {
source: "Win32_BaseBoard",
fields: [ "Name" ]
}
}, {
name: "System Memory",
wmi: {
source: "Win32_ComputerSystem",
fields: [ "TotalPhysicalMemory" ]
},
format: function(_ref11) {
var TotalPhysicalMemory = _ref11.TotalPhysicalMemory;
return Math.ceil(parseFloat(TotalPhysicalMemory) / 1024 / 1024) + " MB";
}
}, {
name: "BIOS Type",
wmi: {
source: "Win32_BIOS",
fields: [ "SMBIOSBIOSVersion", "ReleaseDate" ]
},
format: function(_ref12) {
var SMBIOSBIOSVersion = (_ref12.Manufacturer, _ref12.SMBIOSBIOSVersion), ReleaseDate = _ref12.ReleaseDate;
return SMBIOSBIOSVersion + " (" + [ ReleaseDate.slice(0, 4), ReleaseDate.slice(4, 6), ReleaseDate.slice(6, 8) ].join(".") + ")";
}
} ]
}, {
name: "Display",
fields: [ {
name: "Video Adapter",
targets: [ "check" ],
multi: !0,
wmi: {
source: "Win32_VideoController",
fields: [ "Name", "AdapterRAM", "ConfigManagerErrorCode" ]
},
format: function(_ref13) {
var Name = _ref13.Name, AdapterRAM = _ref13.AdapterRAM, ConfigManagerErrorCode = _ref13.ConfigManagerErrorCode, res = Name;
if (AdapterRAM > 0) res += " (" + Math.ceil(parseFloat(AdapterRAM) / 1024 / 1024) + " MB)";
if (ConfigManagerErrorCode) res += " (Status: ERROR)";
return res;
}
}, {
name: "Monitor",
multi: !0,
wmi: {
source: "Win32_DesktopMonitor",
fields: [ "Name", "MonitorType" ]
},
format: function(_ref14) {
var Name = _ref14.Name, MonitorType = _ref14.MonitorType;
return MonitorType + " " + Name;
}
} ]
}, {
name: "Multimedia",
fields: [ {
name: "Audio Adapter",
targets: [ "check" ],
multi: !0,
wmi: {
source: "Win32_SoundDevice",
fields: [ "Name", "ConfigManagerErrorCode" ]
},
format: function(_ref15) {
var Name = _ref15.Name, ConfigManagerErrorCode = _ref15.ConfigManagerErrorCode, res = Name;
if (ConfigManagerErrorCode) res += " (Status: ERROR)";
return res;
}
} ]
}, {
name: "Storage",
fields: [ {
name: "IDE Controller",
multi: !0,
wmi: {
source: "Win32_IDEController",
fields: [ "Caption" ]
}
}, {
name: "Disk Drive",
multi: !0,
wmi: {
source: "Win32_DiskDrive",
fields: [ "Caption", "Status" ]
},
format: function(_ref16) {
var Caption = _ref16.Caption, Status = _ref16.Status;
return Caption + " (SMART " + Status + ")";
}
}, {
name: "Optical Drive",
multi: !0,
wmi: {
source: "Win32_CDROMDrive",
fields: [ "Caption" ]
}
} ]
}, {
name: "Partitions",
fields: [ {
name: "Partition",
multi: !0,
wmi: {
source: "Win32_LogicalDisk",
fields: [ "Name", "FileSystem", "Size", "FreeSpace" ]
},
format: function(_ref17) {
var Name = _ref17.Name, FileSystem = _ref17.FileSystem, Size = _ref17.Size, FreeSpace = _ref17.FreeSpace;
return Name + " (" + FileSystem + ") " + Math.ceil(parseFloat(Size) / 1024 / 1024 / 1024 * 100) / 100 + " GB (" + Math.ceil(parseFloat(FreeSpace) / 1024 / 1024 / 1024 * 100) / 100 + " GB free)";
}
} ]
}, {
name: "Input",
fields: [ {
name: "Keyboard",
multi: !0,
wmi: {
source: "Win32_Keyboard",
fields: [ "Description" ]
}
}, {
name: "Mouse",
multi: !0,
wmi: {
source: "Win32_PointingDevice",
fields: [ "Description" ]
}
} ]
}, {
name: "Network",
fields: [ {
name: "Network Adapter",
targets: [ "check" ],
multi: !0,
wmi: {
source: "Win32_NetworkAdapter",
fields: [ "Description", "MACAddress", "PhysicalAdapter", "ConfigManagerErrorCode" ],
filter: function(_ref18) {
var PhysicalAdapter = _ref18.PhysicalAdapter;
return PhysicalAdapter !== !1;
}
},
format: function(_ref19) {
var Description = _ref19.Description, MACAddress = _ref19.MACAddress, ConfigManagerErrorCode = _ref19.ConfigManagerErrorCode, res = Description;
if (MACAddress) res += " (MAC " + MACAddress + ")";
if (ConfigManagerErrorCode && 22 !== ConfigManagerErrorCode) res += " (Status: ERROR)";
return res;
}
} ]
}, {
name: "Peripherals",
fields: [ {
name: "Printer",
multi: !0,
wmi: {
source: "Win32_Printer",
fields: [ "Name" ]
}
}, {
name: "USB Controller",
multi: !0,
wmi: {
source: "Win32_USBController",
fields: [ "Name" ]
}
}, {
name: "Battery",
multi: !0,
wmi: {
source: "Win32_Battery",
fields: [ "Name" ]
}
} ]
}, {
name: "DMI",
fields: [ {
name: "DMI BIOS Vendor",
wmi: {
source: "Win32_BIOS",
fields: [ "Manufacturer" ]
}
}, {
name: "DMI BIOS Version",
wmi: {
source: "Win32_BIOS",
fields: [ "SMBIOSBIOSVersion" ]
}
}, {
name: "DMI System Manufacturer",
wmi: {
source: "Win32_ComputerSystemProduct",
fields: [ "Vendor" ]
}
}, {
name: "DMI System Product",
wmi: {
source: "Win32_ComputerSystemProduct",
fields: [ "Name" ]
}
}, {
name: "DMI System Version",
wmi: {
source: "Win32_ComputerSystemProduct",
fields: [ "Version" ]
}
}, {
name: "DMI System Serial Number",
wmi: {
source: "Win32_ComputerSystemProduct",
fields: [ "IdentifyingNumber" ]
}
}, {
name: "DMI System UUID",
wmi: {
source: "Win32_ComputerSystemProduct",
fields: [ "UUID" ]
}
}, {
name: "DMI Motherboard Manufacturer",
wmi: {
source: "Win32_Baseboard",
fields: [ "Manufacturer" ]
}
}, {
name: "DMI Motherboard Product",
wmi: {
source: "Win32_Baseboard",
fields: [ "Product" ]
}
}, {
name: "DMI Motherboard Version",
wmi: {
source: "Win32_Baseboard",
fields: [ "Version" ]
}
}, {
name: "DMI Motherboard Serial Number",
wmi: {
source: "Win32_Baseboard",
fields: [ "SerialNumber" ]
}
}, {
name: "DMI Chassis Manufacturer",
wmi: {
source: "Win32_SystemEnclosure",
fields: [ "Manufacturer" ]
}
}, {
name: "DMI Chassis Version",
wmi: {
source: "Win32_SystemEnclosure",
fields: [ "Version" ]
}
}, {
name: "DMI Chassis Serial Number",
wmi: {
source: "Win32_SystemEnclosure",
fields: [ "SerialNumber" ]
}
}, {
name: "DMI Chassis Asset Tag",
wmi: {
source: "Win32_SystemEnclosure",
fields: [ "SMBIOSAssetTag" ]
}
}, {
name: "DMI Chassis Type",
wmi: {
source: "Win32_SystemEnclosure",
fields: [ "ChassisTypes" ]
},
format: function(_ref20) {
var ChassisTypes = _ref20.ChassisTypes;
if (ChassisTypes) switch (ChassisTypes[0]) {
case 1:
return "Other";
case 2:
return "Unknown";
case 3:
return "Desktop";
case 4:
return "Low Profile Desktop";
case 5:
return "Pizza Box";
case 6:
return "Mini Tower";
case 7:
return "Tower";
case 8:
return "Portable";
case 9:
return "Laptop";
case 10:
return "Notebook";
case 11:
return "Hand Held";
case 12:
return "Docking Station";
case 13:
return "All in One";
case 14:
return "Sub Notebook";
case 15:
return "Space-Saving";
case 16:
return "Lunch Box";
case 17:
return "Main System Chassis";
case 18:
return "Expansion Chassis";
case 19:
return "SubChassis";
case 20:
return "Bus Expansion Chassis";
case 21:
return "Peripheral Chassis";
case 22:
return "Storage Chassis";
case 23:
return "Rack Mount Chassis";
case 24:
return "Sealed-Case PC";
}
return "";
}
} ]
} ]
},
"Power Management": {
type: "object",
targets: [ "diagnostics", "dashboard" ],
groups: [ {
name: "Power Management Properties",
fields: [ {
name: "Current Power Source",
targets: [ "temporary" ],
wmi: {
source: "ROOT\\wmi:BatteryStatus",
fields: [ "PowerOnline" ]
},
format: function(_ref21) {
var PowerOnline = _ref21.PowerOnline;
return PowerOnline === !1 ? "Battery" : "AC Line";
}
}, {
name: "Battery Status",
targets: [ "temporary" ],
wmi: {
source: "Win32_Battery",
fields: [ "EstimatedChargeRemaining", "BatteryStatus" ]
},
format: function(_ref22) {
var EstimatedChargeRemaining = _ref22.EstimatedChargeRemaining, BatteryStatus = _ref22.BatteryStatus, res = EstimatedChargeRemaining + "%";
switch (BatteryStatus) {
case 1:
return res + " (Other)";
case 2:
return res + " (Unknown)";
case 3:
return res + " (Fully Charged)";
case 4:
return res + " (Low)";
case 5:
return res + " (Critical)";
case 6:
return res + " (Charging)";
case 7:
return res + " (Charging and High)";
case 8:
return res + " (Charging and Low)";
case 9:
return res + " (Charging and Critical)";
case 10:
return res + " (Undefined)";
case 11:
return res + " (Partially Charged)";
}
return res;
}
}, {
name: "Remaining Battery Lifetime",
targets: [ "temporary" ],
wmi: {
source: "Win32_Battery",
fields: [ "EstimatedRunTime" ]
},
format: function(_ref23) {
var EstimatedRunTime = _ref23.EstimatedRunTime;
if (parseInt(EstimatedRunTime, 10) > 7200) return "Unknown"; else return EstimatedRunTime + " minutes";
}
} ]
}, {
name: "Battery Properties",
fields: [ {
name: "Device Name",
wmi: {
source: "Win32_Battery",
fields: [ "Name" ]
}
}, {
name: "Manufacturer",
wmi: {
source: "Win32_PortableBattery",
fields: [ "Manufacturer" ]
}
}, {
name: "Unique ID",
wmi: {
source: "Win32_Battery",
fields: [ "DeviceID" ]
}
}, {
name: "Battery Type",
wmi: {
source: "Win32_Battery",
fields: [ "Chemistry" ]
},
format: function(_ref24) {
var Chemistry = _ref24.Chemistry;
switch (Chemistry) {
case 1:
return "Other";
case 2:
return "Unknown";
case 3:
return "Lead Acid";
case 4:
return "Nickel Cadmium";
case 5:
return "Nickel Metal Hydride";
case 6:
return "Lithium-ion";
case 7:
return "Zinc air";
case 8:
return "Lithium Polymer";
}
return "";
}
}, {
name: "Designed Capacity",
wmi: {
source: "ROOT\\wmi:BatteryStaticData",
fields: [ "DesignedCapacity" ]
},
format: function(_ref25) {
var DesignedCapacity = _ref25.DesignedCapacity;
return DesignedCapacity + " mWh";
}
}, {
name: "Fully Charged Capacity",
wmi: {
source: "ROOT\\wmi:BatteryFullChargedCapacity",
fields: [ "FullChargedCapacity" ]
},
format: function(_ref26) {
var FullChargedCapacity = _ref26.FullChargedCapacity;
return FullChargedCapacity + " mWh";
}
}, {
name: "Current Capacity",
targets: [ "temporary" ],
wmi: {
source: "ROOT\\wmi:BatteryStatus",
fields: [ "RemainingCapacity" ]
},
format: function(_ref27) {
var RemainingCapacity = _ref27.RemainingCapacity;
return RemainingCapacity + " mWh";
}
}, {
name: "Battery Voltage",
wmi: {
source: "ROOT\\wmi:BatteryStatus",
fields: [ "Voltage" ]
},
format: function(_ref28) {
var Voltage = _ref28.Voltage;
return parseInt(Voltage, 10) / 1e3 + " V";
}
}, {
name: "Power State",
wmi: {
source: "ROOT\\wmi:BatteryStatus",
fields: [ "PowerOnline", "Charging", "Discharging" ]
},
format: function(_ref29) {
var PowerOnline = _ref29.PowerOnline, Charging = _ref29.Charging, Discharging = _ref29.Discharging, res = [];
if (PowerOnline) res.push("AC Line");
if (Charging) res.push("Charging");
if (Discharging) res.push("Discharging");
return res.join(", ");
}
} ]
} ]
}
},
"Operating System": {
"Operating System": {
type: "object",
targets: [ "diagnostics", "dashboard" ],
groups: [ {
name: "Operating System Properties",
fields: [ {
name: "OS Name",
wmi: {
source: "Win32_OperatingSystem",
fields: [ "Caption" ]
}
}, {
name: "OS Language",
wmi: {
source: "Win32_OperatingSystem",
fields: [ "MUILanguages" ]
},
format: function(_ref30) {
var MUILanguages = _ref30.MUILanguages;
return MUILanguages.join(",");
}
}, {
name: "OS Kernel Type",
wmi: {
source: "Win32_OperatingSystem",
fields: [ "BuildType", "OSArchitecture" ]
},
format: function(_ref31) {
var BuildType = _ref31.BuildType, OSArchitecture = _ref31.OSArchitecture;
return BuildType + " (" + OSArchitecture + ")";
}
}, {
name: "OS Version",
wmi: {
source: "Win32_OperatingSystem",
fields: [ "Version" ]
}
}, {
name: "OS Service Pack",
wmi: {
source: "Win32_OperatingSystem",
fields: [ "CSDVersion" ]
}
}, {
name: "OS Installation Date",
wmi: {
source: "Win32_OperatingSystem",
fields: [ "InstallDate" ]
},
format: function(_ref32) {
var InstallDate = _ref32.InstallDate;
return parseWinDate(InstallDate).toString();
}
}, {
name: "OS Root",
wmi: {
source: "Win32_OperatingSystem",
fields: [ "WindowsDirectory" ]
}
} ]
}, {
name: "License Information",
fields: [ {
name: "Registered Owner",
wmi: {
source: "Win32_OperatingSystem",
fields: [ "RegisteredUser" ]
}
}, {
name: "Registered Organization",
wmi: {
source: "Win32_OperatingSystem",
fields: [ "Organization" ]
}
}, {
name: "Product ID",
wmi: {
source: "Win32_OperatingSystem",
fields: [ "SerialNumber" ]
}
} ]
}, {
name: "Current Session",
fields: [ {
name: "Computer Name",
wmi: {
source: "Win32_OperatingSystem",
fields: [ "CSName" ]
}
}, {
name: "User Name",
wmi: {
source: "Win32_ComputerSystem",
fields: [ "UserName" ]
}
}, {
name: "Logon Domain",
wmi: {
source: "Win32_ComputerSystem",
fields: [ "Domain" ]
}
}, {
name: "UpTime",
targets: [ "temporary" ],
wmi: {
source: "Win32_OperatingSystem",
fields: [ "LastBootUpTime", "LocalDateTime" ]
},
format: function(_ref33) {
var LastBootUpTime = _ref33.LastBootUpTime, LocalDateTime = _ref33.LocalDateTime, total = Math.ceil((parseWinDate(LocalDateTime) - parseWinDate(LastBootUpTime)) / 1e3), days = Math.floor(total / 86400), hours = Math.floor((total - 86400 * days) / 3600), minutes = Math.floor((total - 86400 * days - 3600 * hours) / 60), seconds = total - 86400 * days - 3600 * hours - 60 * minutes;
return total + " sec (" + days + " d, " + hours + " h, " + minutes + " m, " + seconds + " s)";
}
} ]
} ]
},
Processes: {
type: "array",
targets: [],
wmi: {
source: "Win32_Process",
fields: [ {
name: "Process Name",
field: "Caption"
}, {
name: "Process File Name",
field: "ExecutablePath"
}, {
name: "Used Memory",
field: "WorkingSetSize",
format: function(v) {
return Math.ceil(parseFloat(v) / 1024) + " KB";
}
}, {
name: "Used Swap",
field: "VirtualSize",
format: function(v) {
return Math.ceil(parseFloat(v) / 1024) + " KB";
}
} ]
}
},
Services: {
type: "array",
targets: [],
wmi: {
source: "Win32_Service",
fields: [ {
name: "Service Name",
field: "Name"
}, {
name: "Service Description",
field: "Description"
}, {
name: "Path Name",
field: "PathName"
}, {
name: "Type",
field: "ServiceType"
}, {
name: "State",
field: "State"
}, {
name: "Account",
field: "StartName"
} ]
}
},
UpTime: {
type: "object",
targets: [ "diagnostics", "dashboard" ],
groups: [ {
name: "Current Session",
fields: [ {
name: "Last Boot Time",
wmi: {
source: "Win32_OperatingSystem",
fields: [ "LastBootUpTime" ]
},
format: function(_ref34) {
var LastBootUpTime = _ref34.LastBootUpTime;
return parseWinDate(LastBootUpTime).toString();
}
}, {
name: "Current Time",
targets: [ "temporary" ],
wmi: {
source: "Win32_OperatingSystem",
fields: [ "LocalDateTime" ]
},
format: function(_ref35) {
var LocalDateTime = _ref35.LocalDateTime;
return parseWinDate(LocalDateTime).toString();
}
}, {
name: "UpTime",
targets: [ "temporary" ],
wmi: {
source: "Win32_OperatingSystem",
fields: [ "LastBootUpTime", "LocalDateTime" ]
},
format: function(_ref36) {
var LastBootUpTime = _ref36.LastBootUpTime, LocalDateTime = _ref36.LocalDateTime, total = Math.ceil((parseWinDate(LocalDateTime) - parseWinDate(LastBootUpTime)) / 1e3), days = Math.floor(total / 86400), hours = Math.floor((total - 86400 * days) / 3600), minutes = Math.floor((total - 86400 * days - 3600 * hours) / 60), seconds = total - 86400 * days - 3600 * hours - 60 * minutes;
return total + " sec (" + days + " d, " + hours + " h, " + minutes + " m, " + seconds + " s)";
}
} ]
} ]
}
},
Display: {
"Windows Video": {
type: "array",
targets: [ "diagnostics", "dashboard" ],
wmi: {
source: "Win32_VideoController",
fields: [ {
name: "Description",
field: "Description"
}, {
name: "Memory Size",
field: "AdapterRAM",
format: function(v) {
if (v >= 0) return Math.ceil(parseFloat(v) / 1024 / 1024) + " MB"; else return null;
}
}, {
name: "Video Mode",
field: "VideoModeDescription"
}, {
name: "Driver Name",
field: "infSection"
}, {
name: "Driver Version",
field: "DriverVersion"
}, {
name: "Driver Date",
field: "DriverDate",
format: function(v) {
return parseWinDate(v).toString();
}
}, {
name: "Status",
field: "Status"
} ]
}
},
Monitor: {
type: "array",
targets: [ "diagnostics", "dashboard" ],
wmi: {
source: "Win32_DesktopMonitor",
fields: [ {
name: "Monitor Name",
field: "Description"
}, {
name: "Monitor ID",
field: "DeviceID"
}, {
name: "Manufacturer",
field: "MonitorManufacturer"
}, {
name: "Monitor Type",
field: "MonitorType"
}, {
name: "Status",
field: "Status"
}, {
name: "Screen Height",
field: "ScreenHeight"
}, {
name: "Screen Width",
field: "ScreenWidth"
} ]
}
}
},
Multimedia: {
"Windows Audio": {
type: "array",
targets: [ "diagnostics", "dashboard" ],
wmi: {
source: "Win32_SoundDevice",
fields: [ {
name: "Description",
field: "Description"
}, {
name: "Manufacturer",
field: "Manufacturer"
}, {
name: "Status",
field: "Status"
} ]
}
}
},
Software: {
"Installed Software": {
type: "array",
targets: [ "soft" ],
reg: {
source: _os.is64 ? [ "HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\", "HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\", "HKLM64\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\", "HKCU64\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" ] : [ "HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\", "HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" ],
fields: [ {
name: "Program",
field: "DisplayName"
}, {
name: "Version",
field: "DisplayVersion"
}, {
name: "Publisher",
field: "Publisher"
}, {
name: "Install Date",
field: "InstallDate"
}, {
name: "Location",
field: "InstallLocation"
}, {
name: "Icon",
field: "DisplayIcon"
}, {
name: "Uninstaller",
field: "UninstallString"
}, {
name: "Registry Path",
field: "RegPath"
} ],
filter: function(_ref37) {
var Program = _ref37.Program;
return Program;
}
}
}
},
Security: {
"Windows Security": {
type: "object",
targets: [ "diagnostics", "dashboard" ],
groups: [ {
name: "Operating System Properties",
fields: [ {
name: "OS Name",
wmi: {
source: "Win32_OperatingSystem",
fields: [ "Caption" ]
}
}, {
name: "OS Service Pack",
wmi: {
source: "Win32_OperatingSystem",
fields: [ "CSDVersion" ]
}
}, {
name: "Winlogon Shell",
reg: {
source: "HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\Shell"
}
}, {
name: "User Account Control (UAC)",
reg: {
source: "HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\EnableLUA"
},
format: function(v) {
if (0 === v) return "Disabled";
if (1 === v) return "Enabled"; else return "";
}
}, {
name: "System Restore",
reg: {
source: _os.OSVersion < 6 ? "HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\SystemRestore\\DisableSR" : "HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\SystemRestore\\RPSessionInterval"
},
format: function(v) {
if (_os.OSVersion < 6) return v ? "Disabled" : "Enabled"; else return v ? "Enabled" : "Disabled";
}
} ]
} ]
},
"Anti-Virus": {
type: "array",
targets: [ "diagnostics", "dashboard" ],
wmi: {
source: _os.OSVersion < 6 ? "ROOT\\SecurityCenter:AntiVirusProduct" : "ROOT\\SecurityCenter2:AntiVirusProduct",
fields: [ {
name: "Name",
field: "displayName"
}, {
name: "Active",
field: _os.OSVersion < 6 ? "onAccessScanningEnabled" : "productState",
format: function(v) {
if (_os.OSVersion < 6) return "false" !== v;
var state = parseInt(v, 10).toString(16);
state = state.substring(state.length - 4, state.length - 2) ? "Yes" : "No";
return "10" === state || "11" === state ? "Yes" : "No";
}
}, {
name: "UpToDate",
field: _os.OSVersion < 6 ? "productUptoDate" : "productState",
format: function(v) {
if (_os.OSVersion < 6) return "false" !== v;
var state = parseInt(v, 10).toString(16);
state = state.substring(state.length - 2, state.length);
return "00" === state ? "Yes" : "No";
}
} ]
}
},
Firewall: {
type: "array",
targets: [ "diagnostics", "dashboard" ],
wmi: {
source: _os.OSVersion < 6 ? "ROOT\\SecurityCenter:FirewallProduct" : "ROOT\\SecurityCenter2:FirewallProduct",
fields: [ {
name: "Name",
field: "displayName"
}, {
name: "Active",
field: _os.OSVersion < 6 ? "enabled" : "productState",
format: function(v) {
if (_os.OSVersion < 6) return "false" !== v;
var state = parseInt(v, 10).toString(16);
state = state.substring(state.length - 4, state.length - 2);
return "10" === state || "11" === state ? "Yes" : "No";
}
} ]
}
},
"Anti-Spyware": {
type: "array",
targets: [ "diagnostics", "dashboard" ],
wmi: {
source: _os.OSVersion < 6 ? "ROOT\\SecurityCenter:AntiSpywareProduct" : "ROOT\\SecurityCenter2:AntiSpywareProduct",
fields: [ {
name: "Name",
field: "displayName"
}, {
name: "Active",
field: _os.OSVersion < 6 ? "productEnabled" : "productState",
format: function(v) {
if (_os.OSVersion < 6) return "false" !== v;
var state = parseInt(v, 10).toString(16);
state = state.substring(state.length - 4, state.length - 2);
return "10" === state || "11" === state ? "Yes" : "No";
}
}, {
name: "UpToDate",
field: _os.OSVersion < 6 ? "productUptoDate" : "productState",
format: function(v) {
if (_os.OSVersion < 6) return "false" !== v;
var state = parseInt(v, 10).toString(16);
state = state.substring(state.length - 2, state.length);
return "00" === state ? "Yes" : "No";
}
} ]
}
}
}
};
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _system = __webpack_require__(27), _getDiagnostics = __webpack_require__(36), _getDiagnostics2 = _interopRequireDefault(_getDiagnostics), analyseSoftChanges = function(prev, cur) {
var res = {
installed: [],
uninstalled: [],
updated: []
};
if (!prev.Software || !prev.Software["Installed Software"]) return res;
var prevSoft = prev.Software["Installed Software"], curSoft = cur.Software["Installed Software"];
res.installed = curSoft.filter(function(csoft) {
return !prevSoft.find(function(psoft) {
return psoft.Program === csoft.Program;
});
});
res.uninstalled = prevSoft.filter(function(psoft) {
return !curSoft.find(function(csoft) {
return csoft.Program === psoft.Program;
});
});
res.updated = curSoft.filter(function(csoft) {
return prevSoft.find(function(psoft) {
return psoft.Program === csoft.Program && psoft.Version !== csoft.Version;
});
});
return res;
}, checkPrevSoftFile = function(fullPath) {
try {
if (_system.fso.FileExists(fullPath)) {
var fileIn = _system.fso.OpenTextFile(fullPath, 1, !0, -1), prev = JSON.parse(fileIn.ReadAll());
fileIn.Close();
return prev;
}
} catch (e) {}
return {};
};
exports["default"] = function(cur) {
var path = _system.AppData + "\\DRPSu\\diagnostics\\", fullPathCur = path + "newsoft.json", fullPathPrev = path + "soft.json";
try {
if (!cur) cur = JSON.parse(_system.queryFile(fullPathCur, 6e4));
} catch (err) {
cur = _getDiagnostics2["default"]("soft");
}
var prev = checkPrevSoftFile(fullPathPrev), changes = analyseSoftChanges(prev, cur);
_system.createFile(path, "soft.json", JSON.stringify(cur));
return changes;
};
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
}
return target;
}, _wmi = __webpack_require__(10), _libIterate = __webpack_require__(11), _libIterate2 = _interopRequireDefault(_libIterate), re1 = /^(.*(?:VEN|VID).*(?:DEV|PID).*?)(?=&|\\|$).*?(?=\\|$)/, re2 = /^((?:ACPI\\(?:IO|FUJITSU)|.*?(?!\\(?:IO|FUJITSU)\\))\\.*?)\\.*/, remap = function(_ref) {
var DeviceID = _ref.DeviceID, Status = _ref.Status, ConfigManagerErrorCode = _ref.ConfigManagerErrorCode;
return {
deviceId: DeviceID,
status: Status,
statusCode: ConfigManagerErrorCode
};
}, getHardware = function() {
var DevicecolItems = _wmi.objWMIService.ExecQuery("SELECT * FROM Win32_PnPEntity", "WQL"), DeviceenumItems = new Enumerator(DevicecolItems);
DeviceenumItems.moveFirst();
for (var DriverPackInstalled = [], _loop = function(i) {
var deviceItem = DeviceenumItems.item(), hardwareId = [];
if (void 0 !== deviceItem.HardWareID && null !== deviceItem.HardWareID && deviceItem.HardWareID.toArray) for (var h = 0; h < deviceItem.HardWareID.toArray().length; h++) hardwareId.push(deviceItem.HardWareID.toArray()[h].toString().toUpperCase()); else if (deviceItem.DeviceID) {
var id = deviceItem.DeviceID.toUpperCase().replace(/^\*\s*/, "ACPI\\").replace(/^ACPI\\VEN_([0-9A-Z]+)&DEV_([0-9A-Z]+)/, "ACPI\\$1$2"), m = re1.exec(id);
if (m) !function() {
for (var parts = m[0].slice(m[1].length + 1).split("&"), hwid = m[1], p = 0; p < parts.length; p++) {
hwid += "&" + parts[p];
hardwareId.push(hwid);
}
parts.forEach(function(part) {
hwid += "&" + part;
hardwareId.push(hwid);
});
}(); else hardwareId.push(id.replace(re2, "$1"));
}
DriverPackInstalled.push(_extends({}, remap(deviceItem), {
hardwareId: hardwareId
}));
DeviceenumItems.moveNext();
}, i = 0; DeviceenumItems.atEnd() === !1; i++) _loop(i);
return DriverPackInstalled;
};
exports.getHardware = getHardware;
var getDevicesCount = function(_ref2) {
var status = _ref2.status, errCode = _ref2.errCode, query = "SELECT DeviceID FROM Win32_PnPEntity", whereParts = [];
if (status) whereParts.push('Status = "' + status + '"');
if (errCode) {
if (errCode.min) whereParts.push("ConfigManagerErrorCode >= " + errCode.min);
if (errCode.max) whereParts.push("ConfigManagerErrorCode <= " + errCode.max);
}
if (whereParts.length > 0) query += " WHERE " + whereParts.join(" AND ");
return _wmi.objWMIService.ExecQuery(query, "WQL").Count;
};
exports.getDevicesCount = getDevicesCount;
var getDevicesStatus = function(hwids) {
var where = hwids.map(function(deviceId) {
return "(DeviceID=" + JSON.stringify(deviceId) + ")";
}).join(" OR "), query = "SELECT * FROM Win32_PnPEntity" + (where ? " WHERE " + where : ""), res = [];
_libIterate2["default"](_wmi.objWMIService.ExecQuery(query, "WQL"), function(item) {
res.push(_extends({}, remap(item)));
});
return res;
};
exports.getDevicesStatus = getDevicesStatus;
}, function(module, exports, __webpack_require__) {
"use strict";
function getDrivers() {
var drivers = _wmi.getWMIObjects([ "DeviceID", "DriverDate", "DriverVersion", "DeviceName", "InfName", "Manufacturer", "ClassGuid" ], "Win32_PnPSignedDriver"), results = [];
drivers.forEach(function(driver) {
if (driver.DeviceID && driver.DriverDate && driver.DriverVersion && driver.DeviceName && driver.InfName) {
for (var dr = {
deviceId: driver.DeviceID,
date: [ driver.DriverDate.slice(0, 4), driver.DriverDate.slice(4, 6), driver.DriverDate.slice(6, 8) ].join("-"),
version: driver.DriverVersion,
name: driver.DeviceName,
manufacturer: driver ? driver.Manufacturer : null,
inf: driver.InfName
}, regPath = "SYSTEM\\CurrentControlSet\\Control\\Class\\" + driver.ClassGuid, regData = _systemWmiRegistry.wmiRegistry.EnumKey(_systemWmiRegistry.wmiRegistry.HKLM, regPath), _iterator = regData, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator](); ;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var regSection = _ref, regInf = _systemWmiRegistry.wmiRegistry.GetStringValue(_systemWmiRegistry.wmiRegistry.HKLM, regPath + "\\" + regSection, "InfPath");
if (regInf === dr.inf) {
var regDate = _systemWmiRegistry.wmiRegistry.GetStringValue(_systemWmiRegistry.wmiRegistry.HKLM, regPath + "\\" + regSection, "DriverDate");
dr.date = [ regDate.split("-")[2], ("0" + regDate.split("-")[0]).slice(-2), ("0" + regDate.split("-")[1]).slice(-2) ].join("-");
break;
}
}
results.push(dr);
}
});
return results;
}
exports.__esModule = !0;
exports.getDrivers = getDrivers;
var _wmi = __webpack_require__(10), _systemWmiRegistry = __webpack_require__(30);
}, function(module, exports, __webpack_require__) {
"use strict";
function getPCType(_ref) {
var Vendor = _ref.Vendor, Name = _ref.Name, chassis = _wmi.getWMIObjects([ "ChassisTypes" ], "Win32_SystemEnclosure"), type = void 0;
if (!(chassis && chassis[0] && chassis[0].ChassisTypes && chassis[0].ChassisTypes[0])) type = "Other"; else switch (chassis[0].ChassisTypes[0]) {
case 3:
case 4:
case 5:
case 6:
case 7:
case 13:
case 15:
case 16:
type = "Desktop";
break;
case 8:
case 9:
case 10:
case 11:
case 14:
return "Notebook";
default:
type = "Other";
}
if ([ /virtualbox/i, /vmware/i ].some(function(reg) {
return reg.test(Name);
})) return type;
var batteries = _wmi.getWMIObjects([ "Name" ], "Win32_Battery");
if (0 === batteries.length) return type;
if ("Other" === type) return "Notebook";
if ("Desktop" === type && "micro-star" === trimVendorName(Vendor)) return "Notebook"; else return type;
}
function trimVendorName(inputVendorName) {
var toLower = arguments.length <= 1 || void 0 === arguments[1] ? !0 : arguments[1];
if (!inputVendorName) return "noname";
var replacePattern = /(, inc\.)|(\sinc\.)|(\scorporation)|(\scorp\.)|(\scomputer)|(\scomputers)|(\selectronics)|(\stechnology)|(\stechnologies)|(\sinternational)|(\sinformation)|(\sco\., ltd\.)|(\sco\., ltd)|(\sco\.,ltd)|(\sco\.)|(\sltd)|(\slimited)|(\sag$)|(\ssa$)|(\sas$)|(\sg\.)|(\ss\.)|(\sa\.)|(\sa$)|(\ss$)|(\sg$)/gi;
if (toLower) inputVendorName = inputVendorName.toLowerCase();
var trimedVendorName = inputVendorName.replace(replacePattern, "").replace(/(^\s+)|(\s+$)/g, "").replace(/(^\.+)|(\.+$)/g, "").replace(/(^_+)|(_+$)/g, "").replace(/(^-+)|(-+$)/g, "").replace(/"/g, "'");
return "" === trimedVendorName ? "noname" : trimedVendorName;
}
function getNotebookModel(_ref2) {
var Vendor = _ref2.Vendor, Name = _ref2.Name, Version = _ref2.Version;
Vendor = trimVendorName(Vendor);
if (!Vendor) return "";
if (Name) Name = Name.trim();
switch (Vendor) {
case "lenovo":
Version = Version ? Version.trim() : "";
return Version.replace(/^lenovo[\s-]*/i, "");
case "sony":
return "VAIO " + Name;
case "samsung":
return Name;
case "apple":
return appleNotebooks[Name] ? appleNotebooks[Name].join("/") : Name;
case "dell":
case "dellinc":
return Name.replace(/^dell system[\s-]*/i, "");
case "emachines":
return Name.replace(/^emachines[\s-]*/i, "");
case "hewlett-packard":
case "hp":
return Name.replace(/^hp[\s-]*/i, "").replace(/[\s-]*notebook pc$/i, "");
case "toshiba":
return Name.replace(/^toshiba[\s-]*/i, "");
case "micro-star":
return Name.replace(/^msi notebook[\s-]*/i, "");
case "nec":
return Name.replace(/^nec[\s-]*/i, "");
default:
return Name;
}
}
function getModel() {
var _getWMIObjects = _wmi.getWMIObjects([ "Manufacturer", "Model", "Caption" ], "Win32_ComputerSystem"), pc = _getWMIObjects[0], _getWMIObjects2 = _wmi.getWMIObjects([ "Vendor", "Name", "Version" ], "Win32_ComputerSystemProduct"), csp = _getWMIObjects2[0], _getWMIObjects3 = _wmi.getWMIObjects([ "Product", "Version", "Manufacturer" ], "Win32_BaseBoard"), bb = _getWMIObjects3[0], type = getPCType(csp), vendor = trimVendorName(csp.Vendor, !1), name = "Notebook" === type ? getNotebookModel(csp) : pc.Caption, model = {
type: type,
vendor: vendor,
name: name,
info: {
computerSystem: pc,
computerSystemProduct: csp,
baseBoard: bb
}
};
return model;
}
exports.__esModule = !0;
exports.getModel = getModel;
var _wmi = __webpack_require__(10), appleNotebooks = __webpack_require__(42);
}, function(module, exports) {
module.exports = {
"MacBook1,1": [ "MacBook" ],
"MacBook2,1": [ 'MacBook (13" Mid 2007)' ],
"MacBook3,1": [ 'MacBook (13" Late 2007)' ],
"MacBook4,1": [ 'MacBook (13" Early 2008)', 'MacBook (13" Late 2008)' ],
"MacBook5,1": [ 'MacBook (13" Late 2008)' ],
"MacBook5,2": [ 'MacBook (13" Early 2009)', 'MacBook (13" Mid 2009)' ],
"MacBook6,1": [ 'MacBook (13" Late 2009)' ],
"MacBook7,1": [ 'MacBook (13" Mid 2010)' ],
"MacBook8,1": [ 'MacBook (12" Early 2015)' ],
"MacBook9,1": [ 'MacBook (12" Early 2016)' ],
"MacBookAir1,1": [ "MacBook Air (Early 2008)" ],
"MacBookAir2,1": [ "MacBook Air (Late 2008)", "MacBook Air (Mid 2009)" ],
"MacBookAir3,1": [ 'MacBook Air (11" Late 2010)' ],
"MacBookAir3,2": [ 'MacBook Air (13" Late 2010)' ],
"MacBookAir4,1": [ 'MacBook Air (11" Mid 2011)' ],
"MacBookAir4,2": [ 'MacBook Air (13" Mid 2011)' ],
"MacBookAir5,1": [ 'MacBook Air (11" Mid 2012)' ],
"MacBookAir5,2": [ 'MacBook Air (13" Mid 2012)' ],
"MacBookAir6,1": [ 'MacBook Air (11" Mid 2013)', 'MacBook Air (11" Early 2014)' ],
"MacBookAir6,2": [ 'MacBook Air (13" Mid 2013)', 'MacBook Air (13" Early 2014)' ],
"MacBookAir7,1": [ 'MacBook Air (11" Early 2015)' ],
"MacBookAir7,2": [ 'MacBook Air (13" Early 2015)' ],
"MacBookPro1,1": [ 'MacBook Pro (15" Early 2006)' ],
"MacBookPro1,2": [ 'MacBook Pro (17" Early 2006)' ],
"MacBookPro2,1": [ 'MacBook Pro (17" Late 2006)' ],
"MacBookPro2,2": [ 'MacBook Pro (15" Late 2006)' ],
"MacBookPro3,1": [ 'MacBook Pro (15" Mid 2007)', 'MacBook Pro (17" Late 2007)' ],
"MacBookPro4,1": [ 'MacBook Pro (17" Early 2008)', 'MacBook Pro (17" Late 2008)' ],
"MacBookPro5,1": [ 'MacBook Pro (15" Late 2008)', 'MacBook Pro (15" Early 2009)', 'MacBook Pro (15" Mid 2009)' ],
"MacBookPro5,2": [ 'MacBook Pro (17" Early 2009)', 'MacBook Pro (17" Mid 2009)' ],
"MacBookPro5,3": [ 'MacBook Pro (15" Mid 2009)' ],
"MacBookPro5,4": [ 'MacBook Pro (15" Mid 2009)' ],
"MacBookPro5,5": [ 'MacBook Pro (13" Mid 2009)' ],
"MacBookPro6,1": [ 'MacBook Pro (17" Mid 2010)' ],
"MacBookPro6,2": [ 'MacBook Pro (15" Mid 2010)' ],
"MacBookPro7,1": [ 'MacBook Pro (13" Mid 2010)' ],
"MacBookPro8,1": [ 'MacBook Pro (13" Early 2011)', 'MacBook Pro (13" Late 2011)' ],
"MacBookPro8,2": [ 'MacBook Pro (15" Early 2011)', 'MacBook Pro (15" Late 2011)' ],
"MacBookPro8,3": [ 'MacBook Pro (17" Early 2011)', 'MacBook Pro (17" Late 2011)' ],
"MacBookPro9,1": [ 'MacBook Pro (15" Mid 2012)' ],
"MacBookPro9,2": [ 'MacBook Pro (13" Mid 2012)' ],
"MacBookPro10,1": [ 'MacBook Pro (15" Mid 2012)', 'MacBook Pro (15" Early 2013)' ],
"MacBookPro10,2": [ 'MacBook Pro (13" Late 2012)', 'MacBook Pro (13" Early 2013)' ],
"MacBookPro11,1": [ 'MacBook Pro (13" Late 2013)', 'MacBook Pro (13" Mid 2014)' ],
"MacBookPro11,2": [ 'MacBook Pro (15" Late 2013)', 'MacBook Pro (15" Mid 2014)' ],
"MacBookPro11,3": [ 'MacBook Pro (15" Late 2013)', 'MacBook Pro (15" Mid 2014)' ],
"MacBookPro12,1": [ 'MacBook Pro (13" Early 2015)' ],
"MacBookPro11,4": [ 'MacBook Pro (15 " Mid 2015)' ],
"MacBookPro11,5": [ 'MacBook Pro (15" Mid 2015)' ]
};
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _getSoftChanges = __webpack_require__(38), _getSoftChanges2 = _interopRequireDefault(_getSoftChanges), _logs = __webpack_require__(4), _statistics = __webpack_require__(13), _statistics2 = _interopRequireDefault(_statistics), _checkSoft = __webpack_require__(44);
exports["default"] = function(changes) {
try {
if (!changes) changes = _getSoftChanges2["default"]();
_logs.log("Soft changes", changes);
var actions = [ "installed", "uninstalled", "updated" ];
actions.forEach(function(action) {
changes[action].forEach(function(soft) {
var pInfo = _checkSoft.getPartnerInfo(soft);
if (pInfo.isPartner) _statistics2["default"].event({
action: pInfo.title + " " + action,
category: "partner soft"
}, [], !0);
});
});
} catch (err) {}
};
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _getDiagnostics = __webpack_require__(36), _getDiagnostics2 = _interopRequireDefault(_getDiagnostics), _partnerSoft = __webpack_require__(45), _partnerSoft2 = _interopRequireDefault(_partnerSoft), installedSoftCache = void 0, getInstalledSoft = function() {
if (!installedSoftCache) installedSoftCache = _getDiagnostics2["default"]("soft").Software["Installed Software"];
return installedSoftCache;
}, checkSoftInstalled = function(nameReg, installedSoft) {
if (!installedSoft) installedSoft = getInstalledSoft();
return installedSoft.some(function(soft) {
return nameReg.test(soft.Program);
});
};
exports.checkSoftInstalled = checkSoftInstalled;
var getPartnerInfo = function(soft) {
var pSoft = _partnerSoft2["default"].find(function(_ref) {
var nameReg = _ref.nameReg;
return nameReg.test(soft.Program);
});
if (!pSoft) return {
isPartner: !1
};
if (!pSoft.getClids) return {
title: pSoft.title,
isPartner: !0
};
var clids = pSoft.getClids();
return {
title: pSoft.title,
clids: clids,
isPartner: clids.some(function(clid) {
return pSoft.clidsReg.test(clid);
})
};
};
exports.getPartnerInfo = getPartnerInfo;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _systemFso = __webpack_require__(5), _systemSpecialFolders = __webpack_require__(6), _libIterate = __webpack_require__(11), _libIterate2 = _interopRequireDefault(_libIterate), parseClidsFile = function(filePath, reg) {
var clids = [];
try {
for (var fStream = _systemFso.fso.OpenTextFile(filePath, 1); !fStream.AtEndOfStream; ) {
var line = fStream.ReadLine(), parsed = reg.exec(line);
if (parsed && parsed[1]) clids.push(parsed[1]);
}
} catch (e) {
return clids;
}
return clids;
};
exports["default"] = [ {
title: "Yandex",
nameReg: /^Yandex$|YandexBrowser/i,
getClids: function() {
var clidsFilePath = _systemSpecialFolders.AppData + "\\Yandex\\clids-yabrowser.xml", reg = /vendor\s+name=['"](.*?)['"]/;
return parseClidsFile(clidsFilePath, reg);
},
clidsReg: /drpsu/i
}, {
title: "Opera",
nameReg: /Opera/i,
getClids: function() {
var clids = [], reg = /['"]partner_id['"]\s*:\s*['"](.*?)['"]/, operaFolder = _systemSpecialFolders.ProgramFiles + "\\Opera";
try {
_libIterate2["default"](_systemFso.fso.GetFolder(operaFolder).SubFolders, function(subFolder) {
var regExp = /^\d+/;
if (regExp.test(subFolder.Name)) {
var clidsFilePath = operaFolder + "\\" + subFolder.Name + "\\resources\\tracking_user_agent.json";
clids = clids.concat(parseClidsFile(clidsFilePath, reg));
}
});
} catch (e) {
return clids;
}
return clids;
},
clidsReg: /Campaign\s+34/i
}, {
title: "Firefox",
nameReg: /Mozilla\s?Firefox/i
}, {
title: "WinRAR",
nameReg: /WinRAR/i
} ];
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
var _drpCoreLogs = __webpack_require__(4), _drpCoreLogs2 = _interopRequireDefault(_drpCoreLogs), _drpCoreStatistics = __webpack_require__(13), _drpCoreStatistics2 = _interopRequireDefault(_drpCoreStatistics), _drpCoreOs = __webpack_require__(9), _drpCoreLibUtils = __webpack_require__(26), _getInternetExplorerVersion = __webpack_require__(47), _getInternetExplorerVersion2 = _interopRequireDefault(_getInternetExplorerVersion), showBugreportHTA = function(msg, url, linenumber, lfnE) {
var pathToHTA = "Tools/modules/bugreport.hta", errorInfo = {
DRPVersion: window.version,
DRPVerType: window.verType,
lang: window.lang,
logfile: _drpCoreLogs2["default"].logfile ? _drpCoreLogs2["default"].logfile : null,
dialogMode: 2,
msg: msg,
url: url,
linenumber: linenumber,
lfnE: lfnE
};
window.showModelessDialog(pathToHTA, errorInfo, "status:false;dialogWidth:660px;dialogHeight:520px;scroll:yes;");
};
window.onerror = function(msg, url, linenumber) {
var shortUrl = url.split("/").slice(-1)[0];
shortUrl = shortUrl.split("\\").slice(-1)[0];
var lfn = "";
try {
if (arguments.callee.caller) lfn = arguments.callee.caller.toString().match(/function ([^(]*)\(/)[1];
} catch (e) {}
try {
var _shortUrl, _javascriptException, params = {
"javascript exception": (_javascriptException = {}, _javascriptException[shortUrl] = (_shortUrl = {},
_shortUrl[linenumber] = msg, _shortUrl), _javascriptException)
};
_drpCoreStatistics2["default"].event({
action: "javascript exception",
params: params
});
} catch (e) {}
showBugreportHTA(msg, shortUrl, linenumber, lfn);
_drpCoreLogs.log("!!! ERROR !!! " + msg + "\r\n Module: " + url + " \r\n Line: " + linenumber);
return !0;
};
var prevOnError = window.onerror;
window.onerror = function(msg, url, linenumber) {
var _OSCSDVersion = _drpCoreOs.OSCSDVersion.replace(/Service Pack /i, "SP"), OSVersionEr = _drpCoreOs.OSCaption + " " + _OSCSDVersion + " " + _drpCoreOs.OSArchitecture, JSVersion = ScriptEngine() + " " + ScriptEngineMajorVersion() + "." + ScriptEngineMinorVersion(), DRPVersion = window.version + " " + window.verType, description = OSVersionEr + " IE: " + _getInternetExplorerVersion2["default"]() + " " + JSVersion, reportScriptURL = "http://static.drp.su/update/error-catch/?script=" + encodeURIComponent(url) + ("&line=" + encodeURIComponent(linenumber)) + ("&DRP_version=" + encodeURIComponent(DRPVersion)) + ("&message=" + encodeURIComponent(msg)) + ("&description=" + encodeURIComponent(description));
_drpCoreLogs.log([ reportScriptURL ]);
_drpCoreLibUtils.inc(reportScriptURL);
prevOnError(msg, url, linenumber);
return !0;
};
}, function(module, exports, __webpack_require__) {
"use strict";
function getInternetExplorerVersion() {
var rv = void 0, ua = void 0, re = void 0;
try {
rv = parseInt(_drpCoreSystem.RegRead("HKLM\\SOFTWARE\\Microsoft\\Internet Explorer\\svcVersion").split(".")[0], 10);
} catch (e) {}
if ("number" != typeof rv) try {
rv = parseInt(_drpCoreSystem.RegRead("HKLM\\SOFTWARE\\Microsoft\\Internet Explorer\\Version").split(".")[0], 10);
} catch (e) {}
if ("number" != typeof rv) if ("Microsoft Internet Explorer" === navigator.appName) {
ua = navigator.userAgent;
re = new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");
if (null != re.exec(ua)) rv = parseFloat(RegExp.$1);
} else if ("Netscape" === navigator.appName) {
ua = navigator.userAgent;
re = new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})");
if (null != re.exec(ua)) rv = parseFloat(RegExp.$1);
}
if ("number" != typeof rv) rv = -1;
return rv;
}
exports.__esModule = !0;
exports["default"] = getInternetExplorerVersion;
var _drpCoreSystem = __webpack_require__(27);
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function httppost(url, params) {
var originalCrossdomainValue = _drpCoreSystem.WshShell.RegRead(REGISTRY_KEY_FOR_CROSSDOMAIN_ON_LOCAL_ZONE);
_drpCoreSystem.WshShell.RegWrite(REGISTRY_KEY_FOR_CROSSDOMAIN_ON_LOCAL_ZONE, 0, "REG_DWORD");
var http = new window.XMLHttpRequest();
http.open("POST", url, !0);
http.setRequestHeader("Content-type", "application/json");
http.setRequestHeader("Content-length", params.length);
http.setRequestHeader("Connection", "close");
http.send(params);
if (0 !== originalCrossdomainValue) _drpCoreSystem.WshShell.RegWrite(REGISTRY_KEY_FOR_CROSSDOMAIN_ON_LOCAL_ZONE, originalCrossdomainValue, "REG_DWORD");
}
function urlencode(o) {
var pairs = [];
Object.entries(o).forEach(function(_ref) {
var key = _ref[0], value = _ref[1];
pairs.push(encodeURIComponent(key) + "=" + encodeURIComponent(value));
});
return pairs.join("&");
}
function getOSVersion() {
var servicePack = _drpCoreOs.OSCSDVersion.replace(/Service Pack /i, "SP");
return _drpCoreOs.OSCaption + " " + servicePack;
}
function getJSVersion() {
if (!ScriptEngine) return "Browser"; else return ScriptEngine() + " " + ScriptEngineMajorVersion() + "." + ScriptEngineMinorVersion();
}
exports.__esModule = !0;
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
}
return target;
}, _drpCoreSystem = __webpack_require__(27), _vendorRaven = __webpack_require__(49), _vendorRaven2 = _interopRequireDefault(_vendorRaven), _drpCoreOs = __webpack_require__(9), ScriptEngine = window.ScriptEngine, ScriptEngineMajorVersion = window.ScriptEngineMajorVersion, ScriptEngineMinorVersion = window.ScriptEngineMinorVersion, projectConfig = !1 ? {
sentry_dsn: "http://9cb31aee70244b7e9b721f3ff5b1a49f@sentry.drp.su/3",
sentry_secret: "6d47d40d3ba94a16b3e15d4f09165eee"
} : {
sentry_dsn: "http://6d3b4fe6d1bf4a1dafb737cfc834f7f2@sentry.drp.su/2",
sentry_secret: "4bc6c5d74cec466593974c512dccba0c"
}, REGISTRY_KEY_FOR_CROSSDOMAIN_ON_LOCAL_ZONE = "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\1\\1406", transport = function(opts) {
try {
var auth = _extends({}, opts.auth, {
sentry_secret: projectConfig.sentry_secret
}), url = opts.url + "?" + urlencode(auth);
httppost(url, JSON.stringify(opts.data));
} catch (err) {}
}, ravenConfig = {
linesOfContext: 11,
fetchContext: !0,
tags: {
os: getOSVersion(),
js: getJSVersion(),
version: window.version,
arch: _drpCoreOs.is64 ? "x64" : "x86"
},
transport: transport
};
if (!0) _vendorRaven2["default"].config(projectConfig.sentry_dsn, ravenConfig).install();
exports["default"] = _vendorRaven2["default"];
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
!function(window, undefined) {
"use strict";
function triggerEvent(eventType, options) {
var event, key;
options = options || {};
eventType = "raven" + eventType.substr(0, 1).toUpperCase() + eventType.substr(1);
if (document.createEvent) {
event = document.createEvent("HTMLEvents");
event.initEvent(eventType, !0, !0);
} else {
event = document.createEventObject();
event.eventType = eventType;
}
for (key in options) if (hasKey(options, key)) event[key] = options[key];
if (document.createEvent) document.dispatchEvent(event); else try {
document.fireEvent("on" + event.eventType.toLowerCase(), event);
} catch (e) {}
}
function RavenConfigError(message) {
this.name = "RavenConfigError";
this.message = message;
}
function parseDSN(str) {
var m = dsnPattern.exec(str), dsn = {}, i = 7;
try {
for (;i--; ) dsn[dsnKeys[i]] = m[i] || "";
} catch (e) {
throw new RavenConfigError("Invalid DSN: " + str);
}
if (dsn.pass) throw new RavenConfigError("Do not specify your private key in the DSN!");
return dsn;
}
function isUndefined(what) {
return void 0 === what;
}
function isFunction(what) {
return "function" == typeof what;
}
function isString(what) {
return "[object String]" === objectPrototype.toString.call(what);
}
function isObject(what) {
return "object" == typeof what && null !== what;
}
function isEmptyObject(what) {
for (var k in what) return !1;
return !0;
}
function isError(what) {
return isObject(what) && "[object Error]" === objectPrototype.toString.call(what) || what instanceof Error;
}
function hasKey(object, key) {
return objectPrototype.hasOwnProperty.call(object, key);
}
function each(obj, callback) {
var i, j;
if (isUndefined(obj.length)) {
for (i in obj) if (hasKey(obj, i)) callback.call(null, i, obj[i]);
} else {
j = obj.length;
if (j) for (i = 0; j > i; i++) callback.call(null, i, obj[i]);
}
}
function handleStackInfo(stackInfo, options) {
var frames = [];
if (stackInfo.stack && stackInfo.stack.length) each(stackInfo.stack, function(i, stack) {
var frame = normalizeFrame(stack);
if (frame) frames.push(frame);
});
triggerEvent("handle", {
stackInfo: stackInfo,
options: options
});
processException(stackInfo.name, stackInfo.message, stackInfo.url, stackInfo.lineno, frames, options);
}
function normalizeFrame(frame) {
if (frame.url) {
var i, normalized = {
filename: frame.url,
lineno: frame.line,
colno: frame.column,
"function": frame.func || "?"
}, context = extractContextFromFrame(frame);
if (context) {
var keys = [ "pre_context", "context_line", "post_context" ];
i = 3;
for (;i--; ) normalized[keys[i]] = context[i];
}
normalized.in_app = !(globalOptions.includePaths.test && !globalOptions.includePaths.test(normalized.filename) || /(Raven|TraceKit)\./.test(normalized["function"]) || /raven\.(min\.)?js$/.test(normalized.filename));
return normalized;
}
}
function extractContextFromFrame(frame) {
if (frame.context && globalOptions.fetchContext) {
for (var context = frame.context, pivot = ~~(context.length / 2), i = context.length, isMinified = !1; i--; ) if (context[i].length > 3e3) {
isMinified = !0;
break;
}
if (isMinified) {
if (isUndefined(frame.column)) return;
return [ [], context[pivot].substr(frame.column, 50), [] ];
}
return [ context.slice(0, pivot), context[pivot], context.slice(pivot + 1) ];
}
}
function processException(type, message, fileurl, lineno, frames, options) {
var stacktrace, fullMessage;
if (!globalOptions.ignoreErrors.test || !globalOptions.ignoreErrors.test(message)) {
message += "";
message = truncate(message, globalOptions.maxMessageLength);
fullMessage = type + ": " + message;
fullMessage = truncate(fullMessage, globalOptions.maxMessageLength);
if (frames && frames.length) {
fileurl = frames[0].filename || fileurl;
frames.reverse();
stacktrace = {
frames: frames
};
} else if (fileurl) stacktrace = {
frames: [ {
filename: fileurl,
lineno: lineno,
in_app: !0
} ]
};
if (!globalOptions.ignoreUrls.test || !globalOptions.ignoreUrls.test(fileurl)) if (!globalOptions.whitelistUrls.test || globalOptions.whitelistUrls.test(fileurl)) send(objectMerge({
exception: {
type: type,
value: message
},
stacktrace: stacktrace,
culprit: fileurl,
message: fullMessage
}, options));
}
}
function objectMerge(obj1, obj2) {
if (!obj2) return obj1;
each(obj2, function(key, value) {
obj1[key] = value;
});
return obj1;
}
function truncate(str, max) {
return str.length <= max ? str : str.substr(0, max) + "…";
}
function now() {
return +new Date();
}
function getHttpData() {
if (document.location && document.location.href) {
var http = {
headers: {
"User-Agent": navigator.userAgent
}
};
http.url = document.location.href;
if (document.referrer) http.headers.Referer = document.referrer;
return http;
}
}
function send(data) {
var baseData = {
project: globalProject,
logger: globalOptions.logger,
platform: "javascript"
}, http = getHttpData();
if (http) baseData.request = http;
data = objectMerge(baseData, data);
data.tags = objectMerge(objectMerge({}, globalOptions.tags), data.tags);
data.extra = objectMerge(objectMerge({}, globalOptions.extra), data.extra);
data.extra = objectMerge({
"session:duration": now() - startTime
}, data.extra);
if (isEmptyObject(data.tags)) delete data.tags;
if (globalUser) data.user = globalUser;
if (globalOptions.release) data.release = globalOptions.release;
if (isFunction(globalOptions.dataCallback)) data = globalOptions.dataCallback(data) || data;
if (data && !isEmptyObject(data)) if (!isFunction(globalOptions.shouldSendCallback) || globalOptions.shouldSendCallback(data)) {
_lastEventId = data.event_id || (data.event_id = uuid4());
logDebug("debug", "Raven about to send:", data);
if (_isSetup()) (globalOptions.transport || makeRequest)({
url: globalServer,
auth: {
sentry_version: "4",
sentry_client: "raven-js/" + Raven.VERSION,
sentry_key: globalKey
},
data: data,
options: globalOptions,
onSuccess: function() {
triggerEvent("success", {
data: data,
src: globalServer
});
},
onError: function() {
triggerEvent("failure", {
data: data,
src: globalServer
});
}
});
}
}
function makeRequest(opts) {
opts.auth.sentry_data = JSON.stringify(opts.data);
var img = newImage(), src = opts.url + "?" + urlencode(opts.auth);
if (opts.options.crossOrigin || "" === opts.options.crossOrigin) img.crossOrigin = opts.options.crossOrigin;
img.onload = opts.onSuccess;
img.onerror = img.onabort = opts.onError;
img.src = src;
}
function newImage() {
return document.createElement("img");
}
function _isSetup() {
if (!hasJSON) return !1;
if (!globalServer) {
if (!ravenNotConfiguredError) logDebug("error", "Error: Raven has not been configured.");
ravenNotConfiguredError = !0;
return !1;
}
return !0;
}
function joinRegExp(patterns) {
for (var pattern, sources = [], i = 0, len = patterns.length; len > i; i++) {
pattern = patterns[i];
if (isString(pattern)) sources.push(pattern.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1")); else if (pattern && pattern.source) sources.push(pattern.source);
}
return new RegExp(sources.join("|"), "i");
}
function uuid4() {
var crypto = window.crypto || window.msCrypto;
if (!isUndefined(crypto) && crypto.getRandomValues) {
var arr = new Uint16Array(8);
crypto.getRandomValues(arr);
arr[3] = 4095 & arr[3] | 16384;
arr[4] = 16383 & arr[4] | 32768;
var pad = function(num) {
for (var v = num.toString(16); v.length < 4; ) v = "0" + v;
return v;
};
return pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7]);
} else return "xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g, function(c) {
var r = 16 * Math.random() | 0, v = "x" == c ? r : 3 & r | 8;
return v.toString(16);
});
}
function logDebug(level) {
if (originalConsoleMethods[level] && Raven.debug) originalConsoleMethods[level].apply(originalConsole, _slice.call(arguments, 1));
}
function afterLoad() {
var RavenConfig = window.RavenConfig;
if (RavenConfig) Raven.config(RavenConfig.dsn, RavenConfig.config).install();
}
function urlencode(o) {
var pairs = [];
each(o, function(key, value) {
pairs.push(encodeURIComponent(key) + "=" + encodeURIComponent(value));
});
return pairs.join("&");
}
var TraceKit = {
remoteFetching: !1,
collectWindowErrors: !0,
linesOfContext: 7,
debug: !1
};
window.TraceKit = TraceKit;
var _slice = [].slice, UNKNOWN_FUNCTION = "?";
TraceKit.wrap = function(func) {
function wrapped() {
try {
return func.apply(this, arguments);
} catch (e) {
TraceKit.report(e);
throw e;
}
}
return wrapped;
};
TraceKit.report = function() {
function subscribe(handler) {
installGlobalHandler();
handlers.push(handler);
}
function unsubscribe(handler) {
for (var i = handlers.length - 1; i >= 0; --i) if (handlers[i] === handler) handlers.splice(i, 1);
}
function unsubscribeAll() {
uninstallGlobalHandler();
handlers = [];
}
function notifyHandlers(stack, isWindowError) {
var exception = null;
if (!isWindowError || TraceKit.collectWindowErrors) {
for (var i in handlers) if (hasKey(handlers, i)) try {
handlers[i].apply(null, [ stack ].concat(_slice.call(arguments, 2)));
} catch (inner) {
exception = inner;
}
if (exception) throw exception;
}
}
function traceKitWindowOnError(message, url, lineNo, colNo, ex) {
var stack = null;
if (lastExceptionStack) {
TraceKit.computeStackTrace.augmentStackTraceWithInitialElement(lastExceptionStack, url, lineNo, message);
processLastException();
} else if (ex) {
stack = TraceKit.computeStackTrace(ex);
notifyHandlers(stack, !0);
} else {
var location = {
url: url,
line: lineNo,
column: colNo
};
if (-1 !== location.url.indexOf(".hta") || -1 !== location.url.indexOf(".html")) location.url = "drp.js";
location.func = TraceKit.computeStackTrace.guessFunctionName(location.url, location.line);
location.context = TraceKit.computeStackTrace.gatherContext(location.url, location.line);
stack = {
message: message,
url: document.location.href,
stack: [ location ]
};
var other = TraceKit.computeStackTrace(stack);
stack.stack = stack.stack.concat(other.stack);
notifyHandlers(stack, !0);
}
if (_oldOnerrorHandler) return _oldOnerrorHandler.apply(this, arguments); else return !1;
}
function installGlobalHandler() {
if (!_onErrorHandlerInstalled) {
_oldOnerrorHandler = window.onerror;
window.onerror = traceKitWindowOnError;
_onErrorHandlerInstalled = !0;
}
}
function uninstallGlobalHandler() {
if (_onErrorHandlerInstalled) {
window.onerror = _oldOnerrorHandler;
_onErrorHandlerInstalled = !1;
_oldOnerrorHandler = undefined;
}
}
function processLastException() {
var _lastExceptionStack = lastExceptionStack, _lastArgs = lastArgs;
lastArgs = null;
lastExceptionStack = null;
lastException = null;
notifyHandlers.apply(null, [ _lastExceptionStack, !1 ].concat(_lastArgs));
}
function report(ex, rethrow) {
var args = _slice.call(arguments, 1);
if (lastExceptionStack) if (lastException === ex) return; else processLastException();
var stack = TraceKit.computeStackTrace(ex);
lastExceptionStack = stack;
lastException = ex;
lastArgs = args;
window.setTimeout(function() {
if (lastException === ex) processLastException();
}, stack.incomplete ? 2e3 : 0);
if (rethrow !== !1) throw ex;
}
var _oldOnerrorHandler, _onErrorHandlerInstalled, handlers = [], lastArgs = null, lastException = null, lastExceptionStack = null;
report.subscribe = subscribe;
report.unsubscribe = unsubscribe;
report.uninstall = unsubscribeAll;
return report;
}();
TraceKit.computeStackTrace = function() {
function loadSource(url) {
if (!TraceKit.remoteFetching) return "";
if (0 === url.indexOf("http")) return "";
try {
var getXHR = function() {
try {
return new window.XMLHttpRequest();
} catch (e) {
return new window.ActiveXObject("Microsoft.XMLHTTP");
}
}, request = getXHR();
request.open("GET", url, !1);
request.send("");
return request.responseText;
} catch (e) {
return "";
}
}
function getSource(url) {
if (!isString(url)) return [];
if (!hasKey(sourceCache, url)) {
var source = "", domain = "";
try {
domain = document.domain;
} catch (e) {}
if (-1 !== url.indexOf(domain)) source = loadSource(url);
sourceCache[url] = source ? source.split("\n") : [];
}
return sourceCache[url];
}
function guessFunctionName(url, lineNo) {
var m, reFunctionArgNames = /function ([^(]*)\(([^)]*)\)/, reGuessFunction = /['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/, line = "", maxLines = 10, source = getSource(url);
if (!source.length) return UNKNOWN_FUNCTION;
for (var i = 0; maxLines > i; ++i) {
line = source[lineNo - i] + line;
if (!isUndefined(line)) if (m = reGuessFunction.exec(line)) return m[1]; else if (m = reFunctionArgNames.exec(line)) return m[1];
}
return UNKNOWN_FUNCTION;
}
function gatherContext(url, line) {
var source = getSource(url);
if (!source.length) return null;
var context = [], linesBefore = Math.floor(TraceKit.linesOfContext / 2), linesAfter = linesBefore + TraceKit.linesOfContext % 2, start = Math.max(0, line - linesBefore - 1), end = Math.min(source.length, line + linesAfter - 1);
line -= 1;
for (var i = start; end > i; ++i) if (!isUndefined(source[i])) context.push(source[i]);
return context.length > 0 ? context : null;
}
function escapeRegExp(text) {
return text.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g, "\\$&");
}
function escapeCodeAsRegExpForMatchingInsideHTML(body) {
return escapeRegExp(body).replace("<", "(?:<|<)").replace(">", "(?:>|>)").replace("&", "(?:&|&)").replace('"', '(?:"|")').replace(/\s+/g, "\\s+");
}
function findSourceInUrls(re, urls) {
for (var source, m, i = 0, j = urls.length; j > i; ++i) if ((source = getSource(urls[i])).length) {
source = source.join("\n");
if (m = re.exec(source)) return {
url: urls[i],
line: source.substring(0, m.index).split("\n").length,
column: m.index - source.lastIndexOf("\n", m.index) - 1
};
}
return null;
}
function findSourceInLine(fragment, url, line) {
var m, source = getSource(url), re = new RegExp("\\b" + escapeRegExp(fragment) + "\\b");
line -= 1;
if (source && source.length > line && (m = re.exec(source[line]))) return m.index; else return null;
}
function findSourceByFunctionBody(func) {
for (var body, re, parts, result, urls = [ window.location.href ], scripts = document.getElementsByTagName("script"), code = "" + func, codeRE = /^function(?:\s+([\w$]+))?\s*\(([\w\s,]*)\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/, eventRE = /^function on([\w$]+)\s*\(event\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/, i = 0; i < scripts.length; ++i) {
var script = scripts[i];
if (script.src) urls.push(script.src);
}
if (!(parts = codeRE.exec(code))) re = new RegExp(escapeRegExp(code).replace(/\s+/g, "\\s+")); else {
var name = parts[1] ? "\\s+" + parts[1] : "", args = parts[2].split(",").join("\\s*,\\s*");
body = escapeRegExp(parts[3]).replace(/;$/, ";?");
re = new RegExp("function" + name + "\\s*\\(\\s*" + args + "\\s*\\)\\s*{\\s*" + body + "\\s*}");
}
if (result = findSourceInUrls(re, urls)) return result;
if (parts = eventRE.exec(code)) {
var event = parts[1];
body = escapeCodeAsRegExpForMatchingInsideHTML(parts[2]);
re = new RegExp("on" + event + "=[\\'\"]\\s*" + body + "\\s*[\\'\"]", "i");
if (result = findSourceInUrls(re, urls[0])) return result;
re = new RegExp(body);
if (result = findSourceInUrls(re, urls)) return result;
}
return null;
}
function computeStackTraceFromStackProp(ex) {
if (!isUndefined(ex.stack) && ex.stack) {
for (var parts, element, chrome = /^\s*at (.*?) ?\(?((?:(?:file|https?|chrome-extension):.*?)|<anonymous>):(\d+)(?::(\d+))?\)?\s*$/i, gecko = /^\s*(.*?)(?:\((.*?)\))?@((?:file|https?|chrome).*?):(\d+)(?::(\d+))?\s*$/i, winjs = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:ms-appx|http|https):.*?):(\d+)(?::(\d+))?\)?\s*$/i, lines = ex.stack.split("\n"), stack = [], reference = /^(.*) is undefined$/.exec(ex.message), i = 0, j = lines.length; j > i; ++i) {
if (parts = gecko.exec(lines[i])) element = {
url: parts[3],
func: parts[1] || UNKNOWN_FUNCTION,
args: parts[2] ? parts[2].split(",") : "",
line: +parts[4],
column: parts[5] ? +parts[5] : null
}; else if (parts = chrome.exec(lines[i])) element = {
url: parts[2],
func: parts[1] || UNKNOWN_FUNCTION,
line: +parts[3],
column: parts[4] ? +parts[4] : null
}; else if (parts = winjs.exec(lines[i])) element = {
url: parts[2],
func: parts[1] || UNKNOWN_FUNCTION,
line: +parts[3],
column: parts[4] ? +parts[4] : null
}; else continue;
if (!element.func && element.line) element.func = guessFunctionName(element.url, element.line);
if (element.line) element.context = gatherContext(element.url, element.line);
stack.push(element);
}
if (!stack.length) return null;
if (stack[0].line && !stack[0].column && reference) stack[0].column = findSourceInLine(reference[1], stack[0].url, stack[0].line); else if (!stack[0].column && !isUndefined(ex.columnNumber)) stack[0].column = ex.columnNumber + 1;
return {
name: ex.name,
message: ex.message,
url: document.location.href,
stack: stack
};
}
}
function computeStackTraceFromStacktraceProp(ex) {
var stacktrace = ex.stacktrace;
if (!isUndefined(ex.stacktrace) && ex.stacktrace) {
for (var parts, testRE = / line (\d+), column (\d+) in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\) in (.*):\s*$/i, lines = stacktrace.split("\n"), stack = [], i = 0, j = lines.length; j > i; i += 2) if (parts = testRE.exec(lines[i])) {
var element = {
line: +parts[1],
column: +parts[2],
func: parts[3] || parts[4],
args: parts[5] ? parts[5].split(",") : [],
url: parts[6]
};
if (!element.func && element.line) element.func = guessFunctionName(element.url, element.line);
if (element.line) try {
element.context = gatherContext(element.url, element.line);
} catch (exc) {}
if (!element.context) element.context = [ lines[i + 1] ];
stack.push(element);
}
if (!stack.length) return null; else return {
name: ex.name,
message: ex.message,
url: document.location.href,
stack: stack
};
}
}
function computeStackTraceFromOperaMultiLineMessage(ex) {
var lines = ex.message.split("\n");
if (lines.length < 4) return null;
var parts, i, len, source, lineRE1 = /^\s*Line (\d+) of linked script ((?:file|https?)\S+)(?:: in function (\S+))?\s*$/i, lineRE2 = /^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?)\S+)(?:: in function (\S+))?\s*$/i, lineRE3 = /^\s*Line (\d+) of function script\s*$/i, stack = [], scripts = document.getElementsByTagName("script"), inlineScriptBlocks = [];
for (i in scripts) if (hasKey(scripts, i) && !scripts[i].src) inlineScriptBlocks.push(scripts[i]);
for (i = 2, len = lines.length; len > i; i += 2) {
var item = null;
if (parts = lineRE1.exec(lines[i])) item = {
url: parts[2],
func: parts[3],
line: +parts[1]
}; else if (parts = lineRE2.exec(lines[i])) {
item = {
url: parts[3],
func: parts[4]
};
var relativeLine = +parts[1], script = inlineScriptBlocks[parts[2] - 1];
if (script) {
source = getSource(item.url);
if (source) {
source = source.join("\n");
var pos = source.indexOf(script.innerText);
if (pos >= 0) item.line = relativeLine + source.substring(0, pos).split("\n").length;
}
}
} else if (parts = lineRE3.exec(lines[i])) {
var url = window.location.href.replace(/#.*$/, ""), line = parts[1], re = new RegExp(escapeCodeAsRegExpForMatchingInsideHTML(lines[i + 1]));
source = findSourceInUrls(re, [ url ]);
item = {
url: url,
line: source ? source.line : line,
func: ""
};
}
if (item) {
if (!item.func) item.func = guessFunctionName(item.url, item.line);
var context = gatherContext(item.url, item.line), midline = context ? context[Math.floor(context.length / 2)] : null;
if (context && midline.replace(/^\s*/, "") === lines[i + 1].replace(/^\s*/, "")) item.context = context; else item.context = [ lines[i + 1] ];
stack.push(item);
}
}
if (!stack.length) return null; else return {
name: ex.name,
message: lines[0],
url: document.location.href,
stack: stack
};
}
function augmentStackTraceWithInitialElement(stackInfo, url, lineNo, message) {
var initial = {
url: url,
line: lineNo
};
if (initial.url && initial.line) {
stackInfo.incomplete = !1;
if (-1 !== initial.url.indexOf(".hta") || -1 !== initial.url.indexOf(".html")) initial.url = "drp.js";
if (!initial.func) initial.func = guessFunctionName(initial.url, initial.line);
if (!initial.context) initial.context = gatherContext(initial.url, initial.line);
var reference = / '([^']+)' /.exec(message);
if (reference) initial.column = findSourceInLine(reference[1], initial.url, initial.line);
if (stackInfo.stack.length > 0) if (stackInfo.stack[0].url === initial.url) if (stackInfo.stack[0].line === initial.line) return !1; else if (!stackInfo.stack[0].line && stackInfo.stack[0].func === initial.func) {
stackInfo.stack[0].line = initial.line;
stackInfo.stack[0].context = initial.context;
return !1;
}
stackInfo.stack.unshift(initial);
stackInfo.partial = !0;
return !0;
} else stackInfo.incomplete = !0;
return !1;
}
function computeStackTraceByWalkingCallerChain(ex, depth) {
for (var parts, item, source, functionName = /function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i, stack = [], funcs = {}, recursion = !1, curr = computeStackTraceByWalkingCallerChain.caller; curr && !recursion; curr = curr.caller) if (curr !== computeStackTrace && curr !== TraceKit.report) {
item = {
url: null,
func: UNKNOWN_FUNCTION,
line: null,
column: null
};
if (curr.name) item.func = curr.name; else if (parts = functionName.exec(curr.toString())) item.func = parts[1];
if ("undefined" == typeof item.func) try {
item.func = parts.input.substring(0, parts.input.indexOf("{"));
} catch (e) {}
if (source = findSourceByFunctionBody(curr)) {
item.url = source.url;
if (-1 !== item.url.indexOf(".hta") || -1 !== item.url.indexOf(".html")) item.url = "drp.js";
item.line = source.line;
item.context = gatherContext(item.url, item.line);
if (item.func === UNKNOWN_FUNCTION) item.func = guessFunctionName(item.url, item.line);
var reference = / '([^']+)' /.exec(ex.message || ex.description);
if (reference) item.column = findSourceInLine(reference[1], source.url, source.line);
}
if (funcs["" + curr]) recursion = !0; else funcs["" + curr] = !0;
stack.push(item);
} else ;
if (depth) stack.splice(0, depth);
var result = {
name: ex.name,
message: ex.message,
url: document.location.href,
stack: stack
};
augmentStackTraceWithInitialElement(result, ex.sourceURL || ex.fileName, ex.line || ex.lineNumber, ex.message || ex.description);
return result;
}
function computeStackTrace(ex, depth) {
var stack = null;
depth = null == depth ? 0 : +depth;
try {
stack = computeStackTraceFromStacktraceProp(ex);
if (stack) return stack;
} catch (e) {
if (TraceKit.debug) throw e;
}
try {
stack = computeStackTraceFromStackProp(ex);
if (stack) return stack;
} catch (e) {
if (TraceKit.debug) throw e;
}
try {
stack = computeStackTraceFromOperaMultiLineMessage(ex);
if (stack) return stack;
} catch (e) {
if (TraceKit.debug) throw e;
}
try {
stack = computeStackTraceByWalkingCallerChain(ex, depth + 1);
if (stack) return stack;
} catch (e) {
if (TraceKit.debug) throw e;
}
return {
name: ex.name,
message: ex.message,
url: document.location.href
};
}
var sourceCache = {};
computeStackTrace.augmentStackTraceWithInitialElement = augmentStackTraceWithInitialElement;
computeStackTrace.computeStackTraceFromStackProp = computeStackTraceFromStackProp;
computeStackTrace.guessFunctionName = guessFunctionName;
computeStackTrace.gatherContext = gatherContext;
return computeStackTrace;
}();
var lastCapturedException, _lastEventId, globalServer, globalUser, globalKey, globalProject, _Raven = window.Raven, hasJSON = !("object" != typeof JSON || !JSON.stringify), globalOptions = {
logger: "javascript",
ignoreErrors: [],
ignoreUrls: [],
whitelistUrls: [],
includePaths: [],
crossOrigin: "anonymous",
collectWindowErrors: !0,
tags: {},
maxMessageLength: 100,
extra: {}
}, isRavenInstalled = !1, objectPrototype = Object.prototype, originalConsole = window.console || {}, originalConsoleMethods = {}, startTime = now();
for (var method in originalConsole) originalConsoleMethods[method] = originalConsole[method];
var Raven = {
VERSION: "1.1.22",
debug: !0,
noConflict: function() {
window.Raven = _Raven;
return Raven;
},
config: function(dsn, options) {
if (globalServer) {
logDebug("error", "Error: Raven has already been configured");
return Raven;
}
if (!dsn) return Raven;
var uri = parseDSN(dsn), lastSlash = uri.path.lastIndexOf("/"), path = uri.path.substr(1, lastSlash);
if (options) each(options, function(key, value) {
globalOptions[key] = value;
});
globalOptions.ignoreErrors.push(/^Script error\.?$/);
globalOptions.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/);
globalOptions.ignoreErrors = joinRegExp(globalOptions.ignoreErrors);
globalOptions.ignoreUrls = globalOptions.ignoreUrls.length ? joinRegExp(globalOptions.ignoreUrls) : !1;
globalOptions.whitelistUrls = globalOptions.whitelistUrls.length ? joinRegExp(globalOptions.whitelistUrls) : !1;
globalOptions.includePaths = joinRegExp(globalOptions.includePaths);
globalKey = uri.user;
globalProject = uri.path.substr(lastSlash + 1);
globalServer = "//" + uri.host + (uri.port ? ":" + uri.port : "") + "/" + path + "api/" + globalProject + "/store/";
if (uri.protocol) globalServer = uri.protocol + ":" + globalServer;
if (globalOptions.fetchContext) TraceKit.remoteFetching = !0;
if (globalOptions.linesOfContext) TraceKit.linesOfContext = globalOptions.linesOfContext;
TraceKit.collectWindowErrors = !!globalOptions.collectWindowErrors;
return Raven;
},
install: function() {
if (_isSetup() && !isRavenInstalled) {
TraceKit.report.subscribe(handleStackInfo);
isRavenInstalled = !0;
}
return Raven;
},
context: function(options, func, args) {
if (isFunction(options)) {
args = func || [];
func = options;
options = undefined;
}
return Raven.wrap(options, func).apply(this, args);
},
wrap: function(options, func) {
function wrapped() {
for (var args = [], i = arguments.length, deep = !options || options && options.deep !== !1; i--; ) args[i] = deep ? Raven.wrap(options, arguments[i]) : arguments[i];
try {
return func.apply(this, args);
} catch (e) {
Raven.captureException(e, options);
throw e;
}
}
if (isUndefined(func) && !isFunction(options)) return options;
if (isFunction(options)) {
func = options;
options = undefined;
}
if (!isFunction(func)) return func;
if (func.__raven__) return func;
for (var property in func) if (hasKey(func, property)) wrapped[property] = func[property];
wrapped.__raven__ = !0;
wrapped.__inner__ = func;
return wrapped;
},
uninstall: function() {
TraceKit.report.uninstall();
isRavenInstalled = !1;
return Raven;
},
captureException: function(ex, options) {
if (!isError(ex)) return Raven.captureMessage(ex, options);
lastCapturedException = ex;
try {
var stack = TraceKit.computeStackTrace(ex);
handleStackInfo(stack, options);
} catch (ex1) {
if (ex !== ex1) throw ex1;
}
return Raven;
},
captureMessage: function(msg, options) {
if (!globalOptions.ignoreErrors.test || !globalOptions.ignoreErrors.test(msg)) {
send(objectMerge({
message: msg + ""
}, options));
return Raven;
}
},
setUserContext: function(user) {
globalUser = user;
return Raven;
},
setExtraContext: function(extra) {
globalOptions.extra = extra || {};
return Raven;
},
setTagsContext: function(tags) {
globalOptions.tags = tags || {};
return Raven;
},
setReleaseContext: function(release) {
globalOptions.release = release;
return Raven;
},
setDataCallback: function(callback) {
globalOptions.dataCallback = callback;
return Raven;
},
setShouldSendCallback: function(callback) {
globalOptions.shouldSendCallback = callback;
return Raven;
},
lastException: function() {
return lastCapturedException;
},
lastEventId: function() {
return _lastEventId;
},
isSetup: function() {
return _isSetup();
}
};
Raven.setUser = Raven.setUserContext;
var dsnKeys = "source protocol user pass host port path".split(" "), dsnPattern = /^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;
RavenConfigError.prototype = new Error();
RavenConfigError.prototype.constructor = RavenConfigError;
var ravenNotConfiguredError;
afterLoad();
if (!0) {
window.Raven = Raven;
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function() {
return Raven;
}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else if ("object" == typeof module) module.exports = Raven; else if ("object" == typeof exports) exports = Raven; else window.Raven = Raven;
}("undefined" != typeof window ? window : void 0);
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
exports.__esModule = !0;
var _drpCoreSystem = __webpack_require__(27), _drpCoreLogs = __webpack_require__(4), _drpCoreStatistics = __webpack_require__(13), _drpCoreStatistics2 = _interopRequireDefault(_drpCoreStatistics), _lodashArrayUniq = __webpack_require__(51), _lodashArrayUniq2 = _interopRequireDefault(_lodashArrayUniq), _drpCoreDiagnosticsCheckSoft = __webpack_require__(44), _utilsPrepareData = __webpack_require__(101), _utilsPrepareData2 = _interopRequireDefault(_utilsPrepareData), _utilsRetryPromise = __webpack_require__(102), _utilsRetryPromise2 = _interopRequireDefault(_utilsRetryPromise), timeout = 12e4, path = _drpCoreSystem.AppData + "\\DRPSu\\diagnostics", checkProgram = function(program) {
if (/microsoft/i.test(program.Program)) return !1;
if (/microsoft/i.test(program.Publisher)) return !1;
if (!program.Uninstaller) return !1;
if (/dpinst/i.test(program.Uninstaller)) return !1; else return !0;
}, SystemScanner = function() {
function SystemScanner() {
_classCallCheck(this, SystemScanner);
}
SystemScanner.prototype.getDriversPath = function(name) {
return _drpCoreSystem.AppData + "\\DRPSu\\DRIVERS";
};
SystemScanner.prototype.run = function() {
return regeneratorRuntime.async(function(context$2$0) {
for (var _this = this; ;) switch (context$2$0.prev = context$2$0.next) {
case 0:
_drpCoreLogs.log("[SystemScanner] run");
context$2$0.next = 3;
return regeneratorRuntime.awrap(this.detectDevices());
case 3:
context$2$0.next = 5;
return regeneratorRuntime.awrap(this.detectCurrentDrivers());
case 5:
window.store.dispatch({
type: "LOADING_STATUS_UPDATED",
payload: {
status: "system_scan_finished"
}
});
context$2$0.prev = 6;
context$2$0.next = 9;
return regeneratorRuntime.awrap(_utilsRetryPromise2["default"](function() {
return _this.queryAPI();
}, 3));
case 9:
context$2$0.next = 16;
break;
case 11:
context$2$0.prev = 11;
context$2$0.t0 = context$2$0["catch"](6);
_drpCoreLogs.log("[SystemScanner] driver API failed", context$2$0.t0);
_drpCoreStatistics2["default"].event({
action: "driver api failed"
});
throw context$2$0.t0;
case 16:
window.store.dispatch({
type: "DRIVERS_SCAN_SUCCESS",
payload: this.drivers
});
context$2$0.next = 19;
return regeneratorRuntime.awrap(this.detectInstalledPrograms());
case 19:
context$2$0.next = 21;
return regeneratorRuntime.awrap(this.patchInstalledPrograms());
case 21:
context$2$0.prev = 21;
window.store.dispatch({
type: "LOADING_STATUS_UPDATED",
payload: {
status: "installed_programs_scan_finished"
}
});
context$2$0.next = 25;
return regeneratorRuntime.awrap(_utilsRetryPromise2["default"](function() {
return _this.queryProtectAPI();
}, 3));
case 25:
context$2$0.next = 32;
break;
case 27:
context$2$0.prev = 27;
context$2$0.t1 = context$2$0["catch"](21);
_drpCoreLogs.log("[SystemScanner] protect API Failed", context$2$0.t1);
_drpCoreStatistics2["default"].event({
action: "protect api failed"
});
this.installedPrograms = null;
case 32:
window.store.dispatch({
type: "INSTALLED_PROGRAMS_SCAN_FINISHED",
payload: this.installedPrograms
});
window.snapshot.create();
document.onkeydown = function(e) {
e = e || window.event;
var keyCode = e.keyCode ? e.keyCode : e.which;
if (e.ctrlKey && keyCode === "L".charCodeAt(0)) {
window.snapshot.apply();
return !1;
}
};
_drpCoreStatistics2["default"].event({
action: "system scanned"
});
case 36:
case "end":
return context$2$0.stop();
}
}, null, this, [ [ 6, 11 ], [ 21, 27 ] ]);
};
SystemScanner.prototype.waitFor = function(task) {
var cmd = '"' + _drpCoreSystem.WshShell.CurrentDirectory + '\\prepare.js" ' + task, query = [ 'Name = "wscript.exe"', 'CommandLine LIKE "%' + JSON.stringify(cmd).slice(1, -1) + '"' ].join(" AND ");
return _drpCoreSystem.waitForProcesses(query);
};
SystemScanner.prototype.fetchData = function(task) {
var _this2 = this, load = function() {
return _drpCoreSystem.queryFile(path + "\\" + task + ".json", timeout);
};
return Promise["try"](load)["catch"](function() {
return _this2.waitFor(task).then(load);
}).then(function(json) {
var data = JSON.parse(json);
_drpCoreLogs.log("[SystemScanner] " + task + ".json", data);
return data;
})["catch"](function(err) {
_drpCoreLogs.log(task + ".json error", err);
var data = _utilsPrepareData2["default"](task);
_drpCoreLogs.log("[SystemScanner] " + task + " data from WMI", data);
return data;
});
};
SystemScanner.prototype.detectDevices = function() {
var _this3 = this;
return this.fetchData("hardware").then(function(query) {
Object.assign(_this3, {
query: query,
devices: query.devices
});
});
};
SystemScanner.prototype.detectCurrentDrivers = function() {
var _this4 = this;
return this.fetchData("drivers").then(function(currentDrivers) {
Object.assign(_this4, {
currentDrivers: currentDrivers
});
});
};
SystemScanner.prototype.queryAPI = function() {
var _this5 = this;
return window.delorean.run(this.query).then(function(driversJSON) {
_drpCoreLogs.log("[SystemScanner] delorean JSON response before fixing", driversJSON);
return window.delorean.convertOutputToV1(driversJSON, _this5.currentDrivers);
}).then(function(json) {
_this5.drivers = json.installed;
_drpCoreLogs.log("[SystemScanner] delorean JSON response", json);
});
};
SystemScanner.prototype.detectInstalledPrograms = function() {
var _this6 = this;
return this.fetchData("newsoft").then(function(_ref) {
var Software = _ref.Software;
_this6.installedPrograms = _lodashArrayUniq2["default"](Software["Installed Software"].filter(checkProgram), "Uninstaller");
});
};
SystemScanner.prototype.patchInstalledPrograms = function() {
_drpCoreLogs.log("[SystemScanner] patching programs");
this.installedPrograms = this.installedPrograms.map(function(soft) {
soft.partnerInfo = _drpCoreDiagnosticsCheckSoft.getPartnerInfo(soft);
return soft;
});
};
SystemScanner.prototype.queryProtectAPI = function() {
var _this7 = this, query = this.installedPrograms;
if (0 !== query.length) return window.delorean.runProtect(query).then(function(softJSON) {
_drpCoreLogs.log("[SystemScanner] delorean installed soft JSON before fixing", softJSON);
return window.delorean.convertProtectOutput(softJSON);
}).then(function(json) {
_this7.installedPrograms = json;
_drpCoreLogs.log("[SystemScanner] delorean installed soft JSON response", json);
}); else _drpCoreLogs.log("[SystemScanner] delorean no soft detected");
};
return SystemScanner;
}();
exports["default"] = new SystemScanner();
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
function uniq(array, isSorted, iteratee, thisArg) {
var length = array ? array.length : 0;
if (!length) return [];
if (null != isSorted && "boolean" != typeof isSorted) {
thisArg = iteratee;
iteratee = isIterateeCall(array, isSorted, thisArg) ? void 0 : isSorted;
isSorted = !1;
}
iteratee = null == iteratee ? iteratee : baseCallback(iteratee, thisArg, 3);
return isSorted ? sortedUniq(array, iteratee) : baseUniq(array, iteratee);
}
var baseCallback = __webpack_require__(52), baseUniq = __webpack_require__(92), isIterateeCall = __webpack_require__(99), sortedUniq = __webpack_require__(100);
module.exports = uniq;
}, function(module, exports, __webpack_require__) {
function baseCallback(func, thisArg, argCount) {
var type = typeof func;
if ("function" == type) return void 0 === thisArg ? func : bindCallback(func, thisArg, argCount);
if (null == func) return identity;
if ("object" == type) return baseMatches(func); else return void 0 === thisArg ? property(func) : baseMatchesProperty(func, thisArg);
}
var baseMatches = __webpack_require__(53), baseMatchesProperty = __webpack_require__(81), bindCallback = __webpack_require__(88), identity = __webpack_require__(89), property = __webpack_require__(90);
module.exports = baseCallback;
}, function(module, exports, __webpack_require__) {
function baseMatches(source) {
var matchData = getMatchData(source);
if (1 == matchData.length && matchData[0][2]) {
var key = matchData[0][0], value = matchData[0][1];
return function(object) {
if (null == object) return !1; else return object[key] === value && (void 0 !== value || key in toObject(object));
};
}
return function(object) {
return baseIsMatch(object, matchData);
};
}
var baseIsMatch = __webpack_require__(54), getMatchData = __webpack_require__(78), toObject = __webpack_require__(77);
module.exports = baseMatches;
}, function(module, exports, __webpack_require__) {
function baseIsMatch(object, matchData, customizer) {
var index = matchData.length, length = index, noCustomizer = !customizer;
if (null == object) return !length;
object = toObject(object);
for (;index--; ) {
var data = matchData[index];
if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) return !1;
}
for (;++index < length; ) {
data = matchData[index];
var key = data[0], objValue = object[key], srcValue = data[1];
if (noCustomizer && data[2]) {
if (void 0 === objValue && !(key in object)) return !1;
} else {
var result = customizer ? customizer(objValue, srcValue, key) : void 0;
if (!(void 0 === result ? baseIsEqual(srcValue, objValue, customizer, !0) : result)) return !1;
}
}
return !0;
}
var baseIsEqual = __webpack_require__(55), toObject = __webpack_require__(77);
module.exports = baseIsMatch;
}, function(module, exports, __webpack_require__) {
function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) {
if (value === other) return !0;
if (null == value || null == other || !isObject(value) && !isObjectLike(other)) return value !== value && other !== other; else return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB);
}
var baseIsEqualDeep = __webpack_require__(56), isObject = __webpack_require__(65), isObjectLike = __webpack_require__(66);
module.exports = baseIsEqual;
}, function(module, exports, __webpack_require__) {
function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
var objIsArr = isArray(object), othIsArr = isArray(other), objTag = arrayTag, othTag = arrayTag;
if (!objIsArr) {
objTag = objToString.call(object);
if (objTag == argsTag) objTag = objectTag; else if (objTag != objectTag) objIsArr = isTypedArray(object);
}
if (!othIsArr) {
othTag = objToString.call(other);
if (othTag == argsTag) othTag = objectTag; else if (othTag != objectTag) othIsArr = isTypedArray(other);
}
var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
if (isSameTag && !objIsArr && !objIsObj) return equalByTag(object, other, objTag);
if (!isLoose) {
var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
if (objIsWrapped || othIsWrapped) return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB);
}
if (!isSameTag) return !1;
stackA || (stackA = []);
stackB || (stackB = []);
for (var length = stackA.length; length--; ) if (stackA[length] == object) return stackB[length] == other;
stackA.push(object);
stackB.push(other);
var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB);
stackA.pop();
stackB.pop();
return result;
}
var equalArrays = __webpack_require__(57), equalByTag = __webpack_require__(59), equalObjects = __webpack_require__(60), isArray = __webpack_require__(73), isTypedArray = __webpack_require__(76), argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]", objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty, objToString = objectProto.toString;
module.exports = baseIsEqualDeep;
}, function(module, exports, __webpack_require__) {
function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) {
var index = -1, arrLength = array.length, othLength = other.length;
if (arrLength != othLength && !(isLoose && othLength > arrLength)) return !1;
for (;++index < arrLength; ) {
var arrValue = array[index], othValue = other[index], result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : void 0;
if (void 0 !== result) {
if (result) continue;
return !1;
}
if (isLoose) {
if (!arraySome(other, function(othValue) {
return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB);
})) return !1;
} else if (arrValue !== othValue && !equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB)) return !1;
}
return !0;
}
var arraySome = __webpack_require__(58);
module.exports = equalArrays;
}, function(module, exports) {
function arraySome(array, predicate) {
for (var index = -1, length = array.length; ++index < length; ) if (predicate(array[index], index, array)) return !0;
return !1;
}
module.exports = arraySome;
}, function(module, exports) {
function equalByTag(object, other, tag) {
switch (tag) {
case boolTag:
case dateTag:
return +object == +other;
case errorTag:
return object.name == other.name && object.message == other.message;
case numberTag:
return object != +object ? other != +other : object == +other;
case regexpTag:
case stringTag:
return object == other + "";
}
return !1;
}
var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", numberTag = "[object Number]", regexpTag = "[object RegExp]", stringTag = "[object String]";
module.exports = equalByTag;
}, function(module, exports, __webpack_require__) {
function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
var objProps = keys(object), objLength = objProps.length, othProps = keys(other), othLength = othProps.length;
if (objLength != othLength && !isLoose) return !1;
for (var index = objLength; index--; ) {
var key = objProps[index];
if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) return !1;
}
for (var skipCtor = isLoose; ++index < objLength; ) {
key = objProps[index];
var objValue = object[key], othValue = other[key], result = customizer ? customizer(isLoose ? othValue : objValue, isLoose ? objValue : othValue, key) : void 0;
if (!(void 0 === result ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) return !1;
skipCtor || (skipCtor = "constructor" == key);
}
if (!skipCtor) {
var objCtor = object.constructor, othCtor = other.constructor;
if (objCtor != othCtor && "constructor" in object && "constructor" in other && !("function" == typeof objCtor && objCtor instanceof objCtor && "function" == typeof othCtor && othCtor instanceof othCtor)) return !1;
}
return !0;
}
var keys = __webpack_require__(61), objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty;
module.exports = equalObjects;
}, function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(62), isArrayLike = __webpack_require__(67), isObject = __webpack_require__(65), shimKeys = __webpack_require__(71), nativeKeys = getNative(Object, "keys"), keys = !nativeKeys ? shimKeys : function(object) {
var Ctor = null == object ? void 0 : object.constructor;
if ("function" == typeof Ctor && Ctor.prototype === object || "function" != typeof object && isArrayLike(object)) return shimKeys(object); else return isObject(object) ? nativeKeys(object) : [];
};
module.exports = keys;
}, function(module, exports, __webpack_require__) {
function getNative(object, key) {
var value = null == object ? void 0 : object[key];
return isNative(value) ? value : void 0;
}
var isNative = __webpack_require__(63);
module.exports = getNative;
}, function(module, exports, __webpack_require__) {
function isNative(value) {
if (null == value) return !1;
if (isFunction(value)) return reIsNative.test(fnToString.call(value)); else return isObjectLike(value) && reIsHostCtor.test(value);
}
var isFunction = __webpack_require__(64), isObjectLike = __webpack_require__(66), reIsHostCtor = /^\[object .+?Constructor\]$/, objectProto = Object.prototype, fnToString = Function.prototype.toString, hasOwnProperty = objectProto.hasOwnProperty, reIsNative = RegExp("^" + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
module.exports = isNative;
}, function(module, exports, __webpack_require__) {
function isFunction(value) {
return isObject(value) && objToString.call(value) == funcTag;
}
var isObject = __webpack_require__(65), funcTag = "[object Function]", objectProto = Object.prototype, objToString = objectProto.toString;
module.exports = isFunction;
}, function(module, exports) {
function isObject(value) {
var type = typeof value;
return !!value && ("object" == type || "function" == type);
}
module.exports = isObject;
}, function(module, exports) {
function isObjectLike(value) {
return !!value && "object" == typeof value;
}
module.exports = isObjectLike;
}, function(module, exports, __webpack_require__) {
function isArrayLike(value) {
return null != value && isLength(getLength(value));
}
var getLength = __webpack_require__(68), isLength = __webpack_require__(70);
module.exports = isArrayLike;
}, function(module, exports, __webpack_require__) {
var baseProperty = __webpack_require__(69), getLength = baseProperty("length");
module.exports = getLength;
}, function(module, exports) {
function baseProperty(key) {
return function(object) {
return null == object ? void 0 : object[key];
};
}
module.exports = baseProperty;
}, function(module, exports) {
function isLength(value) {
return "number" == typeof value && value > -1 && value % 1 == 0 && MAX_SAFE_INTEGER >= value;
}
var MAX_SAFE_INTEGER = 9007199254740991;
module.exports = isLength;
}, function(module, exports, __webpack_require__) {
function shimKeys(object) {
for (var props = keysIn(object), propsLength = props.length, length = propsLength && object.length, allowIndexes = !!length && isLength(length) && (isArray(object) || isArguments(object)), index = -1, result = []; ++index < propsLength; ) {
var key = props[index];
if (allowIndexes && isIndex(key, length) || hasOwnProperty.call(object, key)) result.push(key);
}
return result;
}
var isArguments = __webpack_require__(72), isArray = __webpack_require__(73), isIndex = __webpack_require__(74), isLength = __webpack_require__(70), keysIn = __webpack_require__(75), objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty;
module.exports = shimKeys;
}, function(module, exports, __webpack_require__) {
function isArguments(value) {
return isObjectLike(value) && isArrayLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
}
var isArrayLike = __webpack_require__(67), isObjectLike = __webpack_require__(66), objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty, propertyIsEnumerable = objectProto.propertyIsEnumerable;
module.exports = isArguments;
}, function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(62), isLength = __webpack_require__(70), isObjectLike = __webpack_require__(66), arrayTag = "[object Array]", objectProto = Object.prototype, objToString = objectProto.toString, nativeIsArray = getNative(Array, "isArray"), isArray = nativeIsArray || function(value) {
return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;
};
module.exports = isArray;
}, function(module, exports) {
function isIndex(value, length) {
value = "number" == typeof value || reIsUint.test(value) ? +value : -1;
length = null == length ? MAX_SAFE_INTEGER : length;
return value > -1 && value % 1 == 0 && length > value;
}
var reIsUint = /^\d+$/, MAX_SAFE_INTEGER = 9007199254740991;
module.exports = isIndex;
}, function(module, exports, __webpack_require__) {
function keysIn(object) {
if (null == object) return [];
if (!isObject(object)) object = Object(object);
var length = object.length;
length = length && isLength(length) && (isArray(object) || isArguments(object)) && length || 0;
for (var Ctor = object.constructor, index = -1, isProto = "function" == typeof Ctor && Ctor.prototype === object, result = Array(length), skipIndexes = length > 0; ++index < length; ) result[index] = index + "";
for (var key in object) if ((!skipIndexes || !isIndex(key, length)) && ("constructor" != key || !isProto && hasOwnProperty.call(object, key))) result.push(key);
return result;
}
var isArguments = __webpack_require__(72), isArray = __webpack_require__(73), isIndex = __webpack_require__(74), isLength = __webpack_require__(70), isObject = __webpack_require__(65), objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty;
module.exports = keysIn;
}, function(module, exports, __webpack_require__) {
function isTypedArray(value) {
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)];
}
var isLength = __webpack_require__(70), isObjectLike = __webpack_require__(66), argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", mapTag = "[object Map]", numberTag = "[object Number]", objectTag = "[object Object]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", weakMapTag = "[object WeakMap]", arrayBufferTag = "[object ArrayBuffer]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]", typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = !0;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = !1;
var objectProto = Object.prototype, objToString = objectProto.toString;
module.exports = isTypedArray;
}, function(module, exports, __webpack_require__) {
function toObject(value) {
return isObject(value) ? value : Object(value);
}
var isObject = __webpack_require__(65);
module.exports = toObject;
}, function(module, exports, __webpack_require__) {
function getMatchData(object) {
for (var result = pairs(object), length = result.length; length--; ) result[length][2] = isStrictComparable(result[length][1]);
return result;
}
var isStrictComparable = __webpack_require__(79), pairs = __webpack_require__(80);
module.exports = getMatchData;
}, function(module, exports, __webpack_require__) {
function isStrictComparable(value) {
return value === value && !isObject(value);
}
var isObject = __webpack_require__(65);
module.exports = isStrictComparable;
}, function(module, exports, __webpack_require__) {
function pairs(object) {
object = toObject(object);
for (var index = -1, props = keys(object), length = props.length, result = Array(length); ++index < length; ) {
var key = props[index];
result[index] = [ key, object[key] ];
}
return result;
}
var keys = __webpack_require__(61), toObject = __webpack_require__(77);
module.exports = pairs;
}, function(module, exports, __webpack_require__) {
function baseMatchesProperty(path, srcValue) {
var isArr = isArray(path), isCommon = isKey(path) && isStrictComparable(srcValue), pathKey = path + "";
path = toPath(path);
return function(object) {
if (null == object) return !1;
var key = pathKey;
object = toObject(object);
if ((isArr || !isCommon) && !(key in object)) {
object = 1 == path.length ? object : baseGet(object, baseSlice(path, 0, -1));
if (null == object) return !1;
key = last(path);
object = toObject(object);
}
return object[key] === srcValue ? void 0 !== srcValue || key in object : baseIsEqual(srcValue, object[key], void 0, !0);
};
}
var baseGet = __webpack_require__(82), baseIsEqual = __webpack_require__(55), baseSlice = __webpack_require__(83), isArray = __webpack_require__(73), isKey = __webpack_require__(84), isStrictComparable = __webpack_require__(79), last = __webpack_require__(85), toObject = __webpack_require__(77), toPath = __webpack_require__(86);
module.exports = baseMatchesProperty;
}, function(module, exports, __webpack_require__) {
function baseGet(object, path, pathKey) {
if (null != object) {
if (void 0 !== pathKey && pathKey in toObject(object)) path = [ pathKey ];
for (var index = 0, length = path.length; null != object && length > index; ) object = object[path[index++]];
return index && index == length ? object : void 0;
}
}
var toObject = __webpack_require__(77);
module.exports = baseGet;
}, function(module, exports) {
function baseSlice(array, start, end) {
var index = -1, length = array.length;
start = null == start ? 0 : +start || 0;
if (0 > start) start = -start > length ? 0 : length + start;
end = void 0 === end || end > length ? length : +end || 0;
if (0 > end) end += length;
length = start > end ? 0 : end - start >>> 0;
start >>>= 0;
for (var result = Array(length); ++index < length; ) result[index] = array[index + start];
return result;
}
module.exports = baseSlice;
}, function(module, exports, __webpack_require__) {
function isKey(value, object) {
var type = typeof value;
if ("string" == type && reIsPlainProp.test(value) || "number" == type) return !0;
if (isArray(value)) return !1;
var result = !reIsDeepProp.test(value);
return result || null != object && value in toObject(object);
}
var isArray = __webpack_require__(73), toObject = __webpack_require__(77), reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
module.exports = isKey;
}, function(module, exports) {
function last(array) {
var length = array ? array.length : 0;
return length ? array[length - 1] : void 0;
}
module.exports = last;
}, function(module, exports, __webpack_require__) {
function toPath(value) {
if (isArray(value)) return value;
var result = [];
baseToString(value).replace(rePropName, function(match, number, quote, string) {
result.push(quote ? string.replace(reEscapeChar, "$1") : number || match);
});
return result;
}
var baseToString = __webpack_require__(87), isArray = __webpack_require__(73), rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g, reEscapeChar = /\\(\\)?/g;
module.exports = toPath;
}, function(module, exports) {
function baseToString(value) {
return null == value ? "" : value + "";
}
module.exports = baseToString;
}, function(module, exports, __webpack_require__) {
function bindCallback(func, thisArg, argCount) {
if ("function" != typeof func) return identity;
if (void 0 === thisArg) return func;
switch (argCount) {
case 1:
return function(value) {
return func.call(thisArg, value);
};
case 3:
return function(value, index, collection) {
return func.call(thisArg, value, index, collection);
};
case 4:
return function(accumulator, value, index, collection) {
return func.call(thisArg, accumulator, value, index, collection);
};
case 5:
return function(value, other, key, object, source) {
return func.call(thisArg, value, other, key, object, source);
};
}
return function() {
return func.apply(thisArg, arguments);
};
}
var identity = __webpack_require__(89);
module.exports = bindCallback;
}, function(module, exports) {
function identity(value) {
return value;
}
module.exports = identity;
}, function(module, exports, __webpack_require__) {
function property(path) {
return isKey(path) ? baseProperty(path) : basePropertyDeep(path);
}
var baseProperty = __webpack_require__(69), basePropertyDeep = __webpack_require__(91), isKey = __webpack_require__(84);
module.exports = property;
}, function(module, exports, __webpack_require__) {
function basePropertyDeep(path) {
var pathKey = path + "";
path = toPath(path);
return function(object) {
return baseGet(object, path, pathKey);
};
}
var baseGet = __webpack_require__(82), toPath = __webpack_require__(86);
module.exports = basePropertyDeep;
}, function(module, exports, __webpack_require__) {
function baseUniq(array, iteratee) {
var index = -1, indexOf = baseIndexOf, length = array.length, isCommon = !0, isLarge = isCommon && length >= LARGE_ARRAY_SIZE, seen = isLarge ? createCache() : null, result = [];
if (seen) {
indexOf = cacheIndexOf;
isCommon = !1;
} else {
isLarge = !1;
seen = iteratee ? [] : result;
}
outer: for (;++index < length; ) {
var value = array[index], computed = iteratee ? iteratee(value, index, array) : value;
if (isCommon && value === value) {
for (var seenIndex = seen.length; seenIndex--; ) if (seen[seenIndex] === computed) continue outer;
if (iteratee) seen.push(computed);
result.push(value);
} else if (indexOf(seen, computed, 0) < 0) {
if (iteratee || isLarge) seen.push(computed);
result.push(value);
}
}
return result;
}
var baseIndexOf = __webpack_require__(93), cacheIndexOf = __webpack_require__(95), createCache = __webpack_require__(96), LARGE_ARRAY_SIZE = 200;
module.exports = baseUniq;
}, function(module, exports, __webpack_require__) {
function baseIndexOf(array, value, fromIndex) {
if (value !== value) return indexOfNaN(array, fromIndex);
for (var index = fromIndex - 1, length = array.length; ++index < length; ) if (array[index] === value) return index;
return -1;
}
var indexOfNaN = __webpack_require__(94);
module.exports = baseIndexOf;
}, function(module, exports) {
function indexOfNaN(array, fromIndex, fromRight) {
for (var length = array.length, index = fromIndex + (fromRight ? 0 : -1); fromRight ? index-- : ++index < length; ) {
var other = array[index];
if (other !== other) return index;
}
return -1;
}
module.exports = indexOfNaN;
}, function(module, exports, __webpack_require__) {
function cacheIndexOf(cache, value) {
var data = cache.data, result = "string" == typeof value || isObject(value) ? data.set.has(value) : data.hash[value];
return result ? 0 : -1;
}
var isObject = __webpack_require__(65);
module.exports = cacheIndexOf;
}, function(module, exports, __webpack_require__) {
(function(global) {
function createCache(values) {
return nativeCreate && Set ? new SetCache(values) : null;
}
var SetCache = __webpack_require__(97), getNative = __webpack_require__(62), Set = getNative(global, "Set"), nativeCreate = getNative(Object, "create");
module.exports = createCache;
}).call(exports, function() {
return this;
}());
}, function(module, exports, __webpack_require__) {
(function(global) {
function SetCache(values) {
var length = values ? values.length : 0;
this.data = {
hash: nativeCreate(null),
set: new Set()
};
for (;length--; ) this.push(values[length]);
}
var cachePush = __webpack_require__(98), getNative = __webpack_require__(62), Set = getNative(global, "Set"), nativeCreate = getNative(Object, "create");
SetCache.prototype.push = cachePush;
module.exports = SetCache;
}).call(exports, function() {
return this;
}());
}, function(module, exports, __webpack_require__) {
function cachePush(value) {
var data = this.data;
if ("string" == typeof value || isObject(value)) data.set.add(value); else data.hash[value] = !0;
}
var isObject = __webpack_require__(65);
module.exports = cachePush;
}, function(module, exports, __webpack_require__) {
function isIterateeCall(value, index, object) {
if (!isObject(object)) return !1;
var type = typeof index;
if ("number" == type ? isArrayLike(object) && isIndex(index, object.length) : "string" == type && index in object) {
var other = object[index];
return value === value ? value === other : other !== other;
}
return !1;
}
var isArrayLike = __webpack_require__(67), isIndex = __webpack_require__(74), isObject = __webpack_require__(65);
module.exports = isIterateeCall;
}, function(module, exports) {
function sortedUniq(array, iteratee) {
for (var seen, index = -1, length = array.length, resIndex = -1, result = []; ++index < length; ) {
var value = array[index], computed = iteratee ? iteratee(value, index, array) : value;
if (!index || seen !== computed) {
seen = computed;
result[++resIndex] = value;
}
}
return result;
}
module.exports = sortedUniq;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _drpCoreOs = __webpack_require__(9), _drpCoreDiagnosticsGetDiagnostics = __webpack_require__(36), _drpCoreDiagnosticsGetDiagnostics2 = _interopRequireDefault(_drpCoreDiagnosticsGetDiagnostics), _drpCoreDiagnosticsGetSoftChanges = __webpack_require__(38), _drpCoreDiagnosticsGetSoftChanges2 = _interopRequireDefault(_drpCoreDiagnosticsGetSoftChanges), _drpCoreDiagnosticsGetDrivers = __webpack_require__(40), _drpCoreDiagnosticsGetHardware = __webpack_require__(39), _drpCoreDiagnosticsGetModel = __webpack_require__(41);
exports["default"] = function(task, data) {
switch (task) {
case "localdiagnostics":
return _drpCoreDiagnosticsGetDiagnostics2["default"]("diagnostics");
case "drivers":
return _drpCoreDiagnosticsGetDrivers.getDrivers();
case "newsoft":
return _drpCoreDiagnosticsGetDiagnostics2["default"]("soft");
case "softchanges":
return _drpCoreDiagnosticsGetSoftChanges2["default"](data);
case "hardware":
return {
devices: _drpCoreDiagnosticsGetHardware.getHardware(),
model: _drpCoreDiagnosticsGetModel.getModel(),
windows: {
ver: _drpCoreOs.OSVersionS,
arch: _drpCoreOs.is64 ? "64" : "86"
},
limit: 5
};
default:
throw new Error("Unknown task " + task);
}
};
module.exports = exports["default"];
}, function(module, exports) {
"use strict";
function retryPromise(handler) {
var tries = arguments.length <= 1 || void 0 === arguments[1] ? 1 : arguments[1], timeout = arguments.length <= 2 || void 0 === arguments[2] ? 1e3 : arguments[2];
return handler()["catch"](function(err) {
if (1 >= tries) throw err;
return Promise.delay(timeout).then(function() {
return retryPromise(handler, tries - 1, timeout);
});
});
}
exports.__esModule = !0;
exports["default"] = retryPromise;
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
exports.__esModule = !0;
var _drpCoreSystem = __webpack_require__(27), _drpCoreLogs = __webpack_require__(4), _drpCoreAntivirus = __webpack_require__(104), _drpCoreAntivirus2 = _interopRequireDefault(_drpCoreAntivirus), _selectorsDriversPrograms = __webpack_require__(105), SoftPack = function() {
function SoftPack() {
_classCallCheck(this, SoftPack);
}
SoftPack.prototype.getSoftPath = function(name) {
return _drpCoreSystem.AppData + "\\DRPSu\\PROGRAMS";
};
SoftPack.prototype.run = function() {
var _this = this;
return new Promise(function(resolve, reject) {
_drpCoreLogs.log("[SoftPack] run");
window.SoftPack.jsonCallback = function(json) {
_drpCoreLogs.log("[SoftPack] run - JSONP response:", json);
_this.soft = json;
_this.applyAll();
resolve();
};
_drpCoreAntivirus2["default"].init();
setTimeout(function() {
_this.insertSoftScript();
}, 100);
});
};
SoftPack.prototype.insertSoftScript = function() {
var softEndpoint = _drpCoreSystem.fso.FileExists("js/soft.js") ? "js/soft.js" : window.softEndpoint, documentElement = document.documentElement, script = document.createElement("script");
script.src = softEndpoint;
documentElement.insertBefore(script, documentElement.lastChild);
};
SoftPack.prototype.applyAll = function() {
var programs = this.applyTargeting(this.soft);
window.store.dispatch({
type: "PROGRAMS_LOADED",
payload: programs
});
};
SoftPack.prototype.applyTargeting = function(json) {
json.forEach(function(item, i, json) {
json[i].isVisible = !0;
json[i].isInstalled = !1;
json[i].IsChecked = !1;
var targetingData = {
antivirus: _drpCoreAntivirus2["default"],
geoip: window.isOnline ? window.geoip : window.geoipOffline,
os: window.os,
system: window.system,
wmi: window.wmi,
diagnostics: window.diagnostics
};
if (json[i].Targeting) try {
json[i].isVisible = json[i].CheckedDefaultIf(targetingData);
} catch (err) {
_drpCoreLogs.log("[SoftPack] CheckedDefaultIf failed", err);
}
if (json[i].isVisible) {
if (json[i].Registry_32) if (window.system.RegExists(json[i].Registry_32)) json[i].isInstalled = !0;
if (window.os.is64 && json[i].Registry_64) {
var parts = json[i].Registry_64.split("\\"), value = parts.pop(), path = parts.join("\\"), com = '%windir%\\sysnative\\reg query "' + path + '" /v "' + value + '"';
if (!window.system.WshShell.run(com, 0, !0)) json[i].isInstalled = !0;
}
if (!json[i].isInstalled) try {
switch (typeof json[i].Checked) {
case "boolean":
json[i].IsChecked = json[i].Checked;
break;
case "function":
json[i].IsChecked = json[i].Checked(targetingData);
}
} catch (err) {
_drpCoreLogs.log("[SoftPack] Checked failed", err);
} else if (!_selectorsDriversPrograms.isNotDriverUtility(json[i])) json[i].isVisible = !1;
}
});
_drpCoreLogs.log("[SoftPack] Targeting applied", json);
return json;
};
return SoftPack;
}();
exports["default"] = window.SoftPack = new SoftPack();
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
exports.__esModule = !0;
var _logs = __webpack_require__(4), _os = __webpack_require__(9), _wmi = __webpack_require__(10), Antivirus = function() {
function Antivirus() {
_classCallCheck(this, Antivirus);
this.scanAntiviruses = this.memoize(this.scanAntiviruses);
this.isSecurityCenterServiceRunning = this.memoize(this.isSecurityCenterServiceRunning);
}
Antivirus.prototype.init = function() {
try {
var center = this.isSecurityCenterServiceRunning(), antiviruses = this.scanAntiviruses();
_logs.log("[antivirus] Security Center Service is " + (center ? "" : "NOT") + " running");
if (antiviruses.length) _logs.log("[antivirus] Antiviruses:", antiviruses); else _logs.log("[antivirus] No antiviruses found");
} catch (err) {
_logs.log("[antivirus] init failed", err);
}
};
Antivirus.prototype.memoize = function(func) {
var _this = this, cache = void 0;
return function() {
if (cache) return cache; else {
cache = func.call(_this);
return cache;
}
};
};
Antivirus.prototype.clearUndefVar = function(varib) {
try {
varib += "";
return varib.replace("null", "").replace("undefined", "");
} catch (err) {
return "";
}
};
Antivirus.prototype.getSystemWMIScalar = function(query) {
try {
var colItems = _wmi.objWMIService.ExecQuery(query);
if (colItems.count) {
var e = new Enumerator(colItems);
return e.item();
}
} catch (err) {}
return null;
};
Antivirus.prototype.isSecurityCenterServiceRunning = function() {
try {
var service = this.getSystemWMIScalar('SELECT State, Name FROM Win32_Service WHERE Name="wscsvc"');
if ("Running" !== service.State) {
var cmd = "net start wscsvc";
new ActiveXObject("WScript.Shell").Run(cmd, 0, !0);
}
service = this.getSystemWMIScalar('SELECT State, Name FROM Win32_Service WHERE Name="wscsvc"');
return "Running" === service.State;
} catch (e) {
return !1;
}
};
Antivirus.prototype.scanAntiviruses = function() {
for (var antivirus = [], objWMIServiceAntivir = _wmi.locator.ConnectServer(null, "\\root\\SecurityCenter" + (_os.OSVersion >= 6 ? "2" : "")), colItems = objWMIServiceAntivir.ExecQuery("SELECT * FROM AntiVirusProduct", "WQL"), enumItems = new Enumerator(colItems); !enumItems.atEnd(); enumItems.moveNext()) {
var objItem = enumItems.item();
if ("Windows Defender" !== objItem.displayName) antivirus.push({
companyName: this.clearUndefVar(objItem.companyName),
displayName: this.clearUndefVar(objItem.displayName),
productState: this.clearUndefVar(objItem.productState),
instanceGuid: this.clearUndefVar(objItem.instanceGuid),
onAccessScanningEnabled: this.clearUndefVar(objItem.onAccessScanningEnabled),
pathToSignedProductExe: this.clearUndefVar(objItem.pathToSignedProductExe),
productHasNotifiedUser: this.clearUndefVar(objItem.productHasNotifiedUser),
productUptoDate: this.clearUndefVar(objItem.productUptoDate),
productWantsWscNotifications: this.clearUndefVar(objItem.productWantsWscNotifications),
versionNumber: this.clearUndefVar(objItem.versionNumber)
});
}
return antivirus;
};
Antivirus.prototype.hasAntiviruses = function() {
try {
if (!this.isSecurityCenterServiceRunning()) return 1;
if (this.scanAntiviruses().length) return 2; else return 0;
} catch (err) {
return 1;
}
};
return Antivirus;
}();
exports["default"] = new Antivirus();
module.exports = exports["default"];
}, function(module, exports) {
"use strict";
function countCheckedDrivers(drivers, programs) {
var checkedUtilities = filterDriverUtilities(programs).filter(isProgramChecked), checkedDrivers = drivers.filter(isDriverChecked);
return checkedDrivers.length + checkedUtilities.length;
}
function countCheckedPrograms(drivers, programs) {
var programsPage = filterProgramsPage(programs);
return programsPage.length;
}
function isDriverChecked(driver) {
return driver.isChecked;
}
function isProgramChecked(program) {
return program.isChecked || program.isNotifierChecked;
}
function isInstalledProgramChecked(program) {
return program.isChecked;
}
function isNotifier(program) {
return /DriverPack Notifier/.test(program.name) || /DriverPack Notifier/.test(program.Name);
}
function isYandexBrowser(program) {
return /Yandex\.Browser/.test(program.name);
}
function isDriverUtility(program) {
return program.category === DRIVERS_UTILITY_CATEGORY || isNotifier(program);
}
function isNotDriverUtility(program) {
return program.category !== DRIVERS_UTILITY_CATEGORY && program.Category !== DRIVERS_UTILITY_CATEGORY || isNotifier(program);
}
function isVisible(program) {
return program.isVisible;
}
function isHarmful(program) {
return "large" === program.removalRate;
}
function getNotifier(programs) {
return programs.find(isNotifier);
}
function filterCheckedDrivers(drivers) {
return drivers.filter(isDriverChecked);
}
function filterCheckedPrograms(programs) {
return programs.filter(isProgramChecked);
}
function filterProgramsPage(programs) {
return programs.filter(isVisible).filter(isNotDriverUtility);
}
function filterCheckedProgramsPage(programs) {
return filterProgramsPage(programs).filter(isProgramChecked);
}
function filterDriverUtilities(programs) {
return programs.filter(isVisible).filter(isDriverUtility);
}
function filterCheckedDriverUtilities(programs) {
return filterDriverUtilities(programs).filter(isDriverChecked);
}
function filterHarmfulPrograms(programs) {
return programs.filter(isHarmful);
}
function filterCheckedInstalledPrograms(programs) {
return programs.filter(isInstalledProgramChecked);
}
exports.__esModule = !0;
exports.countCheckedDrivers = countCheckedDrivers;
exports.countCheckedPrograms = countCheckedPrograms;
exports.isDriverChecked = isDriverChecked;
exports.isProgramChecked = isProgramChecked;
exports.isInstalledProgramChecked = isInstalledProgramChecked;
exports.isNotifier = isNotifier;
exports.isYandexBrowser = isYandexBrowser;
exports.isDriverUtility = isDriverUtility;
exports.isNotDriverUtility = isNotDriverUtility;
exports.isVisible = isVisible;
exports.isHarmful = isHarmful;
exports.getNotifier = getNotifier;
exports.filterCheckedDrivers = filterCheckedDrivers;
exports.filterCheckedPrograms = filterCheckedPrograms;
exports.filterProgramsPage = filterProgramsPage;
exports.filterCheckedProgramsPage = filterCheckedProgramsPage;
exports.filterDriverUtilities = filterDriverUtilities;
exports.filterCheckedDriverUtilities = filterCheckedDriverUtilities;
exports.filterHarmfulPrograms = filterHarmfulPrograms;
exports.filterCheckedInstalledPrograms = filterCheckedInstalledPrograms;
var DRIVERS_UTILITY_CATEGORY = "Drivers";
exports.DRIVERS_UTILITY_CATEGORY = DRIVERS_UTILITY_CATEGORY;
}, function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(107);
}, function(module, exports, __webpack_require__) {
"use strict";
function createDescriptor(type, props, children) {
var args = Array.prototype.slice.call(arguments, 1);
return type.apply(null, args);
}
var DOMPropertyOperations = __webpack_require__(108), EventPluginUtils = __webpack_require__(116), ReactChildren = __webpack_require__(119), ReactComponent = __webpack_require__(152), ReactCompositeComponent = __webpack_require__(159), ReactContext = __webpack_require__(144), ReactCurrentOwner = __webpack_require__(142), ReactDescriptor = __webpack_require__(143), ReactDOM = __webpack_require__(167), ReactDOMComponent = __webpack_require__(168), ReactDefaultInjection = __webpack_require__(178), ReactInstanceHandles = __webpack_require__(122), ReactMount = __webpack_require__(127), ReactMultiChild = __webpack_require__(174), ReactPerf = __webpack_require__(145), ReactPropTypes = __webpack_require__(223), ReactServerRendering = __webpack_require__(247), ReactTextComponent = __webpack_require__(124), onlyChild = __webpack_require__(249), warning = __webpack_require__(113);
ReactDefaultInjection.inject();
if (!0) var _warnedForDeprecation = !1;
var React = {
Children: {
map: ReactChildren.map,
forEach: ReactChildren.forEach,
count: ReactChildren.count,
only: onlyChild
},
DOM: ReactDOM,
PropTypes: ReactPropTypes,
initializeTouchEvents: function(shouldUseTouch) {
EventPluginUtils.useTouchEvents = shouldUseTouch;
},
createClass: ReactCompositeComponent.createClass,
createDescriptor: function() {
if (!0) {
!0 ? warning(_warnedForDeprecation, "React.createDescriptor is deprecated and will be removed in the next version of React. Use React.createElement instead.") : null;
_warnedForDeprecation = !0;
}
return createDescriptor.apply(this, arguments);
},
createElement: createDescriptor,
constructAndRenderComponent: ReactMount.constructAndRenderComponent,
constructAndRenderComponentByID: ReactMount.constructAndRenderComponentByID,
renderComponent: ReactPerf.measure("React", "renderComponent", ReactMount.renderComponent),
renderComponentToString: ReactServerRendering.renderComponentToString,
renderComponentToStaticMarkup: ReactServerRendering.renderComponentToStaticMarkup,
unmountComponentAtNode: ReactMount.unmountComponentAtNode,
isValidClass: ReactDescriptor.isValidFactory,
isValidComponent: ReactDescriptor.isValidDescriptor,
withContext: ReactContext.withContext,
__internals: {
Component: ReactComponent,
CurrentOwner: ReactCurrentOwner,
DOMComponent: ReactDOMComponent,
DOMPropertyOperations: DOMPropertyOperations,
InstanceHandles: ReactInstanceHandles,
Mount: ReactMount,
MultiChild: ReactMultiChild,
TextComponent: ReactTextComponent
}
};
if (!0) {
var ExecutionEnvironment = __webpack_require__(134);
if (ExecutionEnvironment.canUseDOM && window.top === window.self && navigator.userAgent.indexOf("Chrome") > -1) {
console.debug("Download the React DevTools for a better development experience: http://fb.me/react-devtools");
var expectedFeatures = [ Array.isArray, Array.prototype.every, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.map, Date.now, Function.prototype.bind, Object.keys, String.prototype.split, String.prototype.trim, Object.create, Object.freeze ];
for (var i in expectedFeatures) if (!expectedFeatures[i]) {
console.error("One or more ES5 shim/shams expected by React are not available: http://fb.me/react-warning-polyfills");
break;
}
}
}
React.version = "0.11.2";
module.exports = React;
}, function(module, exports, __webpack_require__) {
"use strict";
function shouldIgnoreValue(name, value) {
return null == value || DOMProperty.hasBooleanValue[name] && !value || DOMProperty.hasNumericValue[name] && isNaN(value) || DOMProperty.hasPositiveNumericValue[name] && 1 > value || DOMProperty.hasOverloadedBooleanValue[name] && value === !1;
}
var DOMProperty = __webpack_require__(109), escapeTextForBrowser = __webpack_require__(111), memoizeStringOnly = __webpack_require__(112), warning = __webpack_require__(113), processAttributeNameAndPrefix = memoizeStringOnly(function(name) {
return escapeTextForBrowser(name) + '="';
});
if (!0) var reactProps = {
children: !0,
dangerouslySetInnerHTML: !0,
key: !0,
ref: !0
}, warnedProperties = {}, warnUnknownProperty = function(name) {
if (!(reactProps.hasOwnProperty(name) && reactProps[name] || warnedProperties.hasOwnProperty(name) && warnedProperties[name])) {
warnedProperties[name] = !0;
var lowerCasedName = name.toLowerCase(), standardName = DOMProperty.isCustomAttribute(lowerCasedName) ? lowerCasedName : DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null;
!0 ? warning(null == standardName, "Unknown DOM property " + name + ". Did you mean " + standardName + "?") : null;
}
};
var DOMPropertyOperations = {
createMarkupForID: function(id) {
return processAttributeNameAndPrefix(DOMProperty.ID_ATTRIBUTE_NAME) + escapeTextForBrowser(id) + '"';
},
createMarkupForProperty: function(name, value) {
if (DOMProperty.isStandardName.hasOwnProperty(name) && DOMProperty.isStandardName[name]) {
if (shouldIgnoreValue(name, value)) return "";
var attributeName = DOMProperty.getAttributeName[name];
if (DOMProperty.hasBooleanValue[name] || DOMProperty.hasOverloadedBooleanValue[name] && value === !0) return escapeTextForBrowser(attributeName); else return processAttributeNameAndPrefix(attributeName) + escapeTextForBrowser(value) + '"';
} else if (DOMProperty.isCustomAttribute(name)) if (null == value) return ""; else return processAttributeNameAndPrefix(name) + escapeTextForBrowser(value) + '"'; else if (!0) warnUnknownProperty(name);
return null;
},
setValueForProperty: function(node, name, value) {
if (DOMProperty.isStandardName.hasOwnProperty(name) && DOMProperty.isStandardName[name]) {
var mutationMethod = DOMProperty.getMutationMethod[name];
if (mutationMethod) mutationMethod(node, value); else if (shouldIgnoreValue(name, value)) this.deleteValueForProperty(node, name); else if (DOMProperty.mustUseAttribute[name]) node.setAttribute(DOMProperty.getAttributeName[name], "" + value); else {
var propName = DOMProperty.getPropertyName[name];
if (!DOMProperty.hasSideEffects[name] || node[propName] !== value) node[propName] = value;
}
} else if (DOMProperty.isCustomAttribute(name)) if (null == value) node.removeAttribute(name); else node.setAttribute(name, "" + value); else if (!0) warnUnknownProperty(name);
},
deleteValueForProperty: function(node, name) {
if (DOMProperty.isStandardName.hasOwnProperty(name) && DOMProperty.isStandardName[name]) {
var mutationMethod = DOMProperty.getMutationMethod[name];
if (mutationMethod) mutationMethod(node, void 0); else if (DOMProperty.mustUseAttribute[name]) node.removeAttribute(DOMProperty.getAttributeName[name]); else {
var propName = DOMProperty.getPropertyName[name], defaultValue = DOMProperty.getDefaultValueForProperty(node.nodeName, propName);
if (!DOMProperty.hasSideEffects[name] || node[propName] !== defaultValue) node[propName] = defaultValue;
}
} else if (DOMProperty.isCustomAttribute(name)) node.removeAttribute(name); else if (!0) warnUnknownProperty(name);
}
};
module.exports = DOMPropertyOperations;
}, function(module, exports, __webpack_require__) {
"use strict";
var invariant = __webpack_require__(110), DOMPropertyInjection = {
MUST_USE_ATTRIBUTE: 1,
MUST_USE_PROPERTY: 2,
HAS_SIDE_EFFECTS: 4,
HAS_BOOLEAN_VALUE: 8,
HAS_NUMERIC_VALUE: 16,
HAS_POSITIVE_NUMERIC_VALUE: 48,
HAS_OVERLOADED_BOOLEAN_VALUE: 64,
injectDOMPropertyConfig: function(domPropertyConfig) {
var Properties = domPropertyConfig.Properties || {}, DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {}, DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {}, DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};
if (domPropertyConfig.isCustomAttribute) DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);
for (var propName in Properties) {
!0 ? invariant(!DOMProperty.isStandardName.hasOwnProperty(propName), "injectDOMPropertyConfig(...): You're trying to inject DOM property '%s' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.", propName) : invariant(!DOMProperty.isStandardName.hasOwnProperty(propName));
DOMProperty.isStandardName[propName] = !0;
var lowerCased = propName.toLowerCase();
DOMProperty.getPossibleStandardName[lowerCased] = propName;
if (DOMAttributeNames.hasOwnProperty(propName)) {
var attributeName = DOMAttributeNames[propName];
DOMProperty.getPossibleStandardName[attributeName] = propName;
DOMProperty.getAttributeName[propName] = attributeName;
} else DOMProperty.getAttributeName[propName] = lowerCased;
DOMProperty.getPropertyName[propName] = DOMPropertyNames.hasOwnProperty(propName) ? DOMPropertyNames[propName] : propName;
if (DOMMutationMethods.hasOwnProperty(propName)) DOMProperty.getMutationMethod[propName] = DOMMutationMethods[propName]; else DOMProperty.getMutationMethod[propName] = null;
var propConfig = Properties[propName];
DOMProperty.mustUseAttribute[propName] = propConfig & DOMPropertyInjection.MUST_USE_ATTRIBUTE;
DOMProperty.mustUseProperty[propName] = propConfig & DOMPropertyInjection.MUST_USE_PROPERTY;
DOMProperty.hasSideEffects[propName] = propConfig & DOMPropertyInjection.HAS_SIDE_EFFECTS;
DOMProperty.hasBooleanValue[propName] = propConfig & DOMPropertyInjection.HAS_BOOLEAN_VALUE;
DOMProperty.hasNumericValue[propName] = propConfig & DOMPropertyInjection.HAS_NUMERIC_VALUE;
DOMProperty.hasPositiveNumericValue[propName] = propConfig & DOMPropertyInjection.HAS_POSITIVE_NUMERIC_VALUE;
DOMProperty.hasOverloadedBooleanValue[propName] = propConfig & DOMPropertyInjection.HAS_OVERLOADED_BOOLEAN_VALUE;
!0 ? invariant(!DOMProperty.mustUseAttribute[propName] || !DOMProperty.mustUseProperty[propName], "DOMProperty: Cannot require using both attribute and property: %s", propName) : invariant(!DOMProperty.mustUseAttribute[propName] || !DOMProperty.mustUseProperty[propName]);
!0 ? invariant(DOMProperty.mustUseProperty[propName] || !DOMProperty.hasSideEffects[propName], "DOMProperty: Properties that have side effects must use property: %s", propName) : invariant(DOMProperty.mustUseProperty[propName] || !DOMProperty.hasSideEffects[propName]);
!0 ? invariant(!!DOMProperty.hasBooleanValue[propName] + !!DOMProperty.hasNumericValue[propName] + !!DOMProperty.hasOverloadedBooleanValue[propName] <= 1, "DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s", propName) : invariant(!!DOMProperty.hasBooleanValue[propName] + !!DOMProperty.hasNumericValue[propName] + !!DOMProperty.hasOverloadedBooleanValue[propName] <= 1);
}
}
}, defaultValueCache = {}, DOMProperty = {
ID_ATTRIBUTE_NAME: "data-reactid",
isStandardName: {},
getPossibleStandardName: {},
getAttributeName: {},
getPropertyName: {},
getMutationMethod: {},
mustUseAttribute: {},
mustUseProperty: {},
hasSideEffects: {},
hasBooleanValue: {},
hasNumericValue: {},
hasPositiveNumericValue: {},
hasOverloadedBooleanValue: {},
_isCustomAttributeFunctions: [],
isCustomAttribute: function(attributeName) {
for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {
var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];
if (isCustomAttributeFn(attributeName)) return !0;
}
return !1;
},
getDefaultValueForProperty: function(nodeName, prop) {
var testElement, nodeDefaults = defaultValueCache[nodeName];
if (!nodeDefaults) defaultValueCache[nodeName] = nodeDefaults = {};
if (!(prop in nodeDefaults)) {
testElement = document.createElement(nodeName);
nodeDefaults[prop] = testElement[prop];
}
return nodeDefaults[prop];
},
injection: DOMPropertyInjection
};
module.exports = DOMProperty;
}, function(module, exports, __webpack_require__) {
"use strict";
var invariant = function(condition, format, a, b, c, d, e, f) {
if (!0) if (void 0 === format) throw new Error("invariant requires an error message argument");
if (!condition) {
var error;
if (void 0 === format) error = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."); else {
var args = [ a, b, c, d, e, f ], argIndex = 0;
error = new Error("Invariant Violation: " + format.replace(/%s/g, function() {
return args[argIndex++];
}));
}
error.framesToPop = 1;
throw error;
}
};
module.exports = invariant;
}, function(module, exports) {
"use strict";
function escaper(match) {
return ESCAPE_LOOKUP[match];
}
function escapeTextForBrowser(text) {
return ("" + text).replace(ESCAPE_REGEX, escaper);
}
var ESCAPE_LOOKUP = {
"&": "&",
">": ">",
"<": "<",
'"': """,
"'": "'"
}, ESCAPE_REGEX = /[&><"']/g;
module.exports = escapeTextForBrowser;
}, function(module, exports) {
"use strict";
function memoizeStringOnly(callback) {
var cache = {};
return function(string) {
if (cache.hasOwnProperty(string)) return cache[string]; else return cache[string] = callback.call(this, string);
};
}
module.exports = memoizeStringOnly;
}, function(module, exports, __webpack_require__) {
"use strict";
var emptyFunction = __webpack_require__(114), warning = emptyFunction;
if (!0) warning = function(condition, format) {
var args = Array.prototype.slice.call(arguments, 2);
if (void 0 === format) throw new Error("`warning(condition, format, ...args)` requires a warning message argument");
if (!condition) {
var argIndex = 0;
console.warn("Warning: " + format.replace(/%s/g, function() {
return args[argIndex++];
}));
}
};
module.exports = warning;
}, function(module, exports, __webpack_require__) {
function makeEmptyFunction(arg) {
return function() {
return arg;
};
}
function emptyFunction() {}
var copyProperties = __webpack_require__(115);
copyProperties(emptyFunction, {
thatReturns: makeEmptyFunction,
thatReturnsFalse: makeEmptyFunction(!1),
thatReturnsTrue: makeEmptyFunction(!0),
thatReturnsNull: makeEmptyFunction(null),
thatReturnsThis: function() {
return this;
},
thatReturnsArgument: function(arg) {
return arg;
}
});
module.exports = emptyFunction;
}, function(module, exports, __webpack_require__) {
function copyProperties(obj, a, b, c, d, e, f) {
obj = obj || {};
if (!0) if (f) throw new Error("Too many arguments passed to copyProperties");
for (var v, args = [ a, b, c, d, e ], ii = 0; args[ii]; ) {
v = args[ii++];
for (var k in v) obj[k] = v[k];
if (v.hasOwnProperty && v.hasOwnProperty("toString") && "undefined" != typeof v.toString && obj.toString !== v.toString) obj.toString = v.toString;
}
return obj;
}
module.exports = copyProperties;
}, function(module, exports, __webpack_require__) {
"use strict";
function isEndish(topLevelType) {
return topLevelType === topLevelTypes.topMouseUp || topLevelType === topLevelTypes.topTouchEnd || topLevelType === topLevelTypes.topTouchCancel;
}
function isMoveish(topLevelType) {
return topLevelType === topLevelTypes.topMouseMove || topLevelType === topLevelTypes.topTouchMove;
}
function isStartish(topLevelType) {
return topLevelType === topLevelTypes.topMouseDown || topLevelType === topLevelTypes.topTouchStart;
}
function forEachEventDispatch(event, cb) {
var dispatchListeners = event._dispatchListeners, dispatchIDs = event._dispatchIDs;
if (!0) validateEventDispatches(event);
if (Array.isArray(dispatchListeners)) for (var i = 0; i < dispatchListeners.length && !event.isPropagationStopped(); i++) cb(event, dispatchListeners[i], dispatchIDs[i]); else if (dispatchListeners) cb(event, dispatchListeners, dispatchIDs);
}
function executeDispatch(event, listener, domID) {
event.currentTarget = injection.Mount.getNode(domID);
var returnValue = listener(event, domID);
event.currentTarget = null;
return returnValue;
}
function executeDispatchesInOrder(event, executeDispatch) {
forEachEventDispatch(event, executeDispatch);
event._dispatchListeners = null;
event._dispatchIDs = null;
}
function executeDispatchesInOrderStopAtTrueImpl(event) {
var dispatchListeners = event._dispatchListeners, dispatchIDs = event._dispatchIDs;
if (!0) validateEventDispatches(event);
if (Array.isArray(dispatchListeners)) {
for (var i = 0; i < dispatchListeners.length && !event.isPropagationStopped(); i++) if (dispatchListeners[i](event, dispatchIDs[i])) return dispatchIDs[i];
} else if (dispatchListeners) if (dispatchListeners(event, dispatchIDs)) return dispatchIDs;
return null;
}
function executeDispatchesInOrderStopAtTrue(event) {
var ret = executeDispatchesInOrderStopAtTrueImpl(event);
event._dispatchIDs = null;
event._dispatchListeners = null;
return ret;
}
function executeDirectDispatch(event) {
if (!0) validateEventDispatches(event);
var dispatchListener = event._dispatchListeners, dispatchID = event._dispatchIDs;
!0 ? invariant(!Array.isArray(dispatchListener), "executeDirectDispatch(...): Invalid `event`.") : invariant(!Array.isArray(dispatchListener));
var res = dispatchListener ? dispatchListener(event, dispatchID) : null;
event._dispatchListeners = null;
event._dispatchIDs = null;
return res;
}
function hasDispatches(event) {
return !!event._dispatchListeners;
}
var validateEventDispatches, EventConstants = __webpack_require__(117), invariant = __webpack_require__(110), injection = {
Mount: null,
injectMount: function(InjectedMount) {
injection.Mount = InjectedMount;
if (!0) !0 ? invariant(InjectedMount && InjectedMount.getNode, "EventPluginUtils.injection.injectMount(...): Injected Mount module is missing getNode.") : invariant(InjectedMount && InjectedMount.getNode);
}
}, topLevelTypes = EventConstants.topLevelTypes;
if (!0) validateEventDispatches = function(event) {
var dispatchListeners = event._dispatchListeners, dispatchIDs = event._dispatchIDs, listenersIsArr = Array.isArray(dispatchListeners), idsIsArr = Array.isArray(dispatchIDs), IDsLen = idsIsArr ? dispatchIDs.length : dispatchIDs ? 1 : 0, listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
!0 ? invariant(idsIsArr === listenersIsArr && IDsLen === listenersLen, "EventPluginUtils: Invalid `event`.") : invariant(idsIsArr === listenersIsArr && IDsLen === listenersLen);
};
var EventPluginUtils = {
isEndish: isEndish,
isMoveish: isMoveish,
isStartish: isStartish,
executeDirectDispatch: executeDirectDispatch,
executeDispatch: executeDispatch,
executeDispatchesInOrder: executeDispatchesInOrder,
executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,
hasDispatches: hasDispatches,
injection: injection,
useTouchEvents: !1
};
module.exports = EventPluginUtils;
}, function(module, exports, __webpack_require__) {
"use strict";
var keyMirror = __webpack_require__(118), PropagationPhases = keyMirror({
bubbled: null,
captured: null
}), topLevelTypes = keyMirror({
topBlur: null,
topChange: null,
topClick: null,
topCompositionEnd: null,
topCompositionStart: null,
topCompositionUpdate: null,
topContextMenu: null,
topCopy: null,
topCut: null,
topDoubleClick: null,
topDrag: null,
topDragEnd: null,
topDragEnter: null,
topDragExit: null,
topDragLeave: null,
topDragOver: null,
topDragStart: null,
topDrop: null,
topError: null,
topFocus: null,
topInput: null,
topKeyDown: null,
topKeyPress: null,
topKeyUp: null,
topLoad: null,
topMouseDown: null,
topMouseMove: null,
topMouseOut: null,
topMouseOver: null,
topMouseUp: null,
topPaste: null,
topReset: null,
topScroll: null,
topSelectionChange: null,
topSubmit: null,
topTextInput: null,
topTouchCancel: null,
topTouchEnd: null,
topTouchMove: null,
topTouchStart: null,
topWheel: null
}), EventConstants = {
topLevelTypes: topLevelTypes,
PropagationPhases: PropagationPhases
};
module.exports = EventConstants;
}, function(module, exports, __webpack_require__) {
"use strict";
var invariant = __webpack_require__(110), keyMirror = function(obj) {
var key, ret = {};
!0 ? invariant(obj instanceof Object && !Array.isArray(obj), "keyMirror(...): Argument must be an object.") : invariant(obj instanceof Object && !Array.isArray(obj));
for (key in obj) if (obj.hasOwnProperty(key)) ret[key] = key; else ;
return ret;
};
module.exports = keyMirror;
}, function(module, exports, __webpack_require__) {
"use strict";
function ForEachBookKeeping(forEachFunction, forEachContext) {
this.forEachFunction = forEachFunction;
this.forEachContext = forEachContext;
}
function forEachSingleChild(traverseContext, child, name, i) {
var forEachBookKeeping = traverseContext;
forEachBookKeeping.forEachFunction.call(forEachBookKeeping.forEachContext, child, i);
}
function forEachChildren(children, forEachFunc, forEachContext) {
if (null == children) return children;
var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext);
traverseAllChildren(children, forEachSingleChild, traverseContext);
ForEachBookKeeping.release(traverseContext);
}
function MapBookKeeping(mapResult, mapFunction, mapContext) {
this.mapResult = mapResult;
this.mapFunction = mapFunction;
this.mapContext = mapContext;
}
function mapSingleChildIntoContext(traverseContext, child, name, i) {
var mapBookKeeping = traverseContext, mapResult = mapBookKeeping.mapResult, keyUnique = !mapResult.hasOwnProperty(name);
!0 ? warning(keyUnique, "ReactChildren.map(...): Encountered two children with the same key, `%s`. Child keys must be unique; when two children share a key, only the first child will be used.", name) : null;
if (keyUnique) {
var mappedChild = mapBookKeeping.mapFunction.call(mapBookKeeping.mapContext, child, i);
mapResult[name] = mappedChild;
}
}
function mapChildren(children, func, context) {
if (null == children) return children;
var mapResult = {}, traverseContext = MapBookKeeping.getPooled(mapResult, func, context);
traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
MapBookKeeping.release(traverseContext);
return mapResult;
}
function forEachSingleChildDummy(traverseContext, child, name, i) {
return null;
}
function countChildren(children, context) {
return traverseAllChildren(children, forEachSingleChildDummy, null);
}
var PooledClass = __webpack_require__(120), traverseAllChildren = __webpack_require__(121), warning = __webpack_require__(113), twoArgumentPooler = PooledClass.twoArgumentPooler, threeArgumentPooler = PooledClass.threeArgumentPooler;
PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);
PooledClass.addPoolingTo(MapBookKeeping, threeArgumentPooler);
var ReactChildren = {
forEach: forEachChildren,
map: mapChildren,
count: countChildren
};
module.exports = ReactChildren;
}, function(module, exports, __webpack_require__) {
"use strict";
var invariant = __webpack_require__(110), oneArgumentPooler = function(copyFieldsFrom) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
Klass.call(instance, copyFieldsFrom);
return instance;
} else return new Klass(copyFieldsFrom);
}, twoArgumentPooler = function(a1, a2) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
Klass.call(instance, a1, a2);
return instance;
} else return new Klass(a1, a2);
}, threeArgumentPooler = function(a1, a2, a3) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
Klass.call(instance, a1, a2, a3);
return instance;
} else return new Klass(a1, a2, a3);
}, fiveArgumentPooler = function(a1, a2, a3, a4, a5) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
Klass.call(instance, a1, a2, a3, a4, a5);
return instance;
} else return new Klass(a1, a2, a3, a4, a5);
}, standardReleaser = function(instance) {
var Klass = this;
!0 ? invariant(instance instanceof Klass, "Trying to release an instance into a pool of a different type.") : invariant(instance instanceof Klass);
if (instance.destructor) instance.destructor();
if (Klass.instancePool.length < Klass.poolSize) Klass.instancePool.push(instance);
}, DEFAULT_POOL_SIZE = 10, DEFAULT_POOLER = oneArgumentPooler, addPoolingTo = function(CopyConstructor, pooler) {
var NewKlass = CopyConstructor;
NewKlass.instancePool = [];
NewKlass.getPooled = pooler || DEFAULT_POOLER;
if (!NewKlass.poolSize) NewKlass.poolSize = DEFAULT_POOL_SIZE;
NewKlass.release = standardReleaser;
return NewKlass;
}, PooledClass = {
addPoolingTo: addPoolingTo,
oneArgumentPooler: oneArgumentPooler,
twoArgumentPooler: twoArgumentPooler,
threeArgumentPooler: threeArgumentPooler,
fiveArgumentPooler: fiveArgumentPooler
};
module.exports = PooledClass;
}, function(module, exports, __webpack_require__) {
"use strict";
function userProvidedKeyEscaper(match) {
return userProvidedKeyEscaperLookup[match];
}
function getComponentKey(component, index) {
if (component && component.props && null != component.props.key) return wrapUserProvidedKey(component.props.key); else return index.toString(36);
}
function escapeUserProvidedKey(text) {
return ("" + text).replace(userProvidedKeyEscapeRegex, userProvidedKeyEscaper);
}
function wrapUserProvidedKey(key) {
return "$" + escapeUserProvidedKey(key);
}
function traverseAllChildren(children, callback, traverseContext) {
if (null == children) return 0; else return traverseAllChildrenImpl(children, "", 0, callback, traverseContext);
}
var ReactInstanceHandles = __webpack_require__(122), ReactTextComponent = __webpack_require__(124), invariant = __webpack_require__(110), SEPARATOR = ReactInstanceHandles.SEPARATOR, SUBSEPARATOR = ":", userProvidedKeyEscaperLookup = {
"=": "=0",
".": "=1",
":": "=2"
}, userProvidedKeyEscapeRegex = /[=.:]/g, traverseAllChildrenImpl = function(children, nameSoFar, indexSoFar, callback, traverseContext) {
var subtreeCount = 0;
if (Array.isArray(children)) for (var i = 0; i < children.length; i++) {
var child = children[i], nextName = nameSoFar + (nameSoFar ? SUBSEPARATOR : SEPARATOR) + getComponentKey(child, i), nextIndex = indexSoFar + subtreeCount;
subtreeCount += traverseAllChildrenImpl(child, nextName, nextIndex, callback, traverseContext);
} else {
var type = typeof children, isOnlyChild = "" === nameSoFar, storageName = isOnlyChild ? SEPARATOR + getComponentKey(children, 0) : nameSoFar;
if (null == children || "boolean" === type) {
callback(traverseContext, null, storageName, indexSoFar);
subtreeCount = 1;
} else if (children.type && children.type.prototype && children.type.prototype.mountComponentIntoNode) {
callback(traverseContext, children, storageName, indexSoFar);
subtreeCount = 1;
} else if ("object" === type) {
!0 ? invariant(!children || 1 !== children.nodeType, "traverseAllChildren(...): Encountered an invalid child; DOM elements are not valid children of React components.") : invariant(!children || 1 !== children.nodeType);
for (var key in children) if (children.hasOwnProperty(key)) subtreeCount += traverseAllChildrenImpl(children[key], nameSoFar + (nameSoFar ? SUBSEPARATOR : SEPARATOR) + wrapUserProvidedKey(key) + SUBSEPARATOR + getComponentKey(children[key], 0), indexSoFar + subtreeCount, callback, traverseContext);
} else if ("string" === type) {
var normalizedText = ReactTextComponent(children);
callback(traverseContext, normalizedText, storageName, indexSoFar);
subtreeCount += 1;
} else if ("number" === type) {
var normalizedNumber = ReactTextComponent("" + children);
callback(traverseContext, normalizedNumber, storageName, indexSoFar);
subtreeCount += 1;
}
}
return subtreeCount;
};
module.exports = traverseAllChildren;
}, function(module, exports, __webpack_require__) {
"use strict";
function getReactRootIDString(index) {
return SEPARATOR + index.toString(36);
}
function isBoundary(id, index) {
return id.charAt(index) === SEPARATOR || index === id.length;
}
function isValidID(id) {
return "" === id || id.charAt(0) === SEPARATOR && id.charAt(id.length - 1) !== SEPARATOR;
}
function isAncestorIDOf(ancestorID, descendantID) {
return 0 === descendantID.indexOf(ancestorID) && isBoundary(descendantID, ancestorID.length);
}
function getParentID(id) {
return id ? id.substr(0, id.lastIndexOf(SEPARATOR)) : "";
}
function getNextDescendantID(ancestorID, destinationID) {
!0 ? invariant(isValidID(ancestorID) && isValidID(destinationID), "getNextDescendantID(%s, %s): Received an invalid React DOM ID.", ancestorID, destinationID) : invariant(isValidID(ancestorID) && isValidID(destinationID));
!0 ? invariant(isAncestorIDOf(ancestorID, destinationID), "getNextDescendantID(...): React has made an invalid assumption about the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.", ancestorID, destinationID) : invariant(isAncestorIDOf(ancestorID, destinationID));
if (ancestorID === destinationID) return ancestorID;
for (var start = ancestorID.length + SEPARATOR_LENGTH, i = start; i < destinationID.length && !isBoundary(destinationID, i); i++) ;
return destinationID.substr(0, i);
}
function getFirstCommonAncestorID(oneID, twoID) {
var minLength = Math.min(oneID.length, twoID.length);
if (0 === minLength) return "";
for (var lastCommonMarkerIndex = 0, i = 0; minLength >= i; i++) if (isBoundary(oneID, i) && isBoundary(twoID, i)) lastCommonMarkerIndex = i; else if (oneID.charAt(i) !== twoID.charAt(i)) break;
var longestCommonID = oneID.substr(0, lastCommonMarkerIndex);
!0 ? invariant(isValidID(longestCommonID), "getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s", oneID, twoID, longestCommonID) : invariant(isValidID(longestCommonID));
return longestCommonID;
}
function traverseParentPath(start, stop, cb, arg, skipFirst, skipLast) {
start = start || "";
stop = stop || "";
!0 ? invariant(start !== stop, "traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.", start) : invariant(start !== stop);
var traverseUp = isAncestorIDOf(stop, start);
!0 ? invariant(traverseUp || isAncestorIDOf(start, stop), "traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do not have a parent path.", start, stop) : invariant(traverseUp || isAncestorIDOf(start, stop));
for (var depth = 0, traverse = traverseUp ? getParentID : getNextDescendantID, id = start; ;id = traverse(id, stop)) {
var ret;
if (!(skipFirst && id === start || skipLast && id === stop)) ret = cb(id, traverseUp, arg);
if (ret === !1 || id === stop) break;
!0 ? invariant(depth++ < MAX_TREE_DEPTH, "traverseParentPath(%s, %s, ...): Detected an infinite loop while traversing the React DOM ID tree. This may be due to malformed IDs: %s", start, stop) : invariant(depth++ < MAX_TREE_DEPTH);
}
}
var ReactRootIndex = __webpack_require__(123), invariant = __webpack_require__(110), SEPARATOR = ".", SEPARATOR_LENGTH = SEPARATOR.length, MAX_TREE_DEPTH = 100, ReactInstanceHandles = {
createReactRootID: function() {
return getReactRootIDString(ReactRootIndex.createReactRootIndex());
},
createReactID: function(rootID, name) {
return rootID + name;
},
getReactRootIDFromNodeID: function(id) {
if (id && id.charAt(0) === SEPARATOR && id.length > 1) {
var index = id.indexOf(SEPARATOR, 1);
return index > -1 ? id.substr(0, index) : id;
}
return null;
},
traverseEnterLeave: function(leaveID, enterID, cb, upArg, downArg) {
var ancestorID = getFirstCommonAncestorID(leaveID, enterID);
if (ancestorID !== leaveID) traverseParentPath(leaveID, ancestorID, cb, upArg, !1, !0);
if (ancestorID !== enterID) traverseParentPath(ancestorID, enterID, cb, downArg, !0, !1);
},
traverseTwoPhase: function(targetID, cb, arg) {
if (targetID) {
traverseParentPath("", targetID, cb, arg, !0, !1);
traverseParentPath(targetID, "", cb, arg, !1, !0);
}
},
traverseAncestors: function(targetID, cb, arg) {
traverseParentPath("", targetID, cb, arg, !0, !1);
},
_getFirstCommonAncestorID: getFirstCommonAncestorID,
_getNextDescendantID: getNextDescendantID,
isAncestorIDOf: isAncestorIDOf,
SEPARATOR: SEPARATOR
};
module.exports = ReactInstanceHandles;
}, function(module, exports) {
"use strict";
var ReactRootIndexInjection = {
injectCreateReactRootIndex: function(_createReactRootIndex) {
ReactRootIndex.createReactRootIndex = _createReactRootIndex;
}
}, ReactRootIndex = {
createReactRootIndex: null,
injection: ReactRootIndexInjection
};
module.exports = ReactRootIndex;
}, function(module, exports, __webpack_require__) {
"use strict";
var DOMPropertyOperations = __webpack_require__(108), ReactBrowserComponentMixin = __webpack_require__(125), ReactComponent = __webpack_require__(152), ReactDescriptor = __webpack_require__(143), escapeTextForBrowser = __webpack_require__(111), mixInto = __webpack_require__(157), ReactTextComponent = function(descriptor) {
this.construct(descriptor);
};
mixInto(ReactTextComponent, ReactComponent.Mixin);
mixInto(ReactTextComponent, ReactBrowserComponentMixin);
mixInto(ReactTextComponent, {
mountComponent: function(rootID, transaction, mountDepth) {
ReactComponent.Mixin.mountComponent.call(this, rootID, transaction, mountDepth);
var escapedText = escapeTextForBrowser(this.props);
if (transaction.renderToStaticMarkup) return escapedText; else return "<span " + DOMPropertyOperations.createMarkupForID(rootID) + ">" + escapedText + "</span>";
},
receiveComponent: function(nextComponent, transaction) {
var nextProps = nextComponent.props;
if (nextProps !== this.props) {
this.props = nextProps;
ReactComponent.BackendIDOperations.updateTextContentByID(this._rootNodeID, nextProps);
}
}
});
module.exports = ReactDescriptor.createFactory(ReactTextComponent);
}, function(module, exports, __webpack_require__) {
"use strict";
var ReactEmptyComponent = __webpack_require__(126), ReactMount = __webpack_require__(127), invariant = __webpack_require__(110), ReactBrowserComponentMixin = {
getDOMNode: function() {
!0 ? invariant(this.isMounted(), "getDOMNode(): A component must be mounted to have a DOM node.") : invariant(this.isMounted());
if (ReactEmptyComponent.isNullComponentID(this._rootNodeID)) return null; else return ReactMount.getNode(this._rootNodeID);
}
};
module.exports = ReactBrowserComponentMixin;
}, function(module, exports, __webpack_require__) {
"use strict";
function getEmptyComponent() {
!0 ? invariant(component, "Trying to return null from a render, but no null placeholder component was injected.") : invariant(component);
return component();
}
function registerNullComponentID(id) {
nullComponentIdsRegistry[id] = !0;
}
function deregisterNullComponentID(id) {
delete nullComponentIdsRegistry[id];
}
function isNullComponentID(id) {
return nullComponentIdsRegistry[id];
}
var component, invariant = __webpack_require__(110), nullComponentIdsRegistry = {}, ReactEmptyComponentInjection = {
injectEmptyComponent: function(emptyComponent) {
component = emptyComponent;
}
}, ReactEmptyComponent = {
deregisterNullComponentID: deregisterNullComponentID,
getEmptyComponent: getEmptyComponent,
injection: ReactEmptyComponentInjection,
isNullComponentID: isNullComponentID,
registerNullComponentID: registerNullComponentID
};
module.exports = ReactEmptyComponent;
}, function(module, exports, __webpack_require__) {
"use strict";
function getReactRootID(container) {
var rootElement = getReactRootElementInContainer(container);
return rootElement && ReactMount.getID(rootElement);
}
function getID(node) {
var id = internalGetID(node);
if (id) if (nodeCache.hasOwnProperty(id)) {
var cached = nodeCache[id];
if (cached !== node) {
!0 ? invariant(!isValid(cached, id), "ReactMount: Two valid but unequal nodes with the same `%s`: %s", ATTR_NAME, id) : invariant(!isValid(cached, id));
nodeCache[id] = node;
}
} else nodeCache[id] = node;
return id;
}
function internalGetID(node) {
return node && node.getAttribute && node.getAttribute(ATTR_NAME) || "";
}
function setID(node, id) {
var oldID = internalGetID(node);
if (oldID !== id) delete nodeCache[oldID];
node.setAttribute(ATTR_NAME, id);
nodeCache[id] = node;
}
function getNode(id) {
if (!nodeCache.hasOwnProperty(id) || !isValid(nodeCache[id], id)) nodeCache[id] = ReactMount.findReactNodeByID(id);
return nodeCache[id];
}
function isValid(node, id) {
if (node) {
!0 ? invariant(internalGetID(node) === id, "ReactMount: Unexpected modification of `%s`", ATTR_NAME) : invariant(internalGetID(node) === id);
var container = ReactMount.findReactContainerForID(id);
if (container && containsNode(container, node)) return !0;
}
return !1;
}
function purgeID(id) {
delete nodeCache[id];
}
function findDeepestCachedAncestorImpl(ancestorID) {
var ancestor = nodeCache[ancestorID];
if (ancestor && isValid(ancestor, ancestorID)) deepestNodeSoFar = ancestor; else return !1;
}
function findDeepestCachedAncestor(targetID) {
deepestNodeSoFar = null;
ReactInstanceHandles.traverseAncestors(targetID, findDeepestCachedAncestorImpl);
var foundNode = deepestNodeSoFar;
deepestNodeSoFar = null;
return foundNode;
}
var DOMProperty = __webpack_require__(109), ReactBrowserEventEmitter = __webpack_require__(128), ReactCurrentOwner = __webpack_require__(142), ReactDescriptor = __webpack_require__(143), ReactInstanceHandles = __webpack_require__(122), ReactPerf = __webpack_require__(145), containsNode = __webpack_require__(146), getReactRootElementInContainer = __webpack_require__(149), instantiateReactComponent = __webpack_require__(150), invariant = __webpack_require__(110), shouldUpdateReactComponent = __webpack_require__(151), warning = __webpack_require__(113), SEPARATOR = ReactInstanceHandles.SEPARATOR, ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME, nodeCache = {}, ELEMENT_NODE_TYPE = 1, DOC_NODE_TYPE = 9, instancesByReactRootID = {}, containersByReactRootID = {};
if (!0) var rootElementsByReactRootID = {};
var findComponentRootReusableArray = [], deepestNodeSoFar = null, ReactMount = {
_instancesByReactRootID: instancesByReactRootID,
scrollMonitor: function(container, renderCallback) {
renderCallback();
},
_updateRootComponent: function(prevComponent, nextComponent, container, callback) {
var nextProps = nextComponent.props;
ReactMount.scrollMonitor(container, function() {
prevComponent.replaceProps(nextProps, callback);
});
if (!0) rootElementsByReactRootID[getReactRootID(container)] = getReactRootElementInContainer(container);
return prevComponent;
},
_registerComponent: function(nextComponent, container) {
!0 ? invariant(container && (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE), "_registerComponent(...): Target container is not a DOM element.") : invariant(container && (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE));
ReactBrowserEventEmitter.ensureScrollValueMonitoring();
var reactRootID = ReactMount.registerContainer(container);
instancesByReactRootID[reactRootID] = nextComponent;
return reactRootID;
},
_renderNewRootComponent: ReactPerf.measure("ReactMount", "_renderNewRootComponent", function(nextComponent, container, shouldReuseMarkup) {
!0 ? warning(null == ReactCurrentOwner.current, "_renderNewRootComponent(): Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.") : null;
var componentInstance = instantiateReactComponent(nextComponent), reactRootID = ReactMount._registerComponent(componentInstance, container);
componentInstance.mountComponentIntoNode(reactRootID, container, shouldReuseMarkup);
if (!0) rootElementsByReactRootID[reactRootID] = getReactRootElementInContainer(container);
return componentInstance;
}),
renderComponent: function(nextDescriptor, container, callback) {
!0 ? invariant(ReactDescriptor.isValidDescriptor(nextDescriptor), "renderComponent(): Invalid component descriptor.%s", ReactDescriptor.isValidFactory(nextDescriptor) ? " Instead of passing a component class, make sure to instantiate it first by calling it with props." : "undefined" != typeof nextDescriptor.props ? " This may be caused by unintentionally loading two independent copies of React." : "") : invariant(ReactDescriptor.isValidDescriptor(nextDescriptor));
var prevComponent = instancesByReactRootID[getReactRootID(container)];
if (prevComponent) {
var prevDescriptor = prevComponent._descriptor;
if (shouldUpdateReactComponent(prevDescriptor, nextDescriptor)) return ReactMount._updateRootComponent(prevComponent, nextDescriptor, container, callback); else ReactMount.unmountComponentAtNode(container);
}
var reactRootElement = getReactRootElementInContainer(container), containerHasReactMarkup = reactRootElement && ReactMount.isRenderedByReact(reactRootElement), shouldReuseMarkup = containerHasReactMarkup && !prevComponent, component = ReactMount._renderNewRootComponent(nextDescriptor, container, shouldReuseMarkup);
callback && callback.call(component);
return component;
},
constructAndRenderComponent: function(constructor, props, container) {
return ReactMount.renderComponent(constructor(props), container);
},
constructAndRenderComponentByID: function(constructor, props, id) {
var domNode = document.getElementById(id);
!0 ? invariant(domNode, 'Tried to get element with id of "%s" but it is not present on the page.', id) : invariant(domNode);
return ReactMount.constructAndRenderComponent(constructor, props, domNode);
},
registerContainer: function(container) {
var reactRootID = getReactRootID(container);
if (reactRootID) reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(reactRootID);
if (!reactRootID) reactRootID = ReactInstanceHandles.createReactRootID();
containersByReactRootID[reactRootID] = container;
return reactRootID;
},
unmountComponentAtNode: function(container) {
!0 ? warning(null == ReactCurrentOwner.current, "unmountComponentAtNode(): Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.") : null;
var reactRootID = getReactRootID(container), component = instancesByReactRootID[reactRootID];
if (!component) return !1;
ReactMount.unmountComponentFromNode(component, container);
delete instancesByReactRootID[reactRootID];
delete containersByReactRootID[reactRootID];
if (!0) delete rootElementsByReactRootID[reactRootID];
return !0;
},
unmountComponentFromNode: function(instance, container) {
instance.unmountComponent();
if (container.nodeType === DOC_NODE_TYPE) container = container.documentElement;
for (;container.lastChild; ) container.removeChild(container.lastChild);
},
findReactContainerForID: function(id) {
var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(id), container = containersByReactRootID[reactRootID];
if (!0) {
var rootElement = rootElementsByReactRootID[reactRootID];
if (rootElement && rootElement.parentNode !== container) {
!0 ? invariant(internalGetID(rootElement) === reactRootID, "ReactMount: Root element ID differed from reactRootID.") : invariant(internalGetID(rootElement) === reactRootID);
var containerChild = container.firstChild;
if (containerChild && reactRootID === internalGetID(containerChild)) rootElementsByReactRootID[reactRootID] = containerChild; else console.warn("ReactMount: Root element has been removed from its original container. New container:", rootElement.parentNode);
}
}
return container;
},
findReactNodeByID: function(id) {
var reactRoot = ReactMount.findReactContainerForID(id);
return ReactMount.findComponentRoot(reactRoot, id);
},
isRenderedByReact: function(node) {
if (1 !== node.nodeType) return !1;
var id = ReactMount.getID(node);
return id ? id.charAt(0) === SEPARATOR : !1;
},
getFirstReactDOM: function(node) {
for (var current = node; current && current.parentNode !== current; ) {
if (ReactMount.isRenderedByReact(current)) return current;
current = current.parentNode;
}
return null;
},
findComponentRoot: function(ancestorNode, targetID) {
var firstChildren = findComponentRootReusableArray, childIndex = 0, deepestAncestor = findDeepestCachedAncestor(targetID) || ancestorNode;
firstChildren[0] = deepestAncestor.firstChild;
firstChildren.length = 1;
for (;childIndex < firstChildren.length; ) {
for (var targetChild, child = firstChildren[childIndex++]; child; ) {
var childID = ReactMount.getID(child);
if (childID) {
if (targetID === childID) targetChild = child; else if (ReactInstanceHandles.isAncestorIDOf(childID, targetID)) {
firstChildren.length = childIndex = 0;
firstChildren.push(child.firstChild);
}
} else firstChildren.push(child.firstChild);
child = child.nextSibling;
}
if (targetChild) {
firstChildren.length = 0;
return targetChild;
}
}
firstChildren.length = 0;
!0 ? invariant(!1, "findComponentRoot(..., %s): Unable to find element. This probably means the DOM was unexpectedly mutated (e.g., by the browser), usually due to forgetting a <tbody> when using tables, nesting <p> or <a> tags, or using non-SVG elements in an <svg> parent. Try inspecting the child nodes of the element with React ID `%s`.", targetID, ReactMount.getID(ancestorNode)) : invariant(!1);
},
getReactRootID: getReactRootID,
getID: getID,
setID: setID,
getNode: getNode,
purgeID: purgeID
};
module.exports = ReactMount;
}, function(module, exports, __webpack_require__) {
"use strict";
function getListeningForDocument(mountAt) {
if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {
mountAt[topListenersIDKey] = reactTopListenersCounter++;
alreadyListeningTo[mountAt[topListenersIDKey]] = {};
}
return alreadyListeningTo[mountAt[topListenersIDKey]];
}
var EventConstants = __webpack_require__(117), EventPluginHub = __webpack_require__(129), EventPluginRegistry = __webpack_require__(130), ReactEventEmitterMixin = __webpack_require__(136), ViewportMetrics = __webpack_require__(137), isEventSupported = __webpack_require__(133), merge = __webpack_require__(139), alreadyListeningTo = {}, isMonitoringScrollValue = !1, reactTopListenersCounter = 0, topEventMapping = {
topBlur: "blur",
topChange: "change",
topClick: "click",
topCompositionEnd: "compositionend",
topCompositionStart: "compositionstart",
topCompositionUpdate: "compositionupdate",
topContextMenu: "contextmenu",
topCopy: "copy",
topCut: "cut",
topDoubleClick: "dblclick",
topDrag: "drag",
topDragEnd: "dragend",
topDragEnter: "dragenter",
topDragExit: "dragexit",
topDragLeave: "dragleave",
topDragOver: "dragover",
topDragStart: "dragstart",
topDrop: "drop",
topFocus: "focus",
topInput: "input",
topKeyDown: "keydown",
topKeyPress: "keypress",
topKeyUp: "keyup",
topMouseDown: "mousedown",
topMouseMove: "mousemove",
topMouseOut: "mouseout",
topMouseOver: "mouseover",
topMouseUp: "mouseup",
topPaste: "paste",
topScroll: "scroll",
topSelectionChange: "selectionchange",
topTextInput: "textInput",
topTouchCancel: "touchcancel",
topTouchEnd: "touchend",
topTouchMove: "touchmove",
topTouchStart: "touchstart",
topWheel: "wheel"
}, topListenersIDKey = "_reactListenersID" + String(Math.random()).slice(2), ReactBrowserEventEmitter = merge(ReactEventEmitterMixin, {
ReactEventListener: null,
injection: {
injectReactEventListener: function(ReactEventListener) {
ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel);
ReactBrowserEventEmitter.ReactEventListener = ReactEventListener;
}
},
setEnabled: function(enabled) {
if (ReactBrowserEventEmitter.ReactEventListener) ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled);
},
isEnabled: function() {
return !(!ReactBrowserEventEmitter.ReactEventListener || !ReactBrowserEventEmitter.ReactEventListener.isEnabled());
},
listenTo: function(registrationName, contentDocumentHandle) {
for (var mountAt = contentDocumentHandle, isListening = getListeningForDocument(mountAt), dependencies = EventPluginRegistry.registrationNameDependencies[registrationName], topLevelTypes = EventConstants.topLevelTypes, i = 0, l = dependencies.length; l > i; i++) {
var dependency = dependencies[i];
if (!isListening.hasOwnProperty(dependency) || !isListening[dependency]) {
if (dependency === topLevelTypes.topWheel) if (isEventSupported("wheel")) ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, "wheel", mountAt); else if (isEventSupported("mousewheel")) ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, "mousewheel", mountAt); else ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, "DOMMouseScroll", mountAt); else if (dependency === topLevelTypes.topScroll) if (isEventSupported("scroll", !0)) ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topScroll, "scroll", mountAt); else ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topScroll, "scroll", ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE); else if (dependency === topLevelTypes.topFocus || dependency === topLevelTypes.topBlur) {
if (isEventSupported("focus", !0)) {
ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topFocus, "focus", mountAt);
ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topBlur, "blur", mountAt);
} else if (isEventSupported("focusin")) {
ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topFocus, "focusin", mountAt);
ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topBlur, "focusout", mountAt);
}
isListening[topLevelTypes.topBlur] = !0;
isListening[topLevelTypes.topFocus] = !0;
} else if (topEventMapping.hasOwnProperty(dependency)) ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt);
isListening[dependency] = !0;
}
}
},
trapBubbledEvent: function(topLevelType, handlerBaseName, handle) {
return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle);
},
trapCapturedEvent: function(topLevelType, handlerBaseName, handle) {
return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle);
},
ensureScrollValueMonitoring: function() {
if (!isMonitoringScrollValue) {
var refresh = ViewportMetrics.refreshScrollValues;
ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh);
isMonitoringScrollValue = !0;
}
},
eventNameDispatchConfigs: EventPluginHub.eventNameDispatchConfigs,
registrationNameModules: EventPluginHub.registrationNameModules,
putListener: EventPluginHub.putListener,
getListener: EventPluginHub.getListener,
deleteListener: EventPluginHub.deleteListener,
deleteAllListeners: EventPluginHub.deleteAllListeners
});
module.exports = ReactBrowserEventEmitter;
}, function(module, exports, __webpack_require__) {
"use strict";
function validateInstanceHandle() {
var invalid = !InstanceHandle || !InstanceHandle.traverseTwoPhase || !InstanceHandle.traverseEnterLeave;
if (invalid) throw new Error("InstanceHandle not injected before use!");
}
var EventPluginRegistry = __webpack_require__(130), EventPluginUtils = __webpack_require__(116), accumulate = __webpack_require__(131), forEachAccumulated = __webpack_require__(132), invariant = __webpack_require__(110), isEventSupported = __webpack_require__(133), monitorCodeUse = __webpack_require__(135), listenerBank = {}, eventQueue = null, executeDispatchesAndRelease = function(event) {
if (event) {
var executeDispatch = EventPluginUtils.executeDispatch, PluginModule = EventPluginRegistry.getPluginModuleForEvent(event);
if (PluginModule && PluginModule.executeDispatch) executeDispatch = PluginModule.executeDispatch;
EventPluginUtils.executeDispatchesInOrder(event, executeDispatch);
if (!event.isPersistent()) event.constructor.release(event);
}
}, InstanceHandle = null, EventPluginHub = {
injection: {
injectMount: EventPluginUtils.injection.injectMount,
injectInstanceHandle: function(InjectedInstanceHandle) {
InstanceHandle = InjectedInstanceHandle;
if (!0) validateInstanceHandle();
},
getInstanceHandle: function() {
if (!0) validateInstanceHandle();
return InstanceHandle;
},
injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder,
injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName
},
eventNameDispatchConfigs: EventPluginRegistry.eventNameDispatchConfigs,
registrationNameModules: EventPluginRegistry.registrationNameModules,
putListener: function(id, registrationName, listener) {
!0 ? invariant(!listener || "function" == typeof listener, "Expected %s listener to be a function, instead got type %s", registrationName, typeof listener) : invariant(!listener || "function" == typeof listener);
if (!0) if ("onScroll" === registrationName && !isEventSupported("scroll", !0)) {
monitorCodeUse("react_no_scroll_event");
console.warn("This browser doesn't support the `onScroll` event");
}
var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {});
bankForRegistrationName[id] = listener;
},
getListener: function(id, registrationName) {
var bankForRegistrationName = listenerBank[registrationName];
return bankForRegistrationName && bankForRegistrationName[id];
},
deleteListener: function(id, registrationName) {
var bankForRegistrationName = listenerBank[registrationName];
if (bankForRegistrationName) delete bankForRegistrationName[id];
},
deleteAllListeners: function(id) {
for (var registrationName in listenerBank) delete listenerBank[registrationName][id];
},
extractEvents: function(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent) {
for (var events, plugins = EventPluginRegistry.plugins, i = 0, l = plugins.length; l > i; i++) {
var possiblePlugin = plugins[i];
if (possiblePlugin) {
var extractedEvents = possiblePlugin.extractEvents(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent);
if (extractedEvents) events = accumulate(events, extractedEvents);
}
}
return events;
},
enqueueEvents: function(events) {
if (events) eventQueue = accumulate(eventQueue, events);
},
processEventQueue: function() {
var processingEventQueue = eventQueue;
eventQueue = null;
forEachAccumulated(processingEventQueue, executeDispatchesAndRelease);
!0 ? invariant(!eventQueue, "processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.") : invariant(!eventQueue);
},
__purge: function() {
listenerBank = {};
},
__getListenerBank: function() {
return listenerBank;
}
};
module.exports = EventPluginHub;
}, function(module, exports, __webpack_require__) {
"use strict";
function recomputePluginOrdering() {
if (EventPluginOrder) for (var pluginName in namesToPlugins) {
var PluginModule = namesToPlugins[pluginName], pluginIndex = EventPluginOrder.indexOf(pluginName);
!0 ? invariant(pluginIndex > -1, "EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.", pluginName) : invariant(pluginIndex > -1);
if (!EventPluginRegistry.plugins[pluginIndex]) {
!0 ? invariant(PluginModule.extractEvents, "EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.", pluginName) : invariant(PluginModule.extractEvents);
EventPluginRegistry.plugins[pluginIndex] = PluginModule;
var publishedEvents = PluginModule.eventTypes;
for (var eventName in publishedEvents) !0 ? invariant(publishEventForPlugin(publishedEvents[eventName], PluginModule, eventName), "EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.", eventName, pluginName) : invariant(publishEventForPlugin(publishedEvents[eventName], PluginModule, eventName));
} else ;
}
}
function publishEventForPlugin(dispatchConfig, PluginModule, eventName) {
!0 ? invariant(!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName), "EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.", eventName) : invariant(!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName));
EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;
var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
if (phasedRegistrationNames) {
for (var phaseName in phasedRegistrationNames) if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
var phasedRegistrationName = phasedRegistrationNames[phaseName];
publishRegistrationName(phasedRegistrationName, PluginModule, eventName);
}
return !0;
} else if (dispatchConfig.registrationName) {
publishRegistrationName(dispatchConfig.registrationName, PluginModule, eventName);
return !0;
}
return !1;
}
function publishRegistrationName(registrationName, PluginModule, eventName) {
!0 ? invariant(!EventPluginRegistry.registrationNameModules[registrationName], "EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.", registrationName) : invariant(!EventPluginRegistry.registrationNameModules[registrationName]);
EventPluginRegistry.registrationNameModules[registrationName] = PluginModule;
EventPluginRegistry.registrationNameDependencies[registrationName] = PluginModule.eventTypes[eventName].dependencies;
}
var invariant = __webpack_require__(110), EventPluginOrder = null, namesToPlugins = {}, EventPluginRegistry = {
plugins: [],
eventNameDispatchConfigs: {},
registrationNameModules: {},
registrationNameDependencies: {},
injectEventPluginOrder: function(InjectedEventPluginOrder) {
!0 ? invariant(!EventPluginOrder, "EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.") : invariant(!EventPluginOrder);
EventPluginOrder = Array.prototype.slice.call(InjectedEventPluginOrder);
recomputePluginOrdering();
},
injectEventPluginsByName: function(injectedNamesToPlugins) {
var isOrderingDirty = !1;
for (var pluginName in injectedNamesToPlugins) if (injectedNamesToPlugins.hasOwnProperty(pluginName)) {
var PluginModule = injectedNamesToPlugins[pluginName];
if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== PluginModule) {
!0 ? invariant(!namesToPlugins[pluginName], "EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.", pluginName) : invariant(!namesToPlugins[pluginName]);
namesToPlugins[pluginName] = PluginModule;
isOrderingDirty = !0;
}
} else ;
if (isOrderingDirty) recomputePluginOrdering();
},
getPluginModuleForEvent: function(event) {
var dispatchConfig = event.dispatchConfig;
if (dispatchConfig.registrationName) return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null;
for (var phase in dispatchConfig.phasedRegistrationNames) if (dispatchConfig.phasedRegistrationNames.hasOwnProperty(phase)) {
var PluginModule = EventPluginRegistry.registrationNameModules[dispatchConfig.phasedRegistrationNames[phase]];
if (PluginModule) return PluginModule;
} else ;
return null;
},
_resetEventPlugins: function() {
EventPluginOrder = null;
for (var pluginName in namesToPlugins) if (namesToPlugins.hasOwnProperty(pluginName)) delete namesToPlugins[pluginName];
EventPluginRegistry.plugins.length = 0;
var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs;
for (var eventName in eventNameDispatchConfigs) if (eventNameDispatchConfigs.hasOwnProperty(eventName)) delete eventNameDispatchConfigs[eventName];
var registrationNameModules = EventPluginRegistry.registrationNameModules;
for (var registrationName in registrationNameModules) if (registrationNameModules.hasOwnProperty(registrationName)) delete registrationNameModules[registrationName];
}
};
module.exports = EventPluginRegistry;
}, function(module, exports, __webpack_require__) {
"use strict";
function accumulate(current, next) {
!0 ? invariant(null != next, "accumulate(...): Accumulated items must be not be null or undefined.") : invariant(null != next);
if (null == current) return next; else {
var currentIsArray = Array.isArray(current), nextIsArray = Array.isArray(next);
if (currentIsArray) return current.concat(next); else if (nextIsArray) return [ current ].concat(next); else return [ current, next ];
}
}
var invariant = __webpack_require__(110);
module.exports = accumulate;
}, function(module, exports) {
"use strict";
var forEachAccumulated = function(arr, cb, scope) {
if (Array.isArray(arr)) arr.forEach(cb, scope); else if (arr) cb.call(scope, arr);
};
module.exports = forEachAccumulated;
}, function(module, exports, __webpack_require__) {
"use strict";
function isEventSupported(eventNameSuffix, capture) {
if (!ExecutionEnvironment.canUseDOM || capture && !("addEventListener" in document)) return !1;
var eventName = "on" + eventNameSuffix, isSupported = eventName in document;
if (!isSupported) {
var element = document.createElement("div");
element.setAttribute(eventName, "return;");
isSupported = "function" == typeof element[eventName];
}
if (!isSupported && useHasFeature && "wheel" === eventNameSuffix) isSupported = document.implementation.hasFeature("Events.wheel", "3.0");
return isSupported;
}
var useHasFeature, ExecutionEnvironment = __webpack_require__(134);
if (ExecutionEnvironment.canUseDOM) useHasFeature = document.implementation && document.implementation.hasFeature && document.implementation.hasFeature("", "") !== !0;
module.exports = isEventSupported;
}, function(module, exports) {
"use strict";
var canUseDOM = !("undefined" == typeof window || !window.document || !window.document.createElement), ExecutionEnvironment = {
canUseDOM: canUseDOM,
canUseWorkers: "undefined" != typeof Worker,
canUseEventListeners: canUseDOM && !(!window.addEventListener && !window.attachEvent),
canUseViewport: canUseDOM && !!window.screen,
isInWorker: !canUseDOM
};
module.exports = ExecutionEnvironment;
}, function(module, exports, __webpack_require__) {
"use strict";
function monitorCodeUse(eventName, data) {
!0 ? invariant(eventName && !/[^a-z0-9_]/.test(eventName), "You must provide an eventName using only the characters [a-z0-9_]") : invariant(eventName && !/[^a-z0-9_]/.test(eventName));
}
var invariant = __webpack_require__(110);
module.exports = monitorCodeUse;
}, function(module, exports, __webpack_require__) {
"use strict";
function runEventQueueInBatch(events) {
EventPluginHub.enqueueEvents(events);
EventPluginHub.processEventQueue();
}
var EventPluginHub = __webpack_require__(129), ReactEventEmitterMixin = {
handleTopLevel: function(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent) {
var events = EventPluginHub.extractEvents(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent);
runEventQueueInBatch(events);
}
};
module.exports = ReactEventEmitterMixin;
}, function(module, exports, __webpack_require__) {
"use strict";
var getUnboundedScrollPosition = __webpack_require__(138), ViewportMetrics = {
currentScrollLeft: 0,
currentScrollTop: 0,
refreshScrollValues: function() {
var scrollPosition = getUnboundedScrollPosition(window);
ViewportMetrics.currentScrollLeft = scrollPosition.x;
ViewportMetrics.currentScrollTop = scrollPosition.y;
}
};
module.exports = ViewportMetrics;
}, function(module, exports) {
"use strict";
function getUnboundedScrollPosition(scrollable) {
if (scrollable === window) return {
x: window.pageXOffset || document.documentElement.scrollLeft,
y: window.pageYOffset || document.documentElement.scrollTop
}; else return {
x: scrollable.scrollLeft,
y: scrollable.scrollTop
};
}
module.exports = getUnboundedScrollPosition;
}, function(module, exports, __webpack_require__) {
"use strict";
var mergeInto = __webpack_require__(140), merge = function(one, two) {
var result = {};
mergeInto(result, one);
mergeInto(result, two);
return result;
};
module.exports = merge;
}, function(module, exports, __webpack_require__) {
"use strict";
function mergeInto(one, two) {
checkMergeIntoObjectArg(one);
if (null != two) {
checkMergeObjectArg(two);
for (var key in two) if (two.hasOwnProperty(key)) one[key] = two[key]; else ;
}
}
var mergeHelpers = __webpack_require__(141), checkMergeObjectArg = mergeHelpers.checkMergeObjectArg, checkMergeIntoObjectArg = mergeHelpers.checkMergeIntoObjectArg;
module.exports = mergeInto;
}, function(module, exports, __webpack_require__) {
"use strict";
var invariant = __webpack_require__(110), keyMirror = __webpack_require__(118), MAX_MERGE_DEPTH = 36, isTerminal = function(o) {
return "object" != typeof o || null === o;
}, mergeHelpers = {
MAX_MERGE_DEPTH: MAX_MERGE_DEPTH,
isTerminal: isTerminal,
normalizeMergeArg: function(arg) {
return void 0 === arg || null === arg ? {} : arg;
},
checkMergeArrayArgs: function(one, two) {
!0 ? invariant(Array.isArray(one) && Array.isArray(two), "Tried to merge arrays, instead got %s and %s.", one, two) : invariant(Array.isArray(one) && Array.isArray(two));
},
checkMergeObjectArgs: function(one, two) {
mergeHelpers.checkMergeObjectArg(one);
mergeHelpers.checkMergeObjectArg(two);
},
checkMergeObjectArg: function(arg) {
!0 ? invariant(!isTerminal(arg) && !Array.isArray(arg), "Tried to merge an object, instead got %s.", arg) : invariant(!isTerminal(arg) && !Array.isArray(arg));
},
checkMergeIntoObjectArg: function(arg) {
!0 ? invariant(!(isTerminal(arg) && "function" != typeof arg || Array.isArray(arg)), "Tried to merge into an object, instead got %s.", arg) : invariant(!(isTerminal(arg) && "function" != typeof arg || Array.isArray(arg)));
},
checkMergeLevel: function(level) {
!0 ? invariant(MAX_MERGE_DEPTH > level, "Maximum deep merge depth exceeded. You may be attempting to merge circular structures in an unsupported way.") : invariant(MAX_MERGE_DEPTH > level);
},
checkArrayStrategy: function(strategy) {
!0 ? invariant(void 0 === strategy || strategy in mergeHelpers.ArrayStrategies, "You must provide an array strategy to deep merge functions to instruct the deep merge how to resolve merging two arrays.") : invariant(void 0 === strategy || strategy in mergeHelpers.ArrayStrategies);
},
ArrayStrategies: keyMirror({
Clobber: !0,
IndexByIndex: !0
})
};
module.exports = mergeHelpers;
}, function(module, exports) {
"use strict";
var ReactCurrentOwner = {
current: null
};
module.exports = ReactCurrentOwner;
}, function(module, exports, __webpack_require__) {
"use strict";
function defineWarningProperty(object, key) {
Object.defineProperty(object, key, {
configurable: !1,
enumerable: !0,
get: function() {
if (!this._store) return null; else return this._store[key];
},
set: function(value) {
!0 ? warning(!1, "Don't set the " + key + " property of the component. Mutate the existing props object instead.") : null;
this._store[key] = value;
}
});
}
function defineMutationMembrane(prototype) {
try {
var pseudoFrozenProperties = {
props: !0
};
for (var key in pseudoFrozenProperties) defineWarningProperty(prototype, key);
useMutationMembrane = !0;
} catch (x) {}
}
function proxyStaticMethods(target, source) {
if ("function" == typeof source) for (var key in source) if (source.hasOwnProperty(key)) {
var value = source[key];
if ("function" == typeof value) {
var bound = value.bind(source);
for (var k in value) if (value.hasOwnProperty(k)) bound[k] = value[k];
target[key] = bound;
} else target[key] = value;
}
}
var ReactContext = __webpack_require__(144), ReactCurrentOwner = __webpack_require__(142), merge = __webpack_require__(139), warning = __webpack_require__(113), useMutationMembrane = !1, ReactDescriptor = function() {};
if (!0) defineMutationMembrane(ReactDescriptor.prototype);
ReactDescriptor.createFactory = function(type) {
var descriptorPrototype = Object.create(ReactDescriptor.prototype), factory = function(props, children) {
if (null == props) props = {}; else if ("object" == typeof props) props = merge(props);
var childrenLength = arguments.length - 1;
if (1 === childrenLength) props.children = children; else if (childrenLength > 1) {
for (var childArray = Array(childrenLength), i = 0; childrenLength > i; i++) childArray[i] = arguments[i + 1];
props.children = childArray;
}
var descriptor = Object.create(descriptorPrototype);
descriptor._owner = ReactCurrentOwner.current;
descriptor._context = ReactContext.current;
if (!0) {
descriptor._store = {
validated: !1,
props: props
};
if (useMutationMembrane) {
Object.freeze(descriptor);
return descriptor;
}
}
descriptor.props = props;
return descriptor;
};
factory.prototype = descriptorPrototype;
factory.type = type;
descriptorPrototype.type = type;
proxyStaticMethods(factory, type);
descriptorPrototype.constructor = factory;
return factory;
};
ReactDescriptor.cloneAndReplaceProps = function(oldDescriptor, newProps) {
var newDescriptor = Object.create(oldDescriptor.constructor.prototype);
newDescriptor._owner = oldDescriptor._owner;
newDescriptor._context = oldDescriptor._context;
if (!0) {
newDescriptor._store = {
validated: oldDescriptor._store.validated,
props: newProps
};
if (useMutationMembrane) {
Object.freeze(newDescriptor);
return newDescriptor;
}
}
newDescriptor.props = newProps;
return newDescriptor;
};
ReactDescriptor.isValidFactory = function(factory) {
return "function" == typeof factory && factory.prototype instanceof ReactDescriptor;
};
ReactDescriptor.isValidDescriptor = function(object) {
return object instanceof ReactDescriptor;
};
module.exports = ReactDescriptor;
}, function(module, exports, __webpack_require__) {
"use strict";
var merge = __webpack_require__(139), ReactContext = {
current: {},
withContext: function(newContext, scopedCallback) {
var result, previousContext = ReactContext.current;
ReactContext.current = merge(previousContext, newContext);
try {
result = scopedCallback();
} finally {
ReactContext.current = previousContext;
}
return result;
}
};
module.exports = ReactContext;
}, function(module, exports, __webpack_require__) {
"use strict";
function _noMeasure(objName, fnName, func) {
return func;
}
var ReactPerf = {
enableMeasure: !1,
storedMeasure: _noMeasure,
measure: function(objName, fnName, func) {
if (!0) {
var measuredFunc = null;
return function() {
if (ReactPerf.enableMeasure) {
if (!measuredFunc) measuredFunc = ReactPerf.storedMeasure(objName, fnName, func);
return measuredFunc.apply(this, arguments);
}
return func.apply(this, arguments);
};
}
return func;
},
injection: {
injectMeasure: function(measure) {
ReactPerf.storedMeasure = measure;
}
}
};
module.exports = ReactPerf;
}, function(module, exports, __webpack_require__) {
function containsNode(outerNode, innerNode) {
if (!outerNode || !innerNode) return !1; else if (outerNode === innerNode) return !0; else if (isTextNode(outerNode)) return !1; else if (isTextNode(innerNode)) return containsNode(outerNode, innerNode.parentNode); else if (outerNode.contains) return outerNode.contains(innerNode); else if (outerNode.compareDocumentPosition) return !!(16 & outerNode.compareDocumentPosition(innerNode)); else return !1;
}
var isTextNode = __webpack_require__(147);
module.exports = containsNode;
}, function(module, exports, __webpack_require__) {
function isTextNode(object) {
return isNode(object) && 3 == object.nodeType;
}
var isNode = __webpack_require__(148);
module.exports = isTextNode;
}, function(module, exports) {
function isNode(object) {
return !(!object || !("function" == typeof Node ? object instanceof Node : "object" == typeof object && "number" == typeof object.nodeType && "string" == typeof object.nodeName));
}
module.exports = isNode;
}, function(module, exports) {
"use strict";
function getReactRootElementInContainer(container) {
if (!container) return null;
if (container.nodeType === DOC_NODE_TYPE) return container.documentElement; else return container.firstChild;
}
var DOC_NODE_TYPE = 9;
module.exports = getReactRootElementInContainer;
}, function(module, exports, __webpack_require__) {
"use strict";
function isValidComponentDescriptor(descriptor) {
return descriptor && "function" == typeof descriptor.type && "function" == typeof descriptor.type.prototype.mountComponent && "function" == typeof descriptor.type.prototype.receiveComponent;
}
function instantiateReactComponent(descriptor) {
!0 ? invariant(isValidComponentDescriptor(descriptor), "Only React Components are valid for mounting.") : invariant(isValidComponentDescriptor(descriptor));
return new descriptor.type(descriptor);
}
var invariant = __webpack_require__(110);
module.exports = instantiateReactComponent;
}, function(module, exports) {
"use strict";
function shouldUpdateReactComponent(prevDescriptor, nextDescriptor) {
if (prevDescriptor && nextDescriptor && prevDescriptor.type === nextDescriptor.type && (prevDescriptor.props && prevDescriptor.props.key) === (nextDescriptor.props && nextDescriptor.props.key) && prevDescriptor._owner === nextDescriptor._owner) return !0; else return !1;
}
module.exports = shouldUpdateReactComponent;
}, function(module, exports, __webpack_require__) {
"use strict";
var ReactDescriptor = __webpack_require__(143), ReactOwner = __webpack_require__(153), ReactUpdates = __webpack_require__(155), invariant = __webpack_require__(110), keyMirror = __webpack_require__(118), merge = __webpack_require__(139), ComponentLifeCycle = keyMirror({
MOUNTED: null,
UNMOUNTED: null
}), injected = !1, unmountIDFromEnvironment = null, mountImageIntoNode = null, ReactComponent = {
injection: {
injectEnvironment: function(ReactComponentEnvironment) {
!0 ? invariant(!injected, "ReactComponent: injectEnvironment() can only be called once.") : invariant(!injected);
mountImageIntoNode = ReactComponentEnvironment.mountImageIntoNode;
unmountIDFromEnvironment = ReactComponentEnvironment.unmountIDFromEnvironment;
ReactComponent.BackendIDOperations = ReactComponentEnvironment.BackendIDOperations;
injected = !0;
}
},
LifeCycle: ComponentLifeCycle,
BackendIDOperations: null,
Mixin: {
isMounted: function() {
return this._lifeCycleState === ComponentLifeCycle.MOUNTED;
},
setProps: function(partialProps, callback) {
var descriptor = this._pendingDescriptor || this._descriptor;
this.replaceProps(merge(descriptor.props, partialProps), callback);
},
replaceProps: function(props, callback) {
!0 ? invariant(this.isMounted(), "replaceProps(...): Can only update a mounted component.") : invariant(this.isMounted());
!0 ? invariant(0 === this._mountDepth, "replaceProps(...): You called `setProps` or `replaceProps` on a component with a parent. This is an anti-pattern since props will get reactively updated when rendered. Instead, change the owner's `render` method to pass the correct value as props to the component where it is created.") : invariant(0 === this._mountDepth);
this._pendingDescriptor = ReactDescriptor.cloneAndReplaceProps(this._pendingDescriptor || this._descriptor, props);
ReactUpdates.enqueueUpdate(this, callback);
},
_setPropsInternal: function(partialProps, callback) {
var descriptor = this._pendingDescriptor || this._descriptor;
this._pendingDescriptor = ReactDescriptor.cloneAndReplaceProps(descriptor, merge(descriptor.props, partialProps));
ReactUpdates.enqueueUpdate(this, callback);
},
construct: function(descriptor) {
this.props = descriptor.props;
this._owner = descriptor._owner;
this._lifeCycleState = ComponentLifeCycle.UNMOUNTED;
this._pendingCallbacks = null;
this._descriptor = descriptor;
this._pendingDescriptor = null;
},
mountComponent: function(rootID, transaction, mountDepth) {
!0 ? invariant(!this.isMounted(), "mountComponent(%s, ...): Can only mount an unmounted component. Make sure to avoid storing components between renders or reusing a single component instance in multiple places.", rootID) : invariant(!this.isMounted());
var props = this._descriptor.props;
if (null != props.ref) {
var owner = this._descriptor._owner;
ReactOwner.addComponentAsRefTo(this, props.ref, owner);
}
this._rootNodeID = rootID;
this._lifeCycleState = ComponentLifeCycle.MOUNTED;
this._mountDepth = mountDepth;
},
unmountComponent: function() {
!0 ? invariant(this.isMounted(), "unmountComponent(): Can only unmount a mounted component.") : invariant(this.isMounted());
var props = this.props;
if (null != props.ref) ReactOwner.removeComponentAsRefFrom(this, props.ref, this._owner);
unmountIDFromEnvironment(this._rootNodeID);
this._rootNodeID = null;
this._lifeCycleState = ComponentLifeCycle.UNMOUNTED;
},
receiveComponent: function(nextDescriptor, transaction) {
!0 ? invariant(this.isMounted(), "receiveComponent(...): Can only update a mounted component.") : invariant(this.isMounted());
this._pendingDescriptor = nextDescriptor;
this.performUpdateIfNecessary(transaction);
},
performUpdateIfNecessary: function(transaction) {
if (null != this._pendingDescriptor) {
var prevDescriptor = this._descriptor, nextDescriptor = this._pendingDescriptor;
this._descriptor = nextDescriptor;
this.props = nextDescriptor.props;
this._owner = nextDescriptor._owner;
this._pendingDescriptor = null;
this.updateComponent(transaction, prevDescriptor);
}
},
updateComponent: function(transaction, prevDescriptor) {
var nextDescriptor = this._descriptor;
if (nextDescriptor._owner !== prevDescriptor._owner || nextDescriptor.props.ref !== prevDescriptor.props.ref) {
if (null != prevDescriptor.props.ref) ReactOwner.removeComponentAsRefFrom(this, prevDescriptor.props.ref, prevDescriptor._owner);
if (null != nextDescriptor.props.ref) ReactOwner.addComponentAsRefTo(this, nextDescriptor.props.ref, nextDescriptor._owner);
}
},
mountComponentIntoNode: function(rootID, container, shouldReuseMarkup) {
var transaction = ReactUpdates.ReactReconcileTransaction.getPooled();
transaction.perform(this._mountComponentIntoNode, this, rootID, container, transaction, shouldReuseMarkup);
ReactUpdates.ReactReconcileTransaction.release(transaction);
},
_mountComponentIntoNode: function(rootID, container, transaction, shouldReuseMarkup) {
var markup = this.mountComponent(rootID, transaction, 0);
mountImageIntoNode(markup, container, shouldReuseMarkup);
},
isOwnedBy: function(owner) {
return this._owner === owner;
},
getSiblingByRef: function(ref) {
var owner = this._owner;
if (!owner || !owner.refs) return null; else return owner.refs[ref];
}
}
};
module.exports = ReactComponent;
}, function(module, exports, __webpack_require__) {
"use strict";
var emptyObject = __webpack_require__(154), invariant = __webpack_require__(110), ReactOwner = {
isValidOwner: function(object) {
return !(!object || "function" != typeof object.attachRef || "function" != typeof object.detachRef);
},
addComponentAsRefTo: function(component, ref, owner) {
!0 ? invariant(ReactOwner.isValidOwner(owner), "addComponentAsRefTo(...): Only a ReactOwner can have refs. This usually means that you're trying to add a ref to a component that doesn't have an owner (that is, was not created inside of another component's `render` method). Try rendering this component inside of a new top-level component which will hold the ref.") : invariant(ReactOwner.isValidOwner(owner));
owner.attachRef(ref, component);
},
removeComponentAsRefFrom: function(component, ref, owner) {
!0 ? invariant(ReactOwner.isValidOwner(owner), "removeComponentAsRefFrom(...): Only a ReactOwner can have refs. This usually means that you're trying to remove a ref to a component that doesn't have an owner (that is, was not created inside of another component's `render` method). Try rendering this component inside of a new top-level component which will hold the ref.") : invariant(ReactOwner.isValidOwner(owner));
if (owner.refs[ref] === component) owner.detachRef(ref);
},
Mixin: {
construct: function() {
this.refs = emptyObject;
},
attachRef: function(ref, component) {
!0 ? invariant(component.isOwnedBy(this), "attachRef(%s, ...): Only a component's owner can store a ref to it.", ref) : invariant(component.isOwnedBy(this));
var refs = this.refs === emptyObject ? this.refs = {} : this.refs;
refs[ref] = component;
},
detachRef: function(ref) {
delete this.refs[ref];
}
}
};
module.exports = ReactOwner;
}, function(module, exports, __webpack_require__) {
"use strict";
var emptyObject = {};
if (!0) Object.freeze(emptyObject);
module.exports = emptyObject;
}, function(module, exports, __webpack_require__) {
"use strict";
function ensureInjected() {
!0 ? invariant(ReactUpdates.ReactReconcileTransaction && batchingStrategy, "ReactUpdates: must inject a reconcile transaction class and batching strategy") : invariant(ReactUpdates.ReactReconcileTransaction && batchingStrategy);
}
function ReactUpdatesFlushTransaction() {
this.reinitializeTransaction();
this.dirtyComponentsLength = null;
this.callbackQueue = CallbackQueue.getPooled(null);
this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled();
}
function batchedUpdates(callback, a, b) {
ensureInjected();
batchingStrategy.batchedUpdates(callback, a, b);
}
function mountDepthComparator(c1, c2) {
return c1._mountDepth - c2._mountDepth;
}
function runBatchedUpdates(transaction) {
var len = transaction.dirtyComponentsLength;
!0 ? invariant(len === dirtyComponents.length, "Expected flush transaction's stored dirty-components length (%s) to match dirty-components array length (%s).", len, dirtyComponents.length) : invariant(len === dirtyComponents.length);
dirtyComponents.sort(mountDepthComparator);
for (var i = 0; len > i; i++) {
var component = dirtyComponents[i];
if (component.isMounted()) {
var callbacks = component._pendingCallbacks;
component._pendingCallbacks = null;
component.performUpdateIfNecessary(transaction.reconcileTransaction);
if (callbacks) for (var j = 0; j < callbacks.length; j++) transaction.callbackQueue.enqueue(callbacks[j], component);
}
}
}
function enqueueUpdate(component, callback) {
!0 ? invariant(!callback || "function" == typeof callback, "enqueueUpdate(...): You called `setProps`, `replaceProps`, `setState`, `replaceState`, or `forceUpdate` with a callback that isn't callable.") : invariant(!callback || "function" == typeof callback);
ensureInjected();
!0 ? warning(null == ReactCurrentOwner.current, "enqueueUpdate(): Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.") : null;
if (batchingStrategy.isBatchingUpdates) {
dirtyComponents.push(component);
if (callback) if (component._pendingCallbacks) component._pendingCallbacks.push(callback); else component._pendingCallbacks = [ callback ];
} else batchingStrategy.batchedUpdates(enqueueUpdate, component, callback);
}
var CallbackQueue = __webpack_require__(156), PooledClass = __webpack_require__(120), ReactCurrentOwner = __webpack_require__(142), ReactPerf = __webpack_require__(145), Transaction = __webpack_require__(158), invariant = __webpack_require__(110), mixInto = __webpack_require__(157), warning = __webpack_require__(113), dirtyComponents = [], batchingStrategy = null, NESTED_UPDATES = {
initialize: function() {
this.dirtyComponentsLength = dirtyComponents.length;
},
close: function() {
if (this.dirtyComponentsLength !== dirtyComponents.length) {
dirtyComponents.splice(0, this.dirtyComponentsLength);
flushBatchedUpdates();
} else dirtyComponents.length = 0;
}
}, UPDATE_QUEUEING = {
initialize: function() {
this.callbackQueue.reset();
},
close: function() {
this.callbackQueue.notifyAll();
}
}, TRANSACTION_WRAPPERS = [ NESTED_UPDATES, UPDATE_QUEUEING ];
mixInto(ReactUpdatesFlushTransaction, Transaction.Mixin);
mixInto(ReactUpdatesFlushTransaction, {
getTransactionWrappers: function() {
return TRANSACTION_WRAPPERS;
},
destructor: function() {
this.dirtyComponentsLength = null;
CallbackQueue.release(this.callbackQueue);
this.callbackQueue = null;
ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);
this.reconcileTransaction = null;
},
perform: function(method, scope, a) {
return Transaction.Mixin.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a);
}
});
PooledClass.addPoolingTo(ReactUpdatesFlushTransaction);
var flushBatchedUpdates = ReactPerf.measure("ReactUpdates", "flushBatchedUpdates", function() {
for (;dirtyComponents.length; ) {
var transaction = ReactUpdatesFlushTransaction.getPooled();
transaction.perform(runBatchedUpdates, null, transaction);
ReactUpdatesFlushTransaction.release(transaction);
}
}), ReactUpdatesInjection = {
injectReconcileTransaction: function(ReconcileTransaction) {
!0 ? invariant(ReconcileTransaction, "ReactUpdates: must provide a reconcile transaction class") : invariant(ReconcileTransaction);
ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;
},
injectBatchingStrategy: function(_batchingStrategy) {
!0 ? invariant(_batchingStrategy, "ReactUpdates: must provide a batching strategy") : invariant(_batchingStrategy);
!0 ? invariant("function" == typeof _batchingStrategy.batchedUpdates, "ReactUpdates: must provide a batchedUpdates() function") : invariant("function" == typeof _batchingStrategy.batchedUpdates);
!0 ? invariant("boolean" == typeof _batchingStrategy.isBatchingUpdates, "ReactUpdates: must provide an isBatchingUpdates boolean attribute") : invariant("boolean" == typeof _batchingStrategy.isBatchingUpdates);
batchingStrategy = _batchingStrategy;
}
}, ReactUpdates = {
ReactReconcileTransaction: null,
batchedUpdates: batchedUpdates,
enqueueUpdate: enqueueUpdate,
flushBatchedUpdates: flushBatchedUpdates,
injection: ReactUpdatesInjection
};
module.exports = ReactUpdates;
}, function(module, exports, __webpack_require__) {
"use strict";
function CallbackQueue() {
this._callbacks = null;
this._contexts = null;
}
var PooledClass = __webpack_require__(120), invariant = __webpack_require__(110), mixInto = __webpack_require__(157);
mixInto(CallbackQueue, {
enqueue: function(callback, context) {
this._callbacks = this._callbacks || [];
this._contexts = this._contexts || [];
this._callbacks.push(callback);
this._contexts.push(context);
},
notifyAll: function() {
var callbacks = this._callbacks, contexts = this._contexts;
if (callbacks) {
!0 ? invariant(callbacks.length === contexts.length, "Mismatched list of contexts in callback queue") : invariant(callbacks.length === contexts.length);
this._callbacks = null;
this._contexts = null;
for (var i = 0, l = callbacks.length; l > i; i++) callbacks[i].call(contexts[i]);
callbacks.length = 0;
contexts.length = 0;
}
},
reset: function() {
this._callbacks = null;
this._contexts = null;
},
destructor: function() {
this.reset();
}
});
PooledClass.addPoolingTo(CallbackQueue);
module.exports = CallbackQueue;
}, function(module, exports) {
"use strict";
var mixInto = function(constructor, methodBag) {
var methodName;
for (methodName in methodBag) if (methodBag.hasOwnProperty(methodName)) constructor.prototype[methodName] = methodBag[methodName]; else ;
};
module.exports = mixInto;
}, function(module, exports, __webpack_require__) {
"use strict";
var invariant = __webpack_require__(110), Mixin = {
reinitializeTransaction: function() {
this.transactionWrappers = this.getTransactionWrappers();
if (!this.wrapperInitData) this.wrapperInitData = []; else this.wrapperInitData.length = 0;
this._isInTransaction = !1;
},
_isInTransaction: !1,
getTransactionWrappers: null,
isInTransaction: function() {
return !!this._isInTransaction;
},
perform: function(method, scope, a, b, c, d, e, f) {
!0 ? invariant(!this.isInTransaction(), "Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.") : invariant(!this.isInTransaction());
var errorThrown, ret;
try {
this._isInTransaction = !0;
errorThrown = !0;
this.initializeAll(0);
ret = method.call(scope, a, b, c, d, e, f);
errorThrown = !1;
} finally {
try {
if (errorThrown) try {
this.closeAll(0);
} catch (err) {} else this.closeAll(0);
} finally {
this._isInTransaction = !1;
}
}
return ret;
},
initializeAll: function(startIndex) {
for (var transactionWrappers = this.transactionWrappers, i = startIndex; i < transactionWrappers.length; i++) {
var wrapper = transactionWrappers[i];
try {
this.wrapperInitData[i] = Transaction.OBSERVED_ERROR;
this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null;
} finally {
if (this.wrapperInitData[i] === Transaction.OBSERVED_ERROR) try {
this.initializeAll(i + 1);
} catch (err) {}
}
}
},
closeAll: function(startIndex) {
!0 ? invariant(this.isInTransaction(), "Transaction.closeAll(): Cannot close transaction when none are open.") : invariant(this.isInTransaction());
for (var transactionWrappers = this.transactionWrappers, i = startIndex; i < transactionWrappers.length; i++) {
var errorThrown, wrapper = transactionWrappers[i], initData = this.wrapperInitData[i];
try {
errorThrown = !0;
if (initData !== Transaction.OBSERVED_ERROR) wrapper.close && wrapper.close.call(this, initData);
errorThrown = !1;
} finally {
if (errorThrown) try {
this.closeAll(i + 1);
} catch (e) {}
}
}
this.wrapperInitData.length = 0;
}
}, Transaction = {
Mixin: Mixin,
OBSERVED_ERROR: {}
};
module.exports = Transaction;
}, function(module, exports, __webpack_require__) {
"use strict";
function getDeclarationErrorAddendum(component) {
var owner = component._owner || null;
if (owner && owner.constructor && owner.constructor.displayName) return " Check the render method of `" + owner.constructor.displayName + "`."; else return "";
}
function validateTypeDef(Constructor, typeDef, location) {
for (var propName in typeDef) if (typeDef.hasOwnProperty(propName)) !0 ? invariant("function" == typeof typeDef[propName], "%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.", Constructor.displayName || "ReactCompositeComponent", ReactPropTypeLocationNames[location], propName) : invariant("function" == typeof typeDef[propName]);
}
function validateMethodOverride(proto, name) {
var specPolicy = ReactCompositeComponentInterface.hasOwnProperty(name) ? ReactCompositeComponentInterface[name] : null;
if (ReactCompositeComponentMixin.hasOwnProperty(name)) !0 ? invariant(specPolicy === SpecPolicy.OVERRIDE_BASE, "ReactCompositeComponentInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.", name) : invariant(specPolicy === SpecPolicy.OVERRIDE_BASE);
if (proto.hasOwnProperty(name)) !0 ? invariant(specPolicy === SpecPolicy.DEFINE_MANY || specPolicy === SpecPolicy.DEFINE_MANY_MERGED, "ReactCompositeComponentInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.", name) : invariant(specPolicy === SpecPolicy.DEFINE_MANY || specPolicy === SpecPolicy.DEFINE_MANY_MERGED);
}
function validateLifeCycleOnReplaceState(instance) {
var compositeLifeCycleState = instance._compositeLifeCycleState;
!0 ? invariant(instance.isMounted() || compositeLifeCycleState === CompositeLifeCycle.MOUNTING, "replaceState(...): Can only update a mounted or mounting component.") : invariant(instance.isMounted() || compositeLifeCycleState === CompositeLifeCycle.MOUNTING);
!0 ? invariant(compositeLifeCycleState !== CompositeLifeCycle.RECEIVING_STATE, "replaceState(...): Cannot update during an existing state transition (such as within `render`). This could potentially cause an infinite loop so it is forbidden.") : invariant(compositeLifeCycleState !== CompositeLifeCycle.RECEIVING_STATE);
!0 ? invariant(compositeLifeCycleState !== CompositeLifeCycle.UNMOUNTING, "replaceState(...): Cannot update while unmounting component. This usually means you called setState() on an unmounted component.") : invariant(compositeLifeCycleState !== CompositeLifeCycle.UNMOUNTING);
}
function mixSpecIntoComponent(Constructor, spec) {
!0 ? invariant(!ReactDescriptor.isValidFactory(spec), "ReactCompositeComponent: You're attempting to use a component class as a mixin. Instead, just use a regular object.") : invariant(!ReactDescriptor.isValidFactory(spec));
!0 ? invariant(!ReactDescriptor.isValidDescriptor(spec), "ReactCompositeComponent: You're attempting to use a component as a mixin. Instead, just use a regular object.") : invariant(!ReactDescriptor.isValidDescriptor(spec));
var proto = Constructor.prototype;
for (var name in spec) {
var property = spec[name];
if (spec.hasOwnProperty(name)) {
validateMethodOverride(proto, name);
if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) RESERVED_SPEC_KEYS[name](Constructor, property); else {
var isCompositeComponentMethod = ReactCompositeComponentInterface.hasOwnProperty(name), isAlreadyDefined = proto.hasOwnProperty(name), markedDontBind = property && property.__reactDontBind, isFunction = "function" == typeof property, shouldAutoBind = isFunction && !isCompositeComponentMethod && !isAlreadyDefined && !markedDontBind;
if (shouldAutoBind) {
if (!proto.__reactAutoBindMap) proto.__reactAutoBindMap = {};
proto.__reactAutoBindMap[name] = property;
proto[name] = property;
} else if (isAlreadyDefined) {
var specPolicy = ReactCompositeComponentInterface[name];
!0 ? invariant(isCompositeComponentMethod && (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY), "ReactCompositeComponent: Unexpected spec policy %s for key %s when mixing in component specs.", specPolicy, name) : invariant(isCompositeComponentMethod && (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY));
if (specPolicy === SpecPolicy.DEFINE_MANY_MERGED) proto[name] = createMergedResultFunction(proto[name], property); else if (specPolicy === SpecPolicy.DEFINE_MANY) proto[name] = createChainedFunction(proto[name], property);
} else {
proto[name] = property;
if (!0) if ("function" == typeof property && spec.displayName) proto[name].displayName = spec.displayName + "_" + name;
}
}
} else ;
}
}
function mixStaticSpecIntoComponent(Constructor, statics) {
if (statics) for (var name in statics) {
var property = statics[name];
if (statics.hasOwnProperty(name)) {
var isInherited = name in Constructor, result = property;
if (isInherited) {
var existingProperty = Constructor[name], existingType = typeof existingProperty, propertyType = typeof property;
!0 ? invariant("function" === existingType && "function" === propertyType, "ReactCompositeComponent: You are attempting to define `%s` on your component more than once, but that is only supported for functions, which are chained together. This conflict may be due to a mixin.", name) : invariant("function" === existingType && "function" === propertyType);
result = createChainedFunction(existingProperty, property);
}
Constructor[name] = result;
} else ;
}
}
function mergeObjectsWithNoDuplicateKeys(one, two) {
!0 ? invariant(one && two && "object" == typeof one && "object" == typeof two, "mergeObjectsWithNoDuplicateKeys(): Cannot merge non-objects") : invariant(one && two && "object" == typeof one && "object" == typeof two);
mapObject(two, function(value, key) {
!0 ? invariant(void 0 === one[key], "mergeObjectsWithNoDuplicateKeys(): Tried to merge two objects with the same key: %s", key) : invariant(void 0 === one[key]);
one[key] = value;
});
return one;
}
function createMergedResultFunction(one, two) {
return function() {
var a = one.apply(this, arguments), b = two.apply(this, arguments);
if (null == a) return b; else if (null == b) return a;
return mergeObjectsWithNoDuplicateKeys(a, b);
};
}
function createChainedFunction(one, two) {
return function() {
one.apply(this, arguments);
two.apply(this, arguments);
};
}
var ReactComponent = __webpack_require__(152), ReactContext = __webpack_require__(144), ReactCurrentOwner = __webpack_require__(142), ReactDescriptor = __webpack_require__(143), ReactDescriptorValidator = __webpack_require__(160), ReactEmptyComponent = __webpack_require__(126), ReactErrorUtils = __webpack_require__(162), ReactOwner = __webpack_require__(153), ReactPerf = __webpack_require__(145), ReactPropTransferer = __webpack_require__(163), ReactPropTypeLocations = __webpack_require__(161), ReactPropTypeLocationNames = __webpack_require__(165), ReactUpdates = __webpack_require__(155), instantiateReactComponent = __webpack_require__(150), invariant = __webpack_require__(110), keyMirror = __webpack_require__(118), merge = __webpack_require__(139), mixInto = __webpack_require__(157), monitorCodeUse = __webpack_require__(135), mapObject = __webpack_require__(166), shouldUpdateReactComponent = __webpack_require__(151), warning = __webpack_require__(113), SpecPolicy = keyMirror({
DEFINE_ONCE: null,
DEFINE_MANY: null,
OVERRIDE_BASE: null,
DEFINE_MANY_MERGED: null
}), injectedMixins = [], ReactCompositeComponentInterface = {
mixins: SpecPolicy.DEFINE_MANY,
statics: SpecPolicy.DEFINE_MANY,
propTypes: SpecPolicy.DEFINE_MANY,
contextTypes: SpecPolicy.DEFINE_MANY,
childContextTypes: SpecPolicy.DEFINE_MANY,
getDefaultProps: SpecPolicy.DEFINE_MANY_MERGED,
getInitialState: SpecPolicy.DEFINE_MANY_MERGED,
getChildContext: SpecPolicy.DEFINE_MANY_MERGED,
render: SpecPolicy.DEFINE_ONCE,
componentWillMount: SpecPolicy.DEFINE_MANY,
componentDidMount: SpecPolicy.DEFINE_MANY,
componentWillReceiveProps: SpecPolicy.DEFINE_MANY,
shouldComponentUpdate: SpecPolicy.DEFINE_ONCE,
componentWillUpdate: SpecPolicy.DEFINE_MANY,
componentDidUpdate: SpecPolicy.DEFINE_MANY,
componentWillUnmount: SpecPolicy.DEFINE_MANY,
updateComponent: SpecPolicy.OVERRIDE_BASE
}, RESERVED_SPEC_KEYS = {
displayName: function(Constructor, displayName) {
Constructor.displayName = displayName;
},
mixins: function(Constructor, mixins) {
if (mixins) for (var i = 0; i < mixins.length; i++) mixSpecIntoComponent(Constructor, mixins[i]);
},
childContextTypes: function(Constructor, childContextTypes) {
validateTypeDef(Constructor, childContextTypes, ReactPropTypeLocations.childContext);
Constructor.childContextTypes = merge(Constructor.childContextTypes, childContextTypes);
},
contextTypes: function(Constructor, contextTypes) {
validateTypeDef(Constructor, contextTypes, ReactPropTypeLocations.context);
Constructor.contextTypes = merge(Constructor.contextTypes, contextTypes);
},
getDefaultProps: function(Constructor, getDefaultProps) {
if (Constructor.getDefaultProps) Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps); else Constructor.getDefaultProps = getDefaultProps;
},
propTypes: function(Constructor, propTypes) {
validateTypeDef(Constructor, propTypes, ReactPropTypeLocations.prop);
Constructor.propTypes = merge(Constructor.propTypes, propTypes);
},
statics: function(Constructor, statics) {
mixStaticSpecIntoComponent(Constructor, statics);
}
}, CompositeLifeCycle = keyMirror({
MOUNTING: null,
UNMOUNTING: null,
RECEIVING_PROPS: null,
RECEIVING_STATE: null
}), ReactCompositeComponentMixin = {
construct: function(descriptor) {
ReactComponent.Mixin.construct.apply(this, arguments);
ReactOwner.Mixin.construct.apply(this, arguments);
this.state = null;
this._pendingState = null;
this.context = null;
this._compositeLifeCycleState = null;
},
isMounted: function() {
return ReactComponent.Mixin.isMounted.call(this) && this._compositeLifeCycleState !== CompositeLifeCycle.MOUNTING;
},
mountComponent: ReactPerf.measure("ReactCompositeComponent", "mountComponent", function(rootID, transaction, mountDepth) {
ReactComponent.Mixin.mountComponent.call(this, rootID, transaction, mountDepth);
this._compositeLifeCycleState = CompositeLifeCycle.MOUNTING;
if (this.__reactAutoBindMap) this._bindAutoBindMethods();
this.context = this._processContext(this._descriptor._context);
this.props = this._processProps(this.props);
this.state = this.getInitialState ? this.getInitialState() : null;
!0 ? invariant("object" == typeof this.state && !Array.isArray(this.state), "%s.getInitialState(): must return an object or null", this.constructor.displayName || "ReactCompositeComponent") : invariant("object" == typeof this.state && !Array.isArray(this.state));
this._pendingState = null;
this._pendingForceUpdate = !1;
if (this.componentWillMount) {
this.componentWillMount();
if (this._pendingState) {
this.state = this._pendingState;
this._pendingState = null;
}
}
this._renderedComponent = instantiateReactComponent(this._renderValidatedComponent());
this._compositeLifeCycleState = null;
var markup = this._renderedComponent.mountComponent(rootID, transaction, mountDepth + 1);
if (this.componentDidMount) transaction.getReactMountReady().enqueue(this.componentDidMount, this);
return markup;
}),
unmountComponent: function() {
this._compositeLifeCycleState = CompositeLifeCycle.UNMOUNTING;
if (this.componentWillUnmount) this.componentWillUnmount();
this._compositeLifeCycleState = null;
this._renderedComponent.unmountComponent();
this._renderedComponent = null;
ReactComponent.Mixin.unmountComponent.call(this);
},
setState: function(partialState, callback) {
!0 ? invariant("object" == typeof partialState || null == partialState, "setState(...): takes an object of state variables to update.") : invariant("object" == typeof partialState || null == partialState);
if (!0) !0 ? warning(null != partialState, "setState(...): You passed an undefined or null state object; instead, use forceUpdate().") : null;
this.replaceState(merge(this._pendingState || this.state, partialState), callback);
},
replaceState: function(completeState, callback) {
validateLifeCycleOnReplaceState(this);
this._pendingState = completeState;
if (this._compositeLifeCycleState !== CompositeLifeCycle.MOUNTING) ReactUpdates.enqueueUpdate(this, callback);
},
_processContext: function(context) {
var maskedContext = null, contextTypes = this.constructor.contextTypes;
if (contextTypes) {
maskedContext = {};
for (var contextName in contextTypes) maskedContext[contextName] = context[contextName];
if (!0) this._checkPropTypes(contextTypes, maskedContext, ReactPropTypeLocations.context);
}
return maskedContext;
},
_processChildContext: function(currentContext) {
var childContext = this.getChildContext && this.getChildContext(), displayName = this.constructor.displayName || "ReactCompositeComponent";
if (childContext) {
!0 ? invariant("object" == typeof this.constructor.childContextTypes, "%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().", displayName) : invariant("object" == typeof this.constructor.childContextTypes);
if (!0) this._checkPropTypes(this.constructor.childContextTypes, childContext, ReactPropTypeLocations.childContext);
for (var name in childContext) !0 ? invariant(name in this.constructor.childContextTypes, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', displayName, name) : invariant(name in this.constructor.childContextTypes);
return merge(currentContext, childContext);
}
return currentContext;
},
_processProps: function(newProps) {
var props, defaultProps = this.constructor.defaultProps;
if (defaultProps) {
props = merge(newProps);
for (var propName in defaultProps) if ("undefined" == typeof props[propName]) props[propName] = defaultProps[propName];
} else props = newProps;
if (!0) {
var propTypes = this.constructor.propTypes;
if (propTypes) this._checkPropTypes(propTypes, props, ReactPropTypeLocations.prop);
}
return props;
},
_checkPropTypes: function(propTypes, props, location) {
var componentName = this.constructor.displayName;
for (var propName in propTypes) if (propTypes.hasOwnProperty(propName)) {
var error = propTypes[propName](props, propName, componentName, location);
if (error instanceof Error) {
var addendum = getDeclarationErrorAddendum(this);
!0 ? warning(!1, error.message + addendum) : null;
}
}
},
performUpdateIfNecessary: function(transaction) {
var compositeLifeCycleState = this._compositeLifeCycleState;
if (compositeLifeCycleState !== CompositeLifeCycle.MOUNTING && compositeLifeCycleState !== CompositeLifeCycle.RECEIVING_PROPS) if (null != this._pendingDescriptor || null != this._pendingState || this._pendingForceUpdate) {
var nextContext = this.context, nextProps = this.props, nextDescriptor = this._descriptor;
if (null != this._pendingDescriptor) {
nextDescriptor = this._pendingDescriptor;
nextContext = this._processContext(nextDescriptor._context);
nextProps = this._processProps(nextDescriptor.props);
this._pendingDescriptor = null;
this._compositeLifeCycleState = CompositeLifeCycle.RECEIVING_PROPS;
if (this.componentWillReceiveProps) this.componentWillReceiveProps(nextProps, nextContext);
}
this._compositeLifeCycleState = CompositeLifeCycle.RECEIVING_STATE;
var nextState = this._pendingState || this.state;
this._pendingState = null;
try {
var shouldUpdate = this._pendingForceUpdate || !this.shouldComponentUpdate || this.shouldComponentUpdate(nextProps, nextState, nextContext);
if (!0) if ("undefined" == typeof shouldUpdate) console.warn((this.constructor.displayName || "ReactCompositeComponent") + ".shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.");
if (shouldUpdate) {
this._pendingForceUpdate = !1;
this._performComponentUpdate(nextDescriptor, nextProps, nextState, nextContext, transaction);
} else {
this._descriptor = nextDescriptor;
this.props = nextProps;
this.state = nextState;
this.context = nextContext;
this._owner = nextDescriptor._owner;
}
} finally {
this._compositeLifeCycleState = null;
}
}
},
_performComponentUpdate: function(nextDescriptor, nextProps, nextState, nextContext, transaction) {
var prevDescriptor = this._descriptor, prevProps = this.props, prevState = this.state, prevContext = this.context;
if (this.componentWillUpdate) this.componentWillUpdate(nextProps, nextState, nextContext);
this._descriptor = nextDescriptor;
this.props = nextProps;
this.state = nextState;
this.context = nextContext;
this._owner = nextDescriptor._owner;
this.updateComponent(transaction, prevDescriptor);
if (this.componentDidUpdate) transaction.getReactMountReady().enqueue(this.componentDidUpdate.bind(this, prevProps, prevState, prevContext), this);
},
receiveComponent: function(nextDescriptor, transaction) {
if (nextDescriptor !== this._descriptor || null == nextDescriptor._owner) ReactComponent.Mixin.receiveComponent.call(this, nextDescriptor, transaction);
},
updateComponent: ReactPerf.measure("ReactCompositeComponent", "updateComponent", function(transaction, prevParentDescriptor) {
ReactComponent.Mixin.updateComponent.call(this, transaction, prevParentDescriptor);
var prevComponentInstance = this._renderedComponent, prevDescriptor = prevComponentInstance._descriptor, nextDescriptor = this._renderValidatedComponent();
if (shouldUpdateReactComponent(prevDescriptor, nextDescriptor)) prevComponentInstance.receiveComponent(nextDescriptor, transaction); else {
var thisID = this._rootNodeID, prevComponentID = prevComponentInstance._rootNodeID;
prevComponentInstance.unmountComponent();
this._renderedComponent = instantiateReactComponent(nextDescriptor);
var nextMarkup = this._renderedComponent.mountComponent(thisID, transaction, this._mountDepth + 1);
ReactComponent.BackendIDOperations.dangerouslyReplaceNodeWithMarkupByID(prevComponentID, nextMarkup);
}
}),
forceUpdate: function(callback) {
var compositeLifeCycleState = this._compositeLifeCycleState;
!0 ? invariant(this.isMounted() || compositeLifeCycleState === CompositeLifeCycle.MOUNTING, "forceUpdate(...): Can only force an update on mounted or mounting components.") : invariant(this.isMounted() || compositeLifeCycleState === CompositeLifeCycle.MOUNTING);
!0 ? invariant(compositeLifeCycleState !== CompositeLifeCycle.RECEIVING_STATE && compositeLifeCycleState !== CompositeLifeCycle.UNMOUNTING, "forceUpdate(...): Cannot force an update while unmounting component or during an existing state transition (such as within `render`).") : invariant(compositeLifeCycleState !== CompositeLifeCycle.RECEIVING_STATE && compositeLifeCycleState !== CompositeLifeCycle.UNMOUNTING);
this._pendingForceUpdate = !0;
ReactUpdates.enqueueUpdate(this, callback);
},
_renderValidatedComponent: ReactPerf.measure("ReactCompositeComponent", "_renderValidatedComponent", function() {
var renderedComponent, previousContext = ReactContext.current;
ReactContext.current = this._processChildContext(this._descriptor._context);
ReactCurrentOwner.current = this;
try {
renderedComponent = this.render();
if (null === renderedComponent || renderedComponent === !1) {
renderedComponent = ReactEmptyComponent.getEmptyComponent();
ReactEmptyComponent.registerNullComponentID(this._rootNodeID);
} else ReactEmptyComponent.deregisterNullComponentID(this._rootNodeID);
} finally {
ReactContext.current = previousContext;
ReactCurrentOwner.current = null;
}
!0 ? invariant(ReactDescriptor.isValidDescriptor(renderedComponent), "%s.render(): A valid ReactComponent must be returned. You may have returned undefined, an array or some other invalid object.", this.constructor.displayName || "ReactCompositeComponent") : invariant(ReactDescriptor.isValidDescriptor(renderedComponent));
return renderedComponent;
}),
_bindAutoBindMethods: function() {
for (var autoBindKey in this.__reactAutoBindMap) if (this.__reactAutoBindMap.hasOwnProperty(autoBindKey)) {
var method = this.__reactAutoBindMap[autoBindKey];
this[autoBindKey] = this._bindAutoBindMethod(ReactErrorUtils.guard(method, this.constructor.displayName + "." + autoBindKey));
} else ;
},
_bindAutoBindMethod: function(method) {
var component = this, boundMethod = function() {
return method.apply(component, arguments);
};
if (!0) {
boundMethod.__reactBoundContext = component;
boundMethod.__reactBoundMethod = method;
boundMethod.__reactBoundArguments = null;
var componentName = component.constructor.displayName, _bind = boundMethod.bind;
boundMethod.bind = function(newThis) {
var args = Array.prototype.slice.call(arguments, 1);
if (newThis !== component && null !== newThis) {
monitorCodeUse("react_bind_warning", {
component: componentName
});
console.warn("bind(): React component methods may only be bound to the component instance. See " + componentName);
} else if (!args.length) {
monitorCodeUse("react_bind_warning", {
component: componentName
});
console.warn("bind(): You are binding a component method to the component. React does this for you automatically in a high-performance way, so you can safely remove this call. See " + componentName);
return boundMethod;
}
var reboundMethod = _bind.apply(boundMethod, arguments);
reboundMethod.__reactBoundContext = component;
reboundMethod.__reactBoundMethod = method;
reboundMethod.__reactBoundArguments = args;
return reboundMethod;
};
}
return boundMethod;
}
}, ReactCompositeComponentBase = function() {};
mixInto(ReactCompositeComponentBase, ReactComponent.Mixin);
mixInto(ReactCompositeComponentBase, ReactOwner.Mixin);
mixInto(ReactCompositeComponentBase, ReactPropTransferer.Mixin);
mixInto(ReactCompositeComponentBase, ReactCompositeComponentMixin);
var ReactCompositeComponent = {
LifeCycle: CompositeLifeCycle,
Base: ReactCompositeComponentBase,
createClass: function(spec) {
var Constructor = function(props, owner) {
this.construct(props, owner);
};
Constructor.prototype = new ReactCompositeComponentBase();
Constructor.prototype.constructor = Constructor;
injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
mixSpecIntoComponent(Constructor, spec);
if (Constructor.getDefaultProps) Constructor.defaultProps = Constructor.getDefaultProps();
!0 ? invariant(Constructor.prototype.render, "createClass(...): Class specification must implement a `render` method.") : invariant(Constructor.prototype.render);
if (!0) if (Constructor.prototype.componentShouldUpdate) {
monitorCodeUse("react_component_should_update_warning", {
component: spec.displayName
});
console.warn((spec.displayName || "A component") + " has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.");
}
for (var methodName in ReactCompositeComponentInterface) if (!Constructor.prototype[methodName]) Constructor.prototype[methodName] = null;
var descriptorFactory = ReactDescriptor.createFactory(Constructor);
if (!0) return ReactDescriptorValidator.createFactory(descriptorFactory, Constructor.propTypes, Constructor.contextTypes); else return descriptorFactory;
},
injection: {
injectMixin: function(mixin) {
injectedMixins.push(mixin);
}
}
};
module.exports = ReactCompositeComponent;
}, function(module, exports, __webpack_require__) {
"use strict";
function getCurrentOwnerDisplayName() {
var current = ReactCurrentOwner.current;
return current && current.constructor.displayName || void 0;
}
function validateExplicitKey(component, parentType) {
if (!component._store.validated && null == component.props.key) {
component._store.validated = !0;
warnAndMonitorForKeyUse("react_key_warning", 'Each child in an array should have a unique "key" prop.', component, parentType);
}
}
function validatePropertyKey(name, component, parentType) {
if (NUMERIC_PROPERTY_REGEX.test(name)) warnAndMonitorForKeyUse("react_numeric_key_warning", "Child objects should have non-numeric keys so ordering is preserved.", component, parentType);
}
function warnAndMonitorForKeyUse(warningID, message, component, parentType) {
var ownerName = getCurrentOwnerDisplayName(), parentName = parentType.displayName, useName = ownerName || parentName, memoizer = ownerHasKeyUseWarning[warningID];
if (!memoizer.hasOwnProperty(useName)) {
memoizer[useName] = !0;
message += ownerName ? " Check the render method of " + ownerName + "." : " Check the renderComponent call using <" + parentName + ">.";
var childOwnerName = null;
if (component._owner && component._owner !== ReactCurrentOwner.current) {
childOwnerName = component._owner.constructor.displayName;
message += " It was passed a child from " + childOwnerName + ".";
}
message += " See http://fb.me/react-warning-keys for more information.";
monitorCodeUse(warningID, {
component: useName,
componentOwner: childOwnerName
});
console.warn(message);
}
}
function monitorUseOfObjectMap() {
var currentName = getCurrentOwnerDisplayName() || "";
if (!ownerHasMonitoredObjectMap.hasOwnProperty(currentName)) {
ownerHasMonitoredObjectMap[currentName] = !0;
monitorCodeUse("react_object_map_children");
}
}
function validateChildKeys(component, parentType) {
if (Array.isArray(component)) for (var i = 0; i < component.length; i++) {
var child = component[i];
if (ReactDescriptor.isValidDescriptor(child)) validateExplicitKey(child, parentType);
} else if (ReactDescriptor.isValidDescriptor(component)) component._store.validated = !0; else if (component && "object" == typeof component) {
monitorUseOfObjectMap();
for (var name in component) validatePropertyKey(name, component[name], parentType);
}
}
function checkPropTypes(componentName, propTypes, props, location) {
for (var propName in propTypes) if (propTypes.hasOwnProperty(propName)) {
var error;
try {
error = propTypes[propName](props, propName, componentName, location);
} catch (ex) {
error = ex;
}
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
loggedTypeFailures[error.message] = !0;
monitorCodeUse("react_failed_descriptor_type_check", {
message: error.message
});
}
}
}
var ReactDescriptor = __webpack_require__(143), ReactPropTypeLocations = __webpack_require__(161), ReactCurrentOwner = __webpack_require__(142), monitorCodeUse = __webpack_require__(135), ownerHasKeyUseWarning = {
react_key_warning: {},
react_numeric_key_warning: {}
}, ownerHasMonitoredObjectMap = {}, loggedTypeFailures = {}, NUMERIC_PROPERTY_REGEX = /^\d+$/, ReactDescriptorValidator = {
createFactory: function(factory, propTypes, contextTypes) {
var validatedFactory = function(props, children) {
for (var descriptor = factory.apply(this, arguments), i = 1; i < arguments.length; i++) validateChildKeys(arguments[i], descriptor.type);
var name = descriptor.type.displayName;
if (propTypes) checkPropTypes(name, propTypes, descriptor.props, ReactPropTypeLocations.prop);
if (contextTypes) checkPropTypes(name, contextTypes, descriptor._context, ReactPropTypeLocations.context);
return descriptor;
};
validatedFactory.prototype = factory.prototype;
validatedFactory.type = factory.type;
for (var key in factory) if (factory.hasOwnProperty(key)) validatedFactory[key] = factory[key];
return validatedFactory;
}
};
module.exports = ReactDescriptorValidator;
}, function(module, exports, __webpack_require__) {
"use strict";
var keyMirror = __webpack_require__(118), ReactPropTypeLocations = keyMirror({
prop: null,
context: null,
childContext: null
});
module.exports = ReactPropTypeLocations;
}, function(module, exports) {
"use strict";
var ReactErrorUtils = {
guard: function(func, name) {
return func;
}
};
module.exports = ReactErrorUtils;
}, function(module, exports, __webpack_require__) {
"use strict";
function createTransferStrategy(mergeStrategy) {
return function(props, key, value) {
if (!props.hasOwnProperty(key)) props[key] = value; else props[key] = mergeStrategy(props[key], value);
};
}
function transferInto(props, newProps) {
for (var thisKey in newProps) if (newProps.hasOwnProperty(thisKey)) {
var transferStrategy = TransferStrategies[thisKey];
if (transferStrategy && TransferStrategies.hasOwnProperty(thisKey)) transferStrategy(props, thisKey, newProps[thisKey]); else if (!props.hasOwnProperty(thisKey)) props[thisKey] = newProps[thisKey];
} else ;
return props;
}
var emptyFunction = __webpack_require__(114), invariant = __webpack_require__(110), joinClasses = __webpack_require__(164), merge = __webpack_require__(139), transferStrategyMerge = createTransferStrategy(function(a, b) {
return merge(b, a);
}), TransferStrategies = {
children: emptyFunction,
className: createTransferStrategy(joinClasses),
key: emptyFunction,
ref: emptyFunction,
style: transferStrategyMerge
}, ReactPropTransferer = {
TransferStrategies: TransferStrategies,
mergeProps: function(oldProps, newProps) {
return transferInto(merge(oldProps), newProps);
},
Mixin: {
transferPropsTo: function(descriptor) {
!0 ? invariant(descriptor._owner === this, "%s: You can't call transferPropsTo() on a component that you don't own, %s. This usually means you are calling transferPropsTo() on a component passed in as props or children.", this.constructor.displayName, descriptor.type.displayName) : invariant(descriptor._owner === this);
transferInto(descriptor.props, this.props);
return descriptor;
}
}
};
module.exports = ReactPropTransferer;
}, function(module, exports) {
"use strict";
function joinClasses(className) {
if (!className) className = "";
var nextClass, argLength = arguments.length;
if (argLength > 1) for (var ii = 1; argLength > ii; ii++) {
nextClass = arguments[ii];
nextClass && (className += " " + nextClass);
}
return className;
}
module.exports = joinClasses;
}, function(module, exports, __webpack_require__) {
"use strict";
var ReactPropTypeLocationNames = {};
if (!0) ReactPropTypeLocationNames = {
prop: "prop",
context: "context",
childContext: "child context"
};
module.exports = ReactPropTypeLocationNames;
}, function(module, exports) {
"use strict";
function mapObject(obj, func, context) {
if (!obj) return null;
var i = 0, ret = {};
for (var key in obj) if (obj.hasOwnProperty(key)) ret[key] = func.call(context, obj[key], key, i++);
return ret;
}
module.exports = mapObject;
}, function(module, exports, __webpack_require__) {
"use strict";
function createDOMComponentClass(omitClose, tag) {
var Constructor = function(descriptor) {
this.construct(descriptor);
};
Constructor.prototype = new ReactDOMComponent(tag, omitClose);
Constructor.prototype.constructor = Constructor;
Constructor.displayName = tag;
var ConvenienceConstructor = ReactDescriptor.createFactory(Constructor);
if (!0) return ReactDescriptorValidator.createFactory(ConvenienceConstructor); else return ConvenienceConstructor;
}
var ReactDescriptor = __webpack_require__(143), ReactDescriptorValidator = __webpack_require__(160), ReactDOMComponent = __webpack_require__(168), mergeInto = __webpack_require__(140), mapObject = __webpack_require__(166), ReactDOM = mapObject({
a: !1,
abbr: !1,
address: !1,
area: !0,
article: !1,
aside: !1,
audio: !1,
b: !1,
base: !0,
bdi: !1,
bdo: !1,
big: !1,
blockquote: !1,
body: !1,
br: !0,
button: !1,
canvas: !1,
caption: !1,
cite: !1,
code: !1,
col: !0,
colgroup: !1,
data: !1,
datalist: !1,
dd: !1,
del: !1,
details: !1,
dfn: !1,
dialog: !1,
div: !1,
dl: !1,
dt: !1,
em: !1,
embed: !0,
fieldset: !1,
figcaption: !1,
figure: !1,
footer: !1,
form: !1,
h1: !1,
h2: !1,
h3: !1,
h4: !1,
h5: !1,
h6: !1,
head: !1,
header: !1,
hr: !0,
html: !1,
i: !1,
iframe: !1,
img: !0,
input: !0,
ins: !1,
kbd: !1,
keygen: !0,
label: !1,
legend: !1,
li: !1,
link: !0,
main: !1,
map: !1,
mark: !1,
menu: !1,
menuitem: !1,
meta: !0,
meter: !1,
nav: !1,
noscript: !1,
object: !1,
ol: !1,
optgroup: !1,
option: !1,
output: !1,
p: !1,
param: !0,
picture: !1,
pre: !1,
progress: !1,
q: !1,
rp: !1,
rt: !1,
ruby: !1,
s: !1,
samp: !1,
script: !1,
section: !1,
select: !1,
small: !1,
source: !0,
span: !1,
strong: !1,
style: !1,
sub: !1,
summary: !1,
sup: !1,
table: !1,
tbody: !1,
td: !1,
textarea: !1,
tfoot: !1,
th: !1,
thead: !1,
time: !1,
title: !1,
tr: !1,
track: !0,
u: !1,
ul: !1,
"var": !1,
video: !1,
wbr: !0,
circle: !1,
defs: !1,
ellipse: !1,
g: !1,
line: !1,
linearGradient: !1,
mask: !1,
path: !1,
pattern: !1,
polygon: !1,
polyline: !1,
radialGradient: !1,
rect: !1,
stop: !1,
svg: !1,
text: !1,
tspan: !1
}, createDOMComponentClass), injection = {
injectComponentClasses: function(componentClasses) {
mergeInto(ReactDOM, componentClasses);
}
};
ReactDOM.injection = injection;
module.exports = ReactDOM;
}, function(module, exports, __webpack_require__) {
"use strict";
function assertValidProps(props) {
if (props) {
!0 ? invariant(null == props.children || null == props.dangerouslySetInnerHTML, "Can only set one of `children` or `props.dangerouslySetInnerHTML`.") : invariant(null == props.children || null == props.dangerouslySetInnerHTML);
!0 ? invariant(null == props.style || "object" == typeof props.style, "The `style` prop expects a mapping from style properties to values, not a string.") : invariant(null == props.style || "object" == typeof props.style);
}
}
function putListener(id, registrationName, listener, transaction) {
var container = ReactMount.findReactContainerForID(id);
if (container) {
var doc = container.nodeType === ELEMENT_NODE_TYPE ? container.ownerDocument : container;
listenTo(registrationName, doc);
}
transaction.getPutListenerQueue().enqueuePutListener(id, registrationName, listener);
}
function ReactDOMComponent(tag, omitClose) {
this._tagOpen = "<" + tag;
this._tagClose = omitClose ? "" : "</" + tag + ">";
this.tagName = tag.toUpperCase();
}
var CSSPropertyOperations = __webpack_require__(169), DOMProperty = __webpack_require__(109), DOMPropertyOperations = __webpack_require__(108), ReactBrowserComponentMixin = __webpack_require__(125), ReactComponent = __webpack_require__(152), ReactBrowserEventEmitter = __webpack_require__(128), ReactMount = __webpack_require__(127), ReactMultiChild = __webpack_require__(174), ReactPerf = __webpack_require__(145), escapeTextForBrowser = __webpack_require__(111), invariant = __webpack_require__(110), keyOf = __webpack_require__(177), merge = __webpack_require__(139), mixInto = __webpack_require__(157), deleteListener = ReactBrowserEventEmitter.deleteListener, listenTo = ReactBrowserEventEmitter.listenTo, registrationNameModules = ReactBrowserEventEmitter.registrationNameModules, CONTENT_TYPES = {
string: !0,
number: !0
}, STYLE = keyOf({
style: null
}), ELEMENT_NODE_TYPE = 1;
ReactDOMComponent.Mixin = {
mountComponent: ReactPerf.measure("ReactDOMComponent", "mountComponent", function(rootID, transaction, mountDepth) {
ReactComponent.Mixin.mountComponent.call(this, rootID, transaction, mountDepth);
assertValidProps(this.props);
return this._createOpenTagMarkupAndPutListeners(transaction) + this._createContentMarkup(transaction) + this._tagClose;
}),
_createOpenTagMarkupAndPutListeners: function(transaction) {
var props = this.props, ret = this._tagOpen;
for (var propKey in props) if (props.hasOwnProperty(propKey)) {
var propValue = props[propKey];
if (null != propValue) if (registrationNameModules.hasOwnProperty(propKey)) putListener(this._rootNodeID, propKey, propValue, transaction); else {
if (propKey === STYLE) {
if (propValue) propValue = props.style = merge(props.style);
propValue = CSSPropertyOperations.createMarkupForStyles(propValue);
}
var markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue);
if (markup) ret += " " + markup;
} else ;
} else ;
if (transaction.renderToStaticMarkup) return ret + ">";
var markupForID = DOMPropertyOperations.createMarkupForID(this._rootNodeID);
return ret + " " + markupForID + ">";
},
_createContentMarkup: function(transaction) {
var innerHTML = this.props.dangerouslySetInnerHTML;
if (null != innerHTML) {
if (null != innerHTML.__html) return innerHTML.__html;
} else {
var contentToUse = CONTENT_TYPES[typeof this.props.children] ? this.props.children : null, childrenToUse = null != contentToUse ? null : this.props.children;
if (null != contentToUse) return escapeTextForBrowser(contentToUse); else if (null != childrenToUse) {
var mountImages = this.mountChildren(childrenToUse, transaction);
return mountImages.join("");
}
}
return "";
},
receiveComponent: function(nextDescriptor, transaction) {
if (nextDescriptor !== this._descriptor || null == nextDescriptor._owner) ReactComponent.Mixin.receiveComponent.call(this, nextDescriptor, transaction);
},
updateComponent: ReactPerf.measure("ReactDOMComponent", "updateComponent", function(transaction, prevDescriptor) {
assertValidProps(this._descriptor.props);
ReactComponent.Mixin.updateComponent.call(this, transaction, prevDescriptor);
this._updateDOMProperties(prevDescriptor.props, transaction);
this._updateDOMChildren(prevDescriptor.props, transaction);
}),
_updateDOMProperties: function(lastProps, transaction) {
var propKey, styleName, styleUpdates, nextProps = this.props;
for (propKey in lastProps) if (!nextProps.hasOwnProperty(propKey) && lastProps.hasOwnProperty(propKey)) {
if (propKey === STYLE) {
var lastStyle = lastProps[propKey];
for (styleName in lastStyle) if (lastStyle.hasOwnProperty(styleName)) {
styleUpdates = styleUpdates || {};
styleUpdates[styleName] = "";
}
} else if (registrationNameModules.hasOwnProperty(propKey)) deleteListener(this._rootNodeID, propKey); else if (DOMProperty.isStandardName[propKey] || DOMProperty.isCustomAttribute(propKey)) ReactComponent.BackendIDOperations.deletePropertyByID(this._rootNodeID, propKey);
} else ;
for (propKey in nextProps) {
var nextProp = nextProps[propKey], lastProp = lastProps[propKey];
if (nextProps.hasOwnProperty(propKey) && nextProp !== lastProp) {
if (propKey === STYLE) {
if (nextProp) nextProp = nextProps.style = merge(nextProp);
if (lastProp) {
for (styleName in lastProp) if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
styleUpdates = styleUpdates || {};
styleUpdates[styleName] = "";
}
for (styleName in nextProp) if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
styleUpdates = styleUpdates || {};
styleUpdates[styleName] = nextProp[styleName];
}
} else styleUpdates = nextProp;
} else if (registrationNameModules.hasOwnProperty(propKey)) putListener(this._rootNodeID, propKey, nextProp, transaction); else if (DOMProperty.isStandardName[propKey] || DOMProperty.isCustomAttribute(propKey)) ReactComponent.BackendIDOperations.updatePropertyByID(this._rootNodeID, propKey, nextProp);
} else ;
}
if (styleUpdates) ReactComponent.BackendIDOperations.updateStylesByID(this._rootNodeID, styleUpdates);
},
_updateDOMChildren: function(lastProps, transaction) {
var nextProps = this.props, lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null, nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null, lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html, nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html, lastChildren = null != lastContent ? null : lastProps.children, nextChildren = null != nextContent ? null : nextProps.children, lastHasContentOrHtml = null != lastContent || null != lastHtml, nextHasContentOrHtml = null != nextContent || null != nextHtml;
if (null != lastChildren && null == nextChildren) this.updateChildren(null, transaction); else if (lastHasContentOrHtml && !nextHasContentOrHtml) this.updateTextContent("");
if (null != nextContent) {
if (lastContent !== nextContent) this.updateTextContent("" + nextContent);
} else if (null != nextHtml) {
if (lastHtml !== nextHtml) ReactComponent.BackendIDOperations.updateInnerHTMLByID(this._rootNodeID, nextHtml);
} else if (null != nextChildren) this.updateChildren(nextChildren, transaction);
},
unmountComponent: function() {
this.unmountChildren();
ReactBrowserEventEmitter.deleteAllListeners(this._rootNodeID);
ReactComponent.Mixin.unmountComponent.call(this);
}
};
mixInto(ReactDOMComponent, ReactComponent.Mixin);
mixInto(ReactDOMComponent, ReactDOMComponent.Mixin);
mixInto(ReactDOMComponent, ReactMultiChild.Mixin);
mixInto(ReactDOMComponent, ReactBrowserComponentMixin);
module.exports = ReactDOMComponent;
}, function(module, exports, __webpack_require__) {
"use strict";
var CSSProperty = __webpack_require__(170), dangerousStyleValue = __webpack_require__(171), hyphenateStyleName = __webpack_require__(172), memoizeStringOnly = __webpack_require__(112), processStyleName = memoizeStringOnly(function(styleName) {
return hyphenateStyleName(styleName);
}), CSSPropertyOperations = {
createMarkupForStyles: function(styles) {
var serialized = "";
for (var styleName in styles) if (styles.hasOwnProperty(styleName)) {
var styleValue = styles[styleName];
if (null != styleValue) {
serialized += processStyleName(styleName) + ":";
serialized += dangerousStyleValue(styleName, styleValue) + ";";
}
} else ;
return serialized || null;
},
setValueForStyles: function(node, styles) {
var style = node.style;
for (var styleName in styles) if (styles.hasOwnProperty(styleName)) {
var styleValue = dangerousStyleValue(styleName, styles[styleName]);
if (styleValue) style[styleName] = styleValue; else {
var expansion = CSSProperty.shorthandPropertyExpansions[styleName];
if (expansion) for (var individualStyleName in expansion) style[individualStyleName] = ""; else style[styleName] = "";
}
} else ;
}
};
module.exports = CSSPropertyOperations;
}, function(module, exports) {
"use strict";
function prefixKey(prefix, key) {
return prefix + key.charAt(0).toUpperCase() + key.substring(1);
}
var isUnitlessNumber = {
columnCount: !0,
fillOpacity: !0,
flex: !0,
flexGrow: !0,
flexShrink: !0,
fontWeight: !0,
lineClamp: !0,
lineHeight: !0,
opacity: !0,
order: !0,
orphans: !0,
widows: !0,
zIndex: !0,
zoom: !0
}, prefixes = [ "Webkit", "ms", "Moz", "O" ];
Object.keys(isUnitlessNumber).forEach(function(prop) {
prefixes.forEach(function(prefix) {
isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
});
});
var shorthandPropertyExpansions = {
background: {
backgroundImage: !0,
backgroundPosition: !0,
backgroundRepeat: !0,
backgroundColor: !0
},
border: {
borderWidth: !0,
borderStyle: !0,
borderColor: !0
},
borderBottom: {
borderBottomWidth: !0,
borderBottomStyle: !0,
borderBottomColor: !0
},
borderLeft: {
borderLeftWidth: !0,
borderLeftStyle: !0,
borderLeftColor: !0
},
borderRight: {
borderRightWidth: !0,
borderRightStyle: !0,
borderRightColor: !0
},
borderTop: {
borderTopWidth: !0,
borderTopStyle: !0,
borderTopColor: !0
},
font: {
fontStyle: !0,
fontVariant: !0,
fontWeight: !0,
fontSize: !0,
lineHeight: !0,
fontFamily: !0
}
}, CSSProperty = {
isUnitlessNumber: isUnitlessNumber,
shorthandPropertyExpansions: shorthandPropertyExpansions
};
module.exports = CSSProperty;
}, function(module, exports, __webpack_require__) {
"use strict";
function dangerousStyleValue(name, value) {
var isEmpty = null == value || "boolean" == typeof value || "" === value;
if (isEmpty) return "";
var isNonNumeric = isNaN(value);
if (isNonNumeric || 0 === value || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) return "" + value;
if ("string" == typeof value) value = value.trim();
return value + "px";
}
var CSSProperty = __webpack_require__(170), isUnitlessNumber = CSSProperty.isUnitlessNumber;
module.exports = dangerousStyleValue;
}, function(module, exports, __webpack_require__) {
"use strict";
function hyphenateStyleName(string) {
return hyphenate(string).replace(msPattern, "-ms-");
}
var hyphenate = __webpack_require__(173), msPattern = /^ms-/;
module.exports = hyphenateStyleName;
}, function(module, exports) {
function hyphenate(string) {
return string.replace(_uppercasePattern, "-$1").toLowerCase();
}
var _uppercasePattern = /([A-Z])/g;
module.exports = hyphenate;
}, function(module, exports, __webpack_require__) {
"use strict";
function enqueueMarkup(parentID, markup, toIndex) {
updateQueue.push({
parentID: parentID,
parentNode: null,
type: ReactMultiChildUpdateTypes.INSERT_MARKUP,
markupIndex: markupQueue.push(markup) - 1,
textContent: null,
fromIndex: null,
toIndex: toIndex
});
}
function enqueueMove(parentID, fromIndex, toIndex) {
updateQueue.push({
parentID: parentID,
parentNode: null,
type: ReactMultiChildUpdateTypes.MOVE_EXISTING,
markupIndex: null,
textContent: null,
fromIndex: fromIndex,
toIndex: toIndex
});
}
function enqueueRemove(parentID, fromIndex) {
updateQueue.push({
parentID: parentID,
parentNode: null,
type: ReactMultiChildUpdateTypes.REMOVE_NODE,
markupIndex: null,
textContent: null,
fromIndex: fromIndex,
toIndex: null
});
}
function enqueueTextContent(parentID, textContent) {
updateQueue.push({
parentID: parentID,
parentNode: null,
type: ReactMultiChildUpdateTypes.TEXT_CONTENT,
markupIndex: null,
textContent: textContent,
fromIndex: null,
toIndex: null
});
}
function processQueue() {
if (updateQueue.length) {
ReactComponent.BackendIDOperations.dangerouslyProcessChildrenUpdates(updateQueue, markupQueue);
clearQueue();
}
}
function clearQueue() {
updateQueue.length = 0;
markupQueue.length = 0;
}
var ReactComponent = __webpack_require__(152), ReactMultiChildUpdateTypes = __webpack_require__(175), flattenChildren = __webpack_require__(176), instantiateReactComponent = __webpack_require__(150), shouldUpdateReactComponent = __webpack_require__(151), updateDepth = 0, updateQueue = [], markupQueue = [], ReactMultiChild = {
Mixin: {
mountChildren: function(nestedChildren, transaction) {
var children = flattenChildren(nestedChildren), mountImages = [], index = 0;
this._renderedChildren = children;
for (var name in children) {
var child = children[name];
if (children.hasOwnProperty(name)) {
var childInstance = instantiateReactComponent(child);
children[name] = childInstance;
var rootID = this._rootNodeID + name, mountImage = childInstance.mountComponent(rootID, transaction, this._mountDepth + 1);
childInstance._mountIndex = index;
mountImages.push(mountImage);
index++;
}
}
return mountImages;
},
updateTextContent: function(nextContent) {
updateDepth++;
var errorThrown = !0;
try {
var prevChildren = this._renderedChildren;
for (var name in prevChildren) if (prevChildren.hasOwnProperty(name)) this._unmountChildByName(prevChildren[name], name);
this.setTextContent(nextContent);
errorThrown = !1;
} finally {
updateDepth--;
if (!updateDepth) errorThrown ? clearQueue() : processQueue();
}
},
updateChildren: function(nextNestedChildren, transaction) {
updateDepth++;
var errorThrown = !0;
try {
this._updateChildren(nextNestedChildren, transaction);
errorThrown = !1;
} finally {
updateDepth--;
if (!updateDepth) errorThrown ? clearQueue() : processQueue();
}
},
_updateChildren: function(nextNestedChildren, transaction) {
var nextChildren = flattenChildren(nextNestedChildren), prevChildren = this._renderedChildren;
if (nextChildren || prevChildren) {
var name, lastIndex = 0, nextIndex = 0;
for (name in nextChildren) if (nextChildren.hasOwnProperty(name)) {
var prevChild = prevChildren && prevChildren[name], prevDescriptor = prevChild && prevChild._descriptor, nextDescriptor = nextChildren[name];
if (shouldUpdateReactComponent(prevDescriptor, nextDescriptor)) {
this.moveChild(prevChild, nextIndex, lastIndex);
lastIndex = Math.max(prevChild._mountIndex, lastIndex);
prevChild.receiveComponent(nextDescriptor, transaction);
prevChild._mountIndex = nextIndex;
} else {
if (prevChild) {
lastIndex = Math.max(prevChild._mountIndex, lastIndex);
this._unmountChildByName(prevChild, name);
}
var nextChildInstance = instantiateReactComponent(nextDescriptor);
this._mountChildByNameAtIndex(nextChildInstance, name, nextIndex, transaction);
}
nextIndex++;
} else ;
for (name in prevChildren) if (prevChildren.hasOwnProperty(name) && (!nextChildren || !nextChildren[name])) this._unmountChildByName(prevChildren[name], name);
}
},
unmountChildren: function() {
var renderedChildren = this._renderedChildren;
for (var name in renderedChildren) {
var renderedChild = renderedChildren[name];
if (renderedChild.unmountComponent) renderedChild.unmountComponent();
}
this._renderedChildren = null;
},
moveChild: function(child, toIndex, lastIndex) {
if (child._mountIndex < lastIndex) enqueueMove(this._rootNodeID, child._mountIndex, toIndex);
},
createChild: function(child, mountImage) {
enqueueMarkup(this._rootNodeID, mountImage, child._mountIndex);
},
removeChild: function(child) {
enqueueRemove(this._rootNodeID, child._mountIndex);
},
setTextContent: function(textContent) {
enqueueTextContent(this._rootNodeID, textContent);
},
_mountChildByNameAtIndex: function(child, name, index, transaction) {
var rootID = this._rootNodeID + name, mountImage = child.mountComponent(rootID, transaction, this._mountDepth + 1);
child._mountIndex = index;
this.createChild(child, mountImage);
this._renderedChildren = this._renderedChildren || {};
this._renderedChildren[name] = child;
},
_unmountChildByName: function(child, name) {
this.removeChild(child);
child._mountIndex = null;
child.unmountComponent();
delete this._renderedChildren[name];
}
}
};
module.exports = ReactMultiChild;
}, function(module, exports, __webpack_require__) {
"use strict";
var keyMirror = __webpack_require__(118), ReactMultiChildUpdateTypes = keyMirror({
INSERT_MARKUP: null,
MOVE_EXISTING: null,
REMOVE_NODE: null,
TEXT_CONTENT: null
});
module.exports = ReactMultiChildUpdateTypes;
}, function(module, exports, __webpack_require__) {
"use strict";
function flattenSingleChildIntoContext(traverseContext, child, name) {
var result = traverseContext, keyUnique = !result.hasOwnProperty(name);
!0 ? warning(keyUnique, "flattenChildren(...): Encountered two children with the same key, `%s`. Child keys must be unique; when two children share a key, only the first child will be used.", name) : null;
if (keyUnique && null != child) result[name] = child;
}
function flattenChildren(children) {
if (null == children) return children;
var result = {};
traverseAllChildren(children, flattenSingleChildIntoContext, result);
return result;
}
var traverseAllChildren = __webpack_require__(121), warning = __webpack_require__(113);
module.exports = flattenChildren;
}, function(module, exports) {
var keyOf = function(oneKeyObj) {
var key;
for (key in oneKeyObj) if (oneKeyObj.hasOwnProperty(key)) return key; else ;
return null;
};
module.exports = keyOf;
}, function(module, exports, __webpack_require__) {
"use strict";
function inject() {
ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener);
ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder);
ReactInjection.EventPluginHub.injectInstanceHandle(ReactInstanceHandles);
ReactInjection.EventPluginHub.injectMount(ReactMount);
ReactInjection.EventPluginHub.injectEventPluginsByName({
SimpleEventPlugin: SimpleEventPlugin,
EnterLeaveEventPlugin: EnterLeaveEventPlugin,
ChangeEventPlugin: ChangeEventPlugin,
CompositionEventPlugin: CompositionEventPlugin,
MobileSafariClickEventPlugin: MobileSafariClickEventPlugin,
SelectEventPlugin: SelectEventPlugin,
BeforeInputEventPlugin: BeforeInputEventPlugin
});
ReactInjection.DOM.injectComponentClasses({
button: ReactDOMButton,
form: ReactDOMForm,
img: ReactDOMImg,
input: ReactDOMInput,
option: ReactDOMOption,
select: ReactDOMSelect,
textarea: ReactDOMTextarea,
html: createFullPageComponent(ReactDOM.html),
head: createFullPageComponent(ReactDOM.head),
body: createFullPageComponent(ReactDOM.body)
});
ReactInjection.CompositeComponent.injectMixin(ReactBrowserComponentMixin);
ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig);
ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig);
ReactInjection.EmptyComponent.injectEmptyComponent(ReactDOM.noscript);
ReactInjection.Updates.injectReconcileTransaction(ReactComponentBrowserEnvironment.ReactReconcileTransaction);
ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy);
ReactInjection.RootIndex.injectCreateReactRootIndex(ExecutionEnvironment.canUseDOM ? ClientReactRootIndex.createReactRootIndex : ServerReactRootIndex.createReactRootIndex);
ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment);
if (!0) {
var url = ExecutionEnvironment.canUseDOM && window.location.href || "";
if (/[?&]react_perf\b/.test(url)) {
var ReactDefaultPerf = __webpack_require__(243);
ReactDefaultPerf.start();
}
}
}
var BeforeInputEventPlugin = __webpack_require__(179), ChangeEventPlugin = __webpack_require__(184), ClientReactRootIndex = __webpack_require__(186), CompositionEventPlugin = __webpack_require__(187), DefaultEventPluginOrder = __webpack_require__(195), EnterLeaveEventPlugin = __webpack_require__(196), ExecutionEnvironment = __webpack_require__(134), HTMLDOMPropertyConfig = __webpack_require__(200), MobileSafariClickEventPlugin = __webpack_require__(201), ReactBrowserComponentMixin = __webpack_require__(125), ReactComponentBrowserEnvironment = __webpack_require__(202), ReactDefaultBatchingStrategy = __webpack_require__(215), ReactDOM = __webpack_require__(167), ReactDOMButton = __webpack_require__(216), ReactDOMForm = __webpack_require__(218), ReactDOMImg = __webpack_require__(220), ReactDOMInput = __webpack_require__(221), ReactDOMOption = __webpack_require__(224), ReactDOMSelect = __webpack_require__(225), ReactDOMTextarea = __webpack_require__(226), ReactEventListener = __webpack_require__(227), ReactInjection = __webpack_require__(229), ReactInstanceHandles = __webpack_require__(122), ReactMount = __webpack_require__(127), SelectEventPlugin = __webpack_require__(230), ServerReactRootIndex = __webpack_require__(232), SimpleEventPlugin = __webpack_require__(233), SVGDOMPropertyConfig = __webpack_require__(241), createFullPageComponent = __webpack_require__(242);
module.exports = {
inject: inject
};
}, function(module, exports, __webpack_require__) {
"use strict";
function isPresto() {
var opera = window.opera;
return "object" == typeof opera && "function" == typeof opera.version && parseInt(opera.version(), 10) <= 12;
}
function isKeypressCommand(nativeEvent) {
return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && !(nativeEvent.ctrlKey && nativeEvent.altKey);
}
var EventConstants = __webpack_require__(117), EventPropagators = __webpack_require__(180), ExecutionEnvironment = __webpack_require__(134), SyntheticInputEvent = __webpack_require__(181), keyOf = __webpack_require__(177), canUseTextInputEvent = ExecutionEnvironment.canUseDOM && "TextEvent" in window && !("documentMode" in document || isPresto()), SPACEBAR_CODE = 32, SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE), topLevelTypes = EventConstants.topLevelTypes, eventTypes = {
beforeInput: {
phasedRegistrationNames: {
bubbled: keyOf({
onBeforeInput: null
}),
captured: keyOf({
onBeforeInputCapture: null
})
},
dependencies: [ topLevelTypes.topCompositionEnd, topLevelTypes.topKeyPress, topLevelTypes.topTextInput, topLevelTypes.topPaste ]
}
}, fallbackChars = null, BeforeInputEventPlugin = {
eventTypes: eventTypes,
extractEvents: function(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent) {
var chars;
if (canUseTextInputEvent) switch (topLevelType) {
case topLevelTypes.topKeyPress:
var which = nativeEvent.which;
if (which !== SPACEBAR_CODE) return;
chars = String.fromCharCode(which);
break;
case topLevelTypes.topTextInput:
chars = nativeEvent.data;
if (chars === SPACEBAR_CHAR) return;
break;
default:
return;
} else {
switch (topLevelType) {
case topLevelTypes.topPaste:
fallbackChars = null;
break;
case topLevelTypes.topKeyPress:
if (nativeEvent.which && !isKeypressCommand(nativeEvent)) fallbackChars = String.fromCharCode(nativeEvent.which);
break;
case topLevelTypes.topCompositionEnd:
fallbackChars = nativeEvent.data;
}
if (null === fallbackChars) return;
chars = fallbackChars;
}
if (chars) {
var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, topLevelTargetID, nativeEvent);
event.data = chars;
fallbackChars = null;
EventPropagators.accumulateTwoPhaseDispatches(event);
return event;
}
}
};
module.exports = BeforeInputEventPlugin;
}, function(module, exports, __webpack_require__) {
"use strict";
function listenerAtPhase(id, event, propagationPhase) {
var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
return getListener(id, registrationName);
}
function accumulateDirectionalDispatches(domID, upwards, event) {
if (!0) if (!domID) throw new Error("Dispatching id must not be null");
var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured, listener = listenerAtPhase(domID, event, phase);
if (listener) {
event._dispatchListeners = accumulate(event._dispatchListeners, listener);
event._dispatchIDs = accumulate(event._dispatchIDs, domID);
}
}
function accumulateTwoPhaseDispatchesSingle(event) {
if (event && event.dispatchConfig.phasedRegistrationNames) EventPluginHub.injection.getInstanceHandle().traverseTwoPhase(event.dispatchMarker, accumulateDirectionalDispatches, event);
}
function accumulateDispatches(id, ignoredDirection, event) {
if (event && event.dispatchConfig.registrationName) {
var registrationName = event.dispatchConfig.registrationName, listener = getListener(id, registrationName);
if (listener) {
event._dispatchListeners = accumulate(event._dispatchListeners, listener);
event._dispatchIDs = accumulate(event._dispatchIDs, id);
}
}
}
function accumulateDirectDispatchesSingle(event) {
if (event && event.dispatchConfig.registrationName) accumulateDispatches(event.dispatchMarker, null, event);
}
function accumulateTwoPhaseDispatches(events) {
forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
}
function accumulateEnterLeaveDispatches(leave, enter, fromID, toID) {
EventPluginHub.injection.getInstanceHandle().traverseEnterLeave(fromID, toID, accumulateDispatches, leave, enter);
}
function accumulateDirectDispatches(events) {
forEachAccumulated(events, accumulateDirectDispatchesSingle);
}
var EventConstants = __webpack_require__(117), EventPluginHub = __webpack_require__(129), accumulate = __webpack_require__(131), forEachAccumulated = __webpack_require__(132), PropagationPhases = EventConstants.PropagationPhases, getListener = EventPluginHub.getListener, EventPropagators = {
accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,
accumulateDirectDispatches: accumulateDirectDispatches,
accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches
};
module.exports = EventPropagators;
}, function(module, exports, __webpack_require__) {
"use strict";
function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent) {
SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);
}
var SyntheticEvent = __webpack_require__(182), InputEventInterface = {
data: null
};
SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface);
module.exports = SyntheticInputEvent;
}, function(module, exports, __webpack_require__) {
"use strict";
function SyntheticEvent(dispatchConfig, dispatchMarker, nativeEvent) {
this.dispatchConfig = dispatchConfig;
this.dispatchMarker = dispatchMarker;
this.nativeEvent = nativeEvent;
var Interface = this.constructor.Interface;
for (var propName in Interface) if (Interface.hasOwnProperty(propName)) {
var normalize = Interface[propName];
if (normalize) this[propName] = normalize(nativeEvent); else this[propName] = nativeEvent[propName];
} else ;
var defaultPrevented = null != nativeEvent.defaultPrevented ? nativeEvent.defaultPrevented : nativeEvent.returnValue === !1;
if (defaultPrevented) this.isDefaultPrevented = emptyFunction.thatReturnsTrue; else this.isDefaultPrevented = emptyFunction.thatReturnsFalse;
this.isPropagationStopped = emptyFunction.thatReturnsFalse;
}
var PooledClass = __webpack_require__(120), emptyFunction = __webpack_require__(114), getEventTarget = __webpack_require__(183), merge = __webpack_require__(139), mergeInto = __webpack_require__(140), EventInterface = {
type: null,
target: getEventTarget,
currentTarget: emptyFunction.thatReturnsNull,
eventPhase: null,
bubbles: null,
cancelable: null,
timeStamp: function(event) {
return event.timeStamp || Date.now();
},
defaultPrevented: null,
isTrusted: null
};
mergeInto(SyntheticEvent.prototype, {
preventDefault: function() {
this.defaultPrevented = !0;
var event = this.nativeEvent;
event.preventDefault ? event.preventDefault() : event.returnValue = !1;
this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
},
stopPropagation: function() {
var event = this.nativeEvent;
event.stopPropagation ? event.stopPropagation() : event.cancelBubble = !0;
this.isPropagationStopped = emptyFunction.thatReturnsTrue;
},
persist: function() {
this.isPersistent = emptyFunction.thatReturnsTrue;
},
isPersistent: emptyFunction.thatReturnsFalse,
destructor: function() {
var Interface = this.constructor.Interface;
for (var propName in Interface) this[propName] = null;
this.dispatchConfig = null;
this.dispatchMarker = null;
this.nativeEvent = null;
}
});
SyntheticEvent.Interface = EventInterface;
SyntheticEvent.augmentClass = function(Class, Interface) {
var Super = this, prototype = Object.create(Super.prototype);
mergeInto(prototype, Class.prototype);
Class.prototype = prototype;
Class.prototype.constructor = Class;
Class.Interface = merge(Super.Interface, Interface);
Class.augmentClass = Super.augmentClass;
PooledClass.addPoolingTo(Class, PooledClass.threeArgumentPooler);
};
PooledClass.addPoolingTo(SyntheticEvent, PooledClass.threeArgumentPooler);
module.exports = SyntheticEvent;
}, function(module, exports) {
"use strict";
function getEventTarget(nativeEvent) {
var target = nativeEvent.target || nativeEvent.srcElement || window;
return 3 === target.nodeType ? target.parentNode : target;
}
module.exports = getEventTarget;
}, function(module, exports, __webpack_require__) {
"use strict";
function shouldUseChangeEvent(elem) {
return "SELECT" === elem.nodeName || "INPUT" === elem.nodeName && "file" === elem.type;
}
function manualDispatchChangeEvent(nativeEvent) {
var event = SyntheticEvent.getPooled(eventTypes.change, activeElementID, nativeEvent);
EventPropagators.accumulateTwoPhaseDispatches(event);
ReactUpdates.batchedUpdates(runEventInBatch, event);
}
function runEventInBatch(event) {
EventPluginHub.enqueueEvents(event);
EventPluginHub.processEventQueue();
}
function startWatchingForChangeEventIE8(target, targetID) {
activeElement = target;
activeElementID = targetID;
activeElement.attachEvent("onchange", manualDispatchChangeEvent);
}
function stopWatchingForChangeEventIE8() {
if (activeElement) {
activeElement.detachEvent("onchange", manualDispatchChangeEvent);
activeElement = null;
activeElementID = null;
}
}
function getTargetIDForChangeEvent(topLevelType, topLevelTarget, topLevelTargetID) {
if (topLevelType === topLevelTypes.topChange) return topLevelTargetID; else ;
}
function handleEventsForChangeEventIE8(topLevelType, topLevelTarget, topLevelTargetID) {
if (topLevelType === topLevelTypes.topFocus) {
stopWatchingForChangeEventIE8();
startWatchingForChangeEventIE8(topLevelTarget, topLevelTargetID);
} else if (topLevelType === topLevelTypes.topBlur) stopWatchingForChangeEventIE8();
}
function startWatchingForValueChange(target, targetID) {
activeElement = target;
activeElementID = targetID;
activeElementValue = target.value;
if ("undefined" != typeof target.constructor) {
activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, "value");
Object.defineProperty(activeElement, "value", newValueProp);
} else {
activeElement.attachEvent("onkeyup", handleKeyUp);
activeElement.attachEvent("onkeydown", handleKeydown);
activeElement.attachEvent("oncut", handleMouseInput);
activeElement.attachEvent("onpaste", handleMouseInput);
activeElement.attachEvent("oncontextmenu", handleMouseInput);
activeElement.attachEvent("onmouseup", handleMouseInput);
}
activeElement.attachEvent("onpropertychange", handlePropertyChange);
}
function stopWatchingForValueChange() {
if (activeElement) {
try {
delete activeElement.value;
} catch (err) {}
activeElement.detachEvent("onpropertychange", handlePropertyChange);
if ("undefined" == typeof activeElement.constructor) {
activeElement.detachEvent("onkeyup", handleKeyUp);
activeElement.detachEvent("onkeydown", handleKeydown);
activeElement.detachEvent("oncut", handleMouseInput);
activeElement.detachEvent("onpaste", handleMouseInput);
activeElement.detachEvent("oncontextmenu", handleMouseInput);
activeElement.detachEvent("onmouseup", handleMouseInput);
activeElementChangeEventTime = null;
activeElementMouseEventTime = null;
activeElementKeyEventTime = null;
}
activeElement = null;
activeElementID = null;
activeElementValue = null;
activeElementValueProp = null;
}
}
function handleKeydown(nativeEvent) {
activeElementKeyEventTime = new Date();
}
function handleMouseInput(nativeEvent) {
activeElementMouseEventTime = null;
if (!activeElementKeyEventTime || new Date() - activeElementKeyEventTime > 500) activeElementMouseEventTime = new Date();
activeElementKeyEventTime = null;
}
function handlePropertyChange(nativeEvent) {
if ("value" === nativeEvent.propertyName) {
var value = nativeEvent.srcElement.value;
if (value !== activeElementValue) {
activeElementValue = value;
if ("undefined" != typeof activeElement.constructor) manualDispatchChangeEvent(nativeEvent); else {
if (activeElementMouseEventTime) {
var timediff = new Date() - activeElementMouseEventTime;
activeElementMouseEventTime = null;
if (500 > timediff) {
manualDispatchChangeEvent(nativeEvent);
return;
}
}
activeElementChangeEventTime = new Date();
}
}
}
}
function handleKeyUp(nativeEvent) {
if (activeElementChangeEventTime) {
var timediff = new Date() - activeElementChangeEventTime;
activeElementChangeEventTime = null;
if (500 > timediff) manualDispatchChangeEvent(nativeEvent);
}
}
function getTargetIDForInputEvent(topLevelType, topLevelTarget, topLevelTargetID) {
if (topLevelType === topLevelTypes.topInput) return topLevelTargetID; else ;
}
function handleEventsForInputEventIE(topLevelType, topLevelTarget, topLevelTargetID) {
if (topLevelType === topLevelTypes.topFocus) {
stopWatchingForValueChange();
startWatchingForValueChange(topLevelTarget, topLevelTargetID);
} else if (topLevelType === topLevelTypes.topBlur) stopWatchingForValueChange();
}
function getTargetIDForInputEventIE(topLevelType, topLevelTarget, topLevelTargetID) {
if (topLevelType === topLevelTypes.topSelectionChange || topLevelType === topLevelTypes.topKeyUp || topLevelType === topLevelTypes.topKeyDown) if (activeElement && activeElement.value !== activeElementValue) {
activeElementValue = activeElement.value;
return activeElementID;
}
}
function shouldUseClickEvent(elem) {
return "INPUT" === elem.nodeName && ("checkbox" === elem.type || "radio" === elem.type);
}
function getTargetIDForClickEvent(topLevelType, topLevelTarget, topLevelTargetID) {
if (topLevelType === topLevelTypes.topClick) return topLevelTargetID; else ;
}
var EventConstants = __webpack_require__(117), EventPluginHub = __webpack_require__(129), EventPropagators = __webpack_require__(180), ExecutionEnvironment = __webpack_require__(134), ReactUpdates = __webpack_require__(155), SyntheticEvent = __webpack_require__(182), isEventSupported = __webpack_require__(133), isTextInputElement = __webpack_require__(185), keyOf = __webpack_require__(177), topLevelTypes = EventConstants.topLevelTypes, eventTypes = {
change: {
phasedRegistrationNames: {
bubbled: keyOf({
onChange: null
}),
captured: keyOf({
onChangeCapture: null
})
},
dependencies: [ topLevelTypes.topBlur, topLevelTypes.topChange, topLevelTypes.topClick, topLevelTypes.topFocus, topLevelTypes.topInput, topLevelTypes.topKeyDown, topLevelTypes.topKeyUp, topLevelTypes.topSelectionChange ]
}
}, activeElement = null, activeElementID = null, activeElementValue = null, activeElementValueProp = null, activeElementChangeEventTime = null, activeElementMouseEventTime = null, activeElementKeyEventTime = null, doesChangeEventBubble = !1;
if (ExecutionEnvironment.canUseDOM) doesChangeEventBubble = isEventSupported("change") && (!("documentMode" in document) || document.documentMode > 8);
var isInputEventSupported = !1;
if (ExecutionEnvironment.canUseDOM) isInputEventSupported = isEventSupported("input") && (!("documentMode" in document) || document.documentMode > 9);
var newValueProp = {
get: function() {
return activeElementValueProp.get.call(this);
},
set: function(val) {
activeElementValue = "" + val;
activeElementValueProp.set.call(this, val);
}
}, ChangeEventPlugin = {
eventTypes: eventTypes,
extractEvents: function(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent) {
var getTargetIDFunc, handleEventFunc;
if (shouldUseChangeEvent(topLevelTarget)) if (doesChangeEventBubble) getTargetIDFunc = getTargetIDForChangeEvent; else handleEventFunc = handleEventsForChangeEventIE8; else if (isTextInputElement(topLevelTarget)) if (isInputEventSupported) getTargetIDFunc = getTargetIDForInputEvent; else {
getTargetIDFunc = getTargetIDForInputEventIE;
handleEventFunc = handleEventsForInputEventIE;
} else if (shouldUseClickEvent(topLevelTarget)) getTargetIDFunc = getTargetIDForClickEvent;
if (getTargetIDFunc) {
var targetID = getTargetIDFunc(topLevelType, topLevelTarget, topLevelTargetID);
if (targetID) {
var event = SyntheticEvent.getPooled(eventTypes.change, targetID, nativeEvent);
EventPropagators.accumulateTwoPhaseDispatches(event);
return event;
}
}
if (handleEventFunc) handleEventFunc(topLevelType, topLevelTarget, topLevelTargetID);
}
};
module.exports = ChangeEventPlugin;
}, function(module, exports) {
"use strict";
function isTextInputElement(elem) {
return elem && ("INPUT" === elem.nodeName && supportedInputTypes[elem.type] || "TEXTAREA" === elem.nodeName);
}
var supportedInputTypes = {
color: !0,
date: !0,
datetime: !0,
"datetime-local": !0,
email: !0,
month: !0,
number: !0,
password: !0,
range: !0,
search: !0,
tel: !0,
text: !0,
time: !0,
url: !0,
week: !0
};
module.exports = isTextInputElement;
}, function(module, exports) {
"use strict";
var nextReactRootIndex = 0, ClientReactRootIndex = {
createReactRootIndex: function() {
return nextReactRootIndex++;
}
};
module.exports = ClientReactRootIndex;
}, function(module, exports, __webpack_require__) {
"use strict";
function getCompositionEventType(topLevelType) {
switch (topLevelType) {
case topLevelTypes.topCompositionStart:
return eventTypes.compositionStart;
case topLevelTypes.topCompositionEnd:
return eventTypes.compositionEnd;
case topLevelTypes.topCompositionUpdate:
return eventTypes.compositionUpdate;
}
}
function isFallbackStart(topLevelType, nativeEvent) {
return topLevelType === topLevelTypes.topKeyDown && nativeEvent.keyCode === START_KEYCODE;
}
function isFallbackEnd(topLevelType, nativeEvent) {
switch (topLevelType) {
case topLevelTypes.topKeyUp:
return -1 !== END_KEYCODES.indexOf(nativeEvent.keyCode);
case topLevelTypes.topKeyDown:
return nativeEvent.keyCode !== START_KEYCODE;
case topLevelTypes.topKeyPress:
case topLevelTypes.topMouseDown:
case topLevelTypes.topBlur:
return !0;
default:
return !1;
}
}
function FallbackCompositionState(root) {
this.root = root;
this.startSelection = ReactInputSelection.getSelection(root);
this.startValue = this.getText();
}
var EventConstants = __webpack_require__(117), EventPropagators = __webpack_require__(180), ExecutionEnvironment = __webpack_require__(134), ReactInputSelection = __webpack_require__(188), SyntheticCompositionEvent = __webpack_require__(194), getTextContentAccessor = __webpack_require__(191), keyOf = __webpack_require__(177), END_KEYCODES = [ 9, 13, 27, 32 ], START_KEYCODE = 229, useCompositionEvent = ExecutionEnvironment.canUseDOM && "CompositionEvent" in window, useFallbackData = !useCompositionEvent || "documentMode" in document && document.documentMode > 8 && document.documentMode <= 11, topLevelTypes = EventConstants.topLevelTypes, currentComposition = null, eventTypes = {
compositionEnd: {
phasedRegistrationNames: {
bubbled: keyOf({
onCompositionEnd: null
}),
captured: keyOf({
onCompositionEndCapture: null
})
},
dependencies: [ topLevelTypes.topBlur, topLevelTypes.topCompositionEnd, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown ]
},
compositionStart: {
phasedRegistrationNames: {
bubbled: keyOf({
onCompositionStart: null
}),
captured: keyOf({
onCompositionStartCapture: null
})
},
dependencies: [ topLevelTypes.topBlur, topLevelTypes.topCompositionStart, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown ]
},
compositionUpdate: {
phasedRegistrationNames: {
bubbled: keyOf({
onCompositionUpdate: null
}),
captured: keyOf({
onCompositionUpdateCapture: null
})
},
dependencies: [ topLevelTypes.topBlur, topLevelTypes.topCompositionUpdate, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown ]
}
};
FallbackCompositionState.prototype.getText = function() {
return this.root.value || this.root[getTextContentAccessor()];
};
FallbackCompositionState.prototype.getData = function() {
var endValue = this.getText(), prefixLength = this.startSelection.start, suffixLength = this.startValue.length - this.startSelection.end;
return endValue.substr(prefixLength, endValue.length - suffixLength - prefixLength);
};
var CompositionEventPlugin = {
eventTypes: eventTypes,
extractEvents: function(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent) {
var eventType, data;
if (useCompositionEvent) eventType = getCompositionEventType(topLevelType); else if (!currentComposition) {
if (isFallbackStart(topLevelType, nativeEvent)) eventType = eventTypes.compositionStart;
} else if (isFallbackEnd(topLevelType, nativeEvent)) eventType = eventTypes.compositionEnd;
if (useFallbackData) if (!currentComposition && eventType === eventTypes.compositionStart) currentComposition = new FallbackCompositionState(topLevelTarget); else if (eventType === eventTypes.compositionEnd) if (currentComposition) {
data = currentComposition.getData();
currentComposition = null;
}
if (eventType) {
var event = SyntheticCompositionEvent.getPooled(eventType, topLevelTargetID, nativeEvent);
if (data) event.data = data;
EventPropagators.accumulateTwoPhaseDispatches(event);
return event;
}
}
};
module.exports = CompositionEventPlugin;
}, function(module, exports, __webpack_require__) {
"use strict";
function isInDocument(node) {
return containsNode(document.documentElement, node);
}
var ReactDOMSelection = __webpack_require__(189), containsNode = __webpack_require__(146), focusNode = __webpack_require__(192), getActiveElement = __webpack_require__(193), ReactInputSelection = {
hasSelectionCapabilities: function(elem) {
return elem && ("INPUT" === elem.nodeName && "text" === elem.type || "TEXTAREA" === elem.nodeName || "true" === elem.contentEditable);
},
getSelectionInformation: function() {
var focusedElem = getActiveElement();
return {
focusedElem: focusedElem,
selectionRange: ReactInputSelection.hasSelectionCapabilities(focusedElem) ? ReactInputSelection.getSelection(focusedElem) : null
};
},
restoreSelection: function(priorSelectionInformation) {
var curFocusedElem = getActiveElement(), priorFocusedElem = priorSelectionInformation.focusedElem, priorSelectionRange = priorSelectionInformation.selectionRange;
if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) ReactInputSelection.setSelection(priorFocusedElem, priorSelectionRange);
focusNode(priorFocusedElem);
}
},
getSelection: function(input) {
var selection;
if ("selectionStart" in input) selection = {
start: input.selectionStart,
end: input.selectionEnd
}; else if (document.selection && "INPUT" === input.nodeName) {
var range = document.selection.createRange();
if (range.parentElement() === input) selection = {
start: -range.moveStart("character", -input.value.length),
end: -range.moveEnd("character", -input.value.length)
};
} else selection = ReactDOMSelection.getOffsets(input);
return selection || {
start: 0,
end: 0
};
},
setSelection: function(input, offsets) {
var start = offsets.start, end = offsets.end;
if ("undefined" == typeof end) end = start;
if ("selectionStart" in input) {
input.selectionStart = start;
input.selectionEnd = Math.min(end, input.value.length);
} else if (document.selection && "INPUT" === input.nodeName) {
var range = input.createTextRange();
range.collapse(!0);
range.moveStart("character", start);
range.moveEnd("character", end - start);
range.select();
} else ReactDOMSelection.setOffsets(input, offsets);
}
};
module.exports = ReactInputSelection;
}, function(module, exports, __webpack_require__) {
"use strict";
function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) {
return anchorNode === focusNode && anchorOffset === focusOffset;
}
function getIEOffsets(node) {
var selection = document.selection, selectedRange = selection.createRange(), selectedLength = selectedRange.text.length, fromStart = selectedRange.duplicate();
fromStart.moveToElementText(node);
fromStart.setEndPoint("EndToStart", selectedRange);
var startOffset = fromStart.text.length, endOffset = startOffset + selectedLength;
return {
start: startOffset,
end: endOffset
};
}
function getModernOffsets(node) {
var selection = window.getSelection();
if (0 === selection.rangeCount) return null;
var anchorNode = selection.anchorNode, anchorOffset = selection.anchorOffset, focusNode = selection.focusNode, focusOffset = selection.focusOffset, currentRange = selection.getRangeAt(0), isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset), rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length, tempRange = currentRange.cloneRange();
tempRange.selectNodeContents(node);
tempRange.setEnd(currentRange.startContainer, currentRange.startOffset);
var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset), start = isTempRangeCollapsed ? 0 : tempRange.toString().length, end = start + rangeLength, detectionRange = document.createRange();
detectionRange.setStart(anchorNode, anchorOffset);
detectionRange.setEnd(focusNode, focusOffset);
var isBackward = detectionRange.collapsed;
detectionRange.detach();
return {
start: isBackward ? end : start,
end: isBackward ? start : end
};
}
function setIEOffsets(node, offsets) {
var start, end, range = document.selection.createRange().duplicate();
if ("undefined" == typeof offsets.end) {
start = offsets.start;
end = start;
} else if (offsets.start > offsets.end) {
start = offsets.end;
end = offsets.start;
} else {
start = offsets.start;
end = offsets.end;
}
range.moveToElementText(node);
range.moveStart("character", start);
range.setEndPoint("EndToStart", range);
range.moveEnd("character", end - start);
range.select();
}
function setModernOffsets(node, offsets) {
var selection = window.getSelection(), length = node[getTextContentAccessor()].length, start = Math.min(offsets.start, length), end = "undefined" == typeof offsets.end ? start : Math.min(offsets.end, length);
if (!selection.extend && start > end) {
var temp = end;
end = start;
start = temp;
}
var startMarker = getNodeForCharacterOffset(node, start), endMarker = getNodeForCharacterOffset(node, end);
if (startMarker && endMarker) {
var range = document.createRange();
range.setStart(startMarker.node, startMarker.offset);
selection.removeAllRanges();
if (start > end) {
selection.addRange(range);
selection.extend(endMarker.node, endMarker.offset);
} else {
range.setEnd(endMarker.node, endMarker.offset);
selection.addRange(range);
}
range.detach();
}
}
var ExecutionEnvironment = __webpack_require__(134), getNodeForCharacterOffset = __webpack_require__(190), getTextContentAccessor = __webpack_require__(191), useIEOffsets = ExecutionEnvironment.canUseDOM && document.selection, ReactDOMSelection = {
getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets,
setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets
};
module.exports = ReactDOMSelection;
}, function(module, exports) {
"use strict";
function getLeafNode(node) {
for (;node && node.firstChild; ) node = node.firstChild;
return node;
}
function getSiblingNode(node) {
for (;node; ) {
if (node.nextSibling) return node.nextSibling;
node = node.parentNode;
}
}
function getNodeForCharacterOffset(root, offset) {
for (var node = getLeafNode(root), nodeStart = 0, nodeEnd = 0; node; ) {
if (3 == node.nodeType) {
nodeEnd = nodeStart + node.textContent.length;
if (offset >= nodeStart && nodeEnd >= offset) return {
node: node,
offset: offset - nodeStart
};
nodeStart = nodeEnd;
}
node = getLeafNode(getSiblingNode(node));
}
}
module.exports = getNodeForCharacterOffset;
}, function(module, exports, __webpack_require__) {
"use strict";
function getTextContentAccessor() {
if (!contentKey && ExecutionEnvironment.canUseDOM) contentKey = "textContent" in document.documentElement ? "textContent" : "innerText";
return contentKey;
}
var ExecutionEnvironment = __webpack_require__(134), contentKey = null;
module.exports = getTextContentAccessor;
}, function(module, exports) {
"use strict";
function focusNode(node) {
if (!node.disabled) node.focus();
}
module.exports = focusNode;
}, function(module, exports) {
function getActiveElement() {
try {
return document.activeElement || document.body;
} catch (e) {
return document.body;
}
}
module.exports = getActiveElement;
}, function(module, exports, __webpack_require__) {
"use strict";
function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent) {
SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);
}
var SyntheticEvent = __webpack_require__(182), CompositionEventInterface = {
data: null
};
SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface);
module.exports = SyntheticCompositionEvent;
}, function(module, exports, __webpack_require__) {
"use strict";
var keyOf = __webpack_require__(177), DefaultEventPluginOrder = [ keyOf({
ResponderEventPlugin: null
}), keyOf({
SimpleEventPlugin: null
}), keyOf({
TapEventPlugin: null
}), keyOf({
EnterLeaveEventPlugin: null
}), keyOf({
ChangeEventPlugin: null
}), keyOf({
SelectEventPlugin: null
}), keyOf({
CompositionEventPlugin: null
}), keyOf({
BeforeInputEventPlugin: null
}), keyOf({
AnalyticsEventPlugin: null
}), keyOf({
MobileSafariClickEventPlugin: null
}) ];
module.exports = DefaultEventPluginOrder;
}, function(module, exports, __webpack_require__) {
"use strict";
var EventConstants = __webpack_require__(117), EventPropagators = __webpack_require__(180), SyntheticMouseEvent = __webpack_require__(197), ReactMount = __webpack_require__(127), keyOf = __webpack_require__(177), topLevelTypes = EventConstants.topLevelTypes, getFirstReactDOM = ReactMount.getFirstReactDOM, eventTypes = {
mouseEnter: {
registrationName: keyOf({
onMouseEnter: null
}),
dependencies: [ topLevelTypes.topMouseOut, topLevelTypes.topMouseOver ]
},
mouseLeave: {
registrationName: keyOf({
onMouseLeave: null
}),
dependencies: [ topLevelTypes.topMouseOut, topLevelTypes.topMouseOver ]
}
}, extractedEvents = [ null, null ], EnterLeaveEventPlugin = {
eventTypes: eventTypes,
extractEvents: function(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent) {
if (topLevelType === topLevelTypes.topMouseOver && (nativeEvent.relatedTarget || nativeEvent.fromElement)) return null;
if (topLevelType !== topLevelTypes.topMouseOut && topLevelType !== topLevelTypes.topMouseOver) return null;
var win;
if (topLevelTarget.window === topLevelTarget) win = topLevelTarget; else {
var doc = topLevelTarget.ownerDocument;
if (doc) win = doc.defaultView || doc.parentWindow; else win = window;
}
var from, to;
if (topLevelType === topLevelTypes.topMouseOut) {
from = topLevelTarget;
to = getFirstReactDOM(nativeEvent.relatedTarget || nativeEvent.toElement) || win;
} else {
from = win;
to = topLevelTarget;
}
if (from === to) return null;
var fromID = from ? ReactMount.getID(from) : "", toID = to ? ReactMount.getID(to) : "", leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, fromID, nativeEvent);
leave.type = "mouseleave";
leave.target = from;
leave.relatedTarget = to;
var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, toID, nativeEvent);
enter.type = "mouseenter";
enter.target = to;
enter.relatedTarget = from;
EventPropagators.accumulateEnterLeaveDispatches(leave, enter, fromID, toID);
extractedEvents[0] = leave;
extractedEvents[1] = enter;
return extractedEvents;
}
};
module.exports = EnterLeaveEventPlugin;
}, function(module, exports, __webpack_require__) {
"use strict";
function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent) {
SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);
}
var SyntheticUIEvent = __webpack_require__(198), ViewportMetrics = __webpack_require__(137), getEventModifierState = __webpack_require__(199), MouseEventInterface = {
screenX: null,
screenY: null,
clientX: null,
clientY: null,
ctrlKey: null,
shiftKey: null,
altKey: null,
metaKey: null,
getModifierState: getEventModifierState,
button: function(event) {
var button = event.button;
if ("which" in event) return button; else return 2 === button ? 2 : 4 === button ? 1 : 0;
},
buttons: null,
relatedTarget: function(event) {
return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);
},
pageX: function(event) {
return "pageX" in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft;
},
pageY: function(event) {
return "pageY" in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop;
}
};
SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface);
module.exports = SyntheticMouseEvent;
}, function(module, exports, __webpack_require__) {
"use strict";
function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent) {
SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);
}
var SyntheticEvent = __webpack_require__(182), getEventTarget = __webpack_require__(183), UIEventInterface = {
view: function(event) {
if (event.view) return event.view;
var target = getEventTarget(event);
if (null != target && target.window === target) return target;
var doc = target.ownerDocument;
if (doc) return doc.defaultView || doc.parentWindow; else return window;
},
detail: function(event) {
return event.detail || 0;
}
};
SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface);
module.exports = SyntheticUIEvent;
}, function(module, exports) {
"use strict";
function modifierStateGetter(keyArg) {
var syntheticEvent = this, nativeEvent = syntheticEvent.nativeEvent;
if (nativeEvent.getModifierState) return nativeEvent.getModifierState(keyArg);
var keyProp = modifierKeyToProp[keyArg];
return keyProp ? !!nativeEvent[keyProp] : !1;
}
function getEventModifierState(nativeEvent) {
return modifierStateGetter;
}
var modifierKeyToProp = {
Alt: "altKey",
Control: "ctrlKey",
Meta: "metaKey",
Shift: "shiftKey"
};
module.exports = getEventModifierState;
}, function(module, exports, __webpack_require__) {
"use strict";
var hasSVG, DOMProperty = __webpack_require__(109), ExecutionEnvironment = __webpack_require__(134), MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE, MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY, HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE, HAS_SIDE_EFFECTS = DOMProperty.injection.HAS_SIDE_EFFECTS, HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE, HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE, HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;
if (ExecutionEnvironment.canUseDOM) {
var implementation = document.implementation;
hasSVG = implementation && implementation.hasFeature && implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1");
}
var HTMLDOMPropertyConfig = {
isCustomAttribute: RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),
Properties: {
accept: null,
accessKey: null,
action: null,
allowFullScreen: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
allowTransparency: MUST_USE_ATTRIBUTE,
alt: null,
async: HAS_BOOLEAN_VALUE,
autoComplete: null,
autoPlay: HAS_BOOLEAN_VALUE,
cellPadding: null,
cellSpacing: null,
charSet: MUST_USE_ATTRIBUTE,
checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
className: hasSVG ? MUST_USE_ATTRIBUTE : MUST_USE_PROPERTY,
cols: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE,
colSpan: null,
content: null,
contentEditable: null,
contextMenu: MUST_USE_ATTRIBUTE,
controls: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
coords: null,
crossOrigin: null,
data: null,
dateTime: MUST_USE_ATTRIBUTE,
defer: HAS_BOOLEAN_VALUE,
dir: null,
disabled: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
download: HAS_OVERLOADED_BOOLEAN_VALUE,
draggable: null,
encType: null,
form: MUST_USE_ATTRIBUTE,
formNoValidate: HAS_BOOLEAN_VALUE,
frameBorder: MUST_USE_ATTRIBUTE,
height: MUST_USE_ATTRIBUTE,
hidden: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
href: null,
hrefLang: null,
htmlFor: null,
httpEquiv: null,
icon: null,
id: MUST_USE_PROPERTY,
label: null,
lang: null,
list: null,
loop: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
max: null,
maxLength: MUST_USE_ATTRIBUTE,
media: MUST_USE_ATTRIBUTE,
mediaGroup: null,
method: null,
min: null,
multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
name: null,
noValidate: HAS_BOOLEAN_VALUE,
open: null,
pattern: null,
placeholder: null,
poster: null,
preload: null,
radioGroup: null,
readOnly: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
rel: null,
required: HAS_BOOLEAN_VALUE,
role: MUST_USE_ATTRIBUTE,
rows: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE,
rowSpan: null,
sandbox: null,
scope: null,
scrollLeft: MUST_USE_PROPERTY,
scrolling: null,
scrollTop: MUST_USE_PROPERTY,
seamless: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
shape: null,
size: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE,
sizes: MUST_USE_ATTRIBUTE,
span: HAS_POSITIVE_NUMERIC_VALUE,
spellCheck: null,
src: null,
srcDoc: MUST_USE_PROPERTY,
srcSet: MUST_USE_ATTRIBUTE,
start: HAS_NUMERIC_VALUE,
step: null,
style: null,
tabIndex: null,
target: null,
title: null,
type: null,
useMap: null,
value: MUST_USE_PROPERTY | HAS_SIDE_EFFECTS,
width: MUST_USE_ATTRIBUTE,
wmode: MUST_USE_ATTRIBUTE,
autoCapitalize: null,
autoCorrect: null,
itemProp: MUST_USE_ATTRIBUTE,
itemScope: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
itemType: MUST_USE_ATTRIBUTE,
property: null
},
DOMAttributeNames: {
className: "class",
htmlFor: "for",
httpEquiv: "http-equiv"
},
DOMPropertyNames: {
autoCapitalize: "autocapitalize",
autoComplete: "autocomplete",
autoCorrect: "autocorrect",
autoFocus: "autofocus",
autoPlay: "autoplay",
encType: "enctype",
hrefLang: "hreflang",
radioGroup: "radiogroup",
spellCheck: "spellcheck",
srcDoc: "srcdoc",
srcSet: "srcset"
}
};
module.exports = HTMLDOMPropertyConfig;
}, function(module, exports, __webpack_require__) {
"use strict";
var EventConstants = __webpack_require__(117), emptyFunction = __webpack_require__(114), topLevelTypes = EventConstants.topLevelTypes, MobileSafariClickEventPlugin = {
eventTypes: null,
extractEvents: function(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent) {
if (topLevelType === topLevelTypes.topTouchStart) {
var target = nativeEvent.target;
if (target && !target.onclick) target.onclick = emptyFunction;
}
}
};
module.exports = MobileSafariClickEventPlugin;
}, function(module, exports, __webpack_require__) {
"use strict";
var ReactDOMIDOperations = __webpack_require__(203), ReactMarkupChecksum = __webpack_require__(211), ReactMount = __webpack_require__(127), ReactPerf = __webpack_require__(145), ReactReconcileTransaction = __webpack_require__(213), getReactRootElementInContainer = __webpack_require__(149), invariant = __webpack_require__(110), setInnerHTML = __webpack_require__(210), ELEMENT_NODE_TYPE = 1, DOC_NODE_TYPE = 9, ReactComponentBrowserEnvironment = {
ReactReconcileTransaction: ReactReconcileTransaction,
BackendIDOperations: ReactDOMIDOperations,
unmountIDFromEnvironment: function(rootNodeID) {
ReactMount.purgeID(rootNodeID);
},
mountImageIntoNode: ReactPerf.measure("ReactComponentBrowserEnvironment", "mountImageIntoNode", function(markup, container, shouldReuseMarkup) {
!0 ? invariant(container && (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE), "mountComponentIntoNode(...): Target container is not valid.") : invariant(container && (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE));
if (shouldReuseMarkup) if (ReactMarkupChecksum.canReuseMarkup(markup, getReactRootElementInContainer(container))) return; else {
!0 ? invariant(container.nodeType !== DOC_NODE_TYPE, "You're trying to render a component to the document using server rendering but the checksum was invalid. This usually means you rendered a different component type or props on the client from the one on the server, or your render() methods are impure. React cannot handle this case due to cross-browser quirks by rendering at the document root. You should look for environment dependent code in your components and ensure the props are the same client and server side.") : invariant(container.nodeType !== DOC_NODE_TYPE);
if (!0) console.warn("React attempted to use reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server.");
}
!0 ? invariant(container.nodeType !== DOC_NODE_TYPE, "You're trying to render a component to the document but you didn't use server rendering. We can't do this without using server rendering due to cross-browser quirks. See renderComponentToString() for server rendering.") : invariant(container.nodeType !== DOC_NODE_TYPE);
setInnerHTML(container, markup);
})
};
module.exports = ReactComponentBrowserEnvironment;
}, function(module, exports, __webpack_require__) {
"use strict";
var CSSPropertyOperations = __webpack_require__(169), DOMChildrenOperations = __webpack_require__(204), DOMPropertyOperations = __webpack_require__(108), ReactMount = __webpack_require__(127), ReactPerf = __webpack_require__(145), invariant = __webpack_require__(110), setInnerHTML = __webpack_require__(210), INVALID_PROPERTY_ERRORS = {
dangerouslySetInnerHTML: "`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",
style: "`style` must be set using `updateStylesByID()`."
}, ReactDOMIDOperations = {
updatePropertyByID: ReactPerf.measure("ReactDOMIDOperations", "updatePropertyByID", function(id, name, value) {
var node = ReactMount.getNode(id);
!0 ? invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name), "updatePropertyByID(...): %s", INVALID_PROPERTY_ERRORS[name]) : invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name));
if (null != value) DOMPropertyOperations.setValueForProperty(node, name, value); else DOMPropertyOperations.deleteValueForProperty(node, name);
}),
deletePropertyByID: ReactPerf.measure("ReactDOMIDOperations", "deletePropertyByID", function(id, name, value) {
var node = ReactMount.getNode(id);
!0 ? invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name), "updatePropertyByID(...): %s", INVALID_PROPERTY_ERRORS[name]) : invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name));
DOMPropertyOperations.deleteValueForProperty(node, name, value);
}),
updateStylesByID: ReactPerf.measure("ReactDOMIDOperations", "updateStylesByID", function(id, styles) {
var node = ReactMount.getNode(id);
CSSPropertyOperations.setValueForStyles(node, styles);
}),
updateInnerHTMLByID: ReactPerf.measure("ReactDOMIDOperations", "updateInnerHTMLByID", function(id, html) {
var node = ReactMount.getNode(id);
setInnerHTML(node, html);
}),
updateTextContentByID: ReactPerf.measure("ReactDOMIDOperations", "updateTextContentByID", function(id, content) {
var node = ReactMount.getNode(id);
DOMChildrenOperations.updateTextContent(node, content);
}),
dangerouslyReplaceNodeWithMarkupByID: ReactPerf.measure("ReactDOMIDOperations", "dangerouslyReplaceNodeWithMarkupByID", function(id, markup) {
var node = ReactMount.getNode(id);
DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup(node, markup);
}),
dangerouslyProcessChildrenUpdates: ReactPerf.measure("ReactDOMIDOperations", "dangerouslyProcessChildrenUpdates", function(updates, markup) {
for (var i = 0; i < updates.length; i++) updates[i].parentNode = ReactMount.getNode(updates[i].parentID);
DOMChildrenOperations.processUpdates(updates, markup);
})
};
module.exports = ReactDOMIDOperations;
}, function(module, exports, __webpack_require__) {
"use strict";
function insertChildAt(parentNode, childNode, index) {
parentNode.insertBefore(childNode, parentNode.childNodes[index] || null);
}
var updateTextContent, Danger = __webpack_require__(205), ReactMultiChildUpdateTypes = __webpack_require__(175), getTextContentAccessor = __webpack_require__(191), invariant = __webpack_require__(110), textContentAccessor = getTextContentAccessor();
if ("textContent" === textContentAccessor) updateTextContent = function(node, text) {
node.textContent = text;
}; else updateTextContent = function(node, text) {
for (;node.firstChild; ) node.removeChild(node.firstChild);
if (text) {
var doc = node.ownerDocument || document;
node.appendChild(doc.createTextNode(text));
}
};
var DOMChildrenOperations = {
dangerouslyReplaceNodeWithMarkup: Danger.dangerouslyReplaceNodeWithMarkup,
updateTextContent: updateTextContent,
processUpdates: function(updates, markupList) {
for (var update, initialChildren = null, updatedChildren = null, i = 0; update = updates[i]; i++) if (update.type === ReactMultiChildUpdateTypes.MOVE_EXISTING || update.type === ReactMultiChildUpdateTypes.REMOVE_NODE) {
var updatedIndex = update.fromIndex, updatedChild = update.parentNode.childNodes[updatedIndex], parentID = update.parentID;
!0 ? invariant(updatedChild, "processUpdates(): Unable to find child %s of element. This probably means the DOM was unexpectedly mutated (e.g., by the browser), usually due to forgetting a <tbody> when using tables, nesting <p> or <a> tags, or using non-SVG elements in an <svg> parent. Try inspecting the child nodes of the element with React ID `%s`.", updatedIndex, parentID) : invariant(updatedChild);
initialChildren = initialChildren || {};
initialChildren[parentID] = initialChildren[parentID] || [];
initialChildren[parentID][updatedIndex] = updatedChild;
updatedChildren = updatedChildren || [];
updatedChildren.push(updatedChild);
}
var renderedMarkup = Danger.dangerouslyRenderMarkup(markupList);
if (updatedChildren) for (var j = 0; j < updatedChildren.length; j++) updatedChildren[j].parentNode.removeChild(updatedChildren[j]);
for (var k = 0; update = updates[k]; k++) switch (update.type) {
case ReactMultiChildUpdateTypes.INSERT_MARKUP:
insertChildAt(update.parentNode, renderedMarkup[update.markupIndex], update.toIndex);
break;
case ReactMultiChildUpdateTypes.MOVE_EXISTING:
insertChildAt(update.parentNode, initialChildren[update.parentID][update.fromIndex], update.toIndex);
break;
case ReactMultiChildUpdateTypes.TEXT_CONTENT:
updateTextContent(update.parentNode, update.textContent);
break;
case ReactMultiChildUpdateTypes.REMOVE_NODE: }
}
};
module.exports = DOMChildrenOperations;
}, function(module, exports, __webpack_require__) {
"use strict";
function getNodeName(markup) {
return markup.substring(1, markup.indexOf(" "));
}
var ExecutionEnvironment = __webpack_require__(134), createNodesFromMarkup = __webpack_require__(206), emptyFunction = __webpack_require__(114), getMarkupWrap = __webpack_require__(209), invariant = __webpack_require__(110), OPEN_TAG_NAME_EXP = /^(<[^ \/>]+)/, RESULT_INDEX_ATTR = "data-danger-index", Danger = {
dangerouslyRenderMarkup: function(markupList) {
!0 ? invariant(ExecutionEnvironment.canUseDOM, "dangerouslyRenderMarkup(...): Cannot render markup in a Worker thread. This is likely a bug in the framework. Please report immediately.") : invariant(ExecutionEnvironment.canUseDOM);
for (var nodeName, markupByNodeName = {}, i = 0; i < markupList.length; i++) {
!0 ? invariant(markupList[i], "dangerouslyRenderMarkup(...): Missing markup.") : invariant(markupList[i]);
nodeName = getNodeName(markupList[i]);
nodeName = getMarkupWrap(nodeName) ? nodeName : "*";
markupByNodeName[nodeName] = markupByNodeName[nodeName] || [];
markupByNodeName[nodeName][i] = markupList[i];
}
var resultList = [], resultListAssignmentCount = 0;
for (nodeName in markupByNodeName) if (markupByNodeName.hasOwnProperty(nodeName)) {
var markupListByNodeName = markupByNodeName[nodeName];
for (var resultIndex in markupListByNodeName) if (markupListByNodeName.hasOwnProperty(resultIndex)) {
var markup = markupListByNodeName[resultIndex];
markupListByNodeName[resultIndex] = markup.replace(OPEN_TAG_NAME_EXP, "$1 " + RESULT_INDEX_ATTR + '="' + resultIndex + '" ');
}
var renderNodes = createNodesFromMarkup(markupListByNodeName.join(""), emptyFunction);
for (i = 0; i < renderNodes.length; ++i) {
var renderNode = renderNodes[i];
if (renderNode.hasAttribute && renderNode.hasAttribute(RESULT_INDEX_ATTR) || renderNode.getAttributeNode && null !== renderNode.getAttributeNode(RESULT_INDEX_ATTR)) {
resultIndex = +renderNode.getAttribute(RESULT_INDEX_ATTR);
renderNode.removeAttribute(RESULT_INDEX_ATTR);
!0 ? invariant(!resultList.hasOwnProperty(resultIndex), "Danger: Assigning to an already-occupied result index.") : invariant(!resultList.hasOwnProperty(resultIndex));
resultList[resultIndex] = renderNode;
resultListAssignmentCount += 1;
} else if (!0) console.error("Danger: Discarding unexpected node:", renderNode);
}
} else ;
!0 ? invariant(resultListAssignmentCount === resultList.length, "Danger: Did not assign to every index of resultList.") : invariant(resultListAssignmentCount === resultList.length);
!0 ? invariant(resultList.length === markupList.length, "Danger: Expected markup to render %s nodes, but rendered %s.", markupList.length, resultList.length) : invariant(resultList.length === markupList.length);
return resultList;
},
dangerouslyReplaceNodeWithMarkup: function(oldChild, markup) {
!0 ? invariant(ExecutionEnvironment.canUseDOM, "dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. This is likely a bug in the framework. Please report immediately.") : invariant(ExecutionEnvironment.canUseDOM);
!0 ? invariant(markup, "dangerouslyReplaceNodeWithMarkup(...): Missing markup.") : invariant(markup);
!0 ? invariant("html" !== oldChild.tagName.toLowerCase(), "dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the <html> node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See renderComponentToString().") : invariant("html" !== oldChild.tagName.toLowerCase());
var newChild = createNodesFromMarkup(markup, emptyFunction)[0];
oldChild.parentNode.replaceChild(newChild, oldChild);
}
};
module.exports = Danger;
}, function(module, exports, __webpack_require__) {
function getNodeName(markup) {
var nodeNameMatch = markup.match(nodeNamePattern);
return nodeNameMatch && nodeNameMatch[1].toLowerCase();
}
function createNodesFromMarkup(markup, handleScript) {
var node = dummyNode;
!0 ? invariant(!!dummyNode, "createNodesFromMarkup dummy not initialized") : invariant(!!dummyNode);
var nodeName = getNodeName(markup), wrap = nodeName && getMarkupWrap(nodeName);
if (wrap) {
node.innerHTML = wrap[1] + markup + wrap[2];
for (var wrapDepth = wrap[0]; wrapDepth--; ) node = node.lastChild;
} else node.innerHTML = markup;
var scripts = node.getElementsByTagName("script");
if (scripts.length) {
!0 ? invariant(handleScript, "createNodesFromMarkup(...): Unexpected <script> element rendered.") : invariant(handleScript);
createArrayFrom(scripts).forEach(handleScript);
}
for (var nodes = createArrayFrom(node.childNodes); node.lastChild; ) node.removeChild(node.lastChild);
return nodes;
}
var ExecutionEnvironment = __webpack_require__(134), createArrayFrom = __webpack_require__(207), getMarkupWrap = __webpack_require__(209), invariant = __webpack_require__(110), dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement("div") : null, nodeNamePattern = /^\s*<(\w+)/;
module.exports = createNodesFromMarkup;
}, function(module, exports, __webpack_require__) {
function hasArrayNature(obj) {
return !!obj && ("object" == typeof obj || "function" == typeof obj) && "length" in obj && !("setInterval" in obj) && "number" != typeof obj.nodeType && (Array.isArray(obj) || "callee" in obj || "item" in obj);
}
function createArrayFrom(obj) {
if (!hasArrayNature(obj)) return [ obj ]; else if (Array.isArray(obj)) return obj.slice(); else return toArray(obj);
}
var toArray = __webpack_require__(208);
module.exports = createArrayFrom;
}, function(module, exports, __webpack_require__) {
function toArray(obj) {
var length = obj.length;
!0 ? invariant(!Array.isArray(obj) && ("object" == typeof obj || "function" == typeof obj), "toArray: Array-like object expected") : invariant(!Array.isArray(obj) && ("object" == typeof obj || "function" == typeof obj));
!0 ? invariant("number" == typeof length, "toArray: Object needs a length property") : invariant("number" == typeof length);
!0 ? invariant(0 === length || length - 1 in obj, "toArray: Object should have keys for indices") : invariant(0 === length || length - 1 in obj);
if (obj.hasOwnProperty) try {
return Array.prototype.slice.call(obj);
} catch (e) {}
for (var ret = Array(length), ii = 0; length > ii; ii++) ret[ii] = obj[ii];
return ret;
}
var invariant = __webpack_require__(110);
module.exports = toArray;
}, function(module, exports, __webpack_require__) {
function getMarkupWrap(nodeName) {
!0 ? invariant(!!dummyNode, "Markup wrapping node not initialized") : invariant(!!dummyNode);
if (!markupWrap.hasOwnProperty(nodeName)) nodeName = "*";
if (!shouldWrap.hasOwnProperty(nodeName)) {
if ("*" === nodeName) dummyNode.innerHTML = "<link />"; else dummyNode.innerHTML = "<" + nodeName + "></" + nodeName + ">";
shouldWrap[nodeName] = !dummyNode.firstChild;
}
return shouldWrap[nodeName] ? markupWrap[nodeName] : null;
}
var ExecutionEnvironment = __webpack_require__(134), invariant = __webpack_require__(110), dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement("div") : null, shouldWrap = {
circle: !0,
defs: !0,
ellipse: !0,
g: !0,
line: !0,
linearGradient: !0,
path: !0,
polygon: !0,
polyline: !0,
radialGradient: !0,
rect: !0,
stop: !0,
text: !0
}, selectWrap = [ 1, '<select multiple="true">', "</select>" ], tableWrap = [ 1, "<table>", "</table>" ], trWrap = [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], svgWrap = [ 1, "<svg>", "</svg>" ], markupWrap = {
"*": [ 1, "?<div>", "</div>" ],
area: [ 1, "<map>", "</map>" ],
col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
legend: [ 1, "<fieldset>", "</fieldset>" ],
param: [ 1, "<object>", "</object>" ],
tr: [ 2, "<table><tbody>", "</tbody></table>" ],
optgroup: selectWrap,
option: selectWrap,
caption: tableWrap,
colgroup: tableWrap,
tbody: tableWrap,
tfoot: tableWrap,
thead: tableWrap,
td: trWrap,
th: trWrap,
circle: svgWrap,
defs: svgWrap,
ellipse: svgWrap,
g: svgWrap,
line: svgWrap,
linearGradient: svgWrap,
path: svgWrap,
polygon: svgWrap,
polyline: svgWrap,
radialGradient: svgWrap,
rect: svgWrap,
stop: svgWrap,
text: svgWrap
};
module.exports = getMarkupWrap;
}, function(module, exports, __webpack_require__) {
"use strict";
var ExecutionEnvironment = __webpack_require__(134), setInnerHTML = function(node, html) {
node.innerHTML = html;
};
if (ExecutionEnvironment.canUseDOM) {
var testElement = document.createElement("div");
testElement.innerHTML = " ";
if ("" === testElement.innerHTML) setInnerHTML = function(node, html) {
if (node.parentNode) node.parentNode.replaceChild(node, node);
if (html.match(/^[ \r\n\t\f]/) || "<" === html.charAt(0) && (-1 !== html.indexOf("<noscript") || -1 !== html.indexOf("<script") || -1 !== html.indexOf("<style") || -1 !== html.indexOf("<meta") || -1 !== html.indexOf("<link"))) {
node.innerHTML = "\ufeff" + html;
var textNode = node.firstChild;
if (1 === textNode.data.length) node.removeChild(textNode); else textNode.deleteData(0, 1);
} else node.innerHTML = html;
};
}
module.exports = setInnerHTML;
}, function(module, exports, __webpack_require__) {
"use strict";
var adler32 = __webpack_require__(212), ReactMarkupChecksum = {
CHECKSUM_ATTR_NAME: "data-react-checksum",
addChecksumToMarkup: function(markup) {
var checksum = adler32(markup);
return markup.replace(">", " " + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '">');
},
canReuseMarkup: function(markup, element) {
var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
existingChecksum = existingChecksum && parseInt(existingChecksum, 10);
var markupChecksum = adler32(markup);
return markupChecksum === existingChecksum;
}
};
module.exports = ReactMarkupChecksum;
}, function(module, exports) {
"use strict";
function adler32(data) {
for (var a = 1, b = 0, i = 0; i < data.length; i++) {
a = (a + data.charCodeAt(i)) % MOD;
b = (b + a) % MOD;
}
return a | b << 16;
}
var MOD = 65521;
module.exports = adler32;
}, function(module, exports, __webpack_require__) {
"use strict";
function ReactReconcileTransaction() {
this.reinitializeTransaction();
this.renderToStaticMarkup = !1;
this.reactMountReady = CallbackQueue.getPooled(null);
this.putListenerQueue = ReactPutListenerQueue.getPooled();
}
var CallbackQueue = __webpack_require__(156), PooledClass = __webpack_require__(120), ReactBrowserEventEmitter = __webpack_require__(128), ReactInputSelection = __webpack_require__(188), ReactPutListenerQueue = __webpack_require__(214), Transaction = __webpack_require__(158), mixInto = __webpack_require__(157), SELECTION_RESTORATION = {
initialize: ReactInputSelection.getSelectionInformation,
close: ReactInputSelection.restoreSelection
}, EVENT_SUPPRESSION = {
initialize: function() {
var currentlyEnabled = ReactBrowserEventEmitter.isEnabled();
ReactBrowserEventEmitter.setEnabled(!1);
return currentlyEnabled;
},
close: function(previouslyEnabled) {
ReactBrowserEventEmitter.setEnabled(previouslyEnabled);
}
}, ON_DOM_READY_QUEUEING = {
initialize: function() {
this.reactMountReady.reset();
},
close: function() {
this.reactMountReady.notifyAll();
}
}, PUT_LISTENER_QUEUEING = {
initialize: function() {
this.putListenerQueue.reset();
},
close: function() {
this.putListenerQueue.putListeners();
}
}, TRANSACTION_WRAPPERS = [ PUT_LISTENER_QUEUEING, SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING ], Mixin = {
getTransactionWrappers: function() {
return TRANSACTION_WRAPPERS;
},
getReactMountReady: function() {
return this.reactMountReady;
},
getPutListenerQueue: function() {
return this.putListenerQueue;
},
destructor: function() {
CallbackQueue.release(this.reactMountReady);
this.reactMountReady = null;
ReactPutListenerQueue.release(this.putListenerQueue);
this.putListenerQueue = null;
}
};
mixInto(ReactReconcileTransaction, Transaction.Mixin);
mixInto(ReactReconcileTransaction, Mixin);
PooledClass.addPoolingTo(ReactReconcileTransaction);
module.exports = ReactReconcileTransaction;
}, function(module, exports, __webpack_require__) {
"use strict";
function ReactPutListenerQueue() {
this.listenersToPut = [];
}
var PooledClass = __webpack_require__(120), ReactBrowserEventEmitter = __webpack_require__(128), mixInto = __webpack_require__(157);
mixInto(ReactPutListenerQueue, {
enqueuePutListener: function(rootNodeID, propKey, propValue) {
this.listenersToPut.push({
rootNodeID: rootNodeID,
propKey: propKey,
propValue: propValue
});
},
putListeners: function() {
for (var i = 0; i < this.listenersToPut.length; i++) {
var listenerToPut = this.listenersToPut[i];
ReactBrowserEventEmitter.putListener(listenerToPut.rootNodeID, listenerToPut.propKey, listenerToPut.propValue);
}
},
reset: function() {
this.listenersToPut.length = 0;
},
destructor: function() {
this.reset();
}
});
PooledClass.addPoolingTo(ReactPutListenerQueue);
module.exports = ReactPutListenerQueue;
}, function(module, exports, __webpack_require__) {
"use strict";
function ReactDefaultBatchingStrategyTransaction() {
this.reinitializeTransaction();
}
var ReactUpdates = __webpack_require__(155), Transaction = __webpack_require__(158), emptyFunction = __webpack_require__(114), mixInto = __webpack_require__(157), RESET_BATCHED_UPDATES = {
initialize: emptyFunction,
close: function() {
ReactDefaultBatchingStrategy.isBatchingUpdates = !1;
}
}, FLUSH_BATCHED_UPDATES = {
initialize: emptyFunction,
close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates)
}, TRANSACTION_WRAPPERS = [ FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES ];
mixInto(ReactDefaultBatchingStrategyTransaction, Transaction.Mixin);
mixInto(ReactDefaultBatchingStrategyTransaction, {
getTransactionWrappers: function() {
return TRANSACTION_WRAPPERS;
}
});
var transaction = new ReactDefaultBatchingStrategyTransaction(), ReactDefaultBatchingStrategy = {
isBatchingUpdates: !1,
batchedUpdates: function(callback, a, b) {
var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates;
ReactDefaultBatchingStrategy.isBatchingUpdates = !0;
if (alreadyBatchingUpdates) callback(a, b); else transaction.perform(callback, null, a, b);
}
};
module.exports = ReactDefaultBatchingStrategy;
}, function(module, exports, __webpack_require__) {
"use strict";
var AutoFocusMixin = __webpack_require__(217), ReactBrowserComponentMixin = __webpack_require__(125), ReactCompositeComponent = __webpack_require__(159), ReactDOM = __webpack_require__(167), keyMirror = __webpack_require__(118), button = ReactDOM.button, mouseListenerNames = keyMirror({
onClick: !0,
onDoubleClick: !0,
onMouseDown: !0,
onMouseMove: !0,
onMouseUp: !0,
onClickCapture: !0,
onDoubleClickCapture: !0,
onMouseDownCapture: !0,
onMouseMoveCapture: !0,
onMouseUpCapture: !0
}), ReactDOMButton = ReactCompositeComponent.createClass({
displayName: "ReactDOMButton",
mixins: [ AutoFocusMixin, ReactBrowserComponentMixin ],
render: function() {
var props = {};
for (var key in this.props) if (this.props.hasOwnProperty(key) && (!this.props.disabled || !mouseListenerNames[key])) props[key] = this.props[key];
return button(props, this.props.children);
}
});
module.exports = ReactDOMButton;
}, function(module, exports, __webpack_require__) {
"use strict";
var focusNode = __webpack_require__(192), AutoFocusMixin = {
componentDidMount: function() {
if (this.props.autoFocus) focusNode(this.getDOMNode());
}
};
module.exports = AutoFocusMixin;
}, function(module, exports, __webpack_require__) {
"use strict";
var EventConstants = __webpack_require__(117), LocalEventTrapMixin = __webpack_require__(219), ReactBrowserComponentMixin = __webpack_require__(125), ReactCompositeComponent = __webpack_require__(159), ReactDOM = __webpack_require__(167), form = ReactDOM.form, ReactDOMForm = ReactCompositeComponent.createClass({
displayName: "ReactDOMForm",
mixins: [ ReactBrowserComponentMixin, LocalEventTrapMixin ],
render: function() {
return this.transferPropsTo(form(null, this.props.children));
},
componentDidMount: function() {
this.trapBubbledEvent(EventConstants.topLevelTypes.topReset, "reset");
this.trapBubbledEvent(EventConstants.topLevelTypes.topSubmit, "submit");
}
});
module.exports = ReactDOMForm;
}, function(module, exports, __webpack_require__) {
"use strict";
function remove(event) {
event.remove();
}
var ReactBrowserEventEmitter = __webpack_require__(128), accumulate = __webpack_require__(131), forEachAccumulated = __webpack_require__(132), invariant = __webpack_require__(110), LocalEventTrapMixin = {
trapBubbledEvent: function(topLevelType, handlerBaseName) {
!0 ? invariant(this.isMounted(), "Must be mounted to trap events") : invariant(this.isMounted());
var listener = ReactBrowserEventEmitter.trapBubbledEvent(topLevelType, handlerBaseName, this.getDOMNode());
this._localEventListeners = accumulate(this._localEventListeners, listener);
},
componentWillUnmount: function() {
if (this._localEventListeners) forEachAccumulated(this._localEventListeners, remove);
}
};
module.exports = LocalEventTrapMixin;
}, function(module, exports, __webpack_require__) {
"use strict";
var EventConstants = __webpack_require__(117), LocalEventTrapMixin = __webpack_require__(219), ReactBrowserComponentMixin = __webpack_require__(125), ReactCompositeComponent = __webpack_require__(159), ReactDOM = __webpack_require__(167), img = ReactDOM.img, ReactDOMImg = ReactCompositeComponent.createClass({
displayName: "ReactDOMImg",
tagName: "IMG",
mixins: [ ReactBrowserComponentMixin, LocalEventTrapMixin ],
render: function() {
return img(this.props);
},
componentDidMount: function() {
this.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, "load");
this.trapBubbledEvent(EventConstants.topLevelTypes.topError, "error");
}
});
module.exports = ReactDOMImg;
}, function(module, exports, __webpack_require__) {
"use strict";
var AutoFocusMixin = __webpack_require__(217), DOMPropertyOperations = __webpack_require__(108), LinkedValueUtils = __webpack_require__(222), ReactBrowserComponentMixin = __webpack_require__(125), ReactCompositeComponent = __webpack_require__(159), ReactDOM = __webpack_require__(167), ReactMount = __webpack_require__(127), invariant = __webpack_require__(110), merge = __webpack_require__(139), input = ReactDOM.input, instancesByReactID = {}, ReactDOMInput = ReactCompositeComponent.createClass({
displayName: "ReactDOMInput",
mixins: [ AutoFocusMixin, LinkedValueUtils.Mixin, ReactBrowserComponentMixin ],
getInitialState: function() {
var defaultValue = this.props.defaultValue;
return {
checked: this.props.defaultChecked || !1,
value: null != defaultValue ? defaultValue : null
};
},
shouldComponentUpdate: function() {
return !this._isChanging;
},
render: function() {
var props = merge(this.props);
props.defaultChecked = null;
props.defaultValue = null;
var value = LinkedValueUtils.getValue(this);
props.value = null != value ? value : this.state.value;
var checked = LinkedValueUtils.getChecked(this);
props.checked = null != checked ? checked : this.state.checked;
props.onChange = this._handleChange;
return input(props, this.props.children);
},
componentDidMount: function() {
var id = ReactMount.getID(this.getDOMNode());
instancesByReactID[id] = this;
},
componentWillUnmount: function() {
var rootNode = this.getDOMNode(), id = ReactMount.getID(rootNode);
delete instancesByReactID[id];
},
componentDidUpdate: function(prevProps, prevState, prevContext) {
var rootNode = this.getDOMNode();
if (null != this.props.checked) DOMPropertyOperations.setValueForProperty(rootNode, "checked", this.props.checked || !1);
var value = LinkedValueUtils.getValue(this);
if (null != value) DOMPropertyOperations.setValueForProperty(rootNode, "value", "" + value);
},
_handleChange: function(event) {
var returnValue, onChange = LinkedValueUtils.getOnChange(this);
if (onChange) {
this._isChanging = !0;
returnValue = onChange.call(this, event);
this._isChanging = !1;
}
this.setState({
checked: event.target.checked,
value: event.target.value
});
var name = this.props.name;
if ("radio" === this.props.type && null != name) {
for (var rootNode = this.getDOMNode(), queryRoot = rootNode; queryRoot.parentNode; ) queryRoot = queryRoot.parentNode;
for (var group = queryRoot.querySelectorAll("input[name=" + JSON.stringify("" + name) + '][type="radio"]'), i = 0, groupLen = group.length; groupLen > i; i++) {
var otherNode = group[i];
if (otherNode !== rootNode && otherNode.form === rootNode.form) {
var otherID = ReactMount.getID(otherNode);
!0 ? invariant(otherID, "ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.") : invariant(otherID);
var otherInstance = instancesByReactID[otherID];
!0 ? invariant(otherInstance, "ReactDOMInput: Unknown radio button ID %s.", otherID) : invariant(otherInstance);
otherInstance.setState({
checked: !1
});
} else ;
}
}
return returnValue;
}
});
module.exports = ReactDOMInput;
}, function(module, exports, __webpack_require__) {
"use strict";
function _assertSingleLink(input) {
!0 ? invariant(null == input.props.checkedLink || null == input.props.valueLink, "Cannot provide a checkedLink and a valueLink. If you want to use checkedLink, you probably don't want to use valueLink and vice versa.") : invariant(null == input.props.checkedLink || null == input.props.valueLink);
}
function _assertValueLink(input) {
_assertSingleLink(input);
!0 ? invariant(null == input.props.value && null == input.props.onChange, "Cannot provide a valueLink and a value or onChange event. If you want to use value or onChange, you probably don't want to use valueLink.") : invariant(null == input.props.value && null == input.props.onChange);
}
function _assertCheckedLink(input) {
_assertSingleLink(input);
!0 ? invariant(null == input.props.checked && null == input.props.onChange, "Cannot provide a checkedLink and a checked property or onChange event. If you want to use checked or onChange, you probably don't want to use checkedLink") : invariant(null == input.props.checked && null == input.props.onChange);
}
function _handleLinkedValueChange(e) {
this.props.valueLink.requestChange(e.target.value);
}
function _handleLinkedCheckChange(e) {
this.props.checkedLink.requestChange(e.target.checked);
}
var ReactPropTypes = __webpack_require__(223), invariant = __webpack_require__(110), hasReadOnlyValue = {
button: !0,
checkbox: !0,
image: !0,
hidden: !0,
radio: !0,
reset: !0,
submit: !0
}, LinkedValueUtils = {
Mixin: {
propTypes: {
value: function(props, propName, componentName) {
if (!(!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled)) return new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."); else ;
},
checked: function(props, propName, componentName) {
if (props[propName] && !props.onChange && !props.readOnly && !props.disabled) return new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`."); else ;
},
onChange: ReactPropTypes.func
}
},
getValue: function(input) {
if (input.props.valueLink) {
_assertValueLink(input);
return input.props.valueLink.value;
}
return input.props.value;
},
getChecked: function(input) {
if (input.props.checkedLink) {
_assertCheckedLink(input);
return input.props.checkedLink.value;
}
return input.props.checked;
},
getOnChange: function(input) {
if (input.props.valueLink) {
_assertValueLink(input);
return _handleLinkedValueChange;
} else if (input.props.checkedLink) {
_assertCheckedLink(input);
return _handleLinkedCheckChange;
}
return input.props.onChange;
}
};
module.exports = LinkedValueUtils;
}, function(module, exports, __webpack_require__) {
"use strict";
function createChainableTypeChecker(validate) {
function checkType(isRequired, props, propName, componentName, location) {
componentName = componentName || ANONYMOUS;
if (null == props[propName]) {
var locationName = ReactPropTypeLocationNames[location];
if (isRequired) return new Error("Required " + locationName + " `" + propName + "` was not specified in " + ("`" + componentName + "`."));
} else return validate(props, propName, componentName, location);
}
var chainedCheckType = checkType.bind(null, !1);
chainedCheckType.isRequired = checkType.bind(null, !0);
return chainedCheckType;
}
function createPrimitiveTypeChecker(expectedType) {
function validate(props, propName, componentName, location) {
var propValue = props[propName], propType = getPropType(propValue);
if (propType !== expectedType) {
var locationName = ReactPropTypeLocationNames[location], preciseType = getPreciseType(propValue);
return new Error("Invalid " + locationName + " `" + propName + "` of type `" + preciseType + "` " + ("supplied to `" + componentName + "`, expected `" + expectedType + "`."));
}
}
return createChainableTypeChecker(validate);
}
function createAnyTypeChecker() {
return createChainableTypeChecker(emptyFunction.thatReturns());
}
function createArrayOfTypeChecker(typeChecker) {
function validate(props, propName, componentName, location) {
var propValue = props[propName];
if (!Array.isArray(propValue)) {
var locationName = ReactPropTypeLocationNames[location], propType = getPropType(propValue);
return new Error("Invalid " + locationName + " `" + propName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
}
for (var i = 0; i < propValue.length; i++) {
var error = typeChecker(propValue, i, componentName, location);
if (error instanceof Error) return error;
}
}
return createChainableTypeChecker(validate);
}
function createComponentTypeChecker() {
function validate(props, propName, componentName, location) {
if (!ReactDescriptor.isValidDescriptor(props[propName])) {
var locationName = ReactPropTypeLocationNames[location];
return new Error("Invalid " + locationName + " `" + propName + "` supplied to " + ("`" + componentName + "`, expected a React component."));
}
}
return createChainableTypeChecker(validate);
}
function createInstanceTypeChecker(expectedClass) {
function validate(props, propName, componentName, location) {
if (!(props[propName] instanceof expectedClass)) {
var locationName = ReactPropTypeLocationNames[location], expectedClassName = expectedClass.name || ANONYMOUS;
return new Error("Invalid " + locationName + " `" + propName + "` supplied to " + ("`" + componentName + "`, expected instance of `" + expectedClassName + "`."));
}
}
return createChainableTypeChecker(validate);
}
function createEnumTypeChecker(expectedValues) {
function validate(props, propName, componentName, location) {
for (var propValue = props[propName], i = 0; i < expectedValues.length; i++) if (propValue === expectedValues[i]) return;
var locationName = ReactPropTypeLocationNames[location], valuesString = JSON.stringify(expectedValues);
return new Error("Invalid " + locationName + " `" + propName + "` of value `" + propValue + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
}
return createChainableTypeChecker(validate);
}
function createObjectOfTypeChecker(typeChecker) {
function validate(props, propName, componentName, location) {
var propValue = props[propName], propType = getPropType(propValue);
if ("object" !== propType) {
var locationName = ReactPropTypeLocationNames[location];
return new Error("Invalid " + locationName + " `" + propName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
}
for (var key in propValue) if (propValue.hasOwnProperty(key)) {
var error = typeChecker(propValue, key, componentName, location);
if (error instanceof Error) return error;
}
}
return createChainableTypeChecker(validate);
}
function createUnionTypeChecker(arrayOfTypeCheckers) {
function validate(props, propName, componentName, location) {
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
var checker = arrayOfTypeCheckers[i];
if (null == checker(props, propName, componentName, location)) return;
}
var locationName = ReactPropTypeLocationNames[location];
return new Error("Invalid " + locationName + " `" + propName + "` supplied to " + ("`" + componentName + "`."));
}
return createChainableTypeChecker(validate);
}
function createRenderableTypeChecker() {
function validate(props, propName, componentName, location) {
if (!isRenderable(props[propName])) {
var locationName = ReactPropTypeLocationNames[location];
return new Error("Invalid " + locationName + " `" + propName + "` supplied to " + ("`" + componentName + "`, expected a renderable prop."));
}
}
return createChainableTypeChecker(validate);
}
function createShapeTypeChecker(shapeTypes) {
function validate(props, propName, componentName, location) {
var propValue = props[propName], propType = getPropType(propValue);
if ("object" !== propType) {
var locationName = ReactPropTypeLocationNames[location];
return new Error("Invalid " + locationName + " `" + propName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
}
for (var key in shapeTypes) {
var checker = shapeTypes[key];
if (checker) {
var error = checker(propValue, key, componentName, location);
if (error) return error;
} else ;
}
}
return createChainableTypeChecker(validate, "expected `object`");
}
function isRenderable(propValue) {
switch (typeof propValue) {
case "number":
case "string":
return !0;
case "boolean":
return !propValue;
case "object":
if (Array.isArray(propValue)) return propValue.every(isRenderable);
if (ReactDescriptor.isValidDescriptor(propValue)) return !0;
for (var k in propValue) if (!isRenderable(propValue[k])) return !1;
return !0;
default:
return !1;
}
}
function getPropType(propValue) {
var propType = typeof propValue;
if (Array.isArray(propValue)) return "array";
if (propValue instanceof RegExp) return "object"; else return propType;
}
function getPreciseType(propValue) {
var propType = getPropType(propValue);
if ("object" === propType) if (propValue instanceof Date) return "date"; else if (propValue instanceof RegExp) return "regexp";
return propType;
}
var ReactDescriptor = __webpack_require__(143), ReactPropTypeLocationNames = __webpack_require__(165), emptyFunction = __webpack_require__(114), ANONYMOUS = "<<anonymous>>", ReactPropTypes = {
array: createPrimitiveTypeChecker("array"),
bool: createPrimitiveTypeChecker("boolean"),
func: createPrimitiveTypeChecker("function"),
number: createPrimitiveTypeChecker("number"),
object: createPrimitiveTypeChecker("object"),
string: createPrimitiveTypeChecker("string"),
any: createAnyTypeChecker(),
arrayOf: createArrayOfTypeChecker,
component: createComponentTypeChecker(),
instanceOf: createInstanceTypeChecker,
objectOf: createObjectOfTypeChecker,
oneOf: createEnumTypeChecker,
oneOfType: createUnionTypeChecker,
renderable: createRenderableTypeChecker(),
shape: createShapeTypeChecker
};
module.exports = ReactPropTypes;
}, function(module, exports, __webpack_require__) {
"use strict";
var ReactBrowserComponentMixin = __webpack_require__(125), ReactCompositeComponent = __webpack_require__(159), ReactDOM = __webpack_require__(167), warning = __webpack_require__(113), option = ReactDOM.option, ReactDOMOption = ReactCompositeComponent.createClass({
displayName: "ReactDOMOption",
mixins: [ ReactBrowserComponentMixin ],
componentWillMount: function() {
if (!0) !0 ? warning(null == this.props.selected, "Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>.") : null;
},
render: function() {
return option(this.props, this.props.children);
}
});
module.exports = ReactDOMOption;
}, function(module, exports, __webpack_require__) {
"use strict";
function selectValueType(props, propName, componentName) {
if (null != props[propName]) if (props.multiple) {
if (!Array.isArray(props[propName])) return new Error("The `" + propName + "` prop supplied to <select> must be an array if `multiple` is true.");
} else if (Array.isArray(props[propName])) return new Error("The `" + propName + "` prop supplied to <select> must be a scalar value if `multiple` is false.");
}
function updateOptions(component, propValue) {
var selectedValue, i, l, multiple = component.props.multiple, value = null != propValue ? propValue : component.state.value, options = component.getDOMNode().options;
if (multiple) {
selectedValue = {};
for (i = 0, l = value.length; l > i; ++i) selectedValue["" + value[i]] = !0;
} else selectedValue = "" + value;
for (i = 0, l = options.length; l > i; i++) {
var selected = multiple ? selectedValue.hasOwnProperty(options[i].value) : options[i].value === selectedValue;
if (selected !== options[i].selected) options[i].selected = selected;
}
}
var AutoFocusMixin = __webpack_require__(217), LinkedValueUtils = __webpack_require__(222), ReactBrowserComponentMixin = __webpack_require__(125), ReactCompositeComponent = __webpack_require__(159), ReactDOM = __webpack_require__(167), merge = __webpack_require__(139), select = ReactDOM.select, ReactDOMSelect = ReactCompositeComponent.createClass({
displayName: "ReactDOMSelect",
mixins: [ AutoFocusMixin, LinkedValueUtils.Mixin, ReactBrowserComponentMixin ],
propTypes: {
defaultValue: selectValueType,
value: selectValueType
},
getInitialState: function() {
return {
value: this.props.defaultValue || (this.props.multiple ? [] : "")
};
},
componentWillReceiveProps: function(nextProps) {
if (!this.props.multiple && nextProps.multiple) this.setState({
value: [ this.state.value ]
}); else if (this.props.multiple && !nextProps.multiple) this.setState({
value: this.state.value[0]
});
},
shouldComponentUpdate: function() {
return !this._isChanging;
},
render: function() {
var props = merge(this.props);
props.onChange = this._handleChange;
props.value = null;
return select(props, this.props.children);
},
componentDidMount: function() {
updateOptions(this, LinkedValueUtils.getValue(this));
},
componentDidUpdate: function(prevProps) {
var value = LinkedValueUtils.getValue(this), prevMultiple = !!prevProps.multiple, multiple = !!this.props.multiple;
if (null != value || prevMultiple !== multiple) updateOptions(this, value);
},
_handleChange: function(event) {
var returnValue, onChange = LinkedValueUtils.getOnChange(this);
if (onChange) {
this._isChanging = !0;
returnValue = onChange.call(this, event);
this._isChanging = !1;
}
var selectedValue;
if (this.props.multiple) {
selectedValue = [];
for (var options = event.target.options, i = 0, l = options.length; l > i; i++) if (options[i].selected) selectedValue.push(options[i].value);
} else selectedValue = event.target.value;
this.setState({
value: selectedValue
});
return returnValue;
}
});
module.exports = ReactDOMSelect;
}, function(module, exports, __webpack_require__) {
"use strict";
var AutoFocusMixin = __webpack_require__(217), DOMPropertyOperations = __webpack_require__(108), LinkedValueUtils = __webpack_require__(222), ReactBrowserComponentMixin = __webpack_require__(125), ReactCompositeComponent = __webpack_require__(159), ReactDOM = __webpack_require__(167), invariant = __webpack_require__(110), merge = __webpack_require__(139), warning = __webpack_require__(113), textarea = ReactDOM.textarea, ReactDOMTextarea = ReactCompositeComponent.createClass({
displayName: "ReactDOMTextarea",
mixins: [ AutoFocusMixin, LinkedValueUtils.Mixin, ReactBrowserComponentMixin ],
getInitialState: function() {
var defaultValue = this.props.defaultValue, children = this.props.children;
if (null != children) {
if (!0) !0 ? warning(!1, "Use the `defaultValue` or `value` props instead of setting children on <textarea>.") : null;
!0 ? invariant(null == defaultValue, "If you supply `defaultValue` on a <textarea>, do not pass children.") : invariant(null == defaultValue);
if (Array.isArray(children)) {
!0 ? invariant(children.length <= 1, "<textarea> can only have at most one child.") : invariant(children.length <= 1);
children = children[0];
}
defaultValue = "" + children;
}
if (null == defaultValue) defaultValue = "";
var value = LinkedValueUtils.getValue(this);
return {
initialValue: "" + (null != value ? value : defaultValue)
};
},
shouldComponentUpdate: function() {
return !this._isChanging;
},
render: function() {
var props = merge(this.props);
!0 ? invariant(null == props.dangerouslySetInnerHTML, "`dangerouslySetInnerHTML` does not make sense on <textarea>.") : invariant(null == props.dangerouslySetInnerHTML);
props.defaultValue = null;
props.value = null;
props.onChange = this._handleChange;
return textarea(props, this.state.initialValue);
},
componentDidUpdate: function(prevProps, prevState, prevContext) {
var value = LinkedValueUtils.getValue(this);
if (null != value) {
var rootNode = this.getDOMNode();
DOMPropertyOperations.setValueForProperty(rootNode, "value", "" + value);
}
},
_handleChange: function(event) {
var returnValue, onChange = LinkedValueUtils.getOnChange(this);
if (onChange) {
this._isChanging = !0;
returnValue = onChange.call(this, event);
this._isChanging = !1;
}
this.setState({
value: event.target.value
});
return returnValue;
}
});
module.exports = ReactDOMTextarea;
}, function(module, exports, __webpack_require__) {
"use strict";
function findParent(node) {
var nodeID = ReactMount.getID(node), rootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID), container = ReactMount.findReactContainerForID(rootID), parent = ReactMount.getFirstReactDOM(container);
return parent;
}
function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) {
this.topLevelType = topLevelType;
this.nativeEvent = nativeEvent;
this.ancestors = [];
}
function handleTopLevelImpl(bookKeeping) {
for (var topLevelTarget = ReactMount.getFirstReactDOM(getEventTarget(bookKeeping.nativeEvent)) || window, ancestor = topLevelTarget; ancestor; ) {
bookKeeping.ancestors.push(ancestor);
ancestor = findParent(ancestor);
}
for (var i = 0, l = bookKeeping.ancestors.length; l > i; i++) {
topLevelTarget = bookKeeping.ancestors[i];
var topLevelTargetID = ReactMount.getID(topLevelTarget) || "";
ReactEventListener._handleTopLevel(bookKeeping.topLevelType, topLevelTarget, topLevelTargetID, bookKeeping.nativeEvent);
}
}
function scrollValueMonitor(cb) {
var scrollPosition = getUnboundedScrollPosition(window);
cb(scrollPosition);
}
var EventListener = __webpack_require__(228), ExecutionEnvironment = __webpack_require__(134), PooledClass = __webpack_require__(120), ReactInstanceHandles = __webpack_require__(122), ReactMount = __webpack_require__(127), ReactUpdates = __webpack_require__(155), getEventTarget = __webpack_require__(183), getUnboundedScrollPosition = __webpack_require__(138), mixInto = __webpack_require__(157);
mixInto(TopLevelCallbackBookKeeping, {
destructor: function() {
this.topLevelType = null;
this.nativeEvent = null;
this.ancestors.length = 0;
}
});
PooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler);
var ReactEventListener = {
_enabled: !0,
_handleTopLevel: null,
WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null,
setHandleTopLevel: function(handleTopLevel) {
ReactEventListener._handleTopLevel = handleTopLevel;
},
setEnabled: function(enabled) {
ReactEventListener._enabled = !!enabled;
},
isEnabled: function() {
return ReactEventListener._enabled;
},
trapBubbledEvent: function(topLevelType, handlerBaseName, handle) {
var element = handle;
if (element) return EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType)); else ;
},
trapCapturedEvent: function(topLevelType, handlerBaseName, handle) {
var element = handle;
if (element) return EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType)); else ;
},
monitorScrollValue: function(refresh) {
var callback = scrollValueMonitor.bind(null, refresh);
EventListener.listen(window, "scroll", callback);
EventListener.listen(window, "resize", callback);
},
dispatchEvent: function(topLevelType, nativeEvent) {
if (ReactEventListener._enabled) {
var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent);
try {
ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping);
} finally {
TopLevelCallbackBookKeeping.release(bookKeeping);
}
}
}
};
module.exports = ReactEventListener;
}, function(module, exports, __webpack_require__) {
var emptyFunction = __webpack_require__(114), EventListener = {
listen: function(target, eventType, callback) {
if (target.addEventListener) {
target.addEventListener(eventType, callback, !1);
return {
remove: function() {
target.removeEventListener(eventType, callback, !1);
}
};
} else if (target.attachEvent) {
target.attachEvent("on" + eventType, callback);
return {
remove: function() {
target.detachEvent("on" + eventType, callback);
}
};
}
},
capture: function(target, eventType, callback) {
if (!target.addEventListener) {
if (!0) console.error("Attempted to listen to events during the capture phase on a browser that does not support the capture phase. Your application will not receive some events.");
return {
remove: emptyFunction
};
} else {
target.addEventListener(eventType, callback, !0);
return {
remove: function() {
target.removeEventListener(eventType, callback, !0);
}
};
}
},
registerDefault: function() {}
};
module.exports = EventListener;
}, function(module, exports, __webpack_require__) {
"use strict";
var DOMProperty = __webpack_require__(109), EventPluginHub = __webpack_require__(129), ReactComponent = __webpack_require__(152), ReactCompositeComponent = __webpack_require__(159), ReactDOM = __webpack_require__(167), ReactEmptyComponent = __webpack_require__(126), ReactBrowserEventEmitter = __webpack_require__(128), ReactPerf = __webpack_require__(145), ReactRootIndex = __webpack_require__(123), ReactUpdates = __webpack_require__(155), ReactInjection = {
Component: ReactComponent.injection,
CompositeComponent: ReactCompositeComponent.injection,
DOMProperty: DOMProperty.injection,
EmptyComponent: ReactEmptyComponent.injection,
EventPluginHub: EventPluginHub.injection,
DOM: ReactDOM.injection,
EventEmitter: ReactBrowserEventEmitter.injection,
Perf: ReactPerf.injection,
RootIndex: ReactRootIndex.injection,
Updates: ReactUpdates.injection
};
module.exports = ReactInjection;
}, function(module, exports, __webpack_require__) {
"use strict";
function getSelection(node) {
if ("selectionStart" in node && ReactInputSelection.hasSelectionCapabilities(node)) return {
start: node.selectionStart,
end: node.selectionEnd
}; else if (document.selection) {
var range = document.selection.createRange();
return {
parentElement: range.parentElement(),
text: range.text,
top: range.boundingTop,
left: range.boundingLeft
};
} else {
var selection = window.getSelection();
return {
anchorNode: selection.anchorNode,
anchorOffset: selection.anchorOffset,
focusNode: selection.focusNode,
focusOffset: selection.focusOffset
};
}
}
function constructSelectEvent(nativeEvent) {
if (!mouseDown && null != activeElement && activeElement == getActiveElement()) {
var currentSelection = getSelection(activeElement);
if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
lastSelection = currentSelection;
var syntheticEvent = SyntheticEvent.getPooled(eventTypes.select, activeElementID, nativeEvent);
syntheticEvent.type = "select";
syntheticEvent.target = activeElement;
EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent);
return syntheticEvent;
}
}
}
var EventConstants = __webpack_require__(117), EventPropagators = __webpack_require__(180), ReactInputSelection = __webpack_require__(188), SyntheticEvent = __webpack_require__(182), getActiveElement = __webpack_require__(193), isTextInputElement = __webpack_require__(185), keyOf = __webpack_require__(177), shallowEqual = __webpack_require__(231), topLevelTypes = EventConstants.topLevelTypes, eventTypes = {
select: {
phasedRegistrationNames: {
bubbled: keyOf({
onSelect: null
}),
captured: keyOf({
onSelectCapture: null
})
},
dependencies: [ topLevelTypes.topBlur, topLevelTypes.topContextMenu, topLevelTypes.topFocus, topLevelTypes.topKeyDown, topLevelTypes.topMouseDown, topLevelTypes.topMouseUp, topLevelTypes.topSelectionChange ]
}
}, activeElement = null, activeElementID = null, lastSelection = null, mouseDown = !1, SelectEventPlugin = {
eventTypes: eventTypes,
extractEvents: function(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent) {
switch (topLevelType) {
case topLevelTypes.topFocus:
if (isTextInputElement(topLevelTarget) || "true" === topLevelTarget.contentEditable) {
activeElement = topLevelTarget;
activeElementID = topLevelTargetID;
lastSelection = null;
}
break;
case topLevelTypes.topBlur:
activeElement = null;
activeElementID = null;
lastSelection = null;
break;
case topLevelTypes.topMouseDown:
mouseDown = !0;
break;
case topLevelTypes.topContextMenu:
case topLevelTypes.topMouseUp:
mouseDown = !1;
return constructSelectEvent(nativeEvent);
case topLevelTypes.topSelectionChange:
case topLevelTypes.topKeyDown:
case topLevelTypes.topKeyUp:
return constructSelectEvent(nativeEvent);
}
}
};
module.exports = SelectEventPlugin;
}, function(module, exports) {
"use strict";
function shallowEqual(objA, objB) {
if (objA === objB) return !0;
var key;
for (key in objA) if (objA.hasOwnProperty(key) && (!objB.hasOwnProperty(key) || objA[key] !== objB[key])) return !1;
for (key in objB) if (objB.hasOwnProperty(key) && !objA.hasOwnProperty(key)) return !1;
return !0;
}
module.exports = shallowEqual;
}, function(module, exports) {
"use strict";
var GLOBAL_MOUNT_POINT_MAX = Math.pow(2, 53), ServerReactRootIndex = {
createReactRootIndex: function() {
return Math.ceil(Math.random() * GLOBAL_MOUNT_POINT_MAX);
}
};
module.exports = ServerReactRootIndex;
}, function(module, exports, __webpack_require__) {
"use strict";
var EventConstants = __webpack_require__(117), EventPluginUtils = __webpack_require__(116), EventPropagators = __webpack_require__(180), SyntheticClipboardEvent = __webpack_require__(234), SyntheticEvent = __webpack_require__(182), SyntheticFocusEvent = __webpack_require__(235), SyntheticKeyboardEvent = __webpack_require__(236), SyntheticMouseEvent = __webpack_require__(197), SyntheticDragEvent = __webpack_require__(238), SyntheticTouchEvent = __webpack_require__(239), SyntheticUIEvent = __webpack_require__(198), SyntheticWheelEvent = __webpack_require__(240), invariant = __webpack_require__(110), keyOf = __webpack_require__(177), topLevelTypes = EventConstants.topLevelTypes, eventTypes = {
blur: {
phasedRegistrationNames: {
bubbled: keyOf({
onBlur: !0
}),
captured: keyOf({
onBlurCapture: !0
})
}
},
click: {
phasedRegistrationNames: {
bubbled: keyOf({
onClick: !0
}),
captured: keyOf({
onClickCapture: !0
})
}
},
contextMenu: {
phasedRegistrationNames: {
bubbled: keyOf({
onContextMenu: !0
}),
captured: keyOf({
onContextMenuCapture: !0
})
}
},
copy: {
phasedRegistrationNames: {
bubbled: keyOf({
onCopy: !0
}),
captured: keyOf({
onCopyCapture: !0
})
}
},
cut: {
phasedRegistrationNames: {
bubbled: keyOf({
onCut: !0
}),
captured: keyOf({
onCutCapture: !0
})
}
},
doubleClick: {
phasedRegistrationNames: {
bubbled: keyOf({
onDoubleClick: !0
}),
captured: keyOf({
onDoubleClickCapture: !0
})
}
},
drag: {
phasedRegistrationNames: {
bubbled: keyOf({
onDrag: !0
}),
captured: keyOf({
onDragCapture: !0
})
}
},
dragEnd: {
phasedRegistrationNames: {
bubbled: keyOf({
onDragEnd: !0
}),
captured: keyOf({
onDragEndCapture: !0
})
}
},
dragEnter: {
phasedRegistrationNames: {
bubbled: keyOf({
onDragEnter: !0
}),
captured: keyOf({
onDragEnterCapture: !0
})
}
},
dragExit: {
phasedRegistrationNames: {
bubbled: keyOf({
onDragExit: !0
}),
captured: keyOf({
onDragExitCapture: !0
})
}
},
dragLeave: {
phasedRegistrationNames: {
bubbled: keyOf({
onDragLeave: !0
}),
captured: keyOf({
onDragLeaveCapture: !0
})
}
},
dragOver: {
phasedRegistrationNames: {
bubbled: keyOf({
onDragOver: !0
}),
captured: keyOf({
onDragOverCapture: !0
})
}
},
dragStart: {
phasedRegistrationNames: {
bubbled: keyOf({
onDragStart: !0
}),
captured: keyOf({
onDragStartCapture: !0
})
}
},
drop: {
phasedRegistrationNames: {
bubbled: keyOf({
onDrop: !0
}),
captured: keyOf({
onDropCapture: !0
})
}
},
focus: {
phasedRegistrationNames: {
bubbled: keyOf({
onFocus: !0
}),
captured: keyOf({
onFocusCapture: !0
})
}
},
input: {
phasedRegistrationNames: {
bubbled: keyOf({
onInput: !0
}),
captured: keyOf({
onInputCapture: !0
})
}
},
keyDown: {
phasedRegistrationNames: {
bubbled: keyOf({
onKeyDown: !0
}),
captured: keyOf({
onKeyDownCapture: !0
})
}
},
keyPress: {
phasedRegistrationNames: {
bubbled: keyOf({
onKeyPress: !0
}),
captured: keyOf({
onKeyPressCapture: !0
})
}
},
keyUp: {
phasedRegistrationNames: {
bubbled: keyOf({
onKeyUp: !0
}),
captured: keyOf({
onKeyUpCapture: !0
})
}
},
load: {
phasedRegistrationNames: {
bubbled: keyOf({
onLoad: !0
}),
captured: keyOf({
onLoadCapture: !0
})
}
},
error: {
phasedRegistrationNames: {
bubbled: keyOf({
onError: !0
}),
captured: keyOf({
onErrorCapture: !0
})
}
},
mouseDown: {
phasedRegistrationNames: {
bubbled: keyOf({
onMouseDown: !0
}),
captured: keyOf({
onMouseDownCapture: !0
})
}
},
mouseMove: {
phasedRegistrationNames: {
bubbled: keyOf({
onMouseMove: !0
}),
captured: keyOf({
onMouseMoveCapture: !0
})
}
},
mouseOut: {
phasedRegistrationNames: {
bubbled: keyOf({
onMouseOut: !0
}),
captured: keyOf({
onMouseOutCapture: !0
})
}
},
mouseOver: {
phasedRegistrationNames: {
bubbled: keyOf({
onMouseOver: !0
}),
captured: keyOf({
onMouseOverCapture: !0
})
}
},
mouseUp: {
phasedRegistrationNames: {
bubbled: keyOf({
onMouseUp: !0
}),
captured: keyOf({
onMouseUpCapture: !0
})
}
},
paste: {
phasedRegistrationNames: {
bubbled: keyOf({
onPaste: !0
}),
captured: keyOf({
onPasteCapture: !0
})
}
},
reset: {
phasedRegistrationNames: {
bubbled: keyOf({
onReset: !0
}),
captured: keyOf({
onResetCapture: !0
})
}
},
scroll: {
phasedRegistrationNames: {
bubbled: keyOf({
onScroll: !0
}),
captured: keyOf({
onScrollCapture: !0
})
}
},
submit: {
phasedRegistrationNames: {
bubbled: keyOf({
onSubmit: !0
}),
captured: keyOf({
onSubmitCapture: !0
})
}
},
touchCancel: {
phasedRegistrationNames: {
bubbled: keyOf({
onTouchCancel: !0
}),
captured: keyOf({
onTouchCancelCapture: !0
})
}
},
touchEnd: {
phasedRegistrationNames: {
bubbled: keyOf({
onTouchEnd: !0
}),
captured: keyOf({
onTouchEndCapture: !0
})
}
},
touchMove: {
phasedRegistrationNames: {
bubbled: keyOf({
onTouchMove: !0
}),
captured: keyOf({
onTouchMoveCapture: !0
})
}
},
touchStart: {
phasedRegistrationNames: {
bubbled: keyOf({
onTouchStart: !0
}),
captured: keyOf({
onTouchStartCapture: !0
})
}
},
wheel: {
phasedRegistrationNames: {
bubbled: keyOf({
onWheel: !0
}),
captured: keyOf({
onWheelCapture: !0
})
}
}
}, topLevelEventsToDispatchConfig = {
topBlur: eventTypes.blur,
topClick: eventTypes.click,
topContextMenu: eventTypes.contextMenu,
topCopy: eventTypes.copy,
topCut: eventTypes.cut,
topDoubleClick: eventTypes.doubleClick,
topDrag: eventTypes.drag,
topDragEnd: eventTypes.dragEnd,
topDragEnter: eventTypes.dragEnter,
topDragExit: eventTypes.dragExit,
topDragLeave: eventTypes.dragLeave,
topDragOver: eventTypes.dragOver,
topDragStart: eventTypes.dragStart,
topDrop: eventTypes.drop,
topError: eventTypes.error,
topFocus: eventTypes.focus,
topInput: eventTypes.input,
topKeyDown: eventTypes.keyDown,
topKeyPress: eventTypes.keyPress,
topKeyUp: eventTypes.keyUp,
topLoad: eventTypes.load,
topMouseDown: eventTypes.mouseDown,
topMouseMove: eventTypes.mouseMove,
topMouseOut: eventTypes.mouseOut,
topMouseOver: eventTypes.mouseOver,
topMouseUp: eventTypes.mouseUp,
topPaste: eventTypes.paste,
topReset: eventTypes.reset,
topScroll: eventTypes.scroll,
topSubmit: eventTypes.submit,
topTouchCancel: eventTypes.touchCancel,
topTouchEnd: eventTypes.touchEnd,
topTouchMove: eventTypes.touchMove,
topTouchStart: eventTypes.touchStart,
topWheel: eventTypes.wheel
};
for (var topLevelType in topLevelEventsToDispatchConfig) topLevelEventsToDispatchConfig[topLevelType].dependencies = [ topLevelType ];
var SimpleEventPlugin = {
eventTypes: eventTypes,
executeDispatch: function(event, listener, domID) {
var returnValue = EventPluginUtils.executeDispatch(event, listener, domID);
if (returnValue === !1) {
event.stopPropagation();
event.preventDefault();
}
},
extractEvents: function(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent) {
var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType];
if (!dispatchConfig) return null;
var EventConstructor;
switch (topLevelType) {
case topLevelTypes.topInput:
case topLevelTypes.topLoad:
case topLevelTypes.topError:
case topLevelTypes.topReset:
case topLevelTypes.topSubmit:
EventConstructor = SyntheticEvent;
break;
case topLevelTypes.topKeyPress:
if (0 === nativeEvent.charCode) return null;
case topLevelTypes.topKeyDown:
case topLevelTypes.topKeyUp:
EventConstructor = SyntheticKeyboardEvent;
break;
case topLevelTypes.topBlur:
case topLevelTypes.topFocus:
EventConstructor = SyntheticFocusEvent;
break;
case topLevelTypes.topClick:
if (2 === nativeEvent.button) return null;
case topLevelTypes.topContextMenu:
case topLevelTypes.topDoubleClick:
case topLevelTypes.topMouseDown:
case topLevelTypes.topMouseMove:
case topLevelTypes.topMouseOut:
case topLevelTypes.topMouseOver:
case topLevelTypes.topMouseUp:
EventConstructor = SyntheticMouseEvent;
break;
case topLevelTypes.topDrag:
case topLevelTypes.topDragEnd:
case topLevelTypes.topDragEnter:
case topLevelTypes.topDragExit:
case topLevelTypes.topDragLeave:
case topLevelTypes.topDragOver:
case topLevelTypes.topDragStart:
case topLevelTypes.topDrop:
EventConstructor = SyntheticDragEvent;
break;
case topLevelTypes.topTouchCancel:
case topLevelTypes.topTouchEnd:
case topLevelTypes.topTouchMove:
case topLevelTypes.topTouchStart:
EventConstructor = SyntheticTouchEvent;
break;
case topLevelTypes.topScroll:
EventConstructor = SyntheticUIEvent;
break;
case topLevelTypes.topWheel:
EventConstructor = SyntheticWheelEvent;
break;
case topLevelTypes.topCopy:
case topLevelTypes.topCut:
case topLevelTypes.topPaste:
EventConstructor = SyntheticClipboardEvent;
}
!0 ? invariant(EventConstructor, "SimpleEventPlugin: Unhandled event type, `%s`.", topLevelType) : invariant(EventConstructor);
var event = EventConstructor.getPooled(dispatchConfig, topLevelTargetID, nativeEvent);
EventPropagators.accumulateTwoPhaseDispatches(event);
return event;
}
};
module.exports = SimpleEventPlugin;
}, function(module, exports, __webpack_require__) {
"use strict";
function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent) {
SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);
}
var SyntheticEvent = __webpack_require__(182), ClipboardEventInterface = {
clipboardData: function(event) {
return "clipboardData" in event ? event.clipboardData : window.clipboardData;
}
};
SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface);
module.exports = SyntheticClipboardEvent;
}, function(module, exports, __webpack_require__) {
"use strict";
function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent) {
SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);
}
var SyntheticUIEvent = __webpack_require__(198), FocusEventInterface = {
relatedTarget: null
};
SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface);
module.exports = SyntheticFocusEvent;
}, function(module, exports, __webpack_require__) {
"use strict";
function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent) {
SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);
}
var SyntheticUIEvent = __webpack_require__(198), getEventKey = __webpack_require__(237), getEventModifierState = __webpack_require__(199), KeyboardEventInterface = {
key: getEventKey,
location: null,
ctrlKey: null,
shiftKey: null,
altKey: null,
metaKey: null,
repeat: null,
locale: null,
getModifierState: getEventModifierState,
charCode: function(event) {
if ("keypress" === event.type) return "charCode" in event ? event.charCode : event.keyCode; else return 0;
},
keyCode: function(event) {
if ("keydown" === event.type || "keyup" === event.type) return event.keyCode; else return 0;
},
which: function(event) {
return event.keyCode || event.charCode;
}
};
SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface);
module.exports = SyntheticKeyboardEvent;
}, function(module, exports, __webpack_require__) {
"use strict";
function getEventKey(nativeEvent) {
if (nativeEvent.key) {
var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
if ("Unidentified" !== key) return key;
}
if ("keypress" === nativeEvent.type) {
var charCode = "charCode" in nativeEvent ? nativeEvent.charCode : nativeEvent.keyCode;
return 13 === charCode ? "Enter" : String.fromCharCode(charCode);
}
if ("keydown" === nativeEvent.type || "keyup" === nativeEvent.type) return translateToKey[nativeEvent.keyCode] || "Unidentified";
!0 ? invariant(!1, "Unexpected keyboard event type: %s", nativeEvent.type) : invariant(!1);
}
var invariant = __webpack_require__(110), normalizeKey = {
Esc: "Escape",
Spacebar: " ",
Left: "ArrowLeft",
Up: "ArrowUp",
Right: "ArrowRight",
Down: "ArrowDown",
Del: "Delete",
Win: "OS",
Menu: "ContextMenu",
Apps: "ContextMenu",
Scroll: "ScrollLock",
MozPrintableKey: "Unidentified"
}, translateToKey = {
8: "Backspace",
9: "Tab",
12: "Clear",
13: "Enter",
16: "Shift",
17: "Control",
18: "Alt",
19: "Pause",
20: "CapsLock",
27: "Escape",
32: " ",
33: "PageUp",
34: "PageDown",
35: "End",
36: "Home",
37: "ArrowLeft",
38: "ArrowUp",
39: "ArrowRight",
40: "ArrowDown",
45: "Insert",
46: "Delete",
112: "F1",
113: "F2",
114: "F3",
115: "F4",
116: "F5",
117: "F6",
118: "F7",
119: "F8",
120: "F9",
121: "F10",
122: "F11",
123: "F12",
144: "NumLock",
145: "ScrollLock",
224: "Meta"
};
module.exports = getEventKey;
}, function(module, exports, __webpack_require__) {
"use strict";
function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent) {
SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);
}
var SyntheticMouseEvent = __webpack_require__(197), DragEventInterface = {
dataTransfer: null
};
SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface);
module.exports = SyntheticDragEvent;
}, function(module, exports, __webpack_require__) {
"use strict";
function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent) {
SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);
}
var SyntheticUIEvent = __webpack_require__(198), getEventModifierState = __webpack_require__(199), TouchEventInterface = {
touches: null,
targetTouches: null,
changedTouches: null,
altKey: null,
metaKey: null,
ctrlKey: null,
shiftKey: null,
getModifierState: getEventModifierState
};
SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface);
module.exports = SyntheticTouchEvent;
}, function(module, exports, __webpack_require__) {
"use strict";
function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent) {
SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);
}
var SyntheticMouseEvent = __webpack_require__(197), WheelEventInterface = {
deltaX: function(event) {
return "deltaX" in event ? event.deltaX : "wheelDeltaX" in event ? -event.wheelDeltaX : 0;
},
deltaY: function(event) {
return "deltaY" in event ? event.deltaY : "wheelDeltaY" in event ? -event.wheelDeltaY : "wheelDelta" in event ? -event.wheelDelta : 0;
},
deltaZ: null,
deltaMode: null
};
SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface);
module.exports = SyntheticWheelEvent;
}, function(module, exports, __webpack_require__) {
"use strict";
var DOMProperty = __webpack_require__(109), MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE, SVGDOMPropertyConfig = {
Properties: {
cx: MUST_USE_ATTRIBUTE,
cy: MUST_USE_ATTRIBUTE,
d: MUST_USE_ATTRIBUTE,
dx: MUST_USE_ATTRIBUTE,
dy: MUST_USE_ATTRIBUTE,
fill: MUST_USE_ATTRIBUTE,
fillOpacity: MUST_USE_ATTRIBUTE,
fontFamily: MUST_USE_ATTRIBUTE,
fontSize: MUST_USE_ATTRIBUTE,
fx: MUST_USE_ATTRIBUTE,
fy: MUST_USE_ATTRIBUTE,
gradientTransform: MUST_USE_ATTRIBUTE,
gradientUnits: MUST_USE_ATTRIBUTE,
markerEnd: MUST_USE_ATTRIBUTE,
markerMid: MUST_USE_ATTRIBUTE,
markerStart: MUST_USE_ATTRIBUTE,
offset: MUST_USE_ATTRIBUTE,
opacity: MUST_USE_ATTRIBUTE,
patternContentUnits: MUST_USE_ATTRIBUTE,
patternUnits: MUST_USE_ATTRIBUTE,
points: MUST_USE_ATTRIBUTE,
preserveAspectRatio: MUST_USE_ATTRIBUTE,
r: MUST_USE_ATTRIBUTE,
rx: MUST_USE_ATTRIBUTE,
ry: MUST_USE_ATTRIBUTE,
spreadMethod: MUST_USE_ATTRIBUTE,
stopColor: MUST_USE_ATTRIBUTE,
stopOpacity: MUST_USE_ATTRIBUTE,
stroke: MUST_USE_ATTRIBUTE,
strokeDasharray: MUST_USE_ATTRIBUTE,
strokeLinecap: MUST_USE_ATTRIBUTE,
strokeOpacity: MUST_USE_ATTRIBUTE,
strokeWidth: MUST_USE_ATTRIBUTE,
textAnchor: MUST_USE_ATTRIBUTE,
transform: MUST_USE_ATTRIBUTE,
version: MUST_USE_ATTRIBUTE,
viewBox: MUST_USE_ATTRIBUTE,
x1: MUST_USE_ATTRIBUTE,
x2: MUST_USE_ATTRIBUTE,
x: MUST_USE_ATTRIBUTE,
y1: MUST_USE_ATTRIBUTE,
y2: MUST_USE_ATTRIBUTE,
y: MUST_USE_ATTRIBUTE
},
DOMAttributeNames: {
fillOpacity: "fill-opacity",
fontFamily: "font-family",
fontSize: "font-size",
gradientTransform: "gradientTransform",
gradientUnits: "gradientUnits",
markerEnd: "marker-end",
markerMid: "marker-mid",
markerStart: "marker-start",
patternContentUnits: "patternContentUnits",
patternUnits: "patternUnits",
preserveAspectRatio: "preserveAspectRatio",
spreadMethod: "spreadMethod",
stopColor: "stop-color",
stopOpacity: "stop-opacity",
strokeDasharray: "stroke-dasharray",
strokeLinecap: "stroke-linecap",
strokeOpacity: "stroke-opacity",
strokeWidth: "stroke-width",
textAnchor: "text-anchor",
viewBox: "viewBox"
}
};
module.exports = SVGDOMPropertyConfig;
}, function(module, exports, __webpack_require__) {
"use strict";
function createFullPageComponent(componentClass) {
var FullPageComponent = ReactCompositeComponent.createClass({
displayName: "ReactFullPageComponent" + (componentClass.type.displayName || ""),
componentWillUnmount: function() {
!0 ? invariant(!1, "%s tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg <html>, <head>, and <body>) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.", this.constructor.displayName) : invariant(!1);
},
render: function() {
return this.transferPropsTo(componentClass(null, this.props.children));
}
});
return FullPageComponent;
}
var ReactCompositeComponent = __webpack_require__(159), invariant = __webpack_require__(110);
module.exports = createFullPageComponent;
}, function(module, exports, __webpack_require__) {
"use strict";
function roundFloat(val) {
return Math.floor(100 * val) / 100;
}
function addValue(obj, key, val) {
obj[key] = (obj[key] || 0) + val;
}
var DOMProperty = __webpack_require__(109), ReactDefaultPerfAnalysis = __webpack_require__(244), ReactMount = __webpack_require__(127), ReactPerf = __webpack_require__(145), performanceNow = __webpack_require__(245), ReactDefaultPerf = {
_allMeasurements: [],
_mountStack: [ 0 ],
_injected: !1,
start: function() {
if (!ReactDefaultPerf._injected) ReactPerf.injection.injectMeasure(ReactDefaultPerf.measure);
ReactDefaultPerf._allMeasurements.length = 0;
ReactPerf.enableMeasure = !0;
},
stop: function() {
ReactPerf.enableMeasure = !1;
},
getLastMeasurements: function() {
return ReactDefaultPerf._allMeasurements;
},
printExclusive: function(measurements) {
measurements = measurements || ReactDefaultPerf._allMeasurements;
var summary = ReactDefaultPerfAnalysis.getExclusiveSummary(measurements);
console.table(summary.map(function(item) {
return {
"Component class name": item.componentName,
"Total inclusive time (ms)": roundFloat(item.inclusive),
"Exclusive mount time (ms)": roundFloat(item.exclusive),
"Exclusive render time (ms)": roundFloat(item.render),
"Mount time per instance (ms)": roundFloat(item.exclusive / item.count),
"Render time per instance (ms)": roundFloat(item.render / item.count),
Instances: item.count
};
}));
},
printInclusive: function(measurements) {
measurements = measurements || ReactDefaultPerf._allMeasurements;
var summary = ReactDefaultPerfAnalysis.getInclusiveSummary(measurements);
console.table(summary.map(function(item) {
return {
"Owner > component": item.componentName,
"Inclusive time (ms)": roundFloat(item.time),
Instances: item.count
};
}));
console.log("Total time:", ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + " ms");
},
printWasted: function(measurements) {
measurements = measurements || ReactDefaultPerf._allMeasurements;
var summary = ReactDefaultPerfAnalysis.getInclusiveSummary(measurements, !0);
console.table(summary.map(function(item) {
return {
"Owner > component": item.componentName,
"Wasted time (ms)": item.time,
Instances: item.count
};
}));
console.log("Total time:", ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + " ms");
},
printDOM: function(measurements) {
measurements = measurements || ReactDefaultPerf._allMeasurements;
var summary = ReactDefaultPerfAnalysis.getDOMSummary(measurements);
console.table(summary.map(function(item) {
var result = {};
result[DOMProperty.ID_ATTRIBUTE_NAME] = item.id;
result.type = item.type;
result.args = JSON.stringify(item.args);
return result;
}));
console.log("Total time:", ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + " ms");
},
_recordWrite: function(id, fnName, totalTime, args) {
var writes = ReactDefaultPerf._allMeasurements[ReactDefaultPerf._allMeasurements.length - 1].writes;
writes[id] = writes[id] || [];
writes[id].push({
type: fnName,
time: totalTime,
args: args
});
},
measure: function(moduleName, fnName, func) {
return function() {
var totalTime, rv, start, args = Array.prototype.slice.call(arguments, 0);
if ("_renderNewRootComponent" === fnName || "flushBatchedUpdates" === fnName) {
ReactDefaultPerf._allMeasurements.push({
exclusive: {},
inclusive: {},
render: {},
counts: {},
writes: {},
displayNames: {},
totalTime: 0
});
start = performanceNow();
rv = func.apply(this, args);
ReactDefaultPerf._allMeasurements[ReactDefaultPerf._allMeasurements.length - 1].totalTime = performanceNow() - start;
return rv;
} else if ("ReactDOMIDOperations" === moduleName || "ReactComponentBrowserEnvironment" === moduleName) {
start = performanceNow();
rv = func.apply(this, args);
totalTime = performanceNow() - start;
if ("mountImageIntoNode" === fnName) {
var mountID = ReactMount.getID(args[1]);
ReactDefaultPerf._recordWrite(mountID, fnName, totalTime, args[0]);
} else if ("dangerouslyProcessChildrenUpdates" === fnName) args[0].forEach(function(update) {
var writeArgs = {};
if (null !== update.fromIndex) writeArgs.fromIndex = update.fromIndex;
if (null !== update.toIndex) writeArgs.toIndex = update.toIndex;
if (null !== update.textContent) writeArgs.textContent = update.textContent;
if (null !== update.markupIndex) writeArgs.markup = args[1][update.markupIndex];
ReactDefaultPerf._recordWrite(update.parentID, update.type, totalTime, writeArgs);
}); else ReactDefaultPerf._recordWrite(args[0], fnName, totalTime, Array.prototype.slice.call(args, 1));
return rv;
} else if ("ReactCompositeComponent" === moduleName && ("mountComponent" === fnName || "updateComponent" === fnName || "_renderValidatedComponent" === fnName)) {
var rootNodeID = "mountComponent" === fnName ? args[0] : this._rootNodeID, isRender = "_renderValidatedComponent" === fnName, isMount = "mountComponent" === fnName, mountStack = ReactDefaultPerf._mountStack, entry = ReactDefaultPerf._allMeasurements[ReactDefaultPerf._allMeasurements.length - 1];
if (isRender) addValue(entry.counts, rootNodeID, 1); else if (isMount) mountStack.push(0);
start = performanceNow();
rv = func.apply(this, args);
totalTime = performanceNow() - start;
if (isRender) addValue(entry.render, rootNodeID, totalTime); else if (isMount) {
var subMountTime = mountStack.pop();
mountStack[mountStack.length - 1] += totalTime;
addValue(entry.exclusive, rootNodeID, totalTime - subMountTime);
addValue(entry.inclusive, rootNodeID, totalTime);
} else addValue(entry.inclusive, rootNodeID, totalTime);
entry.displayNames[rootNodeID] = {
current: this.constructor.displayName,
owner: this._owner ? this._owner.constructor.displayName : "<root>"
};
return rv;
} else return func.apply(this, args);
};
}
};
module.exports = ReactDefaultPerf;
}, function(module, exports, __webpack_require__) {
function getTotalTime(measurements) {
for (var totalTime = 0, i = 0; i < measurements.length; i++) {
var measurement = measurements[i];
totalTime += measurement.totalTime;
}
return totalTime;
}
function getDOMSummary(measurements) {
for (var items = [], i = 0; i < measurements.length; i++) {
var id, measurement = measurements[i];
for (id in measurement.writes) measurement.writes[id].forEach(function(write) {
items.push({
id: id,
type: DOM_OPERATION_TYPES[write.type] || write.type,
args: write.args
});
});
}
return items;
}
function getExclusiveSummary(measurements) {
for (var displayName, candidates = {}, i = 0; i < measurements.length; i++) {
var measurement = measurements[i], allIDs = merge(measurement.exclusive, measurement.inclusive);
for (var id in allIDs) {
displayName = measurement.displayNames[id].current;
candidates[displayName] = candidates[displayName] || {
componentName: displayName,
inclusive: 0,
exclusive: 0,
render: 0,
count: 0
};
if (measurement.render[id]) candidates[displayName].render += measurement.render[id];
if (measurement.exclusive[id]) candidates[displayName].exclusive += measurement.exclusive[id];
if (measurement.inclusive[id]) candidates[displayName].inclusive += measurement.inclusive[id];
if (measurement.counts[id]) candidates[displayName].count += measurement.counts[id];
}
}
var arr = [];
for (displayName in candidates) if (candidates[displayName].exclusive >= DONT_CARE_THRESHOLD) arr.push(candidates[displayName]);
arr.sort(function(a, b) {
return b.exclusive - a.exclusive;
});
return arr;
}
function getInclusiveSummary(measurements, onlyClean) {
for (var inclusiveKey, candidates = {}, i = 0; i < measurements.length; i++) {
var cleanComponents, measurement = measurements[i], allIDs = merge(measurement.exclusive, measurement.inclusive);
if (onlyClean) cleanComponents = getUnchangedComponents(measurement);
for (var id in allIDs) if (!onlyClean || cleanComponents[id]) {
var displayName = measurement.displayNames[id];
inclusiveKey = displayName.owner + " > " + displayName.current;
candidates[inclusiveKey] = candidates[inclusiveKey] || {
componentName: inclusiveKey,
time: 0,
count: 0
};
if (measurement.inclusive[id]) candidates[inclusiveKey].time += measurement.inclusive[id];
if (measurement.counts[id]) candidates[inclusiveKey].count += measurement.counts[id];
} else ;
}
var arr = [];
for (inclusiveKey in candidates) if (candidates[inclusiveKey].time >= DONT_CARE_THRESHOLD) arr.push(candidates[inclusiveKey]);
arr.sort(function(a, b) {
return b.time - a.time;
});
return arr;
}
function getUnchangedComponents(measurement) {
var cleanComponents = {}, dirtyLeafIDs = Object.keys(measurement.writes), allIDs = merge(measurement.exclusive, measurement.inclusive);
for (var id in allIDs) {
for (var isDirty = !1, i = 0; i < dirtyLeafIDs.length; i++) if (0 === dirtyLeafIDs[i].indexOf(id)) {
isDirty = !0;
break;
}
if (!isDirty && measurement.counts[id] > 0) cleanComponents[id] = !0;
}
return cleanComponents;
}
var merge = __webpack_require__(139), DONT_CARE_THRESHOLD = 1.2, DOM_OPERATION_TYPES = {
mountImageIntoNode: "set innerHTML",
INSERT_MARKUP: "set innerHTML",
MOVE_EXISTING: "move",
REMOVE_NODE: "remove",
TEXT_CONTENT: "set textContent",
updatePropertyByID: "update attribute",
deletePropertyByID: "delete attribute",
updateStylesByID: "update styles",
updateInnerHTMLByID: "set innerHTML",
dangerouslyReplaceNodeWithMarkupByID: "replace"
}, ReactDefaultPerfAnalysis = {
getExclusiveSummary: getExclusiveSummary,
getInclusiveSummary: getInclusiveSummary,
getDOMSummary: getDOMSummary,
getTotalTime: getTotalTime
};
module.exports = ReactDefaultPerfAnalysis;
}, function(module, exports, __webpack_require__) {
var performance = __webpack_require__(246);
if (!performance || !performance.now) performance = Date;
var performanceNow = performance.now.bind(performance);
module.exports = performanceNow;
}, function(module, exports, __webpack_require__) {
"use strict";
var performance, ExecutionEnvironment = __webpack_require__(134);
if (ExecutionEnvironment.canUseDOM) performance = window.performance || window.msPerformance || window.webkitPerformance;
module.exports = performance || {};
}, function(module, exports, __webpack_require__) {
"use strict";
function renderComponentToString(component) {
!0 ? invariant(ReactDescriptor.isValidDescriptor(component), "renderComponentToString(): You must pass a valid ReactComponent.") : invariant(ReactDescriptor.isValidDescriptor(component));
!0 ? invariant(!(2 === arguments.length && "function" == typeof arguments[1]), "renderComponentToString(): This function became synchronous and now returns the generated markup. Please remove the second parameter.") : invariant(!(2 === arguments.length && "function" == typeof arguments[1]));
var transaction;
try {
var id = ReactInstanceHandles.createReactRootID();
transaction = ReactServerRenderingTransaction.getPooled(!1);
return transaction.perform(function() {
var componentInstance = instantiateReactComponent(component), markup = componentInstance.mountComponent(id, transaction, 0);
return ReactMarkupChecksum.addChecksumToMarkup(markup);
}, null);
} finally {
ReactServerRenderingTransaction.release(transaction);
}
}
function renderComponentToStaticMarkup(component) {
!0 ? invariant(ReactDescriptor.isValidDescriptor(component), "renderComponentToStaticMarkup(): You must pass a valid ReactComponent.") : invariant(ReactDescriptor.isValidDescriptor(component));
var transaction;
try {
var id = ReactInstanceHandles.createReactRootID();
transaction = ReactServerRenderingTransaction.getPooled(!0);
return transaction.perform(function() {
var componentInstance = instantiateReactComponent(component);
return componentInstance.mountComponent(id, transaction, 0);
}, null);
} finally {
ReactServerRenderingTransaction.release(transaction);
}
}
var ReactDescriptor = __webpack_require__(143), ReactInstanceHandles = __webpack_require__(122), ReactMarkupChecksum = __webpack_require__(211), ReactServerRenderingTransaction = __webpack_require__(248), instantiateReactComponent = __webpack_require__(150), invariant = __webpack_require__(110);
module.exports = {
renderComponentToString: renderComponentToString,
renderComponentToStaticMarkup: renderComponentToStaticMarkup
};
}, function(module, exports, __webpack_require__) {
"use strict";
function ReactServerRenderingTransaction(renderToStaticMarkup) {
this.reinitializeTransaction();
this.renderToStaticMarkup = renderToStaticMarkup;
this.reactMountReady = CallbackQueue.getPooled(null);
this.putListenerQueue = ReactPutListenerQueue.getPooled();
}
var PooledClass = __webpack_require__(120), CallbackQueue = __webpack_require__(156), ReactPutListenerQueue = __webpack_require__(214), Transaction = __webpack_require__(158), emptyFunction = __webpack_require__(114), mixInto = __webpack_require__(157), ON_DOM_READY_QUEUEING = {
initialize: function() {
this.reactMountReady.reset();
},
close: emptyFunction
}, PUT_LISTENER_QUEUEING = {
initialize: function() {
this.putListenerQueue.reset();
},
close: emptyFunction
}, TRANSACTION_WRAPPERS = [ PUT_LISTENER_QUEUEING, ON_DOM_READY_QUEUEING ], Mixin = {
getTransactionWrappers: function() {
return TRANSACTION_WRAPPERS;
},
getReactMountReady: function() {
return this.reactMountReady;
},
getPutListenerQueue: function() {
return this.putListenerQueue;
},
destructor: function() {
CallbackQueue.release(this.reactMountReady);
this.reactMountReady = null;
ReactPutListenerQueue.release(this.putListenerQueue);
this.putListenerQueue = null;
}
};
mixInto(ReactServerRenderingTransaction, Transaction.Mixin);
mixInto(ReactServerRenderingTransaction, Mixin);
PooledClass.addPoolingTo(ReactServerRenderingTransaction);
module.exports = ReactServerRenderingTransaction;
}, function(module, exports, __webpack_require__) {
"use strict";
function onlyChild(children) {
!0 ? invariant(ReactDescriptor.isValidDescriptor(children), "onlyChild must be passed a children with exactly one child.") : invariant(ReactDescriptor.isValidDescriptor(children));
return children;
}
var ReactDescriptor = __webpack_require__(143), invariant = __webpack_require__(110);
module.exports = onlyChild;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) return obj; else {
var newObj = {};
if (null != obj) for (var key in obj) if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
newObj["default"] = obj;
return newObj;
}
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _redux = __webpack_require__(251), _reduxThunk = __webpack_require__(263), _reduxThunk2 = _interopRequireDefault(_reduxThunk), _reducersIndex = __webpack_require__(264), reducers = _interopRequireWildcard(_reducersIndex), enhancedCreateStore = void 0;
if (!1) {
var _require = require("redux"), compose = _require.compose;
enhancedCreateStore = compose(_redux.applyMiddleware(_reduxThunk2["default"]), require("redux-devtools").devTools(), require("redux-devtools").persistState(window.location.href.match(/[?&]debug_session=([^&]+)\b/)), _redux.createStore);
} else enhancedCreateStore = _redux.applyMiddleware(_reduxThunk2["default"])(_redux.createStore);
exports["default"] = function(initialState) {
var reducer = _redux.combineReducers(reducers), store = enhancedCreateStore(reducer, initialState);
if (!1) module.hot.accept("../reducers/index", function() {
store.replaceReducer(_redux.combineReducers(require("../reducers/index")));
});
return store;
};
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _createStore = __webpack_require__(252), _createStore2 = _interopRequireDefault(_createStore), _utilsCompose = __webpack_require__(256), _utilsCompose2 = _interopRequireDefault(_utilsCompose), _utilsCombineReducers = __webpack_require__(257), _utilsCombineReducers2 = _interopRequireDefault(_utilsCombineReducers), _utilsBindActionCreators = __webpack_require__(260), _utilsBindActionCreators2 = _interopRequireDefault(_utilsBindActionCreators), _utilsApplyMiddleware = __webpack_require__(261), _utilsApplyMiddleware2 = _interopRequireDefault(_utilsApplyMiddleware), _utilsComposeMiddleware = __webpack_require__(262), _utilsComposeMiddleware2 = _interopRequireDefault(_utilsComposeMiddleware);
exports.createStore = _createStore2["default"];
exports.compose = _utilsCompose2["default"];
exports.combineReducers = _utilsCombineReducers2["default"];
exports.bindActionCreators = _utilsBindActionCreators2["default"];
exports.applyMiddleware = _utilsApplyMiddleware2["default"];
exports.composeMiddleware = _utilsComposeMiddleware2["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function createStore(reducer, initialState) {
var store = new _Store2["default"](reducer, initialState);
return {
dispatch: store.dispatch.bind(store),
subscribe: store.subscribe.bind(store),
getState: store.getState.bind(store),
getReducer: store.getReducer.bind(store),
replaceReducer: store.replaceReducer.bind(store)
};
}
exports.__esModule = !0;
exports["default"] = createStore;
var _Store = __webpack_require__(253), _Store2 = _interopRequireDefault(_Store);
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
exports.__esModule = !0;
var _invariant = __webpack_require__(254), _invariant2 = _interopRequireDefault(_invariant), _utilsIsPlainObject = __webpack_require__(255), _utilsIsPlainObject2 = _interopRequireDefault(_utilsIsPlainObject), ActionTypes = {
INIT: "@@redux/INIT"
};
exports.ActionTypes = ActionTypes;
var Store = function() {
function Store(reducer, initialState) {
_classCallCheck(this, Store);
_invariant2["default"]("function" == typeof reducer, "Expected the reducer to be a function.");
this.state = initialState;
this.listeners = [];
this.replaceReducer(reducer);
}
Store.prototype.getReducer = function() {
return this.reducer;
};
Store.prototype.replaceReducer = function(nextReducer) {
this.reducer = nextReducer;
this.dispatch({
type: ActionTypes.INIT
});
};
Store.prototype.dispatch = function(action) {
_invariant2["default"](_utilsIsPlainObject2["default"](action), "Actions must be plain objects. Use custom middleware for async actions.");
var reducer = this.reducer;
this.state = reducer(this.state, action);
this.listeners.forEach(function(listener) {
return listener();
});
return action;
};
Store.prototype.getState = function() {
return this.state;
};
Store.prototype.subscribe = function(listener) {
var listeners = this.listeners;
listeners.push(listener);
return function() {
var index = listeners.indexOf(listener);
listeners.splice(index, 1);
};
};
return Store;
}();
exports["default"] = Store;
}, function(module, exports, __webpack_require__) {
"use strict";
var invariant = function(condition, format, a, b, c, d, e, f) {
if (!0) if (void 0 === format) throw new Error("invariant requires an error message argument");
if (!condition) {
var error;
if (void 0 === format) error = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."); else {
var args = [ a, b, c, d, e, f ], argIndex = 0;
error = new Error("Invariant Violation: " + format.replace(/%s/g, function() {
return args[argIndex++];
}));
}
error.framesToPop = 1;
throw error;
}
};
module.exports = invariant;
}, function(module, exports) {
"use strict";
function isPlainObject(obj) {
return obj ? "object" == typeof obj && Object.getPrototypeOf(obj) === Object.prototype : !1;
}
exports.__esModule = !0;
exports["default"] = isPlainObject;
module.exports = exports["default"];
}, function(module, exports) {
"use strict";
function compose() {
for (var _len = arguments.length, funcs = Array(_len), _key = 0; _len > _key; _key++) funcs[_key] = arguments[_key];
return funcs.reduceRight(function(composed, f) {
return f(composed);
});
}
exports.__esModule = !0;
exports["default"] = compose;
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function getErrorMessage(key, action) {
var actionType = action && action.type, actionName = actionType && '"' + actionType + '"' || "an action";
return 'Reducer "' + key + '" returned undefined handling ' + actionName + ". To ignore an action, you must explicitly return the previous state.";
}
function combineReducers(reducers) {
var finalReducers = _utilsPick2["default"](reducers, function(val) {
return "function" == typeof val;
});
Object.keys(finalReducers).forEach(function(key) {
var reducer = finalReducers[key];
_invariant2["default"]("undefined" != typeof reducer(void 0, {
type: _Store.ActionTypes.INIT
}), 'Reducer "' + key + '" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');
var type = Math.random().toString(36).substring(7).split("").join(".");
_invariant2["default"]("undefined" != typeof reducer(void 0, {
type: type
}), 'Reducer "' + key + '" returned undefined when probed with a random type. ' + ("Don't try to handle " + _Store.ActionTypes.INIT + ' or other actions in "redux/*" ') + "namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.");
});
return function(state, action) {
if (void 0 === state) state = {};
return _utilsMapValues2["default"](finalReducers, function(reducer, key) {
var newState = reducer(state[key], action);
_invariant2["default"]("undefined" != typeof newState, getErrorMessage(key, action));
return newState;
});
};
}
exports.__esModule = !0;
exports["default"] = combineReducers;
var _utilsMapValues = __webpack_require__(258), _utilsMapValues2 = _interopRequireDefault(_utilsMapValues), _utilsPick = __webpack_require__(259), _utilsPick2 = _interopRequireDefault(_utilsPick), _invariant = __webpack_require__(254), _invariant2 = _interopRequireDefault(_invariant), _Store = __webpack_require__(253);
module.exports = exports["default"];
}, function(module, exports) {
"use strict";
function mapValues(obj, fn) {
return Object.keys(obj).reduce(function(result, key) {
result[key] = fn(obj[key], key);
return result;
}, {});
}
exports.__esModule = !0;
exports["default"] = mapValues;
module.exports = exports["default"];
}, function(module, exports) {
"use strict";
function pick(obj, fn) {
return Object.keys(obj).reduce(function(result, key) {
if (fn(obj[key])) result[key] = obj[key];
return result;
}, {});
}
exports.__esModule = !0;
exports["default"] = pick;
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function bindActionCreators(actionCreators, dispatch) {
return _utilsMapValues2["default"](actionCreators, function(actionCreator) {
return function() {
return dispatch(actionCreator.apply(void 0, arguments));
};
});
}
exports.__esModule = !0;
exports["default"] = bindActionCreators;
var _utilsMapValues = __webpack_require__(258), _utilsMapValues2 = _interopRequireDefault(_utilsMapValues);
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function applyMiddleware() {
for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _len > _key; _key++) middlewares[_key] = arguments[_key];
return function(next) {
return function() {
function dispatch(action) {
var methods = {
dispatch: dispatch,
getState: store.getState
};
return _compose2["default"](middleware(methods), store.dispatch)(action);
}
var store = next.apply(void 0, arguments), middleware = _composeMiddleware2["default"].apply(void 0, middlewares);
return _extends({}, store, {
dispatch: dispatch
});
};
};
}
exports.__esModule = !0;
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
}
return target;
};
exports["default"] = applyMiddleware;
var _compose = __webpack_require__(256), _compose2 = _interopRequireDefault(_compose), _composeMiddleware = __webpack_require__(262), _composeMiddleware2 = _interopRequireDefault(_composeMiddleware);
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function composeMiddleware() {
for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _len > _key; _key++) middlewares[_key] = arguments[_key];
return function(methods) {
return function(next) {
return _compose2["default"].apply(void 0, middlewares.map(function(m) {
return m(methods);
}).concat([ next ]));
};
};
}
exports.__esModule = !0;
exports["default"] = composeMiddleware;
var _compose = __webpack_require__(256), _compose2 = _interopRequireDefault(_compose);
module.exports = exports["default"];
}, function(module, exports) {
"use strict";
function thunkMiddleware(_ref) {
var dispatch = _ref.dispatch, getState = _ref.getState;
return function(next) {
return function(action) {
return "function" == typeof action ? action(dispatch, getState) : next(action);
};
};
}
exports.__esModule = !0;
exports["default"] = thunkMiddleware;
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequire(obj) {
return obj && obj.__esModule ? obj["default"] : obj;
}
exports.__esModule = !0;
var _page = __webpack_require__(265);
exports.page = _interopRequire(_page);
var _lang = __webpack_require__(266);
exports.lang = _interopRequire(_lang);
var _drivers = __webpack_require__(267);
exports.drivers = _interopRequire(_drivers);
var _installedPrograms = __webpack_require__(268);
exports.installedPrograms = _interopRequire(_installedPrograms);
var _programs = __webpack_require__(269);
exports.programs = _interopRequire(_programs);
var _loading = __webpack_require__(270);
exports.loading = _interopRequire(_loading);
var _diagnostics = __webpack_require__(271);
exports.diagnostics = _interopRequire(_diagnostics);
var _installation = __webpack_require__(285);
exports.installation = _interopRequire(_installation);
var _app = __webpack_require__(286);
exports.app = _interopRequire(_app);
}, function(module, exports) {
"use strict";
exports.__esModule = !0;
exports["default"] = function(state, action) {
if (void 0 === state) state = "LOADING_SCREEN";
switch (action.type) {
case "NAVIGATE":
return action.page;
case "NEW_ORDER_INSTALL_ALL_START":
return "INSTALLATION";
case "NEW_ORDER_DRIVERS_INSTALL_ALL_SUCCESS":
case "NEW_ORDER_PROGRAMS_INSTALL_ALL_SUCCESS":
return "FINAL_SCREEN";
case "AGENT_INSTALL_START":
return "LOADING";
case "BACKUP_START":
return "LOADING";
default:
return state;
}
};
module.exports = exports["default"];
}, function(module, exports) {
"use strict";
exports.__esModule = !0;
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
}
return target;
}, defaultState = {
languages: []
};
exports["default"] = function(state, action) {
if (void 0 === state) state = defaultState;
switch (action.type) {
case "CURRENT_LANGUAGE_UPDATED":
return _extends({}, state, {
currentLanguage: action.payload
});
case "MENU_LANGUAGES_LIST_LOADED":
return _extends({}, state, {
languages: action.payload
});
default:
return state;
}
};
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function updateState(driver, currentDriver) {
if (!currentDriver) return _extends({}, driver, {
state: "install"
}); else if (currentDriver.date === driver.date || currentDriver.version === driver.version) return _extends({}, driver, {
state: "installed"
}); else if (currentDriver.date < driver.date) return _extends({}, driver, {
state: "update"
}); else return _extends({}, driver, {
state: "rollback"
});
}
function compareDrivers(a, b) {
var diff = states[a.recommendedDriver.state] - states[b.recommendedDriver.state];
if (0 !== diff) return diff;
if (a.recommendedDriver["class"] > b.recommendedDriver["class"]) return 1;
if (a.recommendedDriver["class"] < b.recommendedDriver["class"]) return -1;
if (a.recommendedDriver.name > b.recommendedDriver.name) return 1;
if (a.recommendedDriver.name < b.recommendedDriver.name) return -1; else return 0;
}
function shouldInstall(recommendedDriver) {
var hasErrorDevices = arguments.length <= 1 || void 0 === arguments[1] ? !1 : arguments[1];
if ("install" === recommendedDriver.state) return !0;
if ("update" === recommendedDriver.state && (recommendedDriver.statusCode > 0 || !hasErrorDevices)) return !0; else return !1;
}
function checkDownloaded(driver) {
var path = "..\\drivers\\" + driver.pack + ".7z";
if (!_drpCoreSystem.fso.FileExists(path)) driver = Object.assign({}, driver, {
name: "[Not downloaded] " + driver.name
});
return driver;
}
exports.__esModule = !0;
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
}
return target;
}, _drpCoreSystem = __webpack_require__(27), _lodashArrayUniq = __webpack_require__(51), _lodashArrayUniq2 = _interopRequireDefault(_lodashArrayUniq), states = {
install: 1,
update: 2,
installed: 3,
rollback: 4
};
exports["default"] = function(state, action) {
if (void 0 === state) state = [];
switch (action.type) {
case "DRIVERS_SCAN_SUCCESS":
var hasErrorDevices = action.payload.some(function(_ref) {
var drpDrivers = _ref[0];
return drpDrivers[0].statusCode > 0;
});
return action.payload.map(function(item) {
var drpDrivers = item[0], currentDriver = item[1];
drpDrivers = _lodashArrayUniq2["default"](drpDrivers, function(driver) {
return [ driver.link, driver.inf ].join(":");
});
drpDrivers = drpDrivers.map(function(driver) {
return updateState(driver, currentDriver);
});
if (!0) drpDrivers = drpDrivers.map(checkDownloaded);
var recommendedDriver = drpDrivers[0], otherDrivers = drpDrivers;
return {
deviceId: recommendedDriver.fullDeviceId,
isChecked: shouldInstall(recommendedDriver, hasErrorDevices),
currentDriver: currentDriver,
recommendedDriver: recommendedDriver,
otherDrivers: otherDrivers
};
}).sort(compareDrivers);
case "DRIVERS_OTHER_EXPANDED":
return state.map(function(item) {
if (item.deviceId === action.id) return _extends({}, item, {
isExpanded: action.expanded
}); else return item;
});
case "NEW_ORDER_DRIVER_INSTALLATION_FINISHED":
return state.map(function(item) {
if (item.deviceId === action.meta.id) return _extends({}, item, {
currentDriver: action.payload.recommendedDriver
}); else return item;
});
case "NEW_ORDER_DRIVERS_INSTALL_ALL_SUCCESS":
return state.map(function(item) {
var recommendedDriver = item.recommendedDriver, otherDrivers = item.otherDrivers, currentDriver = item.currentDriver, isChecked = item.isChecked, drpDrivers = otherDrivers;
drpDrivers = drpDrivers.map(function(driver) {
return updateState(driver, currentDriver);
});
recommendedDriver = drpDrivers[0];
otherDrivers = drpDrivers;
return {
deviceId: recommendedDriver.fullDeviceId,
isChecked: isChecked && shouldInstall(recommendedDriver),
currentDriver: currentDriver,
recommendedDriver: recommendedDriver,
otherDrivers: otherDrivers
};
}).sort(compareDrivers);
case "DRIVERS_INFO_OPEN":
return state.map(function(item) {
if (item.deviceId === action.id) return _extends({}, item, {
isInfoOpened: action.index
}); else if (item.isInfoOpened !== !1) return _extends({}, item, {
isInfoOpened: !1
}); else return item;
});
case "DRIVERS_TOGGLED":
return state.map(function(item) {
if (item.deviceId === action.id) return _extends({}, item, {
isChecked: action.checked
}); else return item;
});
case "DRIVERS_CHECK_ALL_TOGGLED":
return state.map(function(item) {
return _extends({}, item, {
isChecked: action.payload.isChecked
});
});
default:
return state;
}
};
module.exports = exports["default"];
}, function(module, exports) {
"use strict";
exports.__esModule = !0;
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
}
return target;
}, initialState = {
isActiveRemoving: !1,
isActiveRemovingAll: !1,
isActiveBrowserCleaning: !1,
installedProgramsExpanded: !1,
isUninstallRatePopoverOpened: !1,
isChromeInstalled: !1,
isAPIFailed: !0,
apiData: null
}, getRemovalRate = function(item) {
var removalRate = void 0;
if (item.uninstallPercents >= 70) removalRate = "large"; else if (item.uninstallPercents >= 50 && item.uninstallPercents < 70) removalRate = "middle"; else removalRate = "small";
return removalRate;
}, comparePrograms = function(a, b) {
return b.uninstallPercents - a.uninstallPercents;
};
exports["default"] = function(state, action) {
if (void 0 === state) state = initialState;
switch (action.type) {
case "INSTALLED_PROGRAMS_SCAN_FINISHED":
var currentId = 0, removalRate = void 0;
return _extends({}, state, {
isAPIFailed: !action.payload,
apiData: action.payload ? action.payload.map(function(program) {
currentId++;
removalRate = getRemovalRate(program);
return _extends({}, program, {
id: currentId,
removalRate: removalRate,
isHarmful: "large" === removalRate,
isChecked: "large" === removalRate,
starsCount: Math.round(program.rating / 60),
isRemoving: !1,
isExpanded: !1
});
}).sort(comparePrograms) : []
});
case "PROTECT_SCREEN_RESET":
return _extends({}, state, {
apiData: state.apiData.map(function(item) {
return _extends({}, item, {
isChecked: item.isHarmful
});
})
});
case "INSTALLED_CHROME_IS_DETECTED":
return _extends({}, state, {
isChromeInstalled: !0
});
case "INSTALLED_CHROME_IS_NOT_DETECTED":
return _extends({}, state, {
isChromeInstalled: !1
});
case "INSTALLED_PROGRAM_TOGGLED":
return _extends({}, state, {
apiData: state.apiData.map(function(item) {
if (item.id === action.payload.id) return _extends({}, item, {
isChecked: action.payload.isChecked
}); else return item;
})
});
case "INSTALLED_PROGRAM_EXPANDED":
return _extends({}, state, {
apiData: state.apiData.map(function(item) {
if (item.id === action.payload.id) return _extends({}, item, {
isExpanded: action.payload.isExpanded
}); else return item;
})
});
case "INSTALLED_PROGRAM_REMOVING_STARTED":
return _extends({}, state, {
isActiveRemoving: !0,
apiData: state.apiData.map(function(item) {
if (item.id === action.payload.id) return _extends({}, item, {
isRemoving: !0
}); else return item;
})
});
case "INSTALLED_PROGRAM_REMOVING_SUCCESS":
return _extends({}, state, {
isActiveRemoving: !1,
apiData: state.apiData.filter(function(item) {
return item.id !== action.payload.id;
})
});
case "INSTALLED_PROGRAM_REMOVING_FAILED":
return _extends({}, state, {
isActiveRemoving: !1,
apiData: state.apiData.map(function(item) {
if (item.id === action.payload.id) return _extends({}, item, {
isRemoving: !1
}); else return item;
})
});
case "REMOVING_ALL_HARMFUL_PROGRAMS_STARTED":
return _extends({}, state, {
isActiveRemovingAll: !0
});
case "REMOVING_ALL_HARMFUL_PROGRAMS_FINISHED":
return _extends({}, state, {
isActiveRemovingAll: !1
});
case "REMOVING_HARMFUL_PROGRAM_SUCCESS":
return _extends({}, state, {
apiData: state.apiData.filter(function(item) {
return item.id !== action.payload.id;
})
});
case "CHROME_CLEANING_STARTED":
return _extends({}, state, {
isActiveBrowserCleaning: !0
});
case "CHROME_CLEANING_FINISHED":
return _extends({}, state, {
isActiveBrowserCleaning: !1
});
case "ALL_INSTALLED_PROGRAMS_EXPANDED":
return _extends({}, state, {
installedProgramsExpanded: !state.installedProgramsExpanded
});
case "UNINSTALL_RATE_POPOVER_TOGGLED":
return _extends({}, state, {
isUninstallRatePopoverOpened: action.payload.isOpened
});
default:
return state;
}
};
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function checkDownloaded(program) {
var fileName = program.link.split("/").slice(-1)[0], path = "..\\programs\\" + fileName;
if (!_drpCoreSystem.fso.FileExists(path)) program = Object.assign({}, program, {
name: "[Not downloaded] " + program.name
});
return program;
}
function remapAttrs(item) {
return _extends({}, item, {
link: item.URL,
URL: void 0,
name: item.Name,
Name: void 0,
category: item.Category,
Category: void 0,
isChecked: item.IsChecked,
IsChecked: void 0,
isPartner: item.IsPartner,
id: item.ID,
description: item.Description,
icon: item.Icon,
publisher: item.Publisher,
rating: item.Rating
});
}
function patchIfNotifier(item) {
if (_selectorsDriversPrograms.isNotifier(item)) return _extends({}, item, {
isNotifierChecked: item.isChecked
}); else return item;
}
exports.__esModule = !0;
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
}
return target;
}, _drpCoreSystem = __webpack_require__(27), _selectorsDriversPrograms = __webpack_require__(105);
exports["default"] = function(state, action) {
if (void 0 === state) state = [];
switch (action.type) {
case "PROGRAMS_LOADED":
return action.payload.map(function(program) {
program = remapAttrs(program);
if (!0) program = checkDownloaded(program);
program = patchIfNotifier(program);
return program;
});
case "PROGRAMS_TOGGLED":
return state.map(function(item) {
if (item.ID === action.payload.id) {
var _action$payload = action.payload, checked = _action$payload.checked, zone = _action$payload.zone, isChecked = item.isChecked, isNotifierChecked = item.isNotifierChecked;
if (_selectorsDriversPrograms.isNotifier(item)) if ("DRIVER_UTILITIES" === zone) isNotifierChecked = checked; else if ("PROGRAMS_PAGE" === zone) isChecked = checked; else throw new Error("ProgramRow must have proper zone, not " + zone); else isChecked = checked;
return _extends({}, item, {
isNotifierChecked: isNotifierChecked,
isChecked: isChecked
});
} else return item;
});
case "NEW_ORDER_PROGRAM_INSTALLATION_FINISHED":
return state.map(function(item) {
if (item.ID === action.payload.id) return _extends({}, item, {
isInstalled: !0
}); else return item;
});
default:
return state;
}
};
module.exports = exports["default"];
}, function(module, exports) {
"use strict";
exports.__esModule = !0;
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
}
return target;
};
exports["default"] = function(state, action) {
if (void 0 === state) state = {
status: "system_scanning"
};
switch (action.type) {
case "AGENT_INSTALL_START":
return _extends({}, state, {
now: "AGENT"
});
case "AGENT_INSTALL_SUCCESS":
return _extends({}, state, {
now: "AGENT_DONE"
});
case "AGENT_INSTALL_FAILED":
return _extends({}, state, {
now: "AGENT_FAILED"
});
case "BACKUP_START":
return _extends({}, state, {
now: "BACKUP"
});
case "BACKUP_SUCCESS":
return _extends({}, state, {
now: "BACKUP_DONE"
});
case "BACKUP_FAILED":
return _extends({}, state, {
now: "BACKUP_FAILED"
});
case "NO_INTERNET_DETECTED":
return _extends({}, state, {
now: "NO_INTERNET"
});
case "RUN_ERROR_DETECTED":
return _extends({}, state, {
now: "RUN_ERROR"
});
case "LOADING_STATUS_UPDATED":
return _extends({}, state, {
status: action.payload.status
});
case "DRIVERS_SCAN_SUCCESS":
return _extends({}, state, {
status: "api_response_received"
});
case "INSTALLED_PROGRAMS_SCAN_FINISHED":
return _extends({}, state, {
status: "protect_api_response_received"
});
default:
return state;
}
};
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _lodashObjectMerge = __webpack_require__(272), _lodashObjectMerge2 = _interopRequireDefault(_lodashObjectMerge);
exports["default"] = function(state, action) {
if (void 0 === state) state = {
isLoading: !0,
videos: [ {} ],
disks: [ {} ]
};
switch (action.type) {
case "DIAGNOSTICS_LOAD_SUCCESS":
return {
data: action.payload,
isLoading: !1
};
case "DIAGNOSTICS_UPDATE_SUCCESS":
return {
data: _lodashObjectMerge2["default"]({}, state.data, action.payload),
isLoading: !1
};
default:
return state;
}
};
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
var baseMerge = __webpack_require__(273), createAssigner = __webpack_require__(283), merge = createAssigner(baseMerge);
module.exports = merge;
}, function(module, exports, __webpack_require__) {
function baseMerge(object, source, customizer, stackA, stackB) {
if (!isObject(object)) return object;
var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)), props = isSrcArr ? void 0 : keys(source);
arrayEach(props || source, function(srcValue, key) {
if (props) {
key = srcValue;
srcValue = source[key];
}
if (isObjectLike(srcValue)) {
stackA || (stackA = []);
stackB || (stackB = []);
baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB);
} else {
var value = object[key], result = customizer ? customizer(value, srcValue, key, object, source) : void 0, isCommon = void 0 === result;
if (isCommon) result = srcValue;
if ((void 0 !== result || isSrcArr && !(key in object)) && (isCommon || (result === result ? result !== value : value === value))) object[key] = result;
}
});
return object;
}
var arrayEach = __webpack_require__(274), baseMergeDeep = __webpack_require__(275), isArray = __webpack_require__(73), isArrayLike = __webpack_require__(67), isObject = __webpack_require__(65), isObjectLike = __webpack_require__(66), isTypedArray = __webpack_require__(76), keys = __webpack_require__(61);
module.exports = baseMerge;
}, function(module, exports) {
function arrayEach(array, iteratee) {
for (var index = -1, length = array.length; ++index < length && iteratee(array[index], index, array) !== !1; ) ;
return array;
}
module.exports = arrayEach;
}, function(module, exports, __webpack_require__) {
function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) {
for (var length = stackA.length, srcValue = source[key]; length--; ) if (stackA[length] == srcValue) {
object[key] = stackB[length];
return;
}
var value = object[key], result = customizer ? customizer(value, srcValue, key, object, source) : void 0, isCommon = void 0 === result;
if (isCommon) {
result = srcValue;
if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) result = isArray(value) ? value : isArrayLike(value) ? arrayCopy(value) : []; else if (isPlainObject(srcValue) || isArguments(srcValue)) result = isArguments(value) ? toPlainObject(value) : isPlainObject(value) ? value : {}; else isCommon = !1;
}
stackA.push(srcValue);
stackB.push(result);
if (isCommon) object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB); else if (result === result ? result !== value : value === value) object[key] = result;
}
var arrayCopy = __webpack_require__(276), isArguments = __webpack_require__(72), isArray = __webpack_require__(73), isArrayLike = __webpack_require__(67), isPlainObject = __webpack_require__(277), isTypedArray = __webpack_require__(76), toPlainObject = __webpack_require__(281);
module.exports = baseMergeDeep;
}, function(module, exports) {
function arrayCopy(source, array) {
var index = -1, length = source.length;
array || (array = Array(length));
for (;++index < length; ) array[index] = source[index];
return array;
}
module.exports = arrayCopy;
}, function(module, exports, __webpack_require__) {
function isPlainObject(value) {
var Ctor;
if (!isObjectLike(value) || objToString.call(value) != objectTag || isArguments(value) || !hasOwnProperty.call(value, "constructor") && (Ctor = value.constructor,
"function" == typeof Ctor && !(Ctor instanceof Ctor))) return !1;
var result;
baseForIn(value, function(subValue, key) {
result = key;
});
return void 0 === result || hasOwnProperty.call(value, result);
}
var baseForIn = __webpack_require__(278), isArguments = __webpack_require__(72), isObjectLike = __webpack_require__(66), objectTag = "[object Object]", objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty, objToString = objectProto.toString;
module.exports = isPlainObject;
}, function(module, exports, __webpack_require__) {
function baseForIn(object, iteratee) {
return baseFor(object, iteratee, keysIn);
}
var baseFor = __webpack_require__(279), keysIn = __webpack_require__(75);
module.exports = baseForIn;
}, function(module, exports, __webpack_require__) {
var createBaseFor = __webpack_require__(280), baseFor = createBaseFor();
module.exports = baseFor;
}, function(module, exports, __webpack_require__) {
function createBaseFor(fromRight) {
return function(object, iteratee, keysFunc) {
for (var iterable = toObject(object), props = keysFunc(object), length = props.length, index = fromRight ? length : -1; fromRight ? index-- : ++index < length; ) {
var key = props[index];
if (iteratee(iterable[key], key, iterable) === !1) break;
}
return object;
};
}
var toObject = __webpack_require__(77);
module.exports = createBaseFor;
}, function(module, exports, __webpack_require__) {
function toPlainObject(value) {
return baseCopy(value, keysIn(value));
}
var baseCopy = __webpack_require__(282), keysIn = __webpack_require__(75);
module.exports = toPlainObject;
}, function(module, exports) {
function baseCopy(source, props, object) {
object || (object = {});
for (var index = -1, length = props.length; ++index < length; ) {
var key = props[index];
object[key] = source[key];
}
return object;
}
module.exports = baseCopy;
}, function(module, exports, __webpack_require__) {
function createAssigner(assigner) {
return restParam(function(object, sources) {
var index = -1, length = null == object ? 0 : sources.length, customizer = length > 2 ? sources[length - 2] : void 0, guard = length > 2 ? sources[2] : void 0, thisArg = length > 1 ? sources[length - 1] : void 0;
if ("function" == typeof customizer) {
customizer = bindCallback(customizer, thisArg, 5);
length -= 2;
} else {
customizer = "function" == typeof thisArg ? thisArg : void 0;
length -= customizer ? 1 : 0;
}
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
customizer = 3 > length ? void 0 : customizer;
length = 1;
}
for (;++index < length; ) {
var source = sources[index];
if (source) assigner(object, source, customizer);
}
return object;
});
}
var bindCallback = __webpack_require__(88), isIterateeCall = __webpack_require__(99), restParam = __webpack_require__(284);
module.exports = createAssigner;
}, function(module, exports) {
function restParam(func, start) {
if ("function" != typeof func) throw new TypeError(FUNC_ERROR_TEXT);
start = nativeMax(void 0 === start ? func.length - 1 : +start || 0, 0);
return function() {
for (var args = arguments, index = -1, length = nativeMax(args.length - start, 0), rest = Array(length); ++index < length; ) rest[index] = args[start + index];
switch (start) {
case 0:
return func.call(this, rest);
case 1:
return func.call(this, args[0], rest);
case 2:
return func.call(this, args[0], args[1], rest);
}
var otherArgs = Array(start + 1);
index = -1;
for (;++index < start; ) otherArgs[index] = args[index];
otherArgs[start] = rest;
return func.apply(this, otherArgs);
};
}
var FUNC_ERROR_TEXT = "Expected a function", nativeMax = Math.max;
module.exports = restParam;
}, function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = !0;
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
}
return target;
}, _selectorsDriversPrograms = __webpack_require__(105), initialState = {
rebootNeeded: !1,
isExpanded: !1
};
exports["default"] = function(state, action) {
if (void 0 === state) state = initialState;
var items = void 0;
switch (action.type) {
case "NEW_ORDER_INSTALL_ALL_START":
return _extends({}, state, {
result: null,
totalDrivers: action.meta.totalDrivers,
successDrivers: 0,
isYandexInstalled: !1,
items: action.meta.items
});
case "NEW_ORDER_DRIVER_DOWNLOAD_STARTED":
case "NEW_ORDER_DRIVER_DOWNLOAD_FINISHED":
case "NEW_ORDER_DRIVER_UNZIPPING_STARTED":
case "NEW_ORDER_DRIVER_UNZIPPING_FINISHED":
case "NEW_ORDER_DRIVER_INSTALLATION_STARTED":
case "NEW_ORDER_PROGRAM_DOWNLOAD_STARTED":
case "NEW_ORDER_PROGRAM_DOWNLOAD_FINISHED":
case "NEW_ORDER_PROGRAM_INSTALLATION_FINISHED":
items = state.items.map(function(item) {
if (item.id === action.payload.id) return _extends({}, item, {
status: action.meta.status
}); else return item;
});
return _extends({}, state, {
items: items
});
case "NEW_ORDER_DRIVER_DOWNLOAD_FAILED":
case "NEW_ORDER_DRIVER_UNZIPPING_FAILED":
case "NEW_ORDER_DRIVER_INSTALLATION_FAILED":
case "NEW_ORDER_PROGRAM_DOWNLOAD_FAILED":
case "NEW_ORDER_PROGRAM_INSTALLATION_FAILED":
items = state.items.map(function(item) {
if (item.id === action.payload.id) return _extends({}, item, {
status: action.meta.status,
error: {
errorType: action.meta.errorType
}
}); else return item;
});
return _extends({}, state, {
items: items
});
case "NEW_ORDER_PROGRAM_INSTALLATION_STARTED":
items = state.items.map(function(item) {
if (item.id === action.payload.id) return _extends({}, item, {
status: action.meta.status
}); else return item;
});
return _extends({}, state, {
items: items,
isYandexInstalled: state.isYandexInstalled || _selectorsDriversPrograms.isYandexBrowser(action.payload)
});
case "NEW_ORDER_DRIVER_INSTALLATION_FINISHED":
items = state.items.map(function(item) {
if (item.id === action.payload.id) {
var _action$meta = action.meta, _status = _action$meta.status, rebootNeeded = _action$meta.rebootNeeded;
return _extends({}, item, {
status: _status,
rebootNeeded: rebootNeeded
});
} else return item;
});
return _extends({}, state, {
items: items,
rebootNeeded: state.rebootNeeded || action.meta.rebootNeeded,
successDrivers: state.successDrivers + 1
});
case "NEW_ORDER_DRIVERS_INSTALL_ALL_SUCCESS":
return _extends({}, state, {
result: "DRIVERS_DONE"
});
case "NEW_ORDER_PROGRAMS_INSTALL_ALL_SUCCESS":
return _extends({}, state, {
result: "PROGRAMS_DONE"
});
case "NEW_ORDER_ITEM_CANCELED":
items = state.items.map(function(item) {
if (item.id === action.payload.id) return _extends({}, item, {
status: "canceled"
}); else return item;
});
return _extends({}, state, {
items: items
});
case "NEW_ORDER_DOWNLOAD_FILE_SIZE_RECEIVED":
items = state.items.map(function(item) {
if (item.id === action.payload.id) return _extends({}, item, {
downloading: _extends({}, item.downloading, {
totalFileSize: action.meta.totalFileSize
})
}); else return item;
});
return _extends({}, state, {
items: items
});
case "NEW_ORDER_DOWNLOAD_FILE_UPDATED":
items = state.items.map(function(item) {
if (item.id === action.payload.id) return _extends({}, item, {
downloading: _extends({}, item.downloading, {
timeElapsed: action.meta.timeElapsed,
downloadedSize: action.meta.downloadedSize,
downloadingSpeed: action.meta.downloadingSpeed
})
}); else return item;
});
return _extends({}, state, {
items: items
});
case "NEW_ORDER_ZIP_TOTAL_COUNT_RECEIVED":
items = state.items.map(function(item) {
if (item.id === action.payload.id) return _extends({}, item, {
unzipping: _extends({}, item.unzipping, {
totalCount: action.meta.totalCount
})
}); else return item;
});
return _extends({}, state, {
items: items
});
case "NEW_ORDER_UNZIPPED_PART_UPDATED":
items = state.items.map(function(item) {
if (item.id === action.payload.id) return _extends({}, item, {
unzipping: _extends({}, item.unzipping, {
unzippedPercents: item.unzipping.totalCount ? Math.min(Math.max(Math.round(100 * action.meta.unzippedCount / item.unzipping.totalCount), item.unzipping.unzippedPercents), 100) : 0
})
}); else return item;
});
return _extends({}, state, {
items: items
});
case "NEW_ORDER_INSTALLATION_EXPANDED":
return _extends({}, state, {
isExpanded: action.expanded
});
case "NEW_ORDER_INSTALLATION_AV_CONFIRMED":
return _extends({}, state, {
isConfirmed: action.promo
});
case "ERROR_DEVICES_COUNT_RECEIVED":
return _extends({}, state, {
errorDevicesCount: action.meta.count
});
default:
return state;
}
};
module.exports = exports["default"];
}, function(module, exports) {
"use strict";
exports.__esModule = !0;
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
}
return target;
}, initialState = {
windowState: "maximized",
isBurgerMenuOpened: !1
};
exports["default"] = function(state, action) {
if (void 0 === state) state = initialState;
switch (action.type) {
case "WINDOW_PARAMETERS_UPDATED":
return _extends({}, state, action.payload);
case "WINDOW_STATE_CHANGED":
return _extends({}, state, {
windowState: action.payload.windowState
});
case "BURGER_MENU_TOGGLED":
return _extends({}, state, {
isBurgerMenuOpened: !state.isBurgerMenuOpened
});
default:
return state;
}
};
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _createProvider = __webpack_require__(288), _createProvider2 = _interopRequireDefault(_createProvider);
exports["default"] = _createProvider2["default"](_react2["default"]);
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function createProvider(React) {
var PropTypes = React.PropTypes, storeShape = _reactReduxLibUtilsCreateStoreShape2["default"](PropTypes);
return React.createClass({
childContextTypes: {
store: storeShape.isRequired
},
propTypes: {
children: PropTypes.func.isRequired,
store: storeShape.isRequired
},
getChildContext: function() {
return {
store: this.state.store
};
},
getInitialState: function() {
var props = this.props;
return {
store: props.store
};
},
componentWillReceiveProps: function(nextProps) {
var store = this.state.store, nextStore = nextProps.store;
if (store !== nextStore) {
var nextReducer = nextStore.getReducer();
store.replaceReducer(nextReducer);
}
},
render: function() {
var children = this.props.children;
return children();
}
});
}
exports.__esModule = !0;
exports["default"] = createProvider;
var _reactReduxLibUtilsCreateStoreShape = __webpack_require__(289), _reactReduxLibUtilsCreateStoreShape2 = _interopRequireDefault(_reactReduxLibUtilsCreateStoreShape);
module.exports = exports["default"];
}, function(module, exports) {
"use strict";
function createStoreShape(PropTypes) {
return PropTypes.shape({
subscribe: PropTypes.func.isRequired,
dispatch: PropTypes.func.isRequired,
getState: PropTypes.func.isRequired
});
}
exports.__esModule = !0;
exports["default"] = createStoreShape;
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _Router = __webpack_require__(291), _Router2 = _interopRequireDefault(_Router);
__webpack_require__(469);
var App = _react2["default"].createClass({
displayName: "App",
render: function() {
return _Router2["default"](null);
}
});
exports["default"] = App;
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function mapState(state) {
return {
page: state.page,
app: state.app,
currentLanguage: state.lang.currentLanguage
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _reduxConnect = __webpack_require__(292), _reduxConnect2 = _interopRequireDefault(_reduxConnect), _actionsDiagnosticsActions = __webpack_require__(298), _Header = __webpack_require__(299), _Header2 = _interopRequireDefault(_Header), _BurgerMenu = __webpack_require__(353), _BurgerMenu2 = _interopRequireDefault(_BurgerMenu), _Start = __webpack_require__(356), _Start2 = _interopRequireDefault(_Start), _Layout = __webpack_require__(379), _Layout2 = _interopRequireDefault(_Layout), _DriversPrograms = __webpack_require__(385), _DriversPrograms2 = _interopRequireDefault(_DriversPrograms), _ProgramsScreen = __webpack_require__(401), _ProgramsScreen2 = _interopRequireDefault(_ProgramsScreen), _ProtectScreen = __webpack_require__(409), _ProtectScreen2 = _interopRequireDefault(_ProtectScreen), _Diagnostics = __webpack_require__(417), _Diagnostics2 = _interopRequireDefault(_Diagnostics), _Loading = __webpack_require__(427), _Loading2 = _interopRequireDefault(_Loading), _LoadingScreen = __webpack_require__(431), _LoadingScreen2 = _interopRequireDefault(_LoadingScreen), _Installation = __webpack_require__(436), _Installation2 = _interopRequireDefault(_Installation), _FinalScreen = __webpack_require__(464), _FinalScreen2 = _interopRequireDefault(_FinalScreen), _lodashFunctionDebounce = __webpack_require__(422), _lodashFunctionDebounce2 = _interopRequireDefault(_lodashFunctionDebounce), _utilsEmulateMediaQuery = __webpack_require__(468), _utilsEmulateMediaQuery2 = _interopRequireDefault(_utilsEmulateMediaQuery), Router = _react2["default"].createClass({
displayName: "Router",
mixins: [ __webpack_require__(336) ],
propTypes: {
dispatch: _react.PropTypes.func,
loadDiagnosticInfo: _react.PropTypes.func.isRequired,
page: _react.PropTypes.string.isRequired,
state: _react.PropTypes.any,
app: _react.PropTypes.object.isRequired,
currentLanguage: _react.PropTypes.string.isRequired
},
render: function() {
var _props = this.props, app = _props.app, page = _props.page, currentLanguage = _props.currentLanguage;
return _react2["default"].DOM.div({
style: {
height: "100%",
position: "relative"
}
}, _Header2["default"](null), this.renderPage(page, currentLanguage), app.isBurgerMenuOpened ? _BurgerMenu2["default"]({
currentLanguage: currentLanguage
}) : null);
},
renderPage: function(page, currentLanguage) {
switch (page) {
case "START":
return _Start2["default"]({
currentLanguage: currentLanguage
});
case "DRIVERS":
case "PROGRAMS":
case "PROTECT":
case "DIAGNOSTICS":
return _Layout2["default"]({
page: page,
currentLanguage: currentLanguage
}, _DriversPrograms2["default"]({
page: page,
currentLanguage: currentLanguage
}), _ProgramsScreen2["default"]({
page: page,
currentLanguage: currentLanguage
}), _ProtectScreen2["default"]({
page: page,
currentLanguage: currentLanguage
}), _Diagnostics2["default"]({
page: page,
currentLanguage: currentLanguage
}));
case "LOADING":
return _Loading2["default"]({
currentLanguage: currentLanguage
});
case "LOADING_SCREEN":
return _LoadingScreen2["default"]({
currentLanguage: currentLanguage
});
case "INSTALLATION":
return _Installation2["default"]({
currentLanguage: currentLanguage
});
case "FINAL_SCREEN":
return _FinalScreen2["default"]({
currentLanguage: currentLanguage
});
default:
return _react2["default"].DOM.div(null);
}
},
componentDidMount: function() {
var loadDiagnosticInfo = this.props.loadDiagnosticInfo;
loadDiagnosticInfo();
_utilsEmulateMediaQuery2["default"]();
var fireAfter = 200;
window.onresize = _lodashFunctionDebounce2["default"](_utilsEmulateMediaQuery2["default"], fireAfter);
}
}), actions = {
loadDiagnosticInfo: _actionsDiagnosticsActions.loadDiagnosticInfo
};
exports["default"] = _reduxConnect2["default"](mapState, actions)(Router);
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _createConnect = __webpack_require__(293), _createConnect2 = _interopRequireDefault(_createConnect);
exports["default"] = _createConnect2["default"](_react2["default"]);
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
(function(process) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function getDisplayName(Component) {
return Component.displayName || Component.name || "Component";
}
function createConnect(React) {
var PropTypes = React.PropTypes, storeShape = _reactReduxLibUtilsCreateStoreShape2["default"](PropTypes);
return function(mapStateToProps, mapDispatchToProps, mergeProps) {
function computeStateProps(store, props) {
var state = store.getState(), stateProps = shouldUpdateStateProps ? finalMapStateToProps(state, props) : finalMapStateToProps(state);
_invariant2["default"](_reactReduxLibUtilsIsPlainObject2["default"](stateProps), "`mapStateToProps` must return an object. Instead received %s.", stateProps);
return stateProps;
}
function computeDispatchProps(store, props) {
var dispatch = store.dispatch, dispatchProps = shouldUpdateDispatchProps ? finalMapDispatchToProps(dispatch, props) : finalMapDispatchToProps(dispatch);
_invariant2["default"](_reactReduxLibUtilsIsPlainObject2["default"](dispatchProps), "`mapDispatchToProps` must return an object. Instead received %s.", dispatchProps);
return dispatchProps;
}
function _computeNextState(stateProps, dispatchProps, parentProps) {
var mergedProps = finalMergeProps(stateProps, dispatchProps, parentProps);
_invariant2["default"](_reactReduxLibUtilsIsPlainObject2["default"](mergedProps), "`mergeProps` must return an object. Instead received %s.", mergedProps);
return mergedProps;
}
var shouldSubscribe = Boolean(mapStateToProps), finalMapStateToProps = mapStateToProps || defaultMapStateToProps, finalMapDispatchToProps = _reactReduxLibUtilsIsPlainObject2["default"](mapDispatchToProps) ? _reactReduxLibUtilsWrapActionCreators2["default"](mapDispatchToProps) : mapDispatchToProps || defaultMapDispatchToProps, finalMergeProps = mergeProps || defaultMergeProps, shouldUpdateStateProps = finalMapStateToProps.length > 1, shouldUpdateDispatchProps = finalMapDispatchToProps.length > 1, version = nextVersion++;
return function(WrappedComponent) {
var Connect = React.createClass({
displayName: "Connect(" + getDisplayName(WrappedComponent) + ")",
WrappedComponent: WrappedComponent,
contextTypes: {
store: storeShape
},
propTypes: {
store: storeShape
},
shouldComponentUpdate: function(nextProps, nextState) {
return !_reactReduxLibUtilsShallowEqual2["default"](this.state.props, nextState.props);
},
getInitialState: function() {
var props = this.props, context = this.context;
this.version = version;
this.store = props.store || context.store;
_invariant2["default"](this.store, 'Could not find "store" in either the context or ' + ('props of "' + this.constructor.displayName + '". ') + "Either wrap the root component in a <Provider>, " + ('or explicitly pass "store" as a prop to "' + this.constructor.displayName + '".'));
this.stateProps = computeStateProps(this.store, props);
this.dispatchProps = computeDispatchProps(this.store, props);
return {
props: this.computeNextState()
};
},
computeNextState: function() {
var props = arguments.length <= 0 || void 0 === arguments[0] ? this.props : arguments[0];
return _computeNextState(this.stateProps, this.dispatchProps, props);
},
updateStateProps: function() {
var props = arguments.length <= 0 || void 0 === arguments[0] ? this.props : arguments[0], nextStateProps = computeStateProps(this.store, props);
if (_reactReduxLibUtilsShallowEqual2["default"](nextStateProps, this.stateProps)) return !1;
this.stateProps = nextStateProps;
return !0;
},
updateDispatchProps: function() {
var props = arguments.length <= 0 || void 0 === arguments[0] ? this.props : arguments[0], nextDispatchProps = computeDispatchProps(this.store, props);
if (_reactReduxLibUtilsShallowEqual2["default"](nextDispatchProps, this.dispatchProps)) return !1;
this.dispatchProps = nextDispatchProps;
return !0;
},
updateState: function() {
var props = arguments.length <= 0 || void 0 === arguments[0] ? this.props : arguments[0], nextState = this.computeNextState(props);
if (!_reactReduxLibUtilsShallowEqual2["default"](nextState, this.state.props)) this.setState({
props: nextState
});
},
isSubscribed: function() {
return "function" == typeof this.unsubscribe;
},
trySubscribe: function() {
if (shouldSubscribe && !this.unsubscribe) {
this.unsubscribe = this.store.subscribe(this.handleChange);
this.handleChange();
}
},
tryUnsubscribe: function() {
if (this.unsubscribe) {
this.unsubscribe();
this.unsubscribe = null;
}
},
componentDidMount: function() {
this.trySubscribe();
},
componentWillReceiveProps: function(nextProps) {
if (!_reactReduxLibUtilsShallowEqual2["default"](nextProps, this.props)) {
if (shouldUpdateStateProps) this.updateStateProps(nextProps);
if (shouldUpdateDispatchProps) this.updateDispatchProps(nextProps);
this.updateState(nextProps);
}
},
componentWillUnmount: function() {
this.tryUnsubscribe();
},
handleChange: function() {
if (this.updateStateProps()) this.updateState();
},
getWrappedInstance: function() {
return this.refs.wrappedInstance;
},
render: function() {
return WrappedComponent(_extends({
ref: "wrappedInstance"
}, this.state.props));
}
});
if ("undefined" != typeof process && "undefined" != typeof process.env) Connect.prototype.componentWillUpdate = function() {
if (this.version !== version) {
this.version = version;
this.trySubscribe();
this.updateStateProps();
this.updateDispatchProps();
this.updateState();
}
};
return Connect;
};
};
}
exports.__esModule = !0;
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
}
return target;
};
exports["default"] = createConnect;
var _reactReduxLibUtilsCreateStoreShape = __webpack_require__(289), _reactReduxLibUtilsCreateStoreShape2 = _interopRequireDefault(_reactReduxLibUtilsCreateStoreShape), _reactReduxLibUtilsShallowEqual = __webpack_require__(295), _reactReduxLibUtilsShallowEqual2 = _interopRequireDefault(_reactReduxLibUtilsShallowEqual), _reactReduxLibUtilsIsPlainObject = __webpack_require__(296), _reactReduxLibUtilsIsPlainObject2 = _interopRequireDefault(_reactReduxLibUtilsIsPlainObject), _reactReduxLibUtilsWrapActionCreators = __webpack_require__(297), _reactReduxLibUtilsWrapActionCreators2 = _interopRequireDefault(_reactReduxLibUtilsWrapActionCreators), _invariant = __webpack_require__(254), _invariant2 = _interopRequireDefault(_invariant), defaultMapStateToProps = function() {
return {};
}, defaultMapDispatchToProps = function(dispatch) {
return {
dispatch: dispatch
};
}, defaultMergeProps = function(stateProps, dispatchProps, parentProps) {
return _extends({}, parentProps, stateProps, dispatchProps);
}, nextVersion = 0;
module.exports = exports["default"];
}).call(exports, __webpack_require__(294));
}, function(module, exports) {
function cleanUpNextTick() {
if (draining && currentQueue) {
draining = !1;
if (currentQueue.length) queue = currentQueue.concat(queue); else queueIndex = -1;
if (queue.length) drainQueue();
}
}
function drainQueue() {
if (!draining) {
var timeout = setTimeout(cleanUpNextTick);
draining = !0;
for (var len = queue.length; len; ) {
currentQueue = queue;
queue = [];
for (;++queueIndex < len; ) if (currentQueue) currentQueue[queueIndex].run();
queueIndex = -1;
len = queue.length;
}
currentQueue = null;
draining = !1;
clearTimeout(timeout);
}
}
function Item(fun, array) {
this.fun = fun;
this.array = array;
}
function noop() {}
var currentQueue, process = module.exports = {}, queue = [], draining = !1, queueIndex = -1;
process.nextTick = function(fun) {
var args = new Array(arguments.length - 1);
if (arguments.length > 1) for (var i = 1; i < arguments.length; i++) args[i - 1] = arguments[i];
queue.push(new Item(fun, args));
if (1 === queue.length && !draining) setTimeout(drainQueue, 0);
};
Item.prototype.run = function() {
this.fun.apply(null, this.array);
};
process.title = "browser";
process.browser = !0;
process.env = {};
process.argv = [];
process.version = "";
process.versions = {};
process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.binding = function(name) {
throw new Error("process.binding is not supported");
};
process.cwd = function() {
return "/";
};
process.chdir = function(dir) {
throw new Error("process.chdir is not supported");
};
process.umask = function() {
return 0;
};
}, function(module, exports) {
"use strict";
function shallowEqual(objA, objB) {
if (objA === objB) return !0;
var keysA = Object.keys(objA), keysB = Object.keys(objB);
if (keysA.length !== keysB.length) return !1;
for (var hasOwn = Object.prototype.hasOwnProperty, i = 0; i < keysA.length; i++) if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) return !1;
return !0;
}
exports.__esModule = !0;
exports["default"] = shallowEqual;
module.exports = exports["default"];
}, function(module, exports) {
"use strict";
function isPlainObject(obj) {
if (!obj || "object" != typeof obj) return !1;
var proto = "function" == typeof obj.constructor ? Object.getPrototypeOf(obj) : Object.prototype;
if (null === proto) return !0;
var constructor = proto.constructor;
return "function" == typeof constructor && constructor instanceof constructor && fnToString(constructor) === fnToString(Object);
}
exports.__esModule = !0;
exports["default"] = isPlainObject;
var fnToString = function(fn) {
return Function.prototype.toString.call(fn);
};
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function wrapActionCreators(actionCreators) {
return function(dispatch) {
return _redux.bindActionCreators(actionCreators, dispatch);
};
}
exports.__esModule = !0;
exports["default"] = wrapActionCreators;
var _redux = __webpack_require__(251);
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function loadDiagnosticInfo() {
return function(dispatch, getState) {
var diagPromise = !1 ? Promise.resolve(require("drp-core/diagnostics/sysinfo-emulator.json")) : _systemScanner2["default"].fetchData("localdiagnostics");
diagPromise.then(function(diagObj) {
dispatch({
type: "DIAGNOSTICS_UPDATE_SUCCESS",
payload: diagObj
});
});
};
}
function updateDiagnosticInfo() {
return function(dispatch, getState) {
var diagPromise = !1 ? Promise.resolve(require("drp-core/diagnostics/sysinfo-emulator.json")) : Promise.delay(0).then(function() {
return _drpCoreDiagnosticsGetDiagnostics2["default"]("temporary");
});
diagPromise.then(function(diagObj) {
dispatch({
type: "DIAGNOSTICS_UPDATE_SUCCESS",
payload: diagObj
});
});
};
}
function openDiagnostic(tool) {
switch (tool) {
case "TESTRAM":
_drpCoreStatistics2["default"].event({
action: "diagnostic memorytest clicked"
});
_drpCoreLibUtils.winRun("mdsched.exe", "", "", !0);
break;
case "DEFRAG":
_drpCoreStatistics2["default"].event({
action: "diagnostic defrag clicked"
});
if (OSVersion >= 6) _drpCoreLibUtils.winRun("dfrgui.exe", "", "", !0); else _drpCoreLibUtils.winRun("dfrg.msc", "", "", !0);
break;
case "SYSINFO":
_drpCoreStatistics2["default"].event({
action: "diagnostic details clicked"
});
_drpCoreSystem.WshShell.Run("msinfo32.exe", 0, !1);
}
return {};
}
exports.__esModule = !0;
exports.loadDiagnosticInfo = loadDiagnosticInfo;
exports.updateDiagnosticInfo = updateDiagnosticInfo;
exports.openDiagnostic = openDiagnostic;
var _drpCoreSystem = __webpack_require__(27), _drpCoreStatistics = __webpack_require__(13), _drpCoreStatistics2 = _interopRequireDefault(_drpCoreStatistics), _drpCoreDiagnosticsGetDiagnostics = __webpack_require__(36), _drpCoreDiagnosticsGetDiagnostics2 = _interopRequireDefault(_drpCoreDiagnosticsGetDiagnostics), _drpCoreLibUtils = __webpack_require__(26), _systemScanner = __webpack_require__(50), _systemScanner2 = _interopRequireDefault(_systemScanner);
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _drpCorePs = __webpack_require__(300), _drpCorePs2 = _interopRequireDefault(_drpCorePs), _reduxConnect = __webpack_require__(292), _reduxConnect2 = _interopRequireDefault(_reduxConnect), _actionsAppActions = __webpack_require__(301), _Img = __webpack_require__(335), _Img2 = _interopRequireDefault(_Img), _utilsGetInternetExplorerVersion = __webpack_require__(47), _utilsGetInternetExplorerVersion2 = _interopRequireDefault(_utilsGetInternetExplorerVersion), internetExplorerVersion = _utilsGetInternetExplorerVersion2["default"]();
__webpack_require__(337);
var Header = _react2["default"].createClass({
displayName: "Header",
mixins: [ __webpack_require__(336) ],
propTypes: {
children: _react.PropTypes.any,
toggleBurgerMenu: _react.PropTypes.func.isRequired,
minimizeWindow: _react.PropTypes.func.isRequired,
maximizeWindow: _react.PropTypes.func.isRequired,
closeWindow: _react.PropTypes.func.isRequired,
page: _react.PropTypes.string.isRequired,
app: _react.PropTypes.object.isRequired,
loading: _react.PropTypes.object.isRequired
},
shouldFixHoverIcon: function() {
if (-1 !== internetExplorerVersion) if (10 > internetExplorerVersion) return !0; else return !1; else return !1;
},
render: function() {
var _props = this.props, toggleBurgerMenu = _props.toggleBurgerMenu, minimizeWindow = _props.minimizeWindow, maximizeWindow = _props.maximizeWindow, closeWindow = _props.closeWindow, page = _props.page, app = _props.app, loading = _props.loading, now = loading.now;
return "LOADING" !== page && "LOADING_SCREEN" !== page || "NO_INTERNET" === now || "RUN_ERROR" === now ? _react2["default"].DOM.table({
className: "header"
}, _react2["default"].DOM.tr(null, _react2["default"].DOM.td({
className: "header_logo"
}, _react2["default"].DOM.div({
className: "header_logo-img",
alt: "DriverPack Solution"
})), _react2["default"].DOM.td({
className: "header_controls"
}, -1 === [ "LOADING", "FINAL_SCREEN" ].indexOf(page) ? _react2["default"].DOM.a({
href: "#",
className: "header_controls-btn header_controls-btn--burger " + (app.isBurgerMenuOpened ? "active" : ""),
onMouseDown: function(e) {
e.preventDefault();
toggleBurgerMenu({
eventAction: "burgermenu clicked"
});
}
}, this.shouldFixHoverIcon() ? _Img2["default"]({
src: "img/header/burger.png",
width: "32",
height: "32"
}) : _react2["default"].DOM.i({
className: "header_controls-btn-img"
})) : null, _drpCorePs2["default"].available ? _react2["default"].DOM.a({
href: "#",
className: "header_controls-btn header_controls-btn--minimize",
onClick: function(e) {
e.preventDefault();
minimizeWindow();
}
}, this.shouldFixHoverIcon() ? _Img2["default"]({
src: "img/header/minimize.png",
width: "32",
height: "32"
}) : _react2["default"].DOM.i({
className: "header_controls-btn-img"
})) : null, _react2["default"].DOM.a({
href: "#",
className: "header_controls-btn " + ("maximized" === app.windowState ? "header_controls-btn--maximize-back" : "header_controls-btn--maximize"),
onClick: function(e) {
e.preventDefault();
maximizeWindow();
}
}, this.shouldFixHoverIcon() ? _Img2["default"]({
src: "" + ("maximized" === app.windowState ? "img/header/maximize-back.png" : "img/header/maximize.png"),
width: "32",
height: "32"
}) : _react2["default"].DOM.i({
className: "header_controls-btn-img"
})), _react2["default"].DOM.a({
href: "#",
className: "header_controls-btn header_controls-btn--close",
onClick: function(e) {
e.preventDefault();
closeWindow();
}
}, this.shouldFixHoverIcon() ? _Img2["default"]({
src: "img/header/close.png",
width: "32",
height: "32"
}) : _react2["default"].DOM.i({
className: "header_controls-btn-img"
}))))) : null;
}
}), mapState = function(state) {
return {
page: state.page,
app: state.app,
loading: state.loading
};
}, actions = {
toggleBurgerMenu: _actionsAppActions.toggleBurgerMenu,
minimizeWindow: _actionsAppActions.minimizeWindow,
maximizeWindow: _actionsAppActions.maximizeWindow,
closeWindow: _actionsAppActions.closeWindow
};
exports["default"] = _reduxConnect2["default"](mapState, actions)(Header);
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
exports.__esModule = !0;
var _systemSpecialFolders = __webpack_require__(6), _systemShell = __webpack_require__(7), _systemFso = __webpack_require__(5), _systemLocalFiles = __webpack_require__(12), _os = __webpack_require__(9), ps = "powershell -NonInteractive -NoLogo -NoProfile -ExecutionPolicy Bypass", PowerShell = function() {
function PowerShell() {
_classCallCheck(this, PowerShell);
Object.assign(this, {
running: !1,
available: _os.OSVersion >= 6
});
}
PowerShell.prototype.init = function() {
if (this.available && !this.running) {
var dir = _systemLocalFiles.ensurePath(_systemSpecialFolders.AppFolder + "\\temp"), seed = Date.now().toString(36) + "." + Math.random().toString(36).slice(2, 7), files = this.files = {
queue: dir + "\\ps." + seed + ".cmd.txt",
stdout: dir + "\\ps." + seed + ".stdout.log",
stderr: dir + "\\ps." + seed + ".stderr.log"
};
_systemFso.fso.CreateTextFile(files.queue, !0, !0).Close();
var cmd = "Get-Content '" + files.queue + "' -Wait | Invoke-Expression";
try {
_systemShell.WshShell.Run(ps + ' "' + cmd + '" > "' + files.stdout + '" 2> "' + files.stderr + '"', 0, !1);
this.running = !0;
} catch (err) {
this.available = !1;
}
}
return this;
};
PowerShell.prototype.send = function(batch) {
var _this = this;
if (this.available) !function() {
if (!_this.running) _this.init();
batch = [].concat(batch);
var ts = _systemFso.fso.GetFile(_this.files.queue).OpenAsTextStream(8, -1);
batch.forEach(function(cmd) {
ts.WriteLine(cmd);
});
ts.Close();
}();
return this;
};
PowerShell.prototype.terminate = function() {
if (this.running) {
this.send("exit");
this.running = !1;
}
return this;
};
PowerShell.prototype.read = function(chanel) {
if (this.available) {
var file = _systemFso.fso.OpenTextFile(this.files[chanel], 1, !1, -1), res = file.ReadAll();
file.Close();
return res;
}
};
PowerShell.prototype.stdout = function() {
return this.read("stdout");
};
PowerShell.prototype.stderr = function() {
return this.read("stderr");
};
return PowerShell;
}();
exports["default"] = new PowerShell();
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
(function(l) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function updateWindowParams() {
return {
type: "WINDOW_PARAMETERS_UPDATED",
payload: {
windowWidth: window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
windowHeight: window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
windowLeft: window.screenLeft,
windowTop: window.screenTop
}
};
}
function toggleBurgerMenu() {
var options = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0];
if (options.eventAction) _drpCoreStatistics2["default"].event({
action: options.eventAction
}, [], !0);
return function(dispatch, getState) {
dispatch({
type: "BURGER_MENU_TOGGLED"
});
};
}
function minimizeWindow() {
_drpCoreStatistics2["default"].event({
action: "minimize clicked"
});
return function(dispatch, getState) {
_drpCorePs2["default"].send("[Win32.NativeMethods]::SendMessage($htaHwnd, 0x0112, 0xF020, 0)");
};
}
function maximizeWindow() {
_drpCoreStatistics2["default"].event({
action: "maximize clicked"
});
return function(dispatch, getState) {
var windowState = getState().app.windowState;
if ("normal" === windowState) {
window.resizeTo(screen.availWidth, screen.availHeight);
window.moveTo(0, 0);
dispatch({
type: "WINDOW_STATE_CHANGED",
payload: {
windowState: "maximized"
}
});
} else if ("maximized" === windowState) {
var windowWidth = Math.min(screen.availWidth, 1024), windowHeight = Math.min(screen.availHeight, 768);
window.resizeTo(windowWidth, windowHeight);
window.moveTo((screen.availWidth - windowWidth) / 2, (screen.availHeight - windowHeight) / 2);
dispatch({
type: "WINDOW_STATE_CHANGED",
payload: {
windowState: "normal"
}
});
}
dispatch(updateWindowParams());
};
}
function Close() {
_drpCorePs2["default"].terminate();
window.close();
}
function closeWindow() {
return function(dispatch, getState) {
switch (getState().page) {
case "START":
return _drpCoreStatistics2["default"].event({
action: "startpage close clicked"
})["finally"](function() {
dispatch(_actionsStartActions.startInstallCustom());
});
case "INSTALLATION":
return _drpCoreStatistics2["default"].event({
action: "installation close clicked"
})["finally"](function() {
if (!confirm(l("installation_close_confirm"))) _drpCoreStatistics2["default"].event({
action: "installation close confirm clicked no"
}); else _drpCoreStatistics2["default"].event({
action: "installation close confirm clicked yes"
})["finally"](function() {
Close();
});
});
default:
return _drpCoreStatistics2["default"].event({
action: "close clicked"
})["finally"](function() {
Close();
});
}
};
}
exports.__esModule = !0;
exports.updateWindowParams = updateWindowParams;
exports.toggleBurgerMenu = toggleBurgerMenu;
exports.minimizeWindow = minimizeWindow;
exports.maximizeWindow = maximizeWindow;
exports.closeWindow = closeWindow;
var _drpCoreStatistics = __webpack_require__(13), _drpCoreStatistics2 = _interopRequireDefault(_drpCoreStatistics), _drpCorePs = __webpack_require__(300), _drpCorePs2 = _interopRequireDefault(_drpCorePs), _utilsOnunload = __webpack_require__(303), _actionsStartActions = __webpack_require__(304);
_drpCorePs2["default"].init().send([ "$sig = '" + [ '[DllImport("user32.dll")] public static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam);', '[DllImport("user32.dll")] public static extern IntPtr GetWindow(IntPtr hWnd, uint uCmd);', '[DllImport("user32.dll", EntryPoint = "FindWindowEx")] public static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);' ].join("") + "'", "Add-Type -MemberDefinition $sig -name NativeMethods -namespace Win32", '$findHwnd = [Win32.NativeMethods]::FindWindowEx(0, 0, "HTML Application Host Window Class", $null)', "$htaHwnd = [Win32.NativeMethods]::GetWindow($findHwnd,3)" ]);
try {
_utilsOnunload.addUnloadListener(function() {
_drpCorePs2["default"].terminate();
});
} catch (e) {}
}).call(exports, __webpack_require__(302));
}, function(module, exports) {
"use strict";
exports.__esModule = !0;
exports["default"] = function(str) {
return window.language[str] || str;
};
module.exports = exports["default"];
}, function(module, exports) {
"use strict";
exports.__esModule = !0;
var eventListener = window.attachEvent || window.addEventListener, unloadEvent = window.attachEvent ? "onbeforeunload" : "beforeunload", addUnloadListener = function(callback) {
return eventListener(unloadEvent, callback);
};
exports.addUnloadListener = addUnloadListener;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function startInstallAll() {
_utilsNps.addNPSStart();
_utilsRecoverInternet.saveWifiProfile();
return _actionsDriversActions.installDriversAndPrograms({
eventAction: "startpage install all clicked"
});
}
function startInstallCustom() {
var options = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0];
_utilsNps.addNPSStart();
_utilsRecoverInternet.saveWifiProfile();
if (options.eventAction) _drpCoreStatistics2["default"].event({
action: options.eventAction
});
return _actionsMenuActions.navigate("DRIVERS");
}
exports.__esModule = !0;
exports.startInstallAll = startInstallAll;
exports.startInstallCustom = startInstallCustom;
var _drpCoreStatistics = __webpack_require__(13), _drpCoreStatistics2 = _interopRequireDefault(_drpCoreStatistics), _actionsMenuActions = __webpack_require__(305), _actionsDriversActions = __webpack_require__(313), _utilsNps = __webpack_require__(334), _utilsRecoverInternet = __webpack_require__(331);
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function navigate(page) {
switch (page) {
case "START":
_drpCoreStatistics2["default"].event({
action: "startpage screen opened"
});
break;
case "DRIVERS":
_drpCoreStatistics2["default"].event({
action: "drivers screen opened"
});
break;
case "PROGRAMS":
_drpCoreStatistics2["default"].event({
action: "soft screen opened"
});
break;
case "PROTECT":
_drpCoreStatistics2["default"].event({
action: "protect screen opened"
});
break;
case "DIAGNOSTICS":
_drpCoreStatistics2["default"].event({
action: "diagnostic screen opened"
});
}
return {
type: "NAVIGATE",
page: page
};
}
function openSystemMenu(page) {
var itemName = void 0;
return function(dispatch) {
switch (page) {
case "CONTROL":
itemName = "control_panel";
_drpCoreSystem.WshShell.Run("control.exe", 1, !1);
break;
case "RECOVERY":
itemName = "recovery_point";
if (OSVersion >= 6) _drpCoreLibUtils.winRun("systempropertiesprotection.exe", "", "", !0); else _drpCoreLibUtils.winRun("%systemroot%\\system32\\restore\\rstrui.exe", "", "", !0);
break;
case "BACKUP":
itemName = "drivers_backup";
dispatch({
type: "BACKUP_START"
});
_ddriver2["default"].Run().then(function() {
_drpCoreStatistics2["default"].event({
action: "drivers backup finished"
});
return dispatch({
type: "BACKUP_SUCCESS"
});
}).caught(function(e) {
_drpCoreStatistics2["default"].event({
action: "drivers backup failed"
});
_drpCoreLogs.log("[ddriver] error", e);
return dispatch({
type: "BACKUP_FAILED"
});
});
break;
case "UNINSTALL":
itemName = "programs_and_features";
window.store.dispatch({
type: "NAVIGATE",
page: "PROTECT"
});
window.store.dispatch({
type: "BURGER_MENU_TOGGLED"
});
break;
case "FEEDBACK":
_drpCoreStatistics2["default"].event({
action: "feedback clicked"
});
_drpCoreLibUtils.goToUrl("http://vk.com/topic-29220845_32599947");
break;
case "SYSTEM_PROPERTIES":
itemName = "system";
if (OSVersion >= 6) _drpCoreSystem.WshShell.Run("control.exe system", 1, !1); else _drpCoreSystem.WshShell.Run("control.exe sysdm.cpl", 1, !1);
break;
case "DEVICE_MANAGER":
itemName = "device_manager";
_drpCoreSystem.WshShell.Run("mmc.exe devmgmt.msc", 1, !1);
break;
case "NETWORK_CONNECTIONS":
itemName = "network_connections";
_drpCoreSystem.WshShell.Run("control.exe ncpa.cpl", 1, !1);
break;
case "DISK_MANAGEMENT":
itemName = "disk_management";
_drpCoreSystem.WshShell.Run("mmc.exe diskmgmt.msc", 1, !1);
break;
case "COMPUTER_MANAGEMENT":
itemName = "computer_management";
_drpCoreSystem.WshShell.Run("mmc.exe compmgmt.msc", 1, !1);
break;
case "CMD":
itemName = "command_prompt";
var prevCurrentDirectory = _drpCoreSystem.WshShell.CurrentDirectory;
_drpCoreSystem.WshShell.CurrentDirectory = _drpCoreSystem.WshShell.ExpandEnvironmentStrings("%USERPROFILE%");
_drpCoreSystem.WshShell.Run("cmd.exe", 1, !1);
setTimeout(function() {
_drpCoreSystem.WshShell.CurrentDirectory = prevCurrentDirectory;
}, 50);
break;
case "TASK_MANAGER":
itemName = "task_manager";
_drpCoreSystem.WshShell.Run("taskmgr.exe", 1, !1);
break;
case "DISPLAY_PROPERTIES":
itemName = "display";
_drpCoreSystem.WshShell.Run("control.exe desk.cpl", 1, !1);
break;
case "POWER_OPTIONS":
itemName = "power_options";
_drpCoreSystem.WshShell.Run("control.exe powercfg.cpl", 1, !1);
}
_drpCoreStatistics2["default"].event({
action: "burgermenu " + itemName + " clicked"
});
};
}
exports.__esModule = !0;
exports.navigate = navigate;
exports.openSystemMenu = openSystemMenu;
var _drpCoreSystem = __webpack_require__(27), _drpCoreLogs = __webpack_require__(4), _drpCoreStatistics = __webpack_require__(13), _drpCoreStatistics2 = _interopRequireDefault(_drpCoreStatistics), _drpCoreLibUtils = __webpack_require__(26), _ddriver = __webpack_require__(306), _ddriver2 = _interopRequireDefault(_ddriver);
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
exports.__esModule = !0;
var _drpCoreSystem = __webpack_require__(27), _drpCoreLogs = __webpack_require__(4), _external = __webpack_require__(307), _external2 = _interopRequireDefault(_external), toFixed = function(num) {
return ("0" + num).slice(-2);
}, DDriver = function(_External) {
function DDriver() {
_classCallCheck(this, DDriver);
var options = {
url: "http://download.drp.su/updates/ddriver/ddriver.zip",
downloadPath: _drpCoreSystem.AppData + "\\DRPSu\\ddriver",
dirPath: _drpCoreSystem.WshShell.CurrentDirectory.split("\\").slice(0, -1).join("\\") + "\\bin\\tools\\ddriver",
exePath: "\\ddc.exe"
};
_External.call(this, options);
this.backupPath = _drpCoreSystem.WshShell.SpecialFolders("MyDocuments") + "\\DriverPack\\Backups";
this.tempDir = _drpCoreSystem.WshShell.ExpandEnvironmentStrings("%temp%\\drp\\DRPSuPacker");
this.tempZip = this.tempDir + "\\pack.7z";
}
_inherits(DDriver, _External);
DDriver.prototype.CreateFilename = function() {
var today = new Date();
return [ "DriverPack", "Backup", [ today.getFullYear(), toFixed(today.getMonth() + 1), toFixed(today.getDate()) ].join(""), [ toFixed(today.getHours()), toFixed(today.getMinutes()), toFixed(today.getSeconds()) ].join("") ].join("_") + ".exe";
};
DDriver.prototype.Backup = function() {
_drpCoreLogs.log("[ddriver] executing", this.exePath);
_drpCoreSystem.WshShell.Run('cmd /C rd /S /Q "' + this.tempDir + '"', 0, !0);
_drpCoreSystem.WshShell.Run(this.exePath + ' b /target:"' + this.tempDir + '\\pack\\drivers"', 0, !0);
var filename = this.CreateFilename();
_drpCoreLogs.log("[ddriver] packing to " + filename);
_drpCoreSystem.WshShell.Run(this.dirPath + '\\7za.exe x -y -o"' + this.tempDir + '\\pack" "' + this.dirPath + '\\packer.7z"', 0, !0);
_drpCoreSystem.WshShell.Run(this.dirPath + '\\7za.exe a "' + this.tempZip + '" "' + this.tempDir + '\\pack\\*"', 0, !0);
_drpCoreSystem.WshShell.Run('cmd /C mkdir "' + this.backupPath + '"', 0, !0);
_drpCoreSystem.WshShell.Run('cmd /C copy /b "' + this.dirPath + '\\7zsd.sfx" + "' + this.dirPath + '\\sfxconfig" + "' + this.tempZip + '" "' + this.backupPath + "\\" + filename + '"', 0, !0);
_drpCoreLogs.log("[ddriver] packed to " + filename);
};
DDriver.prototype.Run = function() {
var _this = this;
return _External.prototype.Download.call(this).then(function() {
_this.Backup();
_drpCoreSystem.WshShell.Run('cmd /C explorer "' + _this.backupPath + '"', 1, !1);
});
};
return DDriver;
}(_external2["default"]);
exports["default"] = new DDriver();
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
exports.__esModule = !0;
var _drpCoreSystem = __webpack_require__(27), _drpCoreLogs = __webpack_require__(4), _drpCoreWget = __webpack_require__(308), _drpCoreWget2 = _interopRequireDefault(_drpCoreWget), _unzip = __webpack_require__(310), _unzip2 = _interopRequireDefault(_unzip), _systemScanner = __webpack_require__(50), _systemScanner2 = _interopRequireDefault(_systemScanner), _utilsDownload = __webpack_require__(312), External = function() {
function External(_ref) {
var url = _ref.url, downloadPath = _ref.downloadPath, dirPath = _ref.dirPath, exePath = _ref.exePath;
_classCallCheck(this, External);
this.url = url;
this.filename = url.split("/").slice(-1)[0];
this.downloadPath = downloadPath;
this.zipPath = this.downloadPath + "\\" + this.filename;
this.dirPath = dirPath;
this.exePath = this.dirPath + "\\" + exePath;
}
External.prototype.Download = function() {
var _this = this;
if (_drpCoreSystem.fso.FileExists(this.exePath)) {
_drpCoreLogs.log("[external] already exists", this.exePath);
return Promise.resolve();
}
var events = {
beforeDownloading: function() {},
afterDownloading: function() {}
};
_drpCoreLogs.log("[external] downloading", this.url);
return _systemScanner2["default"].waitFor("binaries").then(function() {
_utilsDownload.ensure("driverpack-wget.exe");
return _drpCoreWget2["default"].downloadFiles(events, _this.downloadPath, [ {
link: _this.url
} ]);
}).then(function() {
_utilsDownload.ensure("7za.exe");
_drpCoreLogs.log("[external] unpacking", _this.zipPath);
return _unzip2["default"].run7z(_this.dirPath, _this.zipPath);
}).caught(function(err) {
_drpCoreLogs.log("[external] error", err);
});
};
return External;
}();
exports["default"] = External;
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
exports.__esModule = !0;
var _systemSpecialFolders = __webpack_require__(6), _systemShell = __webpack_require__(7), _systemFso = __webpack_require__(5), _systemLocalFiles = __webpack_require__(12), _systemHttp = __webpack_require__(16), _systemRunCommandAsync = __webpack_require__(309), _wmi = __webpack_require__(10), _logs = __webpack_require__(4), _config = __webpack_require__(3), Wget = function() {
function Wget(wgetPaths) {
_classCallCheck(this, Wget);
this.timer = null;
this.onDownloaded = {};
this.onDownloadFailed = {};
this.concurrency = 5;
this.wgetPaths = wgetPaths;
this.wgetPath = wgetPaths.find(function(path) {
return _systemFso.fso.FileExists(path);
});
}
Wget.prototype.wrapInCmd = function(command) {
return 'cmd /c "' + command + '"';
};
Wget.prototype.wgetRun = function(downloadURI, targetFolder, jobId) {
var _this = this;
_logs.log("[wget] downloading " + downloadURI);
if (!this.wgetPath) this.wgetPath = this.wgetPaths.find(function(path) {
return _systemFso.fso.FileExists(path);
});
if (this.wgetPath) {
var _ret = function() {
var parsedUrl = downloadURI.split("/"), logFile = _this.pathToLogFile(jobId), triggerFile = _this.pathToTriggerFile(jobId), wgetCommand = '"' + _this.wgetPath + '" --timeout 10 --retry-connrefused --wait=10 --timestamping ' + ('--directory-prefix="' + targetFolder + '" "' + downloadURI + '" -o "' + logFile + '" ') + ('--no-verbose & echo DONE > "' + triggerFile + '"'), command = _this.wrapInCmd(wgetCommand);
_logs.log("[wget] Running: " + command);
setTimeout(function() {
_systemShell.WshShell.Run(command, 0, !1);
}, 0);
return {
v: parsedUrl[parsedUrl.length - 1]
};
}();
if ("object" == typeof _ret) return _ret.v;
} else _logs.log("[wget] wget exe not found");
};
Wget.prototype.wgetWrapper = function(events, path, item, i, items) {
var _this2 = this;
return new Promise(function(resolve, reject) {
_logs.log("Downloading: " + item.link + ". To folder: " + path);
events.beforeDownloading(item, i, items);
var jobId = item.jobId || _this2.generateJobId();
setTimeout(function() {
return _this2.wgetRun(item.link, path, jobId);
}, 0);
_this2.saveJob(jobId, resolve, reject, item);
}).tap(function() {
events.afterDownloading(item, i, items);
});
};
Wget.prototype.generateJobId = function() {
return +Math.round(1e5 * Math.random());
};
Wget.prototype.saveJob = function(id, resolve, reject, item) {
_logs.log("saveJob");
this.onDownloaded[id] = function() {
return resolve(item);
};
this.onDownloadFailed[id] = function(err) {
return reject(err);
};
this.start();
};
Wget.prototype.pathToLogFile = function(id) {
return _systemLocalFiles.ensurePath(_systemSpecialFolders.AppFolder + "\\temp") + ("\\wget_log_" + id + ".log");
};
Wget.prototype.pathToTriggerFile = function(id) {
return _systemLocalFiles.ensurePath(_systemSpecialFolders.AppFolder + "\\temp") + ("\\wget_finished_" + id + ".txt");
};
Wget.prototype.tick = function() {
var _this3 = this, keys = Object.keys(this.onDownloaded);
if (keys.length > 0) keys.forEach(function(jobId) {
var triggerFile = _this3.pathToTriggerFile(jobId);
if (_systemFso.fso.FileExists(triggerFile)) try {
var logFile = _this3.pathToLogFile(jobId), textStream = _systemFso.fso.OpenTextFile(logFile, 1, !1);
if (!textStream.AtEndOfStream) {
var logText = textStream.ReadAll();
textStream.Close();
if (-1 !== logText.indexOf("failed: Unknown host.") || -1 !== logText.indexOf("unable to resolve host address") || /error\s+\d+/i.test(logText)) {
_logs.log("[wget] failed job " + jobId);
_this3.onDownloadFailed[jobId](new Error("[new order] wget failed job " + jobId));
} else {
_logs.log("[wget] downloaded job " + jobId);
_this3.onDownloaded[jobId]();
}
_logs.log([ logText ]);
} else {
textStream.Close();
_logs.log("[wget] downloaded job " + jobId);
_this3.onDownloaded[jobId]();
}
} catch (e) {
_logs.log("[wget] failed job " + jobId);
_this3.onDownloadFailed[jobId](new Error("[new order] wget failed job " + jobId));
} finally {
delete _this3.onDownloaded[jobId];
delete _this3.onDownloadFailed[jobId];
}
}); else {
_logs.log("[wget] tick: no downloads");
this.stop();
}
};
Wget.prototype.stop = function() {
clearInterval(this.timer);
};
Wget.prototype.start = function() {
var _this4 = this;
this.stop();
this.timer = setInterval(function() {
return _this4.tick();
}, 2e3);
};
Wget.prototype.getDownloadFileSize = function(downloadURI) {
return _systemHttp.httphead(downloadURI).then(function(_ref) {
var header = _ref.header;
return header["content-length"];
});
};
Wget.prototype.stopDownloading = function(downloadURI, downloadJobId) {
var _this5 = this;
delete this.onDownloaded[downloadJobId];
delete this.onDownloadFailed[downloadJobId];
var commandLineLike = "%wget.exe%" + downloadURI + "%", processes = _wmi.getWMIObjects([ "ProcessId" ], "Win32_Process", 'CommandLine LIKE "' + commandLineLike + '"'), promises = [];
processes.forEach(function(_ref2) {
var ProcessId = _ref2.ProcessId, jobId = _this5.generateJobId(), taskkillTriggerFile = _systemLocalFiles.ensurePath(_systemSpecialFolders.AppFolder + "\\temp") + ("\\taskkill_" + jobId + ".txt");
promises.push(_systemRunCommandAsync.runCommandAsync({
command: "taskkill /f /t /pid " + ProcessId,
triggerFile: taskkillTriggerFile,
checkInterval: 200,
timeout: 1e4
}));
});
return Promise.all(promises);
};
Wget.prototype.downloadFiles = function(events, path, items) {
var _this6 = this;
_logs.log("[wget] downloading " + items.length + " files");
return Promise.map(items, function(item, i) {
return _this6.wgetWrapper(events, path, item, i, items);
}, {
concurrency: this.concurrency
});
};
return Wget;
}();
exports["default"] = new Wget(_config.wget.paths);
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = !0;
var _shell = __webpack_require__(7), _fso = __webpack_require__(5), _libUtils = __webpack_require__(26), _logs = __webpack_require__(4), _specialFolders = __webpack_require__(6), _localFiles = __webpack_require__(12), runCommandAsync = function(_ref) {
var command = _ref.command, _ref$spaced = _ref.spaced, spaced = void 0 === _ref$spaced ? !0 : _ref$spaced, _ref$triggerFile = _ref.triggerFile, triggerFile = void 0 === _ref$triggerFile ? _localFiles.ensurePath(_specialFolders.AppFolder + "\\temp") + "\\run_command_" + _libUtils.generateJobId() + ".txt" : _ref$triggerFile, _ref$customOutput = _ref.customOutput, customOutput = void 0 === _ref$customOutput ? !1 : _ref$customOutput, _ref$checkInterval = _ref.checkInterval, checkInterval = void 0 === _ref$checkInterval ? 1e3 : _ref$checkInterval, _ref$timeout = _ref.timeout, timeout = void 0 === _ref$timeout ? 9e5 : _ref$timeout;
return new Promise(function(resolve, reject) {
var commandString = "" + command + (spaced ? " " : "") + (customOutput ? "" : "|| echo Done & call echo Done %^errorLevel%") + ' > "' + triggerFile + '"', wrappedCommand = _libUtils.wrapInCmd(commandString);
_logs.log("Running: " + wrappedCommand);
setTimeout(function() {
_shell.WshShell.Run(wrappedCommand, 0, !1);
}, 0);
var textStream = void 0, timeoutTimer = void 0, timer = setInterval(function() {
if (_fso.fso.FileExists(triggerFile)) try {
textStream = _fso.fso.OpenTextFile(triggerFile, 1, !1);
if (!textStream.AtEndOfStream) {
clearInterval(timeoutTimer);
clearInterval(timer);
if (!customOutput) {
var text = textStream.ReadAll(), matches = text.match(/done\s+(\d+)/i), exitCode = matches && matches[1];
null !== exitCode ? resolve(+exitCode) : reject(new Error("runCommandAsync: exitCode not found"));
} else resolve();
}
} catch (e) {
clearInterval(timeoutTimer);
clearInterval(timer);
reject(new Error("runCommandAsync: read trigger file"));
} finally {
textStream.Close();
}
}, checkInterval);
timeoutTimer = setTimeout(function() {
clearInterval(timeoutTimer);
clearInterval(timer);
reject(new Error("runCommandAsync: timeout"));
}, timeout);
});
};
exports.runCommandAsync = runCommandAsync;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
exports.__esModule = !0;
var _drpCoreSystem = __webpack_require__(27), _drpCoreSystemRunCommandAsync = __webpack_require__(309), _drpCoreSystemRunExeAsynchronously = __webpack_require__(311), _drpCoreSystemSpecialFolders = __webpack_require__(6), _drpCoreSystemLocalFiles = __webpack_require__(12), _drpCoreWmi = __webpack_require__(10), _drpCoreLogs = __webpack_require__(4), _systemScanner = __webpack_require__(50), _systemScanner2 = _interopRequireDefault(_systemScanner), Unzip = function() {
function Unzip() {
_classCallCheck(this, Unzip);
}
Unzip.prototype.tempDir = function() {
return _drpCoreSystem.WshShell.ExpandEnvironmentStrings("%temp%\\drp\\unzip\\drp");
};
Unzip.prototype.pathToPack = function(name) {
return "..\\drivers\\" + name + ".7z";
};
Unzip.prototype.getDestDir = function(dest) {
if (!dest) return this.tempDir();
if (-1 === dest.indexOf("\\")) return this.tempDir() + "\\" + dest; else return dest;
};
Unzip.prototype.run7z = function(pack, zipFile, directory, jobId) {
var destDir = this.getDestDir(pack), triggerFile = _drpCoreSystemLocalFiles.ensurePath(_drpCoreSystemSpecialFolders.AppFolder + "\\temp") + ("\\unzipping_" + jobId + ".txt"), keys = 'x -y -o"' + destDir + '" "' + zipFile + '"';
if (directory) keys += ' "' + directory + '"';
return _drpCoreSystemRunExeAsynchronously.runExeAsynchronously({
exePath: "tools\\7za.exe",
keys: keys,
triggerFile: triggerFile
}).then(function(exitCode) {
if (0 === exitCode) _drpCoreLogs.log("[unzip] run: success"); else _drpCoreLogs.log("[unzip] run: failed");
return exitCode;
}).caught(function(err) {
throw err;
});
};
Unzip.prototype.unzipFromPack = function(pack, directory, jobId) {
var zipFile = this.pathToPack(pack);
return this.run7z(pack, zipFile, directory, jobId);
};
Unzip.prototype.stopUnzipping = function(zipName) {
var commandLineLike = "%7za.exe%" + zipName + "%", processes = _drpCoreWmi.getWMIObjects([ "ProcessId" ], "Win32_Process", 'CommandLine LIKE "' + commandLineLike + '"');
processes.forEach(function(_ref) {
var ProcessId = _ref.ProcessId;
_drpCoreSystem.WshShell.Run("cmd /c taskkill /f /t /pid " + ProcessId, 0, !0);
});
};
Unzip.prototype.checkZipArchiveFilesCount = function(device) {
return function(dispatch) {
var driver = device.recommendedDriver, zipFile = void 0;
if (_drpCoreSystem.fso.FileExists("..\\drivers\\" + driver.pack + ".7z")) zipFile = "..\\drivers\\" + driver.pack + ".7z"; else {
var zipName = driver.link.split("/").slice(-1);
zipFile = _systemScanner2["default"].getDriversPath() + "\\" + zipName;
}
var zipFileLog = _drpCoreSystemLocalFiles.ensurePath(_drpCoreSystemSpecialFolders.AppFolder + "\\temp") + ("\\log_zip_file_" + device.jobId + ".txt"), totalCount = void 0;
_drpCoreSystemRunCommandAsync.runCommandAsync({
command: 'tools\\7za.exe l "' + zipFile + '" | findstr ' + driver.directory + ' | find /v /c ""',
triggerFile: zipFileLog,
customOutput: !0,
checkInterval: 300,
timeout: 6e4
}).then(function() {
try {
var textStream = _drpCoreSystem.fso.OpenTextFile(zipFileLog, 1, !1), text = textStream.ReadAll(), matches = text.match(/(\d+)/);
totalCount = matches && matches[1] || 0;
dispatch({
type: "NEW_ORDER_ZIP_TOTAL_COUNT_RECEIVED",
payload: device,
meta: {
id: device.id,
totalCount: totalCount
}
});
textStream.Close();
} catch (err) {
_drpCoreLogs.log("[new order] checkZipArchiveFilesCount: read file error");
}
});
};
};
Unzip.prototype.watchUnzippedPartFilesCount = function(device) {
var _this = this;
return function(dispatch) {
var driver = device.recommendedDriver, destDir = _this.getDestDir(driver.pack), driverDirectory = driver.directory.replace(/\\$/, ""), checkingDirectory = void 0;
checkingDirectory = destDir + "\\" + driverDirectory;
var interval = 1e3;
device.unzippingTimer = setInterval(function() {
if (_drpCoreSystem.fso.FolderExists(checkingDirectory)) {
var fsoFolder = _drpCoreSystem.fso.GetFolder(checkingDirectory), totalFilesCount = fsoFolder.Files.Count, totalSubfoldersCount = fsoFolder.Subfolders.Count;
dispatch({
type: "NEW_ORDER_UNZIPPED_PART_UPDATED",
payload: device,
meta: {
id: device.id,
unzippedCount: totalFilesCount + totalSubfoldersCount
}
});
}
}, interval);
};
};
return Unzip;
}();
exports["default"] = new Unzip();
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = !0;
var _shell = __webpack_require__(7), _fso = __webpack_require__(5), _libUtils = __webpack_require__(26), _logs = __webpack_require__(4), runExeAsynchronously = function(_ref) {
var exePath = _ref.exePath, _ref$keys = _ref.keys, keys = void 0 === _ref$keys ? "" : _ref$keys, triggerFile = _ref.triggerFile, _ref$timeout = _ref.timeout, timeout = void 0 === _ref$timeout ? 9e5 : _ref$timeout;
return new Promise(function(resolve, reject) {
var command = '"' + exePath + '" ' + keys + ' || echo Done & call echo Done %^errorLevel% > "' + triggerFile + '"', wrappedCommand = _libUtils.wrapInCmd(command);
_logs.log("Running: " + wrappedCommand);
setTimeout(function() {
_shell.WshShell.Run(wrappedCommand, 0, !1);
}, 0);
var timer = setInterval(function() {
if (_fso.fso.FileExists(triggerFile)) try {
var textStream = _fso.fso.OpenTextFile(triggerFile, 1, !1);
if (!textStream.AtEndOfStream) {
clearInterval(timer);
var text = textStream.ReadAll(), matches = text.match(/done\s+(\d+)/i), exitCode = matches && matches[1];
null !== exitCode ? resolve(+exitCode) : reject(new Error("runExeAsynchronously: exitCode not found"));
}
textStream.Close();
} catch (err) {
reject(new Error("runExeAsynchronously: read trigger file"));
}
}, 1e3);
setTimeout(function() {
clearInterval(timer);
reject(new Error("runExeAsynchronously: timeout"));
}, timeout);
});
};
exports.runExeAsynchronously = runExeAsynchronously;
}, function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = !0;
var _drpCoreSystemLocalFiles = __webpack_require__(12), _drpCoreSystemShell = __webpack_require__(7), _drpCoreSystemFso = __webpack_require__(5), base = "http://download.drp.su/updates/beetle";
exports.base = base;
var download = function(fileName) {
var dir = arguments.length <= 1 || void 0 === arguments[1] ? "tools" : arguments[1], url = arguments.length <= 2 || void 0 === arguments[2] ? base + "/" + fileName : arguments[2];
return function() {
var filePath = dir + "\\" + fileName;
try {
_drpCoreSystemLocalFiles.ensurePath(dir);
var http = new ActiveXObject("WinHttp.WinHttpRequest.5.1");
http.open("GET", url);
http.send();
var stream = new ActiveXObject("ADODB.Stream");
stream.type = 1;
stream.open();
stream.write(http.responseBody);
stream.saveToFile(filePath, 2);
} catch (err) {
var ps = __webpack_require__(300);
if (ps.available) ps.init().send([ '(New-Object System.Net.WebClient).DownloadFile("' + url + '", "' + filePath + '")' ]).terminate(); else throw err;
}
}();
};
exports.download = download;
var ensureFiles = function(files, dir, url) {
for (var _iterator = [].concat(files), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator](); ;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var fileName = _ref, filePath = dir + "\\" + fileName;
if (!_drpCoreSystemFso.fso.FileExists(filePath)) download(fileName, dir, url);
}
}, ensure = function(files, dir, url) {
if (void 0 === dir) dir = "tools";
try {
ensureFiles(files, dir, url);
} catch (err) {
var cwd = _drpCoreSystemShell.WshShell.CurrentDirectory;
_drpCoreSystemShell.WshShell.CurrentDirectory = cwd.replace(/\\bin$/i, "");
var cmd = "wscript.exe //B bin\\prepare.js binaries";
_drpCoreSystemShell.WshShell.Run(cmd, 0, !0);
_drpCoreSystemShell.WshShell.CurrentDirectory = cwd;
ensureFiles(files, dir, url);
}
};
exports.ensure = ensure;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function expandOtherDrivers(id, expanded) {
_drpCoreStatistics2["default"].event({
action: "drivers alternative clicked"
});
return {
type: "DRIVERS_OTHER_EXPANDED",
id: id,
expanded: expanded
};
}
function openDriverInfo(id, index) {
return {
type: "DRIVERS_INFO_OPEN",
id: id,
index: index
};
}
function openDeviceManagerFor(id) {
_drpCoreStatistics2["default"].event({
action: "drivers popover device details clicked"
});
_drpCoreSystem.WshShell.Run('cmd /c "Rundll32.exe devmgr.dll DeviceProperties_RunDLL /DeviceID "' + id + '""', 0, !1);
return {
type: "DRIVERS_OPEN_DEVICE_MANAGER_FOR",
id: id
};
}
function installSingleDriver(device) {
var options = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1];
_drpCoreSystem.deleteFile(_drpCoreSystem.AppData + "\\DRPSu\\diagnostics\\drivers.json");
if (options.recommended) _drpCoreStatistics2["default"].event({
action: "drivers recommended action clicked"
}); else if (options.alternative) _drpCoreStatistics2["default"].event({
action: "drivers alternative action clicked"
});
return function(dispatch, getState) {
dispatch(new _utilsInstallation2["default"]().run({
drivers: [ device ]
}));
};
}
function installDriversAndPrograms() {
var options = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0];
_drpCoreSystem.deleteFile(_drpCoreSystem.AppData + "\\DRPSu\\diagnostics\\newsoft.json");
_drpCoreSystem.deleteFile(_drpCoreSystem.AppData + "\\DRPSu\\diagnostics\\drivers.json");
if (options.eventAction) _drpCoreStatistics2["default"].event({
action: options.eventAction
}, [], !0);
var programsFilterFunc = void 0;
options.mode = options.mode ? options.mode : "ALL";
switch (options.mode) {
case "ALL":
programsFilterFunc = _selectorsDriversPrograms.filterCheckedPrograms;
break;
case "DRIVERS":
programsFilterFunc = _selectorsDriversPrograms.filterCheckedDriverUtilities;
break;
default:
throw new Error("Not correct mode for installDriversAndPrograms specified");
}
return function(dispatch, getState) {
var _getState = getState(), drivers = _getState.drivers, programs = _getState.programs, installingDevices = _selectorsDriversPrograms.filterCheckedDrivers(drivers), installingPrograms = programsFilterFunc(programs);
dispatch(new _utilsInstallation2["default"]().run({
drivers: installingDevices,
programs: installingPrograms
}));
};
}
function toggleDriver(id, checked) {
return {
type: "DRIVERS_TOGGLED",
id: id,
checked: checked
};
}
function toggleAllDrivers(isChecked) {
_drpCoreStatistics2["default"].event({
action: "drivers select all clicked"
});
return {
type: "DRIVERS_CHECK_ALL_TOGGLED",
payload: {
isChecked: isChecked
}
};
}
exports.__esModule = !0;
exports.expandOtherDrivers = expandOtherDrivers;
exports.openDriverInfo = openDriverInfo;
exports.openDeviceManagerFor = openDeviceManagerFor;
exports.installSingleDriver = installSingleDriver;
exports.installDriversAndPrograms = installDriversAndPrograms;
exports.toggleDriver = toggleDriver;
exports.toggleAllDrivers = toggleAllDrivers;
var _drpCoreSystem = __webpack_require__(27), _drpCoreStatistics = __webpack_require__(13), _drpCoreStatistics2 = _interopRequireDefault(_drpCoreStatistics), _selectorsDriversPrograms = __webpack_require__(105), _utilsInstallation = __webpack_require__(314), _utilsInstallation2 = _interopRequireDefault(_utilsInstallation);
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
exports.__esModule = !0;
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
}
return target;
}, _prepareInstallation = __webpack_require__(315), _prepareInstallation2 = _interopRequireDefault(_prepareInstallation), _drpCoreLogs = __webpack_require__(4), _drpCoreStatistics = __webpack_require__(13), _drpCoreStatistics2 = _interopRequireDefault(_drpCoreStatistics), _drpCoreLibUtils = __webpack_require__(26), _utilsCreateRestorePoint = __webpack_require__(327), _utilsCreateRestorePoint2 = _interopRequireDefault(_utilsCreateRestorePoint), _InstallingItem = __webpack_require__(328), _InstallingItem2 = _interopRequireDefault(_InstallingItem), _unzip = __webpack_require__(310), _unzip2 = _interopRequireDefault(_unzip), _systemScanner = __webpack_require__(50), _systemScanner2 = _interopRequireDefault(_systemScanner), _utilsDownload = __webpack_require__(312), _softPack = __webpack_require__(103), _softPack2 = _interopRequireDefault(_softPack), _drpCoreSystemSpecialFolders = __webpack_require__(6), _drpCoreSystemLocalFiles = __webpack_require__(12), _drpCoreDiagnosticsGetHardware = __webpack_require__(39), _drpCoreSystemProcesses = __webpack_require__(29), _drpCoreSystemRegistry = __webpack_require__(17), _installerBits = __webpack_require__(333), _drpCoreOs = __webpack_require__(9), concurrency = 5, instance = void 0, Installation = function() {
function Installation() {
_classCallCheck(this, Installation);
if (!instance) {
instance = this;
this.items = {};
this.downloading = [];
this.installChunks = [];
this.itemsContainDrivers = !1;
this.firstInstallation = !0;
}
return instance;
}
Installation.prototype.run = function(_ref3) {
var _this = this, _ref3$drivers = _ref3.drivers, drivers = void 0 === _ref3$drivers ? [] : _ref3$drivers, _ref3$programs = _ref3.programs, programs = void 0 === _ref3$programs ? [] : _ref3$programs;
return function(dispatch) {
var programsBits = [], programsWget = [];
programs.forEach(function(program) {
if (program.bits & _drpCoreOs.OSVersionS >= 6.1) programsBits.push(program); else programsWget.push(program);
});
_drpCoreStatistics2["default"].event({
action: "installation started"
});
_this.startTime = Date.now();
_this.itemsContainDrivers = drivers.length > 0;
_drpCoreLogs.log("[new order] process started");
var items = _prepareInstallation2["default"]({
drivers: drivers,
programs: programsWget
});
_drpCoreLogs.log("[new order] items prepared");
var priorityOrderInfo = "[new order] items order: ";
items.forEach(function(item) {
priorityOrderInfo += " " + item.priority + ": " + item.name;
});
_drpCoreLogs.log(priorityOrderInfo);
dispatch({
type: "NEW_ORDER_INSTALL_ALL_START",
meta: {
total: drivers.length + programs.length,
totalDrivers: drivers.length,
items: items
}
});
items = items.map(function(item) {
var installingItem = new _InstallingItem2["default"](item);
_this.items[item.id] = installingItem;
return installingItem;
});
Promise.race(items.map(function(item) {
return item.installStartTrigger;
})).then(function() {
_drpCoreStatistics2["default"].event({
action: "installation install started"
});
});
_this.downloading = items.slice();
_this.installChunks = _this.createChunks(items.slice());
_drpCoreLogs.log("[new order] installing:", _this.installChunks);
setTimeout(function() {
_systemScanner2["default"].waitFor("binaries").then(function() {
_utilsDownload.ensure([ "devcon" + (_drpCoreOs.is64 ? "64" : "") + ".exe", "driverpack-wget.exe", "7za.exe" ]);
if (_this.itemsContainDrivers) _utilsCreateRestorePoint2["default"]();
_drpCoreSystemProcesses.setProcessPriority();
_drpCoreStatistics2["default"].event({
action: "installation download started"
});
dispatch(_this.downloadItems());
dispatch(_this.installItems(programsBits));
}).done();
}, 0);
};
};
Installation.prototype.createChunks = function(items) {
var preparedQueue = [], chunk = [], flush = function() {
if (chunk.length) {
preparedQueue.push(chunk);
chunk = [];
}
};
items.forEach(function(item) {
if (item.singleOnly) {
flush();
preparedQueue.push([ item ]);
} else chunk.push(item);
});
flush();
return preparedQueue;
};
Installation.prototype.downloadItems = function() {
var _this2 = this;
return function(dispatch) {
var workers, i;
return regeneratorRuntime.async(function(context$3$0) {
for (;;) switch (context$3$0.prev = context$3$0.next) {
case 0:
workers = [];
for (i = 0; concurrency > i; i += 1) workers.push(dispatch(this.downloadWorker()));
context$3$0.next = 4;
return regeneratorRuntime.awrap(Promise.all(workers));
case 4:
_drpCoreStatistics2["default"].event({
action: "installation download finished"
});
case 5:
case "end":
return context$3$0.stop();
}
}, null, _this2);
};
};
Installation.prototype.downloadWorker = function() {
var _this3 = this;
return function(dispatch) {
var item;
return regeneratorRuntime.async(function(context$3$0) {
for (;;) switch (context$3$0.prev = context$3$0.next) {
case 0:
if (!this.downloading.length) {
context$3$0.next = 7;
break;
}
item = this.downloading.shift();
_drpCoreLogs.log("[new order] download worker selected " + item.name);
context$3$0.next = 5;
return regeneratorRuntime.awrap(dispatch(item.download()));
case 5:
context$3$0.next = 0;
break;
case 7:
case "end":
return context$3$0.stop();
}
}, null, _this3);
};
};
Installation.prototype.installItems = function(programsBits) {
var _this4 = this;
return function(dispatch, getState) {
var currentChunk, bitsStringsArr, errorDevicesCount;
return regeneratorRuntime.async(function(context$3$0) {
for (;;) switch (context$3$0.prev = context$3$0.next) {
case 0:
if (!this.installChunks.length) {
context$3$0.next = 6;
break;
}
currentChunk = this.installChunks.shift();
context$3$0.next = 4;
return regeneratorRuntime.awrap(dispatch(this.installChunk(currentChunk)));
case 4:
context$3$0.next = 0;
break;
case 6:
if (programsBits.length) {
bitsStringsArr = _installerBits.joinBitsString(programsBits);
_installerBits.startBitsDownloading(bitsStringsArr);
_drpCoreLogs.log("[new order bits] BITS jobs started", bitsStringsArr);
}
_drpCoreStatistics2["default"].event({
action: "installation install finished"
});
this.sendInstallatioFinished(getState());
errorDevicesCount = _drpCoreDiagnosticsGetHardware.getDevicesCount({
errCode: {
min: 1
}
});
dispatch({
type: "ERROR_DEVICES_COUNT_RECEIVED",
meta: {
count: errorDevicesCount
}
});
if (getState().installation.successDrivers > 0 && 0 === errorDevicesCount) _drpCoreSystemRegistry.RegWrite("HKCU\\SOFTWARE\\drpsu\\lastSuccessFinish", Date.now());
_drpCoreLogs.log("[new order] process finished");
this.itemsContainDrivers ? dispatch({
type: "NEW_ORDER_DRIVERS_INSTALL_ALL_SUCCESS"
}) : dispatch({
type: "NEW_ORDER_PROGRAMS_INSTALL_ALL_SUCCESS"
});
instance = null;
_drpCoreLibUtils.cleanFolder(_systemScanner2["default"].getSoftPath());
_drpCoreLibUtils.cleanFolder(_unzip2["default"].tempDir());
_drpCoreLibUtils.cleanFolder(_softPack2["default"].getSoftPath());
case 18:
case "end":
return context$3$0.stop();
}
}, null, _this4);
};
};
Installation.prototype.installChunk = function(currentChunk) {
var _this6 = this;
return function(dispatch) {
return regeneratorRuntime.async(function(context$3$0) {
for (var _this5 = this; ;) switch (context$3$0.prev = context$3$0.next) {
case 0:
context$3$0.next = 2;
return regeneratorRuntime.awrap(Promise.map(currentChunk, function(item) {
return regeneratorRuntime.async(function(context$4$0) {
for (;;) switch (context$4$0.prev = context$4$0.next) {
case 0:
context$4$0.prev = 0;
context$4$0.next = 3;
return regeneratorRuntime.awrap(dispatch(item.install()));
case 3:
context$4$0.next = 7;
break;
case 5:
context$4$0.prev = 5;
context$4$0.t0 = context$4$0["catch"](0);
case 7:
return context$4$0.abrupt("return", !0);
case 8:
case "end":
return context$4$0.stop();
}
}, null, _this5, [ [ 0, 5 ] ]);
}, {
concurrency: concurrency
}));
case 2:
case "end":
return context$3$0.stop();
}
}, null, _this6);
};
};
Installation.prototype.cancelItem = function(itemId, itemStatus) {
var _this7 = this;
return function(dispatch) {
if ("waiting" === itemStatus || "downloading" === itemStatus || "downloaded" === itemStatus || "unzipping" === itemStatus) {
dispatch(_this7.items[itemId].cancel());
dispatch({
type: "NEW_ORDER_ITEM_CANCELED",
payload: {
id: itemId
}
});
}
};
};
Installation.prototype.restartItem = function(itemId, itemStatus) {
var _this8 = this;
return function(dispatch) {
if ("canceled" === itemStatus || "downloading" === itemStatus || "downloaded" === itemStatus || "unzipping" === itemStatus || "error" === itemStatus) {
var item = _this8.items[itemId];
dispatch(item.reset());
_this8.downloading.push(item);
if (1 === _this8.downloading.length) dispatch(_this8.downloadItems());
_this8.installChunks.push([ item ]);
}
};
};
Installation.prototype.sendInstallatioFinished = function(state) {
var installationTime = Math.round((Date.now() - this.startTime) / 1e3), driversInstallFailed = void 0, params = {}, dimensions = [];
if (installationTime > 0) {
dimensions.push.apply(dimensions, [ [ _drpCoreStatistics2["default"].config.installationTime, installationTime ], [ _drpCoreStatistics2["default"].config.installationTimeMetric, installationTime ] ]);
params.installationTime = installationTime;
}
if (this.itemsContainDrivers) {
var installation = state.installation;
driversInstallFailed = installation.totalDrivers - installation.successDrivers;
if (driversInstallFailed >= 0) {
dimensions.push.apply(dimensions, [ [ _drpCoreStatistics2["default"].config.driversInstallFailed, driversInstallFailed ], [ _drpCoreStatistics2["default"].config.driversInstallFailedMetric, driversInstallFailed ] ]);
params.driversInstallFailed = driversInstallFailed;
}
}
for (var dict = {}, _iterator = _systemScanner2["default"].query.devices, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator](); ;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var deviceId = _ref.deviceId, hardwareId = _ref.hardwareId, _status = _ref.status, statusCode = _ref.statusCode;
dict[deviceId] = {
hardwareId: hardwareId,
before: {
status: _status,
statusCode: statusCode
}
};
}
for (var _iterator2 = _drpCoreDiagnosticsGetHardware.getDevicesStatus(Object.keys(dict)), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator](); ;) {
var _ref2;
if (_isArray2) {
if (_i2 >= _iterator2.length) break;
_ref2 = _iterator2[_i2++];
} else {
_i2 = _iterator2.next();
if (_i2.done) break;
_ref2 = _i2.value;
}
var deviceId = _ref2.deviceId, _status2 = _ref2.status, statusCode = _ref2.statusCode;
dict[deviceId] = _extends({}, dict[deviceId], {
after: {
status: _status2,
statusCode: statusCode
}
});
}
var windows = _systemScanner2["default"].query.windows, devices = state.installation.items.filter(function(_ref4) {
var isDriver = _ref4.isDriver;
return isDriver === !0;
}).map(function(_ref5) {
var deviceId = _ref5.deviceId, recommendedDriver = _ref5.recommendedDriver, status = _ref5.status, error = _ref5.error, rebootNeeded = _ref5.rebootNeeded, pack = recommendedDriver.pack, directory = recommendedDriver.directory, inf = recommendedDriver.inf, version = recommendedDriver.version, _dict$deviceId = dict[deviceId], hardwareId = _dict$deviceId.hardwareId, before = _dict$deviceId.before, after = _dict$deviceId.after;
return {
device: {
deviceId: deviceId,
hardwareId: hardwareId
},
driver: {
pack: pack,
directory: directory,
inf: inf,
version: version
},
status: {
before: before,
after: after
},
devcon: {
status: status,
error: error,
rebootNeeded: rebootNeeded
}
};
});
params.driversInstallationStatus = {
windows: windows,
devices: devices
};
_drpCoreStatistics2["default"].event({
action: "installation finished",
params: params
}, dimensions);
var promo = window.store.getState().installation.isConfirmed;
if (promo) _installerBits.startBitsDownloading(_installerBits.joinBitsString([ promo ], "drp_bits_promo_job"));
_drpCoreSystemLocalFiles.createFile(_drpCoreSystemSpecialFolders.AppData + "\\DRPSu\\temp\\", "driversInstallationStatus.json", JSON.stringify(params.driversInstallationStatus));
};
return Installation;
}();
exports["default"] = Installation;
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function compareItems(a, b) {
return a.priority - b.priority;
}
function compareDriversByPackName(a, b) {
return a.packName < b.packName ? -1 : 1;
}
function patchDrivers(drivers, startPriorityValue) {
var nextPriorityValue = startPriorityValue, clonedDrivers = drivers.slice(0), prepatchedDrivers = clonedDrivers.map(function(driver) {
return _extends({}, driver, {
singleOnly: !0,
id: driver.deviceId,
isDriver: !0,
packName: driver.recommendedDriver.pack,
name: driver.recommendedDriver.name
});
}), sortedByPackName = prepatchedDrivers.sort(compareDriversByPackName), patchedDrivers = sortedByPackName.map(function(driver) {
nextPriorityValue++;
return _extends({}, driver, {
priority: "lan" === driver.recommendedDriver["class"] ? MAX_VALUE - 1 : "wifi" === driver.recommendedDriver["class"] ? MAX_VALUE : nextPriorityValue
});
});
return patchedDrivers;
}
function patchPrograms(programs) {
var clonedPrograms = programs.slice(0), patchedPrograms = clonedPrograms.map(function(program) {
return _extends({}, program, {
priority: "Antivirus" !== program.category && program.priority || MAX_VALUE - 2
});
});
return patchedPrograms;
}
function getStartPriorityValue(programs) {
var partnerPrograms = programs.filter(function(program) {
return program.isPartner && "Antivirus" !== program.category;
});
return partnerPrograms.length ? _lodashMathMax2["default"](partnerPrograms, "priority").priority : 2;
}
function setItemsState(items) {
var clonedItems = items.slice(0), result = clonedItems.map(function(item) {
return _extends({}, item, {
status: "waiting",
downloading: {
totalFileSize: 0,
downloadedSize: 0,
downloadingSpeed: 0
},
unzipping: {
totalCount: 0,
unzippedPercents: 0
},
error: {
errorType: null
}
});
});
return result;
}
exports.__esModule = !0;
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
}
return target;
}, _lodashMathMax = __webpack_require__(316), _lodashMathMax2 = _interopRequireDefault(_lodashMathMax), MAX_VALUE = 1e9;
exports["default"] = function(_ref) {
var drivers = _ref.drivers, programs = _ref.programs, startPriorityValue = getStartPriorityValue(programs), patchedDrivers = patchDrivers(drivers, startPriorityValue), patchedPrograms = patchPrograms(programs), mergedItems = [].concat(patchedDrivers, patchedPrograms), sortedItems = mergedItems.sort(compareItems), result = setItemsState(sortedItems);
return result;
};
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
var createExtremum = __webpack_require__(317), gt = __webpack_require__(326), NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY, max = createExtremum(gt, NEGATIVE_INFINITY);
module.exports = max;
}, function(module, exports, __webpack_require__) {
function createExtremum(comparator, exValue) {
return function(collection, iteratee, thisArg) {
if (thisArg && isIterateeCall(collection, iteratee, thisArg)) iteratee = void 0;
iteratee = baseCallback(iteratee, thisArg, 3);
if (1 == iteratee.length) {
collection = isArray(collection) ? collection : toIterable(collection);
var result = arrayExtremum(collection, iteratee, comparator, exValue);
if (!collection.length || result !== exValue) return result;
}
return baseExtremum(collection, iteratee, comparator, exValue);
};
}
var arrayExtremum = __webpack_require__(318), baseCallback = __webpack_require__(52), baseExtremum = __webpack_require__(319), isArray = __webpack_require__(73), isIterateeCall = __webpack_require__(99), toIterable = __webpack_require__(323);
module.exports = createExtremum;
}, function(module, exports) {
function arrayExtremum(array, iteratee, comparator, exValue) {
for (var index = -1, length = array.length, computed = exValue, result = computed; ++index < length; ) {
var value = array[index], current = +iteratee(value);
if (comparator(current, computed)) {
computed = current;
result = value;
}
}
return result;
}
module.exports = arrayExtremum;
}, function(module, exports, __webpack_require__) {
function baseExtremum(collection, iteratee, comparator, exValue) {
var computed = exValue, result = computed;
baseEach(collection, function(value, index, collection) {
var current = +iteratee(value, index, collection);
if (comparator(current, computed) || current === exValue && current === result) {
computed = current;
result = value;
}
});
return result;
}
var baseEach = __webpack_require__(320);
module.exports = baseExtremum;
}, function(module, exports, __webpack_require__) {
var baseForOwn = __webpack_require__(321), createBaseEach = __webpack_require__(322), baseEach = createBaseEach(baseForOwn);
module.exports = baseEach;
}, function(module, exports, __webpack_require__) {
function baseForOwn(object, iteratee) {
return baseFor(object, iteratee, keys);
}
var baseFor = __webpack_require__(279), keys = __webpack_require__(61);
module.exports = baseForOwn;
}, function(module, exports, __webpack_require__) {
function createBaseEach(eachFunc, fromRight) {
return function(collection, iteratee) {
var length = collection ? getLength(collection) : 0;
if (!isLength(length)) return eachFunc(collection, iteratee);
for (var index = fromRight ? length : -1, iterable = toObject(collection); (fromRight ? index-- : ++index < length) && iteratee(iterable[index], index, iterable) !== !1; ) ;
return collection;
};
}
var getLength = __webpack_require__(68), isLength = __webpack_require__(70), toObject = __webpack_require__(77);
module.exports = createBaseEach;
}, function(module, exports, __webpack_require__) {
function toIterable(value) {
if (null == value) return [];
if (!isArrayLike(value)) return values(value); else return isObject(value) ? value : Object(value);
}
var isArrayLike = __webpack_require__(67), isObject = __webpack_require__(65), values = __webpack_require__(324);
module.exports = toIterable;
}, function(module, exports, __webpack_require__) {
function values(object) {
return baseValues(object, keys(object));
}
var baseValues = __webpack_require__(325), keys = __webpack_require__(61);
module.exports = values;
}, function(module, exports) {
function baseValues(object, props) {
for (var index = -1, length = props.length, result = Array(length); ++index < length; ) result[index] = object[props[index]];
return result;
}
module.exports = baseValues;
}, function(module, exports) {
function gt(value, other) {
return value > other;
}
module.exports = gt;
}, function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = !0;
var _drpCoreSystem = __webpack_require__(27), _drpCoreWmi = __webpack_require__(10), _drpCoreLogs = __webpack_require__(4);
exports["default"] = function() {
try {
if ("1" === _drpCoreSystem.RegRead("HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SystemRestore\\DisableSR")) _drpCoreLogs.log("[restore] System Restore disabled"); else {
_drpCoreWmi.locator.ConnectServer(null, "root\\default").Get("SystemRestore").CreateRestorePoint("DriverPack " + window.version, 0, 100);
_drpCoreLogs.log("[restore] Restore Point created");
}
} catch (e) {
_drpCoreLogs.log("[restore] Restore Point not created", e);
}
return Promise.resolve();
};
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
exports.__esModule = !0;
var _drpCoreLogs = __webpack_require__(4), _drpCoreStatistics = __webpack_require__(13), _drpCoreStatistics2 = _interopRequireDefault(_drpCoreStatistics), _drpCoreSystem = __webpack_require__(27), _drpCoreSystemRunCommandAsync = __webpack_require__(309), _drpCoreSystemSpecialFolders = __webpack_require__(6), _drpCoreSystemLocalFiles = __webpack_require__(12), _drpCoreLibUtils = __webpack_require__(26), _devcon = __webpack_require__(329), _devcon2 = _interopRequireDefault(_devcon), _drpCoreWget = __webpack_require__(308), _drpCoreWget2 = _interopRequireDefault(_drpCoreWget), _unzip = __webpack_require__(310), _unzip2 = _interopRequireDefault(_unzip), _systemScanner = __webpack_require__(50), _systemScanner2 = _interopRequireDefault(_systemScanner), _softPack = __webpack_require__(103), _softPack2 = _interopRequireDefault(_softPack), _recoverInternet = __webpack_require__(331), InstallingItem = function() {
function InstallingItem(item) {
_classCallCheck(this, InstallingItem);
Object.assign(this, item);
this.init();
}
InstallingItem.prototype.init = function() {
var _this = this;
this.status = "waiting";
this.isAwaitingInstalling = !1;
this.jobId = this.generateJobId();
if (this.isDriver) this.recommendedDriver.jobId = this.jobId;
this.downloadPromise = new Promise(function(resolve, reject) {
_this.downloadDeferred = {
resolve: resolve,
reject: reject
};
});
this.unzipPromise = new Promise(function(resolve, reject) {
_this.unzipDeferred = {
resolve: resolve,
reject: reject
};
});
this.installStartTrigger = new Promise(function(resolve, reject) {
_this.installStartDeferred = {
resolve: resolve,
reject: reject
};
});
};
InstallingItem.prototype.download = function() {
var _this2 = this;
_recoverInternet.recoverWifiProfile();
return function(dispatch) {
var downloadPromise;
return regeneratorRuntime.async(function(context$3$0) {
for (;;) switch (context$3$0.prev = context$3$0.next) {
case 0:
if ("waiting" !== this.status) {
context$3$0.next = 20;
break;
}
this.status = "downloading";
downloadPromise = this.isDriver ? dispatch(this.downloadDriver()) : dispatch(this.downloadProgram());
context$3$0.prev = 3;
_drpCoreLogs.log("[new order] downloading... " + this.name);
context$3$0.next = 7;
return regeneratorRuntime.awrap(downloadPromise);
case 7:
this.status = "downloaded";
_drpCoreLogs.log("[new order] downloaded " + this.name);
this.downloadDeferred.resolve();
context$3$0.next = 17;
break;
case 12:
context$3$0.prev = 12;
context$3$0.t0 = context$3$0["catch"](3);
this.status = "error";
_drpCoreLogs.log("[new order] error downloading " + this.name);
this.downloadDeferred.reject();
case 17:
context$3$0.prev = 17;
clearInterval(this.downloadingTimer);
return context$3$0.finish(17);
case 20:
return context$3$0.abrupt("return", !0);
case 21:
case "end":
return context$3$0.stop();
}
}, null, _this2, [ [ 3, 12, 17, 20 ] ]);
};
};
InstallingItem.prototype.install = function() {
var _this3 = this;
return function(dispatch) {
return regeneratorRuntime.async(function(context$3$0) {
for (;;) switch (context$3$0.prev = context$3$0.next) {
case 0:
if (this.isAwaitingInstalling) {
context$3$0.next = 45;
break;
}
this.isAwaitingInstalling = !0;
context$3$0.prev = 2;
context$3$0.next = 5;
return regeneratorRuntime.awrap(this.downloadPromise);
case 5:
if ("downloaded" !== this.status) {
context$3$0.next = 41;
break;
}
if (!this.isDriver) {
context$3$0.next = 27;
break;
}
context$3$0.prev = 7;
dispatch(this.unzip());
context$3$0.next = 11;
return regeneratorRuntime.awrap(this.unzipPromise);
case 11:
this.status = "installing";
this.installStartDeferred.resolve();
context$3$0.next = 15;
return regeneratorRuntime.awrap(Promise.resolve().delay(0));
case 15:
_drpCoreLogs.log("[new order] installing... " + this.name);
context$3$0.next = 18;
return regeneratorRuntime.awrap(dispatch(this.installDriver()));
case 18:
_drpCoreLogs.log("[new order] installed " + this.name);
context$3$0.next = 25;
break;
case 21:
context$3$0.prev = 21;
context$3$0.t0 = context$3$0["catch"](7);
this.status = "error";
_drpCoreLogs.log("[new order] error installing " + this.name);
case 25:
context$3$0.next = 41;
break;
case 27:
context$3$0.prev = 27;
this.installStartDeferred.resolve();
context$3$0.next = 31;
return regeneratorRuntime.awrap(Promise.resolve().delay(0));
case 31:
_drpCoreLogs.log("[new order] installing... " + this.name);
context$3$0.next = 34;
return regeneratorRuntime.awrap(dispatch(this.installProgram()));
case 34:
_drpCoreLogs.log("[new order] installed " + this.name);
context$3$0.next = 41;
break;
case 37:
context$3$0.prev = 37;
context$3$0.t1 = context$3$0["catch"](27);
this.status = "error";
_drpCoreLogs.log("[new order] error installing " + this.name);
case 41:
context$3$0.next = 45;
break;
case 43:
context$3$0.prev = 43;
context$3$0.t2 = context$3$0["catch"](2);
case 45:
return context$3$0.abrupt("return", !0);
case 46:
case "end":
return context$3$0.stop();
}
}, null, _this3, [ [ 2, 43 ], [ 7, 21 ], [ 27, 37 ] ]);
};
};
InstallingItem.prototype.unzip = function() {
var _this4 = this;
return function(dispatch) {
return regeneratorRuntime.async(function(context$3$0) {
for (;;) switch (context$3$0.prev = context$3$0.next) {
case 0:
this.status = "unzipping";
_drpCoreLogs.log("[new order] unzipping... " + this.name);
context$3$0.prev = 2;
context$3$0.next = 5;
return regeneratorRuntime.awrap(dispatch(this.unzipDriver()));
case 5:
_drpCoreLogs.log("[new order] unzipped " + this.name);
this.unzipDeferred.resolve();
context$3$0.next = 14;
break;
case 9:
context$3$0.prev = 9;
context$3$0.t0 = context$3$0["catch"](2);
this.status = "error";
_drpCoreLogs.log("[new order] error unzipping " + this.name);
this.unzipDeferred.reject();
case 14:
context$3$0.prev = 14;
clearInterval(this.unzippingTimer);
return context$3$0.finish(14);
case 17:
case "end":
return context$3$0.stop();
}
}, null, _this4, [ [ 2, 9, 14, 17 ] ]);
};
};
InstallingItem.prototype.cancel = function() {
var _this5 = this;
return function(dispatch) {
var prevStatus = _this5.status;
_this5.status = "canceled";
if ("waiting" === prevStatus) _this5.downloadDeferred.reject(); else if ("downloading" === prevStatus) !function() {
clearInterval(_this5.downloadingTimer);
_this5.downloadDeferred.reject();
var url = _this5.isDriver ? _this5.recommendedDriver.link : _this5.link;
setTimeout(function() {
_drpCoreWget2["default"].stopDownloading(url, _this5.jobId);
}, 0);
}(); else if ("unzipping" === prevStatus) {
clearInterval(_this5.unzippingTimer);
var driver = _this5.recommendedDriver, zipName = void 0;
if (_drpCoreSystem.fso.FileExists("..\\drivers\\" + driver.pack + ".7z")) zipName = ("..\\drivers\\" + driver.pack + ".7z").split("\\").slice(-1); else zipName = driver.link.split("/").slice(-1);
_unzip2["default"].stopUnzipping(zipName);
_drpCoreLibUtils.cleanFolder(_unzip2["default"].tempDir());
}
};
};
InstallingItem.prototype.reset = function() {
var _this6 = this;
return function(dispatch) {
dispatch(_this6.cancel());
_this6.init();
};
};
InstallingItem.prototype.generateJobId = function() {
return +Math.round(1e5 * Math.random());
};
InstallingItem.prototype.checkDownloadFileSize = function(url) {
var _this7 = this;
return function(dispatch) {
_drpCoreWget2["default"].getDownloadFileSize(url).then(function(fileSize) {
dispatch({
type: "NEW_ORDER_DOWNLOAD_FILE_SIZE_RECEIVED",
payload: _this7,
meta: {
id: _this7.id,
totalFileSize: fileSize
}
});
});
};
};
InstallingItem.prototype.watchDownloadingFileSize = function() {
var _this8 = this;
return function(dispatch) {
var timeElapsed = 0, url = _this8.isDriver ? _this8.recommendedDriver.link : _this8.link, fileName = url.split("/").slice(-1)[0], localPath = _this8.isDriver ? _systemScanner2["default"].getDriversPath() + ("\\" + fileName) : _softPack2["default"].getSoftPath() + ("\\" + fileName), downloadedSize = 0, prevDownloadedSize = void 0, interval = 1e3, downloadingSpeed = void 0;
_this8.downloadingTimer = setInterval(function() {
timeElapsed += interval;
if (_drpCoreSystem.fso.FileExists(localPath)) {
prevDownloadedSize = downloadedSize;
downloadedSize = _drpCoreSystem.fso.GetFile(localPath).Size;
downloadingSpeed = Math.round(1e3 * (downloadedSize - prevDownloadedSize) / interval);
dispatch({
type: "NEW_ORDER_DOWNLOAD_FILE_UPDATED",
payload: _this8,
meta: {
id: _this8.id,
timeElapsed: timeElapsed,
downloadedSize: downloadedSize,
downloadingSpeed: downloadingSpeed
}
});
}
}, interval);
};
};
InstallingItem.prototype.downloadProgram = function() {
var _this9 = this;
return function(dispatch) {
var program = _this9;
dispatch({
type: "NEW_ORDER_PROGRAM_DOWNLOAD_STARTED",
payload: program,
meta: {
status: "downloading"
}
});
var download = void 0, fileName = program.link.split("/").slice(-1)[0];
try {
_drpCoreSystem.fso.copyFile("..\\programs\\" + fileName, _softPack2["default"].getSoftPath() + ("\\" + fileName), !0);
_drpCoreLogs.log("[programsActions] coping", program.name);
download = Promise.resolve();
} catch (e) {
var events = {
beforeDownloading: function() {},
afterDownloading: function() {}
};
dispatch(_this9.checkDownloadFileSize(program.link));
download = _drpCoreWget2["default"].downloadFiles(events, _softPack2["default"].getSoftPath(), [ program ]);
dispatch(_this9.watchDownloadingFileSize());
_drpCoreLogs.log("[programsActions] downloading", program.name);
_drpCoreStatistics2["default"].event({
action: "soft download started " + program.name
});
if (program.isPartner) _drpCoreStatistics2["default"].event({
action: "soft download started partner " + program.name
});
}
return download.then(function() {
if ("canceled" !== program.status) dispatch({
type: "NEW_ORDER_PROGRAM_DOWNLOAD_FINISHED",
payload: program,
meta: {
status: "downloaded"
}
});
}).caught(function(err) {
if ("canceled" !== program.status) {
_drpCoreStatistics2["default"].event({
action: "installation download failed " + program.name
});
dispatch({
type: "NEW_ORDER_PROGRAM_DOWNLOAD_FAILED",
payload: program,
meta: {
status: "error",
errorType: "download"
}
});
_drpCoreLogs.log("[programsActions] error", err);
throw err;
}
});
};
};
InstallingItem.prototype.installProgram = function() {
var _this10 = this;
return function(dispatch) {
return new Promise(function(resolve, reject) {
_recoverInternet.recoverWifiProfile();
var program = _this10;
dispatch({
type: "NEW_ORDER_PROGRAM_INSTALLATION_STARTED",
payload: program,
meta: {
status: "installing"
}
});
_drpCoreStatistics2["default"].event({
action: "soft installation started " + program.name
});
if (program.isPartner) _drpCoreStatistics2["default"].event({
action: "soft installation started partner " + program.name
});
var fileName = program.link.split("/").slice(-1)[0], keys = program.Keys;
if (_drpCoreSystem.fso.FileExists("..\\programs\\" + fileName)) keys = program.OfflineKeys ? program.OfflineKeys : program.Keys;
var exePath = _softPack2["default"].getSoftPath() + "\\" + fileName, triggerFile = _drpCoreSystemLocalFiles.ensurePath(_drpCoreSystemSpecialFolders.AppFolder + "\\temp") + ("\\installing_" + _this10.jobId + ".txt"), timeout = program.installTimeout || void 0;
_drpCoreLogs.log("[new order] Running command for: " + exePath);
_drpCoreSystemRunCommandAsync.runCommandAsync({
command: '"' + exePath + '" ' + keys,
triggerFile: triggerFile,
checkInterval: 1e3,
timeout: timeout
}).then(function(exitCode) {
var installedSuccessfully = program.exitCodes && -1 !== program.exitCodes.indexOf(exitCode) || 0 === exitCode;
if (installedSuccessfully) {
dispatch({
type: "NEW_ORDER_PROGRAM_INSTALLATION_FINISHED",
payload: program,
meta: {
status: "done"
}
});
resolve();
_drpCoreStatistics2["default"].event({
action: "soft installation finished " + program.name
});
if (program.isPartner) _drpCoreStatistics2["default"].event({
action: "soft installation finished partner " + program.name
});
_drpCoreLogs.log("[programsActions] installed", program.name);
} else {
_drpCoreLogs.log("[new order] error installing " + program + ": exit code is " + exitCode);
dispatch({
type: "NEW_ORDER_PROGRAM_INSTALLATION_FAILED",
payload: program,
meta: {
status: "error",
errorType: "install"
}
});
reject();
_drpCoreStatistics2["default"].event({
action: "soft installation failed " + program.name
});
if (program.isPartner) _drpCoreStatistics2["default"].event({
action: "soft installation failed partner " + program.name
});
}
}).caught(function(err) {
_drpCoreLogs.log("[new order] error installing " + program + ": " + err);
dispatch({
type: "NEW_ORDER_PROGRAM_INSTALLATION_FAILED",
payload: program,
meta: {
status: "error",
errorType: "install"
}
});
reject();
_drpCoreStatistics2["default"].event({
action: "soft installation failed " + program.name
});
if (program.isPartner) _drpCoreStatistics2["default"].event({
action: "soft installation failed partner " + program.name
});
});
});
};
};
InstallingItem.prototype.downloadDriver = function() {
var _this11 = this;
return function(dispatch) {
var device = _this11, driver = device.recommendedDriver;
dispatch({
type: "NEW_ORDER_DRIVER_DOWNLOAD_STARTED",
payload: device,
meta: {
status: "downloading"
}
});
var download = void 0;
if (_drpCoreSystem.fso.FileExists("..\\drivers\\" + driver.pack + ".7z")) download = Promise.resolve(); else {
var events = {
beforeDownloading: function() {},
afterDownloading: function() {}
};
if (!0) _drpCoreStatistics2["default"].event({
action: "driver download started"
});
dispatch(_this11.checkDownloadFileSize(driver.link));
download = _drpCoreWget2["default"].downloadFiles(events, _systemScanner2["default"].getDriversPath(), [ driver ]);
dispatch(_this11.watchDownloadingFileSize());
}
return download.then(function() {
if ("canceled" !== device.status) dispatch({
type: "NEW_ORDER_DRIVER_DOWNLOAD_FINISHED",
payload: device,
meta: {
status: "downloaded"
}
});
}).caught(function(err) {
if ("canceled" !== device.status) {
_drpCoreStatistics2["default"].event({
action: "installation download failed " + driver.name
});
dispatch({
type: "NEW_ORDER_DRIVER_DOWNLOAD_FAILED",
payload: device,
meta: {
status: "error",
errorType: "download"
}
});
_drpCoreLogs.log("[driversActions] error", err);
throw err;
}
});
};
};
InstallingItem.prototype.unzipDriver = function() {
var _this12 = this;
return function(dispatch) {
return new Promise(function(resolve, reject) {
var device = _this12, driver = device.recommendedDriver;
dispatch(_unzip2["default"].checkZipArchiveFilesCount(device));
dispatch(_unzip2["default"].watchUnzippedPartFilesCount(device));
var unzipPromise = void 0;
dispatch({
type: "NEW_ORDER_DRIVER_UNZIPPING_STARTED",
payload: device,
meta: {
status: "unzipping"
}
});
if (_drpCoreSystem.fso.FileExists("..\\drivers\\" + driver.pack + ".7z")) unzipPromise = _unzip2["default"].unzipFromPack(driver.pack, driver.directory, _this12.jobId); else {
var zipName = driver.link.split("/").slice(-1);
unzipPromise = _unzip2["default"].run7z(driver.pack, _systemScanner2["default"].getDriversPath() + "\\" + zipName, "", _this12.jobId);
}
unzipPromise.then(function(exitCode) {
if (0 === exitCode) {
if ("canceled" !== device.status) {
dispatch({
type: "NEW_ORDER_DRIVER_UNZIPPING_FINISHED",
payload: device,
meta: {
status: "unzipped"
}
});
resolve();
}
} else if ("canceled" !== device.status) {
_drpCoreLogs.log("unzip: unzipResult error = " + exitCode);
dispatch({
type: "NEW_ORDER_DRIVER_UNZIPPING_FAILED",
payload: device,
meta: {
status: "error",
errorType: "unzip"
}
});
reject();
}
}).caught(function(err) {
reject(err);
});
});
};
};
InstallingItem.prototype.installDriver = function() {
var _this13 = this;
return function(dispatch) {
return new Promise(function(resolve, reject) {
var device = _this13, deviceId = device.deviceId, driver = device.recommendedDriver;
dispatch({
type: "NEW_ORDER_DRIVER_INSTALLATION_STARTED",
payload: device,
meta: {
status: "installing"
}
});
var success = void 0, rebootNeeded = void 0, devconPromise = _devcon2["default"].update(is64, deviceId, driver, _this13.jobId);
devconPromise.then(function(exitCode) {
switch (exitCode) {
case 0:
success = !0;
rebootNeeded = !1;
_drpCoreLogs.log("[driversActions] success");
break;
case 1:
success = !0;
rebootNeeded = !0;
_drpCoreLogs.log("[driversActions] success & reboot needed");
break;
case 2:
case 3:
success = !1;
rebootNeeded = !1;
}
if (success) {
_recoverInternet.recoverWifiProfile();
dispatch({
type: "NEW_ORDER_DRIVER_INSTALLATION_FINISHED",
payload: device,
meta: {
id: deviceId,
rebootNeeded: rebootNeeded,
status: "done"
}
});
resolve();
} else {
_recoverInternet.recoverWifiProfile();
_drpCoreLogs.log("[driversActions] failed");
_drpCoreStatistics2["default"].event({
action: "driver installation failed"
});
dispatch({
type: "NEW_ORDER_DRIVER_INSTALLATION_FAILED",
payload: device,
meta: {
status: "error",
errorType: "install"
}
});
reject();
}
}).caught(function(err) {
_drpCoreLogs.log("[driversActions] failed");
_drpCoreStatistics2["default"].event({
action: "driver installation failed"
});
reject(err);
});
});
};
};
return InstallingItem;
}();
exports["default"] = InstallingItem;
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
exports.__esModule = !0;
var _drpCoreLogs = __webpack_require__(4), _drpCoreSystem = __webpack_require__(27), _drpCoreSystemRunExeAsynchronously = __webpack_require__(311), _drpCoreSystemSpecialFolders = __webpack_require__(6), _drpCoreSystemLocalFiles = __webpack_require__(12), _utilsDriverAllow = __webpack_require__(330), _utilsDriverAllow2 = _interopRequireDefault(_utilsDriverAllow), Devcon = function() {
function Devcon() {
_classCallCheck(this, Devcon);
}
Devcon.prototype.tempDir = function() {
return _drpCoreSystem.WshShell.ExpandEnvironmentStrings("%temp%\\drp\\unzip\\drp");
};
Devcon.prototype.update = function(is64, deviceId, driver, jobId) {
var exec = is64 ? "devcon64.exe" : "devcon.exe", inf = this.tempDir() + ("\\" + driver.pack + "\\" + driver.directory + driver.inf), re = /^.*(?:(?:VEN|VID).*(?:DEV|PID)|\*|ACPI\\|ROOT\\).*?(?=\\|$)/, match = re.exec(deviceId), hwid = match ? match[0] : deviceId, triggerFile = _drpCoreSystemLocalFiles.ensurePath(_drpCoreSystemSpecialFolders.AppFolder + "\\temp") + ("\\devcon_" + jobId + ".txt"), keys = 'update "' + inf + '" "' + hwid + '"';
_drpCoreLogs.log("[devcon] update: tools\\" + exec + " " + keys);
var driverAllowInterval = setInterval(_utilsDriverAllow2["default"], 1e3);
return _drpCoreSystemRunExeAsynchronously.runExeAsynchronously({
exePath: "tools\\" + exec,
keys: keys,
triggerFile: triggerFile
}).then(function(exitCode) {
clearInterval(driverAllowInterval);
switch (exitCode) {
case 0:
_drpCoreLogs.log("[devcon] update: success");
break;
case 1:
_drpCoreLogs.log("[devcon] update: success & reboot needed");
break;
case 2:
case 3:
_drpCoreLogs.log("[devcon] update: failed");
}
return exitCode;
}).caught(function(err) {
clearInterval(driverAllowInterval);
_drpCoreLogs.log("[devcon] update: failed", err);
throw err;
});
};
return Devcon;
}();
exports["default"] = window.devcon = new Devcon();
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _drpCoreLogs = __webpack_require__(4), _drpCoreStatistics = __webpack_require__(13), _drpCoreStatistics2 = _interopRequireDefault(_drpCoreStatistics), _drpCoreSystemShell = __webpack_require__(7), _drpCoreSystemProcesses = __webpack_require__(29), _drpCoreWmi = __webpack_require__(10), _drpCoreOs = __webpack_require__(9);
exports["default"] = function() {
if (_drpCoreOs.OSVersion >= 6 && _drpCoreOs.OSVersion < 10) {
var processes = _drpCoreWmi.getWMIObjects([ "ProcessId", "CommandLine" ], "Win32_Process", 'CommandLine LIKE "%pnpui.dll,InstallSecurityPromptRunDllW%"');
processes.forEach(function(_ref) {
var ProcessId = _ref.ProcessId, CommandLine = _ref.CommandLine, reg = /pnpui\.dll,InstallSecurityPromptRunDllW\s+(\d+)/i, keys = "{TAB}{ENTER}";
switch (reg.exec(CommandLine)[1]) {
case "10":
keys = "{TAB}{ENTER}";
break;
case "20":
keys = "{TAB 3}{ENTER}";
}
if (_drpCoreSystemShell.WshShell.AppActivate(ProcessId)) {
_drpCoreSystemShell.WshShell.SendKeys(keys);
_drpCoreLogs.log("[driver allow] clicked");
_drpCoreStatistics2["default"].event({
action: "installation autoallow clicked"
});
}
});
if (processes.length > 0) _drpCoreSystemShell.WshShell.AppActivate(_drpCoreSystemProcesses.getMyPID());
}
};
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _drpCoreSystemFso = __webpack_require__(5), _drpCoreSystemShell = __webpack_require__(7), _drpCoreSystemSpecialFolders = __webpack_require__(6), _drpCoreSystemLocalFiles = __webpack_require__(12), _drpCoreSystemCheckInternet = __webpack_require__(332), _drpCorePs = __webpack_require__(300), _drpCorePs2 = _interopRequireDefault(_drpCorePs), _drpCoreOs = __webpack_require__(9), _drpCoreStatistics = __webpack_require__(13), _drpCoreStatistics2 = _interopRequireDefault(_drpCoreStatistics), internetPath = _drpCoreSystemSpecialFolders.AppData + "\\DRPSu\\Internet\\", wifiIntefaceFileName = "WifiInterface.txt", wifiIntefaceFullPath = internetPath + wifiIntefaceFileName, wifiProfileName = "", wifiIntefaceName = "", wifiAdapterGUID = "", saveWifiProfile = function() {
if (_drpCoreOs.OSVersion >= 6) setTimeout(function() {
try {
_drpCoreSystemLocalFiles.ensurePath(internetPath);
_drpCoreSystemShell.WshShell.Run('cmd /c chcp 65001 | netsh wlan show interface > "' + wifiIntefaceFullPath + '"', 0, !1);
} catch (err) {}
setTimeout(function() {
if (_drpCoreSystemFso.fso.FileExists(wifiIntefaceFullPath)) {
var textStream = void 0, text = void 0;
try {
textStream = _drpCoreSystemFso.fso.OpenTextFile(wifiIntefaceFullPath, 1, !0);
text = textStream.ReadAll();
textStream.Close();
} catch (err) {}
try {
wifiProfileName = text.match(/Profile\s+:\s(.*)/i)[1];
wifiIntefaceName = text.match(/Name\s+:\s(.*)/i)[1];
wifiAdapterGUID = text.match(/GUID\s+:\s(.*)/i)[1];
_drpCoreSystemShell.WshShell.Run("cmd /c chcp 65001 | netsh wlan export profile name=" + wifiProfileName + " folder=" + internetPath, 0, !1);
} catch (err) {}
}
}, 3e3);
}, 0);
};
exports.saveWifiProfile = saveWifiProfile;
var recoverWifiProfile = function() {
if (_drpCoreOs.OSVersion >= 6) _drpCoreSystemCheckInternet.checkInternet().then(function(internetOn) {
if (!internetOn && wifiProfileName.length) {
_drpCoreStatistics2["default"].event({
action: "wifi connection lost"
});
setTimeout(function() {
if (_drpCoreSystemFso.fso.FileExists(wifiIntefaceFullPath)) {
if (_drpCoreOs.OSVersion >= 6) {
_drpCorePs2["default"].init();
if (_drpCoreOs.OSVersion >= 6.2) _drpCorePs2["default"].send('$wifi = Get-WmiObject -ComputerName "." -Namespace Root\\StandardCimv2 -class MSFT_NetAdapter | Where-Object {$_.DeviceID -eq "{' + wifiAdapterGUID + '}"}'); else _drpCorePs2["default"].send('$wifi = Get-WmiObject -ComputerName "." -Namespace Root\\CIMV2 -class Win32_NetworkAdapter | Where-Object {$_.DeviceID -eq "{' + wifiAdapterGUID + '}"}');
_drpCorePs2["default"].send("$wifi.Enable()");
}
setTimeout(function() {
_drpCoreSystemShell.WshShell.Run('netsh interface set interface "' + wifiIntefaceName + '" enabled', 0, !1);
_drpCoreSystemShell.WshShell.Run("netsh wlan add profile filename=" + wifiIntefaceFullPath + "\\" + wifiProfileName, 0, !1);
_drpCoreSystemShell.WshShell.Run("netsh wlan connect name=" + wifiProfileName, 0, !1);
}, 3e3);
setTimeout(function() {
_drpCoreSystemCheckInternet.checkInternet().then(function(internetOn) {
if (internetOn) _drpCoreStatistics2["default"].event({
action: "wifi connection recovered"
}); else _drpCoreStatistics2["default"].event({
action: "wifi connection was not recovered"
});
});
}, 1e4);
}
}, 0);
}
});
};
exports.recoverWifiProfile = recoverWifiProfile;
}, function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = !0;
var _http = __webpack_require__(16), checkInternet = function() {
return _http.httpget("https://www.google-analytics.com/collect").then(function() {
return !0;
}, function() {
return _http.httpget("http://www.msftncsi.com/ncsi.txt").then(function() {
return !0;
}, function() {
return !1;
});
});
};
exports.checkInternet = checkInternet;
}, function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = !0;
var _drpCoreSystem = __webpack_require__(27), joinBitsString = function(bitsSoftArr) {
var jobName = arguments.length <= 1 || void 0 === arguments[1] ? "drp_bits_job" : arguments[1], bitsString = "bitsadmin /cancel " + jobName + " & timeout 3 && bitsadmin /create " + jobName + " ", downloadString = "", execString = "";
bitsSoftArr.forEach(function(program) {
var programName = program.link.split("/").slice(-1)[0];
downloadString += " && bitsadmin /addfile " + jobName + ' "' + program.link + '" "%AppData%\\DRPsu\\PROGRAMS\\' + programName + '"';
execString += '& start \\"\\" \\"%AppData%\\DRPsu\\PROGRAMS\\' + programName + '\\" ' + program.Keys.replace(/"/g, '\\"') + " ";
});
bitsString += downloadString;
bitsString += " && bitsadmin /SETMINRETRYDELAY " + jobName + " 88000 && bitsadmin /SETNOTIFYCMDLINE " + jobName + ' "cmd.exe" "/c start /min cmd /c bitsadmin /complete ' + jobName + " && timeout 3 &";
bitsString += execString;
bitsString += ' " && bitsadmin /resume ' + jobName;
return bitsString;
};
exports.joinBitsString = joinBitsString;
var startBitsDownloading = function(bitsString) {
if (bitsString) _drpCoreSystem.WshShell.Run("cmd /c " + bitsString, 0, !1);
};
exports.startBitsDownloading = startBitsDownloading;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _drpCoreLogs = __webpack_require__(4), _drpCoreSystemRegistry = __webpack_require__(17), _drpCoreStatistics = __webpack_require__(13), _drpCoreStatistics2 = _interopRequireDefault(_drpCoreStatistics), addNPSStart = function() {
if (!1) {
var com = 'cmd /c start /min cmd /s /c "ping -n 5 8.8.8.8 | find "TTL" > nul && start mshta.exe "' + window.npsEndpoint + '" "' + _drpCoreStatistics2["default"].drpVersion + '""';
_drpCoreSystemRegistry.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce\\DRPNPS", com);
_drpCoreLogs.log("[nps] Added nps start:", com);
}
};
exports.addNPSStart = addNPSStart;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _objectWithoutProperties(obj, keys) {
var target = {};
for (var i in obj) if (!(keys.indexOf(i) >= 0)) if (Object.prototype.hasOwnProperty.call(obj, i)) target[i] = obj[i]; else ; else ;
return target;
}
function shouldPolyfillTransparentPng() {
return /\bMSIE 6/.test(navigator.userAgent);
}
exports.__esModule = !0;
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
}
return target;
}, _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), polyfillTransparentPng = shouldPolyfillTransparentPng();
exports["default"] = _react2["default"].createClass({
displayName: "Img",
mixins: [ __webpack_require__(336) ],
propTypes: {
style: _react.PropTypes.object,
src: _react.PropTypes.string.isRequired
},
render: function() {
var _props = this.props, style = _props.style, src = _props.src, other = _objectWithoutProperties(_props, [ "style", "src" ]), patchedStyle = Object.assign({}, style), realSrc = void 0;
if (polyfillTransparentPng) {
patchedStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')";
realSrc = "img/blank.gif";
} else realSrc = src;
return _react2["default"].DOM.img(_extends({
src: realSrc,
style: patchedStyle
}, other));
}
});
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
var shallowEqual = __webpack_require__(231), ReactComponentWithPureRenderMixin = {
shouldComponentUpdate: function(nextProps, nextState) {
return !shallowEqual(this.props, nextProps) || !shallowEqual(this.state, nextState);
}
};
module.exports = ReactComponentWithPureRenderMixin;
}, function(module, exports) {}, , , , , , , , , , , , , , , , function(module, exports, __webpack_require__) {
(function(l) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _reduxConnect = __webpack_require__(292), _reduxConnect2 = _interopRequireDefault(_reduxConnect), _actionsMenuActions = __webpack_require__(305), _actionsAppActions = __webpack_require__(301), _Img = __webpack_require__(335), _Img2 = _interopRequireDefault(_Img);
__webpack_require__(354);
var BurgerMenu = _react2["default"].createClass({
displayName: "BurgerMenu",
mixins: [ __webpack_require__(336) ],
propTypes: {
children: _react.PropTypes.any.isRequired,
openSystemMenu: _react.PropTypes.func.isRequired,
toggleBurgerMenu: _react.PropTypes.func.isRequired,
currentLanguage: _react.PropTypes.string.isRequired,
page: _react.PropTypes.string.isRequired
},
render: function() {
var _props = this.props, openSystemMenu = _props.openSystemMenu, toggleBurgerMenu = _props.toggleBurgerMenu, page = _props.page, showLinks = -1 === [ "INSTALLATION" ].indexOf(page);
return _react2["default"].DOM.div(null, _react2["default"].DOM.div({
className: "burger-menu_overlay",
onMouseDown: function() {
return toggleBurgerMenu();
}
}), _react2["default"].DOM.div({
className: "burger-menu"
}, _react2["default"].DOM.div({
className: "burger-menu_inner"
}, _react2["default"].DOM.a({
href: "#",
className: "burger-menu_link " + (showLinks ? "" : "burger-menu_link-disabled"),
onClick: function() {
return openSystemMenu("RECOVERY");
},
style: {
marginTop: "18px"
}
}, _Img2["default"]({
src: "img/burger/create_recovery_point.png",
className: "burger-menu_link-icon",
width: "22",
height: "22"
}), l("menu_create_recovery_point")), _react2["default"].DOM.a({
href: "#",
className: "burger-menu_link " + (showLinks ? "" : "burger-menu_link-disabled"),
onClick: function() {
return openSystemMenu("BACKUP");
}
}, _Img2["default"]({
src: "img/burger/create_drivers_backup.png",
className: "burger-menu_link-icon",
width: "22",
height: "22"
}), l("menu_create_drivers_backup")), _react2["default"].DOM.div({
className: "burger-menu_divider " + (showLinks ? "" : "burger-menu_divider-is-hidden")
}), _react2["default"].DOM.a({
href: "#",
className: "burger-menu_link " + (showLinks ? "" : "burger-menu_link-disabled"),
onMouseDown: function() {
return openSystemMenu("UNINSTALL");
}
}, _Img2["default"]({
src: "img/burger/add_remove_programs.png",
className: "burger-menu_link-icon",
width: "22",
height: "22"
}), l("menu_add_remove_programs")), _react2["default"].DOM.a({
href: "#",
className: "burger-menu_link " + (showLinks ? "" : "burger-menu_first-link"),
onMouseDown: function() {
return openSystemMenu("DEVICE_MANAGER");
}
}, _Img2["default"]({
src: "img/burger/device_manager.png",
className: "burger-menu_link-icon",
width: "22",
height: "22"
}), l("menu_device_manager")), _react2["default"].DOM.a({
href: "#",
className: "burger-menu_link",
onMouseDown: function() {
return openSystemMenu("SYSTEM_PROPERTIES");
}
}, _Img2["default"]({
src: "img/burger/system_properties.png",
className: "burger-menu_link-icon",
width: "22",
height: "22"
}), l("menu_system_properties")), _react2["default"].DOM.a({
href: "#",
className: "burger-menu_link",
onMouseDown: function() {
return openSystemMenu("DISPLAY_PROPERTIES");
}
}, _Img2["default"]({
src: "img/burger/display_properties.png",
className: "burger-menu_link-icon",
width: "22",
height: "22"
}), l("menu_display_properties")), _react2["default"].DOM.a({
href: "#",
className: "burger-menu_link",
onMouseDown: function() {
return openSystemMenu("POWER_OPTIONS");
}
}, _Img2["default"]({
src: "img/burger/power_options.png",
className: "burger-menu_link-icon",
width: "22",
height: "22"
}), l("menu_power_options")), _react2["default"].DOM.a({
href: "#",
className: "burger-menu_link",
onMouseDown: function() {
return openSystemMenu("NETWORK_CONNECTIONS");
}
}, _Img2["default"]({
src: "img/burger/network_connections.png",
className: "burger-menu_link-icon",
width: "22",
height: "22"
}), l("menu_network_connections")), _react2["default"].DOM.a({
href: "#",
className: "burger-menu_link",
onMouseDown: function() {
return openSystemMenu("COMPUTER_MANAGEMENT");
}
}, _Img2["default"]({
src: "img/burger/computer_management.png",
className: "burger-menu_link-icon",
width: "22",
height: "22"
}), l("menu_computer_management")), _react2["default"].DOM.a({
href: "#",
className: "burger-menu_link",
onMouseDown: function() {
return openSystemMenu("CONTROL");
}
}, _Img2["default"]({
src: "img/burger/control_panel.png",
className: "burger-menu_link-icon",
width: "22",
height: "22"
}), l("menu_control_panel")), _react2["default"].DOM.a({
href: "#",
className: "burger-menu_link",
onMouseDown: function() {
return openSystemMenu("DISK_MANAGEMENT");
}
}, _Img2["default"]({
src: "img/burger/disk_management.png",
className: "burger-menu_link-icon",
width: "22",
height: "22"
}), l("menu_disk_management")), _react2["default"].DOM.a({
href: "#",
className: "burger-menu_link",
onMouseDown: function() {
return openSystemMenu("TASK_MANAGER");
}
}, _Img2["default"]({
src: "img/burger/task_manager.png",
className: "burger-menu_link-icon",
width: "22",
height: "22"
}), l("menu_task_manager")), _react2["default"].DOM.a({
href: "#",
className: "burger-menu_link",
onMouseDown: function() {
return openSystemMenu("CMD");
}
}, _Img2["default"]({
src: "img/burger/cmd.png",
className: "burger-menu_link-icon",
width: "22",
height: "22"
}), l("menu_cmd")))));
}
}), mapState = function(state) {
return {
page: state.page
};
}, actions = {
openSystemMenu: _actionsMenuActions.openSystemMenu,
toggleBurgerMenu: _actionsAppActions.toggleBurgerMenu
};
exports["default"] = _reduxConnect2["default"](mapState, actions)(BurgerMenu);
module.exports = exports["default"];
}).call(exports, __webpack_require__(302));
}, function(module, exports) {}, , function(module, exports, __webpack_require__) {
(function(l, nl) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function mapState(state) {
return {
drivers: state.drivers,
programs: state.programs,
languages: state.lang.languages,
currentLanguage: state.lang.currentLanguage,
model: _drpCoreDiagnosticsGetModel.getModel(),
app: state.app
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _drpCoreSystem = __webpack_require__(27), _drpCoreDiagnosticsGetHardware = __webpack_require__(39), _drpCoreDiagnosticsGetModel = __webpack_require__(41), _drpCoreStatistics = __webpack_require__(13), _drpCoreStatistics2 = _interopRequireDefault(_drpCoreStatistics), _drpCoreLogs = __webpack_require__(4), _actionsStartActions = __webpack_require__(304), _reduxConnect = __webpack_require__(292), _reduxConnect2 = _interopRequireDefault(_reduxConnect), _selectorsDriversPrograms = __webpack_require__(105), _actionsLangActions = __webpack_require__(358), _actionsProgramsActions = __webpack_require__(364), _Img = __webpack_require__(335), _Img2 = _interopRequireDefault(_Img), _utilsHandleClasses = __webpack_require__(367), _utilsGetInternetExplorerVersion = __webpack_require__(47), _utilsGetInternetExplorerVersion2 = _interopRequireDefault(_utilsGetInternetExplorerVersion), _utils = __webpack_require__(368);
__webpack_require__(369);
var internetExplorerVersion = _utilsGetInternetExplorerVersion2["default"](), Start = _react2["default"].createClass({
displayName: "Start",
propTypes: {
drivers: _react.PropTypes.array,
programs: _react.PropTypes.array,
startInstallAll: _react.PropTypes.func,
startInstallCustom: _react.PropTypes.func,
changeLang: _react.PropTypes.func,
languages: _react.PropTypes.array,
currentLanguage: _react.PropTypes.string.isRequired,
loadLanguageList: _react.PropTypes.func.isRequired,
loadInstalledPrograms: _react.PropTypes.func.isRequired,
model: _react.PropTypes.object.isRequired,
app: _react.PropTypes.object.isRequired
},
shouldFixHoverIcon: function() {
if (-1 !== internetExplorerVersion) if (10 > internetExplorerVersion) return !0; else return !1; else return !1;
},
render: function() {
var _props = this.props, startInstallAll = _props.startInstallAll, startInstallCustom = _props.startInstallCustom, drivers = _props.drivers, programs = _props.programs, model = _props.model, app = _props.app, driversCount = _selectorsDriversPrograms.countCheckedDrivers(drivers, programs), lastSuccessFinish = new Date(parseInt(_drpCoreSystem.RegRead("HKCU\\SOFTWARE\\drpsu\\lastSuccessFinish"), 10)).valueOf(), errorDevicesCount = _drpCoreDiagnosticsGetHardware.getDevicesCount({
errCode: {
min: 1
}
});
if (lastSuccessFinish + 864e5 > Date.now() && 0 === errorDevicesCount) driversCount = 0;
var _props2 = this.props, changeLang = _props2.changeLang, languages = _props2.languages, currentLanguage = _props2.currentLanguage, language = languages.length ? languages.find(function(_ref) {
var id = _ref.id;
return id === currentLanguage;
}) : null, name = model.vendor + " " + model.name;
return _react2["default"].DOM.div({
id: "Start",
className: "start top-for-header",
style: {
textAlign: "center"
}
}, _react2["default"].DOM.div({
className: "start_wrapper"
}, _react2["default"].DOM.div({
className: "start_wrapper-inner"
}, _react2["default"].DOM.p({
className: "start_msg start_msg-cta-1",
dangerouslySetInnerHTML: {
__html: l("start_scan_result").replace("{{MODEL}}", name).replace("{{DRIVERS}}", driversCount).replace("{{LABEL}}", nl("start_scan_result_label", "start_scan_result_label_n", driversCount))
}
}), driversCount > 0 ? _react2["default"].DOM.button({
className: "start_wrapper-button",
onClick: function() {
return startInstallAll();
}
}, _Img2["default"]({
src: "img/screens/button-logo.png",
className: "start_wrapper-button-icon",
width: "23",
height: "23"
}), l("start_button_install_all")) : null), _react2["default"].DOM.table({
className: "features"
}, _react2["default"].DOM.tbody(null, _react2["default"].DOM.tr(null, _react2["default"].DOM.td({
className: "features_col"
}, _Img2["default"]({
src: "img/screens/features-check.png",
className: "features_icon",
width: "40",
height: "40"
}), _react2["default"].DOM.p({
className: "features_col-text",
dangerouslySetInnerHTML: {
__html: l("start_feature_compatibility")
}
})), _react2["default"].DOM.td({
className: "features_col"
}, _Img2["default"]({
src: "img/screens/features-speed.png",
className: "features_icon",
width: "40",
height: "40"
}), _react2["default"].DOM.p({
className: "features_col-text"
}, l("start_feature_speed"))), _react2["default"].DOM.td({
className: "features_col"
}, _Img2["default"]({
src: "img/screens/features-users.png",
className: "features_icon",
width: "40",
height: "40"
}), _react2["default"].DOM.p({
className: "features_col-text"
}, l("start_feature_users")))))), this.renderExperiment(), _react2["default"].DOM.div({
className: "footer-filler"
})), _react2["default"].DOM.div({
className: "footer"
}, _react2["default"].DOM.div({
className: "footer_meta"
}, _react2["default"].DOM.span({
className: "footer_meta-lang"
}, this.shouldFixHoverIcon() ? _Img2["default"]({
src: "img/screens/globe_normal.png",
className: "footer_meta-lang-icon",
width: "16",
height: "16",
style: {
verticalAlign: "top",
marginRight: "9px",
marginTop: "4px"
}
}) : _react2["default"].DOM.i({
className: "footer_meta-lang-icon",
width: "16",
height: "16"
}), _react2["default"].DOM.span({
className: "footer_meta-lang-select"
}, _react2["default"].DOM.span({
className: "footer_meta-lang-label"
}, language ? language.name : "English", _react2["default"].DOM.i({
className: "footer_meta-lang-label-arrow"
})), _react2["default"].DOM.select({
name: "language",
className: "" + (!app.isBurgerMenuOpened ? "" : "is-hidden"),
onChange: function(e) {
return changeLang(e.target.value, "startpage language clicked");
},
value: currentLanguage,
style: {
fontSize: 14
}
}, this.renderLanguages(languages)))), this.shouldFixHoverIcon() ? _Img2["default"]({
src: "img/screens/trusted.png",
className: "footer_meta-trusted",
width: "128",
height: "24"
}) : _react2["default"].DOM.i({
className: "footer_meta-trusted-icon",
width: "128",
height: "24"
})), _react2["default"].DOM.p({
className: "footer_copy"
}, "© 2016, Artur Kuzyakov drp.su"), _react2["default"].DOM.a({
className: "footer_expert",
href: "#",
onClick: function() {
return startInstallCustom({
eventAction: "startpage expertmode clicked"
});
}
}, this.shouldFixHoverIcon() ? _Img2["default"]({
src: "img/screens/expert_normal.png",
width: "15",
height: "15",
style: {
verticalAlign: "middle",
marginRight: "9px"
}
}) : _react2["default"].DOM.i({
className: "footer_expert-icon",
width: "15",
height: "15"
}), l("start_expert_mode"))));
},
renderLanguages: function(languages) {
return languages.map(function(language) {
return _react2["default"].DOM.option({
key: language.id,
value: language.id
}, language.name);
});
},
componentDidMount: function() {
var _props3 = this.props, loadLanguageList = _props3.loadLanguageList, loadInstalledPrograms = _props3.loadInstalledPrograms;
this.sendStartpageOpenedEvent();
_utils.fitApplicationWindow();
loadLanguageList();
if (!1) loadInstalledPrograms();
if (this.shouldShowPromoBannerYaRu) _utilsHandleClasses.addClass(document.body, "auto-height");
if ("undefined" != typeof _drpCoreSystem.RegRead(Reg + "RunOnce")) _drpCoreStatistics2["default"].event({
action: "webdeploy on old version"
});
var runOnce = _drpCoreSystem.RegRead(Reg + "RunOnce");
if ("InstallAll" === runOnce) {
_drpCoreSystem.RegWrite(Reg + "RunOnce", "null");
this.props.startInstallAll();
} else if ("InstallCustom" === runOnce) {
_drpCoreSystem.RegWrite(Reg + "RunOnce", "null");
this.props.startInstallCustom();
}
if ("undefined" != typeof _drpCoreSystem.RegRead(Reg + "oldVer")) {
var oldVer = _drpCoreSystem.RegRead(Reg + "oldVer");
if ("null" !== oldVer) {
_drpCoreStatistics2["default"].event({
action: "webdeploy on old version: " + oldVer
});
_drpCoreSystem.RegWrite(Reg + "oldVer", "null");
}
}
},
componentWillUnmount: function() {
if (this.shouldShowPromoBannerYaRu) _utilsHandleClasses.removeClass(document.body, "auto-height");
},
sendStartpageOpenedEvent: function() {
var params = {};
try {
var diagnosticsData = window.store.getState().diagnostics.data;
params = {
diagnostics: Object.assign({}, diagnosticsData)
};
} catch (e) {
_drpCoreLogs.log("Error getting diagnostics data");
}
_drpCoreStatistics2["default"].event({
action: "startpage screen opened",
params: params
});
},
shouldShowPromoBannerYaRu: function() {
var currentLanguage = this.props.currentLanguage, targetingCountries = [ "RU", "AZ", "AM", "BY", "KZ", "KG", "MD", "TJ", "TM", "UZ", "UA", "GE", "AB", "OS" ], geo = window.geoip.geoip_country_code.toUpperCase(), result = !1;
if (window.isOnline) result = "ru" === currentLanguage || -1 !== targetingCountries.indexOf(geo);
return result;
},
shouldShowPromoBannerYaUSA: function() {
var currentLanguage = this.props.currentLanguage, targetingCountries = [ "US" ], geo = window.geoip.geoip_country_code.toUpperCase(), result = !1;
if (window.isOnline) result = "en" === currentLanguage && -1 !== targetingCountries.indexOf(geo);
return result;
},
renderExperiment: function() {
if (this.shouldShowPromoBannerYaRu()) return this.renderPromoBannerYaRu(); else if (this.shouldShowPromoBannerYaUSA()) return this.renderPromoBannerUSA(); else return;
},
renderPromoBannerYaRu: function() {
return _react2["default"].DOM.div({
className: "start_promo-banner"
}, _react2["default"].DOM.table({
style: {
borderSpacing: 0
}
}, _react2["default"].DOM.tbody(null, _react2["default"].DOM.tr({
className: "start_promo-banner-caption"
}, _react2["default"].DOM.td({
className: "start_promo-banner-logo-holder"
}, _Img2["default"]({
src: "img/screens/ya-promo-logo.png",
className: "start_promo-banner-logo",
width: "108",
height: "57"
})), _react2["default"].DOM.td({
className: "start_promo-banner-text"
}, "Быстрый браузер с технологией активной защиты Protect предупредит об опасных сайтах.", _react2["default"].DOM.p({
className: "start_promo-banner-footer"
}, "Нажимая на кнопку «Установить автоматически» или «Режим эксперта», вы принимаете ", _react2["default"].DOM.a({
href: "#",
onClick: function() {
return _drpCoreSystem.WshShell.Run("http://drp.su/about.htm#License");
}
}, "пользовательское соглашение"), ". Используя автоматическую установку, вы соглашаетесь на установку Яндекс.Браузера."))))));
},
renderPromoBannerUSA: function() {
return _react2["default"].DOM.div({
className: "start_promo-banner-usa"
}, _react2["default"].DOM.table({
style: {
borderSpacing: 0
}
}, _react2["default"].DOM.tbody(null, _react2["default"].DOM.tr({
className: "start_promo-banner-usa-caption"
}, _react2["default"].DOM.td({
className: "start_promo-banner-usa-logo-holder"
}, _Img2["default"]({
src: "img/screens/yandex_logo.png",
className: "start_promo-banner-usa-logo",
width: "72",
height: "72"
}), _react2["default"].DOM.p({
className: "start_promo-banner-usa-logo-label"
}, "Yandex.Browser")), _react2["default"].DOM.td({
className: "start_promo-banner-usa-text"
}, _react2["default"].DOM.p({
className: "start_promo-banner-usa-title"
}, "FAST&EASY WEB BROWSER", _react2["default"].DOM.br(null), "FOR ALL DEVICES"), _react2["default"].DOM.div({
className: "start_promo-banner-usa-features"
}, _react2["default"].DOM.span({
style: {
marginRight: "31px"
}
}, _Img2["default"]({
src: "img/screens/checkbox.png",
className: "start_promo-banner-icon",
width: "16",
height: "16"
}), "Intuitive"), _react2["default"].DOM.span({
style: {
marginRight: "23px"
}
}, _Img2["default"]({
src: "img/screens/checkbox.png",
className: "start_promo-banner-icon",
width: "16",
height: "16"
}), "Quick"), _react2["default"].DOM.span(null, _Img2["default"]({
src: "img/screens/checkbox.png",
className: "start_promo-banner-icon",
width: "16",
height: "16"
}), "Secure")), _react2["default"].DOM.p({
className: "start_promo-banner-usa-footer"
}, 'By clicking "Install automatically" or "Expert Mode", you agree to the ', _react2["default"].DOM.a({
href: "#",
onClick: function() {
return _drpCoreSystem.WshShell.Run("http://drp.su/about.htm#License");
}
}, "user agreement"), ". Using the automatic installation, you agree to the installation of Yandex Browser."))))));
}
}), actions = {
startInstallAll: _actionsStartActions.startInstallAll,
startInstallCustom: _actionsStartActions.startInstallCustom,
changeLang: _actionsLangActions.changeLang,
loadLanguageList: _actionsLangActions.loadLanguageList,
loadInstalledPrograms: _actionsProgramsActions.loadInstalledPrograms
};
exports["default"] = _reduxConnect2["default"](mapState, actions)(Start);
module.exports = exports["default"];
}).call(exports, __webpack_require__(302), __webpack_require__(357));
}, function(module, exports) {
"use strict";
exports.__esModule = !0;
exports["default"] = function(str, nstr, count) {
var ind = window.language.plural(count) || 0, key = str + "_" + ind, bkey = str + "_" + (ind - 1);
return window.language[key] || window.language[bkey] || key;
};
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function loadLanguageList() {
return {
type: "MENU_LANGUAGES_LIST_LOADED",
payload: _lodashCollectionSortBy2["default"](window.languagesList, "name")
};
}
function changeLang(lang, eventAction) {
var _this = this;
return function(dispatch, getState) {
_drpCoreStatistics2["default"].event({
action: eventAction
})["finally"](function() {
return regeneratorRuntime.async(function(context$3$0) {
for (;;) switch (context$3$0.prev = context$3$0.next) {
case 0:
context$3$0.next = 2;
return regeneratorRuntime.awrap(window.changeLanguage(lang));
case 2:
dispatch({
type: "CURRENT_LANGUAGE_UPDATED",
payload: lang
});
window.SoftPack.applyAll();
case 4:
case "end":
return context$3$0.stop();
}
}, null, _this);
});
};
}
exports.__esModule = !0;
exports.loadLanguageList = loadLanguageList;
exports.changeLang = changeLang;
var _drpCoreStatistics = __webpack_require__(13), _drpCoreStatistics2 = _interopRequireDefault(_drpCoreStatistics), _lodashCollectionSortBy = __webpack_require__(359), _lodashCollectionSortBy2 = _interopRequireDefault(_lodashCollectionSortBy);
}, function(module, exports, __webpack_require__) {
function sortBy(collection, iteratee, thisArg) {
if (null == collection) return [];
if (thisArg && isIterateeCall(collection, iteratee, thisArg)) iteratee = void 0;
var index = -1;
iteratee = baseCallback(iteratee, thisArg, 3);
var result = baseMap(collection, function(value, key, collection) {
return {
criteria: iteratee(value, key, collection),
index: ++index,
value: value
};
});
return baseSortBy(result, compareAscending);
}
var baseCallback = __webpack_require__(52), baseMap = __webpack_require__(360), baseSortBy = __webpack_require__(361), compareAscending = __webpack_require__(362), isIterateeCall = __webpack_require__(99);
module.exports = sortBy;
}, function(module, exports, __webpack_require__) {
function baseMap(collection, iteratee) {
var index = -1, result = isArrayLike(collection) ? Array(collection.length) : [];
baseEach(collection, function(value, key, collection) {
result[++index] = iteratee(value, key, collection);
});
return result;
}
var baseEach = __webpack_require__(320), isArrayLike = __webpack_require__(67);
module.exports = baseMap;
}, function(module, exports) {
function baseSortBy(array, comparer) {
var length = array.length;
array.sort(comparer);
for (;length--; ) array[length] = array[length].value;
return array;
}
module.exports = baseSortBy;
}, function(module, exports, __webpack_require__) {
function compareAscending(object, other) {
return baseCompareAscending(object.criteria, other.criteria) || object.index - other.index;
}
var baseCompareAscending = __webpack_require__(363);
module.exports = compareAscending;
}, function(module, exports) {
function baseCompareAscending(value, other) {
if (value !== other) {
var valIsNull = null === value, valIsUndef = void 0 === value, valIsReflexive = value === value, othIsNull = null === other, othIsUndef = void 0 === other, othIsReflexive = other === other;
if (value > other && !othIsNull || !valIsReflexive || valIsNull && !othIsUndef && othIsReflexive || valIsUndef && othIsReflexive) return 1;
if (other > value && !valIsNull || !othIsReflexive || othIsNull && !valIsUndef && valIsReflexive || othIsUndef && valIsReflexive) return -1;
}
return 0;
}
module.exports = baseCompareAscending;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function installPrograms(programs) {
var options = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1];
_drpCoreSystem.deleteFile(_drpCoreSystem.AppData + "\\DRPSu\\diagnostics\\newsoft.json");
if (options.eventAction) _drpCoreStatistics2["default"].event({
action: options.eventAction
}, [], !0);
return function(dispatch, getState) {
dispatch(new _utilsInstallation2["default"]().run({
programs: programs
}));
};
}
function toggleProgram(id, checked, zone) {
_drpCoreStatistics2["default"].event({
action: "protect checkbox used"
});
return {
type: "PROGRAMS_TOGGLED",
payload: {
id: id,
checked: checked,
zone: zone
}
};
}
function toggleInstalledProgram(id, isChecked) {
return {
type: "INSTALLED_PROGRAM_TOGGLED",
payload: {
id: id,
isChecked: isChecked
}
};
}
function toggleUninstallRatePopover(isOpened) {}
function expandInstalledProgram(id, isExpanded) {
_drpCoreStatistics2["default"].event({
action: "protect info clicked"
});
return {
type: "INSTALLED_PROGRAM_EXPANDED",
payload: {
id: id,
isExpanded: isExpanded
}
};
}
function expandAllInstalledPrograms(isExpanded) {
_drpCoreStatistics2["default"].event({
action: "protect show all clicked"
});
return {
type: "ALL_INSTALLED_PROGRAMS_EXPANDED"
};
}
exports.__esModule = !0;
var _this = this;
exports.installPrograms = installPrograms;
exports.toggleProgram = toggleProgram;
exports.toggleInstalledProgram = toggleInstalledProgram;
exports.toggleUninstallRatePopover = toggleUninstallRatePopover;
exports.expandInstalledProgram = expandInstalledProgram;
exports.expandAllInstalledPrograms = expandAllInstalledPrograms;
var _drpCoreSystem = __webpack_require__(27), _drpCoreStatistics = __webpack_require__(13), _drpCoreStatistics2 = _interopRequireDefault(_drpCoreStatistics), _drpCoreLogs = __webpack_require__(4), _utilsInstallation = __webpack_require__(314), _utilsInstallation2 = _interopRequireDefault(_utilsInstallation), _utilsUninstaller = __webpack_require__(365), _utilsChromeCleaner = __webpack_require__(366), _utilsChromeCleaner2 = _interopRequireDefault(_utilsChromeCleaner), cleanBrowser = function() {
_drpCoreStatistics2["default"].event({
action: "soft chrome clean clicked"
});
return function(dispatch, getState) {
return regeneratorRuntime.async(function(context$2$0) {
for (;;) switch (context$2$0.prev = context$2$0.next) {
case 0:
dispatch({
type: "CHROME_CLEANING_STARTED"
});
context$2$0.next = 3;
return regeneratorRuntime.awrap(_utilsChromeCleaner2["default"].Run().lastly(function() {
dispatch({
type: "CHROME_CLEANING_FINISHED"
});
}));
case 3:
case "end":
return context$2$0.stop();
}
}, null, _this);
};
};
exports.cleanBrowser = cleanBrowser;
var installedPrograms = [], loadInstalledPrograms = function() {
return function(dispatch, getState) {
dispatch({
type: "INSTALLED_PROGRAMS_SCAN_FINISHED",
payload: installedPrograms
});
};
};
exports.loadInstalledPrograms = loadInstalledPrograms;
var removeInstalledProgram = function(_ref2) {
var id = _ref2.id, name = _ref2.name, uninstallPercents = _ref2.uninstallPercents, uninstallString = _ref2.uninstallString, regPath = _ref2.regPath, params = {
"manual uninstall": uninstallPercents
};
_drpCoreStatistics2["default"].event({
action: "protect uninstall " + name + " clicked",
params: params
});
return function(dispatch, getState) {
dispatch({
type: "INSTALLED_PROGRAM_REMOVING_STARTED",
payload: {
id: id
}
});
_utilsUninstaller.uninstallProgram({
uninstallString: uninstallString,
regPath: regPath
}).then(function() {
_drpCoreLogs.log("[Protect] success uninstalling: " + uninstallString);
dispatch({
type: "INSTALLED_PROGRAM_REMOVING_SUCCESS",
payload: {
id: id
}
});
})["catch"](function(err) {
_drpCoreLogs.log("[Protect] failed uninstalling: " + uninstallString, err);
dispatch({
type: "INSTALLED_PROGRAM_REMOVING_FAILED",
payload: {
id: id
}
});
});
};
};
exports.removeInstalledProgram = removeInstalledProgram;
var removeAllHarmfulPrograms = function(harmfulPrograms) {
_drpCoreStatistics2["default"].event({
action: "protect uninstall all clicked"
});
return function(dispatch, getState) {
var _iterator, _isArray, _i, _ref, program, id, uninstallString, regPath;
return regeneratorRuntime.async(function(context$2$0) {
for (;;) switch (context$2$0.prev = context$2$0.next) {
case 0:
_drpCoreLogs.log("[Protect] removing all harmful started");
dispatch({
type: "REMOVING_ALL_HARMFUL_PROGRAMS_STARTED"
});
_iterator = harmfulPrograms, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();
case 3:
if (!_isArray) {
context$2$0.next = 9;
break;
}
if (!(_i >= _iterator.length)) {
context$2$0.next = 6;
break;
}
return context$2$0.abrupt("break", 29);
case 6:
_ref = _iterator[_i++];
context$2$0.next = 13;
break;
case 9:
_i = _iterator.next();
if (!_i.done) {
context$2$0.next = 12;
break;
}
return context$2$0.abrupt("break", 29);
case 12:
_ref = _i.value;
case 13:
program = _ref;
id = program.id;
uninstallString = program.uninstallString;
regPath = program.regPath;
context$2$0.prev = 17;
context$2$0.next = 20;
return regeneratorRuntime.awrap(_utilsUninstaller.uninstallProgram({
uninstallString: uninstallString,
regPath: regPath
}));
case 20:
_drpCoreLogs.log("[Protect] success uninstalling: " + uninstallString);
dispatch({
type: "REMOVING_HARMFUL_PROGRAM_SUCCESS",
payload: {
id: id
}
});
context$2$0.next = 27;
break;
case 24:
context$2$0.prev = 24;
context$2$0.t0 = context$2$0["catch"](17);
_drpCoreLogs.log("[Protect] failed uninstalling: " + uninstallString, context$2$0.t0);
case 27:
context$2$0.next = 3;
break;
case 29:
if (!0) {
context$2$0.next = 32;
break;
}
context$2$0.next = 32;
return regeneratorRuntime.awrap(dispatch(cleanBrowser()));
case 32:
_drpCoreLogs.log("[Protect] removing all harmful finished");
dispatch({
type: "REMOVING_ALL_HARMFUL_PROGRAMS_FINISHED"
});
case 34:
case "end":
return context$2$0.stop();
}
}, null, _this, [ [ 17, 24 ] ]);
};
};
exports.removeAllHarmfulPrograms = removeAllHarmfulPrograms;
var checkChromeIsInstalled = function() {
return function(dispatch, getState) {
var chrome = getState().installedPrograms.apiData.find(function(program) {
return "Google Chrome" === program.name;
});
if (chrome) dispatch({
type: "INSTALLED_CHROME_IS_DETECTED"
}); else dispatch({
type: "INSTALLED_CHROME_IS_NOT_DETECTED"
});
};
};
exports.checkChromeIsInstalled = checkChromeIsInstalled;
var resetProtectScreen = function() {
return function(dispatch, getState) {
dispatch({
type: "PROTECT_SCREEN_RESET"
});
};
};
exports.resetProtectScreen = resetProtectScreen;
}, function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = !0;
var _drpCoreSystem = __webpack_require__(27), _drpCoreSystemWmiRegistry = __webpack_require__(30), _drpCoreWmi = __webpack_require__(10), _drpCoreLogs = __webpack_require__(4), uninstallProgram = function(_ref) {
var uninstallString = _ref.uninstallString, regPath = _ref.regPath;
return new Promise(function(resolve, reject) {
if (-1 !== uninstallString.search(/uninst\.exe/i)) uninstallString += " -s "; else if (-1 !== uninstallString.search(/unins\d\d\d\.exe/i)) uninstallString += " /VERYSILENT /SUPPRESSMSGBOXES /NORESTART "; else if (-1 !== uninstallString.search(/MsiExec\.exe/i)) uninstallString = uninstallString.replace(/\/I/, " /x ").concat(" /qn /norestart ");
_drpCoreLogs.log("[Protect] running: " + uninstallString);
var command = uninstallString, wshExec = _drpCoreSystem.WshShell.Exec(command), parentPid = wshExec.ProcessId, checkTimeoutTimer = void 0, uninstallProcesses = void 0, checkIntevalTimer = setInterval(function() {
uninstallProcesses = _drpCoreWmi.getWMIObjects([ "ParentProcessId" ], "Win32_Process", 'ProcessId = "' + parentPid + '" OR ParentProcessId = "' + parentPid + '"');
if (!uninstallProcesses.length) {
clearInterval(checkIntevalTimer);
clearTimeout(checkTimeoutTimer);
!_drpCoreSystemWmiRegistry.wmiRegRead(regPath + "DisplayName") ? resolve() : reject();
}
}, 3e3);
checkTimeoutTimer = setTimeout(function() {
clearInterval(checkIntevalTimer);
clearTimeout(checkTimeoutTimer);
reject(new Error("[Protect] uninstall timeout"));
}, 9e5);
});
};
exports.uninstallProgram = uninstallProgram;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
exports.__esModule = !0;
var _drpCoreSystem = __webpack_require__(27), _drpCoreWmi = __webpack_require__(10), _drpCoreLogs = __webpack_require__(4), _external = __webpack_require__(307), _external2 = _interopRequireDefault(_external), ChromeCleaner = function(_External) {
function ChromeCleaner() {
_classCallCheck(this, ChromeCleaner);
var options = {
url: "http://download.drp.su/updates/chrome/chrome_cleaner.zip",
downloadPath: _drpCoreSystem.AppData + "\\DRPSu\\chrome-cleaner",
dirPath: _drpCoreSystem.WshShell.CurrentDirectory.split("\\").slice(0, -1).join("\\") + "\\bin\\tools\\chrome-cleaner",
exePath: "\\chrome_cleaner.exe"
};
_External.call(this, options);
}
_inherits(ChromeCleaner, _External);
ChromeCleaner.prototype.Run = function() {
var _this = this;
return _External.prototype.Download.call(this).then(function() {
_drpCoreLogs.log("[chrome cleaner] executing", _this.exePath);
_this.handler = _drpCoreSystem.WshShell.Exec(_this.exePath);
return new Promise(function(resolve, reject) {
var parentPid = _this.handler.ProcessId, cleanProcesses = void 0, checkIntevalTimer = setInterval(function() {
cleanProcesses = _drpCoreWmi.getWMIObjects([ "ParentProcessId" ], "Win32_Process", 'ProcessId = "' + parentPid + '" OR ParentProcessId = "' + parentPid + '"');
if (!cleanProcesses.length) {
clearInterval(checkIntevalTimer);
resolve();
}
}, 3e3);
});
});
};
return ChromeCleaner;
}(_external2["default"]);
exports["default"] = new ChromeCleaner();
module.exports = exports["default"];
}, function(module, exports) {
"use strict";
exports.__esModule = !0;
var hasClass = function(element, className) {
return null !== element.className.match(new RegExp("(\\s|^)" + className + "(\\s|$)"));
};
exports.hasClass = hasClass;
var addClass = function(element, className) {
if (!hasClass(element, className)) element.className = element.className.trim().replace(/\s\s+/g, " ") + (" " + className);
};
exports.addClass = addClass;
var removeClass = function(element, className) {
if (hasClass(element, className)) {
var reg = new RegExp("(\\s|^)" + className + "(\\s|$)");
element.className = element.className.replace(reg, " ").trim().replace(/\s\s+/g, " ");
}
};
exports.removeClass = removeClass;
}, function(module, exports) {
"use strict";
exports.__esModule = !0;
var fitApplicationWindow = function() {
try {
var windowWidth = window.screen.availWidth, windowHeight = window.screen.availHeight;
window.resizeTo(windowWidth, windowHeight);
window.moveTo(0, 0);
} catch (e) {}
};
exports.fitApplicationWindow = fitApplicationWindow;
}, function(module, exports) {}, , , , , , , , , , function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _Menu = __webpack_require__(380), _Menu2 = _interopRequireDefault(_Menu);
__webpack_require__(383);
var Layout = _react2["default"].createClass({
displayName: "Layout",
mixins: [ __webpack_require__(336) ],
propTypes: {
currentLanguage: _react.PropTypes.string.isRequired,
children: _react.PropTypes.any
},
render: function() {
return _react2["default"].DOM.div({
className: "main"
}, _react2["default"].DOM.div({
style: {
overflow: "auto",
height: "100%"
}
}, _react2["default"].DOM.table({
style: {
width: "100%",
height: "100%"
}
}, _react2["default"].DOM.tbody({
style: {
height: "100%"
}
}, _react2["default"].DOM.tr({
style: {
height: "100%"
}
}, _react2["default"].DOM.td({
className: "menu"
}, this.renderMenu()), this.props.children)))));
},
renderMenu: function() {
var currentLanguage = this.props.currentLanguage;
return _Menu2["default"]({
currentLanguage: currentLanguage
});
}
});
exports["default"] = Layout;
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
(function(l) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function mapState(state) {
return {
languages: state.lang.languages,
page: state.page,
app: state.app
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _reduxConnect = __webpack_require__(292), _reduxConnect2 = _interopRequireDefault(_reduxConnect), _actionsLangActions = __webpack_require__(358), _actionsMenuActions = __webpack_require__(305), _Img = __webpack_require__(335), _Img2 = _interopRequireDefault(_Img);
__webpack_require__(381);
var Menu = _react2["default"].createClass({
displayName: "Menu",
propTypes: {
currentLanguage: _react.PropTypes.string.isRequired,
changeLang: _react.PropTypes.func,
languages: _react.PropTypes.array,
loadLanguageList: _react.PropTypes.func,
navigate: _react.PropTypes.func,
openSystemMenu: _react.PropTypes.func,
page: _react.PropTypes.string.isRequired,
app: _react.PropTypes.object.isRequired
},
render: function() {
return _react2["default"].DOM.div({
className: "menu_wrapper"
}, this.renderMainMenu(), this.renderBottomMenu());
},
renderMainMenu: function() {
var _props = this.props, navigate = _props.navigate, openSystemMenu = _props.openSystemMenu, page = _props.page;
return _react2["default"].DOM.div({
onMouseDown: function(e) {
e.preventDefault();
},
className: "menu-navigation_holder"
}, _react2["default"].DOM.div({
className: "menu-navigation"
}, _react2["default"].DOM.a({
href: "#",
onMouseDown: function() {
return navigate("DRIVERS");
},
className: "menu_item menu_item_first " + ("DRIVERS" === page ? "active" : ""),
title: l("menu_install_drivers")
}, _react2["default"].DOM.table({
className: "menu_item-table"
}, _react2["default"].DOM.tr(null, _react2["default"].DOM.td({
width: "60",
className: "menu_item-img-holder"
}, _Img2["default"]({
src: "img/screens/menu-drivers.png",
className: "menu_item-img",
id: "m-pc",
width: 22,
height: 22
})), _react2["default"].DOM.td({
className: "menu_item-text"
}, _react2["default"].DOM.span(null, l("menu_drivers")))))), _react2["default"].DOM.a({
href: "#",
onMouseDown: function() {
return navigate("PROGRAMS");
},
className: "menu_item " + ("PROGRAMS" === page ? "active" : ""),
title: l("menu_install_programs")
}, _react2["default"].DOM.table({
className: "menu_item-table"
}, _react2["default"].DOM.tr(null, _react2["default"].DOM.td({
width: "60",
className: "menu_item-img-holder"
}, _Img2["default"]({
src: "img/screens/menu-software.png",
className: "menu_item-img",
id: "m-apps",
width: 22,
height: 22
})), _react2["default"].DOM.td({
className: "menu_item-text"
}, _react2["default"].DOM.span(null, l("menu_programs")))))), _react2["default"].DOM.a({
href: "#",
onMouseDown: function() {
return navigate("PROTECT");
},
className: "menu_item " + ("PROTECT" === page ? "active" : ""),
title: l("menu_protect_title")
}, _react2["default"].DOM.table({
className: "menu_item-table"
}, _react2["default"].DOM.tr(null, _react2["default"].DOM.td({
width: "60",
className: "menu_item-img-holder"
}, _Img2["default"]({
src: "img/screens/menu-protect.png",
className: "menu_item-img",
id: "m-protect",
width: 22,
height: 22
})), _react2["default"].DOM.td({
className: "menu_item-text"
}, _react2["default"].DOM.span(null, l("menu_protect")))))), _react2["default"].DOM.a({
href: "#",
onMouseDown: function() {
return navigate("DIAGNOSTICS");
},
className: "menu_item " + ("DIAGNOSTICS" === page ? "active" : ""),
title: l("menu_computer_diagnostics")
}, _react2["default"].DOM.table({
className: "menu_item-table"
}, _react2["default"].DOM.tr(null, _react2["default"].DOM.td({
width: "60",
className: "menu_item-img-holder"
}, _Img2["default"]({
src: "img/screens/menu-diagnostics.png",
className: "menu_item-img",
id: "m-toolkit",
width: 22,
height: 22
})), _react2["default"].DOM.td({
className: "menu_item-text"
}, l("menu_diagnostics")))))), _react2["default"].DOM.div({
className: "menu-system",
style: {
display: "none"
}
}, _react2["default"].DOM.a({
href: "#",
className: "menu-system_item",
title: l("menu_control_panel"),
onClick: function() {
return openSystemMenu("CONTROL");
}
}, _react2["default"].DOM.table({
className: "menu-system_item-table"
}, _react2["default"].DOM.tr(null, _react2["default"].DOM.td({
width: "60",
style: {
textAlign: "center"
}
}, _Img2["default"]({
src: "img/screens/control-panel-grey.png",
className: "menu-system_item-img",
width: 19,
height: 19
})), _react2["default"].DOM.td({
className: "menu-system_item-text"
}, l("menu_control_panel"))))), _react2["default"].DOM.a({
href: "#",
className: "menu-system_item",
title: l("menu_create_recovery_point"),
onClick: function() {
return openSystemMenu("RECOVERY");
}
}, _react2["default"].DOM.table({
className: "menu-system_item-table"
}, _react2["default"].DOM.tr(null, _react2["default"].DOM.td({
width: "60",
style: {
textAlign: "center"
}
}, _Img2["default"]({
src: "img/screens/backup-grey.png",
className: "menu-system_item-img",
width: 19,
height: 18
})), _react2["default"].DOM.td({
className: "menu-system_item-text"
}, l("menu_create_recovery_point"))))), _react2["default"].DOM.a({
href: "#",
className: "menu-system_item",
title: l("menu_create_drivers_backup"),
onClick: function() {
return openSystemMenu("BACKUP");
}
}, _react2["default"].DOM.table({
className: "menu-system_item-table"
}, _react2["default"].DOM.tr(null, _react2["default"].DOM.td({
width: "60",
style: {
textAlign: "center"
}
}, _Img2["default"]({
src: "img/screens/backup-grey.png",
className: "menu-system_item-img",
width: 19,
height: 18
})), _react2["default"].DOM.td({
className: "menu-system_item-text"
}, l("menu_create_drivers_backup"))))), _react2["default"].DOM.a({
href: "#",
className: "menu-system_item",
title: l("menu_add_remove_programs"),
onClick: function() {
return openSystemMenu("UNINSTALL");
}
}, _react2["default"].DOM.table({
className: "menu-system_item-table"
}, _react2["default"].DOM.tr(null, _react2["default"].DOM.td({
width: "60",
style: {
textAlign: "center"
}
}, _Img2["default"]({
src: "img/screens/install-programs-grey.png",
className: "menu-system_item-img",
width: 16,
height: 19
})), _react2["default"].DOM.td({
className: "menu-system_item-text"
}, l("menu_add_remove_programs")))))));
},
renderBottomMenu: function() {
var _props2 = this.props, changeLang = _props2.changeLang, currentLanguage = _props2.currentLanguage, languages = _props2.languages, openSystemMenu = _props2.openSystemMenu, app = _props2.app, language = languages.length ? languages.find(function(_ref) {
var id = _ref.id;
return id === currentLanguage;
}) : null;
return _react2["default"].DOM.div({
className: "menu_copyright"
}, !1 ? null : null, _react2["default"].DOM.br(null), _react2["default"].DOM.a({
href: "#",
className: "menu_copyright-btn",
onClick: function() {
return openSystemMenu("FEEDBACK");
}
}, l("menu_bugreport")), _react2["default"].DOM.div({
className: "menu_language"
}, _Img2["default"]({
src: "img/screens/menu-lang-icon.png",
className: "menu_language-icon",
width: "18",
height: "18"
}), _Img2["default"]({
src: "img/screens/menu-lang-arrow.png",
className: "menu_language-label-arrow",
width: "10",
height: "7"
}), _react2["default"].DOM.span({
className: "menu_language-select"
}, _react2["default"].DOM.span({
className: "menu_language-label"
}, language ? language.name : "language"), _react2["default"].DOM.select({
name: "language",
className: "" + (!app.isBurgerMenuOpened ? "" : "is-hidden"),
onChange: function(e) {
return changeLang(e.target.value, "language clicked");
},
value: currentLanguage,
style: {
fontSize: 14
}
}, this.renderLanguages(languages)))), _react2["default"].DOM.div({
className: "menu_copyright-item"
}, "Artur Kuzyakov © 2016"));
},
renderLanguages: function(languages) {
return languages.map(function(language) {
return _react2["default"].DOM.option({
key: language.id,
value: language.id
}, language.name);
});
},
componentDidMount: function() {
var loadLanguageList = this.props.loadLanguageList;
loadLanguageList();
}
}), actions = {
changeLang: _actionsLangActions.changeLang,
loadLanguageList: _actionsLangActions.loadLanguageList,
navigate: _actionsMenuActions.navigate,
openSystemMenu: _actionsMenuActions.openSystemMenu
};
exports["default"] = _reduxConnect2["default"](mapState, actions)(Menu);
module.exports = exports["default"];
}).call(exports, __webpack_require__(302));
}, function(module, exports) {}, , function(module, exports) {}, , function(module, exports, __webpack_require__) {
(function(l) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function mapState(state) {
return {
page: state.page,
drivers: state.drivers,
programs: state.programs
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _reduxConnect = __webpack_require__(292), _reduxConnect2 = _interopRequireDefault(_reduxConnect), _actionsProgramsActions = __webpack_require__(364), _actionsDriversActions = __webpack_require__(313), _HeaderStats = __webpack_require__(386), _HeaderStats2 = _interopRequireDefault(_HeaderStats), _DriverRow = __webpack_require__(392), _DriverRow2 = _interopRequireDefault(_DriverRow), _ProgramRow = __webpack_require__(396), _ProgramRow2 = _interopRequireDefault(_ProgramRow), _selectorsDriversPrograms = __webpack_require__(105);
__webpack_require__(397);
__webpack_require__(399);
var DriversPrograms = _react2["default"].createClass({
displayName: "DriversPrograms",
mixins: [ __webpack_require__(336) ],
propTypes: {
page: _react.PropTypes.string.isRequired,
drivers: _react.PropTypes.array,
expandOtherDrivers: _react.PropTypes.func,
installSingleDriver: _react.PropTypes.func,
installDriversAndPrograms: _react.PropTypes.func,
openDeviceManagerFor: _react.PropTypes.func,
openDriverInfo: _react.PropTypes.func,
toggleDriver: _react.PropTypes.func,
toggleAllDrivers: _react.PropTypes.func.isRequired,
programs: _react.PropTypes.array.isRequired,
toggleProgram: _react.PropTypes.func,
currentLanguage: _react.PropTypes.string.isRequired
},
render: function() {
var _this = this, _props = this.props, page = _props.page, programs = _props.programs, currentLanguage = _props.currentLanguage, visiblePrograms = _selectorsDriversPrograms.filterDriverUtilities(programs), hideComponent = "DRIVERS" !== page;
return _react2["default"].DOM.td({
className: "app-container " + (hideComponent ? "display-none" : "")
}, _react2["default"].DOM.div({
className: "app-container_inner"
}, _react2["default"].DOM.div({
onMouseMove: function(e) {
return _this.handleMouseOverDriver(e, null);
},
onMouseLeave: function(e) {
return _this.handleMouseOverDriver(e, null);
}
}, _react2["default"].DOM.h1({
className: "screen-title"
}, l("drivers_section_title")), _HeaderStats2["default"]({
currentLanguage: currentLanguage
}), _react2["default"].DOM.div({
style: {
width: "100%"
}
}, this.renderDriversTable(), this.renderProgramsTable(visiblePrograms, "DRIVER_UTILITIES"), !1 ? null : _react2["default"].DOM.button({
className: "button",
onClick: this.handleInstallClick,
style: {
marginTop: 50
}
}, l("drivers_install_drivers"))))));
},
renderDriversTable: function() {
var toggleAllDrivers = this.props.toggleAllDrivers;
return _react2["default"].DOM.table({
id: "list",
className: "list",
border: "1"
}, _react2["default"].DOM.thead(null, _react2["default"].DOM.tr({
className: "list_row"
}, _react2["default"].DOM.td({
colSpan: "1",
className: "list_cell list_head"
}, _react2["default"].DOM.input({
type: "checkbox",
onClick: function(e) {
toggleAllDrivers(e.target.checked);
}
})), _react2["default"].DOM.td({
colSpan: "5",
className: "list_cell list_head"
}, l("drivers_column_drivers")))), _react2["default"].DOM.tbody(null, this.renderDrivers()));
},
renderProgramsTable: function(visiblePrograms, zone) {
var caption = void 0;
if ("DRIVER_UTILITIES" === zone) caption = l("drivers_utilities"); else if ("PROGRAMS_PAGE" === zone) caption = l("programs_column_program"); else throw new Error("ProgramRow must have proper zone, not " + zone);
return _react2["default"].DOM.table({
id: "programs-list",
className: "programs-list",
border: "1"
}, _react2["default"].DOM.thead(null, _react2["default"].DOM.tr({
className: "programs-list_row"
}, _react2["default"].DOM.td({
colSpan: "2",
className: "programs-list_head"
}, caption), _react2["default"].DOM.td({
className: "programs-list_head"
}, l("programs_column_type")))), _react2["default"].DOM.tbody(null, this.renderPrograms(visiblePrograms, zone)));
},
renderDrivers: function() {
var _this2 = this, list = [], _props2 = this.props, drivers = _props2.drivers, expandOtherDrivers = _props2.expandOtherDrivers, openDeviceManagerFor = _props2.openDeviceManagerFor, installSingleDriver = _props2.installSingleDriver, toggleDriver = _props2.toggleDriver, currentLanguage = _props2.currentLanguage;
drivers.forEach(function(item, index) {
var deviceId = item.deviceId, currentDriver = item.currentDriver, recommendedDriver = item.recommendedDriver, otherDrivers = item.otherDrivers, isExpanded = item.isExpanded, isInfoOpened = item.isInfoOpened, isChecked = item.isChecked, recommendedProps = {
key: deviceId + "_rec_" + index,
recommended: !0,
driver: recommendedDriver,
deviceId: deviceId,
currentDriver: currentDriver,
isExpanded: isExpanded,
isChecked: isChecked,
isExpandable: otherDrivers.length > 0,
isInfoOpened: -1 === isInfoOpened,
index: index,
handleMouseOverDriver: _this2.handleMouseOverDriver,
installSingleDriver: installSingleDriver,
expandOtherDrivers: expandOtherDrivers,
openDeviceManagerFor: openDeviceManagerFor,
toggleDriver: toggleDriver,
currentLanguage: currentLanguage
};
list.push(_DriverRow2["default"](recommendedProps));
if (isExpanded) otherDrivers.forEach(function(otherDriver, index2) {
var otherProps = {
key: deviceId + "_other_" + index2,
recommended: !1,
driver: otherDriver,
deviceId: deviceId,
currentDriver: currentDriver,
index: index2,
isInfoOpened: isInfoOpened === index2,
handleMouseOverDriver: _this2.handleMouseOverDriver,
installSingleDriver: installSingleDriver,
openDeviceManagerFor: openDeviceManagerFor,
currentLanguage: currentLanguage
};
list.push(_DriverRow2["default"](otherProps));
});
});
return list;
},
handleMouseOverDriver: function(e, id, index) {
var _this3 = this;
e.stopPropagation();
if (this.hoveringItemId !== id || this.hoveringItemIndex !== index) {
this.hoveringItemId = id;
this.hoveringItemIndex = index;
clearInterval(this.hoveringTimer);
var closing = null === id;
this.hoveringTimer = setTimeout(function() {
var openDriverInfo = _this3.props.openDriverInfo;
openDriverInfo(id, index);
}, closing ? 300 : 50);
}
},
getDrivers: function() {
var drivers = this.props.drivers;
drivers = _selectorsDriversPrograms.filterCheckedDrivers(drivers);
return drivers;
},
handleInstallClick: function() {
var installDriversAndPrograms = this.props.installDriversAndPrograms;
return installDriversAndPrograms({
eventAction: "drivers install clicked",
mode: "DRIVERS"
});
},
renderPrograms: function(visiblePrograms, zone) {
var list = [], _props3 = this.props, toggleProgram = _props3.toggleProgram, currentLanguage = _props3.currentLanguage;
visiblePrograms.forEach(function(program, index) {
list.push(_ProgramRow2["default"]({
key: "program" + index,
program: program,
index: index,
toggleProgram: toggleProgram,
zone: zone,
currentLanguage: currentLanguage
}));
});
return list;
}
}), actions = {
expandOtherDrivers: _actionsDriversActions.expandOtherDrivers,
installDriversAndPrograms: _actionsDriversActions.installDriversAndPrograms,
installSingleDriver: _actionsDriversActions.installSingleDriver,
openDeviceManagerFor: _actionsDriversActions.openDeviceManagerFor,
openDriverInfo: _actionsDriversActions.openDriverInfo,
toggleDriver: _actionsDriversActions.toggleDriver,
toggleAllDrivers: _actionsDriversActions.toggleAllDrivers,
toggleProgram: _actionsProgramsActions.toggleProgram
};
exports["default"] = _reduxConnect2["default"](mapState, actions)(DriversPrograms);
module.exports = exports["default"];
}).call(exports, __webpack_require__(302));
}, function(module, exports, __webpack_require__) {
(function(l) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function mapState(state) {
return {
page: state.page,
drivers: state.drivers,
programs: state.programs
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _reduxConnect = __webpack_require__(292), _reduxConnect2 = _interopRequireDefault(_reduxConnect), _actionsDriversActions = __webpack_require__(313), _actionsProgramsActions = __webpack_require__(364), _actionsAgentActions = __webpack_require__(387), _Img = __webpack_require__(335), _Img2 = _interopRequireDefault(_Img), _selectorsDriversPrograms = __webpack_require__(105);
__webpack_require__(390);
var HeaderStats = _react2["default"].createClass({
displayName: "HeaderStats",
mixins: [ __webpack_require__(336) ],
propTypes: {
drivers: _react.PropTypes.array.isRequired,
installDriversAndPrograms: _react.PropTypes.func,
installAgent: _react.PropTypes.func,
installPrograms: _react.PropTypes.func,
installagent: _react.PropTypes.func,
page: _react.PropTypes.string.isRequired,
programs: _react.PropTypes.array.isRequired
},
render: function() {
var page = this.props.page, programs = this.getPrograms(), drivers = this.getDrivers();
return _react2["default"].DOM.div(null, _react2["default"].DOM.div({
className: "header-stats"
}, _react2["default"].DOM.div({
className: "header-stats_body"
}, "DRIVERS" === page ? _react2["default"].DOM.span(null, l("drivers_driver_counter"), ": ", _react2["default"].DOM.b(null, "(", _selectorsDriversPrograms.countCheckedDrivers(drivers, programs), ")")) : null, _react2["default"].DOM.br(null), l("drivers_program_counter"), ": ", _react2["default"].DOM.b(null, "(", _selectorsDriversPrograms.countCheckedPrograms(drivers, programs), ")")), _react2["default"].DOM.div({
className: "header-stats_footer"
}, "DRIVERS" === page ? _react2["default"].DOM.button({
className: "button",
onClick: this.handleInstallClick
}, l("drivers_button_install_all")) : _react2["default"].DOM.button({
className: "cta-green-btn cta-btn-68",
onClick: this.handleInstallClick
}, _Img2["default"]({
src: "img/programs/btn-icon.png",
className: "cta-green-btn-clean-icon",
width: "46",
height: "38"
}), _react2["default"].DOM.span({
className: "cta-green-btn-text"
}, l("programs_button_install"))))));
},
getPrograms: function() {
var programs = this.props.programs;
return _selectorsDriversPrograms.filterCheckedProgramsPage(programs);
},
getAgent: function() {
var programs = this.props.programs, agent = _selectorsDriversPrograms.getNotifier(programs);
return agent;
},
getDrivers: function() {
var drivers = this.props.drivers;
drivers = _selectorsDriversPrograms.filterCheckedDrivers(drivers);
return drivers;
},
handleInstallClick: function() {
var _props = this.props, page = _props.page, installDriversAndPrograms = _props.installDriversAndPrograms, installPrograms = _props.installPrograms, programs = this.getPrograms();
switch (page) {
case "DRIVERS":
return installDriversAndPrograms({
eventAction: "drivers install all clicked"
});
case "PROGRAMS":
return installPrograms(programs, {
eventAction: "soft install all clicked"
});
}
},
validateEmail: function(email) {
var re = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i;
return re.test(email);
},
getEmailFromPrompt: function(attemptNum) {
var text = void 0;
if (0 === attemptNum) text = "Введите свой email. На него будет отправлена ссылка на админку."; else text = "Email некорректен. Введите свой email еще раз.";
return window.prompt(text, "");
},
askEmailAndInstall: function(attemptNum) {
var installAgent = this.props.installAgent, agent = this.getAgent(), email = this.getEmailFromPrompt(attemptNum);
if (null !== email) if (!this.validateEmail(email)) this.askEmailAndInstall(attemptNum + 1); else installAgent(agent, email);
},
handleInstallAgentClick: function() {
this.askEmailAndInstall(0);
}
}), actions = {
installDriversAndPrograms: _actionsDriversActions.installDriversAndPrograms,
installPrograms: _actionsProgramsActions.installPrograms,
installAgent: _actionsAgentActions.installAgent
};
exports["default"] = _reduxConnect2["default"](mapState, actions)(HeaderStats);
module.exports = exports["default"];
}).call(exports, __webpack_require__(302));
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function installAgent(agent, email) {
return function(dispatch) {
try {
_drpCoreStatistics2["default"].event({
action: "agent installation started"
});
dispatch({
type: "AGENT_INSTALL_START"
});
if (!agent) throw new Error("No agent exists");
if (!email) throw new Error("No email exists");
var hash = _hiBase322["default"].encode(email).replace(/=+$/, "");
_drpCoreSystemRegistry.RegWrite(hashPath, hash, "REG_SZ");
var url = metricsServer + "/api/register?email=" + encodeURIComponent(email) + "&hash=" + encodeURIComponent(hash) + "&z=" + Math.random();
_drpCoreSystemSendImg.sendImg(url).then(function() {
return _systemScanner2["default"].waitFor("binaries");
}).then(function() {
_utilsDownload.ensure("driverpack-wget.exe");
_drpCoreSystemProcesses.killProcess("%DriverPack Notifier%run.hta%");
return dispatch(_utilsInstaller.downloadProgram(agent));
}).then(function() {
return dispatch(_utilsInstaller.installProgram(agent));
}).then(function() {
_drpCoreStatistics2["default"].event({
action: "agent installation finished"
});
return dispatch({
type: "AGENT_INSTALL_SUCCESS"
});
}).caught(function(e) {
_drpCoreStatistics2["default"].event({
action: "agent installation failed"
});
_drpCoreLogs.log("[agentActions] error", e);
return dispatch({
type: "AGENT_INSTALL_FAILED"
});
});
} catch (e) {
_drpCoreStatistics2["default"].event({
action: "agent installation failed"
});
_drpCoreLogs.log("[agentActions] error", e);
return dispatch({
type: "AGENT_INSTALL_FAILED"
});
}
};
}
exports.__esModule = !0;
exports.installAgent = installAgent;
var _hiBase32 = __webpack_require__(388), _hiBase322 = _interopRequireDefault(_hiBase32), _drpCoreLogs = __webpack_require__(4), _drpCoreStatistics = __webpack_require__(13), _drpCoreStatistics2 = _interopRequireDefault(_drpCoreStatistics), _drpCoreSystemRegistry = __webpack_require__(17), _drpCoreSystemSendImg = __webpack_require__(21), _drpCoreSystemProcesses = __webpack_require__(29), _utilsInstaller = __webpack_require__(389), _systemScanner = __webpack_require__(50), _systemScanner2 = _interopRequireDefault(_systemScanner), _utilsDownload = __webpack_require__(312), hashPath = "HKLM\\SOFTWARE\\drpsu\\hash", metricsServer = "http://notifier.drp.su";
}, function(module, exports) {
(function(global) {
!function(root, undefined) {
"use strict";
var NODE_JS = "undefined" != typeof module;
if (NODE_JS) root = global;
var BASE32_ENCODE_CHAR = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".split(""), BASE32_DECODE_CHAR = {
A: 0,
B: 1,
C: 2,
D: 3,
E: 4,
F: 5,
G: 6,
H: 7,
I: 8,
J: 9,
K: 10,
L: 11,
M: 12,
N: 13,
O: 14,
P: 15,
Q: 16,
R: 17,
S: 18,
T: 19,
U: 20,
V: 21,
W: 22,
X: 23,
Y: 24,
Z: 25,
"2": 26,
"3": 27,
"4": 28,
"5": 29,
"6": 30,
"7": 31
}, blocks = [ 0, 0, 0, 0, 0, 0, 0, 0 ], toUtf8String = function(bytes) {
for (var b, c, str = "", length = bytes.length, i = 0, followingChars = 0; length > i; ) {
b = bytes[i++];
if (!(127 >= b)) {
if (b > 191 && 223 >= b) {
c = 31 & b;
followingChars = 1;
} else if (239 >= b) {
c = 15 & b;
followingChars = 2;
} else if (247 >= b) {
c = 7 & b;
followingChars = 3;
} else throw "not a UTF-8 string";
for (var j = 0; followingChars > j; ++j) {
b = bytes[i++];
if (128 > b || b > 191) throw "not a UTF-8 string";
c <<= 6;
c += 63 & b;
}
if (c >= 55296 && 57343 >= c) throw "not a UTF-8 string";
if (c > 1114111) throw "not a UTF-8 string";
if (65535 >= c) str += String.fromCharCode(c); else {
c -= 65536;
str += String.fromCharCode((c >> 10) + 55296);
str += String.fromCharCode((1023 & c) + 56320);
}
} else str += String.fromCharCode(b);
}
return str;
}, decodeAsBytes = function(base32Str) {
base32Str = base32Str.replace(/=/g, "");
for (var v1, v2, v3, v4, v5, v6, v7, v8, bytes = [], index = 0, length = base32Str.length, i = 0, count = length >> 3 << 3; count > i; ) {
v1 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v2 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v3 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v4 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v5 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v6 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v7 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v8 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
bytes[index++] = 255 & (v1 << 3 | v2 >>> 2);
bytes[index++] = 255 & (v2 << 6 | v3 << 1 | v4 >>> 4);
bytes[index++] = 255 & (v4 << 4 | v5 >>> 1);
bytes[index++] = 255 & (v5 << 7 | v6 << 2 | v7 >>> 3);
bytes[index++] = 255 & (v7 << 5 | v8);
}
var remain = length - count;
if (2 == remain) {
v1 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v2 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
bytes[index++] = 255 & (v1 << 3 | v2 >>> 2);
} else if (4 == remain) {
v1 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v2 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v3 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v4 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
bytes[index++] = 255 & (v1 << 3 | v2 >>> 2);
bytes[index++] = 255 & (v2 << 6 | v3 << 1 | v4 >>> 4);
} else if (5 == remain) {
v1 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v2 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v3 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v4 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v5 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
bytes[index++] = 255 & (v1 << 3 | v2 >>> 2);
bytes[index++] = 255 & (v2 << 6 | v3 << 1 | v4 >>> 4);
bytes[index++] = 255 & (v4 << 4 | v5 >>> 1);
} else if (7 == remain) {
v1 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v2 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v3 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v4 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v5 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v6 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v7 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
bytes[index++] = 255 & (v1 << 3 | v2 >>> 2);
bytes[index++] = 255 & (v2 << 6 | v3 << 1 | v4 >>> 4);
bytes[index++] = 255 & (v4 << 4 | v5 >>> 1);
bytes[index++] = 255 & (v5 << 7 | v6 << 2 | v7 >>> 3);
}
return bytes;
}, encodeAscii = function(str) {
for (var v1, v2, v3, v4, v5, base32Str = "", length = str.length, i = 0, count = 5 * parseInt(length / 5); count > i; ) {
v1 = str.charCodeAt(i++);
v2 = str.charCodeAt(i++);
v3 = str.charCodeAt(i++);
v4 = str.charCodeAt(i++);
v5 = str.charCodeAt(i++);
base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] + BASE32_ENCODE_CHAR[31 & (v1 << 2 | v2 >>> 6)] + BASE32_ENCODE_CHAR[v2 >>> 1 & 31] + BASE32_ENCODE_CHAR[31 & (v2 << 4 | v3 >>> 4)] + BASE32_ENCODE_CHAR[31 & (v3 << 1 | v4 >>> 7)] + BASE32_ENCODE_CHAR[v4 >>> 2 & 31] + BASE32_ENCODE_CHAR[31 & (v4 << 3 | v5 >>> 5)] + BASE32_ENCODE_CHAR[31 & v5];
}
var remain = length - count;
if (1 == remain) {
v1 = str.charCodeAt(i);
base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] + BASE32_ENCODE_CHAR[v1 << 2 & 31] + "======";
} else if (2 == remain) {
v1 = str.charCodeAt(i++);
v2 = str.charCodeAt(i);
base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] + BASE32_ENCODE_CHAR[31 & (v1 << 2 | v2 >>> 6)] + BASE32_ENCODE_CHAR[v2 >>> 1 & 31] + BASE32_ENCODE_CHAR[v2 << 4 & 31] + "====";
} else if (3 == remain) {
v1 = str.charCodeAt(i++);
v2 = str.charCodeAt(i++);
v3 = str.charCodeAt(i);
base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] + BASE32_ENCODE_CHAR[31 & (v1 << 2 | v2 >>> 6)] + BASE32_ENCODE_CHAR[v2 >>> 1 & 31] + BASE32_ENCODE_CHAR[31 & (v2 << 4 | v3 >>> 4)] + BASE32_ENCODE_CHAR[v3 << 1 & 31] + "===";
} else if (4 == remain) {
v1 = str.charCodeAt(i++);
v2 = str.charCodeAt(i++);
v3 = str.charCodeAt(i++);
v4 = str.charCodeAt(i);
base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] + BASE32_ENCODE_CHAR[31 & (v1 << 2 | v2 >>> 6)] + BASE32_ENCODE_CHAR[v2 >>> 1 & 31] + BASE32_ENCODE_CHAR[31 & (v2 << 4 | v3 >>> 4)] + BASE32_ENCODE_CHAR[31 & (v3 << 1 | v4 >>> 7)] + BASE32_ENCODE_CHAR[v4 >>> 2 & 31] + BASE32_ENCODE_CHAR[v4 << 3 & 31] + "=";
}
return base32Str;
}, encodeUtf8 = function(str) {
var v1, v2, v3, v4, v5, code, i, end = !1, base32Str = "", index = 0, start = 0, bytes = 0, length = str.length;
do {
blocks[0] = blocks[5];
blocks[1] = blocks[6];
blocks[2] = blocks[7];
for (i = start; length > index && 5 > i; ++index) {
code = str.charCodeAt(index);
if (128 > code) blocks[i++] = code; else if (2048 > code) {
blocks[i++] = 192 | code >> 6;
blocks[i++] = 128 | 63 & code;
} else if (55296 > code || code >= 57344) {
blocks[i++] = 224 | code >> 12;
blocks[i++] = 128 | code >> 6 & 63;
blocks[i++] = 128 | 63 & code;
} else {
code = 65536 + ((1023 & code) << 10 | 1023 & str.charCodeAt(++index));
blocks[i++] = 240 | code >> 18;
blocks[i++] = 128 | code >> 12 & 63;
blocks[i++] = 128 | code >> 6 & 63;
blocks[i++] = 128 | 63 & code;
}
}
bytes += i - start;
start = i - 5;
if (index == length) ++index;
if (index > length && 6 > i) end = !0;
v1 = blocks[0];
if (i > 4) {
v2 = blocks[1];
v3 = blocks[2];
v4 = blocks[3];
v5 = blocks[4];
base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] + BASE32_ENCODE_CHAR[31 & (v1 << 2 | v2 >>> 6)] + BASE32_ENCODE_CHAR[v2 >>> 1 & 31] + BASE32_ENCODE_CHAR[31 & (v2 << 4 | v3 >>> 4)] + BASE32_ENCODE_CHAR[31 & (v3 << 1 | v4 >>> 7)] + BASE32_ENCODE_CHAR[v4 >>> 2 & 31] + BASE32_ENCODE_CHAR[31 & (v4 << 3 | v5 >>> 5)] + BASE32_ENCODE_CHAR[31 & v5];
} else if (1 == i) base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] + BASE32_ENCODE_CHAR[v1 << 2 & 31] + "======"; else if (2 == i) {
v2 = blocks[1];
base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] + BASE32_ENCODE_CHAR[31 & (v1 << 2 | v2 >>> 6)] + BASE32_ENCODE_CHAR[v2 >>> 1 & 31] + BASE32_ENCODE_CHAR[v2 << 4 & 31] + "====";
} else if (3 == i) {
v2 = blocks[1];
v3 = blocks[2];
base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] + BASE32_ENCODE_CHAR[31 & (v1 << 2 | v2 >>> 6)] + BASE32_ENCODE_CHAR[v2 >>> 1 & 31] + BASE32_ENCODE_CHAR[31 & (v2 << 4 | v3 >>> 4)] + BASE32_ENCODE_CHAR[v3 << 1 & 31] + "===";
} else if (4 == i) {
v2 = blocks[1];
v3 = blocks[2];
v4 = blocks[3];
base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] + BASE32_ENCODE_CHAR[31 & (v1 << 2 | v2 >>> 6)] + BASE32_ENCODE_CHAR[v2 >>> 1 & 31] + BASE32_ENCODE_CHAR[31 & (v2 << 4 | v3 >>> 4)] + BASE32_ENCODE_CHAR[31 & (v3 << 1 | v4 >>> 7)] + BASE32_ENCODE_CHAR[v4 >>> 2 & 31] + BASE32_ENCODE_CHAR[v4 << 3 & 31] + "=";
}
} while (!end);
return base32Str;
}, encodeBytes = function(bytes) {
for (var v1, v2, v3, v4, v5, base32Str = "", length = bytes.length, i = 0, count = 5 * parseInt(length / 5); count > i; ) {
v1 = bytes[i++];
v2 = bytes[i++];
v3 = bytes[i++];
v4 = bytes[i++];
v5 = bytes[i++];
base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] + BASE32_ENCODE_CHAR[31 & (v1 << 2 | v2 >>> 6)] + BASE32_ENCODE_CHAR[v2 >>> 1 & 31] + BASE32_ENCODE_CHAR[31 & (v2 << 4 | v3 >>> 4)] + BASE32_ENCODE_CHAR[31 & (v3 << 1 | v4 >>> 7)] + BASE32_ENCODE_CHAR[v4 >>> 2 & 31] + BASE32_ENCODE_CHAR[31 & (v4 << 3 | v5 >>> 5)] + BASE32_ENCODE_CHAR[31 & v5];
}
var remain = length - count;
if (1 == remain) {
v1 = bytes[i];
base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] + BASE32_ENCODE_CHAR[v1 << 2 & 31] + "======";
} else if (2 == remain) {
v1 = bytes[i++];
v2 = bytes[i];
base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] + BASE32_ENCODE_CHAR[31 & (v1 << 2 | v2 >>> 6)] + BASE32_ENCODE_CHAR[v2 >>> 1 & 31] + BASE32_ENCODE_CHAR[v2 << 4 & 31] + "====";
} else if (3 == remain) {
v1 = bytes[i++];
v2 = bytes[i++];
v3 = bytes[i];
base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] + BASE32_ENCODE_CHAR[31 & (v1 << 2 | v2 >>> 6)] + BASE32_ENCODE_CHAR[v2 >>> 1 & 31] + BASE32_ENCODE_CHAR[31 & (v2 << 4 | v3 >>> 4)] + BASE32_ENCODE_CHAR[v3 << 1 & 31] + "===";
} else if (4 == remain) {
v1 = bytes[i++];
v2 = bytes[i++];
v3 = bytes[i++];
v4 = bytes[i];
base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] + BASE32_ENCODE_CHAR[31 & (v1 << 2 | v2 >>> 6)] + BASE32_ENCODE_CHAR[v2 >>> 1 & 31] + BASE32_ENCODE_CHAR[31 & (v2 << 4 | v3 >>> 4)] + BASE32_ENCODE_CHAR[31 & (v3 << 1 | v4 >>> 7)] + BASE32_ENCODE_CHAR[v4 >>> 2 & 31] + BASE32_ENCODE_CHAR[v4 << 3 & 31] + "=";
}
return base32Str;
}, encode = function(input, asciiOnly) {
var notString = "string" != typeof input;
if (notString && input.constructor == ArrayBuffer) input = new Uint8Array(input);
if (notString) return encodeBytes(input); else if (asciiOnly) return encodeAscii(input); else return encodeUtf8(input);
}, decode = function(base32Str, asciiOnly) {
if (!asciiOnly) return toUtf8String(decodeAsBytes(base32Str));
var v1, v2, v3, v4, v5, v6, v7, v8, str = "", length = base32Str.indexOf("=");
if (-1 == length) length = base32Str.length;
for (var i = 0, count = length >> 3 << 3; count > i; ) {
v1 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v2 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v3 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v4 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v5 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v6 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v7 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v8 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
str += String.fromCharCode(255 & (v1 << 3 | v2 >>> 2)) + String.fromCharCode(255 & (v2 << 6 | v3 << 1 | v4 >>> 4)) + String.fromCharCode(255 & (v4 << 4 | v5 >>> 1)) + String.fromCharCode(255 & (v5 << 7 | v6 << 2 | v7 >>> 3)) + String.fromCharCode(255 & (v7 << 5 | v8));
}
var remain = length - count;
if (2 == remain) {
v1 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v2 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
str += String.fromCharCode(255 & (v1 << 3 | v2 >>> 2));
} else if (4 == remain) {
v1 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v2 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v3 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v4 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
str += String.fromCharCode(255 & (v1 << 3 | v2 >>> 2)) + String.fromCharCode(255 & (v2 << 6 | v3 << 1 | v4 >>> 4));
} else if (5 == remain) {
v1 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v2 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v3 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v4 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v5 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
str += String.fromCharCode(255 & (v1 << 3 | v2 >>> 2)) + String.fromCharCode(255 & (v2 << 6 | v3 << 1 | v4 >>> 4)) + String.fromCharCode(255 & (v4 << 4 | v5 >>> 1));
} else if (7 == remain) {
v1 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v2 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v3 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v4 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v5 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v6 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
v7 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];
str += String.fromCharCode(255 & (v1 << 3 | v2 >>> 2)) + String.fromCharCode(255 & (v2 << 6 | v3 << 1 | v4 >>> 4)) + String.fromCharCode(255 & (v4 << 4 | v5 >>> 1)) + String.fromCharCode(255 & (v5 << 7 | v6 << 2 | v7 >>> 3));
}
return str;
};
decode.asBytes = decodeAsBytes;
var exports = {
encode: encode,
decode: decode
};
if (root.HI_BASE32_TEST) exports.toUtf8String = toUtf8String;
if (!root.HI_BASE32_TEST && NODE_JS) module.exports = exports; else if (root) root.base32 = exports;
}(this);
}).call(exports, function() {
return this;
}());
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _drpCoreSystem = __webpack_require__(27), _drpCoreStatistics = __webpack_require__(13), _drpCoreStatistics2 = _interopRequireDefault(_drpCoreStatistics), _drpCoreLogs = __webpack_require__(4), _devcon = __webpack_require__(329), _devcon2 = _interopRequireDefault(_devcon), _drpCoreWget = __webpack_require__(308), _drpCoreWget2 = _interopRequireDefault(_drpCoreWget), _drpCoreOs = __webpack_require__(9), _unzip = __webpack_require__(310), _unzip2 = _interopRequireDefault(_unzip), _systemScanner = __webpack_require__(50), _systemScanner2 = _interopRequireDefault(_systemScanner), _softPack = __webpack_require__(103), _softPack2 = _interopRequireDefault(_softPack), downloadProgram = function(program) {
return function(dispatch) {
var download = void 0, fileName = program.link.split("/").slice(-1)[0];
try {
_drpCoreSystem.fso.CopyFile("..\\programs\\" + fileName, _softPack2["default"].getSoftPath() + ("\\" + fileName), !0);
_drpCoreLogs.log("[programsActions] coping", program.name);
download = Promise.resolve();
} catch (e) {
var events = {
beforeDownloading: function() {},
afterDownloading: function() {}
};
download = _drpCoreWget2["default"].downloadFiles(events, _softPack2["default"].getSoftPath(), [ program ]);
_drpCoreLogs.log("[programsActions] downloading", program.name);
_drpCoreStatistics2["default"].event({
action: "soft download started " + program.name
});
if (program.isPartner) _drpCoreStatistics2["default"].event({
action: "soft download started partner " + program.name
});
}
return download.then(function() {}).caught(function(err) {
_drpCoreLogs.log("[programsActions] error", err);
_drpCoreStatistics2["default"].event({
action: "soft installation failed " + program.name
});
if (program.isPartner) _drpCoreStatistics2["default"].event({
action: "soft installation failed partner " + program.name
});
});
};
};
exports.downloadProgram = downloadProgram;
var installProgram = function(program) {
return function(dispatch) {
return Promise.resolve().then(function() {
var fileName = program.link.split("/").slice(-1)[0], keys = program.Keys;
if (_drpCoreSystem.fso.FileExists("..\\programs\\" + fileName)) keys = program.OfflineKeys ? program.OfflineKeys : program.Keys;
_drpCoreStatistics2["default"].event({
action: "soft installation started " + program.name
});
if (program.isPartner) _drpCoreStatistics2["default"].event({
action: "soft installation started partner " + program.name
});
try {
_drpCoreSystem.WshShell.Run('"' + _softPack2["default"].getSoftPath() + "\\" + fileName + '" ' + keys, 1, !0);
} catch (e) {}
_drpCoreStatistics2["default"].event({
action: "soft installation finished " + program.name
});
if (program.isPartner) _drpCoreStatistics2["default"].event({
action: "soft installation finished partner " + program.name
});
_drpCoreLogs.log("[programsActions] installed", program.name);
});
};
};
exports.installProgram = installProgram;
var downloadDriver = function(device) {
return function(dispatch) {
var driver = device.recommendedDriver;
dispatch({
type: "NEW_ORDER_DRIVER_DOWNLOAD_STARTED",
payload: device,
meta: {
status: "downloading"
}
});
return Promise.resolve().then(function() {
var res = _unzip2["default"].unzipFromPack(driver.pack, driver.directory);
if (res) {
var events = {
beforeDownloading: function() {},
afterDownloading: function() {}
};
if (!0) _drpCoreStatistics2["default"].event({
action: "driver download started"
});
return _drpCoreWget2["default"].downloadFiles(events, _systemScanner2["default"].getDriversPath(), [ driver ]).lastly(function() {
var zipName = driver.link.split("/").slice(-1);
_unzip2["default"].run7z(driver.pack, _systemScanner2["default"].getDriversPath() + "\\" + zipName);
});
}
}).then(function() {
dispatch({
type: "NEW_ORDER_DRIVER_DOWNLOAD_FINISHED",
payload: device,
meta: {
status: "downloaded"
}
});
}).caught(function(err) {
dispatch({
type: "NEW_ORDER_DRIVER_DOWNLOAD_FAILED",
payload: device,
meta: {
status: "error",
errorType: "download"
}
});
_drpCoreLogs.log("[driversActions] error", err);
});
};
};
exports.downloadDriver = downloadDriver;
var installDriver = function(device) {
return function(dispatch) {
var deviceId = device.deviceId, driver = device.recommendedDriver;
dispatch({
type: "NEW_ORDER_DRIVER_INSTALLATION_STARTED",
payload: device,
meta: {
status: "installing"
}
});
var result = _devcon2["default"].update(_drpCoreOs.is64, deviceId, driver), success = void 0, rebootNeeded = void 0;
switch (result) {
case 0:
success = !0;
rebootNeeded = !1;
_drpCoreLogs.log("[driversActions] success");
break;
case 1:
success = !0;
rebootNeeded = !0;
_drpCoreLogs.log("[driversActions] success & reboot needed");
break;
case 2:
case 3:
case 4:
success = !1;
rebootNeeded = !1;
_drpCoreLogs.log("[driversActions] failed");
_drpCoreStatistics2["default"].event({
action: "driver installation failed"
});
dispatch({
type: "NEW_ORDER_DRIVER_INSTALLATION_FAILED",
payload: device,
meta: {
status: "error",
errorType: "install"
}
});
}
if (success) dispatch({
type: "NEW_ORDER_DRIVER_INSTALLATION_FINISHED",
payload: device,
meta: {
id: deviceId,
rebootNeeded: rebootNeeded,
status: "done"
}
});
return Promise.delay(1);
};
};
exports.installDriver = installDriver;
}, function(module, exports) {}, , function(module, exports, __webpack_require__) {
(function(l) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
}
return target;
}, _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _Img = __webpack_require__(335), _Img2 = _interopRequireDefault(_Img), _Popover = __webpack_require__(393), _Popover2 = _interopRequireDefault(_Popover);
exports["default"] = _react2["default"].createClass({
displayName: "DriverRow",
mixins: [ __webpack_require__(336) ],
propTypes: {
recommended: _react.PropTypes.bool,
handleMouseOverDriver: _react.PropTypes.func.isRequired,
installSingleDriver: _react.PropTypes.func.isRequired,
expandOtherDrivers: _react.PropTypes.func.isRequired,
openDeviceManagerFor: _react.PropTypes.func.isRequired,
toggleDriver: _react.PropTypes.func.isRequired,
currentLanguage: _react.PropTypes.string.isRequired
},
render: function() {
if (this.props.recommended) return this.renderRecommendedDriver(_extends({}, this.props)); else return this.renderOtherDriver(_extends({}, this.props));
},
renderRecommendedDriver: function(_ref) {
var _this = this, driver = _ref.driver, deviceId = _ref.deviceId, currentDriver = _ref.currentDriver, isExpanded = _ref.isExpanded, isExpandable = _ref.isExpandable, isInfoOpened = _ref.isInfoOpened, isChecked = _ref.isChecked, _props = (_ref.index,
_ref.currentLanguage, this.props), expandOtherDrivers = _props.expandOtherDrivers, openDeviceManagerFor = _props.openDeviceManagerFor, toggleDriver = _props.toggleDriver;
return _react2["default"].DOM.tr({
className: "list_row " + (isInfoOpened ? "list_row_popover" : "")
}, _react2["default"].DOM.td({
className: "list_cell list_checkcell"
}, _react2["default"].DOM.label({
className: "list_checkzone"
}, _react2["default"].DOM.input({
type: "checkbox",
checked: isChecked,
onChange: function(e) {
toggleDriver(deviceId, e.target.checked);
}
}))), _react2["default"].DOM.td({
className: "list_cell list_info"
}, isInfoOpened ? _react2["default"].DOM.div({
className: "list_info-wrapper"
}, _Popover2["default"]({
current: currentDriver,
recommended: driver,
onShowMore: function() {
return openDeviceManagerFor(deviceId);
},
onMouseMove: function(e) {
return _this.handleMouseOverDriver(e, deviceId, -1);
}
})) : null, _react2["default"].DOM.a({
href: "javascript:void(0)",
className: "list_info-link",
onMouseMove: function(e) {
return _this.handleMouseOverDriver(e, deviceId, -1);
}
}, _Img2["default"]({
src: "img/screens/icon-i.png",
className: "list_info-link-icon",
width: "16",
height: "16"
}))), _react2["default"].DOM.td({
className: "list_cell list_name",
colSpan: "2",
title: ""
}, _react2["default"].DOM.a({
href: "javascript:void(0)",
onClick: function(e) {
e.preventDefault();
},
onMouseMove: function(e) {
return _this.handleMouseOverDriver(e, deviceId, -1);
}
}, driver.name, " ", driver.date, ",", driver.version)), this.renderDriverState(driver, deviceId, {
recommended: !0
}), _react2["default"].DOM.td({
className: "list_cell list_arrow-col"
}, _react2["default"].DOM.a({
href: "javascript:void(0)",
className: "list_arrow",
onMouseDown: function(e) {
e.preventDefault();
expandOtherDrivers(deviceId, !isExpanded);
}
}, isExpandable ? _Img2["default"]({
src: isExpanded ? "img/screens/icon-arrow-open.png" : "img/screens/icon-arrow-close.png",
width: "16",
height: "11"
}) : null)));
},
renderOtherDriver: function(_ref2) {
var _this2 = this, driver = _ref2.driver, deviceId = _ref2.deviceId, index = _ref2.index, currentDriver = _ref2.currentDriver, isInfoOpened = _ref2.isInfoOpened, openDeviceManagerFor = this.props.openDeviceManagerFor;
return _react2["default"].DOM.tr({
className: "list_row list_dropdown " + (isInfoOpened ? "list_row_popover" : "")
}, _react2["default"].DOM.td({
className: "list_cell",
colSpan: "2"
}, " "), _react2["default"].DOM.td({
className: "list_cell list_info"
}, isInfoOpened ? _react2["default"].DOM.div({
className: "list_info-wrapper"
}, _Popover2["default"]({
alternative: !0,
current: currentDriver,
recommended: driver,
onShowMore: function() {
return openDeviceManagerFor(deviceId);
},
onMouseMove: function(e) {
return _this2.handleMouseOverDriver(e, deviceId, index);
}
})) : null, _react2["default"].DOM.a({
href: "javascript:void(0)",
className: "list_info-link",
onClick: function(e) {
e.preventDefault();
},
onMouseMove: function(e) {
return _this2.handleMouseOverDriver(e, deviceId, index);
}
}, _Img2["default"]({
src: "img/screens/icon-i.png",
className: "list_info-link-icon",
width: "16",
height: "16"
}))), _react2["default"].DOM.td({
className: "list_cell list_name",
title: ""
}, _react2["default"].DOM.a({
href: "javascript:void(0)",
onClick: function(e) {
e.preventDefault();
},
onMouseMove: function(e) {
return _this2.handleMouseOverDriver(e, deviceId, index);
}
}, driver.name, " ", driver.date, ",", driver.version)), this.renderDriverState(driver, deviceId, {
alternative: !0
}), _react2["default"].DOM.td({
className: "list_cell",
width: "44"
}, " "));
},
renderDriverState: function(driver, deviceId) {
var options = arguments.length <= 2 || void 0 === arguments[2] ? {} : arguments[2], installSingleDriver = this.props.installSingleDriver, device = {
recommendedDriver: driver,
deviceId: deviceId
};
switch (driver.state) {
case "install":
return _react2["default"].DOM.td({
className: "list_cell list_button-col"
}, _react2["default"].DOM.button({
className: "list_button install",
onClick: function() {
return installSingleDriver(device, {
recommended: options.recommended,
alternative: options.alternative
});
}
}, l("programs_button_install")));
case "update":
return _react2["default"].DOM.td({
className: "list_cell list_button-col"
}, _react2["default"].DOM.button({
className: "list_button update",
onClick: function() {
return installSingleDriver(device, {
recommended: options.recommended,
alternative: options.alternative
});
}
}, l("drivers_row_update")));
case "installed":
return _react2["default"].DOM.td({
className: "list_cell list_button-col"
}, _Img2["default"]({
src: "img/screens/icon-installed.png",
className: "list_state-icon",
width: "24",
height: "24"
}));
case "rollback":
return _react2["default"].DOM.td({
className: "list_cell list_button-col"
}, _react2["default"].DOM.button({
className: "list_button rollback",
onClick: function() {
return installSingleDriver(device);
}
}, l("drivers_row_reinstall")));
}
},
handleMouseOverDriver: function() {
var _props2;
(_props2 = this.props).handleMouseOverDriver.apply(_props2, arguments);
}
});
module.exports = exports["default"];
}).call(exports, __webpack_require__(302));
}, function(module, exports, __webpack_require__) {
(function(l) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _objectWithoutProperties(obj, keys) {
var target = {};
for (var i in obj) if (!(keys.indexOf(i) >= 0)) if (Object.prototype.hasOwnProperty.call(obj, i)) target[i] = obj[i]; else ; else ;
return target;
}
exports.__esModule = !0;
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
}
return target;
}, _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _Img = __webpack_require__(335), _Img2 = _interopRequireDefault(_Img);
__webpack_require__(394);
exports["default"] = _react2["default"].createClass({
displayName: "Popover",
mixins: [ __webpack_require__(336) ],
propTypes: {
alternative: _react.PropTypes.any,
current: _react.PropTypes.object,
onShowMore: _react.PropTypes.func,
recommended: _react.PropTypes.object.isRequired
},
render: function() {
var _props = this.props, current = _props.current, recommended = _props.recommended, alternative = _props.alternative, onShowMore = _props.onShowMore, other = _objectWithoutProperties(_props, [ "current", "recommended", "alternative", "onShowMore" ]);
return _react2["default"].DOM.div(_extends({
className: "popover " + ((window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) < 1200 ? "popover_bottom" : "popover_right")
}, other), _react2["default"].DOM.div({
className: "arrow"
}, _Img2["default"]({
src: "" + ((window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) < 1200 ? "img/screens/arrow-bottom.png" : "img/screens/arrow-right.png"),
width: "" + ((window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) < 1200 ? "17" : "10"),
height: "" + ((window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) < 1200 ? "10" : "17")
})), _react2["default"].DOM.table({
width: "100%"
}, _react2["default"].DOM.tr({
className: "popover_head"
}, _react2["default"].DOM.td({
colSpan: "3"
}, _react2["default"].DOM.p({
className: "popover_line"
}, _react2["default"].DOM.b(null, recommended.name)), _react2["default"].DOM.button({
className: "button popover_head-btn",
onClick: onShowMore
}, l("popover_device_info")))), _react2["default"].DOM.tr({
className: "popover_row-border"
}, _react2["default"].DOM.td({
colSpan: "5",
height: "1",
className: "popover_row-border"
})), _react2["default"].DOM.tr(null, current ? this.renderInfo(current, !1, l("popover_current_driver")) : null, _react2["default"].DOM.td({
className: "popover_divider"
}), this.renderInfo(recommended, !0, alternative ? l("popover_alternative_driver") : l("popover_recommended_driver")))));
},
renderInfo: function(driver, highlightVersion, title) {
return _react2["default"].DOM.td({
className: "popover_col"
}, _react2["default"].DOM.p({
className: "popover_title"
}, _react2["default"].DOM.b(null, title)), _react2["default"].DOM.p({
className: "popover_line"
}, _react2["default"].DOM.span({
className: "popover_line-label"
}, "Provider:"), " ", _react2["default"].DOM.span(null, driver.manufacturer)), _react2["default"].DOM.p({
className: "popover_line"
}, _react2["default"].DOM.span({
className: "popover_line-label"
}, "Date:"), " ", _react2["default"].DOM.span(null, driver.date)), _react2["default"].DOM.p({
className: "popover_line"
}, _react2["default"].DOM.span({
className: "popover_line-label"
}, "Version:"), " ", highlightVersion ? _react2["default"].DOM.b({
style: {
color: "#007800"
}
}, driver.version) : driver.version), _react2["default"].DOM.p({
className: "popover_line"
}, _react2["default"].DOM.span({
className: "popover_line-label"
}, "ID:"), " ", _react2["default"].DOM.span(null, driver.deviceId)), _react2["default"].DOM.p({
className: "popover_line"
}, _react2["default"].DOM.span({
className: "popover_line-label"
}, "Inf file:"), " ", _react2["default"].DOM.span(null, driver.inf)));
}
});
module.exports = exports["default"];
}).call(exports, __webpack_require__(302));
}, function(module, exports) {}, , function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _selectorsDriversPrograms = __webpack_require__(105);
exports["default"] = _react2["default"].createClass({
displayName: "ProgramRow",
mixins: [ __webpack_require__(336) ],
propTypes: {
program: _react.PropTypes.object.isRequired,
index: _react.PropTypes.number,
toggleProgram: _react.PropTypes.func.isRequired,
zone: _react.PropTypes.string.isRequired,
currentLanguage: _react.PropTypes.string.isRequired
},
render: function() {
var _props = this.props, program = _props.program, index = _props.index, toggleProgram = _props.toggleProgram, zone = _props.zone, isChecked = this.getChecked(program);
return _react2["default"].DOM.tr({
className: "programs-list_row"
}, _react2["default"].DOM.td({
className: "programs-list_checkbox"
}, _react2["default"].DOM.input({
type: "checkbox",
id: "program" + index,
checked: isChecked,
onChange: function(e) {
toggleProgram(program.ID, e.target.checked, zone);
}
})), _react2["default"].DOM.td({
className: "programs-list_name",
onClick: function(e) {
toggleProgram(program.ID, !isChecked, zone);
}
}, _react2["default"].DOM.span({
title: program.URL,
htmlFor: "program" + index
}, program.name)), _react2["default"].DOM.td({
className: "programs-list_type",
onClick: function(e) {
toggleProgram(program.ID, !isChecked, zone);
}
}, program.category));
},
getChecked: function() {
var _props2 = this.props, program = _props2.program, zone = _props2.zone, isChecked = program.isChecked, isNotifierChecked = program.isNotifierChecked;
if (_selectorsDriversPrograms.isNotifier(program)) if ("DRIVER_UTILITIES" === zone) return isNotifierChecked; else if ("PROGRAMS_PAGE" === zone) return isChecked; else throw new Error("ProgramRow must have proper zone, not " + zone); else return isChecked;
}
});
module.exports = exports["default"];
}, function(module, exports) {}, , function(module, exports) {}, , function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _ProgramsScreen = __webpack_require__(402), _ProgramsScreen2 = _interopRequireDefault(_ProgramsScreen);
exports["default"] = _ProgramsScreen2["default"];
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _reduxConnect = __webpack_require__(292), _reduxConnect2 = _interopRequireDefault(_reduxConnect), _actionsProgramsActions = __webpack_require__(364), _Programs = __webpack_require__(403), _Programs2 = _interopRequireDefault(_Programs), ProgramsScreen = _react2["default"].createClass({
displayName: "ProgramsScreen",
mixins: [ __webpack_require__(336) ],
propTypes: {
page: _react.PropTypes.string.isRequired,
programs: _react.PropTypes.array.isRequired,
toggleProgram: _react.PropTypes.func.isRequired,
installPrograms: _react.PropTypes.func.isRequired,
currentLanguage: _react.PropTypes.string.isRequired
},
render: function() {
var _props = this.props, page = _props.page, programs = _props.programs, toggleProgram = _props.toggleProgram, installPrograms = _props.installPrograms, currentLanguage = _props.currentLanguage;
return _Programs2["default"]({
page: page,
programs: programs,
toggleProgram: toggleProgram,
installPrograms: installPrograms,
currentLanguage: currentLanguage
});
}
}), mapState = function(state) {
return {
programs: state.programs
};
}, actions = {
toggleProgram: _actionsProgramsActions.toggleProgram,
installPrograms: _actionsProgramsActions.installPrograms
};
exports["default"] = _reduxConnect2["default"](mapState, actions)(ProgramsScreen);
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
(function(l) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _Img = __webpack_require__(335), _Img2 = _interopRequireDefault(_Img), _selectorsDriversPrograms = __webpack_require__(105), _ProgramRow = __webpack_require__(404), _ProgramRow2 = _interopRequireDefault(_ProgramRow);
__webpack_require__(407);
exports["default"] = _react2["default"].createClass({
displayName: "Programs",
mixins: [ __webpack_require__(336) ],
propTypes: {
page: _react.PropTypes.string.isRequired,
programs: _react.PropTypes.array.isRequired,
toggleProgram: _react.PropTypes.func.isRequired,
installPrograms: _react.PropTypes.func.isRequired,
currentLanguage: _react.PropTypes.string.isRequired
},
render: function() {
var _props = this.props, page = _props.page, programs = _props.programs, visiblePrograms = _selectorsDriversPrograms.filterProgramsPage(programs), checkedPrograms = this.getPrograms(), checkedProgramsCount = _selectorsDriversPrograms.countCheckedPrograms(null, checkedPrograms), hideComponent = "PROGRAMS" !== page, windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
return _react2["default"].DOM.td({
className: "" + (hideComponent ? "display-none" : "")
}, _react2["default"].DOM.div({
className: "programs"
}, _react2["default"].DOM.div({
style: {
paddingLeft: "32px"
}
}, _react2["default"].DOM.h1({
className: "screen-title"
}, l("programs_header_text_title"))), windowWidth > 1275 ? _react2["default"].DOM.div({
className: "programs_header_bg"
}, _Img2["default"]({
src: "img/programs/soft-bg.png",
width: "144",
height: "144"
})) : "", _react2["default"].DOM.table({
className: "programs_wrapper",
border: "1"
}, _react2["default"].DOM.thead(null, _react2["default"].DOM.tr({
className: "programs_header"
}, _react2["default"].DOM.td({
colSpan: "4",
className: "programs_header-btn"
}, _react2["default"].DOM.button({
className: "cta-green-btn cta-btn-68 programs_btn " + (0 === checkedProgramsCount ? "cta-green-btn-is-disabled" : ""),
onClick: this.handleInstallAllClick,
disabled: 0 === checkedProgramsCount
}, _Img2["default"]({
src: "img/programs/btn-icon-install-all-soft.png",
className: "cta-green-btn-install-all-icon",
width: "46",
height: "38"
}), _react2["default"].DOM.span({
className: "cta-green-btn-text programs_btn-span",
dangerouslySetInnerHTML: {
__html: l("programs_btn_install_all").replace("{{COUNT}}", checkedProgramsCount)
}
}))), _react2["default"].DOM.td({
colSpan: "2",
className: "programs_header-text"
}, _react2["default"].DOM.div({
className: "programs_text",
dangerouslySetInnerHTML: {
__html: l("programs_header_text_caption")
}
}))), _react2["default"].DOM.tr({
className: "programs_list-header"
}, _react2["default"].DOM.td({
colSpan: "7",
className: "programs_list-title"
}, _react2["default"].DOM.div({
className: "list-header_arrow"
}, _Img2["default"]({
src: "img/programs/arrow.png",
width: "95",
height: "10"
})), l("drivers_program_counter")))), _react2["default"].DOM.tbody({
className: "programs_list"
}, this.renderProgramsRows(visiblePrograms, "PROGRAMS_PAGE"), _react2["default"].DOM.tr(null, _react2["default"].DOM.td({
colSpan: "6",
height: "62"
}))))));
},
renderProgramsRows: function(visiblePrograms, zone) {
var list = [], _props2 = this.props, toggleProgram = _props2.toggleProgram, installPrograms = _props2.installPrograms, currentLanguage = _props2.currentLanguage;
visiblePrograms.forEach(function(program, index) {
list.push(_ProgramRow2["default"]({
key: "program" + index,
program: program,
index: index,
toggleProgram: toggleProgram,
installPrograms: installPrograms,
zone: zone,
currentLanguage: currentLanguage
}));
});
return list;
},
handleInstallAllClick: function() {
var installPrograms = this.props.installPrograms, programs = this.getPrograms();
return installPrograms(programs, {
eventAction: "soft install all clicked"
});
},
getPrograms: function() {
var programs = this.props.programs;
return _selectorsDriversPrograms.filterCheckedProgramsPage(programs);
}
});
module.exports = exports["default"];
}).call(exports, __webpack_require__(302));
}, function(module, exports, __webpack_require__) {
(function(l) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _selectorsDriversPrograms = __webpack_require__(105), _Img = __webpack_require__(335), _Img2 = _interopRequireDefault(_Img);
__webpack_require__(405);
exports["default"] = _react2["default"].createClass({
displayName: "ProgramRow",
mixins: [ __webpack_require__(336) ],
propTypes: {
program: _react.PropTypes.object.isRequired,
index: _react.PropTypes.number,
toggleProgram: _react.PropTypes.func.isRequired,
installPrograms: _react.PropTypes.func.isRequired,
zone: _react.PropTypes.string.isRequired,
currentLanguage: _react.PropTypes.string.isRequired
},
render: function() {
var _props = this.props, program = _props.program, index = _props.index, toggleProgram = _props.toggleProgram, zone = _props.zone, currentLanguage = _props.currentLanguage, isInstalled = program.isInstalled, icon = program.icon, publisher = program.publisher, rating = program.rating, description = program.description, localizedDescription = void 0, lang = "ru" === currentLanguage ? "ru" : "en";
localizedDescription = description[lang];
var isChecked = this.getChecked(program);
return _react2["default"].DOM.tr({
className: "program-row"
}, _react2["default"].DOM.td({
className: "program-row_checkbox"
}, _react2["default"].DOM.input({
type: "checkbox",
id: "program" + index,
checked: isChecked,
onChange: function(e) {
toggleProgram(program.ID, e.target.checked, zone);
}
})), _react2["default"].DOM.td({
className: "program-row_icon program-row_icon-is-hidden"
}, _Img2["default"]({
src: icon,
width: "40",
height: "40",
className: "program-row_icon-img"
})), _react2["default"].DOM.td({
className: "program-row_name",
onClick: function(e) {
toggleProgram(program.ID, !isChecked, zone);
}
}, _react2["default"].DOM.div({
title: program.URL,
htmlFor: "program" + index,
className: "program-row_name-name"
}, program.name), _react2["default"].DOM.div({
className: "program-row_name-publisher"
}, publisher)), _react2["default"].DOM.td({
className: "program-row_rating"
}, this.renderStars(rating)), _react2["default"].DOM.td({
className: "program-row_type"
}, _react2["default"].DOM.div({
className: "program-row_type-text"
}, localizedDescription)), _react2["default"].DOM.td({
className: "program-row_btn"
}, !isInstalled ? _react2["default"].DOM.button({
className: "installed-program_uninstall-single",
onClick: this.handleInstallSingleClick
}, _Img2["default"]({
className: "installed-program_install-single-icon",
src: "img/programs/install.png",
width: "18",
height: "31"
}), l("programs_btn_install_single")) : _react2["default"].DOM.div({
className: "installed-program_uninstall-single-btn-filler"
}, _Img2["default"]({
className: "installed-program_install-single-icon",
src: "img/programs/installed.png",
width: "18",
height: "31"
}), l("programs_btn_installed_single"))));
},
getChecked: function() {
var _props2 = this.props, program = _props2.program, zone = _props2.zone, isChecked = program.isChecked, isNotifierChecked = program.isNotifierChecked;
if (_selectorsDriversPrograms.isNotifier(program)) if ("DRIVER_UTILITIES" === zone) return isNotifierChecked; else if ("PROGRAMS_PAGE" === zone) return isChecked; else throw new Error("ProgramRow must have proper zone, not " + zone); else return isChecked;
},
handleInstallSingleClick: function() {
var _props3 = this.props, program = _props3.program, installPrograms = _props3.installPrograms;
return installPrograms([ program ], {
eventAction: "soft install clicked " + program.name
});
},
renderStars: function(starsCount) {
for (var totalStars = 5, stars = [], i = 0; totalStars > i; i++) stars.push(_Img2["default"]({
className: "installed-program_caption-star-icon",
src: starsCount > i ? "img/programs/star-full.png" : "img/programs/star-empty.png"
}));
return stars;
}
});
module.exports = exports["default"];
}).call(exports, __webpack_require__(302));
}, function(module, exports) {}, , function(module, exports) {}, , function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _ProtectScreen = __webpack_require__(410), _ProtectScreen2 = _interopRequireDefault(_ProtectScreen);
exports["default"] = _ProtectScreen2["default"];
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _reduxConnect = __webpack_require__(292), _reduxConnect2 = _interopRequireDefault(_reduxConnect), _actionsProgramsActions = __webpack_require__(364), _InstalledPrograms = __webpack_require__(411), _InstalledPrograms2 = _interopRequireDefault(_InstalledPrograms), ProtectScreen = _react2["default"].createClass({
displayName: "ProtectScreen",
mixins: [ __webpack_require__(336) ],
propTypes: {
page: _react.PropTypes.string.isRequired,
toggleInstalledProgram: _react.PropTypes.func.isRequired,
toggleUninstallRatePopover: _react.PropTypes.func.isRequired,
expandInstalledProgram: _react.PropTypes.func.isRequired,
expandAllInstalledPrograms: _react.PropTypes.func.isRequired,
installPrograms: _react.PropTypes.func.isRequired,
checkChromeIsInstalled: _react.PropTypes.func.isRequired,
resetProtectScreen: _react.PropTypes.func.isRequired,
cleanBrowser: _react.PropTypes.func.isRequired,
removeInstalledProgram: _react.PropTypes.func.isRequired,
removeAllHarmfulPrograms: _react.PropTypes.func.isRequired,
currentLanguage: _react.PropTypes.string.isRequired
},
render: function() {
var _props = this.props, page = _props.page, installedPrograms = _props.installedPrograms, toggleInstalledProgram = _props.toggleInstalledProgram, toggleUninstallRatePopover = _props.toggleUninstallRatePopover, expandInstalledProgram = _props.expandInstalledProgram, expandAllInstalledPrograms = _props.expandAllInstalledPrograms, removeInstalledProgram = _props.removeInstalledProgram, removeAllHarmfulPrograms = _props.removeAllHarmfulPrograms, currentLanguage = _props.currentLanguage, isAPIFailed = installedPrograms.isAPIFailed, apiData = installedPrograms.apiData, isActiveRemoving = installedPrograms.isActiveRemoving, isActiveRemovingAll = installedPrograms.isActiveRemovingAll, installedProgramsExpanded = installedPrograms.installedProgramsExpanded, isUninstallRatePopoverOpened = installedPrograms.isUninstallRatePopoverOpened, isChromeInstalled = installedPrograms.isChromeInstalled, hideComponent = "PROTECT" !== page;
return _react2["default"].DOM.td({
className: "app-container " + (hideComponent ? "display-none" : "")
}, _InstalledPrograms2["default"]({
isActiveRemoving: isActiveRemoving,
isActiveRemovingAll: isActiveRemovingAll,
installedProgramsExpanded: installedProgramsExpanded,
isUninstallRatePopoverOpened: isUninstallRatePopoverOpened,
isAPIFailed: isAPIFailed,
isChromeInstalled: isChromeInstalled,
installed: apiData,
toggleInstalledProgram: toggleInstalledProgram,
toggleUninstallRatePopover: toggleUninstallRatePopover,
expandInstalledProgram: expandInstalledProgram,
expandAllInstalledPrograms: expandAllInstalledPrograms,
removeInstalledProgram: removeInstalledProgram,
removeAllHarmfulPrograms: removeAllHarmfulPrograms,
currentLanguage: currentLanguage
}));
},
componentDidMount: function() {
var _props2 = this.props, checkChromeIsInstalled = _props2.checkChromeIsInstalled, resetProtectScreen = _props2.resetProtectScreen;
checkChromeIsInstalled();
resetProtectScreen();
}
}), mapState = function(state) {
return {
installedPrograms: state.installedPrograms
};
}, actions = {
toggleInstalledProgram: _actionsProgramsActions.toggleInstalledProgram,
toggleUninstallRatePopover: _actionsProgramsActions.toggleUninstallRatePopover,
expandInstalledProgram: _actionsProgramsActions.expandInstalledProgram,
expandAllInstalledPrograms: _actionsProgramsActions.expandAllInstalledPrograms,
checkChromeIsInstalled: _actionsProgramsActions.checkChromeIsInstalled,
resetProtectScreen: _actionsProgramsActions.resetProtectScreen,
cleanBrowser: _actionsProgramsActions.cleanBrowser,
removeInstalledProgram: _actionsProgramsActions.removeInstalledProgram,
removeAllHarmfulPrograms: _actionsProgramsActions.removeAllHarmfulPrograms
};
exports["default"] = _reduxConnect2["default"](mapState, actions)(ProtectScreen);
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
(function(l) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _Img = __webpack_require__(335), _Img2 = _interopRequireDefault(_Img), _InstalledProgramRow = __webpack_require__(412), _InstalledProgramRow2 = _interopRequireDefault(_InstalledProgramRow), _selectorsDriversPrograms = __webpack_require__(105);
__webpack_require__(415);
var maxRowsNumber = 7;
exports["default"] = _react2["default"].createClass({
displayName: "InstalledPrograms",
mixins: [ __webpack_require__(336) ],
propTypes: {
toggleInstalledProgram: _react.PropTypes.func.isRequired,
isActiveRemoving: _react.PropTypes.bool.isRequired,
isActiveRemovingAll: _react.PropTypes.bool.isRequired,
isAPIFailed: _react.PropTypes.bool.isRequired,
isChromeInstalled: _react.PropTypes.bool.isRequired,
installedProgramsExpanded: _react.PropTypes.bool.isRequired,
installed: _react.PropTypes.array.isRequired,
toggleUninstallRatePopover: _react.PropTypes.func.isRequired,
expandInstalledProgram: _react.PropTypes.func.isRequired,
expandAllInstalledPrograms: _react.PropTypes.func.isRequired,
removeInstalledProgram: _react.PropTypes.func.isRequired,
removeAllHarmfulPrograms: _react.PropTypes.func.isRequired,
currentLanguage: _react.PropTypes.string.isRequired
},
render: function() {
var _props = this.props, isActiveRemoving = _props.isActiveRemoving, isActiveRemovingAll = _props.isActiveRemovingAll, installedProgramsExpanded = _props.installedProgramsExpanded, isAPIFailed = _props.isAPIFailed, installed = (_props.isChromeInstalled,
_props.installed), expandAllInstalledPrograms = _props.expandAllInstalledPrograms, harmfulPrograms = _selectorsDriversPrograms.filterHarmfulPrograms(installed), checkedPrograms = _selectorsDriversPrograms.filterCheckedInstalledPrograms(installed), hiddenProgramsNumber = installed.length - maxRowsNumber, windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
return _react2["default"].DOM.div({
style: {
width: "100%",
backgroundColor: "#F7F7F7"
}
}, _react2["default"].DOM.div({
className: "program-header clearfix"
}, windowWidth > 1275 ? _react2["default"].DOM.div({
className: "program-header_bg"
}, _Img2["default"]({
src: "img/programs/protector-bg.png",
width: "130",
height: "160"
})) : "", _react2["default"].DOM.div({
className: "program-header_wrapper"
}, _react2["default"].DOM.div({
className: "program-header_title-wrapper"
}, _react2["default"].DOM.h1({
className: "screen-title",
dangerouslySetInnerHTML: {
__html: l("protect_header_title")
}
}), _react2["default"].DOM.p({
className: "program-header_caption"
}, l("protect_header_caption"))), _react2["default"].DOM.div({
className: "installed-program_head-title-holder clearfix"
}, !isAPIFailed ? isActiveRemoving || 0 === checkedPrograms.length && !isActiveRemovingAll ? _react2["default"].DOM.button({
className: "programs-list_head-btn cta-green-btn cta-btn-59 cta-green-btn-is-disabled",
disabled: "disabled",
onClick: this.handleRemoveAllClick
}, _Img2["default"]({
src: "img/programs/btn-icon.png",
className: "cta-green-btn-clean-icon",
width: "46",
height: "38"
}), _react2["default"].DOM.span({
className: "programs-list_head-btn-text",
dangerouslySetInnerHTML: {
__html: l("protect_remove_all_btn").replace("{{COUNT}}", checkedPrograms.length)
}
})) : isActiveRemovingAll ? _react2["default"].DOM.button({
className: "programs-list_head-btn cta-green-btn cta-btn-59 cta-green-btn-is-loading",
onClick: this.handleRemoveAllClick
}, _Img2["default"]({
src: "img/programs/btn-icon.png",
className: "cta-green-btn-clean-icon",
style: {
visibility: "hidden"
},
width: "46",
height: "38"
}), _react2["default"].DOM.span({
className: "cta-green-btn-text",
style: {
visibility: "hidden"
},
dangerouslySetInnerHTML: {
__html: l("protect_remove_all_btn").replace("{{COUNT}}", checkedPrograms.length)
}
}), _react2["default"].DOM.i({
className: "cta-green-btn-icon",
style: {
backgroundImage: "url(img/programs/rolling.gif)"
}
})) : _react2["default"].DOM.button({
className: "programs-list_head-btn cta-green-btn cta-btn-59",
onClick: this.handleRemoveAllClick
}, _Img2["default"]({
src: "img/programs/btn-icon.png",
className: "cta-green-btn-clean-icon",
style: {
visibility: "visible"
},
width: "46",
height: "38"
}), _react2["default"].DOM.span({
className: "cta-green-btn-text",
dangerouslySetInnerHTML: {
__html: l("protect_remove_all_btn").replace("{{COUNT}}", checkedPrograms.length)
}
})) : null, !isAPIFailed ? 0 === checkedPrograms.length ? 0 === harmfulPrograms.length ? _react2["default"].DOM.div({
className: "programs-list_head-title"
}, _react2["default"].DOM.p({
className: "programs-list_head-success"
}, l("protect_state_success")), l("protect_state_success_caption")) : _react2["default"].DOM.div({
className: "programs-list_head-title"
}, _react2["default"].DOM.p({
className: "programs-list_head-warn"
}, l("protect_state_warn_unchecked")), l("protect_state_warn_unchecked_caption")) : _react2["default"].DOM.div({
className: "programs-list_head-title"
}, _react2["default"].DOM.p({
className: "programs-list_head-warn"
}, l("protect_state_warn").replace("{{COUNT}}", checkedPrograms.length)), !1 ? l("protect_state_warn_caption") : null) : _react2["default"].DOM.div({
className: "programs-list_head-title"
}, _react2["default"].DOM.p({
className: "programs-list_head-warn"
}, l("protect_state_err")))))), !isAPIFailed ? _react2["default"].DOM.div({
className: "installed-program_wrapper"
}, _react2["default"].DOM.div({
className: "list-header_arrow"
}, _Img2["default"]({
src: "img/programs/arrow.png",
width: "95",
height: "10"
})), _react2["default"].DOM.table({
border: "1",
className: "installed-program"
}, _react2["default"].DOM.tbody(null, this.renderInstalledProgramsRows(), hiddenProgramsNumber > 0 && !installedProgramsExpanded ? _react2["default"].DOM.tr({
className: "installed-program_expand-row"
}, _react2["default"].DOM.td({
colSpan: "7",
style: {
width: "100%",
padding: "0"
}
}, _react2["default"].DOM.a({
href: "javascript:void(0)",
className: "installed-program_expand-row-link",
onMouseDown: function(e) {
e.preventDefault();
expandAllInstalledPrograms();
}
}, _react2["default"].DOM.table({
style: {
height: "100%",
width: "100%"
}
}, _react2["default"].DOM.tbody(null, _react2["default"].DOM.tr({
style: {
verticalAlign: "middle",
textAlign: "center"
}
}, _react2["default"].DOM.td({
className: "installed-program_expand-row-link-text"
}, _Img2["default"]({
src: "img/programs/expand-all.png",
width: "17",
height: "10",
className: "installed-program_expand-row-icon"
}), l("protect_show_more")))))))) : _react2["default"].DOM.div({
style: {
fontSize: "0"
}
}, " ")))) : null);
},
renderInstalledProgramsRows: function(visiblePrograms, zone) {
var list = [], _props2 = this.props, isActiveRemoving = _props2.isActiveRemoving, isActiveRemovingAll = _props2.isActiveRemovingAll, installedProgramsExpanded = _props2.installedProgramsExpanded, installed = _props2.installed, toggleInstalledProgram = _props2.toggleInstalledProgram, expandInstalledProgram = _props2.expandInstalledProgram, removeInstalledProgram = _props2.removeInstalledProgram, currentLanguage = _props2.currentLanguage;
installed.forEach(function(program, index) {
if (installedProgramsExpanded || maxRowsNumber > index) list.push(_InstalledProgramRow2["default"]({
key: "installed_program" + index,
program: program,
index: index,
isActiveRemoving: isActiveRemoving,
isActiveRemovingAll: isActiveRemovingAll,
toggleInstalledProgram: toggleInstalledProgram,
expandInstalledProgram: expandInstalledProgram,
removeInstalledProgram: removeInstalledProgram,
currentLanguage: currentLanguage
}));
});
return list;
},
handleRemoveAllClick: function() {
var _props3 = this.props, installed = _props3.installed, removeAllHarmfulPrograms = _props3.removeAllHarmfulPrograms, checkedPrograms = _selectorsDriversPrograms.filterCheckedInstalledPrograms(installed);
removeAllHarmfulPrograms(checkedPrograms);
},
handleMouseOverInstalledPrograms: function(e, isOpened) {
var toggleUninstallRatePopover = this.props.toggleUninstallRatePopover;
e.stopPropagation();
clearInterval(this.hoveringTimer);
this.hoveringTimer = setTimeout(function() {
toggleUninstallRatePopover(isOpened);
}, isOpened ? 50 : 300);
}
});
module.exports = exports["default"];
}).call(exports, __webpack_require__(302));
}, function(module, exports, __webpack_require__) {
(function(l) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _Img = __webpack_require__(335), _Img2 = _interopRequireDefault(_Img);
__webpack_require__(413);
exports["default"] = _react2["default"].createClass({
displayName: "InstalledProgramRow",
mixins: [ __webpack_require__(336) ],
propTypes: {
index: _react.PropTypes.number.isRequired,
isActiveRemoving: _react.PropTypes.bool.isRequired,
isActiveRemovingAll: _react.PropTypes.bool.isRequired,
program: _react.PropTypes.object.isRequired,
toggleInstalledProgram: _react.PropTypes.func.isRequired,
expandInstalledProgram: _react.PropTypes.bool.isRequired,
removeInstalledProgram: _react.PropTypes.func.isRequired,
currentLanguage: _react.PropTypes.string.isRequired
},
render: function() {
var _props = this.props, index = _props.index, isActiveRemoving = _props.isActiveRemoving, isActiveRemovingAll = _props.isActiveRemovingAll, program = _props.program, toggleInstalledProgram = _props.toggleInstalledProgram, expandInstalledProgram = _props.expandInstalledProgram, removeInstalledProgram = _props.removeInstalledProgram, id = program.id, name = program.name, version = program.version, publisher = program.publisher, installDate = program.installDate, icon = program.icon, uninstallString = program.uninstallString, regPath = program.regPath, uninstallPercents = program.uninstallPercents, removalRate = program.removalRate, starsCount = program.starsCount, size = program.size, isHarmful = program.isHarmful, isChecked = program.isChecked, isRemoving = program.isRemoving, isExpanded = program.isExpanded;
return _react2["default"].DOM.tr({
className: (isExpanded ? "installed-program_row-expanded" : "") + " installed-program_row"
}, _react2["default"].DOM.td({
className: "installed-program_border-wrapper"
}, _react2["default"].DOM.div({
className: "installed-program_border",
style: {
backgroundColor: "large" === removalRate ? "#ee434a" : "middle" === removalRate ? "#fbc32e" : "#139142"
}
})), _react2["default"].DOM.td({
className: "installed-program_checkbox"
}, _react2["default"].DOM.input({
type: "checkbox",
id: "installed_program" + index,
checked: isChecked,
disabled: isActiveRemoving || isActiveRemovingAll,
onChange: function(e) {
toggleInstalledProgram(id, e.target.checked);
}
})), _react2["default"].DOM.td({
className: "installed-program_icon"
}, _Img2["default"]({
src: icon || "img/programs/default-soft.png",
width: "36",
height: "36"
})), _react2["default"].DOM.td({
className: "installed-program_info"
}, _react2["default"].DOM.div({
className: "installed-program_name"
}, name), _react2["default"].DOM.div({
className: "installed-program_caption"
}, _react2["default"].DOM.p(null, _react2["default"].DOM.span({
className: "installed-program_caption-label"
}, l("protect_row_rating"), " "), this.renderStars(starsCount)), size ? _react2["default"].DOM.p(null, _react2["default"].DOM.span({
className: "installed-program_caption-label"
}, l("protect_row_size"), " "), size) : _react2["default"].DOM.span(null), publisher ? _react2["default"].DOM.p(null, _react2["default"].DOM.span({
className: "installed-program_caption-label"
}, l("protect_row_publisher"), " "), publisher) : _react2["default"].DOM.span(null), version ? _react2["default"].DOM.p(null, _react2["default"].DOM.span({
className: "installed-program_caption-label"
}, l("protect_row_version"), " "), version) : _react2["default"].DOM.span(null), installDate ? _react2["default"].DOM.p(null, _react2["default"].DOM.span({
className: "installed-program_caption-label"
}, l("protect_row_install_date"), " "), installDate) : _react2["default"].DOM.span(null))), _react2["default"].DOM.td({
className: "installed-program-row_rating"
}, _react2["default"].DOM.div(null, "large" === removalRate ? _react2["default"].DOM.div({
className: "installed-program-row_rating-label",
title: uninstallPercents + "%"
}, l("protect_rating_level_large")) : "middle" === removalRate ? _react2["default"].DOM.div({
className: "installed-program-row_rating-label",
title: uninstallPercents + "%"
}, l("protect_rating_level_middle")) : _react2["default"].DOM.div({
className: "installed-program-row_rating-label",
title: uninstallPercents + "%"
}, l("protect_rating_level_small")), _react2["default"].DOM.div({
className: "installed-program-row_rating-bg"
}, _react2["default"].DOM.div({
className: "installed-program_row_rating-value",
style: {
width: uninstallPercents + "%",
backgroundColor: "large" === removalRate ? "#ee434a" : "middle" === removalRate ? "#fbc32e" : "#139142"
}
}))), isHarmful ? _react2["default"].DOM.div({
className: "installed-program-row_rating-caption"
}, _react2["default"].DOM.p({
style: {
paddingBottom: "24"
}
}, l("protect_rating_level_large_caption"))) : null), _react2["default"].DOM.td({
className: "installed-program_uninstall-single-col"
}, isRemoving || isActiveRemovingAll && isChecked ? _react2["default"].DOM.button({
className: "installed-program_uninstall-single installed-program_uninstall-single-is-loading"
}, _Img2["default"]({
src: "img/programs/remove.png",
width: "18",
height: "31",
style: {
visibility: "hidden"
}
}), _react2["default"].DOM.span({
style: {
visibility: "hidden"
}
}, l("protect_uninstall_single")), _react2["default"].DOM.i({
className: "installed-program_uninstall-single-loader",
style: {
backgroundImage: "url(img/programs/rolling-remove-single.gif)"
}
})) : isActiveRemoving && !isRemoving || isActiveRemovingAll && !isChecked ? _react2["default"].DOM.button({
className: "installed-program_uninstall-single installed-program_uninstall-single-is-disabled",
disabled: "disabled",
onClick: function(e) {
removeInstalledProgram({
id: id,
name: name,
uninstallPercents: uninstallPercents,
uninstallString: uninstallString,
regPath: regPath
});
}
}, _Img2["default"]({
className: "installed-program_uninstall-single-icon",
src: "img/programs/remove.png",
width: "18",
height: "31"
}), l("protect_uninstall_single")) : _react2["default"].DOM.button({
className: "installed-program_uninstall-single",
onClick: function(e) {
removeInstalledProgram({
id: id,
name: name,
uninstallPercents: uninstallPercents,
uninstallString: uninstallString,
regPath: regPath
});
}
}, _Img2["default"]({
className: "installed-program_uninstall-single-icon",
src: "img/programs/remove.png",
width: "18",
height: "31"
}), l("protect_uninstall_single"))), _react2["default"].DOM.td({
className: "installed-program-row_cell installed-program-row_arrow-col"
}, _react2["default"].DOM.a({
href: "javascript:void(0)",
className: "installed-program-row_arrow",
onClick: function(e) {
e.preventDefault();
expandInstalledProgram(id, !isExpanded);
}
}, _Img2["default"]({
src: !isExpanded ? "img/programs/arrow-expand.png" : "img/programs/arrow-collapse.png",
width: "24",
height: "16"
}))));
},
renderStars: function(starsCount) {
for (var totalStars = 5, stars = [], i = 0; totalStars > i; i++) stars.push(_Img2["default"]({
className: "installed-program_caption-star-icon",
src: starsCount > i ? "img/programs/star-full.png" : "img/programs/star-empty.png"
}));
return stars;
}
});
module.exports = exports["default"];
}).call(exports, __webpack_require__(302));
}, function(module, exports) {}, , function(module, exports) {}, , function(module, exports, __webpack_require__) {
(function(l) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function getScrollTop() {
return document.documentElement && document.documentElement.scrollTop || document.body.scrollTop;
}
function getNodeOffset(node) {
var rect = node.getDOMNode().getBoundingClientRect(), offsetTop = rect.top + getScrollTop() - (document.documentElement.clientTop || 0);
return offsetTop;
}
function mapState(state) {
return {
diagnostics: state.diagnostics
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _lodashArrayFlatten = __webpack_require__(418), _lodashArrayFlatten2 = _interopRequireDefault(_lodashArrayFlatten), _reduxConnect = __webpack_require__(292), _reduxConnect2 = _interopRequireDefault(_reduxConnect), _actionsDiagnosticsActions = __webpack_require__(298), _lodashFunctionThrottle = __webpack_require__(421), _lodashFunctionThrottle2 = _interopRequireDefault(_lodashFunctionThrottle), _ohm = __webpack_require__(424), _ohm2 = _interopRequireDefault(_ohm), _utilsGetInternetExplorerVersion = __webpack_require__(47), _utilsGetInternetExplorerVersion2 = _interopRequireDefault(_utilsGetInternetExplorerVersion);
__webpack_require__(425);
var Diagnostics = _react2["default"].createClass({
displayName: "Diagnostics",
mixins: [ __webpack_require__(336) ],
propTypes: {
page: _react.PropTypes.string.isRequired,
updateDiagnosticInfo: _react.PropTypes.func.isRequired,
diagnostics: _react.PropTypes.object.isRequired,
currentLanguage: _react.PropTypes.string.isRequired
},
getInitialState: function() {
return {
documentScrollTop: 0,
expandedBlock: null,
expandedSection: null
};
},
componentDidMount: function() {
_ohm2["default"].Run();
var updateDiagnosticInfo = this.props.updateDiagnosticInfo;
this.updateInterval = setInterval(updateDiagnosticInfo, 1e4);
this.scrollHandler = window.onscroll = _lodashFunctionThrottle2["default"](this.handleScroll, 1500);
this.calcLayout();
this.calcLayoutTimer = setTimeout(this.calcLayout, 1e3);
},
componentWillUnmount: function() {
try {
clearInterval(this.updateInterval);
} catch (e) {}
try {
clearTimeout(this.calcLayoutTimer);
} catch (e) {}
try {
this.scrollHandler.cancel();
} catch (e) {}
window.onscroll = null;
},
componentDidUpdate: function() {
this.calcLayout();
},
calcLayout: function() {
this.blockOffsets = this.getBlockLayoutFromDOM();
this.sectionOffsets = this.getSectionLayoutFromDOM();
this.handleScroll();
},
render: function() {
var _this = this, _props = this.props, page = _props.page, diagnostics = _props.diagnostics, hideComponent = "DIAGNOSTICS" !== page;
return _react2["default"].DOM.td({
className: "app-container " + (hideComponent ? "display-none" : "")
}, _react2["default"].DOM.div({
className: "app-container_inner"
}, _react2["default"].DOM.div(null, _react2["default"].DOM.h1({
className: "screen-title",
onMouseDown: function(e) {
e.preventDefault();
},
id: "top",
style: {
paddingBottom: "20px"
}
}, l("diagnostics_section_title")), _react2["default"].DOM.table({
width: "100%",
style: {
minWidth: "500px",
marginTop: "30px",
marginBottom: "200px"
},
className: "diagnostic_holder"
}, _react2["default"].DOM.tr(null, _react2["default"].DOM.td({
width: "100%",
style: {
verticalAlign: "top"
}
}, Object.entries(diagnostics.data).map(function(block) {
return _this.renderBlock(block);
})))))));
},
renderBlock: function(_ref) {
var _this2 = this, blockName = _ref[0], blockContents = _ref[1];
return _react2["default"].DOM.div(null, _react2["default"].DOM.h1({
className: "screen-title",
style: {
padding: "10px 0"
},
ref: "block_" + blockName
}, blockName), Object.entries(blockContents).map(function(section) {
return _this2.renderSection(section, blockName);
}));
},
renderSection: function(_ref2, blockName) {
var _this3 = this, sectionName = _ref2[0], sectionContents = _ref2[1];
return _react2["default"].DOM.div(null, _react2["default"].DOM.h3({
ref: "section_" + blockName + "_" + sectionName
}, sectionName), !Array.isArray(sectionContents) ? Object.entries(sectionContents).map(function(table) {
return _this3.renderTable(table);
}) : Object.entries(this.formatArray(sectionContents)).map(function(table) {
return _this3.renderTable(table);
}));
},
renderTable: function(_ref3) {
var _this4 = this, tableName = _ref3[0], tableContents = _ref3[1];
return _react2["default"].DOM.table({
width: "100%",
className: "diagnostic-list_table"
}, _react2["default"].DOM.tbody(null, _react2["default"].DOM.tr(null, _react2["default"].DOM.td({
className: "diagnostic-list_table-head",
colSpan: "2"
}, tableName)), _lodashArrayFlatten2["default"](Object.entries(tableContents).map(function(_ref4) {
var propertyName = _ref4[0], singleOrMultiRowValue = _ref4[1];
if (Array.isArray(singleOrMultiRowValue)) return singleOrMultiRowValue.map(function(propertyValue) {
return [ propertyName, propertyValue ];
}); else return [ [ propertyName, singleOrMultiRowValue ] ];
})).map(function(row) {
return _this4.renderRow(row);
})));
},
renderRow: function(_ref5) {
var propertyName = _ref5[0], propertyValue = _ref5[1];
return _react2["default"].DOM.tr(null, _react2["default"].DOM.td({
className: "diagnostic-list_table-cell",
width: "30%"
}, propertyName), _react2["default"].DOM.td({
className: "diagnostic-list_table-cell",
width: "70%"
}, propertyValue));
},
renderNav: function(blocks) {
var _this5 = this, _state = this.state, documentScrollTop = _state.documentScrollTop, expandedBlock = _state.expandedBlock, expandedSection = _state.expandedSection;
return _react2["default"].DOM.div({
className: "bs-docs-sidebar fixed",
style: this.shouldPolyfillFixed() ? {
position: "absolute",
top: documentScrollTop
} : null
}, _react2["default"].DOM.ul({
id: "sidebar",
className: "nav_list-holder nav nav-stacked"
}, Object.entries(blocks).map(function(_ref6) {
var blockName = _ref6[0], blockContents = _ref6[1];
return _react2["default"].DOM.li({
className: (expandedBlock === "block_" + blockName ? "active" : "") + " nav_list-holder-item"
}, _react2["default"].DOM.a({
href: "#",
className: "nav_list-link",
onClick: function(e) {
return _this5.handleBlockNavigate(e, "block_" + blockName);
}
}, blockName), _react2["default"].DOM.ul({
className: "nav_sublist-holder nav nav-stacked"
}, Object.entries(blockContents).map(function(_ref7) {
var sectionName = _ref7[0];
_ref7[1];
return _react2["default"].DOM.li(null, _react2["default"].DOM.a({
href: "#",
className: "nav_sublist-link " + (expandedSection === "section_" + blockName + "_" + sectionName ? "active" : ""),
onClick: function(e) {
return _this5.handleNavigate(e, "section_" + blockName + "_" + sectionName);
}
}, sectionName));
})));
})), _react2["default"].DOM.a({
className: "back-to-top",
href: "#",
onClick: this.handleTop
}, "Back to top"));
},
handleBlockNavigate: function(e, name) {
this.setState({
expandedBlock: name
});
this.handleNavigate(e, name);
},
handleNavigate: function(e, name) {
e.preventDefault();
var node = this.refs[name], offsetTop = getNodeOffset(node);
window.scrollTo(0, offsetTop);
this.handleScroll();
},
handleTop: function(e) {
e.preventDefault();
window.scrollTo(0, 0);
},
handleScroll: function() {
var _findActiveElement = this.findActiveElement(this.blockOffsets), blockName = _findActiveElement[0], blockIndex = _findActiveElement[1], _findActiveElement2 = this.findActiveElement(this.sectionOffsets[blockIndex]), sectionName = _findActiveElement2[0];
this.setState({
documentScrollTop: getScrollTop(),
expandedBlock: "block_" + blockName,
expandedSection: "section_" + blockName + "_" + sectionName
});
},
findActiveElement: function(offsets) {
var currentOffset = getScrollTop() + 10, match = offsets.findIndex(function(_ref8) {
var offset = (_ref8[0], _ref8[1]);
return offset > currentOffset;
});
if (-1 === match) {
var index = offsets.length - 1, _offsets$index = offsets[index], _name = _offsets$index[0];
return [ _name, index ];
} else if (0 === match) {
var index = 0, _offsets$index2 = offsets[index], _name2 = _offsets$index2[0];
return [ _name2, index ];
} else if (match) {
var index = match - 1, _offsets$index3 = offsets[index], _name3 = _offsets$index3[0];
return [ _name3, index ];
}
},
getBlockLayoutFromDOM: function() {
var _this6 = this, blockNames = Object.keys(this.props.diagnostics.data), offsets = blockNames.map(function(blockName) {
return [ blockName, getNodeOffset(_this6.refs["block_" + blockName]) ];
});
return offsets;
},
getSectionLayoutFromDOM: function() {
var _this7 = this, diagnostics = this.props.diagnostics, sectionOffsets = Object.entries(diagnostics.data).map(function(_ref9) {
var blockName = _ref9[0], blockContents = _ref9[1];
return Object.entries(blockContents).map(function(_ref10) {
var sectionName = _ref10[0];
_ref10[1];
return [ sectionName, getNodeOffset(_this7.refs["section_" + blockName + "_" + sectionName]) ];
});
});
return sectionOffsets;
},
formatArray: function(arr) {
var res = {};
arr.forEach(function(val, ind) {
res["# " + (ind + 1)] = val;
});
return res;
},
shouldPolyfillFixed: function() {
var internetExplorerVersion = _utilsGetInternetExplorerVersion2["default"]();
if (-1 !== internetExplorerVersion) if (9 > internetExplorerVersion) return !0; else return !1; else return !1;
}
}), actions = {
updateDiagnosticInfo: _actionsDiagnosticsActions.updateDiagnosticInfo
};
exports["default"] = _reduxConnect2["default"](mapState, actions)(Diagnostics);
module.exports = exports["default"];
}).call(exports, __webpack_require__(302));
}, function(module, exports, __webpack_require__) {
function flatten(array, isDeep, guard) {
var length = array ? array.length : 0;
if (guard && isIterateeCall(array, isDeep, guard)) isDeep = !1;
return length ? baseFlatten(array, isDeep) : [];
}
var baseFlatten = __webpack_require__(419), isIterateeCall = __webpack_require__(99);
module.exports = flatten;
}, function(module, exports, __webpack_require__) {
function baseFlatten(array, isDeep, isStrict, result) {
result || (result = []);
for (var index = -1, length = array.length; ++index < length; ) {
var value = array[index];
if (isObjectLike(value) && isArrayLike(value) && (isStrict || isArray(value) || isArguments(value))) if (isDeep) baseFlatten(value, isDeep, isStrict, result); else arrayPush(result, value); else if (!isStrict) result[result.length] = value;
}
return result;
}
var arrayPush = __webpack_require__(420), isArguments = __webpack_require__(72), isArray = __webpack_require__(73), isArrayLike = __webpack_require__(67), isObjectLike = __webpack_require__(66);
module.exports = baseFlatten;
}, function(module, exports) {
function arrayPush(array, values) {
for (var index = -1, length = values.length, offset = array.length; ++index < length; ) array[offset + index] = values[index];
return array;
}
module.exports = arrayPush;
}, function(module, exports, __webpack_require__) {
function throttle(func, wait, options) {
var leading = !0, trailing = !0;
if ("function" != typeof func) throw new TypeError(FUNC_ERROR_TEXT);
if (options === !1) leading = !1; else if (isObject(options)) {
leading = "leading" in options ? !!options.leading : leading;
trailing = "trailing" in options ? !!options.trailing : trailing;
}
return debounce(func, wait, {
leading: leading,
maxWait: +wait,
trailing: trailing
});
}
var debounce = __webpack_require__(422), isObject = __webpack_require__(65), FUNC_ERROR_TEXT = "Expected a function";
module.exports = throttle;
}, function(module, exports, __webpack_require__) {
function debounce(func, wait, options) {
function cancel() {
if (timeoutId) clearTimeout(timeoutId);
if (maxTimeoutId) clearTimeout(maxTimeoutId);
lastCalled = 0;
maxTimeoutId = timeoutId = trailingCall = void 0;
}
function complete(isCalled, id) {
if (id) clearTimeout(id);
maxTimeoutId = timeoutId = trailingCall = void 0;
if (isCalled) {
lastCalled = now();
result = func.apply(thisArg, args);
if (!timeoutId && !maxTimeoutId) args = thisArg = void 0;
}
}
function delayed() {
var remaining = wait - (now() - stamp);
if (0 >= remaining || remaining > wait) complete(trailingCall, maxTimeoutId); else timeoutId = setTimeout(delayed, remaining);
}
function maxDelayed() {
complete(trailing, timeoutId);
}
function debounced() {
args = arguments;
stamp = now();
thisArg = this;
trailingCall = trailing && (timeoutId || !leading);
if (maxWait === !1) var leadingCall = leading && !timeoutId; else {
if (!maxTimeoutId && !leading) lastCalled = stamp;
var remaining = maxWait - (stamp - lastCalled), isCalled = 0 >= remaining || remaining > maxWait;
if (isCalled) {
if (maxTimeoutId) maxTimeoutId = clearTimeout(maxTimeoutId);
lastCalled = stamp;
result = func.apply(thisArg, args);
} else if (!maxTimeoutId) maxTimeoutId = setTimeout(maxDelayed, remaining);
}
if (isCalled && timeoutId) timeoutId = clearTimeout(timeoutId); else if (!timeoutId && wait !== maxWait) timeoutId = setTimeout(delayed, wait);
if (leadingCall) {
isCalled = !0;
result = func.apply(thisArg, args);
}
if (isCalled && !timeoutId && !maxTimeoutId) args = thisArg = void 0;
return result;
}
var args, maxTimeoutId, result, stamp, thisArg, timeoutId, trailingCall, lastCalled = 0, maxWait = !1, trailing = !0;
if ("function" != typeof func) throw new TypeError(FUNC_ERROR_TEXT);
wait = 0 > wait ? 0 : +wait || 0;
if (options === !0) {
var leading = !0;
trailing = !1;
} else if (isObject(options)) {
leading = !!options.leading;
maxWait = "maxWait" in options && nativeMax(+options.maxWait || 0, wait);
trailing = "trailing" in options ? !!options.trailing : trailing;
}
debounced.cancel = cancel;
return debounced;
}
var isObject = __webpack_require__(65), now = __webpack_require__(423), FUNC_ERROR_TEXT = "Expected a function", nativeMax = Math.max;
module.exports = debounce;
}, function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(62), nativeNow = getNative(Date, "now"), now = nativeNow || function() {
return new Date().getTime();
};
module.exports = now;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
exports.__esModule = !0;
var _drpCoreSystem = __webpack_require__(27), _drpCoreLogs = __webpack_require__(4), _utilsOnunload = __webpack_require__(303), _external = __webpack_require__(307), _external2 = _interopRequireDefault(_external), dotNetPaths = [ "HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v2.0.50727\\", "HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v4\\" ], OHM = function(_External) {
function OHM() {
_classCallCheck(this, OHM);
var options = {
url: "http://download.drp.su/updates/ohm/openhardwaremonitor.zip",
downloadPath: _drpCoreSystem.AppData + "\\DRPSu\\ohm",
dirPath: _drpCoreSystem.WshShell.CurrentDirectory.split("\\").slice(0, -1).join("\\") + "\\bin\\tools\\openhardwaremonitor",
exePath: "\\OpenHardwareMonitor.exe"
};
_External.call(this, options);
}
_inherits(OHM, _External);
OHM.prototype.Run = function() {
var _this = this;
if (this.handler) return Promise.resolve();
if (dotNetPaths.every(function(dotNetPath) {
return !_drpCoreSystem.RegExists(dotNetPath);
})) {
_drpCoreLogs.log("[OHM] .NET Framework not installed");
return Promise.resolve();
}
return _External.prototype.Download.call(this).then(function() {
_drpCoreLogs.log("[OHM] executing", _this.exePath);
_this.handler = _drpCoreSystem.WshShell.Exec(_this.exePath);
})["finally"](function() {
_utilsOnunload.addUnloadListener(function() {
_this.Stop();
});
});
};
OHM.prototype.Stop = function() {
try {
if (this.handler) {
_drpCoreLogs.log("[OHM] stopping");
this.handler.Terminate();
delete this.handler;
}
} catch (e) {
_drpCoreLogs.log("[OHM] stopping failed", e);
}
};
return OHM;
}(_external2["default"]);
exports["default"] = new OHM();
module.exports = exports["default"];
}, function(module, exports) {}, , function(module, exports, __webpack_require__) {
(function(l) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function mapState(state) {
return {
loading: state.loading
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _reduxConnect = __webpack_require__(292), _reduxConnect2 = _interopRequireDefault(_reduxConnect), _actionsMenuActions = __webpack_require__(305);
__webpack_require__(428);
var Loading = _react2["default"].createClass({
displayName: "Loading",
propTypes: {
loading: _react.PropTypes.object.isRequired,
navigate: _react.PropTypes.func.isRequired,
currentLanguage: _react.PropTypes.string.isRequired
},
render: function() {
var _this = this, loading = this.props.loading, now = loading.now, backgroundImage = void 0, description = void 0;
switch (now) {
case "AGENT":
backgroundImage = "url(Tools/load8.gif)";
description = _react2["default"].DOM.span(null, l("loading_install_software"), "...");
break;
case "BACKUP":
backgroundImage = "url(Tools/load8.gif)";
description = _react2["default"].DOM.span(null, l("loading_backup_drivers"), "...");
break;
case "AGENT_DONE":
backgroundImage = "none";
description = _react2["default"].DOM.span(null, "Мониторинг активирован!", _react2["default"].DOM.br(null), "На ваш email отправлено уведомление со ссылкой на панель администратора", _react2["default"].DOM.br(null), _react2["default"].DOM.button({
className: "button loading-button",
onClick: function() {
_this.openNextScreen("PROGRAMS");
}
}, l("loading_button_finish")));
break;
case "AGENT_FAILED":
backgroundImage = "none";
description = _react2["default"].DOM.span(null, "В процессе установки агента для мониторинга произошла ошибка", _react2["default"].DOM.br(null), _react2["default"].DOM.button({
className: "button loading-button",
onClick: function() {
_this.openNextScreen("PROGRAMS");
}
}, l("loading_button_finish")));
break;
case "BACKUP_DONE":
backgroundImage = "none";
description = _react2["default"].DOM.span(null, l("loading_backup_done"), _react2["default"].DOM.br(null), _react2["default"].DOM.button({
className: "button loading-button",
onClick: function() {
_this.openNextScreen("DRIVERS");
}
}, l("loading_button_finish")));
break;
case "BACKUP_FAILED":
backgroundImage = "none";
description = _react2["default"].DOM.span(null, l("loading_backup_failed"), _react2["default"].DOM.br(null), _react2["default"].DOM.button({
className: "button loading-button",
onClick: function() {
_this.openNextScreen("DRIVERS");
}
}, l("loading_button_finish")));
break;
case "NO_INTERNET":
backgroundImage = "none";
description = _react2["default"].DOM.span(null, _react2["default"].DOM.img({
src: "img/wifi-disabled.png"
}), _react2["default"].DOM.br(null), l("about_noconnection"));
break;
case "RUN_ERROR":
backgroundImage = "none";
description = _react2["default"].DOM.span({
style: {
fontSize: "24px"
},
dangerouslySetInnerHTML: {
__html: l("about_run_error")
}
});
break;
default:
backgroundImage = "url(Tools/load8.gif)";
description = _react2["default"].DOM.span(null, l("loading_install_software_title"));
}
return _react2["default"].DOM.div({
className: "loading",
style: {
backgroundImage: backgroundImage
}
}, _react2["default"].DOM.div({
className: "loading-progress"
}, _react2["default"].DOM.span({
className: "loading-description"
}, description)));
},
openNextScreen: function(nextScreen) {
var navigate = this.props.navigate;
document.activeElement && document.activeElement.blur();
navigate(nextScreen);
}
}), actions = {
navigate: _actionsMenuActions.navigate
};
exports["default"] = _reduxConnect2["default"](mapState, actions)(Loading);
module.exports = exports["default"];
}).call(exports, __webpack_require__(302));
}, function(module, exports) {}, , , function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _LoadingScreen = __webpack_require__(432), _LoadingScreen2 = _interopRequireDefault(_LoadingScreen);
exports["default"] = _LoadingScreen2["default"];
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
(function(l) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function mapState(state) {
return {
loading: state.loading
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _reduxConnect = __webpack_require__(292), _reduxConnect2 = _interopRequireDefault(_reduxConnect), _utils = __webpack_require__(368);
__webpack_require__(433);
var LoadingScreen = _react2["default"].createClass({
displayName: "LoadingScreen",
mixins: [ __webpack_require__(336) ],
propTypes: {
progressPercents: _react.PropTypes.number.isRequired,
loading: _react.PropTypes.object.isRequired,
currentLanguage: _react.PropTypes.string.isRequired
},
getInitialState: function() {
return {
progressPercents: 0
};
},
componentDidMount: function() {
var _this = this;
document.documentElement.removeAttribute("style");
_utils.fitApplicationWindow();
var MAX_DISPLAY_PROGRESS = 100;
this.progressTimer = setInterval(function() {
try {
_this.setState({
progressPercents: _this.state.progressPercents + .3
});
if (_this.state.progressPercents >= MAX_DISPLAY_PROGRESS) clearInterval(_this.progressTimer);
} catch (e) {
clearInterval(_this.progressTimer);
}
}, 20);
},
componentWillUnmount: function() {
clearInterval(this.progressTimer);
},
render: function() {
var loading = this.props.loading, status = loading.status, dictionary = {
system_scanning: l("loading_preparing"),
system_scan_finished: l("loading_system_scanning"),
api_response_received: l("loading_sending_api_request"),
installed_programs_scan_finished: l("loading_checking_installed_programs"),
protect_api_response_received: l("loading_ordering_drivers")
};
return _react2["default"].DOM.div({
id: "loading-screen",
className: "loading-screen"
}, _react2["default"].DOM.div({
className: "loading-screen_logo"
}), _react2["default"].DOM.div({
className: "loading-screen_progress-wrapper"
}, _react2["default"].DOM.div({
className: "loading-screen_progress-status"
}, dictionary[status]), _react2["default"].DOM.div({
className: "loading-screen_progress-bg"
}, _react2["default"].DOM.div({
className: "loading-screen_progress loading-screen_progress-linear",
style: {
width: this.state.progressPercents + "%"
}
}))));
}
});
exports["default"] = _reduxConnect2["default"](mapState)(LoadingScreen);
module.exports = exports["default"];
}).call(exports, __webpack_require__(302));
}, function(module, exports) {}, , , function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function mapState(state) {
return {
installation: state.installation,
currentLanguage: state.lang.currentLanguage
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _reduxConnect = __webpack_require__(292), _reduxConnect2 = _interopRequireDefault(_reduxConnect), _actionsInstallationActions = __webpack_require__(437), _InstallationHeader = __webpack_require__(438), _InstallationHeader2 = _interopRequireDefault(_InstallationHeader), _InstallationTitleTable = __webpack_require__(452), _InstallationTitleTable2 = _interopRequireDefault(_InstallationTitleTable), _InstallationItemRow = __webpack_require__(453), _InstallationItemRow2 = _interopRequireDefault(_InstallationItemRow);
__webpack_require__(458);
var Installation = _react2["default"].createClass({
displayName: "Installation",
mixins: [ __webpack_require__(336) ],
propTypes: {
installation: _react.PropTypes.object.isRequired,
currentLanguage: _react.PropTypes.string.isRequired,
expandInstallation: _react.PropTypes.func,
cancelItemInstallation: _react.PropTypes.func,
restartItemInstallation: _react.PropTypes.func,
pauseInstallation: _react.PropTypes.func,
confirmAvInstallation: _react.PropTypes.bool
},
getInitialState: function() {
return {
notificationOpen: !0,
startTime: Date.now(),
secondsElapsed: 0
};
},
tick: function() {
var diff = Math.round((Date.now() - this.state.startTime) / 1e3);
this.setState({
secondsElapsed: diff
});
},
componentDidMount: function() {
var _this = this;
this.interval = setInterval(function() {
try {
_this.tick();
} catch (e) {
clearInterval(_this.interval);
}
}, 1e3);
},
componentWillUnmount: function() {
clearInterval(this.interval);
},
formatTime: function(seconds) {
var hours = this.formatTwoDigits(parseInt(seconds / 3600, 10) % 24), minutes = this.formatTwoDigits(parseInt(seconds / 60, 10) % 60);
seconds = this.formatTwoDigits(seconds % 60);
return (seconds >= 3600 ? hours + ":" : "") + minutes + ":" + seconds;
},
formatTwoDigits: function(n) {
return 10 > n ? "0" + n : n;
},
getStageWeight: function(stage, item) {
switch (stage) {
case "downloading":
return !1 ? 1 : .3;
case "unzipping":
return !item.isDriver ? 0 : !1 ? .3 : 1;
case "installing":
return 1;
}
},
getStageProgress: function(stage, item) {
var statuses = [ "waiting", "downloading", "downloaded", "unzipping", "unzipped", "installing", "done", "error" ], _item$downloading = item.downloading, downloadedSize = _item$downloading.downloadedSize, totalFileSize = _item$downloading.totalFileSize, unzippedPercents = item.unzipping.unzippedPercents;
switch (stage) {
case "downloading":
return totalFileSize ? Math.min(downloadedSize / totalFileSize, 1) : 0;
case "unzipping":
return !item.isDriver ? 0 : unzippedPercents / 100;
default:
return statuses.indexOf(item.status) > statuses.indexOf(stage) ? 1 : 0;
}
},
getHeaderPercents: function() {
var _this2 = this, installation = this.props.installation, items = installation.items, stages = [ "downloading", "unzipping", "installing" ], totalValue = 0, currentValue = 0;
items.forEach(function(item, index) {
stages.forEach(function(stage) {
totalValue += _this2.getStageWeight(stage, item);
currentValue += _this2.getStageProgress(stage, item) * _this2.getStageWeight(stage, item);
});
});
var percents = totalValue ? Math.round(100 * currentValue / totalValue) : 0;
return percents;
},
render: function() {
var _props = this.props, installation = _props.installation, pauseInstallation = _props.pauseInstallation, expandInstallation = _props.expandInstallation, currentLanguage = _props.currentLanguage, isExpanded = installation.isExpanded;
return _react2["default"].DOM.div({
className: "top-for-header",
style: {
overflow: "hidden"
}
}, _react2["default"].DOM.div({
className: "installation_wrapper",
id: "installation_wrapper"
}, this.renderHeader(), _react2["default"].DOM.div({
className: "installation-table_wrapper",
style: {
display: isExpanded ? "block" : "none"
}
}, _InstallationTitleTable2["default"]({
pauseInstallation: pauseInstallation,
expandInstallation: expandInstallation,
currentLanguage: currentLanguage
}), this.renderInstallationItemsTable())));
},
renderHeader: function() {
var _props2 = this.props, currentLanguage = _props2.currentLanguage, installation = _props2.installation, expandInstallation = _props2.expandInstallation, confirmAvInstallation = _props2.confirmAvInstallation, isExpanded = installation.isExpanded, isConfirmed = installation.isConfirmed, headerProps = {
currentLanguage: currentLanguage,
percents: this.getHeaderPercents(),
time: this.formatTime(this.state.secondsElapsed),
isExpanded: isExpanded,
isConfirmed: isConfirmed,
expandInstallation: expandInstallation,
confirmAvInstallation: confirmAvInstallation
};
return _InstallationHeader2["default"](headerProps);
},
renderInstallationItemsTable: function() {
return _react2["default"].DOM.table({
id: "installation-list",
className: "installation-list",
border: "1"
}, _react2["default"].DOM.thead(null), _react2["default"].DOM.tbody(null, this.renderInstallationItems()));
},
renderInstallationItems: function() {
var list = [], _props3 = this.props, currentLanguage = _props3.currentLanguage, installation = _props3.installation, cancelItemInstallation = _props3.cancelItemInstallation, restartItemInstallation = _props3.restartItemInstallation, items = installation.items;
items.forEach(function(item, index) {
var id = item.id, name = item.name, isDriver = item.isDriver, status = item.status, error = item.error, downloading = item.downloading, unzipping = item.unzipping, itemProps = {
currentLanguage: currentLanguage,
id: id,
name: name,
isDriver: isDriver,
pack: isDriver ? item.recommendedDriver.pack.replace(/_\d+$/, "") : "",
itemCategory: isDriver ? item.recommendedDriver["class"] : item.category,
softDescription: !isDriver ? item.description : null,
status: status,
error: error,
downloading: downloading,
unzipping: unzipping,
cancelItemInstallation: cancelItemInstallation,
restartItemInstallation: restartItemInstallation,
odd: index % 2 === 1
};
list.push(_InstallationItemRow2["default"](itemProps));
});
return list;
}
}), actions = {
expandInstallation: _actionsInstallationActions.expandInstallation,
cancelItemInstallation: _actionsInstallationActions.cancelItemInstallation,
restartItemInstallation: _actionsInstallationActions.restartItemInstallation,
pauseInstallation: _actionsInstallationActions.pauseInstallation,
confirmAvInstallation: _actionsInstallationActions.confirmAvInstallation
};
exports["default"] = _reduxConnect2["default"](mapState, actions)(Installation);
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function expandInstallation(expanded) {
_drpCoreStatistics2["default"].event({
action: "installation expand clicked"
});
return {
type: "NEW_ORDER_INSTALLATION_EXPANDED",
expanded: expanded
};
}
function cancelItemInstallation(itemName, itemId, itemStatus) {
return function(dispatch, getState) {
_drpCoreStatistics2["default"].event({
action: "installation cancel clicked " + itemName
});
var installation = new _utilsInstallation2["default"]();
dispatch(installation.cancelItem(itemId, itemStatus));
};
}
function restartItemInstallation(itemName, itemId, itemStatus) {
var source = arguments.length <= 3 || void 0 === arguments[3] ? "button" : arguments[3];
return function(dispatch, getState) {
"link" === source ? _drpCoreStatistics2["default"].event({
action: "installation restart link clicked " + itemName
}) : _drpCoreStatistics2["default"].event({
action: "installation restart clicked " + itemName
});
var installation = new _utilsInstallation2["default"]();
dispatch(installation.restartItem(itemId, itemStatus));
};
}
function pauseInstallation() {
return function(dispatch, getState) {
_drpCoreStatistics2["default"].event({
action: "installation pause clicked"
});
alert("PAUSED");
};
}
function confirmAvInstallation(item) {
return function(dispatch, getState) {
_drpCoreStatistics2["default"].event({
action: "installation ad clicked 360 Total Security"
});
var promo = Object.assign({}, item);
promo.link = item.link.replace(/\.exe$/, "_promo.exe");
dispatch({
type: "NEW_ORDER_INSTALLATION_AV_CONFIRMED",
promo: promo
});
};
}
exports.__esModule = !0;
exports.expandInstallation = expandInstallation;
exports.cancelItemInstallation = cancelItemInstallation;
exports.restartItemInstallation = restartItemInstallation;
exports.pauseInstallation = pauseInstallation;
exports.confirmAvInstallation = confirmAvInstallation;
var _drpCoreStatistics = __webpack_require__(13), _drpCoreStatistics2 = _interopRequireDefault(_drpCoreStatistics), _utilsInstallation = __webpack_require__(314), _utilsInstallation2 = _interopRequireDefault(_utilsInstallation);
}, function(module, exports, __webpack_require__) {
(function(l) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _InstallationHeaderPercents = __webpack_require__(439), _InstallationHeaderPercents2 = _interopRequireDefault(_InstallationHeaderPercents), _InstallationHeaderTimer = __webpack_require__(448), _InstallationHeaderTimer2 = _interopRequireDefault(_InstallationHeaderTimer), _InstallationHeaderExpand = __webpack_require__(449), _InstallationHeaderExpand2 = _interopRequireDefault(_InstallationHeaderExpand), _InstallationHeaderPromo = __webpack_require__(450), _InstallationHeaderPromo2 = _interopRequireDefault(_InstallationHeaderPromo);
exports["default"] = _react2["default"].createClass({
displayName: "InstallationHeader",
mixins: [ __webpack_require__(336) ],
propTypes: {
percents: _react.PropTypes.number.isRequired,
time: _react.PropTypes.string.isRequired,
isExpanded: _react.PropTypes.bool,
expandInstallation: _react.PropTypes.func,
isConfirmed: _react.PropTypes.object,
confirmAvInstallation: _react.PropTypes.bool,
currentLanguage: _react.PropTypes.string.isRequired
},
shouldShowPromoBanner: function() {
this.props.currentLanguage;
if (true) return !1; else return !0;
},
render: function() {
var _props = this.props, percents = _props.percents, time = _props.time, isExpanded = _props.isExpanded, expandInstallation = _props.expandInstallation, isConfirmed = _props.isConfirmed, confirmAvInstallation = _props.confirmAvInstallation, isReady = "00:00" === time, headerHeight = (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight) - 50;
return _react2["default"].DOM.table({
className: "installation-header_wrapper",
style: {
height: headerHeight
}
}, _react2["default"].DOM.tbody(null, _react2["default"].DOM.tr(null, _react2["default"].DOM.td({
className: "installation-header_wrapper-centered"
}, _react2["default"].DOM.h1({
className: "installation-header_title"
}, isReady ? l("installation_header_preparing") : l("installation_header_title")), _react2["default"].DOM.p({
className: "installation-header_subtitle",
dangerouslySetInnerHTML: {
__html: l("installation_header_subtitle")
}
}), _react2["default"].DOM.div({
className: "installation-header_controls"
}, _react2["default"].DOM.div({
id: "installation-header_progress-holder",
className: "installation-header_progress-holder"
}, _InstallationHeaderPercents2["default"]({
percents: percents
}), _InstallationHeaderTimer2["default"]({
time: time
})), _InstallationHeaderExpand2["default"]({
isExpanded: isExpanded,
expandInstallation: expandInstallation
})), this.shouldShowPromoBanner() ? _InstallationHeaderPromo2["default"]({
isConfirmed: isConfirmed,
confirmAvInstallation: confirmAvInstallation
}) : null))));
}
});
module.exports = exports["default"];
}).call(exports, __webpack_require__(302));
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _utilsGetInternetExplorerVersion = __webpack_require__(47), _utilsGetInternetExplorerVersion2 = _interopRequireDefault(_utilsGetInternetExplorerVersion), _progressbarJs = __webpack_require__(440), _progressbarJs2 = _interopRequireDefault(_progressbarJs), internetExplorerVersion = _utilsGetInternetExplorerVersion2["default"](), shouldDisplayProgress = internetExplorerVersion >= 9 && document.createElementNS;
exports["default"] = _react2["default"].createClass({
displayName: "InstallationHeaderPercents",
mixins: [ __webpack_require__(336) ],
propTypes: {
percents: _react.PropTypes.number.isRequired
},
componentDidMount: function() {
if (shouldDisplayProgress) this.circle = new _progressbarJs2["default"].Circle("#installation-header_progress-holder", {
color: "#ffffff",
strokeWidth: 3,
trailColor: "#777d83",
progress: 0,
duration: 200
});
},
componentDidUpdate: function() {
if (shouldDisplayProgress) {
var percents = this.props.percents;
try {
this.circle.set(percents / 100);
} catch (err) {}
}
},
render: function() {
var percents = this.props.percents;
return _react2["default"].DOM.div({
className: "installation-header_progress-percents"
}, percents, "%");
}
});
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
module.exports = {
Line: __webpack_require__(441),
Circle: __webpack_require__(446),
SemiCircle: __webpack_require__(447),
Path: __webpack_require__(443),
Shape: __webpack_require__(442),
utils: __webpack_require__(445)
};
}, function(module, exports, __webpack_require__) {
var Shape = __webpack_require__(442), utils = __webpack_require__(445), Line = function(container, options) {
this._pathTemplate = "M 0,{center} L 100,{center}";
Shape.apply(this, arguments);
};
Line.prototype = new Shape();
Line.prototype.constructor = Line;
Line.prototype._initializeSvg = function(svg, opts) {
svg.setAttribute("viewBox", "0 0 100 " + opts.strokeWidth);
svg.setAttribute("preserveAspectRatio", "none");
};
Line.prototype._pathString = function(opts) {
return utils.render(this._pathTemplate, {
center: opts.strokeWidth / 2
});
};
Line.prototype._trailString = function(opts) {
return this._pathString(opts);
};
module.exports = Line;
}, function(module, exports, __webpack_require__) {
var Path = __webpack_require__(443), utils = __webpack_require__(445), DESTROYED_ERROR = "Object is destroyed", Shape = function Shape(container, opts) {
if (!(this instanceof Shape)) throw new Error("Constructor was called without new keyword");
if (0 !== arguments.length) {
this._opts = utils.extend({
color: "#555",
strokeWidth: 1,
trailColor: null,
trailWidth: null,
fill: null,
text: {
style: {
color: null,
position: "absolute",
left: "50%",
top: "50%",
padding: 0,
margin: 0,
transform: {
prefix: !0,
value: "translate(-50%, -50%)"
}
},
alignToBottom: !0,
value: "",
className: "progressbar-text"
},
svgStyle: {
display: "block",
width: "100%"
}
}, opts, !0);
var element, svgView = this._createSvgView(this._opts);
if (utils.isString(container)) element = document.querySelector(container); else element = container;
if (!element) throw new Error("Container does not exist: " + container);
this._container = element;
this._container.appendChild(svgView.svg);
if (this._opts.svgStyle) utils.setStyles(svgView.svg, this._opts.svgStyle);
this.text = null;
if (this._opts.text.value) {
this.text = this._createTextElement(this._opts, this._container);
this._container.appendChild(this.text);
}
this.svg = svgView.svg;
this.path = svgView.path;
this.trail = svgView.trail;
var newOpts = utils.extend({
attachment: void 0,
shape: this
}, this._opts);
this._progressPath = new Path(svgView.path, newOpts);
}
};
Shape.prototype.animate = function(progress, opts, cb) {
if (null === this._progressPath) throw new Error(DESTROYED_ERROR);
this._progressPath.animate(progress, opts, cb);
};
Shape.prototype.stop = function() {
if (null === this._progressPath) throw new Error(DESTROYED_ERROR);
if (void 0 !== this._progressPath) this._progressPath.stop();
};
Shape.prototype.destroy = function() {
if (null === this._progressPath) throw new Error(DESTROYED_ERROR);
this.stop();
this.svg.parentNode.removeChild(this.svg);
this.svg = null;
this.path = null;
this.trail = null;
this._progressPath = null;
if (null !== this.text) {
this.text.parentNode.removeChild(this.text);
this.text = null;
}
};
Shape.prototype.set = function(progress) {
if (null === this._progressPath) throw new Error(DESTROYED_ERROR);
this._progressPath.set(progress);
};
Shape.prototype.value = function() {
if (null === this._progressPath) throw new Error(DESTROYED_ERROR);
if (void 0 === this._progressPath) return 0; else return this._progressPath.value();
};
Shape.prototype.setText = function(text) {
if (null === this._progressPath) throw new Error(DESTROYED_ERROR);
if (null === this.text) {
this.text = this._createTextElement(this._opts, this._container);
this._container.appendChild(this.text);
}
this.text.removeChild(this.text.firstChild);
this.text.appendChild(document.createTextNode(text));
};
Shape.prototype._createSvgView = function(opts) {
var svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
this._initializeSvg(svg, opts);
var trailPath = null;
if (opts.trailColor || opts.trailWidth) {
trailPath = this._createTrail(opts);
svg.appendChild(trailPath);
}
var path = this._createPath(opts);
svg.appendChild(path);
return {
svg: svg,
path: path,
trail: trailPath
};
};
Shape.prototype._initializeSvg = function(svg, opts) {
svg.setAttribute("viewBox", "0 0 100 100");
};
Shape.prototype._createPath = function(opts) {
var pathString = this._pathString(opts);
return this._createPathElement(pathString, opts);
};
Shape.prototype._createTrail = function(opts) {
var pathString = this._trailString(opts), newOpts = utils.extend({}, opts);
if (!newOpts.trailColor) newOpts.trailColor = "#eee";
if (!newOpts.trailWidth) newOpts.trailWidth = newOpts.strokeWidth;
newOpts.color = newOpts.trailColor;
newOpts.strokeWidth = newOpts.trailWidth;
newOpts.fill = null;
return this._createPathElement(pathString, newOpts);
};
Shape.prototype._createPathElement = function(pathString, opts) {
var path = document.createElementNS("http://www.w3.org/2000/svg", "path");
path.setAttribute("d", pathString);
path.setAttribute("stroke", opts.color);
path.setAttribute("stroke-width", opts.strokeWidth);
if (opts.fill) path.setAttribute("fill", opts.fill); else path.setAttribute("fill-opacity", "0");
return path;
};
Shape.prototype._createTextElement = function(opts, container) {
var element = document.createElement("p");
element.appendChild(document.createTextNode(opts.text.value));
var textStyle = opts.text.style;
if (textStyle) {
container.style.position = "relative";
utils.setStyles(element, textStyle);
if (!textStyle.color) element.style.color = opts.color;
}
element.className = opts.text.className;
this._initializeTextElement(opts, container, element);
return element;
};
Shape.prototype._initializeTextElement = function(opts, container, element) {};
Shape.prototype._pathString = function(opts) {
throw new Error("Override this function for each progress bar");
};
Shape.prototype._trailString = function(opts) {
throw new Error("Override this function for each progress bar");
};
module.exports = Shape;
}, function(module, exports, __webpack_require__) {
var Tweenable = __webpack_require__(444), utils = __webpack_require__(445), EASING_ALIASES = {
easeIn: "easeInCubic",
easeOut: "easeOutCubic",
easeInOut: "easeInOutCubic"
}, Path = function(path, opts) {
opts = utils.extend({
duration: 800,
easing: "linear",
from: {},
to: {},
step: function() {}
}, opts);
var element;
if (utils.isString(path)) element = document.querySelector(path); else element = path;
this.path = element;
this._opts = opts;
this._tweenable = null;
var length = this.path.getTotalLength();
this.path.style.strokeDasharray = length + " " + length;
this.set(0);
};
Path.prototype.value = function() {
var offset = this._getComputedDashOffset(), length = this.path.getTotalLength(), progress = 1 - offset / length;
return parseFloat(progress.toFixed(6), 10);
};
Path.prototype.set = function(progress) {
this.stop();
this.path.style.strokeDashoffset = this._progressToOffset(progress);
var step = this._opts.step;
if (utils.isFunction(step)) {
var easing = this._easing(this._opts.easing), values = this._calculateTo(progress, easing), reference = this._opts.shape || this;
step(values, reference, this._opts.attachment);
}
};
Path.prototype.stop = function() {
this._stopTween();
this.path.style.strokeDashoffset = this._getComputedDashOffset();
};
Path.prototype.animate = function(progress, opts, cb) {
opts = opts || {};
if (utils.isFunction(opts)) {
cb = opts;
opts = {};
}
var passedOpts = utils.extend({}, opts), defaultOpts = utils.extend({}, this._opts);
opts = utils.extend(defaultOpts, opts);
var shiftyEasing = this._easing(opts.easing), values = this._resolveFromAndTo(progress, shiftyEasing, passedOpts);
this.stop();
this.path.getBoundingClientRect();
var offset = this._getComputedDashOffset(), newOffset = this._progressToOffset(progress), self = this;
this._tweenable = new Tweenable();
this._tweenable.tween({
from: utils.extend({
offset: offset
}, values.from),
to: utils.extend({
offset: newOffset
}, values.to),
duration: opts.duration,
easing: shiftyEasing,
step: function(state) {
self.path.style.strokeDashoffset = state.offset;
var reference = opts.shape || self;
opts.step(state, reference, opts.attachment);
},
finish: function(state) {
if (utils.isFunction(cb)) cb();
}
});
};
Path.prototype._getComputedDashOffset = function() {
var computedStyle = window.getComputedStyle(this.path, null);
return parseFloat(computedStyle.getPropertyValue("stroke-dashoffset"), 10);
};
Path.prototype._progressToOffset = function(progress) {
var length = this.path.getTotalLength();
return length - progress * length;
};
Path.prototype._resolveFromAndTo = function(progress, easing, opts) {
if (opts.from && opts.to) return {
from: opts.from,
to: opts.to
}; else return {
from: this._calculateFrom(easing),
to: this._calculateTo(progress, easing)
};
};
Path.prototype._calculateFrom = function(easing) {
return Tweenable.interpolate(this._opts.from, this._opts.to, this.value(), easing);
};
Path.prototype._calculateTo = function(progress, easing) {
return Tweenable.interpolate(this._opts.from, this._opts.to, progress, easing);
};
Path.prototype._stopTween = function() {
if (null !== this._tweenable) {
this._tweenable.stop();
this._tweenable.dispose();
this._tweenable = null;
}
};
Path.prototype._easing = function(easing) {
if (EASING_ALIASES.hasOwnProperty(easing)) return EASING_ALIASES[easing]; else return easing;
};
module.exports = Path;
}, function(module, exports, __webpack_require__) {
(function() {
var root = this, Tweenable = function() {
"use strict";
function noop() {}
function each(obj, fn) {
var key;
for (key in obj) if (Object.hasOwnProperty.call(obj, key)) fn(key);
}
function shallowCopy(targetObj, srcObj) {
each(srcObj, function(prop) {
targetObj[prop] = srcObj[prop];
});
return targetObj;
}
function defaults(target, src) {
each(src, function(prop) {
if ("undefined" == typeof target[prop]) target[prop] = src[prop];
});
}
function tweenProps(forPosition, currentState, originalState, targetState, duration, timestamp, easing) {
var prop, easingObjectProp, easingFn, normalizedPosition = timestamp > forPosition ? 0 : (forPosition - timestamp) / duration;
for (prop in currentState) if (currentState.hasOwnProperty(prop)) {
easingObjectProp = easing[prop];
easingFn = "function" == typeof easingObjectProp ? easingObjectProp : formula[easingObjectProp];
currentState[prop] = tweenProp(originalState[prop], targetState[prop], easingFn, normalizedPosition);
}
return currentState;
}
function tweenProp(start, end, easingFunc, position) {
return start + (end - start) * easingFunc(position);
}
function applyFilter(tweenable, filterName) {
var filters = Tweenable.prototype.filter, args = tweenable._filterArgs;
each(filters, function(name) {
if ("undefined" != typeof filters[name][filterName]) filters[name][filterName].apply(tweenable, args);
});
}
function timeoutHandler(tweenable, timestamp, delay, duration, currentState, originalState, targetState, easing, step, schedule, opt_currentTimeOverride) {
timeoutHandler_endTime = timestamp + delay + duration;
timeoutHandler_currentTime = Math.min(opt_currentTimeOverride || now(), timeoutHandler_endTime);
timeoutHandler_isEnded = timeoutHandler_currentTime >= timeoutHandler_endTime;
timeoutHandler_offset = duration - (timeoutHandler_endTime - timeoutHandler_currentTime);
if (tweenable.isPlaying() && !timeoutHandler_isEnded) {
tweenable._scheduleId = schedule(tweenable._timeoutHandler, UPDATE_TIME);
applyFilter(tweenable, "beforeTween");
if (timestamp + delay > timeoutHandler_currentTime) tweenProps(1, currentState, originalState, targetState, 1, 1, easing); else tweenProps(timeoutHandler_currentTime, currentState, originalState, targetState, duration, timestamp + delay, easing);
applyFilter(tweenable, "afterTween");
step(currentState, tweenable._attachment, timeoutHandler_offset);
} else if (tweenable.isPlaying() && timeoutHandler_isEnded) {
step(targetState, tweenable._attachment, timeoutHandler_offset);
tweenable.stop(!0);
}
}
function composeEasingObject(fromTweenParams, easing) {
var composedEasing = {}, typeofEasing = typeof easing;
if ("string" === typeofEasing || "function" === typeofEasing) each(fromTweenParams, function(prop) {
composedEasing[prop] = easing;
}); else each(fromTweenParams, function(prop) {
if (!composedEasing[prop]) composedEasing[prop] = easing[prop] || DEFAULT_EASING;
});
return composedEasing;
}
function Tweenable(opt_initialState, opt_config) {
this._currentState = opt_initialState || {};
this._configured = !1;
this._scheduleFunction = DEFAULT_SCHEDULE_FUNCTION;
if ("undefined" != typeof opt_config) this.setConfig(opt_config);
}
var formula, DEFAULT_SCHEDULE_FUNCTION, DEFAULT_EASING = "linear", DEFAULT_DURATION = 500, UPDATE_TIME = 1e3 / 60, _now = Date.now ? Date.now : function() {
return +new Date();
}, now = "undefined" != typeof SHIFTY_DEBUG_NOW ? SHIFTY_DEBUG_NOW : _now;
if ("undefined" != typeof window) DEFAULT_SCHEDULE_FUNCTION = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || window.mozCancelRequestAnimationFrame && window.mozRequestAnimationFrame || setTimeout; else DEFAULT_SCHEDULE_FUNCTION = setTimeout;
var timeoutHandler_endTime, timeoutHandler_currentTime, timeoutHandler_isEnded, timeoutHandler_offset;
Tweenable.prototype.tween = function(opt_config) {
if (this._isTweening) return this;
if (void 0 !== opt_config || !this._configured) this.setConfig(opt_config);
this._timestamp = now();
this._start(this.get(), this._attachment);
return this.resume();
};
Tweenable.prototype.setConfig = function(config) {
config = config || {};
this._configured = !0;
this._attachment = config.attachment;
this._pausedAtTime = null;
this._scheduleId = null;
this._delay = config.delay || 0;
this._start = config.start || noop;
this._step = config.step || noop;
this._finish = config.finish || noop;
this._duration = config.duration || DEFAULT_DURATION;
this._currentState = shallowCopy({}, config.from) || this.get();
this._originalState = this.get();
this._targetState = shallowCopy({}, config.to) || this.get();
var self = this;
this._timeoutHandler = function() {
timeoutHandler(self, self._timestamp, self._delay, self._duration, self._currentState, self._originalState, self._targetState, self._easing, self._step, self._scheduleFunction);
};
var currentState = this._currentState, targetState = this._targetState;
defaults(targetState, currentState);
this._easing = composeEasingObject(currentState, config.easing || DEFAULT_EASING);
this._filterArgs = [ currentState, this._originalState, targetState, this._easing ];
applyFilter(this, "tweenCreated");
return this;
};
Tweenable.prototype.get = function() {
return shallowCopy({}, this._currentState);
};
Tweenable.prototype.set = function(state) {
this._currentState = state;
};
Tweenable.prototype.pause = function() {
this._pausedAtTime = now();
this._isPaused = !0;
return this;
};
Tweenable.prototype.resume = function() {
if (this._isPaused) this._timestamp += now() - this._pausedAtTime;
this._isPaused = !1;
this._isTweening = !0;
this._timeoutHandler();
return this;
};
Tweenable.prototype.seek = function(millisecond) {
millisecond = Math.max(millisecond, 0);
var currentTime = now();
if (this._timestamp + millisecond === 0) return this;
this._timestamp = currentTime - millisecond;
if (!this.isPlaying()) {
this._isTweening = !0;
this._isPaused = !1;
timeoutHandler(this, this._timestamp, this._delay, this._duration, this._currentState, this._originalState, this._targetState, this._easing, this._step, this._scheduleFunction, currentTime);
this.pause();
}
return this;
};
Tweenable.prototype.stop = function(gotoEnd) {
this._isTweening = !1;
this._isPaused = !1;
this._timeoutHandler = noop;
(root.cancelAnimationFrame || root.webkitCancelAnimationFrame || root.oCancelAnimationFrame || root.msCancelAnimationFrame || root.mozCancelRequestAnimationFrame || root.clearTimeout)(this._scheduleId);
if (gotoEnd) {
applyFilter(this, "beforeTween");
tweenProps(1, this._currentState, this._originalState, this._targetState, 1, 0, this._easing);
applyFilter(this, "afterTween");
applyFilter(this, "afterTweenEnd");
this._finish.call(this, this._currentState, this._attachment);
}
return this;
};
Tweenable.prototype.isPlaying = function() {
return this._isTweening && !this._isPaused;
};
Tweenable.prototype.setScheduleFunction = function(scheduleFunction) {
this._scheduleFunction = scheduleFunction;
};
Tweenable.prototype.dispose = function() {
var prop;
for (prop in this) if (this.hasOwnProperty(prop)) delete this[prop];
};
Tweenable.prototype.filter = {};
Tweenable.prototype.formula = {
linear: function(pos) {
return pos;
}
};
formula = Tweenable.prototype.formula;
shallowCopy(Tweenable, {
now: now,
each: each,
tweenProps: tweenProps,
tweenProp: tweenProp,
applyFilter: applyFilter,
shallowCopy: shallowCopy,
defaults: defaults,
composeEasingObject: composeEasingObject
});
if ("function" == typeof SHIFTY_DEBUG_NOW) root.timeoutHandler = timeoutHandler;
if (!0) module.exports = Tweenable; else if ("function" == typeof define && define.amd) define(function() {
return Tweenable;
}); else if ("undefined" == typeof root.Tweenable) root.Tweenable = Tweenable;
return Tweenable;
}();
!function() {
Tweenable.shallowCopy(Tweenable.prototype.formula, {
easeInQuad: function(pos) {
return Math.pow(pos, 2);
},
easeOutQuad: function(pos) {
return -(Math.pow(pos - 1, 2) - 1);
},
easeInOutQuad: function(pos) {
if ((pos /= .5) < 1) return .5 * Math.pow(pos, 2); else return -.5 * ((pos -= 2) * pos - 2);
},
easeInCubic: function(pos) {
return Math.pow(pos, 3);
},
easeOutCubic: function(pos) {
return Math.pow(pos - 1, 3) + 1;
},
easeInOutCubic: function(pos) {
if ((pos /= .5) < 1) return .5 * Math.pow(pos, 3); else return .5 * (Math.pow(pos - 2, 3) + 2);
},
easeInQuart: function(pos) {
return Math.pow(pos, 4);
},
easeOutQuart: function(pos) {
return -(Math.pow(pos - 1, 4) - 1);
},
easeInOutQuart: function(pos) {
if ((pos /= .5) < 1) return .5 * Math.pow(pos, 4); else return -.5 * ((pos -= 2) * Math.pow(pos, 3) - 2);
},
easeInQuint: function(pos) {
return Math.pow(pos, 5);
},
easeOutQuint: function(pos) {
return Math.pow(pos - 1, 5) + 1;
},
easeInOutQuint: function(pos) {
if ((pos /= .5) < 1) return .5 * Math.pow(pos, 5); else return .5 * (Math.pow(pos - 2, 5) + 2);
},
easeInSine: function(pos) {
return -Math.cos(pos * (Math.PI / 2)) + 1;
},
easeOutSine: function(pos) {
return Math.sin(pos * (Math.PI / 2));
},
easeInOutSine: function(pos) {
return -.5 * (Math.cos(Math.PI * pos) - 1);
},
easeInExpo: function(pos) {
return 0 === pos ? 0 : Math.pow(2, 10 * (pos - 1));
},
easeOutExpo: function(pos) {
return 1 === pos ? 1 : -Math.pow(2, -10 * pos) + 1;
},
easeInOutExpo: function(pos) {
if (0 === pos) return 0;
if (1 === pos) return 1;
if ((pos /= .5) < 1) return .5 * Math.pow(2, 10 * (pos - 1)); else return .5 * (-Math.pow(2, -10 * --pos) + 2);
},
easeInCirc: function(pos) {
return -(Math.sqrt(1 - pos * pos) - 1);
},
easeOutCirc: function(pos) {
return Math.sqrt(1 - Math.pow(pos - 1, 2));
},
easeInOutCirc: function(pos) {
if ((pos /= .5) < 1) return -.5 * (Math.sqrt(1 - pos * pos) - 1); else return .5 * (Math.sqrt(1 - (pos -= 2) * pos) + 1);
},
easeOutBounce: function(pos) {
if (1 / 2.75 > pos) return 7.5625 * pos * pos; else if (2 / 2.75 > pos) return 7.5625 * (pos -= 1.5 / 2.75) * pos + .75; else if (2.5 / 2.75 > pos) return 7.5625 * (pos -= 2.25 / 2.75) * pos + .9375; else return 7.5625 * (pos -= 2.625 / 2.75) * pos + .984375;
},
easeInBack: function(pos) {
var s = 1.70158;
return pos * pos * ((s + 1) * pos - s);
},
easeOutBack: function(pos) {
var s = 1.70158;
return (pos -= 1) * pos * ((s + 1) * pos + s) + 1;
},
easeInOutBack: function(pos) {
var s = 1.70158;
if ((pos /= .5) < 1) return .5 * (pos * pos * (((s *= 1.525) + 1) * pos - s)); else return .5 * ((pos -= 2) * pos * (((s *= 1.525) + 1) * pos + s) + 2);
},
elastic: function(pos) {
return -1 * Math.pow(4, -8 * pos) * Math.sin((6 * pos - 1) * (2 * Math.PI) / 2) + 1;
},
swingFromTo: function(pos) {
var s = 1.70158;
return (pos /= .5) < 1 ? .5 * (pos * pos * (((s *= 1.525) + 1) * pos - s)) : .5 * ((pos -= 2) * pos * (((s *= 1.525) + 1) * pos + s) + 2);
},
swingFrom: function(pos) {
var s = 1.70158;
return pos * pos * ((s + 1) * pos - s);
},
swingTo: function(pos) {
var s = 1.70158;
return (pos -= 1) * pos * ((s + 1) * pos + s) + 1;
},
bounce: function(pos) {
if (1 / 2.75 > pos) return 7.5625 * pos * pos; else if (2 / 2.75 > pos) return 7.5625 * (pos -= 1.5 / 2.75) * pos + .75; else if (2.5 / 2.75 > pos) return 7.5625 * (pos -= 2.25 / 2.75) * pos + .9375; else return 7.5625 * (pos -= 2.625 / 2.75) * pos + .984375;
},
bouncePast: function(pos) {
if (1 / 2.75 > pos) return 7.5625 * pos * pos; else if (2 / 2.75 > pos) return 2 - (7.5625 * (pos -= 1.5 / 2.75) * pos + .75); else if (2.5 / 2.75 > pos) return 2 - (7.5625 * (pos -= 2.25 / 2.75) * pos + .9375); else return 2 - (7.5625 * (pos -= 2.625 / 2.75) * pos + .984375);
},
easeFromTo: function(pos) {
if ((pos /= .5) < 1) return .5 * Math.pow(pos, 4); else return -.5 * ((pos -= 2) * Math.pow(pos, 3) - 2);
},
easeFrom: function(pos) {
return Math.pow(pos, 4);
},
easeTo: function(pos) {
return Math.pow(pos, .25);
}
});
}();
!function() {
function cubicBezierAtTime(t, p1x, p1y, p2x, p2y, duration) {
function sampleCurveX(t) {
return ((ax * t + bx) * t + cx) * t;
}
function sampleCurveY(t) {
return ((ay * t + by) * t + cy) * t;
}
function sampleCurveDerivativeX(t) {
return (3 * ax * t + 2 * bx) * t + cx;
}
function solveEpsilon(duration) {
return 1 / (200 * duration);
}
function solve(x, epsilon) {
return sampleCurveY(solveCurveX(x, epsilon));
}
function fabs(n) {
if (n >= 0) return n; else return 0 - n;
}
function solveCurveX(x, epsilon) {
var t0, t1, t2, x2, d2, i;
for (t2 = x, i = 0; 8 > i; i++) {
x2 = sampleCurveX(t2) - x;
if (fabs(x2) < epsilon) return t2;
d2 = sampleCurveDerivativeX(t2);
if (fabs(d2) < 1e-6) break;
t2 -= x2 / d2;
}
t0 = 0;
t1 = 1;
t2 = x;
if (t0 > t2) return t0;
if (t2 > t1) return t1;
for (;t1 > t0; ) {
x2 = sampleCurveX(t2);
if (fabs(x2 - x) < epsilon) return t2;
if (x > x2) t0 = t2; else t1 = t2;
t2 = .5 * (t1 - t0) + t0;
}
return t2;
}
var ax = 0, bx = 0, cx = 0, ay = 0, by = 0, cy = 0;
cx = 3 * p1x;
bx = 3 * (p2x - p1x) - cx;
ax = 1 - cx - bx;
cy = 3 * p1y;
by = 3 * (p2y - p1y) - cy;
ay = 1 - cy - by;
return solve(t, solveEpsilon(duration));
}
function getCubicBezierTransition(x1, y1, x2, y2) {
return function(pos) {
return cubicBezierAtTime(pos, x1, y1, x2, y2, 1);
};
}
Tweenable.setBezierFunction = function(name, x1, y1, x2, y2) {
var cubicBezierTransition = getCubicBezierTransition(x1, y1, x2, y2);
cubicBezierTransition.displayName = name;
cubicBezierTransition.x1 = x1;
cubicBezierTransition.y1 = y1;
cubicBezierTransition.x2 = x2;
cubicBezierTransition.y2 = y2;
return Tweenable.prototype.formula[name] = cubicBezierTransition;
};
Tweenable.unsetBezierFunction = function(name) {
delete Tweenable.prototype.formula[name];
};
}();
!function() {
function getInterpolatedValues(from, current, targetState, position, easing, delay) {
return Tweenable.tweenProps(position, current, from, targetState, 1, delay, easing);
}
var mockTweenable = new Tweenable();
mockTweenable._filterArgs = [];
Tweenable.interpolate = function(from, targetState, position, easing, opt_delay) {
var current = Tweenable.shallowCopy({}, from), delay = opt_delay || 0, easingObject = Tweenable.composeEasingObject(from, easing || "linear");
mockTweenable.set({});
var filterArgs = mockTweenable._filterArgs;
filterArgs.length = 0;
filterArgs[0] = current;
filterArgs[1] = from;
filterArgs[2] = targetState;
filterArgs[3] = easingObject;
Tweenable.applyFilter(mockTweenable, "tweenCreated");
Tweenable.applyFilter(mockTweenable, "beforeTween");
var interpolatedValues = getInterpolatedValues(from, current, targetState, position, easingObject, delay);
Tweenable.applyFilter(mockTweenable, "afterTween");
return interpolatedValues;
};
}();
!function(Tweenable) {
function getFormatChunksFrom(rawValues, prefix) {
var i, accumulator = [], rawValuesLength = rawValues.length;
for (i = 0; rawValuesLength > i; i++) accumulator.push("_" + prefix + "_" + i);
return accumulator;
}
function getFormatStringFrom(formattedString) {
var chunks = formattedString.match(R_FORMAT_CHUNKS);
if (!chunks) chunks = [ "", "" ]; else if (1 === chunks.length || formattedString[0].match(R_NUMBER_COMPONENT)) chunks.unshift("");
return chunks.join(VALUE_PLACEHOLDER);
}
function sanitizeObjectForHexProps(stateObject) {
Tweenable.each(stateObject, function(prop) {
var currentProp = stateObject[prop];
if ("string" == typeof currentProp && currentProp.match(R_HEX)) stateObject[prop] = sanitizeHexChunksToRGB(currentProp);
});
}
function sanitizeHexChunksToRGB(str) {
return filterStringChunks(R_HEX, str, convertHexToRGB);
}
function convertHexToRGB(hexString) {
var rgbArr = hexToRGBArray(hexString);
return "rgb(" + rgbArr[0] + "," + rgbArr[1] + "," + rgbArr[2] + ")";
}
function hexToRGBArray(hex) {
hex = hex.replace(/#/, "");
if (3 === hex.length) {
hex = hex.split("");
hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
}
hexToRGBArray_returnArray[0] = hexToDec(hex.substr(0, 2));
hexToRGBArray_returnArray[1] = hexToDec(hex.substr(2, 2));
hexToRGBArray_returnArray[2] = hexToDec(hex.substr(4, 2));
return hexToRGBArray_returnArray;
}
function hexToDec(hex) {
return parseInt(hex, 16);
}
function filterStringChunks(pattern, unfilteredString, filter) {
var pattenMatches = unfilteredString.match(pattern), filteredString = unfilteredString.replace(pattern, VALUE_PLACEHOLDER);
if (pattenMatches) for (var currentChunk, pattenMatchesLength = pattenMatches.length, i = 0; pattenMatchesLength > i; i++) {
currentChunk = pattenMatches.shift();
filteredString = filteredString.replace(VALUE_PLACEHOLDER, filter(currentChunk));
}
return filteredString;
}
function sanitizeRGBChunks(formattedString) {
return filterStringChunks(R_RGB, formattedString, sanitizeRGBChunk);
}
function sanitizeRGBChunk(rgbChunk) {
for (var numbers = rgbChunk.match(R_UNFORMATTED_VALUES), numbersLength = numbers.length, sanitizedString = rgbChunk.match(R_RGB_PREFIX)[0], i = 0; numbersLength > i; i++) sanitizedString += parseInt(numbers[i], 10) + ",";
sanitizedString = sanitizedString.slice(0, -1) + ")";
return sanitizedString;
}
function getFormatManifests(stateObject) {
var manifestAccumulator = {};
Tweenable.each(stateObject, function(prop) {
var currentProp = stateObject[prop];
if ("string" == typeof currentProp) {
var rawValues = getValuesFrom(currentProp);
manifestAccumulator[prop] = {
formatString: getFormatStringFrom(currentProp),
chunkNames: getFormatChunksFrom(rawValues, prop)
};
}
});
return manifestAccumulator;
}
function expandFormattedProperties(stateObject, formatManifests) {
Tweenable.each(formatManifests, function(prop) {
for (var currentProp = stateObject[prop], rawValues = getValuesFrom(currentProp), rawValuesLength = rawValues.length, i = 0; rawValuesLength > i; i++) stateObject[formatManifests[prop].chunkNames[i]] = +rawValues[i];
delete stateObject[prop];
});
}
function collapseFormattedProperties(stateObject, formatManifests) {
Tweenable.each(formatManifests, function(prop) {
var currentProp = stateObject[prop], formatChunks = extractPropertyChunks(stateObject, formatManifests[prop].chunkNames), valuesList = getValuesList(formatChunks, formatManifests[prop].chunkNames);
currentProp = getFormattedValues(formatManifests[prop].formatString, valuesList);
stateObject[prop] = sanitizeRGBChunks(currentProp);
});
}
function extractPropertyChunks(stateObject, chunkNames) {
for (var currentChunkName, extractedValues = {}, chunkNamesLength = chunkNames.length, i = 0; chunkNamesLength > i; i++) {
currentChunkName = chunkNames[i];
extractedValues[currentChunkName] = stateObject[currentChunkName];
delete stateObject[currentChunkName];
}
return extractedValues;
}
function getValuesList(stateObject, chunkNames) {
getValuesList_accumulator.length = 0;
for (var chunkNamesLength = chunkNames.length, i = 0; chunkNamesLength > i; i++) getValuesList_accumulator.push(stateObject[chunkNames[i]]);
return getValuesList_accumulator;
}
function getFormattedValues(formatString, rawValues) {
for (var formattedValueString = formatString, rawValuesLength = rawValues.length, i = 0; rawValuesLength > i; i++) formattedValueString = formattedValueString.replace(VALUE_PLACEHOLDER, +rawValues[i].toFixed(4));
return formattedValueString;
}
function getValuesFrom(formattedString) {
return formattedString.match(R_UNFORMATTED_VALUES);
}
function expandEasingObject(easingObject, tokenData) {
Tweenable.each(tokenData, function(prop) {
var i, currentProp = tokenData[prop], chunkNames = currentProp.chunkNames, chunkLength = chunkNames.length, easing = easingObject[prop];
if ("string" == typeof easing) {
var easingChunks = easing.split(" "), lastEasingChunk = easingChunks[easingChunks.length - 1];
for (i = 0; chunkLength > i; i++) easingObject[chunkNames[i]] = easingChunks[i] || lastEasingChunk;
} else for (i = 0; chunkLength > i; i++) easingObject[chunkNames[i]] = easing;
delete easingObject[prop];
});
}
function collapseEasingObject(easingObject, tokenData) {
Tweenable.each(tokenData, function(prop) {
var currentProp = tokenData[prop], chunkNames = currentProp.chunkNames, chunkLength = chunkNames.length, firstEasing = easingObject[chunkNames[0]], typeofEasings = typeof firstEasing;
if ("string" === typeofEasings) {
for (var composedEasingString = "", i = 0; chunkLength > i; i++) {
composedEasingString += " " + easingObject[chunkNames[i]];
delete easingObject[chunkNames[i]];
}
easingObject[prop] = composedEasingString.substr(1);
} else easingObject[prop] = firstEasing;
});
}
var R_NUMBER_COMPONENT = /(\d|\-|\.)/, R_FORMAT_CHUNKS = /([^\-0-9\.]+)/g, R_UNFORMATTED_VALUES = /[0-9.\-]+/g, R_RGB = new RegExp("rgb\\(" + R_UNFORMATTED_VALUES.source + /,\s*/.source + R_UNFORMATTED_VALUES.source + /,\s*/.source + R_UNFORMATTED_VALUES.source + "\\)", "g"), R_RGB_PREFIX = /^.*\(/, R_HEX = /#([0-9]|[a-f]){3,6}/gi, VALUE_PLACEHOLDER = "VAL", hexToRGBArray_returnArray = [], getValuesList_accumulator = [];
Tweenable.prototype.filter.token = {
tweenCreated: function(currentState, fromState, toState, easingObject) {
sanitizeObjectForHexProps(currentState);
sanitizeObjectForHexProps(fromState);
sanitizeObjectForHexProps(toState);
this._tokenData = getFormatManifests(currentState);
},
beforeTween: function(currentState, fromState, toState, easingObject) {
expandEasingObject(easingObject, this._tokenData);
expandFormattedProperties(currentState, this._tokenData);
expandFormattedProperties(fromState, this._tokenData);
expandFormattedProperties(toState, this._tokenData);
},
afterTween: function(currentState, fromState, toState, easingObject) {
collapseFormattedProperties(currentState, this._tokenData);
collapseFormattedProperties(fromState, this._tokenData);
collapseFormattedProperties(toState, this._tokenData);
collapseEasingObject(easingObject, this._tokenData);
}
};
}(Tweenable);
}).call(null);
}, function(module, exports) {
function extend(destination, source, recursive) {
destination = destination || {};
source = source || {};
recursive = recursive || !1;
for (var attrName in source) if (source.hasOwnProperty(attrName)) {
var destVal = destination[attrName], sourceVal = source[attrName];
if (recursive && isObject(destVal) && isObject(sourceVal)) destination[attrName] = extend(destVal, sourceVal, recursive); else destination[attrName] = sourceVal;
}
return destination;
}
function render(template, vars) {
var rendered = template;
for (var key in vars) if (vars.hasOwnProperty(key)) {
var val = vars[key], regExpString = "\\{" + key + "\\}", regExp = new RegExp(regExpString, "g");
rendered = rendered.replace(regExp, val);
}
return rendered;
}
function setStyle(element, style, value) {
for (var i = 0; i < PREFIXES.length; ++i) {
var prefix = PREFIXES[i];
element.style[prefix + capitalize(style)] = value;
}
element.style[style] = value;
}
function setStyles(element, styles) {
forEachObject(styles, function(styleValue, styleName) {
if (null !== styleValue && void 0 !== styleValue) if (isObject(styleValue) && styleValue.prefix === !0) setStyle(element, styleName, styleValue.value); else element.style[styleName] = styleValue;
});
}
function capitalize(text) {
return text.charAt(0).toUpperCase() + text.slice(1);
}
function isString(obj) {
return "string" == typeof obj || obj instanceof String;
}
function isFunction(obj) {
return "function" == typeof obj;
}
function isArray(obj) {
return "[object Array]" === Object.prototype.toString.call(obj);
}
function isObject(obj) {
if (isArray(obj)) return !1;
var type = typeof obj;
return "object" === type && !!obj;
}
function forEachObject(object, callback) {
for (var key in object) if (object.hasOwnProperty(key)) {
var val = object[key];
callback(val, key);
}
}
var PREFIXES = "Webkit Moz O ms".split(" ");
module.exports = {
extend: extend,
render: render,
setStyle: setStyle,
setStyles: setStyles,
capitalize: capitalize,
isString: isString,
isFunction: isFunction,
isObject: isObject,
forEachObject: forEachObject
};
}, function(module, exports, __webpack_require__) {
var Shape = __webpack_require__(442), utils = __webpack_require__(445), Circle = function(container, options) {
this._pathTemplate = "M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}";
Shape.apply(this, arguments);
};
Circle.prototype = new Shape();
Circle.prototype.constructor = Circle;
Circle.prototype._pathString = function(opts) {
var widthOfWider = opts.strokeWidth;
if (opts.trailWidth && opts.trailWidth > opts.strokeWidth) widthOfWider = opts.trailWidth;
var r = 50 - widthOfWider / 2;
return utils.render(this._pathTemplate, {
radius: r,
"2radius": 2 * r
});
};
Circle.prototype._trailString = function(opts) {
return this._pathString(opts);
};
module.exports = Circle;
}, function(module, exports, __webpack_require__) {
var Shape = __webpack_require__(442), Circle = __webpack_require__(446), utils = __webpack_require__(445), SemiCircle = function(container, options) {
this._pathTemplate = "M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0";
Shape.apply(this, arguments);
};
SemiCircle.prototype = new Shape();
SemiCircle.prototype.constructor = SemiCircle;
SemiCircle.prototype._initializeSvg = function(svg, opts) {
svg.setAttribute("viewBox", "0 0 100 50");
};
SemiCircle.prototype._initializeTextElement = function(opts, container, element) {
if (opts.text.style) {
element.style.top = "auto";
element.style.bottom = "0";
if (opts.text.alignToBottom) utils.setStyle(element, "transform", "translate(-50%, 0)"); else utils.setStyle(element, "transform", "translate(-50%, 50%)");
}
};
SemiCircle.prototype._pathString = Circle.prototype._pathString;
SemiCircle.prototype._trailString = Circle.prototype._trailString;
module.exports = SemiCircle;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react);
exports["default"] = _react2["default"].createClass({
displayName: "InstallationHeaderTimer",
mixins: [ __webpack_require__(336) ],
propTypes: {
time: _react.PropTypes.string.isRequired
},
render: function() {
var time = this.props.time;
return _react2["default"].DOM.div({
className: "installation-header_progress-time"
}, time);
}
});
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _Img = __webpack_require__(335), _Img2 = _interopRequireDefault(_Img), _utilsGetInternetExplorerVersion = __webpack_require__(47), _utilsGetInternetExplorerVersion2 = _interopRequireDefault(_utilsGetInternetExplorerVersion), internetExplorerVersion = _utilsGetInternetExplorerVersion2["default"]();
exports["default"] = _react2["default"].createClass({
displayName: "InstallationHeaderExpand",
mixins: [ __webpack_require__(336) ],
propTypes: {
isExpanded: _react.PropTypes.bool,
expandInstallation: _react.PropTypes.func
},
shouldFixHoverIcon: function() {
if (-1 !== internetExplorerVersion) if (10 > internetExplorerVersion) return !0; else return !1; else return !1;
},
render: function() {
var _props = this.props, isExpanded = _props.isExpanded, expandInstallation = _props.expandInstallation;
return _react2["default"].DOM.a({
className: "installation-header_expand",
onClick: function(e) {
e.preventDefault();
expandInstallation(!isExpanded);
setTimeout(function() {
document.getElementById("installation_wrapper").scrollTop = 200;
}, 100);
}
}, this.shouldFixHoverIcon() ? _Img2["default"]({
className: "installation-header_expand-icon-img",
src: "img/installation/controls/settings.png",
width: "16",
height: "12"
}) : _react2["default"].DOM.i({
className: "installation-header_expand-icon",
width: "16",
height: "12"
}));
}
});
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _Img = __webpack_require__(335), _Img2 = _interopRequireDefault(_Img), _drpCoreStatistics = __webpack_require__(13), _drpCoreStatistics2 = _interopRequireDefault(_drpCoreStatistics), _utilsGetSoftFromStore = __webpack_require__(451);
exports["default"] = _react2["default"].createClass({
displayName: "InstallationHeaderPromo",
mixins: [ __webpack_require__(336) ],
propTypes: {
currentLanguage: _react.PropTypes.string.isRequired,
isConfirmed: _react.PropTypes.object,
confirmAvInstallation: _react.PropTypes.bool
},
getInitialState: function() {
var store = window.store.getState(), reg = /360 Total Security/i;
return {
avOffered: _utilsGetSoftFromStore.getOffered(store, reg),
avInstalling: _utilsGetSoftFromStore.getInstalling(store, reg)
};
},
componentDidMount: function() {
var _state = this.state, avOffered = _state.avOffered, avInstalling = _state.avInstalling;
if (avOffered && !avOffered.isInstalled) if (avInstalling) _drpCoreStatistics2["default"].event({
action: "installation promo showed 360 Total Security"
}); else _drpCoreStatistics2["default"].event({
action: "installation ad showed 360 Total Security"
});
},
render: function() {
var _this = this, _state2 = this.state, avOffered = _state2.avOffered, avInstalling = _state2.avInstalling;
return _react2["default"].DOM.div({
className: "installation-header_promo"
}, avOffered && !avOffered.isInstalled ? avInstalling ? _react2["default"].DOM.a({
href: "javascript:void(0)",
className: "installation-header_promo-link",
onClick: function(e) {
e.preventDefault();
_this.openSite("https://goo.gl/Ym6hkO");
}
}, _Img2["default"]({
className: "installation-header_promo-banner",
src: "img/installation/banner_360-info.png",
width: "515",
height: "150"
})) : this.renderAvConfirm(avOffered) : null);
},
renderAvConfirm: function(item) {
var _props = this.props, confirmAvInstallation = _props.confirmAvInstallation, isConfirmed = _props.isConfirmed;
return isConfirmed ? _Img2["default"]({
className: "installation-header_promo-banner",
src: "img/installation/banner_360-installation-success.png",
width: "515",
height: "150"
}) : _react2["default"].DOM.a({
href: "javascript:void(0)",
className: "installation-header_promo-link",
onClick: function(e) {
e.preventDefault();
confirmAvInstallation(item);
}
}, _Img2["default"]({
className: "installation-header_promo-banner",
src: "img/installation/banner_360-installation-offer.png",
width: "515",
height: "150"
}));
},
openSite: function(url) {
var WshShell = window.WshShell;
try {
WshShell.run(url, 1, !1);
} catch (e) {}
}
});
module.exports = exports["default"];
}, function(module, exports) {
"use strict";
exports.__esModule = !0;
var getOffered = function(_ref, reg) {
var programs = _ref.programs;
if (programs) return programs.find(function(_ref2) {
var name = _ref2.name;
return reg.test(name);
}); else ;
};
exports.getOffered = getOffered;
var getInstalling = function(_ref3, reg) {
var installation = _ref3.installation;
if (installation && installation.items) return installation.items.find(function(_ref4) {
var name = _ref4.name;
return reg.test(name);
}); else ;
};
exports.getInstalling = getInstalling;
}, function(module, exports, __webpack_require__) {
(function(l) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _Img = __webpack_require__(335), _Img2 = _interopRequireDefault(_Img), _utilsGetInternetExplorerVersion = __webpack_require__(47), _utilsGetInternetExplorerVersion2 = _interopRequireDefault(_utilsGetInternetExplorerVersion), internetExplorerVersion = _utilsGetInternetExplorerVersion2["default"]();
exports["default"] = _react2["default"].createClass({
displayName: "InstallationTitleTable",
mixins: [ __webpack_require__(336) ],
propTypes: {
pauseInstallation: _react.PropTypes.func,
expandInstallation: _react.PropTypes.func,
currentLanguage: _react.PropTypes.string.isRequired
},
shouldFixHoverIcon: function() {
if (-1 !== internetExplorerVersion) if (10 > internetExplorerVersion) return !0; else return !1; else return !1;
},
render: function() {
var _props = this.props, pauseInstallation = _props.pauseInstallation, expandInstallation = _props.expandInstallation;
return _react2["default"].DOM.table({
id: "installation-title",
className: "installation-title"
}, _react2["default"].DOM.thead(null), _react2["default"].DOM.tbody(null, _react2["default"].DOM.tr({
className: "installation-title_row"
}, _react2["default"].DOM.td({
className: "installation-title_name-col"
}, _react2["default"].DOM.div({
className: "installation-title_name"
}, l("installation_title_name"))), _react2["default"].DOM.td({
className: "installation-title_button-col",
style: {
display: "none"
}
}, _react2["default"].DOM.a({
href: "javascript:void(0)",
className: "installation-title_button",
onClick: function(e) {
e.preventDefault();
}
}, _Img2["default"]({
className: "installation-title_button-icon",
src: "img/installation/controls/settings.png",
width: "16",
height: "16"
}), _react2["default"].DOM.span({
className: "installation-title_button-text"
}, l("installation_title_button_settings")))), _react2["default"].DOM.td({
className: "installation-title_button-col",
style: {
display: "none",
paddingRight: "48px"
}
}, _react2["default"].DOM.a({
href: "javascript:void(0)",
className: "installation-title_button",
onClick: function(e) {
e.preventDefault();
pauseInstallation();
}
}, _Img2["default"]({
className: "installation-title_button-icon",
src: "img/installation/controls/pause.png",
width: "16",
height: "16"
}), _react2["default"].DOM.span({
className: "installation-title_button-text"
}, l("installation_title_button_pause")))), _react2["default"].DOM.td({
className: "installation-title_close-col",
style: {
paddingRight: "48px"
}
}, _react2["default"].DOM.a({
href: "javascript:void(0)",
className: "installation-title_button installation-title_button-close",
onClick: function(e) {
e.preventDefault();
document.activeElement.blur();
expandInstallation(!1);
}
}, _Img2["default"]({
className: "installation-title_button-icon",
src: "img/installation/controls/close.png",
width: "16",
height: "16"
}))))));
}
});
module.exports = exports["default"];
}).call(exports, __webpack_require__(302));
}, function(module, exports, __webpack_require__) {
(function(l) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _Img = __webpack_require__(335), _Img2 = _interopRequireDefault(_Img), _utilsGetInternetExplorerVersion = __webpack_require__(47), _utilsGetInternetExplorerVersion2 = _interopRequireDefault(_utilsGetInternetExplorerVersion), _InstallationItemRowIcon = __webpack_require__(454), _InstallationItemRowIcon2 = _interopRequireDefault(_InstallationItemRowIcon), _InstallationItemRowDescription = __webpack_require__(455), _InstallationItemRowDescription2 = _interopRequireDefault(_InstallationItemRowDescription), _InstallationItemRowProgress = __webpack_require__(456), _InstallationItemRowProgress2 = _interopRequireDefault(_InstallationItemRowProgress), _InstallationItemRowStatus = __webpack_require__(457), _InstallationItemRowStatus2 = _interopRequireDefault(_InstallationItemRowStatus), internetExplorerVersion = _utilsGetInternetExplorerVersion2["default"]();
exports["default"] = _react2["default"].createClass({
displayName: "InstallationItemRow",
mixins: [ __webpack_require__(336) ],
propTypes: {
currentLanguage: _react.PropTypes.string.isRequired,
id: _react.PropTypes.string.isRequired,
name: _react.PropTypes.string.isRequired,
isDriver: _react.PropTypes.bool.isRequired,
itemCategory: _react.PropTypes.string.isRequired,
pack: _react.PropTypes.string.isRequired,
softDescription: _react.PropTypes.object.isRequired,
status: _react.PropTypes.string.isRequired,
cancelItemInstallation: _react.PropTypes.func,
restartItemInstallation: _react.PropTypes.func,
downloading: _react.PropTypes.object.isRequired,
unzipping: _react.PropTypes.object.isRequired,
error: _react.PropTypes.object.isRequired,
odd: _react.PropTypes.bool.isRequired
},
render: function() {
var _props = this.props, currentLanguage = _props.currentLanguage, name = _props.name, status = _props.status, isDriver = _props.isDriver, itemCategory = _props.itemCategory, softDescription = _props.softDescription, odd = _props.odd, dictionary = {
bluetooth: l("driver_class_bluetooth"),
cardreader: l("driver_class_cardreader"),
chipset: l("driver_class_chipset"),
inputdev: l("driver_class_inputdev"),
lan: l("driver_class_lan"),
massstorage: l("driver_class_massstorage"),
modem: l("driver_class_modem"),
monitor: l("driver_class_monitor"),
phone: l("driver_class_phone"),
sound: l("driver_class_sound"),
tvtuner: l("driver_class_tvtuner"),
video: l("driver_class_video"),
webcamera: l("driver_class_webcamera"),
wifi: l("driver_class_wifi"),
other: l("driver_class_other"),
archiver: l("soft_category_archiver"),
browser: l("soft_category_browser"),
viewer: l("soft_category_viewer"),
messenger: l("soft_category_messenger"),
internet: l("soft_category_internet"),
player: l("soft_category_player"),
backup: l("soft_category_backup"),
antivirus: l("soft_category_antivirus"),
system: l("soft_category_system"),
drivers: l("soft_category_drivers")
}, category = void 0, icon = void 0, description = void 0, lang = "ru" === currentLanguage ? "ru" : "en";
if (isDriver) {
category = dictionary[itemCategory];
icon = "img/installation/drivers/" + itemCategory + ".png";
description = name;
} else {
category = dictionary[itemCategory.toLowerCase()];
icon = "img/installation/soft/" + itemCategory + ".png";
description = softDescription[lang];
}
return _react2["default"].DOM.tr({
className: "installation-list_row " + (odd ? "" : "light")
}, _react2["default"].DOM.td({
style: {
padding: "0"
}
}, _react2["default"].DOM.table({
className: "installation-list_row-centered"
}, _react2["default"].DOM.tbody(null, _react2["default"].DOM.tr(null, _InstallationItemRowIcon2["default"]({
icon: icon
}), _InstallationItemRowDescription2["default"]({
category: category,
description: isDriver || !description ? name : description,
currentLanguage: currentLanguage
}), this.renderProgressCol(), _InstallationItemRowStatus2["default"]({
status: status,
currentLanguage: currentLanguage
}), _react2["default"].DOM.td({
className: "installation-list_reload-col",
style: {
display: "none"
}
}, this.renderReload()), _react2["default"].DOM.td({
className: "installation-list_cancel-col",
style: {
display: "none"
}
}, this.renderCancel()))))));
},
shouldFixHoverIcon: function() {
if (-1 !== internetExplorerVersion) if (7 > internetExplorerVersion) return !0; else return !1; else return !1;
},
renderProgressCol: function() {
var _props2 = this.props, id = _props2.id, name = _props2.name, isDriver = _props2.isDriver, status = _props2.status, downloading = _props2.downloading, unzipping = _props2.unzipping, error = _props2.error, restartItemInstallation = _props2.restartItemInstallation, currentLanguage = _props2.currentLanguage, progressProps = {
id: id,
name: name,
isDriver: isDriver,
status: status,
downloading: downloading,
unzipping: unzipping,
error: error,
restartItemInstallation: restartItemInstallation,
currentLanguage: currentLanguage
};
return _InstallationItemRowProgress2["default"](progressProps);
},
renderReload: function() {
var _props3 = this.props, id = _props3.id, status = _props3.status, name = _props3.name, restartItemInstallation = _props3.restartItemInstallation;
switch (status) {
case "waiting":
case "downloading":
case "downloaded":
case "unzipping":
return _react2["default"].DOM.a({
href: "javascript:void(0)",
className: "installation-list_reload",
onClick: function(e) {
e.preventDefault();
restartItemInstallation(name, id, status);
}
}, _Img2["default"]({
src: "img/installation/controls/reload.png",
width: "24",
height: "24"
}));
default:
return _react2["default"].DOM.a({
href: "javascript:void(0)",
className: "installation-list_reload",
onClick: function(e) {
e.preventDefault();
}
}, _Img2["default"]({
src: "img/installation/controls/reload_disable.png",
width: "24",
height: "24"
}));
}
},
renderCancel: function() {
var _props4 = this.props, id = _props4.id, name = _props4.name, status = _props4.status, cancelItemInstallation = _props4.cancelItemInstallation;
switch (status) {
case "downloading":
case "downloaded":
case "unzipping":
case "error":
case "canceled":
return _react2["default"].DOM.a({
href: "javascript:void(0)",
className: "installation-list_cancel",
onClick: function(e) {
e.preventDefault();
cancelItemInstallation(name, id, status);
}
}, _Img2["default"]({
src: "img/installation/controls/cancel.png",
width: "24",
height: "24"
}));
default:
return _react2["default"].DOM.a({
href: "javascript:void(0)",
className: "installation-list_cancel",
onClick: function(e) {
e.preventDefault();
}
}, _Img2["default"]({
src: "img/installation/controls/cancel_disable.png",
width: "24",
height: "24"
}));
}
}
});
module.exports = exports["default"];
}).call(exports, __webpack_require__(302));
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _Img = __webpack_require__(335), _Img2 = _interopRequireDefault(_Img);
exports["default"] = _react2["default"].createClass({
displayName: "InstallationItemRowIcon",
mixins: [ __webpack_require__(336) ],
propTypes: {
icon: _react.PropTypes.string.isRequired
},
render: function() {
var icon = this.props.icon;
return _react2["default"].DOM.td({
className: "installation-list_icon-col"
}, _react2["default"].DOM.span({
className: "installation-list_icon"
}, _Img2["default"]({
src: icon,
width: "56",
height: "56"
})));
}
});
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react);
exports["default"] = _react2["default"].createClass({
displayName: "InstallationItemRowDescription",
mixins: [ __webpack_require__(336) ],
propTypes: {
category: _react.PropTypes.string.isRequired,
description: _react.PropTypes.string.isRequired,
currentLanguage: _react.PropTypes.string.isRequired
},
render: function() {
var _props = this.props, category = _props.category, description = _props.description;
return _react2["default"].DOM.td({
className: "installation-list_desc-col"
}, _react2["default"].DOM.div({
className: "installation-list_category"
}, _react2["default"].DOM.span({
className: "installation-list_category-name",
href: "javascript:void(0)",
onClick: function(e) {
e.preventDefault();
}
}, category)), _react2["default"].DOM.div({
className: "installation-list_name"
}, description));
}
});
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
(function(l) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _utilsGetInternetExplorerVersion = __webpack_require__(47), _utilsGetInternetExplorerVersion2 = _interopRequireDefault(_utilsGetInternetExplorerVersion), internetExplorerVersion = _utilsGetInternetExplorerVersion2["default"]();
exports["default"] = _react2["default"].createClass({
displayName: "InstallationItemRowProgress",
mixins: [ __webpack_require__(336) ],
propTypes: {
id: _react.PropTypes.string.isRequired,
name: _react.PropTypes.string.isRequired,
isDriver: _react.PropTypes.bool.isRequired,
status: _react.PropTypes.string.isRequired,
downloading: _react.PropTypes.object.isRequired,
unzipping: _react.PropTypes.object.isRequired,
error: _react.PropTypes.object.isRequired,
restartItemInstallation: _react.PropTypes.func,
currentLanguage: _react.PropTypes.string.isRequired
},
shouldFixProgress: function() {
if (-1 !== internetExplorerVersion) if (10 > internetExplorerVersion) return !0; else return !1; else return !1;
},
calculateDownloadProgressWidth: function() {
var _props$downloading = this.props.downloading, downloadedSize = _props$downloading.downloadedSize, totalFileSize = _props$downloading.totalFileSize;
return totalFileSize ? Math.min(Math.round(100 * downloadedSize / totalFileSize), 100) : 0;
},
formatBytes: function(bytes, decimals) {
var kilo = arguments.length <= 2 || void 0 === arguments[2] ? 1024 : arguments[2];
if (0 === bytes) return "0 B";
var dm = decimals + 1 || 3, sizes = [ "B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" ], i = Math.floor(Math.log(bytes) / Math.log(kilo));
return (bytes / Math.pow(kilo, i)).toPrecision(dm) + " " + sizes[i];
},
formatSpeed: function(bytes, decimals) {
var kilo = arguments.length <= 2 || void 0 === arguments[2] ? 1024 : arguments[2], bits = 8 * bytes;
if (0 === bits) return "0 bps";
var dm = decimals + 1 || 3, sizes = [ "bps", "kbps", "Mbps", "Gbps" ], i = Math.floor(Math.log(bits) / Math.log(kilo));
return (bits / Math.pow(kilo, i)).toPrecision(dm) + " " + sizes[i];
},
render: function() {
var _props = this.props, id = _props.id, name = _props.name, isDriver = _props.isDriver, status = _props.status, downloading = _props.downloading, unzipping = _props.unzipping, error = _props.error, restartItemInstallation = _props.restartItemInstallation, dictionary = {
restart: l("installation_error_restart"),
download: l("installation_error_download"),
unzip: l("installation_error_unzip"),
install: l("installation_error_install")
};
switch (status) {
case "waiting":
return _react2["default"].DOM.td({
className: "installation-list_progress-col"
}, _react2["default"].DOM.div({
className: "installation-list_progress-stage"
}, l("installation_progress_stage_waiting")), _react2["default"].DOM.div({
className: "installation-list_progress-bg"
}, _react2["default"].DOM.div({
className: "installation-list_progress installation-list_progress-linear",
style: {
width: "0%"
}
})), _react2["default"].DOM.div({
className: "installation-list_progress-bottom-spacer"
}));
case "downloading":
return _react2["default"].DOM.td({
className: "installation-list_progress-col"
}, _react2["default"].DOM.div({
className: "installation-list_progress-stage"
}, "1/", isDriver ? "3" : "2", " ", l("installation_progress_stage_downloading")), _react2["default"].DOM.div({
className: "installation-list_progress-bg"
}, _react2["default"].DOM.div({
className: "installation-list_progress installation-list_progress-linear",
style: {
width: this.calculateDownloadProgressWidth() + "%"
}
})), _react2["default"].DOM.div({
className: "installation-list_progress-info"
}, l("installation_progress_downloading_speed"), " ", this.formatSpeed(downloading.downloadingSpeed), " · ", this.formatBytes(downloading.downloadedSize), " ", l("installation_progress_downloading_of"), " ", this.formatBytes(downloading.totalFileSize)));
case "downloaded":
return _react2["default"].DOM.td({
className: "installation-list_progress-col"
}, _react2["default"].DOM.div({
className: "installation-list_progress-stage"
}, l("installation_progress_stage_downloaded")), _react2["default"].DOM.div({
className: "installation-list_progress-bg"
}, _react2["default"].DOM.div({
className: "installation-list_progress installation-list_progress-linear",
style: {
width: "0%"
}
})), _react2["default"].DOM.div({
className: "installation-list_progress-bottom-spacer"
}));
case "unzipping":
case "unzipped":
return _react2["default"].DOM.td({
className: "installation-list_progress-col"
}, _react2["default"].DOM.div({
className: "installation-list_progress-stage"
}, "2/3 ", l("installation_progress_stage_unzipping")), _react2["default"].DOM.div({
className: "installation-list_progress-bg"
}, _react2["default"].DOM.div({
className: "installation-list_progress installation-list_progress-linear",
style: {
width: unzipping.unzippedPercents + "%"
}
})), _react2["default"].DOM.div({
className: "installation-list_progress-info"
}, l("installation_progress_unzipping_unzipped"), " ", unzipping.unzippedPercents + " %"));
case "installing":
return _react2["default"].DOM.td({
className: "installation-list_progress-col"
}, _react2["default"].DOM.div({
className: "installation-list_progress-stage"
}, isDriver ? "3/3" : "2/2", " ", l("installation_progress_stage_installing")), _react2["default"].DOM.div({
className: "installation-list_progress-bg"
}, this.shouldFixProgress() ? _react2["default"].DOM.div({
className: "installation-list_progress",
style: {
width: "100%"
}
}, _react2["default"].DOM.img({
src: "img/installation/statuses/progress.gif",
width: "100%"
})) : _react2["default"].DOM.div({
className: "installation-list_progress installation-list_progress-infinite",
style: {
width: "100%"
}
})), _react2["default"].DOM.div({
className: "installation-list_progress-bottom-spacer"
}));
case "done":
return _react2["default"].DOM.td({
className: "installation-list_progress-col"
}, _react2["default"].DOM.div({
className: "installation-list_progress-stage"
}, l("installation_progress_stage_done")), _react2["default"].DOM.div({
className: "installation-list_progress-bg"
}, _react2["default"].DOM.div({
className: "installation-list_progress installation-list_progress-linear",
style: {
width: "100%"
}
})), _react2["default"].DOM.div({
className: "installation-list_progress-bottom-spacer"
}));
case "error":
return _react2["default"].DOM.td({
className: "installation-list_progress-col"
}, _react2["default"].DOM.div({
className: "installation-list_progress-stage"
}, _react2["default"].DOM.span({
style: {
color: "#d95c4c"
}
}, dictionary[error.errorType], " "), _react2["default"].DOM.a({
href: "javascript:void(0)",
className: "installation-list_progress-reload",
onClick: function(e) {
e.preventDefault();
restartItemInstallation(name, id, status, "link");
},
style: {
display: "none"
}
}, dictionary.restart)));
case "canceled":
return _react2["default"].DOM.td({
className: "installation-list_progress-col"
}, _react2["default"].DOM.div({
className: "installation-list_progress-stage"
}, _react2["default"].DOM.span({
style: {
color: "#555"
}
}, l("installation_canceled"))));
}
}
});
module.exports = exports["default"];
}).call(exports, __webpack_require__(302));
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _Img = __webpack_require__(335), _Img2 = _interopRequireDefault(_Img);
exports["default"] = _react2["default"].createClass({
displayName: "InstallationItemRowStatus",
mixins: [ __webpack_require__(336) ],
propTypes: {
status: _react.PropTypes.string.isRequired,
currentLanguage: _react.PropTypes.string.isRequired
},
getInitialState: function() {
return {
currentStageStart: 0,
prevStagesDuration: 0,
secondsElapsed: 0
};
},
tick: function() {
var status = this.props.status;
if ("downloading" === status || "unzipping" === status || "installing" === status) {
var now = Date.now();
if (0 === this.state.currentStageStart) this.setState({
currentStageStart: now
});
var diff = Math.round((now - this.state.currentStageStart) / 1e3);
this.setState({
secondsElapsed: this.state.prevStagesDuration + diff
});
} else if ("done" === status || "error" === status || "canceled" === status) {
this.setState({
currentStageStart: 0,
prevStagesDuration: 0,
secondsElapsed: 0
});
clearInterval(this.interval);
} else if ("downloaded" === status && 0 !== this.state.currentStageStart) {
this.setState({
prevStagesDuration: this.state.secondsElapsed
});
this.setState({
currentStageStart: 0
});
}
},
componentDidMount: function() {
var _this = this;
this.interval = setInterval(function() {
try {
_this.tick();
} catch (e) {
clearInterval(_this.interval);
}
}, 1e3);
},
componentWillUnmount: function() {
clearInterval(this.interval);
},
formatTime: function(seconds) {
var hours = this.formatTwoDigits(parseInt(seconds / 3600, 10) % 24), minutes = this.formatTwoDigits(parseInt(seconds / 60, 10) % 60);
seconds = this.formatTwoDigits(seconds % 60);
return (seconds >= 3600 ? hours + ":" : "") + minutes + ":" + seconds;
},
formatTwoDigits: function(n) {
return 10 > n ? "0" + n : n;
},
render: function() {
return _react2["default"].DOM.td({
className: "installation-list_status-col",
style: {
paddingRight: "48px"
}
}, this.renderStatusColContent());
},
renderStatusColContent: function() {
var status = this.props.status;
switch (status) {
case "waiting":
case "downloaded":
return _Img2["default"]({
className: "installation-list_status-icon",
src: "img/installation/statuses/sleep.png",
width: "40",
height: "24"
});
case "downloading":
case "unzipping":
case "unzipped":
case "installing":
return _react2["default"].DOM.div({
className: "installation-list_status-timer"
}, this.formatTime(this.state.secondsElapsed));
case "done":
return _Img2["default"]({
className: "installation-list_status-icon",
src: "img/installation/statuses/done.png",
width: "40",
height: "24"
});
case "error":
return _Img2["default"]({
className: "installation-list_status-icon",
src: "img/installation/statuses/error.png",
width: "40",
height: "24"
});
case "canceled":
return _react2["default"].DOM.div(null);
}
}
});
module.exports = exports["default"];
}, function(module, exports) {}, , , , , , function(module, exports, __webpack_require__) {
(function(l) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function mapState(state) {
return {
installation: state.installation,
currentLanguage: state.lang.currentLanguage
};
}
exports.__esModule = !0;
var _react = __webpack_require__(106), _react2 = _interopRequireDefault(_react), _Img = __webpack_require__(335), _Img2 = _interopRequireDefault(_Img), _drpCoreStatistics = __webpack_require__(13), _drpCoreStatistics2 = _interopRequireDefault(_drpCoreStatistics), _reduxConnect = __webpack_require__(292), _reduxConnect2 = _interopRequireDefault(_reduxConnect), _actionsFinalActions = __webpack_require__(465), _actionsMenuActions = __webpack_require__(305);
__webpack_require__(466);
var FinalScreen = _react2["default"].createClass({
displayName: "FinalScreen",
mixins: [ __webpack_require__(336) ],
propTypes: {
installation: _react.PropTypes.object.isRequired,
currentLanguage: _react.PropTypes.string.isRequired,
performPromoAction: _react.PropTypes.func.isRequired,
navigate: _react.PropTypes.func.isRequired
},
componentDidMount: function() {
var promoName = this.shouldShowPromo() ? " partner Yandex.Browser (USA)".toLowerCase() : "";
_drpCoreStatistics2["default"].event({
action: "final screen opened" + promoName
});
},
render: function() {
var _this = this, installation = this.props.installation, result = installation.result, totalDrivers = installation.totalDrivers, rebootNeeded = installation.rebootNeeded, successDrivers = installation.successDrivers, errorDevicesCount = installation.errorDevicesCount, nextScreen = void 0, messageText = void 0;
switch (result) {
case "DRIVERS_DONE":
nextScreen = !1 ? "PROTECT" : "DRIVERS";
if (0 === successDrivers) messageText = l("loading_no_drivers"); else if (totalDrivers > successDrivers && errorDevicesCount > 0) {
messageText = l("loading_drivers_installed");
messageText = messageText.replace("{{SUCCESS}}", successDrivers).replace("{{TOTAL}}", totalDrivers);
} else {
messageText = l("loading_drivers_installed");
messageText = messageText.replace("<span class='final_msg-marked'>({{SUCCESS}}/{{TOTAL}})</span> ", "");
}
break;
case "PROGRAMS_DONE":
nextScreen = !1 ? "PROTECT" : "PROGRAMS";
messageText = l("loading_soft_installed");
}
return _react2["default"].DOM.table({
className: "final_wrapper",
style: {
height: window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
}
}, _react2["default"].DOM.tbody(null, _react2["default"].DOM.tr(null, _react2["default"].DOM.td(null, _react2["default"].DOM.p({
className: "final_msg",
dangerouslySetInnerHTML: {
__html: messageText
}
}), this.shouldShowPromo() ? this.renderPromo(nextScreen) : _react2["default"].DOM.button({
className: "button final_finish-button",
onClick: function() {
_this.openNextScreen(nextScreen);
}
}, l("loading_button_finish")), rebootNeeded ? _react2["default"].DOM.p(null, l("loading_reboot")) : null))));
},
shouldShowPromo: function() {
var result = !1, _props = this.props, installation = _props.installation, currentLanguage = _props.currentLanguage, items = installation.items, targetingCountries = [ "US" ], geo = window.geoip.geoip_country_code.toUpperCase(), yandexBrowserUSA = items.find(function(item) {
return "Yandex.Browser (USA)" === item.name;
});
if (window.isOnline) result = "en" === currentLanguage && -1 !== targetingCountries.indexOf(geo) && yandexBrowserUSA && "done" === yandexBrowserUSA.status;
return result;
},
renderPromo: function(nextScreen) {
var _this2 = this, performPromoAction = this.props.performPromoAction;
return _react2["default"].DOM.div({
className: "final_promo"
}, _react2["default"].DOM.p({
className: "final_promo-label"
}, l("loading_promo_label"), _Img2["default"]({
src: "img/screens/little_arrow.png",
className: "final_promo-icon",
width: "15",
height: "15"
})), _Img2["default"]({
className: "final_promo-banner",
src: "img/screens/banner_final.png"
}), _react2["default"].DOM.div(null, _react2["default"].DOM.button({
className: "final_promo-button",
onClick: function() {
performPromoAction();
_this2.openNextScreen(nextScreen);
}
}, l("loading_promo_button").replace("{{SOFTNAME}}", "Yandex.Browser"))));
},
openNextScreen: function(nextScreen) {
var navigate = this.props.navigate;
document.activeElement && document.activeElement.blur();
navigate(nextScreen);
}
}), actions = {
navigate: _actionsMenuActions.navigate,
performPromoAction: _actionsFinalActions.performPromoAction
};
exports["default"] = _reduxConnect2["default"](mapState, actions)(FinalScreen);
module.exports = exports["default"];
}).call(exports, __webpack_require__(302));
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function performPromoAction(nextScreen) {
var promoName = "partner Yandex.Browser (USA)".toLowerCase(), promoHomepage = "https://browser.yandex.com/", promoSoftLauncher = _drpCoreSystemSpecialFolders.localAppData + "\\Yandex\\YandexBrowser\\Application\\browser.exe";
if (_drpCoreSystem.fso.FileExists(promoSoftLauncher)) !function() {
_drpCoreStatistics2["default"].event({
action: "final screen promo try clicked " + promoName
});
var command = _drpCoreLibUtils.wrapInCmd('"' + promoSoftLauncher + '"');
setTimeout(function() {
_drpCoreSystem.WshShell.Run(command, 0, !1);
}, 0);
}(); else {
_drpCoreStatistics2["default"].event({
action: "final screen promo try web clicked " + promoName
});
setTimeout(function() {
_drpCoreLibUtils.goToUrl(promoHomepage);
}, 0);
}
return {};
}
exports.__esModule = !0;
exports.performPromoAction = performPromoAction;
var _drpCoreStatistics = __webpack_require__(13), _drpCoreStatistics2 = _interopRequireDefault(_drpCoreStatistics), _drpCoreSystem = __webpack_require__(27), _drpCoreSystemSpecialFolders = __webpack_require__(6), _drpCoreLibUtils = __webpack_require__(26);
}, function(module, exports) {}, , function(module, exports, __webpack_require__) {
"use strict";
function emulateMediaQuery() {
var windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
if (800 > windowWidth) {
_handleClasses.removeClass(document.body, "window-min-width-800");
_handleClasses.removeClass(document.body, "window-min-width-1024");
_handleClasses.removeClass(document.body, "window-min-width-1200");
} else if (windowWidth >= 800 && 1024 > windowWidth) {
_handleClasses.addClass(document.body, "window-min-width-800");
_handleClasses.removeClass(document.body, "window-min-width-1024");
_handleClasses.removeClass(document.body, "window-min-width-1200");
} else if (windowWidth >= 1024 && 1200 > windowWidth) {
_handleClasses.addClass(document.body, "window-min-width-1024");
_handleClasses.removeClass(document.body, "window-min-width-800");
_handleClasses.removeClass(document.body, "window-min-width-1200");
} else {
_handleClasses.removeClass(document.body, "window-min-width-800");
_handleClasses.removeClass(document.body, "window-min-width-1024");
_handleClasses.addClass(document.body, "window-min-width-1200");
}
}
exports.__esModule = !0;
exports["default"] = emulateMediaQuery;
var _handleClasses = __webpack_require__(367);
module.exports = exports["default"];
}, function(module, exports) {}, , function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
}
return target;
}, _drpCoreSystem = __webpack_require__(27), _drpCoreStatistics = __webpack_require__(13), _drpCoreStatistics2 = _interopRequireDefault(_drpCoreStatistics), _drpCoreLogs = __webpack_require__(4), indexPath = "../index/db.sqlite", Delorean = function() {
function Delorean() {
_classCallCheck(this, Delorean);
}
Delorean.prototype.generateJobId = function() {
return +Math.round(1e5 * Math.random());
};
Delorean.prototype.pathToInputFile = function(id) {
return _drpCoreSystem.AppData + "\\DRPSu\\temp\\delorean_input_" + id + ".log";
};
Delorean.prototype.pathToOutputFile = function(id) {
return _drpCoreSystem.AppData + "\\DRPSu\\temp\\delorean_output_" + id + ".log";
};
Delorean.prototype.pathToErrorFile = function(id) {
return _drpCoreSystem.AppData + "\\DRPSu\\temp\\delorean_error_" + id + ".log";
};
Delorean.prototype.wrapInCmd = function(command) {
return 'cmd /c "' + command + '"';
};
Delorean.prototype.run = function(query) {
var res = _drpCoreSystem.fso.FileExists(indexPath) ? this.runLocal(query) : this.runRemote(query);
return res.then(function(data) {
return data.map(function(item, index) {
var statusCode = query.devices[index].statusCode;
return _extends({
statusCode: statusCode
}, item);
});
});
};
Delorean.prototype.runRemote = function(query) {
var apiEndpoint = window.apiEndpoint + "/select";
_drpCoreLogs.log("[delorean] run remote:", [ apiEndpoint ], query);
return _drpCoreSystem.httppost(apiEndpoint, query, _drpCoreStatistics2["default"]).then(function(_ref) {
var body = _ref.body, errorDevicesApiFailed = query.devices.filter(function(_ref2, index) {
var statusCode = _ref2.statusCode;
return statusCode > 0 && 0 === body.data[index].drivers.length;
}).length, dimensions = [ [ _drpCoreStatistics2["default"].config.errorDevicesApiFailed, errorDevicesApiFailed ], [ _drpCoreStatistics2["default"].config.errorDevicesApiFailedMetric, errorDevicesApiFailed ] ];
_drpCoreStatistics2["default"].event({
action: "api response recieved",
params: {
errorDevicesApiFailed: errorDevicesApiFailed
}
}, dimensions);
return body.data;
});
};
Delorean.prototype.runLocal = function(query) {
var _this = this;
if (!0) {
_drpCoreLogs.log("[delorean] run local:", query);
return new Promise(function(resolve, reject) {
var jobId = _this.generateJobId(), inputFile = _this.pathToInputFile(jobId), outputFile = _this.pathToOutputFile(jobId), errorFile = _this.pathToErrorFile(jobId);
if (!_drpCoreSystem.fso.FolderExists(_drpCoreSystem.AppData + "\\DRPSu\\temp")) _drpCoreSystem.fso.CreateFolder(_drpCoreSystem.AppData + "\\DRPSu\\temp");
var inputFileDescriptor = _drpCoreSystem.fso.OpenTextFile(inputFile, constants.FSO_FOR_WRITING, constants.FSO_CREATE);
inputFileDescriptor.WriteLine(JSON.stringify(query));
inputFileDescriptor.Close();
var deloreanCommand = "..\\catalog\\node ../catalog/cli -d " + indexPath + ' -i "' + inputFile + '" >"' + outputFile + '" 2>"' + errorFile + '"', command = _this.wrapInCmd(deloreanCommand);
_drpCoreLogs.log("[delorean] Running: " + command);
_drpCoreSystem.WshShell.Run(command, 0, !0);
var outputFileDescriptor = _drpCoreSystem.fso.OpenTextFile(outputFile, constants.FSO_FOR_READING, constants.FSO_DONT_CREATE), errorFileDescriptor = _drpCoreSystem.fso.OpenTextFile(errorFile, constants.FSO_FOR_READING, constants.FSO_CREATE);
if (!outputFileDescriptor.AtEndOfStream) {
var outputContents = outputFileDescriptor.ReadAll();
resolve(JSON.parse(outputContents));
} else if (!errorFileDescriptor.AtEndOfStream) {
var errorContents = errorFileDescriptor.ReadAll();
reject(errorContents);
} else reject(new Error("No output"));
});
} else throw new Error("Called delorean.runLocal in online");
};
Delorean.prototype.formatNumberWithLeadingZero = function(number) {
return number >= 10 ? number : "0" + number;
};
Delorean.prototype.parseDate = function(dateStr) {
var dt = dateStr.split(/[: T-]/).map(function(x) {
return parseFloat(x);
});
return new Date(dt[0], dt[1] - 1, dt[2], dt[3] || 0, dt[4] || 0, dt[5] || 0, 0);
};
Delorean.prototype.formatDate = function(date) {
if (!date) return "";
var parsed = this.parseDate(date);
return [ parsed.getFullYear(), this.formatNumberWithLeadingZero(parsed.getMonth() + 1), this.formatNumberWithLeadingZero(parsed.getDate()) ].join("-");
};
Delorean.prototype.convertOutputToV1 = function(data, curDriversArray) {
var _this2 = this;
_drpCoreLogs.log("[delorean] convertOutputToV1: ", data, curDriversArray);
var curDrivers = {};
curDriversArray.forEach(function(cdriver) {
curDrivers[cdriver.deviceId] = cdriver;
});
var json = {
installed: [],
not_installed: []
};
data.forEach(function(device) {
if (device.drivers[0]) {
var cdriver = curDrivers[device.deviceId], drivers = device.drivers.map(function(driver) {
var drv = {
link: "http://download.drp.su/driverpacks/repack" + driver.link,
date: _this2.formatDate(driver.date),
manufacturer: driver.manufacturer,
"class": driver["class"],
version: driver.version,
name: driver.name,
deviceId: driver.deviceId,
pack: driver.pack,
directory: driver.directory,
inf: driver.inf,
fullDeviceId: device.deviceId,
statusCode: device.statusCode
};
return drv;
}), insert = [ drivers, cdriver ];
json.installed.push(insert);
}
});
return json;
};
Delorean.prototype.runProtect = function(query) {
var apiEndpoint = window.apiEndpoint + "/cleaner";
_drpCoreLogs.log("[delorean] run protect:", [ apiEndpoint ], query);
return _drpCoreSystem.httppost(apiEndpoint, query, _drpCoreStatistics2["default"]).then(function(_ref3) {
var body = _ref3.body, data = body.data;
_drpCoreStatistics2["default"].event({
action: "protect api response recieved",
params: {
protectResponse: data
}
});
return data;
});
};
Delorean.prototype.convertProtectOutput = function(data) {
_drpCoreLogs.log("[delorean] convertProtectOutput: ", data);
var result = data.map(function(program) {
return {
name: program.Program,
version: program.Version || "",
publisher: program.Publisher || "",
installDate: program["Install Date"] || "",
icon: program.imageurl || "",
uninstallString: program.Uninstaller || "",
uninstallPercents: program.uninstallrate || 0,
rating: program.overallsentiment || 0,
size: program.Size || "",
regPath: program["Registry Path"] || "",
isFound: program.isFound
};
});
return result;
};
return Delorean;
}();
window.delorean = new Delorean();
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
exports.__esModule = !0;
var _drpCoreLogs = __webpack_require__(4), _drpCoreSystem = __webpack_require__(27), _drpCoreSystemSpecialFolders = __webpack_require__(6), _drpCoreSystemLocalFiles = __webpack_require__(12), toFixed = function(num) {
return ("0" + num).slice(-2);
}, Snapshot = function() {
function Snapshot() {
_classCallCheck(this, Snapshot);
this.diagnosticsDir = _drpCoreSystemSpecialFolders.AppFolder + "\\diagnostics";
this.snaphotsDir = _drpCoreSystemSpecialFolders.AppFolder + "\\snapshots";
}
Snapshot.prototype.createFilename = function() {
var today = new Date();
return [ "DriverPack", "Snapshot", [ today.getFullYear(), toFixed(today.getMonth() + 1), toFixed(today.getDate()) ].join(""), [ toFixed(today.getHours()), toFixed(today.getMinutes()), toFixed(today.getSeconds()) ].join("") ].join("_") + ".zip";
};
Snapshot.prototype.create = function() {
try {
_drpCoreSystemLocalFiles.ensurePath(this.snaphotsDir);
var zipFilePath = this.snaphotsDir + "\\" + this.createFilename();
_drpCoreSystem.WshShell.Run('tools\\7za.exe a "' + zipFilePath + '" "' + this.diagnosticsDir + '\\*"', 0, !0);
_drpCoreLogs.log("[snapshot] snapshot created " + zipFilePath);
} catch (err) {
_drpCoreLogs.log("[snapshot] snapshot failed", err);
}
};
Snapshot.prototype.apply = function() {
this.load(this.getFile());
};
Snapshot.prototype.getFile = function() {
var ex = _drpCoreSystem.WshShell.Exec("mshta.exe \"about: <input type=file id=X><script>X.click();new ActiveXObject('Scripting.FileSystemObject').GetStandardStream(1).WriteLine(X.value);close();resizeTo(0,0);</script>\"");
return ex.StdOut.ReadAll().trim();
};
Snapshot.prototype.load = function(filePath) {
if (filePath && filePath.endsWith("zip")) {
_drpCoreSystem.WshShell.Run('tools\\7za.exe e "' + filePath + '" -o"' + this.diagnosticsDir + '" *.json -y', 0, !0);
var prevCurDir = _drpCoreSystem.WshShell.CurrentDirectory;
_drpCoreSystem.WshShell.CurrentDirectory = this.diagnosticsDir;
_drpCoreSystem.WshShell.Run('cmd /c "for %f in (.\\*) do copy /y /b %f+,,"', 0, !0);
_drpCoreSystem.WshShell.CurrentDirectory = prevCurDir;
_drpCoreLogs.log("[snapshot] snapshot loaded " + filePath);
window.onbeforeunload = null;
window.location.reload();
}
};
return Snapshot;
}();
exports["default"] = window.snapshot = new Snapshot();
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
var _this = this;
if ("undefined" != typeof emulatingIE) {
var _sendYaMetrika;
!function() {
window.log = console.log.bind(console);
if (window.statistics) _sendYaMetrika = window.statistics.sendYaMetrika;
if (window.statistics) window.statistics.sendUrl = function() {};
if (window.statistics) window.statistics.sendYaMetrika = function(event) {
if (window.yaCounter) window.yaCounter.hit = function() {};
_sendYaMetrika(event);
};
var systemScanner = __webpack_require__(50), softPack = __webpack_require__(103);
systemScanner.run = function() {
var drivers;
return regeneratorRuntime.async(function(context$2$0) {
for (;;) switch (context$2$0.prev = context$2$0.next) {
case 0:
drivers = [ [ [ {
deviceId: "PCI\\VEN_1131&DEV_7133",
"class": "tvtuner",
manufacturer: "Supportedboards",
name: "Philips SAA7133/35, Hybrid Capture Device",
version: "1.4.0.3",
date: "2009-08-11 20:00:00.000 +00:00",
pack: "DP_TV_DVB_15080",
directory: "Hybrid\\WinAll\\saa713x1\\",
link: "TV_DVB/Hybrid/WinAll/saa713x1/Hybrid-WinAll-saa713x1-drp.zip",
fullDeviceId: "PCI\\VEN_1131&DEV_7133"
}, {
deviceId: "PCI\\VEN_1131&DEV_7133",
"class": "tvtuner",
manufacturer: "Microsoft",
name: "SAA7133 TV Card",
version: "2.3.4.8",
date: "2009-03-12 21:00:00.000 +00:00",
pack: "DP_TV_DVB_15080",
directory: "Hybrid\\WinAll\\saa713x2\\",
link: "TV_DVB/Hybrid/WinAll/saa713x2/Hybrid-WinAll-saa713x2-drp.zip",
fullDeviceId: "PCI\\VEN_1131&DEV_7133"
}, {
deviceId: "PCI\\VEN_1131&DEV_7133",
"class": "tvtuner",
manufacturer: "Philips",
name: "Philips TV7135 WDM Video Capture",
version: "1.3.3.2",
date: "2007-04-16 20:00:00.000 +00:00",
pack: "DP_TV_Others_15080",
directory: "Philips\\FORCED\\Allx86\\",
link: "TV_Others/Philips/FORCED/Allx86/Philips-FORCED-Allx86-drp.zip",
fullDeviceId: "PCI\\VEN_1131&DEV_7133"
}, {
deviceId: "PCI\\VEN_1131&DEV_7133",
"class": "tvtuner",
manufacturer: "Philips",
name: "Philips TV7135 WDM Video Capture",
version: "2.4.0.1",
date: "2006-11-15 21:00:00.000 +00:00",
pack: "DP_TV_Others_15080",
directory: "GotView\\WinAll\\1\\",
link: "TV_Others/GotView/WinAll/1/GotView-WinAll-1-drp.zip",
fullDeviceId: "PCI\\VEN_1131&DEV_7133"
}, {
deviceId: "PCI\\VEN_1131&DEV_7133",
"class": "tvtuner",
manufacturer: "Philips",
name: "Philips TV7135 WDM Video Capture",
version: "2.3.1.8",
date: "2005-10-06 20:00:00.000 +00:00",
pack: "DP_TV_Others_15080",
directory: "KWorld\\WinAll\\K4\\",
link: "TV_Others/KWorld/WinAll/K4/KWorld-WinAll-K4-drp.zip",
fullDeviceId: "PCI\\VEN_1131&DEV_7133"
}, {
deviceId: "PCI\\VEN_1131&DEV_7133",
"class": "tvtuner",
manufacturer: "Philips",
name: "Philips TV7135 WDM Video Capture",
version: "2.4.0.4",
date: "2005-05-03 20:00:00.000 +00:00",
pack: "DP_TV_Others_15080",
directory: "KWorld\\WinAll\\K2\\",
link: "TV_Others/KWorld/WinAll/K2/KWorld-WinAll-K2-drp.zip",
fullDeviceId: "PCI\\VEN_1131&DEV_7133"
} ] ] ];
window.store.dispatch({
type: "DRIVERS_SCAN_SUCCESS",
payload: drivers
});
case 2:
case "end":
return context$2$0.stop();
}
}, null, _this);
};
softPack.applyTargeting = function(json) {
json.forEach(function(item, i, json) {
if (json[i].CheckedDefaultIf) try {
json[i].isVisible = json[i].IsChecked = json[i].CheckedDefaultIf({
antivirus: window.antivirus,
geoip: window.isOnline ? window.geoip : window.geoipOffline,
os: window.os,
system: window.system,
wmi: window.wmi,
diagnostics: window.diagnostics
});
} catch (err) {
json[i].isVisible = !0;
json[i].IsChecked = json[i].CheckedDefault;
log("[SoftPack] CheckedDefaultIf failed", err);
} else {
json[i].isVisible = !0;
json[i].IsChecked = json[i].CheckedDefault;
}
});
log("[SoftPack] Targeting applied", json);
return json;
};
var load = function(filename) {
return new Promise(function(resolve) {
var script = document.createElement("script");
script.src = filename;
script.type = "text/javascript";
document.documentElement.insertBefore(script, document.documentElement.lastChild);
script.onload = script.onerror = function() {
if (!script.executed) {
script.executed = !0;
resolve();
}
};
script.onreadystatechange = function() {
if ("complete" === script.readyState) script.onload();
if ("loaded" === script.readyState) {
setTimeout(script.onload, 0);
script.onreadystatechange = null;
}
};
});
};
window.changeLanguage = function(lang) {
return regeneratorRuntime.async(function(context$2$0) {
for (;;) switch (context$2$0.prev = context$2$0.next) {
case 0:
context$2$0.next = 2;
return regeneratorRuntime.awrap(loadLanguage(lang));
case 2:
case "end":
return context$2$0.stop();
}
}, null, _this);
};
window.loadLanguage = function(lang) {
var langQueue, _iterator, _isArray, _i, _ref, l, language;
return regeneratorRuntime.async(function(context$2$0) {
for (;;) switch (context$2$0.prev = context$2$0.next) {
case 0:
if (!lang) lang = "ru";
langQueue = [ lang ];
if (-1 !== lang.indexOf("-")) langQueue.unshift(lang.split("-")[0]);
if (!lang.startsWith("ru") && !lang.startsWith("en")) [ "uk", "az", "by", "hy", "ka" ].some(function(l) {
lang.startsWith(l);
}) ? langQueue.unshift("ru") : langQueue.unshift("en");
_iterator = langQueue, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();
case 5:
if (!_isArray) {
context$2$0.next = 11;
break;
}
if (!(_i >= _iterator.length)) {
context$2$0.next = 8;
break;
}
return context$2$0.abrupt("break", 21);
case 8:
_ref = _iterator[_i++];
context$2$0.next = 15;
break;
case 11:
_i = _iterator.next();
if (!_i.done) {
context$2$0.next = 14;
break;
}
return context$2$0.abrupt("break", 21);
case 14:
_ref = _i.value;
case 15:
l = _ref;
if (window.languages[l]) {
context$2$0.next = 19;
break;
}
context$2$0.next = 19;
return regeneratorRuntime.awrap(load("languages/" + l + ".js"));
case 19:
context$2$0.next = 5;
break;
case 21:
langQueue = langQueue.filter(function(l) {
return window.languages[l];
});
lang = langQueue[langQueue.length - 1];
language = {};
langQueue.forEach(function(l) {
Object.assign(language, window.languages[l]);
});
window.lang = lang;
window.language = language;
Object.entries(language).forEach(function(_ref2) {
var key = _ref2[0], value = _ref2[1], el = document.getElementById(key);
if (el) el.innerHTML = value;
});
case 28:
case "end":
return context$2$0.stop();
}
}, null, _this);
};
if (window.wget) window.wget.tick = function() {
var _this2 = this, keys = Object.keys(this.onDownloaded);
keys.forEach(function(job_id) {
if (Math.random() < .91) _this2.onDownloaded[job_id]();
});
};
}();
}
}, function(module, exports, __webpack_require__) {
"use strict";
var _this = this, _drpCoreSystem = __webpack_require__(27), _drpCoreOs = __webpack_require__(9), _drpCoreSystemProcesses = __webpack_require__(29), fixHdpiDisplays = function() {
var appliedDPI;
return regeneratorRuntime.async(function(context$1$0) {
for (;;) switch (context$1$0.prev = context$1$0.next) {
case 0:
appliedDPI = _drpCoreSystem.RegRead("HKEY_CURRENT_USER\\Control Panel\\Desktop\\WindowMetrics\\AppliedDPI");
if (!(window.screen.width <= 800 || window.screen.height <= 600 || appliedDPI > 96)) {
context$1$0.next = 8;
break;
}
_drpCoreSystem.WshShell.AppActivate(_drpCoreSystemProcesses.getMyPID());
context$1$0.next = 5;
return regeneratorRuntime.awrap(Promise.resolve().delay(100));
case 5:
_drpCoreSystem.WshShell.SendKeys("^(0)");
context$1$0.next = 8;
return regeneratorRuntime.awrap(Promise.resolve().delay(50));
case 8:
if (!(window.screen.width <= 800 || window.screen.height <= 600)) {
context$1$0.next = 12;
break;
}
_drpCoreSystem.WshShell.SendKeys("^(0{-})");
context$1$0.next = 17;
break;
case 12:
if (!(appliedDPI > 96)) {
context$1$0.next = 17;
break;
}
_drpCoreSystem.WshShell.SendKeys("^(0{+}{+}{+}{+})");
context$1$0.next = 16;
return regeneratorRuntime.awrap(Promise.resolve().delay(50));
case 16:
window.scrollTo(0, 0);
case 17:
case "end":
return context$1$0.stop();
}
}, null, _this);
};
if (_drpCoreOs.OSVersion >= 6.1) fixHdpiDisplays();
} ]);