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