bnstooltips 1.6.4 → 2.0.2

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/index.es.js CHANGED
@@ -30,8 +30,8 @@ function styleInject(css, ref) {
30
30
  }
31
31
  }
32
32
 
33
- var css_248z$7 = "*[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.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$7);
33
+ var css_248z$6 = "*[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.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$6);
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$6 = ".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_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$6);
136
+ var css_248z$5 = ".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_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$5);
138
138
 
139
139
  function BuildIconPath(iconPath, iconIndex) {
140
140
  if (iconPath == null)
@@ -1280,9 +1280,14 @@ function GetCooldownString(cooldownInMs) {
1280
1280
  }
1281
1281
  }
1282
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
+ }
1283
1288
  function ItemStats(item) {
1284
1289
  return (React.createElement("div", { className: "ItemTooltip_stats" },
1285
- item.stats
1290
+ removeDuplicates(item.stats)
1286
1291
  .filter(function (x) { return x.isMainStat; })
1287
1292
  .map(function (mainStat, i) {
1288
1293
  if (mainStat.name.includes("-min"))
@@ -1298,7 +1303,7 @@ function ItemStats(item) {
1298
1303
  "\u00A0",
1299
1304
  ReplaceBossAndPvpAp(mainStat.name).replace("Max.", "").trim()));
1300
1305
  }),
1301
- item.stats
1306
+ removeDuplicates(item.stats)
1302
1307
  .filter(function (x) { return !x.isMainStat; })
1303
1308
  .map(function (subStat, i) {
1304
1309
  if (subStat.name.includes("-min"))
@@ -1415,9 +1420,6 @@ function SetBonus(props) {
1415
1420
  React.createElement(SkillModifiers, { jobstyle: jobstyle, isSetBonus: true, skillModifierGroups: setStage.skillModifiers })))); })))));
1416
1421
  }
1417
1422
 
1418
- var css_248z$5 = ".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";
1419
- styleInject(css_248z$5);
1420
-
1421
1423
  var top = 'top';
1422
1424
  var bottom = 'bottom';
1423
1425
  var right = 'right';
@@ -1574,29 +1576,32 @@ function getBasePlacement$1(placement) {
1574
1576
  return placement.split('-')[0];
1575
1577
  }
1576
1578
 
1577
- // import { isHTMLElement } from './instanceOf';
1578
- function getBoundingClientRect(element, // eslint-disable-next-line unused-imports/no-unused-vars
1579
- includeScale) {
1579
+ var max = Math.max;
1580
+ var min = Math.min;
1581
+ var round = Math.round;
1582
+
1583
+ function getBoundingClientRect(element, includeScale) {
1584
+ if (includeScale === void 0) {
1585
+ includeScale = false;
1586
+ }
1580
1587
 
1581
1588
  var rect = element.getBoundingClientRect();
1582
1589
  var scaleX = 1;
1583
- var scaleY = 1; // FIXME:
1584
- // `offsetWidth` returns an integer while `getBoundingClientRect`
1585
- // returns a float. This results in `scaleX` or `scaleY` being
1586
- // non-1 when it should be for elements that aren't a full pixel in
1587
- // width or height.
1588
- // if (isHTMLElement(element) && includeScale) {
1589
- // const offsetHeight = element.offsetHeight;
1590
- // const offsetWidth = element.offsetWidth;
1591
- // // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
1592
- // // Fallback to 1 in case both values are `0`
1593
- // if (offsetWidth > 0) {
1594
- // scaleX = rect.width / offsetWidth || 1;
1595
- // }
1596
- // if (offsetHeight > 0) {
1597
- // scaleY = rect.height / offsetHeight || 1;
1598
- // }
1599
- // }
1590
+ var scaleY = 1;
1591
+
1592
+ if (isHTMLElement(element) && includeScale) {
1593
+ var offsetHeight = element.offsetHeight;
1594
+ var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
1595
+ // Fallback to 1 in case both values are `0`
1596
+
1597
+ if (offsetWidth > 0) {
1598
+ scaleX = round(rect.width) / offsetWidth || 1;
1599
+ }
1600
+
1601
+ if (offsetHeight > 0) {
1602
+ scaleY = round(rect.height) / offsetHeight || 1;
1603
+ }
1604
+ }
1600
1605
 
1601
1606
  return {
1602
1607
  width: rect.width / scaleX,
@@ -1715,6 +1720,10 @@ function getContainingBlock(element) {
1715
1720
 
1716
1721
  var currentNode = getParentNode(element);
1717
1722
 
1723
+ if (isShadowRoot(currentNode)) {
1724
+ currentNode = currentNode.host;
1725
+ }
1726
+
1718
1727
  while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
1719
1728
  var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that
1720
1729
  // create a containing block.
@@ -1751,13 +1760,13 @@ function getMainAxisFromPlacement(placement) {
1751
1760
  return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
1752
1761
  }
1753
1762
 
1754
- var max = Math.max;
1755
- var min = Math.min;
1756
- var round = Math.round;
1757
-
1758
1763
  function within(min$1, value, max$1) {
1759
1764
  return max(min$1, min(value, max$1));
1760
1765
  }
1766
+ function withinMaxClamp(min, value, max) {
1767
+ var v = within(min, value, max);
1768
+ return v > max ? max : v;
1769
+ }
1761
1770
 
1762
1771
  function getFreshSideObject() {
1763
1772
  return {
@@ -1889,8 +1898,8 @@ function roundOffsetsByDPR(_ref) {
1889
1898
  var win = window;
1890
1899
  var dpr = win.devicePixelRatio || 1;
1891
1900
  return {
1892
- x: round(round(x * dpr) / dpr) || 0,
1893
- y: round(round(y * dpr) / dpr) || 0
1901
+ x: round(x * dpr) / dpr || 0,
1902
+ y: round(y * dpr) / dpr || 0
1894
1903
  };
1895
1904
  }
1896
1905
 
@@ -1905,14 +1914,23 @@ function mapToStyles(_ref2) {
1905
1914
  position = _ref2.position,
1906
1915
  gpuAcceleration = _ref2.gpuAcceleration,
1907
1916
  adaptive = _ref2.adaptive,
1908
- roundOffsets = _ref2.roundOffsets;
1909
-
1910
- var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets,
1911
- _ref3$x = _ref3.x,
1912
- x = _ref3$x === void 0 ? 0 : _ref3$x,
1913
- _ref3$y = _ref3.y,
1914
- y = _ref3$y === void 0 ? 0 : _ref3$y;
1917
+ roundOffsets = _ref2.roundOffsets,
1918
+ isFixed = _ref2.isFixed;
1919
+ var _offsets$x = offsets.x,
1920
+ x = _offsets$x === void 0 ? 0 : _offsets$x,
1921
+ _offsets$y = offsets.y,
1922
+ y = _offsets$y === void 0 ? 0 : _offsets$y;
1923
+
1924
+ var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({
1925
+ x: x,
1926
+ y: y
1927
+ }) : {
1928
+ x: x,
1929
+ y: y
1930
+ };
1915
1931
 
1932
+ x = _ref3.x;
1933
+ y = _ref3.y;
1916
1934
  var hasX = offsets.hasOwnProperty('x');
1917
1935
  var hasY = offsets.hasOwnProperty('y');
1918
1936
  var sideX = left;
@@ -1937,16 +1955,18 @@ function mapToStyles(_ref2) {
1937
1955
  offsetParent = offsetParent;
1938
1956
 
1939
1957
  if (placement === top || (placement === left || placement === right) && variation === end) {
1940
- sideY = bottom; // $FlowFixMe[prop-missing]
1941
-
1942
- y -= offsetParent[heightProp] - popperRect.height;
1958
+ sideY = bottom;
1959
+ var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
1960
+ offsetParent[heightProp];
1961
+ y -= offsetY - popperRect.height;
1943
1962
  y *= gpuAcceleration ? 1 : -1;
1944
1963
  }
1945
1964
 
1946
1965
  if (placement === left || (placement === top || placement === bottom) && variation === end) {
1947
- sideX = right; // $FlowFixMe[prop-missing]
1948
-
1949
- x -= offsetParent[widthProp] - popperRect.width;
1966
+ sideX = right;
1967
+ var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
1968
+ offsetParent[widthProp];
1969
+ x -= offsetX - popperRect.width;
1950
1970
  x *= gpuAcceleration ? 1 : -1;
1951
1971
  }
1952
1972
  }
@@ -1955,6 +1975,17 @@ function mapToStyles(_ref2) {
1955
1975
  position: position
1956
1976
  }, adaptive && unsetSides);
1957
1977
 
1978
+ var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
1979
+ x: x,
1980
+ y: y
1981
+ }) : {
1982
+ x: x,
1983
+ y: y
1984
+ };
1985
+
1986
+ x = _ref4.x;
1987
+ y = _ref4.y;
1988
+
1958
1989
  if (gpuAcceleration) {
1959
1990
  var _Object$assign;
1960
1991
 
@@ -1964,9 +1995,9 @@ function mapToStyles(_ref2) {
1964
1995
  return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
1965
1996
  }
1966
1997
 
1967
- function computeStyles(_ref4) {
1968
- var state = _ref4.state,
1969
- options = _ref4.options;
1998
+ function computeStyles(_ref5) {
1999
+ var state = _ref5.state,
2000
+ options = _ref5.options;
1970
2001
  var _options$gpuAccelerat = options.gpuAcceleration,
1971
2002
  gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
1972
2003
  _options$adaptive = options.adaptive,
@@ -1989,7 +2020,8 @@ function computeStyles(_ref4) {
1989
2020
  variation: getVariation(state.placement),
1990
2021
  popper: state.elements.popper,
1991
2022
  popperRect: state.rects.popper,
1992
- gpuAcceleration: gpuAcceleration
2023
+ gpuAcceleration: gpuAcceleration,
2024
+ isFixed: state.options.strategy === 'fixed'
1993
2025
  };
1994
2026
 
1995
2027
  if (state.modifiersData.popperOffsets != null) {
@@ -2247,7 +2279,7 @@ function getInnerBoundingClientRect(element) {
2247
2279
  }
2248
2280
 
2249
2281
  function getClientRectFromMixedType(element, clippingParent) {
2250
- return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
2282
+ return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement$1(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
2251
2283
  } // A "clipping parent" is an overflowable container with the characteristic of
2252
2284
  // clipping (or hiding) overflowing elements with a position different from
2253
2285
  // `initial`
@@ -2764,6 +2796,14 @@ function preventOverflow(_ref) {
2764
2796
  var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
2765
2797
  placement: state.placement
2766
2798
  })) : tetherOffset;
2799
+ var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
2800
+ mainAxis: tetherOffsetValue,
2801
+ altAxis: tetherOffsetValue
2802
+ } : Object.assign({
2803
+ mainAxis: 0,
2804
+ altAxis: 0
2805
+ }, tetherOffsetValue);
2806
+ var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
2767
2807
  var data = {
2768
2808
  x: 0,
2769
2809
  y: 0
@@ -2773,13 +2813,15 @@ function preventOverflow(_ref) {
2773
2813
  return;
2774
2814
  }
2775
2815
 
2776
- if (checkMainAxis || checkAltAxis) {
2816
+ if (checkMainAxis) {
2817
+ var _offsetModifierState$;
2818
+
2777
2819
  var mainSide = mainAxis === 'y' ? top : left;
2778
2820
  var altSide = mainAxis === 'y' ? bottom : right;
2779
2821
  var len = mainAxis === 'y' ? 'height' : 'width';
2780
2822
  var offset = popperOffsets[mainAxis];
2781
- var min$1 = popperOffsets[mainAxis] + overflow[mainSide];
2782
- var max$1 = popperOffsets[mainAxis] - overflow[altSide];
2823
+ var min$1 = offset + overflow[mainSide];
2824
+ var max$1 = offset - overflow[altSide];
2783
2825
  var additive = tether ? -popperRect[len] / 2 : 0;
2784
2826
  var minLen = variation === start ? referenceRect[len] : popperRect[len];
2785
2827
  var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
@@ -2799,36 +2841,45 @@ function preventOverflow(_ref) {
2799
2841
  // width or height)
2800
2842
 
2801
2843
  var arrowLen = within(0, referenceRect[len], arrowRect[len]);
2802
- var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;
2803
- var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;
2844
+ var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
2845
+ var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
2804
2846
  var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
2805
2847
  var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
2806
- var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0;
2807
- var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset;
2808
- var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue;
2848
+ var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
2849
+ var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
2850
+ var tetherMax = offset + maxOffset - offsetModifierValue;
2851
+ var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
2852
+ popperOffsets[mainAxis] = preventedOffset;
2853
+ data[mainAxis] = preventedOffset - offset;
2854
+ }
2809
2855
 
2810
- if (checkMainAxis) {
2811
- var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
2812
- popperOffsets[mainAxis] = preventedOffset;
2813
- data[mainAxis] = preventedOffset - offset;
2814
- }
2856
+ if (checkAltAxis) {
2857
+ var _offsetModifierState$2;
2815
2858
 
2816
- if (checkAltAxis) {
2817
- var _mainSide = mainAxis === 'x' ? top : left;
2859
+ var _mainSide = mainAxis === 'x' ? top : left;
2818
2860
 
2819
- var _altSide = mainAxis === 'x' ? bottom : right;
2861
+ var _altSide = mainAxis === 'x' ? bottom : right;
2820
2862
 
2821
- var _offset = popperOffsets[altAxis];
2863
+ var _offset = popperOffsets[altAxis];
2822
2864
 
2823
- var _min = _offset + overflow[_mainSide];
2865
+ var _len = altAxis === 'y' ? 'height' : 'width';
2824
2866
 
2825
- var _max = _offset - overflow[_altSide];
2867
+ var _min = _offset + overflow[_mainSide];
2826
2868
 
2827
- var _preventedOffset = within(tether ? min(_min, tetherMin) : _min, _offset, tether ? max(_max, tetherMax) : _max);
2869
+ var _max = _offset - overflow[_altSide];
2828
2870
 
2829
- popperOffsets[altAxis] = _preventedOffset;
2830
- data[altAxis] = _preventedOffset - _offset;
2831
- }
2871
+ var isOriginSide = [top, left].indexOf(basePlacement) !== -1;
2872
+
2873
+ var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
2874
+
2875
+ var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
2876
+
2877
+ var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
2878
+
2879
+ var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
2880
+
2881
+ popperOffsets[altAxis] = _preventedOffset;
2882
+ data[altAxis] = _preventedOffset - _offset;
2832
2883
  }
2833
2884
 
2834
2885
  state.modifiersData[name] = data;
@@ -2860,8 +2911,8 @@ function getNodeScroll(node) {
2860
2911
 
2861
2912
  function isElementScaled(element) {
2862
2913
  var rect = element.getBoundingClientRect();
2863
- var scaleX = rect.width / element.offsetWidth || 1;
2864
- var scaleY = rect.height / element.offsetHeight || 1;
2914
+ var scaleX = round(rect.width) / element.offsetWidth || 1;
2915
+ var scaleY = round(rect.height) / element.offsetHeight || 1;
2865
2916
  return scaleX !== 1 || scaleY !== 1;
2866
2917
  } // Returns the composite rect of an element relative to its offsetParent.
2867
2918
  // Composite means it takes into account transforms as well as layout.
@@ -2873,9 +2924,9 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
2873
2924
  }
2874
2925
 
2875
2926
  var isOffsetParentAnElement = isHTMLElement(offsetParent);
2876
- isHTMLElement(offsetParent) && isElementScaled(offsetParent);
2927
+ var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
2877
2928
  var documentElement = getDocumentElement(offsetParent);
2878
- var rect = getBoundingClientRect(elementOrVirtualElement);
2929
+ var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
2879
2930
  var scroll = {
2880
2931
  scrollLeft: 0,
2881
2932
  scrollTop: 0
@@ -2892,7 +2943,7 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
2892
2943
  }
2893
2944
 
2894
2945
  if (isHTMLElement(offsetParent)) {
2895
- offsets = getBoundingClientRect(offsetParent);
2946
+ offsets = getBoundingClientRect(offsetParent, true);
2896
2947
  offsets.x += offsetParent.clientLeft;
2897
2948
  offsets.y += offsetParent.clientTop;
2898
2949
  } else if (documentElement) {
@@ -5543,1012 +5594,1119 @@ var Tippy = index;
5543
5594
  var css_248z$4 = ".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}";
5544
5595
  styleInject(css_248z$4);
5545
5596
 
5546
- var ItemTooltipWrapper = function (_a) {
5547
- 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, jobstyleOverride = _a.jobstyleOverride, _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;
5548
- var spanRef = useRef(null);
5549
- var _j = useState(null), childRef = _j[0], setChildRef = _j[1];
5550
- /**
5551
- * Mount the temporary span element.
5552
- * retrieve and store the target element's reference.
5553
- */
5554
- useEffect(function () {
5555
- if (spanRef.current) {
5556
- setChildRef(spanRef.current.previousElementSibling);
5557
- }
5558
- return function () { return setChildRef(null); };
5559
- }, []);
5560
- var _k = useState(true), isOffline = _k[0], setIsOffline = _k[1];
5561
- return (React.createElement(React.Fragment, null,
5562
- children,
5563
- 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" } }))));
5564
- };
5565
-
5566
- function ItemIconNameDiv(_a) {
5567
- var _this = this;
5568
- var _b;
5569
- var item = _a.item, region = _a.region, client = _a.client, _c = _a.showRandomIcon, showRandomIcon = _c === void 0 ? false : _c;
5570
- var _d = useState(), itemData = _d[0], setItemData = _d[1];
5571
- useEffect(function () {
5572
- if (client)
5573
- (function () { return __awaiter(_this, void 0, void 0, function () {
5574
- var _a;
5575
- return __generator(this, function (_b) {
5576
- switch (_b.label) {
5577
- case 0:
5578
- _a = setItemData;
5579
- return [4 /*yield*/, client.GetItem(item.itemId, item.itemLevel)];
5580
- case 1:
5581
- _a.apply(void 0, [_b.sent()]);
5582
- return [2 /*return*/];
5583
- }
5584
- });
5585
- }); })();
5586
- }, [item, client]);
5587
- if (itemData) {
5588
- if (itemData.grade != 0)
5589
- return (React.createElement("div", { className: "ItemTooltip_itemiconnamediv" },
5590
- React.createElement(ItemTooltipWrapper, { region: region, client: client, data: itemData },
5591
- React.createElement("img", { className: "ItemTooltip_itemIconSmall", alt: "", src: BuildIconPath((_b = itemData.icon) === null || _b === void 0 ? void 0 : _b.iconPath) })),
5592
- React.createElement("div", { className: "ItemTooltip_itemNameRandomDiv" },
5593
- React.createElement("span", { className: "TooltipBase_grade-" + itemData.grade, dangerouslySetInnerHTML: { __html: itemData.name } }),
5594
- showRandomIcon ? (React.createElement(React.Fragment, null,
5595
- "\u00A0",
5596
- React.createElement("div", null,
5597
- React.createElement("img", { style: {
5598
- width: 36,
5599
- height: 18,
5600
- margin: "0 1px",
5601
- top: 4,
5602
- position: "relative",
5603
- }, alt: "", src: "https://lean.bns.tools/bns/icons/00015590/Tag_Random.png" })))) : null)));
5604
- else
5605
- return null;
5597
+ var TooltipWrapperSettings = /** @class */ (function () {
5598
+ function TooltipWrapperSettings(followCursor, interactive, placement, trigger, showArrow) {
5599
+ if (followCursor === void 0) { followCursor = false; }
5600
+ if (interactive === void 0) { interactive = true; }
5601
+ if (placement === void 0) { placement = "right"; }
5602
+ if (trigger === void 0) { trigger = "mouseenter focus"; }
5603
+ if (showArrow === void 0) { showArrow = true; }
5604
+ this.followCursor = followCursor;
5605
+ this.interactive = interactive;
5606
+ this.placement = placement;
5607
+ this.trigger = trigger;
5608
+ this.showArrow = showArrow;
5606
5609
  }
5607
- else {
5608
- return (React.createElement("div", { className: "ItemTooltip_itemIconLoading" },
5609
- React.createElement("div", { className: "dot-elastic" })));
5610
- }
5611
- }
5610
+ return TooltipWrapperSettings;
5611
+ }());
5612
5612
 
5613
- function DecomposeResults(props) {
5614
- if (props.client)
5615
- return (React.createElement("div", null, props.items
5616
- .filter(function (x) { return x != null; })
5617
- .map(function (item, i) {
5618
- return (React.createElement("div", { className: "TooltipBase_flex", key: item.itemId + "-" + item.itemLevel + "_" + i },
5619
- React.createElement(ItemIconNameDiv, { region: props.region, item: item, client: props.client, showRandomIcon: item.isRandom }),
5620
- item.isRandom ? null : (React.createElement(React.Fragment, null,
5621
- "\u00A0",
5622
- item.isMinMax ? (React.createElement("span", null, GetRangeString(item.min, item.max))) : (React.createElement("span", null, GetRangeString(item.min)))))));
5623
- })));
5624
- else
5625
- return null;
5626
- }
5613
+ var css_248z$3 = ".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";
5614
+ styleInject(css_248z$3);
5627
5615
 
5628
- function SetBonusToggle(_a) {
5629
- var jobstyles = _a.jobstyles, jobstyle = _a.jobstyle, setJobstyle = _a.setJobstyle;
5630
- return (React.createElement("div", { className: "ItemTooltip_jobstyleToggleContainer" }, jobstyles.map(function (style) { return (React.createElement("button", { key: style, className: "ItemTooltip_jobstyleButton" +
5631
- (style === jobstyle ? " ItemTooltip_jobstyleButton-active" : ""), onClick: function (e) {
5632
- e.stopPropagation();
5633
- setJobstyle(style);
5634
- } }, GetJobStyleNameString(style))); })));
5635
- }
5616
+ var css_248z$2 = ".SkillTooltip_skillIconContainer {\n width: 60px;\n height: 60px;\n padding: 0;\n float: left;\n position: relative; }\n\n.SkillTooltip_skillIcon {\n width: 60px;\n height: 60px; }\n\n.SkillTooltip_buttonIcon {\n position: absolute;\n right: 1px;\n bottom: 1px;\n height: 18px;\n opacity: 0.9; }\n\n.SkillTooltip_buttonIconMouse {\n background-color: rgba(0, 0, 0, 0.8); }\n\n.SkillTooltip_mainText {\n font-weight: 500; }\n\n.SkillTooltip_smallText {\n font-size: 12px; }\n\n.SkillTooltip_subTextMargin {\n margin-bottom: 0.3rem; }\n\n.SkillTooltip_boundaryContainer {\n display: flex;\n width: 100%;\n margin-bottom: 0.5rem;\n line-height: 17px; }\n\n.SkillTooltip_boundary {\n flex: 1;\n flex-basis: 0px;\n min-width: 0;\n display: flex;\n flex-direction: column;\n color: black;\n margin: 0.15rem; }\n\n.SkillTooltip_boundary:first-of-type > .SkillTooltip_boundaryHead {\n border-radius: 3px 0 0 0; }\n\n.SkillTooltip_boundary:last-of-type > .SkillTooltip_boundaryHead {\n border-radius: 0 3px 0 0; }\n\n.SkillTooltip_boundary:first-of-type > .SkillTooltip_boundaryBody {\n border-radius: 0 0 0 3px; }\n\n.SkillTooltip_boundary:last-of-type > .SkillTooltip_boundaryBody {\n border-radius: 0 0 3px 0; }\n\n.SkillTooltip_boundaryHead {\n color: white;\n font-weight: 500;\n font-size: 12px;\n text-overflow: ellipsis;\n overflow: hidden;\n padding: 0.3rem;\n text-align: center;\n flex: 1;\n min-height: 26px;\n background-color: rgba(127, 127, 127, 0.4); }\n\n.SkillTooltip_boundaryBody {\n color: white;\n padding: 0.5rem 0.3rem;\n margin-top: 0.15rem;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 40px;\n flex: 2;\n background-color: rgba(127, 127, 127, 0.4); }\n\n.SkillTooltip_boundaryBodyModifier {\n min-height: 33px !important; }\n\n.SkillTooltip_boundaryHasIcon {\n min-height: 50px !important; }\n\n.SkillTooltip_conditionRow {\n display: flex;\n align-items: center;\n font-size: 12px; }\n\n.SkillTooltip_conditionRow:not(:last-of-type) {\n margin-bottom: 0.1rem; }\n\n.SkillTooltip_conditionIcon {\n width: 20px;\n height: 20px;\n margin-right: 0.33rem; }\n\n.SkillTooltip_conditionIconSmall {\n width: 12px;\n height: 12px;\n margin-right: 0.22rem; }\n\n.tooltipArg {\n color: #46bee1;\n font-weight: 600; }\n\n.target-360 {\n background-image: url(\"./360.png\");\n background-repeat: no-repeat;\n background-position: 50% 60%;\n background-size: auto 64px; }\n\n.target-front-180 {\n background-image: url(\"./180.png\");\n background-repeat: no-repeat;\n background-position: 50% 70%;\n background-size: auto 64px; }\n\n.laser {\n background-image: url(\"./laser.png\");\n background-repeat: no-repeat;\n background-position: 50% 50%;\n background-size: auto 64px; }\n";
5617
+ styleInject(css_248z$2);
5636
5618
 
5637
- function ItemDescriptionText(_a) {
5638
- var htmlString = _a.htmlString;
5639
- var textSplit = htmlString.replace("<br/>", "<br />").split("<br />");
5640
- return (React.createElement("div", { className: "ItemTooltip_descriptions TooltipBase_flex-col" }, textSplit.map(function (htmlText, i) { return (React.createElement("span", { key: i, dangerouslySetInnerHTML: {
5641
- __html: ReplaceIconsInHtmlString(htmlText),
5642
- } })); })));
5619
+ function getButtonIconPath(button) {
5620
+ var _a;
5621
+ if (buttonIconMapping.find(function (x) { return x.button === button; }) == null)
5622
+ return null;
5623
+ return ("/00072858" + ((_a = buttonIconMapping.find(function (x) { return x.button === button; })) === null || _a === void 0 ? void 0 : _a.path));
5624
+ }
5625
+ var buttonIconMapping = [
5626
+ {
5627
+ button: "F",
5628
+ path: "/Key_Alphabet_F",
5629
+ },
5630
+ {
5631
+ button: "Q",
5632
+ path: "/Key_Alphabet_Q",
5633
+ },
5634
+ {
5635
+ button: "E",
5636
+ path: "/Key_Alphabet_E",
5637
+ },
5638
+ {
5639
+ button: "S",
5640
+ path: "/Key_Alphabet_S",
5641
+ },
5642
+ {
5643
+ button: "Z",
5644
+ path: "/Key_Alphabet_Z",
5645
+ },
5646
+ {
5647
+ button: "X",
5648
+ path: "/Key_Alphabet_X",
5649
+ },
5650
+ {
5651
+ button: "C",
5652
+ path: "/Key_Alphabet_C",
5653
+ },
5654
+ {
5655
+ button: "V",
5656
+ path: "/Key_Alphabet_V",
5657
+ },
5658
+ {
5659
+ button: "W",
5660
+ path: "/Key_Alphabet_W",
5661
+ },
5662
+ {
5663
+ button: "G",
5664
+ path: "/Key_Alphabet_G",
5665
+ },
5666
+ {
5667
+ button: "B",
5668
+ path: "/Key_Alphabet_B",
5669
+ },
5670
+ {
5671
+ button: "SPACE",
5672
+ path: "/Key_Space_Big",
5673
+ },
5674
+ {
5675
+ button: "TAB",
5676
+ path: "/Key_Tab_Big",
5677
+ },
5678
+ {
5679
+ button: "1",
5680
+ path: "/Key_Num_1",
5681
+ },
5682
+ {
5683
+ button: "2",
5684
+ path: "/Key_Num_2",
5685
+ },
5686
+ {
5687
+ button: "3",
5688
+ path: "/Key_Num_3",
5689
+ },
5690
+ {
5691
+ button: "4",
5692
+ path: "/Key_Num_4",
5693
+ },
5694
+ {
5695
+ button: "LMB",
5696
+ path: "/GameUI_Tag_MouseL",
5697
+ },
5698
+ {
5699
+ button: "RMB",
5700
+ path: "/GameUI_Tag_MouseR",
5701
+ },
5702
+ ];
5703
+
5704
+ function SkillIconWithButton(_a) {
5705
+ var skill = _a.skill;
5706
+ return (React.createElement("div", { className: "SkillTooltip_skillIconContainer" },
5707
+ React.createElement("img", { className: "SkillTooltip_skillIcon", src: BuildIconPath(skill.IconPath, skill.IconIndex - 1), alt: "" }),
5708
+ getButtonIconPath(getNormalizedButton(skill)) ? (React.createElement("img", { className: "SkillTooltip_buttonIcon" +
5709
+ " " +
5710
+ (getNormalizedButton(skill) === "RMB" ||
5711
+ getNormalizedButton(skill) === "LMB"
5712
+ ? "SkillTooltip_buttonIconMouse"
5713
+ : ""), src: BuildIconPath(getButtonIconPath(getNormalizedButton(skill))), alt: "" })) : null));
5643
5714
  }
5644
5715
 
5645
- function RawText(_a) {
5646
- var htmlString = _a.htmlString;
5647
- return (React.createElement("div", { className: "ItemTooltip_raw", dangerouslySetInnerHTML: { __html: htmlString } }));
5716
+ function SkillTooltipBoundary(_a) {
5717
+ var head = _a.head, body = _a.body, _b = _a.bodyClass, bodyClass = _b === void 0 ? "" : _b, _c = _a.pvpModifier, pvpModifier = _c === void 0 ? false : _c, _d = _a.hasIcon, hasIcon = _d === void 0 ? false : _d;
5718
+ return (React.createElement("div", { className: "SkillTooltip_boundary" },
5719
+ React.createElement("div", { className: "SkillTooltip_boundaryHead" }, head),
5720
+ React.createElement("div", { className: "SkillTooltip_boundaryBody " +
5721
+ (pvpModifier ? "SkillTooltip_boundaryBodyModifier " : "") +
5722
+ bodyClass +
5723
+ (hasIcon ? " SkillTooltip_boundaryHasIcon " : "") }, body)));
5648
5724
  }
5649
5725
 
5650
- function TextWithNumber(_a) {
5651
- var text = _a.text, number = _a.number;
5652
- return (React.createElement("div", null,
5653
- text,
5654
- number));
5726
+ function SkillTooltipBoundaryContainer(_a) {
5727
+ var children = _a.children;
5728
+ return React.createElement("div", { className: "SkillTooltip_boundaryContainer" }, children);
5655
5729
  }
5656
5730
 
5657
- function StringEnumerationWithText(_a) {
5658
- var enumeration = _a.enumeration, textBefore = _a.textBefore, textAfter = _a.textAfter;
5659
- return (React.createElement("div", null,
5660
- textBefore,
5661
- enumeration.map(function (item, i) { return (React.createElement("span", { key: i },
5662
- item,
5663
- i != enumeration.length - 1 ? ", " : null)); }),
5664
- textAfter));
5731
+ function PvpModifiers(_a) {
5732
+ var skill = _a.skill;
5733
+ return (React.createElement(SkillTooltipBoundaryContainer, null,
5734
+ React.createElement(SkillTooltipBoundary, { head: React.createElement("span", null, "Equalized PvP"), body: React.createElement("span", null,
5735
+ "x\u00A0",
5736
+ React.createElement("span", { dangerouslySetInnerHTML: { __html: skill.EqualizedPvp } })), pvpModifier: true }),
5737
+ React.createElement(SkillTooltipBoundary, { head: React.createElement("span", null, "PvP"), body: React.createElement("span", null,
5738
+ "x\u00A0",
5739
+ React.createElement("span", { dangerouslySetInnerHTML: { __html: skill.Pvp } })), pvpModifier: true })));
5665
5740
  }
5666
5741
 
5667
- function SealingResult(_a) {
5668
- var item = _a.item, client = _a.client, region = _a.region;
5669
- return (React.createElement("div", null, item.sealing.sealConsumeItems
5670
- .filter(function (x) { return x.min != 0; })
5671
- .map(function (consumeItem, i) { return (React.createElement("div", { className: "TooltipBase_flex", key: consumeItem.itemId + "_" + i },
5672
- React.createElement(ItemIconNameDiv, { region: region, item: consumeItem, client: client }),
5673
- "\u00A0",
5674
- GetRangeString(consumeItem.min))); })));
5742
+ function SkillBoundaries(_a) {
5743
+ var skill = _a.skill;
5744
+ var _b = React.useState(false), hasIcon = _b[0], setHasIcon = _b[1];
5745
+ React.useEffect(function () {
5746
+ setHasIcon(skill.Boundaries.Range.Shape != null && skill.Boundaries.Range.Shape != "");
5747
+ }, [skill]);
5748
+ return (React.createElement(SkillTooltipBoundaryContainer, null,
5749
+ React.createElement(SkillTooltipBoundary, { head: React.createElement("span", { dangerouslySetInnerHTML: {
5750
+ __html: skill.Boundaries.Distance.Name,
5751
+ } }), body: React.createElement("span", { dangerouslySetInnerHTML: {
5752
+ __html: skill.Boundaries.Distance.Value,
5753
+ } }), hasIcon: hasIcon }),
5754
+ React.createElement(SkillTooltipBoundary, { head: React.createElement("span", { dangerouslySetInnerHTML: {
5755
+ __html: skill.Boundaries.Range.Name,
5756
+ } }), body: React.createElement("span", { dangerouslySetInnerHTML: {
5757
+ __html: skill.Boundaries.Range.Value,
5758
+ } }), hasIcon: hasIcon, bodyClass: skill.Boundaries.Range.Shape }),
5759
+ React.createElement(SkillTooltipBoundary, { head: React.createElement("span", { dangerouslySetInnerHTML: {
5760
+ __html: skill.Boundaries.Cast.Name,
5761
+ } }), body: React.createElement("span", { dangerouslySetInnerHTML: {
5762
+ __html: skill.Boundaries.Cast.Value,
5763
+ } }), hasIcon: hasIcon }),
5764
+ React.createElement(SkillTooltipBoundary, { head: React.createElement("span", { dangerouslySetInnerHTML: {
5765
+ __html: skill.Boundaries.Recycle.Name,
5766
+ } }), body: React.createElement("span", { dangerouslySetInnerHTML: {
5767
+ __html: skill.Boundaries.Recycle.Value,
5768
+ } }), hasIcon: hasIcon })));
5675
5769
  }
5676
5770
 
5677
- function AccountTransfer(_a) {
5678
- var item = _a.item, client = _a.client, region = _a.region;
5679
- return (React.createElement("div", null,
5680
- item.accountTransfer.requiredItems.map(function (consumeItem, i) { return (React.createElement("div", { className: "TooltipBase_flex", key: consumeItem.itemId + "_" + i },
5681
- React.createElement(ItemIconNameDiv, { region: region, client: client, item: consumeItem }),
5682
- "\u00A0",
5683
- GetRangeString(consumeItem.min))); }),
5684
- item.accountTransfer.moneyCost != null &&
5685
- item.accountTransfer.moneyCost > 0 ? (React.createElement("span", null,
5686
- item.accountTransfer.moneyCost,
5687
- "\u00A0copper")) : null));
5771
+ function SkillConditions(_a) {
5772
+ var tooltipItems = _a.tooltipItems;
5773
+ return (React.createElement(React.Fragment, null, tooltipItems.map(function (sub, i) { return (React.createElement("div", { key: i, className: "SkillTooltip_conditionRow" },
5774
+ sub.IconPath != null ? (React.createElement("img", { src: sub.IconIndex != null && sub.IconIndex > 0
5775
+ ? BuildIconPath(sub.IconPath, sub.IconIndex - 1)
5776
+ : BuildIconPath(sub.IconPath), alt: "", className: "SkillTooltip_conditionIcon" })) : null,
5777
+ React.createElement("div", { key: i, dangerouslySetInnerHTML: { __html: sub.Text } }))); })));
5688
5778
  }
5689
5779
 
5690
- function ItemTooltip(_a) {
5691
- var _this = this;
5692
- var _b, _c, _d;
5693
- 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 = _g === void 0 ? false : _g;
5694
- var _h = useState("advanced-1"), jobstyle = _h[0], setJobstyle = _h[1];
5695
- var _j = useState(), client = _j[0], setClient = _j[1];
5696
- useEffect(function () {
5697
- if (offline)
5698
- return;
5699
- if (clientProp == undefined) {
5700
- (function () { return __awaiter(_this, void 0, void 0, function () {
5701
- return __generator(this, function (_a) {
5702
- setClient(new ItemDownloadClient(region));
5703
- return [2 /*return*/];
5704
- });
5705
- }); })();
5706
- }
5707
- else {
5708
- setClient(clientProp);
5709
- }
5710
- }, [offline]);
5711
- useEffect(function () {
5712
- if (jobstyleOverride != undefined) {
5713
- setJobstyle(jobstyleOverride);
5714
- }
5715
- }, [jobstyleOverride]);
5716
- var item = data;
5717
- var itemCategory = (_c = (_b = item.categories) === null || _b === void 0 ? void 0 : _b.sort(function (a, b) { return b.index - a.index; })[0].localizedName) !== null && _c !== void 0 ? _c : "";
5718
- if (itemCategory == "none")
5719
- itemCategory = "";
5780
+ function SkillTooltip(_a) {
5781
+ var settings = _a.settings;
5782
+ var debug = settings.debug;
5783
+ var skill = settings.data;
5720
5784
  var tooltipBaseProps = {
5721
- title: item.name,
5722
- grade: item.grade,
5723
- id: item.id + "-" + item.level,
5724
- icon: item.icon ? BuildIconPath(item.icon.iconPath) : "",
5725
- subtitle: itemCategory,
5785
+ title: skill.Name,
5786
+ id: skill.ID + "-" + skill.Variation,
5787
+ grade: 4,
5788
+ icon: skill.IconPath ? React.createElement(SkillIconWithButton, { skill: skill }) : "",
5789
+ subtitle: skill.AdditionalInfo
5790
+ ? "<div style=\"font-size: 12px;\">".concat(skill.AdditionalInfo, "</div>")
5791
+ : "",
5726
5792
  mainInfos: [],
5727
5793
  subInfoGroups: [],
5728
- fullHeight: fullHeight,
5729
5794
  };
5730
- var setHasSkillModifiers = false;
5731
- var jobstyles = [];
5732
- var itemCombats = false;
5733
- if (item.skills != null && item.skills.length > 0) {
5734
- item.skills.forEach(function (itemSkill) {
5735
- if (itemSkill.jobstyle != null) {
5736
- setHasSkillModifiers = true;
5737
- itemCombats = true;
5738
- if (!jobstyles.includes(itemSkill.jobstyle)) {
5739
- jobstyles.push(itemSkill.jobstyle);
5740
- }
5741
- }
5742
- });
5743
- }
5744
- if (((_d = item.setBonus) === null || _d === void 0 ? void 0 : _d.setBonusStages) != null) {
5745
- item.setBonus.setBonusStages.forEach(function (stage) {
5746
- if (stage.skillModifiers != null && stage.skillModifiers.length > 0) {
5747
- setHasSkillModifiers = true;
5748
- stage.skillModifiers.forEach(function (modifier) {
5749
- if (!jobstyles.includes(modifier.jobstyle)) {
5750
- jobstyles.push(modifier.jobstyle);
5751
- }
5752
- });
5753
- }
5754
- });
5755
- }
5756
- //top part
5757
- AddMainInfo(tooltipBaseProps.mainInfos, item);
5758
- AddSubInfo(tooltipBaseProps.mainInfos, item);
5759
- AddSkillTitles(tooltipBaseProps.mainInfos, item, itemCombats, jobstyle);
5760
- AddCooldowns(tooltipBaseProps.mainInfos, item);
5761
- AddItemStats(tooltipBaseProps.mainInfos, item);
5762
- AddItemRandomStats(tooltipBaseProps.mainInfos, item);
5763
- //bottom part
5764
- AddGearScore(tooltipBaseProps.subInfoGroups, item, debug);
5765
- AddJobstyleToggles(setHasSkillModifiers, tooltipBaseProps.subInfoGroups, jobstyles, jobstyle, setJobstyle);
5766
- AddTopText(tooltipBaseProps.subInfoGroups, item);
5767
- AddSkillDescriptions(tooltipBaseProps.subInfoGroups, item, itemCombats, jobstyle);
5768
- AddSkillModifiers(tooltipBaseProps.subInfoGroups, item, false, jobstyle);
5769
- AddSetBonus(tooltipBaseProps.subInfoGroups, item, jobstyle);
5770
- if (!offline) {
5771
- AddDecomposeResults(tooltipBaseProps.subInfoGroups, item, client, region);
5772
- }
5773
- AddUnityPoints(tooltipBaseProps.subInfoGroups, item);
5774
- AddDescriptions(tooltipBaseProps.subInfoGroups, item);
5775
- AddFlavorText(tooltipBaseProps.subInfoGroups, item);
5776
- AddItemUsableGroup(tooltipBaseProps.subInfoGroups, item);
5777
- AddRequiredLevel(tooltipBaseProps.subInfoGroups, item);
5778
- AddRequiredJobs(tooltipBaseProps.subInfoGroups, item);
5779
- AddBoundToAccount(tooltipBaseProps.subInfoGroups, item);
5780
- AddAbleToTrade(tooltipBaseProps.subInfoGroups, item);
5781
- if (!offline) {
5782
- AddSealingResult(tooltipBaseProps.subInfoGroups, item, client, region);
5783
- AddAccountTransferResult(tooltipBaseProps.subInfoGroups, item, client, region);
5795
+ if (skill.Tooltip != null) {
5796
+ //topPart
5797
+ AddMainText1s(tooltipBaseProps.mainInfos, skill);
5798
+ AddMainText2s(tooltipBaseProps.mainInfos, skill);
5799
+ //bottomPart
5800
+ AddSubTexts(tooltipBaseProps.subInfoGroups, skill);
5801
+ AddBreakValue(tooltipBaseProps.subInfoGroups, skill);
5802
+ AddPvpModifiers(tooltipBaseProps.subInfoGroups, skill);
5803
+ AddBoundaries(tooltipBaseProps.subInfoGroups, skill);
5804
+ AddConditions(tooltipBaseProps.subInfoGroups, skill);
5805
+ AddStances(tooltipBaseProps.subInfoGroups, skill);
5806
+ if (debug) {
5807
+ AddIds(tooltipBaseProps.subInfoGroups, skill);
5808
+ }
5784
5809
  }
5785
5810
  return React.createElement(TooltipBase, __assign({}, tooltipBaseProps));
5786
5811
  }
5787
- function AddMainInfo(mainInfos, item) {
5788
- if (item.mainInfo != null)
5789
- mainInfos.push(React.createElement(ItemMainInfo, __assign({}, item)));
5790
- }
5791
- function AddSubInfo(mainInfos, item) {
5792
- if (item.subInfo != null)
5793
- mainInfos.push(React.createElement(ItemSubInfo, __assign({}, item)));
5794
- }
5795
- function AddSkillTitles(mainInfos, item, itemCombats, jobstyle) {
5796
- var itemSkills = item.skills;
5797
- if (itemSkills == null || itemSkills.length == 0)
5798
- return;
5799
- mainInfos.push(React.createElement(ItemSkillTitles, { item: item, itemCombats: itemCombats, jobstyle: jobstyle }));
5800
- }
5801
- function AddCooldowns(mainInfos, item) {
5802
- if ((item.cooldownInMs == null || item.cooldownInMs == 0) &&
5803
- (item.bgCooldownInMs == null || item.bgCooldownInMs == 0))
5804
- return;
5805
- mainInfos.push(React.createElement(ItemCooldowns, __assign({}, item)));
5806
- }
5807
- function AddItemStats(mainInfos, item) {
5808
- if (item.stats == null || item.stats.length == 0)
5809
- return;
5810
- mainInfos.push(React.createElement(ItemStats, __assign({}, item)));
5812
+ function AddMainText1s(mainInfos, skill) {
5813
+ skill.Tooltip.Main1.forEach(function (main) {
5814
+ mainInfos.push(React.createElement("div", { className: "SkillTooltip_mainText", dangerouslySetInnerHTML: { __html: main.Text } }));
5815
+ });
5811
5816
  }
5812
- function AddItemRandomStats(mainInfos, item) {
5813
- if (item.randomStats == null || item.randomStats.length === 0)
5814
- return;
5815
- mainInfos.push(React.createElement(ItemRandomStats, __assign({}, item)));
5817
+ function AddMainText2s(mainInfos, skill) {
5818
+ skill.Tooltip.Main2.forEach(function (main) {
5819
+ mainInfos.push(React.createElement("div", { className: "SkillTooltip_smallText", dangerouslySetInnerHTML: { __html: main.Text } }));
5820
+ });
5816
5821
  }
5817
- function AddGearScore(subInfoGroups, item, debugMode) {
5818
- if (!debugMode)
5819
- return;
5822
+ function AddSubTexts(subInfoGroups, skill) {
5823
+ var texts = [];
5824
+ skill.Tooltip.Sub.forEach(function (sub, i) {
5825
+ texts.push(React.createElement("div", { className: "SkillTooltip_subText" +
5826
+ (i != skill.Tooltip.Sub.length - 1
5827
+ ? " SkillTooltip_subTextMargin"
5828
+ : "") },
5829
+ sub.IconPath != null && sub.IconPath != "" ? (React.createElement("img", { src: sub.IconIndex != null && sub.IconIndex > 0
5830
+ ? BuildIconPath(sub.IconPath, sub.IconIndex - 1)
5831
+ : BuildIconPath(sub.IconPath), alt: "", className: "SkillTooltip_conditionIconSmall" })) : null,
5832
+ React.createElement("span", { dangerouslySetInnerHTML: { __html: sub.Text } })));
5833
+ });
5820
5834
  subInfoGroups.push({
5821
5835
  title: "",
5822
- texts: [React.createElement(GearScore, __assign({}, item))],
5836
+ texts: texts,
5823
5837
  });
5824
5838
  }
5825
- function AddTopText(subInfoGroups, item) {
5826
- if (item.topText == null)
5839
+ function AddBreakValue(subInfoGroups, skill) {
5840
+ if (skill.BreakValue != null && skill.BreakValue !== "0") {
5841
+ subInfoGroups.push({
5842
+ title: "",
5843
+ texts: [
5844
+ React.createElement("div", null,
5845
+ "Breaker value:\u00A0",
5846
+ React.createElement("span", { className: "tooltipArg", dangerouslySetInnerHTML: { __html: skill.BreakValue } })),
5847
+ ],
5848
+ });
5849
+ }
5850
+ }
5851
+ function AddPvpModifiers(subInfoGroups, skill) {
5852
+ if (skill.Pvp == null || skill.EqualizedPvp == null)
5827
5853
  return;
5828
5854
  subInfoGroups.push({
5829
5855
  title: "",
5830
- texts: [React.createElement(TopText, __assign({}, item))],
5856
+ texts: [React.createElement(PvpModifiers, { skill: skill })],
5831
5857
  });
5832
5858
  }
5833
- function AddSkillDescriptions(subInfoGroups, item, itemCombats, jobstyle) {
5834
- if (item.skills == null || item.skills.length == 0)
5859
+ function AddBoundaries(subInfoGroups, skill) {
5860
+ if (skill.Boundaries == null)
5835
5861
  return;
5836
5862
  subInfoGroups.push({
5837
5863
  title: "",
5838
- texts: [
5839
- React.createElement(ItemSkillDescriptions, { item: item, itemCombats: itemCombats, jobstyle: jobstyle }),
5840
- ],
5864
+ texts: [React.createElement(SkillBoundaries, { skill: skill })],
5841
5865
  });
5842
5866
  }
5843
- function AddSkillModifiers(subInfoGroups, item, isSetBonus, jobstyle) {
5844
- if (item.skillModifierGroups == null || item.skillModifierGroups.length == 0)
5867
+ function AddConditions(subInfoGroups, skill) {
5868
+ if (skill.Tooltip.Condition.length == 0)
5845
5869
  return;
5846
5870
  subInfoGroups.push({
5847
- title: "",
5848
- texts: [
5849
- React.createElement(SkillModifiers, { skillModifierGroups: item.skillModifierGroups, isSetBonus: isSetBonus, jobstyle: jobstyle }),
5850
- ],
5871
+ title: "Terms of Use",
5872
+ texts: [React.createElement(SkillConditions, { tooltipItems: skill.Tooltip.Condition })],
5851
5873
  });
5852
5874
  }
5853
- function AddSetBonus(subInfoGroups, item, jobstyle) {
5854
- if (item.setBonus == null)
5875
+ function AddStances(subInfoGroups, skill) {
5876
+ if (skill.Tooltip.Stance.length == 0)
5855
5877
  return;
5856
5878
  subInfoGroups.push({
5857
- title: "Set Effect:",
5858
- texts: [React.createElement(SetBonus, { item: item, jobstyle: jobstyle })],
5879
+ title: "Switch Position",
5880
+ texts: [React.createElement(SkillConditions, { tooltipItems: skill.Tooltip.Stance })],
5859
5881
  });
5860
5882
  }
5861
- function AddDecomposeResults(subInfoGroups, item, client, region) {
5862
- if (item.decomposeRewards == null || item.decomposeRewards.length == 0)
5863
- return;
5864
- var fixedItems = []
5865
- .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.fixedItems; })).filter(function (x) { return x != null; });
5866
- var randomItems = []
5867
- .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.randomItems; })).filter(function (x) { return x != null; });
5868
- var selectItems = []
5869
- .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.selectItems; })).filter(function (x) { return x != null; });
5870
- if (fixedItems.length > 0)
5871
- subInfoGroups.push({
5872
- title: "Guaranteed/Salvage:",
5873
- texts: [
5874
- React.createElement(DecomposeResults, { region: region, items: fixedItems, client: client }),
5875
- ],
5876
- });
5877
- if (randomItems.length > 0)
5878
- subInfoGroups.push({
5879
- title: "Random:",
5880
- texts: [
5881
- React.createElement(DecomposeResults, { region: region, items: randomItems, client: client }),
5882
- ],
5883
- });
5884
- if (selectItems.length > 0)
5885
- subInfoGroups.push({
5886
- title: "Select:",
5887
- texts: [
5888
- React.createElement(DecomposeResults, { region: region, items: selectItems, client: client }),
5889
- ],
5890
- });
5891
- }
5892
- function AddJobstyleToggles(setHasSkillModifiers, subInfoGroups, jobstyles, jobstyle, setJobstyle) {
5893
- if (!setHasSkillModifiers)
5894
- return;
5883
+ function AddIds(subInfoGroups, skill) {
5895
5884
  subInfoGroups.push({
5896
- title: "",
5897
- texts: [
5898
- React.createElement(SetBonusToggle, { jobstyles: jobstyles, jobstyle: jobstyle, setJobstyle: setJobstyle }),
5899
- ],
5885
+ title: "Debug info",
5886
+ texts: [React.createElement("div", null,
5887
+ "ID: ",
5888
+ skill.ID), React.createElement("div", null,
5889
+ "Variation: ",
5890
+ skill.Variation)],
5900
5891
  });
5892
+ }
5893
+
5894
+ var css_248z$1 = ".NpcTooltip_toggleBarContainer {\n display: flex; }\n\n.NpcTooltip_toggleButton {\n border: none;\n padding: 0.33rem;\n margin: 0 0.1rem;\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 .NpcTooltip_toggleButton:hover {\n background-color: rgba(255, 255, 255, 0.2);\n opacity: 1; }\n .NpcTooltip_toggleButton-active {\n background-color: rgba(255, 255, 255, 0.3) !important;\n color: #fff;\n opacity: 1; }\n .NpcTooltip_toggleButton img {\n width: 32px;\n height: 32px; }\n\n.NpcTooltip_storeEntry {\n display: flex;\n align-items: stretch;\n background-color: rgba(233, 233, 233, 0.1);\n padding: 0.33rem;\n font-size: 14px; }\n .NpcTooltip_storeEntry:not(:last-child) {\n margin-bottom: 0.2rem; }\n\n.NpcTooltip_storeEntryItemNameLimit {\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center; }\n\n.NpcTooltip_storeEntryItemLimit {\n font-size: 12px; }\n\n.NpcTooltip_storeEntryItemName {\n flex: 1;\n display: flex;\n align-items: center; }\n\n.NpcTooltip_storeEntryItemIconName {\n display: flex;\n align-items: center; }\n .NpcTooltip_storeEntryItemIconName img {\n width: 48px;\n height: 48px;\n margin-right: 0.33rem; }\n\n.NpcTooltip_itemBuyPriceEntriesContainer {\n display: flex;\n flex-direction: column;\n flex: 1;\n align-items: flex-end;\n justify-content: center;\n padding-left: 2rem; }\n\n.NpcTooltip_itemBuyPriceEntries {\n display: flex; }\n .NpcTooltip_itemBuyPriceEntries-moneyMargin {\n margin-bottom: 0.2rem; }\n\n.NpcTooltip_itemBuyPriceEntry:not(:first-child) {\n margin-left: 0.33rem; }\n\n.NpcTooltip_itemBuyPriceEntryContainer {\n position: relative;\n height: 32px; }\n .NpcTooltip_itemBuyPriceEntryContainer img {\n width: 32px;\n height: 32px; }\n .NpcTooltip_itemBuyPriceEntryContainer-shadow {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n box-shadow: inset 0 0 2px 0px #000000; }\n\n.NpcTooltip_itemBuyPriceEntryCount {\n position: absolute;\n bottom: 0;\n left: 0;\n color: #ffffff;\n background-color: rgba(0, 0, 0, 0.4);\n width: 32px;\n line-height: 12px;\n text-align: center; }\n\n.NpcTooltip_moneyContainer {\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n .NpcTooltip_moneyContainer > span {\n display: flex;\n align-items: center; }\n .NpcTooltip_moneyContainer > span:not(:first-child) {\n margin-left: 0.1rem; }\n .NpcTooltip_moneyContainer > span > img {\n width: 16px;\n height: 16px; }\n";
5895
+ styleInject(css_248z$1);
5896
+
5897
+ function StoreToggle(_a) {
5898
+ var store = _a.store, isActive = _a.isActive, setActive = _a.setActive;
5899
+ return (React.createElement("button", { className: "NpcTooltip_toggleButton " +
5900
+ (isActive ? "NpcTooltip_toggleButton-active" : ""), onClick: setActive }, store.Icon != null && store.Icon != "" ? (React.createElement("img", { src: store.Icon, alt: store.Name })) : (React.createElement("span", null, store.Name))));
5901
+ }
5902
+
5903
+ function StoreToggleBar(_a) {
5904
+ var stores = _a.stores, activeTab = _a.activeTab, setActiveTab = _a.setActiveTab;
5905
+ return (React.createElement("div", { className: "NpcTooltip_toggleBarContainer" }, stores.map(function (store, i) { return (React.createElement(StoreToggle, { key: i, store: store, isActive: activeTab === i, setActive: function () { return setActiveTab(i); } })); })));
5906
+ }
5907
+
5908
+ var ServerRegion;
5909
+ (function (ServerRegion) {
5910
+ ServerRegion["EUNA"] = "EUNA";
5911
+ ServerRegion["Korea"] = "Korea";
5912
+ ServerRegion["KoreaTest"] = "KoreaTest";
5913
+ })(ServerRegion || (ServerRegion = {}));
5914
+ var TooltipType;
5915
+ (function (TooltipType) {
5916
+ TooltipType[TooltipType["Item"] = 0] = "Item";
5917
+ TooltipType[TooltipType["Skill"] = 1] = "Skill";
5918
+ TooltipType[TooltipType["Npc"] = 2] = "Npc";
5919
+ })(TooltipType || (TooltipType = {}));
5920
+ var TooltipSettingsBase = /** @class */ (function () {
5921
+ function TooltipSettingsBase(offline) {
5922
+ if (offline === void 0) { offline = false; }
5923
+ this.debug = false;
5924
+ this.fullHeight = false;
5925
+ this.offline = offline;
5926
+ }
5927
+ return TooltipSettingsBase;
5928
+ }());
5929
+ var TooltipWithNetworkSettings = /** @class */ (function (_super) {
5930
+ __extends(TooltipWithNetworkSettings, _super);
5931
+ function TooltipWithNetworkSettings(region, client, offline) {
5932
+ if (offline === void 0) { offline = false; }
5933
+ var _this = this;
5934
+ var l_offline = offline;
5935
+ if (region == null)
5936
+ l_offline = true;
5937
+ _this = _super.call(this, l_offline) || this;
5938
+ _this.region = region;
5939
+ _this.client = client;
5940
+ return _this;
5941
+ }
5942
+ return TooltipWithNetworkSettings;
5943
+ }(TooltipSettingsBase));
5944
+
5945
+ var ItemTooltipSettings = /** @class */ (function (_super) {
5946
+ __extends(ItemTooltipSettings, _super);
5947
+ function ItemTooltipSettings(data, region, client, offline) {
5948
+ var _this = _super.call(this, region, client, offline) || this;
5949
+ _this.data = data;
5950
+ _this.type = TooltipType.Item;
5951
+ return _this;
5952
+ }
5953
+ return ItemTooltipSettings;
5954
+ }(TooltipWithNetworkSettings));
5955
+
5956
+ var BuyLimitReset;
5957
+ (function (BuyLimitReset) {
5958
+ BuyLimitReset[BuyLimitReset["Day"] = 0] = "Day";
5959
+ BuyLimitReset[BuyLimitReset["Week"] = 1] = "Week";
5960
+ BuyLimitReset[BuyLimitReset["Month"] = 2] = "Month";
5961
+ BuyLimitReset[BuyLimitReset["Absolute"] = 3] = "Absolute";
5962
+ })(BuyLimitReset || (BuyLimitReset = {}));
5963
+ var BuyLimitType;
5964
+ (function (BuyLimitType) {
5965
+ BuyLimitType[BuyLimitType["Character"] = 0] = "Character";
5966
+ BuyLimitType[BuyLimitType["Account"] = 1] = "Account";
5967
+ })(BuyLimitType || (BuyLimitType = {}));
5968
+
5969
+ function ItemBuyLimit(_a) {
5970
+ var limit = _a.limit;
5971
+ if (limit == null)
5972
+ return null;
5973
+ return (React.createElement("div", { className: "NpcTooltip_storeEntryItemLimit" }, GetStringForBuyLimitType(limit.LimitType) +
5974
+ "Limit: " +
5975
+ limit.Amount +
5976
+ "/" +
5977
+ GetStringForBuyLimitReset(limit.LimitReset)));
5901
5978
  }
5902
- function AddDescriptions(subInfoGroups, item) {
5903
- if (item.descriptions == null || item.descriptions.length == 0)
5904
- return;
5905
- item.descriptions
5906
- .filter(function (x) { return x.text != null && x.text != ""; })
5907
- .forEach(function (description) {
5908
- subInfoGroups.push({
5909
- title: description.title,
5910
- texts: [React.createElement(ItemDescriptionText, { htmlString: description.text })],
5911
- });
5912
- });
5979
+ function GetStringForBuyLimitType(type) {
5980
+ switch (type) {
5981
+ case BuyLimitType.Account:
5982
+ return "Account ";
5983
+ case BuyLimitType.Character:
5984
+ return "Character ";
5985
+ default:
5986
+ return "";
5987
+ }
5913
5988
  }
5914
- function AddFlavorText(subInfoGroups, item) {
5915
- if (item.flavorText == null || item.flavorText == "")
5916
- return;
5917
- subInfoGroups.push({
5918
- title: "",
5919
- texts: [React.createElement(ItemDescriptionText, { htmlString: item.flavorText })],
5920
- });
5989
+ function GetStringForBuyLimitReset(reset) {
5990
+ switch (reset) {
5991
+ case BuyLimitReset.Day:
5992
+ return "Day";
5993
+ case BuyLimitReset.Week:
5994
+ return "Week ";
5995
+ case BuyLimitReset.Month:
5996
+ return "Month";
5997
+ default:
5998
+ return "";
5999
+ }
6000
+ }
6001
+
6002
+ function Money(_a) {
6003
+ var money = _a.money;
6004
+ var bnsmoney = getMoneyObj(money);
6005
+ if (bnsmoney == null)
6006
+ return null;
6007
+ return (React.createElement("div", { className: "NpcTooltip_moneyContainer" },
6008
+ bnsmoney.Gold > 0 ? (React.createElement("span", null,
6009
+ bnsmoney.Gold,
6010
+ React.createElement("img", { src: BuildIconPath("gold"), alt: "" }))) : null,
6011
+ bnsmoney.Silver > 0 ? (React.createElement("span", null,
6012
+ bnsmoney.Silver,
6013
+ React.createElement("img", { src: BuildIconPath("silver"), alt: "" }))) : null,
6014
+ bnsmoney.Copper > 0 ? (React.createElement("span", null,
6015
+ bnsmoney.Copper,
6016
+ React.createElement("img", { src: BuildIconPath("copper"), alt: "" }))) : null));
6017
+ }
6018
+
6019
+ function StoreItemBuyPriceEntry(_a) {
6020
+ var _this = this;
6021
+ var itemRef = _a.itemRef, client = _a.client;
6022
+ var _b = useState(), item = _b[0], setItem = _b[1];
6023
+ useEffect(function () {
6024
+ if (client == null)
6025
+ return;
6026
+ (function () { return __awaiter(_this, void 0, void 0, function () {
6027
+ var _a;
6028
+ return __generator(this, function (_b) {
6029
+ switch (_b.label) {
6030
+ case 0:
6031
+ _a = setItem;
6032
+ return [4 /*yield*/, client.GetItem(itemRef.itemId, itemRef.itemLevel)];
6033
+ case 1:
6034
+ _a.apply(void 0, [_b.sent()]);
6035
+ return [2 /*return*/];
6036
+ }
6037
+ });
6038
+ }); })();
6039
+ }, [itemRef, client]);
6040
+ var tooltipItemSettings = new ItemTooltipSettings(item, client.region, client);
6041
+ var wrapperSettings = new TooltipWrapperSettings(undefined, undefined, undefined, "click", undefined);
6042
+ return (React.createElement("div", { className: "NpcTooltip_itemBuyPriceEntry" }, item ? (React.createElement(TooltipWrapper, { settings: wrapperSettings, tooltipSettings: tooltipItemSettings },
6043
+ React.createElement("div", { className: "NpcTooltip_itemBuyPriceEntryContainer" },
6044
+ React.createElement("div", { className: "NpcTooltip_itemBuyPriceEntryContainer-shadow" }),
6045
+ React.createElement("img", { className: "TooltipBase_iconbg-grade-" + item.grade, src: BuildIconPath(item.icon.iconPath), alt: "" }),
6046
+ React.createElement("div", { className: "NpcTooltip_itemBuyPriceEntryCount" },
6047
+ React.createElement("span", null, itemRef.min))))) : null));
6048
+ }
6049
+
6050
+ function NpcStoreEntry(_a) {
6051
+ var _this = this;
6052
+ var _b, _c;
6053
+ var data = _a.data, client = _a.client;
6054
+ var _d = useState(), item = _d[0], setItem = _d[1];
6055
+ useEffect(function () {
6056
+ if (client == null)
6057
+ return;
6058
+ (function () { return __awaiter(_this, void 0, void 0, function () {
6059
+ var res;
6060
+ return __generator(this, function (_a) {
6061
+ switch (_a.label) {
6062
+ case 0: return [4 /*yield*/, client.GetItem(data.Item.itemId, data.Item.itemLevel)];
6063
+ case 1:
6064
+ res = _a.sent();
6065
+ setItem(res);
6066
+ return [2 /*return*/];
6067
+ }
6068
+ });
6069
+ }); })();
6070
+ }, [data, client]);
6071
+ if (item != undefined) {
6072
+ var tooltipItemSettings = new ItemTooltipSettings(item, client.region, client);
6073
+ var wrapperSettings = new TooltipWrapperSettings(undefined, undefined, undefined, "click", undefined);
6074
+ return (React.createElement("div", { className: "NpcTooltip_storeEntry" },
6075
+ React.createElement("div", { className: "NpcTooltip_storeEntryItemIconName" },
6076
+ React.createElement(TooltipWrapper, { settings: wrapperSettings, tooltipSettings: tooltipItemSettings },
6077
+ React.createElement("img", { className: "TooltipBase_iconbg-grade-" + item.grade, src: BuildIconPath(item.icon.iconPath), alt: "" })),
6078
+ React.createElement("div", { className: "NpcTooltip_storeEntryItemNameLimit" },
6079
+ React.createElement("div", { className: "NpcTooltip_storeEntryItemName TooltipBase_grade-" + item.grade, dangerouslySetInnerHTML: { __html: item.name } }),
6080
+ React.createElement(ItemBuyLimit, { limit: data.Limit }))),
6081
+ React.createElement("div", { className: "NpcTooltip_itemBuyPriceEntriesContainer" },
6082
+ ((_b = data.BuyPrice.Items) === null || _b === void 0 ? void 0 : _b.length) > 0 ? (React.createElement("div", { className: "NpcTooltip_itemBuyPriceEntries " +
6083
+ (data.BuyPrice.Money > 0
6084
+ ? "NpcTooltip_itemBuyPriceEntries-moneyMargin"
6085
+ : "") }, (_c = data.BuyPrice.Items) === null || _c === void 0 ? void 0 : _c.map(function (itemCountRef, i) { return (React.createElement(StoreItemBuyPriceEntry, { itemRef: itemCountRef, client: client, key: i })); }))) : null,
6086
+ React.createElement(Money, { money: data.BuyPrice.Money }))));
6087
+ }
6088
+ else {
6089
+ return null;
6090
+ }
6091
+ }
6092
+
6093
+ function NpcStores(_a) {
6094
+ var stores = _a.stores, activeTab = _a.activeTab, client = _a.client;
6095
+ var activeStore = stores[activeTab];
6096
+ return (React.createElement("div", null, activeStore.Entries.map(function (entry, i) { return (React.createElement(NpcStoreEntry, { key: i, data: entry, client: client })); })));
6097
+ }
6098
+
6099
+ function NpcTooltip(_a) {
6100
+ var _this = this;
6101
+ var _b, _c;
6102
+ var settings = _a.settings;
6103
+ var npc = settings.npc;
6104
+ var _d = useState(0), activeTab = _d[0], setActiveTab = _d[1];
6105
+ var _e = useState(), client = _e[0], setClient = _e[1];
6106
+ useEffect(function () {
6107
+ if (!settings.offline) {
6108
+ if (settings.client == undefined) {
6109
+ (function () { return __awaiter(_this, void 0, void 0, function () {
6110
+ return __generator(this, function (_a) {
6111
+ setClient(new ItemDownloadClient(settings.region));
6112
+ return [2 /*return*/];
6113
+ });
6114
+ }); })();
6115
+ }
6116
+ else {
6117
+ setClient(settings.client);
6118
+ }
6119
+ }
6120
+ }, [settings.offline]);
6121
+ var tooltipBaseProps = {
6122
+ title: npc.Name,
6123
+ grade: (_b = settings.grade) !== null && _b !== void 0 ? _b : 4,
6124
+ id: npc.Alias,
6125
+ subtitle: (_c = npc.Title) !== null && _c !== void 0 ? _c : "",
6126
+ fullHeight: settings.fullHeight,
6127
+ subInfoGroups: [],
6128
+ };
6129
+ //no top part
6130
+ AddStoreToggles(tooltipBaseProps.subInfoGroups, activeTab, setActiveTab, npc.Stores);
6131
+ AddStores(tooltipBaseProps.subInfoGroups, activeTab, client, npc.Stores);
6132
+ return React.createElement(TooltipBase, __assign({}, tooltipBaseProps));
5921
6133
  }
5922
- function AddItemUsableGroup(subInfoGroups, item) {
5923
- if (IsNullOrEmpty(item.usableGroup))
6134
+ function AddStoreToggles(subInfoGroups, activeTab, setActiveTab, Stores) {
6135
+ if (Stores == null || Stores.length <= 0)
5924
6136
  return;
5925
6137
  subInfoGroups.push({
5926
6138
  title: "",
5927
- texts: [React.createElement(RawText, { htmlString: item.usableGroup })],
6139
+ texts: [
6140
+ React.createElement(StoreToggleBar, { stores: Stores, activeTab: activeTab, setActiveTab: setActiveTab }),
6141
+ ],
5928
6142
  });
5929
6143
  }
5930
- function AddRequiredLevel(subInfoGroups, item) {
5931
- if (item.levelRequired == null || item.levelRequired <= 1)
6144
+ function AddStores(subInfoGroups, activeTab, client, Stores) {
6145
+ if (Stores == null || Stores.length <= 0)
5932
6146
  return;
5933
6147
  subInfoGroups.push({
5934
6148
  title: "",
5935
6149
  texts: [
5936
- React.createElement(TextWithNumber, { text: "Requires Level ", number: item.levelRequired }),
5937
- ],
5938
- });
5939
- }
5940
- function AddRequiredJobs(subInfoGroups, item) {
5941
- if (item.classRequired == null || item.classRequired.length == 0)
5942
- return;
5943
- var enJobNames = item.classRequired.map(function (x) { return x.enName; });
5944
- subInfoGroups.push({
5945
- title: "",
5946
- texts: [
5947
- React.createElement(StringEnumerationWithText, { enumeration: enJobNames, textAfter: " Only", textBefore: "" }),
5948
- ],
5949
- });
5950
- }
5951
- function AddBoundToAccount(subInfoGroups, item) {
5952
- if (item.boundToAccount == null || item.boundToAccount == false)
5953
- return;
5954
- subInfoGroups.push({
5955
- title: "",
5956
- texts: [React.createElement("div", null, "Bound to Account")],
5957
- });
5958
- }
5959
- function AddAbleToTrade(subInfoGroups, item) {
5960
- if (item.unableToTrade == null || item.unableToTrade == false)
5961
- return;
5962
- subInfoGroups.push({
5963
- title: "",
5964
- texts: [React.createElement("div", null, "Unable to Trade")],
5965
- });
5966
- }
5967
- function AddSealingResult(subInfoGroups, item, client, region) {
5968
- if (item.sealing == null ||
5969
- item.sealing.sealAcquireItemId == null ||
5970
- item.sealing.sealConsumeItems.filter(function (x) { return x.min != 0; }).length == 0)
5971
- return;
5972
- subInfoGroups.push({
5973
- title: "Can be resealed with:",
5974
- texts: [React.createElement(SealingResult, { region: region, item: item, client: client })],
5975
- });
5976
- }
5977
- function AddAccountTransferResult(subInfoGroups, item, client, region) {
5978
- if (item.accountTransfer == null ||
5979
- item.accountTransfer.requiredItems == null ||
5980
- item.accountTransfer.requiredItems.length == 0)
5981
- return;
5982
- subInfoGroups.push({
5983
- title: "Can be transferred with:",
5984
- texts: [React.createElement(AccountTransfer, { region: region, item: item, client: client })],
5985
- });
5986
- }
5987
- function AddUnityPoints(subInfoGroups, item) {
5988
- if (item.setPoints == null || item.refinementPoints == null)
5989
- return;
5990
- if (item.setPoints === 0)
5991
- return;
5992
- if (item.refinementPoints === 0)
5993
- return;
5994
- subInfoGroups.push({
5995
- title: "",
5996
- texts: [
5997
- React.createElement("span", null,
5998
- "Splendor Stone Set Points: ",
5999
- item.setPoints),
6000
- React.createElement("span", null,
6001
- "Splendor Stone Refinement Points: ",
6002
- item.refinementPoints),
6150
+ React.createElement(NpcStores, { stores: Stores, activeTab: activeTab, client: client }),
6003
6151
  ],
6004
6152
  });
6005
6153
  }
6006
6154
 
6007
- var css_248z$3 = "";
6008
- styleInject(css_248z$3);
6009
-
6010
- function JsonTooltip(props) {
6011
- var tooltipProps = {
6012
- title: props.title,
6013
- grade: props.grade,
6014
- icon: props.icon,
6015
- mainInfos: JsonArrayToJsxArray(props.mainInfos),
6016
- subtitle: props.subtitle,
6017
- subInfoGroups: JsonSubInfoToJsxSubInfo(props.subInfoGroups),
6018
- };
6019
- return React.createElement(TooltipBase, __assign({}, tooltipProps));
6020
- }
6021
- function JsonSubInfoToJsxSubInfo(subInfoGroups) {
6022
- if (subInfoGroups == undefined)
6023
- return undefined;
6024
- var result = [];
6025
- subInfoGroups.forEach(function (subInfoGroup) {
6026
- var jsxSubInfoGroup = {
6027
- title: subInfoGroup.title,
6028
- texts: JsonArrayToJsxArray(subInfoGroup.texts),
6029
- };
6030
- result.push(jsxSubInfoGroup);
6031
- });
6032
- return result;
6033
- }
6034
- function JsonArrayToJsxArray(stringArray) {
6035
- if (stringArray == undefined)
6036
- return undefined;
6037
- var jsxArray = [];
6038
- stringArray.forEach(function (mainInfo) {
6039
- jsxArray.push(React.createElement("span", { dangerouslySetInnerHTML: { __html: mainInfo } }));
6040
- });
6041
- return jsxArray;
6155
+ function TooltipWrapper(_a) {
6156
+ var settings = _a.settings, tooltipSettings = _a.tooltipSettings, children = _a.children, jobstyleOverride = _a.jobstyleOverride;
6157
+ if (settings == undefined) {
6158
+ settings = new TooltipWrapperSettings();
6159
+ }
6160
+ if (settings == null || tooltipSettings == null)
6161
+ return null;
6162
+ var spanRef = useRef(null);
6163
+ var _b = useState(null), childRef = _b[0], setChildRef = _b[1];
6164
+ /**
6165
+ * Mount the temporary span element.
6166
+ * retrieve and store the target element's reference.
6167
+ */
6168
+ useEffect(function () {
6169
+ if (spanRef.current) {
6170
+ setChildRef(spanRef.current.previousElementSibling);
6171
+ }
6172
+ return function () { return setChildRef(null); };
6173
+ }, []);
6174
+ var _c = useState(true), isOffline = _c[0], setIsOffline = _c[1];
6175
+ var _d = useState(4), grade = _d[0], setGrade = _d[1];
6176
+ var _e = useState(null), content = _e[0], setContent = _e[1];
6177
+ useEffect(function () {
6178
+ var _a;
6179
+ if (tooltipSettings.type == TooltipType.Item) {
6180
+ setContent(React.createElement(ItemTooltip, { jobstyleOverride: jobstyleOverride, settings: tooltipSettings }));
6181
+ setGrade(tooltipSettings.data.grade);
6182
+ }
6183
+ else if (tooltipSettings.type == TooltipType.Skill) {
6184
+ setContent(React.createElement(SkillTooltip, { settings: tooltipSettings }));
6185
+ setGrade(4);
6186
+ }
6187
+ else if (tooltipSettings.type == TooltipType.Npc) {
6188
+ setContent(React.createElement(NpcTooltip, { settings: tooltipSettings }));
6189
+ setGrade((_a = tooltipSettings.grade) !== null && _a !== void 0 ? _a : 4);
6190
+ }
6191
+ }, [tooltipSettings]);
6192
+ useEffect(function () {
6193
+ if (content != null)
6194
+ setContent(function (prev) {
6195
+ var newSettings = JSON.parse(JSON.stringify(tooltipSettings));
6196
+ newSettings.offline = isOffline;
6197
+ return React.cloneElement(prev, { tooltipSettings: newSettings });
6198
+ });
6199
+ }, [isOffline]);
6200
+ return (React.createElement(React.Fragment, null,
6201
+ children,
6202
+ childRef && content ? (React.createElement(Tippy, { arrow: settings.showArrow, trigger: settings.trigger, plugins: [followCursor], followCursor: settings.followCursor && !settings.interactive, appendTo: document.body, onMount: function () { return setIsOffline(tooltipSettings.offline); }, placement: settings.placement, animation: "fade", interactive: settings.interactive, content: content, theme: "grade" + grade, reference: childRef })) : (React.createElement("span", { "data-testid": "TooltipWrapper", ref: spanRef, style: { display: "none" } }))));
6042
6203
  }
6043
6204
 
6044
- var css_248z$2 = ".SkillTooltip_skillIconContainer {\n width: 60px;\n height: 60px;\n padding: 0;\n float: left;\n position: relative; }\n\n.SkillTooltip_skillIcon {\n width: 60px;\n height: 60px; }\n\n.SkillTooltip_buttonIcon {\n position: absolute;\n right: 1px;\n bottom: 1px;\n height: 18px;\n opacity: 0.9; }\n\n.SkillTooltip_buttonIconMouse {\n background-color: rgba(0, 0, 0, 0.8); }\n\n.SkillTooltip_mainText {\n font-weight: 500; }\n\n.SkillTooltip_smallText {\n font-size: 12px; }\n\n.SkillTooltip_subTextMargin {\n margin-bottom: 0.3rem; }\n\n.SkillTooltip_boundaryContainer {\n display: flex;\n width: 100%;\n margin-bottom: 0.5rem;\n line-height: 17px; }\n\n.SkillTooltip_boundary {\n flex: 1;\n flex-basis: 0px;\n min-width: 0;\n display: flex;\n flex-direction: column;\n color: black;\n margin: 0.15rem; }\n\n.SkillTooltip_boundary:first-of-type > .SkillTooltip_boundaryHead {\n border-radius: 3px 0 0 0; }\n\n.SkillTooltip_boundary:last-of-type > .SkillTooltip_boundaryHead {\n border-radius: 0 3px 0 0; }\n\n.SkillTooltip_boundary:first-of-type > .SkillTooltip_boundaryBody {\n border-radius: 0 0 0 3px; }\n\n.SkillTooltip_boundary:last-of-type > .SkillTooltip_boundaryBody {\n border-radius: 0 0 3px 0; }\n\n.SkillTooltip_boundaryHead {\n color: white;\n font-weight: 500;\n font-size: 12px;\n text-overflow: ellipsis;\n overflow: hidden;\n padding: 0.3rem;\n text-align: center;\n flex: 1;\n min-height: 26px;\n background-color: rgba(127, 127, 127, 0.4); }\n\n.SkillTooltip_boundaryBody {\n color: white;\n padding: 0.5rem 0.3rem;\n margin-top: 0.15rem;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 40px;\n flex: 2;\n background-color: rgba(127, 127, 127, 0.4); }\n\n.SkillTooltip_boundaryBodyModifier {\n min-height: 33px !important; }\n\n.SkillTooltip_boundaryHasIcon {\n min-height: 50px !important; }\n\n.SkillTooltip_conditionRow {\n display: flex;\n align-items: center;\n font-size: 12px; }\n\n.SkillTooltip_conditionRow:not(:last-of-type) {\n margin-bottom: 0.1rem; }\n\n.SkillTooltip_conditionIcon {\n width: 20px;\n height: 20px;\n margin-right: 0.33rem; }\n\n.SkillTooltip_conditionIconSmall {\n width: 12px;\n height: 12px;\n margin-right: 0.22rem; }\n\n.tooltipArg {\n color: #46bee1;\n font-weight: 600; }\n\n.target-360 {\n background-image: url(\"./360.png\");\n background-repeat: no-repeat;\n background-position: 50% 60%;\n background-size: auto 64px; }\n\n.target-front-180 {\n background-image: url(\"./180.png\");\n background-repeat: no-repeat;\n background-position: 50% 70%;\n background-size: auto 64px; }\n\n.laser {\n background-image: url(\"./laser.png\");\n background-repeat: no-repeat;\n background-position: 50% 50%;\n background-size: auto 64px; }\n";
6045
- styleInject(css_248z$2);
6205
+ function ItemIconNameDiv(_a) {
6206
+ var _this = this;
6207
+ var _b;
6208
+ var item = _a.item, region = _a.region, client = _a.client, _c = _a.showRandomIcon, showRandomIcon = _c === void 0 ? false : _c;
6209
+ var _d = useState(), itemData = _d[0], setItemData = _d[1];
6210
+ useEffect(function () {
6211
+ if (client)
6212
+ (function () { return __awaiter(_this, void 0, void 0, function () {
6213
+ var _a;
6214
+ return __generator(this, function (_b) {
6215
+ switch (_b.label) {
6216
+ case 0:
6217
+ _a = setItemData;
6218
+ return [4 /*yield*/, client.GetItem(item.itemId, item.itemLevel)];
6219
+ case 1:
6220
+ _a.apply(void 0, [_b.sent()]);
6221
+ return [2 /*return*/];
6222
+ }
6223
+ });
6224
+ }); })();
6225
+ }, [item, client]);
6226
+ if (itemData) {
6227
+ if (itemData.grade != 0) {
6228
+ var itemSettings = new ItemTooltipSettings(itemData);
6229
+ itemSettings.client = client;
6230
+ itemSettings.region = region;
6231
+ return (React.createElement("div", { className: "ItemTooltip_itemiconnamediv" },
6232
+ React.createElement(TooltipWrapper, { settings: new TooltipWrapperSettings(), tooltipSettings: itemSettings },
6233
+ React.createElement("img", { className: "ItemTooltip_itemIconSmall", alt: "", src: BuildIconPath((_b = itemData.icon) === null || _b === void 0 ? void 0 : _b.iconPath) })),
6234
+ React.createElement("div", { className: "ItemTooltip_itemNameRandomDiv" },
6235
+ React.createElement("span", { className: "TooltipBase_grade-" + itemData.grade, dangerouslySetInnerHTML: { __html: itemData.name } }),
6236
+ showRandomIcon ? (React.createElement(React.Fragment, null,
6237
+ "\u00A0",
6238
+ React.createElement("div", null,
6239
+ React.createElement("img", { style: {
6240
+ width: 36,
6241
+ height: 18,
6242
+ margin: "0 1px",
6243
+ top: 4,
6244
+ position: "relative",
6245
+ }, alt: "", src: "https://lean.bns.tools/bns/icons/00015590/Tag_Random.png" })))) : null)));
6246
+ }
6247
+ else
6248
+ return null;
6249
+ }
6250
+ else {
6251
+ return (React.createElement("div", { className: "ItemTooltip_itemIconLoading" },
6252
+ React.createElement("div", { className: "dot-elastic" })));
6253
+ }
6254
+ }
6046
6255
 
6047
- function getButtonIconPath(button) {
6048
- var _a;
6049
- if (buttonIconMapping.find(function (x) { return x.button === button; }) == null)
6256
+ function DecomposeResults(props) {
6257
+ if (props.client)
6258
+ return (React.createElement("div", null, props.items
6259
+ .filter(function (x) { return x != null; })
6260
+ .map(function (item, i) {
6261
+ return (React.createElement("div", { className: "TooltipBase_flex", key: item.itemId + "-" + item.itemLevel + "_" + i },
6262
+ React.createElement(ItemIconNameDiv, { region: props.region, item: item, client: props.client, showRandomIcon: item.isRandom }),
6263
+ item.isRandom ? null : (React.createElement(React.Fragment, null,
6264
+ "\u00A0",
6265
+ item.isMinMax ? (React.createElement("span", null, GetRangeString(item.min, item.max))) : (React.createElement("span", null, GetRangeString(item.min)))))));
6266
+ })));
6267
+ else
6050
6268
  return null;
6051
- return ("/00072858" + ((_a = buttonIconMapping.find(function (x) { return x.button === button; })) === null || _a === void 0 ? void 0 : _a.path));
6052
- }
6053
- var buttonIconMapping = [
6054
- {
6055
- button: "F",
6056
- path: "/Key_Alphabet_F",
6057
- },
6058
- {
6059
- button: "Q",
6060
- path: "/Key_Alphabet_Q",
6061
- },
6062
- {
6063
- button: "E",
6064
- path: "/Key_Alphabet_E",
6065
- },
6066
- {
6067
- button: "S",
6068
- path: "/Key_Alphabet_S",
6069
- },
6070
- {
6071
- button: "Z",
6072
- path: "/Key_Alphabet_Z",
6073
- },
6074
- {
6075
- button: "X",
6076
- path: "/Key_Alphabet_X",
6077
- },
6078
- {
6079
- button: "C",
6080
- path: "/Key_Alphabet_C",
6081
- },
6082
- {
6083
- button: "V",
6084
- path: "/Key_Alphabet_V",
6085
- },
6086
- {
6087
- button: "W",
6088
- path: "/Key_Alphabet_W",
6089
- },
6090
- {
6091
- button: "G",
6092
- path: "/Key_Alphabet_G",
6093
- },
6094
- {
6095
- button: "B",
6096
- path: "/Key_Alphabet_B",
6097
- },
6098
- {
6099
- button: "SPACE",
6100
- path: "/Key_Space_Big",
6101
- },
6102
- {
6103
- button: "TAB",
6104
- path: "/Key_Tab_Big",
6105
- },
6106
- {
6107
- button: "1",
6108
- path: "/Key_Num_1",
6109
- },
6110
- {
6111
- button: "2",
6112
- path: "/Key_Num_2",
6113
- },
6114
- {
6115
- button: "3",
6116
- path: "/Key_Num_3",
6117
- },
6118
- {
6119
- button: "4",
6120
- path: "/Key_Num_4",
6121
- },
6122
- {
6123
- button: "LMB",
6124
- path: "/GameUI_Tag_MouseL",
6125
- },
6126
- {
6127
- button: "RMB",
6128
- path: "/GameUI_Tag_MouseR",
6129
- },
6130
- ];
6269
+ }
6131
6270
 
6132
- function SkillIconWithButton(_a) {
6133
- var skill = _a.skill;
6134
- return (React.createElement("div", { className: "SkillTooltip_skillIconContainer" },
6135
- React.createElement("img", { className: "SkillTooltip_skillIcon", src: BuildIconPath(skill.IconPath, skill.IconIndex - 1), alt: "" }),
6136
- getButtonIconPath(getNormalizedButton(skill)) ? (React.createElement("img", { className: "SkillTooltip_buttonIcon" +
6137
- " " +
6138
- (getNormalizedButton(skill) === "RMB" ||
6139
- getNormalizedButton(skill) === "LMB"
6140
- ? "SkillTooltip_buttonIconMouse"
6141
- : ""), src: BuildIconPath(getButtonIconPath(getNormalizedButton(skill))), alt: "" })) : null));
6271
+ function SetBonusToggle(_a) {
6272
+ var jobstyles = _a.jobstyles, jobstyle = _a.jobstyle, setJobstyle = _a.setJobstyle;
6273
+ return (React.createElement("div", { className: "ItemTooltip_jobstyleToggleContainer" }, jobstyles.map(function (style) { return (React.createElement("button", { key: style, className: "ItemTooltip_jobstyleButton" +
6274
+ (style === jobstyle ? " ItemTooltip_jobstyleButton-active" : ""), onClick: function (e) {
6275
+ e.stopPropagation();
6276
+ setJobstyle(style);
6277
+ } }, GetJobStyleNameString(style))); })));
6142
6278
  }
6143
6279
 
6144
- function SkillTooltipBoundary(_a) {
6145
- var head = _a.head, body = _a.body, _b = _a.bodyClass, bodyClass = _b === void 0 ? "" : _b, _c = _a.pvpModifier, pvpModifier = _c === void 0 ? false : _c, _d = _a.hasIcon, hasIcon = _d === void 0 ? false : _d;
6146
- return (React.createElement("div", { className: "SkillTooltip_boundary" },
6147
- React.createElement("div", { className: "SkillTooltip_boundaryHead" }, head),
6148
- React.createElement("div", { className: "SkillTooltip_boundaryBody " +
6149
- (pvpModifier ? "SkillTooltip_boundaryBodyModifier " : "") +
6150
- bodyClass +
6151
- (hasIcon ? " SkillTooltip_boundaryHasIcon " : "") }, body)));
6280
+ function ItemDescriptionText(_a) {
6281
+ var htmlString = _a.htmlString;
6282
+ var textSplit = htmlString.replace("<br/>", "<br />").split("<br />");
6283
+ return (React.createElement("div", { className: "ItemTooltip_descriptions TooltipBase_flex-col" }, textSplit.map(function (htmlText, i) { return (React.createElement("span", { key: i, dangerouslySetInnerHTML: {
6284
+ __html: ReplaceIconsInHtmlString(htmlText),
6285
+ } })); })));
6152
6286
  }
6153
6287
 
6154
- function SkillTooltipBoundaryContainer(_a) {
6155
- var children = _a.children;
6156
- return React.createElement("div", { className: "SkillTooltip_boundaryContainer" }, children);
6288
+ function RawText(_a) {
6289
+ var htmlString = _a.htmlString;
6290
+ return (React.createElement("div", { className: "ItemTooltip_raw", dangerouslySetInnerHTML: { __html: htmlString } }));
6157
6291
  }
6158
6292
 
6159
- function PvpModifiers(_a) {
6160
- var skill = _a.skill;
6161
- return (React.createElement(SkillTooltipBoundaryContainer, null,
6162
- React.createElement(SkillTooltipBoundary, { head: React.createElement("span", null, "Equalized PvP"), body: React.createElement("span", null,
6163
- "x\u00A0",
6164
- React.createElement("span", { dangerouslySetInnerHTML: { __html: skill.EqualizedPvp } })), pvpModifier: true }),
6165
- React.createElement(SkillTooltipBoundary, { head: React.createElement("span", null, "PvP"), body: React.createElement("span", null,
6166
- "x\u00A0",
6167
- React.createElement("span", { dangerouslySetInnerHTML: { __html: skill.Pvp } })), pvpModifier: true })));
6293
+ function TextWithNumber(_a) {
6294
+ var text = _a.text, number = _a.number;
6295
+ return (React.createElement("div", null,
6296
+ text,
6297
+ number));
6168
6298
  }
6169
6299
 
6170
- function SkillBoundaries(_a) {
6171
- var skill = _a.skill;
6172
- var _b = React.useState(false), hasIcon = _b[0], setHasIcon = _b[1];
6173
- React.useEffect(function () {
6174
- setHasIcon(skill.Boundaries.Range.Shape != null && skill.Boundaries.Range.Shape != "");
6175
- }, [skill]);
6176
- return (React.createElement(SkillTooltipBoundaryContainer, null,
6177
- React.createElement(SkillTooltipBoundary, { head: React.createElement("span", { dangerouslySetInnerHTML: {
6178
- __html: skill.Boundaries.Distance.Name,
6179
- } }), body: React.createElement("span", { dangerouslySetInnerHTML: {
6180
- __html: skill.Boundaries.Distance.Value,
6181
- } }), hasIcon: hasIcon }),
6182
- React.createElement(SkillTooltipBoundary, { head: React.createElement("span", { dangerouslySetInnerHTML: {
6183
- __html: skill.Boundaries.Range.Name,
6184
- } }), body: React.createElement("span", { dangerouslySetInnerHTML: {
6185
- __html: skill.Boundaries.Range.Value,
6186
- } }), hasIcon: hasIcon, bodyClass: skill.Boundaries.Range.Shape }),
6187
- React.createElement(SkillTooltipBoundary, { head: React.createElement("span", { dangerouslySetInnerHTML: {
6188
- __html: skill.Boundaries.Cast.Name,
6189
- } }), body: React.createElement("span", { dangerouslySetInnerHTML: {
6190
- __html: skill.Boundaries.Cast.Value,
6191
- } }), hasIcon: hasIcon }),
6192
- React.createElement(SkillTooltipBoundary, { head: React.createElement("span", { dangerouslySetInnerHTML: {
6193
- __html: skill.Boundaries.Recycle.Name,
6194
- } }), body: React.createElement("span", { dangerouslySetInnerHTML: {
6195
- __html: skill.Boundaries.Recycle.Value,
6196
- } }), hasIcon: hasIcon })));
6300
+ function StringEnumerationWithText(_a) {
6301
+ var enumeration = _a.enumeration, textBefore = _a.textBefore, textAfter = _a.textAfter;
6302
+ return (React.createElement("div", null,
6303
+ textBefore,
6304
+ enumeration.map(function (item, i) { return (React.createElement("span", { key: i },
6305
+ item,
6306
+ i != enumeration.length - 1 ? ", " : null)); }),
6307
+ textAfter));
6197
6308
  }
6198
6309
 
6199
- function SkillConditions(_a) {
6200
- var tooltipItems = _a.tooltipItems;
6201
- return (React.createElement(React.Fragment, null, tooltipItems.map(function (sub, i) { return (React.createElement("div", { key: i, className: "SkillTooltip_conditionRow" },
6202
- sub.IconPath != null ? (React.createElement("img", { src: sub.IconIndex != null && sub.IconIndex > 0
6203
- ? BuildIconPath(sub.IconPath, sub.IconIndex - 1)
6204
- : BuildIconPath(sub.IconPath), alt: "", className: "SkillTooltip_conditionIcon" })) : null,
6205
- React.createElement("div", { key: i, dangerouslySetInnerHTML: { __html: sub.Text } }))); })));
6310
+ function SealingResult(_a) {
6311
+ var item = _a.item, client = _a.client, region = _a.region;
6312
+ return (React.createElement("div", null, item.sealing.sealConsumeItems
6313
+ .filter(function (x) { return x.min != 0; })
6314
+ .map(function (consumeItem, i) { return (React.createElement("div", { className: "TooltipBase_flex", key: consumeItem.itemId + "_" + i },
6315
+ React.createElement(ItemIconNameDiv, { region: region, item: consumeItem, client: client }),
6316
+ "\u00A0",
6317
+ GetRangeString(consumeItem.min))); })));
6206
6318
  }
6207
6319
 
6208
- function SkillTooltip(_a) {
6209
- var data = _a.data, _b = _a.debug, debug = _b === void 0 ? false : _b;
6210
- var skill = data;
6320
+ function AccountTransfer(_a) {
6321
+ var item = _a.item, client = _a.client, region = _a.region;
6322
+ return (React.createElement("div", null,
6323
+ item.accountTransfer.requiredItems.map(function (consumeItem, i) { return (React.createElement("div", { className: "TooltipBase_flex", key: consumeItem.itemId + "_" + i },
6324
+ React.createElement(ItemIconNameDiv, { region: region, client: client, item: consumeItem }),
6325
+ "\u00A0",
6326
+ GetRangeString(consumeItem.min))); }),
6327
+ item.accountTransfer.moneyCost != null &&
6328
+ item.accountTransfer.moneyCost > 0 ? (React.createElement("span", null,
6329
+ item.accountTransfer.moneyCost,
6330
+ "\u00A0copper")) : null));
6331
+ }
6332
+
6333
+ function ItemTooltip(_a) {
6334
+ var _this = this;
6335
+ var _b, _c, _d;
6336
+ var settings = _a.settings, jobstyleOverride = _a.jobstyleOverride;
6337
+ var _e = useState("advanced-1"), jobstyle = _e[0], setJobstyle = _e[1];
6338
+ var _f = useState(), client = _f[0], setClient = _f[1];
6339
+ useEffect(function () {
6340
+ if (settings.offline)
6341
+ return;
6342
+ if (settings.client == undefined) {
6343
+ (function () { return __awaiter(_this, void 0, void 0, function () {
6344
+ return __generator(this, function (_a) {
6345
+ setClient(new ItemDownloadClient(settings.region));
6346
+ return [2 /*return*/];
6347
+ });
6348
+ }); })();
6349
+ }
6350
+ else {
6351
+ setClient(settings.client);
6352
+ }
6353
+ }, [settings.offline]);
6354
+ useEffect(function () {
6355
+ if (jobstyleOverride != undefined) {
6356
+ setJobstyle(jobstyleOverride);
6357
+ }
6358
+ }, [jobstyleOverride]);
6359
+ var item = settings.data;
6360
+ var itemCategory = (_c = (_b = item.categories) === null || _b === void 0 ? void 0 : _b.sort(function (a, b) { return b.index - a.index; })[0].localizedName) !== null && _c !== void 0 ? _c : "";
6361
+ if (itemCategory == "none")
6362
+ itemCategory = "";
6211
6363
  var tooltipBaseProps = {
6212
- title: skill.Name,
6213
- id: skill.ID + "-" + skill.Variation,
6214
- grade: 4,
6215
- icon: skill.IconPath ? React.createElement(SkillIconWithButton, { skill: skill }) : "",
6216
- subtitle: skill.AdditionalInfo
6217
- ? "<div style=\"font-size: 12px;\">".concat(skill.AdditionalInfo, "</div>")
6218
- : "",
6364
+ title: item.name,
6365
+ grade: item.grade,
6366
+ id: item.id + "-" + item.level,
6367
+ icon: item.icon ? BuildIconPath(item.icon.iconPath) : "",
6368
+ subtitle: itemCategory,
6219
6369
  mainInfos: [],
6220
6370
  subInfoGroups: [],
6371
+ fullHeight: settings.fullHeight,
6221
6372
  };
6222
- if (skill.Tooltip != null) {
6223
- //topPart
6224
- AddMainText1s(tooltipBaseProps.mainInfos, skill);
6225
- AddMainText2s(tooltipBaseProps.mainInfos, skill);
6226
- //bottomPart
6227
- AddSubTexts(tooltipBaseProps.subInfoGroups, skill);
6228
- AddBreakValue(tooltipBaseProps.subInfoGroups, skill);
6229
- AddPvpModifiers(tooltipBaseProps.subInfoGroups, skill);
6230
- AddBoundaries(tooltipBaseProps.subInfoGroups, skill);
6231
- AddConditions(tooltipBaseProps.subInfoGroups, skill);
6232
- AddStances(tooltipBaseProps.subInfoGroups, skill);
6233
- if (debug) {
6234
- AddIds(tooltipBaseProps.subInfoGroups, skill);
6235
- }
6373
+ var setHasSkillModifiers = false;
6374
+ var jobstyles = [];
6375
+ var itemCombats = false;
6376
+ if (item.skills != null && item.skills.length > 0) {
6377
+ item.skills.forEach(function (itemSkill) {
6378
+ if (itemSkill.jobstyle != null) {
6379
+ setHasSkillModifiers = true;
6380
+ itemCombats = true;
6381
+ if (!jobstyles.includes(itemSkill.jobstyle)) {
6382
+ jobstyles.push(itemSkill.jobstyle);
6383
+ }
6384
+ }
6385
+ });
6386
+ }
6387
+ if (((_d = item.setBonus) === null || _d === void 0 ? void 0 : _d.setBonusStages) != null) {
6388
+ item.setBonus.setBonusStages.forEach(function (stage) {
6389
+ if (stage.skillModifiers != null && stage.skillModifiers.length > 0) {
6390
+ setHasSkillModifiers = true;
6391
+ stage.skillModifiers.forEach(function (modifier) {
6392
+ if (!jobstyles.includes(modifier.jobstyle)) {
6393
+ jobstyles.push(modifier.jobstyle);
6394
+ }
6395
+ });
6396
+ }
6397
+ });
6398
+ }
6399
+ //top part
6400
+ AddMainInfo(tooltipBaseProps.mainInfos, item);
6401
+ AddSubInfo(tooltipBaseProps.mainInfos, item);
6402
+ AddSkillTitles(tooltipBaseProps.mainInfos, item, itemCombats, jobstyle);
6403
+ AddCooldowns(tooltipBaseProps.mainInfos, item);
6404
+ AddItemStats(tooltipBaseProps.mainInfos, item);
6405
+ AddItemRandomStats(tooltipBaseProps.mainInfos, item);
6406
+ //bottom part
6407
+ AddGearScore(tooltipBaseProps.subInfoGroups, item, settings.debug);
6408
+ AddJobstyleToggles(setHasSkillModifiers, tooltipBaseProps.subInfoGroups, jobstyles, jobstyle, setJobstyle);
6409
+ AddTopText(tooltipBaseProps.subInfoGroups, item);
6410
+ AddSkillDescriptions(tooltipBaseProps.subInfoGroups, item, itemCombats, jobstyle);
6411
+ AddSkillModifiers(tooltipBaseProps.subInfoGroups, item, false, jobstyle);
6412
+ AddSetBonus(tooltipBaseProps.subInfoGroups, item, jobstyle);
6413
+ if (!settings.offline) {
6414
+ AddDecomposeResults(tooltipBaseProps.subInfoGroups, item, client, settings.region);
6415
+ }
6416
+ AddUnityPoints(tooltipBaseProps.subInfoGroups, item);
6417
+ AddDescriptions(tooltipBaseProps.subInfoGroups, item);
6418
+ AddFlavorText(tooltipBaseProps.subInfoGroups, item);
6419
+ AddItemUsableGroup(tooltipBaseProps.subInfoGroups, item);
6420
+ AddRequiredLevel(tooltipBaseProps.subInfoGroups, item);
6421
+ AddRequiredJobs(tooltipBaseProps.subInfoGroups, item);
6422
+ AddBoundToAccount(tooltipBaseProps.subInfoGroups, item);
6423
+ AddAbleToTrade(tooltipBaseProps.subInfoGroups, item);
6424
+ if (!settings.offline) {
6425
+ AddSealingResult(tooltipBaseProps.subInfoGroups, item, client, settings.region);
6426
+ AddAccountTransferResult(tooltipBaseProps.subInfoGroups, item, client, settings.region);
6236
6427
  }
6237
6428
  return React.createElement(TooltipBase, __assign({}, tooltipBaseProps));
6238
6429
  }
6239
- function AddMainText1s(mainInfos, skill) {
6240
- skill.Tooltip.Main1.forEach(function (main) {
6241
- mainInfos.push(React.createElement("div", { className: "SkillTooltip_mainText", dangerouslySetInnerHTML: { __html: main.Text } }));
6242
- });
6430
+ function AddMainInfo(mainInfos, item) {
6431
+ if (item.mainInfo != null)
6432
+ mainInfos.push(React.createElement(ItemMainInfo, __assign({}, item)));
6243
6433
  }
6244
- function AddMainText2s(mainInfos, skill) {
6245
- skill.Tooltip.Main2.forEach(function (main) {
6246
- mainInfos.push(React.createElement("div", { className: "SkillTooltip_smallText", dangerouslySetInnerHTML: { __html: main.Text } }));
6247
- });
6434
+ function AddSubInfo(mainInfos, item) {
6435
+ if (item.subInfo != null)
6436
+ mainInfos.push(React.createElement(ItemSubInfo, __assign({}, item)));
6248
6437
  }
6249
- function AddSubTexts(subInfoGroups, skill) {
6250
- var texts = [];
6251
- skill.Tooltip.Sub.forEach(function (sub, i) {
6252
- texts.push(React.createElement("div", { className: "SkillTooltip_subText" +
6253
- (i != skill.Tooltip.Sub.length - 1
6254
- ? " SkillTooltip_subTextMargin"
6255
- : "") },
6256
- sub.IconPath != null && sub.IconPath != "" ? (React.createElement("img", { src: sub.IconIndex != null && sub.IconIndex > 0
6257
- ? BuildIconPath(sub.IconPath, sub.IconIndex - 1)
6258
- : BuildIconPath(sub.IconPath), alt: "", className: "SkillTooltip_conditionIconSmall" })) : null,
6259
- React.createElement("span", { dangerouslySetInnerHTML: { __html: sub.Text } })));
6260
- });
6438
+ function AddSkillTitles(mainInfos, item, itemCombats, jobstyle) {
6439
+ var itemSkills = item.skills;
6440
+ if (itemSkills == null || itemSkills.length == 0)
6441
+ return;
6442
+ mainInfos.push(React.createElement(ItemSkillTitles, { item: item, itemCombats: itemCombats, jobstyle: jobstyle }));
6443
+ }
6444
+ function AddCooldowns(mainInfos, item) {
6445
+ if ((item.cooldownInMs == null || item.cooldownInMs == 0) &&
6446
+ (item.bgCooldownInMs == null || item.bgCooldownInMs == 0))
6447
+ return;
6448
+ mainInfos.push(React.createElement(ItemCooldowns, __assign({}, item)));
6449
+ }
6450
+ function AddItemStats(mainInfos, item) {
6451
+ if (item.stats == null || item.stats.length == 0)
6452
+ return;
6453
+ mainInfos.push(React.createElement(ItemStats, __assign({}, item)));
6454
+ }
6455
+ function AddItemRandomStats(mainInfos, item) {
6456
+ if (item.randomStats == null || item.randomStats.length === 0)
6457
+ return;
6458
+ mainInfos.push(React.createElement(ItemRandomStats, __assign({}, item)));
6459
+ }
6460
+ function AddGearScore(subInfoGroups, item, debugMode) {
6461
+ if (!debugMode)
6462
+ return;
6261
6463
  subInfoGroups.push({
6262
6464
  title: "",
6263
- texts: texts,
6465
+ texts: [React.createElement(GearScore, __assign({}, item))],
6264
6466
  });
6265
6467
  }
6266
- function AddBreakValue(subInfoGroups, skill) {
6267
- if (skill.BreakValue != null && skill.BreakValue !== "0") {
6268
- subInfoGroups.push({
6269
- title: "",
6270
- texts: [
6271
- React.createElement("div", null,
6272
- "Breaker value:\u00A0",
6273
- React.createElement("span", { className: "tooltipArg", dangerouslySetInnerHTML: { __html: skill.BreakValue } })),
6274
- ],
6275
- });
6276
- }
6277
- }
6278
- function AddPvpModifiers(subInfoGroups, skill) {
6279
- if (skill.Pvp == null || skill.EqualizedPvp == null)
6468
+ function AddTopText(subInfoGroups, item) {
6469
+ if (item.topText == null)
6280
6470
  return;
6281
6471
  subInfoGroups.push({
6282
6472
  title: "",
6283
- texts: [React.createElement(PvpModifiers, { skill: skill })],
6473
+ texts: [React.createElement(TopText, __assign({}, item))],
6284
6474
  });
6285
6475
  }
6286
- function AddBoundaries(subInfoGroups, skill) {
6287
- if (skill.Boundaries == null)
6476
+ function AddSkillDescriptions(subInfoGroups, item, itemCombats, jobstyle) {
6477
+ if (item.skills == null || item.skills.length == 0)
6288
6478
  return;
6289
6479
  subInfoGroups.push({
6290
6480
  title: "",
6291
- texts: [React.createElement(SkillBoundaries, { skill: skill })],
6481
+ texts: [
6482
+ React.createElement(ItemSkillDescriptions, { item: item, itemCombats: itemCombats, jobstyle: jobstyle }),
6483
+ ],
6292
6484
  });
6293
6485
  }
6294
- function AddConditions(subInfoGroups, skill) {
6295
- if (skill.Tooltip.Condition.length == 0)
6486
+ function AddSkillModifiers(subInfoGroups, item, isSetBonus, jobstyle) {
6487
+ if (item.skillModifierGroups == null || item.skillModifierGroups.length == 0)
6296
6488
  return;
6297
6489
  subInfoGroups.push({
6298
- title: "Terms of Use",
6299
- texts: [React.createElement(SkillConditions, { tooltipItems: skill.Tooltip.Condition })],
6490
+ title: "",
6491
+ texts: [
6492
+ React.createElement(SkillModifiers, { skillModifierGroups: item.skillModifierGroups, isSetBonus: isSetBonus, jobstyle: jobstyle }),
6493
+ ],
6300
6494
  });
6301
6495
  }
6302
- function AddStances(subInfoGroups, skill) {
6303
- if (skill.Tooltip.Stance.length == 0)
6496
+ function AddSetBonus(subInfoGroups, item, jobstyle) {
6497
+ if (item.setBonus == null)
6304
6498
  return;
6305
6499
  subInfoGroups.push({
6306
- title: "Switch Position",
6307
- texts: [React.createElement(SkillConditions, { tooltipItems: skill.Tooltip.Stance })],
6500
+ title: "Set Effect:",
6501
+ texts: [React.createElement(SetBonus, { item: item, jobstyle: jobstyle })],
6308
6502
  });
6309
6503
  }
6310
- function AddIds(subInfoGroups, skill) {
6504
+ function AddDecomposeResults(subInfoGroups, item, client, region) {
6505
+ if (item.decomposeRewards == null || item.decomposeRewards.length == 0)
6506
+ return;
6507
+ var fixedItems = []
6508
+ .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.fixedItems; })).filter(function (x) { return x != null; });
6509
+ var randomItems = []
6510
+ .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.randomItems; })).filter(function (x) { return x != null; });
6511
+ var selectItems = []
6512
+ .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.selectItems; })).filter(function (x) { return x != null; });
6513
+ if (fixedItems.length > 0)
6514
+ subInfoGroups.push({
6515
+ title: "Guaranteed/Salvage:",
6516
+ texts: [
6517
+ React.createElement(DecomposeResults, { region: region, items: fixedItems, client: client }),
6518
+ ],
6519
+ });
6520
+ if (randomItems.length > 0)
6521
+ subInfoGroups.push({
6522
+ title: "Random:",
6523
+ texts: [
6524
+ React.createElement(DecomposeResults, { region: region, items: randomItems, client: client }),
6525
+ ],
6526
+ });
6527
+ if (selectItems.length > 0)
6528
+ subInfoGroups.push({
6529
+ title: "Select:",
6530
+ texts: [
6531
+ React.createElement(DecomposeResults, { region: region, items: selectItems, client: client }),
6532
+ ],
6533
+ });
6534
+ }
6535
+ function AddJobstyleToggles(setHasSkillModifiers, subInfoGroups, jobstyles, jobstyle, setJobstyle) {
6536
+ if (!setHasSkillModifiers)
6537
+ return;
6311
6538
  subInfoGroups.push({
6312
- title: "Debug info",
6313
- texts: [React.createElement("div", null,
6314
- "ID: ",
6315
- skill.ID), React.createElement("div", null,
6316
- "Variation: ",
6317
- skill.Variation)],
6539
+ title: "",
6540
+ texts: [
6541
+ React.createElement(SetBonusToggle, { jobstyles: jobstyles, jobstyle: jobstyle, setJobstyle: setJobstyle }),
6542
+ ],
6543
+ });
6544
+ }
6545
+ function AddDescriptions(subInfoGroups, item) {
6546
+ if (item.descriptions == null || item.descriptions.length == 0)
6547
+ return;
6548
+ item.descriptions
6549
+ .filter(function (x) { return x.text != null && x.text != ""; })
6550
+ .forEach(function (description) {
6551
+ subInfoGroups.push({
6552
+ title: description.title,
6553
+ texts: [React.createElement(ItemDescriptionText, { htmlString: description.text })],
6554
+ });
6318
6555
  });
6319
- }
6320
-
6321
- var css_248z$1 = ".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";
6322
- styleInject(css_248z$1);
6323
-
6324
- var SkillTooltipWrapper = function (_a) {
6325
- var data = _a.data, children = _a.children, _b = _a.interactive, interactive = _b === void 0 ? false : _b, _c = _a.placement, placement = _c === void 0 ? "right" : _c, _d = _a.followCursor, followCursor$1 = _d === void 0 ? false : _d, _e = _a.trigger, trigger = _e === void 0 ? "mouseenter focus" : _e, _f = _a.showArrow, showArrow = _f === void 0 ? true : _f;
6326
- var spanRef = useRef(null);
6327
- var _g = useState(null), childRef = _g[0], setChildRef = _g[1];
6328
- /**
6329
- * Mount the temporary span element.
6330
- * retrieve and store the target element's reference.
6331
- */
6332
- useEffect(function () {
6333
- if (spanRef.current) {
6334
- setChildRef(spanRef.current.previousElementSibling);
6335
- }
6336
- return function () { return setChildRef(null); };
6337
- }, []);
6338
- return (React.createElement(React.Fragment, null,
6339
- children,
6340
- 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" } }))));
6341
- };
6342
-
6343
- var ServerRegion;
6344
- (function (ServerRegion) {
6345
- ServerRegion["EUNA"] = "EUNA";
6346
- ServerRegion["Korea"] = "Korea";
6347
- ServerRegion["KoreaTest"] = "KoreaTest";
6348
- })(ServerRegion || (ServerRegion = {}));
6349
-
6350
- var css_248z = ".NpcTooltip_toggleBarContainer {\n display: flex; }\n\n.NpcTooltip_toggleButton {\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 .NpcTooltip_toggleButton:hover {\n background-color: rgba(255, 255, 255, 0.2);\n opacity: 1; }\n .NpcTooltip_toggleButton-active {\n background-color: rgba(255, 255, 255, 0.3) !important;\n color: #fff;\n opacity: 1; }\n\n.NpcTooltip_storeEntry {\n display: flex;\n align-items: stretch;\n background-color: rgba(233, 233, 233, 0.1);\n padding: 0.33rem;\n font-size: 14px; }\n .NpcTooltip_storeEntry:not(:last-child) {\n margin-bottom: 0.2rem; }\n\n.NpcTooltip_storeEntryItemNameLimit {\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center; }\n\n.NpcTooltip_storeEntryItemLimit {\n font-size: 12px; }\n\n.NpcTooltip_storeEntryItemName {\n flex: 1;\n display: flex;\n align-items: center; }\n\n.NpcTooltip_storeEntryItemIconName {\n display: flex;\n align-items: center; }\n .NpcTooltip_storeEntryItemIconName img {\n width: 48px;\n height: 48px;\n margin-right: 0.33rem; }\n\n.NpcTooltip_itemBuyPriceEntriesContainer {\n display: flex;\n flex-direction: column;\n flex: 1;\n align-items: flex-end;\n justify-content: center;\n padding-left: 2rem; }\n\n.NpcTooltip_itemBuyPriceEntries {\n display: flex; }\n .NpcTooltip_itemBuyPriceEntries-moneyMargin {\n margin-bottom: 0.2rem; }\n\n.NpcTooltip_itemBuyPriceEntry:not(:first-child) {\n margin-left: 0.33rem; }\n\n.NpcTooltip_itemBuyPriceEntryContainer {\n position: relative;\n height: 32px; }\n .NpcTooltip_itemBuyPriceEntryContainer img {\n width: 32px;\n height: 32px; }\n .NpcTooltip_itemBuyPriceEntryContainer-shadow {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n box-shadow: inset 0 0 2px 0px #000000; }\n\n.NpcTooltip_itemBuyPriceEntryCount {\n position: absolute;\n bottom: 0;\n left: 0;\n color: #ffffff;\n background-color: rgba(0, 0, 0, 0.4);\n width: 32px;\n line-height: 12px;\n text-align: center; }\n\n.NpcTooltip_moneyContainer {\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n .NpcTooltip_moneyContainer > span {\n display: flex;\n align-items: center; }\n .NpcTooltip_moneyContainer > span:not(:first-child) {\n margin-left: 0.1rem; }\n .NpcTooltip_moneyContainer > span > img {\n width: 16px;\n height: 16px; }\n";
6351
- styleInject(css_248z);
6352
-
6353
- function StoreToggle(_a) {
6354
- var store = _a.store, isActive = _a.isActive, setActive = _a.setActive;
6355
- return (React.createElement("button", { className: "NpcTooltip_toggleButton " +
6356
- (isActive ? "NpcTooltip_toggleButton-active" : ""), onClick: setActive },
6357
- React.createElement("span", null, store.Name)));
6358
- }
6359
-
6360
- function StoreToggleBar(_a) {
6361
- var stores = _a.stores, activeTab = _a.activeTab, setActiveTab = _a.setActiveTab;
6362
- return (React.createElement("div", { className: "NpcTooltip_toggleBarContainer" }, stores.map(function (store, i) { return (React.createElement(StoreToggle, { key: i, store: store, isActive: activeTab === i, setActive: function () { return setActiveTab(i); } })); })));
6363
- }
6364
-
6365
- var BuyLimitReset;
6366
- (function (BuyLimitReset) {
6367
- BuyLimitReset[BuyLimitReset["Day"] = 0] = "Day";
6368
- BuyLimitReset[BuyLimitReset["Week"] = 1] = "Week";
6369
- BuyLimitReset[BuyLimitReset["Month"] = 2] = "Month";
6370
- BuyLimitReset[BuyLimitReset["Absolute"] = 3] = "Absolute";
6371
- })(BuyLimitReset || (BuyLimitReset = {}));
6372
- var BuyLimitType;
6373
- (function (BuyLimitType) {
6374
- BuyLimitType[BuyLimitType["Character"] = 0] = "Character";
6375
- BuyLimitType[BuyLimitType["Account"] = 1] = "Account";
6376
- })(BuyLimitType || (BuyLimitType = {}));
6377
-
6378
- function ItemBuyLimit(_a) {
6379
- var limit = _a.limit;
6380
- if (limit == null)
6381
- return null;
6382
- return (React.createElement("div", { className: "NpcTooltip_storeEntryItemLimit" }, GetStringForBuyLimitType(limit.LimitType) +
6383
- "Limit: " +
6384
- limit.Amount +
6385
- "/" +
6386
- GetStringForBuyLimitReset(limit.LimitReset)));
6387
6556
  }
6388
- function GetStringForBuyLimitType(type) {
6389
- switch (type) {
6390
- case BuyLimitType.Account:
6391
- return "Account ";
6392
- case BuyLimitType.Character:
6393
- return "Character ";
6394
- default:
6395
- return "";
6396
- }
6557
+ function AddFlavorText(subInfoGroups, item) {
6558
+ if (item.flavorText == null || item.flavorText == "")
6559
+ return;
6560
+ subInfoGroups.push({
6561
+ title: "",
6562
+ texts: [React.createElement(ItemDescriptionText, { htmlString: item.flavorText })],
6563
+ });
6397
6564
  }
6398
- function GetStringForBuyLimitReset(reset) {
6399
- switch (reset) {
6400
- case BuyLimitReset.Day:
6401
- return "Day";
6402
- case BuyLimitReset.Week:
6403
- return "Week ";
6404
- case BuyLimitReset.Month:
6405
- return "Month";
6406
- default:
6407
- return "";
6408
- }
6409
- }
6410
-
6411
- function Money(_a) {
6412
- var money = _a.money;
6413
- var bnsmoney = getMoneyObj(money);
6414
- if (bnsmoney == null)
6415
- return null;
6416
- return (React.createElement("div", { className: "NpcTooltip_moneyContainer" },
6417
- bnsmoney.Gold > 0 ? (React.createElement("span", null,
6418
- bnsmoney.Gold,
6419
- React.createElement("img", { src: BuildIconPath("gold"), alt: "" }))) : null,
6420
- bnsmoney.Silver > 0 ? (React.createElement("span", null,
6421
- bnsmoney.Silver,
6422
- React.createElement("img", { src: BuildIconPath("silver"), alt: "" }))) : null,
6423
- bnsmoney.Copper > 0 ? (React.createElement("span", null,
6424
- bnsmoney.Copper,
6425
- React.createElement("img", { src: BuildIconPath("copper"), alt: "" }))) : null));
6426
- }
6427
-
6428
- function StoreItemBuyPriceEntry(_a) {
6429
- var _this = this;
6430
- var itemRef = _a.itemRef, client = _a.client;
6431
- var _b = useState(), item = _b[0], setItem = _b[1];
6432
- useEffect(function () {
6433
- if (client == null)
6434
- return;
6435
- (function () { return __awaiter(_this, void 0, void 0, function () {
6436
- var _a;
6437
- return __generator(this, function (_b) {
6438
- switch (_b.label) {
6439
- case 0:
6440
- _a = setItem;
6441
- return [4 /*yield*/, client.GetItem(itemRef.itemId, itemRef.itemLevel)];
6442
- case 1:
6443
- _a.apply(void 0, [_b.sent()]);
6444
- return [2 /*return*/];
6445
- }
6446
- });
6447
- }); })();
6448
- }, [itemRef, client]);
6449
- return (React.createElement("div", { className: "NpcTooltip_itemBuyPriceEntry" }, item ? (React.createElement(ItemTooltipWrapper, { trigger: "click", data: item, region: client.region, client: client },
6450
- React.createElement("div", { className: "NpcTooltip_itemBuyPriceEntryContainer" },
6451
- React.createElement("div", { className: "NpcTooltip_itemBuyPriceEntryContainer-shadow" }),
6452
- React.createElement("img", { className: "TooltipBase_iconbg-grade-" + item.grade, src: BuildIconPath(item.icon.iconPath), alt: "" }),
6453
- React.createElement("div", { className: "NpcTooltip_itemBuyPriceEntryCount" },
6454
- React.createElement("span", null, itemRef.min))))) : null));
6455
- }
6456
-
6457
- function NpcStoreEntry(_a) {
6458
- var _this = this;
6459
- var _b, _c;
6460
- var data = _a.data, client = _a.client;
6461
- var _d = useState(), item = _d[0], setItem = _d[1];
6462
- useEffect(function () {
6463
- if (client == null)
6464
- return;
6465
- (function () { return __awaiter(_this, void 0, void 0, function () {
6466
- var res;
6467
- return __generator(this, function (_a) {
6468
- switch (_a.label) {
6469
- case 0: return [4 /*yield*/, client.GetItem(data.Item.itemId, data.Item.itemLevel)];
6470
- case 1:
6471
- res = _a.sent();
6472
- setItem(res);
6473
- return [2 /*return*/];
6474
- }
6475
- });
6476
- }); })();
6477
- }, [data, client]);
6478
- if (item != undefined) {
6479
- return (React.createElement("div", { className: "NpcTooltip_storeEntry" },
6480
- React.createElement("div", { className: "NpcTooltip_storeEntryItemIconName" },
6481
- React.createElement(ItemTooltipWrapper, { data: item, client: client, region: client.region, trigger: "click" },
6482
- React.createElement("img", { className: "TooltipBase_iconbg-grade-" + item.grade, src: BuildIconPath(item.icon.iconPath), alt: "" })),
6483
- React.createElement("div", { className: "NpcTooltip_storeEntryItemNameLimit" },
6484
- React.createElement("div", { className: "NpcTooltip_storeEntryItemName TooltipBase_grade-" + item.grade, dangerouslySetInnerHTML: { __html: item.name } }),
6485
- React.createElement(ItemBuyLimit, { limit: data.Limit }))),
6486
- React.createElement("div", { className: "NpcTooltip_itemBuyPriceEntriesContainer" },
6487
- ((_b = data.BuyPrice.Items) === null || _b === void 0 ? void 0 : _b.length) > 0 ? (React.createElement("div", { className: "NpcTooltip_itemBuyPriceEntries " +
6488
- (data.BuyPrice.Money > 0
6489
- ? "NpcTooltip_itemBuyPriceEntries-moneyMargin"
6490
- : "") }, (_c = data.BuyPrice.Items) === null || _c === void 0 ? void 0 : _c.map(function (itemCountRef, i) { return (React.createElement(StoreItemBuyPriceEntry, { itemRef: itemCountRef, client: client, key: i })); }))) : null,
6491
- React.createElement(Money, { money: data.BuyPrice.Money }))));
6492
- }
6493
- else {
6494
- return null;
6495
- }
6496
- }
6497
-
6498
- function NpcStores(_a) {
6499
- var stores = _a.stores, activeTab = _a.activeTab, client = _a.client;
6500
- var activeStore = stores[activeTab];
6501
- return (React.createElement("div", null, activeStore.Entries.map(function (entry, i) { return (React.createElement(NpcStoreEntry, { key: i, data: entry, client: client })); })));
6502
- }
6503
-
6504
- function NpcTooltip(_a) {
6505
- var _this = this;
6506
- var _b;
6507
- var clientProp = _a.client, npc = _a.npc; _a.debug; var region = _a.region, _c = _a.grade, grade = _c === void 0 ? 4 : _c, _d = _a.fullHeight, fullHeight = _d === void 0 ? false : _d;
6508
- var _e = useState(0), activeTab = _e[0], setActiveTab = _e[1];
6509
- var _f = useState(), client = _f[0], setClient = _f[1];
6510
- useEffect(function () {
6511
- if (clientProp == undefined) {
6512
- (function () { return __awaiter(_this, void 0, void 0, function () {
6513
- return __generator(this, function (_a) {
6514
- setClient(new ItemDownloadClient(region));
6515
- return [2 /*return*/];
6516
- });
6517
- }); })();
6518
- }
6519
- else {
6520
- setClient(clientProp);
6521
- }
6522
- }, []);
6523
- var tooltipBaseProps = {
6524
- title: npc.Name,
6525
- grade: grade,
6526
- id: npc.Alias,
6527
- subtitle: (_b = npc.Title) !== null && _b !== void 0 ? _b : "",
6528
- fullHeight: fullHeight,
6529
- subInfoGroups: [],
6530
- };
6531
- //no top part
6532
- AddStoreToggles(tooltipBaseProps.subInfoGroups, npc.Stores, activeTab, setActiveTab);
6533
- AddStores(tooltipBaseProps.subInfoGroups, npc.Stores, activeTab, client);
6534
- return React.createElement(TooltipBase, __assign({}, tooltipBaseProps));
6565
+ function AddItemUsableGroup(subInfoGroups, item) {
6566
+ if (IsNullOrEmpty(item.usableGroup))
6567
+ return;
6568
+ subInfoGroups.push({
6569
+ title: "",
6570
+ texts: [React.createElement(RawText, { htmlString: item.usableGroup })],
6571
+ });
6535
6572
  }
6536
- function AddStoreToggles(subInfoGroups, Stores, activeTab, setActiveTab) {
6573
+ function AddRequiredLevel(subInfoGroups, item) {
6574
+ if (item.levelRequired == null || item.levelRequired <= 1)
6575
+ return;
6537
6576
  subInfoGroups.push({
6538
6577
  title: "",
6539
6578
  texts: [
6540
- React.createElement(StoreToggleBar, { stores: Stores, activeTab: activeTab, setActiveTab: setActiveTab }),
6579
+ React.createElement(TextWithNumber, { text: "Requires Level ", number: item.levelRequired }),
6541
6580
  ],
6542
6581
  });
6543
6582
  }
6544
- function AddStores(subInfoGroups, Stores, activeTab, client) {
6583
+ function AddRequiredJobs(subInfoGroups, item) {
6584
+ if (item.classRequired == null || item.classRequired.length == 0)
6585
+ return;
6586
+ var enJobNames = item.classRequired.map(function (x) { return x.enName; });
6545
6587
  subInfoGroups.push({
6546
6588
  title: "",
6547
6589
  texts: [
6548
- React.createElement(NpcStores, { stores: Stores, activeTab: activeTab, client: client }),
6590
+ React.createElement(StringEnumerationWithText, { enumeration: enJobNames, textAfter: " Only", textBefore: "" }),
6591
+ ],
6592
+ });
6593
+ }
6594
+ function AddBoundToAccount(subInfoGroups, item) {
6595
+ if (item.boundToAccount == null || item.boundToAccount == false)
6596
+ return;
6597
+ subInfoGroups.push({
6598
+ title: "",
6599
+ texts: [React.createElement("div", null, "Bound to Account")],
6600
+ });
6601
+ }
6602
+ function AddAbleToTrade(subInfoGroups, item) {
6603
+ if (item.unableToTrade == null || item.unableToTrade == false)
6604
+ return;
6605
+ subInfoGroups.push({
6606
+ title: "",
6607
+ texts: [React.createElement("div", null, "Unable to Trade")],
6608
+ });
6609
+ }
6610
+ function AddSealingResult(subInfoGroups, item, client, region) {
6611
+ if (item.sealing == null ||
6612
+ item.sealing.sealAcquireItemId == null ||
6613
+ item.sealing.sealConsumeItems.filter(function (x) { return x.min != 0; }).length == 0)
6614
+ return;
6615
+ subInfoGroups.push({
6616
+ title: "Can be resealed with:",
6617
+ texts: [React.createElement(SealingResult, { region: region, item: item, client: client })],
6618
+ });
6619
+ }
6620
+ function AddAccountTransferResult(subInfoGroups, item, client, region) {
6621
+ if (item.accountTransfer == null ||
6622
+ item.accountTransfer.requiredItems == null ||
6623
+ item.accountTransfer.requiredItems.length == 0)
6624
+ return;
6625
+ subInfoGroups.push({
6626
+ title: "Can be transferred with:",
6627
+ texts: [React.createElement(AccountTransfer, { region: region, item: item, client: client })],
6628
+ });
6629
+ }
6630
+ function AddUnityPoints(subInfoGroups, item) {
6631
+ if (item.setPoints == null || item.refinementPoints == null)
6632
+ return;
6633
+ if (item.setPoints === 0)
6634
+ return;
6635
+ if (item.refinementPoints === 0)
6636
+ return;
6637
+ subInfoGroups.push({
6638
+ title: "",
6639
+ texts: [
6640
+ React.createElement("span", null,
6641
+ "Splendor Stone Set Points: ",
6642
+ item.setPoints),
6643
+ React.createElement("span", null,
6644
+ "Splendor Stone Refinement Points: ",
6645
+ item.refinementPoints),
6549
6646
  ],
6550
6647
  });
6551
6648
  }
6552
6649
 
6553
- export { GetCooldownString, ItemTooltip, ItemTooltipWrapper, JsonTooltip, NpcTooltip, ServerRegion, SkillTooltip, SkillTooltipWrapper, TooltipBase };
6650
+ var css_248z = "";
6651
+ styleInject(css_248z);
6652
+
6653
+ function JsonTooltip(props) {
6654
+ var tooltipProps = {
6655
+ title: props.title,
6656
+ grade: props.grade,
6657
+ icon: props.icon,
6658
+ mainInfos: JsonArrayToJsxArray(props.mainInfos),
6659
+ subtitle: props.subtitle,
6660
+ subInfoGroups: JsonSubInfoToJsxSubInfo(props.subInfoGroups),
6661
+ };
6662
+ return React.createElement(TooltipBase, __assign({}, tooltipProps));
6663
+ }
6664
+ function JsonSubInfoToJsxSubInfo(subInfoGroups) {
6665
+ if (subInfoGroups == undefined)
6666
+ return undefined;
6667
+ var result = [];
6668
+ subInfoGroups.forEach(function (subInfoGroup) {
6669
+ var jsxSubInfoGroup = {
6670
+ title: subInfoGroup.title,
6671
+ texts: JsonArrayToJsxArray(subInfoGroup.texts),
6672
+ };
6673
+ result.push(jsxSubInfoGroup);
6674
+ });
6675
+ return result;
6676
+ }
6677
+ function JsonArrayToJsxArray(stringArray) {
6678
+ if (stringArray == undefined)
6679
+ return undefined;
6680
+ var jsxArray = [];
6681
+ stringArray.forEach(function (mainInfo) {
6682
+ jsxArray.push(React.createElement("span", { dangerouslySetInnerHTML: { __html: mainInfo } }));
6683
+ });
6684
+ return jsxArray;
6685
+ }
6686
+
6687
+ var NpcTooltipSettings = /** @class */ (function (_super) {
6688
+ __extends(NpcTooltipSettings, _super);
6689
+ function NpcTooltipSettings(npc, region, grade, client, offline) {
6690
+ if (grade === void 0) { grade = 4; }
6691
+ var _this = _super.call(this, region, client, offline) || this;
6692
+ _this.npc = npc;
6693
+ _this.grade = grade;
6694
+ _this.type = TooltipType.Npc;
6695
+ return _this;
6696
+ }
6697
+ return NpcTooltipSettings;
6698
+ }(TooltipWithNetworkSettings));
6699
+
6700
+ var SkillTooltipSettings = /** @class */ (function (_super) {
6701
+ __extends(SkillTooltipSettings, _super);
6702
+ function SkillTooltipSettings(data) {
6703
+ var _this = _super.call(this) || this;
6704
+ _this.data = data;
6705
+ _this.type = TooltipType.Skill;
6706
+ return _this;
6707
+ }
6708
+ return SkillTooltipSettings;
6709
+ }(TooltipSettingsBase));
6710
+
6711
+ export { GetCooldownString, ItemTooltip, ItemTooltipSettings, JsonTooltip, NpcTooltip, NpcTooltipSettings, ServerRegion, SkillTooltip, SkillTooltipSettings, TooltipBase, TooltipWrapper, TooltipWrapperSettings };
6554
6712
  //# sourceMappingURL=index.es.js.map