nvis-fe-cms-libs 1.1.23 → 1.1.25
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.
|
@@ -665,7 +665,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
665
665
|
const timelineData = ((_a = data == null ? void 0 : data.sectionDataBindingItems) == null ? void 0 : _a.filter((item) => item == null ? void 0 : item.data).map((item) => item.data)) || [];
|
|
666
666
|
const [timelineVisible, setTimelineVisible] = require$$0.useState([]);
|
|
667
667
|
const timelineRefs = require$$0.useRef([]);
|
|
668
|
-
const sectionTitle = (section == null ? void 0 : section.title) || "";
|
|
668
|
+
const sectionTitle = (section == null ? void 0 : section.title) || "...";
|
|
669
669
|
require$$0.useEffect(() => {
|
|
670
670
|
setTimelineVisible(new Array(timelineData.length).fill(false));
|
|
671
671
|
}, [timelineData.length]);
|
|
@@ -701,53 +701,49 @@ var __async = (__this, __arguments, generator) => {
|
|
|
701
701
|
}
|
|
702
702
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("section", { className: `py-20 ${isDarkMode ? "bg-gray-800" : "bg-white"}`, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: [
|
|
703
703
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center mb-12", children: [
|
|
704
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
704
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
705
705
|
"div",
|
|
706
706
|
{
|
|
707
707
|
className: `relative inline-block px-4 py-2 rounded-full text-sm font-semibold mb-4 border transition-all duration-300 transform hover:scale-105 shadow-md hover:shadow-lg overflow-hidden ${isDarkMode ? "bg-gradient-to-br from-slate-900 via-blue-900 to-indigo-900 text-emerald-300 border-blue-800" : "bg-white text-emerald-800 border-gray-200"}`,
|
|
708
|
-
children: [
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
"
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
"
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
"
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
}
|
|
738
|
-
)
|
|
739
|
-
] })
|
|
740
|
-
]
|
|
708
|
+
children: isDarkMode && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
709
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
710
|
+
"div",
|
|
711
|
+
{
|
|
712
|
+
className: "absolute w-12 h-12 bg-white/5 rounded-full",
|
|
713
|
+
style: { left: "10%", top: "20%" }
|
|
714
|
+
}
|
|
715
|
+
),
|
|
716
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
717
|
+
"div",
|
|
718
|
+
{
|
|
719
|
+
className: "absolute w-10 h-10 bg-white/5 rounded-full",
|
|
720
|
+
style: { right: "30%", bottom: "10%" }
|
|
721
|
+
}
|
|
722
|
+
),
|
|
723
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
724
|
+
"div",
|
|
725
|
+
{
|
|
726
|
+
className: "absolute w-14 h-14 bg-white/5 rounded-md",
|
|
727
|
+
style: { left: "20%", bottom: "30%" }
|
|
728
|
+
}
|
|
729
|
+
),
|
|
730
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
731
|
+
"div",
|
|
732
|
+
{
|
|
733
|
+
className: 'absolute inset-0 bg-[url("data:image/svg+xml,%3Csvg width=\\\\\\"60\\\\\\" height=\\\\\\"60\\\\\\" viewBox=\\\\\\"0 0 60 60\\\\\\" xmlns=\\\\\\"http://www.w3.org/2000/svg\\\\\\"%3E%3Cg fill=\\\\\\"none\\\\\\" fill-rule=\\\\\\"evenodd\\\\\\"%3E%3Cg fill=\\\\\\"%23ffffff\\\\\\" fill-opacity=\\\\\\"0.05\\\\\\"%3E%3Ccircle cx=\\\\\\"30\\\\\\" cy=\\\\\\"30\\\\\\" r=\\\\\\"2\\\\\\"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")] opacity-20'
|
|
734
|
+
}
|
|
735
|
+
)
|
|
736
|
+
] })
|
|
741
737
|
}
|
|
742
738
|
),
|
|
743
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
739
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
744
740
|
"h2",
|
|
745
741
|
{
|
|
746
742
|
className: `text-3xl lg:text-4xl font-bold mb-4 ${isDarkMode ? "text-white" : "text-gray-900"}`,
|
|
747
|
-
children: [
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
]
|
|
743
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "block bg-gradient-to-r from-emerald-600 to-teal-600 bg-clip-text text-transparent", children: [
|
|
744
|
+
"📈 ",
|
|
745
|
+
sectionTitle
|
|
746
|
+
] })
|
|
751
747
|
}
|
|
752
748
|
)
|
|
753
749
|
] }),
|
|
@@ -4688,17 +4684,23 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4688
4684
|
] })
|
|
4689
4685
|
] });
|
|
4690
4686
|
};
|
|
4691
|
-
const PageChildrenSelectSection = ({ data, isDarkMode, section, imageBaseUrl = "" }) => {
|
|
4687
|
+
const PageChildrenSelectSection = ({ data, isDarkMode, t, section, imageBaseUrl = "" }) => {
|
|
4692
4688
|
var _a;
|
|
4693
4689
|
const pages = ((_a = data == null ? void 0 : data.sectionDataBindingItems) == null ? void 0 : _a.map((item) => item.data).filter(Boolean)) || [];
|
|
4694
4690
|
const sectionTitle = (section == null ? void 0 : section.title) || "";
|
|
4695
4691
|
const sectionDescription = (section == null ? void 0 : section.description) || "";
|
|
4692
|
+
const [visibleCount, setVisibleCount] = require$$0.useState(8);
|
|
4693
|
+
const visiblePages = pages.slice(0, visibleCount);
|
|
4694
|
+
const hasMore = visibleCount < pages.length;
|
|
4696
4695
|
if (!pages || pages.length === 0) {
|
|
4697
4696
|
return null;
|
|
4698
4697
|
}
|
|
4699
4698
|
const handleNavigate = (slug) => {
|
|
4700
4699
|
window.location.href = slug;
|
|
4701
4700
|
};
|
|
4701
|
+
const handleLoadMore = () => {
|
|
4702
|
+
setVisibleCount((prev) => prev + 8);
|
|
4703
|
+
};
|
|
4702
4704
|
const getImageUrl = (url) => {
|
|
4703
4705
|
if (!url) return "";
|
|
4704
4706
|
if (url.startsWith("http://") || url.startsWith("https://")) return url;
|
|
@@ -4733,8 +4735,9 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4733
4735
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: {
|
|
4734
4736
|
display: "grid",
|
|
4735
4737
|
gridTemplateColumns: "repeat(auto-fit, minmax(220px, 1fr))",
|
|
4736
|
-
gap: "24px"
|
|
4737
|
-
|
|
4738
|
+
gap: "24px",
|
|
4739
|
+
marginBottom: hasMore ? "40px" : "0"
|
|
4740
|
+
}, children: visiblePages.map((page) => {
|
|
4738
4741
|
const iconUrl = getImageUrl(page.icon);
|
|
4739
4742
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
4740
4743
|
"div",
|
|
@@ -4757,7 +4760,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4757
4760
|
onMouseEnter: (e) => {
|
|
4758
4761
|
e.currentTarget.style.transform = "translateY(-8px)";
|
|
4759
4762
|
e.currentTarget.style.boxShadow = isDarkMode ? "0 20px 25px -5px rgba(0, 0, 0, 0.5)" : "0 20px 25px -5px rgba(0, 0, 0, 0.15)";
|
|
4760
|
-
e.currentTarget.style.borderColor =
|
|
4763
|
+
e.currentTarget.style.borderColor = "#1638f9ff";
|
|
4761
4764
|
},
|
|
4762
4765
|
onMouseLeave: (e) => {
|
|
4763
4766
|
e.currentTarget.style.transform = "translateY(0)";
|
|
@@ -4794,19 +4797,59 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4794
4797
|
},
|
|
4795
4798
|
page.id
|
|
4796
4799
|
);
|
|
4797
|
-
}) })
|
|
4800
|
+
}) }),
|
|
4801
|
+
hasMore && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
4802
|
+
"button",
|
|
4803
|
+
{
|
|
4804
|
+
onClick: handleLoadMore,
|
|
4805
|
+
style: {
|
|
4806
|
+
display: "inline-flex",
|
|
4807
|
+
alignItems: "center",
|
|
4808
|
+
justifyContent: "center",
|
|
4809
|
+
gap: "8px",
|
|
4810
|
+
padding: "14px 32px",
|
|
4811
|
+
fontSize: "16px",
|
|
4812
|
+
fontWeight: "600",
|
|
4813
|
+
color: "#fff",
|
|
4814
|
+
backgroundColor: "#f97316",
|
|
4815
|
+
border: "none",
|
|
4816
|
+
borderRadius: "9999px",
|
|
4817
|
+
cursor: "pointer",
|
|
4818
|
+
transition: "all 0.3s",
|
|
4819
|
+
boxShadow: "0 4px 6px -1px rgba(249, 115, 22, 0.3)"
|
|
4820
|
+
},
|
|
4821
|
+
onMouseEnter: (e) => {
|
|
4822
|
+
e.currentTarget.style.backgroundColor = "#ea580c";
|
|
4823
|
+
e.currentTarget.style.transform = "translateY(-2px)";
|
|
4824
|
+
},
|
|
4825
|
+
onMouseLeave: (e) => {
|
|
4826
|
+
e.currentTarget.style.backgroundColor = "#f97316";
|
|
4827
|
+
e.currentTarget.style.transform = "translateY(0)";
|
|
4828
|
+
},
|
|
4829
|
+
children: [
|
|
4830
|
+
t("pageChildrenSelect.moreInsights"),
|
|
4831
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { size: 18 })
|
|
4832
|
+
]
|
|
4833
|
+
}
|
|
4834
|
+
) })
|
|
4798
4835
|
] }) });
|
|
4799
4836
|
};
|
|
4800
|
-
const PageChildrenSelectSection1 = ({ data, isDarkMode, section, imageBaseUrl = "" }) => {
|
|
4837
|
+
const PageChildrenSelectSection1 = ({ data, isDarkMode, t, section, imageBaseUrl = "" }) => {
|
|
4801
4838
|
var _a;
|
|
4802
4839
|
const pages = ((_a = data == null ? void 0 : data.sectionDataBindingItems) == null ? void 0 : _a.map((item) => item.data).filter(Boolean)) || [];
|
|
4803
4840
|
const sectionTitle = (section == null ? void 0 : section.title) || "";
|
|
4841
|
+
const [visibleCount, setVisibleCount] = require$$0.useState(5);
|
|
4842
|
+
const visiblePages = pages.slice(0, visibleCount);
|
|
4843
|
+
const hasMore = visibleCount < pages.length;
|
|
4804
4844
|
if (!pages || pages.length === 0) {
|
|
4805
4845
|
return null;
|
|
4806
4846
|
}
|
|
4807
4847
|
const handleNavigate = (slug) => {
|
|
4808
4848
|
window.location.href = slug;
|
|
4809
4849
|
};
|
|
4850
|
+
const handleLoadMore = () => {
|
|
4851
|
+
setVisibleCount((prev) => prev + 5);
|
|
4852
|
+
};
|
|
4810
4853
|
const getImageUrl = (url) => {
|
|
4811
4854
|
if (!url) return "";
|
|
4812
4855
|
if (url.startsWith("http://") || url.startsWith("https://")) return url;
|
|
@@ -4832,7 +4875,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4832
4875
|
display: "flex",
|
|
4833
4876
|
flexDirection: "column",
|
|
4834
4877
|
gap: "24px"
|
|
4835
|
-
}, children:
|
|
4878
|
+
}, children: visiblePages.map((page) => {
|
|
4836
4879
|
var _a2, _b;
|
|
4837
4880
|
const mainImage = ((_b = (_a2 = page.pageImages) == null ? void 0 : _a2.find((img) => img.isMain)) == null ? void 0 : _b.url) || page.icon;
|
|
4838
4881
|
const imageUrl = getImageUrl(mainImage);
|
|
@@ -4922,226 +4965,44 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4922
4965
|
},
|
|
4923
4966
|
page.id
|
|
4924
4967
|
);
|
|
4925
|
-
}) })
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
cb();
|
|
4958
|
-
};
|
|
4959
|
-
i18n.on("initialized", initialized);
|
|
4960
|
-
}
|
|
4961
|
-
};
|
|
4962
|
-
const loadNamespaces = (i18n, ns, cb) => {
|
|
4963
|
-
i18n.loadNamespaces(ns, loadedClb(i18n, cb));
|
|
4964
|
-
};
|
|
4965
|
-
const loadLanguages = (i18n, lng, ns, cb) => {
|
|
4966
|
-
if (isString(ns)) ns = [ns];
|
|
4967
|
-
if (i18n.options.preload && i18n.options.preload.indexOf(lng) > -1) return loadNamespaces(i18n, ns, cb);
|
|
4968
|
-
ns.forEach((n) => {
|
|
4969
|
-
if (i18n.options.ns.indexOf(n) < 0) i18n.options.ns.push(n);
|
|
4970
|
-
});
|
|
4971
|
-
i18n.loadLanguages(lng, loadedClb(i18n, cb));
|
|
4972
|
-
};
|
|
4973
|
-
const hasLoadedNamespace = (ns, i18n, options = {}) => {
|
|
4974
|
-
if (!i18n.languages || !i18n.languages.length) {
|
|
4975
|
-
warnOnce(i18n, "NO_LANGUAGES", "i18n.languages were undefined or empty", {
|
|
4976
|
-
languages: i18n.languages
|
|
4977
|
-
});
|
|
4978
|
-
return true;
|
|
4979
|
-
}
|
|
4980
|
-
return i18n.hasLoadedNamespace(ns, {
|
|
4981
|
-
lng: options.lng,
|
|
4982
|
-
precheck: (i18nInstance2, loadNotPending) => {
|
|
4983
|
-
if (options.bindI18n && options.bindI18n.indexOf("languageChanging") > -1 && i18nInstance2.services.backendConnector.backend && i18nInstance2.isLanguageChangingTo && !loadNotPending(i18nInstance2.isLanguageChangingTo, ns)) return false;
|
|
4984
|
-
}
|
|
4985
|
-
});
|
|
4986
|
-
};
|
|
4987
|
-
const isString = (obj) => typeof obj === "string";
|
|
4988
|
-
const isObject = (obj) => typeof obj === "object" && obj !== null;
|
|
4989
|
-
const matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
|
|
4990
|
-
const htmlEntities = {
|
|
4991
|
-
"&": "&",
|
|
4992
|
-
"&": "&",
|
|
4993
|
-
"<": "<",
|
|
4994
|
-
"<": "<",
|
|
4995
|
-
">": ">",
|
|
4996
|
-
">": ">",
|
|
4997
|
-
"'": "'",
|
|
4998
|
-
"'": "'",
|
|
4999
|
-
""": '"',
|
|
5000
|
-
""": '"',
|
|
5001
|
-
" ": " ",
|
|
5002
|
-
" ": " ",
|
|
5003
|
-
"©": "©",
|
|
5004
|
-
"©": "©",
|
|
5005
|
-
"®": "®",
|
|
5006
|
-
"®": "®",
|
|
5007
|
-
"…": "…",
|
|
5008
|
-
"…": "…",
|
|
5009
|
-
"/": "/",
|
|
5010
|
-
"/": "/"
|
|
5011
|
-
};
|
|
5012
|
-
const unescapeHtmlEntity = (m) => htmlEntities[m];
|
|
5013
|
-
const unescape = (text) => text.replace(matchHtmlEntity, unescapeHtmlEntity);
|
|
5014
|
-
let defaultOptions = {
|
|
5015
|
-
bindI18n: "languageChanged",
|
|
5016
|
-
bindI18nStore: "",
|
|
5017
|
-
transEmptyNodeValue: "",
|
|
5018
|
-
transSupportBasicHtmlNodes: true,
|
|
5019
|
-
transWrapTextNodes: "",
|
|
5020
|
-
transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
|
|
5021
|
-
useSuspense: true,
|
|
5022
|
-
unescape
|
|
5023
|
-
};
|
|
5024
|
-
const getDefaults = () => defaultOptions;
|
|
5025
|
-
let i18nInstance;
|
|
5026
|
-
const getI18n = () => i18nInstance;
|
|
5027
|
-
const I18nContext = require$$0.createContext();
|
|
5028
|
-
class ReportNamespaces {
|
|
5029
|
-
constructor() {
|
|
5030
|
-
this.usedNamespaces = {};
|
|
5031
|
-
}
|
|
5032
|
-
addUsedNamespaces(namespaces) {
|
|
5033
|
-
namespaces.forEach((ns) => {
|
|
5034
|
-
if (!this.usedNamespaces[ns]) this.usedNamespaces[ns] = true;
|
|
5035
|
-
});
|
|
5036
|
-
}
|
|
5037
|
-
getUsedNamespaces() {
|
|
5038
|
-
return Object.keys(this.usedNamespaces);
|
|
5039
|
-
}
|
|
5040
|
-
}
|
|
5041
|
-
const usePrevious = (value, ignore) => {
|
|
5042
|
-
const ref = require$$0.useRef();
|
|
5043
|
-
require$$0.useEffect(() => {
|
|
5044
|
-
ref.current = value;
|
|
5045
|
-
}, [value, ignore]);
|
|
5046
|
-
return ref.current;
|
|
5047
|
-
};
|
|
5048
|
-
const alwaysNewT = (i18n, language, namespace, keyPrefix) => i18n.getFixedT(language, namespace, keyPrefix);
|
|
5049
|
-
const useMemoizedT = (i18n, language, namespace, keyPrefix) => require$$0.useCallback(alwaysNewT(i18n, language, namespace, keyPrefix), [i18n, language, namespace, keyPrefix]);
|
|
5050
|
-
const useTranslation = (ns, props = {}) => {
|
|
5051
|
-
var _a, _b, _c, _d;
|
|
5052
|
-
const {
|
|
5053
|
-
i18n: i18nFromProps
|
|
5054
|
-
} = props;
|
|
5055
|
-
const {
|
|
5056
|
-
i18n: i18nFromContext,
|
|
5057
|
-
defaultNS: defaultNSFromContext
|
|
5058
|
-
} = require$$0.useContext(I18nContext) || {};
|
|
5059
|
-
const i18n = i18nFromProps || i18nFromContext || getI18n();
|
|
5060
|
-
if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();
|
|
5061
|
-
if (!i18n) {
|
|
5062
|
-
warnOnce(i18n, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
|
|
5063
|
-
const notReadyT = (k, optsOrDefaultValue) => {
|
|
5064
|
-
if (isString(optsOrDefaultValue)) return optsOrDefaultValue;
|
|
5065
|
-
if (isObject(optsOrDefaultValue) && isString(optsOrDefaultValue.defaultValue)) return optsOrDefaultValue.defaultValue;
|
|
5066
|
-
return Array.isArray(k) ? k[k.length - 1] : k;
|
|
5067
|
-
};
|
|
5068
|
-
const retNotReady = [notReadyT, {}, false];
|
|
5069
|
-
retNotReady.t = notReadyT;
|
|
5070
|
-
retNotReady.i18n = {};
|
|
5071
|
-
retNotReady.ready = false;
|
|
5072
|
-
return retNotReady;
|
|
5073
|
-
}
|
|
5074
|
-
if ((_a = i18n.options.react) == null ? void 0 : _a.wait) warnOnce(i18n, "DEPRECATED_OPTION", "useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
|
|
5075
|
-
const i18nOptions = __spreadValues(__spreadValues(__spreadValues({}, getDefaults()), i18n.options.react), props);
|
|
5076
|
-
const {
|
|
5077
|
-
useSuspense,
|
|
5078
|
-
keyPrefix
|
|
5079
|
-
} = i18nOptions;
|
|
5080
|
-
let namespaces = defaultNSFromContext || ((_b = i18n.options) == null ? void 0 : _b.defaultNS);
|
|
5081
|
-
namespaces = isString(namespaces) ? [namespaces] : namespaces || ["translation"];
|
|
5082
|
-
(_d = (_c = i18n.reportNamespaces).addUsedNamespaces) == null ? void 0 : _d.call(_c, namespaces);
|
|
5083
|
-
const ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every((n) => hasLoadedNamespace(n, i18n, i18nOptions));
|
|
5084
|
-
const memoGetT = useMemoizedT(i18n, props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
|
|
5085
|
-
const getT = () => memoGetT;
|
|
5086
|
-
const getNewT = () => alwaysNewT(i18n, props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
|
|
5087
|
-
const [t, setT] = require$$0.useState(getT);
|
|
5088
|
-
let joinedNS = namespaces.join();
|
|
5089
|
-
if (props.lng) joinedNS = `${props.lng}${joinedNS}`;
|
|
5090
|
-
const previousJoinedNS = usePrevious(joinedNS);
|
|
5091
|
-
const isMounted = require$$0.useRef(true);
|
|
5092
|
-
require$$0.useEffect(() => {
|
|
5093
|
-
const {
|
|
5094
|
-
bindI18n,
|
|
5095
|
-
bindI18nStore
|
|
5096
|
-
} = i18nOptions;
|
|
5097
|
-
isMounted.current = true;
|
|
5098
|
-
if (!ready && !useSuspense) {
|
|
5099
|
-
if (props.lng) {
|
|
5100
|
-
loadLanguages(i18n, props.lng, namespaces, () => {
|
|
5101
|
-
if (isMounted.current) setT(getNewT);
|
|
5102
|
-
});
|
|
5103
|
-
} else {
|
|
5104
|
-
loadNamespaces(i18n, namespaces, () => {
|
|
5105
|
-
if (isMounted.current) setT(getNewT);
|
|
5106
|
-
});
|
|
4968
|
+
}) }),
|
|
4969
|
+
hasMore && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { display: "flex", justifyContent: "center", marginTop: "40px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
4970
|
+
"button",
|
|
4971
|
+
{
|
|
4972
|
+
onClick: handleLoadMore,
|
|
4973
|
+
style: {
|
|
4974
|
+
display: "inline-flex",
|
|
4975
|
+
alignItems: "center",
|
|
4976
|
+
gap: "8px",
|
|
4977
|
+
padding: "12px 28px",
|
|
4978
|
+
fontSize: "16px",
|
|
4979
|
+
fontWeight: "600",
|
|
4980
|
+
color: "#fff",
|
|
4981
|
+
backgroundColor: "#2563eb",
|
|
4982
|
+
border: "none",
|
|
4983
|
+
borderRadius: "9999px",
|
|
4984
|
+
cursor: "pointer",
|
|
4985
|
+
transition: "all 0.3s",
|
|
4986
|
+
boxShadow: "0 4px 6px -1px rgba(37, 99, 235, 0.3)"
|
|
4987
|
+
},
|
|
4988
|
+
onMouseEnter: (e) => {
|
|
4989
|
+
e.currentTarget.style.backgroundColor = "#1d4ed8";
|
|
4990
|
+
e.currentTarget.style.transform = "translateY(-2px)";
|
|
4991
|
+
},
|
|
4992
|
+
onMouseLeave: (e) => {
|
|
4993
|
+
e.currentTarget.style.backgroundColor = "#2563eb";
|
|
4994
|
+
e.currentTarget.style.transform = "translateY(0)";
|
|
4995
|
+
},
|
|
4996
|
+
children: [
|
|
4997
|
+
t("pageChildrenSelect.moreInsights"),
|
|
4998
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { size: 18 })
|
|
4999
|
+
]
|
|
5107
5000
|
}
|
|
5108
|
-
}
|
|
5109
|
-
|
|
5110
|
-
setT(getNewT);
|
|
5111
|
-
}
|
|
5112
|
-
const boundReset = () => {
|
|
5113
|
-
if (isMounted.current) setT(getNewT);
|
|
5114
|
-
};
|
|
5115
|
-
if (bindI18n) i18n == null ? void 0 : i18n.on(bindI18n, boundReset);
|
|
5116
|
-
if (bindI18nStore) i18n == null ? void 0 : i18n.store.on(bindI18nStore, boundReset);
|
|
5117
|
-
return () => {
|
|
5118
|
-
isMounted.current = false;
|
|
5119
|
-
if (i18n && bindI18n) bindI18n == null ? void 0 : bindI18n.split(" ").forEach((e) => i18n.off(e, boundReset));
|
|
5120
|
-
if (bindI18nStore && i18n) bindI18nStore.split(" ").forEach((e) => i18n.store.off(e, boundReset));
|
|
5121
|
-
};
|
|
5122
|
-
}, [i18n, joinedNS]);
|
|
5123
|
-
require$$0.useEffect(() => {
|
|
5124
|
-
if (isMounted.current && ready) {
|
|
5125
|
-
setT(getT);
|
|
5126
|
-
}
|
|
5127
|
-
}, [i18n, keyPrefix, ready]);
|
|
5128
|
-
const ret = [t, i18n, ready];
|
|
5129
|
-
ret.t = t;
|
|
5130
|
-
ret.i18n = i18n;
|
|
5131
|
-
ret.ready = ready;
|
|
5132
|
-
if (ready) return ret;
|
|
5133
|
-
if (!ready && !useSuspense) return ret;
|
|
5134
|
-
throw new Promise((resolve) => {
|
|
5135
|
-
if (props.lng) {
|
|
5136
|
-
loadLanguages(i18n, props.lng, namespaces, () => resolve());
|
|
5137
|
-
} else {
|
|
5138
|
-
loadNamespaces(i18n, namespaces, () => resolve());
|
|
5139
|
-
}
|
|
5140
|
-
});
|
|
5001
|
+
) })
|
|
5002
|
+
] }) });
|
|
5141
5003
|
};
|
|
5142
|
-
const PageChildrenSelectSection2 = ({ data, isDarkMode, section, imageBaseUrl = "" }) => {
|
|
5004
|
+
const PageChildrenSelectSection2 = ({ data, isDarkMode, t, section, imageBaseUrl = "" }) => {
|
|
5143
5005
|
var _a;
|
|
5144
|
-
const { t } = useTranslation();
|
|
5145
5006
|
const pages = ((_a = data == null ? void 0 : data.sectionDataBindingItems) == null ? void 0 : _a.map((item) => item.data).filter(Boolean)) || [];
|
|
5146
5007
|
const sectionTitle = (section == null ? void 0 : section.title) || "";
|
|
5147
5008
|
const [visibleCount, setVisibleCount] = require$$0.useState(6);
|