bnstooltips 1.6.3 → 2.0.0

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