Files
lifeRestart/public/chunk/614.cac87.js
Vick Scarlet ab705dd46c build version
2021-12-14 18:48:42 +08:00

1 line
28 KiB
JavaScript

"use strict";(self.webpackChunklife_restart=self.webpackChunklife_restart||[]).push([[614],{2614:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (/* binding */ Property)\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1249);\n/* harmony import */ var core_js_modules_es_array_fill_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3290);\n/* harmony import */ var core_js_modules_es_parse_int_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1058);\n/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6992);\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1539);\n/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8783);\n/* harmony import */ var core_js_modules_es_weak_map_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4129);\n/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(3948);\n/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(8304);\n/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(489);\n/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(2419);\n/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(2526);\n/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(1817);\n/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(2165);\nfunction _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }\n\nfunction _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }\n\nfunction _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }\n\nfunction _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }\n\nfunction _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }\n\nfunction _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }\n\nfunction _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }\n\nvar _types = /*#__PURE__*/new WeakMap();\n\nvar _propertyPoints = /*#__PURE__*/new WeakMap();\n\nvar _propertyAllocate = /*#__PURE__*/new WeakMap();\n\nvar _propertyAllocateLimit = /*#__PURE__*/new WeakMap();\n\nvar Property = /*#__PURE__*/function (_ui$view$DefaultTheme) {\n _inherits(Property, _ui$view$DefaultTheme);\n\n var _super = _createSuper(Property);\n\n function Property() {\n var _this;\n\n _classCallCheck(this, Property);\n\n _this = _super.call(this);\n\n _classPrivateFieldInitSpec(_assertThisInitialized(_this), _types, {\n writable: true,\n value: void 0\n });\n\n _classPrivateFieldInitSpec(_assertThisInitialized(_this), _propertyPoints, {\n writable: true,\n value: void 0\n });\n\n _classPrivateFieldInitSpec(_assertThisInitialized(_this), _propertyAllocate, {\n writable: true,\n value: void 0\n });\n\n _classPrivateFieldInitSpec(_assertThisInitialized(_this), _propertyAllocateLimit, {\n writable: true,\n value: void 0\n });\n\n var types = _classPrivateFieldSet(_assertThisInitialized(_this), _types, core.PropertyTypes);\n\n _this.btnCharmIncrease.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.onPropertyAllocate, [types.CHR, 1]);\n\n _this.btnCharmReduce.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.onPropertyAllocate, [types.CHR, -1]);\n\n _this.btnIntelligenceIncrease.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.onPropertyAllocate, [types.INT, 1]);\n\n _this.btnIntelligenceReduce.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.onPropertyAllocate, [types.INT, -1]);\n\n _this.btnStrengthIncrease.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.onPropertyAllocate, [types.STR, 1]);\n\n _this.btnStrengthReduce.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.onPropertyAllocate, [types.STR, -1]);\n\n _this.btnMoneyIncrease.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.onPropertyAllocate, [types.MNY, 1]);\n\n _this.btnMoneyReduce.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.onPropertyAllocate, [types.MNY, -1]);\n\n _this.inputCharm.on(Laya.Event.INPUT, _assertThisInitialized(_this), _this.onPropertyAllocateInput, [types.CHR]);\n\n _this.inputIntelligence.on(Laya.Event.INPUT, _assertThisInitialized(_this), _this.onPropertyAllocateInput, [types.INT]);\n\n _this.inputStrength.on(Laya.Event.INPUT, _assertThisInitialized(_this), _this.onPropertyAllocateInput, [types.STR]);\n\n _this.inputMoney.on(Laya.Event.INPUT, _assertThisInitialized(_this), _this.onPropertyAllocateInput, [types.MNY]);\n\n var selectAll = function selectAll(_ref) {\n var item = _ref.currentTarget;\n item.text = \'\';\n };\n\n _this.inputCharm.on(Laya.Event.MOUSE_DOWN, _assertThisInitialized(_this), selectAll);\n\n _this.inputIntelligence.on(Laya.Event.MOUSE_DOWN, _assertThisInitialized(_this), selectAll);\n\n _this.inputStrength.on(Laya.Event.MOUSE_DOWN, _assertThisInitialized(_this), selectAll);\n\n _this.inputMoney.on(Laya.Event.MOUSE_DOWN, _assertThisInitialized(_this), selectAll);\n\n _this.btnRandomAllocate.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.random);\n\n _this.btnNext.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.next);\n\n _this.listSelectedTalents.renderHandler = Laya.Handler.create(_assertThisInitialized(_this), _this.renderTalent, null, false);\n return _this;\n }\n\n _createClass(Property, [{\n key: "init",\n value: function init(_ref2) {\n var _classPrivateFieldSet2;\n\n var talents = _ref2.talents;\n this.listSelectedTalents.array = talents;\n var replace = core.remake(talents.map(function (talent) {\n return talent.id;\n }));\n\n if (replace.length > 0) {\n $$event(\'message\', [replace.map(function (v) {\n return [\'F_TalentReplace\', v];\n })]);\n }\n\n _classPrivateFieldSet(this, _propertyPoints, core.getPropertyPoints());\n\n _classPrivateFieldSet(this, _propertyAllocateLimit, core.propertyAllocateLimit);\n\n this.labLeftPropertyPoint.text = _classPrivateFieldGet(this, _propertyPoints);\n\n _classPrivateFieldSet(this, _propertyAllocate, (_classPrivateFieldSet2 = {}, _defineProperty(_classPrivateFieldSet2, _classPrivateFieldGet(this, _types).CHR, 0), _defineProperty(_classPrivateFieldSet2, _classPrivateFieldGet(this, _types).INT, 0), _defineProperty(_classPrivateFieldSet2, _classPrivateFieldGet(this, _types).STR, 0), _defineProperty(_classPrivateFieldSet2, _classPrivateFieldGet(this, _types).MNY, 0), _classPrivateFieldSet2));\n\n this.updateAllocate();\n }\n }, {\n key: "next",\n value: function next() {\n var left = _classPrivateFieldGet(this, _propertyPoints) - this.total;\n\n if (left > 0) {\n return $$event(\'message\', [\'F_PropertyPointLeft\', left]);\n }\n\n $ui.switchView(UI.pages.TRAJECTORY, {\n propertyAllocate: _classPrivateFieldGet(this, _propertyAllocate),\n talents: this.listSelectedTalents.array\n });\n }\n }, {\n key: "total",\n get: function get() {\n return _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).CHR] + _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).INT] + _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).STR] + _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).MNY];\n }\n }, {\n key: "updateAllocate",\n value: function updateAllocate() {\n var charm = _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).CHR];\n\n var intelligence = _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).INT];\n\n var strength = _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).STR];\n\n var money = _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).MNY];\n\n this.inputCharm.text = \'\' + charm;\n this.inputIntelligence.text = \'\' + intelligence;\n this.inputStrength.text = \'\' + strength;\n this.inputMoney.text = \'\' + money;\n this.labLeftPropertyPoint.text = _classPrivateFieldGet(this, _propertyPoints) - this.total;\n this.btnCharmIncrease.disabled = this.btnCharmIncrease.gray = false;\n this.btnCharmReduce.disabled = this.btnCharmReduce.gray = false;\n this.btnIntelligenceIncrease.disabled = this.btnIntelligenceIncrease.gray = false;\n this.btnIntelligenceReduce.disabled = this.btnIntelligenceReduce.gray = false;\n this.btnStrengthIncrease.disabled = this.btnStrengthIncrease.gray = false;\n this.btnStrengthReduce.disabled = this.btnStrengthReduce.gray = false;\n this.btnMoneyIncrease.disabled = this.btnMoneyIncrease.gray = false;\n this.btnMoneyReduce.disabled = this.btnMoneyReduce.gray = false;\n }\n }, {\n key: "check",\n value: function check(left, right, value) {\n if (value < left) return false;\n if (value > right) return false;\n return true;\n }\n }, {\n key: "random",\n value: function random() {\n var t = _classPrivateFieldGet(this, _propertyPoints);\n\n var arr = new Array(4).fill(_classPrivateFieldGet(this, _propertyAllocateLimit)[1]);\n\n while (t > 0) {\n var sub = Math.round(Math.random() * (Math.min(t, _classPrivateFieldGet(this, _propertyAllocateLimit)[1]) - 1)) + 1;\n\n while (true) {\n var select = Math.floor(Math.random() * 4) % 4;\n if (arr[select] - sub < 0) continue;\n arr[select] -= sub;\n t -= sub;\n break;\n }\n }\n\n _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).CHR] = _classPrivateFieldGet(this, _propertyAllocateLimit)[1] - arr[0];\n _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).INT] = _classPrivateFieldGet(this, _propertyAllocateLimit)[1] - arr[1];\n _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).STR] = _classPrivateFieldGet(this, _propertyAllocateLimit)[1] - arr[2];\n _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).MNY] = _classPrivateFieldGet(this, _propertyAllocateLimit)[1] - arr[3];\n this.updateAllocate();\n }\n }, {\n key: "onPropertyAllocate",\n value: function onPropertyAllocate(type, value) {\n if (!this.check(_classPrivateFieldGet(this, _propertyAllocateLimit)[0], _classPrivateFieldGet(this, _propertyAllocateLimit)[1], _classPrivateFieldGet(this, _propertyAllocate)[type] + value)) {\n return;\n }\n\n if (!this.check(0, _classPrivateFieldGet(this, _propertyPoints), this.total + value)) {\n return;\n }\n\n _classPrivateFieldGet(this, _propertyAllocate)[type] += value;\n this.updateAllocate();\n }\n }, {\n key: "onPropertyAllocateInput",\n value: function onPropertyAllocateInput(type, inputItem) {\n var value = parseInt(inputItem.text) || 0;\n var total = this.total;\n\n if (total + value < 0) {\n value = _classPrivateFieldGet(this, _propertyAllocateLimit)[0] * 4 - total;\n } else if (total + value > _classPrivateFieldGet(this, _propertyPoints)) {\n value = _classPrivateFieldGet(this, _propertyPoints) - total;\n }\n\n if (value < _classPrivateFieldGet(this, _propertyAllocateLimit)[0]) {\n value = _classPrivateFieldGet(this, _propertyAllocateLimit)[0];\n } else if (value > _classPrivateFieldGet(this, _propertyAllocateLimit)[1]) {\n value = _classPrivateFieldGet(this, _propertyAllocateLimit)[1];\n }\n\n var alter = value - _classPrivateFieldGet(this, _propertyAllocate)[type];\n\n if (alter) {\n this.onPropertyAllocate(type, alter);\n } else {\n this.updateAllocate();\n }\n }\n }, {\n key: "renderTalent",\n value: function renderTalent(box) {\n var dataSource = box.dataSource;\n box.label = $_.format($lang.F_TalentSelection, dataSource);\n var style = $ui.common.card[dataSource.grade].normal;\n $_.deepMapSet(box, style);\n }\n }]);\n\n return Property;\n}(ui.view.DefaultTheme.PropertyUI);\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjYxNC5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUE7Ozs7O0FBQ0E7QUFBQTs7QUFBQTs7QUFDQTs7QUFEQTtBQUFBO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RlciA9IHZhbHVlIC0gdGhpcy4jcHJvcGVydHlBbGxvY2F0ZVt0eXBlXTtcclxuICAgICAgICBpZiAoYWx0ZXIpIHtcclxuICAgICAgICAgICAgdGhpcy5vblByb3BlcnR5QWxsb2NhdGUodHlwZSwgYWx0ZXIpO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIHRoaXMudXBkYXRlQWxsb2NhdGUoKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcmVuZGVyVGFsZW50KGJveCkge1xyXG4gICAgICAgIGNvbnN0IGRhdGFTb3VyY2UgPSBib3guZGF0YVNvdXJjZTtcclxuXHJcbiAgICAgICAgYm94LmxhYmVsID0gJF8uZm9ybWF0KCRsYW5nLkZfVGFsZW50U2VsZWN0aW9uLCBkYXRhU291cmNlKTtcclxuICAgICAgICBjb25zdCBzdHlsZSA9ICR1aS5jb21tb24uY2FyZFtkYXRhU291cmNlLmdyYWRlXS5ub3JtYWw7XHJcblxyXG4gICAgICAgICRfLmRlZXBNYXBTZXQoYm94LCBzdHlsZSk7XHJcbiAgICB9XHJcbn0iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///2614\n')}}]);