bnstooltips 1.6.5 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ItemImproveTooltip/ItemImproveTooltip.d.ts +5 -0
- package/build/ItemImproveTooltip/ItemImproveTooltip.types.d.ts +11 -0
- package/build/ItemImproveTooltipWrapper/ItemImproveTooltipWrapper.d.ts +6 -0
- package/build/ItemImproveTooltipWrapper/ItemImproveTooltipWrapper.types.d.ts +11 -0
- package/build/ItemTooltip/ItemTooltip.d.ts +1 -1
- package/build/ItemTooltip/ItemTooltip.types.d.ts +1 -0
- package/build/ItemTooltip/SubComponents/DecomposeResults.d.ts +1 -0
- package/build/ItemTooltip/SubComponents/ItemIconNameDiv.d.ts +4 -1
- package/build/ItemTooltipWrapper/ItemTooltipWrapper.types.d.ts +1 -0
- package/build/TooltipWrapper/TooltipWrapper.d.ts +6 -0
- package/build/TooltipWrapper/TooltipWrapper.types.d.ts +17 -0
- package/build/Utilities/INpc.d.ts +1 -1
- package/build/Utilities/TooltipSettingsBase.d.ts +13 -0
- package/build/index.d.ts +4 -0
- package/build/index.es.js +545 -319
- package/build/index.es.js.map +1 -1
- package/build/index.js +546 -318
- package/build/index.js.map +1 -1
- package/build/itemapiclient/api.d.ts +111 -0
- package/package.json +9 -9
package/build/index.es.js
CHANGED
|
@@ -30,8 +30,8 @@ function styleInject(css, ref) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
var css_248z$
|
|
34
|
-
styleInject(css_248z$
|
|
33
|
+
var css_248z$9 = "*[class*=\"00008130.UI.Label_LightYellow_12\"] {\n color: #ecd967 !important; }\n\n*[class*=\"00008130.UI.Vital_LightBlue\"] {\n color: #46bee1 !important;\n font-weight: 500 !important; }\n\n*[class*=\"00008130.UI.Label_Green03_12\"] {\n color: #58ff77 !important; }\n\n*[class*=\"00008130.Program.Fontset_Chatting_Color_19\"] {\n color: #58ff77; }\n\n.TooltipBase_grade-none {\n color: #c2cadc; }\n\n.TooltipBase_grade-1 {\n color: #6c6c6c !important; }\n\n.TooltipBase_border-grade-1 {\n border-color: #6c6c6c !important; }\n\n.TooltipBase_border-hover-grade-1:hover {\n border-color: #6c6c6c !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_1\"] {\n color: #6c6c6c !important;\n border-color: #6c6c6c !important; }\n\n.TooltipBase_grade-2 {\n color: #ffffff !important; }\n\n.TooltipBase_border-grade-2 {\n border-color: #ffffff !important; }\n\n.TooltipBase_border-hover-grade-2:hover {\n border-color: #ffffff !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_2\"] {\n color: #ffffff !important;\n border-color: #ffffff !important; }\n\n.TooltipBase_grade-3 {\n color: #58ff77 !important; }\n\n.TooltipBase_border-grade-3 {\n border-color: #58ff77 !important; }\n\n.TooltipBase_border-hover-grade-3:hover {\n border-color: #58ff77 !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_3\"] {\n color: #58ff77 !important;\n border-color: #58ff77 !important; }\n\n.TooltipBase_grade-4 {\n color: #46bee1 !important; }\n\n.TooltipBase_border-grade-4 {\n border-color: #46bee1 !important; }\n\n.TooltipBase_border-hover-grade-4:hover {\n border-color: #46bee1 !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_4\"] {\n color: #46bee1 !important;\n border-color: #46bee1 !important; }\n\n.TooltipBase_grade-5 {\n color: #d739ff !important; }\n\n.TooltipBase_border-grade-5 {\n border-color: #d739ff !important; }\n\n.TooltipBase_border-hover-grade-5:hover {\n border-color: #d739ff !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_5\"] {\n color: #d739ff !important;\n border-color: #d739ff !important; }\n\n.TooltipBase_grade-6 {\n color: #f1b248 !important; }\n\n.TooltipBase_border-grade-6 {\n border-color: #f1b248 !important; }\n\n.TooltipBase_border-hover-grade-6:hover {\n border-color: #f1b248 !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_6\"] {\n color: #f1b248 !important;\n border-color: #f1b248 !important; }\n\n.TooltipBase_grade-7 {\n color: #ff770a !important; }\n\n.TooltipBase_border-grade-7 {\n border-color: #ff770a !important; }\n\n.TooltipBase_border-hover-grade-7:hover {\n border-color: #ff770a !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_7\"] {\n color: #ff770a !important;\n border-color: #ff770a !important; }\n\n.TooltipBase_grade-8 {\n color: #ff0084 !important; }\n\n.TooltipBase_border-grade-8 {\n border-color: #ff0084 !important; }\n\n.TooltipBase_border-hover-grade-8:hover {\n border-color: #ff0084 !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_8\"] {\n color: #ff0084 !important;\n border-color: #ff0084 !important; }\n\n.TooltipBase_iconbg-grade-1 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_1.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-2 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_2.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-3 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_3.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-4 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_4.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-5 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_5.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-6 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_6.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-7 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_7.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-8 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_9.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-9 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_9.png\") no-repeat; }\n\n.TooltipBase_container {\n box-sizing: border-box;\n font-family: \"Montserrat\", sans-serif !important;\n scroll-behavior: smooth;\n touch-action: manipulation;\n -webkit-overflow-scrolling: touch;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n position: relative;\n display: inline-flex;\n flex-direction: column;\n background-color: rgba(3, 3, 3, 0.9);\n backdrop-filter: brightness(1.5) blur(5px);\n -webkit-backdrop-filter: brightness(1.5) blur(5px);\n padding: 1rem;\n border: 1px solid;\n border-color: #6c6c6c;\n font-weight: 500;\n font-size: 16px;\n text-decoration: none;\n color: #fff;\n width: 380px;\n max-height: calc(100vh - 50px);\n overflow-y: auto;\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */\n border-radius: 3px;\n text-shadow: black 1px 1px 0; }\n\n.TooltipBase_containerFullHeight {\n height: 99%; }\n\n.TooltipBase_container::-webkit-scrollbar {\n display: none; }\n\n@media only screen and (max-width: 380px) {\n .TooltipBase_container {\n width: 100%; } }\n\n@supports not (backdrop-filter: brightness(1.5) blur(5px)) {\n .TooltipBase_container {\n background-color: rgba(0, 0, 0, 0.95); }\n .TooltipBase_container-loading {\n background-color: rgba(0, 0, 0, 0.95); } }\n\n.TooltipBase_container-loading {\n background-color: rgba(3, 3, 3, 0.9);\n backdrop-filter: brightness(1.5) blur(5px);\n -webkit-backdrop-filter: brightness(1.5) blur(5px);\n padding: 1rem; }\n\n.TooltipBase_titlesubtitle {\n display: flex;\n justify-content: space-between;\n margin-bottom: 1rem; }\n\n.TooltipBase_title {\n flex: 1;\n overflow: hidden;\n padding-right: 1rem; }\n\n.TooltipBase_title_text {\n font-size: 18px;\n text-shadow: black 1px 1px 0;\n font-weight: 500; }\n\n.TooltipBase_subtitle {\n text-align: end;\n font-size: 12px; }\n\n.TooltipBase_iconmaininfo {\n display: flex;\n margin-bottom: 0.8rem; }\n\n.TooltipBase_iconcontainer {\n margin-right: 0.5rem;\n margin-bottom: 0.25rem;\n float: left;\n position: relative; }\n\n.TooltipBase_iconBg {\n width: 64px;\n height: 64px;\n background-origin: content-box !important; }\n\n.TooltipBase_icon {\n width: calc(64px - (0px * 2));\n height: calc(64px - (0px * 2));\n padding: 0px; }\n\n.TooltipBase_maininfocontainer {\n font-size: 16px;\n font-weight: 500; }\n\n.TooltipBase_maininfocontainer > div:not(:last-child) {\n margin-bottom: 0.2rem; }\n\n.TooltipBase_fullwidthContainer {\n line-height: 17px; }\n\n.TooltipBase_fullwidthContainer > div:not(:last-child) {\n margin-bottom: 0.5rem; }\n\n.TooltipBase_fullwidthContainer-subContainer {\n font-size: 12px; }\n\n.TooltipBase_fullwidthContainer-subContainer > div:not(:last-child) {\n margin-bottom: 0.1rem; }\n\n.TooltipBase_flex {\n display: flex;\n align-items: center; }\n\n.TooltipBase_flex-col {\n display: flex;\n justify-content: center;\n flex-direction: column; }\n\n.TooltipBase_descriptions-description-title {\n font-weight: 500; }\n";
|
|
34
|
+
styleInject(css_248z$9);
|
|
35
35
|
|
|
36
36
|
function TooltipBase(_a) {
|
|
37
37
|
var title = _a.title, category = _a.subtitle, grade = _a.grade, _b = _a.icon, icon = _b === void 0 ? "" : _b, _c = _a.mainInfos, mainTexts = _c === void 0 ? [] : _c, _d = _a.subInfoGroups, subTexts = _d === void 0 ? [] : _d, id = _a.id, _e = _a.fullHeight, fullHeight = _e === void 0 ? false : _e;
|
|
@@ -133,8 +133,8 @@ function __generator(thisArg, body) {
|
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
var css_248z$
|
|
137
|
-
styleInject(css_248z$
|
|
136
|
+
var css_248z$8 = ".ItemTooltip_itemIconLoading {\n width: 50px;\n padding: 0.22rem 0;\n display: flex;\n justify-content: center;\n align-items: center; }\n\n.ItemTooltip_jobstyleToggleContainer {\n display: flex; }\n\n.ItemTooltip_optionPadding {\n margin: .2rem 0 .5rem 0; }\n\n.ItemTooltip_showButton {\n flex: 1;\n border: none;\n padding: 0.33rem 0.5rem;\n border-radius: 0;\n background-color: rgba(233, 233, 233, 0.2);\n color: #fff;\n opacity: 0.8;\n cursor: pointer;\n transition: background-color 0.1s; }\n .ItemTooltip_showButton:hover {\n background-color: rgba(255, 255, 255, 0.3);\n opacity: 1; }\n .ItemTooltip_showButton-active {\n background-color: rgba(255, 255, 255, 0.4) !important;\n color: #fff;\n opacity: 1; }\n\n.ItemTooltip_jobstyleButton {\n flex: 1;\n border: none;\n padding: 0.33rem 0.5rem;\n border-radius: 0;\n background-color: rgba(233, 233, 233, 0.1);\n color: #fff;\n opacity: 0.8;\n cursor: pointer;\n transition: background-color 0.1s; }\n .ItemTooltip_jobstyleButton:hover {\n background-color: rgba(255, 255, 255, 0.2);\n opacity: 1; }\n .ItemTooltip_jobstyleButton-active {\n background-color: rgba(255, 255, 255, 0.3) !important;\n color: #fff;\n opacity: 1; }\n\n.ItemTooltip_itemiconnamedivspan {\n display: flex;\n justify-content: center;\n align-items: center; }\n\n.ItemTooltip_cooldown {\n font-weight: 400;\n font-size: 12px; }\n\n.ItemTooltip_subInfo {\n font-size: 14px; }\n\n.ItemTooltip_stats_mainstat {\n font-size: 16px;\n margin-bottom: 0.05rem; }\n\n.ItemTooltip_stats_substat {\n font-size: 14px; }\n\n.ItemTooltip_itemIconInline {\n width: 18px !important;\n height: 18px !important;\n margin: 0 1px;\n top: 3px;\n position: relative; }\n\n.ItemTooltip_itemIconRandom {\n width: 36px !important;\n top: 6px;\n margin: 0 1px 0 2px; }\n\n.ItemTooltip_itemIconSmall {\n width: 20px !important;\n height: 20px !important;\n margin-right: 0.33rem; }\n\n.ItemTooltip_setBonus {\n margin-bottom: 0.8rem !important; }\n\n.ItemTooltip_setContainer {\n padding-left: 0.33rem;\n padding-top: 0.22rem; }\n\n.ItemTooltip_setStageContainer {\n display: flex;\n margin: 0.25rem 0 0.35rem 0; }\n\n.ItemTooltip_setStageNumber {\n margin-top: 0.2rem;\n padding-top: 0.1rem;\n line-height: 16px;\n width: 16px;\n height: 16px;\n max-height: 16px;\n font-weight: 500;\n display: flex;\n justify-content: center;\n align-items: center;\n color: rgba(88, 255, 119, 0.8);\n border: 1px solid rgba(88, 255, 119, 0.9);\n border-radius: 3px; }\n\n.ItemTooltip_setStageContent {\n padding-top: 0.2rem;\n flex-grow: 2;\n padding-left: 0.55rem;\n max-width: 90%;\n color: #58ff77; }\n\n.ItemTooltip_itemiconnamediv {\n display: flex;\n align-items: center;\n padding: 0.15rem 0 0.15rem 0.33rem;\n line-height: 20px; }\n\n.ItemTooltip_setItemIconNameDiv {\n display: flex;\n align-items: center;\n padding: 0.11rem 0 0.11rem 0.33rem;\n line-height: 20px; }\n\n.ItemTooltip_setItemsContainer {\n display: flex;\n font-size: 12px; }\n\n.ItemTooltip_setItemsSubContainer {\n flex: 1; }\n\n.ItemTooltip_itemNameRandomDiv {\n display: flex;\n align-items: center; }\n\n@media only screen and (max-width: 380px) {\n .ItemTooltip_jobstyleButton {\n padding: 0.5rem; } }\n\n/**\r\n * ==============================================\r\n * Dot Elastic\r\n * ==============================================\r\n */\n.dot-elastic {\n position: relative;\n width: 10px;\n height: 10px;\n border-radius: 5px;\n background-color: rgba(127, 127, 127, 0.8);\n color: rgba(127, 127, 127, 0.8);\n animation: dotElastic 1s infinite linear; }\n\n.dot-elastic::before,\n.dot-elastic::after {\n content: \"\";\n display: inline-block;\n position: absolute;\n top: 0; }\n\n.dot-elastic::before {\n left: -15px;\n width: 10px;\n height: 10px;\n border-radius: 5px;\n background-color: rgba(127, 127, 127, 0.8);\n color: rgba(127, 127, 127, 0.8);\n animation: dotElasticBefore 1s infinite linear; }\n\n.dot-elastic::after {\n left: 15px;\n width: 10px;\n height: 10px;\n border-radius: 5px;\n background-color: rgba(127, 127, 127, 0.8);\n color: rgba(127, 127, 127, 0.8);\n animation: dotElasticAfter 1s infinite linear; }\n\n@keyframes dotElasticBefore {\n 0% {\n transform: scale(1, 1); }\n 25% {\n transform: scale(1, 1.5); }\n 50% {\n transform: scale(1, 0.67); }\n 75% {\n transform: scale(1, 1); }\n 100% {\n transform: scale(1, 1); } }\n\n@keyframes dotElastic {\n 0% {\n transform: scale(1, 1); }\n 25% {\n transform: scale(1, 1); }\n 50% {\n transform: scale(1, 1.5); }\n 75% {\n transform: scale(1, 1); }\n 100% {\n transform: scale(1, 1); } }\n\n@keyframes dotElasticAfter {\n 0% {\n transform: scale(1, 1); }\n 25% {\n transform: scale(1, 1); }\n 50% {\n transform: scale(1, 0.67); }\n 75% {\n transform: scale(1, 1.5); }\n 100% {\n transform: scale(1, 1); } }\n";
|
|
137
|
+
styleInject(css_248z$8);
|
|
138
138
|
|
|
139
139
|
function BuildIconPath(iconPath, iconIndex) {
|
|
140
140
|
if (iconPath == null)
|
|
@@ -712,6 +712,27 @@ var BnsItemApiFetchParamCreator = function (configuration) {
|
|
|
712
712
|
options: localVarRequestOptions,
|
|
713
713
|
};
|
|
714
714
|
},
|
|
715
|
+
/**
|
|
716
|
+
*
|
|
717
|
+
* @param {*} [options] Override http request option.
|
|
718
|
+
* @throws {RequiredError}
|
|
719
|
+
*/
|
|
720
|
+
bnsItemRegionsGet: function (options) {
|
|
721
|
+
if (options === void 0) { options = {}; }
|
|
722
|
+
var localVarPath = "/BnsItem/Regions";
|
|
723
|
+
var localVarUrlObj = url.parse(localVarPath, true);
|
|
724
|
+
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
725
|
+
var localVarHeaderParameter = {};
|
|
726
|
+
var localVarQueryParameter = {};
|
|
727
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
728
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
729
|
+
delete localVarUrlObj.search;
|
|
730
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
731
|
+
return {
|
|
732
|
+
url: url.format(localVarUrlObj),
|
|
733
|
+
options: localVarRequestOptions,
|
|
734
|
+
};
|
|
735
|
+
},
|
|
715
736
|
/**
|
|
716
737
|
*
|
|
717
738
|
* @param {string} region
|
|
@@ -978,6 +999,26 @@ var BnsItemApiFp = function (configuration) {
|
|
|
978
999
|
});
|
|
979
1000
|
};
|
|
980
1001
|
},
|
|
1002
|
+
/**
|
|
1003
|
+
*
|
|
1004
|
+
* @param {*} [options] Override http request option.
|
|
1005
|
+
* @throws {RequiredError}
|
|
1006
|
+
*/
|
|
1007
|
+
bnsItemRegionsGet: function (options) {
|
|
1008
|
+
var localVarFetchArgs = BnsItemApiFetchParamCreator().bnsItemRegionsGet(options);
|
|
1009
|
+
return function (fetch, basePath) {
|
|
1010
|
+
if (fetch === void 0) { fetch = isomorphicFetch; }
|
|
1011
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
1012
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
|
|
1013
|
+
if (response.status >= 200 && response.status < 300) {
|
|
1014
|
+
return response.json();
|
|
1015
|
+
}
|
|
1016
|
+
else {
|
|
1017
|
+
throw response;
|
|
1018
|
+
}
|
|
1019
|
+
});
|
|
1020
|
+
};
|
|
1021
|
+
},
|
|
981
1022
|
/**
|
|
982
1023
|
*
|
|
983
1024
|
* @param {string} region
|
|
@@ -1125,6 +1166,15 @@ var BnsItemApi = /** @class */ (function (_super) {
|
|
|
1125
1166
|
BnsItemApi.prototype.bnsItemPingGet = function (options) {
|
|
1126
1167
|
return BnsItemApiFp(this.configuration).bnsItemPingGet(options)(this.fetch, this.basePath);
|
|
1127
1168
|
};
|
|
1169
|
+
/**
|
|
1170
|
+
*
|
|
1171
|
+
* @param {*} [options] Override http request option.
|
|
1172
|
+
* @throws {RequiredError}
|
|
1173
|
+
* @memberof BnsItemApi
|
|
1174
|
+
*/
|
|
1175
|
+
BnsItemApi.prototype.bnsItemRegionsGet = function (options) {
|
|
1176
|
+
return BnsItemApiFp(this.configuration).bnsItemRegionsGet(options)(this.fetch, this.basePath);
|
|
1177
|
+
};
|
|
1128
1178
|
/**
|
|
1129
1179
|
*
|
|
1130
1180
|
* @param {string} region
|
|
@@ -1220,208 +1270,11 @@ var ItemDownloadClient = /** @class */ (function () {
|
|
|
1220
1270
|
return ItemDownloadClient;
|
|
1221
1271
|
}());
|
|
1222
1272
|
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
return React.createElement("div", { dangerouslySetInnerHTML: { __html: item.mainInfo } });
|
|
1226
|
-
return null;
|
|
1227
|
-
}
|
|
1228
|
-
|
|
1229
|
-
function ItemSubInfo(item) {
|
|
1230
|
-
if (item.subInfo != null)
|
|
1231
|
-
return (React.createElement("div", { className: "ItemTooltip_subInfo", dangerouslySetInnerHTML: {
|
|
1232
|
-
__html: ReplaceIconsInHtmlString(item.subInfo),
|
|
1233
|
-
} }));
|
|
1234
|
-
return null;
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
function ItemSkillTitles(_a) {
|
|
1238
|
-
var item = _a.item, itemCombats = _a.itemCombats, jobstyle = _a.jobstyle;
|
|
1239
|
-
if (item.skills == null || item.skills.length == 0)
|
|
1240
|
-
return null;
|
|
1241
|
-
var computedSkills = item.skills;
|
|
1242
|
-
if (itemCombats) {
|
|
1243
|
-
computedSkills = computedSkills.filter(function (x) { return x.jobstyle === jobstyle; });
|
|
1244
|
-
}
|
|
1245
|
-
computedSkills = computedSkills.filter(function (x) { return x.title != null; });
|
|
1246
|
-
return (React.createElement("div", null, computedSkills.map(function (itemSkill, i) { return (React.createElement("div", { key: itemSkill.title + "_" + i, dangerouslySetInnerHTML: { __html: itemSkill.title } })); })));
|
|
1247
|
-
}
|
|
1248
|
-
|
|
1249
|
-
function ItemCooldowns(item) {
|
|
1250
|
-
return (React.createElement(React.Fragment, null,
|
|
1251
|
-
item.cooldownInMs != 0 ? (React.createElement("div", { className: "ItemTooltip_cooldown" },
|
|
1252
|
-
"Cooldown: ",
|
|
1253
|
-
GetCooldownString(item.cooldownInMs))) : null,
|
|
1254
|
-
item.bgCooldownInMs != 0 ? (React.createElement("div", { className: "ItemTooltip_cooldown" },
|
|
1255
|
-
"Battleground Reset Time: ",
|
|
1256
|
-
GetCooldownString(item.bgCooldownInMs))) : null));
|
|
1257
|
-
}
|
|
1258
|
-
function GetCooldownString(cooldownInMs) {
|
|
1259
|
-
var cooldownInS = cooldownInMs / 1000;
|
|
1260
|
-
if (cooldownInS >= 60) {
|
|
1261
|
-
var cooldownMins = Math.floor(cooldownInS / 60);
|
|
1262
|
-
var cooldownSecs = cooldownInS - cooldownMins * 60;
|
|
1263
|
-
var result = "";
|
|
1264
|
-
if (cooldownMins > 60) {
|
|
1265
|
-
var cooldownHs = Math.floor(cooldownMins / 60);
|
|
1266
|
-
cooldownMins = cooldownMins - cooldownHs * 60;
|
|
1267
|
-
result += "".concat(cooldownHs, " hr. ");
|
|
1268
|
-
}
|
|
1269
|
-
if (cooldownMins > 0) {
|
|
1270
|
-
result += "".concat(cooldownMins, " min. ");
|
|
1271
|
-
}
|
|
1272
|
-
if (cooldownSecs > 0) {
|
|
1273
|
-
result += "".concat(cooldownSecs, " sec. ");
|
|
1274
|
-
}
|
|
1275
|
-
result = result.trim();
|
|
1276
|
-
return result;
|
|
1277
|
-
}
|
|
1278
|
-
else {
|
|
1279
|
-
return "".concat(cooldownInS, " sec.");
|
|
1280
|
-
}
|
|
1281
|
-
}
|
|
1282
|
-
|
|
1283
|
-
function removeDuplicates(stats) {
|
|
1284
|
-
return stats.filter(function (value, index, self) {
|
|
1285
|
-
return index === self.findIndex(function (t) { return t.name === value.name; });
|
|
1286
|
-
});
|
|
1287
|
-
}
|
|
1288
|
-
function ItemStats(item) {
|
|
1289
|
-
return (React.createElement("div", { className: "ItemTooltip_stats" },
|
|
1290
|
-
removeDuplicates(item.stats)
|
|
1291
|
-
.filter(function (x) { return x.isMainStat; })
|
|
1292
|
-
.map(function (mainStat, i) {
|
|
1293
|
-
if (mainStat.name.includes("-min"))
|
|
1294
|
-
return;
|
|
1295
|
-
var statValue = mainStat.value;
|
|
1296
|
-
//minmax
|
|
1297
|
-
if (mainStat.name.includes("-max")) {
|
|
1298
|
-
var minVal = item.stats.find(function (x) { return x.name === mainStat.name.replace("-max", "-min"); }).value;
|
|
1299
|
-
statValue = (mainStat.value + minVal) / 2;
|
|
1300
|
-
}
|
|
1301
|
-
return (React.createElement("div", { key: mainStat.name + "_" + i, className: "ItemTooltip_stats_mainstat" },
|
|
1302
|
-
GetStatDisplayValue(statValue, mainStat.isPercentage),
|
|
1303
|
-
"\u00A0",
|
|
1304
|
-
ReplaceBossAndPvpAp(mainStat.name).replace("Max.", "").trim()));
|
|
1305
|
-
}),
|
|
1306
|
-
removeDuplicates(item.stats)
|
|
1307
|
-
.filter(function (x) { return !x.isMainStat; })
|
|
1308
|
-
.map(function (subStat, i) {
|
|
1309
|
-
if (subStat.name.includes("-min"))
|
|
1310
|
-
return;
|
|
1311
|
-
var statValue = subStat.value;
|
|
1312
|
-
//minmax
|
|
1313
|
-
if (subStat.name.includes("-max")) {
|
|
1314
|
-
var minVal = item.stats.find(function (x) { return x.name === subStat.name.replace("-max", "-min"); }).value;
|
|
1315
|
-
statValue = (subStat.value + minVal) / 2;
|
|
1316
|
-
}
|
|
1317
|
-
return (React.createElement("div", { key: subStat.name + "_" + i, className: "ItemTooltip_stats_substat" },
|
|
1318
|
-
GetStatDisplayValue(statValue, subStat.isPercentage),
|
|
1319
|
-
"\u00A0",
|
|
1320
|
-
ReplaceBossAndPvpAp(subStat.name).replace("Max.", "").trim()));
|
|
1321
|
-
})));
|
|
1322
|
-
}
|
|
1323
|
-
|
|
1324
|
-
function ItemRandomStats(item) {
|
|
1325
|
-
return (React.createElement("div", { className: "ItemTooltip_stats" }, item.randomStats.map(function (randomStat, i) {
|
|
1326
|
-
return (React.createElement("div", { key: randomStat.name + "_" + i, className: randomStat.isMainStat
|
|
1327
|
-
? "ItemTooltip_stats_mainstat"
|
|
1328
|
-
: "ItemTooltip_stats_substat" },
|
|
1329
|
-
GetStatDisplayValue(randomStat.min, randomStat.isPercentage),
|
|
1330
|
-
"~",
|
|
1331
|
-
GetStatDisplayValue(randomStat.max, randomStat.isPercentage),
|
|
1332
|
-
"\u00A0",
|
|
1333
|
-
ReplaceBossAndPvpAp(randomStat.name),
|
|
1334
|
-
React.createElement("img", { alt: "", className: "ItemTooltip_itemIconInline ItemTooltip_itemIconRandom", src: BuildIconPath("00015590/Tag_Random") })));
|
|
1335
|
-
})));
|
|
1336
|
-
}
|
|
1337
|
-
|
|
1338
|
-
function GearScore(item) {
|
|
1339
|
-
return (React.createElement("div", null,
|
|
1340
|
-
"debug-gs: ",
|
|
1341
|
-
item.gearScore,
|
|
1342
|
-
React.createElement("br", null),
|
|
1343
|
-
"debug-is: ",
|
|
1344
|
-
item.itemScore,
|
|
1345
|
-
React.createElement("br", null),
|
|
1346
|
-
"debug-fs: ",
|
|
1347
|
-
item.fusionScore));
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
function TopText(item) {
|
|
1351
|
-
return (React.createElement("div", { className: "ItemTooltip_toptext", dangerouslySetInnerHTML: { __html: item.topText } }));
|
|
1352
|
-
}
|
|
1353
|
-
|
|
1354
|
-
function ItemSkillDescriptions(_a) {
|
|
1355
|
-
var item = _a.item, itemCombats = _a.itemCombats, jobstyle = _a.jobstyle;
|
|
1356
|
-
if (item.skills == null || item.skills.length == 0)
|
|
1357
|
-
return null;
|
|
1358
|
-
var computedSkills = item.skills;
|
|
1359
|
-
if (itemCombats) {
|
|
1360
|
-
computedSkills = computedSkills.filter(function (x) { return x.jobstyle === jobstyle; });
|
|
1361
|
-
}
|
|
1362
|
-
computedSkills = computedSkills.filter(function (x) { return x.description != null; });
|
|
1363
|
-
return (React.createElement("div", { className: "ItemTooltip_skilldescs 00008130.UI.Label_Green03_12" }, computedSkills.map(function (skill, i) { return (React.createElement("div", { key: skill.title + "_" + i, dangerouslySetInnerHTML: { __html: skill.description } })); })));
|
|
1364
|
-
}
|
|
1365
|
-
|
|
1366
|
-
function SkillModifierGroup(props) {
|
|
1367
|
-
var modifierGroup = props.modifierGroup;
|
|
1368
|
-
return (React.createElement(React.Fragment, null, modifierGroup.modifiers.map(function (modifier, i) { return (React.createElement("div", { key: "modifier_" + i },
|
|
1369
|
-
modifier.skills.map(function (skill, i2) { return (React.createElement(React.Fragment, { key: skill.item2 + "_" + i + "_" + i2 },
|
|
1370
|
-
React.createElement("span", { className: "00008130.UI.Vital_LightBlue", dangerouslySetInnerHTML: { __html: skill.item2 } }),
|
|
1371
|
-
i2 != modifier.skills.length - 1 ? React.createElement(React.Fragment, null, ",\u00A0") : null)); }),
|
|
1372
|
-
"\u00A0",
|
|
1373
|
-
GetTextForVerb(modifier.verb),
|
|
1374
|
-
"\u00A0",
|
|
1375
|
-
Math.abs(modifier.value) / 10,
|
|
1376
|
-
"%")); })));
|
|
1377
|
-
}
|
|
1378
|
-
function GetTextForVerb(verb) {
|
|
1379
|
-
if (verb === "percentDamage")
|
|
1380
|
-
return "Damage increases by";
|
|
1381
|
-
if (verb === "percentCD")
|
|
1382
|
-
return "Cooldown decreases by";
|
|
1383
|
-
return "";
|
|
1384
|
-
}
|
|
1385
|
-
|
|
1386
|
-
function SkillModifiers(props) {
|
|
1387
|
-
var modifierGroups = props.skillModifierGroups;
|
|
1388
|
-
if (props.isSetBonus) {
|
|
1389
|
-
modifierGroups = modifierGroups.filter(function (x) { return x.jobstyle === props.jobstyle; });
|
|
1390
|
-
}
|
|
1391
|
-
return (React.createElement("div", { className: "ItemTooltip_skilldescs 00008130.UI.Label_Green03_12" }, modifierGroups.map(function (skillModifierGroup, i) { return (React.createElement(SkillModifierGroup, { key: "skillModifierGroup_" + i, modifierGroup: skillModifierGroup })); })));
|
|
1392
|
-
}
|
|
1393
|
-
|
|
1394
|
-
function SetBonusItems(setBonus) {
|
|
1395
|
-
var items = setBonus.setItems;
|
|
1396
|
-
if (items.length >= 8)
|
|
1397
|
-
return null;
|
|
1398
|
-
return (React.createElement("div", { className: "ItemTooltip_setItemsContainer" },
|
|
1399
|
-
React.createElement("div", { className: "ItemTooltip_setItemsSubContainer" }, items.map(function (item, i) {
|
|
1400
|
-
return (React.createElement("div", { key: item.itemName + "_" + i, className: "ItemTooltip_setItemIconNameDiv" },
|
|
1401
|
-
item.itemIcon != null ? (React.createElement("img", { alt: "", className: "ItemTooltip_itemIconSmall", src: BuildIconPath(item.itemIcon.iconPath) })) : null,
|
|
1402
|
-
React.createElement("span", { dangerouslySetInnerHTML: { __html: item.itemName } })));
|
|
1403
|
-
}))));
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1406
|
-
function SetBonus(props) {
|
|
1407
|
-
var item = props.item, jobstyle = props.jobstyle;
|
|
1408
|
-
return (React.createElement("div", { className: "ItemTooltip_setBonus" },
|
|
1409
|
-
React.createElement("div", null,
|
|
1410
|
-
item.setBonus.setName != "" ? (React.createElement("div", { className: "00008130.UI.Vital_LightBlue", dangerouslySetInnerHTML: { __html: item.setBonus.setName } })) : null,
|
|
1411
|
-
React.createElement(SetBonusItems, __assign({}, item.setBonus)),
|
|
1412
|
-
React.createElement("div", { className: "ItemTooltip_setContainer" }, item.setBonus.setBonusStages
|
|
1413
|
-
.sort(function (a, b) { return a.setNumber - b.setNumber; })
|
|
1414
|
-
.map(function (setStage) { return (React.createElement("div", { key: setStage.setNumber, className: "ItemTooltip_setStageContainer" },
|
|
1415
|
-
React.createElement("div", null,
|
|
1416
|
-
React.createElement("div", { className: "ItemTooltip_setStageNumber" },
|
|
1417
|
-
React.createElement("span", null, setStage.setNumber))),
|
|
1418
|
-
React.createElement("div", { className: "ItemTooltip_setStageContent 00008130.UI.Label_Green03_12" },
|
|
1419
|
-
setStage.effects.map(function (effect, i) { return (React.createElement("div", { key: i, dangerouslySetInnerHTML: { __html: effect.description } })); }),
|
|
1420
|
-
React.createElement(SkillModifiers, { jobstyle: jobstyle, isSetBonus: true, skillModifierGroups: setStage.skillModifiers })))); })))));
|
|
1421
|
-
}
|
|
1273
|
+
var css_248z$7 = ".tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:\"\";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}";
|
|
1274
|
+
styleInject(css_248z$7);
|
|
1422
1275
|
|
|
1423
|
-
var css_248z$
|
|
1424
|
-
styleInject(css_248z$
|
|
1276
|
+
var css_248z$6 = "";
|
|
1277
|
+
styleInject(css_248z$6);
|
|
1425
1278
|
|
|
1426
1279
|
var top = 'top';
|
|
1427
1280
|
var bottom = 'bottom';
|
|
@@ -1579,33 +1432,36 @@ function getBasePlacement$1(placement) {
|
|
|
1579
1432
|
return placement.split('-')[0];
|
|
1580
1433
|
}
|
|
1581
1434
|
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1435
|
+
var max = Math.max;
|
|
1436
|
+
var min = Math.min;
|
|
1437
|
+
var round = Math.round;
|
|
1438
|
+
|
|
1439
|
+
function getBoundingClientRect(element, includeScale) {
|
|
1440
|
+
if (includeScale === void 0) {
|
|
1441
|
+
includeScale = false;
|
|
1442
|
+
}
|
|
1585
1443
|
|
|
1586
1444
|
var rect = element.getBoundingClientRect();
|
|
1587
1445
|
var scaleX = 1;
|
|
1588
|
-
var scaleY = 1;
|
|
1589
|
-
// `offsetWidth` returns an integer while `getBoundingClientRect`
|
|
1590
|
-
// returns a float. This results in `scaleX` or `scaleY` being
|
|
1591
|
-
// non-1 when it should be for elements that aren't a full pixel in
|
|
1592
|
-
// width or height.
|
|
1593
|
-
// if (isHTMLElement(element) && includeScale) {
|
|
1594
|
-
// const offsetHeight = element.offsetHeight;
|
|
1595
|
-
// const offsetWidth = element.offsetWidth;
|
|
1596
|
-
// // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
|
|
1597
|
-
// // Fallback to 1 in case both values are `0`
|
|
1598
|
-
// if (offsetWidth > 0) {
|
|
1599
|
-
// scaleX = rect.width / offsetWidth || 1;
|
|
1600
|
-
// }
|
|
1601
|
-
// if (offsetHeight > 0) {
|
|
1602
|
-
// scaleY = rect.height / offsetHeight || 1;
|
|
1603
|
-
// }
|
|
1604
|
-
// }
|
|
1446
|
+
var scaleY = 1;
|
|
1605
1447
|
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1448
|
+
if (isHTMLElement(element) && includeScale) {
|
|
1449
|
+
var offsetHeight = element.offsetHeight;
|
|
1450
|
+
var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
|
|
1451
|
+
// Fallback to 1 in case both values are `0`
|
|
1452
|
+
|
|
1453
|
+
if (offsetWidth > 0) {
|
|
1454
|
+
scaleX = round(rect.width) / offsetWidth || 1;
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
if (offsetHeight > 0) {
|
|
1458
|
+
scaleY = round(rect.height) / offsetHeight || 1;
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
return {
|
|
1463
|
+
width: rect.width / scaleX,
|
|
1464
|
+
height: rect.height / scaleY,
|
|
1609
1465
|
top: rect.top / scaleY,
|
|
1610
1466
|
right: rect.right / scaleX,
|
|
1611
1467
|
bottom: rect.bottom / scaleY,
|
|
@@ -1720,6 +1576,10 @@ function getContainingBlock(element) {
|
|
|
1720
1576
|
|
|
1721
1577
|
var currentNode = getParentNode(element);
|
|
1722
1578
|
|
|
1579
|
+
if (isShadowRoot(currentNode)) {
|
|
1580
|
+
currentNode = currentNode.host;
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1723
1583
|
while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
|
|
1724
1584
|
var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that
|
|
1725
1585
|
// create a containing block.
|
|
@@ -1756,13 +1616,13 @@ function getMainAxisFromPlacement(placement) {
|
|
|
1756
1616
|
return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
|
|
1757
1617
|
}
|
|
1758
1618
|
|
|
1759
|
-
var max = Math.max;
|
|
1760
|
-
var min = Math.min;
|
|
1761
|
-
var round = Math.round;
|
|
1762
|
-
|
|
1763
1619
|
function within(min$1, value, max$1) {
|
|
1764
1620
|
return max(min$1, min(value, max$1));
|
|
1765
1621
|
}
|
|
1622
|
+
function withinMaxClamp(min, value, max) {
|
|
1623
|
+
var v = within(min, value, max);
|
|
1624
|
+
return v > max ? max : v;
|
|
1625
|
+
}
|
|
1766
1626
|
|
|
1767
1627
|
function getFreshSideObject() {
|
|
1768
1628
|
return {
|
|
@@ -1894,8 +1754,8 @@ function roundOffsetsByDPR(_ref) {
|
|
|
1894
1754
|
var win = window;
|
|
1895
1755
|
var dpr = win.devicePixelRatio || 1;
|
|
1896
1756
|
return {
|
|
1897
|
-
x: round(
|
|
1898
|
-
y: round(
|
|
1757
|
+
x: round(x * dpr) / dpr || 0,
|
|
1758
|
+
y: round(y * dpr) / dpr || 0
|
|
1899
1759
|
};
|
|
1900
1760
|
}
|
|
1901
1761
|
|
|
@@ -1910,14 +1770,23 @@ function mapToStyles(_ref2) {
|
|
|
1910
1770
|
position = _ref2.position,
|
|
1911
1771
|
gpuAcceleration = _ref2.gpuAcceleration,
|
|
1912
1772
|
adaptive = _ref2.adaptive,
|
|
1913
|
-
roundOffsets = _ref2.roundOffsets
|
|
1914
|
-
|
|
1915
|
-
var
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1773
|
+
roundOffsets = _ref2.roundOffsets,
|
|
1774
|
+
isFixed = _ref2.isFixed;
|
|
1775
|
+
var _offsets$x = offsets.x,
|
|
1776
|
+
x = _offsets$x === void 0 ? 0 : _offsets$x,
|
|
1777
|
+
_offsets$y = offsets.y,
|
|
1778
|
+
y = _offsets$y === void 0 ? 0 : _offsets$y;
|
|
1779
|
+
|
|
1780
|
+
var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({
|
|
1781
|
+
x: x,
|
|
1782
|
+
y: y
|
|
1783
|
+
}) : {
|
|
1784
|
+
x: x,
|
|
1785
|
+
y: y
|
|
1786
|
+
};
|
|
1920
1787
|
|
|
1788
|
+
x = _ref3.x;
|
|
1789
|
+
y = _ref3.y;
|
|
1921
1790
|
var hasX = offsets.hasOwnProperty('x');
|
|
1922
1791
|
var hasY = offsets.hasOwnProperty('y');
|
|
1923
1792
|
var sideX = left;
|
|
@@ -1942,16 +1811,18 @@ function mapToStyles(_ref2) {
|
|
|
1942
1811
|
offsetParent = offsetParent;
|
|
1943
1812
|
|
|
1944
1813
|
if (placement === top || (placement === left || placement === right) && variation === end) {
|
|
1945
|
-
sideY = bottom;
|
|
1946
|
-
|
|
1947
|
-
|
|
1814
|
+
sideY = bottom;
|
|
1815
|
+
var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
|
|
1816
|
+
offsetParent[heightProp];
|
|
1817
|
+
y -= offsetY - popperRect.height;
|
|
1948
1818
|
y *= gpuAcceleration ? 1 : -1;
|
|
1949
1819
|
}
|
|
1950
1820
|
|
|
1951
1821
|
if (placement === left || (placement === top || placement === bottom) && variation === end) {
|
|
1952
|
-
sideX = right;
|
|
1953
|
-
|
|
1954
|
-
|
|
1822
|
+
sideX = right;
|
|
1823
|
+
var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
|
|
1824
|
+
offsetParent[widthProp];
|
|
1825
|
+
x -= offsetX - popperRect.width;
|
|
1955
1826
|
x *= gpuAcceleration ? 1 : -1;
|
|
1956
1827
|
}
|
|
1957
1828
|
}
|
|
@@ -1960,6 +1831,17 @@ function mapToStyles(_ref2) {
|
|
|
1960
1831
|
position: position
|
|
1961
1832
|
}, adaptive && unsetSides);
|
|
1962
1833
|
|
|
1834
|
+
var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
|
|
1835
|
+
x: x,
|
|
1836
|
+
y: y
|
|
1837
|
+
}) : {
|
|
1838
|
+
x: x,
|
|
1839
|
+
y: y
|
|
1840
|
+
};
|
|
1841
|
+
|
|
1842
|
+
x = _ref4.x;
|
|
1843
|
+
y = _ref4.y;
|
|
1844
|
+
|
|
1963
1845
|
if (gpuAcceleration) {
|
|
1964
1846
|
var _Object$assign;
|
|
1965
1847
|
|
|
@@ -1969,9 +1851,9 @@ function mapToStyles(_ref2) {
|
|
|
1969
1851
|
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
|
|
1970
1852
|
}
|
|
1971
1853
|
|
|
1972
|
-
function computeStyles(
|
|
1973
|
-
var state =
|
|
1974
|
-
options =
|
|
1854
|
+
function computeStyles(_ref5) {
|
|
1855
|
+
var state = _ref5.state,
|
|
1856
|
+
options = _ref5.options;
|
|
1975
1857
|
var _options$gpuAccelerat = options.gpuAcceleration,
|
|
1976
1858
|
gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
|
|
1977
1859
|
_options$adaptive = options.adaptive,
|
|
@@ -1994,7 +1876,8 @@ function computeStyles(_ref4) {
|
|
|
1994
1876
|
variation: getVariation(state.placement),
|
|
1995
1877
|
popper: state.elements.popper,
|
|
1996
1878
|
popperRect: state.rects.popper,
|
|
1997
|
-
gpuAcceleration: gpuAcceleration
|
|
1879
|
+
gpuAcceleration: gpuAcceleration,
|
|
1880
|
+
isFixed: state.options.strategy === 'fixed'
|
|
1998
1881
|
};
|
|
1999
1882
|
|
|
2000
1883
|
if (state.modifiersData.popperOffsets != null) {
|
|
@@ -2252,7 +2135,7 @@ function getInnerBoundingClientRect(element) {
|
|
|
2252
2135
|
}
|
|
2253
2136
|
|
|
2254
2137
|
function getClientRectFromMixedType(element, clippingParent) {
|
|
2255
|
-
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) :
|
|
2138
|
+
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement$1(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
|
2256
2139
|
} // A "clipping parent" is an overflowable container with the characteristic of
|
|
2257
2140
|
// clipping (or hiding) overflowing elements with a position different from
|
|
2258
2141
|
// `initial`
|
|
@@ -2769,6 +2652,14 @@ function preventOverflow(_ref) {
|
|
|
2769
2652
|
var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
|
|
2770
2653
|
placement: state.placement
|
|
2771
2654
|
})) : tetherOffset;
|
|
2655
|
+
var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
|
|
2656
|
+
mainAxis: tetherOffsetValue,
|
|
2657
|
+
altAxis: tetherOffsetValue
|
|
2658
|
+
} : Object.assign({
|
|
2659
|
+
mainAxis: 0,
|
|
2660
|
+
altAxis: 0
|
|
2661
|
+
}, tetherOffsetValue);
|
|
2662
|
+
var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
|
|
2772
2663
|
var data = {
|
|
2773
2664
|
x: 0,
|
|
2774
2665
|
y: 0
|
|
@@ -2778,13 +2669,15 @@ function preventOverflow(_ref) {
|
|
|
2778
2669
|
return;
|
|
2779
2670
|
}
|
|
2780
2671
|
|
|
2781
|
-
if (checkMainAxis
|
|
2672
|
+
if (checkMainAxis) {
|
|
2673
|
+
var _offsetModifierState$;
|
|
2674
|
+
|
|
2782
2675
|
var mainSide = mainAxis === 'y' ? top : left;
|
|
2783
2676
|
var altSide = mainAxis === 'y' ? bottom : right;
|
|
2784
2677
|
var len = mainAxis === 'y' ? 'height' : 'width';
|
|
2785
2678
|
var offset = popperOffsets[mainAxis];
|
|
2786
|
-
var min$1 =
|
|
2787
|
-
var max$1 =
|
|
2679
|
+
var min$1 = offset + overflow[mainSide];
|
|
2680
|
+
var max$1 = offset - overflow[altSide];
|
|
2788
2681
|
var additive = tether ? -popperRect[len] / 2 : 0;
|
|
2789
2682
|
var minLen = variation === start ? referenceRect[len] : popperRect[len];
|
|
2790
2683
|
var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
|
|
@@ -2804,36 +2697,45 @@ function preventOverflow(_ref) {
|
|
|
2804
2697
|
// width or height)
|
|
2805
2698
|
|
|
2806
2699
|
var arrowLen = within(0, referenceRect[len], arrowRect[len]);
|
|
2807
|
-
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin -
|
|
2808
|
-
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax +
|
|
2700
|
+
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
|
|
2701
|
+
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
|
|
2809
2702
|
var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
|
|
2810
2703
|
var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
|
|
2811
|
-
var offsetModifierValue =
|
|
2812
|
-
var tetherMin =
|
|
2813
|
-
var tetherMax =
|
|
2704
|
+
var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
|
|
2705
|
+
var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
|
|
2706
|
+
var tetherMax = offset + maxOffset - offsetModifierValue;
|
|
2707
|
+
var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
|
|
2708
|
+
popperOffsets[mainAxis] = preventedOffset;
|
|
2709
|
+
data[mainAxis] = preventedOffset - offset;
|
|
2710
|
+
}
|
|
2814
2711
|
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
popperOffsets[mainAxis] = preventedOffset;
|
|
2818
|
-
data[mainAxis] = preventedOffset - offset;
|
|
2819
|
-
}
|
|
2712
|
+
if (checkAltAxis) {
|
|
2713
|
+
var _offsetModifierState$2;
|
|
2820
2714
|
|
|
2821
|
-
|
|
2822
|
-
var _mainSide = mainAxis === 'x' ? top : left;
|
|
2715
|
+
var _mainSide = mainAxis === 'x' ? top : left;
|
|
2823
2716
|
|
|
2824
|
-
|
|
2717
|
+
var _altSide = mainAxis === 'x' ? bottom : right;
|
|
2825
2718
|
|
|
2826
|
-
|
|
2719
|
+
var _offset = popperOffsets[altAxis];
|
|
2827
2720
|
|
|
2828
|
-
|
|
2721
|
+
var _len = altAxis === 'y' ? 'height' : 'width';
|
|
2829
2722
|
|
|
2830
|
-
|
|
2723
|
+
var _min = _offset + overflow[_mainSide];
|
|
2831
2724
|
|
|
2832
|
-
|
|
2725
|
+
var _max = _offset - overflow[_altSide];
|
|
2833
2726
|
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2727
|
+
var isOriginSide = [top, left].indexOf(basePlacement) !== -1;
|
|
2728
|
+
|
|
2729
|
+
var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
|
|
2730
|
+
|
|
2731
|
+
var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
|
|
2732
|
+
|
|
2733
|
+
var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
|
|
2734
|
+
|
|
2735
|
+
var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
|
|
2736
|
+
|
|
2737
|
+
popperOffsets[altAxis] = _preventedOffset;
|
|
2738
|
+
data[altAxis] = _preventedOffset - _offset;
|
|
2837
2739
|
}
|
|
2838
2740
|
|
|
2839
2741
|
state.modifiersData[name] = data;
|
|
@@ -2865,8 +2767,8 @@ function getNodeScroll(node) {
|
|
|
2865
2767
|
|
|
2866
2768
|
function isElementScaled(element) {
|
|
2867
2769
|
var rect = element.getBoundingClientRect();
|
|
2868
|
-
var scaleX = rect.width / element.offsetWidth || 1;
|
|
2869
|
-
var scaleY = rect.height / element.offsetHeight || 1;
|
|
2770
|
+
var scaleX = round(rect.width) / element.offsetWidth || 1;
|
|
2771
|
+
var scaleY = round(rect.height) / element.offsetHeight || 1;
|
|
2870
2772
|
return scaleX !== 1 || scaleY !== 1;
|
|
2871
2773
|
} // Returns the composite rect of an element relative to its offsetParent.
|
|
2872
2774
|
// Composite means it takes into account transforms as well as layout.
|
|
@@ -2878,9 +2780,9 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
2878
2780
|
}
|
|
2879
2781
|
|
|
2880
2782
|
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
2881
|
-
isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
2783
|
+
var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
2882
2784
|
var documentElement = getDocumentElement(offsetParent);
|
|
2883
|
-
var rect = getBoundingClientRect(elementOrVirtualElement);
|
|
2785
|
+
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
|
|
2884
2786
|
var scroll = {
|
|
2885
2787
|
scrollLeft: 0,
|
|
2886
2788
|
scrollTop: 0
|
|
@@ -2897,7 +2799,7 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
2897
2799
|
}
|
|
2898
2800
|
|
|
2899
2801
|
if (isHTMLElement(offsetParent)) {
|
|
2900
|
-
offsets = getBoundingClientRect(offsetParent);
|
|
2802
|
+
offsets = getBoundingClientRect(offsetParent, true);
|
|
2901
2803
|
offsets.x += offsetParent.clientLeft;
|
|
2902
2804
|
offsets.y += offsetParent.clientTop;
|
|
2903
2805
|
} else if (documentElement) {
|
|
@@ -5545,13 +5447,216 @@ var index = /*#__PURE__*/forwardRef( /*#__PURE__*/TippyGenerator(tippy));
|
|
|
5545
5447
|
|
|
5546
5448
|
var Tippy = index;
|
|
5547
5449
|
|
|
5548
|
-
var css_248z$
|
|
5450
|
+
var css_248z$5 = ".ItemImproveTooltip_option {\n margin: .2rem 0; }\n\n.ItemImproveTooltip_moneyContainer {\n padding: 0 0 0.15rem 0.33rem; }\n";
|
|
5451
|
+
styleInject(css_248z$5);
|
|
5452
|
+
|
|
5453
|
+
function ItemMainInfo(item) {
|
|
5454
|
+
if (item.mainInfo != null)
|
|
5455
|
+
return React.createElement("div", { dangerouslySetInnerHTML: { __html: item.mainInfo } });
|
|
5456
|
+
return null;
|
|
5457
|
+
}
|
|
5458
|
+
|
|
5459
|
+
function ItemSubInfo(item) {
|
|
5460
|
+
if (item.subInfo != null)
|
|
5461
|
+
return (React.createElement("div", { className: "ItemTooltip_subInfo", dangerouslySetInnerHTML: {
|
|
5462
|
+
__html: ReplaceIconsInHtmlString(item.subInfo),
|
|
5463
|
+
} }));
|
|
5464
|
+
return null;
|
|
5465
|
+
}
|
|
5466
|
+
|
|
5467
|
+
function ItemSkillTitles(_a) {
|
|
5468
|
+
var item = _a.item, itemCombats = _a.itemCombats, jobstyle = _a.jobstyle;
|
|
5469
|
+
if (item.skills == null || item.skills.length == 0)
|
|
5470
|
+
return null;
|
|
5471
|
+
var computedSkills = item.skills;
|
|
5472
|
+
if (itemCombats) {
|
|
5473
|
+
computedSkills = computedSkills.filter(function (x) { return x.jobstyle === jobstyle; });
|
|
5474
|
+
}
|
|
5475
|
+
computedSkills = computedSkills.filter(function (x) { return x.title != null; });
|
|
5476
|
+
return (React.createElement("div", null, computedSkills.map(function (itemSkill, i) { return (React.createElement("div", { key: itemSkill.title + "_" + i, dangerouslySetInnerHTML: { __html: itemSkill.title } })); })));
|
|
5477
|
+
}
|
|
5478
|
+
|
|
5479
|
+
function ItemCooldowns(item) {
|
|
5480
|
+
return (React.createElement(React.Fragment, null,
|
|
5481
|
+
item.cooldownInMs != 0 ? (React.createElement("div", { className: "ItemTooltip_cooldown" },
|
|
5482
|
+
"Cooldown: ",
|
|
5483
|
+
GetCooldownString(item.cooldownInMs))) : null,
|
|
5484
|
+
item.bgCooldownInMs != 0 ? (React.createElement("div", { className: "ItemTooltip_cooldown" },
|
|
5485
|
+
"Battleground Reset Time: ",
|
|
5486
|
+
GetCooldownString(item.bgCooldownInMs))) : null));
|
|
5487
|
+
}
|
|
5488
|
+
function GetCooldownString(cooldownInMs) {
|
|
5489
|
+
var cooldownInS = cooldownInMs / 1000;
|
|
5490
|
+
if (cooldownInS >= 60) {
|
|
5491
|
+
var cooldownMins = Math.floor(cooldownInS / 60);
|
|
5492
|
+
var cooldownSecs = cooldownInS - cooldownMins * 60;
|
|
5493
|
+
var result = "";
|
|
5494
|
+
if (cooldownMins > 60) {
|
|
5495
|
+
var cooldownHs = Math.floor(cooldownMins / 60);
|
|
5496
|
+
cooldownMins = cooldownMins - cooldownHs * 60;
|
|
5497
|
+
result += "".concat(cooldownHs, " hr. ");
|
|
5498
|
+
}
|
|
5499
|
+
if (cooldownMins > 0) {
|
|
5500
|
+
result += "".concat(cooldownMins, " min. ");
|
|
5501
|
+
}
|
|
5502
|
+
if (cooldownSecs > 0) {
|
|
5503
|
+
result += "".concat(cooldownSecs, " sec. ");
|
|
5504
|
+
}
|
|
5505
|
+
result = result.trim();
|
|
5506
|
+
return result;
|
|
5507
|
+
}
|
|
5508
|
+
else {
|
|
5509
|
+
return "".concat(cooldownInS, " sec.");
|
|
5510
|
+
}
|
|
5511
|
+
}
|
|
5512
|
+
|
|
5513
|
+
function removeDuplicates(stats) {
|
|
5514
|
+
return stats.filter(function (value, index, self) {
|
|
5515
|
+
return index === self.findIndex(function (t) { return t.name === value.name; });
|
|
5516
|
+
});
|
|
5517
|
+
}
|
|
5518
|
+
function ItemStats(item) {
|
|
5519
|
+
return (React.createElement("div", { className: "ItemTooltip_stats" },
|
|
5520
|
+
removeDuplicates(item.stats)
|
|
5521
|
+
.filter(function (x) { return x.isMainStat; })
|
|
5522
|
+
.map(function (mainStat, i) {
|
|
5523
|
+
if (mainStat.name.includes("-min"))
|
|
5524
|
+
return;
|
|
5525
|
+
var statValue = mainStat.value;
|
|
5526
|
+
//minmax
|
|
5527
|
+
if (mainStat.name.includes("-max")) {
|
|
5528
|
+
var minVal = item.stats.find(function (x) { return x.name === mainStat.name.replace("-max", "-min"); }).value;
|
|
5529
|
+
statValue = (mainStat.value + minVal) / 2;
|
|
5530
|
+
}
|
|
5531
|
+
return (React.createElement("div", { key: mainStat.name + "_" + i, className: "ItemTooltip_stats_mainstat" },
|
|
5532
|
+
GetStatDisplayValue(statValue, mainStat.isPercentage),
|
|
5533
|
+
"\u00A0",
|
|
5534
|
+
ReplaceBossAndPvpAp(mainStat.name).replace("Max.", "").trim()));
|
|
5535
|
+
}),
|
|
5536
|
+
removeDuplicates(item.stats)
|
|
5537
|
+
.filter(function (x) { return !x.isMainStat; })
|
|
5538
|
+
.map(function (subStat, i) {
|
|
5539
|
+
if (subStat.name.includes("-min"))
|
|
5540
|
+
return;
|
|
5541
|
+
var statValue = subStat.value;
|
|
5542
|
+
//minmax
|
|
5543
|
+
if (subStat.name.includes("-max")) {
|
|
5544
|
+
var minVal = item.stats.find(function (x) { return x.name === subStat.name.replace("-max", "-min"); }).value;
|
|
5545
|
+
statValue = (subStat.value + minVal) / 2;
|
|
5546
|
+
}
|
|
5547
|
+
return (React.createElement("div", { key: subStat.name + "_" + i, className: "ItemTooltip_stats_substat" },
|
|
5548
|
+
GetStatDisplayValue(statValue, subStat.isPercentage),
|
|
5549
|
+
"\u00A0",
|
|
5550
|
+
ReplaceBossAndPvpAp(subStat.name).replace("Max.", "").trim()));
|
|
5551
|
+
})));
|
|
5552
|
+
}
|
|
5553
|
+
|
|
5554
|
+
function ItemRandomStats(item) {
|
|
5555
|
+
return (React.createElement("div", { className: "ItemTooltip_stats" }, item.randomStats.map(function (randomStat, i) {
|
|
5556
|
+
return (React.createElement("div", { key: randomStat.name + "_" + i, className: randomStat.isMainStat
|
|
5557
|
+
? "ItemTooltip_stats_mainstat"
|
|
5558
|
+
: "ItemTooltip_stats_substat" },
|
|
5559
|
+
GetStatDisplayValue(randomStat.min, randomStat.isPercentage),
|
|
5560
|
+
"~",
|
|
5561
|
+
GetStatDisplayValue(randomStat.max, randomStat.isPercentage),
|
|
5562
|
+
"\u00A0",
|
|
5563
|
+
ReplaceBossAndPvpAp(randomStat.name),
|
|
5564
|
+
React.createElement("img", { alt: "", className: "ItemTooltip_itemIconInline ItemTooltip_itemIconRandom", src: BuildIconPath("00015590/Tag_Random") })));
|
|
5565
|
+
})));
|
|
5566
|
+
}
|
|
5567
|
+
|
|
5568
|
+
function GearScore(item) {
|
|
5569
|
+
return (React.createElement("div", null,
|
|
5570
|
+
"debug-gs: ",
|
|
5571
|
+
item.gearScore,
|
|
5572
|
+
React.createElement("br", null),
|
|
5573
|
+
"debug-is: ",
|
|
5574
|
+
item.itemScore,
|
|
5575
|
+
React.createElement("br", null),
|
|
5576
|
+
"debug-fs: ",
|
|
5577
|
+
item.fusionScore));
|
|
5578
|
+
}
|
|
5579
|
+
|
|
5580
|
+
function TopText(item) {
|
|
5581
|
+
return (React.createElement("div", { className: "ItemTooltip_toptext", dangerouslySetInnerHTML: { __html: item.topText } }));
|
|
5582
|
+
}
|
|
5583
|
+
|
|
5584
|
+
function ItemSkillDescriptions(_a) {
|
|
5585
|
+
var item = _a.item, itemCombats = _a.itemCombats, jobstyle = _a.jobstyle;
|
|
5586
|
+
if (item.skills == null || item.skills.length == 0)
|
|
5587
|
+
return null;
|
|
5588
|
+
var computedSkills = item.skills;
|
|
5589
|
+
if (itemCombats) {
|
|
5590
|
+
computedSkills = computedSkills.filter(function (x) { return x.jobstyle === jobstyle; });
|
|
5591
|
+
}
|
|
5592
|
+
computedSkills = computedSkills.filter(function (x) { return x.description != null; });
|
|
5593
|
+
return (React.createElement("div", { className: "ItemTooltip_skilldescs 00008130.UI.Label_Green03_12" }, computedSkills.map(function (skill, i) { return (React.createElement("div", { key: skill.title + "_" + i, dangerouslySetInnerHTML: { __html: skill.description } })); })));
|
|
5594
|
+
}
|
|
5595
|
+
|
|
5596
|
+
function SkillModifierGroup(props) {
|
|
5597
|
+
var modifierGroup = props.modifierGroup;
|
|
5598
|
+
return (React.createElement(React.Fragment, null, modifierGroup.modifiers.map(function (modifier, i) { return (React.createElement("div", { key: "modifier_" + i },
|
|
5599
|
+
modifier.skills.map(function (skill, i2) { return (React.createElement(React.Fragment, { key: skill.item2 + "_" + i + "_" + i2 },
|
|
5600
|
+
React.createElement("span", { className: "00008130.UI.Vital_LightBlue", dangerouslySetInnerHTML: { __html: skill.item2 } }),
|
|
5601
|
+
i2 != modifier.skills.length - 1 ? React.createElement(React.Fragment, null, ",\u00A0") : null)); }),
|
|
5602
|
+
"\u00A0",
|
|
5603
|
+
GetTextForVerb(modifier.verb),
|
|
5604
|
+
"\u00A0",
|
|
5605
|
+
Math.abs(modifier.value) / 10,
|
|
5606
|
+
"%")); })));
|
|
5607
|
+
}
|
|
5608
|
+
function GetTextForVerb(verb) {
|
|
5609
|
+
if (verb === "percentDamage")
|
|
5610
|
+
return "Damage increases by";
|
|
5611
|
+
if (verb === "percentCD")
|
|
5612
|
+
return "Cooldown decreases by";
|
|
5613
|
+
return "";
|
|
5614
|
+
}
|
|
5615
|
+
|
|
5616
|
+
function SkillModifiers(props) {
|
|
5617
|
+
var modifierGroups = props.skillModifierGroups;
|
|
5618
|
+
if (props.isSetBonus) {
|
|
5619
|
+
modifierGroups = modifierGroups.filter(function (x) { return x.jobstyle === props.jobstyle; });
|
|
5620
|
+
}
|
|
5621
|
+
return (React.createElement("div", { className: "ItemTooltip_skilldescs 00008130.UI.Label_Green03_12" }, modifierGroups.map(function (skillModifierGroup, i) { return (React.createElement(SkillModifierGroup, { key: "skillModifierGroup_" + i, modifierGroup: skillModifierGroup })); })));
|
|
5622
|
+
}
|
|
5623
|
+
|
|
5624
|
+
function SetBonusItems(setBonus) {
|
|
5625
|
+
var items = setBonus.setItems;
|
|
5626
|
+
if (items.length >= 8)
|
|
5627
|
+
return null;
|
|
5628
|
+
return (React.createElement("div", { className: "ItemTooltip_setItemsContainer" },
|
|
5629
|
+
React.createElement("div", { className: "ItemTooltip_setItemsSubContainer" }, items.map(function (item, i) {
|
|
5630
|
+
return (React.createElement("div", { key: item.itemName + "_" + i, className: "ItemTooltip_setItemIconNameDiv" },
|
|
5631
|
+
item.itemIcon != null ? (React.createElement("img", { alt: "", className: "ItemTooltip_itemIconSmall", src: BuildIconPath(item.itemIcon.iconPath) })) : null,
|
|
5632
|
+
React.createElement("span", { dangerouslySetInnerHTML: { __html: item.itemName } })));
|
|
5633
|
+
}))));
|
|
5634
|
+
}
|
|
5635
|
+
|
|
5636
|
+
function SetBonus(props) {
|
|
5637
|
+
var item = props.item, jobstyle = props.jobstyle;
|
|
5638
|
+
return (React.createElement("div", { className: "ItemTooltip_setBonus" },
|
|
5639
|
+
React.createElement("div", null,
|
|
5640
|
+
item.setBonus.setName != "" ? (React.createElement("div", { className: "00008130.UI.Vital_LightBlue", dangerouslySetInnerHTML: { __html: item.setBonus.setName } })) : null,
|
|
5641
|
+
React.createElement(SetBonusItems, __assign({}, item.setBonus)),
|
|
5642
|
+
React.createElement("div", { className: "ItemTooltip_setContainer" }, item.setBonus.setBonusStages
|
|
5643
|
+
.sort(function (a, b) { return a.setNumber - b.setNumber; })
|
|
5644
|
+
.map(function (setStage) { return (React.createElement("div", { key: setStage.setNumber, className: "ItemTooltip_setStageContainer" },
|
|
5645
|
+
React.createElement("div", null,
|
|
5646
|
+
React.createElement("div", { className: "ItemTooltip_setStageNumber" },
|
|
5647
|
+
React.createElement("span", null, setStage.setNumber))),
|
|
5648
|
+
React.createElement("div", { className: "ItemTooltip_setStageContent 00008130.UI.Label_Green03_12" },
|
|
5649
|
+
setStage.effects.map(function (effect, i) { return (React.createElement("div", { key: i, dangerouslySetInnerHTML: { __html: effect.description } })); }),
|
|
5650
|
+
React.createElement(SkillModifiers, { jobstyle: jobstyle, isSetBonus: true, skillModifierGroups: setStage.skillModifiers })))); })))));
|
|
5651
|
+
}
|
|
5652
|
+
|
|
5653
|
+
var css_248z$4 = ".tippy-box {\n max-width: none !important;\n background-color: transparent !important;\n box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;\n transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important; }\n .tippy-box:hover {\n box-shadow: black 0px 20px 60px 0px !important; }\n\n.tippy-content {\n padding: 0 !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #ff0084 !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #ff0084 !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #ff0084 !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #ff0084 !important; }\n";
|
|
5549
5654
|
styleInject(css_248z$4);
|
|
5550
5655
|
|
|
5551
5656
|
var ItemTooltipWrapper = function (_a) {
|
|
5552
|
-
var data = _a.data, region = _a.region, children = _a.children, client = _a.client, _b = _a.
|
|
5657
|
+
var data = _a.data, region = _a.region, children = _a.children, client = _a.client, _b = _a.showUpgrade, showUpgrade = _b === void 0 ? false : _b, _c = _a.offline, offline = _c === void 0 ? false : _c, _d = _a.interactive, interactive = _d === void 0 ? true : _d, _e = _a.placement, placement = _e === void 0 ? "right" : _e, _f = _a.debug, debug = _f === void 0 ? false : _f, jobstyleOverride = _a.jobstyleOverride, _g = _a.followCursor, followCursor$1 = _g === void 0 ? false : _g, _h = _a.trigger, trigger = _h === void 0 ? "mouseenter focus" : _h, _j = _a.showArrow, showArrow = _j === void 0 ? true : _j;
|
|
5553
5658
|
var spanRef = useRef(null);
|
|
5554
|
-
var
|
|
5659
|
+
var _k = useState(null), childRef = _k[0], setChildRef = _k[1];
|
|
5555
5660
|
/**
|
|
5556
5661
|
* Mount the temporary span element.
|
|
5557
5662
|
* retrieve and store the target element's reference.
|
|
@@ -5562,16 +5667,16 @@ var ItemTooltipWrapper = function (_a) {
|
|
|
5562
5667
|
}
|
|
5563
5668
|
return function () { return setChildRef(null); };
|
|
5564
5669
|
}, []);
|
|
5565
|
-
var
|
|
5670
|
+
var _l = useState(true), isOffline = _l[0], setIsOffline = _l[1];
|
|
5566
5671
|
return (React.createElement(React.Fragment, null,
|
|
5567
5672
|
children,
|
|
5568
|
-
childRef ? (React.createElement(Tippy, { arrow: showArrow, trigger: trigger, plugins: [followCursor], followCursor: followCursor$1 && !interactive, appendTo: document.body, onMount: function () { return setIsOffline(offline); }, placement: placement, animation: "fade", interactive: interactive, content: React.createElement(ItemTooltip, { region: region, jobstyleOverride: jobstyleOverride, data: data, offline: isOffline, client: client, debug: debug }), theme: "grade" + data.grade, reference: childRef })) : (React.createElement("span", { ref: spanRef, style: { display: "none" } }))));
|
|
5673
|
+
childRef ? (React.createElement(Tippy, { arrow: showArrow, trigger: trigger, plugins: [followCursor], followCursor: followCursor$1 && !interactive, appendTo: document.body, onMount: function () { return setIsOffline(offline); }, placement: placement, animation: "fade", interactive: interactive, content: React.createElement(ItemTooltip, { region: region, jobstyleOverride: jobstyleOverride, data: data, offline: isOffline, client: client, showUpgrade: showUpgrade, debug: debug }), theme: "grade" + data.grade, reference: childRef })) : (React.createElement("span", { "data-testid": "TooltipWrapper", ref: spanRef, style: { display: "none" } }))));
|
|
5569
5674
|
};
|
|
5570
5675
|
|
|
5571
5676
|
function ItemIconNameDiv(_a) {
|
|
5572
5677
|
var _this = this;
|
|
5573
5678
|
var _b;
|
|
5574
|
-
var item = _a.item, region = _a.region, client = _a.client, _c = _a.showRandomIcon, showRandomIcon = _c === void 0 ? false : _c;
|
|
5679
|
+
var item = _a.item, region = _a.region, client = _a.client, _c = _a.showRandomIcon, showRandomIcon = _c === void 0 ? false : _c, trigger = _a.trigger, interactive = _a.interactive, showUpgrade = _a.showUpgrade;
|
|
5575
5680
|
var _d = useState(), itemData = _d[0], setItemData = _d[1];
|
|
5576
5681
|
useEffect(function () {
|
|
5577
5682
|
if (client)
|
|
@@ -5592,7 +5697,7 @@ function ItemIconNameDiv(_a) {
|
|
|
5592
5697
|
if (itemData) {
|
|
5593
5698
|
if (itemData.grade != 0)
|
|
5594
5699
|
return (React.createElement("div", { className: "ItemTooltip_itemiconnamediv" },
|
|
5595
|
-
React.createElement(ItemTooltipWrapper, { region: region, client: client, data: itemData },
|
|
5700
|
+
React.createElement(ItemTooltipWrapper, { showUpgrade: showUpgrade, region: region, client: client, data: itemData, trigger: trigger, interactive: interactive },
|
|
5596
5701
|
React.createElement("img", { className: "ItemTooltip_itemIconSmall", alt: "", src: BuildIconPath((_b = itemData.icon) === null || _b === void 0 ? void 0 : _b.iconPath) })),
|
|
5597
5702
|
React.createElement("div", { className: "ItemTooltip_itemNameRandomDiv" },
|
|
5598
5703
|
React.createElement("span", { className: "TooltipBase_grade-" + itemData.grade, dangerouslySetInnerHTML: { __html: itemData.name } }),
|
|
@@ -5621,7 +5726,7 @@ function DecomposeResults(props) {
|
|
|
5621
5726
|
.filter(function (x) { return x != null; })
|
|
5622
5727
|
.map(function (item, i) {
|
|
5623
5728
|
return (React.createElement("div", { className: "TooltipBase_flex", key: item.itemId + "-" + item.itemLevel + "_" + i },
|
|
5624
|
-
React.createElement(ItemIconNameDiv, { region: props.region, item: item, client: props.client, showRandomIcon: item.isRandom }),
|
|
5729
|
+
React.createElement(ItemIconNameDiv, { showUpgrade: props.showUpgrade, region: props.region, item: item, client: props.client, showRandomIcon: item.isRandom }),
|
|
5625
5730
|
item.isRandom ? null : (React.createElement(React.Fragment, null,
|
|
5626
5731
|
"\u00A0",
|
|
5627
5732
|
item.isMinMax ? (React.createElement("span", null, GetRangeString(item.min, item.max))) : (React.createElement("span", null, GetRangeString(item.min)))))));
|
|
@@ -5674,7 +5779,7 @@ function SealingResult(_a) {
|
|
|
5674
5779
|
return (React.createElement("div", null, item.sealing.sealConsumeItems
|
|
5675
5780
|
.filter(function (x) { return x.min != 0; })
|
|
5676
5781
|
.map(function (consumeItem, i) { return (React.createElement("div", { className: "TooltipBase_flex", key: consumeItem.itemId + "_" + i },
|
|
5677
|
-
React.createElement(ItemIconNameDiv, { region: region, item: consumeItem, client: client }),
|
|
5782
|
+
React.createElement(ItemIconNameDiv, { showUpgrade: false, region: region, item: consumeItem, client: client }),
|
|
5678
5783
|
"\u00A0",
|
|
5679
5784
|
GetRangeString(consumeItem.min))); })));
|
|
5680
5785
|
}
|
|
@@ -5683,7 +5788,7 @@ function AccountTransfer(_a) {
|
|
|
5683
5788
|
var item = _a.item, client = _a.client, region = _a.region;
|
|
5684
5789
|
return (React.createElement("div", null,
|
|
5685
5790
|
item.accountTransfer.requiredItems.map(function (consumeItem, i) { return (React.createElement("div", { className: "TooltipBase_flex", key: consumeItem.itemId + "_" + i },
|
|
5686
|
-
React.createElement(ItemIconNameDiv, { region: region, client: client, item: consumeItem }),
|
|
5791
|
+
React.createElement(ItemIconNameDiv, { showUpgrade: false, region: region, client: client, item: consumeItem }),
|
|
5687
5792
|
"\u00A0",
|
|
5688
5793
|
GetRangeString(consumeItem.min))); }),
|
|
5689
5794
|
item.accountTransfer.moneyCost != null &&
|
|
@@ -5692,12 +5797,131 @@ function AccountTransfer(_a) {
|
|
|
5692
5797
|
"\u00A0copper")) : null));
|
|
5693
5798
|
}
|
|
5694
5799
|
|
|
5800
|
+
function Money(_a) {
|
|
5801
|
+
var money = _a.money;
|
|
5802
|
+
var bnsmoney = getMoneyObj(money);
|
|
5803
|
+
if (bnsmoney == null)
|
|
5804
|
+
return null;
|
|
5805
|
+
return (React.createElement("div", { className: "NpcTooltip_moneyContainer" },
|
|
5806
|
+
bnsmoney.Gold > 0 ? (React.createElement("span", null,
|
|
5807
|
+
bnsmoney.Gold,
|
|
5808
|
+
React.createElement("img", { src: BuildIconPath("gold"), alt: "" }))) : null,
|
|
5809
|
+
bnsmoney.Silver > 0 ? (React.createElement("span", null,
|
|
5810
|
+
bnsmoney.Silver,
|
|
5811
|
+
React.createElement("img", { src: BuildIconPath("silver"), alt: "" }))) : null,
|
|
5812
|
+
bnsmoney.Copper > 0 ? (React.createElement("span", null,
|
|
5813
|
+
bnsmoney.Copper,
|
|
5814
|
+
React.createElement("img", { src: BuildIconPath("copper"), alt: "" }))) : null));
|
|
5815
|
+
}
|
|
5816
|
+
|
|
5817
|
+
function ItemImproveTooltip(_a) {
|
|
5818
|
+
var _this = this;
|
|
5819
|
+
var data = _a.data, region = _a.region; _a.debug; var _c = _a.offline, offline = _c === void 0 ? false : _c, clientProp = _a.client, _d = _a.fullHeight, fullHeight = _d === void 0 ? false : _d;
|
|
5820
|
+
var _e = useState(), client = _e[0], setClient = _e[1];
|
|
5821
|
+
useEffect(function () {
|
|
5822
|
+
if (offline)
|
|
5823
|
+
return;
|
|
5824
|
+
if (clientProp == undefined) {
|
|
5825
|
+
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
5826
|
+
return __generator(this, function (_a) {
|
|
5827
|
+
setClient(new ItemDownloadClient(region));
|
|
5828
|
+
return [2 /*return*/];
|
|
5829
|
+
});
|
|
5830
|
+
}); })();
|
|
5831
|
+
}
|
|
5832
|
+
else {
|
|
5833
|
+
setClient(clientProp);
|
|
5834
|
+
}
|
|
5835
|
+
}, [offline]);
|
|
5836
|
+
var tooltipBaseProps = {
|
|
5837
|
+
title: "Item Upgrade",
|
|
5838
|
+
grade: 4,
|
|
5839
|
+
id: "item_upgrade_info",
|
|
5840
|
+
icon: "",
|
|
5841
|
+
subtitle: "Info",
|
|
5842
|
+
mainInfos: [],
|
|
5843
|
+
subInfoGroups: [],
|
|
5844
|
+
fullHeight: fullHeight,
|
|
5845
|
+
};
|
|
5846
|
+
if (!offline) {
|
|
5847
|
+
if (data.itemResult != null) {
|
|
5848
|
+
// if (data.useMileageSave != null && data.useMileageSave === true)
|
|
5849
|
+
// tooltipBaseProps.mainInfos.push(
|
|
5850
|
+
// <div>The upgrade change is 100% when the mileage meter is filled.</div>
|
|
5851
|
+
// );
|
|
5852
|
+
tooltipBaseProps.subInfoGroups.push({
|
|
5853
|
+
title: "Next Upgrade:",
|
|
5854
|
+
texts: [
|
|
5855
|
+
React.createElement(ItemIconNameDiv, { showUpgrade: true, client: client, region: region, item: data.itemResult, interactive: true })
|
|
5856
|
+
]
|
|
5857
|
+
});
|
|
5858
|
+
var costGroup = {
|
|
5859
|
+
title: "Upgrade Cost:",
|
|
5860
|
+
texts: []
|
|
5861
|
+
};
|
|
5862
|
+
if (data.itemCost != null && data.itemCost.length > 0)
|
|
5863
|
+
costGroup.texts.push(React.createElement(DecomposeResults, { showUpgrade: false, client: client, region: region, items: data.itemCost }));
|
|
5864
|
+
if (data.moneyCost != null && data.moneyCost > 0) {
|
|
5865
|
+
costGroup.texts.push(React.createElement("div", { className: "TooltipBase_flex ItemImproveTooltip_moneyContainer" },
|
|
5866
|
+
React.createElement("span", { className: "TooltipBase_grade-6" }, "Money:\u00A0"),
|
|
5867
|
+
React.createElement(Money, { money: data.moneyCost })));
|
|
5868
|
+
}
|
|
5869
|
+
tooltipBaseProps.subInfoGroups.push(costGroup);
|
|
5870
|
+
}
|
|
5871
|
+
}
|
|
5872
|
+
if (data.options != null && data.options.length > 0) {
|
|
5873
|
+
tooltipBaseProps.mainInfos.push(React.createElement("div", null, "Random effects can be obtained when upgrading."));
|
|
5874
|
+
var subInfoGroupStats_1 = {
|
|
5875
|
+
title: "Possible Stats:",
|
|
5876
|
+
texts: []
|
|
5877
|
+
};
|
|
5878
|
+
var subInfoGroupEffects_1 = {
|
|
5879
|
+
title: "Possible Effects:",
|
|
5880
|
+
texts: []
|
|
5881
|
+
};
|
|
5882
|
+
data.options.forEach(function (option) {
|
|
5883
|
+
if (option.isEffect) {
|
|
5884
|
+
subInfoGroupEffects_1.texts.push(React.createElement("div", { className: "ItemImproveTooltip_option", dangerouslySetInnerHTML: { __html: option.effectDescription } }));
|
|
5885
|
+
}
|
|
5886
|
+
else {
|
|
5887
|
+
subInfoGroupStats_1.texts.push(React.createElement("div", { className: "ItemImproveTooltip_option 00008130.Program.Fontset_Chatting_Color_19" },
|
|
5888
|
+
option.statValue,
|
|
5889
|
+
"\u00A0",
|
|
5890
|
+
React.createElement("span", { dangerouslySetInnerHTML: { __html: option.statName } })));
|
|
5891
|
+
}
|
|
5892
|
+
});
|
|
5893
|
+
tooltipBaseProps.subInfoGroups.push(subInfoGroupStats_1);
|
|
5894
|
+
tooltipBaseProps.subInfoGroups.push(subInfoGroupEffects_1);
|
|
5895
|
+
}
|
|
5896
|
+
return (React.createElement(TooltipBase, __assign({}, tooltipBaseProps)));
|
|
5897
|
+
}
|
|
5898
|
+
|
|
5899
|
+
var ItemImproveTooltipWrapper = function (_a) {
|
|
5900
|
+
var data = _a.data, region = _a.region, children = _a.children, client = _a.client, _b = _a.offline, offline = _b === void 0 ? false : _b, _c = _a.interactive, interactive = _c === void 0 ? true : _c, _d = _a.placement, placement = _d === void 0 ? "right" : _d, _e = _a.debug, debug = _e === void 0 ? false : _e, _f = _a.followCursor, followCursor$1 = _f === void 0 ? false : _f, _g = _a.trigger, trigger = _g === void 0 ? "mouseenter focus" : _g, _h = _a.showArrow, showArrow = _h === void 0 ? true : _h;
|
|
5901
|
+
var spanRef = useRef(null);
|
|
5902
|
+
var _j = useState(null), childRef = _j[0], setChildRef = _j[1];
|
|
5903
|
+
/**
|
|
5904
|
+
* Mount the temporary span element.
|
|
5905
|
+
* retrieve and store the target element's reference.
|
|
5906
|
+
*/
|
|
5907
|
+
useEffect(function () {
|
|
5908
|
+
if (spanRef.current) {
|
|
5909
|
+
setChildRef(spanRef.current.previousElementSibling);
|
|
5910
|
+
}
|
|
5911
|
+
return function () { return setChildRef(null); };
|
|
5912
|
+
}, []);
|
|
5913
|
+
var _k = useState(true), isOffline = _k[0], setIsOffline = _k[1];
|
|
5914
|
+
return (React.createElement(React.Fragment, null,
|
|
5915
|
+
children,
|
|
5916
|
+
childRef ? (React.createElement(Tippy, { arrow: showArrow, trigger: trigger, plugins: [followCursor], followCursor: followCursor$1 && !interactive, appendTo: document.body, onMount: function () { return setIsOffline(offline); }, placement: placement, animation: "fade", interactive: interactive, content: React.createElement(ItemImproveTooltip, { region: region, data: data, offline: isOffline, client: client, debug: debug }), theme: "grade8", reference: childRef })) : (React.createElement("span", { "data-testid": "TooltipWrapper", ref: spanRef, style: { display: "none" } }))));
|
|
5917
|
+
};
|
|
5918
|
+
|
|
5695
5919
|
function ItemTooltip(_a) {
|
|
5696
5920
|
var _this = this;
|
|
5697
5921
|
var _b, _c, _d;
|
|
5698
|
-
var data = _a.data, region = _a.region, _e = _a.debug, debug = _e === void 0 ? false : _e, _f = _a.offline, offline = _f === void 0 ? false : _f, clientProp = _a.client, jobstyleOverride = _a.jobstyleOverride, _g = _a.fullHeight, fullHeight =
|
|
5699
|
-
var
|
|
5700
|
-
var
|
|
5922
|
+
var data = _a.data, region = _a.region, _e = _a.debug, debug = _e === void 0 ? false : _e, _f = _a.offline, offline = _f === void 0 ? false : _f, clientProp = _a.client, jobstyleOverride = _a.jobstyleOverride, _g = _a.showUpgrade, showUpgrade = _g === void 0 ? false : _g, _h = _a.fullHeight, fullHeight = _h === void 0 ? false : _h;
|
|
5923
|
+
var _j = useState("advanced-1"), jobstyle = _j[0], setJobstyle = _j[1];
|
|
5924
|
+
var _k = useState(), client = _k[0], setClient = _k[1];
|
|
5701
5925
|
useEffect(function () {
|
|
5702
5926
|
if (offline)
|
|
5703
5927
|
return;
|
|
@@ -5770,6 +5994,8 @@ function ItemTooltip(_a) {
|
|
|
5770
5994
|
AddJobstyleToggles(setHasSkillModifiers, tooltipBaseProps.subInfoGroups, jobstyles, jobstyle, setJobstyle);
|
|
5771
5995
|
AddTopText(tooltipBaseProps.subInfoGroups, item);
|
|
5772
5996
|
AddSkillDescriptions(tooltipBaseProps.subInfoGroups, item, itemCombats, jobstyle);
|
|
5997
|
+
if (showUpgrade)
|
|
5998
|
+
AddItemImprove(tooltipBaseProps.subInfoGroups, item, region, client, offline, debug);
|
|
5773
5999
|
AddSkillModifiers(tooltipBaseProps.subInfoGroups, item, false, jobstyle);
|
|
5774
6000
|
AddSetBonus(tooltipBaseProps.subInfoGroups, item, jobstyle);
|
|
5775
6001
|
if (!offline) {
|
|
@@ -5876,21 +6102,21 @@ function AddDecomposeResults(subInfoGroups, item, client, region) {
|
|
|
5876
6102
|
subInfoGroups.push({
|
|
5877
6103
|
title: "Guaranteed/Salvage:",
|
|
5878
6104
|
texts: [
|
|
5879
|
-
React.createElement(DecomposeResults, { region: region, items: fixedItems, client: client }),
|
|
6105
|
+
React.createElement(DecomposeResults, { showUpgrade: false, region: region, items: fixedItems, client: client }),
|
|
5880
6106
|
],
|
|
5881
6107
|
});
|
|
5882
6108
|
if (randomItems.length > 0)
|
|
5883
6109
|
subInfoGroups.push({
|
|
5884
6110
|
title: "Random:",
|
|
5885
6111
|
texts: [
|
|
5886
|
-
React.createElement(DecomposeResults, { region: region, items: randomItems, client: client }),
|
|
6112
|
+
React.createElement(DecomposeResults, { showUpgrade: false, region: region, items: randomItems, client: client }),
|
|
5887
6113
|
],
|
|
5888
6114
|
});
|
|
5889
6115
|
if (selectItems.length > 0)
|
|
5890
6116
|
subInfoGroups.push({
|
|
5891
6117
|
title: "Select:",
|
|
5892
6118
|
texts: [
|
|
5893
|
-
React.createElement(DecomposeResults, { region: region, items: selectItems, client: client }),
|
|
6119
|
+
React.createElement(DecomposeResults, { showUpgrade: false, region: region, items: selectItems, client: client }),
|
|
5894
6120
|
],
|
|
5895
6121
|
});
|
|
5896
6122
|
}
|
|
@@ -6007,6 +6233,19 @@ function AddUnityPoints(subInfoGroups, item) {
|
|
|
6007
6233
|
item.refinementPoints),
|
|
6008
6234
|
],
|
|
6009
6235
|
});
|
|
6236
|
+
}
|
|
6237
|
+
function AddItemImprove(subInfoGroups, item, region, client, offline, debug) {
|
|
6238
|
+
if (item.itemImprove == null)
|
|
6239
|
+
return;
|
|
6240
|
+
var subInfoGroup = {
|
|
6241
|
+
title: "Upgrade Options:",
|
|
6242
|
+
texts: [
|
|
6243
|
+
React.createElement("div", { className: "ItemTooltip_optionPadding" },
|
|
6244
|
+
React.createElement(ItemImproveTooltipWrapper, { data: item.itemImprove, region: region, trigger: "click", interactive: true, offline: offline, client: client, debug: debug },
|
|
6245
|
+
React.createElement("span", { className: "ItemTooltip_showButton" }, "Click to open")))
|
|
6246
|
+
]
|
|
6247
|
+
};
|
|
6248
|
+
subInfoGroups.push(subInfoGroup);
|
|
6010
6249
|
}
|
|
6011
6250
|
|
|
6012
6251
|
var css_248z$3 = "";
|
|
@@ -6342,7 +6581,7 @@ var SkillTooltipWrapper = function (_a) {
|
|
|
6342
6581
|
}, []);
|
|
6343
6582
|
return (React.createElement(React.Fragment, null,
|
|
6344
6583
|
children,
|
|
6345
|
-
childRef ? (React.createElement(Tippy, { arrow: showArrow, trigger: trigger, plugins: [followCursor], followCursor: followCursor$1 && !interactive, appendTo: document.body, placement: placement, animation: "fade", interactive: interactive, content: React.createElement(SkillTooltip, { data: data, debug: false }), theme: "grade" + 4, reference: childRef })) : (React.createElement("span", { ref: spanRef, style: { display: "none" } }))));
|
|
6584
|
+
childRef ? (React.createElement(Tippy, { arrow: showArrow, trigger: trigger, plugins: [followCursor], followCursor: followCursor$1 && !interactive, appendTo: document.body, placement: placement, animation: "fade", interactive: interactive, content: React.createElement(SkillTooltip, { data: data, debug: false }), theme: "grade" + 4, reference: childRef })) : (React.createElement("span", { "data-testid": "TooltipWrapper", ref: spanRef, style: { display: "none" } }))));
|
|
6346
6585
|
};
|
|
6347
6586
|
|
|
6348
6587
|
var ServerRegion;
|
|
@@ -6413,23 +6652,6 @@ function GetStringForBuyLimitReset(reset) {
|
|
|
6413
6652
|
}
|
|
6414
6653
|
}
|
|
6415
6654
|
|
|
6416
|
-
function Money(_a) {
|
|
6417
|
-
var money = _a.money;
|
|
6418
|
-
var bnsmoney = getMoneyObj(money);
|
|
6419
|
-
if (bnsmoney == null)
|
|
6420
|
-
return null;
|
|
6421
|
-
return (React.createElement("div", { className: "NpcTooltip_moneyContainer" },
|
|
6422
|
-
bnsmoney.Gold > 0 ? (React.createElement("span", null,
|
|
6423
|
-
bnsmoney.Gold,
|
|
6424
|
-
React.createElement("img", { src: BuildIconPath("gold"), alt: "" }))) : null,
|
|
6425
|
-
bnsmoney.Silver > 0 ? (React.createElement("span", null,
|
|
6426
|
-
bnsmoney.Silver,
|
|
6427
|
-
React.createElement("img", { src: BuildIconPath("silver"), alt: "" }))) : null,
|
|
6428
|
-
bnsmoney.Copper > 0 ? (React.createElement("span", null,
|
|
6429
|
-
bnsmoney.Copper,
|
|
6430
|
-
React.createElement("img", { src: BuildIconPath("copper"), alt: "" }))) : null));
|
|
6431
|
-
}
|
|
6432
|
-
|
|
6433
6655
|
function StoreItemBuyPriceEntry(_a) {
|
|
6434
6656
|
var _this = this;
|
|
6435
6657
|
var itemRef = _a.itemRef, client = _a.client;
|
|
@@ -6534,11 +6756,13 @@ function NpcTooltip(_a) {
|
|
|
6534
6756
|
subInfoGroups: [],
|
|
6535
6757
|
};
|
|
6536
6758
|
//no top part
|
|
6537
|
-
AddStoreToggles(tooltipBaseProps.subInfoGroups,
|
|
6538
|
-
AddStores(tooltipBaseProps.subInfoGroups,
|
|
6759
|
+
AddStoreToggles(tooltipBaseProps.subInfoGroups, activeTab, setActiveTab, npc.Stores);
|
|
6760
|
+
AddStores(tooltipBaseProps.subInfoGroups, activeTab, client, npc.Stores);
|
|
6539
6761
|
return React.createElement(TooltipBase, __assign({}, tooltipBaseProps));
|
|
6540
6762
|
}
|
|
6541
|
-
function AddStoreToggles(subInfoGroups,
|
|
6763
|
+
function AddStoreToggles(subInfoGroups, activeTab, setActiveTab, Stores) {
|
|
6764
|
+
if (Stores == null || Stores.length <= 0)
|
|
6765
|
+
return;
|
|
6542
6766
|
subInfoGroups.push({
|
|
6543
6767
|
title: "",
|
|
6544
6768
|
texts: [
|
|
@@ -6546,7 +6770,9 @@ function AddStoreToggles(subInfoGroups, Stores, activeTab, setActiveTab) {
|
|
|
6546
6770
|
],
|
|
6547
6771
|
});
|
|
6548
6772
|
}
|
|
6549
|
-
function AddStores(subInfoGroups,
|
|
6773
|
+
function AddStores(subInfoGroups, activeTab, client, Stores) {
|
|
6774
|
+
if (Stores == null || Stores.length <= 0)
|
|
6775
|
+
return;
|
|
6550
6776
|
subInfoGroups.push({
|
|
6551
6777
|
title: "",
|
|
6552
6778
|
texts: [
|
|
@@ -6555,5 +6781,5 @@ function AddStores(subInfoGroups, Stores, activeTab, client) {
|
|
|
6555
6781
|
});
|
|
6556
6782
|
}
|
|
6557
6783
|
|
|
6558
|
-
export { GetCooldownString, ItemTooltip, ItemTooltipWrapper, JsonTooltip, NpcTooltip, ServerRegion, SkillTooltip, SkillTooltipWrapper, TooltipBase };
|
|
6784
|
+
export { GetCooldownString, ItemImproveTooltip, ItemImproveTooltipWrapper, ItemTooltip, ItemTooltipWrapper, JsonTooltip, NpcTooltip, ServerRegion, SkillTooltip, SkillTooltipWrapper, TooltipBase };
|
|
6559
6785
|
//# sourceMappingURL=index.es.js.map
|