@jmp-technologies/analytics 0.1.36 → 0.1.38
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/README.md +1 -1
- package/dist/astro/client.cjs +83 -42
- package/dist/astro/client.cjs.map +1 -1
- package/dist/astro/client.d.cts +2 -2
- package/dist/astro/client.d.ts +2 -2
- package/dist/astro/client.js +2 -2
- package/dist/astro/content.cjs +137 -70
- package/dist/astro/content.cjs.map +1 -1
- package/dist/astro/content.d.cts +5 -4
- package/dist/astro/content.d.ts +5 -4
- package/dist/astro/content.js +5 -3
- package/dist/astro/integration.cjs +104 -66
- package/dist/astro/integration.cjs.map +1 -1
- package/dist/astro/integration.js +3 -3
- package/dist/astro/middleware.cjs +96 -66
- package/dist/astro/middleware.cjs.map +1 -1
- package/dist/astro/middleware.d.cts +2 -2
- package/dist/astro/middleware.d.ts +2 -2
- package/dist/astro/middleware.js +2 -2
- package/dist/astro/register.cjs +104 -66
- package/dist/astro/register.cjs.map +1 -1
- package/dist/astro/register.js +3 -3
- package/dist/{chunk-AIFJ7DVO.js → chunk-6WQMWPEY.js} +196 -105
- package/dist/chunk-6WQMWPEY.js.map +1 -0
- package/dist/{chunk-YFG3AQ35.js → chunk-EBU4DKHW.js} +47 -9
- package/dist/chunk-EBU4DKHW.js.map +1 -0
- package/dist/{chunk-AGGLRTUQ.js → chunk-JVFN7MF2.js} +2 -2
- package/dist/{chunk-3ZEMXII6.js → chunk-NCF3J4HV.js} +3 -3
- package/dist/{chunk-HFLU7HQE.js → chunk-ONIPLMOY.js} +2 -2
- package/dist/{chunk-NAQU6RAE.js → chunk-PQOTEV6O.js} +3 -3
- package/dist/{chunk-RNZTKIC6.js → chunk-WHUHCTBQ.js} +16 -3
- package/dist/chunk-WHUHCTBQ.js.map +1 -0
- package/dist/{create-jmp-analytics-Bz0-K0Af.d.cts → create-jmp-analytics-DMSXmVIH.d.cts} +1 -1
- package/dist/{create-jmp-analytics-DRjrlWUn.d.ts → create-jmp-analytics-JZ3pqNBQ.d.ts} +1 -1
- package/dist/index.cjs +145 -76
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -6
- package/dist/index.d.ts +10 -6
- package/dist/index.js +6 -2
- package/dist/next/content.cjs +138 -70
- package/dist/next/content.cjs.map +1 -1
- package/dist/next/content.d.cts +5 -4
- package/dist/next/content.d.ts +5 -4
- package/dist/next/content.js +6 -3
- package/dist/next/content.js.map +1 -1
- package/dist/next/instrumentation.cjs +104 -66
- package/dist/next/instrumentation.cjs.map +1 -1
- package/dist/next/instrumentation.js +2 -2
- package/dist/next/landing-pages.cjs +155 -129
- package/dist/next/landing-pages.cjs.map +1 -1
- package/dist/next/landing-pages.d.cts +2 -2
- package/dist/next/landing-pages.d.ts +2 -2
- package/dist/next/landing-pages.js +7 -8
- package/dist/next/landing-pages.js.map +1 -1
- package/dist/next/locations.cjs +114 -88
- package/dist/next/locations.cjs.map +1 -1
- package/dist/next/locations.d.cts +2 -2
- package/dist/next/locations.d.ts +2 -2
- package/dist/next/locations.js +7 -8
- package/dist/next/locations.js.map +1 -1
- package/dist/next/middleware.cjs +96 -66
- package/dist/next/middleware.cjs.map +1 -1
- package/dist/next/middleware.d.cts +2 -2
- package/dist/next/middleware.d.ts +2 -2
- package/dist/next/middleware.js +2 -2
- package/dist/next/site-root-server.cjs +103 -69
- package/dist/next/site-root-server.cjs.map +1 -1
- package/dist/next/site-root-server.js +4 -4
- package/dist/next.cjs +37 -2
- package/dist/next.cjs.map +1 -1
- package/dist/next.d.cts +3 -3
- package/dist/next.d.ts +3 -3
- package/dist/next.js +4 -4
- package/dist/react.cjs +88 -53
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +3 -3
- package/dist/{site-config-Cgq67uQ1.d.cts → site-config-BLnwuRC2.d.ts} +9 -3
- package/dist/{site-config-BxEmJxBB.d.ts → site-config-BZJS8Hp_.d.cts} +9 -3
- package/dist/{track-page-view-BCX1Dsfk.d.cts → track-page-view-BJQqn2Bg.d.cts} +1 -1
- package/dist/{track-page-view-74Su6lQY.d.ts → track-page-view-DGKRUIxm.d.ts} +1 -1
- package/dist/{types-yNgoakwk.d.ts → types-CYrgEwUF.d.cts} +16 -2
- package/dist/{types-yNgoakwk.d.cts → types-CYrgEwUF.d.ts} +16 -2
- package/dist/{utils-BLoWWfSw.d.ts → utils-B1Nt3sBU.d.ts} +1 -1
- package/dist/{utils-UPTIdK1D.d.cts → utils-U6TGMIAB.d.cts} +1 -1
- package/docs/legal-and-privacy.md +2 -2
- package/package.json +1 -1
- package/dist/chunk-AIFJ7DVO.js.map +0 -1
- package/dist/chunk-RI3KKDPX.js +0 -75
- package/dist/chunk-RI3KKDPX.js.map +0 -1
- package/dist/chunk-RNZTKIC6.js.map +0 -1
- package/dist/chunk-YFG3AQ35.js.map +0 -1
- /package/dist/{chunk-AGGLRTUQ.js.map → chunk-JVFN7MF2.js.map} +0 -0
- /package/dist/{chunk-3ZEMXII6.js.map → chunk-NCF3J4HV.js.map} +0 -0
- /package/dist/{chunk-HFLU7HQE.js.map → chunk-ONIPLMOY.js.map} +0 -0
- /package/dist/{chunk-NAQU6RAE.js.map → chunk-PQOTEV6O.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export { b as buildLandingCaptureInlineScript } from './landing-capture-C8pyZWuF.cjs';
|
|
2
|
-
import { J as JmpAnalytics } from './create-jmp-analytics-
|
|
3
|
-
export { B as BOOKING_LINK_HOSTS, C as ClassifiedContactLink, b as ContactLinkChannel, c as classifyContactHref, d as createJmpAnalytics, i as isJmpTrackingConsentGranted, s as setJmpTrackingConsent, a as subscribeJmpTrackingConsent } from './create-jmp-analytics-
|
|
4
|
-
import { n as JmpContentConfig,
|
|
5
|
-
export {
|
|
2
|
+
import { J as JmpAnalytics } from './create-jmp-analytics-DMSXmVIH.cjs';
|
|
3
|
+
export { B as BOOKING_LINK_HOSTS, C as ClassifiedContactLink, b as ContactLinkChannel, c as classifyContactHref, d as createJmpAnalytics, i as isJmpTrackingConsentGranted, s as setJmpTrackingConsent, a as subscribeJmpTrackingConsent } from './create-jmp-analytics-DMSXmVIH.cjs';
|
|
4
|
+
import { n as JmpContentConfig, t as TrackServerPageViewOptions, j as JmpTrustBundle, m as JmpContentWrapper, d as JmpLandingPageKind, b as JmpLandingPage, c as JmpLandingPageDetail, g as JmpPopularPagesResult, J as JmpBlogPost, u as JmpBlogPostDetail, v as JmpFaqItemDetail, a as JmpFaqItem, e as JmpLandingPageSitemapEntry, f as JmpLegalDocument, l as JmpWebsiteLocationDetail, k as JmpWebsiteLocation, h as JmpSiteProfile, q as JmpAnalyticsConfig } from './types-CYrgEwUF.cjs';
|
|
5
|
+
export { w as JmpContactExtraManifest, x as JmpContentLocaleAlternate, o as JmpContentManifest, y as JmpContentRouteManifest, z as JmpContentWrapperReportMode, A as JmpCredential, r as JmpEventType, B as JmpPartnerLogo, C as JmpPopularPage, p as JmpServerRequestLike, i as JmpTestimonial, D as JmpTrustBlockManifest, E as JmpTrustSection, F as JmpTrustStat, G as JmpTrustSummary, L as LeadMetadata, H as LeadMetadataValue, s as TrackLeadOptions, T as TrackPageViewOptions, I as normalizeJmpContentManifest, K as stableJmpManifestFingerprint } from './types-CYrgEwUF.cjs';
|
|
6
6
|
export { J as JmpPublicEnv, r as readJmpPublicEnvFromProcess } from './env-public-B6Y0DG68.cjs';
|
|
7
|
-
export { a as JmpSiteContactFallback, b as JmpSiteDefinition, d as defineJmpSite, g as getJmpContentConfig, c as getJmpSiteDefinition } from './site-config-
|
|
7
|
+
export { a as JmpSiteContactFallback, b as JmpSiteDefinition, d as defineJmpSite, g as getJmpContentConfig, c as getJmpSiteDefinition } from './site-config-BZJS8Hp_.cjs';
|
|
8
8
|
|
|
9
9
|
/** Published package version — sent with capabilities for admin readiness. */
|
|
10
10
|
declare const JMP_ANALYTICS_SDK_VERSION: string;
|
|
@@ -28,6 +28,8 @@ declare function getJmpBlogPostDetail(config: JmpContentConfig, slug: string, lo
|
|
|
28
28
|
declare function getJmpFaqs(config: JmpContentConfig, filters?: {
|
|
29
29
|
locale?: string;
|
|
30
30
|
}): Promise<JmpFaqItem[]>;
|
|
31
|
+
declare function getJmpLegalDocument(config: JmpContentConfig, slug: string): Promise<JmpLegalDocument | null>;
|
|
32
|
+
declare function getJmpLegalDocuments(config: JmpContentConfig): Promise<JmpLegalDocument[]>;
|
|
31
33
|
declare function getJmpFaqDetail(config: JmpContentConfig, slug: string, locale?: string): Promise<JmpFaqItemDetail | null>;
|
|
32
34
|
declare function getJmpLandingPages(config: JmpContentConfig, filters?: {
|
|
33
35
|
kind?: JmpLandingPageKind;
|
|
@@ -66,6 +68,8 @@ declare function createJmpContentClient(config: JmpContentConfig): {
|
|
|
66
68
|
getFaqs: (filters?: {
|
|
67
69
|
locale?: string;
|
|
68
70
|
}) => Promise<JmpFaqItem[]>;
|
|
71
|
+
getLegalDocument: (slug: string) => Promise<JmpLegalDocument | null>;
|
|
72
|
+
getLegalDocuments: () => Promise<JmpLegalDocument[]>;
|
|
69
73
|
getLandingPages: (filters?: Parameters<typeof getJmpLandingPages>[1]) => Promise<JmpLandingPage[]>;
|
|
70
74
|
getLandingPageDetail: (kind: Parameters<typeof getJmpLandingPageDetail>[1], slug: string, locale?: string) => Promise<JmpLandingPageDetail | null>;
|
|
71
75
|
getLandingPageSitemap: () => Promise<JmpLandingPageSitemapEntry[]>;
|
|
@@ -107,4 +111,4 @@ declare function getOrCreateJmpAnalyticsFromBrowserEnv(overrides?: Partial<JmpAn
|
|
|
107
111
|
*/
|
|
108
112
|
declare function createJmpContentClientFromServerEnv(overrides?: Partial<JmpContentConfig>): JmpContentClient | null;
|
|
109
113
|
|
|
110
|
-
export { DEFAULT_JMP_BROWSER_PAGE_VIEW_DEDUPE_MS, JMP_ANALYTICS_SDK_VERSION, JMP_TRACKING_CONSENT_STORAGE_KEY, JmpAnalytics, JmpAnalyticsConfig, JmpBlogPost, JmpBlogPostDetail, type JmpContentClient, JmpContentConfig, JmpContentWrapper, JmpFaqItem, JmpFaqItemDetail, JmpLandingPage, JmpLandingPageDetail, JmpLandingPageKind, JmpLandingPageSitemapEntry, JmpPopularPagesResult, JmpSiteProfile, JmpTrustBundle, JmpWebsiteLocation, JmpWebsiteLocationDetail, TrackServerPageViewOptions, createJmpContentClient, createJmpContentClientFromServerEnv, getDiscoveredContentWrappers, getJmpBlogPost, getJmpBlogPostDetail, getJmpBlogPosts, getJmpBrowserAnalyticsConfigFromEnv, getJmpFaqDetail, getJmpFaqs, getJmpLandingPageDetail, getJmpLandingPageSitemap, getJmpLandingPages, getJmpLocationDetail, getJmpLocations, getJmpPopularPages, getJmpRobotsTxt, getJmpServerContentConfigFromEnv, getJmpSiteProfile, getJmpTrustBundle, getOrCreateJmpAnalyticsFromBrowserEnv, inferTrustWrapperSlots, isJmpBrowserAnalyticsEnvConfigured, isJmpServerContentEnvConfigured, markContentWrapper, registerJmpContentWrappers, resetContentWrapperDiscoveryForTests, trackJmpServerPageView };
|
|
114
|
+
export { DEFAULT_JMP_BROWSER_PAGE_VIEW_DEDUPE_MS, JMP_ANALYTICS_SDK_VERSION, JMP_TRACKING_CONSENT_STORAGE_KEY, JmpAnalytics, JmpAnalyticsConfig, JmpBlogPost, JmpBlogPostDetail, type JmpContentClient, JmpContentConfig, JmpContentWrapper, JmpFaqItem, JmpFaqItemDetail, JmpLandingPage, JmpLandingPageDetail, JmpLandingPageKind, JmpLandingPageSitemapEntry, JmpLegalDocument, JmpPopularPagesResult, JmpSiteProfile, JmpTrustBundle, JmpWebsiteLocation, JmpWebsiteLocationDetail, TrackServerPageViewOptions, createJmpContentClient, createJmpContentClientFromServerEnv, getDiscoveredContentWrappers, getJmpBlogPost, getJmpBlogPostDetail, getJmpBlogPosts, getJmpBrowserAnalyticsConfigFromEnv, getJmpFaqDetail, getJmpFaqs, getJmpLandingPageDetail, getJmpLandingPageSitemap, getJmpLandingPages, getJmpLegalDocument, getJmpLegalDocuments, getJmpLocationDetail, getJmpLocations, getJmpPopularPages, getJmpRobotsTxt, getJmpServerContentConfigFromEnv, getJmpSiteProfile, getJmpTrustBundle, getOrCreateJmpAnalyticsFromBrowserEnv, inferTrustWrapperSlots, isJmpBrowserAnalyticsEnvConfigured, isJmpServerContentEnvConfigured, markContentWrapper, registerJmpContentWrappers, resetContentWrapperDiscoveryForTests, trackJmpServerPageView };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export { b as buildLandingCaptureInlineScript } from './landing-capture-C8pyZWuF.js';
|
|
2
|
-
import { J as JmpAnalytics } from './create-jmp-analytics-
|
|
3
|
-
export { B as BOOKING_LINK_HOSTS, C as ClassifiedContactLink, b as ContactLinkChannel, c as classifyContactHref, d as createJmpAnalytics, i as isJmpTrackingConsentGranted, s as setJmpTrackingConsent, a as subscribeJmpTrackingConsent } from './create-jmp-analytics-
|
|
4
|
-
import { n as JmpContentConfig,
|
|
5
|
-
export {
|
|
2
|
+
import { J as JmpAnalytics } from './create-jmp-analytics-JZ3pqNBQ.js';
|
|
3
|
+
export { B as BOOKING_LINK_HOSTS, C as ClassifiedContactLink, b as ContactLinkChannel, c as classifyContactHref, d as createJmpAnalytics, i as isJmpTrackingConsentGranted, s as setJmpTrackingConsent, a as subscribeJmpTrackingConsent } from './create-jmp-analytics-JZ3pqNBQ.js';
|
|
4
|
+
import { n as JmpContentConfig, t as TrackServerPageViewOptions, j as JmpTrustBundle, m as JmpContentWrapper, d as JmpLandingPageKind, b as JmpLandingPage, c as JmpLandingPageDetail, g as JmpPopularPagesResult, J as JmpBlogPost, u as JmpBlogPostDetail, v as JmpFaqItemDetail, a as JmpFaqItem, e as JmpLandingPageSitemapEntry, f as JmpLegalDocument, l as JmpWebsiteLocationDetail, k as JmpWebsiteLocation, h as JmpSiteProfile, q as JmpAnalyticsConfig } from './types-CYrgEwUF.js';
|
|
5
|
+
export { w as JmpContactExtraManifest, x as JmpContentLocaleAlternate, o as JmpContentManifest, y as JmpContentRouteManifest, z as JmpContentWrapperReportMode, A as JmpCredential, r as JmpEventType, B as JmpPartnerLogo, C as JmpPopularPage, p as JmpServerRequestLike, i as JmpTestimonial, D as JmpTrustBlockManifest, E as JmpTrustSection, F as JmpTrustStat, G as JmpTrustSummary, L as LeadMetadata, H as LeadMetadataValue, s as TrackLeadOptions, T as TrackPageViewOptions, I as normalizeJmpContentManifest, K as stableJmpManifestFingerprint } from './types-CYrgEwUF.js';
|
|
6
6
|
export { J as JmpPublicEnv, r as readJmpPublicEnvFromProcess } from './env-public-B6Y0DG68.js';
|
|
7
|
-
export { a as JmpSiteContactFallback, b as JmpSiteDefinition, d as defineJmpSite, g as getJmpContentConfig, c as getJmpSiteDefinition } from './site-config-
|
|
7
|
+
export { a as JmpSiteContactFallback, b as JmpSiteDefinition, d as defineJmpSite, g as getJmpContentConfig, c as getJmpSiteDefinition } from './site-config-BLnwuRC2.js';
|
|
8
8
|
|
|
9
9
|
/** Published package version — sent with capabilities for admin readiness. */
|
|
10
10
|
declare const JMP_ANALYTICS_SDK_VERSION: string;
|
|
@@ -28,6 +28,8 @@ declare function getJmpBlogPostDetail(config: JmpContentConfig, slug: string, lo
|
|
|
28
28
|
declare function getJmpFaqs(config: JmpContentConfig, filters?: {
|
|
29
29
|
locale?: string;
|
|
30
30
|
}): Promise<JmpFaqItem[]>;
|
|
31
|
+
declare function getJmpLegalDocument(config: JmpContentConfig, slug: string): Promise<JmpLegalDocument | null>;
|
|
32
|
+
declare function getJmpLegalDocuments(config: JmpContentConfig): Promise<JmpLegalDocument[]>;
|
|
31
33
|
declare function getJmpFaqDetail(config: JmpContentConfig, slug: string, locale?: string): Promise<JmpFaqItemDetail | null>;
|
|
32
34
|
declare function getJmpLandingPages(config: JmpContentConfig, filters?: {
|
|
33
35
|
kind?: JmpLandingPageKind;
|
|
@@ -66,6 +68,8 @@ declare function createJmpContentClient(config: JmpContentConfig): {
|
|
|
66
68
|
getFaqs: (filters?: {
|
|
67
69
|
locale?: string;
|
|
68
70
|
}) => Promise<JmpFaqItem[]>;
|
|
71
|
+
getLegalDocument: (slug: string) => Promise<JmpLegalDocument | null>;
|
|
72
|
+
getLegalDocuments: () => Promise<JmpLegalDocument[]>;
|
|
69
73
|
getLandingPages: (filters?: Parameters<typeof getJmpLandingPages>[1]) => Promise<JmpLandingPage[]>;
|
|
70
74
|
getLandingPageDetail: (kind: Parameters<typeof getJmpLandingPageDetail>[1], slug: string, locale?: string) => Promise<JmpLandingPageDetail | null>;
|
|
71
75
|
getLandingPageSitemap: () => Promise<JmpLandingPageSitemapEntry[]>;
|
|
@@ -107,4 +111,4 @@ declare function getOrCreateJmpAnalyticsFromBrowserEnv(overrides?: Partial<JmpAn
|
|
|
107
111
|
*/
|
|
108
112
|
declare function createJmpContentClientFromServerEnv(overrides?: Partial<JmpContentConfig>): JmpContentClient | null;
|
|
109
113
|
|
|
110
|
-
export { DEFAULT_JMP_BROWSER_PAGE_VIEW_DEDUPE_MS, JMP_ANALYTICS_SDK_VERSION, JMP_TRACKING_CONSENT_STORAGE_KEY, JmpAnalytics, JmpAnalyticsConfig, JmpBlogPost, JmpBlogPostDetail, type JmpContentClient, JmpContentConfig, JmpContentWrapper, JmpFaqItem, JmpFaqItemDetail, JmpLandingPage, JmpLandingPageDetail, JmpLandingPageKind, JmpLandingPageSitemapEntry, JmpPopularPagesResult, JmpSiteProfile, JmpTrustBundle, JmpWebsiteLocation, JmpWebsiteLocationDetail, TrackServerPageViewOptions, createJmpContentClient, createJmpContentClientFromServerEnv, getDiscoveredContentWrappers, getJmpBlogPost, getJmpBlogPostDetail, getJmpBlogPosts, getJmpBrowserAnalyticsConfigFromEnv, getJmpFaqDetail, getJmpFaqs, getJmpLandingPageDetail, getJmpLandingPageSitemap, getJmpLandingPages, getJmpLocationDetail, getJmpLocations, getJmpPopularPages, getJmpRobotsTxt, getJmpServerContentConfigFromEnv, getJmpSiteProfile, getJmpTrustBundle, getOrCreateJmpAnalyticsFromBrowserEnv, inferTrustWrapperSlots, isJmpBrowserAnalyticsEnvConfigured, isJmpServerContentEnvConfigured, markContentWrapper, registerJmpContentWrappers, resetContentWrapperDiscoveryForTests, trackJmpServerPageView };
|
|
114
|
+
export { DEFAULT_JMP_BROWSER_PAGE_VIEW_DEDUPE_MS, JMP_ANALYTICS_SDK_VERSION, JMP_TRACKING_CONSENT_STORAGE_KEY, JmpAnalytics, JmpAnalyticsConfig, JmpBlogPost, JmpBlogPostDetail, type JmpContentClient, JmpContentConfig, JmpContentWrapper, JmpFaqItem, JmpFaqItemDetail, JmpLandingPage, JmpLandingPageDetail, JmpLandingPageKind, JmpLandingPageSitemapEntry, JmpLegalDocument, JmpPopularPagesResult, JmpSiteProfile, JmpTrustBundle, JmpWebsiteLocation, JmpWebsiteLocationDetail, TrackServerPageViewOptions, createJmpContentClient, createJmpContentClientFromServerEnv, getDiscoveredContentWrappers, getJmpBlogPost, getJmpBlogPostDetail, getJmpBlogPosts, getJmpBrowserAnalyticsConfigFromEnv, getJmpFaqDetail, getJmpFaqs, getJmpLandingPageDetail, getJmpLandingPageSitemap, getJmpLandingPages, getJmpLegalDocument, getJmpLegalDocuments, getJmpLocationDetail, getJmpLocations, getJmpPopularPages, getJmpRobotsTxt, getJmpServerContentConfigFromEnv, getJmpSiteProfile, getJmpTrustBundle, getOrCreateJmpAnalyticsFromBrowserEnv, inferTrustWrapperSlots, isJmpBrowserAnalyticsEnvConfigured, isJmpServerContentEnvConfigured, markContentWrapper, registerJmpContentWrappers, resetContentWrapperDiscoveryForTests, trackJmpServerPageView };
|
package/dist/index.js
CHANGED
|
@@ -17,6 +17,8 @@ import {
|
|
|
17
17
|
getJmpLandingPageDetail,
|
|
18
18
|
getJmpLandingPageSitemap,
|
|
19
19
|
getJmpLandingPages,
|
|
20
|
+
getJmpLegalDocument,
|
|
21
|
+
getJmpLegalDocuments,
|
|
20
22
|
getJmpLocationDetail,
|
|
21
23
|
getJmpLocations,
|
|
22
24
|
getJmpPopularPages,
|
|
@@ -36,7 +38,7 @@ import {
|
|
|
36
38
|
setJmpTrackingConsent,
|
|
37
39
|
stableJmpManifestFingerprint,
|
|
38
40
|
subscribeJmpTrackingConsent
|
|
39
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-EBU4DKHW.js";
|
|
40
42
|
import {
|
|
41
43
|
buildLandingCaptureInlineScript
|
|
42
44
|
} from "./chunk-TCZ6TC2L.js";
|
|
@@ -46,7 +48,7 @@ import {
|
|
|
46
48
|
getJmpSiteDefinition,
|
|
47
49
|
readJmpPublicEnvFromProcess,
|
|
48
50
|
trackJmpServerPageView
|
|
49
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-6WQMWPEY.js";
|
|
50
52
|
export {
|
|
51
53
|
BOOKING_LINK_HOSTS,
|
|
52
54
|
DEFAULT_JMP_BROWSER_PAGE_VIEW_DEDUPE_MS,
|
|
@@ -69,6 +71,8 @@ export {
|
|
|
69
71
|
getJmpLandingPageDetail,
|
|
70
72
|
getJmpLandingPageSitemap,
|
|
71
73
|
getJmpLandingPages,
|
|
74
|
+
getJmpLegalDocument,
|
|
75
|
+
getJmpLegalDocuments,
|
|
72
76
|
getJmpLocationDetail,
|
|
73
77
|
getJmpLocations,
|
|
74
78
|
getJmpPopularPages,
|
package/dist/next/content.cjs
CHANGED
|
@@ -32,6 +32,7 @@ __export(content_exports, {
|
|
|
32
32
|
loadLandingPageDetail: () => loadLandingPageDetail2,
|
|
33
33
|
loadLandingPageSitemap: () => loadLandingPageSitemap2,
|
|
34
34
|
loadLandingPages: () => loadLandingPages2,
|
|
35
|
+
loadLegalDocument: () => loadLegalDocument2,
|
|
35
36
|
loadLocationDetail: () => loadLocationDetail2,
|
|
36
37
|
loadLocations: () => loadLocations2,
|
|
37
38
|
loadPopularPages: () => loadPopularPages2,
|
|
@@ -46,7 +47,7 @@ var import_react = require("react");
|
|
|
46
47
|
var LANDING_REFERER_COOKIE_MAX_AGE_SEC = 30 * 60;
|
|
47
48
|
|
|
48
49
|
// package.json
|
|
49
|
-
var version = "0.1.
|
|
50
|
+
var version = "0.1.38";
|
|
50
51
|
|
|
51
52
|
// src/constants.ts
|
|
52
53
|
var JMP_ANALYTICS_SDK_VERSION = version;
|
|
@@ -60,6 +61,100 @@ function normalizeBaseUrl(baseUrl) {
|
|
|
60
61
|
return baseUrl.replace(/\/$/, "");
|
|
61
62
|
}
|
|
62
63
|
|
|
64
|
+
// src/env-public.ts
|
|
65
|
+
function firstDefined(...values) {
|
|
66
|
+
for (const v of values) {
|
|
67
|
+
if (v) return v;
|
|
68
|
+
}
|
|
69
|
+
return void 0;
|
|
70
|
+
}
|
|
71
|
+
function readJmpPublicEnvFromProcessEnv() {
|
|
72
|
+
if (typeof process === "undefined" || !process.env) {
|
|
73
|
+
return {};
|
|
74
|
+
}
|
|
75
|
+
const { env } = process;
|
|
76
|
+
const analyticsUrl = firstDefined(
|
|
77
|
+
env.NEXT_PUBLIC_JMP_ANALYTICS_URL,
|
|
78
|
+
env.PUBLIC_JMP_ANALYTICS_URL
|
|
79
|
+
);
|
|
80
|
+
const trackingKey = firstDefined(
|
|
81
|
+
env.NEXT_PUBLIC_JMP_TRACKING_KEY,
|
|
82
|
+
env.PUBLIC_JMP_TRACKING_KEY
|
|
83
|
+
);
|
|
84
|
+
const requireConsentRaw = firstDefined(
|
|
85
|
+
env.NEXT_PUBLIC_JMP_ANALYTICS_REQUIRE_CONSENT,
|
|
86
|
+
env.PUBLIC_JMP_ANALYTICS_REQUIRE_CONSENT
|
|
87
|
+
);
|
|
88
|
+
const autoContactRaw = firstDefined(
|
|
89
|
+
env.NEXT_PUBLIC_JMP_AUTO_CONTACT_LINKS,
|
|
90
|
+
env.PUBLIC_JMP_AUTO_CONTACT_LINKS
|
|
91
|
+
);
|
|
92
|
+
return {
|
|
93
|
+
analyticsUrl,
|
|
94
|
+
trackingKey,
|
|
95
|
+
requireConsent: requireConsentRaw === "true",
|
|
96
|
+
autoContactLinks: autoContactRaw === "true"
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function readJmpPublicEnvFromProcess(overrides) {
|
|
100
|
+
const fromEnv = readJmpPublicEnvFromProcessEnv();
|
|
101
|
+
return {
|
|
102
|
+
analyticsUrl: firstDefined(overrides?.analyticsUrl, fromEnv.analyticsUrl),
|
|
103
|
+
trackingKey: firstDefined(overrides?.trackingKey, fromEnv.trackingKey),
|
|
104
|
+
requireConsent: overrides?.requireConsent ?? fromEnv.requireConsent,
|
|
105
|
+
autoContactLinks: overrides?.autoContactLinks ?? fromEnv.autoContactLinks
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// src/site-config.ts
|
|
110
|
+
var registeredSite = null;
|
|
111
|
+
function getJmpSiteDefinition() {
|
|
112
|
+
return registeredSite;
|
|
113
|
+
}
|
|
114
|
+
function getJmpContentConfig() {
|
|
115
|
+
const { analyticsUrl, trackingKey } = readJmpPublicEnvFromProcess();
|
|
116
|
+
if (!analyticsUrl || !trackingKey) {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
const site = getJmpSiteDefinition();
|
|
120
|
+
const contentWrappers = site?.contentWrappers ?? void 0;
|
|
121
|
+
const inferredMode = contentWrappers && contentWrappers.length > 0 ? "manual" : void 0;
|
|
122
|
+
return {
|
|
123
|
+
baseUrl: analyticsUrl,
|
|
124
|
+
trackingKey,
|
|
125
|
+
contentWrappers,
|
|
126
|
+
contentManifest: site?.contentManifest ?? void 0,
|
|
127
|
+
contentWrapperMode: site?.contentWrapperMode ?? inferredMode
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// src/landing-pages/utils.ts
|
|
132
|
+
function resolveJmpSiteUrl(override) {
|
|
133
|
+
const fromArg = override?.trim().replace(/\/$/, "");
|
|
134
|
+
if (fromArg) return fromArg;
|
|
135
|
+
const fromConfig = getJmpSiteDefinition()?.siteUrl?.trim().replace(/\/$/, "");
|
|
136
|
+
return fromConfig || null;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// src/request-origin.ts
|
|
140
|
+
function resolveJmpRequestOrigin() {
|
|
141
|
+
const fromSite = resolveJmpSiteUrl();
|
|
142
|
+
if (fromSite) {
|
|
143
|
+
return fromSite;
|
|
144
|
+
}
|
|
145
|
+
if (typeof process === "undefined") {
|
|
146
|
+
return null;
|
|
147
|
+
}
|
|
148
|
+
return process.env.NEXT_PUBLIC_SITE_URL?.trim().replace(/\/$/, "") || null;
|
|
149
|
+
}
|
|
150
|
+
function withJmpOriginHeader(headers) {
|
|
151
|
+
const origin = resolveJmpRequestOrigin();
|
|
152
|
+
if (!origin) {
|
|
153
|
+
return headers;
|
|
154
|
+
}
|
|
155
|
+
return { ...headers, Origin: origin };
|
|
156
|
+
}
|
|
157
|
+
|
|
63
158
|
// src/content/manifest.ts
|
|
64
159
|
var JMP_CONTENT_MANIFEST_VERSION = 1;
|
|
65
160
|
var TRUST_SECTIONS = /* @__PURE__ */ new Set([
|
|
@@ -264,6 +359,11 @@ function inferWrapperSlotsFromManifest(manifest) {
|
|
|
264
359
|
}
|
|
265
360
|
|
|
266
361
|
// src/content/fetch.ts
|
|
362
|
+
function jmpContentRequestHeaders(config) {
|
|
363
|
+
return withJmpOriginHeader({
|
|
364
|
+
"X-JMP-Tracking-Key": config.trackingKey
|
|
365
|
+
});
|
|
366
|
+
}
|
|
267
367
|
async function getContent(config, path) {
|
|
268
368
|
const text = await getContentText(config, path);
|
|
269
369
|
try {
|
|
@@ -286,9 +386,7 @@ async function getContentText(config, path) {
|
|
|
286
386
|
}
|
|
287
387
|
const res = await resolvedFetch(url, {
|
|
288
388
|
method: "GET",
|
|
289
|
-
headers:
|
|
290
|
-
"X-JMP-Tracking-Key": config.trackingKey
|
|
291
|
-
}
|
|
389
|
+
headers: jmpContentRequestHeaders(config)
|
|
292
390
|
});
|
|
293
391
|
const text = await res.text();
|
|
294
392
|
if (!res.ok) {
|
|
@@ -315,6 +413,7 @@ var WRAPPER_SLOT_ORDER = [
|
|
|
315
413
|
"blog",
|
|
316
414
|
"faq",
|
|
317
415
|
"contact",
|
|
416
|
+
"legal",
|
|
318
417
|
"trust",
|
|
319
418
|
"trust.summary",
|
|
320
419
|
"trust.testimonials",
|
|
@@ -341,7 +440,7 @@ function markTrustBundleWrappers(bundle) {
|
|
|
341
440
|
}
|
|
342
441
|
}
|
|
343
442
|
function inferTrustWrapperSlots(bundle) {
|
|
344
|
-
const slots = /* @__PURE__ */ new Set(
|
|
443
|
+
const slots = /* @__PURE__ */ new Set();
|
|
345
444
|
const { summary, testimonials, stats, logos, credentials } = bundle;
|
|
346
445
|
const hasSummary = summary.google_rating != null || summary.google_review_count != null || Boolean(summary.google_reviews_url?.trim()) || Boolean(summary.yelp_url?.trim()) || Boolean(summary.trustpilot_url?.trim()) || Boolean(summary.disclaimer?.trim());
|
|
347
446
|
if (hasSummary) {
|
|
@@ -488,6 +587,26 @@ async function getJmpFaqs(config, filters) {
|
|
|
488
587
|
afterContentWrapperUse(config);
|
|
489
588
|
return data.faqs;
|
|
490
589
|
}
|
|
590
|
+
async function getJmpLegalDocument(config, slug) {
|
|
591
|
+
const key = slug.trim().toLowerCase();
|
|
592
|
+
if (!key) {
|
|
593
|
+
return null;
|
|
594
|
+
}
|
|
595
|
+
try {
|
|
596
|
+
const data = await getContent(
|
|
597
|
+
config,
|
|
598
|
+
`/api/content/legal?slug=${encodeURIComponent(key)}`
|
|
599
|
+
);
|
|
600
|
+
markContentWrapper("legal");
|
|
601
|
+
afterContentWrapperUse(config);
|
|
602
|
+
return data.document;
|
|
603
|
+
} catch (error) {
|
|
604
|
+
if (error instanceof Error && error.message.includes("HTTP 404")) {
|
|
605
|
+
return null;
|
|
606
|
+
}
|
|
607
|
+
throw error;
|
|
608
|
+
}
|
|
609
|
+
}
|
|
491
610
|
async function getJmpLandingPages(config, filters) {
|
|
492
611
|
const params = new URLSearchParams();
|
|
493
612
|
if (filters?.kind) {
|
|
@@ -631,7 +750,7 @@ async function registerJmpContentWrappers(config) {
|
|
|
631
750
|
method: "POST",
|
|
632
751
|
headers: {
|
|
633
752
|
"Content-Type": "application/json",
|
|
634
|
-
|
|
753
|
+
...jmpContentRequestHeaders(config)
|
|
635
754
|
},
|
|
636
755
|
body: JSON.stringify(body)
|
|
637
756
|
});
|
|
@@ -653,70 +772,6 @@ async function registerJmpContentWrappers(config) {
|
|
|
653
772
|
}
|
|
654
773
|
setContentWrapperSyncHandler(registerJmpContentWrappers);
|
|
655
774
|
|
|
656
|
-
// src/env-public.ts
|
|
657
|
-
function firstDefined(...values) {
|
|
658
|
-
for (const v of values) {
|
|
659
|
-
if (v) return v;
|
|
660
|
-
}
|
|
661
|
-
return void 0;
|
|
662
|
-
}
|
|
663
|
-
function readJmpPublicEnvFromProcessEnv() {
|
|
664
|
-
if (typeof process === "undefined" || !process.env) {
|
|
665
|
-
return {};
|
|
666
|
-
}
|
|
667
|
-
const { env } = process;
|
|
668
|
-
const analyticsUrl = firstDefined(
|
|
669
|
-
env.NEXT_PUBLIC_JMP_ANALYTICS_URL,
|
|
670
|
-
env.PUBLIC_JMP_ANALYTICS_URL
|
|
671
|
-
);
|
|
672
|
-
const trackingKey = firstDefined(
|
|
673
|
-
env.NEXT_PUBLIC_JMP_TRACKING_KEY,
|
|
674
|
-
env.PUBLIC_JMP_TRACKING_KEY
|
|
675
|
-
);
|
|
676
|
-
const requireConsentRaw = firstDefined(
|
|
677
|
-
env.NEXT_PUBLIC_JMP_ANALYTICS_REQUIRE_CONSENT,
|
|
678
|
-
env.PUBLIC_JMP_ANALYTICS_REQUIRE_CONSENT
|
|
679
|
-
);
|
|
680
|
-
const autoContactRaw = firstDefined(
|
|
681
|
-
env.NEXT_PUBLIC_JMP_AUTO_CONTACT_LINKS,
|
|
682
|
-
env.PUBLIC_JMP_AUTO_CONTACT_LINKS
|
|
683
|
-
);
|
|
684
|
-
return {
|
|
685
|
-
analyticsUrl,
|
|
686
|
-
trackingKey,
|
|
687
|
-
requireConsent: requireConsentRaw === "true",
|
|
688
|
-
autoContactLinks: autoContactRaw === "true"
|
|
689
|
-
};
|
|
690
|
-
}
|
|
691
|
-
function readJmpPublicEnvFromProcess(overrides) {
|
|
692
|
-
const fromEnv = readJmpPublicEnvFromProcessEnv();
|
|
693
|
-
return {
|
|
694
|
-
analyticsUrl: firstDefined(overrides?.analyticsUrl, fromEnv.analyticsUrl),
|
|
695
|
-
trackingKey: firstDefined(overrides?.trackingKey, fromEnv.trackingKey),
|
|
696
|
-
requireConsent: overrides?.requireConsent ?? fromEnv.requireConsent,
|
|
697
|
-
autoContactLinks: overrides?.autoContactLinks ?? fromEnv.autoContactLinks
|
|
698
|
-
};
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
// src/site-config.ts
|
|
702
|
-
var registeredSite = null;
|
|
703
|
-
function getJmpSiteDefinition() {
|
|
704
|
-
return registeredSite;
|
|
705
|
-
}
|
|
706
|
-
function getJmpContentConfig() {
|
|
707
|
-
const { analyticsUrl, trackingKey } = readJmpPublicEnvFromProcess();
|
|
708
|
-
if (!analyticsUrl || !trackingKey) {
|
|
709
|
-
return null;
|
|
710
|
-
}
|
|
711
|
-
const site = getJmpSiteDefinition();
|
|
712
|
-
return {
|
|
713
|
-
baseUrl: analyticsUrl,
|
|
714
|
-
trackingKey,
|
|
715
|
-
contentWrappers: site?.contentWrappers ?? void 0,
|
|
716
|
-
contentManifest: site?.contentManifest ?? void 0
|
|
717
|
-
};
|
|
718
|
-
}
|
|
719
|
-
|
|
720
775
|
// src/content/site-content.ts
|
|
721
776
|
var DEFAULT_EXTRA_KEYS = {
|
|
722
777
|
founderName: ["founder-name", "founder_name"],
|
|
@@ -853,6 +908,17 @@ async function loadFaqs(locale) {
|
|
|
853
908
|
return [];
|
|
854
909
|
}
|
|
855
910
|
}
|
|
911
|
+
async function loadLegalDocument(slug) {
|
|
912
|
+
const c = getJmpContentConfig();
|
|
913
|
+
if (!c) {
|
|
914
|
+
return null;
|
|
915
|
+
}
|
|
916
|
+
try {
|
|
917
|
+
return await getJmpLegalDocument(c, slug);
|
|
918
|
+
} catch {
|
|
919
|
+
return null;
|
|
920
|
+
}
|
|
921
|
+
}
|
|
856
922
|
async function loadFaqBySlug(slug, locale) {
|
|
857
923
|
const normalized = slug.trim();
|
|
858
924
|
if (!normalized) {
|
|
@@ -960,6 +1026,7 @@ var getResolvedSiteContact2 = (0, import_react.cache)(getResolvedSiteContact);
|
|
|
960
1026
|
var loadBlogPosts2 = (0, import_react.cache)(loadBlogPosts);
|
|
961
1027
|
var loadBlogPost2 = (0, import_react.cache)(loadBlogPost);
|
|
962
1028
|
var loadFaqs2 = (0, import_react.cache)(loadFaqs);
|
|
1029
|
+
var loadLegalDocument2 = (0, import_react.cache)(loadLegalDocument);
|
|
963
1030
|
var loadFaqBySlug2 = loadFaqBySlug;
|
|
964
1031
|
var loadLandingPages2 = (0, import_react.cache)(loadLandingPages);
|
|
965
1032
|
var loadLandingPageDetail2 = loadLandingPageDetail;
|
|
@@ -982,6 +1049,7 @@ var loadPopularPages2 = (0, import_react.cache)(loadPopularPages);
|
|
|
982
1049
|
loadLandingPageDetail,
|
|
983
1050
|
loadLandingPageSitemap,
|
|
984
1051
|
loadLandingPages,
|
|
1052
|
+
loadLegalDocument,
|
|
985
1053
|
loadLocationDetail,
|
|
986
1054
|
loadLocations,
|
|
987
1055
|
loadPopularPages,
|