bnstooltips 1.6.3 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -58,8 +58,8 @@ function styleInject(css, ref) {
58
58
  }
59
59
  }
60
60
 
61
- 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";
62
- styleInject(css_248z$7);
61
+ 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";
62
+ styleInject(css_248z$6);
63
63
 
64
64
  function TooltipBase(_a) {
65
65
  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;
@@ -161,8 +161,8 @@ function __generator(thisArg, body) {
161
161
  }
162
162
  }
163
163
 
164
- 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";
165
- styleInject(css_248z$6);
164
+ 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";
165
+ styleInject(css_248z$5);
166
166
 
167
167
  function BuildIconPath(iconPath, iconIndex) {
168
168
  if (iconPath == null)
@@ -1308,9 +1308,14 @@ function GetCooldownString(cooldownInMs) {
1308
1308
  }
1309
1309
  }
1310
1310
 
1311
+ function removeDuplicates(stats) {
1312
+ return stats.filter(function (value, index, self) {
1313
+ return index === self.findIndex(function (t) { return t.name === value.name; });
1314
+ });
1315
+ }
1311
1316
  function ItemStats(item) {
1312
1317
  return (React__default["default"].createElement("div", { className: "ItemTooltip_stats" },
1313
- item.stats
1318
+ removeDuplicates(item.stats)
1314
1319
  .filter(function (x) { return x.isMainStat; })
1315
1320
  .map(function (mainStat, i) {
1316
1321
  if (mainStat.name.includes("-min"))
@@ -1326,7 +1331,7 @@ function ItemStats(item) {
1326
1331
  "\u00A0",
1327
1332
  ReplaceBossAndPvpAp(mainStat.name).replace("Max.", "").trim()));
1328
1333
  }),
1329
- item.stats
1334
+ removeDuplicates(item.stats)
1330
1335
  .filter(function (x) { return !x.isMainStat; })
1331
1336
  .map(function (subStat, i) {
1332
1337
  if (subStat.name.includes("-min"))
@@ -1443,9 +1448,6 @@ function SetBonus(props) {
1443
1448
  React__default["default"].createElement(SkillModifiers, { jobstyle: jobstyle, isSetBonus: true, skillModifierGroups: setStage.skillModifiers })))); })))));
1444
1449
  }
1445
1450
 
1446
- 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";
1447
- styleInject(css_248z$5);
1448
-
1449
1451
  var top = 'top';
1450
1452
  var bottom = 'bottom';
1451
1453
  var right = 'right';
@@ -1602,29 +1604,32 @@ function getBasePlacement$1(placement) {
1602
1604
  return placement.split('-')[0];
1603
1605
  }
1604
1606
 
1605
- // import { isHTMLElement } from './instanceOf';
1606
- function getBoundingClientRect(element, // eslint-disable-next-line unused-imports/no-unused-vars
1607
- includeScale) {
1607
+ var max = Math.max;
1608
+ var min = Math.min;
1609
+ var round = Math.round;
1610
+
1611
+ function getBoundingClientRect(element, includeScale) {
1612
+ if (includeScale === void 0) {
1613
+ includeScale = false;
1614
+ }
1608
1615
 
1609
1616
  var rect = element.getBoundingClientRect();
1610
1617
  var scaleX = 1;
1611
- var scaleY = 1; // FIXME:
1612
- // `offsetWidth` returns an integer while `getBoundingClientRect`
1613
- // returns a float. This results in `scaleX` or `scaleY` being
1614
- // non-1 when it should be for elements that aren't a full pixel in
1615
- // width or height.
1616
- // if (isHTMLElement(element) && includeScale) {
1617
- // const offsetHeight = element.offsetHeight;
1618
- // const offsetWidth = element.offsetWidth;
1619
- // // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
1620
- // // Fallback to 1 in case both values are `0`
1621
- // if (offsetWidth > 0) {
1622
- // scaleX = rect.width / offsetWidth || 1;
1623
- // }
1624
- // if (offsetHeight > 0) {
1625
- // scaleY = rect.height / offsetHeight || 1;
1626
- // }
1627
- // }
1618
+ var scaleY = 1;
1619
+
1620
+ if (isHTMLElement(element) && includeScale) {
1621
+ var offsetHeight = element.offsetHeight;
1622
+ var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
1623
+ // Fallback to 1 in case both values are `0`
1624
+
1625
+ if (offsetWidth > 0) {
1626
+ scaleX = round(rect.width) / offsetWidth || 1;
1627
+ }
1628
+
1629
+ if (offsetHeight > 0) {
1630
+ scaleY = round(rect.height) / offsetHeight || 1;
1631
+ }
1632
+ }
1628
1633
 
1629
1634
  return {
1630
1635
  width: rect.width / scaleX,
@@ -1743,6 +1748,10 @@ function getContainingBlock(element) {
1743
1748
 
1744
1749
  var currentNode = getParentNode(element);
1745
1750
 
1751
+ if (isShadowRoot(currentNode)) {
1752
+ currentNode = currentNode.host;
1753
+ }
1754
+
1746
1755
  while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
1747
1756
  var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that
1748
1757
  // create a containing block.
@@ -1779,13 +1788,13 @@ function getMainAxisFromPlacement(placement) {
1779
1788
  return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
1780
1789
  }
1781
1790
 
1782
- var max = Math.max;
1783
- var min = Math.min;
1784
- var round = Math.round;
1785
-
1786
1791
  function within(min$1, value, max$1) {
1787
1792
  return max(min$1, min(value, max$1));
1788
1793
  }
1794
+ function withinMaxClamp(min, value, max) {
1795
+ var v = within(min, value, max);
1796
+ return v > max ? max : v;
1797
+ }
1789
1798
 
1790
1799
  function getFreshSideObject() {
1791
1800
  return {
@@ -1917,8 +1926,8 @@ function roundOffsetsByDPR(_ref) {
1917
1926
  var win = window;
1918
1927
  var dpr = win.devicePixelRatio || 1;
1919
1928
  return {
1920
- x: round(round(x * dpr) / dpr) || 0,
1921
- y: round(round(y * dpr) / dpr) || 0
1929
+ x: round(x * dpr) / dpr || 0,
1930
+ y: round(y * dpr) / dpr || 0
1922
1931
  };
1923
1932
  }
1924
1933
 
@@ -1933,14 +1942,23 @@ function mapToStyles(_ref2) {
1933
1942
  position = _ref2.position,
1934
1943
  gpuAcceleration = _ref2.gpuAcceleration,
1935
1944
  adaptive = _ref2.adaptive,
1936
- roundOffsets = _ref2.roundOffsets;
1937
-
1938
- var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets,
1939
- _ref3$x = _ref3.x,
1940
- x = _ref3$x === void 0 ? 0 : _ref3$x,
1941
- _ref3$y = _ref3.y,
1942
- y = _ref3$y === void 0 ? 0 : _ref3$y;
1945
+ roundOffsets = _ref2.roundOffsets,
1946
+ isFixed = _ref2.isFixed;
1947
+ var _offsets$x = offsets.x,
1948
+ x = _offsets$x === void 0 ? 0 : _offsets$x,
1949
+ _offsets$y = offsets.y,
1950
+ y = _offsets$y === void 0 ? 0 : _offsets$y;
1951
+
1952
+ var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({
1953
+ x: x,
1954
+ y: y
1955
+ }) : {
1956
+ x: x,
1957
+ y: y
1958
+ };
1943
1959
 
1960
+ x = _ref3.x;
1961
+ y = _ref3.y;
1944
1962
  var hasX = offsets.hasOwnProperty('x');
1945
1963
  var hasY = offsets.hasOwnProperty('y');
1946
1964
  var sideX = left;
@@ -1965,16 +1983,18 @@ function mapToStyles(_ref2) {
1965
1983
  offsetParent = offsetParent;
1966
1984
 
1967
1985
  if (placement === top || (placement === left || placement === right) && variation === end) {
1968
- sideY = bottom; // $FlowFixMe[prop-missing]
1969
-
1970
- y -= offsetParent[heightProp] - popperRect.height;
1986
+ sideY = bottom;
1987
+ var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
1988
+ offsetParent[heightProp];
1989
+ y -= offsetY - popperRect.height;
1971
1990
  y *= gpuAcceleration ? 1 : -1;
1972
1991
  }
1973
1992
 
1974
1993
  if (placement === left || (placement === top || placement === bottom) && variation === end) {
1975
- sideX = right; // $FlowFixMe[prop-missing]
1976
-
1977
- x -= offsetParent[widthProp] - popperRect.width;
1994
+ sideX = right;
1995
+ var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
1996
+ offsetParent[widthProp];
1997
+ x -= offsetX - popperRect.width;
1978
1998
  x *= gpuAcceleration ? 1 : -1;
1979
1999
  }
1980
2000
  }
@@ -1983,6 +2003,17 @@ function mapToStyles(_ref2) {
1983
2003
  position: position
1984
2004
  }, adaptive && unsetSides);
1985
2005
 
2006
+ var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
2007
+ x: x,
2008
+ y: y
2009
+ }) : {
2010
+ x: x,
2011
+ y: y
2012
+ };
2013
+
2014
+ x = _ref4.x;
2015
+ y = _ref4.y;
2016
+
1986
2017
  if (gpuAcceleration) {
1987
2018
  var _Object$assign;
1988
2019
 
@@ -1992,9 +2023,9 @@ function mapToStyles(_ref2) {
1992
2023
  return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
1993
2024
  }
1994
2025
 
1995
- function computeStyles(_ref4) {
1996
- var state = _ref4.state,
1997
- options = _ref4.options;
2026
+ function computeStyles(_ref5) {
2027
+ var state = _ref5.state,
2028
+ options = _ref5.options;
1998
2029
  var _options$gpuAccelerat = options.gpuAcceleration,
1999
2030
  gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
2000
2031
  _options$adaptive = options.adaptive,
@@ -2017,7 +2048,8 @@ function computeStyles(_ref4) {
2017
2048
  variation: getVariation(state.placement),
2018
2049
  popper: state.elements.popper,
2019
2050
  popperRect: state.rects.popper,
2020
- gpuAcceleration: gpuAcceleration
2051
+ gpuAcceleration: gpuAcceleration,
2052
+ isFixed: state.options.strategy === 'fixed'
2021
2053
  };
2022
2054
 
2023
2055
  if (state.modifiersData.popperOffsets != null) {
@@ -2275,7 +2307,7 @@ function getInnerBoundingClientRect(element) {
2275
2307
  }
2276
2308
 
2277
2309
  function getClientRectFromMixedType(element, clippingParent) {
2278
- return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
2310
+ return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement$1(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
2279
2311
  } // A "clipping parent" is an overflowable container with the characteristic of
2280
2312
  // clipping (or hiding) overflowing elements with a position different from
2281
2313
  // `initial`
@@ -2792,6 +2824,14 @@ function preventOverflow(_ref) {
2792
2824
  var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
2793
2825
  placement: state.placement
2794
2826
  })) : tetherOffset;
2827
+ var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
2828
+ mainAxis: tetherOffsetValue,
2829
+ altAxis: tetherOffsetValue
2830
+ } : Object.assign({
2831
+ mainAxis: 0,
2832
+ altAxis: 0
2833
+ }, tetherOffsetValue);
2834
+ var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
2795
2835
  var data = {
2796
2836
  x: 0,
2797
2837
  y: 0
@@ -2801,13 +2841,15 @@ function preventOverflow(_ref) {
2801
2841
  return;
2802
2842
  }
2803
2843
 
2804
- if (checkMainAxis || checkAltAxis) {
2844
+ if (checkMainAxis) {
2845
+ var _offsetModifierState$;
2846
+
2805
2847
  var mainSide = mainAxis === 'y' ? top : left;
2806
2848
  var altSide = mainAxis === 'y' ? bottom : right;
2807
2849
  var len = mainAxis === 'y' ? 'height' : 'width';
2808
2850
  var offset = popperOffsets[mainAxis];
2809
- var min$1 = popperOffsets[mainAxis] + overflow[mainSide];
2810
- var max$1 = popperOffsets[mainAxis] - overflow[altSide];
2851
+ var min$1 = offset + overflow[mainSide];
2852
+ var max$1 = offset - overflow[altSide];
2811
2853
  var additive = tether ? -popperRect[len] / 2 : 0;
2812
2854
  var minLen = variation === start ? referenceRect[len] : popperRect[len];
2813
2855
  var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
@@ -2827,36 +2869,45 @@ function preventOverflow(_ref) {
2827
2869
  // width or height)
2828
2870
 
2829
2871
  var arrowLen = within(0, referenceRect[len], arrowRect[len]);
2830
- var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;
2831
- var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;
2872
+ var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
2873
+ var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
2832
2874
  var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
2833
2875
  var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
2834
- var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0;
2835
- var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset;
2836
- var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue;
2876
+ var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
2877
+ var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
2878
+ var tetherMax = offset + maxOffset - offsetModifierValue;
2879
+ var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
2880
+ popperOffsets[mainAxis] = preventedOffset;
2881
+ data[mainAxis] = preventedOffset - offset;
2882
+ }
2837
2883
 
2838
- if (checkMainAxis) {
2839
- var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
2840
- popperOffsets[mainAxis] = preventedOffset;
2841
- data[mainAxis] = preventedOffset - offset;
2842
- }
2884
+ if (checkAltAxis) {
2885
+ var _offsetModifierState$2;
2843
2886
 
2844
- if (checkAltAxis) {
2845
- var _mainSide = mainAxis === 'x' ? top : left;
2887
+ var _mainSide = mainAxis === 'x' ? top : left;
2846
2888
 
2847
- var _altSide = mainAxis === 'x' ? bottom : right;
2889
+ var _altSide = mainAxis === 'x' ? bottom : right;
2848
2890
 
2849
- var _offset = popperOffsets[altAxis];
2891
+ var _offset = popperOffsets[altAxis];
2850
2892
 
2851
- var _min = _offset + overflow[_mainSide];
2893
+ var _len = altAxis === 'y' ? 'height' : 'width';
2852
2894
 
2853
- var _max = _offset - overflow[_altSide];
2895
+ var _min = _offset + overflow[_mainSide];
2854
2896
 
2855
- var _preventedOffset = within(tether ? min(_min, tetherMin) : _min, _offset, tether ? max(_max, tetherMax) : _max);
2897
+ var _max = _offset - overflow[_altSide];
2856
2898
 
2857
- popperOffsets[altAxis] = _preventedOffset;
2858
- data[altAxis] = _preventedOffset - _offset;
2859
- }
2899
+ var isOriginSide = [top, left].indexOf(basePlacement) !== -1;
2900
+
2901
+ var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
2902
+
2903
+ var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
2904
+
2905
+ var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
2906
+
2907
+ var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
2908
+
2909
+ popperOffsets[altAxis] = _preventedOffset;
2910
+ data[altAxis] = _preventedOffset - _offset;
2860
2911
  }
2861
2912
 
2862
2913
  state.modifiersData[name] = data;
@@ -2888,8 +2939,8 @@ function getNodeScroll(node) {
2888
2939
 
2889
2940
  function isElementScaled(element) {
2890
2941
  var rect = element.getBoundingClientRect();
2891
- var scaleX = rect.width / element.offsetWidth || 1;
2892
- var scaleY = rect.height / element.offsetHeight || 1;
2942
+ var scaleX = round(rect.width) / element.offsetWidth || 1;
2943
+ var scaleY = round(rect.height) / element.offsetHeight || 1;
2893
2944
  return scaleX !== 1 || scaleY !== 1;
2894
2945
  } // Returns the composite rect of an element relative to its offsetParent.
2895
2946
  // Composite means it takes into account transforms as well as layout.
@@ -2901,9 +2952,9 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
2901
2952
  }
2902
2953
 
2903
2954
  var isOffsetParentAnElement = isHTMLElement(offsetParent);
2904
- isHTMLElement(offsetParent) && isElementScaled(offsetParent);
2955
+ var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
2905
2956
  var documentElement = getDocumentElement(offsetParent);
2906
- var rect = getBoundingClientRect(elementOrVirtualElement);
2957
+ var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
2907
2958
  var scroll = {
2908
2959
  scrollLeft: 0,
2909
2960
  scrollTop: 0
@@ -2920,7 +2971,7 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
2920
2971
  }
2921
2972
 
2922
2973
  if (isHTMLElement(offsetParent)) {
2923
- offsets = getBoundingClientRect(offsetParent);
2974
+ offsets = getBoundingClientRect(offsetParent, true);
2924
2975
  offsets.x += offsetParent.clientLeft;
2925
2976
  offsets.y += offsetParent.clientTop;
2926
2977
  } else if (documentElement) {
@@ -5571,1018 +5622,1109 @@ var Tippy = index;
5571
5622
  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}";
5572
5623
  styleInject(css_248z$4);
5573
5624
 
5574
- var ItemTooltipWrapper = function (_a) {
5575
- 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;
5576
- var spanRef = React.useRef(null);
5577
- var _j = React.useState(null), childRef = _j[0], setChildRef = _j[1];
5578
- /**
5579
- * Mount the temporary span element.
5580
- * retrieve and store the target element's reference.
5581
- */
5582
- React.useEffect(function () {
5583
- if (spanRef.current) {
5584
- setChildRef(spanRef.current.previousElementSibling);
5585
- }
5586
- return function () { return setChildRef(null); };
5587
- }, []);
5588
- var _k = React.useState(true), isOffline = _k[0], setIsOffline = _k[1];
5589
- return (React__default["default"].createElement(React__default["default"].Fragment, null,
5590
- children,
5591
- childRef ? (React__default["default"].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__default["default"].createElement(ItemTooltip, { region: region, jobstyleOverride: jobstyleOverride, data: data, offline: isOffline, client: client, debug: debug }), theme: "grade" + data.grade, reference: childRef })) : (React__default["default"].createElement("span", { ref: spanRef, style: { display: "none" } }))));
5592
- };
5625
+ var TooltipWrapperSettings = /** @class */ (function () {
5626
+ function TooltipWrapperSettings(followCursor, interactive, placement, trigger, showArrow) {
5627
+ if (followCursor === void 0) { followCursor = false; }
5628
+ if (interactive === void 0) { interactive = true; }
5629
+ if (placement === void 0) { placement = "right"; }
5630
+ if (trigger === void 0) { trigger = "mouseenter focus"; }
5631
+ if (showArrow === void 0) { showArrow = true; }
5632
+ this.followCursor = followCursor;
5633
+ this.interactive = interactive;
5634
+ this.placement = placement;
5635
+ this.trigger = trigger;
5636
+ this.showArrow = showArrow;
5637
+ }
5638
+ return TooltipWrapperSettings;
5639
+ }());
5593
5640
 
5594
- function ItemIconNameDiv(_a) {
5595
- var _this = this;
5596
- var _b;
5597
- var item = _a.item, region = _a.region, client = _a.client, _c = _a.showRandomIcon, showRandomIcon = _c === void 0 ? false : _c;
5598
- var _d = React.useState(), itemData = _d[0], setItemData = _d[1];
5599
- React.useEffect(function () {
5600
- if (client)
5601
- (function () { return __awaiter(_this, void 0, void 0, function () {
5602
- var _a;
5603
- return __generator(this, function (_b) {
5604
- switch (_b.label) {
5605
- case 0:
5606
- _a = setItemData;
5607
- return [4 /*yield*/, client.GetItem(item.itemId, item.itemLevel)];
5608
- case 1:
5609
- _a.apply(void 0, [_b.sent()]);
5610
- return [2 /*return*/];
5611
- }
5612
- });
5613
- }); })();
5614
- }, [item, client]);
5615
- if (itemData) {
5616
- if (itemData.grade != 0)
5617
- return (React__default["default"].createElement("div", { className: "ItemTooltip_itemiconnamediv" },
5618
- React__default["default"].createElement(ItemTooltipWrapper, { region: region, client: client, data: itemData },
5619
- React__default["default"].createElement("img", { className: "ItemTooltip_itemIconSmall", alt: "", src: BuildIconPath((_b = itemData.icon) === null || _b === void 0 ? void 0 : _b.iconPath) })),
5620
- React__default["default"].createElement("div", { className: "ItemTooltip_itemNameRandomDiv" },
5621
- React__default["default"].createElement("span", { className: "TooltipBase_grade-" + itemData.grade, dangerouslySetInnerHTML: { __html: itemData.name } }),
5622
- showRandomIcon ? (React__default["default"].createElement(React__default["default"].Fragment, null,
5623
- "\u00A0",
5624
- React__default["default"].createElement("div", null,
5625
- React__default["default"].createElement("img", { style: {
5626
- width: 36,
5627
- height: 18,
5628
- margin: "0 1px",
5629
- top: 4,
5630
- position: "relative",
5631
- }, alt: "", src: "https://lean.bns.tools/bns/icons/00015590/Tag_Random.png" })))) : null)));
5632
- else
5633
- return null;
5641
+ 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";
5642
+ styleInject(css_248z$3);
5643
+
5644
+ exports.ServerRegion = void 0;
5645
+ (function (ServerRegion) {
5646
+ ServerRegion["EUNA"] = "EUNA";
5647
+ ServerRegion["Korea"] = "Korea";
5648
+ ServerRegion["KoreaTest"] = "KoreaTest";
5649
+ })(exports.ServerRegion || (exports.ServerRegion = {}));
5650
+ var TooltipSettingsBase = /** @class */ (function () {
5651
+ function TooltipSettingsBase(offline) {
5652
+ if (offline === void 0) { offline = false; }
5653
+ this.debug = false;
5654
+ this.fullHeight = false;
5655
+ this.offline = offline;
5634
5656
  }
5635
- else {
5636
- return (React__default["default"].createElement("div", { className: "ItemTooltip_itemIconLoading" },
5637
- React__default["default"].createElement("div", { className: "dot-elastic" })));
5657
+ return TooltipSettingsBase;
5658
+ }());
5659
+ var TooltipWithNetworkSettings = /** @class */ (function (_super) {
5660
+ __extends(TooltipWithNetworkSettings, _super);
5661
+ function TooltipWithNetworkSettings(region, client, offline) {
5662
+ if (offline === void 0) { offline = false; }
5663
+ var _this = this;
5664
+ var l_offline = offline;
5665
+ if (region == null)
5666
+ l_offline = true;
5667
+ _this = _super.call(this, l_offline) || this;
5668
+ _this.region = region;
5669
+ _this.client = client;
5670
+ return _this;
5638
5671
  }
5639
- }
5672
+ return TooltipWithNetworkSettings;
5673
+ }(TooltipSettingsBase));
5674
+
5675
+ var ItemTooltipSettings = /** @class */ (function (_super) {
5676
+ __extends(ItemTooltipSettings, _super);
5677
+ function ItemTooltipSettings(data, region, client, offline) {
5678
+ var _this = _super.call(this, region, client, offline) || this;
5679
+ _this.data = data;
5680
+ return _this;
5681
+ }
5682
+ return ItemTooltipSettings;
5683
+ }(TooltipWithNetworkSettings));
5684
+
5685
+ var SkillTooltipSettings = /** @class */ (function (_super) {
5686
+ __extends(SkillTooltipSettings, _super);
5687
+ function SkillTooltipSettings(data) {
5688
+ var _this = _super.call(this) || this;
5689
+ _this.data = data;
5690
+ return _this;
5691
+ }
5692
+ return SkillTooltipSettings;
5693
+ }(TooltipSettingsBase));
5640
5694
 
5641
- function DecomposeResults(props) {
5642
- if (props.client)
5643
- return (React__default["default"].createElement("div", null, props.items
5644
- .filter(function (x) { return x != null; })
5645
- .map(function (item, i) {
5646
- return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: item.itemId + "-" + item.itemLevel + "_" + i },
5647
- React__default["default"].createElement(ItemIconNameDiv, { region: props.region, item: item, client: props.client, showRandomIcon: item.isRandom }),
5648
- item.isRandom ? null : (React__default["default"].createElement(React__default["default"].Fragment, null,
5649
- "\u00A0",
5650
- item.isMinMax ? (React__default["default"].createElement("span", null, GetRangeString(item.min, item.max))) : (React__default["default"].createElement("span", null, GetRangeString(item.min)))))));
5651
- })));
5652
- else
5695
+ 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";
5696
+ styleInject(css_248z$2);
5697
+
5698
+ function getButtonIconPath(button) {
5699
+ var _a;
5700
+ if (buttonIconMapping.find(function (x) { return x.button === button; }) == null)
5653
5701
  return null;
5702
+ return ("/00072858" + ((_a = buttonIconMapping.find(function (x) { return x.button === button; })) === null || _a === void 0 ? void 0 : _a.path));
5703
+ }
5704
+ var buttonIconMapping = [
5705
+ {
5706
+ button: "F",
5707
+ path: "/Key_Alphabet_F",
5708
+ },
5709
+ {
5710
+ button: "Q",
5711
+ path: "/Key_Alphabet_Q",
5712
+ },
5713
+ {
5714
+ button: "E",
5715
+ path: "/Key_Alphabet_E",
5716
+ },
5717
+ {
5718
+ button: "S",
5719
+ path: "/Key_Alphabet_S",
5720
+ },
5721
+ {
5722
+ button: "Z",
5723
+ path: "/Key_Alphabet_Z",
5724
+ },
5725
+ {
5726
+ button: "X",
5727
+ path: "/Key_Alphabet_X",
5728
+ },
5729
+ {
5730
+ button: "C",
5731
+ path: "/Key_Alphabet_C",
5732
+ },
5733
+ {
5734
+ button: "V",
5735
+ path: "/Key_Alphabet_V",
5736
+ },
5737
+ {
5738
+ button: "W",
5739
+ path: "/Key_Alphabet_W",
5740
+ },
5741
+ {
5742
+ button: "G",
5743
+ path: "/Key_Alphabet_G",
5744
+ },
5745
+ {
5746
+ button: "B",
5747
+ path: "/Key_Alphabet_B",
5748
+ },
5749
+ {
5750
+ button: "SPACE",
5751
+ path: "/Key_Space_Big",
5752
+ },
5753
+ {
5754
+ button: "TAB",
5755
+ path: "/Key_Tab_Big",
5756
+ },
5757
+ {
5758
+ button: "1",
5759
+ path: "/Key_Num_1",
5760
+ },
5761
+ {
5762
+ button: "2",
5763
+ path: "/Key_Num_2",
5764
+ },
5765
+ {
5766
+ button: "3",
5767
+ path: "/Key_Num_3",
5768
+ },
5769
+ {
5770
+ button: "4",
5771
+ path: "/Key_Num_4",
5772
+ },
5773
+ {
5774
+ button: "LMB",
5775
+ path: "/GameUI_Tag_MouseL",
5776
+ },
5777
+ {
5778
+ button: "RMB",
5779
+ path: "/GameUI_Tag_MouseR",
5780
+ },
5781
+ ];
5782
+
5783
+ function SkillIconWithButton(_a) {
5784
+ var skill = _a.skill;
5785
+ return (React__default["default"].createElement("div", { className: "SkillTooltip_skillIconContainer" },
5786
+ React__default["default"].createElement("img", { className: "SkillTooltip_skillIcon", src: BuildIconPath(skill.IconPath, skill.IconIndex - 1), alt: "" }),
5787
+ getButtonIconPath(getNormalizedButton(skill)) ? (React__default["default"].createElement("img", { className: "SkillTooltip_buttonIcon" +
5788
+ " " +
5789
+ (getNormalizedButton(skill) === "RMB" ||
5790
+ getNormalizedButton(skill) === "LMB"
5791
+ ? "SkillTooltip_buttonIconMouse"
5792
+ : ""), src: BuildIconPath(getButtonIconPath(getNormalizedButton(skill))), alt: "" })) : null));
5654
5793
  }
5655
5794
 
5656
- function SetBonusToggle(_a) {
5657
- var jobstyles = _a.jobstyles, jobstyle = _a.jobstyle, setJobstyle = _a.setJobstyle;
5658
- return (React__default["default"].createElement("div", { className: "ItemTooltip_jobstyleToggleContainer" }, jobstyles.map(function (style) { return (React__default["default"].createElement("button", { key: style, className: "ItemTooltip_jobstyleButton" +
5659
- (style === jobstyle ? " ItemTooltip_jobstyleButton-active" : ""), onClick: function (e) {
5660
- e.stopPropagation();
5661
- setJobstyle(style);
5662
- } }, GetJobStyleNameString(style))); })));
5795
+ function SkillTooltipBoundary(_a) {
5796
+ 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;
5797
+ return (React__default["default"].createElement("div", { className: "SkillTooltip_boundary" },
5798
+ React__default["default"].createElement("div", { className: "SkillTooltip_boundaryHead" }, head),
5799
+ React__default["default"].createElement("div", { className: "SkillTooltip_boundaryBody " +
5800
+ (pvpModifier ? "SkillTooltip_boundaryBodyModifier " : "") +
5801
+ bodyClass +
5802
+ (hasIcon ? " SkillTooltip_boundaryHasIcon " : "") }, body)));
5663
5803
  }
5664
5804
 
5665
- function ItemDescriptionText(_a) {
5666
- var htmlString = _a.htmlString;
5667
- var textSplit = htmlString.replace("<br/>", "<br />").split("<br />");
5668
- return (React__default["default"].createElement("div", { className: "ItemTooltip_descriptions TooltipBase_flex-col" }, textSplit.map(function (htmlText, i) { return (React__default["default"].createElement("span", { key: i, dangerouslySetInnerHTML: {
5669
- __html: ReplaceIconsInHtmlString(htmlText),
5670
- } })); })));
5805
+ function SkillTooltipBoundaryContainer(_a) {
5806
+ var children = _a.children;
5807
+ return React__default["default"].createElement("div", { className: "SkillTooltip_boundaryContainer" }, children);
5671
5808
  }
5672
5809
 
5673
- function RawText(_a) {
5674
- var htmlString = _a.htmlString;
5675
- return (React__default["default"].createElement("div", { className: "ItemTooltip_raw", dangerouslySetInnerHTML: { __html: htmlString } }));
5676
- }
5677
-
5678
- function TextWithNumber(_a) {
5679
- var text = _a.text, number = _a.number;
5680
- return (React__default["default"].createElement("div", null,
5681
- text,
5682
- number));
5683
- }
5684
-
5685
- function StringEnumerationWithText(_a) {
5686
- var enumeration = _a.enumeration, textBefore = _a.textBefore, textAfter = _a.textAfter;
5687
- return (React__default["default"].createElement("div", null,
5688
- textBefore,
5689
- enumeration.map(function (item, i) { return (React__default["default"].createElement("span", { key: i },
5690
- item,
5691
- i != enumeration.length - 1 ? ", " : null)); }),
5692
- textAfter));
5810
+ function PvpModifiers(_a) {
5811
+ var skill = _a.skill;
5812
+ return (React__default["default"].createElement(SkillTooltipBoundaryContainer, null,
5813
+ React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", null, "Equalized PvP"), body: React__default["default"].createElement("span", null,
5814
+ "x\u00A0",
5815
+ React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: skill.EqualizedPvp } })), pvpModifier: true }),
5816
+ React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", null, "PvP"), body: React__default["default"].createElement("span", null,
5817
+ "x\u00A0",
5818
+ React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: skill.Pvp } })), pvpModifier: true })));
5693
5819
  }
5694
5820
 
5695
- function SealingResult(_a) {
5696
- var item = _a.item, client = _a.client, region = _a.region;
5697
- return (React__default["default"].createElement("div", null, item.sealing.sealConsumeItems
5698
- .filter(function (x) { return x.min != 0; })
5699
- .map(function (consumeItem, i) { return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: consumeItem.itemId + "_" + i },
5700
- React__default["default"].createElement(ItemIconNameDiv, { region: region, item: consumeItem, client: client }),
5701
- "\u00A0",
5702
- GetRangeString(consumeItem.min))); })));
5821
+ function SkillBoundaries(_a) {
5822
+ var skill = _a.skill;
5823
+ var _b = React__default["default"].useState(false), hasIcon = _b[0], setHasIcon = _b[1];
5824
+ React__default["default"].useEffect(function () {
5825
+ setHasIcon(skill.Boundaries.Range.Shape != null && skill.Boundaries.Range.Shape != "");
5826
+ }, [skill]);
5827
+ return (React__default["default"].createElement(SkillTooltipBoundaryContainer, null,
5828
+ React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5829
+ __html: skill.Boundaries.Distance.Name,
5830
+ } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5831
+ __html: skill.Boundaries.Distance.Value,
5832
+ } }), hasIcon: hasIcon }),
5833
+ React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5834
+ __html: skill.Boundaries.Range.Name,
5835
+ } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5836
+ __html: skill.Boundaries.Range.Value,
5837
+ } }), hasIcon: hasIcon, bodyClass: skill.Boundaries.Range.Shape }),
5838
+ React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5839
+ __html: skill.Boundaries.Cast.Name,
5840
+ } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5841
+ __html: skill.Boundaries.Cast.Value,
5842
+ } }), hasIcon: hasIcon }),
5843
+ React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5844
+ __html: skill.Boundaries.Recycle.Name,
5845
+ } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5846
+ __html: skill.Boundaries.Recycle.Value,
5847
+ } }), hasIcon: hasIcon })));
5703
5848
  }
5704
5849
 
5705
- function AccountTransfer(_a) {
5706
- var item = _a.item, client = _a.client, region = _a.region;
5707
- return (React__default["default"].createElement("div", null,
5708
- item.accountTransfer.requiredItems.map(function (consumeItem, i) { return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: consumeItem.itemId + "_" + i },
5709
- React__default["default"].createElement(ItemIconNameDiv, { region: region, client: client, item: consumeItem }),
5710
- "\u00A0",
5711
- GetRangeString(consumeItem.min))); }),
5712
- item.accountTransfer.moneyCost != null &&
5713
- item.accountTransfer.moneyCost > 0 ? (React__default["default"].createElement("span", null,
5714
- item.accountTransfer.moneyCost,
5715
- "\u00A0copper")) : null));
5850
+ function SkillConditions(_a) {
5851
+ var tooltipItems = _a.tooltipItems;
5852
+ return (React__default["default"].createElement(React__default["default"].Fragment, null, tooltipItems.map(function (sub, i) { return (React__default["default"].createElement("div", { key: i, className: "SkillTooltip_conditionRow" },
5853
+ sub.IconPath != null ? (React__default["default"].createElement("img", { src: sub.IconIndex != null && sub.IconIndex > 0
5854
+ ? BuildIconPath(sub.IconPath, sub.IconIndex - 1)
5855
+ : BuildIconPath(sub.IconPath), alt: "", className: "SkillTooltip_conditionIcon" })) : null,
5856
+ React__default["default"].createElement("div", { key: i, dangerouslySetInnerHTML: { __html: sub.Text } }))); })));
5716
5857
  }
5717
5858
 
5718
- function ItemTooltip(_a) {
5719
- var _this = this;
5720
- var _b, _c, _d;
5721
- 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;
5722
- var _h = React.useState("advanced-1"), jobstyle = _h[0], setJobstyle = _h[1];
5723
- var _j = React.useState(), client = _j[0], setClient = _j[1];
5724
- React.useEffect(function () {
5725
- if (offline)
5726
- return;
5727
- if (clientProp == undefined) {
5728
- (function () { return __awaiter(_this, void 0, void 0, function () {
5729
- return __generator(this, function (_a) {
5730
- setClient(new ItemDownloadClient(region));
5731
- return [2 /*return*/];
5732
- });
5733
- }); })();
5734
- }
5735
- else {
5736
- setClient(clientProp);
5737
- }
5738
- }, [offline]);
5739
- React.useEffect(function () {
5740
- if (jobstyleOverride != undefined) {
5741
- setJobstyle(jobstyleOverride);
5742
- }
5743
- }, [jobstyleOverride]);
5744
- var item = data;
5745
- 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 : "";
5746
- if (itemCategory == "none")
5747
- itemCategory = "";
5859
+ function SkillTooltip(_a) {
5860
+ var settings = _a.settings;
5861
+ var debug = settings.debug;
5862
+ var skill = settings.data;
5748
5863
  var tooltipBaseProps = {
5749
- title: item.name,
5750
- grade: item.grade,
5751
- id: item.id + "-" + item.level,
5752
- icon: item.icon ? BuildIconPath(item.icon.iconPath) : "",
5753
- subtitle: itemCategory,
5864
+ title: skill.Name,
5865
+ id: skill.ID + "-" + skill.Variation,
5866
+ grade: 4,
5867
+ icon: skill.IconPath ? React__default["default"].createElement(SkillIconWithButton, { skill: skill }) : "",
5868
+ subtitle: skill.AdditionalInfo
5869
+ ? "<div style=\"font-size: 12px;\">".concat(skill.AdditionalInfo, "</div>")
5870
+ : "",
5754
5871
  mainInfos: [],
5755
5872
  subInfoGroups: [],
5756
- fullHeight: fullHeight,
5757
5873
  };
5758
- var setHasSkillModifiers = false;
5759
- var jobstyles = [];
5760
- var itemCombats = false;
5761
- if (item.skills != null && item.skills.length > 0) {
5762
- item.skills.forEach(function (itemSkill) {
5763
- if (itemSkill.jobstyle != null) {
5764
- setHasSkillModifiers = true;
5765
- itemCombats = true;
5766
- if (!jobstyles.includes(itemSkill.jobstyle)) {
5767
- jobstyles.push(itemSkill.jobstyle);
5768
- }
5769
- }
5770
- });
5771
- }
5772
- if (((_d = item.setBonus) === null || _d === void 0 ? void 0 : _d.setBonusStages) != null) {
5773
- item.setBonus.setBonusStages.forEach(function (stage) {
5774
- if (stage.skillModifiers != null && stage.skillModifiers.length > 0) {
5775
- setHasSkillModifiers = true;
5776
- stage.skillModifiers.forEach(function (modifier) {
5777
- if (!jobstyles.includes(modifier.jobstyle)) {
5778
- jobstyles.push(modifier.jobstyle);
5779
- }
5780
- });
5781
- }
5782
- });
5783
- }
5784
- //top part
5785
- AddMainInfo(tooltipBaseProps.mainInfos, item);
5786
- AddSubInfo(tooltipBaseProps.mainInfos, item);
5787
- AddSkillTitles(tooltipBaseProps.mainInfos, item, itemCombats, jobstyle);
5788
- AddCooldowns(tooltipBaseProps.mainInfos, item);
5789
- AddItemStats(tooltipBaseProps.mainInfos, item);
5790
- AddItemRandomStats(tooltipBaseProps.mainInfos, item);
5791
- //bottom part
5792
- AddGearScore(tooltipBaseProps.subInfoGroups, item, debug);
5793
- AddJobstyleToggles(setHasSkillModifiers, tooltipBaseProps.subInfoGroups, jobstyles, jobstyle, setJobstyle);
5794
- AddTopText(tooltipBaseProps.subInfoGroups, item);
5795
- AddSkillDescriptions(tooltipBaseProps.subInfoGroups, item, itemCombats, jobstyle);
5796
- AddSkillModifiers(tooltipBaseProps.subInfoGroups, item, false, jobstyle);
5797
- AddSetBonus(tooltipBaseProps.subInfoGroups, item, jobstyle);
5798
- if (!offline) {
5799
- AddDecomposeResults(tooltipBaseProps.subInfoGroups, item, client, region);
5800
- }
5801
- AddUnityPoints(tooltipBaseProps.subInfoGroups, item);
5802
- AddDescriptions(tooltipBaseProps.subInfoGroups, item);
5803
- AddFlavorText(tooltipBaseProps.subInfoGroups, item);
5804
- AddItemUsableGroup(tooltipBaseProps.subInfoGroups, item);
5805
- AddRequiredLevel(tooltipBaseProps.subInfoGroups, item);
5806
- AddRequiredJobs(tooltipBaseProps.subInfoGroups, item);
5807
- AddBoundToAccount(tooltipBaseProps.subInfoGroups, item);
5808
- AddAbleToTrade(tooltipBaseProps.subInfoGroups, item);
5809
- if (!offline) {
5810
- AddSealingResult(tooltipBaseProps.subInfoGroups, item, client, region);
5811
- AddAccountTransferResult(tooltipBaseProps.subInfoGroups, item, client, region);
5874
+ if (skill.Tooltip != null) {
5875
+ //topPart
5876
+ AddMainText1s(tooltipBaseProps.mainInfos, skill);
5877
+ AddMainText2s(tooltipBaseProps.mainInfos, skill);
5878
+ //bottomPart
5879
+ AddSubTexts(tooltipBaseProps.subInfoGroups, skill);
5880
+ AddBreakValue(tooltipBaseProps.subInfoGroups, skill);
5881
+ AddPvpModifiers(tooltipBaseProps.subInfoGroups, skill);
5882
+ AddBoundaries(tooltipBaseProps.subInfoGroups, skill);
5883
+ AddConditions(tooltipBaseProps.subInfoGroups, skill);
5884
+ AddStances(tooltipBaseProps.subInfoGroups, skill);
5885
+ if (debug) {
5886
+ AddIds(tooltipBaseProps.subInfoGroups, skill);
5887
+ }
5812
5888
  }
5813
5889
  return React__default["default"].createElement(TooltipBase, __assign({}, tooltipBaseProps));
5814
5890
  }
5815
- function AddMainInfo(mainInfos, item) {
5816
- if (item.mainInfo != null)
5817
- mainInfos.push(React__default["default"].createElement(ItemMainInfo, __assign({}, item)));
5818
- }
5819
- function AddSubInfo(mainInfos, item) {
5820
- if (item.subInfo != null)
5821
- mainInfos.push(React__default["default"].createElement(ItemSubInfo, __assign({}, item)));
5822
- }
5823
- function AddSkillTitles(mainInfos, item, itemCombats, jobstyle) {
5824
- var itemSkills = item.skills;
5825
- if (itemSkills == null || itemSkills.length == 0)
5826
- return;
5827
- mainInfos.push(React__default["default"].createElement(ItemSkillTitles, { item: item, itemCombats: itemCombats, jobstyle: jobstyle }));
5828
- }
5829
- function AddCooldowns(mainInfos, item) {
5830
- if ((item.cooldownInMs == null || item.cooldownInMs == 0) &&
5831
- (item.bgCooldownInMs == null || item.bgCooldownInMs == 0))
5832
- return;
5833
- mainInfos.push(React__default["default"].createElement(ItemCooldowns, __assign({}, item)));
5834
- }
5835
- function AddItemStats(mainInfos, item) {
5836
- if (item.stats == null || item.stats.length == 0)
5837
- return;
5838
- mainInfos.push(React__default["default"].createElement(ItemStats, __assign({}, item)));
5891
+ function AddMainText1s(mainInfos, skill) {
5892
+ skill.Tooltip.Main1.forEach(function (main) {
5893
+ mainInfos.push(React__default["default"].createElement("div", { className: "SkillTooltip_mainText", dangerouslySetInnerHTML: { __html: main.Text } }));
5894
+ });
5839
5895
  }
5840
- function AddItemRandomStats(mainInfos, item) {
5841
- if (item.randomStats == null || item.randomStats.length === 0)
5842
- return;
5843
- mainInfos.push(React__default["default"].createElement(ItemRandomStats, __assign({}, item)));
5896
+ function AddMainText2s(mainInfos, skill) {
5897
+ skill.Tooltip.Main2.forEach(function (main) {
5898
+ mainInfos.push(React__default["default"].createElement("div", { className: "SkillTooltip_smallText", dangerouslySetInnerHTML: { __html: main.Text } }));
5899
+ });
5844
5900
  }
5845
- function AddGearScore(subInfoGroups, item, debugMode) {
5846
- if (!debugMode)
5847
- return;
5901
+ function AddSubTexts(subInfoGroups, skill) {
5902
+ var texts = [];
5903
+ skill.Tooltip.Sub.forEach(function (sub, i) {
5904
+ texts.push(React__default["default"].createElement("div", { className: "SkillTooltip_subText" +
5905
+ (i != skill.Tooltip.Sub.length - 1
5906
+ ? " SkillTooltip_subTextMargin"
5907
+ : "") },
5908
+ sub.IconPath != null && sub.IconPath != "" ? (React__default["default"].createElement("img", { src: sub.IconIndex != null && sub.IconIndex > 0
5909
+ ? BuildIconPath(sub.IconPath, sub.IconIndex - 1)
5910
+ : BuildIconPath(sub.IconPath), alt: "", className: "SkillTooltip_conditionIconSmall" })) : null,
5911
+ React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: sub.Text } })));
5912
+ });
5848
5913
  subInfoGroups.push({
5849
5914
  title: "",
5850
- texts: [React__default["default"].createElement(GearScore, __assign({}, item))],
5915
+ texts: texts,
5851
5916
  });
5852
5917
  }
5853
- function AddTopText(subInfoGroups, item) {
5854
- if (item.topText == null)
5918
+ function AddBreakValue(subInfoGroups, skill) {
5919
+ if (skill.BreakValue != null && skill.BreakValue !== "0") {
5920
+ subInfoGroups.push({
5921
+ title: "",
5922
+ texts: [
5923
+ React__default["default"].createElement("div", null,
5924
+ "Breaker value:\u00A0",
5925
+ React__default["default"].createElement("span", { className: "tooltipArg", dangerouslySetInnerHTML: { __html: skill.BreakValue } })),
5926
+ ],
5927
+ });
5928
+ }
5929
+ }
5930
+ function AddPvpModifiers(subInfoGroups, skill) {
5931
+ if (skill.Pvp == null || skill.EqualizedPvp == null)
5855
5932
  return;
5856
5933
  subInfoGroups.push({
5857
5934
  title: "",
5858
- texts: [React__default["default"].createElement(TopText, __assign({}, item))],
5935
+ texts: [React__default["default"].createElement(PvpModifiers, { skill: skill })],
5859
5936
  });
5860
5937
  }
5861
- function AddSkillDescriptions(subInfoGroups, item, itemCombats, jobstyle) {
5862
- if (item.skills == null || item.skills.length == 0)
5938
+ function AddBoundaries(subInfoGroups, skill) {
5939
+ if (skill.Boundaries == null)
5863
5940
  return;
5864
5941
  subInfoGroups.push({
5865
5942
  title: "",
5866
- texts: [
5867
- React__default["default"].createElement(ItemSkillDescriptions, { item: item, itemCombats: itemCombats, jobstyle: jobstyle }),
5868
- ],
5943
+ texts: [React__default["default"].createElement(SkillBoundaries, { skill: skill })],
5869
5944
  });
5870
5945
  }
5871
- function AddSkillModifiers(subInfoGroups, item, isSetBonus, jobstyle) {
5872
- if (item.skillModifierGroups == null || item.skillModifierGroups.length == 0)
5946
+ function AddConditions(subInfoGroups, skill) {
5947
+ if (skill.Tooltip.Condition.length == 0)
5873
5948
  return;
5874
5949
  subInfoGroups.push({
5875
- title: "",
5876
- texts: [
5877
- React__default["default"].createElement(SkillModifiers, { skillModifierGroups: item.skillModifierGroups, isSetBonus: isSetBonus, jobstyle: jobstyle }),
5878
- ],
5950
+ title: "Terms of Use",
5951
+ texts: [React__default["default"].createElement(SkillConditions, { tooltipItems: skill.Tooltip.Condition })],
5879
5952
  });
5880
5953
  }
5881
- function AddSetBonus(subInfoGroups, item, jobstyle) {
5882
- if (item.setBonus == null)
5954
+ function AddStances(subInfoGroups, skill) {
5955
+ if (skill.Tooltip.Stance.length == 0)
5883
5956
  return;
5884
5957
  subInfoGroups.push({
5885
- title: "Set Effect:",
5886
- texts: [React__default["default"].createElement(SetBonus, { item: item, jobstyle: jobstyle })],
5958
+ title: "Switch Position",
5959
+ texts: [React__default["default"].createElement(SkillConditions, { tooltipItems: skill.Tooltip.Stance })],
5887
5960
  });
5888
5961
  }
5889
- function AddDecomposeResults(subInfoGroups, item, client, region) {
5890
- if (item.decomposeRewards == null || item.decomposeRewards.length == 0)
5891
- return;
5892
- var fixedItems = []
5893
- .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.fixedItems; })).filter(function (x) { return x != null; });
5894
- var randomItems = []
5895
- .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.randomItems; })).filter(function (x) { return x != null; });
5896
- var selectItems = []
5897
- .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.selectItems; })).filter(function (x) { return x != null; });
5898
- if (fixedItems.length > 0)
5899
- subInfoGroups.push({
5900
- title: "Guaranteed/Salvage:",
5901
- texts: [
5902
- React__default["default"].createElement(DecomposeResults, { region: region, items: fixedItems, client: client }),
5903
- ],
5904
- });
5905
- if (randomItems.length > 0)
5906
- subInfoGroups.push({
5907
- title: "Random:",
5908
- texts: [
5909
- React__default["default"].createElement(DecomposeResults, { region: region, items: randomItems, client: client }),
5910
- ],
5911
- });
5912
- if (selectItems.length > 0)
5913
- subInfoGroups.push({
5914
- title: "Select:",
5915
- texts: [
5916
- React__default["default"].createElement(DecomposeResults, { region: region, items: selectItems, client: client }),
5917
- ],
5918
- });
5919
- }
5920
- function AddJobstyleToggles(setHasSkillModifiers, subInfoGroups, jobstyles, jobstyle, setJobstyle) {
5921
- if (!setHasSkillModifiers)
5922
- return;
5962
+ function AddIds(subInfoGroups, skill) {
5923
5963
  subInfoGroups.push({
5924
- title: "",
5925
- texts: [
5926
- React__default["default"].createElement(SetBonusToggle, { jobstyles: jobstyles, jobstyle: jobstyle, setJobstyle: setJobstyle }),
5927
- ],
5964
+ title: "Debug info",
5965
+ texts: [React__default["default"].createElement("div", null,
5966
+ "ID: ",
5967
+ skill.ID), React__default["default"].createElement("div", null,
5968
+ "Variation: ",
5969
+ skill.Variation)],
5928
5970
  });
5971
+ }
5972
+
5973
+ var NpcTooltipSettings = /** @class */ (function (_super) {
5974
+ __extends(NpcTooltipSettings, _super);
5975
+ function NpcTooltipSettings(npc, region, grade, client, offline) {
5976
+ if (grade === void 0) { grade = 4; }
5977
+ var _this = _super.call(this, region, client, offline) || this;
5978
+ _this.npc = npc;
5979
+ _this.grade = grade;
5980
+ return _this;
5981
+ }
5982
+ return NpcTooltipSettings;
5983
+ }(TooltipWithNetworkSettings));
5984
+
5985
+ 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";
5986
+ styleInject(css_248z$1);
5987
+
5988
+ function StoreToggle(_a) {
5989
+ var store = _a.store, isActive = _a.isActive, setActive = _a.setActive;
5990
+ return (React__default["default"].createElement("button", { className: "NpcTooltip_toggleButton " +
5991
+ (isActive ? "NpcTooltip_toggleButton-active" : ""), onClick: setActive }, store.Icon != null && store.Icon != "" ? (React__default["default"].createElement("img", { src: store.Icon, alt: store.Name })) : (React__default["default"].createElement("span", null, store.Name))));
5992
+ }
5993
+
5994
+ function StoreToggleBar(_a) {
5995
+ var stores = _a.stores, activeTab = _a.activeTab, setActiveTab = _a.setActiveTab;
5996
+ return (React__default["default"].createElement("div", { className: "NpcTooltip_toggleBarContainer" }, stores.map(function (store, i) { return (React__default["default"].createElement(StoreToggle, { key: i, store: store, isActive: activeTab === i, setActive: function () { return setActiveTab(i); } })); })));
5997
+ }
5998
+
5999
+ var BuyLimitReset;
6000
+ (function (BuyLimitReset) {
6001
+ BuyLimitReset[BuyLimitReset["Day"] = 0] = "Day";
6002
+ BuyLimitReset[BuyLimitReset["Week"] = 1] = "Week";
6003
+ BuyLimitReset[BuyLimitReset["Month"] = 2] = "Month";
6004
+ BuyLimitReset[BuyLimitReset["Absolute"] = 3] = "Absolute";
6005
+ })(BuyLimitReset || (BuyLimitReset = {}));
6006
+ var BuyLimitType;
6007
+ (function (BuyLimitType) {
6008
+ BuyLimitType[BuyLimitType["Character"] = 0] = "Character";
6009
+ BuyLimitType[BuyLimitType["Account"] = 1] = "Account";
6010
+ })(BuyLimitType || (BuyLimitType = {}));
6011
+
6012
+ function ItemBuyLimit(_a) {
6013
+ var limit = _a.limit;
6014
+ if (limit == null)
6015
+ return null;
6016
+ return (React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemLimit" }, GetStringForBuyLimitType(limit.LimitType) +
6017
+ "Limit: " +
6018
+ limit.Amount +
6019
+ "/" +
6020
+ GetStringForBuyLimitReset(limit.LimitReset)));
5929
6021
  }
5930
- function AddDescriptions(subInfoGroups, item) {
5931
- if (item.descriptions == null || item.descriptions.length == 0)
5932
- return;
5933
- item.descriptions
5934
- .filter(function (x) { return x.text != null && x.text != ""; })
5935
- .forEach(function (description) {
5936
- subInfoGroups.push({
5937
- title: description.title,
5938
- texts: [React__default["default"].createElement(ItemDescriptionText, { htmlString: description.text })],
5939
- });
5940
- });
6022
+ function GetStringForBuyLimitType(type) {
6023
+ switch (type) {
6024
+ case BuyLimitType.Account:
6025
+ return "Account ";
6026
+ case BuyLimitType.Character:
6027
+ return "Character ";
6028
+ default:
6029
+ return "";
6030
+ }
5941
6031
  }
5942
- function AddFlavorText(subInfoGroups, item) {
5943
- if (item.flavorText == null || item.flavorText == "")
5944
- return;
5945
- subInfoGroups.push({
5946
- title: "",
5947
- texts: [React__default["default"].createElement(ItemDescriptionText, { htmlString: item.flavorText })],
5948
- });
6032
+ function GetStringForBuyLimitReset(reset) {
6033
+ switch (reset) {
6034
+ case BuyLimitReset.Day:
6035
+ return "Day";
6036
+ case BuyLimitReset.Week:
6037
+ return "Week ";
6038
+ case BuyLimitReset.Month:
6039
+ return "Month";
6040
+ default:
6041
+ return "";
6042
+ }
6043
+ }
6044
+
6045
+ function Money(_a) {
6046
+ var money = _a.money;
6047
+ var bnsmoney = getMoneyObj(money);
6048
+ if (bnsmoney == null)
6049
+ return null;
6050
+ return (React__default["default"].createElement("div", { className: "NpcTooltip_moneyContainer" },
6051
+ bnsmoney.Gold > 0 ? (React__default["default"].createElement("span", null,
6052
+ bnsmoney.Gold,
6053
+ React__default["default"].createElement("img", { src: BuildIconPath("gold"), alt: "" }))) : null,
6054
+ bnsmoney.Silver > 0 ? (React__default["default"].createElement("span", null,
6055
+ bnsmoney.Silver,
6056
+ React__default["default"].createElement("img", { src: BuildIconPath("silver"), alt: "" }))) : null,
6057
+ bnsmoney.Copper > 0 ? (React__default["default"].createElement("span", null,
6058
+ bnsmoney.Copper,
6059
+ React__default["default"].createElement("img", { src: BuildIconPath("copper"), alt: "" }))) : null));
6060
+ }
6061
+
6062
+ function StoreItemBuyPriceEntry(_a) {
6063
+ var _this = this;
6064
+ var itemRef = _a.itemRef, client = _a.client;
6065
+ var _b = React.useState(), item = _b[0], setItem = _b[1];
6066
+ React.useEffect(function () {
6067
+ if (client == null)
6068
+ return;
6069
+ (function () { return __awaiter(_this, void 0, void 0, function () {
6070
+ var _a;
6071
+ return __generator(this, function (_b) {
6072
+ switch (_b.label) {
6073
+ case 0:
6074
+ _a = setItem;
6075
+ return [4 /*yield*/, client.GetItem(itemRef.itemId, itemRef.itemLevel)];
6076
+ case 1:
6077
+ _a.apply(void 0, [_b.sent()]);
6078
+ return [2 /*return*/];
6079
+ }
6080
+ });
6081
+ }); })();
6082
+ }, [itemRef, client]);
6083
+ var tooltipItemSettings = new ItemTooltipSettings(item, client.region, client);
6084
+ var wrapperSettings = new TooltipWrapperSettings(undefined, undefined, undefined, "click", undefined);
6085
+ return (React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntry" }, item ? (React__default["default"].createElement(TooltipWrapper, { settings: wrapperSettings, tooltipSettings: tooltipItemSettings },
6086
+ React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntryContainer" },
6087
+ React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntryContainer-shadow" }),
6088
+ React__default["default"].createElement("img", { className: "TooltipBase_iconbg-grade-" + item.grade, src: BuildIconPath(item.icon.iconPath), alt: "" }),
6089
+ React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntryCount" },
6090
+ React__default["default"].createElement("span", null, itemRef.min))))) : null));
6091
+ }
6092
+
6093
+ function NpcStoreEntry(_a) {
6094
+ var _this = this;
6095
+ var _b, _c;
6096
+ var data = _a.data, client = _a.client;
6097
+ var _d = React.useState(), item = _d[0], setItem = _d[1];
6098
+ React.useEffect(function () {
6099
+ if (client == null)
6100
+ return;
6101
+ (function () { return __awaiter(_this, void 0, void 0, function () {
6102
+ var res;
6103
+ return __generator(this, function (_a) {
6104
+ switch (_a.label) {
6105
+ case 0: return [4 /*yield*/, client.GetItem(data.Item.itemId, data.Item.itemLevel)];
6106
+ case 1:
6107
+ res = _a.sent();
6108
+ setItem(res);
6109
+ return [2 /*return*/];
6110
+ }
6111
+ });
6112
+ }); })();
6113
+ }, [data, client]);
6114
+ if (item != undefined) {
6115
+ var tooltipItemSettings = new ItemTooltipSettings(item, client.region, client);
6116
+ var wrapperSettings = new TooltipWrapperSettings(undefined, undefined, undefined, "click", undefined);
6117
+ return (React__default["default"].createElement("div", { className: "NpcTooltip_storeEntry" },
6118
+ React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemIconName" },
6119
+ React__default["default"].createElement(TooltipWrapper, { settings: wrapperSettings, tooltipSettings: tooltipItemSettings },
6120
+ React__default["default"].createElement("img", { className: "TooltipBase_iconbg-grade-" + item.grade, src: BuildIconPath(item.icon.iconPath), alt: "" })),
6121
+ React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemNameLimit" },
6122
+ React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemName TooltipBase_grade-" + item.grade, dangerouslySetInnerHTML: { __html: item.name } }),
6123
+ React__default["default"].createElement(ItemBuyLimit, { limit: data.Limit }))),
6124
+ React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntriesContainer" },
6125
+ ((_b = data.BuyPrice.Items) === null || _b === void 0 ? void 0 : _b.length) > 0 ? (React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntries " +
6126
+ (data.BuyPrice.Money > 0
6127
+ ? "NpcTooltip_itemBuyPriceEntries-moneyMargin"
6128
+ : "") }, (_c = data.BuyPrice.Items) === null || _c === void 0 ? void 0 : _c.map(function (itemCountRef, i) { return (React__default["default"].createElement(StoreItemBuyPriceEntry, { itemRef: itemCountRef, client: client, key: i })); }))) : null,
6129
+ React__default["default"].createElement(Money, { money: data.BuyPrice.Money }))));
6130
+ }
6131
+ else {
6132
+ return null;
6133
+ }
6134
+ }
6135
+
6136
+ function NpcStores(_a) {
6137
+ var stores = _a.stores, activeTab = _a.activeTab, client = _a.client;
6138
+ var activeStore = stores[activeTab];
6139
+ return (React__default["default"].createElement("div", null, activeStore.Entries.map(function (entry, i) { return (React__default["default"].createElement(NpcStoreEntry, { key: i, data: entry, client: client })); })));
6140
+ }
6141
+
6142
+ function NpcTooltip(_a) {
6143
+ var _this = this;
6144
+ var _b, _c;
6145
+ var settings = _a.settings;
6146
+ var npc = settings.npc;
6147
+ var _d = React.useState(0), activeTab = _d[0], setActiveTab = _d[1];
6148
+ var _e = React.useState(), client = _e[0], setClient = _e[1];
6149
+ React.useEffect(function () {
6150
+ if (!settings.offline) {
6151
+ if (settings.client == undefined) {
6152
+ (function () { return __awaiter(_this, void 0, void 0, function () {
6153
+ return __generator(this, function (_a) {
6154
+ setClient(new ItemDownloadClient(settings.region));
6155
+ return [2 /*return*/];
6156
+ });
6157
+ }); })();
6158
+ }
6159
+ else {
6160
+ setClient(settings.client);
6161
+ }
6162
+ }
6163
+ }, [settings.offline]);
6164
+ var tooltipBaseProps = {
6165
+ title: npc.Name,
6166
+ grade: (_b = settings.grade) !== null && _b !== void 0 ? _b : 4,
6167
+ id: npc.Alias,
6168
+ subtitle: (_c = npc.Title) !== null && _c !== void 0 ? _c : "",
6169
+ fullHeight: settings.fullHeight,
6170
+ subInfoGroups: [],
6171
+ };
6172
+ //no top part
6173
+ AddStoreToggles(tooltipBaseProps.subInfoGroups, activeTab, setActiveTab, npc.Stores);
6174
+ AddStores(tooltipBaseProps.subInfoGroups, activeTab, client, npc.Stores);
6175
+ return React__default["default"].createElement(TooltipBase, __assign({}, tooltipBaseProps));
5949
6176
  }
5950
- function AddItemUsableGroup(subInfoGroups, item) {
5951
- if (IsNullOrEmpty(item.usableGroup))
6177
+ function AddStoreToggles(subInfoGroups, activeTab, setActiveTab, Stores) {
6178
+ if (Stores == null || Stores.length <= 0)
5952
6179
  return;
5953
6180
  subInfoGroups.push({
5954
6181
  title: "",
5955
- texts: [React__default["default"].createElement(RawText, { htmlString: item.usableGroup })],
6182
+ texts: [
6183
+ React__default["default"].createElement(StoreToggleBar, { stores: Stores, activeTab: activeTab, setActiveTab: setActiveTab }),
6184
+ ],
5956
6185
  });
5957
6186
  }
5958
- function AddRequiredLevel(subInfoGroups, item) {
5959
- if (item.levelRequired == null || item.levelRequired <= 1)
6187
+ function AddStores(subInfoGroups, activeTab, client, Stores) {
6188
+ if (Stores == null || Stores.length <= 0)
5960
6189
  return;
5961
6190
  subInfoGroups.push({
5962
6191
  title: "",
5963
6192
  texts: [
5964
- React__default["default"].createElement(TextWithNumber, { text: "Requires Level ", number: item.levelRequired }),
5965
- ],
5966
- });
5967
- }
5968
- function AddRequiredJobs(subInfoGroups, item) {
5969
- if (item.classRequired == null || item.classRequired.length == 0)
5970
- return;
5971
- var enJobNames = item.classRequired.map(function (x) { return x.enName; });
5972
- subInfoGroups.push({
5973
- title: "",
5974
- texts: [
5975
- React__default["default"].createElement(StringEnumerationWithText, { enumeration: enJobNames, textAfter: " Only", textBefore: "" }),
5976
- ],
5977
- });
5978
- }
5979
- function AddBoundToAccount(subInfoGroups, item) {
5980
- if (item.boundToAccount == null || item.boundToAccount == false)
5981
- return;
5982
- subInfoGroups.push({
5983
- title: "",
5984
- texts: [React__default["default"].createElement("div", null, "Bound to Account")],
5985
- });
5986
- }
5987
- function AddAbleToTrade(subInfoGroups, item) {
5988
- if (item.unableToTrade == null || item.unableToTrade == false)
5989
- return;
5990
- subInfoGroups.push({
5991
- title: "",
5992
- texts: [React__default["default"].createElement("div", null, "Unable to Trade")],
5993
- });
5994
- }
5995
- function AddSealingResult(subInfoGroups, item, client, region) {
5996
- if (item.sealing == null ||
5997
- item.sealing.sealAcquireItemId == null ||
5998
- item.sealing.sealConsumeItems.filter(function (x) { return x.min != 0; }).length == 0)
5999
- return;
6000
- subInfoGroups.push({
6001
- title: "Can be resealed with:",
6002
- texts: [React__default["default"].createElement(SealingResult, { region: region, item: item, client: client })],
6003
- });
6004
- }
6005
- function AddAccountTransferResult(subInfoGroups, item, client, region) {
6006
- if (item.accountTransfer == null ||
6007
- item.accountTransfer.requiredItems == null ||
6008
- item.accountTransfer.requiredItems.length == 0)
6009
- return;
6010
- subInfoGroups.push({
6011
- title: "Can be transferred with:",
6012
- texts: [React__default["default"].createElement(AccountTransfer, { region: region, item: item, client: client })],
6013
- });
6014
- }
6015
- function AddUnityPoints(subInfoGroups, item) {
6016
- if (item.setPoints == null || item.refinementPoints == null)
6017
- return;
6018
- if (item.setPoints === 0)
6019
- return;
6020
- if (item.refinementPoints === 0)
6021
- return;
6022
- subInfoGroups.push({
6023
- title: "",
6024
- texts: [
6025
- React__default["default"].createElement("span", null,
6026
- "Splendor Stone Set Points: ",
6027
- item.setPoints),
6028
- React__default["default"].createElement("span", null,
6029
- "Splendor Stone Refinement Points: ",
6030
- item.refinementPoints),
6193
+ React__default["default"].createElement(NpcStores, { stores: Stores, activeTab: activeTab, client: client }),
6031
6194
  ],
6032
6195
  });
6033
6196
  }
6034
6197
 
6035
- var css_248z$3 = "";
6036
- styleInject(css_248z$3);
6037
-
6038
- function JsonTooltip(props) {
6039
- var tooltipProps = {
6040
- title: props.title,
6041
- grade: props.grade,
6042
- icon: props.icon,
6043
- mainInfos: JsonArrayToJsxArray(props.mainInfos),
6044
- subtitle: props.subtitle,
6045
- subInfoGroups: JsonSubInfoToJsxSubInfo(props.subInfoGroups),
6046
- };
6047
- return React__default["default"].createElement(TooltipBase, __assign({}, tooltipProps));
6048
- }
6049
- function JsonSubInfoToJsxSubInfo(subInfoGroups) {
6050
- if (subInfoGroups == undefined)
6051
- return undefined;
6052
- var result = [];
6053
- subInfoGroups.forEach(function (subInfoGroup) {
6054
- var jsxSubInfoGroup = {
6055
- title: subInfoGroup.title,
6056
- texts: JsonArrayToJsxArray(subInfoGroup.texts),
6057
- };
6058
- result.push(jsxSubInfoGroup);
6059
- });
6060
- return result;
6061
- }
6062
- function JsonArrayToJsxArray(stringArray) {
6063
- if (stringArray == undefined)
6064
- return undefined;
6065
- var jsxArray = [];
6066
- stringArray.forEach(function (mainInfo) {
6067
- jsxArray.push(React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: mainInfo } }));
6068
- });
6069
- return jsxArray;
6198
+ function TooltipWrapper(_a) {
6199
+ var _b;
6200
+ var settings = _a.settings, tooltipSettings = _a.tooltipSettings, children = _a.children, jobstyleOverride = _a.jobstyleOverride;
6201
+ if (settings == undefined) {
6202
+ settings = new TooltipWrapperSettings();
6203
+ }
6204
+ if (settings == null || tooltipSettings == null)
6205
+ return null;
6206
+ var spanRef = React.useRef(null);
6207
+ var _c = React.useState(null), childRef = _c[0], setChildRef = _c[1];
6208
+ /**
6209
+ * Mount the temporary span element.
6210
+ * retrieve and store the target element's reference.
6211
+ */
6212
+ React.useEffect(function () {
6213
+ if (spanRef.current) {
6214
+ setChildRef(spanRef.current.previousElementSibling);
6215
+ }
6216
+ return function () { return setChildRef(null); };
6217
+ }, []);
6218
+ var _d = React.useState(true); _d[0]; var setIsOffline = _d[1];
6219
+ var grade = 4;
6220
+ var content = null;
6221
+ if (tooltipSettings instanceof ItemTooltipSettings) {
6222
+ content = (React__default["default"].createElement(ItemTooltip, { jobstyleOverride: jobstyleOverride, settings: tooltipSettings }));
6223
+ grade = tooltipSettings.data.grade;
6224
+ }
6225
+ if (tooltipSettings instanceof SkillTooltipSettings) {
6226
+ content = React__default["default"].createElement(SkillTooltip, { settings: tooltipSettings });
6227
+ }
6228
+ if (tooltipSettings instanceof NpcTooltipSettings) {
6229
+ content = React__default["default"].createElement(NpcTooltip, { settings: tooltipSettings });
6230
+ grade = (_b = tooltipSettings.grade) !== null && _b !== void 0 ? _b : 4;
6231
+ }
6232
+ return (React__default["default"].createElement(React__default["default"].Fragment, null,
6233
+ children,
6234
+ childRef ? (React__default["default"].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__default["default"].createElement("span", { "data-testid": "TooltipWrapper", ref: spanRef, style: { display: "none" } }))));
6070
6235
  }
6071
6236
 
6072
- 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";
6073
- styleInject(css_248z$2);
6237
+ function ItemIconNameDiv(_a) {
6238
+ var _this = this;
6239
+ var _b;
6240
+ var item = _a.item, region = _a.region, client = _a.client, _c = _a.showRandomIcon, showRandomIcon = _c === void 0 ? false : _c;
6241
+ var _d = React.useState(), itemData = _d[0], setItemData = _d[1];
6242
+ React.useEffect(function () {
6243
+ if (client)
6244
+ (function () { return __awaiter(_this, void 0, void 0, function () {
6245
+ var _a;
6246
+ return __generator(this, function (_b) {
6247
+ switch (_b.label) {
6248
+ case 0:
6249
+ _a = setItemData;
6250
+ return [4 /*yield*/, client.GetItem(item.itemId, item.itemLevel)];
6251
+ case 1:
6252
+ _a.apply(void 0, [_b.sent()]);
6253
+ return [2 /*return*/];
6254
+ }
6255
+ });
6256
+ }); })();
6257
+ }, [item, client]);
6258
+ if (itemData) {
6259
+ if (itemData.grade != 0) {
6260
+ var itemSettings = new ItemTooltipSettings(itemData);
6261
+ itemSettings.client = client;
6262
+ itemSettings.region = region;
6263
+ return (React__default["default"].createElement("div", { className: "ItemTooltip_itemiconnamediv" },
6264
+ React__default["default"].createElement(TooltipWrapper, { settings: new TooltipWrapperSettings(), tooltipSettings: itemSettings },
6265
+ React__default["default"].createElement("img", { className: "ItemTooltip_itemIconSmall", alt: "", src: BuildIconPath((_b = itemData.icon) === null || _b === void 0 ? void 0 : _b.iconPath) })),
6266
+ React__default["default"].createElement("div", { className: "ItemTooltip_itemNameRandomDiv" },
6267
+ React__default["default"].createElement("span", { className: "TooltipBase_grade-" + itemData.grade, dangerouslySetInnerHTML: { __html: itemData.name } }),
6268
+ showRandomIcon ? (React__default["default"].createElement(React__default["default"].Fragment, null,
6269
+ "\u00A0",
6270
+ React__default["default"].createElement("div", null,
6271
+ React__default["default"].createElement("img", { style: {
6272
+ width: 36,
6273
+ height: 18,
6274
+ margin: "0 1px",
6275
+ top: 4,
6276
+ position: "relative",
6277
+ }, alt: "", src: "https://lean.bns.tools/bns/icons/00015590/Tag_Random.png" })))) : null)));
6278
+ }
6279
+ else
6280
+ return null;
6281
+ }
6282
+ else {
6283
+ return (React__default["default"].createElement("div", { className: "ItemTooltip_itemIconLoading" },
6284
+ React__default["default"].createElement("div", { className: "dot-elastic" })));
6285
+ }
6286
+ }
6074
6287
 
6075
- function getButtonIconPath(button) {
6076
- var _a;
6077
- if (buttonIconMapping.find(function (x) { return x.button === button; }) == null)
6288
+ function DecomposeResults(props) {
6289
+ if (props.client)
6290
+ return (React__default["default"].createElement("div", null, props.items
6291
+ .filter(function (x) { return x != null; })
6292
+ .map(function (item, i) {
6293
+ return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: item.itemId + "-" + item.itemLevel + "_" + i },
6294
+ React__default["default"].createElement(ItemIconNameDiv, { region: props.region, item: item, client: props.client, showRandomIcon: item.isRandom }),
6295
+ item.isRandom ? null : (React__default["default"].createElement(React__default["default"].Fragment, null,
6296
+ "\u00A0",
6297
+ item.isMinMax ? (React__default["default"].createElement("span", null, GetRangeString(item.min, item.max))) : (React__default["default"].createElement("span", null, GetRangeString(item.min)))))));
6298
+ })));
6299
+ else
6078
6300
  return null;
6079
- return ("/00072858" + ((_a = buttonIconMapping.find(function (x) { return x.button === button; })) === null || _a === void 0 ? void 0 : _a.path));
6080
- }
6081
- var buttonIconMapping = [
6082
- {
6083
- button: "F",
6084
- path: "/Key_Alphabet_F",
6085
- },
6086
- {
6087
- button: "Q",
6088
- path: "/Key_Alphabet_Q",
6089
- },
6090
- {
6091
- button: "E",
6092
- path: "/Key_Alphabet_E",
6093
- },
6094
- {
6095
- button: "S",
6096
- path: "/Key_Alphabet_S",
6097
- },
6098
- {
6099
- button: "Z",
6100
- path: "/Key_Alphabet_Z",
6101
- },
6102
- {
6103
- button: "X",
6104
- path: "/Key_Alphabet_X",
6105
- },
6106
- {
6107
- button: "C",
6108
- path: "/Key_Alphabet_C",
6109
- },
6110
- {
6111
- button: "V",
6112
- path: "/Key_Alphabet_V",
6113
- },
6114
- {
6115
- button: "W",
6116
- path: "/Key_Alphabet_W",
6117
- },
6118
- {
6119
- button: "G",
6120
- path: "/Key_Alphabet_G",
6121
- },
6122
- {
6123
- button: "B",
6124
- path: "/Key_Alphabet_B",
6125
- },
6126
- {
6127
- button: "SPACE",
6128
- path: "/Key_Space_Big",
6129
- },
6130
- {
6131
- button: "TAB",
6132
- path: "/Key_Tab_Big",
6133
- },
6134
- {
6135
- button: "1",
6136
- path: "/Key_Num_1",
6137
- },
6138
- {
6139
- button: "2",
6140
- path: "/Key_Num_2",
6141
- },
6142
- {
6143
- button: "3",
6144
- path: "/Key_Num_3",
6145
- },
6146
- {
6147
- button: "4",
6148
- path: "/Key_Num_4",
6149
- },
6150
- {
6151
- button: "LMB",
6152
- path: "/GameUI_Tag_MouseL",
6153
- },
6154
- {
6155
- button: "RMB",
6156
- path: "/GameUI_Tag_MouseR",
6157
- },
6158
- ];
6301
+ }
6159
6302
 
6160
- function SkillIconWithButton(_a) {
6161
- var skill = _a.skill;
6162
- return (React__default["default"].createElement("div", { className: "SkillTooltip_skillIconContainer" },
6163
- React__default["default"].createElement("img", { className: "SkillTooltip_skillIcon", src: BuildIconPath(skill.IconPath, skill.IconIndex - 1), alt: "" }),
6164
- getButtonIconPath(getNormalizedButton(skill)) ? (React__default["default"].createElement("img", { className: "SkillTooltip_buttonIcon" +
6165
- " " +
6166
- (getNormalizedButton(skill) === "RMB" ||
6167
- getNormalizedButton(skill) === "LMB"
6168
- ? "SkillTooltip_buttonIconMouse"
6169
- : ""), src: BuildIconPath(getButtonIconPath(getNormalizedButton(skill))), alt: "" })) : null));
6303
+ function SetBonusToggle(_a) {
6304
+ var jobstyles = _a.jobstyles, jobstyle = _a.jobstyle, setJobstyle = _a.setJobstyle;
6305
+ return (React__default["default"].createElement("div", { className: "ItemTooltip_jobstyleToggleContainer" }, jobstyles.map(function (style) { return (React__default["default"].createElement("button", { key: style, className: "ItemTooltip_jobstyleButton" +
6306
+ (style === jobstyle ? " ItemTooltip_jobstyleButton-active" : ""), onClick: function (e) {
6307
+ e.stopPropagation();
6308
+ setJobstyle(style);
6309
+ } }, GetJobStyleNameString(style))); })));
6170
6310
  }
6171
6311
 
6172
- function SkillTooltipBoundary(_a) {
6173
- 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;
6174
- return (React__default["default"].createElement("div", { className: "SkillTooltip_boundary" },
6175
- React__default["default"].createElement("div", { className: "SkillTooltip_boundaryHead" }, head),
6176
- React__default["default"].createElement("div", { className: "SkillTooltip_boundaryBody " +
6177
- (pvpModifier ? "SkillTooltip_boundaryBodyModifier " : "") +
6178
- bodyClass +
6179
- (hasIcon ? " SkillTooltip_boundaryHasIcon " : "") }, body)));
6312
+ function ItemDescriptionText(_a) {
6313
+ var htmlString = _a.htmlString;
6314
+ var textSplit = htmlString.replace("<br/>", "<br />").split("<br />");
6315
+ return (React__default["default"].createElement("div", { className: "ItemTooltip_descriptions TooltipBase_flex-col" }, textSplit.map(function (htmlText, i) { return (React__default["default"].createElement("span", { key: i, dangerouslySetInnerHTML: {
6316
+ __html: ReplaceIconsInHtmlString(htmlText),
6317
+ } })); })));
6180
6318
  }
6181
6319
 
6182
- function SkillTooltipBoundaryContainer(_a) {
6183
- var children = _a.children;
6184
- return React__default["default"].createElement("div", { className: "SkillTooltip_boundaryContainer" }, children);
6320
+ function RawText(_a) {
6321
+ var htmlString = _a.htmlString;
6322
+ return (React__default["default"].createElement("div", { className: "ItemTooltip_raw", dangerouslySetInnerHTML: { __html: htmlString } }));
6185
6323
  }
6186
6324
 
6187
- function PvpModifiers(_a) {
6188
- var skill = _a.skill;
6189
- return (React__default["default"].createElement(SkillTooltipBoundaryContainer, null,
6190
- React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", null, "Equalized PvP"), body: React__default["default"].createElement("span", null,
6191
- "x\u00A0",
6192
- React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: skill.EqualizedPvp } })), pvpModifier: true }),
6193
- React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", null, "PvP"), body: React__default["default"].createElement("span", null,
6194
- "x\u00A0",
6195
- React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: skill.Pvp } })), pvpModifier: true })));
6325
+ function TextWithNumber(_a) {
6326
+ var text = _a.text, number = _a.number;
6327
+ return (React__default["default"].createElement("div", null,
6328
+ text,
6329
+ number));
6196
6330
  }
6197
6331
 
6198
- function SkillBoundaries(_a) {
6199
- var skill = _a.skill;
6200
- var _b = React__default["default"].useState(false), hasIcon = _b[0], setHasIcon = _b[1];
6201
- React__default["default"].useEffect(function () {
6202
- setHasIcon(skill.Boundaries.Range.Shape != null && skill.Boundaries.Range.Shape != "");
6203
- }, [skill]);
6204
- return (React__default["default"].createElement(SkillTooltipBoundaryContainer, null,
6205
- React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
6206
- __html: skill.Boundaries.Distance.Name,
6207
- } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
6208
- __html: skill.Boundaries.Distance.Value,
6209
- } }), hasIcon: hasIcon }),
6210
- React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
6211
- __html: skill.Boundaries.Range.Name,
6212
- } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
6213
- __html: skill.Boundaries.Range.Value,
6214
- } }), hasIcon: hasIcon, bodyClass: skill.Boundaries.Range.Shape }),
6215
- React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
6216
- __html: skill.Boundaries.Cast.Name,
6217
- } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
6218
- __html: skill.Boundaries.Cast.Value,
6219
- } }), hasIcon: hasIcon }),
6220
- React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
6221
- __html: skill.Boundaries.Recycle.Name,
6222
- } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
6223
- __html: skill.Boundaries.Recycle.Value,
6224
- } }), hasIcon: hasIcon })));
6332
+ function StringEnumerationWithText(_a) {
6333
+ var enumeration = _a.enumeration, textBefore = _a.textBefore, textAfter = _a.textAfter;
6334
+ return (React__default["default"].createElement("div", null,
6335
+ textBefore,
6336
+ enumeration.map(function (item, i) { return (React__default["default"].createElement("span", { key: i },
6337
+ item,
6338
+ i != enumeration.length - 1 ? ", " : null)); }),
6339
+ textAfter));
6225
6340
  }
6226
6341
 
6227
- function SkillConditions(_a) {
6228
- var tooltipItems = _a.tooltipItems;
6229
- return (React__default["default"].createElement(React__default["default"].Fragment, null, tooltipItems.map(function (sub, i) { return (React__default["default"].createElement("div", { key: i, className: "SkillTooltip_conditionRow" },
6230
- sub.IconPath != null ? (React__default["default"].createElement("img", { src: sub.IconIndex != null && sub.IconIndex > 0
6231
- ? BuildIconPath(sub.IconPath, sub.IconIndex - 1)
6232
- : BuildIconPath(sub.IconPath), alt: "", className: "SkillTooltip_conditionIcon" })) : null,
6233
- React__default["default"].createElement("div", { key: i, dangerouslySetInnerHTML: { __html: sub.Text } }))); })));
6342
+ function SealingResult(_a) {
6343
+ var item = _a.item, client = _a.client, region = _a.region;
6344
+ return (React__default["default"].createElement("div", null, item.sealing.sealConsumeItems
6345
+ .filter(function (x) { return x.min != 0; })
6346
+ .map(function (consumeItem, i) { return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: consumeItem.itemId + "_" + i },
6347
+ React__default["default"].createElement(ItemIconNameDiv, { region: region, item: consumeItem, client: client }),
6348
+ "\u00A0",
6349
+ GetRangeString(consumeItem.min))); })));
6234
6350
  }
6235
6351
 
6236
- function SkillTooltip(_a) {
6237
- var data = _a.data, _b = _a.debug, debug = _b === void 0 ? false : _b;
6238
- var skill = data;
6239
- var tooltipBaseProps = {
6240
- title: skill.Name,
6241
- id: skill.ID + "-" + skill.Variation,
6242
- grade: 4,
6243
- icon: skill.IconPath ? React__default["default"].createElement(SkillIconWithButton, { skill: skill }) : "",
6244
- subtitle: skill.AdditionalInfo
6245
- ? "<div style=\"font-size: 12px;\">".concat(skill.AdditionalInfo, "</div>")
6246
- : "",
6247
- mainInfos: [],
6248
- subInfoGroups: [],
6249
- };
6250
- if (skill.Tooltip != null) {
6251
- //topPart
6252
- AddMainText1s(tooltipBaseProps.mainInfos, skill);
6253
- AddMainText2s(tooltipBaseProps.mainInfos, skill);
6254
- //bottomPart
6255
- AddSubTexts(tooltipBaseProps.subInfoGroups, skill);
6256
- AddBreakValue(tooltipBaseProps.subInfoGroups, skill);
6257
- AddPvpModifiers(tooltipBaseProps.subInfoGroups, skill);
6258
- AddBoundaries(tooltipBaseProps.subInfoGroups, skill);
6259
- AddConditions(tooltipBaseProps.subInfoGroups, skill);
6260
- AddStances(tooltipBaseProps.subInfoGroups, skill);
6261
- if (debug) {
6262
- AddIds(tooltipBaseProps.subInfoGroups, skill);
6352
+ function AccountTransfer(_a) {
6353
+ var item = _a.item, client = _a.client, region = _a.region;
6354
+ return (React__default["default"].createElement("div", null,
6355
+ item.accountTransfer.requiredItems.map(function (consumeItem, i) { return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: consumeItem.itemId + "_" + i },
6356
+ React__default["default"].createElement(ItemIconNameDiv, { region: region, client: client, item: consumeItem }),
6357
+ "\u00A0",
6358
+ GetRangeString(consumeItem.min))); }),
6359
+ item.accountTransfer.moneyCost != null &&
6360
+ item.accountTransfer.moneyCost > 0 ? (React__default["default"].createElement("span", null,
6361
+ item.accountTransfer.moneyCost,
6362
+ "\u00A0copper")) : null));
6363
+ }
6364
+
6365
+ function ItemTooltip(_a) {
6366
+ var _this = this;
6367
+ var _b, _c, _d;
6368
+ var settings = _a.settings, jobstyleOverride = _a.jobstyleOverride;
6369
+ var _e = React.useState("advanced-1"), jobstyle = _e[0], setJobstyle = _e[1];
6370
+ var _f = React.useState(), client = _f[0], setClient = _f[1];
6371
+ React.useEffect(function () {
6372
+ if (settings.offline)
6373
+ return;
6374
+ if (settings.client == undefined) {
6375
+ (function () { return __awaiter(_this, void 0, void 0, function () {
6376
+ return __generator(this, function (_a) {
6377
+ setClient(new ItemDownloadClient(settings.region));
6378
+ return [2 /*return*/];
6379
+ });
6380
+ }); })();
6381
+ }
6382
+ else {
6383
+ setClient(settings.client);
6263
6384
  }
6385
+ }, [settings.offline]);
6386
+ React.useEffect(function () {
6387
+ if (jobstyleOverride != undefined) {
6388
+ setJobstyle(jobstyleOverride);
6389
+ }
6390
+ }, [jobstyleOverride]);
6391
+ var item = settings.data;
6392
+ 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 : "";
6393
+ if (itemCategory == "none")
6394
+ itemCategory = "";
6395
+ var tooltipBaseProps = {
6396
+ title: item.name,
6397
+ grade: item.grade,
6398
+ id: item.id + "-" + item.level,
6399
+ icon: item.icon ? BuildIconPath(item.icon.iconPath) : "",
6400
+ subtitle: itemCategory,
6401
+ mainInfos: [],
6402
+ subInfoGroups: [],
6403
+ fullHeight: settings.fullHeight,
6404
+ };
6405
+ var setHasSkillModifiers = false;
6406
+ var jobstyles = [];
6407
+ var itemCombats = false;
6408
+ if (item.skills != null && item.skills.length > 0) {
6409
+ item.skills.forEach(function (itemSkill) {
6410
+ if (itemSkill.jobstyle != null) {
6411
+ setHasSkillModifiers = true;
6412
+ itemCombats = true;
6413
+ if (!jobstyles.includes(itemSkill.jobstyle)) {
6414
+ jobstyles.push(itemSkill.jobstyle);
6415
+ }
6416
+ }
6417
+ });
6418
+ }
6419
+ if (((_d = item.setBonus) === null || _d === void 0 ? void 0 : _d.setBonusStages) != null) {
6420
+ item.setBonus.setBonusStages.forEach(function (stage) {
6421
+ if (stage.skillModifiers != null && stage.skillModifiers.length > 0) {
6422
+ setHasSkillModifiers = true;
6423
+ stage.skillModifiers.forEach(function (modifier) {
6424
+ if (!jobstyles.includes(modifier.jobstyle)) {
6425
+ jobstyles.push(modifier.jobstyle);
6426
+ }
6427
+ });
6428
+ }
6429
+ });
6430
+ }
6431
+ //top part
6432
+ AddMainInfo(tooltipBaseProps.mainInfos, item);
6433
+ AddSubInfo(tooltipBaseProps.mainInfos, item);
6434
+ AddSkillTitles(tooltipBaseProps.mainInfos, item, itemCombats, jobstyle);
6435
+ AddCooldowns(tooltipBaseProps.mainInfos, item);
6436
+ AddItemStats(tooltipBaseProps.mainInfos, item);
6437
+ AddItemRandomStats(tooltipBaseProps.mainInfos, item);
6438
+ //bottom part
6439
+ AddGearScore(tooltipBaseProps.subInfoGroups, item, settings.debug);
6440
+ AddJobstyleToggles(setHasSkillModifiers, tooltipBaseProps.subInfoGroups, jobstyles, jobstyle, setJobstyle);
6441
+ AddTopText(tooltipBaseProps.subInfoGroups, item);
6442
+ AddSkillDescriptions(tooltipBaseProps.subInfoGroups, item, itemCombats, jobstyle);
6443
+ AddSkillModifiers(tooltipBaseProps.subInfoGroups, item, false, jobstyle);
6444
+ AddSetBonus(tooltipBaseProps.subInfoGroups, item, jobstyle);
6445
+ if (!settings.offline) {
6446
+ AddDecomposeResults(tooltipBaseProps.subInfoGroups, item, client, settings.region);
6447
+ }
6448
+ AddUnityPoints(tooltipBaseProps.subInfoGroups, item);
6449
+ AddDescriptions(tooltipBaseProps.subInfoGroups, item);
6450
+ AddFlavorText(tooltipBaseProps.subInfoGroups, item);
6451
+ AddItemUsableGroup(tooltipBaseProps.subInfoGroups, item);
6452
+ AddRequiredLevel(tooltipBaseProps.subInfoGroups, item);
6453
+ AddRequiredJobs(tooltipBaseProps.subInfoGroups, item);
6454
+ AddBoundToAccount(tooltipBaseProps.subInfoGroups, item);
6455
+ AddAbleToTrade(tooltipBaseProps.subInfoGroups, item);
6456
+ if (!settings.offline) {
6457
+ AddSealingResult(tooltipBaseProps.subInfoGroups, item, client, settings.region);
6458
+ AddAccountTransferResult(tooltipBaseProps.subInfoGroups, item, client, settings.region);
6264
6459
  }
6265
6460
  return React__default["default"].createElement(TooltipBase, __assign({}, tooltipBaseProps));
6266
6461
  }
6267
- function AddMainText1s(mainInfos, skill) {
6268
- skill.Tooltip.Main1.forEach(function (main) {
6269
- mainInfos.push(React__default["default"].createElement("div", { className: "SkillTooltip_mainText", dangerouslySetInnerHTML: { __html: main.Text } }));
6462
+ function AddMainInfo(mainInfos, item) {
6463
+ if (item.mainInfo != null)
6464
+ mainInfos.push(React__default["default"].createElement(ItemMainInfo, __assign({}, item)));
6465
+ }
6466
+ function AddSubInfo(mainInfos, item) {
6467
+ if (item.subInfo != null)
6468
+ mainInfos.push(React__default["default"].createElement(ItemSubInfo, __assign({}, item)));
6469
+ }
6470
+ function AddSkillTitles(mainInfos, item, itemCombats, jobstyle) {
6471
+ var itemSkills = item.skills;
6472
+ if (itemSkills == null || itemSkills.length == 0)
6473
+ return;
6474
+ mainInfos.push(React__default["default"].createElement(ItemSkillTitles, { item: item, itemCombats: itemCombats, jobstyle: jobstyle }));
6475
+ }
6476
+ function AddCooldowns(mainInfos, item) {
6477
+ if ((item.cooldownInMs == null || item.cooldownInMs == 0) &&
6478
+ (item.bgCooldownInMs == null || item.bgCooldownInMs == 0))
6479
+ return;
6480
+ mainInfos.push(React__default["default"].createElement(ItemCooldowns, __assign({}, item)));
6481
+ }
6482
+ function AddItemStats(mainInfos, item) {
6483
+ if (item.stats == null || item.stats.length == 0)
6484
+ return;
6485
+ mainInfos.push(React__default["default"].createElement(ItemStats, __assign({}, item)));
6486
+ }
6487
+ function AddItemRandomStats(mainInfos, item) {
6488
+ if (item.randomStats == null || item.randomStats.length === 0)
6489
+ return;
6490
+ mainInfos.push(React__default["default"].createElement(ItemRandomStats, __assign({}, item)));
6491
+ }
6492
+ function AddGearScore(subInfoGroups, item, debugMode) {
6493
+ if (!debugMode)
6494
+ return;
6495
+ subInfoGroups.push({
6496
+ title: "",
6497
+ texts: [React__default["default"].createElement(GearScore, __assign({}, item))],
6270
6498
  });
6271
6499
  }
6272
- function AddMainText2s(mainInfos, skill) {
6273
- skill.Tooltip.Main2.forEach(function (main) {
6274
- mainInfos.push(React__default["default"].createElement("div", { className: "SkillTooltip_smallText", dangerouslySetInnerHTML: { __html: main.Text } }));
6500
+ function AddTopText(subInfoGroups, item) {
6501
+ if (item.topText == null)
6502
+ return;
6503
+ subInfoGroups.push({
6504
+ title: "",
6505
+ texts: [React__default["default"].createElement(TopText, __assign({}, item))],
6275
6506
  });
6276
6507
  }
6277
- function AddSubTexts(subInfoGroups, skill) {
6278
- var texts = [];
6279
- skill.Tooltip.Sub.forEach(function (sub, i) {
6280
- texts.push(React__default["default"].createElement("div", { className: "SkillTooltip_subText" +
6281
- (i != skill.Tooltip.Sub.length - 1
6282
- ? " SkillTooltip_subTextMargin"
6283
- : "") },
6284
- sub.IconPath != null && sub.IconPath != "" ? (React__default["default"].createElement("img", { src: sub.IconIndex != null && sub.IconIndex > 0
6285
- ? BuildIconPath(sub.IconPath, sub.IconIndex - 1)
6286
- : BuildIconPath(sub.IconPath), alt: "", className: "SkillTooltip_conditionIconSmall" })) : null,
6287
- React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: sub.Text } })));
6508
+ function AddSkillDescriptions(subInfoGroups, item, itemCombats, jobstyle) {
6509
+ if (item.skills == null || item.skills.length == 0)
6510
+ return;
6511
+ subInfoGroups.push({
6512
+ title: "",
6513
+ texts: [
6514
+ React__default["default"].createElement(ItemSkillDescriptions, { item: item, itemCombats: itemCombats, jobstyle: jobstyle }),
6515
+ ],
6288
6516
  });
6517
+ }
6518
+ function AddSkillModifiers(subInfoGroups, item, isSetBonus, jobstyle) {
6519
+ if (item.skillModifierGroups == null || item.skillModifierGroups.length == 0)
6520
+ return;
6289
6521
  subInfoGroups.push({
6290
6522
  title: "",
6291
- texts: texts,
6523
+ texts: [
6524
+ React__default["default"].createElement(SkillModifiers, { skillModifierGroups: item.skillModifierGroups, isSetBonus: isSetBonus, jobstyle: jobstyle }),
6525
+ ],
6292
6526
  });
6293
6527
  }
6294
- function AddBreakValue(subInfoGroups, skill) {
6295
- if (skill.BreakValue != null && skill.BreakValue !== "0") {
6528
+ function AddSetBonus(subInfoGroups, item, jobstyle) {
6529
+ if (item.setBonus == null)
6530
+ return;
6531
+ subInfoGroups.push({
6532
+ title: "Set Effect:",
6533
+ texts: [React__default["default"].createElement(SetBonus, { item: item, jobstyle: jobstyle })],
6534
+ });
6535
+ }
6536
+ function AddDecomposeResults(subInfoGroups, item, client, region) {
6537
+ if (item.decomposeRewards == null || item.decomposeRewards.length == 0)
6538
+ return;
6539
+ var fixedItems = []
6540
+ .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.fixedItems; })).filter(function (x) { return x != null; });
6541
+ var randomItems = []
6542
+ .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.randomItems; })).filter(function (x) { return x != null; });
6543
+ var selectItems = []
6544
+ .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.selectItems; })).filter(function (x) { return x != null; });
6545
+ if (fixedItems.length > 0)
6296
6546
  subInfoGroups.push({
6297
- title: "",
6547
+ title: "Guaranteed/Salvage:",
6298
6548
  texts: [
6299
- React__default["default"].createElement("div", null,
6300
- "Breaker value:\u00A0",
6301
- React__default["default"].createElement("span", { className: "tooltipArg", dangerouslySetInnerHTML: { __html: skill.BreakValue } })),
6549
+ React__default["default"].createElement(DecomposeResults, { region: region, items: fixedItems, client: client }),
6550
+ ],
6551
+ });
6552
+ if (randomItems.length > 0)
6553
+ subInfoGroups.push({
6554
+ title: "Random:",
6555
+ texts: [
6556
+ React__default["default"].createElement(DecomposeResults, { region: region, items: randomItems, client: client }),
6557
+ ],
6558
+ });
6559
+ if (selectItems.length > 0)
6560
+ subInfoGroups.push({
6561
+ title: "Select:",
6562
+ texts: [
6563
+ React__default["default"].createElement(DecomposeResults, { region: region, items: selectItems, client: client }),
6302
6564
  ],
6303
6565
  });
6304
- }
6305
6566
  }
6306
- function AddPvpModifiers(subInfoGroups, skill) {
6307
- if (skill.Pvp == null || skill.EqualizedPvp == null)
6567
+ function AddJobstyleToggles(setHasSkillModifiers, subInfoGroups, jobstyles, jobstyle, setJobstyle) {
6568
+ if (!setHasSkillModifiers)
6308
6569
  return;
6309
6570
  subInfoGroups.push({
6310
6571
  title: "",
6311
- texts: [React__default["default"].createElement(PvpModifiers, { skill: skill })],
6572
+ texts: [
6573
+ React__default["default"].createElement(SetBonusToggle, { jobstyles: jobstyles, jobstyle: jobstyle, setJobstyle: setJobstyle }),
6574
+ ],
6312
6575
  });
6313
6576
  }
6314
- function AddBoundaries(subInfoGroups, skill) {
6315
- if (skill.Boundaries == null)
6577
+ function AddDescriptions(subInfoGroups, item) {
6578
+ if (item.descriptions == null || item.descriptions.length == 0)
6579
+ return;
6580
+ item.descriptions
6581
+ .filter(function (x) { return x.text != null && x.text != ""; })
6582
+ .forEach(function (description) {
6583
+ subInfoGroups.push({
6584
+ title: description.title,
6585
+ texts: [React__default["default"].createElement(ItemDescriptionText, { htmlString: description.text })],
6586
+ });
6587
+ });
6588
+ }
6589
+ function AddFlavorText(subInfoGroups, item) {
6590
+ if (item.flavorText == null || item.flavorText == "")
6316
6591
  return;
6317
6592
  subInfoGroups.push({
6318
6593
  title: "",
6319
- texts: [React__default["default"].createElement(SkillBoundaries, { skill: skill })],
6594
+ texts: [React__default["default"].createElement(ItemDescriptionText, { htmlString: item.flavorText })],
6320
6595
  });
6321
6596
  }
6322
- function AddConditions(subInfoGroups, skill) {
6323
- if (skill.Tooltip.Condition.length == 0)
6597
+ function AddItemUsableGroup(subInfoGroups, item) {
6598
+ if (IsNullOrEmpty(item.usableGroup))
6324
6599
  return;
6325
6600
  subInfoGroups.push({
6326
- title: "Terms of Use",
6327
- texts: [React__default["default"].createElement(SkillConditions, { tooltipItems: skill.Tooltip.Condition })],
6601
+ title: "",
6602
+ texts: [React__default["default"].createElement(RawText, { htmlString: item.usableGroup })],
6328
6603
  });
6329
6604
  }
6330
- function AddStances(subInfoGroups, skill) {
6331
- if (skill.Tooltip.Stance.length == 0)
6605
+ function AddRequiredLevel(subInfoGroups, item) {
6606
+ if (item.levelRequired == null || item.levelRequired <= 1)
6607
+ return;
6608
+ subInfoGroups.push({
6609
+ title: "",
6610
+ texts: [
6611
+ React__default["default"].createElement(TextWithNumber, { text: "Requires Level ", number: item.levelRequired }),
6612
+ ],
6613
+ });
6614
+ }
6615
+ function AddRequiredJobs(subInfoGroups, item) {
6616
+ if (item.classRequired == null || item.classRequired.length == 0)
6617
+ return;
6618
+ var enJobNames = item.classRequired.map(function (x) { return x.enName; });
6619
+ subInfoGroups.push({
6620
+ title: "",
6621
+ texts: [
6622
+ React__default["default"].createElement(StringEnumerationWithText, { enumeration: enJobNames, textAfter: " Only", textBefore: "" }),
6623
+ ],
6624
+ });
6625
+ }
6626
+ function AddBoundToAccount(subInfoGroups, item) {
6627
+ if (item.boundToAccount == null || item.boundToAccount == false)
6628
+ return;
6629
+ subInfoGroups.push({
6630
+ title: "",
6631
+ texts: [React__default["default"].createElement("div", null, "Bound to Account")],
6632
+ });
6633
+ }
6634
+ function AddAbleToTrade(subInfoGroups, item) {
6635
+ if (item.unableToTrade == null || item.unableToTrade == false)
6636
+ return;
6637
+ subInfoGroups.push({
6638
+ title: "",
6639
+ texts: [React__default["default"].createElement("div", null, "Unable to Trade")],
6640
+ });
6641
+ }
6642
+ function AddSealingResult(subInfoGroups, item, client, region) {
6643
+ if (item.sealing == null ||
6644
+ item.sealing.sealAcquireItemId == null ||
6645
+ item.sealing.sealConsumeItems.filter(function (x) { return x.min != 0; }).length == 0)
6646
+ return;
6647
+ subInfoGroups.push({
6648
+ title: "Can be resealed with:",
6649
+ texts: [React__default["default"].createElement(SealingResult, { region: region, item: item, client: client })],
6650
+ });
6651
+ }
6652
+ function AddAccountTransferResult(subInfoGroups, item, client, region) {
6653
+ if (item.accountTransfer == null ||
6654
+ item.accountTransfer.requiredItems == null ||
6655
+ item.accountTransfer.requiredItems.length == 0)
6332
6656
  return;
6333
6657
  subInfoGroups.push({
6334
- title: "Switch Position",
6335
- texts: [React__default["default"].createElement(SkillConditions, { tooltipItems: skill.Tooltip.Stance })],
6658
+ title: "Can be transferred with:",
6659
+ texts: [React__default["default"].createElement(AccountTransfer, { region: region, item: item, client: client })],
6336
6660
  });
6337
6661
  }
6338
- function AddIds(subInfoGroups, skill) {
6662
+ function AddUnityPoints(subInfoGroups, item) {
6663
+ if (item.setPoints == null || item.refinementPoints == null)
6664
+ return;
6665
+ if (item.setPoints === 0)
6666
+ return;
6667
+ if (item.refinementPoints === 0)
6668
+ return;
6339
6669
  subInfoGroups.push({
6340
- title: "Debug info",
6341
- texts: [React__default["default"].createElement("div", null,
6342
- "ID: ",
6343
- skill.ID), React__default["default"].createElement("div", null,
6344
- "Variation: ",
6345
- skill.Variation)],
6670
+ title: "",
6671
+ texts: [
6672
+ React__default["default"].createElement("span", null,
6673
+ "Splendor Stone Set Points: ",
6674
+ item.setPoints),
6675
+ React__default["default"].createElement("span", null,
6676
+ "Splendor Stone Refinement Points: ",
6677
+ item.refinementPoints),
6678
+ ],
6346
6679
  });
6347
6680
  }
6348
6681
 
6349
- 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";
6350
- styleInject(css_248z$1);
6351
-
6352
- var SkillTooltipWrapper = function (_a) {
6353
- 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;
6354
- var spanRef = React.useRef(null);
6355
- var _g = React.useState(null), childRef = _g[0], setChildRef = _g[1];
6356
- /**
6357
- * Mount the temporary span element.
6358
- * retrieve and store the target element's reference.
6359
- */
6360
- React.useEffect(function () {
6361
- if (spanRef.current) {
6362
- setChildRef(spanRef.current.previousElementSibling);
6363
- }
6364
- return function () { return setChildRef(null); };
6365
- }, []);
6366
- return (React__default["default"].createElement(React__default["default"].Fragment, null,
6367
- children,
6368
- childRef ? (React__default["default"].createElement(Tippy, { arrow: showArrow, trigger: trigger, plugins: [followCursor], followCursor: followCursor$1 && !interactive, appendTo: document.body, placement: placement, animation: "fade", interactive: interactive, content: React__default["default"].createElement(SkillTooltip, { data: data, debug: false }), theme: "grade" + 4, reference: childRef })) : (React__default["default"].createElement("span", { ref: spanRef, style: { display: "none" } }))));
6369
- };
6370
-
6371
- exports.ServerRegion = void 0;
6372
- (function (ServerRegion) {
6373
- ServerRegion["EUNA"] = "EUNA";
6374
- ServerRegion["Korea"] = "Korea";
6375
- })(exports.ServerRegion || (exports.ServerRegion = {}));
6376
-
6377
- 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";
6682
+ var css_248z = "";
6378
6683
  styleInject(css_248z);
6379
6684
 
6380
- function StoreToggle(_a) {
6381
- var store = _a.store, isActive = _a.isActive, setActive = _a.setActive;
6382
- return (React__default["default"].createElement("button", { className: "NpcTooltip_toggleButton " +
6383
- (isActive ? "NpcTooltip_toggleButton-active" : ""), onClick: setActive },
6384
- React__default["default"].createElement("span", null, store.Name)));
6385
- }
6386
-
6387
- function StoreToggleBar(_a) {
6388
- var stores = _a.stores, activeTab = _a.activeTab, setActiveTab = _a.setActiveTab;
6389
- return (React__default["default"].createElement("div", { className: "NpcTooltip_toggleBarContainer" }, stores.map(function (store, i) { return (React__default["default"].createElement(StoreToggle, { key: i, store: store, isActive: activeTab === i, setActive: function () { return setActiveTab(i); } })); })));
6390
- }
6391
-
6392
- var BuyLimitReset;
6393
- (function (BuyLimitReset) {
6394
- BuyLimitReset[BuyLimitReset["Day"] = 0] = "Day";
6395
- BuyLimitReset[BuyLimitReset["Week"] = 1] = "Week";
6396
- BuyLimitReset[BuyLimitReset["Month"] = 2] = "Month";
6397
- BuyLimitReset[BuyLimitReset["Absolute"] = 3] = "Absolute";
6398
- })(BuyLimitReset || (BuyLimitReset = {}));
6399
- var BuyLimitType;
6400
- (function (BuyLimitType) {
6401
- BuyLimitType[BuyLimitType["Character"] = 0] = "Character";
6402
- BuyLimitType[BuyLimitType["Account"] = 1] = "Account";
6403
- })(BuyLimitType || (BuyLimitType = {}));
6404
-
6405
- function ItemBuyLimit(_a) {
6406
- var limit = _a.limit;
6407
- if (limit == null)
6408
- return null;
6409
- return (React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemLimit" }, GetStringForBuyLimitType(limit.LimitType) +
6410
- "Limit: " +
6411
- limit.Amount +
6412
- "/" +
6413
- GetStringForBuyLimitReset(limit.LimitReset)));
6414
- }
6415
- function GetStringForBuyLimitType(type) {
6416
- switch (type) {
6417
- case BuyLimitType.Account:
6418
- return "Account ";
6419
- case BuyLimitType.Character:
6420
- return "Character ";
6421
- default:
6422
- return "";
6423
- }
6424
- }
6425
- function GetStringForBuyLimitReset(reset) {
6426
- switch (reset) {
6427
- case BuyLimitReset.Day:
6428
- return "Day";
6429
- case BuyLimitReset.Week:
6430
- return "Week ";
6431
- case BuyLimitReset.Month:
6432
- return "Month";
6433
- default:
6434
- return "";
6435
- }
6436
- }
6437
-
6438
- function Money(_a) {
6439
- var money = _a.money;
6440
- var bnsmoney = getMoneyObj(money);
6441
- if (bnsmoney == null)
6442
- return null;
6443
- return (React__default["default"].createElement("div", { className: "NpcTooltip_moneyContainer" },
6444
- bnsmoney.Gold > 0 ? (React__default["default"].createElement("span", null,
6445
- bnsmoney.Gold,
6446
- React__default["default"].createElement("img", { src: BuildIconPath("gold"), alt: "" }))) : null,
6447
- bnsmoney.Silver > 0 ? (React__default["default"].createElement("span", null,
6448
- bnsmoney.Silver,
6449
- React__default["default"].createElement("img", { src: BuildIconPath("silver"), alt: "" }))) : null,
6450
- bnsmoney.Copper > 0 ? (React__default["default"].createElement("span", null,
6451
- bnsmoney.Copper,
6452
- React__default["default"].createElement("img", { src: BuildIconPath("copper"), alt: "" }))) : null));
6453
- }
6454
-
6455
- function StoreItemBuyPriceEntry(_a) {
6456
- var _this = this;
6457
- var itemRef = _a.itemRef, client = _a.client;
6458
- var _b = React.useState(), item = _b[0], setItem = _b[1];
6459
- React.useEffect(function () {
6460
- if (client == null)
6461
- return;
6462
- (function () { return __awaiter(_this, void 0, void 0, function () {
6463
- var _a;
6464
- return __generator(this, function (_b) {
6465
- switch (_b.label) {
6466
- case 0:
6467
- _a = setItem;
6468
- return [4 /*yield*/, client.GetItem(itemRef.itemId, itemRef.itemLevel)];
6469
- case 1:
6470
- _a.apply(void 0, [_b.sent()]);
6471
- return [2 /*return*/];
6472
- }
6473
- });
6474
- }); })();
6475
- }, [itemRef, client]);
6476
- return (React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntry" }, item ? (React__default["default"].createElement(ItemTooltipWrapper, { trigger: "click", data: item, region: client.region, client: client },
6477
- React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntryContainer" },
6478
- React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntryContainer-shadow" }),
6479
- React__default["default"].createElement("img", { className: "TooltipBase_iconbg-grade-" + item.grade, src: BuildIconPath(item.icon.iconPath), alt: "" }),
6480
- React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntryCount" },
6481
- React__default["default"].createElement("span", null, itemRef.min))))) : null));
6482
- }
6483
-
6484
- function NpcStoreEntry(_a) {
6485
- var _this = this;
6486
- var _b, _c;
6487
- var data = _a.data, client = _a.client;
6488
- var _d = React.useState(), item = _d[0], setItem = _d[1];
6489
- React.useEffect(function () {
6490
- if (client == null)
6491
- return;
6492
- (function () { return __awaiter(_this, void 0, void 0, function () {
6493
- var res;
6494
- return __generator(this, function (_a) {
6495
- switch (_a.label) {
6496
- case 0: return [4 /*yield*/, client.GetItem(data.Item.itemId, data.Item.itemLevel)];
6497
- case 1:
6498
- res = _a.sent();
6499
- setItem(res);
6500
- return [2 /*return*/];
6501
- }
6502
- });
6503
- }); })();
6504
- }, [data, client]);
6505
- if (item != undefined) {
6506
- return (React__default["default"].createElement("div", { className: "NpcTooltip_storeEntry" },
6507
- React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemIconName" },
6508
- React__default["default"].createElement(ItemTooltipWrapper, { data: item, client: client, region: client.region, trigger: "click" },
6509
- React__default["default"].createElement("img", { className: "TooltipBase_iconbg-grade-" + item.grade, src: BuildIconPath(item.icon.iconPath), alt: "" })),
6510
- React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemNameLimit" },
6511
- React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemName TooltipBase_grade-" + item.grade, dangerouslySetInnerHTML: { __html: item.name } }),
6512
- React__default["default"].createElement(ItemBuyLimit, { limit: data.Limit }))),
6513
- React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntriesContainer" },
6514
- ((_b = data.BuyPrice.Items) === null || _b === void 0 ? void 0 : _b.length) > 0 ? (React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntries " +
6515
- (data.BuyPrice.Money > 0
6516
- ? "NpcTooltip_itemBuyPriceEntries-moneyMargin"
6517
- : "") }, (_c = data.BuyPrice.Items) === null || _c === void 0 ? void 0 : _c.map(function (itemCountRef, i) { return (React__default["default"].createElement(StoreItemBuyPriceEntry, { itemRef: itemCountRef, client: client, key: i })); }))) : null,
6518
- React__default["default"].createElement(Money, { money: data.BuyPrice.Money }))));
6519
- }
6520
- else {
6521
- return null;
6522
- }
6523
- }
6524
-
6525
- function NpcStores(_a) {
6526
- var stores = _a.stores, activeTab = _a.activeTab, client = _a.client;
6527
- var activeStore = stores[activeTab];
6528
- return (React__default["default"].createElement("div", null, activeStore.Entries.map(function (entry, i) { return (React__default["default"].createElement(NpcStoreEntry, { key: i, data: entry, client: client })); })));
6529
- }
6530
-
6531
- function NpcTooltip(_a) {
6532
- var _this = this;
6533
- var _b;
6534
- 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;
6535
- var _e = React.useState(0), activeTab = _e[0], setActiveTab = _e[1];
6536
- var _f = React.useState(), client = _f[0], setClient = _f[1];
6537
- React.useEffect(function () {
6538
- if (clientProp == undefined) {
6539
- (function () { return __awaiter(_this, void 0, void 0, function () {
6540
- return __generator(this, function (_a) {
6541
- setClient(new ItemDownloadClient(region));
6542
- return [2 /*return*/];
6543
- });
6544
- }); })();
6545
- }
6546
- else {
6547
- setClient(clientProp);
6548
- }
6549
- }, []);
6550
- var tooltipBaseProps = {
6551
- title: npc.Name,
6552
- grade: grade,
6553
- id: npc.Alias,
6554
- subtitle: (_b = npc.Title) !== null && _b !== void 0 ? _b : "",
6555
- fullHeight: fullHeight,
6556
- subInfoGroups: [],
6685
+ function JsonTooltip(props) {
6686
+ var tooltipProps = {
6687
+ title: props.title,
6688
+ grade: props.grade,
6689
+ icon: props.icon,
6690
+ mainInfos: JsonArrayToJsxArray(props.mainInfos),
6691
+ subtitle: props.subtitle,
6692
+ subInfoGroups: JsonSubInfoToJsxSubInfo(props.subInfoGroups),
6557
6693
  };
6558
- //no top part
6559
- AddStoreToggles(tooltipBaseProps.subInfoGroups, npc.Stores, activeTab, setActiveTab);
6560
- AddStores(tooltipBaseProps.subInfoGroups, npc.Stores, activeTab, client);
6561
- return React__default["default"].createElement(TooltipBase, __assign({}, tooltipBaseProps));
6694
+ return React__default["default"].createElement(TooltipBase, __assign({}, tooltipProps));
6562
6695
  }
6563
- function AddStoreToggles(subInfoGroups, Stores, activeTab, setActiveTab) {
6564
- subInfoGroups.push({
6565
- title: "",
6566
- texts: [
6567
- React__default["default"].createElement(StoreToggleBar, { stores: Stores, activeTab: activeTab, setActiveTab: setActiveTab }),
6568
- ],
6696
+ function JsonSubInfoToJsxSubInfo(subInfoGroups) {
6697
+ if (subInfoGroups == undefined)
6698
+ return undefined;
6699
+ var result = [];
6700
+ subInfoGroups.forEach(function (subInfoGroup) {
6701
+ var jsxSubInfoGroup = {
6702
+ title: subInfoGroup.title,
6703
+ texts: JsonArrayToJsxArray(subInfoGroup.texts),
6704
+ };
6705
+ result.push(jsxSubInfoGroup);
6569
6706
  });
6707
+ return result;
6570
6708
  }
6571
- function AddStores(subInfoGroups, Stores, activeTab, client) {
6572
- subInfoGroups.push({
6573
- title: "",
6574
- texts: [
6575
- React__default["default"].createElement(NpcStores, { stores: Stores, activeTab: activeTab, client: client }),
6576
- ],
6709
+ function JsonArrayToJsxArray(stringArray) {
6710
+ if (stringArray == undefined)
6711
+ return undefined;
6712
+ var jsxArray = [];
6713
+ stringArray.forEach(function (mainInfo) {
6714
+ jsxArray.push(React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: mainInfo } }));
6577
6715
  });
6716
+ return jsxArray;
6578
6717
  }
6579
6718
 
6580
6719
  exports.GetCooldownString = GetCooldownString;
6581
6720
  exports.ItemTooltip = ItemTooltip;
6582
- exports.ItemTooltipWrapper = ItemTooltipWrapper;
6721
+ exports.ItemTooltipSettings = ItemTooltipSettings;
6583
6722
  exports.JsonTooltip = JsonTooltip;
6584
6723
  exports.NpcTooltip = NpcTooltip;
6724
+ exports.NpcTooltipSettings = NpcTooltipSettings;
6585
6725
  exports.SkillTooltip = SkillTooltip;
6586
- exports.SkillTooltipWrapper = SkillTooltipWrapper;
6726
+ exports.SkillTooltipSettings = SkillTooltipSettings;
6587
6727
  exports.TooltipBase = TooltipBase;
6728
+ exports.TooltipWrapper = TooltipWrapper;
6729
+ exports.TooltipWrapperSettings = TooltipWrapperSettings;
6588
6730
  //# sourceMappingURL=index.js.map