@wix/blog 1.0.713 → 1.0.715
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/_sdk-exports/context-blog-feed/runtime.js +2 -2
- package/_sdk-exports/context-post-by-id/runtime.js +3 -3
- package/_sdk-exports/context-post-by-slug/runtime.js +3 -3
- package/_sdk-exports/context-post-list-item/runtime.js +4 -4
- package/_sdk-exports/context-related-posts/runtime.js +4 -4
- package/build/cjs/context-blog-feed.js +10 -5
- package/build/cjs/context-blog-feed.js.map +1 -1
- package/build/cjs/context-post-by-id.js +119 -113
- package/build/cjs/context-post-by-id.js.map +1 -1
- package/build/cjs/context-post-by-slug.js +10 -5
- package/build/cjs/context-post-by-slug.js.map +1 -1
- package/build/cjs/context-post-list-item.js +596 -589
- package/build/cjs/context-post-list-item.js.map +1 -1
- package/build/cjs/context-related-posts.js +940 -934
- package/build/cjs/context-related-posts.js.map +1 -1
- package/build/es/context-blog-feed.mjs +10 -5
- package/build/es/context-blog-feed.mjs.map +1 -1
- package/build/es/context-post-by-id.mjs +119 -113
- package/build/es/context-post-by-id.mjs.map +1 -1
- package/build/es/context-post-by-slug.mjs +10 -5
- package/build/es/context-post-by-slug.mjs.map +1 -1
- package/build/es/context-post-list-item.mjs +596 -589
- package/build/es/context-post-list-item.mjs.map +1 -1
- package/build/es/context-related-posts.mjs +940 -934
- package/build/es/context-related-posts.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -783,21 +783,21 @@ function ln(e6, t2) {
|
|
|
783
783
|
function un(e6) {
|
|
784
784
|
return isFinite(e6) ? e6 : e6.toString();
|
|
785
785
|
}
|
|
786
|
-
function
|
|
786
|
+
function N(e6) {
|
|
787
787
|
return e6 === `NaN` ? NaN : e6 === `Infinity` ? 1 / 0 : e6 === `-Infinity` ? -1 / 0 : e6;
|
|
788
788
|
}
|
|
789
|
-
function
|
|
789
|
+
function dn(e6) {
|
|
790
790
|
return Uint8Array.from(atob(e6), (e7) => e7.charCodeAt(0));
|
|
791
791
|
}
|
|
792
|
-
var
|
|
793
|
-
var
|
|
792
|
+
var fn = `modulepreload`;
|
|
793
|
+
var pn = function(e6, t2) {
|
|
794
794
|
return new URL(e6, t2).href;
|
|
795
795
|
};
|
|
796
|
-
var
|
|
797
|
-
var
|
|
796
|
+
var mn = {};
|
|
797
|
+
var hn = function(e6) {
|
|
798
798
|
return e6.pathname.endsWith(`.css`);
|
|
799
799
|
};
|
|
800
|
-
var
|
|
800
|
+
var gn = function(e6, t2, n2) {
|
|
801
801
|
if (t2 in e6) return e6[t2];
|
|
802
802
|
let r2 = n2();
|
|
803
803
|
if (!r2) {
|
|
@@ -811,7 +811,7 @@ var _n = function(e6, t2, n2) {
|
|
|
811
811
|
});
|
|
812
812
|
return e6[t2] = i2, i2;
|
|
813
813
|
};
|
|
814
|
-
var
|
|
814
|
+
var _n = function(e6, t2, n2) {
|
|
815
815
|
let r2 = Promise.resolve();
|
|
816
816
|
if (t2 && t2.length > 0) {
|
|
817
817
|
let o3 = function(e8) {
|
|
@@ -822,9 +822,9 @@ var vn = function(e6, t2, n2) {
|
|
|
822
822
|
var o2 = o3, s2 = s3;
|
|
823
823
|
let e7, i3 = document.querySelector(`meta[property=csp-nonce]`), a2 = i3?.nonce || i3?.getAttribute(`nonce`);
|
|
824
824
|
r2 = o3(t2.map((t3) => {
|
|
825
|
-
t3 =
|
|
826
|
-
let r3 = s3(t3), i4 =
|
|
827
|
-
return
|
|
825
|
+
t3 = pn(t3, n2);
|
|
826
|
+
let r3 = s3(t3), i4 = hn(r3);
|
|
827
|
+
return gn(mn, r3.href, () => {
|
|
828
828
|
if (e7 === void 0) {
|
|
829
829
|
e7 = { all: /* @__PURE__ */ new Set(), styles: /* @__PURE__ */ new Set() };
|
|
830
830
|
let t5 = document.getElementsByTagName(`link`);
|
|
@@ -835,7 +835,7 @@ var vn = function(e6, t2, n2) {
|
|
|
835
835
|
}
|
|
836
836
|
if ((i4 ? e7.styles : e7.all).has(r3.href)) return;
|
|
837
837
|
let t4 = document.createElement(`link`);
|
|
838
|
-
if (t4.rel = i4 ? `stylesheet` :
|
|
838
|
+
if (t4.rel = i4 ? `stylesheet` : fn, i4 || (t4.as = `script`), t4.crossOrigin = ``, t4.href = r3.href, a2 && t4.setAttribute(`nonce`, a2), document.head.appendChild(t4), i4) return new Promise((e8, n3) => {
|
|
839
839
|
t4.addEventListener(`load`, e8), t4.addEventListener(`error`, () => n3(Error(`Unable to preload CSS for ${r3}`)));
|
|
840
840
|
});
|
|
841
841
|
});
|
|
@@ -850,30 +850,30 @@ var vn = function(e6, t2, n2) {
|
|
|
850
850
|
return e6().catch(i2);
|
|
851
851
|
});
|
|
852
852
|
};
|
|
853
|
-
var
|
|
854
|
-
var
|
|
855
|
-
var
|
|
856
|
-
var
|
|
857
|
-
let e6 =
|
|
858
|
-
if (e6) return { [
|
|
853
|
+
var vn = `x-wix-linguist`;
|
|
854
|
+
var yn = `00000000-0000-0000-0000-000000000000`;
|
|
855
|
+
var bn = `false`;
|
|
856
|
+
var xn = () => {
|
|
857
|
+
let e6 = wn(`language`), t2 = wn(`locale`);
|
|
858
|
+
if (e6) return { [vn]: [e6, t2 || e6, bn, yn].join(`|`) };
|
|
859
859
|
};
|
|
860
|
-
function
|
|
860
|
+
function Sn() {
|
|
861
861
|
let e6 = null, t2 = null;
|
|
862
862
|
return { promise: new Promise((n2, r2) => {
|
|
863
863
|
e6 = n2, t2 = r2;
|
|
864
864
|
}), resolve: e6, reject: t2 };
|
|
865
865
|
}
|
|
866
|
-
var
|
|
867
|
-
var
|
|
868
|
-
var
|
|
869
|
-
let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e6(t2), o2 =
|
|
870
|
-
return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language:
|
|
871
|
-
return
|
|
866
|
+
var Cn = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
|
|
867
|
+
var wn = (e6) => Cn()?.[e6];
|
|
868
|
+
var Tn = ({ createHost: e6 }) => ({ __type: `host`, create: (e7) => ({}), host: (t2) => {
|
|
869
|
+
let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e6(t2), o2 = Dn();
|
|
870
|
+
return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: wn(`language`), locale: wn(`locale`), get passThroughHeaders() {
|
|
871
|
+
return xn();
|
|
872
872
|
} } };
|
|
873
873
|
}, auth: (e7) => {
|
|
874
874
|
let t2 = typeof window < `u` ? window.wixEmbedsAPI : void 0;
|
|
875
|
-
!e7 &&
|
|
876
|
-
let n2 = false, { resolve: r2, promise: i2 } =
|
|
875
|
+
!e7 && En() && (e7 = t2?.getAccessTokenFunction?.());
|
|
876
|
+
let n2 = false, { resolve: r2, promise: i2 } = Sn();
|
|
877
877
|
return { getAuthHeaders: async () => {
|
|
878
878
|
if (!e7 && n2 && (e7 = await i2), !e7) throw Error(`Failed to resolve auth token`);
|
|
879
879
|
return { headers: { Authorization: await e7() } };
|
|
@@ -881,37 +881,37 @@ var En = ({ createHost: e6 }) => ({ __type: `host`, create: (e7) => ({}), host:
|
|
|
881
881
|
r2(e8);
|
|
882
882
|
}) };
|
|
883
883
|
} });
|
|
884
|
-
function
|
|
884
|
+
function En() {
|
|
885
885
|
return typeof document < `u` && document.currentScript?.tagName === `SCRIPT`;
|
|
886
886
|
}
|
|
887
|
-
function
|
|
887
|
+
function Dn() {
|
|
888
888
|
let e6 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
|
|
889
889
|
if (!e6) return;
|
|
890
890
|
let t2 = new URL(e6);
|
|
891
891
|
return t2?.pathname && t2.pathname !== `/` ? `${t2.hostname}${t2.pathname}` : t2.hostname;
|
|
892
892
|
}
|
|
893
|
-
var
|
|
893
|
+
var On = ({ clientSdk: e6, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
|
|
894
894
|
if (!e6) throw Error(`Wix Site SDK only works in a Wix site environment. Learn more: https://dev.wix.com/docs/sdk/host-modules/site/introduction`);
|
|
895
895
|
return e6.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
|
|
896
896
|
}, getAccessToken: () => {
|
|
897
897
|
throw Error(`Not implemented`);
|
|
898
898
|
}, observeState: () => ({ disconnect: () => {
|
|
899
899
|
} }) });
|
|
900
|
-
var
|
|
900
|
+
var kn = Tn({ createHost: function(e6) {
|
|
901
901
|
let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e6?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e6 || {};
|
|
902
902
|
if (!n2) throw Error(`"createHost" was called without a required field "applicationId"`);
|
|
903
|
-
return { channel:
|
|
903
|
+
return { channel: On({ clientSdk: t2, applicationId: n2 }), close: () => {
|
|
904
904
|
} };
|
|
905
905
|
} });
|
|
906
|
-
var
|
|
907
|
-
let n2 =
|
|
906
|
+
var An = (e6, t2) => {
|
|
907
|
+
let n2 = kn.host({ applicationId: e6, componentId: t2 }), r2 = kn.auth();
|
|
908
908
|
return qe({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
|
|
909
909
|
};
|
|
910
|
-
var
|
|
911
|
-
function
|
|
910
|
+
var jn = (e6) => An(`14bcded7-0066-7c35-14d7-466cb3f09103`, e6);
|
|
911
|
+
function Mn() {
|
|
912
912
|
let e6 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
|
|
913
913
|
if (e6) return { initWixModules(t3, n3) {
|
|
914
|
-
return
|
|
914
|
+
return Nn(() => e6(t3, n3));
|
|
915
915
|
}, fetchWithAuth() {
|
|
916
916
|
throw Error(`fetchWithAuth is not available in this context`);
|
|
917
917
|
}, graphql() {
|
|
@@ -921,10 +921,10 @@ function Nn() {
|
|
|
921
921
|
if (t2 || n2) return { initWixModules(e7, r2) {
|
|
922
922
|
if (r2) {
|
|
923
923
|
if (!n2) throw Error(`An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules`);
|
|
924
|
-
return
|
|
924
|
+
return Nn(() => n2.use(e7));
|
|
925
925
|
}
|
|
926
926
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
927
|
-
return
|
|
927
|
+
return Nn(() => t2.use(e7));
|
|
928
928
|
}, fetchWithAuth: (e7, n3) => {
|
|
929
929
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
930
930
|
return t2.fetchWithAuth(e7, n3);
|
|
@@ -936,7 +936,7 @@ function Nn() {
|
|
|
936
936
|
return t2.graphql(e7, n3, r2);
|
|
937
937
|
} };
|
|
938
938
|
}
|
|
939
|
-
function
|
|
939
|
+
function Nn(e6) {
|
|
940
940
|
let t2 = globalThis.__wix_context__, n2 = { client: v.client, elevatedClient: v.elevatedClient }, r2;
|
|
941
941
|
globalThis.__wix_context__ = void 0, v.client = void 0, v.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
|
|
942
942
|
try {
|
|
@@ -945,17 +945,17 @@ function Pn(e6) {
|
|
|
945
945
|
globalThis.__wix_context__ = t2, v.client = n2.client, v.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
|
|
946
946
|
}
|
|
947
947
|
}
|
|
948
|
-
function
|
|
948
|
+
function Pn(e6, t2) {
|
|
949
949
|
return { ...e6, ...Object.fromEntries(t2.map((t3) => [t3, (...n2) => {
|
|
950
|
-
let r2 =
|
|
950
|
+
let r2 = Mn();
|
|
951
951
|
if (!r2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
952
952
|
return r2.initWixModules(e6)[t3].apply(void 0, n2);
|
|
953
953
|
}])) };
|
|
954
954
|
}
|
|
955
|
-
function
|
|
956
|
-
return
|
|
955
|
+
function Fn(e6) {
|
|
956
|
+
return Pn({ __type: `host`, create: (t2) => Object.entries(e6).reduce((e7, [n2, r2]) => ({ ...e7, [n2]: r2(t2) }), {}) }, Object.keys(e6));
|
|
957
957
|
}
|
|
958
|
-
var
|
|
958
|
+
var In = class {
|
|
959
959
|
constructor(e6) {
|
|
960
960
|
this.message = e6, this.captureException = () => {
|
|
961
961
|
console.error(this.message);
|
|
@@ -970,13 +970,13 @@ var Ln = class {
|
|
|
970
970
|
};
|
|
971
971
|
}
|
|
972
972
|
};
|
|
973
|
-
var
|
|
974
|
-
var
|
|
975
|
-
function
|
|
973
|
+
var Ln = (e6) => new In(e6);
|
|
974
|
+
var Rn = Fn({ getMonitoringClient: (e6) => () => e6.getMonitoringClient ? e6.getMonitoringClient() : Ln(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
|
|
975
|
+
function zn(e6) {
|
|
976
976
|
let t2 = Promise.resolve(e6);
|
|
977
977
|
return t2.status = `fulfilled`, t2.value = e6, t2;
|
|
978
978
|
}
|
|
979
|
-
function
|
|
979
|
+
function Bn(e6) {
|
|
980
980
|
if (e6.status === `fulfilled`) return e6.value;
|
|
981
981
|
throw e6.status === `rejected` ? e6.reason : (e6.status === `pending` || (e6.status = `pending`, e6.then((t2) => {
|
|
982
982
|
e6.status = `fulfilled`, e6.value = t2;
|
|
@@ -984,17 +984,17 @@ function Vn(e6) {
|
|
|
984
984
|
e6.status = `rejected`, e6.reason = t2;
|
|
985
985
|
})), e6);
|
|
986
986
|
}
|
|
987
|
-
var
|
|
988
|
-
function
|
|
989
|
-
let r2 =
|
|
990
|
-
r2 || (r2 = /* @__PURE__ */ new WeakMap(),
|
|
987
|
+
var Vn = /* @__PURE__ */ new WeakMap();
|
|
988
|
+
function Hn(e6, t2, n2) {
|
|
989
|
+
let r2 = Vn.get(e6);
|
|
990
|
+
r2 || (r2 = /* @__PURE__ */ new WeakMap(), Vn.set(e6, r2));
|
|
991
991
|
let i2 = r2.get(t2);
|
|
992
992
|
i2 || (i2 = /* @__PURE__ */ new WeakMap(), r2.set(t2, i2));
|
|
993
993
|
let a2 = i2.get(n2);
|
|
994
994
|
if (!a2) {
|
|
995
|
-
if (e6.status === `fulfilled`) a2 =
|
|
995
|
+
if (e6.status === `fulfilled`) a2 = zn(t2(e6.value));
|
|
996
996
|
else if (e6.status === `rejected`) try {
|
|
997
|
-
a2 =
|
|
997
|
+
a2 = zn(n2(e6.reason));
|
|
998
998
|
} catch {
|
|
999
999
|
a2 = e6.then(t2, n2);
|
|
1000
1000
|
}
|
|
@@ -1003,45 +1003,44 @@ function Un(e6, t2, n2) {
|
|
|
1003
1003
|
}
|
|
1004
1004
|
return a2;
|
|
1005
1005
|
}
|
|
1006
|
-
var
|
|
1007
|
-
function
|
|
1006
|
+
var Un = 1e4;
|
|
1007
|
+
function Wn(e6) {
|
|
1008
1008
|
let [t2, n2] = u(void 0);
|
|
1009
1009
|
return s(() => {
|
|
1010
1010
|
let t3 = Date.now();
|
|
1011
|
-
t3 - e6 >
|
|
1011
|
+
t3 - e6 > Un && i(() => n2(t3));
|
|
1012
1012
|
}, []), t2 ?? e6;
|
|
1013
1013
|
}
|
|
1014
|
-
function
|
|
1014
|
+
function P(e6) {
|
|
1015
1015
|
return e6;
|
|
1016
1016
|
}
|
|
1017
|
-
var
|
|
1018
|
-
var
|
|
1017
|
+
var Gn = P(`@wix/site-service-rendering-context`);
|
|
1018
|
+
var Kn = () => {
|
|
1019
1019
|
try {
|
|
1020
|
-
return f(
|
|
1020
|
+
return f(Gn).SSR;
|
|
1021
1021
|
} catch {
|
|
1022
1022
|
return false;
|
|
1023
1023
|
}
|
|
1024
1024
|
};
|
|
1025
|
-
var
|
|
1026
|
-
function
|
|
1025
|
+
var qn = (e6, t2) => e6.length === t2.length && e6.every((e7, n2) => Object.is(e7, t2[n2]));
|
|
1026
|
+
function Jn(e6, t2) {
|
|
1027
1027
|
let [n2, r2] = u(() => ({ deps: t2, value: e6() }));
|
|
1028
1028
|
return s(() => {
|
|
1029
|
-
if (
|
|
1029
|
+
if (qn(n2.deps, t2)) return;
|
|
1030
1030
|
let a2 = e6();
|
|
1031
1031
|
i(() => r2({ deps: t2, value: a2 }));
|
|
1032
1032
|
}, t2), n2.value;
|
|
1033
1033
|
}
|
|
1034
|
-
var
|
|
1035
|
-
var
|
|
1036
|
-
var
|
|
1037
|
-
var
|
|
1038
|
-
var
|
|
1039
|
-
var
|
|
1034
|
+
var Yn = P(`@wix/site-service-url`);
|
|
1035
|
+
var Xn = `14bcded7-0066-7c35-14d7-466cb3f09103`;
|
|
1036
|
+
var Zn = `post`;
|
|
1037
|
+
var Qn = `builder-post`;
|
|
1038
|
+
var $n = `__blog_unknown_section__`;
|
|
1039
|
+
var er = (e6) => {
|
|
1040
1040
|
let t2;
|
|
1041
1041
|
try {
|
|
1042
|
-
let n3 = e6.appSectionRelativeUrl(
|
|
1043
|
-
if (n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`,
|
|
1044
|
-
t2 = e6.appSectionRelativeUrl(Zn, $n, true);
|
|
1042
|
+
let n3 = e6.appSectionRelativeUrl(Xn, Qn);
|
|
1043
|
+
if (t2 = e6.appSectionRelativeUrl(Xn, Qn, true), n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`, $n) && !n3?.endsWith(`/post-page`) && t2 === n3) return;
|
|
1045
1044
|
} catch {
|
|
1046
1045
|
return;
|
|
1047
1046
|
}
|
|
@@ -1049,12 +1048,12 @@ var tr = (e6) => {
|
|
|
1049
1048
|
let n2 = t2.split(`/`).filter(Boolean);
|
|
1050
1049
|
return n2[n2.length - 1] === `post-page` && n2.pop(), n2.length > 0 ? n2.join(`/`) : void 0;
|
|
1051
1050
|
};
|
|
1052
|
-
var
|
|
1053
|
-
var
|
|
1054
|
-
let t2 =
|
|
1055
|
-
if (t2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${
|
|
1051
|
+
var tr = (e6) => `${e6}/${Zn}`;
|
|
1052
|
+
var nr = (e6) => {
|
|
1053
|
+
let t2 = er(e6);
|
|
1054
|
+
if (t2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${tr(t2)}`;
|
|
1056
1055
|
};
|
|
1057
|
-
var
|
|
1056
|
+
var rr = (e6, t2) => {
|
|
1058
1057
|
if (!e6 || !t2) return;
|
|
1059
1058
|
let n2;
|
|
1060
1059
|
try {
|
|
@@ -1068,14 +1067,14 @@ var ir = (e6, t2) => {
|
|
|
1068
1067
|
if (r2.endsWith(t3) && i2.endsWith(`/post`)) return `${n2.origin}${i2}`;
|
|
1069
1068
|
}
|
|
1070
1069
|
};
|
|
1071
|
-
var
|
|
1070
|
+
var ir = (e6) => {
|
|
1072
1071
|
if (!e6) return;
|
|
1073
1072
|
if (typeof e6 == `string`) return e6;
|
|
1074
1073
|
let { base: t2, path: n2 } = e6;
|
|
1075
1074
|
return t2 ? `${t2.replace(/\/+$/, ``)}${n2 ?? ``}` : void 0;
|
|
1076
1075
|
};
|
|
1077
|
-
var
|
|
1078
|
-
let n2 =
|
|
1076
|
+
var ar = (e6, t2) => {
|
|
1077
|
+
let n2 = ir(e6.url), r2 = `/${Zn}`;
|
|
1079
1078
|
if (!n2 || !t2?.endsWith(r2)) return;
|
|
1080
1079
|
let i2, a2;
|
|
1081
1080
|
try {
|
|
@@ -1086,23 +1085,23 @@ var or = (e6, t2) => {
|
|
|
1086
1085
|
let o2 = a2.slice(0, -r2.length);
|
|
1087
1086
|
return o2 && i2.startsWith(`${o2}/`) && !i2.startsWith(`${a2}/`) ? n2 : void 0;
|
|
1088
1087
|
};
|
|
1089
|
-
var
|
|
1090
|
-
let n2 =
|
|
1088
|
+
var or = (e6, t2) => {
|
|
1089
|
+
let n2 = ar(e6, t2);
|
|
1091
1090
|
if (n2) return { href: n2, target: `_self` };
|
|
1092
1091
|
if (t2 && e6.slug) return { href: `${t2}/${encodeURIComponent(e6.slug)}`, target: `_self` };
|
|
1093
|
-
let r2 =
|
|
1092
|
+
let r2 = ir(e6.url);
|
|
1094
1093
|
return r2 ? { href: r2, target: `_self` } : void 0;
|
|
1095
1094
|
};
|
|
1096
|
-
var
|
|
1095
|
+
var sr = (e6) => {
|
|
1097
1096
|
let t2;
|
|
1098
1097
|
try {
|
|
1099
|
-
t2 = f(
|
|
1098
|
+
t2 = f(Yn);
|
|
1100
1099
|
} catch {
|
|
1101
1100
|
return;
|
|
1102
1101
|
}
|
|
1103
|
-
return
|
|
1102
|
+
return nr(t2) ?? rr(t2.currentUrl, e6);
|
|
1104
1103
|
};
|
|
1105
|
-
var
|
|
1104
|
+
var cr = (e6, t2) => {
|
|
1106
1105
|
let n2;
|
|
1107
1106
|
try {
|
|
1108
1107
|
n2 = new URL(e6).pathname.split(`/`).filter(Boolean);
|
|
@@ -1122,52 +1121,59 @@ var lr = (e6, t2) => {
|
|
|
1122
1121
|
return i2;
|
|
1123
1122
|
}
|
|
1124
1123
|
};
|
|
1125
|
-
var
|
|
1124
|
+
var lr = () => {
|
|
1126
1125
|
let e6;
|
|
1127
1126
|
try {
|
|
1128
|
-
e6 = f(
|
|
1127
|
+
e6 = f(Yn);
|
|
1129
1128
|
} catch {
|
|
1130
1129
|
return;
|
|
1131
1130
|
}
|
|
1132
1131
|
if (!e6.currentUrl) return;
|
|
1133
|
-
let t2 =
|
|
1134
|
-
return
|
|
1132
|
+
let t2 = er(e6);
|
|
1133
|
+
return cr(e6.currentUrl, t2 && tr(t2));
|
|
1135
1134
|
};
|
|
1136
|
-
var
|
|
1137
|
-
var
|
|
1138
|
-
var
|
|
1135
|
+
var ur = { categoryHeader: `WixBlog.CategoryHeader`, coverMedia: `WixBlog.PostCoverMedia`, postActions: `WixBlog.PostActionBar`, postCategories: `WixBlog.PostCategoryList`, postCounters: `WixBlog.PostCounterBar`, postMetadata: `WixBlog.PostMetadataBar`, postTags: `WixBlog.PostTagList`, feedProvider: `WixBlog.BlogFeedContextProvider`, postBySlugProvider: `WixBlog.PostBySlugContextProvider`, postByIdProvider: `WixBlog.PostByIdContextProvider`, relatedPostsProvider: `WixBlog.RelatedPostsContextProvider` };
|
|
1136
|
+
var dr = (e6) => `${e6} rendered`;
|
|
1137
|
+
var fr = (e6, t2, n2) => {
|
|
1139
1138
|
s(() => {
|
|
1140
1139
|
if (t2 !== `loading` && typeof performance < `u` && typeof performance.mark == `function`) try {
|
|
1141
|
-
performance.mark(
|
|
1140
|
+
performance.mark(dr(e6), { detail: { state: t2, compId: n2 } });
|
|
1142
1141
|
} catch {
|
|
1143
1142
|
}
|
|
1144
1143
|
}, [e6, t2, n2]);
|
|
1145
1144
|
};
|
|
1146
|
-
var
|
|
1147
|
-
var
|
|
1148
|
-
var
|
|
1145
|
+
var pr = P(`@wix/site-service-locale`);
|
|
1146
|
+
var mr = P(`@wix/site-service-renderer-configuration`);
|
|
1147
|
+
var hr = () => {
|
|
1149
1148
|
let e6, t2;
|
|
1150
1149
|
try {
|
|
1151
|
-
e6 = f(
|
|
1150
|
+
e6 = f(mr).languageCode;
|
|
1152
1151
|
} catch {
|
|
1153
1152
|
}
|
|
1154
1153
|
try {
|
|
1155
|
-
t2 = f(
|
|
1154
|
+
t2 = f(pr).language;
|
|
1156
1155
|
} catch {
|
|
1157
1156
|
}
|
|
1158
1157
|
return e6 || t2;
|
|
1159
1158
|
};
|
|
1159
|
+
var gr = P(`@wix/viewer-service-multilingual`);
|
|
1160
1160
|
var _r = () => {
|
|
1161
|
+
let e6;
|
|
1161
1162
|
try {
|
|
1162
|
-
let {
|
|
1163
|
-
|
|
1163
|
+
let { multilingualEnabled: t3, currentLocale: n3 } = f(gr);
|
|
1164
|
+
t3 && n3 && !n3.primaryLocale && (e6 = n3.regionalFormat);
|
|
1164
1165
|
} catch {
|
|
1165
|
-
return;
|
|
1166
1166
|
}
|
|
1167
|
+
let t2, n2;
|
|
1168
|
+
try {
|
|
1169
|
+
({ locale: t2, language: n2 } = f(pr));
|
|
1170
|
+
} catch {
|
|
1171
|
+
}
|
|
1172
|
+
return e6 || t2 || n2;
|
|
1167
1173
|
};
|
|
1168
|
-
var vr =
|
|
1174
|
+
var vr = P(`@wix/site-service-warmup-data`);
|
|
1169
1175
|
function yr() {
|
|
1170
|
-
let e6 =
|
|
1176
|
+
let e6 = Kn(), t2 = null;
|
|
1171
1177
|
try {
|
|
1172
1178
|
t2 = d()(vr);
|
|
1173
1179
|
} catch {
|
|
@@ -1210,8 +1216,8 @@ var Sr = ({ isDev: e6, loadMessages: t2, loadDevMessages: n2 }) => {
|
|
|
1210
1216
|
};
|
|
1211
1217
|
return (e7) => r2.getOrInsert(e7, () => i2(e7));
|
|
1212
1218
|
};
|
|
1213
|
-
var
|
|
1214
|
-
var
|
|
1219
|
+
var F = (e6) => typeof e6 == `string`;
|
|
1220
|
+
var I = () => {
|
|
1215
1221
|
let e6, t2, n2 = new Promise((n3, r2) => {
|
|
1216
1222
|
e6 = n3, t2 = r2;
|
|
1217
1223
|
});
|
|
@@ -1225,9 +1231,9 @@ var wr = (e6, t2, n2) => {
|
|
|
1225
1231
|
};
|
|
1226
1232
|
var Tr = /###/g;
|
|
1227
1233
|
var Er = (e6) => e6 && e6.includes(`###`) ? e6.replace(Tr, `.`) : e6;
|
|
1228
|
-
var Dr = (e6) => !e6 ||
|
|
1229
|
-
var
|
|
1230
|
-
let r2 =
|
|
1234
|
+
var Dr = (e6) => !e6 || F(e6);
|
|
1235
|
+
var Or = (e6, t2, n2) => {
|
|
1236
|
+
let r2 = F(t2) ? t2.split(`.`) : t2, i2 = 0;
|
|
1231
1237
|
for (; i2 < r2.length - 1; ) {
|
|
1232
1238
|
if (Dr(e6)) return {};
|
|
1233
1239
|
let t3 = Er(r2[i2]);
|
|
@@ -1235,36 +1241,36 @@ var I = (e6, t2, n2) => {
|
|
|
1235
1241
|
}
|
|
1236
1242
|
return Dr(e6) ? {} : { obj: e6, k: Er(r2[i2]) };
|
|
1237
1243
|
};
|
|
1238
|
-
var
|
|
1239
|
-
let { obj: r2, k: i2 } =
|
|
1244
|
+
var kr = (e6, t2, n2) => {
|
|
1245
|
+
let { obj: r2, k: i2 } = Or(e6, t2, Object);
|
|
1240
1246
|
if (r2 !== void 0 || t2.length === 1) {
|
|
1241
1247
|
r2[i2] = n2;
|
|
1242
1248
|
return;
|
|
1243
1249
|
}
|
|
1244
|
-
let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 =
|
|
1245
|
-
for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 =
|
|
1250
|
+
let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 = Or(e6, o2, Object);
|
|
1251
|
+
for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 = Or(e6, o2, Object), s2?.obj && s2.obj[`${s2.k}.${a2}`] !== void 0 && (s2.obj = void 0);
|
|
1246
1252
|
s2.obj[`${s2.k}.${a2}`] = n2;
|
|
1247
1253
|
};
|
|
1248
|
-
var
|
|
1249
|
-
let { obj: i2, k: a2 } =
|
|
1254
|
+
var Ar = (e6, t2, n2, r2) => {
|
|
1255
|
+
let { obj: i2, k: a2 } = Or(e6, t2, Object);
|
|
1250
1256
|
i2[a2] = i2[a2] || [], i2[a2].push(n2);
|
|
1251
1257
|
};
|
|
1252
|
-
var
|
|
1253
|
-
let { obj: n2, k: r2 } =
|
|
1258
|
+
var jr = (e6, t2) => {
|
|
1259
|
+
let { obj: n2, k: r2 } = Or(e6, t2);
|
|
1254
1260
|
if (n2 && Object.prototype.hasOwnProperty.call(n2, r2)) return n2[r2];
|
|
1255
1261
|
};
|
|
1256
|
-
var jr = (e6, t2, n2) => {
|
|
1257
|
-
let r2 = Ar(e6, n2);
|
|
1258
|
-
return r2 === void 0 ? Ar(t2, n2) : r2;
|
|
1259
|
-
};
|
|
1260
1262
|
var Mr = (e6, t2, n2) => {
|
|
1261
|
-
|
|
1263
|
+
let r2 = jr(e6, n2);
|
|
1264
|
+
return r2 === void 0 ? jr(t2, n2) : r2;
|
|
1265
|
+
};
|
|
1266
|
+
var Nr = (e6, t2, n2) => {
|
|
1267
|
+
for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (Object.prototype.hasOwnProperty.call(e6, r2) ? F(e6[r2]) || e6[r2] instanceof String || F(t2[r2]) || t2[r2] instanceof String ? n2 && (e6[r2] = t2[r2]) : Nr(e6[r2], t2[r2], n2) : e6[r2] = t2[r2]);
|
|
1262
1268
|
return e6;
|
|
1263
1269
|
};
|
|
1264
1270
|
var L = (e6) => e6.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
|
|
1265
|
-
var
|
|
1266
|
-
var
|
|
1267
|
-
var
|
|
1271
|
+
var Pr = { "&": `&`, "<": `<`, ">": `>`, '"': `"`, "'": `'`, "/": `/` };
|
|
1272
|
+
var Fr = (e6) => F(e6) ? e6.replace(/[&<>"'\/]/g, (e7) => Pr[e7]) : e6;
|
|
1273
|
+
var Ir = class {
|
|
1268
1274
|
constructor(e6) {
|
|
1269
1275
|
this.capacity = e6, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
1270
1276
|
}
|
|
@@ -1275,20 +1281,20 @@ var Fr = class {
|
|
|
1275
1281
|
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e6, n2), this.regExpQueue.push(e6), n2;
|
|
1276
1282
|
}
|
|
1277
1283
|
};
|
|
1278
|
-
var
|
|
1279
|
-
var
|
|
1280
|
-
var
|
|
1284
|
+
var Lr = [` `, `,`, `?`, `!`, `;`];
|
|
1285
|
+
var Rr = new Ir(20);
|
|
1286
|
+
var zr = (e6, t2, n2) => {
|
|
1281
1287
|
t2 ||= ``, n2 ||= ``;
|
|
1282
|
-
let r2 =
|
|
1288
|
+
let r2 = Lr.filter((e7) => !t2.includes(e7) && !n2.includes(e7));
|
|
1283
1289
|
if (r2.length === 0) return true;
|
|
1284
|
-
let i2 =
|
|
1290
|
+
let i2 = Rr.getRegExp(`(${r2.map((e7) => e7 === `?` ? `\\?` : e7).join(`|`)})`), a2 = !i2.test(e6);
|
|
1285
1291
|
if (!a2) {
|
|
1286
1292
|
let t3 = e6.indexOf(n2);
|
|
1287
1293
|
t3 > 0 && !i2.test(e6.substring(0, t3)) && (a2 = true);
|
|
1288
1294
|
}
|
|
1289
1295
|
return a2;
|
|
1290
1296
|
};
|
|
1291
|
-
var
|
|
1297
|
+
var Br = (e6, t2, n2 = `.`) => {
|
|
1292
1298
|
if (!e6) return;
|
|
1293
1299
|
if (e6[t2]) return Object.prototype.hasOwnProperty.call(e6, t2) ? e6[t2] : void 0;
|
|
1294
1300
|
let r2 = t2.split(n2), i2 = e6;
|
|
@@ -1304,8 +1310,8 @@ var zr = (e6, t2, n2 = `.`) => {
|
|
|
1304
1310
|
}
|
|
1305
1311
|
return i2;
|
|
1306
1312
|
};
|
|
1307
|
-
var
|
|
1308
|
-
var
|
|
1313
|
+
var Vr = (e6) => e6?.replace(/_/g, `-`);
|
|
1314
|
+
var Hr = { type: `logger`, log(e6) {
|
|
1309
1315
|
this.output(`log`, e6);
|
|
1310
1316
|
}, warn(e6) {
|
|
1311
1317
|
this.output(`warn`, e6);
|
|
@@ -1314,12 +1320,12 @@ var Br = { type: `logger`, log(e6) {
|
|
|
1314
1320
|
}, output(e6, t2) {
|
|
1315
1321
|
console?.[e6]?.apply?.(console, t2);
|
|
1316
1322
|
} };
|
|
1317
|
-
var
|
|
1323
|
+
var R = new class e2 {
|
|
1318
1324
|
constructor(e6, t2 = {}) {
|
|
1319
1325
|
this.init(e6, t2);
|
|
1320
1326
|
}
|
|
1321
1327
|
init(e6, t2 = {}) {
|
|
1322
|
-
this.prefix = t2.prefix || `i18next:`, this.logger = e6 ||
|
|
1328
|
+
this.prefix = t2.prefix || `i18next:`, this.logger = e6 || Hr, this.options = t2, this.debug = t2.debug;
|
|
1323
1329
|
}
|
|
1324
1330
|
log(...e6) {
|
|
1325
1331
|
return this.forward(e6, `log`, ``, true);
|
|
@@ -1334,7 +1340,7 @@ var z = new class e2 {
|
|
|
1334
1340
|
return this.forward(e6, `warn`, `WARNING DEPRECATED: `, true);
|
|
1335
1341
|
}
|
|
1336
1342
|
forward(e6, t2, n2, r2) {
|
|
1337
|
-
return r2 && !this.debug ? null : (e6 = e6.map((e7) =>
|
|
1343
|
+
return r2 && !this.debug ? null : (e6 = e6.map((e7) => F(e7) ? e7.replace(/[\r\n\x00-\x1F\x7F]/g, ` `) : e7), F(e6[0]) && (e6[0] = `${n2}${this.prefix} ${e6[0]}`), this.logger[t2](e6));
|
|
1338
1344
|
}
|
|
1339
1345
|
create(t2) {
|
|
1340
1346
|
return new e2(this.logger, { prefix: `${this.prefix}:${t2}:`, ...this.options });
|
|
@@ -1343,7 +1349,7 @@ var z = new class e2 {
|
|
|
1343
1349
|
return t2 ||= this.options, t2.prefix = t2.prefix || this.prefix, new e2(this.logger, t2);
|
|
1344
1350
|
}
|
|
1345
1351
|
}();
|
|
1346
|
-
var
|
|
1352
|
+
var Ur = class {
|
|
1347
1353
|
constructor() {
|
|
1348
1354
|
this.observers = {};
|
|
1349
1355
|
}
|
|
@@ -1371,8 +1377,8 @@ var Vr = class {
|
|
|
1371
1377
|
});
|
|
1372
1378
|
}
|
|
1373
1379
|
};
|
|
1374
|
-
var
|
|
1375
|
-
var
|
|
1380
|
+
var Wr = /* @__PURE__ */ new WeakSet();
|
|
1381
|
+
var Gr = class extends Ur {
|
|
1376
1382
|
constructor(e6, t2 = { ns: [`translation`], defaultNS: `translation` }) {
|
|
1377
1383
|
super(), this.data = e6 || {}, this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = true);
|
|
1378
1384
|
}
|
|
@@ -1385,23 +1391,23 @@ var Ur = class extends Vr {
|
|
|
1385
1391
|
}
|
|
1386
1392
|
getResource(e6, t2, n2, r2 = {}) {
|
|
1387
1393
|
let i2 = r2.keySeparator === void 0 ? this.options.keySeparator : r2.keySeparator, a2 = r2.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r2.ignoreJSONStructure, o2;
|
|
1388
|
-
e6.includes(`.`) ? o2 = e6.split(`.`) : (o2 = [e6, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) :
|
|
1389
|
-
let s2 =
|
|
1390
|
-
return !s2 && !t2 && !n2 && e6.includes(`.`) && (e6 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !
|
|
1394
|
+
e6.includes(`.`) ? o2 = e6.split(`.`) : (o2 = [e6, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) : F(n2) && i2 ? o2.push(...n2.split(i2)) : o2.push(n2)));
|
|
1395
|
+
let s2 = jr(this.data, o2);
|
|
1396
|
+
return !s2 && !t2 && !n2 && e6.includes(`.`) && (e6 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !F(n2) ? s2 : Br(this.data?.[e6]?.[t2], n2, i2);
|
|
1391
1397
|
}
|
|
1392
1398
|
addResource(e6, t2, n2, r2, i2 = { silent: false }) {
|
|
1393
1399
|
let a2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, o2 = [e6, t2];
|
|
1394
|
-
n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e6.includes(`.`) && (o2 = e6.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2),
|
|
1400
|
+
n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e6.includes(`.`) && (o2 = e6.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), kr(this.data, o2, r2), i2.silent || this.emit(`added`, e6, t2, n2, r2);
|
|
1395
1401
|
}
|
|
1396
1402
|
addResources(e6, t2, n2, r2 = { silent: false }) {
|
|
1397
|
-
for (let r3 in n2) (
|
|
1403
|
+
for (let r3 in n2) (F(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e6, t2, r3, n2[r3], { silent: true });
|
|
1398
1404
|
r2.silent || this.emit(`added`, e6, t2, n2);
|
|
1399
1405
|
}
|
|
1400
1406
|
addResourceBundle(e6, t2, n2, r2, i2, a2 = { silent: false, skipCopy: false }) {
|
|
1401
1407
|
let o2 = [e6, t2];
|
|
1402
1408
|
e6.includes(`.`) && (o2 = e6.split(`.`), r2 = n2, n2 = t2, t2 = o2[1]), this.addNamespaces(t2);
|
|
1403
|
-
let s2 =
|
|
1404
|
-
a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ?
|
|
1409
|
+
let s2 = jr(this.data, o2) || {};
|
|
1410
|
+
a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ? Nr(s2, n2, i2) : s2 = { ...s2, ...n2 }, kr(this.data, o2, s2), a2.silent || this.emit(`added`, e6, t2, n2);
|
|
1405
1411
|
}
|
|
1406
1412
|
removeResourceBundle(e6, t2) {
|
|
1407
1413
|
this.hasResourceBundle(e6, t2) && delete this.data[e6][t2], this.removeNamespaces(t2), this.emit(`removed`, e6, t2);
|
|
@@ -1419,37 +1425,37 @@ var Ur = class extends Vr {
|
|
|
1419
1425
|
let t2 = this.getDataByLanguage(e6);
|
|
1420
1426
|
return !!(t2 && Object.keys(t2) || []).find((e7) => {
|
|
1421
1427
|
let n2 = t2[e7];
|
|
1422
|
-
return
|
|
1428
|
+
return Wr.has(n2) ? true : !n2 || Object.keys(n2).length === 0 ? false : (typeof n2 == `object` && Wr.add(n2), true);
|
|
1423
1429
|
});
|
|
1424
1430
|
}
|
|
1425
1431
|
toJSON() {
|
|
1426
1432
|
return this.data;
|
|
1427
1433
|
}
|
|
1428
1434
|
};
|
|
1429
|
-
var
|
|
1435
|
+
var Kr = { processors: {}, addPostProcessor(e6) {
|
|
1430
1436
|
this.processors[e6.name] = e6;
|
|
1431
1437
|
}, handle(e6, t2, n2, r2, i2) {
|
|
1432
1438
|
return e6.forEach((e7) => {
|
|
1433
1439
|
t2 = this.processors[e7]?.process(t2, n2, r2, i2) ?? t2;
|
|
1434
1440
|
}), t2;
|
|
1435
1441
|
} };
|
|
1436
|
-
var
|
|
1437
|
-
function
|
|
1442
|
+
var qr = Symbol(`i18next/PATH_KEY`);
|
|
1443
|
+
function Jr() {
|
|
1438
1444
|
let e6 = [], t2 = /* @__PURE__ */ Object.create(null), n2;
|
|
1439
|
-
return t2.get = (r2, i2) => (n2?.revoke?.(), i2 ===
|
|
1445
|
+
return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === qr ? e6 : (e6.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
|
|
1440
1446
|
}
|
|
1441
|
-
function
|
|
1442
|
-
let { [
|
|
1447
|
+
function z(e6, t2) {
|
|
1448
|
+
let { [qr]: n2 } = e6(Jr()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`, a2 = t2?.enableSelector === `strict`;
|
|
1443
1449
|
if (n2.length > 1 && i2) {
|
|
1444
1450
|
let e7 = t2?.ns, o2 = a2 ? Array.isArray(e7) ? e7 : e7 ? [e7] : null : Array.isArray(e7) ? e7 : null;
|
|
1445
1451
|
if (o2 && (a2 ? o2 : o2.length > 1 ? o2.slice(1) : []).includes(n2[0])) return `${n2[0]}${i2}${n2.slice(1).join(r2)}`;
|
|
1446
1452
|
}
|
|
1447
1453
|
return n2.join(r2);
|
|
1448
1454
|
}
|
|
1449
|
-
var
|
|
1450
|
-
var
|
|
1455
|
+
var Yr = (e6) => !F(e6) && typeof e6 != `boolean` && typeof e6 != `number`;
|
|
1456
|
+
var Xr = class e3 extends Ur {
|
|
1451
1457
|
constructor(e6, t2 = {}) {
|
|
1452
|
-
super(), wr([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e6, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger =
|
|
1458
|
+
super(), wr([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e6, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = R.create(`translator`), this.checkedLoadedFor = {};
|
|
1453
1459
|
}
|
|
1454
1460
|
changeLanguage(e6) {
|
|
1455
1461
|
e6 && (this.language = e6);
|
|
@@ -1459,33 +1465,33 @@ var Jr = class e3 extends Vr {
|
|
|
1459
1465
|
if (e6 == null) return false;
|
|
1460
1466
|
let r2 = this.resolve(e6, n2);
|
|
1461
1467
|
if (r2?.res === void 0) return false;
|
|
1462
|
-
let i2 =
|
|
1468
|
+
let i2 = Yr(r2.res);
|
|
1463
1469
|
return !(n2.returnObjects === false && i2);
|
|
1464
1470
|
}
|
|
1465
1471
|
extractFromKey(e6, t2) {
|
|
1466
1472
|
let n2 = t2.nsSeparator === void 0 ? this.options.nsSeparator : t2.nsSeparator;
|
|
1467
1473
|
n2 === void 0 && (n2 = `:`);
|
|
1468
|
-
let r2 = t2.keySeparator === void 0 ? this.options.keySeparator : t2.keySeparator, i2 = t2.ns || this.options.defaultNS || [], a2 = n2 && e6.includes(n2), o2 = !this.options.userDefinedKeySeparator && !t2.keySeparator && !this.options.userDefinedNsSeparator && !t2.nsSeparator && !
|
|
1474
|
+
let r2 = t2.keySeparator === void 0 ? this.options.keySeparator : t2.keySeparator, i2 = t2.ns || this.options.defaultNS || [], a2 = n2 && e6.includes(n2), o2 = !this.options.userDefinedKeySeparator && !t2.keySeparator && !this.options.userDefinedNsSeparator && !t2.nsSeparator && !zr(e6, n2, r2);
|
|
1469
1475
|
if (a2 && !o2) {
|
|
1470
1476
|
let t3 = e6.match(this.interpolator.nestingRegexp);
|
|
1471
|
-
if (t3 && t3.length > 0) return { key: e6, namespaces:
|
|
1477
|
+
if (t3 && t3.length > 0) return { key: e6, namespaces: F(i2) ? [i2] : i2 };
|
|
1472
1478
|
let a3 = e6.split(n2);
|
|
1473
1479
|
(n2 !== r2 || n2 === r2 && this.options.ns.includes(a3[0])) && (i2 = a3.shift()), e6 = a3.join(r2);
|
|
1474
1480
|
}
|
|
1475
|
-
return { key: e6, namespaces:
|
|
1481
|
+
return { key: e6, namespaces: F(i2) ? [i2] : i2 };
|
|
1476
1482
|
}
|
|
1477
1483
|
translate(t2, n2, r2) {
|
|
1478
1484
|
let i2 = typeof n2 == `object` ? { ...n2 } : n2;
|
|
1479
1485
|
if (typeof i2 != `object` && this.options.overloadTranslationOptionHandler && (i2 = this.options.overloadTranslationOptionHandler(arguments)), typeof i2 == `object` && (i2 = { ...i2 }), i2 ||= {}, t2 == null) return ``;
|
|
1480
|
-
typeof t2 == `function` && (t2 =
|
|
1486
|
+
typeof t2 == `function` && (t2 = z(t2, { ...this.options, ...i2 })), Array.isArray(t2) || (t2 = [String(t2)]), t2 = t2.map((e6) => typeof e6 == `function` ? z(e6, { ...this.options, ...i2 }) : String(e6));
|
|
1481
1487
|
let a2 = i2.returnDetails === void 0 ? this.options.returnDetails : i2.returnDetails, o2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, { key: s2, namespaces: c2 } = this.extractFromKey(t2[t2.length - 1], i2), l2 = c2[c2.length - 1], u2 = i2.nsSeparator === void 0 ? this.options.nsSeparator : i2.nsSeparator;
|
|
1482
1488
|
u2 === void 0 && (u2 = `:`);
|
|
1483
1489
|
let d2 = i2.lng || this.language, f2 = i2.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
1484
1490
|
if (d2?.toLowerCase() === `cimode`) return f2 ? a2 ? { res: `${l2}${u2}${s2}`, usedKey: s2, exactUsedKey: s2, usedLng: d2, usedNS: l2, usedParams: this.getUsedParamsDetails(i2) } : `${l2}${u2}${s2}` : a2 ? { res: s2, usedKey: s2, exactUsedKey: s2, usedLng: d2, usedNS: l2, usedParams: this.getUsedParamsDetails(i2) } : s2;
|
|
1485
|
-
let p2 = this.resolve(t2, i2), m2 = p2?.res, h2 = p2?.usedKey || s2, g2 = p2?.exactUsedKey || s2, _2 = [`[object Number]`, `[object Function]`, `[object RegExp]`], v2 = i2.joinArrays === void 0 ? this.options.joinArrays : i2.joinArrays, y2 = !this.i18nFormat || this.i18nFormat.handleAsObject, b2 = i2.count !== void 0 && !
|
|
1491
|
+
let p2 = this.resolve(t2, i2), m2 = p2?.res, h2 = p2?.usedKey || s2, g2 = p2?.exactUsedKey || s2, _2 = [`[object Number]`, `[object Function]`, `[object RegExp]`], v2 = i2.joinArrays === void 0 ? this.options.joinArrays : i2.joinArrays, y2 = !this.i18nFormat || this.i18nFormat.handleAsObject, b2 = i2.count !== void 0 && !F(i2.count), x2 = e3.hasDefaultValue(i2), S2 = b2 ? this.pluralResolver.getSuffix(d2, i2.count, i2) : ``, C2 = i2.ordinal && b2 ? this.pluralResolver.getSuffix(d2, i2.count, { ordinal: false }) : ``, ee2 = b2 && !i2.ordinal && i2.count === 0, w2 = ee2 && i2[`defaultValue${this.options.pluralSeparator}zero`] || i2[`defaultValue${S2}`] || i2[`defaultValue${C2}`] || i2.defaultValue, T2 = m2;
|
|
1486
1492
|
y2 && !m2 && x2 && (T2 = w2);
|
|
1487
|
-
let te2 =
|
|
1488
|
-
if (y2 && T2 && te2 && !_2.includes(ne2) && !(
|
|
1493
|
+
let te2 = Yr(T2), ne2 = Object.prototype.toString.apply(T2);
|
|
1494
|
+
if (y2 && T2 && te2 && !_2.includes(ne2) && !(F(v2) && Array.isArray(T2))) {
|
|
1489
1495
|
if (!i2.returnObjects && !this.options.returnObjects) {
|
|
1490
1496
|
this.options.returnedObjectHandler || this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);
|
|
1491
1497
|
let e6 = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h2, T2, { ...i2, ns: c2 }) : `key '${s2} (${this.language})' returned an object instead of string.`;
|
|
@@ -1495,11 +1501,11 @@ var Jr = class e3 extends Vr {
|
|
|
1495
1501
|
let e6 = Array.isArray(T2), t3 = e6 ? [] : {}, n3 = e6 ? g2 : h2;
|
|
1496
1502
|
for (let e7 in T2) if (Object.prototype.hasOwnProperty.call(T2, e7)) {
|
|
1497
1503
|
let r3 = `${n3}${o2}${e7}`;
|
|
1498
|
-
t3[e7] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue:
|
|
1504
|
+
t3[e7] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: Yr(w2) ? w2[e7] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e7] === r3 && (t3[e7] = T2[e7]);
|
|
1499
1505
|
}
|
|
1500
1506
|
m2 = t3;
|
|
1501
1507
|
}
|
|
1502
|
-
} else if (y2 &&
|
|
1508
|
+
} else if (y2 && F(v2) && Array.isArray(m2)) m2 = m2.join(v2), m2 &&= this.extendTranslation(m2, t2, i2, r2);
|
|
1503
1509
|
else {
|
|
1504
1510
|
let e6 = false, n3 = false;
|
|
1505
1511
|
!this.isValidLookup(m2) && x2 && (e6 = true, m2 = w2), this.isValidLookup(m2) || (n3 = true, m2 = s2);
|
|
@@ -1531,30 +1537,30 @@ var Jr = class e3 extends Vr {
|
|
|
1531
1537
|
if (this.i18nFormat?.parse) e6 = this.i18nFormat.parse(e6, { ...this.options.interpolation.defaultVariables, ...n2 }, n2.lng || this.language || r2.usedLng, r2.usedNS, r2.usedKey, { resolved: r2 });
|
|
1532
1538
|
else if (!n2.skipInterpolation) {
|
|
1533
1539
|
n2.interpolation && this.interpolator.init({ ...n2, interpolation: { ...this.options.interpolation, ...n2.interpolation } });
|
|
1534
|
-
let a3 =
|
|
1540
|
+
let a3 = F(e6) && (n2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n2.interpolation.skipOnVariables), o3;
|
|
1535
1541
|
if (a3) {
|
|
1536
1542
|
let t3 = e6.match(this.interpolator.nestingRegexp);
|
|
1537
1543
|
o3 = t3 && t3.length;
|
|
1538
1544
|
}
|
|
1539
|
-
let s2 = n2.replace && !
|
|
1545
|
+
let s2 = n2.replace && !F(n2.replace) ? n2.replace : n2;
|
|
1540
1546
|
if (this.options.interpolation.defaultVariables && (s2 = { ...this.options.interpolation.defaultVariables, ...s2 }), e6 = this.interpolator.interpolate(e6, s2, n2.lng || this.language || r2.usedLng, n2), a3) {
|
|
1541
1547
|
let t3 = e6.match(this.interpolator.nestingRegexp), r3 = t3 && t3.length;
|
|
1542
1548
|
o3 < r3 && (n2.nest = false);
|
|
1543
1549
|
}
|
|
1544
1550
|
!n2.lng && r2 && r2.res && (n2.lng = this.language || r2.usedLng), n2.nest !== false && (e6 = this.interpolator.nest(e6, (...e7) => i2?.[0] === e7[0] && !n2.context ? (this.logger.warn(`It seems you are nesting recursively key: ${e7[0]} in key: ${t2[0]}`), null) : this.translate(...e7, t2), n2)), n2.interpolation && this.interpolator.reset();
|
|
1545
1551
|
}
|
|
1546
|
-
let a2 = n2.postProcess || this.options.postProcess, o2 =
|
|
1547
|
-
return e6 != null && o2?.length && n2.applyPostProcessor !== false && (e6 =
|
|
1552
|
+
let a2 = n2.postProcess || this.options.postProcess, o2 = F(a2) ? [a2] : a2;
|
|
1553
|
+
return e6 != null && o2?.length && n2.applyPostProcessor !== false && (e6 = Kr.handle(o2, e6, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e6;
|
|
1548
1554
|
}
|
|
1549
1555
|
resolve(e6, t2 = {}) {
|
|
1550
1556
|
let n2, r2, i2, a2, o2;
|
|
1551
|
-
return
|
|
1557
|
+
return F(e6) && (e6 = [e6]), Array.isArray(e6) && (e6 = e6.map((e7) => typeof e7 == `function` ? z(e7, { ...this.options, ...t2 }) : e7)), e6.forEach((e7) => {
|
|
1552
1558
|
if (this.isValidLookup(n2)) return;
|
|
1553
1559
|
let s2 = this.extractFromKey(e7, t2), c2 = s2.key;
|
|
1554
1560
|
r2 = c2;
|
|
1555
1561
|
let l2 = s2.namespaces;
|
|
1556
1562
|
this.options.fallbackNS && (l2 = l2.concat(this.options.fallbackNS));
|
|
1557
|
-
let u2 = t2.count !== void 0 && !
|
|
1563
|
+
let u2 = t2.count !== void 0 && !F(t2.count), d2 = u2 && !t2.ordinal && t2.count === 0, f2 = t2.context !== void 0 && (F(t2.context) || typeof t2.context == `number`) && t2.context !== ``, p2 = t2.lngs ? t2.lngs : this.languageUtils.toResolveHierarchy(t2.lng || this.language, t2.fallbackLng);
|
|
1558
1564
|
l2.forEach((e8) => {
|
|
1559
1565
|
this.isValidLookup(n2) || (o2 = e8, !this.checkedLoadedFor[`${p2[0]}-${e8}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o2) && (this.checkedLoadedFor[`${p2[0]}-${e8}`] = true, this.logger.warn(`key "${r2}" for languages "${p2.join(`, `)}" won't get resolved as namespace "${o2}" was not yet loaded`, `This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)), p2.forEach((r3) => {
|
|
1560
1566
|
if (this.isValidLookup(n2)) return;
|
|
@@ -1583,7 +1589,7 @@ var Jr = class e3 extends Vr {
|
|
|
1583
1589
|
return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e6, t2, n2, r2) : this.resourceStore.getResource(e6, t2, n2, r2);
|
|
1584
1590
|
}
|
|
1585
1591
|
getUsedParamsDetails(e6 = {}) {
|
|
1586
|
-
let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e6.replace && !
|
|
1592
|
+
let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e6.replace && !F(e6.replace), r2 = n2 ? e6.replace : e6;
|
|
1587
1593
|
if (n2 && e6.count !== void 0 && (r2 = { ...r2, count: e6.count }), this.options.interpolation.defaultVariables && (r2 = { ...this.options.interpolation.defaultVariables, ...r2 }), !n2) {
|
|
1588
1594
|
r2 = { ...r2 };
|
|
1589
1595
|
for (let e7 of t2) delete r2[e7];
|
|
@@ -1595,25 +1601,25 @@ var Jr = class e3 extends Vr {
|
|
|
1595
1601
|
return false;
|
|
1596
1602
|
}
|
|
1597
1603
|
};
|
|
1598
|
-
var
|
|
1604
|
+
var Zr = class {
|
|
1599
1605
|
constructor(e6) {
|
|
1600
|
-
this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger =
|
|
1606
|
+
this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger = R.create(`languageUtils`), this.resolveHierarchyCache = {};
|
|
1601
1607
|
}
|
|
1602
1608
|
clearCache() {
|
|
1603
1609
|
this.resolveHierarchyCache = {};
|
|
1604
1610
|
}
|
|
1605
1611
|
getScriptPartFromCode(e6) {
|
|
1606
|
-
if (e6 =
|
|
1612
|
+
if (e6 = Vr(e6), !e6 || !e6.includes(`-`)) return null;
|
|
1607
1613
|
let t2 = e6.split(`-`);
|
|
1608
1614
|
return t2.length === 2 || (t2.pop(), t2[t2.length - 1].toLowerCase() === `x`) ? null : this.formatLanguageCode(t2.join(`-`));
|
|
1609
1615
|
}
|
|
1610
1616
|
getLanguagePartFromCode(e6) {
|
|
1611
|
-
if (e6 =
|
|
1617
|
+
if (e6 = Vr(e6), !e6 || !e6.includes(`-`)) return e6;
|
|
1612
1618
|
let t2 = e6.split(`-`);
|
|
1613
1619
|
return this.formatLanguageCode(t2[0]);
|
|
1614
1620
|
}
|
|
1615
1621
|
formatLanguageCode(e6) {
|
|
1616
|
-
if (
|
|
1622
|
+
if (F(e6) && e6.includes(`-`)) {
|
|
1617
1623
|
let t2;
|
|
1618
1624
|
try {
|
|
1619
1625
|
t2 = Intl.getCanonicalLocales(e6)[0];
|
|
@@ -1644,7 +1650,7 @@ var Yr = class {
|
|
|
1644
1650
|
}
|
|
1645
1651
|
getFallbackCodes(e6, t2) {
|
|
1646
1652
|
if (!e6) return [];
|
|
1647
|
-
if (typeof e6 == `function` && (e6 = e6(t2)),
|
|
1653
|
+
if (typeof e6 == `function` && (e6 = e6(t2)), F(e6) && (e6 = [e6]), Array.isArray(e6)) return e6;
|
|
1648
1654
|
if (!t2) return e6.default || [];
|
|
1649
1655
|
let n2 = e6[t2];
|
|
1650
1656
|
return n2 ||= e6[this.getScriptPartFromCode(t2)], n2 ||= e6[this.formatLanguageCode(t2)], n2 ||= e6[this.getLanguagePartFromCode(t2)], n2 ||= e6.default, n2 || [];
|
|
@@ -1652,7 +1658,7 @@ var Yr = class {
|
|
|
1652
1658
|
toResolveHierarchy(e6, t2) {
|
|
1653
1659
|
let n2 = this.options.fallbackLng, r2 = Array.isArray(n2) ? n2.join(`|`) : n2;
|
|
1654
1660
|
r2 !== this._cachedFallbackLng && (this.resolveHierarchyCache = {}, this._cachedFallbackLng = r2);
|
|
1655
|
-
let i2 = t2 === void 0 || t2 === false ||
|
|
1661
|
+
let i2 = t2 === void 0 || t2 === false || F(t2), a2 = t2 === void 0 && typeof this.options.fallbackLng == `function`, o2 = F(e6) && i2 && !a2, s2 = null;
|
|
1656
1662
|
if (o2) {
|
|
1657
1663
|
let n3;
|
|
1658
1664
|
n3 = t2 === void 0 ? `undefined` : t2 === false ? `boolean:false` : `string:${t2}`, s2 = `${e6.length}:${e6}|${n3}`;
|
|
@@ -1664,30 +1670,30 @@ var Yr = class {
|
|
|
1664
1670
|
let c2 = this.getFallbackCodes((t2 === false ? [] : t2) || this.options.fallbackLng || [], e6), l2 = [], u2 = (e7) => {
|
|
1665
1671
|
e7 && (this.isSupportedCode(e7) ? l2.push(e7) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e7}`));
|
|
1666
1672
|
};
|
|
1667
|
-
return
|
|
1673
|
+
return F(e6) && (e6.includes(`-`) || e6.includes(`_`)) ? (this.options.load !== `languageOnly` && u2(this.formatLanguageCode(e6)), this.options.load !== `languageOnly` && this.options.load !== `currentOnly` && u2(this.getScriptPartFromCode(e6)), this.options.load !== `currentOnly` && u2(this.getLanguagePartFromCode(e6))) : F(e6) && u2(this.formatLanguageCode(e6)), c2.forEach((e7) => {
|
|
1668
1674
|
let t3 = this.formatLanguageCode(e7);
|
|
1669
1675
|
l2.includes(t3) || u2(t3);
|
|
1670
1676
|
}), s2 === null ? l2 : (this.resolveHierarchyCache[s2] = l2, l2.slice());
|
|
1671
1677
|
}
|
|
1672
1678
|
};
|
|
1673
|
-
var
|
|
1674
|
-
var
|
|
1675
|
-
var
|
|
1679
|
+
var Qr = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
|
|
1680
|
+
var $r = { select: (e6) => e6 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
|
|
1681
|
+
var ei = class {
|
|
1676
1682
|
constructor(e6, t2 = {}) {
|
|
1677
|
-
this.languageUtils = e6, this.options = t2, this.logger =
|
|
1683
|
+
this.languageUtils = e6, this.options = t2, this.logger = R.create(`pluralResolver`), this.pluralRulesCache = {};
|
|
1678
1684
|
}
|
|
1679
1685
|
clearCache() {
|
|
1680
1686
|
this.pluralRulesCache = {};
|
|
1681
1687
|
}
|
|
1682
1688
|
getRule(e6, t2 = {}) {
|
|
1683
|
-
let n2 =
|
|
1689
|
+
let n2 = Vr(e6 === `dev` ? `en` : e6), r2 = t2.ordinal ? `ordinal` : `cardinal`, i2 = JSON.stringify({ cleanedCode: n2, type: r2 });
|
|
1684
1690
|
if (i2 in this.pluralRulesCache) return this.pluralRulesCache[i2];
|
|
1685
1691
|
let a2;
|
|
1686
1692
|
try {
|
|
1687
1693
|
a2 = new Intl.PluralRules(n2, { type: r2 });
|
|
1688
1694
|
} catch {
|
|
1689
|
-
if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`),
|
|
1690
|
-
if (!e6.match(/-|_/)) return
|
|
1695
|
+
if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), $r;
|
|
1696
|
+
if (!e6.match(/-|_/)) return $r;
|
|
1691
1697
|
let n3 = this.languageUtils.getLanguagePartFromCode(e6);
|
|
1692
1698
|
a2 = this.getRule(n3, t2);
|
|
1693
1699
|
}
|
|
@@ -1702,26 +1708,26 @@ var Qr = class {
|
|
|
1702
1708
|
}
|
|
1703
1709
|
getSuffixes(e6, t2 = {}) {
|
|
1704
1710
|
let n2 = this.getRule(e6, t2);
|
|
1705
|
-
return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e7, t3) =>
|
|
1711
|
+
return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e7, t3) => Qr[e7] - Qr[t3]).map((e7) => `${this.options.prepend}${t2.ordinal ? `ordinal${this.options.prepend}` : ``}${e7}`) : [];
|
|
1706
1712
|
}
|
|
1707
1713
|
getSuffix(e6, t2, n2 = {}) {
|
|
1708
1714
|
let r2 = this.getRule(e6, n2);
|
|
1709
1715
|
return r2 ? `${this.options.prepend}${n2.ordinal ? `ordinal${this.options.prepend}` : ``}${r2.select(t2)}` : (this.logger.warn(`no plural rule found for: ${e6}`), this.getSuffix(`dev`, t2, n2));
|
|
1710
1716
|
}
|
|
1711
1717
|
};
|
|
1712
|
-
var
|
|
1713
|
-
let a2 =
|
|
1714
|
-
return !a2 && i2 &&
|
|
1718
|
+
var ti = (e6, t2, n2, r2 = `.`, i2 = true) => {
|
|
1719
|
+
let a2 = Mr(e6, t2, n2);
|
|
1720
|
+
return !a2 && i2 && F(n2) && (a2 = Br(e6, n2, r2), a2 === void 0 && (a2 = Br(t2, n2, r2))), a2;
|
|
1715
1721
|
};
|
|
1716
|
-
var
|
|
1717
|
-
var
|
|
1722
|
+
var ni = (e6) => e6.replace(/\$/g, `$$$$`);
|
|
1723
|
+
var ri = class {
|
|
1718
1724
|
constructor(e6 = {}) {
|
|
1719
|
-
this.logger =
|
|
1725
|
+
this.logger = R.create(`interpolator`), this.options = e6, this.format = e6?.interpolation?.format || ((e7) => e7), this.init(e6);
|
|
1720
1726
|
}
|
|
1721
1727
|
init(e6 = {}) {
|
|
1722
1728
|
e6.interpolation ||= { escapeValue: true };
|
|
1723
1729
|
let { escape: t2, escapeValue: n2, useRawValueToEscape: r2, prefix: i2, prefixEscaped: a2, suffix: o2, suffixEscaped: s2, formatSeparator: c2, unescapeSuffix: l2, unescapePrefix: u2, nestingPrefix: d2, nestingPrefixEscaped: f2, nestingSuffix: p2, nestingSuffixEscaped: m2, nestingOptionsSeparator: h2, maxReplaces: g2, alwaysFormat: _2 } = e6.interpolation;
|
|
1724
|
-
this.escape = t2 === void 0 ?
|
|
1730
|
+
this.escape = t2 === void 0 ? Fr : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ? L(i2) : a2 || `{{`, this.suffix = o2 ? L(o2) : s2 || `}}`, this.formatSeparator = c2 || `,`, this.unescapePrefix = l2 ? `` : u2 ? L(u2) : `-`, this.unescapeSuffix = this.unescapePrefix ? `` : l2 ? L(l2) : ``, this.nestingPrefix = d2 ? L(d2) : f2 || L(`$t(`), this.nestingSuffix = p2 ? L(p2) : m2 || L(`)`), this.nestingOptionsSeparator = h2 || `,`, this.maxReplaces = g2 || 1e3, this.alwaysFormat = _2 !== void 0 && _2, this.resetRegExp();
|
|
1725
1731
|
}
|
|
1726
1732
|
reset() {
|
|
1727
1733
|
this.options && this.init(this.options);
|
|
@@ -1733,11 +1739,11 @@ var ti = class {
|
|
|
1733
1739
|
interpolate(e6, t2, n2, r2) {
|
|
1734
1740
|
let i2, a2, o2, s2 = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c2 = (e7) => {
|
|
1735
1741
|
if (!e7.includes(this.formatSeparator)) {
|
|
1736
|
-
let i4 =
|
|
1742
|
+
let i4 = ti(t2, s2, e7, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
1737
1743
|
return this.alwaysFormat ? this.format(i4, void 0, n2, { ...r2, ...t2, interpolationkey: e7 }) : i4;
|
|
1738
1744
|
}
|
|
1739
1745
|
let i3 = e7.split(this.formatSeparator), a3 = i3.shift().trim(), o3 = i3.join(this.formatSeparator).trim();
|
|
1740
|
-
return this.format(
|
|
1746
|
+
return this.format(ti(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
|
|
1741
1747
|
};
|
|
1742
1748
|
this.resetRegExp(), !this.escapeValue && typeof e6 == `string` && /\$t\([^)]*\{[^}]*\{\{/.test(e6) && this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false \u2014 if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);
|
|
1743
1749
|
let l2 = r2?.missingInterpolationHandler || this.options.missingInterpolationHandler, u2 = r2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r2.interpolation.skipOnVariables;
|
|
@@ -1747,15 +1753,15 @@ var ti = class {
|
|
|
1747
1753
|
if (a2 = c2(n3), a2 === void 0) {
|
|
1748
1754
|
if (typeof l2 == `function`) {
|
|
1749
1755
|
let t4 = l2(e6, i2, r2);
|
|
1750
|
-
a2 =
|
|
1756
|
+
a2 = F(t4) ? t4 : ``;
|
|
1751
1757
|
} else if (r2 && Object.prototype.hasOwnProperty.call(r2, n3)) a2 = ``;
|
|
1752
1758
|
else if (u2) {
|
|
1753
1759
|
a2 = i2[0];
|
|
1754
1760
|
continue;
|
|
1755
1761
|
} else this.logger.warn(`missed to pass in variable ${n3} for interpolating ${e6}`), a2 = ``;
|
|
1756
|
-
} else !
|
|
1762
|
+
} else !F(a2) && !this.useRawValueToEscape && (a2 = Cr(a2));
|
|
1757
1763
|
let s3 = t3.safeValue(a2);
|
|
1758
|
-
if (e6 = e6.replace(i2[0],
|
|
1764
|
+
if (e6 = e6.replace(i2[0], ni(s3)), u2 ? (t3.regex.lastIndex += s3.length, t3.regex.lastIndex -= i2[0].length) : t3.regex.lastIndex = 0, o2++, o2 >= this.maxReplaces) break;
|
|
1759
1765
|
}
|
|
1760
1766
|
}), e6;
|
|
1761
1767
|
}
|
|
@@ -1776,15 +1782,15 @@ var ti = class {
|
|
|
1776
1782
|
}, s2 = new RegExp(this.nestingRegexp), c2 = ``, l2 = 0;
|
|
1777
1783
|
for (; r2 = s2.exec(e6); ) {
|
|
1778
1784
|
let u2 = [];
|
|
1779
|
-
a2 = { ...n2 }, a2 = a2.replace && !
|
|
1785
|
+
a2 = { ...n2 }, a2 = a2.replace && !F(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
|
|
1780
1786
|
let d2 = /{.*}/s.test(r2[1]) ? r2[1].lastIndexOf(`}`) + 1 : r2[1].indexOf(this.formatSeparator);
|
|
1781
|
-
if (d2 !== -1 && (u2 = r2[1].slice(d2).split(this.formatSeparator).map((e7) => e7.trim()).filter(Boolean), r2[1] = r2[1].slice(0, d2)), i2 = t2(o2.call(this, r2[1].trim(), a2), a2), i2 && r2[0] === e6 && !
|
|
1782
|
-
|
|
1787
|
+
if (d2 !== -1 && (u2 = r2[1].slice(d2).split(this.formatSeparator).map((e7) => e7.trim()).filter(Boolean), r2[1] = r2[1].slice(0, d2)), i2 = t2(o2.call(this, r2[1].trim(), a2), a2), i2 && r2[0] === e6 && !F(i2)) return i2;
|
|
1788
|
+
F(i2) || (i2 = Cr(i2)), i2 ||= (this.logger.warn(`missed to resolve ${r2[1]} for nesting ${e6}`), ``), u2.length && (i2 = u2.reduce((e7, t3) => this.format(e7, t3, n2.lng, { ...n2, interpolationkey: r2[1].trim() }), i2.trim())), c2 += e6.slice(l2, r2.index) + Cr(i2), l2 = s2.lastIndex, this.regexp.lastIndex = 0;
|
|
1783
1789
|
}
|
|
1784
1790
|
return l2 ? c2 + e6.slice(l2) : e6;
|
|
1785
1791
|
}
|
|
1786
1792
|
};
|
|
1787
|
-
var
|
|
1793
|
+
var ii = (e6) => {
|
|
1788
1794
|
let t2 = e6.toLowerCase().trim(), n2 = {};
|
|
1789
1795
|
if (e6.includes(`(`)) {
|
|
1790
1796
|
let r2 = e6.split(`(`);
|
|
@@ -1799,23 +1805,23 @@ var ni = (e6) => {
|
|
|
1799
1805
|
}
|
|
1800
1806
|
return { formatName: t2, formatOptions: n2 };
|
|
1801
1807
|
};
|
|
1802
|
-
var
|
|
1808
|
+
var ai = (e6) => {
|
|
1803
1809
|
let t2 = {};
|
|
1804
1810
|
return (n2, r2, i2) => {
|
|
1805
1811
|
let a2 = i2;
|
|
1806
1812
|
i2 && i2.interpolationkey && i2.formatParams && i2.formatParams[i2.interpolationkey] && i2[i2.interpolationkey] && (a2 = { ...a2, [i2.interpolationkey]: void 0 });
|
|
1807
1813
|
let o2 = r2 + JSON.stringify(a2), s2 = t2[o2];
|
|
1808
|
-
return s2 || (s2 = e6(
|
|
1814
|
+
return s2 || (s2 = e6(Vr(r2), i2), t2[o2] = s2), s2(n2);
|
|
1809
1815
|
};
|
|
1810
1816
|
};
|
|
1811
|
-
var
|
|
1812
|
-
var
|
|
1817
|
+
var oi = (e6) => (t2, n2, r2) => e6(Vr(n2), r2)(t2);
|
|
1818
|
+
var si = class {
|
|
1813
1819
|
constructor(e6 = {}) {
|
|
1814
|
-
this.logger =
|
|
1820
|
+
this.logger = R.create(`formatter`), this.options = e6, this.init(e6);
|
|
1815
1821
|
}
|
|
1816
1822
|
init(e6, t2 = { interpolation: {} }) {
|
|
1817
1823
|
this.formatSeparator = t2.interpolation.formatSeparator || `,`;
|
|
1818
|
-
let n2 = t2.cacheInBuiltFormats ?
|
|
1824
|
+
let n2 = t2.cacheInBuiltFormats ? ai : oi;
|
|
1819
1825
|
this.formats = { number: n2((e7, t3) => {
|
|
1820
1826
|
let n3 = new Intl.NumberFormat(e7, { ...t3 });
|
|
1821
1827
|
return (e8) => n3.format(e8);
|
|
@@ -1837,7 +1843,7 @@ var ai = class {
|
|
|
1837
1843
|
this.formats[e6.toLowerCase().trim()] = t2;
|
|
1838
1844
|
}
|
|
1839
1845
|
addCached(e6, t2) {
|
|
1840
|
-
this.formats[e6.toLowerCase().trim()] =
|
|
1846
|
+
this.formats[e6.toLowerCase().trim()] = ai(t2);
|
|
1841
1847
|
}
|
|
1842
1848
|
format(e6, t2, n2, r2 = {}) {
|
|
1843
1849
|
if (!t2 || e6 == null) return e6;
|
|
@@ -1848,7 +1854,7 @@ var ai = class {
|
|
|
1848
1854
|
a2.push(t3);
|
|
1849
1855
|
}
|
|
1850
1856
|
return a2.reduce((e7, t3) => {
|
|
1851
|
-
let { formatName: i3, formatOptions: a3 } =
|
|
1857
|
+
let { formatName: i3, formatOptions: a3 } = ii(t3);
|
|
1852
1858
|
if (this.formats[i3]) {
|
|
1853
1859
|
let t4 = e7;
|
|
1854
1860
|
try {
|
|
@@ -1863,12 +1869,12 @@ var ai = class {
|
|
|
1863
1869
|
}, e6);
|
|
1864
1870
|
}
|
|
1865
1871
|
};
|
|
1866
|
-
var
|
|
1872
|
+
var ci = (e6, t2) => {
|
|
1867
1873
|
e6.pending[t2] !== void 0 && (delete e6.pending[t2], e6.pendingCount--);
|
|
1868
1874
|
};
|
|
1869
|
-
var
|
|
1875
|
+
var li = class extends Ur {
|
|
1870
1876
|
constructor(e6, t2, n2, r2 = {}) {
|
|
1871
|
-
super(), this.backend = e6, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger =
|
|
1877
|
+
super(), this.backend = e6, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger = R.create(`backendConnector`), this.waitingReads = [], this.maxParallelReads = r2.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r2.maxRetries >= 0 ? r2.maxRetries : 5, this.retryTimeout = r2.retryTimeout >= 1 ? r2.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n2, r2.backend, r2);
|
|
1872
1878
|
}
|
|
1873
1879
|
queueLoad(e6, t2, n2, r2) {
|
|
1874
1880
|
let i2 = {}, a2 = {}, o2 = {}, s2 = {};
|
|
@@ -1885,7 +1891,7 @@ var si = class extends Vr {
|
|
|
1885
1891
|
t2 && this.emit(`failedLoading`, i2, a2, t2), !t2 && n2 && this.store.addResourceBundle(i2, a2, n2, void 0, void 0, { skipCopy: true }), this.state[e6] = t2 ? -1 : 2, t2 && n2 && (this.state[e6] = 0);
|
|
1886
1892
|
let o2 = {};
|
|
1887
1893
|
this.queue.forEach((n3) => {
|
|
1888
|
-
|
|
1894
|
+
Ar(n3.loaded, [i2], a2), ci(n3, e6), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e7) => {
|
|
1889
1895
|
o2[e7] || (o2[e7] = {});
|
|
1890
1896
|
let t3 = n3.loaded[e7];
|
|
1891
1897
|
t3.length && t3.forEach((t4) => {
|
|
@@ -1920,7 +1926,7 @@ var si = class extends Vr {
|
|
|
1920
1926
|
}
|
|
1921
1927
|
prepareLoading(e6, t2, n2 = {}, r2) {
|
|
1922
1928
|
if (!this.backend) return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`), r2 && r2();
|
|
1923
|
-
|
|
1929
|
+
F(e6) && (e6 = this.languageUtils.toResolveHierarchy(e6)), F(t2) && (t2 = [t2]);
|
|
1924
1930
|
let i2 = this.queueLoad(e6, t2, n2, r2);
|
|
1925
1931
|
if (!i2.toLoad.length) return i2.pending.length || r2(), null;
|
|
1926
1932
|
i2.toLoad.forEach((e7) => {
|
|
@@ -1957,9 +1963,9 @@ var si = class extends Vr {
|
|
|
1957
1963
|
}
|
|
1958
1964
|
}
|
|
1959
1965
|
};
|
|
1960
|
-
var
|
|
1966
|
+
var ui = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS: [`translation`], fallbackLng: [`dev`], fallbackNS: false, supportedLngs: false, nonExplicitSupportedLngs: false, load: `all`, preload: false, keySeparator: `.`, nsSeparator: `:`, pluralSeparator: `_`, contextSeparator: `_`, enableSelector: false, partialBundledLanguages: false, saveMissing: false, updateMissing: false, saveMissingTo: `fallback`, saveMissingPlurals: true, missingKeyHandler: false, missingInterpolationHandler: false, postProcess: false, postProcessPassResolved: false, returnNull: false, returnEmptyString: true, returnObjects: false, joinArrays: false, returnedObjectHandler: false, parseMissingKeyHandler: false, appendNamespaceToMissingKey: false, appendNamespaceToCIMode: false, overloadTranslationOptionHandler: (e6) => {
|
|
1961
1967
|
let t2 = {};
|
|
1962
|
-
if (typeof e6[1] == `object` && (t2 = e6[1]),
|
|
1968
|
+
if (typeof e6[1] == `object` && (t2 = e6[1]), F(e6[1]) && (t2.defaultValue = e6[1]), F(e6[2]) && (t2.tDescription = e6[2]), typeof e6[2] == `object` || typeof e6[3] == `object`) {
|
|
1963
1969
|
let n2 = e6[3] || e6[2];
|
|
1964
1970
|
Object.keys(n2).forEach((e7) => {
|
|
1965
1971
|
t2[e7] = n2[e7];
|
|
@@ -1967,17 +1973,17 @@ var ci = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS:
|
|
|
1967
1973
|
}
|
|
1968
1974
|
return t2;
|
|
1969
1975
|
}, interpolation: { escapeValue: true, prefix: `{{`, suffix: `}}`, formatSeparator: `,`, unescapePrefix: `-`, nestingPrefix: `$t(`, nestingSuffix: `)`, nestingOptionsSeparator: `,`, maxReplaces: 1e3, skipOnVariables: true }, cacheInBuiltFormats: true });
|
|
1970
|
-
var
|
|
1971
|
-
var
|
|
1976
|
+
var di = (e6) => (F(e6.ns) && (e6.ns = [e6.ns]), F(e6.fallbackLng) && (e6.fallbackLng = [e6.fallbackLng]), F(e6.fallbackNS) && (e6.fallbackNS = [e6.fallbackNS]), e6.supportedLngs && !e6.supportedLngs.includes(`cimode`) && (e6.supportedLngs = e6.supportedLngs.concat([`cimode`])), e6);
|
|
1977
|
+
var fi = () => {
|
|
1972
1978
|
};
|
|
1973
|
-
var
|
|
1979
|
+
var pi = (e6) => {
|
|
1974
1980
|
Object.getOwnPropertyNames(Object.getPrototypeOf(e6)).forEach((t2) => {
|
|
1975
1981
|
typeof e6[t2] == `function` && (e6[t2] = e6[t2].bind(e6));
|
|
1976
1982
|
});
|
|
1977
1983
|
};
|
|
1978
|
-
var
|
|
1984
|
+
var B = class e4 extends Ur {
|
|
1979
1985
|
constructor(e6 = {}, t2) {
|
|
1980
|
-
if (super(), this.options =
|
|
1986
|
+
if (super(), this.options = di(e6), this.services = {}, this.logger = R, this.modules = { external: [] }, pi(this), t2 && !this.isInitialized && !e6.isClone) {
|
|
1981
1987
|
if (!this.options.initAsync) return this.init(e6, t2), this;
|
|
1982
1988
|
setTimeout(() => {
|
|
1983
1989
|
this.init(e6, t2);
|
|
@@ -1985,26 +1991,26 @@ var V = class e4 extends Vr {
|
|
|
1985
1991
|
}
|
|
1986
1992
|
}
|
|
1987
1993
|
init(e6 = {}, t2) {
|
|
1988
|
-
this.isInitializing = true, typeof e6 == `function` && (t2 = e6, e6 = {}), e6.defaultNS == null && e6.ns && (
|
|
1989
|
-
let n2 =
|
|
1990
|
-
this.options = { ...n2, ...this.options, ...
|
|
1994
|
+
this.isInitializing = true, typeof e6 == `function` && (t2 = e6, e6 = {}), e6.defaultNS == null && e6.ns && (F(e6.ns) ? e6.defaultNS = e6.ns : e6.ns.includes(`translation`) || (e6.defaultNS = e6.ns[0]));
|
|
1995
|
+
let n2 = ui();
|
|
1996
|
+
this.options = { ...n2, ...this.options, ...di(e6) }, this.options.interpolation = { ...n2.interpolation, ...this.options.interpolation }, e6.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e6.keySeparator), e6.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e6.nsSeparator), typeof this.options.overloadTranslationOptionHandler != `function` && (this.options.overloadTranslationOptionHandler = n2.overloadTranslationOptionHandler);
|
|
1991
1997
|
let r2 = (e7) => e7 ? typeof e7 == `function` ? new e7() : e7 : null;
|
|
1992
1998
|
if (!this.options.isClone) {
|
|
1993
|
-
this.modules.logger ?
|
|
1999
|
+
this.modules.logger ? R.init(r2(this.modules.logger), this.options) : R.init(null, this.options);
|
|
1994
2000
|
let e7;
|
|
1995
|
-
e7 = this.modules.formatter ? this.modules.formatter :
|
|
1996
|
-
let t3 = new
|
|
1997
|
-
this.store = new
|
|
2001
|
+
e7 = this.modules.formatter ? this.modules.formatter : si;
|
|
2002
|
+
let t3 = new Zr(this.options);
|
|
2003
|
+
this.store = new Gr(this.options.resources, this.options);
|
|
1998
2004
|
let n3 = this.services;
|
|
1999
|
-
n3.logger =
|
|
2005
|
+
n3.logger = R, n3.resourceStore = this.store, n3.languageUtils = t3, n3.pluralResolver = new ei(t3, { prepend: this.options.pluralSeparator }), e7 && (n3.formatter = r2(e7), n3.formatter.init && n3.formatter.init(n3, this.options), this.options.interpolation.format = n3.formatter.format.bind(n3.formatter)), n3.interpolator = new ri(this.options), n3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, n3.backendConnector = new li(r2(this.modules.backend), n3.resourceStore, n3, this.options), n3.backendConnector.on(`*`, (e8, ...t4) => {
|
|
2000
2006
|
this.emit(e8, ...t4);
|
|
2001
|
-
}), this.modules.languageDetector && (n3.languageDetector = r2(this.modules.languageDetector), n3.languageDetector.init && n3.languageDetector.init(n3, this.options.detection, this.options)), this.modules.i18nFormat && (n3.i18nFormat = r2(this.modules.i18nFormat), n3.i18nFormat.init && n3.i18nFormat.init(this)), this.translator = new
|
|
2007
|
+
}), this.modules.languageDetector && (n3.languageDetector = r2(this.modules.languageDetector), n3.languageDetector.init && n3.languageDetector.init(n3, this.options.detection, this.options)), this.modules.i18nFormat && (n3.i18nFormat = r2(this.modules.i18nFormat), n3.i18nFormat.init && n3.i18nFormat.init(this)), this.translator = new Xr(this.services, this.options), this.translator.on(`*`, (e8, ...t4) => {
|
|
2002
2008
|
this.emit(e8, ...t4);
|
|
2003
2009
|
}), this.modules.external.forEach((e8) => {
|
|
2004
2010
|
e8.init && e8.init(this);
|
|
2005
2011
|
});
|
|
2006
2012
|
}
|
|
2007
|
-
if (this.format = this.options.interpolation.format, t2 ||=
|
|
2013
|
+
if (this.format = this.options.interpolation.format, t2 ||= fi, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
2008
2014
|
let e7 = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
2009
2015
|
e7.length > 0 && e7[0] !== `dev` && (this.options.lng = e7[0]);
|
|
2010
2016
|
}
|
|
@@ -2013,7 +2019,7 @@ var V = class e4 extends Vr {
|
|
|
2013
2019
|
}), [`addResource`, `addResources`, `addResourceBundle`, `removeResourceBundle`].forEach((e7) => {
|
|
2014
2020
|
this[e7] = (...t3) => (this.store[e7](...t3), this);
|
|
2015
2021
|
});
|
|
2016
|
-
let i2 =
|
|
2022
|
+
let i2 = I(), a2 = () => {
|
|
2017
2023
|
let e7 = (e8, n3) => {
|
|
2018
2024
|
this.isInitializing = false, this.isInitialized && !this.initializedStoreOnce && this.logger.warn(`init: i18next is already initialized. You should call init just once!`), this.isInitialized = true, this.options.isClone || this.logger.log(`initialized`, this.options), this.emit(`initialized`, this.options), i2.resolve(n3), t2(e8, n3);
|
|
2019
2025
|
};
|
|
@@ -2022,8 +2028,8 @@ var V = class e4 extends Vr {
|
|
|
2022
2028
|
};
|
|
2023
2029
|
return this.options.resources || !this.options.initAsync ? a2() : setTimeout(a2, 0), i2;
|
|
2024
2030
|
}
|
|
2025
|
-
loadResources(e6, t2 =
|
|
2026
|
-
let n2 = t2, r2 =
|
|
2031
|
+
loadResources(e6, t2 = fi) {
|
|
2032
|
+
let n2 = t2, r2 = F(e6) ? e6 : this.language;
|
|
2027
2033
|
if (typeof e6 == `function` && (n2 = e6), !this.options.resources || this.options.partialBundledLanguages) {
|
|
2028
2034
|
if (r2?.toLowerCase() === `cimode` && (!this.options.preload || this.options.preload.length === 0)) return n2();
|
|
2029
2035
|
let e7 = [], t3 = (t4) => {
|
|
@@ -2037,15 +2043,15 @@ var V = class e4 extends Vr {
|
|
|
2037
2043
|
} else n2(null);
|
|
2038
2044
|
}
|
|
2039
2045
|
reloadResources(e6, t2, n2) {
|
|
2040
|
-
let r2 =
|
|
2041
|
-
return typeof e6 == `function` && (n2 = e6, e6 = void 0), typeof t2 == `function` && (n2 = t2, t2 = void 0), e6 ||= this.languages, t2 ||= this.options.ns, n2 ||=
|
|
2046
|
+
let r2 = I();
|
|
2047
|
+
return typeof e6 == `function` && (n2 = e6, e6 = void 0), typeof t2 == `function` && (n2 = t2, t2 = void 0), e6 ||= this.languages, t2 ||= this.options.ns, n2 ||= fi, this.services.backendConnector.reload(e6, t2, (e7) => {
|
|
2042
2048
|
r2.resolve(), n2(e7);
|
|
2043
2049
|
}), r2;
|
|
2044
2050
|
}
|
|
2045
2051
|
use(e6) {
|
|
2046
2052
|
if (!e6) throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);
|
|
2047
2053
|
if (!e6.type) throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);
|
|
2048
|
-
return e6.type === `backend` && (this.modules.backend = e6), (e6.type === `logger` || e6.log && e6.warn && e6.error) && (this.modules.logger = e6), e6.type === `languageDetector` && (this.modules.languageDetector = e6), e6.type === `i18nFormat` && (this.modules.i18nFormat = e6), e6.type === `postProcessor` &&
|
|
2054
|
+
return e6.type === `backend` && (this.modules.backend = e6), (e6.type === `logger` || e6.log && e6.warn && e6.error) && (this.modules.logger = e6), e6.type === `languageDetector` && (this.modules.languageDetector = e6), e6.type === `i18nFormat` && (this.modules.i18nFormat = e6), e6.type === `postProcessor` && Kr.addPostProcessor(e6), e6.type === `formatter` && (this.modules.formatter = e6), e6.type === `3rdParty` && this.modules.external.push(e6), this;
|
|
2049
2055
|
}
|
|
2050
2056
|
setResolvedLanguage(e6) {
|
|
2051
2057
|
if (e6 && this.languages && ![`cimode`, `dev`].includes(e6)) {
|
|
@@ -2061,7 +2067,7 @@ var V = class e4 extends Vr {
|
|
|
2061
2067
|
}
|
|
2062
2068
|
changeLanguage(e6, t2) {
|
|
2063
2069
|
this.isLanguageChangingTo = e6;
|
|
2064
|
-
let n2 =
|
|
2070
|
+
let n2 = I();
|
|
2065
2071
|
this.emit(`languageChanging`, e6);
|
|
2066
2072
|
let r2 = (e7) => {
|
|
2067
2073
|
this.language = e7, this.languages = this.services.languageUtils.toResolveHierarchy(e7), this.resolvedLanguage = void 0, this.setResolvedLanguage(e7);
|
|
@@ -2069,7 +2075,7 @@ var V = class e4 extends Vr {
|
|
|
2069
2075
|
a3 ? this.isLanguageChangingTo === e6 && (r2(a3), this.translator.changeLanguage(a3), this.isLanguageChangingTo = void 0, this.emit(`languageChanged`, a3), this.logger.log(`languageChanged`, a3)) : this.isLanguageChangingTo = void 0, n2.resolve((...e7) => this.t(...e7)), t2 && t2(i3, (...e7) => this.t(...e7));
|
|
2070
2076
|
}, a2 = (t3) => {
|
|
2071
2077
|
!e6 && !t3 && this.services.languageDetector && (t3 = []);
|
|
2072
|
-
let n3 =
|
|
2078
|
+
let n3 = F(t3) ? t3 : t3 && t3[0], a3 = this.store.hasLanguageSomeTranslations(n3) ? n3 : this.services.languageUtils.getBestMatchFromCodes(F(t3) ? [t3] : t3);
|
|
2073
2079
|
a3 && (this.language || r2(a3), this.translator.language || this.translator.changeLanguage(a3), this.services.languageDetector?.cacheUserLanguage?.(a3)), this.loadResources(a3, (e7) => {
|
|
2074
2080
|
i2(e7, a3);
|
|
2075
2081
|
});
|
|
@@ -2083,11 +2089,11 @@ var V = class e4 extends Vr {
|
|
|
2083
2089
|
let s2 = o2.ns !== void 0 && o2.ns !== null;
|
|
2084
2090
|
o2.ns = o2.ns || a2.ns, o2.keyPrefix !== `` && (o2.keyPrefix = o2.keyPrefix || n2 || a2.keyPrefix);
|
|
2085
2091
|
let c2 = { ...this.options, ...o2 };
|
|
2086
|
-
Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix =
|
|
2092
|
+
Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix = z(o2.keyPrefix, c2));
|
|
2087
2093
|
let l2 = this.options.keySeparator || `.`, u2;
|
|
2088
|
-
return o2.keyPrefix && Array.isArray(e7) ? u2 = e7.map((e8) => (typeof e8 == `function` && (e8 =
|
|
2094
|
+
return o2.keyPrefix && Array.isArray(e7) ? u2 = e7.map((e8) => (typeof e8 == `function` && (e8 = z(e8, c2)), `${o2.keyPrefix}${l2}${e8}`)) : (typeof e7 == `function` && (e7 = z(e7, c2)), u2 = o2.keyPrefix ? `${o2.keyPrefix}${l2}${e7}` : e7), this.t(u2, o2);
|
|
2089
2095
|
};
|
|
2090
|
-
return
|
|
2096
|
+
return F(e6) ? a2.lng = e6 : a2.lngs = e6, a2.ns = t2, a2.keyPrefix = n2, a2;
|
|
2091
2097
|
}
|
|
2092
2098
|
t(...e6) {
|
|
2093
2099
|
return this.translator?.translate(...e6);
|
|
@@ -2116,16 +2122,16 @@ var V = class e4 extends Vr {
|
|
|
2116
2122
|
return !(s2 && !a2(s2, e6) || r2 && !a2(i2, e6));
|
|
2117
2123
|
}
|
|
2118
2124
|
loadNamespaces(e6, t2) {
|
|
2119
|
-
let n2 =
|
|
2120
|
-
return this.options.ns ? (
|
|
2125
|
+
let n2 = I();
|
|
2126
|
+
return this.options.ns ? (F(e6) && (e6 = [e6]), e6.forEach((e7) => {
|
|
2121
2127
|
this.options.ns.includes(e7) || this.options.ns.push(e7);
|
|
2122
2128
|
}), this.loadResources((e7) => {
|
|
2123
2129
|
n2.resolve(), t2 && t2(e7);
|
|
2124
2130
|
}), n2) : (t2 && t2(), Promise.resolve());
|
|
2125
2131
|
}
|
|
2126
2132
|
loadLanguages(e6, t2) {
|
|
2127
|
-
let n2 =
|
|
2128
|
-
|
|
2133
|
+
let n2 = I();
|
|
2134
|
+
F(e6) && (e6 = [e6]);
|
|
2129
2135
|
let r2 = this.options.preload || [], i2 = e6.filter((e7) => !r2.includes(e7) && this.services.languageUtils.isSupportedCode(e7));
|
|
2130
2136
|
return i2.length ? (this.options.preload = r2.concat(i2), this.loadResources((e7) => {
|
|
2131
2137
|
n2.resolve(), t2 && t2(e7);
|
|
@@ -2141,24 +2147,24 @@ var V = class e4 extends Vr {
|
|
|
2141
2147
|
}
|
|
2142
2148
|
} catch {
|
|
2143
2149
|
}
|
|
2144
|
-
let t2 = `ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`), n2 = this.services?.languageUtils || new
|
|
2150
|
+
let t2 = `ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`), n2 = this.services?.languageUtils || new Zr(ui());
|
|
2145
2151
|
return e6.toLowerCase().indexOf(`-latn`) > 1 ? `ltr` : t2.includes(n2.getLanguagePartFromCode(e6)) || e6.toLowerCase().indexOf(`-arab`) > 1 ? `rtl` : `ltr`;
|
|
2146
2152
|
}
|
|
2147
2153
|
static createInstance(t2 = {}, n2) {
|
|
2148
2154
|
let r2 = new e4(t2, n2);
|
|
2149
2155
|
return r2.createInstance = e4.createInstance, r2;
|
|
2150
2156
|
}
|
|
2151
|
-
cloneInstance(t2 = {}, n2 =
|
|
2157
|
+
cloneInstance(t2 = {}, n2 = fi) {
|
|
2152
2158
|
let r2 = t2.forkResourceStore;
|
|
2153
2159
|
r2 && delete t2.forkResourceStore;
|
|
2154
2160
|
let i2 = { ...this.options, preload: false, ...t2, isClone: true }, a2 = new e4(i2);
|
|
2155
2161
|
if ((t2.debug !== void 0 || t2.prefix !== void 0) && (a2.logger = a2.logger.clone(t2)), [`store`, `services`, `language`].forEach((e6) => {
|
|
2156
2162
|
a2[e6] = this[e6];
|
|
2157
|
-
}), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new
|
|
2158
|
-
let e6 = { ...
|
|
2159
|
-
a2.services.interpolator = new
|
|
2163
|
+
}), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new Gr(Object.keys(this.store.data).reduce((e6, t3) => (e6[t3] = { ...this.store.data[t3] }, e6[t3] = Object.keys(e6[t3]).reduce((n3, r3) => (n3[r3] = { ...e6[t3][r3] }, n3), e6[t3]), e6), {}), i2), a2.services.resourceStore = a2.store), t2.interpolation) {
|
|
2164
|
+
let e6 = { ...ui().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e6 };
|
|
2165
|
+
a2.services.interpolator = new ri(n3);
|
|
2160
2166
|
}
|
|
2161
|
-
return a2.translator = new
|
|
2167
|
+
return a2.translator = new Xr(a2.services, i2), a2.translator.on(`*`, (e6, ...t3) => {
|
|
2162
2168
|
a2.emit(e6, ...t3);
|
|
2163
2169
|
}), a2.init(i2, n2), a2.translator.options = i2, a2.translator.backendConnector.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, a2;
|
|
2164
2170
|
}
|
|
@@ -2166,9 +2172,9 @@ var V = class e4 extends Vr {
|
|
|
2166
2172
|
return { options: this.options, store: this.store, language: this.language, languages: this.languages, resolvedLanguage: this.resolvedLanguage };
|
|
2167
2173
|
}
|
|
2168
2174
|
}.createInstance();
|
|
2169
|
-
|
|
2170
|
-
var
|
|
2171
|
-
let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 =
|
|
2175
|
+
B.createInstance, B.dir, B.init, B.loadResources, B.reloadResources, B.use, B.changeLanguage, B.getFixedT, B.t, B.exists, B.setDefaultNamespace, B.hasLoadedNamespace, B.loadNamespaces, B.loadLanguages;
|
|
2176
|
+
var mi = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 = false, disableAutoInit: i2 = false, bindI18n: a2 }, { icu: o2 } = {}) => {
|
|
2177
|
+
let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 = B.createInstance(i2 ? s2 : void 0);
|
|
2172
2178
|
return o2 && c2.use(o2), t2 && c2.use({ type: `backend`, read: async (e7, n3, r3) => {
|
|
2173
2179
|
try {
|
|
2174
2180
|
return r3(null, await t2(e7));
|
|
@@ -2177,38 +2183,38 @@ var fi = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 =
|
|
|
2177
2183
|
}
|
|
2178
2184
|
} }), n2 && (s2.resources = { [e6]: { translation: n2 } }), i2 || c2.init(s2), c2;
|
|
2179
2185
|
};
|
|
2180
|
-
function
|
|
2181
|
-
let n2 = t2 && t2.cache ? t2.cache :
|
|
2182
|
-
return (t2 && t2.strategy ? t2.strategy :
|
|
2186
|
+
function hi(e6, t2) {
|
|
2187
|
+
let n2 = t2 && t2.cache ? t2.cache : Ti, r2 = t2 && t2.serializer ? t2.serializer : Ci;
|
|
2188
|
+
return (t2 && t2.strategy ? t2.strategy : bi)(e6, { cache: n2, serializer: r2 });
|
|
2183
2189
|
}
|
|
2184
|
-
function
|
|
2190
|
+
function gi(e6) {
|
|
2185
2191
|
return e6 == null || typeof e6 == `number` || typeof e6 == `boolean`;
|
|
2186
2192
|
}
|
|
2187
|
-
function
|
|
2188
|
-
let i2 =
|
|
2193
|
+
function _i(e6, t2, n2, r2) {
|
|
2194
|
+
let i2 = gi(r2) ? r2 : n2(r2), a2 = t2.get(i2);
|
|
2189
2195
|
return a2 === void 0 && (a2 = e6.call(this, r2), t2.set(i2, a2)), a2;
|
|
2190
2196
|
}
|
|
2191
|
-
function
|
|
2197
|
+
function vi(e6, t2, n2) {
|
|
2192
2198
|
let r2 = Array.prototype.slice.call(arguments, 3), i2 = n2(r2), a2 = t2.get(i2);
|
|
2193
2199
|
return a2 === void 0 && (a2 = e6.apply(this, r2), t2.set(i2, a2)), a2;
|
|
2194
2200
|
}
|
|
2195
|
-
function
|
|
2201
|
+
function yi(e6, t2, n2, r2, i2) {
|
|
2196
2202
|
return n2.bind(t2, e6, r2, i2);
|
|
2197
2203
|
}
|
|
2198
|
-
function
|
|
2199
|
-
let n2 = e6.length === 1 ?
|
|
2200
|
-
return
|
|
2204
|
+
function bi(e6, t2) {
|
|
2205
|
+
let n2 = e6.length === 1 ? _i : vi;
|
|
2206
|
+
return yi(e6, this, n2, t2.cache.create(), t2.serializer);
|
|
2201
2207
|
}
|
|
2202
|
-
function
|
|
2203
|
-
return
|
|
2208
|
+
function xi(e6, t2) {
|
|
2209
|
+
return yi(e6, this, vi, t2.cache.create(), t2.serializer);
|
|
2204
2210
|
}
|
|
2205
|
-
function
|
|
2206
|
-
return
|
|
2211
|
+
function Si(e6, t2) {
|
|
2212
|
+
return yi(e6, this, _i, t2.cache.create(), t2.serializer);
|
|
2207
2213
|
}
|
|
2208
|
-
var
|
|
2214
|
+
var Ci = function() {
|
|
2209
2215
|
return JSON.stringify(arguments);
|
|
2210
2216
|
};
|
|
2211
|
-
var
|
|
2217
|
+
var wi = class {
|
|
2212
2218
|
constructor() {
|
|
2213
2219
|
this.cache = /* @__PURE__ */ Object.create(null);
|
|
2214
2220
|
}
|
|
@@ -2219,14 +2225,14 @@ var Si = class {
|
|
|
2219
2225
|
this.cache[e6] = t2;
|
|
2220
2226
|
}
|
|
2221
2227
|
};
|
|
2222
|
-
var
|
|
2223
|
-
return new
|
|
2228
|
+
var Ti = { create: function() {
|
|
2229
|
+
return new wi();
|
|
2224
2230
|
} };
|
|
2225
|
-
var
|
|
2226
|
-
var
|
|
2227
|
-
function
|
|
2231
|
+
var Ei = { variadic: xi, monadic: Si };
|
|
2232
|
+
var Di = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
|
|
2233
|
+
function Oi(e6) {
|
|
2228
2234
|
let t2 = {};
|
|
2229
|
-
return e6.replace(
|
|
2235
|
+
return e6.replace(Di, (e7) => {
|
|
2230
2236
|
let n2 = e7.length;
|
|
2231
2237
|
switch (e7[0]) {
|
|
2232
2238
|
case `G`:
|
|
@@ -2313,10 +2319,10 @@ function Ei(e6) {
|
|
|
2313
2319
|
return ``;
|
|
2314
2320
|
}), t2;
|
|
2315
2321
|
}
|
|
2316
|
-
var
|
|
2317
|
-
function
|
|
2322
|
+
var ki = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
|
|
2323
|
+
function Ai(e6) {
|
|
2318
2324
|
if (e6.length === 0) throw Error(`Number skeleton cannot be empty`);
|
|
2319
|
-
let t2 = e6.split(
|
|
2325
|
+
let t2 = e6.split(ki).filter((e7) => e7.length > 0), n2 = [];
|
|
2320
2326
|
for (let e7 of t2) {
|
|
2321
2327
|
let t3 = e7.split(`/`);
|
|
2322
2328
|
if (t3.length === 0) throw Error(`Invalid number skeleton`);
|
|
@@ -2326,20 +2332,20 @@ function Oi(e6) {
|
|
|
2326
2332
|
}
|
|
2327
2333
|
return n2;
|
|
2328
2334
|
}
|
|
2329
|
-
function
|
|
2335
|
+
function ji(e6) {
|
|
2330
2336
|
return e6.replace(/^(.*?)-/, ``);
|
|
2331
2337
|
}
|
|
2332
|
-
var
|
|
2333
|
-
var
|
|
2334
|
-
var
|
|
2335
|
-
var
|
|
2336
|
-
function
|
|
2338
|
+
var Mi = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
|
|
2339
|
+
var Ni = /^(@+)?(\+|#+)?[rs]?$/g;
|
|
2340
|
+
var Pi = /(\*)(0+)|(#+)(0+)|(0+)/g;
|
|
2341
|
+
var Fi = /^(0+)$/;
|
|
2342
|
+
function Ii(e6) {
|
|
2337
2343
|
let t2 = {};
|
|
2338
|
-
return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(
|
|
2344
|
+
return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(Ni, function(e7, n2, r2) {
|
|
2339
2345
|
return typeof r2 == `string` ? r2 === `+` ? t2.minimumSignificantDigits = n2.length : n2[0] === `#` ? t2.maximumSignificantDigits = n2.length : (t2.minimumSignificantDigits = n2.length, t2.maximumSignificantDigits = n2.length + (typeof r2 == `string` ? r2.length : 0)) : (t2.minimumSignificantDigits = n2.length, t2.maximumSignificantDigits = n2.length), ``;
|
|
2340
2346
|
}), t2;
|
|
2341
2347
|
}
|
|
2342
|
-
function
|
|
2348
|
+
function Li(e6) {
|
|
2343
2349
|
switch (e6) {
|
|
2344
2350
|
case `sign-auto`:
|
|
2345
2351
|
return { signDisplay: `auto` };
|
|
@@ -2363,19 +2369,19 @@ function Fi(e6) {
|
|
|
2363
2369
|
return { signDisplay: `never` };
|
|
2364
2370
|
}
|
|
2365
2371
|
}
|
|
2366
|
-
function
|
|
2372
|
+
function Ri(e6) {
|
|
2367
2373
|
let t2;
|
|
2368
2374
|
if (e6[0] === `E` && e6[1] === `E` ? (t2 = { notation: `engineering` }, e6 = e6.slice(2)) : e6[0] === `E` && (t2 = { notation: `scientific` }, e6 = e6.slice(1)), t2) {
|
|
2369
2375
|
let n2 = e6.slice(0, 2);
|
|
2370
|
-
if (n2 === `+!` ? (t2.signDisplay = `always`, e6 = e6.slice(2)) : n2 === `+?` && (t2.signDisplay = `exceptZero`, e6 = e6.slice(2)), !
|
|
2376
|
+
if (n2 === `+!` ? (t2.signDisplay = `always`, e6 = e6.slice(2)) : n2 === `+?` && (t2.signDisplay = `exceptZero`, e6 = e6.slice(2)), !Fi.test(e6)) throw Error(`Malformed concise eng/scientific notation`);
|
|
2371
2377
|
t2.minimumIntegerDigits = e6.length;
|
|
2372
2378
|
}
|
|
2373
2379
|
return t2;
|
|
2374
2380
|
}
|
|
2375
|
-
function
|
|
2376
|
-
return
|
|
2381
|
+
function zi(e6) {
|
|
2382
|
+
return Li(e6) || {};
|
|
2377
2383
|
}
|
|
2378
|
-
function
|
|
2384
|
+
function Bi(e6) {
|
|
2379
2385
|
let t2 = {};
|
|
2380
2386
|
for (let n2 of e6) {
|
|
2381
2387
|
switch (n2.stem) {
|
|
@@ -2399,7 +2405,7 @@ function Ri(e6) {
|
|
|
2399
2405
|
continue;
|
|
2400
2406
|
case `measure-unit`:
|
|
2401
2407
|
case `unit`:
|
|
2402
|
-
t2.style = `unit`, t2.unit =
|
|
2408
|
+
t2.style = `unit`, t2.unit = ji(n2.options[0]);
|
|
2403
2409
|
continue;
|
|
2404
2410
|
case `compact-short`:
|
|
2405
2411
|
case `K`:
|
|
@@ -2410,10 +2416,10 @@ function Ri(e6) {
|
|
|
2410
2416
|
t2.notation = `compact`, t2.compactDisplay = `long`;
|
|
2411
2417
|
continue;
|
|
2412
2418
|
case `scientific`:
|
|
2413
|
-
t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...
|
|
2419
|
+
t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...zi(t3) }), {}) };
|
|
2414
2420
|
continue;
|
|
2415
2421
|
case `engineering`:
|
|
2416
|
-
t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...
|
|
2422
|
+
t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...zi(t3) }), {}) };
|
|
2417
2423
|
continue;
|
|
2418
2424
|
case `notation-simple`:
|
|
2419
2425
|
t2.notation = `standard`;
|
|
@@ -2456,7 +2462,7 @@ function Ri(e6) {
|
|
|
2456
2462
|
continue;
|
|
2457
2463
|
case `integer-width`:
|
|
2458
2464
|
if (n2.options.length > 1) throw RangeError(`integer-width stems only accept a single optional option`);
|
|
2459
|
-
n2.options[0].replace(
|
|
2465
|
+
n2.options[0].replace(Pi, function(e8, n3, r3, i2, a2, o2) {
|
|
2460
2466
|
if (n3) t2.minimumIntegerDigits = r3.length;
|
|
2461
2467
|
else if (i2 && a2) throw Error(`We currently do not support maximum integer digits`);
|
|
2462
2468
|
else if (o2) throw Error(`We currently do not support exact integer digits`);
|
|
@@ -2464,83 +2470,83 @@ function Ri(e6) {
|
|
|
2464
2470
|
});
|
|
2465
2471
|
continue;
|
|
2466
2472
|
}
|
|
2467
|
-
if (
|
|
2473
|
+
if (Fi.test(n2.stem)) {
|
|
2468
2474
|
t2.minimumIntegerDigits = n2.stem.length;
|
|
2469
2475
|
continue;
|
|
2470
2476
|
}
|
|
2471
|
-
if (
|
|
2477
|
+
if (Mi.test(n2.stem)) {
|
|
2472
2478
|
if (n2.options.length > 1) throw RangeError(`Fraction-precision stems only accept a single optional option`);
|
|
2473
|
-
n2.stem.replace(
|
|
2479
|
+
n2.stem.replace(Mi, function(e9, n3, r3, i2, a2, o2) {
|
|
2474
2480
|
return r3 === `*` ? t2.minimumFractionDigits = n3.length : i2 && i2[0] === `#` ? t2.maximumFractionDigits = i2.length : a2 && o2 ? (t2.minimumFractionDigits = a2.length, t2.maximumFractionDigits = a2.length + o2.length) : (t2.minimumFractionDigits = n3.length, t2.maximumFractionDigits = n3.length), ``;
|
|
2475
2481
|
});
|
|
2476
2482
|
let e8 = n2.options[0];
|
|
2477
|
-
e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...
|
|
2483
|
+
e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...Ii(e8) });
|
|
2478
2484
|
continue;
|
|
2479
2485
|
}
|
|
2480
|
-
if (
|
|
2481
|
-
t2 = { ...t2, ...
|
|
2486
|
+
if (Ni.test(n2.stem)) {
|
|
2487
|
+
t2 = { ...t2, ...Ii(n2.stem) };
|
|
2482
2488
|
continue;
|
|
2483
2489
|
}
|
|
2484
|
-
let e7 =
|
|
2490
|
+
let e7 = Li(n2.stem);
|
|
2485
2491
|
e7 && (t2 = { ...t2, ...e7 });
|
|
2486
|
-
let r2 =
|
|
2492
|
+
let r2 = Ri(n2.stem);
|
|
2487
2493
|
r2 && (t2 = { ...t2, ...r2 });
|
|
2488
2494
|
}
|
|
2489
2495
|
return t2;
|
|
2490
2496
|
}
|
|
2491
|
-
var
|
|
2497
|
+
var Vi = function(e6) {
|
|
2492
2498
|
return e6[e6.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = `EXPECT_ARGUMENT_CLOSING_BRACE`, e6[e6.EMPTY_ARGUMENT = 2] = `EMPTY_ARGUMENT`, e6[e6.MALFORMED_ARGUMENT = 3] = `MALFORMED_ARGUMENT`, e6[e6.EXPECT_ARGUMENT_TYPE = 4] = `EXPECT_ARGUMENT_TYPE`, e6[e6.INVALID_ARGUMENT_TYPE = 5] = `INVALID_ARGUMENT_TYPE`, e6[e6.EXPECT_ARGUMENT_STYLE = 6] = `EXPECT_ARGUMENT_STYLE`, e6[e6.INVALID_NUMBER_SKELETON = 7] = `INVALID_NUMBER_SKELETON`, e6[e6.INVALID_DATE_TIME_SKELETON = 8] = `INVALID_DATE_TIME_SKELETON`, e6[e6.EXPECT_NUMBER_SKELETON = 9] = `EXPECT_NUMBER_SKELETON`, e6[e6.EXPECT_DATE_TIME_SKELETON = 10] = `EXPECT_DATE_TIME_SKELETON`, e6[e6.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = `UNCLOSED_QUOTE_IN_ARGUMENT_STYLE`, e6[e6.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = `EXPECT_SELECT_ARGUMENT_OPTIONS`, e6[e6.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = `EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE`, e6[e6.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = `INVALID_PLURAL_ARGUMENT_OFFSET_VALUE`, e6[e6.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = `EXPECT_SELECT_ARGUMENT_SELECTOR`, e6[e6.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = `EXPECT_PLURAL_ARGUMENT_SELECTOR`, e6[e6.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = `EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT`, e6[e6.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = `EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT`, e6[e6.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = `INVALID_PLURAL_ARGUMENT_SELECTOR`, e6[e6.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = `DUPLICATE_PLURAL_ARGUMENT_SELECTOR`, e6[e6.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = `DUPLICATE_SELECT_ARGUMENT_SELECTOR`, e6[e6.MISSING_OTHER_CLAUSE = 22] = `MISSING_OTHER_CLAUSE`, e6[e6.INVALID_TAG = 23] = `INVALID_TAG`, e6[e6.INVALID_TAG_NAME = 25] = `INVALID_TAG_NAME`, e6[e6.UNMATCHED_CLOSING_TAG = 26] = `UNMATCHED_CLOSING_TAG`, e6[e6.UNCLOSED_TAG = 27] = `UNCLOSED_TAG`, e6;
|
|
2493
2499
|
}({});
|
|
2494
|
-
function
|
|
2500
|
+
function Hi(e6) {
|
|
2495
2501
|
return e6.type === 0;
|
|
2496
2502
|
}
|
|
2497
|
-
function
|
|
2503
|
+
function Ui(e6) {
|
|
2498
2504
|
return e6.type === 1;
|
|
2499
2505
|
}
|
|
2500
|
-
function
|
|
2506
|
+
function Wi(e6) {
|
|
2501
2507
|
return e6.type === 2;
|
|
2502
2508
|
}
|
|
2503
|
-
function
|
|
2509
|
+
function Gi(e6) {
|
|
2504
2510
|
return e6.type === 3;
|
|
2505
2511
|
}
|
|
2506
|
-
function
|
|
2512
|
+
function Ki(e6) {
|
|
2507
2513
|
return e6.type === 4;
|
|
2508
2514
|
}
|
|
2509
|
-
function
|
|
2515
|
+
function qi(e6) {
|
|
2510
2516
|
return e6.type === 5;
|
|
2511
2517
|
}
|
|
2512
|
-
function
|
|
2518
|
+
function Ji(e6) {
|
|
2513
2519
|
return e6.type === 6;
|
|
2514
2520
|
}
|
|
2515
|
-
function
|
|
2521
|
+
function Yi(e6) {
|
|
2516
2522
|
return e6.type === 7;
|
|
2517
2523
|
}
|
|
2518
|
-
function
|
|
2524
|
+
function Xi(e6) {
|
|
2519
2525
|
return e6.type === 8;
|
|
2520
2526
|
}
|
|
2521
|
-
function
|
|
2527
|
+
function Zi(e6) {
|
|
2522
2528
|
return !!(e6 && typeof e6 == `object` && e6.type === 0);
|
|
2523
2529
|
}
|
|
2524
|
-
function
|
|
2530
|
+
function Qi(e6) {
|
|
2525
2531
|
return !!(e6 && typeof e6 == `object` && e6.type === 1);
|
|
2526
2532
|
}
|
|
2527
|
-
var
|
|
2528
|
-
var
|
|
2529
|
-
function
|
|
2533
|
+
var $i = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
|
2534
|
+
var V = { "001": [`H`, `h`], 419: [`h`, `H`, `hB`, `hb`], AC: [`H`, `h`, `hb`, `hB`], AD: [`H`, `hB`], AE: [`h`, `hB`, `hb`, `H`], AF: [`H`, `hb`, `hB`, `h`], AG: [`h`, `hb`, `H`, `hB`], AI: [`H`, `h`, `hb`, `hB`], AL: [`h`, `H`, `hB`], AM: [`H`, `hB`], AO: [`H`, `hB`], AR: [`h`, `H`, `hB`, `hb`], AS: [`h`, `H`], AT: [`H`, `hB`], AU: [`h`, `hb`, `H`, `hB`], AW: [`H`, `hB`], AX: [`H`], AZ: [`H`, `hB`, `h`], BA: [`H`, `hB`, `h`], BB: [`h`, `hb`, `H`, `hB`], BD: [`h`, `hB`, `H`], BE: [`H`, `hB`], BF: [`H`, `hB`], BG: [`H`, `hB`, `h`], BH: [`h`, `hB`, `hb`, `H`], BI: [`H`, `h`], BJ: [`H`, `hB`], BL: [`H`, `hB`], BM: [`h`, `hb`, `H`, `hB`], BN: [`hb`, `hB`, `h`, `H`], BO: [`h`, `H`, `hB`, `hb`], BQ: [`H`], BR: [`H`, `hB`], BS: [`h`, `hb`, `H`, `hB`], BT: [`h`, `H`], BW: [`H`, `h`, `hb`, `hB`], BY: [`H`, `h`], BZ: [`H`, `h`, `hb`, `hB`], CA: [`h`, `hb`, `H`, `hB`], CC: [`H`, `h`, `hb`, `hB`], CD: [`hB`, `H`], CF: [`H`, `h`, `hB`], CG: [`H`, `hB`], CH: [`H`, `hB`, `h`], CI: [`H`, `hB`], CK: [`H`, `h`, `hb`, `hB`], CL: [`h`, `H`, `hB`, `hb`], CM: [`H`, `h`, `hB`], CN: [`H`, `hB`, `hb`, `h`], CO: [`h`, `H`, `hB`, `hb`], CP: [`H`], CR: [`h`, `H`, `hB`, `hb`], CU: [`h`, `H`, `hB`, `hb`], CV: [`H`, `hB`], CW: [`H`, `hB`], CX: [`H`, `h`, `hb`, `hB`], CY: [`h`, `H`, `hb`, `hB`], CZ: [`H`], DE: [`H`, `hB`], DG: [`H`, `h`, `hb`, `hB`], DJ: [`h`, `H`], DK: [`H`], DM: [`h`, `hb`, `H`, `hB`], DO: [`h`, `H`, `hB`, `hb`], DZ: [`h`, `hB`, `hb`, `H`], EA: [`H`, `h`, `hB`, `hb`], EC: [`h`, `H`, `hB`, `hb`], EE: [`H`, `hB`], EG: [`h`, `hB`, `hb`, `H`], EH: [`h`, `hB`, `hb`, `H`], ER: [`h`, `H`], ES: [`H`, `hB`, `h`, `hb`], ET: [`hB`, `hb`, `h`, `H`], FI: [`H`], FJ: [`h`, `hb`, `H`, `hB`], FK: [`H`, `h`, `hb`, `hB`], FM: [`h`, `hb`, `H`, `hB`], FO: [`H`, `h`], FR: [`H`, `hB`], GA: [`H`, `hB`], GB: [`H`, `h`, `hb`, `hB`], GD: [`h`, `hb`, `H`, `hB`], GE: [`H`, `hB`, `h`], GF: [`H`, `hB`], GG: [`H`, `h`, `hb`, `hB`], GH: [`h`, `H`], GI: [`H`, `h`, `hb`, `hB`], GL: [`H`, `h`], GM: [`h`, `hb`, `H`, `hB`], GN: [`H`, `hB`], GP: [`H`, `hB`], GQ: [`H`, `hB`, `h`, `hb`], GR: [`h`, `H`, `hb`, `hB`], GS: [`H`, `h`, `hb`, `hB`], GT: [`h`, `H`, `hB`, `hb`], GU: [`h`, `hb`, `H`, `hB`], GW: [`H`, `hB`], GY: [`h`, `hb`, `H`, `hB`], HK: [`h`, `hB`, `hb`, `H`], HN: [`h`, `H`, `hB`, `hb`], HR: [`H`, `hB`], HU: [`H`, `h`], IC: [`H`, `h`, `hB`, `hb`], ID: [`H`], IE: [`H`, `h`, `hb`, `hB`], IL: [`H`, `hB`], IM: [`H`, `h`, `hb`, `hB`], IN: [`h`, `H`], IO: [`H`, `h`, `hb`, `hB`], IQ: [`h`, `hB`, `hb`, `H`], IR: [`hB`, `H`], IS: [`H`], IT: [`H`, `hB`], JE: [`H`, `h`, `hb`, `hB`], JM: [`h`, `hb`, `H`, `hB`], JO: [`h`, `hB`, `hb`, `H`], JP: [`H`, `K`, `h`], KE: [`hB`, `hb`, `H`, `h`], KG: [`H`, `h`, `hB`, `hb`], KH: [`hB`, `h`, `H`, `hb`], KI: [`h`, `hb`, `H`, `hB`], KM: [`H`, `h`, `hB`, `hb`], KN: [`h`, `hb`, `H`, `hB`], KP: [`h`, `H`, `hB`, `hb`], KR: [`h`, `H`, `hB`, `hb`], KW: [`h`, `hB`, `hb`, `H`], KY: [`h`, `hb`, `H`, `hB`], KZ: [`H`, `hB`], LA: [`H`, `hb`, `hB`, `h`], LB: [`h`, `hB`, `hb`, `H`], LC: [`h`, `hb`, `H`, `hB`], LI: [`H`, `hB`, `h`], LK: [`H`, `h`, `hB`, `hb`], LR: [`h`, `hb`, `H`, `hB`], LS: [`h`, `H`], LT: [`H`, `h`, `hb`, `hB`], LU: [`H`, `h`, `hB`], LV: [`H`, `hB`, `hb`, `h`], LY: [`h`, `hB`, `hb`, `H`], MA: [`H`, `h`, `hB`, `hb`], MC: [`H`, `hB`], MD: [`H`, `hB`], ME: [`H`, `hB`, `h`], MF: [`H`, `hB`], MG: [`H`, `h`], MH: [`h`, `hb`, `H`, `hB`], MK: [`H`, `h`, `hb`, `hB`], ML: [`H`], MM: [`hB`, `hb`, `H`, `h`], MN: [`H`, `h`, `hb`, `hB`], MO: [`h`, `hB`, `hb`, `H`], MP: [`h`, `hb`, `H`, `hB`], MQ: [`H`, `hB`], MR: [`h`, `hB`, `hb`, `H`], MS: [`H`, `h`, `hb`, `hB`], MT: [`H`, `h`], MU: [`H`, `h`], MV: [`H`, `h`], MW: [`h`, `hb`, `H`, `hB`], MX: [`h`, `H`, `hB`, `hb`], MY: [`hb`, `hB`, `h`, `H`], MZ: [`H`, `hB`], NA: [`h`, `H`, `hB`, `hb`], NC: [`H`, `hB`], NE: [`H`], NF: [`H`, `h`, `hb`, `hB`], NG: [`H`, `h`, `hb`, `hB`], NI: [`h`, `H`, `hB`, `hb`], NL: [`H`, `hB`], NO: [`H`, `h`], NP: [`H`, `h`, `hB`], NR: [`H`, `h`, `hb`, `hB`], NU: [`H`, `h`, `hb`, `hB`], NZ: [`h`, `hb`, `H`, `hB`], OM: [`h`, `hB`, `hb`, `H`], PA: [`h`, `H`, `hB`, `hb`], PE: [`h`, `H`, `hB`, `hb`], PF: [`H`, `h`, `hB`], PG: [`h`, `H`], PH: [`h`, `hB`, `hb`, `H`], PK: [`h`, `hB`, `H`], PL: [`H`, `h`], PM: [`H`, `hB`], PN: [`H`, `h`, `hb`, `hB`], PR: [`h`, `H`, `hB`, `hb`], PS: [`h`, `hB`, `hb`, `H`], PT: [`H`, `hB`], PW: [`h`, `H`], PY: [`h`, `H`, `hB`, `hb`], QA: [`h`, `hB`, `hb`, `H`], RE: [`H`, `hB`], RO: [`H`, `hB`], RS: [`H`, `hB`, `h`], RU: [`H`], RW: [`H`, `h`], SA: [`h`, `hB`, `hb`, `H`], SB: [`h`, `hb`, `H`, `hB`], SC: [`H`, `h`, `hB`], SD: [`h`, `hB`, `hb`, `H`], SE: [`H`], SG: [`h`, `hb`, `H`, `hB`], SH: [`H`, `h`, `hb`, `hB`], SI: [`H`, `hB`], SJ: [`H`], SK: [`H`], SL: [`h`, `hb`, `H`, `hB`], SM: [`H`, `h`, `hB`], SN: [`H`, `h`, `hB`], SO: [`h`, `H`], SR: [`H`, `hB`], SS: [`h`, `hb`, `H`, `hB`], ST: [`H`, `hB`], SV: [`h`, `H`, `hB`, `hb`], SX: [`H`, `h`, `hb`, `hB`], SY: [`h`, `hB`, `hb`, `H`], SZ: [`h`, `hb`, `H`, `hB`], TA: [`H`, `h`, `hb`, `hB`], TC: [`h`, `hb`, `H`, `hB`], TD: [`h`, `H`, `hB`], TF: [`H`, `h`, `hB`], TG: [`H`, `hB`], TH: [`H`, `h`], TJ: [`H`, `h`], TL: [`H`, `hB`, `hb`, `h`], TM: [`H`, `h`], TN: [`h`, `hB`, `hb`, `H`], TO: [`h`, `H`], TR: [`H`, `hB`], TT: [`h`, `hb`, `H`, `hB`], TW: [`hB`, `hb`, `h`, `H`], TZ: [`hB`, `hb`, `H`, `h`], UA: [`H`, `hB`, `h`], UG: [`hB`, `hb`, `H`, `h`], UM: [`h`, `hb`, `H`, `hB`], US: [`h`, `hb`, `H`, `hB`], UY: [`h`, `H`, `hB`, `hb`], UZ: [`H`, `hB`, `h`], VA: [`H`, `h`, `hB`], VC: [`h`, `hb`, `H`, `hB`], VE: [`h`, `H`, `hB`, `hb`], VG: [`h`, `hb`, `H`, `hB`], VI: [`h`, `hb`, `H`, `hB`], VN: [`H`, `h`], VU: [`h`, `H`], WF: [`H`, `hB`], WS: [`h`, `H`], XK: [`H`, `hB`, `h`], YE: [`h`, `hB`, `hb`, `H`], YT: [`H`, `hB`], ZA: [`H`, `h`, `hb`, `hB`], ZM: [`h`, `hb`, `H`, `hB`], ZW: [`H`, `h`], "af-ZA": [`H`, `h`, `hB`, `hb`], "ar-001": [`h`, `hB`, `hb`, `H`], "ca-ES": [`H`, `h`, `hB`], "en-001": [`h`, `hb`, `H`, `hB`], "en-HK": [`h`, `hb`, `H`, `hB`], "en-IL": [`H`, `h`, `hb`, `hB`], "en-MY": [`h`, `hb`, `H`, `hB`], "es-BR": [`H`, `h`, `hB`, `hb`], "es-ES": [`H`, `h`, `hB`, `hb`], "es-GQ": [`H`, `h`, `hB`, `hb`], "fr-CA": [`H`, `h`, `hB`], "gl-ES": [`H`, `h`, `hB`], "gu-IN": [`hB`, `hb`, `h`, `H`], "hi-IN": [`hB`, `h`, `H`], "it-CH": [`H`, `h`, `hB`], "it-IT": [`H`, `h`, `hB`], "kn-IN": [`hB`, `h`, `H`], "ku-SY": [`H`, `hB`], "ml-IN": [`hB`, `h`, `H`], "mr-IN": [`hB`, `hb`, `h`, `H`], "pa-IN": [`hB`, `hb`, `h`, `H`], "ta-IN": [`hB`, `h`, `hb`, `H`], "te-IN": [`hB`, `h`, `H`], "zu-ZA": [`H`, `hB`, `hb`, `h`] };
|
|
2535
|
+
function ea(e6, t2) {
|
|
2530
2536
|
let n2 = ``;
|
|
2531
2537
|
for (let r2 = 0; r2 < e6.length; r2++) {
|
|
2532
2538
|
let i2 = e6.charAt(r2);
|
|
2533
2539
|
if (i2 === `j`) {
|
|
2534
2540
|
let a2 = 0;
|
|
2535
2541
|
for (; r2 + 1 < e6.length && e6.charAt(r2 + 1) === i2; ) a2++, r2++;
|
|
2536
|
-
let o2 = 1 + (a2 & 1), s2 = a2 < 2 ? 1 : 3 + (a2 >> 1), c2 =
|
|
2542
|
+
let o2 = 1 + (a2 & 1), s2 = a2 < 2 ? 1 : 3 + (a2 >> 1), c2 = ta(t2);
|
|
2537
2543
|
for ((c2 == `H` || c2 == `k`) && (s2 = 0); s2-- > 0; ) n2 += `a`;
|
|
2538
2544
|
for (; o2-- > 0; ) n2 = c2 + n2;
|
|
2539
2545
|
} else n2 += i2 === `J` ? `H` : i2;
|
|
2540
2546
|
}
|
|
2541
2547
|
return n2;
|
|
2542
2548
|
}
|
|
2543
|
-
function
|
|
2549
|
+
function ta(e6) {
|
|
2544
2550
|
let t2 = e6.hourCycle;
|
|
2545
2551
|
if (t2 === void 0) {
|
|
2546
2552
|
let n3 = e6;
|
|
@@ -2559,36 +2565,36 @@ function $i(e6) {
|
|
|
2559
2565
|
throw Error(`Invalid hourCycle`);
|
|
2560
2566
|
}
|
|
2561
2567
|
let n2 = e6.language, r2;
|
|
2562
|
-
return n2 !== `root` && (r2 = e6.maximize().region), (
|
|
2568
|
+
return n2 !== `root` && (r2 = e6.maximize().region), (V[`${n2}-${r2}`] || V[r2 || ``] || V[n2 || ``] || V[`${n2}-001`] || V[`001`])[0].charAt(0);
|
|
2563
2569
|
}
|
|
2564
|
-
var
|
|
2565
|
-
var
|
|
2566
|
-
function
|
|
2570
|
+
var na = RegExp(`^${$i.source}*`);
|
|
2571
|
+
var ra = RegExp(`${$i.source}*$`);
|
|
2572
|
+
function H(e6, t2) {
|
|
2567
2573
|
return { start: e6, end: t2 };
|
|
2568
2574
|
}
|
|
2569
|
-
var
|
|
2570
|
-
var
|
|
2571
|
-
var
|
|
2572
|
-
var
|
|
2575
|
+
var ia = !!Object.fromEntries;
|
|
2576
|
+
var aa = !!String.prototype.trimStart;
|
|
2577
|
+
var oa = !!String.prototype.trimEnd;
|
|
2578
|
+
var sa = ia ? Object.fromEntries : function(e6) {
|
|
2573
2579
|
let t2 = {};
|
|
2574
2580
|
for (let [n2, r2] of e6) t2[n2] = r2;
|
|
2575
2581
|
return t2;
|
|
2576
2582
|
};
|
|
2577
|
-
var
|
|
2583
|
+
var ca = aa ? function(e6) {
|
|
2578
2584
|
return e6.trimStart();
|
|
2579
2585
|
} : function(e6) {
|
|
2580
|
-
return e6.replace(
|
|
2586
|
+
return e6.replace(na, ``);
|
|
2581
2587
|
};
|
|
2582
|
-
var
|
|
2588
|
+
var la = oa ? function(e6) {
|
|
2583
2589
|
return e6.trimEnd();
|
|
2584
2590
|
} : function(e6) {
|
|
2585
|
-
return e6.replace(
|
|
2591
|
+
return e6.replace(ra, ``);
|
|
2586
2592
|
};
|
|
2587
|
-
var
|
|
2588
|
-
function
|
|
2589
|
-
return
|
|
2593
|
+
var ua = RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`);
|
|
2594
|
+
function da(e6, t2) {
|
|
2595
|
+
return ua.lastIndex = t2, ua.exec(e6)[1] ?? ``;
|
|
2590
2596
|
}
|
|
2591
|
-
function
|
|
2597
|
+
function fa(e6) {
|
|
2592
2598
|
if (e6.length === 0) return null;
|
|
2593
2599
|
let t2 = 1, n2 = 1;
|
|
2594
2600
|
for (let r2 = 0; r2 < e6.length; ) {
|
|
@@ -2609,7 +2615,7 @@ function ua(e6) {
|
|
|
2609
2615
|
}
|
|
2610
2616
|
return { offset: e6.length, line: t2, column: n2 };
|
|
2611
2617
|
}
|
|
2612
|
-
var
|
|
2618
|
+
var pa = class {
|
|
2613
2619
|
constructor(e6, t2 = {}) {
|
|
2614
2620
|
this.message = e6, this.position = { offset: 0, line: 1, column: 1 }, this.ignoreTag = !!t2.ignoreTag, this.locale = t2.locale, this.requiresOtherClause = !!t2.requiresOtherClause, this.shouldParseSkeletons = !!t2.shouldParseSkeletons;
|
|
2615
2621
|
}
|
|
@@ -2618,10 +2624,10 @@ var da = class {
|
|
|
2618
2624
|
if (this.message.length > 0) {
|
|
2619
2625
|
let e6 = this.message.charCodeAt(0);
|
|
2620
2626
|
if (e6 !== 35 && e6 !== 39 && e6 !== 60 && e6 !== 123 && e6 !== 125) {
|
|
2621
|
-
let e7 =
|
|
2627
|
+
let e7 = fa(this.message);
|
|
2622
2628
|
if (e7) {
|
|
2623
2629
|
let t2 = this.clonePosition();
|
|
2624
|
-
return this.position = e7, { val: [{ type: 0, value: this.message, location:
|
|
2630
|
+
return this.position = e7, { val: [{ type: 0, value: this.message, location: H(t2, this.clonePosition()) }], err: null };
|
|
2625
2631
|
}
|
|
2626
2632
|
}
|
|
2627
2633
|
}
|
|
@@ -2638,11 +2644,11 @@ var da = class {
|
|
|
2638
2644
|
} else if (i2 === 125 && e6 > 0) break;
|
|
2639
2645
|
else if (i2 === 35 && (t2 === `plural` || t2 === `selectordinal`)) {
|
|
2640
2646
|
let e7 = this.clonePosition();
|
|
2641
|
-
this.bump(), r2.push({ type: 7, location:
|
|
2647
|
+
this.bump(), r2.push({ type: 7, location: H(e7, this.clonePosition()) });
|
|
2642
2648
|
} else if (i2 === 60 && !this.ignoreTag && this.peek() === 47) {
|
|
2643
2649
|
if (n2) break;
|
|
2644
|
-
return this.error(26,
|
|
2645
|
-
} else if (i2 === 60 && !this.ignoreTag &&
|
|
2650
|
+
return this.error(26, H(this.clonePosition(), this.clonePosition()));
|
|
2651
|
+
} else if (i2 === 60 && !this.ignoreTag && ma(this.peek() || 0)) {
|
|
2646
2652
|
let n3 = this.parseTag(e6, t2);
|
|
2647
2653
|
if (n3.err) return n3;
|
|
2648
2654
|
r2.push(n3.val);
|
|
@@ -2658,23 +2664,23 @@ var da = class {
|
|
|
2658
2664
|
let n2 = this.clonePosition();
|
|
2659
2665
|
this.bump();
|
|
2660
2666
|
let r2 = this.parseTagName();
|
|
2661
|
-
if (this.bumpSpace(), this.bumpIf(`/>`)) return { val: { type: 0, value: `<${r2}/>`, location:
|
|
2667
|
+
if (this.bumpSpace(), this.bumpIf(`/>`)) return { val: { type: 0, value: `<${r2}/>`, location: H(n2, this.clonePosition()) }, err: null };
|
|
2662
2668
|
if (this.bumpIf(`>`)) {
|
|
2663
2669
|
let i2 = this.parseMessage(e6 + 1, t2, true);
|
|
2664
2670
|
if (i2.err) return i2;
|
|
2665
2671
|
let a2 = i2.val, o2 = this.clonePosition();
|
|
2666
2672
|
if (this.bumpIf(`</`)) {
|
|
2667
|
-
if (this.isEOF() || !
|
|
2673
|
+
if (this.isEOF() || !ma(this.char())) return this.error(23, H(o2, this.clonePosition()));
|
|
2668
2674
|
let e7 = this.clonePosition();
|
|
2669
|
-
return r2 === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? { val: { type: 8, value: r2, children: a2, location:
|
|
2675
|
+
return r2 === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? { val: { type: 8, value: r2, children: a2, location: H(n2, this.clonePosition()) }, err: null } : this.error(23, H(o2, this.clonePosition()))) : this.error(26, H(e7, this.clonePosition()));
|
|
2670
2676
|
}
|
|
2671
|
-
return this.error(27,
|
|
2677
|
+
return this.error(27, H(n2, this.clonePosition()));
|
|
2672
2678
|
}
|
|
2673
|
-
return this.error(23,
|
|
2679
|
+
return this.error(23, H(n2, this.clonePosition()));
|
|
2674
2680
|
}
|
|
2675
2681
|
parseTagName() {
|
|
2676
2682
|
let e6 = this.offset();
|
|
2677
|
-
for (this.bump(); !this.isEOF() &&
|
|
2683
|
+
for (this.bump(); !this.isEOF() && ga(this.char()); ) this.bump();
|
|
2678
2684
|
return this.message.slice(e6, this.offset());
|
|
2679
2685
|
}
|
|
2680
2686
|
parseLiteral(e6, t2) {
|
|
@@ -2694,11 +2700,11 @@ var da = class {
|
|
|
2694
2700
|
if (a2) r2 += a2;
|
|
2695
2701
|
else break;
|
|
2696
2702
|
}
|
|
2697
|
-
let i2 =
|
|
2703
|
+
let i2 = H(n2, this.clonePosition());
|
|
2698
2704
|
return { val: { type: 0, value: r2, location: i2 }, err: null };
|
|
2699
2705
|
}
|
|
2700
2706
|
tryParseLeftAngleBracket() {
|
|
2701
|
-
return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !
|
|
2707
|
+
return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !ha(this.peek() || 0)) ? (this.bump(), `<`) : null;
|
|
2702
2708
|
}
|
|
2703
2709
|
tryParseQuote(e6) {
|
|
2704
2710
|
if (this.isEOF() || this.char() !== 39) return null;
|
|
@@ -2738,29 +2744,29 @@ var da = class {
|
|
|
2738
2744
|
}
|
|
2739
2745
|
parseArgument(e6, t2) {
|
|
2740
2746
|
let n2 = this.clonePosition();
|
|
2741
|
-
if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(1,
|
|
2742
|
-
if (this.char() === 125) return this.bump(), this.error(2,
|
|
2747
|
+
if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(1, H(n2, this.clonePosition()));
|
|
2748
|
+
if (this.char() === 125) return this.bump(), this.error(2, H(n2, this.clonePosition()));
|
|
2743
2749
|
let r2 = this.parseIdentifierIfPossible().value;
|
|
2744
|
-
if (!r2) return this.error(3,
|
|
2745
|
-
if (this.bumpSpace(), this.isEOF()) return this.error(1,
|
|
2750
|
+
if (!r2) return this.error(3, H(n2, this.clonePosition()));
|
|
2751
|
+
if (this.bumpSpace(), this.isEOF()) return this.error(1, H(n2, this.clonePosition()));
|
|
2746
2752
|
switch (this.char()) {
|
|
2747
2753
|
case 125:
|
|
2748
|
-
return this.bump(), { val: { type: 1, value: r2, location:
|
|
2754
|
+
return this.bump(), { val: { type: 1, value: r2, location: H(n2, this.clonePosition()) }, err: null };
|
|
2749
2755
|
case 44:
|
|
2750
|
-
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(1,
|
|
2756
|
+
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(1, H(n2, this.clonePosition())) : this.parseArgumentOptions(e6, t2, r2, n2);
|
|
2751
2757
|
default:
|
|
2752
|
-
return this.error(3,
|
|
2758
|
+
return this.error(3, H(n2, this.clonePosition()));
|
|
2753
2759
|
}
|
|
2754
2760
|
}
|
|
2755
2761
|
parseIdentifierIfPossible() {
|
|
2756
|
-
let e6 = this.clonePosition(), t2 = this.offset(), n2 =
|
|
2757
|
-
return this.bumpTo(r2), { value: n2, location:
|
|
2762
|
+
let e6 = this.clonePosition(), t2 = this.offset(), n2 = da(this.message, t2), r2 = t2 + n2.length;
|
|
2763
|
+
return this.bumpTo(r2), { value: n2, location: H(e6, this.clonePosition()) };
|
|
2758
2764
|
}
|
|
2759
2765
|
parseArgumentOptions(e6, t2, n2, r2) {
|
|
2760
2766
|
let i2 = this.clonePosition(), a2 = this.parseIdentifierIfPossible().value, o2 = this.clonePosition();
|
|
2761
2767
|
switch (a2) {
|
|
2762
2768
|
case ``:
|
|
2763
|
-
return this.error(4,
|
|
2769
|
+
return this.error(4, H(i2, o2));
|
|
2764
2770
|
case `number`:
|
|
2765
2771
|
case `date`:
|
|
2766
2772
|
case `time`: {
|
|
@@ -2770,15 +2776,15 @@ var da = class {
|
|
|
2770
2776
|
this.bumpSpace();
|
|
2771
2777
|
let t4 = this.clonePosition(), n3 = this.parseSimpleArgStyleIfPossible();
|
|
2772
2778
|
if (n3.err) return n3;
|
|
2773
|
-
let r3 =
|
|
2774
|
-
if (r3.length === 0) return this.error(6,
|
|
2775
|
-
e7 = { style: r3, styleLocation:
|
|
2779
|
+
let r3 = la(n3.val);
|
|
2780
|
+
if (r3.length === 0) return this.error(6, H(this.clonePosition(), this.clonePosition()));
|
|
2781
|
+
e7 = { style: r3, styleLocation: H(t4, this.clonePosition()) };
|
|
2776
2782
|
}
|
|
2777
2783
|
let t3 = this.tryParseArgumentClose(r2);
|
|
2778
2784
|
if (t3.err) return t3;
|
|
2779
|
-
let i3 =
|
|
2785
|
+
let i3 = H(r2, this.clonePosition());
|
|
2780
2786
|
if (e7 && e7.style.startsWith(`::`)) {
|
|
2781
|
-
let t4 =
|
|
2787
|
+
let t4 = ca(e7.style.slice(2));
|
|
2782
2788
|
if (a2 === `number`) {
|
|
2783
2789
|
let r3 = this.parseNumberSkeletonFromString(t4, e7.styleLocation);
|
|
2784
2790
|
return r3.err ? r3 : { val: { type: 2, value: n2, location: i3, style: r3.val }, err: null };
|
|
@@ -2786,8 +2792,8 @@ var da = class {
|
|
|
2786
2792
|
{
|
|
2787
2793
|
if (t4.length === 0) return this.error(10, i3);
|
|
2788
2794
|
let r3 = t4;
|
|
2789
|
-
this.locale && (r3 =
|
|
2790
|
-
let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ?
|
|
2795
|
+
this.locale && (r3 = ea(t4, this.locale));
|
|
2796
|
+
let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ? Oi(r3) : {} };
|
|
2791
2797
|
return { val: { type: a2 === `date` ? 3 : 4, value: n2, location: i3, style: o3 }, err: null };
|
|
2792
2798
|
}
|
|
2793
2799
|
}
|
|
@@ -2797,11 +2803,11 @@ var da = class {
|
|
|
2797
2803
|
case `selectordinal`:
|
|
2798
2804
|
case `select`: {
|
|
2799
2805
|
let i3 = this.clonePosition();
|
|
2800
|
-
if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(12,
|
|
2806
|
+
if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(12, H(i3, { ...i3 }));
|
|
2801
2807
|
this.bumpSpace();
|
|
2802
2808
|
let o3 = this.parseIdentifierIfPossible(), s2 = 0;
|
|
2803
2809
|
if (a2 !== `select` && o3.value === `offset`) {
|
|
2804
|
-
if (!this.bumpIf(`:`)) return this.error(13,
|
|
2810
|
+
if (!this.bumpIf(`:`)) return this.error(13, H(this.clonePosition(), this.clonePosition()));
|
|
2805
2811
|
this.bumpSpace();
|
|
2806
2812
|
let e7 = this.tryParseDecimalInteger(13, 14);
|
|
2807
2813
|
if (e7.err) return e7;
|
|
@@ -2811,15 +2817,15 @@ var da = class {
|
|
|
2811
2817
|
if (c2.err) return c2;
|
|
2812
2818
|
let l2 = this.tryParseArgumentClose(r2);
|
|
2813
2819
|
if (l2.err) return l2;
|
|
2814
|
-
let u2 =
|
|
2815
|
-
return a2 === `select` ? { val: { type: 5, value: n2, options:
|
|
2820
|
+
let u2 = H(r2, this.clonePosition());
|
|
2821
|
+
return a2 === `select` ? { val: { type: 5, value: n2, options: sa(c2.val), location: u2 }, err: null } : { val: { type: 6, value: n2, options: sa(c2.val), offset: s2, pluralType: a2 === `plural` ? `cardinal` : `ordinal`, location: u2 }, err: null };
|
|
2816
2822
|
}
|
|
2817
2823
|
default:
|
|
2818
|
-
return this.error(5,
|
|
2824
|
+
return this.error(5, H(i2, o2));
|
|
2819
2825
|
}
|
|
2820
2826
|
}
|
|
2821
2827
|
tryParseArgumentClose(e6) {
|
|
2822
|
-
return this.isEOF() || this.char() !== 125 ? this.error(1,
|
|
2828
|
+
return this.isEOF() || this.char() !== 125 ? this.error(1, H(e6, this.clonePosition())) : (this.bump(), { val: true, err: null });
|
|
2823
2829
|
}
|
|
2824
2830
|
parseSimpleArgStyleIfPossible() {
|
|
2825
2831
|
let e6 = 0, t2 = this.clonePosition();
|
|
@@ -2827,7 +2833,7 @@ var da = class {
|
|
|
2827
2833
|
case 39: {
|
|
2828
2834
|
this.bump();
|
|
2829
2835
|
let e7 = this.clonePosition();
|
|
2830
|
-
if (!this.bumpUntil(`'`)) return this.error(11,
|
|
2836
|
+
if (!this.bumpUntil(`'`)) return this.error(11, H(e7, this.clonePosition()));
|
|
2831
2837
|
this.bump();
|
|
2832
2838
|
break;
|
|
2833
2839
|
}
|
|
@@ -2846,11 +2852,11 @@ var da = class {
|
|
|
2846
2852
|
parseNumberSkeletonFromString(e6, t2) {
|
|
2847
2853
|
let n2 = [];
|
|
2848
2854
|
try {
|
|
2849
|
-
n2 =
|
|
2855
|
+
n2 = Ai(e6);
|
|
2850
2856
|
} catch {
|
|
2851
2857
|
return this.error(7, t2);
|
|
2852
2858
|
}
|
|
2853
|
-
return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ?
|
|
2859
|
+
return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ? Bi(n2) : {} }, err: null };
|
|
2854
2860
|
}
|
|
2855
2861
|
tryParsePluralOrSelectOptions(e6, t2, n2, r2) {
|
|
2856
2862
|
let i2 = false, a2 = [], o2 = /* @__PURE__ */ new Set(), { value: s2, location: c2 } = r2;
|
|
@@ -2860,20 +2866,20 @@ var da = class {
|
|
|
2860
2866
|
if (t2 !== `select` && this.bumpIf(`=`)) {
|
|
2861
2867
|
let t3 = this.tryParseDecimalInteger(16, 19);
|
|
2862
2868
|
if (t3.err) return t3;
|
|
2863
|
-
c2 =
|
|
2869
|
+
c2 = H(e7, this.clonePosition()), s2 = this.message.slice(e7.offset, this.offset());
|
|
2864
2870
|
} else break;
|
|
2865
2871
|
}
|
|
2866
2872
|
if (o2.has(s2)) return this.error(t2 === `select` ? 21 : 20, c2);
|
|
2867
2873
|
s2 === `other` && (i2 = true), this.bumpSpace();
|
|
2868
2874
|
let r3 = this.clonePosition();
|
|
2869
|
-
if (!this.bumpIf(`{`)) return this.error(t2 === `select` ? 17 : 18,
|
|
2875
|
+
if (!this.bumpIf(`{`)) return this.error(t2 === `select` ? 17 : 18, H(this.clonePosition(), this.clonePosition()));
|
|
2870
2876
|
let l2 = this.parseMessage(e6 + 1, t2, n2);
|
|
2871
2877
|
if (l2.err) return l2;
|
|
2872
2878
|
let u2 = this.tryParseArgumentClose(r3);
|
|
2873
2879
|
if (u2.err) return u2;
|
|
2874
|
-
a2.push([s2, { value: l2.val, location:
|
|
2880
|
+
a2.push([s2, { value: l2.val, location: H(r3, this.clonePosition()) }]), o2.add(s2), this.bumpSpace(), { value: s2, location: c2 } = this.parseIdentifierIfPossible();
|
|
2875
2881
|
}
|
|
2876
|
-
return a2.length === 0 ? this.error(t2 === `select` ? 15 : 16,
|
|
2882
|
+
return a2.length === 0 ? this.error(t2 === `select` ? 15 : 16, H(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !i2 ? this.error(22, H(this.clonePosition(), this.clonePosition())) : { val: a2, err: null };
|
|
2877
2883
|
}
|
|
2878
2884
|
tryParseDecimalInteger(e6, t2) {
|
|
2879
2885
|
let n2 = 1, r2 = this.clonePosition();
|
|
@@ -2884,7 +2890,7 @@ var da = class {
|
|
|
2884
2890
|
if (e7 >= 48 && e7 <= 57) i2 = true, a2 = a2 * 10 + (e7 - 48), this.bump();
|
|
2885
2891
|
else break;
|
|
2886
2892
|
}
|
|
2887
|
-
let o2 =
|
|
2893
|
+
let o2 = H(r2, this.clonePosition());
|
|
2888
2894
|
return i2 ? (a2 *= n2, Number.isSafeInteger(a2) ? { val: a2, err: null } : this.error(t2, o2)) : this.error(e6, o2);
|
|
2889
2895
|
}
|
|
2890
2896
|
offset() {
|
|
@@ -2932,7 +2938,7 @@ var da = class {
|
|
|
2932
2938
|
}
|
|
2933
2939
|
}
|
|
2934
2940
|
bumpSpace() {
|
|
2935
|
-
for (; !this.isEOF() &&
|
|
2941
|
+
for (; !this.isEOF() && _a(this.char()); ) this.bump();
|
|
2936
2942
|
}
|
|
2937
2943
|
peek() {
|
|
2938
2944
|
if (this.isEOF()) return null;
|
|
@@ -2940,34 +2946,34 @@ var da = class {
|
|
|
2940
2946
|
return this.message.charCodeAt(t2 + (e6 >= 65536 ? 2 : 1)) ?? null;
|
|
2941
2947
|
}
|
|
2942
2948
|
};
|
|
2943
|
-
function
|
|
2949
|
+
function ma(e6) {
|
|
2944
2950
|
return e6 >= 97 && e6 <= 122 || e6 >= 65 && e6 <= 90;
|
|
2945
2951
|
}
|
|
2946
|
-
function
|
|
2947
|
-
return
|
|
2952
|
+
function ha(e6) {
|
|
2953
|
+
return ma(e6) || e6 === 47;
|
|
2948
2954
|
}
|
|
2949
|
-
function
|
|
2955
|
+
function ga(e6) {
|
|
2950
2956
|
return e6 === 45 || e6 === 46 || e6 >= 48 && e6 <= 57 || e6 === 95 || e6 >= 97 && e6 <= 122 || e6 >= 65 && e6 <= 90 || e6 == 183 || e6 >= 192 && e6 <= 214 || e6 >= 216 && e6 <= 246 || e6 >= 248 && e6 <= 893 || e6 >= 895 && e6 <= 8191 || e6 >= 8204 && e6 <= 8205 || e6 >= 8255 && e6 <= 8256 || e6 >= 8304 && e6 <= 8591 || e6 >= 11264 && e6 <= 12271 || e6 >= 12289 && e6 <= 55295 || e6 >= 63744 && e6 <= 64975 || e6 >= 65008 && e6 <= 65533 || e6 >= 65536 && e6 <= 983039;
|
|
2951
2957
|
}
|
|
2952
|
-
function
|
|
2958
|
+
function _a(e6) {
|
|
2953
2959
|
return e6 >= 9 && e6 <= 13 || e6 === 32 || e6 === 133 || e6 >= 8206 && e6 <= 8207 || e6 === 8232 || e6 === 8233;
|
|
2954
2960
|
}
|
|
2955
|
-
function
|
|
2961
|
+
function va(e6) {
|
|
2956
2962
|
e6.forEach((e7) => {
|
|
2957
|
-
if (delete e7.location,
|
|
2958
|
-
else
|
|
2963
|
+
if (delete e7.location, qi(e7) || Ji(e7)) for (let t2 in e7.options) delete e7.options[t2].location, va(e7.options[t2].value);
|
|
2964
|
+
else Wi(e7) && Zi(e7.style) || (Gi(e7) || Ki(e7)) && Qi(e7.style) ? delete e7.style.location : Xi(e7) && va(e7.children);
|
|
2959
2965
|
});
|
|
2960
2966
|
}
|
|
2961
|
-
function
|
|
2967
|
+
function ya(e6, t2 = {}) {
|
|
2962
2968
|
t2 = { shouldParseSkeletons: true, requiresOtherClause: true, ...t2 };
|
|
2963
|
-
let n2 = new
|
|
2969
|
+
let n2 = new pa(e6, t2).parse();
|
|
2964
2970
|
if (n2.err) {
|
|
2965
|
-
let e7 = SyntaxError(
|
|
2971
|
+
let e7 = SyntaxError(Vi[n2.err.kind]);
|
|
2966
2972
|
throw e7.location = n2.err.location, e7.originalMessage = n2.err.message, e7;
|
|
2967
2973
|
}
|
|
2968
|
-
return t2?.captureLocation ||
|
|
2974
|
+
return t2?.captureLocation || va(n2.val), n2.val;
|
|
2969
2975
|
}
|
|
2970
|
-
var
|
|
2976
|
+
var ba = class extends Error {
|
|
2971
2977
|
constructor(e6, t2, n2) {
|
|
2972
2978
|
super(e6), this.code = t2, this.originalMessage = n2;
|
|
2973
2979
|
}
|
|
@@ -2975,54 +2981,54 @@ var va = class extends Error {
|
|
|
2975
2981
|
return `[formatjs Error: ${this.code}] ${this.message}`;
|
|
2976
2982
|
}
|
|
2977
2983
|
};
|
|
2978
|
-
var
|
|
2984
|
+
var xa = class extends ba {
|
|
2979
2985
|
constructor(e6, t2, n2, r2) {
|
|
2980
2986
|
super(`Invalid values for "${e6}": "${t2}". Options are "${Object.keys(n2).join(`", "`)}"`, `INVALID_VALUE`, r2);
|
|
2981
2987
|
}
|
|
2982
2988
|
};
|
|
2983
|
-
var
|
|
2989
|
+
var Sa = class extends ba {
|
|
2984
2990
|
constructor(e6, t2, n2) {
|
|
2985
2991
|
super(`Value for "${e6}" must be of type ${t2}`, `INVALID_VALUE`, n2);
|
|
2986
2992
|
}
|
|
2987
2993
|
};
|
|
2988
|
-
var
|
|
2994
|
+
var Ca = class extends ba {
|
|
2989
2995
|
constructor(e6, t2) {
|
|
2990
2996
|
super(`The intl string context variable "${e6}" was not provided to the string "${t2}"`, `MISSING_VALUE`, t2);
|
|
2991
2997
|
}
|
|
2992
2998
|
};
|
|
2993
|
-
function
|
|
2999
|
+
function wa(e6) {
|
|
2994
3000
|
return e6.length < 2 ? e6 : e6.reduce((e7, t2) => {
|
|
2995
3001
|
let n2 = e7[e7.length - 1];
|
|
2996
3002
|
return !n2 || n2.type !== 0 || t2.type !== 0 ? e7.push(t2) : n2.value += t2.value, e7;
|
|
2997
3003
|
}, []);
|
|
2998
3004
|
}
|
|
2999
|
-
function
|
|
3005
|
+
function Ta(e6) {
|
|
3000
3006
|
return typeof e6 == `function`;
|
|
3001
3007
|
}
|
|
3002
|
-
function
|
|
3003
|
-
if (e6.length === 1 &&
|
|
3008
|
+
function Ea(e6, t2, n2, r2, i2, a2, o2) {
|
|
3009
|
+
if (e6.length === 1 && Hi(e6[0])) return [{ type: 0, value: e6[0].value }];
|
|
3004
3010
|
let s2 = [];
|
|
3005
3011
|
for (let c2 of e6) {
|
|
3006
|
-
if (
|
|
3012
|
+
if (Hi(c2)) {
|
|
3007
3013
|
s2.push({ type: 0, value: c2.value });
|
|
3008
3014
|
continue;
|
|
3009
3015
|
}
|
|
3010
|
-
if (
|
|
3016
|
+
if (Yi(c2)) {
|
|
3011
3017
|
typeof a2 == `number` && s2.push({ type: 0, value: n2.getNumberFormat(t2).format(a2) });
|
|
3012
3018
|
continue;
|
|
3013
3019
|
}
|
|
3014
3020
|
let { value: e7 } = c2;
|
|
3015
|
-
if (!(i2 && e7 in i2)) throw new
|
|
3021
|
+
if (!(i2 && e7 in i2)) throw new Ca(e7, o2);
|
|
3016
3022
|
let l2 = i2[e7];
|
|
3017
|
-
if (
|
|
3018
|
-
else if (
|
|
3019
|
-
let e8 = typeof c2.style == `string` ? r2.date[c2.style] :
|
|
3023
|
+
if (Ui(c2)) (!l2 || typeof l2 == `string` || typeof l2 == `number` || typeof l2 == `bigint`) && (l2 = typeof l2 == `string` || typeof l2 == `number` || typeof l2 == `bigint` ? String(l2) : ``), s2.push({ type: typeof l2 == `string` ? 0 : 1, value: l2 });
|
|
3024
|
+
else if (Gi(c2)) {
|
|
3025
|
+
let e8 = typeof c2.style == `string` ? r2.date[c2.style] : Qi(c2.style) ? c2.style.parsedOptions : void 0;
|
|
3020
3026
|
s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
|
|
3021
|
-
} else if (
|
|
3022
|
-
let e8 = typeof c2.style == `string` ? r2.time[c2.style] :
|
|
3027
|
+
} else if (Ki(c2)) {
|
|
3028
|
+
let e8 = typeof c2.style == `string` ? r2.time[c2.style] : Qi(c2.style) ? c2.style.parsedOptions : r2.time.medium;
|
|
3023
3029
|
s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
|
|
3024
|
-
} else if (
|
|
3025
|
-
let e8 = typeof c2.style == `string` ? r2.number[c2.style] :
|
|
3030
|
+
} else if (Wi(c2)) {
|
|
3031
|
+
let e8 = typeof c2.style == `string` ? r2.number[c2.style] : Zi(c2.style) ? c2.style.parsedOptions : void 0;
|
|
3026
3032
|
if (e8 && e8.scale) {
|
|
3027
3033
|
let t3 = e8.scale || 1;
|
|
3028
3034
|
if (typeof l2 == `bigint`) {
|
|
@@ -3032,40 +3038,40 @@ function wa(e6, t2, n2, r2, i2, a2, o2) {
|
|
|
3032
3038
|
}
|
|
3033
3039
|
s2.push({ type: 0, value: n2.getNumberFormat(t2, e8).format(l2) });
|
|
3034
3040
|
} else {
|
|
3035
|
-
if (
|
|
3041
|
+
if (Xi(c2)) {
|
|
3036
3042
|
let { children: e8, value: l3 } = c2, u2 = i2[l3];
|
|
3037
|
-
if (!
|
|
3038
|
-
let d2 = u2(
|
|
3043
|
+
if (!Ta(u2)) throw new Sa(l3, `function`, o2);
|
|
3044
|
+
let d2 = u2(Ea(e8, t2, n2, r2, i2, a2).map((e9) => e9.value));
|
|
3039
3045
|
Array.isArray(d2) || (d2 = [d2]), s2.push(...d2.map((e9) => ({ type: typeof e9 == `string` ? 0 : 1, value: e9 })));
|
|
3040
3046
|
}
|
|
3041
|
-
if (
|
|
3047
|
+
if (qi(c2)) {
|
|
3042
3048
|
let e8 = l2, a3 = (Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0) || c2.options.other;
|
|
3043
|
-
if (!a3) throw new
|
|
3044
|
-
s2.push(...
|
|
3045
|
-
} else if (
|
|
3049
|
+
if (!a3) throw new xa(c2.value, l2, Object.keys(c2.options), o2);
|
|
3050
|
+
s2.push(...Ea(a3.value, t2, n2, r2, i2));
|
|
3051
|
+
} else if (Ji(c2)) {
|
|
3046
3052
|
let e8 = `=${l2}`, a3 = Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0;
|
|
3047
3053
|
if (!a3) {
|
|
3048
|
-
if (!Intl.PluralRules) throw new
|
|
3054
|
+
if (!Intl.PluralRules) throw new ba(`Intl.PluralRules is not available in this environment.
|
|
3049
3055
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3050
3056
|
`, `MISSING_INTL_API`, o2);
|
|
3051
3057
|
let e9 = typeof l2 == `bigint` ? Number(l2) : l2, r3 = n2.getPluralRules(t2, { type: c2.pluralType }).select(e9 - (c2.offset || 0));
|
|
3052
3058
|
a3 = (Object.prototype.hasOwnProperty.call(c2.options, r3) ? c2.options[r3] : void 0) || c2.options.other;
|
|
3053
3059
|
}
|
|
3054
|
-
if (!a3) throw new
|
|
3060
|
+
if (!a3) throw new xa(c2.value, l2, Object.keys(c2.options), o2);
|
|
3055
3061
|
let u2 = typeof l2 == `bigint` ? Number(l2) : l2;
|
|
3056
|
-
s2.push(...
|
|
3062
|
+
s2.push(...Ea(a3.value, t2, n2, r2, i2, u2 - (c2.offset || 0)));
|
|
3057
3063
|
}
|
|
3058
3064
|
}
|
|
3059
3065
|
}
|
|
3060
|
-
return
|
|
3066
|
+
return wa(s2);
|
|
3061
3067
|
}
|
|
3062
|
-
function
|
|
3068
|
+
function Da(e6, t2) {
|
|
3063
3069
|
return t2 ? { ...e6, ...t2, ...Object.keys(e6).reduce((n2, r2) => (n2[r2] = { ...e6[r2], ...t2[r2] }, n2), {}) } : e6;
|
|
3064
3070
|
}
|
|
3065
|
-
function
|
|
3066
|
-
return t2 ? Object.keys(e6).reduce((n2, r2) => (n2[r2] =
|
|
3071
|
+
function Oa(e6, t2) {
|
|
3072
|
+
return t2 ? Object.keys(e6).reduce((n2, r2) => (n2[r2] = Da(e6[r2], t2[r2]), n2), { ...e6 }) : e6;
|
|
3067
3073
|
}
|
|
3068
|
-
function
|
|
3074
|
+
function ka(e6) {
|
|
3069
3075
|
return { create() {
|
|
3070
3076
|
return { get(t2) {
|
|
3071
3077
|
return e6[t2];
|
|
@@ -3074,23 +3080,23 @@ function Da(e6) {
|
|
|
3074
3080
|
} };
|
|
3075
3081
|
} };
|
|
3076
3082
|
}
|
|
3077
|
-
function
|
|
3078
|
-
return { getNumberFormat:
|
|
3083
|
+
function Aa(e6 = { number: {}, dateTime: {}, pluralRules: {} }) {
|
|
3084
|
+
return { getNumberFormat: hi((...e7) => new Intl.NumberFormat(...e7), { cache: ka(e6.number), strategy: Ei.variadic }), getDateTimeFormat: hi((...e7) => new Intl.DateTimeFormat(...e7), { cache: ka(e6.dateTime), strategy: Ei.variadic }), getPluralRules: hi((...e7) => new Intl.PluralRules(...e7), { cache: ka(e6.pluralRules), strategy: Ei.variadic }) };
|
|
3079
3085
|
}
|
|
3080
|
-
var
|
|
3086
|
+
var ja = class e5 {
|
|
3081
3087
|
constructor(t2, n2 = e5.defaultLocale, r2, i2) {
|
|
3082
3088
|
if (this.formatterCache = { number: {}, dateTime: {}, pluralRules: {} }, this.format = (e6) => {
|
|
3083
3089
|
let t3 = this.formatToParts(e6);
|
|
3084
3090
|
if (t3.length === 1) return t3[0].value;
|
|
3085
3091
|
let n3 = t3.reduce((e7, t4) => (!e7.length || t4.type !== 0 || typeof e7[e7.length - 1] != `string` ? e7.push(t4.value) : e7[e7.length - 1] += t4.value, e7), []);
|
|
3086
3092
|
return n3.length <= 1 ? n3[0] || `` : n3;
|
|
3087
|
-
}, this.formatToParts = (e6) =>
|
|
3093
|
+
}, this.formatToParts = (e6) => Ea(this.ast, this.locales, this.formatters, this.formats, e6, void 0, this.message), this.resolvedOptions = () => ({ locale: this.resolvedLocale?.toString() || Intl.NumberFormat.supportedLocalesOf(this.locales)[0] }), this.getAst = () => this.ast, this.locales = n2, this.resolvedLocale = e5.resolveLocale(n2), typeof t2 == `string`) {
|
|
3088
3094
|
if (this.message = t2, !e5.__parse) throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
|
3089
3095
|
let { ...n3 } = i2 || {};
|
|
3090
3096
|
this.ast = e5.__parse(t2, { ...n3, locale: this.resolvedLocale });
|
|
3091
3097
|
} else this.ast = t2;
|
|
3092
3098
|
if (!Array.isArray(this.ast)) throw TypeError(`A message must be provided as a String or AST.`);
|
|
3093
|
-
this.formats =
|
|
3099
|
+
this.formats = Oa(e5.formats, r2), this.formatters = i2 && i2.formatters || Aa(this.formatterCache);
|
|
3094
3100
|
}
|
|
3095
3101
|
static {
|
|
3096
3102
|
this.memoizedDefaultLocale = null;
|
|
@@ -3106,14 +3112,14 @@ var ka = class e5 {
|
|
|
3106
3112
|
};
|
|
3107
3113
|
}
|
|
3108
3114
|
static {
|
|
3109
|
-
this.__parse =
|
|
3115
|
+
this.__parse = ya;
|
|
3110
3116
|
}
|
|
3111
3117
|
static {
|
|
3112
3118
|
this.formats = { number: { integer: { maximumFractionDigits: 0 }, currency: { style: `currency` }, percent: { style: `percent` } }, date: { short: { month: `numeric`, day: `numeric`, year: `2-digit` }, medium: { month: `short`, day: `numeric`, year: `numeric` }, long: { month: `long`, day: `numeric`, year: `numeric` }, full: { weekday: `long`, month: `long`, day: `numeric`, year: `numeric` } }, time: { short: { hour: `numeric`, minute: `numeric` }, medium: { hour: `numeric`, minute: `numeric`, second: `numeric` }, long: { hour: `numeric`, minute: `numeric`, second: `numeric`, timeZoneName: `short` }, full: { hour: `numeric`, minute: `numeric`, second: `numeric`, timeZoneName: `short` } } };
|
|
3113
3119
|
}
|
|
3114
3120
|
};
|
|
3115
|
-
var
|
|
3116
|
-
function
|
|
3121
|
+
var Ma = [`__proto__`, `constructor`, `prototype`];
|
|
3122
|
+
function Na(e6, t2, n2) {
|
|
3117
3123
|
function r2(e7) {
|
|
3118
3124
|
return e7 && e7.indexOf(`###`) > -1 ? e7.replace(/###/g, `.`) : e7;
|
|
3119
3125
|
}
|
|
@@ -3123,49 +3129,49 @@ function ja(e6, t2, n2) {
|
|
|
3123
3129
|
for (var a2 = typeof t2 == `string` ? t2.split(`.`) : [].concat(t2); a2.length > 1; ) {
|
|
3124
3130
|
if (i2()) return {};
|
|
3125
3131
|
var o2 = r2(a2.shift());
|
|
3126
|
-
if (
|
|
3132
|
+
if (Ma.indexOf(o2) > -1) return {};
|
|
3127
3133
|
!e6[o2] && n2 && (e6[o2] = new n2()), e6 = e6[o2];
|
|
3128
3134
|
}
|
|
3129
3135
|
if (i2()) return {};
|
|
3130
3136
|
var s2 = r2(a2.shift());
|
|
3131
|
-
return
|
|
3137
|
+
return Ma.indexOf(s2) > -1 ? {} : { obj: e6, k: s2 };
|
|
3132
3138
|
}
|
|
3133
|
-
function
|
|
3134
|
-
var r2 =
|
|
3139
|
+
function Pa(e6, t2, n2) {
|
|
3140
|
+
var r2 = Na(e6, t2, Object), i2 = r2.obj, a2 = r2.k;
|
|
3135
3141
|
i2 !== void 0 && (i2[a2] = n2);
|
|
3136
3142
|
}
|
|
3137
|
-
function
|
|
3138
|
-
var n2 =
|
|
3143
|
+
function Fa(e6, t2) {
|
|
3144
|
+
var n2 = Na(e6, t2), r2 = n2.obj, i2 = n2.k;
|
|
3139
3145
|
if (r2) return r2[i2];
|
|
3140
3146
|
}
|
|
3141
|
-
function
|
|
3147
|
+
function Ia(e6) {
|
|
3142
3148
|
return [...arguments].slice(1).forEach(function(t2) {
|
|
3143
3149
|
if (t2) for (var n2 = 0, r2 = Object.keys(t2); n2 < r2.length; n2++) {
|
|
3144
3150
|
var i2 = r2[n2];
|
|
3145
|
-
|
|
3151
|
+
Ma.indexOf(i2) > -1 || e6[i2] === void 0 && (e6[i2] = t2[i2]);
|
|
3146
3152
|
}
|
|
3147
3153
|
}), e6;
|
|
3148
3154
|
}
|
|
3149
|
-
function
|
|
3150
|
-
return
|
|
3155
|
+
function La(e6, t2) {
|
|
3156
|
+
return Ha(e6) || Va(e6, t2) || za(e6, t2) || Ra();
|
|
3151
3157
|
}
|
|
3152
|
-
function
|
|
3158
|
+
function Ra() {
|
|
3153
3159
|
throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3154
3160
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
3155
3161
|
}
|
|
3156
|
-
function
|
|
3162
|
+
function za(e6, t2) {
|
|
3157
3163
|
if (e6) {
|
|
3158
|
-
if (typeof e6 == `string`) return
|
|
3164
|
+
if (typeof e6 == `string`) return Ba(e6, t2);
|
|
3159
3165
|
var n2 = {}.toString.call(e6).slice(8, -1);
|
|
3160
|
-
return n2 === `Object` && e6.constructor && (n2 = e6.constructor.name), n2 === `Map` || n2 === `Set` ? Array.from(e6) : n2 === `Arguments` || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2) ?
|
|
3166
|
+
return n2 === `Object` && e6.constructor && (n2 = e6.constructor.name), n2 === `Map` || n2 === `Set` ? Array.from(e6) : n2 === `Arguments` || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2) ? Ba(e6, t2) : void 0;
|
|
3161
3167
|
}
|
|
3162
3168
|
}
|
|
3163
|
-
function
|
|
3169
|
+
function Ba(e6, t2) {
|
|
3164
3170
|
(t2 == null || t2 > e6.length) && (t2 = e6.length);
|
|
3165
3171
|
for (var n2 = 0, r2 = Array(t2); n2 < t2; n2++) r2[n2] = e6[n2];
|
|
3166
3172
|
return r2;
|
|
3167
3173
|
}
|
|
3168
|
-
function
|
|
3174
|
+
function Va(e6, t2) {
|
|
3169
3175
|
var n2 = e6 == null ? null : typeof Symbol < `u` && e6[Symbol.iterator] || e6[`@@iterator`];
|
|
3170
3176
|
if (n2 != null) {
|
|
3171
3177
|
var r2, i2, a2, o2, s2 = [], c2 = true, l2 = false;
|
|
@@ -3186,10 +3192,10 @@ function za(e6, t2) {
|
|
|
3186
3192
|
return s2;
|
|
3187
3193
|
}
|
|
3188
3194
|
}
|
|
3189
|
-
function
|
|
3195
|
+
function Ha(e6) {
|
|
3190
3196
|
if (Array.isArray(e6)) return e6;
|
|
3191
3197
|
}
|
|
3192
|
-
function
|
|
3198
|
+
function Ua(e6, t2) {
|
|
3193
3199
|
var n2 = Object.keys(e6);
|
|
3194
3200
|
if (Object.getOwnPropertySymbols) {
|
|
3195
3201
|
var r2 = Object.getOwnPropertySymbols(e6);
|
|
@@ -3199,101 +3205,101 @@ function Va(e6, t2) {
|
|
|
3199
3205
|
}
|
|
3200
3206
|
return n2;
|
|
3201
3207
|
}
|
|
3202
|
-
function
|
|
3208
|
+
function Wa(e6) {
|
|
3203
3209
|
for (var t2 = 1; t2 < arguments.length; t2++) {
|
|
3204
3210
|
var n2 = arguments[t2] == null ? {} : arguments[t2];
|
|
3205
|
-
t2 % 2 ?
|
|
3206
|
-
|
|
3207
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e6, Object.getOwnPropertyDescriptors(n2)) :
|
|
3211
|
+
t2 % 2 ? Ua(Object(n2), true).forEach(function(t3) {
|
|
3212
|
+
Ga(e6, t3, n2[t3]);
|
|
3213
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e6, Object.getOwnPropertyDescriptors(n2)) : Ua(Object(n2)).forEach(function(t3) {
|
|
3208
3214
|
Object.defineProperty(e6, t3, Object.getOwnPropertyDescriptor(n2, t3));
|
|
3209
3215
|
});
|
|
3210
3216
|
}
|
|
3211
3217
|
return e6;
|
|
3212
3218
|
}
|
|
3213
|
-
function
|
|
3214
|
-
return (t2 =
|
|
3219
|
+
function Ga(e6, t2, n2) {
|
|
3220
|
+
return (t2 = Ya(t2)) in e6 ? Object.defineProperty(e6, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e6[t2] = n2, e6;
|
|
3215
3221
|
}
|
|
3216
|
-
function
|
|
3222
|
+
function Ka(e6, t2) {
|
|
3217
3223
|
if (!(e6 instanceof t2)) throw TypeError(`Cannot call a class as a function`);
|
|
3218
3224
|
}
|
|
3219
|
-
function
|
|
3225
|
+
function qa(e6, t2) {
|
|
3220
3226
|
for (var n2 = 0; n2 < t2.length; n2++) {
|
|
3221
3227
|
var r2 = t2[n2];
|
|
3222
|
-
r2.enumerable = r2.enumerable || false, r2.configurable = true, `value` in r2 && (r2.writable = true), Object.defineProperty(e6,
|
|
3228
|
+
r2.enumerable = r2.enumerable || false, r2.configurable = true, `value` in r2 && (r2.writable = true), Object.defineProperty(e6, Ya(r2.key), r2);
|
|
3223
3229
|
}
|
|
3224
3230
|
}
|
|
3225
|
-
function
|
|
3226
|
-
return t2 &&
|
|
3231
|
+
function Ja(e6, t2, n2) {
|
|
3232
|
+
return t2 && qa(e6.prototype, t2), n2 && qa(e6, n2), Object.defineProperty(e6, "prototype", { writable: false }), e6;
|
|
3227
3233
|
}
|
|
3228
|
-
function
|
|
3229
|
-
var t2 =
|
|
3230
|
-
return
|
|
3234
|
+
function Ya(e6) {
|
|
3235
|
+
var t2 = Xa(e6, `string`);
|
|
3236
|
+
return U(t2) == `symbol` ? t2 : t2 + ``;
|
|
3231
3237
|
}
|
|
3232
|
-
function
|
|
3233
|
-
if (
|
|
3238
|
+
function Xa(e6, t2) {
|
|
3239
|
+
if (U(e6) != `object` || !e6) return e6;
|
|
3234
3240
|
var n2 = e6[Symbol.toPrimitive];
|
|
3235
3241
|
if (n2 !== void 0) {
|
|
3236
3242
|
var r2 = n2.call(e6, t2 || `default`);
|
|
3237
|
-
if (
|
|
3243
|
+
if (U(r2) != `object`) return r2;
|
|
3238
3244
|
throw TypeError(`@@toPrimitive must return a primitive value.`);
|
|
3239
3245
|
}
|
|
3240
3246
|
return (t2 === `string` ? String : Number)(e6);
|
|
3241
3247
|
}
|
|
3242
|
-
function
|
|
3248
|
+
function U(e6) {
|
|
3243
3249
|
"@babel/helpers - typeof";
|
|
3244
|
-
return
|
|
3250
|
+
return U = typeof Symbol == `function` && typeof Symbol.iterator == `symbol` ? function(e7) {
|
|
3245
3251
|
return typeof e7;
|
|
3246
3252
|
} : function(e7) {
|
|
3247
3253
|
return e7 && typeof Symbol == `function` && e7.constructor === Symbol && e7 !== Symbol.prototype ? `symbol` : typeof e7;
|
|
3248
|
-
},
|
|
3254
|
+
}, U(e6);
|
|
3249
3255
|
}
|
|
3250
|
-
var
|
|
3251
|
-
var
|
|
3252
|
-
function
|
|
3256
|
+
var Za = `https://www.i18next.com/how-to/using-icu-or-mf2`;
|
|
3257
|
+
var Qa = [`zero`, `one`, `two`, `few`, `many`, `other`];
|
|
3258
|
+
function $a() {
|
|
3253
3259
|
return { memoize: true, memoizeFallback: false, bindI18n: ``, bindI18nStore: ``, parseErrorHandler: function(e6, t2, n2, r2) {
|
|
3254
3260
|
return n2;
|
|
3255
3261
|
}, parseLngForICU: function(e6) {
|
|
3256
3262
|
return e6;
|
|
3257
3263
|
}, escapeVariables: false };
|
|
3258
3264
|
}
|
|
3259
|
-
function
|
|
3260
|
-
return n2 && t2 &&
|
|
3265
|
+
function eo(e6, t2, n2, r2) {
|
|
3266
|
+
return n2 && t2 && U(t2) === `object` ? `${r2} resolved to an object or array, but i18next-icu does not support returnObjects or joinArrays and returns the raw value unformatted.` : n2 && typeof t2 == `string` && t2.indexOf(`{{`) > -1 ? `${r2} could not be parsed (${e6.message}). It contains "{{": i18next interpolation like {{name}} does not work with ICU, use {name}.` : `${r2} could not be ${n2 ? `parsed` : `formatted`}: ${e6.message}`;
|
|
3261
3267
|
}
|
|
3262
|
-
var
|
|
3268
|
+
var to = function() {
|
|
3263
3269
|
function e6(t2) {
|
|
3264
|
-
|
|
3270
|
+
Ka(this, e6), this.type = `i18nFormat`, this.mem = {}, this.warned = /* @__PURE__ */ new Set(), this.init(null, t2);
|
|
3265
3271
|
}
|
|
3266
|
-
return
|
|
3272
|
+
return Ja(e6, [{ key: `init`, value: function(e7, t2) {
|
|
3267
3273
|
var n2 = this, r2 = e7 && e7.options && e7.options.i18nFormat || {};
|
|
3268
|
-
if (this.options =
|
|
3274
|
+
if (this.options = Ia(r2, t2, this.options || {}, $a()), this.formats = this.options.formats, e7) {
|
|
3269
3275
|
var i2 = this.options, a2 = i2.bindI18n, o2 = i2.bindI18nStore, s2 = i2.memoize;
|
|
3270
|
-
e7.IntlMessageFormat =
|
|
3276
|
+
e7.IntlMessageFormat = ja, e7.ICU = this, this.i18next = e7, this.debug = !!(e7.options && e7.options.debug), this.debug && e7.options.interpolation && e7.options.interpolation.escapeValue !== false && !this.options.escapeVariables && this.warn(`interpolation.escapeValue is not applied, values are inserted without HTML escaping. Set the i18next-icu option escapeVariables: true to escape them, or interpolation.escapeValue: false if your output is escaped elsewhere (e.g. by React).`), s2 && (a2 && e7.on(a2, function() {
|
|
3271
3277
|
return n2.clearCache();
|
|
3272
3278
|
}), o2 && e7.store.on(o2, function() {
|
|
3273
3279
|
return n2.clearCache();
|
|
3274
3280
|
}));
|
|
3275
3281
|
}
|
|
3276
3282
|
} }, { key: `addUserDefinedFormats`, value: function(e7) {
|
|
3277
|
-
this.formats = this.formats ?
|
|
3283
|
+
this.formats = this.formats ? Wa(Wa({}, this.formats), e7) : e7, this.clearCache();
|
|
3278
3284
|
} }, { key: `parse`, value: function(e7, t2, n2, r2, i2, a2) {
|
|
3279
3285
|
var o2 = a2 && a2.resolved && a2.resolved.res, s2 = this.options.memoize && [n2, r2, i2], c2;
|
|
3280
3286
|
if (this.options.memoize) {
|
|
3281
|
-
var l2 =
|
|
3287
|
+
var l2 = Fa(this.mem, s2);
|
|
3282
3288
|
l2 && l2.res === e7 && (c2 = l2.fc);
|
|
3283
3289
|
}
|
|
3284
3290
|
try {
|
|
3285
|
-
c2 || (this.debug && typeof e7 == `string` && e7.indexOf(`$t(`) > -1 && this.firstTime(`nesting ${n2} ${r2} ${i2}`) && this.warn(`key "${i2}" (${n2}/${r2}) contains "$t(", but i18next-icu does not support nesting, the text is output as is.`), c2 = new
|
|
3286
|
-
var u2 = t2 && t2.replace &&
|
|
3291
|
+
c2 || (this.debug && typeof e7 == `string` && e7.indexOf(`$t(`) > -1 && this.firstTime(`nesting ${n2} ${r2} ${i2}`) && this.warn(`key "${i2}" (${n2}/${r2}) contains "$t(", but i18next-icu does not support nesting, the text is output as is.`), c2 = new ja(e7, this.options.parseLngForICU(n2), this.formats, { ignoreTag: true }), this.options.memoize && (this.options.memoizeFallback || !a2 || o2) && Pa(this.mem, s2, { res: e7, fc: c2 }));
|
|
3292
|
+
var u2 = t2 && t2.replace && U(t2.replace) === `object` ? Wa(Wa({}, t2), t2.replace) : t2;
|
|
3287
3293
|
return c2.format(this.escapeVariableValues(u2));
|
|
3288
3294
|
} catch (a3) {
|
|
3289
|
-
return this.debug && this.firstTime(`error ${n2} ${r2} ${i2}`) && this.warn(
|
|
3295
|
+
return this.debug && this.firstTime(`error ${n2} ${r2} ${i2}`) && this.warn(eo(a3, e7, !c2, `key "${i2}" (${n2}/${r2})`)), this.options.parseErrorHandler(a3, i2, e7, t2);
|
|
3290
3296
|
}
|
|
3291
3297
|
} }, { key: `addLookupKeys`, value: function(e7, t2, n2, r2, i2) {
|
|
3292
3298
|
return this.debug && i2 && this.checkSuffixKeys(t2, n2, r2, i2), e7;
|
|
3293
3299
|
} }, { key: `checkSuffixKeys`, value: function(e7, t2, n2, r2) {
|
|
3294
3300
|
var i2 = r2.count, a2 = r2.context, o2 = this.i18next.options, s2 = o2.pluralSeparator, c2 = s2 === void 0 ? `_` : s2, l2 = o2.contextSeparator, u2 = l2 === void 0 ? `_` : l2, d2 = this.i18next.services.resourceStore, f2 = `key "${e7}" (${t2}/${n2})`;
|
|
3295
3301
|
if (i2 !== void 0 && this.firstTime(`plural ${t2} ${n2} ${e7}`)) {
|
|
3296
|
-
var p2 =
|
|
3302
|
+
var p2 = Qa.concat(Qa.map(function(e8) {
|
|
3297
3303
|
return `ordinal${c2}${e8}`;
|
|
3298
3304
|
})).map(function(t3) {
|
|
3299
3305
|
return `${e7}${c2}${t3}`;
|
|
@@ -3307,33 +3313,33 @@ var $a = function() {
|
|
|
3307
3313
|
} }, { key: `firstTime`, value: function(e7) {
|
|
3308
3314
|
return !this.warned.has(e7) && (this.warned.add(e7), true);
|
|
3309
3315
|
} }, { key: `warn`, value: function(e7) {
|
|
3310
|
-
this.i18next.services.logger.warn(`i18next-icu: ${e7} See ${
|
|
3316
|
+
this.i18next.services.logger.warn(`i18next-icu: ${e7} See ${Za}`);
|
|
3311
3317
|
} }, { key: `clearCache`, value: function() {
|
|
3312
3318
|
this.mem = {};
|
|
3313
3319
|
} }, { key: `escapeVariableValues`, value: function(e7) {
|
|
3314
|
-
if (!this.options.escapeVariables || !e7 ||
|
|
3320
|
+
if (!this.options.escapeVariables || !e7 || U(e7) !== `object`) return e7;
|
|
3315
3321
|
for (var t2 = {}, n2 = 0, r2 = Object.entries(e7); n2 < r2.length; n2++) {
|
|
3316
|
-
var i2 =
|
|
3322
|
+
var i2 = La(r2[n2], 2), a2 = i2[0], o2 = i2[1];
|
|
3317
3323
|
t2[a2] = typeof o2 == `string` ? o2.replace(/&/g, `&`).replace(/</g, `<`).replace(/>/g, `>`).replace(/"/g, `"`).replace(/'/g, `'`) : o2;
|
|
3318
3324
|
}
|
|
3319
3325
|
return t2;
|
|
3320
3326
|
} }]), e6;
|
|
3321
3327
|
}();
|
|
3322
|
-
|
|
3323
|
-
function
|
|
3328
|
+
to.type = `i18nFormat`;
|
|
3329
|
+
function no({ icuOptions: e6 = {}, ...t2 }) {
|
|
3324
3330
|
let { parseErrorHandler: n2 = void 0 } = t2;
|
|
3325
|
-
return
|
|
3331
|
+
return mi(t2, { icu: new to({ parseErrorHandler: n2, bindI18n: t2.bindI18n, ...e6 }) });
|
|
3326
3332
|
}
|
|
3327
|
-
var
|
|
3333
|
+
var ro = (e6, t2, n2, r2) => {
|
|
3328
3334
|
let i2 = [n2, { code: t2, ...r2 || {} }];
|
|
3329
3335
|
if (e6?.services?.logger?.forward) return e6.services.logger.forward(i2, `warn`, `react-i18next::`, true);
|
|
3330
|
-
|
|
3336
|
+
W(i2[0]) && (i2[0] = `react-i18next:: ${i2[0]}`), e6?.services?.logger?.warn ? e6.services.logger.warn(...i2) : console?.warn && console.warn(...i2);
|
|
3331
3337
|
};
|
|
3332
|
-
var
|
|
3333
|
-
var
|
|
3334
|
-
|
|
3338
|
+
var io = {};
|
|
3339
|
+
var ao = (e6, t2, n2, r2) => {
|
|
3340
|
+
W(n2) && io[n2] || (W(n2) && (io[n2] = /* @__PURE__ */ new Date()), ro(e6, t2, n2, r2));
|
|
3335
3341
|
};
|
|
3336
|
-
var
|
|
3342
|
+
var oo = (e6, t2) => () => {
|
|
3337
3343
|
if (e6.isInitialized) t2();
|
|
3338
3344
|
else {
|
|
3339
3345
|
let n2 = () => {
|
|
@@ -3344,29 +3350,29 @@ var io = (e6, t2) => () => {
|
|
|
3344
3350
|
e6.on(`initialized`, n2);
|
|
3345
3351
|
}
|
|
3346
3352
|
};
|
|
3347
|
-
var
|
|
3348
|
-
e6.loadNamespaces(t2,
|
|
3353
|
+
var so = (e6, t2, n2) => {
|
|
3354
|
+
e6.loadNamespaces(t2, oo(e6, n2));
|
|
3349
3355
|
};
|
|
3350
|
-
var
|
|
3351
|
-
if (
|
|
3356
|
+
var co = (e6, t2, n2, r2) => {
|
|
3357
|
+
if (W(n2) && (n2 = [n2]), e6.options.preload && e6.options.preload.indexOf(t2) > -1) return so(e6, n2, r2);
|
|
3352
3358
|
n2.forEach((t3) => {
|
|
3353
3359
|
e6.options.ns.indexOf(t3) < 0 && e6.options.ns.push(t3);
|
|
3354
|
-
}), e6.loadLanguages(t2,
|
|
3360
|
+
}), e6.loadLanguages(t2, oo(e6, r2));
|
|
3355
3361
|
};
|
|
3356
|
-
var
|
|
3362
|
+
var lo = (e6, t2, n2 = {}) => !t2.languages || !t2.languages.length ? (ao(t2, `NO_LANGUAGES`, `i18n.languages were undefined or empty`, { languages: t2.languages }), true) : t2.hasLoadedNamespace(e6, { lng: n2.lng, precheck: (t3, r2) => {
|
|
3357
3363
|
if (n2.bindI18n && n2.bindI18n.indexOf(`languageChanging`) > -1 && t3.services.backendConnector.backend && t3.isLanguageChangingTo && !r2(t3.isLanguageChangingTo, e6)) return false;
|
|
3358
3364
|
} });
|
|
3359
|
-
var
|
|
3360
|
-
var
|
|
3361
|
-
var
|
|
3362
|
-
var
|
|
3363
|
-
var
|
|
3364
|
-
var
|
|
3365
|
-
var mo = () => po;
|
|
3366
|
-
var ho;
|
|
3365
|
+
var W = (e6) => typeof e6 == `string`;
|
|
3366
|
+
var uo = (e6) => typeof e6 == `object` && !!e6;
|
|
3367
|
+
var fo = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
|
|
3368
|
+
var po = { "&": `&`, "&": `&`, "<": `<`, "<": `<`, ">": `>`, ">": `>`, "'": `'`, "'": `'`, """: `"`, """: `"`, " ": ` `, " ": ` `, "©": `\xA9`, "©": `\xA9`, "®": `\xAE`, "®": `\xAE`, "…": `\u2026`, "…": `\u2026`, "/": `/`, "/": `/` };
|
|
3369
|
+
var mo = (e6) => po[e6];
|
|
3370
|
+
var ho = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e6) => e6.replace(fo, mo) };
|
|
3367
3371
|
var go = () => ho;
|
|
3368
|
-
var _o
|
|
3369
|
-
var vo =
|
|
3372
|
+
var _o;
|
|
3373
|
+
var vo = () => _o;
|
|
3374
|
+
var yo = n();
|
|
3375
|
+
var bo = class {
|
|
3370
3376
|
constructor() {
|
|
3371
3377
|
this.usedNamespaces = {};
|
|
3372
3378
|
}
|
|
@@ -3379,32 +3385,32 @@ var vo = class {
|
|
|
3379
3385
|
return Object.keys(this.usedNamespaces);
|
|
3380
3386
|
}
|
|
3381
3387
|
};
|
|
3382
|
-
var
|
|
3388
|
+
var xo = (e6, t2) => {
|
|
3383
3389
|
let n2 = l();
|
|
3384
3390
|
return s(() => {
|
|
3385
3391
|
n2.current = t2 ? n2.current : e6;
|
|
3386
3392
|
}, [e6, t2]), n2.current;
|
|
3387
3393
|
};
|
|
3388
|
-
var
|
|
3389
|
-
var
|
|
3390
|
-
var
|
|
3391
|
-
let { i18n: n2 } = t2, { i18n: r2, defaultNS: i2 } = o(
|
|
3392
|
-
if (a2 && !a2.reportNamespaces && (a2.reportNamespaces = new
|
|
3393
|
-
|
|
3394
|
-
let e7 = (e8, t4) =>
|
|
3394
|
+
var So = (e6, t2, n2, r2) => e6.getFixedT(t2, n2, r2);
|
|
3395
|
+
var Co = (e6, t2, n2, r2) => a(So(e6, t2, n2, r2), [e6, t2, n2, r2]);
|
|
3396
|
+
var wo = (e6, t2 = {}) => {
|
|
3397
|
+
let { i18n: n2 } = t2, { i18n: r2, defaultNS: i2 } = o(yo) || {}, a2 = n2 || r2 || vo();
|
|
3398
|
+
if (a2 && !a2.reportNamespaces && (a2.reportNamespaces = new bo()), !a2) {
|
|
3399
|
+
ao(a2, `NO_I18NEXT_INSTANCE`, `useTranslation: You will need to pass in an i18next instance by using initReactI18next`);
|
|
3400
|
+
let e7 = (e8, t4) => W(t4) ? t4 : uo(t4) && W(t4.defaultValue) ? t4.defaultValue : Array.isArray(e8) ? e8[e8.length - 1] : e8, t3 = [e7, {}, false];
|
|
3395
3401
|
return t3.t = e7, t3.i18n = {}, t3.ready = false, t3;
|
|
3396
3402
|
}
|
|
3397
|
-
a2.options.react?.wait &&
|
|
3398
|
-
let c2 = { ...
|
|
3399
|
-
p2 =
|
|
3400
|
-
let m2 = (a2.isInitialized || a2.initializedStoreOnce) && p2.every((e7) =>
|
|
3403
|
+
a2.options.react?.wait && ao(a2, `DEPRECATED_OPTION`, `useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.`);
|
|
3404
|
+
let c2 = { ...go(), ...a2.options.react, ...t2 }, { useSuspense: d2, keyPrefix: f2 } = c2, p2 = e6 || i2 || a2.options?.defaultNS;
|
|
3405
|
+
p2 = W(p2) ? [p2] : p2 || [`translation`], a2.reportNamespaces.addUsedNamespaces?.(p2);
|
|
3406
|
+
let m2 = (a2.isInitialized || a2.initializedStoreOnce) && p2.every((e7) => lo(e7, a2, c2)), h2 = Co(a2, t2.lng || null, c2.nsMode === `fallback` ? p2 : p2[0], f2), g2 = () => h2, _2 = () => So(a2, t2.lng || null, c2.nsMode === `fallback` ? p2 : p2[0], f2), [v2, y2] = u(g2), b2 = p2.join();
|
|
3401
3407
|
t2.lng && (b2 = `${t2.lng}${b2}`);
|
|
3402
|
-
let x2 =
|
|
3408
|
+
let x2 = xo(b2), S2 = l(true);
|
|
3403
3409
|
s(() => {
|
|
3404
3410
|
let { bindI18n: e7, bindI18nStore: n3 } = c2;
|
|
3405
|
-
S2.current = true, !m2 && !d2 && (t2.lng ?
|
|
3411
|
+
S2.current = true, !m2 && !d2 && (t2.lng ? co(a2, t2.lng, p2, () => {
|
|
3406
3412
|
S2.current && y2(_2);
|
|
3407
|
-
}) :
|
|
3413
|
+
}) : so(a2, p2, () => {
|
|
3408
3414
|
S2.current && y2(_2);
|
|
3409
3415
|
})), m2 && x2 && x2 !== b2 && S2.current && y2(_2);
|
|
3410
3416
|
let r3 = () => {
|
|
@@ -3419,131 +3425,131 @@ var So = (e6, t2 = {}) => {
|
|
|
3419
3425
|
let C2 = [v2, a2, m2];
|
|
3420
3426
|
if (C2.t = v2, C2.i18n = a2, C2.ready = m2, m2 || !m2 && !d2) return C2;
|
|
3421
3427
|
throw new Promise((e7) => {
|
|
3422
|
-
t2.lng ?
|
|
3428
|
+
t2.lng ? co(a2, t2.lng, p2, () => e7()) : so(a2, p2, () => e7());
|
|
3423
3429
|
});
|
|
3424
3430
|
};
|
|
3425
|
-
function
|
|
3431
|
+
function To({ i18n: e6, defaultNS: t2, children: n2 }) {
|
|
3426
3432
|
let i2 = c(() => ({ i18n: e6, defaultNS: t2 }), [e6, t2]);
|
|
3427
|
-
return r(
|
|
3433
|
+
return r(yo.Provider, { value: i2 }, n2);
|
|
3428
3434
|
}
|
|
3429
|
-
var
|
|
3430
|
-
var
|
|
3431
|
-
function
|
|
3435
|
+
var Eo = `wix-warmup-data`;
|
|
3436
|
+
var Do = null;
|
|
3437
|
+
function Oo(e6) {
|
|
3432
3438
|
if (typeof document < `u`) try {
|
|
3433
|
-
let t2 = document.getElementById(
|
|
3434
|
-
return t2 ? (
|
|
3439
|
+
let t2 = document.getElementById(Eo)?.textContent;
|
|
3440
|
+
return t2 ? (Do?.text !== t2 && (Do = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), Do.data[e6] ?? void 0) : void 0;
|
|
3435
3441
|
} catch {
|
|
3436
3442
|
return;
|
|
3437
3443
|
}
|
|
3438
3444
|
}
|
|
3439
|
-
var
|
|
3440
|
-
var
|
|
3441
|
-
var
|
|
3442
|
-
var
|
|
3443
|
-
var
|
|
3444
|
-
let t2 = e6.scope ??
|
|
3445
|
-
return n2 || (n2 = /* @__PURE__ */ new Map(),
|
|
3445
|
+
var ko = 5e3;
|
|
3446
|
+
var Ao = 100;
|
|
3447
|
+
var jo = {};
|
|
3448
|
+
var Mo = /* @__PURE__ */ new WeakMap();
|
|
3449
|
+
var No = (e6) => {
|
|
3450
|
+
let t2 = e6.scope ?? jo, n2 = Mo.get(t2);
|
|
3451
|
+
return n2 || (n2 = /* @__PURE__ */ new Map(), Mo.set(t2, n2)), n2;
|
|
3446
3452
|
};
|
|
3447
|
-
function
|
|
3453
|
+
function Po({ key: e6, warmupData: t2, fetchData: n2 }) {
|
|
3448
3454
|
if (e6 === null) return n2();
|
|
3449
3455
|
if (t2.isServer) return n2().then((n3) => (t2.set(e6, n3), n3));
|
|
3450
|
-
let r2 =
|
|
3456
|
+
let r2 = No(t2), i2 = Date.now();
|
|
3451
3457
|
for (let [e7, t3] of r2) t3.expiresAt <= i2 && r2.delete(e7);
|
|
3452
3458
|
let a2 = r2.get(e6);
|
|
3453
3459
|
if (a2) return a2.promise;
|
|
3454
|
-
let o2 =
|
|
3460
|
+
let o2 = Oo(e6);
|
|
3455
3461
|
if (o2 !== void 0) {
|
|
3456
|
-
let t3 =
|
|
3457
|
-
return r2.set(e6, { promise: t3, expiresAt: i2 +
|
|
3462
|
+
let t3 = zn(o2);
|
|
3463
|
+
return r2.set(e6, { promise: t3, expiresAt: i2 + ko }), t3;
|
|
3458
3464
|
}
|
|
3459
3465
|
let s2 = (async () => await t2.get(e6) ?? n2())();
|
|
3460
|
-
r2.size >=
|
|
3466
|
+
r2.size >= Ao && r2.delete(r2.keys().next().value);
|
|
3461
3467
|
let c2 = { promise: s2, expiresAt: 1 / 0 };
|
|
3462
3468
|
return r2.set(e6, c2), s2.then(() => {
|
|
3463
|
-
c2.expiresAt = Date.now() +
|
|
3469
|
+
c2.expiresAt = Date.now() + ko;
|
|
3464
3470
|
}, () => {
|
|
3465
3471
|
r2.get(e6) === c2 && r2.delete(e6);
|
|
3466
3472
|
}), s2;
|
|
3467
3473
|
}
|
|
3468
|
-
var
|
|
3469
|
-
var
|
|
3470
|
-
var
|
|
3471
|
-
var
|
|
3472
|
-
function
|
|
3473
|
-
let n2 =
|
|
3474
|
+
var Fo = `blog-builder:i18n`;
|
|
3475
|
+
var Io = `translation`;
|
|
3476
|
+
var Lo = () => Oo(Fo);
|
|
3477
|
+
var Ro = /* @__PURE__ */ new Map();
|
|
3478
|
+
function zo(e6, t2) {
|
|
3479
|
+
let n2 = Ro.get(e6);
|
|
3474
3480
|
if (n2) return n2;
|
|
3475
|
-
let r2 =
|
|
3476
|
-
return
|
|
3481
|
+
let r2 = Lo(), i2 = r2?.locale === e6 ? r2.messages : void 0, a2 = no({ locale: e6, useSuspense: true, ...i2 ? { messages: i2 } : { asyncMessagesLoader: t2 } });
|
|
3482
|
+
return Ro.set(e6, a2), a2;
|
|
3477
3483
|
}
|
|
3478
|
-
function
|
|
3479
|
-
let t2 = () => e6.loadNamespaces(
|
|
3484
|
+
function Bo(e6) {
|
|
3485
|
+
let t2 = () => e6.loadNamespaces(Io).then(() => void 0, () => void 0);
|
|
3480
3486
|
return e6.isInitialized ? t2() : new Promise((n2) => {
|
|
3481
3487
|
e6.on(`initialized`, () => void t2().then(n2));
|
|
3482
3488
|
});
|
|
3483
3489
|
}
|
|
3484
|
-
function
|
|
3490
|
+
function Vo(e6, t2) {
|
|
3485
3491
|
return e6.getResourceBundle(t2, `translation`) ?? e6.getResourceBundle(`en`, `translation`);
|
|
3486
3492
|
}
|
|
3487
|
-
var
|
|
3493
|
+
var Ho = (e6, t2, n2) => {
|
|
3488
3494
|
let r2 = t2.lastIndexOf(`?`), i2 = e6[r2 === -1 || r2 < t2.lastIndexOf(`/`) ? t2 : t2.slice(0, r2)];
|
|
3489
3495
|
return i2 ? typeof i2 == `function` ? i2() : Promise.resolve(i2) : new Promise((e7, r3) => {
|
|
3490
3496
|
(typeof queueMicrotask == `function` ? queueMicrotask : setTimeout)(r3.bind(null, Error(`Unknown variable dynamic import: ` + t2 + (t2.split(`/`).length === n2 ? `` : `. Note that variables only represent file names one level deep.`))));
|
|
3491
3497
|
});
|
|
3492
3498
|
};
|
|
3493
|
-
var
|
|
3494
|
-
Sr({ isDev: false, loadMessages: (e6) =>
|
|
3495
|
-
var
|
|
3496
|
-
function
|
|
3497
|
-
let t2 =
|
|
3498
|
-
return t2 || (t2 =
|
|
3499
|
+
var Uo = (e6) => e6.split(`-`)[0] ?? e6;
|
|
3500
|
+
Sr({ isDev: false, loadMessages: (e6) => Ho(Object.assign({ "../assets/locale/messages_en.dev.json": () => _n(() => Promise.resolve().then(() => Jo), void 0, import.meta.url), "../assets/locale/messages_en.json": () => _n(() => Promise.resolve().then(() => Xo), void 0, import.meta.url) }), `../assets/locale/messages_${Uo(e6)}.json`, 4), loadDevMessages: (e6) => Ho(Object.assign({ "../assets/locale/messages_en.dev.json": () => _n(() => Promise.resolve().then(() => Jo), void 0, import.meta.url) }), `../assets/locale/messages_${Uo(e6)}.dev.json`, 4) });
|
|
3501
|
+
var Wo = /* @__PURE__ */ new WeakMap();
|
|
3502
|
+
function Go(e6) {
|
|
3503
|
+
let t2 = Wo.get(e6);
|
|
3504
|
+
return t2 || (t2 = Bo(e6).finally(() => Wo.delete(e6)), Wo.set(e6, t2)), t2;
|
|
3499
3505
|
}
|
|
3500
|
-
function
|
|
3501
|
-
let n2 =
|
|
3506
|
+
function Ko({ i18n: e6, locale: t2 }) {
|
|
3507
|
+
let n2 = Kn(), r2 = yr();
|
|
3502
3508
|
if (!n2) return null;
|
|
3503
|
-
if (!e6.isInitialized || !e6.hasLoadedNamespace(`translation`)) throw
|
|
3504
|
-
let i2 =
|
|
3505
|
-
return i2 && r2.set(
|
|
3506
|
-
}
|
|
3507
|
-
function
|
|
3508
|
-
let t2 =
|
|
3509
|
-
return { i18n:
|
|
3510
|
-
}
|
|
3511
|
-
var
|
|
3512
|
-
var
|
|
3513
|
-
var
|
|
3514
|
-
var
|
|
3515
|
-
var
|
|
3516
|
-
var
|
|
3517
|
-
var
|
|
3518
|
-
let n2 =
|
|
3509
|
+
if (!e6.isInitialized || !e6.hasLoadedNamespace(`translation`)) throw Go(e6);
|
|
3510
|
+
let i2 = Vo(e6, t2);
|
|
3511
|
+
return i2 && r2.set(Fo, { locale: t2, messages: i2 }), null;
|
|
3512
|
+
}
|
|
3513
|
+
function qo(e6) {
|
|
3514
|
+
let t2 = hr(), n2 = Lo()?.locale ?? t2 ?? `en`;
|
|
3515
|
+
return { i18n: zo(n2, e6), locale: n2 };
|
|
3516
|
+
}
|
|
3517
|
+
var Jo = _({ default: () => Yo });
|
|
3518
|
+
var Yo = { "post.time-to-read": `{count, plural, one {# min read} other {# min read}}`, "post.view-count": `{count, plural, one {{formatted} view} other {{formatted} views}}`, "post.comment-count": `{count, plural, one {{formatted} comment} other {{formatted} comments}}`, "post.like-count": `{count, plural, one {{formatted} like} other {{formatted} likes}}`, "post-list.empty-state.title": `No posts yet`, "post-list.empty-state.description": `Once posts are published, they will appear here.`, "related-posts.empty-state.title": `No related posts yet`, "related-posts.empty-state.description": `Once more posts are published, they will appear here.`, "post-actions.like": `Like post`, "post-actions.unlike": `Unlike post`, "post-actions.share": `Share post`, "post-actions.share-dialog": `Share post`, "post-actions.link-copied": `Link copied`, "post-actions.copy-manually": `Copy the link below to share this post.`, "post-actions.link-label": `Post link`, "post-actions.copy-link": `Copy link`, "post-actions.close": `Close`, "post-counters.loading-likes": `Loading likes`, "cover-media.play": `Play video`, "cover-media.placeholder-alt": `Post cover image`, "post-comments.loading": `Loading comments\u2026`, "post-comments.no-post": `No post resolved for this URL yet.`, "post-comments.unavailable": `Comments are unavailable \u2014 no app instance.`, "post-comments.demo-notice": `Sample comments are shown while editing. Visitors will see real comments.`, "canvas.post-title": `Post Title`, "canvas.author-name": `Author Name`, "canvas.excerpt": `Share the key idea of your post here. This short summary shows on feed cards and in search results, and tells readers why the post is worth their time.`, "canvas.content": `This is where the full post appears. Write your story here, add images, galleries and video from the dashboard, and use headings and quotes to keep it easy to read.`, "canvas.category": `Category`, "canvas.category-numbered": `Category {number}`, "canvas.tag-numbered": `Tag {number}`, "canvas.author-photo-alt": `Author photo`, "category-header.all-posts": `All Posts` };
|
|
3519
|
+
var Xo = _({ default: () => Qo, title: () => Zo });
|
|
3520
|
+
var Zo = `My App`;
|
|
3521
|
+
var Qo = { "canvas.category": `Category`, "post-list.empty-state.description": `Once posts are published, they will appear here.`, "canvas.tag-numbered": `Tag {number}`, "cover-media.play": `Play video`, "post-comments.unavailable": `Comments are unavailable \u2014 no app instance.`, "post-counters.loading-likes": `Loading likes`, "post-comments.loading": `Loading comments\u2026`, "post-actions.like": `Like post`, "canvas.content": `This is where the full post appears. Write your story here, add images, galleries and video from the dashboard, and use headings and quotes to keep it easy to read.`, "related-posts.empty-state.title": `No related posts yet`, "post.time-to-read": `{count, plural, one {# min read} other {# min read}}`, "post-actions.link-copied": `Link copied`, "category-header.all-posts": `All Posts`, "post-actions.copy-manually": `Copy the link below to share this post.`, "post-actions.copy-link": `Copy link`, "cover-media.placeholder-alt": `Post cover image`, "post-actions.link-label": `Post link`, "post-list.empty-state.title": `No posts yet`, "post-actions.share-dialog": `Share post`, "canvas.post-title": `Post Title`, "post-actions.unlike": `Unlike post`, "post-comments.no-post": `No post resolved for this URL yet.`, "post.like-count": `{count, plural, one {{formatted} like} other {{formatted} likes}}`, "canvas.category-numbered": `Category {number}`, "post.comment-count": `{count, plural, one {{formatted} comment} other {{formatted} comments}}`, "post-actions.share": `Share post`, "post.view-count": `{count, plural, one {{formatted} view} other {{formatted} views}}`, "post-actions.close": `Close`, "canvas.category-description": `Add a short description of this category so readers know what they will find here. It shows under the category title, above the posts.`, "canvas.author-photo-alt": `Author photo`, "canvas.author-name": `Author Name`, "post-comments.demo-notice": `Sample comments are shown while editing. Visitors will see real comments.`, title: Zo, "related-posts.empty-state.description": `Once more posts are published, they will appear here.`, "canvas.excerpt": `Share the key idea of your post here. This short summary shows on feed cards and in search results, and tells readers why the post is worth their time.` };
|
|
3522
|
+
var $o = Object.assign({ "../assets/locale/messages_en.dev.json": Jo, "../assets/locale/messages_en.json": Xo });
|
|
3523
|
+
var es = (e6, t2) => {
|
|
3524
|
+
let n2 = $o[`../assets/locale/messages_${Uo(e6)}${t2}.json`];
|
|
3519
3525
|
return n2 ? Promise.resolve(n2) : Promise.reject(Error(`no messages file`));
|
|
3520
3526
|
};
|
|
3521
|
-
var
|
|
3522
|
-
var
|
|
3523
|
-
var
|
|
3524
|
-
var
|
|
3525
|
-
let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted:
|
|
3526
|
-
return { timeToRead: (t3) => e6(
|
|
3527
|
+
var ts = Sr({ isDev: false, loadMessages: (e6) => es(e6, ``), loadDevMessages: (e6) => es(e6, `.dev`) });
|
|
3528
|
+
var ns = (e6, t2, n2) => typeof e6 != `number` || !Number.isFinite(e6) || e6 < 0 ? `` : new Intl.NumberFormat(n2, t2 === `compact` ? { notation: `compact`, maximumFractionDigits: 1 } : void 0).format(e6);
|
|
3529
|
+
var G = { timeToRead: `post.time-to-read`, viewCount: `post.view-count`, commentCount: `post.comment-count`, likeCount: `post.like-count`, noPostsTitle: `post-list.empty-state.title`, noPostsDescription: `post-list.empty-state.description`, noRelatedPostsTitle: `related-posts.empty-state.title`, noRelatedPostsDescription: `related-posts.empty-state.description`, canvasPostTitle: `canvas.post-title`, canvasAuthorName: `canvas.author-name`, canvasExcerpt: `canvas.excerpt`, canvasContent: `canvas.content`, canvasCategory: `canvas.category`, canvasCategoryNumbered: `canvas.category-numbered`, canvasTagNumbered: `canvas.tag-numbered`, canvasCoverAlt: `cover-media.placeholder-alt`, canvasAuthorPhotoAlt: `canvas.author-photo-alt` };
|
|
3530
|
+
var rs = (e6, t2) => {
|
|
3531
|
+
let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted: ns(r2, `full`, t2) });
|
|
3532
|
+
return { timeToRead: (t3) => e6(G.timeToRead, { count: t3 }), viewCount: n2(G.viewCount), commentCount: n2(G.commentCount), likeCount: n2(G.likeCount), noPostsEmptyState: () => ({ title: e6(G.noPostsTitle), description: e6(G.noPostsDescription) }), noRelatedPostsEmptyState: () => ({ title: e6(G.noRelatedPostsTitle), description: e6(G.noRelatedPostsDescription) }), canvas: { postTitle: () => e6(G.canvasPostTitle), authorName: () => e6(G.canvasAuthorName), excerpt: () => e6(G.canvasExcerpt), content: () => e6(G.canvasContent), category: () => e6(G.canvasCategory), categoryNumbered: (t3) => e6(G.canvasCategoryNumbered, { number: t3 }), tagNumbered: (t3) => e6(G.canvasTagNumbered, { number: t3 }), coverAlt: () => e6(G.canvasCoverAlt), authorPhotoAlt: () => e6(G.canvasAuthorPhotoAlt) } };
|
|
3527
3533
|
};
|
|
3528
|
-
function
|
|
3534
|
+
function is(e6) {
|
|
3529
3535
|
return Object.keys(e6).length === 1 && `$and` in e6 && Array.isArray(e6.$and);
|
|
3530
3536
|
}
|
|
3531
|
-
function
|
|
3537
|
+
function as(e6) {
|
|
3532
3538
|
return Object.keys(e6).length === 1 && `$or` in e6 && Array.isArray(e6.$or);
|
|
3533
3539
|
}
|
|
3534
|
-
function
|
|
3540
|
+
function os(e6) {
|
|
3535
3541
|
return Object.keys(e6).length === 1 && `$not` in e6 && typeof e6.$not == `object`;
|
|
3536
3542
|
}
|
|
3537
|
-
function
|
|
3538
|
-
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $and: [...
|
|
3543
|
+
function K(e6, t2) {
|
|
3544
|
+
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $and: [...is(e6) ? e6.$and : [e6], ...is(t2) ? t2.$and : [t2]] };
|
|
3539
3545
|
}
|
|
3540
|
-
function
|
|
3541
|
-
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $or: [...
|
|
3546
|
+
function ss(e6, t2) {
|
|
3547
|
+
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $or: [...as(e6) ? e6.$or : [e6], ...as(t2) ? t2.$or : [t2]] };
|
|
3542
3548
|
}
|
|
3543
|
-
function
|
|
3544
|
-
if (e6 !== void 0 && Object.keys(e6).length !== 0) return
|
|
3549
|
+
function cs(e6) {
|
|
3550
|
+
if (e6 !== void 0 && Object.keys(e6).length !== 0) return os(e6) ? e6.$not : { $not: e6 };
|
|
3545
3551
|
}
|
|
3546
|
-
var
|
|
3552
|
+
var ls = class {
|
|
3547
3553
|
_items;
|
|
3548
3554
|
_fetchNextPage;
|
|
3549
3555
|
_fetchPrevPage;
|
|
@@ -3573,7 +3579,7 @@ var ss = class {
|
|
|
3573
3579
|
return await this._fetchPrevPage();
|
|
3574
3580
|
}
|
|
3575
3581
|
};
|
|
3576
|
-
var
|
|
3582
|
+
var us = class extends ls {
|
|
3577
3583
|
_nextCursor;
|
|
3578
3584
|
_prevCursor;
|
|
3579
3585
|
cursors;
|
|
@@ -3587,7 +3593,7 @@ var cs = class extends ss {
|
|
|
3587
3593
|
return !!this._prevCursor;
|
|
3588
3594
|
}
|
|
3589
3595
|
};
|
|
3590
|
-
var
|
|
3596
|
+
var ds = class extends ls {
|
|
3591
3597
|
_totalCount;
|
|
3592
3598
|
_offset;
|
|
3593
3599
|
_tooManyToCount;
|
|
@@ -3610,76 +3616,76 @@ var ls = class extends ss {
|
|
|
3610
3616
|
return !!(this._limit !== 0 && this.currentPage && this.currentPage > 0);
|
|
3611
3617
|
}
|
|
3612
3618
|
};
|
|
3613
|
-
function
|
|
3619
|
+
function fs(e6) {
|
|
3614
3620
|
let t2 = (n2) => ({ query: n2, async find() {
|
|
3615
3621
|
try {
|
|
3616
3622
|
let r2 = e6.requestTransformer(e6.pagingMethod === `CURSOR` && n2.cursorPaging.cursor ? { cursorPaging: n2.cursorPaging } : n2), i2 = await e6.func(r2), { [Ze]: a2, [Qe]: o2 } = e6.responseTransformer(i2);
|
|
3617
3623
|
if (e6.pagingMethod === `OFFSET`) {
|
|
3618
3624
|
let e7 = n2;
|
|
3619
|
-
return new
|
|
3625
|
+
return new ds({ items: a2 ?? [], fetchNextPage: () => t2({ ...e7, paging: { offset: e7.paging.offset + e7.paging.limit, limit: e7.paging.limit } }).find(), fetchPrevPage: () => t2({ ...n2, paging: { offset: Math.max(e7.paging.offset - e7.paging.limit, 0), limit: e7.paging.limit } }).find(), offset: e7.paging.offset, limit: e7.paging.limit, totalCount: o2?.total, tooManyToCount: o2?.tooManyToCount, originQuery: this });
|
|
3620
3626
|
}
|
|
3621
3627
|
let s2 = n2.cursorPaging;
|
|
3622
|
-
return new
|
|
3628
|
+
return new us({ items: a2 ?? [], limit: s2.limit, originQuery: this, fetchNextPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.next ?? void 0, limit: s2.limit } }).find(), fetchPrevPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.prev ?? void 0, limit: s2.limit } }).find(), prevCursor: o2?.cursors?.prev ?? void 0, nextCursor: o2?.cursors?.next ?? void 0 });
|
|
3623
3629
|
} catch (t3) {
|
|
3624
3630
|
throw e6.errorTransformer(t3);
|
|
3625
3631
|
}
|
|
3626
3632
|
}, skipTo(e7) {
|
|
3627
3633
|
return t2({ ...n2, cursorPaging: { cursor: e7, limit: n2.cursorPaging.limit } });
|
|
3628
3634
|
}, eq(r2, i2) {
|
|
3629
|
-
let a2 = i2 === void 0 ? null : i2, o2 = { [
|
|
3630
|
-
return t2({ ...n2, filter:
|
|
3635
|
+
let a2 = i2 === void 0 ? null : i2, o2 = { [q(e6.transformationPaths, r2)]: a2 };
|
|
3636
|
+
return t2({ ...n2, filter: K(n2.filter, o2) });
|
|
3631
3637
|
}, ne(r2, i2) {
|
|
3632
|
-
let a2 = i2 === void 0 ? null : i2, o2 = { [
|
|
3633
|
-
return t2({ ...n2, filter:
|
|
3638
|
+
let a2 = i2 === void 0 ? null : i2, o2 = { [q(e6.transformationPaths, r2)]: { $ne: a2 } };
|
|
3639
|
+
return t2({ ...n2, filter: K(n2.filter, o2) });
|
|
3634
3640
|
}, ge(r2, i2) {
|
|
3635
|
-
let a2 = { [
|
|
3636
|
-
return t2({ ...n2, filter:
|
|
3641
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $gte: i2 } };
|
|
3642
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3637
3643
|
}, gt(r2, i2) {
|
|
3638
|
-
let a2 = { [
|
|
3639
|
-
return t2({ ...n2, filter:
|
|
3644
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $gt: i2 } };
|
|
3645
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3640
3646
|
}, le(r2, i2) {
|
|
3641
|
-
let a2 = { [
|
|
3642
|
-
return t2({ ...n2, filter:
|
|
3647
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $lte: i2 } };
|
|
3648
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3643
3649
|
}, lt(r2, i2) {
|
|
3644
|
-
let a2 = { [
|
|
3645
|
-
return t2({ ...n2, filter:
|
|
3650
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $lt: i2 } };
|
|
3651
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3646
3652
|
}, isNotEmpty(e7) {
|
|
3647
3653
|
return this.ne(e7, null);
|
|
3648
3654
|
}, isEmpty(e7) {
|
|
3649
3655
|
return this.eq(e7, null);
|
|
3650
3656
|
}, startsWith(r2, i2) {
|
|
3651
|
-
let a2 = { [
|
|
3652
|
-
return t2({ ...n2, filter:
|
|
3657
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $startsWith: i2 } };
|
|
3658
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3653
3659
|
}, endsWith(r2, i2) {
|
|
3654
|
-
let a2 = { [
|
|
3655
|
-
return t2({ ...n2, filter:
|
|
3660
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $endsWith: i2 } };
|
|
3661
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3656
3662
|
}, contains(r2, i2) {
|
|
3657
|
-
let a2 = { [
|
|
3658
|
-
return t2({ ...n2, filter:
|
|
3663
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $contains: i2 } };
|
|
3664
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3659
3665
|
}, hasSome(r2, ...i2) {
|
|
3660
|
-
let a2 = { [
|
|
3661
|
-
return t2({ ...n2, filter:
|
|
3666
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $hasSome: Array.isArray(i2[0]) ? i2[0] : i2 } };
|
|
3667
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3662
3668
|
}, hasAll(r2, ...i2) {
|
|
3663
|
-
let a2 = { [
|
|
3664
|
-
return t2({ ...n2, filter:
|
|
3669
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $hasAll: Array.isArray(i2[0]) ? i2[0] : i2 } };
|
|
3670
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3665
3671
|
}, between(e7, t3, n3) {
|
|
3666
3672
|
return this.ge(e7, t3).lt(e7, n3);
|
|
3667
3673
|
}, in(r2, i2) {
|
|
3668
|
-
let a2 = { [
|
|
3669
|
-
return t2({ ...n2, filter:
|
|
3674
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $in: i2 } };
|
|
3675
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3670
3676
|
}, exists(r2, i2 = true) {
|
|
3671
|
-
let a2 = { [
|
|
3672
|
-
return t2({ ...n2, filter:
|
|
3677
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $exists: i2 } };
|
|
3678
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3673
3679
|
}, or(e7) {
|
|
3674
|
-
return t2({ ...n2, filter:
|
|
3680
|
+
return t2({ ...n2, filter: ss(n2.filter, e7.query.filter) });
|
|
3675
3681
|
}, and(e7) {
|
|
3676
|
-
return t2({ ...n2, filter:
|
|
3682
|
+
return t2({ ...n2, filter: K(n2.filter, e7.query.filter) });
|
|
3677
3683
|
}, not(e7) {
|
|
3678
|
-
return t2({ ...n2, filter:
|
|
3684
|
+
return t2({ ...n2, filter: cs(e7.query.filter) });
|
|
3679
3685
|
}, ascending(...r2) {
|
|
3680
|
-
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName:
|
|
3686
|
+
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: q(e6.transformationPaths, t3), order: `ASC` }))] });
|
|
3681
3687
|
}, descending(...r2) {
|
|
3682
|
-
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName:
|
|
3688
|
+
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: q(e6.transformationPaths, t3), order: `DESC` }))] });
|
|
3683
3689
|
}, skip(e7) {
|
|
3684
3690
|
return t2({ ...n2, paging: { offset: e7, limit: `limit` in n2.paging ? n2.paging.limit : 50 } });
|
|
3685
3691
|
}, limit(r2) {
|
|
@@ -3692,82 +3698,82 @@ function us(e6) {
|
|
|
3692
3698
|
} });
|
|
3693
3699
|
return t2({ filter: {}, ...e6.pagingMethod === `OFFSET` ? { paging: { offset: 0, limit: 50 } } : { cursorPaging: { limit: 50 } } });
|
|
3694
3700
|
}
|
|
3695
|
-
function
|
|
3701
|
+
function q(e6, t2) {
|
|
3696
3702
|
let n2 = Object.entries(e6).find(([e7]) => e7 === t2 || t2.startsWith(`${e7}.`))?.[0];
|
|
3697
3703
|
return n2 ? t2.replace(n2, e6[n2]) : et(t2, { ...e6, ...$e });
|
|
3698
3704
|
}
|
|
3699
|
-
var
|
|
3700
|
-
var
|
|
3701
|
-
var
|
|
3702
|
-
var
|
|
3703
|
-
var
|
|
3704
|
-
var
|
|
3705
|
-
function
|
|
3705
|
+
var ps = `filter`;
|
|
3706
|
+
var ms = `sort`;
|
|
3707
|
+
var hs = `cursorPaging`;
|
|
3708
|
+
var gs = `paging`;
|
|
3709
|
+
var _s = [ps, ms, hs];
|
|
3710
|
+
var vs = [ps, ms, gs];
|
|
3711
|
+
function ys(e6, t2) {
|
|
3706
3712
|
return !e6 || typeof e6 != `object` ? false : t2.some((t3) => e6.hasOwnProperty(t3));
|
|
3707
3713
|
}
|
|
3708
|
-
function
|
|
3709
|
-
return
|
|
3714
|
+
function bs(e6) {
|
|
3715
|
+
return ys(e6, _s);
|
|
3710
3716
|
}
|
|
3711
|
-
function
|
|
3712
|
-
return
|
|
3717
|
+
function xs(e6) {
|
|
3718
|
+
return ys(e6, vs);
|
|
3713
3719
|
}
|
|
3714
|
-
function
|
|
3720
|
+
function Ss(e6) {
|
|
3715
3721
|
let { hasOptionsParameter: t2 } = e6;
|
|
3716
3722
|
return function(...n2) {
|
|
3717
|
-
return t2 ?
|
|
3723
|
+
return t2 ? ws(n2, e6) : Cs(n2, e6);
|
|
3718
3724
|
};
|
|
3719
3725
|
}
|
|
3720
|
-
function
|
|
3726
|
+
function Cs(e6, t2) {
|
|
3721
3727
|
return e6.length === 0 ? t2.builderQueryFunction() : t2.typedQueryFunction(e6[0]);
|
|
3722
3728
|
}
|
|
3723
|
-
function
|
|
3729
|
+
function ws(e6, t2) {
|
|
3724
3730
|
switch (e6.length) {
|
|
3725
3731
|
case 0:
|
|
3726
3732
|
return t2.builderQueryFunction();
|
|
3727
3733
|
case 1:
|
|
3728
|
-
return
|
|
3734
|
+
return bs(e6[0]) || xs(e6[0]) ? t2.typedQueryFunction(e6[0]) : t2.builderQueryFunction(e6[0]);
|
|
3729
3735
|
default:
|
|
3730
3736
|
return t2.typedQueryFunction(e6[0], e6[1]);
|
|
3731
3737
|
}
|
|
3732
3738
|
}
|
|
3733
|
-
function
|
|
3739
|
+
function J(e6) {
|
|
3734
3740
|
if (!e6) return;
|
|
3735
3741
|
let t2 = ``;
|
|
3736
3742
|
return (e6.filename || e6.altText) && (t2 = `/${encodeURIComponent(e6.filename || e6.altText)}`), e6.id ? `wix:image://v1/${e6.id}${t2}#originWidth=${e6.width}&originHeight=${e6.height}` : e6.url;
|
|
3737
3743
|
}
|
|
3738
|
-
function
|
|
3744
|
+
function Y(e6) {
|
|
3739
3745
|
if (e6) return [`http://`, `https://`].some((t2) => e6.base?.startsWith(t2)) ? `${e6.base}${e6.path}` : `http://${e6.base}${e6.path}`;
|
|
3740
3746
|
}
|
|
3741
|
-
var
|
|
3742
|
-
var
|
|
3743
|
-
function
|
|
3747
|
+
var Ts = [{ path: `categories.updatedDate` }, { path: `categories.coverImage.urlExpirationDate` }];
|
|
3748
|
+
var Es = [{ path: `categories.coverImage.focalPoint.x` }, { path: `categories.coverImage.focalPoint.y` }];
|
|
3749
|
+
function Ds(e6) {
|
|
3744
3750
|
return Lt(Object.assign(e6, { domainToMappings: { "manage._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }, { srcPath: `/_api/communities-blog-node-api/v3/bulk/category`, destPath: `/v3/bulk/category` }, { srcPath: `/_api/communities-blog-node-api/v3/bulk/categories`, destPath: `/v3/bulk/categories` }], "*.pub.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "bo._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "wixbo.ai": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "wix-bo.com": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "editor.wixapps.net": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "editor._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "blocks._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "create.editorx": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "social-blog._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], _: [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "apps._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "www._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "www.wixapis.com": [{ srcPath: `/blog/v3/categories`, destPath: `/v3/categories` }, { srcPath: `/v3/categories`, destPath: `/v3/categories` }], "*.dev.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "api._api_base_domain_": [{ srcPath: `/category-service-api-proxy`, destPath: `` }] } }));
|
|
3745
3751
|
}
|
|
3746
|
-
var
|
|
3747
|
-
function
|
|
3752
|
+
var Os = `@wix/auto_sdk_blog_categories`;
|
|
3753
|
+
function ks(e6) {
|
|
3748
3754
|
function t2({ host: t3 }) {
|
|
3749
|
-
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.ListCategories`, packageName:
|
|
3755
|
+
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.ListCategories`, packageName: Os, migrationOptions: { optInTransformResponse: true }, url: Ds({ protoPath: `/v3/categories`, data: e6, host: t3 }), params: It(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Ts }, { transformFn: N, paths: Es }]) };
|
|
3750
3756
|
}
|
|
3751
3757
|
return t2;
|
|
3752
3758
|
}
|
|
3753
|
-
var
|
|
3754
|
-
var
|
|
3755
|
-
async function
|
|
3756
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
3759
|
+
var As = [{ path: `categories.url` }, { path: `categories.translations.url` }];
|
|
3760
|
+
var js = [{ path: `categories.coverImage` }];
|
|
3761
|
+
async function Ms(e6) {
|
|
3762
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ks(D({ paging: e6?.paging, fieldsets: e6?.fieldsets, language: e6?.language }));
|
|
3757
3763
|
n2?.onSiteCall?.();
|
|
3758
3764
|
try {
|
|
3759
3765
|
let e7 = await t2.request(r2);
|
|
3760
|
-
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3766
|
+
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: Y, paths: As }, { transformFn: J, paths: js }]));
|
|
3761
3767
|
} catch (e7) {
|
|
3762
3768
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { paging: `$[0].paging`, fieldsets: `$[0].fieldsets`, language: `$[0].language` }, singleArgumentUnchanged: false }, [`options`]);
|
|
3763
3769
|
throw n2?.onError?.(e7), t3;
|
|
3764
3770
|
}
|
|
3765
3771
|
}
|
|
3766
|
-
function js(e6) {
|
|
3767
|
-
return (t2) => As(t2, { httpClient: e6 });
|
|
3768
|
-
}
|
|
3769
|
-
var Ms = M(js);
|
|
3770
3772
|
function Ns(e6) {
|
|
3773
|
+
return (t2) => Ms(t2, { httpClient: e6 });
|
|
3774
|
+
}
|
|
3775
|
+
var Ps = M(Ns);
|
|
3776
|
+
function X(e6) {
|
|
3771
3777
|
if (!e6) return;
|
|
3772
3778
|
let t2 = ``;
|
|
3773
3779
|
e6?.filename && (t2 = `/${encodeURIComponent(e6.filename)}`);
|
|
@@ -3782,69 +3788,69 @@ function Ns(e6) {
|
|
|
3782
3788
|
}
|
|
3783
3789
|
return e6.id ? `wix:video://v1/${e6.id}${t2}${n2}` : e6.url;
|
|
3784
3790
|
}
|
|
3785
|
-
var
|
|
3786
|
-
var
|
|
3787
|
-
var Is = [{ path: `post.heroImage.focalPoint.x` }, { path: `post.heroImage.focalPoint.y` }, { path: `post.media.wixMedia.image.focalPoint.x` }, { path: `post.media.wixMedia.image.focalPoint.y` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `post.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `post.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `post.metrics.averageRating` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `post.richContent.nodes.galleryData.items.image.media.duration` }, { path: `post.richContent.nodes.galleryData.items.video.media.duration` }, { path: `post.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `post.richContent.nodes.galleryData.options.item.ratio` }, { path: `post.richContent.nodes.imageData.image.duration` }, { path: `post.richContent.nodes.imageData.crop.x` }, { path: `post.richContent.nodes.imageData.crop.y` }, { path: `post.richContent.nodes.imageData.crop.width` }, { path: `post.richContent.nodes.imageData.crop.height` }, { path: `post.richContent.nodes.mapData.mapSettings.lat` }, { path: `post.richContent.nodes.mapData.mapSettings.lng` }, { path: `post.richContent.nodes.pollData.poll.image.duration` }, { path: `post.richContent.nodes.pollData.poll.options.image.duration` }, { path: `post.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.nodes.appEmbedData.image.duration` }, { path: `post.richContent.nodes.videoData.video.duration` }, { path: `post.richContent.nodes.videoData.thumbnail.duration` }, { path: `post.richContent.nodes.audioData.audio.duration` }, { path: `post.richContent.nodes.audioData.coverImage.duration` }, { path: `post.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `post.richContent.nodes.shapeData.shape.duration` }, { path: `post.richContent.nodes.cardData.background.gradient.centerX` }, { path: `post.richContent.nodes.cardData.background.gradient.centerY` }, { path: `post.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `post.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.tocData.fontSize` }, { path: `post.richContent.nodes.tocData.itemSpacing` }, { path: `post.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3788
|
-
var
|
|
3789
|
-
var
|
|
3790
|
-
var zs = [{ path: `posts.heroImage.focalPoint.x` }, { path: `posts.heroImage.focalPoint.y` }, { path: `posts.media.wixMedia.image.focalPoint.x` }, { path: `posts.media.wixMedia.image.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `posts.metrics.averageRating` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `posts.richContent.nodes.galleryData.items.image.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `posts.richContent.nodes.galleryData.options.item.ratio` }, { path: `posts.richContent.nodes.imageData.image.duration` }, { path: `posts.richContent.nodes.imageData.crop.x` }, { path: `posts.richContent.nodes.imageData.crop.y` }, { path: `posts.richContent.nodes.imageData.crop.width` }, { path: `posts.richContent.nodes.imageData.crop.height` }, { path: `posts.richContent.nodes.mapData.mapSettings.lat` }, { path: `posts.richContent.nodes.mapData.mapSettings.lng` }, { path: `posts.richContent.nodes.pollData.poll.image.duration` }, { path: `posts.richContent.nodes.pollData.poll.options.image.duration` }, { path: `posts.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.appEmbedData.image.duration` }, { path: `posts.richContent.nodes.videoData.video.duration` }, { path: `posts.richContent.nodes.videoData.thumbnail.duration` }, { path: `posts.richContent.nodes.audioData.audio.duration` }, { path: `posts.richContent.nodes.audioData.coverImage.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `posts.richContent.nodes.shapeData.shape.duration` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.tocData.fontSize` }, { path: `posts.richContent.nodes.tocData.itemSpacing` }, { path: `posts.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3791
|
-
var
|
|
3792
|
-
function
|
|
3791
|
+
var Fs = [{ path: `post.firstPublishedDate` }, { path: `post.lastPublishedDate` }, { path: `post.expirationDate` }, { path: `post.heroImage.urlExpirationDate` }, { path: `post.richContent.metadata.createdTimestamp` }, { path: `post.richContent.metadata.updatedTimestamp` }, { path: `post.moderationDetails.submittedDate` }, { path: `post.moderationDetails.moderationDate` }, { path: `post.media.wixMedia.image.urlExpirationDate` }, { path: `post.media.wixMedia.videoV2.urlExpirationDate` }, { path: `post.media.wixMedia.videoV2.resolutions.urlExpirationDate` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate` }, { path: `post.media.wixMedia.videoV2.posters.urlExpirationDate` }];
|
|
3792
|
+
var Is = [{ path: `post.richContentCompressed` }];
|
|
3793
|
+
var Ls = [{ path: `post.heroImage.focalPoint.x` }, { path: `post.heroImage.focalPoint.y` }, { path: `post.media.wixMedia.image.focalPoint.x` }, { path: `post.media.wixMedia.image.focalPoint.y` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `post.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `post.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `post.metrics.averageRating` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `post.richContent.nodes.galleryData.items.image.media.duration` }, { path: `post.richContent.nodes.galleryData.items.video.media.duration` }, { path: `post.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `post.richContent.nodes.galleryData.options.item.ratio` }, { path: `post.richContent.nodes.imageData.image.duration` }, { path: `post.richContent.nodes.imageData.crop.x` }, { path: `post.richContent.nodes.imageData.crop.y` }, { path: `post.richContent.nodes.imageData.crop.width` }, { path: `post.richContent.nodes.imageData.crop.height` }, { path: `post.richContent.nodes.mapData.mapSettings.lat` }, { path: `post.richContent.nodes.mapData.mapSettings.lng` }, { path: `post.richContent.nodes.pollData.poll.image.duration` }, { path: `post.richContent.nodes.pollData.poll.options.image.duration` }, { path: `post.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.nodes.appEmbedData.image.duration` }, { path: `post.richContent.nodes.videoData.video.duration` }, { path: `post.richContent.nodes.videoData.thumbnail.duration` }, { path: `post.richContent.nodes.audioData.audio.duration` }, { path: `post.richContent.nodes.audioData.coverImage.duration` }, { path: `post.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `post.richContent.nodes.shapeData.shape.duration` }, { path: `post.richContent.nodes.cardData.background.gradient.centerX` }, { path: `post.richContent.nodes.cardData.background.gradient.centerY` }, { path: `post.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `post.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.tocData.fontSize` }, { path: `post.richContent.nodes.tocData.itemSpacing` }, { path: `post.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3794
|
+
var Rs = [{ path: `posts.firstPublishedDate` }, { path: `posts.lastPublishedDate` }, { path: `posts.expirationDate` }, { path: `posts.heroImage.urlExpirationDate` }, { path: `posts.richContent.metadata.createdTimestamp` }, { path: `posts.richContent.metadata.updatedTimestamp` }, { path: `posts.moderationDetails.submittedDate` }, { path: `posts.moderationDetails.moderationDate` }, { path: `posts.media.wixMedia.image.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.resolutions.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.posters.urlExpirationDate` }];
|
|
3795
|
+
var zs = [{ path: `posts.richContentCompressed` }];
|
|
3796
|
+
var Bs = [{ path: `posts.heroImage.focalPoint.x` }, { path: `posts.heroImage.focalPoint.y` }, { path: `posts.media.wixMedia.image.focalPoint.x` }, { path: `posts.media.wixMedia.image.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `posts.metrics.averageRating` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `posts.richContent.nodes.galleryData.items.image.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `posts.richContent.nodes.galleryData.options.item.ratio` }, { path: `posts.richContent.nodes.imageData.image.duration` }, { path: `posts.richContent.nodes.imageData.crop.x` }, { path: `posts.richContent.nodes.imageData.crop.y` }, { path: `posts.richContent.nodes.imageData.crop.width` }, { path: `posts.richContent.nodes.imageData.crop.height` }, { path: `posts.richContent.nodes.mapData.mapSettings.lat` }, { path: `posts.richContent.nodes.mapData.mapSettings.lng` }, { path: `posts.richContent.nodes.pollData.poll.image.duration` }, { path: `posts.richContent.nodes.pollData.poll.options.image.duration` }, { path: `posts.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.appEmbedData.image.duration` }, { path: `posts.richContent.nodes.videoData.video.duration` }, { path: `posts.richContent.nodes.videoData.thumbnail.duration` }, { path: `posts.richContent.nodes.audioData.audio.duration` }, { path: `posts.richContent.nodes.audioData.coverImage.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `posts.richContent.nodes.shapeData.shape.duration` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.tocData.fontSize` }, { path: `posts.richContent.nodes.tocData.itemSpacing` }, { path: `posts.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3797
|
+
var Vs = [{ path: `sort.origin.latitude` }, { path: `sort.origin.longitude` }, { path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
|
|
3798
|
+
function Hs(e6) {
|
|
3793
3799
|
return Lt(Object.assign(e6, { domainToMappings: { _: [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "apps._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www.wixapis.com": [{ srcPath: `/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/blog/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/v3/posts`, destPath: `/v3/posts` }], "manage._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/post-service-api-proxy/v3/bulk/posts`, destPath: `/v3/bulk/posts` }], "*.dev.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "blocks._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "create.editorx": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor.wixapps.net": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "dev._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }] } }));
|
|
3794
3800
|
}
|
|
3795
|
-
var
|
|
3796
|
-
function
|
|
3801
|
+
var Us = `@wix/auto_sdk_blog_posts`;
|
|
3802
|
+
function Ws(e6) {
|
|
3797
3803
|
function t2({ host: t3 }) {
|
|
3798
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug`, packageName:
|
|
3804
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug`, packageName: Us, migrationOptions: { optInTransformResponse: true }, url: Hs({ protoPath: `/v3/posts/slugs/{slug}`, data: e6, host: t3 }), params: It(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Fs }, { transformFn: dn, paths: Is }, { transformFn: N, paths: Ls }]) };
|
|
3799
3805
|
}
|
|
3800
3806
|
return t2;
|
|
3801
3807
|
}
|
|
3802
|
-
function
|
|
3808
|
+
function Gs(e6) {
|
|
3803
3809
|
function t2({ host: t3 }) {
|
|
3804
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts`, packageName:
|
|
3810
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts`, packageName: Us, migrationOptions: { optInTransformResponse: true }, url: Hs({ protoPath: `/v3/posts`, data: e6, host: t3 }), params: It(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Rs }, { transformFn: dn, paths: zs }, { transformFn: N, paths: Bs }]) };
|
|
3805
3811
|
}
|
|
3806
3812
|
return t2;
|
|
3807
3813
|
}
|
|
3808
|
-
function
|
|
3814
|
+
function Ks(e6) {
|
|
3809
3815
|
function t2({ host: t3 }) {
|
|
3810
|
-
let n2 = A(e6, [{ transformFn: un, paths:
|
|
3811
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName:
|
|
3816
|
+
let n2 = A(e6, [{ transformFn: un, paths: Vs }]);
|
|
3817
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName: Us, migrationOptions: { optInTransformResponse: true }, url: Hs({ protoPath: `/v3/posts/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Rs }, { transformFn: dn, paths: zs }, { transformFn: N, paths: Bs }]) };
|
|
3812
3818
|
}
|
|
3813
3819
|
return t2;
|
|
3814
3820
|
}
|
|
3815
|
-
var
|
|
3816
|
-
var
|
|
3817
|
-
var
|
|
3818
|
-
var
|
|
3819
|
-
var
|
|
3820
|
-
var
|
|
3821
|
+
var qs = [{ path: `post.url` }, { path: `post.translations.url` }];
|
|
3822
|
+
var Js = [{ path: `post.heroImage` }, { path: `post.media.wixMedia.image` }];
|
|
3823
|
+
var Ys = [{ path: `post.media.wixMedia.videoV2` }];
|
|
3824
|
+
var Xs = [{ path: `posts.url` }, { path: `posts.translations.url` }];
|
|
3825
|
+
var Zs = [{ path: `posts.heroImage` }, { path: `posts.media.wixMedia.image` }];
|
|
3826
|
+
var Qs = [{ path: `posts.media.wixMedia.videoV2` }];
|
|
3821
3827
|
var Z = ((e6) => (e6.UNKNOWN = `UNKNOWN`, e6.COUNTERS = `COUNTERS`, e6.URL = `URL`, e6.CONTENT_TEXT = `CONTENT_TEXT`, e6.METRICS = `METRICS`, e6.SEO = `SEO`, e6.CONTENT = `CONTENT`, e6.INTERNAL_ID = `INTERNAL_ID`, e6.CONTACT_ID = `CONTACT_ID`, e6.RICH_CONTENT = `RICH_CONTENT`, e6.RICH_CONTENT_STRING = `RICH_CONTENT_STRING`, e6.RICH_CONTENT_COMPRESSED = `RICH_CONTENT_COMPRESSED`, e6.TRANSLATIONS = `TRANSLATIONS`, e6.REFERENCE_ID = `REFERENCE_ID`, e6.EXCLUDE_PAID_CONTENT = `EXCLUDE_PAID_CONTENT`, e6.SEO_DATA = `SEO_DATA`, e6.OWNER = `OWNER`, e6.HAS_UNPUBLISHED_CHANGES = `HAS_UNPUBLISHED_CHANGES`, e6.HEADING = `HEADING`, e6.IMAGE = `IMAGE`, e6))(Z || {});
|
|
3822
|
-
async function
|
|
3823
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3828
|
+
async function $s(e6, t2) {
|
|
3829
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Ws(D({ slug: e6, fieldsets: t2?.fieldsets, language: t2?.language }, []));
|
|
3824
3830
|
r2?.onSiteCall?.();
|
|
3825
3831
|
try {
|
|
3826
3832
|
let e7 = await n2.request(i2);
|
|
3827
|
-
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3833
|
+
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: Y, paths: qs }, { transformFn: J, paths: Js }, { transformFn: X, paths: Ys }]), [`post.richContent`, `post.rich_content`]);
|
|
3828
3834
|
} catch (e7) {
|
|
3829
3835
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { slug: `$[0]`, fieldsets: `$[1].fieldsets`, language: `$[1].language` }, singleArgumentUnchanged: false }, [`slug`, `options`]);
|
|
3830
3836
|
throw r2?.onError?.(e7), t3;
|
|
3831
3837
|
}
|
|
3832
3838
|
}
|
|
3833
|
-
async function
|
|
3834
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
3839
|
+
async function ec(e6) {
|
|
3840
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = Gs(D({ featured: e6?.featured, hashtags: e6?.hashtags, categoryIds: e6?.categoryIds, tagIds: e6?.tagIds, sort: e6?.sort, paging: e6?.paging, language: e6?.language, memberId: e6?.memberId, fieldsets: e6?.fieldsets }, []));
|
|
3835
3841
|
n2?.onSiteCall?.();
|
|
3836
3842
|
try {
|
|
3837
3843
|
let e7 = await t2.request(r2);
|
|
3838
|
-
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3844
|
+
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: Y, paths: Xs }, { transformFn: J, paths: Zs }, { transformFn: X, paths: Qs }]), [`posts.richContent`, `posts.rich_content`]);
|
|
3839
3845
|
} catch (e7) {
|
|
3840
3846
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { featured: `$[0].featured`, hashtags: `$[0].hashtags`, categoryIds: `$[0].categoryIds`, tagIds: `$[0].tagIds`, sort: `$[0].sort`, paging: `$[0].paging`, language: `$[0].language`, memberId: `$[0].memberId`, fieldsets: `$[0].fieldsets` }, singleArgumentUnchanged: false }, [`options`]);
|
|
3841
3847
|
throw n2?.onError?.(e7), t3;
|
|
3842
3848
|
}
|
|
3843
3849
|
}
|
|
3844
|
-
function
|
|
3850
|
+
function tc(e6) {
|
|
3845
3851
|
let { httpClient: t2, sideEffects: n2 } = arguments[1];
|
|
3846
|
-
return
|
|
3847
|
-
let i2 =
|
|
3852
|
+
return fs({ func: async (r2) => {
|
|
3853
|
+
let i2 = Ks({ ...r2, ...e6 ?? {} });
|
|
3848
3854
|
n2?.onSiteCall?.();
|
|
3849
3855
|
try {
|
|
3850
3856
|
let e7 = await t2.request(i2);
|
|
@@ -3856,76 +3862,76 @@ function ec(e6) {
|
|
|
3856
3862
|
let n3 = [t3, e6];
|
|
3857
3863
|
return D({ ...n3?.[1], query: n3?.[0] }, []);
|
|
3858
3864
|
}, responseTransformer: ({ data: e7 }) => {
|
|
3859
|
-
let t3 = O(A(e7, [{ transformFn:
|
|
3865
|
+
let t3 = O(A(e7, [{ transformFn: Y, paths: Xs }, { transformFn: J, paths: Zs }, { transformFn: X, paths: Qs }]), [`posts.richContent`, `posts.rich_content`]);
|
|
3860
3866
|
return { items: t3?.posts, pagingMetadata: t3?.pagingMetadata };
|
|
3861
3867
|
}, errorTransformer: (e7) => {
|
|
3862
3868
|
throw j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
3863
3869
|
}, pagingMethod: `CURSOR`, transformationPaths: {} });
|
|
3864
3870
|
}
|
|
3865
|
-
async function
|
|
3866
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3871
|
+
async function nc(e6, t2) {
|
|
3872
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Ks(D({ query: e6, ...t2 }, []));
|
|
3867
3873
|
r2?.onSiteCall?.();
|
|
3868
3874
|
try {
|
|
3869
3875
|
let e7 = await n2.request(i2);
|
|
3870
|
-
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3876
|
+
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: Y, paths: Xs }, { transformFn: J, paths: Zs }, { transformFn: X, paths: Qs }]), [`posts.richContent`, `posts.rich_content`]);
|
|
3871
3877
|
} catch (e7) {
|
|
3872
3878
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
|
|
3873
3879
|
throw r2?.onError?.(e7), t3;
|
|
3874
3880
|
}
|
|
3875
3881
|
}
|
|
3876
|
-
function nc(e6) {
|
|
3877
|
-
return (t2, n2) => Qs(t2, n2, { httpClient: e6 });
|
|
3878
|
-
}
|
|
3879
3882
|
function rc(e6) {
|
|
3880
|
-
return (t2) => $s(t2, { httpClient: e6 });
|
|
3883
|
+
return (t2, n2) => $s(t2, n2, { httpClient: e6 });
|
|
3881
3884
|
}
|
|
3882
3885
|
function ic(e6) {
|
|
3883
3886
|
return (t2) => ec(t2, { httpClient: e6 });
|
|
3884
3887
|
}
|
|
3885
3888
|
function ac(e6) {
|
|
3886
|
-
return (t2
|
|
3889
|
+
return (t2) => tc(t2, { httpClient: e6 });
|
|
3887
3890
|
}
|
|
3888
3891
|
function oc(e6) {
|
|
3889
|
-
|
|
3892
|
+
return (t2, n2) => nc(t2, n2, { httpClient: e6 });
|
|
3893
|
+
}
|
|
3894
|
+
function sc(e6) {
|
|
3895
|
+
let t2 = Ss({ builderQueryFunction: (t3) => ac(e6)(t3), typedQueryFunction: (t3, n3) => oc(e6)(t3, n3), hasOptionsParameter: true });
|
|
3890
3896
|
function n2(e7, n3) {
|
|
3891
3897
|
return t2(...arguments);
|
|
3892
3898
|
}
|
|
3893
3899
|
return n2;
|
|
3894
3900
|
}
|
|
3895
|
-
var sc = M(nc);
|
|
3896
3901
|
var cc = M(rc);
|
|
3897
|
-
var lc = M(
|
|
3898
|
-
var uc = (
|
|
3899
|
-
var dc = `
|
|
3900
|
-
var fc =
|
|
3902
|
+
var lc = M(ic);
|
|
3903
|
+
var uc = M(sc);
|
|
3904
|
+
var dc = (e6) => O(A(e6, [{ transformFn: Y, paths: [{ path: `posts.url` }, { path: `posts.translations.url` }] }, { transformFn: J, paths: [{ path: `posts.heroImage` }, { path: `posts.media.wixMedia.image` }] }, { transformFn: X, paths: [{ path: `posts.media.wixMedia.videoV2` }] }]), [`posts.richContent`, `posts.rich_content`]).posts ?? [];
|
|
3905
|
+
var fc = `https://blog.wixsite.com/blog-demo-posts`;
|
|
3906
|
+
var pc = M((e6) => async (t2) => {
|
|
3901
3907
|
let n2 = await e6.fetchWithAuth(`${globalThis.location.origin}/_serverless/blog-demo-posts/v3/demo-posts?${It(t2)}`);
|
|
3902
3908
|
if (!n2.ok) throw Error(`ListDemoPosts answered ${n2.status}`);
|
|
3903
|
-
return
|
|
3909
|
+
return dc(await n2.json()).filter((e7) => !e7.url?.startsWith(fc));
|
|
3904
3910
|
});
|
|
3905
|
-
var
|
|
3911
|
+
var mc = async (e6) => {
|
|
3906
3912
|
try {
|
|
3907
|
-
return await
|
|
3913
|
+
return await pc(e6);
|
|
3908
3914
|
} catch (e7) {
|
|
3909
3915
|
return console.info(`[blog demo posts]`, `read failed`, e7), [];
|
|
3910
3916
|
}
|
|
3911
3917
|
};
|
|
3912
|
-
var
|
|
3913
|
-
var
|
|
3914
|
-
function
|
|
3918
|
+
var hc = [{ path: `members.createdDate` }, { path: `members.updatedDate` }, { path: `members.lastLoginDate` }];
|
|
3919
|
+
var gc = [{ path: `query.sorting.origin.latitude` }, { path: `query.sorting.origin.longitude` }];
|
|
3920
|
+
function _c(e6) {
|
|
3915
3921
|
return Lt(Object.assign(e6, { domainToMappings: { "www.wixapis.com": [{ srcPath: `/members/v1/members`, destPath: `/v1/members` }], "api._api_base_domain_": [{ srcPath: `/members-ng-api`, destPath: `` }], "www._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "manage._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "editor._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "blocks._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "create.editorx": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "editor.wixapps.net": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "*.dev.wix-code.com": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "bo._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "wixbo.ai": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "wix-bo.com": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], _: [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "members.wixapps.net": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }] } }));
|
|
3916
3922
|
}
|
|
3917
|
-
var
|
|
3918
|
-
function
|
|
3923
|
+
var vc = `@wix/auto_sdk_members_members`;
|
|
3924
|
+
function yc(e6) {
|
|
3919
3925
|
function t2({ host: t3 }) {
|
|
3920
|
-
let n2 = A(e6, [{ transformFn: un, paths:
|
|
3921
|
-
return { entityFqdn: `wix.members.v1.member`, method: `POST`, methodFqn: `com.wixpress.members.api.Members.QueryMembers`, packageName:
|
|
3926
|
+
let n2 = A(e6, [{ transformFn: un, paths: gc }]);
|
|
3927
|
+
return { entityFqdn: `wix.members.v1.member`, method: `POST`, methodFqn: `com.wixpress.members.api.Members.QueryMembers`, packageName: vc, migrationOptions: { optInTransformResponse: true }, url: _c({ protoPath: `/v1/members/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: hc }]) };
|
|
3922
3928
|
}
|
|
3923
3929
|
return t2;
|
|
3924
3930
|
}
|
|
3925
|
-
function
|
|
3931
|
+
function bc(e6) {
|
|
3926
3932
|
let { httpClient: t2, sideEffects: n2 } = arguments[1];
|
|
3927
|
-
return
|
|
3928
|
-
let i2 =
|
|
3933
|
+
return fs({ func: async (r2) => {
|
|
3934
|
+
let i2 = yc({ ...r2, ...e6 ?? {} });
|
|
3929
3935
|
n2?.onSiteCall?.();
|
|
3930
3936
|
try {
|
|
3931
3937
|
let e7 = await t2.request(i2);
|
|
@@ -3943,8 +3949,8 @@ function yc(e6) {
|
|
|
3943
3949
|
throw j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
3944
3950
|
}, pagingMethod: `OFFSET`, transformationPaths: {} });
|
|
3945
3951
|
}
|
|
3946
|
-
async function
|
|
3947
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3952
|
+
async function xc(e6, t2) {
|
|
3953
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = yc(D({ query: e6, ...t2 }));
|
|
3948
3954
|
r2?.onSiteCall?.();
|
|
3949
3955
|
try {
|
|
3950
3956
|
let e7 = await n2.request(i2);
|
|
@@ -3954,25 +3960,25 @@ async function bc(e6, t2) {
|
|
|
3954
3960
|
throw r2?.onError?.(e7), t3;
|
|
3955
3961
|
}
|
|
3956
3962
|
}
|
|
3957
|
-
function xc(e6) {
|
|
3958
|
-
return (t2) => yc(t2, { httpClient: e6 });
|
|
3959
|
-
}
|
|
3960
3963
|
function Sc(e6) {
|
|
3961
|
-
return (t2
|
|
3964
|
+
return (t2) => bc(t2, { httpClient: e6 });
|
|
3962
3965
|
}
|
|
3963
3966
|
function Cc(e6) {
|
|
3964
|
-
|
|
3967
|
+
return (t2, n2) => xc(t2, n2, { httpClient: e6 });
|
|
3968
|
+
}
|
|
3969
|
+
function wc(e6) {
|
|
3970
|
+
let t2 = Ss({ builderQueryFunction: (t3) => Sc(e6)(t3), typedQueryFunction: (t3, n3) => Cc(e6)(t3, n3), hasOptionsParameter: true });
|
|
3965
3971
|
function n2(e7, n3) {
|
|
3966
3972
|
return t2(...arguments);
|
|
3967
3973
|
}
|
|
3968
3974
|
return n2;
|
|
3969
3975
|
}
|
|
3970
|
-
var
|
|
3971
|
-
var
|
|
3976
|
+
var Tc = M(wc);
|
|
3977
|
+
var Ec = async (e6) => {
|
|
3972
3978
|
let t2 = [...new Set(e6.filter((e7) => !!e7))];
|
|
3973
3979
|
if (t2.length === 0) return {};
|
|
3974
3980
|
try {
|
|
3975
|
-
let { items: e7 } = await
|
|
3981
|
+
let { items: e7 } = await Tc({ fieldsets: [`PUBLIC`] }).in(`_id`, t2).limit(t2.length).find();
|
|
3976
3982
|
return Object.fromEntries(e7.flatMap((e8) => {
|
|
3977
3983
|
let { _id: t3 } = e8;
|
|
3978
3984
|
return t3 ? [[t3, e8]] : [];
|
|
@@ -3981,32 +3987,32 @@ var Tc = async (e6) => {
|
|
|
3981
3987
|
return {};
|
|
3982
3988
|
}
|
|
3983
3989
|
};
|
|
3984
|
-
var
|
|
3985
|
-
var
|
|
3986
|
-
var Oc = [{ path: `posts.heroImage.focalPoint.x` }, { path: `posts.heroImage.focalPoint.y` }, { path: `posts.media.wixMedia.image.focalPoint.x` }, { path: `posts.media.wixMedia.image.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `posts.metrics.averageRating` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `posts.richContent.nodes.galleryData.items.image.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `posts.richContent.nodes.galleryData.options.item.ratio` }, { path: `posts.richContent.nodes.imageData.image.duration` }, { path: `posts.richContent.nodes.imageData.crop.x` }, { path: `posts.richContent.nodes.imageData.crop.y` }, { path: `posts.richContent.nodes.imageData.crop.width` }, { path: `posts.richContent.nodes.imageData.crop.height` }, { path: `posts.richContent.nodes.mapData.mapSettings.lat` }, { path: `posts.richContent.nodes.mapData.mapSettings.lng` }, { path: `posts.richContent.nodes.pollData.poll.image.duration` }, { path: `posts.richContent.nodes.pollData.poll.options.image.duration` }, { path: `posts.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.appEmbedData.image.duration` }, { path: `posts.richContent.nodes.videoData.video.duration` }, { path: `posts.richContent.nodes.videoData.thumbnail.duration` }, { path: `posts.richContent.nodes.audioData.audio.duration` }, { path: `posts.richContent.nodes.audioData.coverImage.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `posts.richContent.nodes.shapeData.shape.duration` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.tocData.fontSize` }, { path: `posts.richContent.nodes.tocData.itemSpacing` }, { path: `posts.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3987
|
-
var
|
|
3988
|
-
function
|
|
3990
|
+
var Dc = [{ path: `posts.firstPublishedDate` }, { path: `posts.lastPublishedDate` }, { path: `posts.expirationDate` }, { path: `posts.heroImage.urlExpirationDate` }, { path: `posts.richContent.metadata.createdTimestamp` }, { path: `posts.richContent.metadata.updatedTimestamp` }, { path: `posts.moderationDetails.submittedDate` }, { path: `posts.moderationDetails.moderationDate` }, { path: `posts.media.wixMedia.image.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.resolutions.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.posters.urlExpirationDate` }];
|
|
3991
|
+
var Oc = [{ path: `posts.richContentCompressed` }];
|
|
3992
|
+
var kc = [{ path: `posts.heroImage.focalPoint.x` }, { path: `posts.heroImage.focalPoint.y` }, { path: `posts.media.wixMedia.image.focalPoint.x` }, { path: `posts.media.wixMedia.image.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `posts.metrics.averageRating` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `posts.richContent.nodes.galleryData.items.image.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `posts.richContent.nodes.galleryData.options.item.ratio` }, { path: `posts.richContent.nodes.imageData.image.duration` }, { path: `posts.richContent.nodes.imageData.crop.x` }, { path: `posts.richContent.nodes.imageData.crop.y` }, { path: `posts.richContent.nodes.imageData.crop.width` }, { path: `posts.richContent.nodes.imageData.crop.height` }, { path: `posts.richContent.nodes.mapData.mapSettings.lat` }, { path: `posts.richContent.nodes.mapData.mapSettings.lng` }, { path: `posts.richContent.nodes.pollData.poll.image.duration` }, { path: `posts.richContent.nodes.pollData.poll.options.image.duration` }, { path: `posts.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.appEmbedData.image.duration` }, { path: `posts.richContent.nodes.videoData.video.duration` }, { path: `posts.richContent.nodes.videoData.thumbnail.duration` }, { path: `posts.richContent.nodes.audioData.audio.duration` }, { path: `posts.richContent.nodes.audioData.coverImage.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `posts.richContent.nodes.shapeData.shape.duration` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.tocData.fontSize` }, { path: `posts.richContent.nodes.tocData.itemSpacing` }, { path: `posts.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3993
|
+
var Ac = [{ path: `sort.origin.latitude` }, { path: `sort.origin.longitude` }, { path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
|
|
3994
|
+
function jc(e6) {
|
|
3989
3995
|
return Lt(Object.assign(e6, { domainToMappings: { _: [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "apps._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www.wixapis.com": [{ srcPath: `/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/blog/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/v3/posts`, destPath: `/v3/posts` }], "manage._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/post-service-api-proxy/v3/bulk/posts`, destPath: `/v3/bulk/posts` }], "*.dev.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "blocks._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "create.editorx": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor.wixapps.net": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "dev._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }] } }));
|
|
3990
3996
|
}
|
|
3991
|
-
var
|
|
3992
|
-
function
|
|
3997
|
+
var Mc = `@wix/auto_sdk_blog_posts`;
|
|
3998
|
+
function Nc(e6) {
|
|
3993
3999
|
function t2({ host: t3 }) {
|
|
3994
|
-
let n2 = A(e6, [{ transformFn: un, paths:
|
|
3995
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName:
|
|
4000
|
+
let n2 = A(e6, [{ transformFn: un, paths: Ac }]);
|
|
4001
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName: Mc, migrationOptions: { optInTransformResponse: true }, url: jc({ protoPath: `/v3/posts/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Dc }, { transformFn: dn, paths: Oc }, { transformFn: N, paths: kc }]) };
|
|
3996
4002
|
}
|
|
3997
4003
|
return t2;
|
|
3998
4004
|
}
|
|
3999
|
-
function
|
|
4000
|
-
let e6 =
|
|
4005
|
+
function Pc() {
|
|
4006
|
+
let e6 = Nc({});
|
|
4001
4007
|
return { getUrl: (t2) => {
|
|
4002
4008
|
let { url: n2 } = e6(t2);
|
|
4003
4009
|
return n2;
|
|
4004
4010
|
}, httpMethod: `POST`, path: `/v3/posts/query`, pathParams: {}, __requestType: null, __originalRequestType: null, __responseType: null, __originalResponseType: null };
|
|
4005
4011
|
}
|
|
4006
|
-
var
|
|
4007
|
-
var
|
|
4008
|
-
var
|
|
4009
|
-
let { data: n2 } = await e6.request(
|
|
4012
|
+
var Fc = Pc();
|
|
4013
|
+
var Ic = (e6) => (t2) => ({ method: `POST`, url: Fc.getUrl(t2), data: { query: { filter: { id: { $in: e6 } }, paging: { limit: e6.length } } } });
|
|
4014
|
+
var Lc = M((e6) => async (t2) => {
|
|
4015
|
+
let { data: n2 } = await e6.request(Ic(t2)), r2 = {};
|
|
4010
4016
|
for (let e7 of n2.posts ?? []) {
|
|
4011
4017
|
let { id: t3 } = e7, n3 = e7.media?.wixMedia?.videoV2?.resolutions;
|
|
4012
4018
|
if (!t3 || !n3?.length) continue;
|
|
@@ -4015,128 +4021,128 @@ var Ic = M((e6) => async (t2) => {
|
|
|
4015
4021
|
}
|
|
4016
4022
|
return r2;
|
|
4017
4023
|
});
|
|
4018
|
-
var
|
|
4024
|
+
var Rc = async (e6) => {
|
|
4019
4025
|
if (e6.length === 0) return {};
|
|
4020
4026
|
try {
|
|
4021
|
-
return await
|
|
4027
|
+
return await Lc(e6);
|
|
4022
4028
|
} catch {
|
|
4023
4029
|
return {};
|
|
4024
4030
|
}
|
|
4025
4031
|
};
|
|
4026
|
-
var
|
|
4032
|
+
var zc = class extends Error {
|
|
4027
4033
|
constructor(e6, t2) {
|
|
4028
4034
|
super(`SSR fetch "${e6}" exceeded its ${t2}ms deadline`), this.name = `SsrDeadlineError`;
|
|
4029
4035
|
}
|
|
4030
4036
|
};
|
|
4031
|
-
var
|
|
4037
|
+
var Bc = (e6, t2, n2) => {
|
|
4032
4038
|
let r2, i2 = new Promise((e7, i3) => {
|
|
4033
|
-
r2 = setTimeout(() => i3(new
|
|
4039
|
+
r2 = setTimeout(() => i3(new zc(n2, t2)), t2);
|
|
4034
4040
|
});
|
|
4035
4041
|
return Promise.race([e6, i2]).finally(() => clearTimeout(r2));
|
|
4036
4042
|
};
|
|
4037
4043
|
Z.RICH_CONTENT, Z.SEO, Z.URL, Z.CONTENT_TEXT, Z.RICH_CONTENT, Z.URL;
|
|
4038
|
-
var
|
|
4039
|
-
var
|
|
4044
|
+
var Vc = [Z.URL, Z.METRICS];
|
|
4045
|
+
var Hc = (e6) => {
|
|
4040
4046
|
let { status: t2, details: n2 } = e6 ?? {};
|
|
4041
4047
|
return t2 === 404 || String(n2?.applicationError?.code ?? ``).includes(`NOT_FOUND`);
|
|
4042
4048
|
};
|
|
4043
|
-
var
|
|
4044
|
-
if (t2 && !
|
|
4049
|
+
var Uc = (e6, t2) => {
|
|
4050
|
+
if (t2 && !Hc(e6)) throw e6;
|
|
4045
4051
|
};
|
|
4046
|
-
var
|
|
4047
|
-
var
|
|
4048
|
-
var
|
|
4052
|
+
var Wc = (e6) => Ec(e6.map(({ memberId: e7 }) => e7));
|
|
4053
|
+
var Gc = (e6) => Rc(e6.filter((e7) => e7.media?.wixMedia?.videoV2).map(({ _id: e7 }) => e7).filter((e7) => !!e7));
|
|
4054
|
+
var Kc = async (e6, t2, n2 = false, r2) => {
|
|
4049
4055
|
try {
|
|
4050
|
-
let { post: n3 } = await
|
|
4056
|
+
let { post: n3 } = await cc(e6, { ...t2 && { fieldsets: t2 }, ...r2 && { language: r2 } });
|
|
4051
4057
|
if (n3) return n3;
|
|
4052
4058
|
} catch (e7) {
|
|
4053
|
-
|
|
4059
|
+
Uc(e7, n2);
|
|
4054
4060
|
}
|
|
4055
4061
|
try {
|
|
4056
|
-
let { items: n3 } = await
|
|
4062
|
+
let { items: n3 } = await uc(t2 ? { fieldsets: t2 } : void 0).eq(`slug`, e6).limit(1).find();
|
|
4057
4063
|
return n3[0];
|
|
4058
4064
|
} catch (e7) {
|
|
4059
|
-
|
|
4065
|
+
Uc(e7, n2);
|
|
4060
4066
|
return;
|
|
4061
4067
|
}
|
|
4062
4068
|
};
|
|
4063
|
-
var
|
|
4069
|
+
var qc = async (e6, t2 = false, n2) => {
|
|
4064
4070
|
try {
|
|
4065
4071
|
let t3 = async (t4) => {
|
|
4066
|
-
let { posts: r2 } = await
|
|
4072
|
+
let { posts: r2 } = await lc({ paging: { limit: 1 }, ...e6 && { fieldsets: e6 }, ...t4 && n2 && { language: n2 } });
|
|
4067
4073
|
return r2?.[0];
|
|
4068
4074
|
};
|
|
4069
4075
|
return await t3(true) ?? (n2 ? await t3(false) : void 0);
|
|
4070
4076
|
} catch (e7) {
|
|
4071
|
-
|
|
4077
|
+
Uc(e7, t2);
|
|
4072
4078
|
return;
|
|
4073
4079
|
}
|
|
4074
4080
|
};
|
|
4075
|
-
var
|
|
4076
|
-
var
|
|
4081
|
+
var Jc = 100;
|
|
4082
|
+
var Yc = async () => {
|
|
4077
4083
|
try {
|
|
4078
|
-
let { categories: e6 } = await
|
|
4084
|
+
let { categories: e6 } = await Ps({ paging: { limit: Jc } });
|
|
4079
4085
|
return e6 ?? [];
|
|
4080
4086
|
} catch {
|
|
4081
4087
|
return [];
|
|
4082
4088
|
}
|
|
4083
4089
|
};
|
|
4084
|
-
var
|
|
4090
|
+
var Xc = (e6, t2) => {
|
|
4085
4091
|
let { categoryIds: n2 } = e6 ?? {};
|
|
4086
4092
|
if (!n2?.length) return [];
|
|
4087
4093
|
let r2 = new Map(t2.map((e7) => [e7._id, e7]));
|
|
4088
4094
|
return n2.map((e7) => r2.get(e7)).filter((e7) => e7 !== void 0);
|
|
4089
4095
|
};
|
|
4090
|
-
var
|
|
4096
|
+
var Zc = (e6, t2) => {
|
|
4091
4097
|
let n2 = {};
|
|
4092
|
-
for (let r2 of e6) for (let { _id: e7, label: i2 } of
|
|
4098
|
+
for (let r2 of e6) for (let { _id: e7, label: i2 } of Xc(r2, t2)) e7 && (n2[e7] = i2 ?? ``);
|
|
4093
4099
|
return n2;
|
|
4094
4100
|
};
|
|
4095
|
-
var
|
|
4096
|
-
let n2 = e6 ? await
|
|
4101
|
+
var Qc = async (e6, t2) => {
|
|
4102
|
+
let n2 = e6 ? await Kc(e6, void 0, false, t2) : void 0, { _id: r2, categoryIds: i2, relatedPostIds: a2 } = n2 ?? await qc(void 0, false, t2) ?? {};
|
|
4097
4103
|
return { currentPostId: r2 ?? void 0, categoryIds: i2, relatedPostIds: n2 ? a2 : void 0 };
|
|
4098
4104
|
};
|
|
4099
|
-
var
|
|
4100
|
-
let { items: r2 } = await
|
|
4105
|
+
var $c = async ({ ids: e6, currentPostId: t2, limit: n2 }) => {
|
|
4106
|
+
let { items: r2 } = await uc({ fieldsets: Vc }).in(`_id`, e6).limit(n2).find(), i2 = new Map(r2.map((e7) => {
|
|
4101
4107
|
let { _id: t3 } = e7;
|
|
4102
4108
|
return [t3, e7];
|
|
4103
4109
|
}));
|
|
4104
4110
|
return e6.filter((e7) => e7 !== t2).map((e7) => i2.get(e7)).filter((e7) => e7 !== void 0).slice(0, n2);
|
|
4105
4111
|
};
|
|
4106
|
-
var
|
|
4107
|
-
let i2 =
|
|
4112
|
+
var el = async ({ currentPostId: e6, categoryIds: t2, language: n2, limit: r2 }) => {
|
|
4113
|
+
let i2 = uc({ fieldsets: Vc }).ne(`_id`, e6).descending(`firstPublishedDate`).limit(r2);
|
|
4108
4114
|
t2?.length && (i2 = i2.hasSome(`categoryIds`, t2)), n2 && (i2 = i2.eq(`language`, n2));
|
|
4109
4115
|
let { items: a2 } = await i2.find();
|
|
4110
4116
|
return a2;
|
|
4111
4117
|
};
|
|
4112
|
-
var
|
|
4113
|
-
let o2 =
|
|
4118
|
+
var tl = async ({ slug: e6, language: t2, limit: n2 = 3, propagateErrors: r2 = false, source: i2, sourcePromise: a2 }) => {
|
|
4119
|
+
let o2 = Yc();
|
|
4114
4120
|
try {
|
|
4115
|
-
let { currentPostId: r3, categoryIds: s2, relatedPostIds: c2 } = i2 ?? (a2 ? await a2 : await
|
|
4121
|
+
let { currentPostId: r3, categoryIds: s2, relatedPostIds: c2 } = i2 ?? (a2 ? await a2 : await Qc(e6, t2));
|
|
4116
4122
|
if (!r3) return { posts: [], authorsByMemberId: {}, categoryLabelsById: {}, videoSourcesByPostId: {} };
|
|
4117
|
-
let l2 = c2?.length ? await
|
|
4118
|
-
return { posts: u2, authorsByMemberId: d2, categoryLabelsById:
|
|
4123
|
+
let l2 = c2?.length ? await $c({ ids: c2, currentPostId: r3, limit: n2 }) : [], u2 = l2.length > 0 ? l2 : await el({ currentPostId: r3, categoryIds: s2, language: t2, limit: n2 }), [d2, f2, p2] = await Promise.all([Wc(u2), o2, Gc(u2)]);
|
|
4124
|
+
return { posts: u2, authorsByMemberId: d2, categoryLabelsById: Zc(u2, f2), videoSourcesByPostId: p2 };
|
|
4119
4125
|
} catch (e7) {
|
|
4120
4126
|
if (r2) throw e7;
|
|
4121
4127
|
return { posts: [], authorsByMemberId: {}, categoryLabelsById: {}, videoSourcesByPostId: {} };
|
|
4122
4128
|
}
|
|
4123
4129
|
};
|
|
4124
|
-
var
|
|
4125
|
-
var
|
|
4126
|
-
var
|
|
4127
|
-
var
|
|
4128
|
-
var
|
|
4129
|
-
var
|
|
4130
|
+
var nl = { newest: `FEED`, oldest: `PUBLISHED_DATE_ASC`, titleAsc: `TITLE_ASC`, titleDesc: `TITLE_DESC`, mostViewed: `VIEW_COUNT`, mostLiked: `LIKE_COUNT` };
|
|
4131
|
+
var rl = async (e6, { limit: t2, offset: n2 = 0, language: r2, sortOrder: i2 }) => e6.posts.length > 0 ? e6 : { ...e6, demoPosts: await mc({ paging: { limit: t2, offset: n2 }, fieldsets: Vc, ...r2 && { language: r2 }, ...i2 && { sort: nl[i2] } }) };
|
|
4132
|
+
var il = n({ isEditor: false, isPreview: false });
|
|
4133
|
+
var al = () => o(il);
|
|
4134
|
+
var ol = ({ isEditor: e6, isPreview: t2 }) => e6 && !t2;
|
|
4135
|
+
var sl = () => {
|
|
4130
4136
|
try {
|
|
4131
|
-
let { SSR: e6, SEO: t2 } = f(
|
|
4137
|
+
let { SSR: e6, SEO: t2 } = f(Gn);
|
|
4132
4138
|
return e6 || t2;
|
|
4133
4139
|
} catch {
|
|
4134
4140
|
return false;
|
|
4135
4141
|
}
|
|
4136
4142
|
};
|
|
4137
|
-
var
|
|
4138
|
-
let e6 =
|
|
4139
|
-
return al(
|
|
4143
|
+
var cl = () => {
|
|
4144
|
+
let e6 = sl();
|
|
4145
|
+
return ol(al()) && !e6;
|
|
4140
4146
|
};
|
|
4141
4147
|
g((e6, t2) => {
|
|
4142
4148
|
(function() {
|
|
@@ -4165,34 +4171,34 @@ g((e6, t2) => {
|
|
|
4165
4171
|
}) : window.classNames = n2;
|
|
4166
4172
|
})();
|
|
4167
4173
|
})();
|
|
4168
|
-
var
|
|
4169
|
-
var
|
|
4174
|
+
var ll = { post: `post`, feed: `feed`, relatedPosts: `related-posts`, comments: `comments`, seo: `seo`, likes: `likes` };
|
|
4175
|
+
var ul = (e6) => {
|
|
4170
4176
|
try {
|
|
4171
4177
|
return e6.getMonitoringClient?.() ?? null;
|
|
4172
4178
|
} catch {
|
|
4173
4179
|
return null;
|
|
4174
4180
|
}
|
|
4175
4181
|
};
|
|
4176
|
-
var
|
|
4177
|
-
function
|
|
4178
|
-
let s2 =
|
|
4182
|
+
var dl = (e6, t2) => e6 && typeof e6[t2] == `function` ? e6 : null;
|
|
4183
|
+
function fl(e6, t2, { feature: n2, action: r2, level: i2 = `error`, tags: a2, contexts: o2 }) {
|
|
4184
|
+
let s2 = dl(e6, `captureException`);
|
|
4179
4185
|
if (!s2) return;
|
|
4180
4186
|
let c2 = t2 instanceof Error ? t2 : Error(String(t2));
|
|
4181
4187
|
s2.captureException(c2, { level: i2, tags: { feature: n2, action: r2, ...a2 }, ...o2 ? { contexts: o2 } : {} });
|
|
4182
4188
|
}
|
|
4183
|
-
function
|
|
4184
|
-
let a2 =
|
|
4189
|
+
function pl(e6, t2, { feature: n2, tags: r2 }, i2) {
|
|
4190
|
+
let a2 = dl(e6, `startSpanManual`);
|
|
4185
4191
|
if (!a2) return i2;
|
|
4186
4192
|
let o2 = a2.startSpanManual({ name: t2, tags: { feature: n2, ...r2 } });
|
|
4187
4193
|
return i2.then(() => o2.end(), (e7) => o2.fail(e7 instanceof Error ? e7 : Error(String(e7)))), i2;
|
|
4188
4194
|
}
|
|
4189
|
-
var
|
|
4195
|
+
var ml = class extends e {
|
|
4190
4196
|
state = { error: void 0 };
|
|
4191
4197
|
static getDerivedStateFromError(e6) {
|
|
4192
4198
|
return { error: e6 ?? Error(`Unknown render error`) };
|
|
4193
4199
|
}
|
|
4194
4200
|
componentDidCatch(e6, t2) {
|
|
4195
|
-
|
|
4201
|
+
fl(this.props.monitoringClient, e6, { feature: this.props.feature, action: `render`, tags: this.props.component ? { component: this.props.component } : void 0, contexts: { react: { componentStack: t2.componentStack } } });
|
|
4196
4202
|
}
|
|
4197
4203
|
render() {
|
|
4198
4204
|
if (this.state.error === void 0) return this.props.children;
|
|
@@ -4200,205 +4206,205 @@ var pl = class extends e {
|
|
|
4200
4206
|
return this.props.fallback;
|
|
4201
4207
|
}
|
|
4202
4208
|
};
|
|
4203
|
-
var
|
|
4204
|
-
var
|
|
4205
|
-
function
|
|
4206
|
-
return o(
|
|
4209
|
+
var hl = (e6) => e6.then((e7) => ({ ...e7, fetchedAt: Date.now() }));
|
|
4210
|
+
var gl = n(void 0);
|
|
4211
|
+
function _l() {
|
|
4212
|
+
return o(gl);
|
|
4207
4213
|
}
|
|
4208
|
-
var
|
|
4209
|
-
function
|
|
4210
|
-
return o(
|
|
4214
|
+
var vl = n(void 0);
|
|
4215
|
+
function yl() {
|
|
4216
|
+
return o(vl);
|
|
4211
4217
|
}
|
|
4212
|
-
var
|
|
4213
|
-
var
|
|
4214
|
-
var
|
|
4215
|
-
var
|
|
4216
|
-
var
|
|
4217
|
-
var
|
|
4218
|
+
var bl = 6e4;
|
|
4219
|
+
var xl = bl * 60;
|
|
4220
|
+
var Sl = xl * 24;
|
|
4221
|
+
var Cl = Sl * 7;
|
|
4222
|
+
var wl = (e6) => e6 < bl ? [`second`, e6 / 1e3] : e6 < xl ? [`minute`, e6 / bl] : e6 < Sl ? [`hour`, e6 / xl] : [`day`, e6 / Sl];
|
|
4223
|
+
var Tl = (e6, t2, n2 = Date.now()) => {
|
|
4218
4224
|
let r2 = e6 instanceof Date ? e6 : new Date(e6), i2 = n2 - r2.getTime();
|
|
4219
|
-
if (i2 >= 0 && i2 <
|
|
4220
|
-
let [e7, n3] =
|
|
4225
|
+
if (i2 >= 0 && i2 < Cl) {
|
|
4226
|
+
let [e7, n3] = wl(i2);
|
|
4221
4227
|
return new Intl.RelativeTimeFormat(t2).format(-Math.round(n3), e7);
|
|
4222
4228
|
}
|
|
4223
4229
|
let a2 = r2.getFullYear() === new Date(n2).getFullYear();
|
|
4224
4230
|
return new Intl.DateTimeFormat(t2, { ...a2 ? {} : { year: `numeric` }, month: `short`, day: `numeric` }).format(r2);
|
|
4225
4231
|
};
|
|
4226
|
-
var
|
|
4227
|
-
var
|
|
4228
|
-
var
|
|
4232
|
+
var El = `https://static.wixstatic.com/media/`;
|
|
4233
|
+
var Dl = 100;
|
|
4234
|
+
var Ol = (e6, t2 = ``) => {
|
|
4229
4235
|
let n2 = e6?.profile?.photo;
|
|
4230
4236
|
if (!n2?.url) return;
|
|
4231
|
-
let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(
|
|
4232
|
-
return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width ||
|
|
4233
|
-
};
|
|
4234
|
-
var
|
|
4235
|
-
var
|
|
4236
|
-
var
|
|
4237
|
-
var
|
|
4238
|
-
var
|
|
4237
|
+
let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(El) ? n2.url.slice(35).split(/[?#]/)[0] : void 0);
|
|
4238
|
+
return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width || Dl, height: n2.height || Dl, alt: r2 ?? t2 };
|
|
4239
|
+
};
|
|
4240
|
+
var kl = `https://static.wixstatic.com/media/`;
|
|
4241
|
+
var Al = `wix:image://`;
|
|
4242
|
+
var jl = 1200;
|
|
4243
|
+
var Ml = 800;
|
|
4244
|
+
var Nl = (e6) => {
|
|
4239
4245
|
if (!e6) return;
|
|
4240
4246
|
let t2 = Number.parseInt(e6, 10);
|
|
4241
4247
|
return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
|
|
4242
4248
|
};
|
|
4243
|
-
var
|
|
4244
|
-
if (!e6.startsWith(
|
|
4249
|
+
var Pl = (e6) => {
|
|
4250
|
+
if (!e6.startsWith(Al)) {
|
|
4245
4251
|
let t3 = e6.split(/[?#]/)[0];
|
|
4246
4252
|
return t3 ? { uri: t3 } : void 0;
|
|
4247
4253
|
}
|
|
4248
4254
|
let [t2, n2] = e6.slice(12).split(`#`), [, r2, i2] = t2.split(`/`).filter(Boolean);
|
|
4249
4255
|
if (!r2) return;
|
|
4250
4256
|
let a2 = new URLSearchParams(n2 ?? ``);
|
|
4251
|
-
return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width:
|
|
4257
|
+
return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width: Nl(a2.get(`originWidth`)), height: Nl(a2.get(`originHeight`)) };
|
|
4252
4258
|
};
|
|
4253
|
-
var
|
|
4259
|
+
var Fl = (e6, t2) => {
|
|
4254
4260
|
if (!e6) return;
|
|
4255
|
-
let n2 =
|
|
4261
|
+
let n2 = Pl(e6);
|
|
4256
4262
|
if (!n2) return;
|
|
4257
4263
|
let r2 = n2.name ?? n2.uri;
|
|
4258
|
-
return { uri: n2.uri, url: `${
|
|
4264
|
+
return { uri: n2.uri, url: `${kl}${n2.uri}`, name: r2, width: n2.width ?? jl, height: n2.height ?? Ml, alt: t2 ?? r2 };
|
|
4259
4265
|
};
|
|
4260
|
-
var
|
|
4266
|
+
var Il = (e6) => {
|
|
4261
4267
|
let t2 = e6?.media?.wixMedia?.image;
|
|
4262
4268
|
if (!t2) return;
|
|
4263
|
-
let n2 =
|
|
4269
|
+
let n2 = Pl(t2);
|
|
4264
4270
|
if (!n2) return;
|
|
4265
4271
|
let r2 = n2.name ?? n2.uri;
|
|
4266
|
-
return { uri: n2.uri, url: `${
|
|
4272
|
+
return { uri: n2.uri, url: `${kl}${n2.uri}`, name: r2, width: n2.width ?? jl, height: n2.height ?? Ml, alt: e6?.media?.altText ?? e6?.title ?? r2 };
|
|
4267
4273
|
};
|
|
4268
|
-
var
|
|
4269
|
-
var
|
|
4270
|
-
var
|
|
4274
|
+
var Ll = `https://static.wixstatic.com/media/`;
|
|
4275
|
+
var Rl = `wix:video://`;
|
|
4276
|
+
var zl = (e6) => {
|
|
4271
4277
|
if (!e6) return;
|
|
4272
4278
|
let t2 = Number.parseInt(e6, 10);
|
|
4273
4279
|
return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
|
|
4274
4280
|
};
|
|
4275
|
-
var
|
|
4276
|
-
if (!e6.startsWith(
|
|
4281
|
+
var Bl = (e6) => {
|
|
4282
|
+
if (!e6.startsWith(Rl)) return;
|
|
4277
4283
|
let [t2, n2] = e6.slice(12).split(`#`), [, r2] = t2.split(`/`).filter(Boolean);
|
|
4278
4284
|
if (!r2) return;
|
|
4279
4285
|
let i2 = new URLSearchParams(n2 ?? ``), a2 = i2.get(`posterUri`);
|
|
4280
|
-
return { id: decodeURIComponent(r2), posterUrl: a2 ? `${
|
|
4286
|
+
return { id: decodeURIComponent(r2), posterUrl: a2 ? `${Ll}${a2}` : void 0, posterWidth: zl(i2.get(`posterWidth`)), posterHeight: zl(i2.get(`posterHeight`)) };
|
|
4281
4287
|
};
|
|
4282
|
-
var
|
|
4283
|
-
var
|
|
4284
|
-
var
|
|
4288
|
+
var Vl = [/https?:\/\/(?:www\.|m\.)?youtube\.com\/watch\?(?:[^#]*&)?v=([\w-]+)/i, /https?:\/\/(?:www\.)?youtube\.com\/embed\/([\w-]+)/i, /https?:\/\/youtu\.be\/([\w-]+)/i];
|
|
4289
|
+
var Hl = [/https?:\/\/player\.vimeo\.com\/video\/(\d+)/i, /https?:\/\/vimeo\.com\/(\d+)/i];
|
|
4290
|
+
var Ul = (e6, t2) => {
|
|
4285
4291
|
for (let n2 of e6) {
|
|
4286
4292
|
let e7 = n2.exec(t2);
|
|
4287
4293
|
if (e7) return e7[1];
|
|
4288
4294
|
}
|
|
4289
4295
|
};
|
|
4290
|
-
var
|
|
4291
|
-
let t2 =
|
|
4296
|
+
var Wl = (e6) => {
|
|
4297
|
+
let t2 = Ul(Vl, e6);
|
|
4292
4298
|
if (t2) return { provider: `youtube`, embedUrl: `https://www.youtube.com/embed/${t2}?autoplay=1` };
|
|
4293
|
-
let n2 = Hl
|
|
4299
|
+
let n2 = Ul(Hl, e6);
|
|
4294
4300
|
return n2 ? { provider: `vimeo`, embedUrl: `https://player.vimeo.com/video/${n2}?autoplay=1` } : { provider: `unknown` };
|
|
4295
4301
|
};
|
|
4296
|
-
var
|
|
4302
|
+
var Gl = (e6, t2 = []) => {
|
|
4297
4303
|
let n2 = e6?.media;
|
|
4298
4304
|
if (!n2 || n2.displayed === false) return;
|
|
4299
|
-
let r2 =
|
|
4305
|
+
let r2 = Il(e6);
|
|
4300
4306
|
if (r2) return { kind: `image`, image: r2 };
|
|
4301
|
-
let i2 = n2.altText ?? e6?.title ?? ``, a2 = n2.wixMedia?.videoV2 ?
|
|
4307
|
+
let i2 = n2.altText ?? e6?.title ?? ``, a2 = n2.wixMedia?.videoV2 ? Bl(n2.wixMedia.videoV2) : void 0;
|
|
4302
4308
|
if (a2) return { kind: `wixVideo`, ...a2, sources: t2, altText: i2 };
|
|
4303
4309
|
let o2 = n2.embedMedia?.video?.url;
|
|
4304
4310
|
if (o2) {
|
|
4305
4311
|
let { thumbnail: e7 } = n2.embedMedia ?? {};
|
|
4306
|
-
return { kind: `embed`, videoUrl: o2, ...
|
|
4312
|
+
return { kind: `embed`, videoUrl: o2, ...Wl(o2), thumbnailUrl: e7?.url, thumbnailWidth: e7?.width, thumbnailHeight: e7?.height, altText: i2 };
|
|
4307
4313
|
}
|
|
4308
4314
|
};
|
|
4309
|
-
var
|
|
4310
|
-
let t2 =
|
|
4315
|
+
var Kl = (e6) => {
|
|
4316
|
+
let t2 = Il(e6), n2 = e6?.media?.wixMedia?.videoV2;
|
|
4311
4317
|
if (t2 || !n2) return t2;
|
|
4312
|
-
let r2 =
|
|
4318
|
+
let r2 = Bl(n2), i2 = Fl(r2?.posterUrl?.slice(35), e6?.media?.altText ?? e6?.title);
|
|
4313
4319
|
return i2 && { ...i2, width: r2?.posterWidth ?? i2.width, height: r2?.posterHeight ?? i2.height };
|
|
4314
4320
|
};
|
|
4315
|
-
var
|
|
4316
|
-
var
|
|
4317
|
-
var
|
|
4318
|
-
var
|
|
4321
|
+
var ql = `2026-05-12T12:00:00.000Z`;
|
|
4322
|
+
var Jl = (e6) => ({ href: e6 ?? `#`, target: `_self` });
|
|
4323
|
+
var Yl = (e6) => `https://static.wixstatic.com/media/${e6}/v1/fit/w_1200,h_1200,al_c,q_85/cover.jpg`;
|
|
4324
|
+
var Xl = (e6) => {
|
|
4319
4325
|
if (!e6) return;
|
|
4320
4326
|
let t2 = e6 instanceof Date ? e6 : new Date(e6);
|
|
4321
4327
|
return Number.isFinite(t2.getTime()) ? t2.toISOString() : void 0;
|
|
4322
4328
|
};
|
|
4323
|
-
var
|
|
4324
|
-
var
|
|
4325
|
-
var Q = (e6) => ({ text: e6, html: `<p>${
|
|
4329
|
+
var Zl = (e6) => typeof e6 == `number` && e6 > 0 ? e6 : void 0;
|
|
4330
|
+
var Ql = (e6) => e6.replace(/&/g, `&`).replace(/</g, `<`).replace(/>/g, `>`).replace(/"/g, `"`).replace(/'/g, `'`);
|
|
4331
|
+
var Q = (e6) => ({ text: e6, html: `<p>${Ql(e6)}</p>`, linkList: [] });
|
|
4326
4332
|
var $ = { minutesToRead: 5, views: 120, comments: 4 };
|
|
4327
|
-
var
|
|
4333
|
+
var $l = (e6) => {
|
|
4328
4334
|
let { metrics: t2 } = e6;
|
|
4329
4335
|
return { views: typeof t2?.views == `number` ? t2.views : void 0, comments: typeof t2?.comments == `number` ? t2.comments : void 0 };
|
|
4330
4336
|
};
|
|
4331
|
-
var
|
|
4332
|
-
var
|
|
4337
|
+
var eu = (e6, t2, n2, r2) => Q(e6 === void 0 ? n2 ? r2(t2) : `` : r2(e6));
|
|
4338
|
+
var tu = (e6, t2, n2, r2) => {
|
|
4333
4339
|
let i2 = e6.categoryIds?.map((e7) => t2[e7]).find(Boolean);
|
|
4334
4340
|
return Q(i2 ?? (n2 ? r2.canvas.category() : ``));
|
|
4335
4341
|
};
|
|
4336
|
-
var
|
|
4337
|
-
let { _id: l2, memberId: u2 } = e6, d2 = u2 ? i2[u2] : void 0, f2 =
|
|
4338
|
-
return { _id: l2 ?? e6.slug ?? ``, title: e6.title ?? ``, itemTitle: Q(e6.title ?? ``), itemExcerpt: Q(e6.excerpt ?? ``), itemCoverImage:
|
|
4339
|
-
};
|
|
4340
|
-
var nu = 3;
|
|
4341
|
-
var ru = [{ uri: `728f9d_a03266fe4a4d4651b9aa06077eef5d9c~mv2.png`, width: 2304, height: 1728 }, { uri: `728f9d_635778e429524b59856cb2a18ed0d4f8~mv2.jpg`, width: 2624, height: 1472 }, { uri: `728f9d_d6071d5e8a0544098238188bae67e5e4~mv2.png`, width: 2304, height: 1728 }];
|
|
4342
|
-
var iu = (e6, t2) => {
|
|
4343
|
-
let { uri: n2, width: r2, height: i2 } = ru[e6 % ru.length];
|
|
4344
|
-
return { uri: n2, url: Jl(n2), name: n2, width: r2, height: i2, alt: t2 };
|
|
4342
|
+
var nu = (e6, t2, n2, r2, i2 = {}, a2 = {}, o2 = false, s2 = {}, c2 = Date.now()) => {
|
|
4343
|
+
let { _id: l2, memberId: u2 } = e6, d2 = u2 ? i2[u2] : void 0, f2 = $l(e6);
|
|
4344
|
+
return { _id: l2 ?? e6.slug ?? ``, title: e6.title ?? ``, itemTitle: Q(e6.title ?? ``), itemExcerpt: Q(e6.excerpt ?? ``), itemCoverImage: Kl(e6), itemCoverMedia: Gl(e6, s2[l2 ?? ``] ?? []), itemLink: or(e6, r2), itemPublishedDate: Q(Tl(e6.firstPublishedDate ?? new Date(c2), n2, c2)), publishedDateValue: Xl(e6.firstPublishedDate), clockValue: c2, minutesToReadValue: Zl(e6.minutesToRead), initialViewCount: f2.views ?? (o2 ? $.views : void 0), initialCommentCount: f2.comments ?? (o2 ? $.comments : void 0), authorName: Q(d2?.profile?.nickname ?? ``), authorImage: Ol(d2, t2.canvas.authorPhotoAlt()), timeToRead: Q(typeof e6.minutesToRead == `number` && e6.minutesToRead > 0 ? t2.timeToRead(e6.minutesToRead) : ``), viewCount: eu(f2.views, $.views, o2, t2.viewCount), commentCount: eu(f2.comments, $.comments, o2, t2.commentCount), itemCategoryLabel: tu(e6, a2, o2, t2), recentPostItem: { title: e6.title ?? ``, slug: e6.slug ?? `` }, commentingEnabled: e6.commentingEnabled };
|
|
4345
4345
|
};
|
|
4346
|
+
var ru = 3;
|
|
4347
|
+
var iu = [{ uri: `728f9d_a03266fe4a4d4651b9aa06077eef5d9c~mv2.png`, width: 2304, height: 1728 }, { uri: `728f9d_635778e429524b59856cb2a18ed0d4f8~mv2.jpg`, width: 2624, height: 1472 }, { uri: `728f9d_d6071d5e8a0544098238188bae67e5e4~mv2.png`, width: 2304, height: 1728 }];
|
|
4346
4348
|
var au = (e6, t2) => {
|
|
4347
|
-
let { uri: n2 } =
|
|
4348
|
-
return { uri: n2, url:
|
|
4349
|
+
let { uri: n2, width: r2, height: i2 } = iu[e6 % iu.length];
|
|
4350
|
+
return { uri: n2, url: Yl(n2), name: n2, width: r2, height: i2, alt: t2 };
|
|
4351
|
+
};
|
|
4352
|
+
var ou = (e6, t2) => {
|
|
4353
|
+
let { uri: n2 } = iu[(e6 + 1) % iu.length];
|
|
4354
|
+
return { uri: n2, url: Yl(n2), name: n2, width: 100, height: 100, alt: t2 };
|
|
4349
4355
|
};
|
|
4350
|
-
var
|
|
4351
|
-
let o2 = e6.canvas.postTitle(), s2 =
|
|
4352
|
-
return { _id: `placeholder-${a2}`, title: o2, itemTitle: Q(o2), itemExcerpt: Q(e6.canvas.excerpt()), itemCoverImage: s2, itemCoverMedia: { kind: `image`, image: s2 }, itemLink:
|
|
4356
|
+
var su = (e6, t2, n2, r2 = Date.now()) => Array.from({ length: ru }, (i2, a2) => {
|
|
4357
|
+
let o2 = e6.canvas.postTitle(), s2 = au(a2, e6.canvas.coverAlt());
|
|
4358
|
+
return { _id: `placeholder-${a2}`, title: o2, itemTitle: Q(o2), itemExcerpt: Q(e6.canvas.excerpt()), itemCoverImage: s2, itemCoverMedia: { kind: `image`, image: s2 }, itemLink: Jl(n2), itemPublishedDate: Q(Tl(new Date(r2), t2, r2)), publishedDateValue: ql, clockValue: r2, minutesToReadValue: $.minutesToRead, initialViewCount: $.views, initialCommentCount: $.comments, authorName: Q(e6.canvas.authorName()), authorImage: ou(a2, e6.canvas.authorPhotoAlt()), timeToRead: Q(e6.timeToRead($.minutesToRead)), viewCount: Q(e6.viewCount($.views)), commentCount: Q(e6.commentCount($.comments)), itemCategoryLabel: Q(e6.canvas.category()), recentPostItem: { title: o2, slug: `` }, commentingEnabled: void 0 };
|
|
4353
4359
|
});
|
|
4354
|
-
var
|
|
4355
|
-
function
|
|
4356
|
-
let e6 = o(
|
|
4360
|
+
var cu = n(void 0);
|
|
4361
|
+
function lu() {
|
|
4362
|
+
let e6 = o(cu);
|
|
4357
4363
|
if (!e6) throw Error(`useRelatedPostsContext must be used within a RelatedPostsProvider`);
|
|
4358
4364
|
return e6;
|
|
4359
4365
|
}
|
|
4360
|
-
var
|
|
4361
|
-
var
|
|
4362
|
-
var
|
|
4363
|
-
var
|
|
4364
|
-
var
|
|
4366
|
+
var uu = 3;
|
|
4367
|
+
var du = (e6) => typeof e6 == `number` && Number.isFinite(e6) && e6 >= 1 ? Math.min(Math.floor(e6), 12) : uu;
|
|
4368
|
+
var fu = 2e3;
|
|
4369
|
+
var pu = /* @__PURE__ */ new WeakMap();
|
|
4370
|
+
var mu = (e6, t2, n2) => {
|
|
4365
4371
|
if (!e6) return n2();
|
|
4366
|
-
let r2 =
|
|
4367
|
-
r2 || (r2 = /* @__PURE__ */ new Map(),
|
|
4372
|
+
let r2 = pu.get(e6);
|
|
4373
|
+
r2 || (r2 = /* @__PURE__ */ new Map(), pu.set(e6, r2));
|
|
4368
4374
|
let i2 = r2.get(t2);
|
|
4369
4375
|
if (i2) return i2;
|
|
4370
4376
|
let a2 = n2();
|
|
4371
4377
|
return r2.set(t2, a2), a2;
|
|
4372
4378
|
};
|
|
4373
|
-
var
|
|
4374
|
-
var
|
|
4375
|
-
var
|
|
4376
|
-
var
|
|
4377
|
-
var
|
|
4379
|
+
var hu = { relatedPosts: [], emptyState: null, isLoadingRelatedPosts: true, hasError: false, hasRelatedPosts: false };
|
|
4380
|
+
var gu = { ...hu, isLoadingRelatedPosts: false, hasError: true };
|
|
4381
|
+
var _u = (e6) => ({ strip: e6, hasError: false });
|
|
4382
|
+
var vu = () => ({ strip: { posts: [], authorsByMemberId: {}, categoryLabelsById: {}, videoSourcesByPostId: {}, fetchedAt: Date.now() }, hasError: true });
|
|
4383
|
+
var yu = (e6) => {
|
|
4378
4384
|
throw e6;
|
|
4379
4385
|
};
|
|
4380
|
-
var
|
|
4381
|
-
let { strip: { posts: i2, authorsByMemberId: a2, categoryLabelsById: o2, videoSourcesByPostId: s2, fetchedAt: l2, demoPosts: u2 }, hasError: d2 } =
|
|
4382
|
-
let e7 = (i2.length === 0 && m2 ? u2 ?? [] : i2).map((e8) =>
|
|
4386
|
+
var bu = ({ children: e6, stripLoadPromise: t2, slug: n2, language: r2 }) => {
|
|
4387
|
+
let { strip: { posts: i2, authorsByMemberId: a2, categoryLabelsById: o2, videoSourcesByPostId: s2, fetchedAt: l2, demoPosts: u2 }, hasError: d2 } = Bn(t2), f2 = Wn(l2), m2 = cl(), h2 = sr(n2), { t: g2 } = wo(), _2 = _r(), v2 = c(() => rs(g2, _2), [g2, _2]), y2 = c(() => {
|
|
4388
|
+
let e7 = (i2.length === 0 && m2 ? u2 ?? [] : i2).map((e8) => nu(e8, v2, _2, h2, a2, o2, m2, s2, f2)), t3 = e7.length === 0 && m2 ? su(v2, _2, h2, f2) : e7;
|
|
4383
4389
|
return { relatedPosts: t3, emptyState: i2.length === 0 && !d2 ? v2.noRelatedPostsEmptyState() : null, isLoadingRelatedPosts: false, hasError: d2, hasRelatedPosts: t3.length > 0 };
|
|
4384
4390
|
}, [i2, u2, a2, o2, s2, v2, _2, r2, h2, m2, f2, d2]);
|
|
4385
|
-
return
|
|
4391
|
+
return fr(ur.relatedPostsProvider, d2 ? `error` : i2.length > 0 ? `data` : `empty`), p(cu.Provider, { value: y2, children: e6 });
|
|
4386
4392
|
};
|
|
4387
|
-
function
|
|
4388
|
-
let r2 =
|
|
4393
|
+
function xu({ children: e6, postsCount: n2 }) {
|
|
4394
|
+
let r2 = lr(), i2 = hr(), a2 = Kn(), o2 = du(n2), s2 = cl(), l2 = _l(), u2 = yl(), d2 = yr(), f2 = c(() => ul(Rn), []), { i18n: h2, locale: g2 } = qo(ts), _2 = Jn(() => {
|
|
4389
4395
|
let e7 = `blog-builder:related:${JSON.stringify({ slug: r2 ?? ``, language: i2 ?? ``, limit: o2, ...u2 && { postId: u2 } })}`;
|
|
4390
|
-
return { slug: r2, language: i2, stripLoadPromise:
|
|
4391
|
-
let e8 =
|
|
4392
|
-
return
|
|
4393
|
-
} })),
|
|
4396
|
+
return { slug: r2, language: i2, stripLoadPromise: Hn(mu(l2, e7, () => Po({ key: e7, warmupData: d2, fetchData: () => {
|
|
4397
|
+
let e8 = tl({ slug: r2, language: i2, limit: o2, propagateErrors: true, sourcePromise: l2 }).then((e9) => s2 ? rl(e9, { limit: o2, language: i2 }) : e9);
|
|
4398
|
+
return hl(pl(f2, `related-posts-read`, { feature: ll.relatedPosts, tags: { limit: o2 } }, a2 ? Bc(e8, fu, `related-posts`) : e8));
|
|
4399
|
+
} })), _u, a2 ? yu : vu) };
|
|
4394
4400
|
}, [r2, i2, a2, s2, l2, d2, o2, f2, u2]);
|
|
4395
|
-
return p(
|
|
4401
|
+
return p(To, { i18n: h2, children: m(t, { fallback: p(cu.Provider, { value: hu, children: e6 }), children: [p(Ko, { i18n: h2, locale: g2 }), p(ml, { fallback: p(cu.Provider, { value: gu, children: e6 }), feature: ll.relatedPosts, monitoringClient: f2, rethrow: a2, children: p(bu, { stripLoadPromise: _2.stripLoadPromise, slug: _2.slug, language: _2.language, children: e6 }, `${_2.language ?? ``}|${_2.slug ?? ``}`) })] }) });
|
|
4396
4402
|
}
|
|
4397
|
-
var
|
|
4403
|
+
var Su = jn(`7d10ae29-fb0a-4361-8bc0-c3b8a3b96e34`);
|
|
4398
4404
|
export {
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4405
|
+
xu as RelatedPostsProvider,
|
|
4406
|
+
xu as default,
|
|
4407
|
+
Su as injectAccessTokenGetter,
|
|
4408
|
+
lu as useRelatedPostsContext
|
|
4403
4409
|
};
|
|
4404
4410
|
//# sourceMappingURL=context-related-posts.mjs.map
|