@jmp-technologies/analytics 0.1.37 → 0.1.39
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 +144 -4
- 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 +190 -8
- 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 +149 -6
- package/dist/astro/integration.cjs.map +1 -1
- package/dist/astro/integration.js +3 -3
- package/dist/astro/middleware.cjs +5 -2
- 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 +149 -6
- package/dist/astro/register.cjs.map +1 -1
- package/dist/astro/register.js +3 -3
- package/dist/{chunk-EMZXL6VF.js → chunk-6WQMWPEY.js} +6 -3
- package/dist/chunk-6WQMWPEY.js.map +1 -0
- package/dist/{chunk-D43AEUXU.js → chunk-BXPMVR7M.js} +3 -3
- package/dist/{chunk-TN6PGIB5.js → chunk-JJ3JP3RV.js} +2 -2
- package/dist/{chunk-UHXWHKHJ.js → chunk-M66PHSBO.js} +16 -3
- package/dist/chunk-M66PHSBO.js.map +1 -0
- package/dist/{chunk-VQF6QYLR.js → chunk-OCIOQIE4.js} +3 -3
- package/dist/{chunk-PTXPNIMF.js → chunk-ONIPLMOY.js} +2 -2
- package/dist/{chunk-RT2YYDCK.js → chunk-XAEWXWSP.js} +189 -8
- package/dist/chunk-XAEWXWSP.js.map +1 -0
- package/dist/constants-DTZMYgi4.d.cts +12 -0
- package/dist/constants-DTZMYgi4.d.ts +12 -0
- package/dist/{create-jmp-analytics-Bz0-K0Af.d.cts → create-jmp-analytics-C1IH32ZF.d.cts} +1 -1
- package/dist/{create-jmp-analytics-DRjrlWUn.d.ts → create-jmp-analytics-CjVYSmPJ.d.ts} +1 -1
- package/dist/index.cjs +196 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -13
- package/dist/index.d.ts +11 -13
- package/dist/index.js +10 -2
- package/dist/next/content.cjs +195 -8
- package/dist/next/content.cjs.map +1 -1
- package/dist/next/content.d.cts +6 -4
- package/dist/next/content.d.ts +6 -4
- package/dist/next/content.js +11 -3
- package/dist/next/content.js.map +1 -1
- package/dist/next/instrumentation.cjs +149 -6
- package/dist/next/instrumentation.cjs.map +1 -1
- package/dist/next/instrumentation.js +2 -2
- package/dist/next/landing-pages.cjs +156 -7
- 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 +3 -3
- package/dist/next/locations.cjs +156 -7
- 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 +3 -3
- package/dist/next/middleware.cjs +5 -2
- 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 +156 -7
- package/dist/next/site-root-server.cjs.map +1 -1
- package/dist/next/site-root-server.js +4 -4
- package/dist/next.cjs +144 -4
- 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 +144 -4
- 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-BxEmJxBB.d.ts → site-config-BEaYpZ3X.d.ts} +9 -3
- package/dist/{site-config-Cgq67uQ1.d.cts → site-config-BN6Z2zIf.d.cts} +9 -3
- package/dist/{track-page-view-74Su6lQY.d.ts → track-page-view-B3OwUOYl.d.ts} +1 -1
- package/dist/{track-page-view-BCX1Dsfk.d.cts → track-page-view-BeVjC-pV.d.cts} +1 -1
- package/dist/{types-yNgoakwk.d.ts → types-uwXEaMD6.d.cts} +45 -2
- package/dist/{types-yNgoakwk.d.cts → types-uwXEaMD6.d.ts} +45 -2
- package/dist/{utils-BLoWWfSw.d.ts → utils-6a6lNKsg.d.ts} +1 -1
- package/dist/{utils-UPTIdK1D.d.cts → utils-Cbb3CO3i.d.cts} +1 -1
- package/docs/legal-and-privacy.md +2 -2
- package/package.json +1 -1
- package/dist/chunk-EMZXL6VF.js.map +0 -1
- package/dist/chunk-RT2YYDCK.js.map +0 -1
- package/dist/chunk-UHXWHKHJ.js.map +0 -1
- /package/dist/{chunk-D43AEUXU.js.map → chunk-BXPMVR7M.js.map} +0 -0
- /package/dist/{chunk-TN6PGIB5.js.map → chunk-JJ3JP3RV.js.map} +0 -0
- /package/dist/{chunk-VQF6QYLR.js.map → chunk-OCIOQIE4.js.map} +0 -0
- /package/dist/{chunk-PTXPNIMF.js.map → chunk-ONIPLMOY.js.map} +0 -0
package/dist/react.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ComponentPropsWithoutRef } from 'react';
|
|
3
|
-
import { J as JmpAnalytics } from './create-jmp-analytics-
|
|
4
|
-
import './types-
|
|
3
|
+
import { J as JmpAnalytics } from './create-jmp-analytics-CjVYSmPJ.js';
|
|
4
|
+
import './types-uwXEaMD6.js';
|
|
5
5
|
|
|
6
6
|
declare function useJmpAnalytics(): JmpAnalytics | null;
|
|
7
7
|
type JmpTrackedTelLinkProps = ComponentPropsWithoutRef<"a"> & {
|
package/dist/react.js
CHANGED
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
JmpTrackedMailtoLink,
|
|
4
4
|
JmpTrackedTelLink,
|
|
5
5
|
useJmpAnalytics
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-JJ3JP3RV.js";
|
|
7
|
+
import "./chunk-XAEWXWSP.js";
|
|
8
8
|
import "./chunk-TCZ6TC2L.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-6WQMWPEY.js";
|
|
10
10
|
export {
|
|
11
11
|
JmpTrackedMailtoLink,
|
|
12
12
|
JmpTrackedTelLink,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as JmpContentWrapper, n as JmpContentConfig, o as JmpContentManifest } from './types-uwXEaMD6.js';
|
|
2
2
|
|
|
3
3
|
type JmpSiteSocialLinks = {
|
|
4
4
|
linkedin: string | null;
|
|
@@ -30,10 +30,16 @@ type JmpSiteContactFallback = {
|
|
|
30
30
|
};
|
|
31
31
|
type JmpSiteDefinition = {
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
34
|
-
* (
|
|
33
|
+
* Content areas this site actually renders. When set, capabilities report
|
|
34
|
+
* this list (manual mode) so unused dashboard editors stay hidden.
|
|
35
|
+
* List granular Trust slots (`trust.summary`, `trust.reviews`) instead of
|
|
36
|
+
* a bare `trust` wrapper.
|
|
35
37
|
*/
|
|
36
38
|
contentWrappers?: JmpContentWrapper[];
|
|
39
|
+
/**
|
|
40
|
+
* Override report mode. Defaults to `manual` when `contentWrappers` is set.
|
|
41
|
+
*/
|
|
42
|
+
contentWrapperMode?: JmpContentConfig["contentWrapperMode"];
|
|
37
43
|
/**
|
|
38
44
|
* Routes, trust block order, and contact extras for dashboard layout sync.
|
|
39
45
|
* Reported with capabilities when the site loads content from the portal.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as JmpContentWrapper, n as JmpContentConfig, o as JmpContentManifest } from './types-uwXEaMD6.cjs';
|
|
2
2
|
|
|
3
3
|
type JmpSiteSocialLinks = {
|
|
4
4
|
linkedin: string | null;
|
|
@@ -30,10 +30,16 @@ type JmpSiteContactFallback = {
|
|
|
30
30
|
};
|
|
31
31
|
type JmpSiteDefinition = {
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
34
|
-
* (
|
|
33
|
+
* Content areas this site actually renders. When set, capabilities report
|
|
34
|
+
* this list (manual mode) so unused dashboard editors stay hidden.
|
|
35
|
+
* List granular Trust slots (`trust.summary`, `trust.reviews`) instead of
|
|
36
|
+
* a bare `trust` wrapper.
|
|
35
37
|
*/
|
|
36
38
|
contentWrappers?: JmpContentWrapper[];
|
|
39
|
+
/**
|
|
40
|
+
* Override report mode. Defaults to `manual` when `contentWrappers` is set.
|
|
41
|
+
*/
|
|
42
|
+
contentWrapperMode?: JmpContentConfig["contentWrapperMode"];
|
|
37
43
|
/**
|
|
38
44
|
* Routes, trust block order, and contact extras for dashboard layout sync.
|
|
39
45
|
* Reported with capabilities when the site loads content from the portal.
|
|
@@ -42,6 +42,35 @@ type JmpContentManifest = {
|
|
|
42
42
|
contact?: {
|
|
43
43
|
extras?: JmpContactExtraManifest[];
|
|
44
44
|
};
|
|
45
|
+
defaults?: {
|
|
46
|
+
contact?: {
|
|
47
|
+
displayName?: string;
|
|
48
|
+
email?: string;
|
|
49
|
+
phone?: string;
|
|
50
|
+
address?: string;
|
|
51
|
+
hours?: string;
|
|
52
|
+
serviceArea?: string;
|
|
53
|
+
googleMapsUrl?: string;
|
|
54
|
+
linkedinUrl?: string;
|
|
55
|
+
instagramUrl?: string;
|
|
56
|
+
facebookUrl?: string;
|
|
57
|
+
xUrl?: string;
|
|
58
|
+
youtubeUrl?: string;
|
|
59
|
+
extras?: Record<string, string>;
|
|
60
|
+
};
|
|
61
|
+
faq?: Array<{
|
|
62
|
+
question: string;
|
|
63
|
+
answer: string;
|
|
64
|
+
category?: string;
|
|
65
|
+
}>;
|
|
66
|
+
trust?: {
|
|
67
|
+
googleReviewsUrl?: string;
|
|
68
|
+
googlePlaceId?: string;
|
|
69
|
+
yelpUrl?: string;
|
|
70
|
+
trustpilotUrl?: string;
|
|
71
|
+
disclaimer?: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
45
74
|
};
|
|
46
75
|
declare function normalizeJmpContentManifest(input: JmpContentManifest | null | undefined): JmpContentManifest | null;
|
|
47
76
|
declare function stableJmpManifestFingerprint(manifest: JmpContentManifest | null): string;
|
|
@@ -101,7 +130,7 @@ type JmpContentConfig = Pick<JmpAnalyticsConfig, "baseUrl" | "trackingKey" | "de
|
|
|
101
130
|
contentManifest?: JmpContentManifest;
|
|
102
131
|
};
|
|
103
132
|
/** Top-level and trust sub-wrappers the client can declare. */
|
|
104
|
-
type JmpContentWrapper = "blog" | "faq" | "landing" | "locations" | "contact" | "trust" | "trust.summary" | "trust.testimonials" | "trust.reviews" | "trust.stats" | "trust.logos" | "trust.credentials";
|
|
133
|
+
type JmpContentWrapper = "blog" | "faq" | "landing" | "locations" | "contact" | "legal" | "trust" | "trust.summary" | "trust.testimonials" | "trust.reviews" | "trust.stats" | "trust.logos" | "trust.credentials";
|
|
105
134
|
type JmpBlogPost = {
|
|
106
135
|
id: string;
|
|
107
136
|
title: string;
|
|
@@ -145,6 +174,20 @@ type JmpFaqItemDetail = {
|
|
|
145
174
|
faq: JmpFaqItem;
|
|
146
175
|
alternates: JmpContentLocaleAlternate[];
|
|
147
176
|
};
|
|
177
|
+
type JmpLegalDocumentSection = {
|
|
178
|
+
id: string;
|
|
179
|
+
title: string;
|
|
180
|
+
body: string;
|
|
181
|
+
};
|
|
182
|
+
type JmpLegalDocument = {
|
|
183
|
+
slug: string;
|
|
184
|
+
path: string;
|
|
185
|
+
title: string;
|
|
186
|
+
description: string;
|
|
187
|
+
last_updated: string;
|
|
188
|
+
sections: JmpLegalDocumentSection[];
|
|
189
|
+
updated_at: string;
|
|
190
|
+
};
|
|
148
191
|
type JmpPopularPage = {
|
|
149
192
|
path: string;
|
|
150
193
|
views: number;
|
|
@@ -394,4 +437,4 @@ type TrackServerPageViewOptions = {
|
|
|
394
437
|
sessionId?: string;
|
|
395
438
|
};
|
|
396
439
|
|
|
397
|
-
export { type
|
|
440
|
+
export { type JmpCredential as A, type JmpPartnerLogo as B, type JmpPopularPage as C, type JmpTrustBlockManifest as D, type JmpTrustSection as E, type JmpTrustStat as F, type JmpTrustSummary as G, type LeadMetadataValue as H, normalizeJmpContentManifest as I, type JmpBlogPost as J, stableJmpManifestFingerprint as K, type LeadMetadata as L, type TrackPageViewOptions as T, type JmpFaqItem as a, type JmpLandingPage as b, type JmpLandingPageDetail as c, type JmpLandingPageKind as d, type JmpLandingPageSitemapEntry as e, type JmpLegalDocument as f, type JmpPopularPagesResult as g, type JmpSiteProfile as h, type JmpTestimonial as i, type JmpTrustBundle as j, type JmpWebsiteLocation as k, type JmpWebsiteLocationDetail as l, type JmpContentWrapper as m, type JmpContentConfig as n, type JmpContentManifest as o, type JmpServerRequestLike as p, type JmpAnalyticsConfig as q, type JmpEventType as r, type TrackLeadOptions as s, type TrackServerPageViewOptions as t, type JmpBlogPostDetail as u, type JmpFaqItemDetail as v, type JmpContactExtraManifest as w, type JmpContentLocaleAlternate as x, type JmpContentRouteManifest as y, type JmpContentWrapperReportMode as z };
|
|
@@ -42,6 +42,35 @@ type JmpContentManifest = {
|
|
|
42
42
|
contact?: {
|
|
43
43
|
extras?: JmpContactExtraManifest[];
|
|
44
44
|
};
|
|
45
|
+
defaults?: {
|
|
46
|
+
contact?: {
|
|
47
|
+
displayName?: string;
|
|
48
|
+
email?: string;
|
|
49
|
+
phone?: string;
|
|
50
|
+
address?: string;
|
|
51
|
+
hours?: string;
|
|
52
|
+
serviceArea?: string;
|
|
53
|
+
googleMapsUrl?: string;
|
|
54
|
+
linkedinUrl?: string;
|
|
55
|
+
instagramUrl?: string;
|
|
56
|
+
facebookUrl?: string;
|
|
57
|
+
xUrl?: string;
|
|
58
|
+
youtubeUrl?: string;
|
|
59
|
+
extras?: Record<string, string>;
|
|
60
|
+
};
|
|
61
|
+
faq?: Array<{
|
|
62
|
+
question: string;
|
|
63
|
+
answer: string;
|
|
64
|
+
category?: string;
|
|
65
|
+
}>;
|
|
66
|
+
trust?: {
|
|
67
|
+
googleReviewsUrl?: string;
|
|
68
|
+
googlePlaceId?: string;
|
|
69
|
+
yelpUrl?: string;
|
|
70
|
+
trustpilotUrl?: string;
|
|
71
|
+
disclaimer?: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
45
74
|
};
|
|
46
75
|
declare function normalizeJmpContentManifest(input: JmpContentManifest | null | undefined): JmpContentManifest | null;
|
|
47
76
|
declare function stableJmpManifestFingerprint(manifest: JmpContentManifest | null): string;
|
|
@@ -101,7 +130,7 @@ type JmpContentConfig = Pick<JmpAnalyticsConfig, "baseUrl" | "trackingKey" | "de
|
|
|
101
130
|
contentManifest?: JmpContentManifest;
|
|
102
131
|
};
|
|
103
132
|
/** Top-level and trust sub-wrappers the client can declare. */
|
|
104
|
-
type JmpContentWrapper = "blog" | "faq" | "landing" | "locations" | "contact" | "trust" | "trust.summary" | "trust.testimonials" | "trust.reviews" | "trust.stats" | "trust.logos" | "trust.credentials";
|
|
133
|
+
type JmpContentWrapper = "blog" | "faq" | "landing" | "locations" | "contact" | "legal" | "trust" | "trust.summary" | "trust.testimonials" | "trust.reviews" | "trust.stats" | "trust.logos" | "trust.credentials";
|
|
105
134
|
type JmpBlogPost = {
|
|
106
135
|
id: string;
|
|
107
136
|
title: string;
|
|
@@ -145,6 +174,20 @@ type JmpFaqItemDetail = {
|
|
|
145
174
|
faq: JmpFaqItem;
|
|
146
175
|
alternates: JmpContentLocaleAlternate[];
|
|
147
176
|
};
|
|
177
|
+
type JmpLegalDocumentSection = {
|
|
178
|
+
id: string;
|
|
179
|
+
title: string;
|
|
180
|
+
body: string;
|
|
181
|
+
};
|
|
182
|
+
type JmpLegalDocument = {
|
|
183
|
+
slug: string;
|
|
184
|
+
path: string;
|
|
185
|
+
title: string;
|
|
186
|
+
description: string;
|
|
187
|
+
last_updated: string;
|
|
188
|
+
sections: JmpLegalDocumentSection[];
|
|
189
|
+
updated_at: string;
|
|
190
|
+
};
|
|
148
191
|
type JmpPopularPage = {
|
|
149
192
|
path: string;
|
|
150
193
|
views: number;
|
|
@@ -394,4 +437,4 @@ type TrackServerPageViewOptions = {
|
|
|
394
437
|
sessionId?: string;
|
|
395
438
|
};
|
|
396
439
|
|
|
397
|
-
export { type
|
|
440
|
+
export { type JmpCredential as A, type JmpPartnerLogo as B, type JmpPopularPage as C, type JmpTrustBlockManifest as D, type JmpTrustSection as E, type JmpTrustStat as F, type JmpTrustSummary as G, type LeadMetadataValue as H, normalizeJmpContentManifest as I, type JmpBlogPost as J, stableJmpManifestFingerprint as K, type LeadMetadata as L, type TrackPageViewOptions as T, type JmpFaqItem as a, type JmpLandingPage as b, type JmpLandingPageDetail as c, type JmpLandingPageKind as d, type JmpLandingPageSitemapEntry as e, type JmpLegalDocument as f, type JmpPopularPagesResult as g, type JmpSiteProfile as h, type JmpTestimonial as i, type JmpTrustBundle as j, type JmpWebsiteLocation as k, type JmpWebsiteLocationDetail as l, type JmpContentWrapper as m, type JmpContentConfig as n, type JmpContentManifest as o, type JmpServerRequestLike as p, type JmpAnalyticsConfig as q, type JmpEventType as r, type TrackLeadOptions as s, type TrackServerPageViewOptions as t, type JmpBlogPostDetail as u, type JmpFaqItemDetail as v, type JmpContactExtraManifest as w, type JmpContentLocaleAlternate as x, type JmpContentRouteManifest as y, type JmpContentWrapperReportMode as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as JmpLandingPage, d as JmpLandingPageKind } from './types-
|
|
1
|
+
import { b as JmpLandingPage, d as JmpLandingPageKind } from './types-uwXEaMD6.js';
|
|
2
2
|
|
|
3
3
|
/** Strip lightweight markdown for meta descriptions and schema text fields. */
|
|
4
4
|
declare function plainTextFromMarkdown(input: string, maxLength?: number): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as JmpLandingPage, d as JmpLandingPageKind } from './types-
|
|
1
|
+
import { b as JmpLandingPage, d as JmpLandingPageKind } from './types-uwXEaMD6.cjs';
|
|
2
2
|
|
|
3
3
|
/** Strip lightweight markdown for meta descriptions and schema text fields. */
|
|
4
4
|
declare function plainTextFromMarkdown(input: string, maxLength?: number): string;
|
|
@@ -10,8 +10,8 @@ This guide helps you publish **only the legal pages your site actually needs** w
|
|
|
10
10
|
|
|
11
11
|
1. **Inventory integrations** — Walk the [feature checklist](#feature-checklist-what-your-site-uses) and mark what the client site enables.
|
|
12
12
|
2. **Decide which pages are required** — Use the [decision table](#which-legal-pages-do-you-need).
|
|
13
|
-
3. **
|
|
14
|
-
4. **Publish URLs on the live site** — Host pages on the **client domain** (e.g. `/privacy`, `/terms`).
|
|
13
|
+
3. **Edit in JMP Dashboard** — Content → Legal. Add a page with a slug you choose (`privacy`, `terms`, or any other key), then publish. The live site fetches `GET /api/content/legal?slug=privacy` (or `loadLegalDocument("privacy")` in the SDK). If nothing is published, keep an in-repo fallback.
|
|
14
|
+
4. **Publish URLs on the live site** — Host pages on the **client domain** (e.g. `/privacy`, `/terms`) using the same layout as other JMP legal pages.
|
|
15
15
|
5. **Link from the site** — Footer links and/or `getJmpSiteProfile()` → `legal.privacy_policy_url` / `legal.terms_url` (configured in JMP Dashboard → Content → Contact).
|
|
16
16
|
|
|
17
17
|
---
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/env-public.ts","../src/site-config.ts","../src/landing-pages/hub.ts","../src/landing-pages/utils.ts","../src/http.ts","../src/request-origin.ts","../src/server/page-view.ts"],"sourcesContent":["/**\n * Public env vars for JMP — supports Next.js (`NEXT_PUBLIC_*`) and Astro (`PUBLIC_*`).\n * Server/build: `process.env`. Astro client bundles: pass overrides from `import.meta.env`.\n */\n\nexport type JmpPublicEnv = {\n analyticsUrl?: string\n trackingKey?: string\n requireConsent?: boolean\n autoContactLinks?: boolean\n}\n\nfunction firstDefined(...values: (string | undefined)[]): string | undefined {\n for (const v of values) {\n if (v) return v\n }\n return undefined\n}\n\n/** Static reads so Next.js / Vite inline `NEXT_PUBLIC_*` into client bundles. */\nfunction readJmpPublicEnvFromProcessEnv(): Omit<JmpPublicEnv, never> {\n if (typeof process === \"undefined\" || !process.env) {\n return {}\n }\n const { env } = process\n const analyticsUrl = firstDefined(\n env.NEXT_PUBLIC_JMP_ANALYTICS_URL,\n env.PUBLIC_JMP_ANALYTICS_URL,\n )\n const trackingKey = firstDefined(\n env.NEXT_PUBLIC_JMP_TRACKING_KEY,\n env.PUBLIC_JMP_TRACKING_KEY,\n )\n const requireConsentRaw = firstDefined(\n env.NEXT_PUBLIC_JMP_ANALYTICS_REQUIRE_CONSENT,\n env.PUBLIC_JMP_ANALYTICS_REQUIRE_CONSENT,\n )\n const autoContactRaw = firstDefined(\n env.NEXT_PUBLIC_JMP_AUTO_CONTACT_LINKS,\n env.PUBLIC_JMP_AUTO_CONTACT_LINKS,\n )\n\n return {\n analyticsUrl,\n trackingKey,\n requireConsent: requireConsentRaw === \"true\",\n autoContactLinks: autoContactRaw === \"true\",\n }\n}\n\n/** Read dashboard URL + tracking key from Node / build-time env. */\nexport function readJmpPublicEnvFromProcess(\n overrides?: Partial<JmpPublicEnv>,\n): JmpPublicEnv {\n const fromEnv = readJmpPublicEnvFromProcessEnv()\n\n return {\n analyticsUrl: firstDefined(overrides?.analyticsUrl, fromEnv.analyticsUrl),\n trackingKey: firstDefined(overrides?.trackingKey, fromEnv.trackingKey),\n requireConsent: overrides?.requireConsent ?? fromEnv.requireConsent,\n autoContactLinks:\n overrides?.autoContactLinks ?? fromEnv.autoContactLinks,\n }\n}\n\n/** Read from Astro/Vite `import.meta.env` in client scripts. */\nexport function readJmpPublicEnvFromImportMeta(\n meta: Record<string, unknown> | undefined,\n overrides?: Partial<JmpPublicEnv>,\n): JmpPublicEnv {\n const get = (key: string): string | undefined => {\n const v = meta?.[key]\n return typeof v === \"string\" && v.length > 0 ? v : undefined\n }\n\n const analyticsUrl = firstDefined(\n overrides?.analyticsUrl,\n get(\"PUBLIC_JMP_ANALYTICS_URL\"),\n get(\"NEXT_PUBLIC_JMP_ANALYTICS_URL\"),\n )\n const trackingKey = firstDefined(\n overrides?.trackingKey,\n get(\"PUBLIC_JMP_TRACKING_KEY\"),\n get(\"NEXT_PUBLIC_JMP_TRACKING_KEY\"),\n )\n const requireConsentRaw = firstDefined(\n overrides?.requireConsent !== undefined\n ? String(overrides.requireConsent)\n : undefined,\n get(\"PUBLIC_JMP_ANALYTICS_REQUIRE_CONSENT\"),\n get(\"NEXT_PUBLIC_JMP_ANALYTICS_REQUIRE_CONSENT\"),\n )\n const autoContactRaw = firstDefined(\n overrides?.autoContactLinks !== undefined\n ? String(overrides.autoContactLinks)\n : undefined,\n get(\"PUBLIC_JMP_AUTO_CONTACT_LINKS\"),\n get(\"NEXT_PUBLIC_JMP_AUTO_CONTACT_LINKS\"),\n )\n\n return {\n analyticsUrl,\n trackingKey,\n requireConsent: requireConsentRaw === \"true\",\n autoContactLinks: autoContactRaw === \"true\",\n }\n}\n","import type { JmpContentManifest } from \"./content/manifest\"\nimport type { JmpContentConfig, JmpContentWrapper } from \"./types\"\nimport { readJmpPublicEnvFromProcess } from \"./env-public\"\n\nexport type JmpSiteSocialLinks = {\n linkedin: string | null\n instagram: string | null\n facebook: string | null\n x: string | null\n youtube: string | null\n}\n\n/** Per-site values used when the dashboard profile is missing or fields are empty. */\nexport type JmpSiteContactFallback = {\n displayName?: string\n founderName?: string\n email?: string\n phone?: string | null\n linkedin?: string | null\n instagram?: string | null\n facebook?: string | null\n x?: string | null\n youtube?: string | null\n hours?: string | null\n serviceArea?: string | null\n address?: string | null\n googleMapsUrl?: string | null\n googleMapsEmbedUrl?: string | null\n dashboardDemoUrl?: string\n profilePhotoSrc?: string\n privacyUrl?: string\n termsUrl?: string\n}\n\nexport type JmpSiteDefinition = {\n /**\n * Optional override. Wrappers are auto-discovered when content loaders run\n * (`loadBlogPosts`, `loadFaqs`, etc.) and reported to the dashboard.\n */\n contentWrappers?: JmpContentWrapper[]\n /**\n * Routes, trust block order, and contact extras for dashboard layout sync.\n * Reported with capabilities when the site loads content from the portal.\n */\n contentManifest?: JmpContentManifest\n /**\n * Public site origin (no trailing slash), e.g. `https://example.com`.\n * Used to resolve relative profile image paths in structured data.\n */\n siteUrl?: string\n /**\n * JMP dashboard origin (no trailing slash), e.g. `https://portal.example.com`.\n * Fallback when `NEXT_PUBLIC_JMP_ANALYTICS_URL` is missing from the client bundle.\n */\n analyticsPortalUrl?: string\n contactFallback?: JmpSiteContactFallback\n /**\n * `extras` keys to read from the dashboard site profile (hyphenated keys from admin).\n */\n contactExtraKeys?: {\n founderName?: readonly string[]\n dashboardDemoUrl?: readonly string[]\n profilePhotoSrc?: readonly string[]\n hours?: readonly string[]\n serviceArea?: readonly string[]\n googleMapsEmbedUrl?: readonly string[]\n }\n}\n\nlet registeredSite: JmpSiteDefinition | null = null\n\n/**\n * Register site-specific JMP integration options once (typically from `jmp.config.ts`).\n * Call at module load time before server content or instrumentation runs.\n */\nexport function defineJmpSite(definition: JmpSiteDefinition): JmpSiteDefinition {\n registeredSite = definition\n return definition\n}\n\nexport function getJmpSiteDefinition(): JmpSiteDefinition | null {\n return registeredSite\n}\n\n/** Server content + lead config: env vars + wrappers from {@link defineJmpSite}. */\nexport function getJmpContentConfig(): JmpContentConfig | null {\n const { analyticsUrl, trackingKey } = readJmpPublicEnvFromProcess()\n if (!analyticsUrl || !trackingKey) {\n return null\n }\n const site = getJmpSiteDefinition()\n return {\n baseUrl: analyticsUrl,\n trackingKey,\n contentWrappers: site?.contentWrappers ?? undefined,\n contentManifest: site?.contentManifest ?? undefined,\n }\n}\n","import type { JmpLandingPageKind } from \"../types\"\n\nexport type JmpLandingHubConfig = {\n title: string\n path: string\n description: string\n breadcrumb: string\n segment: string\n}\n\nexport const JMP_LANDING_HUB: Record<JmpLandingPageKind, JmpLandingHubConfig> = {\n location: {\n title: \"Areas we serve\",\n path: \"/areas\",\n description: \"Local pages for cities and regions we work in.\",\n breadcrumb: \"Areas\",\n segment: \"areas\",\n },\n service: {\n title: \"Services\",\n path: \"/services\",\n description: \"What we offer and how we help.\",\n breadcrumb: \"Services\",\n segment: \"services\",\n },\n}\n\nexport function jmpLandingKindSegment(kind: JmpLandingPageKind): string {\n return JMP_LANDING_HUB[kind].segment\n}\n","import { getJmpSiteDefinition } from \"../site-config\"\nimport type { JmpLandingPage, JmpLandingPageKind } from \"../types\"\nimport { jmpLandingKindSegment } from \"./hub\"\n\n/** Strip lightweight markdown for meta descriptions and schema text fields. */\nexport function plainTextFromMarkdown(input: string, maxLength = 5000): string {\n return input.replace(/[#*_`[\\]]/g, \"\").trim().slice(0, maxLength)\n}\n\nexport function resolveJmpSiteUrl(override?: string): string | null {\n const fromArg = override?.trim().replace(/\\/$/, \"\")\n if (fromArg) return fromArg\n const fromConfig = getJmpSiteDefinition()?.siteUrl?.trim().replace(/\\/$/, \"\")\n return fromConfig || null\n}\n\nexport function absoluteJmpSiteUrl(path: string, siteUrl?: string): string {\n const base = resolveJmpSiteUrl(siteUrl)\n if (!base) {\n return path.startsWith(\"/\") ? path : `/${path}`\n }\n const normalized = path.startsWith(\"/\") ? path : `/${path}`\n return `${base}${normalized}`\n}\n\nexport function filterJmpLandingPagesForDefaultLocale(\n pages: JmpLandingPage[],\n kind: JmpLandingPageKind\n): JmpLandingPage[] {\n const segment = jmpLandingKindSegment(kind)\n return pages.filter((page) => {\n const parts = page.path.split(\"/\").filter(Boolean)\n return parts[0] === segment\n })\n}\n\n/** Pages whose path is `/{locale}/{areas|services}/{slug}` (three+ segments). */\nexport function filterJmpLandingPagesForLocalizedRoutes(\n pages: JmpLandingPage[],\n kind: JmpLandingPageKind\n): JmpLandingPage[] {\n const segment = jmpLandingKindSegment(kind)\n return pages.filter((page) => {\n const parts = page.path.split(\"/\").filter(Boolean)\n return parts.length >= 3 && parts[1] === segment\n })\n}\n\nexport function jmpLocalizedLandingStaticParams(\n pages: JmpLandingPage[],\n kind: JmpLandingPageKind\n): { locale: string; slug: string }[] {\n return filterJmpLandingPagesForLocalizedRoutes(pages, kind).map((page) => {\n const [locale, , slug] = page.path.split(\"/\").filter(Boolean)\n return { locale: locale!, slug: slug! }\n })\n}\n","import type { JmpServerRequestLike } from \"./types\"\n\n/** CDN / Next.js often return HTML error pages; API errors are JSON */\nexport function responseLooksLikeHtml(body: string): boolean {\n const s = body.trimStart()\n return (\n s.startsWith(\"<!\") ||\n s.toLowerCase().startsWith(\"<html\") ||\n (s.startsWith(\"<\") && /<html[\\s>]/i.test(s.slice(0, 500)))\n )\n}\n\nexport function normalizeBaseUrl(baseUrl: string): string {\n return baseUrl.replace(/\\/$/, \"\")\n}\n\nexport function getHeader(\n headers: JmpServerRequestLike[\"headers\"] | undefined,\n key: string\n): string | null {\n if (!headers) {\n return null\n }\n if (typeof (headers as Pick<Headers, \"get\">).get === \"function\") {\n return (headers as Pick<Headers, \"get\">).get(key)\n }\n const record = headers as Record<string, string | string[] | undefined | null>\n const direct = record[key] ?? record[key.toLowerCase()]\n if (Array.isArray(direct)) {\n return direct[0] ?? null\n }\n return direct ?? null\n}\n\nexport function pathFromRequestUrl(url: string | undefined): string {\n if (!url) {\n return \"/\"\n }\n try {\n const u = new URL(url)\n return `${u.pathname}${u.search}`\n } catch {\n return url.startsWith(\"/\") ? url : \"/\"\n }\n}\n\nexport function resolveFetch(\n fetchImpl: typeof fetch | undefined,\n context: string\n): typeof fetch {\n const resolved =\n fetchImpl ??\n (typeof globalThis !== \"undefined\" && globalThis.fetch\n ? globalThis.fetch.bind(globalThis)\n : undefined)\n if (!resolved) {\n throw new Error(`${context}: fetch is not available; pass fetchImpl in config`)\n }\n return resolved\n}\n\ntype ApiErrorJson = {\n error?: string\n code?: string\n hint?: string\n expectedDomain?: string\n}\n\nexport function formatApiErrorMessage(\n status: number,\n text: string,\n prefix: string\n): string {\n if (responseLooksLikeHtml(text)) {\n return `${prefix} HTTP ${status} — response was HTML (not the JSON API). Check baseUrl points at the JMP Analytics dashboard.`\n }\n let parsed: ApiErrorJson = {}\n try {\n parsed = JSON.parse(text) as ApiErrorJson\n } catch {\n parsed = { error: text }\n }\n const detail = parsed.error ?? text\n return [\n `${prefix} HTTP ${status}`,\n parsed.code ? `[${parsed.code}]` : null,\n detail,\n parsed.hint ? `Hint: ${parsed.hint}` : null,\n parsed.expectedDomain\n ? `Domain in JMP admin: ${parsed.expectedDomain}`\n : null,\n ]\n .filter(Boolean)\n .join(\" — \")\n}\n","import { resolveJmpSiteUrl } from \"./landing-pages/utils\"\n\n/**\n * Site origin for server-to-server JMP API calls (content + ingest).\n * Prefer `defineJmpSite({ siteUrl })`, then `NEXT_PUBLIC_SITE_URL`.\n */\nexport function resolveJmpRequestOrigin(): string | null {\n const fromSite = resolveJmpSiteUrl()\n if (fromSite) {\n return fromSite\n }\n if (typeof process === \"undefined\") {\n return null\n }\n return process.env.NEXT_PUBLIC_SITE_URL?.trim().replace(/\\/$/, \"\") || null\n}\n\n/** Adds `Origin` when a site URL is known (required for production write/ingest checks). */\nexport function withJmpOriginHeader(\n headers: Record<string, string>\n): Record<string, string> {\n const origin = resolveJmpRequestOrigin()\n if (!origin) {\n return headers\n }\n return { ...headers, Origin: origin }\n}\n","import {\n getHeader,\n normalizeBaseUrl,\n pathFromRequestUrl,\n} from \"../http\"\nimport { withJmpOriginHeader } from \"../request-origin\"\nimport type { JmpContentConfig, TrackServerPageViewOptions } from \"../types\"\n\nexport async function trackJmpServerPageView(\n config: JmpContentConfig,\n options: TrackServerPageViewOptions = {}\n): Promise<void> {\n const baseUrl = normalizeBaseUrl(config.baseUrl)\n const resolvedFetch =\n config.fetchImpl ??\n (typeof globalThis !== \"undefined\" && globalThis.fetch\n ? globalThis.fetch.bind(globalThis)\n : undefined)\n\n if (!resolvedFetch) {\n throw new Error(\"JMP server analytics: fetch is not available; pass fetchImpl in config\")\n }\n\n const visitorUserAgent =\n options.userAgent ?? getHeader(options.request?.headers, \"user-agent\")\n const visitorReferer =\n options.referer ?? getHeader(options.request?.headers, \"referer\")\n const path = options.path ?? pathFromRequestUrl(options.request?.url)\n\n const headers: Record<string, string> = withJmpOriginHeader({\n \"Content-Type\": \"application/json\",\n \"X-JMP-Tracking-Key\": config.trackingKey,\n })\n if (visitorUserAgent) {\n headers[\"X-JMP-Visitor-User-Agent\"] = visitorUserAgent\n }\n if (visitorReferer) {\n headers[\"X-JMP-Visitor-Referer\"] = visitorReferer\n }\n\n const payload: Record<string, unknown> = {\n type: \"page_view\",\n path: path || \"/\",\n metadata:\n options.metadata && typeof options.metadata === \"object\"\n ? options.metadata\n : {},\n }\n if (options.sessionId) {\n payload.sessionId = options.sessionId\n }\n\n const url = `${baseUrl}/api/events`\n if (config.debug) {\n console.debug(\"[@jmp-technologies/analytics]\", \"POST\", url, payload)\n }\n\n const res = await resolvedFetch(url, {\n method: \"POST\",\n headers,\n body: JSON.stringify(payload),\n })\n\n if (!res.ok) {\n const text = await res.text()\n throw new Error(`JMP server analytics HTTP ${res.status} — ${text}`)\n }\n}\n"],"mappings":";AAYA,SAAS,gBAAgB,QAAoD;AAC3E,aAAW,KAAK,QAAQ;AACtB,QAAI,EAAG,QAAO;AAAA,EAChB;AACA,SAAO;AACT;AAGA,SAAS,iCAA4D;AACnE,MAAI,OAAO,YAAY,eAAe,CAAC,QAAQ,KAAK;AAClD,WAAO,CAAC;AAAA,EACV;AACA,QAAM,EAAE,IAAI,IAAI;AAChB,QAAM,eAAe;AAAA,IACnB,IAAI;AAAA,IACJ,IAAI;AAAA,EACN;AACA,QAAM,cAAc;AAAA,IAClB,IAAI;AAAA,IACJ,IAAI;AAAA,EACN;AACA,QAAM,oBAAoB;AAAA,IACxB,IAAI;AAAA,IACJ,IAAI;AAAA,EACN;AACA,QAAM,iBAAiB;AAAA,IACrB,IAAI;AAAA,IACJ,IAAI;AAAA,EACN;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,gBAAgB,sBAAsB;AAAA,IACtC,kBAAkB,mBAAmB;AAAA,EACvC;AACF;AAGO,SAAS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A,EACrE;AACF;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/contact-link-classifier.ts","../package.json","../src/constants.ts","../src/consent.ts","../src/tracker/page-view-dedupe.ts","../src/tracker/helpers.ts","../src/tracker/create-jmp-analytics.ts","../src/content/manifest.ts","../src/content/fetch.ts","../src/content/wrapper-discovery.ts","../src/content/api.ts","../src/content/client.ts","../src/env/browser.ts"],"sourcesContent":["/**\n * Classify outbound contact links for auto-tracking.\n *\n * Keep channel set in sync with `lib/ingest/contact-click.ts` on the dashboard side.\n *\n * Channels detected from `href` alone (no widget / iframe detection):\n *\n * - `call` — `tel:` (delegates to existing `trackCallClick`)\n * - `email` — `mailto:` (delegates to existing `trackEmailClick`)\n * - `sms` — `sms:` / `smsto:`\n * - `whatsapp` — `wa.me`, `api.whatsapp.com`, `whatsapp.com/send`\n * - `maps` — Google Maps, Apple Maps, `maps.app.goo.gl`, `geo:`\n * - `booking` — fixed allowlist of common scheduling hosts (see {@link BOOKING_LINK_HOSTS})\n *\n * `linkHost` returned in `contact_click` results is the hostname only — never the full URL\n * (avoids leaking phone numbers in `tel:`/`sms:` URLs and PII-laden booking query strings).\n */\n\nexport type ContactLinkChannel = \"sms\" | \"whatsapp\" | \"maps\" | \"booking\"\n\nexport type ClassifiedContactLink =\n | { kind: \"call\" }\n | { kind: \"email\" }\n | { kind: \"contact_click\"; channel: ContactLinkChannel; linkHost: string | null }\n\n/** v1 booking hosts (~80%+ SMB coverage). Add hosts here when a client uses something rare. */\nexport const BOOKING_LINK_HOSTS = [\n \"calendly.com\",\n \"cal.com\",\n \"acuityscheduling.com\",\n \"calendar.google.com\",\n \"calendar.app.google\",\n \"bookings.microsoft.com\",\n \"outlook.office.com\",\n \"outlook.office365.com\",\n \"book.ms\",\n \"setmore.com\",\n \"simplybook.me\",\n \"oncehub.com\",\n \"scheduleonce.com\",\n \"youcanbook.me\",\n \"savvycal.com\",\n \"tidycal.com\",\n \"zohobookings.com\",\n \"square.site\",\n \"squareup.com\",\n \"meetings.hubspot.com\",\n \"jobber.com\",\n \"housecallpro.com\",\n \"servicetitan.com\",\n \"thryv.com\",\n \"honeybook.com\",\n \"dubsado.com\",\n \"fresha.com\",\n \"booksy.com\",\n \"vagaro.com\",\n \"mindbodyonline.com\",\n \"mindbody.io\",\n \"janeapp.com\",\n \"cliniko.com\",\n \"practicebetter.io\",\n] as const\n\nconst WHATSAPP_HOSTS = [\"wa.me\", \"api.whatsapp.com\", \"whatsapp.com\"] as const\n\nexport function hostnameMatches(host: string, pattern: string): boolean {\n const h = host.toLowerCase()\n const p = pattern.toLowerCase()\n return h === p || h.endsWith(`.${p}`)\n}\n\nfunction isMapsHost(host: string, pathname: string): boolean {\n if (hostnameMatches(host, \"maps.apple.com\")) {\n return true\n }\n if (hostnameMatches(host, \"maps.app.goo.gl\")) {\n return true\n }\n if (hostnameMatches(host, \"google.com\") || hostnameMatches(host, \"google.co\")) {\n return pathname === \"/maps\" || pathname.startsWith(\"/maps/\") || pathname.startsWith(\"/local\")\n }\n return false\n}\n\nfunction isWhatsAppHost(host: string, pathname: string): boolean {\n for (const pattern of WHATSAPP_HOSTS) {\n if (!hostnameMatches(host, pattern)) {\n continue\n }\n if (pattern === \"whatsapp.com\") {\n return pathname.startsWith(\"/send\")\n }\n return true\n }\n return false\n}\n\nfunction isBookingHost(host: string): boolean {\n for (const pattern of BOOKING_LINK_HOSTS) {\n if (hostnameMatches(host, pattern)) {\n return true\n }\n }\n return false\n}\n\nexport function classifyContactHref(href: string): ClassifiedContactLink | null {\n const raw = href.trim()\n if (!raw || raw.startsWith(\"#\") || raw.startsWith(\"javascript:\")) {\n return null\n }\n\n const lower = raw.toLowerCase()\n\n if (lower.startsWith(\"tel:\")) {\n return { kind: \"call\" }\n }\n if (lower.startsWith(\"mailto:\")) {\n return { kind: \"email\" }\n }\n if (lower.startsWith(\"sms:\") || lower.startsWith(\"smsto:\")) {\n return { kind: \"contact_click\", channel: \"sms\", linkHost: null }\n }\n if (lower.startsWith(\"geo:\")) {\n return { kind: \"contact_click\", channel: \"maps\", linkHost: null }\n }\n\n // Skip anchors/relative paths that aren't a known contact scheme.\n if (raw.startsWith(\"/\") || raw.startsWith(\"?\")) {\n return null\n }\n\n let url: URL\n try {\n url = new URL(raw)\n } catch {\n return null\n }\n\n if (url.protocol !== \"http:\" && url.protocol !== \"https:\") {\n return null\n }\n\n const host = url.hostname.toLowerCase()\n const pathname = url.pathname.toLowerCase()\n\n if (isWhatsAppHost(host, pathname)) {\n return { kind: \"contact_click\", channel: \"whatsapp\", linkHost: host }\n }\n if (isMapsHost(host, pathname)) {\n return { kind: \"contact_click\", channel: \"maps\", linkHost: host }\n }\n if (isBookingHost(host)) {\n return { kind: \"contact_click\", channel: \"booking\", linkHost: host }\n }\n\n return null\n}\n\n/** Phone number from a `tel:` href (for CRM logs — not sent on `contact_click`). */\nexport function extractTelTarget(href: string): string | null {\n const raw = href.trim()\n if (!raw.toLowerCase().startsWith(\"tel:\")) {\n return null\n }\n const target = decodeURIComponent(\n raw.slice(4).split(\"?\")[0]?.split(\";\")[0] ?? \"\"\n ).trim()\n return target || null\n}\n\n/** Email address from a `mailto:` href (for CRM logs). */\nexport function extractMailtoTarget(href: string): string | null {\n const raw = href.trim()\n if (!raw.toLowerCase().startsWith(\"mailto:\")) {\n return null\n }\n const target = decodeURIComponent(\n raw.slice(7).split(\"?\")[0]?.split(\",\")[0] ?? \"\"\n ).trim()\n return target || null\n}\n","{\n \"name\": \"@jmp-technologies/analytics\",\n \"version\": \"0.1.37\",\n \"description\": \"JMP Analytics tracking plus blog, FAQ, trust content, and site contact profile for client websites\",\n \"license\": \"UNLICENSED\",\n \"keywords\": [\n \"jmp\",\n \"analytics\",\n \"tracking\",\n \"jmp-analytics\"\n ],\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/jmp-technologies/jmp-dashboard.git\",\n \"directory\": \"packages/jmp-technologies-analytics\"\n },\n \"homepage\": \"https://github.com/jmp-technologies/jmp-dashboard/tree/main/packages/jmp-technologies-analytics#readme\",\n \"bugs\": {\n \"url\": \"https://github.com/jmp-technologies/jmp-dashboard/issues\"\n },\n \"type\": \"module\",\n \"bin\": {\n \"jmp-init\": \"./bin/jmp-init.mjs\"\n },\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n },\n \"./react\": {\n \"types\": \"./dist/react.d.ts\",\n \"import\": \"./dist/react.js\",\n \"require\": \"./dist/react.cjs\"\n },\n \"./next\": {\n \"types\": \"./dist/next.d.ts\",\n \"import\": \"./dist/next.js\",\n \"require\": \"./dist/next.cjs\"\n },\n \"./next/site-root-server\": {\n \"types\": \"./dist/next/site-root-server.d.ts\",\n \"import\": \"./dist/next/site-root-server.js\",\n \"require\": \"./dist/next/site-root-server.cjs\"\n },\n \"./next/landing-capture-script-server\": {\n \"types\": \"./dist/next/landing-capture-script-server.d.ts\",\n \"import\": \"./dist/next/landing-capture-script-server.js\",\n \"require\": \"./dist/next/landing-capture-script-server.cjs\"\n },\n \"./next/middleware\": {\n \"types\": \"./dist/next/middleware.d.ts\",\n \"import\": \"./dist/next/middleware.js\",\n \"require\": \"./dist/next/middleware.cjs\"\n },\n \"./next/instrumentation\": {\n \"types\": \"./dist/next/instrumentation.d.ts\",\n \"import\": \"./dist/next/instrumentation.js\",\n \"require\": \"./dist/next/instrumentation.cjs\"\n },\n \"./next/content\": {\n \"types\": \"./dist/next/content.d.ts\",\n \"import\": \"./dist/next/content.js\",\n \"require\": \"./dist/next/content.cjs\"\n },\n \"./next/landing-pages\": {\n \"types\": \"./dist/next/landing-pages.d.ts\",\n \"import\": \"./dist/next/landing-pages.js\",\n \"require\": \"./dist/next/landing-pages.cjs\"\n },\n \"./next/locations\": {\n \"types\": \"./dist/next/locations.d.ts\",\n \"import\": \"./dist/next/locations.js\",\n \"require\": \"./dist/next/locations.cjs\"\n },\n \"./astro/content\": {\n \"types\": \"./dist/astro/content.d.ts\",\n \"import\": \"./dist/astro/content.js\",\n \"require\": \"./dist/astro/content.cjs\"\n },\n \"./astro/client\": {\n \"types\": \"./dist/astro/client.d.ts\",\n \"import\": \"./dist/astro/client.js\",\n \"require\": \"./dist/astro/client.cjs\"\n },\n \"./astro/middleware\": {\n \"types\": \"./dist/astro/middleware.d.ts\",\n \"import\": \"./dist/astro/middleware.js\",\n \"require\": \"./dist/astro/middleware.cjs\"\n },\n \"./astro/register\": {\n \"types\": \"./dist/astro/register.d.ts\",\n \"import\": \"./dist/astro/register.js\",\n \"require\": \"./dist/astro/register.cjs\"\n },\n \"./astro/integration\": {\n \"types\": \"./dist/astro/integration.d.ts\",\n \"import\": \"./dist/astro/integration.js\",\n \"require\": \"./dist/astro/integration.cjs\"\n }\n },\n \"files\": [\n \"dist\",\n \"bin\",\n \"docs\",\n \"README.md\"\n ],\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"scripts\": {\n \"build\": \"tsup src/index.ts src/react.tsx src/next.tsx src/next/google-tag.tsx src/next/landing-capture-script-server.tsx src/next/site-root-server.tsx src/next/middleware.ts src/next/instrumentation.ts src/next/content.ts src/next/landing-pages.tsx src/next/locations.tsx src/astro/content.ts src/astro/client.ts src/astro/middleware.ts src/astro/register.ts src/astro/integration.ts --format esm,cjs --dts --clean --sourcemap --external react --external react-dom --external next\",\n \"prepublishOnly\": \"npm run build\"\n },\n \"peerDependencies\": {\n \"next\": \">=14\",\n \"react\": \">=18\",\n \"react-dom\": \">=18\"\n },\n \"peerDependenciesMeta\": {\n \"react\": {\n \"optional\": true\n },\n \"react-dom\": {\n \"optional\": true\n },\n \"next\": {\n \"optional\": true\n },\n \"astro\": {\n \"optional\": true\n }\n },\n \"devDependencies\": {\n \"@types/react\": \"^19\",\n \"@types/react-dom\": \"^19\",\n \"next\": \"^16.2.3\",\n \"react\": \"^19.2.0\",\n \"react-dom\": \"^19.2.0\",\n \"tsup\": \"^8.5.1\",\n \"typescript\": \"^5.9.3\"\n },\n \"dependencies\": {}\n}\n","import { version as packageVersion } from \"../package.json\"\n\n/** Published package version — sent with capabilities for admin readiness. */\nexport const JMP_ANALYTICS_SDK_VERSION = packageVersion\n\n/** `localStorage` key when {@link JmpAnalyticsConfig.requireConsent} is enabled. */\nexport const JMP_TRACKING_CONSENT_STORAGE_KEY = \"jmp_analytics_consent_v1\"\n\n/** Default `pageViewDedupeMs` when resolving browser config from env (Strict Mode / SPA). */\nexport const DEFAULT_JMP_BROWSER_PAGE_VIEW_DEDUPE_MS = 2500\n\n/** Marks links tracked explicitly — skips delegated `autoTrackContactLinks` handler. */\nexport const JMP_TRACKED_LINK_ATTR = \"data-jmp-tracked\"\n","import { captureLandingAttribution } from \"./landing-capture\"\nimport { JMP_TRACKING_CONSENT_STORAGE_KEY } from \"./constants\"\n\nlet moduleTrackingConsentGranted = true\nconst trackingConsentListeners = new Set<() => void>()\n\nfunction readStoredTrackingConsent(): boolean {\n if (typeof window === \"undefined\") {\n return false\n }\n try {\n return (\n localStorage.getItem(JMP_TRACKING_CONSENT_STORAGE_KEY) === \"granted\"\n )\n } catch {\n return false\n }\n}\n\n/** Initialize consent gate when creating a tracker (browser only). */\nexport function initJmpTrackingConsent(requireConsent: boolean | undefined): void {\n moduleTrackingConsentGranted = requireConsent\n ? readStoredTrackingConsent()\n : true\n}\n\n/** Whether analytics events may be sent (after CMP / cookie banner). */\nexport function isJmpTrackingConsentGranted(): boolean {\n return moduleTrackingConsentGranted\n}\n\n/** Subscribe to consent changes (for React `useSyncExternalStore`). */\nexport function subscribeJmpTrackingConsent(listener: () => void): () => void {\n trackingConsentListeners.add(listener)\n return () => {\n trackingConsentListeners.delete(listener)\n }\n}\n\n/**\n * Grant or deny analytics. Persists in `localStorage` when `requireConsent` is used.\n * Call from your cookie banner before tracking runs.\n */\nexport function setJmpTrackingConsent(granted: boolean): void {\n if (moduleTrackingConsentGranted === granted) {\n return\n }\n moduleTrackingConsentGranted = granted\n if (typeof window !== \"undefined\") {\n try {\n localStorage.setItem(\n JMP_TRACKING_CONSENT_STORAGE_KEY,\n granted ? \"granted\" : \"denied\"\n )\n } catch {\n // private mode\n }\n if (granted) {\n captureLandingAttribution(window.location.hostname)\n }\n }\n for (const listener of trackingConsentListeners) {\n listener()\n }\n}\n","export const JMP_PAGE_VIEW_DEDUPE_STORAGE_KEY = \"jmp_analytics_last_pv\"\n\nlet moduleLastPath = \"\"\nlet moduleLastAt = 0\n\n/**\n * Suppress duplicate browser `page_view` within `dedupeMs` (Strict Mode, App Router\n * searchParams resolution, multiple bundles). Uses pathname-only as the dedupe key.\n */\nexport function shouldDedupeBrowserPageView(\n pathname: string,\n dedupeMs: number,\n storage: Pick<Storage, \"getItem\" | \"setItem\"> | null = null,\n): boolean {\n if (dedupeMs <= 0) {\n return false\n }\n\n const now = Date.now()\n if (pathname === moduleLastPath && now - moduleLastAt < dedupeMs) {\n return true\n }\n\n try {\n const raw = storage?.getItem(JMP_PAGE_VIEW_DEDUPE_STORAGE_KEY)\n if (raw) {\n const prev = JSON.parse(raw) as { path: string; at: number }\n if (prev.path === pathname && now - prev.at < dedupeMs) {\n return true\n }\n }\n storage?.setItem(\n JMP_PAGE_VIEW_DEDUPE_STORAGE_KEY,\n JSON.stringify({ path: pathname, at: now }),\n )\n } catch {\n // private mode / disabled storage\n }\n\n moduleLastPath = pathname\n moduleLastAt = now\n return false\n}\n\n/** @internal test helper */\nexport function resetBrowserPageViewDedupeForTests(): void {\n moduleLastPath = \"\"\n moduleLastAt = 0\n}\n","import {\n captureLandingAttribution,\n JMP_UTM_PARAM_KEYS,\n} from \"../landing-capture\"\n\nexport function captureAndGetLandingReferer(): string | null {\n if (typeof window === \"undefined\") {\n return null\n }\n return captureLandingAttribution(window.location.hostname).landingReferer\n}\n\nexport function mergeSessionUtms(metadata: Record<string, unknown>) {\n if (typeof window === \"undefined\") {\n return\n }\n const { utm } = captureLandingAttribution(window.location.hostname)\n for (const key of JMP_UTM_PARAM_KEYS) {\n if (metadata[key] === undefined && utm[key]) {\n metadata[key] = utm[key]\n }\n }\n}\n\nexport function splitPathAndSearch(pathInput: string): {\n pathname: string\n search: string\n} {\n const qIndex = pathInput.indexOf(\"?\")\n if (qIndex === -1) {\n return { pathname: pathInput || \"/\", search: \"\" }\n }\n return {\n pathname: pathInput.slice(0, qIndex) || \"/\",\n search: pathInput.slice(qIndex + 1),\n }\n}\n\nexport function inferDevice(): string {\n if (typeof window === \"undefined\") {\n return \"unknown\"\n }\n return window.innerWidth < 768 ? \"mobile\" : \"desktop\"\n}\n","import { DEFAULT_JMP_BROWSER_PAGE_VIEW_DEDUPE_MS } from \"../constants\"\nimport {\n captureLandingAttribution,\n getOrCreateSessionIdFromStorage,\n JMP_UTM_PARAM_KEYS,\n} from \"../landing-capture\"\nimport { shouldDedupeBrowserPageView } from \"./page-view-dedupe\"\nimport { classifyContactHref, extractMailtoTarget, extractTelTarget } from \"../contact-link-classifier\"\nimport type { ContactLinkChannel } from \"../contact-link-classifier\"\nimport {\n initJmpTrackingConsent,\n isJmpTrackingConsentGranted,\n setJmpTrackingConsent,\n} from \"../consent\"\nimport {\n formatApiErrorMessage,\n normalizeBaseUrl,\n resolveFetch,\n} from \"../http\"\nimport type {\n JmpAnalyticsConfig,\n JmpEventType,\n TrackLeadOptions,\n TrackPageViewOptions,\n} from \"../types\"\nimport {\n captureAndGetLandingReferer,\n inferDevice,\n mergeSessionUtms,\n splitPathAndSearch,\n} from \"./helpers\"\n\nexport function createJmpAnalytics(config: JmpAnalyticsConfig) {\n const baseUrl = normalizeBaseUrl(config.baseUrl)\n const fetchFn = resolveFetch(config.fetchImpl, \"createJmpAnalytics\")\n\n initJmpTrackingConsent(config.requireConsent)\n\n function canSend(): boolean {\n return isJmpTrackingConsentGranted()\n }\n\n async function send(body: Record<string, unknown>) {\n if (!canSend()) {\n return\n }\n\n const url = `${baseUrl}/api/events`\n const headers: Record<string, string> = {\n \"Content-Type\": \"application/json\",\n \"X-JMP-Tracking-Key\": config.trackingKey,\n }\n\n if (body.type === \"page_view\" && typeof window !== \"undefined\") {\n const landingReferer = captureAndGetLandingReferer()\n if (landingReferer) {\n headers[\"X-JMP-Visitor-Referer\"] = landingReferer\n }\n }\n\n const sid = getOrCreateSessionIdFromStorage()\n const payload = { ...body, ...(sid ? { sessionId: sid } : {}) }\n\n if (config.debug) {\n console.debug(\"[@jmp-technologies/analytics]\", \"POST\", url, payload)\n }\n\n const res = await fetchFn(url, {\n method: \"POST\",\n headers,\n body: JSON.stringify(payload),\n keepalive: true,\n })\n\n if (!res.ok) {\n const text = await res.text()\n const message = formatApiErrorMessage(res.status, text, \"JMP Analytics\")\n if (config.debug) {\n console.debug(\"[@jmp-technologies/analytics]\", \"error response\", { status: res.status, raw: text })\n }\n throw new Error(message)\n }\n }\n\n async function sendLead(body: Record<string, unknown>) {\n if (!canSend()) {\n return\n }\n\n const url = `${baseUrl}/api/leads`\n const headers: Record<string, string> = {\n \"Content-Type\": \"application/json\",\n \"X-JMP-Tracking-Key\": config.trackingKey,\n }\n\n const sid = getOrCreateSessionIdFromStorage()\n const payload = { ...body, ...(sid ? { sessionId: sid } : {}) }\n\n if (config.debug) {\n console.debug(\"[@jmp-technologies/analytics]\", \"POST\", url, payload)\n }\n\n const res = await fetchFn(url, {\n method: \"POST\",\n headers,\n body: JSON.stringify(payload),\n keepalive: true,\n })\n\n if (!res.ok) {\n const text = await res.text()\n const message = formatApiErrorMessage(res.status, text, \"JMP Analytics\")\n if (config.debug) {\n console.debug(\"[@jmp-technologies/analytics]\", \"error response\", { status: res.status, raw: text })\n }\n throw new Error(message)\n }\n }\n\n function trackPageView(options?: TrackPageViewOptions) {\n if (!canSend()) {\n return Promise.resolve()\n }\n\n const pathFromOptions = options?.path?.trim()\n let pathname = \"/\"\n let search = \"\"\n\n if (pathFromOptions) {\n const split = splitPathAndSearch(pathFromOptions)\n pathname = split.pathname\n search = split.search\n } else if (typeof window !== \"undefined\") {\n pathname = window.location.pathname\n search = window.location.search.replace(/^\\?/, \"\")\n }\n\n if (!search && typeof window !== \"undefined\") {\n search = window.location.search.replace(/^\\?/, \"\")\n }\n\n const path = search ? `${pathname}?${search}` : pathname\n\n const dedupeMs =\n config.pageViewDedupeMs ?? DEFAULT_JMP_BROWSER_PAGE_VIEW_DEDUPE_MS\n const storage =\n typeof window !== \"undefined\" ? window.sessionStorage : null\n if (shouldDedupeBrowserPageView(pathname, dedupeMs, storage)) {\n return Promise.resolve()\n }\n\n const metadata: Record<string, unknown> =\n options?.metadata && typeof options.metadata === \"object\"\n ? { ...options.metadata }\n : {}\n\n if (typeof window !== \"undefined\") {\n metadata.pageHostname = window.location.hostname\n const params = new URLSearchParams(\n search ? `?${search}` : window.location.search\n )\n for (const key of JMP_UTM_PARAM_KEYS) {\n const v = params.get(key)\n if (v && metadata[key] === undefined) {\n metadata[key] = v\n }\n }\n mergeSessionUtms(metadata)\n const landingReferer = captureAndGetLandingReferer()\n if (landingReferer && metadata.referer === undefined) {\n metadata.referer = landingReferer\n }\n }\n\n return send({\n type: \"page_view\",\n path: path || \"/\",\n device: options?.device ?? inferDevice(),\n country: options?.country,\n metadata,\n })\n }\n\n function trackFormSubmit(\n path: string,\n metadata?: Record<string, unknown>\n ) {\n return send({\n type: \"form_submit\",\n path: path || \"/\",\n metadata: metadata ?? {},\n })\n }\n\n function trackCallClick(\n path: string,\n metadata?: Record<string, unknown>\n ) {\n return send({\n type: \"call_click\",\n path: path || \"/\",\n metadata: metadata ?? {},\n })\n }\n\n function trackEmailClick(\n path: string,\n metadata?: Record<string, unknown>\n ) {\n return send({\n type: \"email_click\",\n path: path || \"/\",\n metadata: metadata ?? {},\n })\n }\n\n function trackContactClick(\n path: string,\n options: {\n channel: ContactLinkChannel\n linkHost?: string | null\n metadata?: Record<string, unknown>\n }\n ) {\n const metadata: Record<string, unknown> = {\n ...(options.metadata && typeof options.metadata === \"object\"\n ? options.metadata\n : {}),\n channel: options.channel,\n }\n if (options.linkHost) {\n metadata.linkHost = options.linkHost\n }\n return send({\n type: \"contact_click\",\n path: path || \"/\",\n metadata,\n })\n }\n\n function trackLead(options?: TrackLeadOptions) {\n const path =\n options?.path ??\n (typeof window !== \"undefined\" ? window.location.pathname : \"/\")\n\n const body: Record<string, unknown> = { path: path || \"/\" }\n if (options?.name) body.name = options.name\n if (options?.email) body.email = options.email\n if (options?.phone) body.phone = options.phone\n if (options?.company) body.company = options.company\n if (options?.website) body.website = options.website\n if (options?.subject) body.subject = options.subject\n if (options?.message) body.message = options.message\n if (options?.metadata && typeof options.metadata === \"object\") {\n body.metadata = options.metadata\n }\n if (options?.sessionId) body.sessionId = options.sessionId\n\n return sendLead(body)\n }\n\n function track(\n type: JmpEventType,\n payload: {\n path: string\n metadata?: Record<string, unknown>\n source?: string\n device?: string\n country?: string\n }\n ) {\n if (type === \"page_view\") {\n return trackPageView({\n path: payload.path,\n source: payload.source,\n device: payload.device,\n country: payload.country,\n metadata: payload.metadata,\n })\n }\n if (type === \"form_submit\") {\n return trackFormSubmit(payload.path, payload.metadata)\n }\n if (type === \"call_click\") {\n return trackCallClick(payload.path, payload.metadata)\n }\n if (type === \"email_click\") {\n return trackEmailClick(payload.path, payload.metadata)\n }\n const meta = payload.metadata ?? {}\n const channel = typeof meta.channel === \"string\" ? meta.channel : \"\"\n const linkHost =\n typeof meta.linkHost === \"string\" ? (meta.linkHost as string) : null\n if (\n channel !== \"sms\" &&\n channel !== \"whatsapp\" &&\n channel !== \"maps\" &&\n channel !== \"booking\"\n ) {\n return Promise.resolve()\n }\n return trackContactClick(payload.path, {\n channel: channel as ContactLinkChannel,\n linkHost,\n metadata: meta,\n })\n }\n\n /**\n * Fire `page_view` on browser back/forward and when `history.pushState` /\n * `replaceState` are used (many SPAs). Call once after creating the tracker.\n * Returns an unsubscribe function.\n */\n function subscribeToSpaNavigation(): () => void {\n if (typeof window === \"undefined\") {\n return () => {}\n }\n\n let lastPath = window.location.pathname\n\n const run = () => {\n const path = window.location.pathname\n if (path !== lastPath) {\n lastPath = path\n void trackPageView({ path })\n }\n }\n\n window.addEventListener(\"popstate\", run)\n\n const push = history.pushState.bind(history)\n const replace = history.replaceState.bind(history)\n\n history.pushState = (...args: Parameters<History[\"pushState\"]>) => {\n const r = push(...args)\n queueMicrotask(run)\n return r\n }\n history.replaceState = (...args: Parameters<History[\"replaceState\"]>) => {\n const r = replace(...args)\n queueMicrotask(run)\n return r\n }\n\n return () => {\n window.removeEventListener(\"popstate\", run)\n history.pushState = push\n history.replaceState = replace\n }\n }\n\n let lastContactClickKey = \"\"\n let lastContactClickAt = 0\n\n /**\n * Capture-phase `click` listener that classifies outgoing links and records\n * the corresponding contact event. Returns an unsubscribe function. Safe to\n * call only in the browser; no-op on the server.\n */\n function subscribeContactLinkAutoTrack(): () => void {\n if (typeof window === \"undefined\" || typeof document === \"undefined\") {\n return () => {}\n }\n\n const handler = (event: MouseEvent) => {\n if (!canSend()) {\n return\n }\n const target = event.target\n if (!(target instanceof Element)) {\n return\n }\n const anchor = target.closest(\"a[href]\")\n if (!(anchor instanceof HTMLAnchorElement)) {\n return\n }\n if (\n anchor.closest(\"[data-jmp-no-track]\") ||\n anchor.closest(\"[data-jmp-tracked]\")\n ) {\n return\n }\n\n const href = anchor.getAttribute(\"href\") ?? \"\"\n const classified = classifyContactHref(href)\n if (!classified) {\n return\n }\n\n const path = window.location.pathname\n\n if (classified.kind === \"call\") {\n if (dedupeContactClick(`call_click:${path}`)) {\n return\n }\n const contactTarget = extractTelTarget(href)\n void trackCallClick(\n path,\n contactTarget ? { contactTarget } : undefined\n )\n return\n }\n if (classified.kind === \"email\") {\n if (dedupeContactClick(`email_click:${path}`)) {\n return\n }\n const contactTarget = extractMailtoTarget(href)\n void trackEmailClick(\n path,\n contactTarget ? { contactTarget } : undefined\n )\n return\n }\n if (dedupeContactClick(`contact_click:${classified.channel}:${path}`)) {\n return\n }\n void trackContactClick(path, {\n channel: classified.channel,\n linkHost: classified.linkHost,\n })\n }\n\n document.addEventListener(\"click\", handler, { capture: true })\n return () => {\n document.removeEventListener(\"click\", handler, { capture: true } as EventListenerOptions)\n }\n }\n\n function dedupeContactClick(key: string): boolean {\n const now = Date.now()\n if (key === lastContactClickKey && now - lastContactClickAt < 1000) {\n return true\n }\n lastContactClickKey = key\n lastContactClickAt = now\n return false\n }\n\n if (typeof window !== \"undefined\" && canSend()) {\n captureLandingAttribution(window.location.hostname)\n }\n\n if (\n typeof window !== \"undefined\" &&\n config.autoTrackContactLinks &&\n canSend()\n ) {\n subscribeContactLinkAutoTrack()\n }\n\n return {\n track,\n trackPageView,\n trackFormSubmit,\n trackCallClick,\n trackEmailClick,\n trackContactClick,\n trackLead,\n subscribeToSpaNavigation,\n subscribeContactLinkAutoTrack,\n setTrackingConsent: setJmpTrackingConsent,\n isTrackingConsentGranted: isJmpTrackingConsentGranted,\n }\n}\n\nexport type JmpAnalytics = ReturnType<typeof createJmpAnalytics>\n","/** Mirrors jmp-dashboard `lib/content/wrappers/client-manifest.ts` (keep in sync). */\n\nexport const JMP_CONTENT_MANIFEST_VERSION = 1\n\nexport type JmpTrustSection =\n | \"summary\"\n | \"testimonials\"\n | \"reviews\"\n | \"stats\"\n | \"logos\"\n | \"credentials\"\n\nexport type JmpContentRouteManifest = {\n wrapper: string\n pattern: string\n index?: string\n label?: string\n}\n\nexport type JmpTrustBlockManifest = {\n section: JmpTrustSection\n label?: string\n}\n\nexport type JmpContactExtraManifest = {\n key: string\n label: string\n}\n\nexport type JmpExternalSanitySourceManifest = {\n studioUrl?: string\n}\n\nexport type JmpExternalShopifySourceManifest = {\n adminUrl?: string\n storeUrl?: string\n}\n\nexport type JmpExternalAdminLinkManifest = {\n id: string\n label: string\n url: string\n}\n\nexport type JmpExternalSourcesManifest = {\n sanity?: JmpExternalSanitySourceManifest\n shopify?: JmpExternalShopifySourceManifest\n links?: JmpExternalAdminLinkManifest[]\n}\n\nexport type JmpContentManifest = {\n version?: number\n routes?: JmpContentRouteManifest[]\n externalSources?: JmpExternalSourcesManifest\n trust?: {\n blocks?: JmpTrustBlockManifest[]\n labels?: Partial<Record<JmpTrustSection, string>>\n mergeTestimonialsReviews?: boolean\n }\n contact?: {\n extras?: JmpContactExtraManifest[]\n }\n}\n\nconst TRUST_SECTIONS = new Set<string>([\n \"summary\",\n \"testimonials\",\n \"reviews\",\n \"stats\",\n \"logos\",\n \"credentials\",\n])\n\nfunction normalizeKey(value: string): string {\n return value\n .trim()\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\")\n}\n\nfunction isValidExtraKey(key: string): boolean {\n return /^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(key)\n}\n\nconst MAX_EXTERNAL_ADMIN_LINKS = 10\nconst MAX_EXTERNAL_ADMIN_LINK_LABEL_LENGTH = 80\nconst EXTERNAL_ADMIN_LINK_ID_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/\n\nfunction tryNormalizeHttpUrl(input: unknown): string | null {\n if (typeof input !== \"string\" || !input.trim()) {\n return null\n }\n try {\n const url = new URL(input.trim())\n if (url.protocol !== \"https:\" && url.protocol !== \"http:\") {\n return null\n }\n return url.toString().replace(/\\/$/, \"\")\n } catch {\n return null\n }\n}\n\nfunction normalizeShopifyExternalSource(\n shopify: JmpExternalShopifySourceManifest | undefined\n): JmpExternalShopifySourceManifest | null {\n if (!shopify || typeof shopify !== \"object\") {\n return null\n }\n const adminUrl = tryNormalizeHttpUrl(shopify.adminUrl)\n const storeUrl = tryNormalizeHttpUrl(shopify.storeUrl)\n if (!adminUrl && !storeUrl) {\n return null\n }\n return {\n ...(adminUrl ? { adminUrl } : {}),\n ...(storeUrl ? { storeUrl } : {}),\n }\n}\n\nfunction normalizeExternalAdminLinkEntries(\n links: JmpExternalAdminLinkManifest[] | undefined\n): JmpExternalAdminLinkManifest[] {\n if (!Array.isArray(links)) {\n return []\n }\n const seenIds = new Set<string>()\n const out: JmpExternalAdminLinkManifest[] = []\n for (const raw of links) {\n if (!raw || typeof raw !== \"object\" || out.length >= MAX_EXTERNAL_ADMIN_LINKS) {\n continue\n }\n const id =\n typeof raw.id === \"string\"\n ? raw.id.trim().toLowerCase().replace(/[^a-z0-9-]+/g, \"-\").replace(/^-+|-+$/g, \"\")\n : \"\"\n const label =\n typeof raw.label === \"string\"\n ? raw.label.trim().slice(0, MAX_EXTERNAL_ADMIN_LINK_LABEL_LENGTH)\n : \"\"\n const url = tryNormalizeHttpUrl(raw.url)\n if (\n !id ||\n !label ||\n !url ||\n !EXTERNAL_ADMIN_LINK_ID_PATTERN.test(id) ||\n seenIds.has(id)\n ) {\n continue\n }\n seenIds.add(id)\n out.push({ id, label, url })\n }\n return out\n}\n\nfunction normalizeExternalSources(\n externalSources: JmpExternalSourcesManifest | undefined\n): JmpExternalSourcesManifest | null {\n if (!externalSources || typeof externalSources !== \"object\") {\n return null\n }\n const studioUrl = tryNormalizeHttpUrl(externalSources.sanity?.studioUrl)\n const shopify = normalizeShopifyExternalSource(externalSources.shopify)\n const links = normalizeExternalAdminLinkEntries(externalSources.links)\n if (!studioUrl && !shopify && links.length === 0) {\n return null\n }\n return {\n ...(studioUrl ? { sanity: { studioUrl } } : {}),\n ...(shopify ? { shopify } : {}),\n ...(links.length > 0 ? { links } : {}),\n }\n}\n\nexport function normalizeJmpContentManifest(\n input: JmpContentManifest | null | undefined\n): JmpContentManifest | null {\n if (!input || typeof input !== \"object\") {\n return null\n }\n\n const routes = normalizeRoutes(input.routes)\n const externalSources = normalizeExternalSources(input.externalSources)\n const trust = normalizeTrust(input.trust)\n const contact = normalizeContact(input.contact)\n\n if (routes.length === 0 && !externalSources && !trust && !contact) {\n return null\n }\n\n return {\n version: JMP_CONTENT_MANIFEST_VERSION,\n ...(routes.length > 0 ? { routes } : {}),\n ...(externalSources ? { externalSources } : {}),\n ...(trust ? { trust } : {}),\n ...(contact ? { contact } : {}),\n }\n}\n\nfunction normalizeRoutes(\n routes: JmpContentRouteManifest[] | undefined\n): JmpContentRouteManifest[] {\n if (!Array.isArray(routes)) {\n return []\n }\n const seen = new Set<string>()\n const out: JmpContentRouteManifest[] = []\n for (const raw of routes) {\n if (!raw || typeof raw !== \"object\") continue\n const wrapper =\n typeof raw.wrapper === \"string\" ? raw.wrapper.trim().toLowerCase() : \"\"\n const pattern =\n typeof raw.pattern === \"string\" ? raw.pattern.trim() : \"\"\n if (!wrapper || !pattern) continue\n const dedupe = `${wrapper}:${pattern}`\n if (seen.has(dedupe)) continue\n seen.add(dedupe)\n out.push({\n wrapper,\n pattern,\n ...(typeof raw.index === \"string\" && raw.index.trim()\n ? { index: raw.index.trim() }\n : {}),\n ...(typeof raw.label === \"string\" && raw.label.trim()\n ? { label: raw.label.trim() }\n : {}),\n })\n }\n return out\n}\n\nfunction normalizeTrust(\n trust: JmpContentManifest[\"trust\"] | undefined\n): JmpContentManifest[\"trust\"] | null {\n if (!trust || typeof trust !== \"object\") return null\n const blocks = normalizeTrustBlocks(trust.blocks)\n const labels = normalizeTrustLabels(trust.labels)\n const mergeTestimonialsReviews = trust.mergeTestimonialsReviews === true\n if (blocks.length === 0 && !labels && !mergeTestimonialsReviews) return null\n return {\n ...(blocks.length > 0 ? { blocks } : {}),\n ...(labels ? { labels } : {}),\n ...(mergeTestimonialsReviews ? { mergeTestimonialsReviews: true } : {}),\n }\n}\n\nfunction normalizeTrustBlocks(\n blocks: JmpTrustBlockManifest[] | undefined\n): JmpTrustBlockManifest[] {\n if (!Array.isArray(blocks)) return []\n const seen = new Set<string>()\n const out: JmpTrustBlockManifest[] = []\n for (const raw of blocks) {\n if (!raw || typeof raw !== \"object\") continue\n const section =\n typeof raw.section === \"string\" ? raw.section.trim().toLowerCase() : \"\"\n if (!TRUST_SECTIONS.has(section) || seen.has(section)) continue\n seen.add(section)\n out.push({\n section: section as JmpTrustSection,\n ...(typeof raw.label === \"string\" && raw.label.trim()\n ? { label: raw.label.trim() }\n : {}),\n })\n }\n return out\n}\n\nfunction normalizeTrustLabels(\n labels: Partial<Record<JmpTrustSection, string>> | undefined\n): Partial<Record<JmpTrustSection, string>> | null {\n if (!labels || typeof labels !== \"object\") return null\n const out: Partial<Record<JmpTrustSection, string>> = {}\n for (const [key, value] of Object.entries(labels)) {\n if (TRUST_SECTIONS.has(key) && typeof value === \"string\" && value.trim()) {\n out[key as JmpTrustSection] = value.trim()\n }\n }\n return Object.keys(out).length > 0 ? out : null\n}\n\nfunction normalizeContact(\n contact: JmpContentManifest[\"contact\"] | undefined\n): JmpContentManifest[\"contact\"] | null {\n if (!contact || typeof contact !== \"object\") return null\n const extras = normalizeContactExtras(contact.extras)\n return extras.length > 0 ? { extras } : null\n}\n\nfunction normalizeContactExtras(\n extras: JmpContactExtraManifest[] | undefined\n): JmpContactExtraManifest[] {\n if (!Array.isArray(extras)) return []\n const seen = new Set<string>()\n const out: JmpContactExtraManifest[] = []\n for (const raw of extras) {\n if (!raw || typeof raw !== \"object\") continue\n const label = typeof raw.label === \"string\" ? raw.label.trim() : \"\"\n const key = normalizeKey(\n typeof raw.key === \"string\" && raw.key.trim() ? raw.key : label\n )\n if (!key || !label || !isValidExtraKey(key) || seen.has(key)) continue\n seen.add(key)\n out.push({ key, label })\n }\n return out\n}\n\nexport function stableJmpManifestFingerprint(\n manifest: JmpContentManifest | null\n): string {\n return manifest ? JSON.stringify(manifest) : \"\"\n}\n\nexport function inferWrapperSlotsFromManifest(\n manifest: JmpContentManifest | null\n): string[] {\n const slots = new Set<string>()\n for (const route of manifest?.routes ?? []) {\n slots.add(route.wrapper)\n }\n for (const block of manifest?.trust?.blocks ?? []) {\n slots.add(`trust.${block.section}`)\n slots.add(\"trust\")\n }\n if (manifest?.contact?.extras?.length) {\n slots.add(\"contact\")\n }\n return [...slots]\n}\n","import { normalizeBaseUrl, responseLooksLikeHtml } from \"../http\"\nimport { withJmpOriginHeader } from \"../request-origin\"\nimport type { JmpContentConfig } from \"../types\"\n\n/**\n * Headers for server content API calls. Sends `Origin` from siteUrl /\n * NEXT_PUBLIC_SITE_URL when available (required for capabilities writes in\n * production; helpful for content reads).\n */\nexport function jmpContentRequestHeaders(\n config: JmpContentConfig\n): Record<string, string> {\n return withJmpOriginHeader({\n \"X-JMP-Tracking-Key\": config.trackingKey,\n })\n}\n\nexport async function getContent<T>(\n config: JmpContentConfig,\n path: string\n): Promise<T> {\n const text = await getContentText(config, path)\n\n try {\n return JSON.parse(text) as T\n } catch {\n const baseUrl = normalizeBaseUrl(config.baseUrl)\n const url = `${baseUrl}${path}`\n throw new Error(`JMP content HTTP 200 — ${url} returned invalid JSON.`)\n }\n}\n\nexport async function getContentText(\n config: JmpContentConfig,\n path: string\n): Promise<string> {\n const baseUrl = normalizeBaseUrl(config.baseUrl)\n const resolvedFetch =\n config.fetchImpl ??\n (typeof globalThis !== \"undefined\" && globalThis.fetch\n ? globalThis.fetch.bind(globalThis)\n : undefined)\n\n if (!resolvedFetch) {\n throw new Error(\"JMP content: fetch is not available; pass fetchImpl in config\")\n }\n\n const url = `${baseUrl}${path}`\n\n if (config.debug) {\n console.debug(\"[@jmp-technologies/analytics]\", \"GET\", url)\n }\n\n const res = await resolvedFetch(url, {\n method: \"GET\",\n headers: jmpContentRequestHeaders(config),\n })\n\n const text = await res.text()\n\n if (!res.ok) {\n if (responseLooksLikeHtml(text)) {\n throw new Error(\n `JMP content HTTP ${res.status} — ${url} returned HTML (not the JSON API). ` +\n `Set baseUrl to your JMP Analytics dashboard origin.`\n )\n }\n\n let parsed: { error?: string; hint?: string } = {}\n try {\n parsed = JSON.parse(text) as typeof parsed\n } catch {\n parsed = { error: text }\n }\n\n throw new Error(\n [`JMP content HTTP ${res.status}`, parsed.error, parsed.hint]\n .filter(Boolean)\n .join(\" — \")\n )\n }\n\n return text\n}\n","import {\n inferWrapperSlotsFromManifest,\n normalizeJmpContentManifest,\n type JmpContentManifest,\n} from \"./manifest\"\nimport type { JmpContentConfig, JmpContentWrapper, JmpTrustBundle } from \"../types\"\n\n/** Stable report order (matches dashboard `CLIENT_REPORTABLE_WRAPPER_SLOTS`). */\nconst WRAPPER_SLOT_ORDER: readonly string[] = [\n \"blog\",\n \"faq\",\n \"contact\",\n \"trust\",\n \"trust.summary\",\n \"trust.testimonials\",\n \"trust.reviews\",\n \"trust.stats\",\n \"trust.logos\",\n \"trust.credentials\",\n]\n\nconst discovered = new Set<string>()\nlet syncTimer: ReturnType<typeof setTimeout> | null = null\nlet pendingSyncConfig: JmpContentConfig | null = null\n\nconst reportedDedupeKeys = new Set<string>()\nlet syncHandler: ((config: JmpContentConfig) => Promise<unknown>) | null = null\n\nexport function markContentWrapper(slot: JmpContentWrapper | string): void {\n const normalized = slot.trim().toLowerCase()\n if (!normalized) {\n return\n }\n discovered.add(normalized)\n}\n\nexport function markTrustBundleWrappers(bundle: JmpTrustBundle): void {\n for (const slot of inferTrustWrapperSlots(bundle)) {\n discovered.add(slot)\n }\n}\n\nexport function inferTrustWrapperSlots(bundle: JmpTrustBundle): string[] {\n const slots = new Set<string>([\"trust\"])\n const { summary, testimonials, stats, logos, credentials } = bundle\n\n const hasSummary =\n summary.google_rating != null ||\n summary.google_review_count != null ||\n Boolean(summary.google_reviews_url?.trim()) ||\n Boolean(summary.yelp_url?.trim()) ||\n Boolean(summary.trustpilot_url?.trim()) ||\n Boolean(summary.disclaimer?.trim())\n\n if (hasSummary) {\n slots.add(\"trust.summary\")\n }\n\n let hasTestimonials = false\n let hasReviews = false\n for (const item of testimonials) {\n const bucket = item.placement?.trim().toLowerCase()\n if (bucket === \"reviews\") {\n hasReviews = true\n } else {\n hasTestimonials = true\n }\n }\n if (hasTestimonials) {\n slots.add(\"trust.testimonials\")\n }\n if (hasReviews) {\n slots.add(\"trust.reviews\")\n }\n if (stats.length > 0) {\n slots.add(\"trust.stats\")\n }\n if (logos.length > 0) {\n slots.add(\"trust.logos\")\n }\n if (credentials.length > 0) {\n slots.add(\"trust.credentials\")\n }\n\n return sortWrapperSlots([...slots])\n}\n\nexport function getDiscoveredContentWrappers(): string[] {\n return sortWrapperSlots([...discovered])\n}\n\nexport function resolveContentManifestForReport(\n config: JmpContentConfig\n): JmpContentManifest | null {\n return normalizeJmpContentManifest(config.contentManifest)\n}\n\nexport function resolveContentWrappersForReport(\n config: JmpContentConfig\n): string[] {\n const explicit = config.contentWrappers ?? []\n const auto = getDiscoveredContentWrappers()\n const fromManifest = inferWrapperSlotsFromManifest(\n resolveContentManifestForReport(config)\n )\n\n if (config.contentWrapperMode === \"manual\") {\n return sortWrapperSlots([...explicit, ...fromManifest])\n }\n\n if (config.contentWrapperMode === \"explicit-only\") {\n return sortWrapperSlots([...explicit, ...fromManifest])\n }\n\n const merged = new Set<string>([...explicit, ...auto, ...fromManifest])\n return sortWrapperSlots([...merged])\n}\n\nexport function hasReportedContentWrappers(dedupeKey: string): boolean {\n return reportedDedupeKeys.has(dedupeKey)\n}\n\nexport function rememberReportedContentWrappers(dedupeKey: string): void {\n reportedDedupeKeys.add(dedupeKey)\n}\n\nexport function setContentWrapperSyncHandler(\n handler: (config: JmpContentConfig) => Promise<unknown>\n): void {\n syncHandler = handler\n}\n\n/**\n * Debounced POST after content APIs run (build SSG, first page hit, etc.).\n */\nexport function scheduleContentWrapperSync(config: JmpContentConfig): void {\n if (!syncHandler) {\n return\n }\n pendingSyncConfig = config\n if (syncTimer) {\n clearTimeout(syncTimer)\n }\n syncTimer = setTimeout(() => {\n syncTimer = null\n const cfg = pendingSyncConfig\n pendingSyncConfig = null\n if (!cfg || !syncHandler) {\n return\n }\n void syncHandler(cfg).catch(() => {})\n }, 750)\n}\n\nexport function resetContentWrapperDiscoveryForTests(): void {\n discovered.clear()\n reportedDedupeKeys.clear()\n syncHandler = null\n if (syncTimer) {\n clearTimeout(syncTimer)\n syncTimer = null\n }\n pendingSyncConfig = null\n}\n\nfunction sortWrapperSlots(slots: string[]): string[] {\n const order = new Map(WRAPPER_SLOT_ORDER.map((slot, index) => [slot, index]))\n return [...new Set(slots)].sort((a, b) => {\n const ai = order.get(a) ?? 999\n const bi = order.get(b) ?? 999\n if (ai !== bi) {\n return ai - bi\n }\n return a.localeCompare(b)\n })\n}\n","import { JMP_ANALYTICS_SDK_VERSION } from \"../constants\"\nimport { normalizeBaseUrl } from \"../http\"\nimport type {\n JmpBlogPost,\n JmpContentConfig,\n JmpFaqItem,\n JmpLandingPage,\n JmpLandingPageDetail,\n JmpLandingPageKind,\n JmpLandingPageSitemapEntry,\n JmpPopularPagesResult,\n JmpSiteProfile,\n JmpTrustBundle,\n JmpWebsiteLocation,\n JmpWebsiteLocationDetail,\n} from \"../types\"\nimport { getContent, getContentText, jmpContentRequestHeaders } from \"./fetch\"\nimport {\n stableJmpManifestFingerprint,\n type JmpContentManifest,\n} from \"./manifest\"\nimport {\n hasReportedContentWrappers,\n markContentWrapper,\n markTrustBundleWrappers,\n rememberReportedContentWrappers,\n resolveContentManifestForReport,\n resolveContentWrappersForReport,\n scheduleContentWrapperSync,\n setContentWrapperSyncHandler,\n} from \"./wrapper-discovery\"\n\nexport {\n getDiscoveredContentWrappers,\n inferTrustWrapperSlots,\n markContentWrapper,\n markTrustBundleWrappers,\n resetContentWrapperDiscoveryForTests,\n} from \"./wrapper-discovery\"\n\nfunction afterContentWrapperUse(config: JmpContentConfig): void {\n scheduleContentWrapperSync(config)\n}\n\nexport async function getJmpBlogPosts(\n config: JmpContentConfig,\n filters?: { locale?: string }\n): Promise<JmpBlogPost[]> {\n const params = new URLSearchParams()\n if (filters?.locale) {\n params.set(\"locale\", filters.locale)\n }\n const query = params.toString()\n const data = await getContent<{ posts: JmpBlogPost[] }>(\n config,\n `/api/content/blog${query ? `?${query}` : \"\"}`\n )\n markContentWrapper(\"blog\")\n afterContentWrapperUse(config)\n return data.posts\n}\n\nexport async function getJmpBlogPost(\n config: JmpContentConfig,\n slug: string,\n locale?: string\n): Promise<JmpBlogPost | null> {\n try {\n const params = new URLSearchParams()\n if (locale) {\n params.set(\"locale\", locale)\n }\n const query = params.toString()\n const data = await getContent<{ post: JmpBlogPost; alternates?: unknown }>(\n config,\n `/api/content/blog/${encodeURIComponent(slug)}${query ? `?${query}` : \"\"}`\n )\n markContentWrapper(\"blog\")\n afterContentWrapperUse(config)\n return data.post\n } catch (error) {\n if (error instanceof Error && error.message.includes(\"HTTP 404\")) {\n return null\n }\n throw error\n }\n}\n\nexport async function getJmpBlogPostDetail(\n config: JmpContentConfig,\n slug: string,\n locale?: string\n): Promise<import(\"../types\").JmpBlogPostDetail | null> {\n try {\n const params = new URLSearchParams()\n if (locale) {\n params.set(\"locale\", locale)\n }\n const query = params.toString()\n const data = await getContent<import(\"../types\").JmpBlogPostDetail>(\n config,\n `/api/content/blog/${encodeURIComponent(slug)}${query ? `?${query}` : \"\"}`\n )\n markContentWrapper(\"blog\")\n afterContentWrapperUse(config)\n return data\n } catch (error) {\n if (error instanceof Error && error.message.includes(\"HTTP 404\")) {\n return null\n }\n throw error\n }\n}\n\nexport async function getJmpFaqs(\n config: JmpContentConfig,\n filters?: { locale?: string }\n): Promise<JmpFaqItem[]> {\n const params = new URLSearchParams()\n if (filters?.locale) {\n params.set(\"locale\", filters.locale)\n }\n const query = params.toString()\n const data = await getContent<{ faqs: JmpFaqItem[] }>(\n config,\n `/api/content/faqs${query ? `?${query}` : \"\"}`\n )\n markContentWrapper(\"faq\")\n afterContentWrapperUse(config)\n return data.faqs\n}\n\nexport async function getJmpFaqDetail(\n config: JmpContentConfig,\n slug: string,\n locale?: string\n): Promise<import(\"../types\").JmpFaqItemDetail | null> {\n try {\n const params = new URLSearchParams()\n if (locale) {\n params.set(\"locale\", locale)\n }\n const query = params.toString()\n const data = await getContent<import(\"../types\").JmpFaqItemDetail>(\n config,\n `/api/content/faqs/${encodeURIComponent(slug)}${query ? `?${query}` : \"\"}`\n )\n markContentWrapper(\"faq\")\n afterContentWrapperUse(config)\n return data\n } catch (error) {\n if (error instanceof Error && error.message.includes(\"HTTP 404\")) {\n return null\n }\n throw error\n }\n}\n\nexport async function getJmpLandingPages(\n config: JmpContentConfig,\n filters?: { kind?: JmpLandingPageKind; locale?: string }\n): Promise<JmpLandingPage[]> {\n const params = new URLSearchParams()\n if (filters?.kind) {\n params.set(\"kind\", filters.kind)\n }\n if (filters?.locale) {\n params.set(\"locale\", filters.locale)\n }\n const query = params.toString()\n const data = await getContent<{ pages: JmpLandingPage[] }>(\n config,\n `/api/content/landing-pages${query ? `?${query}` : \"\"}`\n )\n markContentWrapper(\"landing\")\n afterContentWrapperUse(config)\n return data.pages\n}\n\nexport async function getJmpLandingPageDetail(\n config: JmpContentConfig,\n kind: JmpLandingPageKind,\n slug: string,\n locale?: string\n): Promise<JmpLandingPageDetail | null> {\n const params = new URLSearchParams()\n if (locale) {\n params.set(\"locale\", locale)\n }\n const query = params.toString()\n try {\n const detail = await getContent<JmpLandingPageDetail>(\n config,\n `/api/content/landing-pages/${encodeURIComponent(kind)}/${encodeURIComponent(slug)}${query ? `?${query}` : \"\"}`\n )\n markContentWrapper(\"landing\")\n afterContentWrapperUse(config)\n return detail\n } catch (error) {\n if (error instanceof Error && error.message.includes(\"HTTP 404\")) {\n return null\n }\n throw error\n }\n}\n\nexport async function getJmpLandingPageSitemap(\n config: JmpContentConfig\n): Promise<JmpLandingPageSitemapEntry[]> {\n const data = await getContent<{ entries: JmpLandingPageSitemapEntry[] }>(\n config,\n \"/api/content/landing-pages/sitemap\"\n )\n markContentWrapper(\"landing\")\n afterContentWrapperUse(config)\n return data.entries\n}\n\nexport async function getJmpLocations(\n config: JmpContentConfig\n): Promise<JmpWebsiteLocation[]> {\n const data = await getContent<{ locations: JmpWebsiteLocation[] }>(\n config,\n \"/api/content/locations\"\n )\n markContentWrapper(\"locations\")\n afterContentWrapperUse(config)\n return data.locations\n}\n\nexport async function getJmpLocationDetail(\n config: JmpContentConfig,\n slug: string\n): Promise<JmpWebsiteLocationDetail | null> {\n const normalized = slug.trim()\n if (!normalized) {\n return null\n }\n try {\n const detail = await getContent<JmpWebsiteLocationDetail>(\n config,\n `/api/content/locations/${encodeURIComponent(normalized)}`\n )\n markContentWrapper(\"locations\")\n afterContentWrapperUse(config)\n return detail\n } catch (error) {\n if (error instanceof Error && error.message.includes(\"HTTP 404\")) {\n return null\n }\n throw error\n }\n}\n\nexport async function getJmpTrustBundle(\n config: JmpContentConfig\n): Promise<JmpTrustBundle> {\n const bundle = await getContent<JmpTrustBundle>(config, \"/api/content/trust\")\n markTrustBundleWrappers(bundle)\n afterContentWrapperUse(config)\n return bundle\n}\n\nexport async function getJmpSiteProfile(\n config: JmpContentConfig\n): Promise<JmpSiteProfile> {\n const data = await getContent<{ site: JmpSiteProfile }>(\n config,\n \"/api/content/site\"\n )\n markContentWrapper(\"contact\")\n afterContentWrapperUse(config)\n return data.site\n}\n\nexport async function getJmpRobotsTxt(config: JmpContentConfig): Promise<string> {\n return getContentText(config, \"/api/content/robots\")\n}\n\nexport async function getJmpPopularPages(\n config: JmpContentConfig,\n filters?: {\n prefix?: string\n days?: number\n limit?: number\n }\n): Promise<JmpPopularPagesResult> {\n const params = new URLSearchParams()\n if (filters?.prefix) {\n params.set(\"prefix\", filters.prefix)\n }\n if (typeof filters?.days === \"number\") {\n params.set(\"days\", String(filters.days))\n }\n if (typeof filters?.limit === \"number\") {\n params.set(\"limit\", String(filters.limit))\n }\n const query = params.toString()\n return getContent<JmpPopularPagesResult>(\n config,\n `/api/content/popular-pages${query ? `?${query}` : \"\"}`\n )\n}\n\n/**\n * Tell the JMP dashboard which content wrappers this site wires (blog, faq, trust.*, contact).\n * Uses auto-discovered slots from content API usage unless `contentWrapperMode` is `manual`.\n * Safe to call on every cold start; dedupes by tracking key + wrapper list.\n */\nexport async function registerJmpContentWrappers(\n config: JmpContentConfig\n): Promise<\n { ok: true; wrappers: string[] } | { ok: false; skipped: true }\n> {\n const wrappers = resolveContentWrappersForReport(config)\n if (!wrappers.length) {\n return { ok: false, skipped: true }\n }\n\n const manifest = resolveContentManifestForReport(config)\n const dedupeKey = `${config.trackingKey}:${[...wrappers].sort().join(\",\")}:${stableJmpManifestFingerprint(manifest)}`\n if (hasReportedContentWrappers(dedupeKey)) {\n return { ok: true, wrappers }\n }\n\n const baseUrl = normalizeBaseUrl(config.baseUrl)\n const resolvedFetch =\n config.fetchImpl ??\n (typeof globalThis !== \"undefined\" && globalThis.fetch\n ? globalThis.fetch.bind(globalThis)\n : undefined)\n\n if (!resolvedFetch) {\n throw new Error(\n \"JMP content wrappers: fetch is not available; pass fetchImpl in config\"\n )\n }\n\n const url = `${baseUrl}/api/content/capabilities`\n if (config.debug) {\n console.debug(\"[@jmp-technologies/analytics]\", \"POST\", url, {\n wrappers,\n manifest,\n })\n }\n\n const body: {\n wrappers: string[]\n sdkVersion: string\n manifest?: JmpContentManifest\n } = {\n wrappers,\n sdkVersion: JMP_ANALYTICS_SDK_VERSION,\n }\n if (manifest) {\n body.manifest = manifest\n }\n\n const res = await resolvedFetch(url, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n ...jmpContentRequestHeaders(config),\n },\n body: JSON.stringify(body),\n })\n\n const text = await res.text()\n if (!res.ok) {\n let parsed: { error?: string; hint?: string } = {}\n try {\n parsed = JSON.parse(text) as typeof parsed\n } catch {\n parsed = { error: text }\n }\n throw new Error(\n [`JMP content wrappers HTTP ${res.status}`, parsed.error, parsed.hint]\n .filter(Boolean)\n .join(\" — \")\n )\n }\n\n rememberReportedContentWrappers(dedupeKey)\n const data = JSON.parse(text) as { wrappers?: string[] }\n return { ok: true, wrappers: data.wrappers ?? wrappers }\n}\n\nsetContentWrapperSyncHandler(registerJmpContentWrappers)\n","import {\n getJmpBlogPost,\n getJmpBlogPosts,\n getJmpFaqs,\n getJmpLandingPageDetail,\n getJmpLandingPages,\n getJmpLandingPageSitemap,\n getJmpPopularPages,\n getJmpRobotsTxt,\n getJmpSiteProfile,\n getJmpTrustBundle,\n registerJmpContentWrappers,\n} from \"./api\"\nimport type { JmpContentConfig } from \"../types\"\n\nexport function createJmpContentClient(config: JmpContentConfig) {\n return {\n getBlogPosts: (filters?: { locale?: string }) => getJmpBlogPosts(config, filters),\n getBlogPost: (slug: string, locale?: string) => getJmpBlogPost(config, slug, locale),\n getFaqs: (filters?: { locale?: string }) => getJmpFaqs(config, filters),\n getLandingPages: (filters?: Parameters<typeof getJmpLandingPages>[1]) =>\n getJmpLandingPages(config, filters),\n getLandingPageDetail: (\n kind: Parameters<typeof getJmpLandingPageDetail>[1],\n slug: string,\n locale?: string\n ) => getJmpLandingPageDetail(config, kind, slug, locale),\n getLandingPageSitemap: () => getJmpLandingPageSitemap(config),\n getTrustBundle: () => getJmpTrustBundle(config),\n getSiteProfile: () => getJmpSiteProfile(config),\n getRobotsTxt: () => getJmpRobotsTxt(config),\n getPopularPages: (filters?: Parameters<typeof getJmpPopularPages>[1]) =>\n getJmpPopularPages(config, filters),\n registerContentWrappers: () => registerJmpContentWrappers(config),\n }\n}\n\nexport type JmpContentClient = ReturnType<typeof createJmpContentClient>\n","import {\n createJmpAnalytics,\n type JmpAnalytics,\n} from \"../tracker/create-jmp-analytics\"\nimport { DEFAULT_JMP_BROWSER_PAGE_VIEW_DEDUPE_MS } from \"../constants\"\nimport { readJmpPublicEnvFromProcess } from \"../env-public\"\nimport { getJmpSiteDefinition } from \"../site-config\"\nimport type { JmpAnalyticsConfig, JmpContentConfig } from \"../types\"\nimport { createJmpContentClient, type JmpContentClient } from \"../content/client\"\n\n/**\n * Browser / client bundle: reads `NEXT_PUBLIC_*` or Astro `PUBLIC_*` vars.\n * Use for `createJmpAnalytics` on the client. Returns `null` if incomplete.\n */\nexport function getJmpBrowserAnalyticsConfigFromEnv(\n overrides?: Partial<JmpAnalyticsConfig>\n): JmpAnalyticsConfig | null {\n const pub = readJmpPublicEnvFromProcess()\n const site = getJmpSiteDefinition()\n const baseUrl =\n overrides?.baseUrl ?? pub.analyticsUrl ?? site?.analyticsPortalUrl\n const trackingKey = overrides?.trackingKey ?? pub.trackingKey\n if (!baseUrl || !trackingKey) return null\n return {\n baseUrl,\n trackingKey,\n pageViewDedupeMs: DEFAULT_JMP_BROWSER_PAGE_VIEW_DEDUPE_MS,\n ...overrides,\n requireConsent: overrides?.requireConsent ?? pub.requireConsent,\n autoTrackContactLinks:\n overrides?.autoTrackContactLinks ?? pub.autoContactLinks,\n }\n}\n\n/**\n * Server / Node (SSR, Route Handlers, `getStaticProps`, etc.):\n * Same **`NEXT_PUBLIC_*`** vars as the browser (`NEXT_PUBLIC_JMP_ANALYTICS_URL` +\n * `NEXT_PUBLIC_JMP_TRACKING_KEY`). Next.js injects these on the server for RSC/fetches.\n * Returns `null` if incomplete.\n */\nexport function getJmpServerContentConfigFromEnv(\n overrides?: Partial<JmpContentConfig>\n): JmpContentConfig | null {\n const pub = readJmpPublicEnvFromProcess()\n const baseUrl = overrides?.baseUrl ?? pub.analyticsUrl\n const trackingKey = overrides?.trackingKey ?? pub.trackingKey\n if (!baseUrl || !trackingKey) return null\n return { baseUrl, trackingKey, ...overrides }\n}\n\nexport function isJmpBrowserAnalyticsEnvConfigured(): boolean {\n const pub = readJmpPublicEnvFromProcess()\n return Boolean(pub.analyticsUrl && pub.trackingKey)\n}\n\nexport function isJmpServerContentEnvConfigured(): boolean {\n return isJmpBrowserAnalyticsEnvConfigured()\n}\n\nlet jmpAnalyticsBrowserSingleton: JmpAnalytics | null = null\n\n/**\n * One `JmpAnalytics` instance per browser tab (module singleton). Safe for page views and events.\n * Returns `null` on the server or when public env vars are missing.\n */\nexport function getOrCreateJmpAnalyticsFromBrowserEnv(\n overrides?: Partial<JmpAnalyticsConfig>\n): JmpAnalytics | null {\n if (typeof window === \"undefined\") return null\n if (jmpAnalyticsBrowserSingleton) return jmpAnalyticsBrowserSingleton\n const config = getJmpBrowserAnalyticsConfigFromEnv(overrides)\n if (!config) return null\n jmpAnalyticsBrowserSingleton = createJmpAnalytics(config)\n return jmpAnalyticsBrowserSingleton\n}\n\n/**\n * `createJmpContentClient` using server env resolution. Returns `null` if env is incomplete.\n */\nexport function createJmpContentClientFromServerEnv(\n overrides?: Partial<JmpContentConfig>\n): JmpContentClient | null {\n const config = getJmpServerContentConfigFromEnv(overrides)\n if (!config) return null\n return createJmpContentClient(config)\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA0BO,IAAM,qBAAqB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAM,iBAAiB,CAAC,SAAS,oBAAoB,cAAc;AAE5D,SAAS,gBAAgB,MAAc,SAA0B;AACtE,QAAM,IAAI,KAAK,YAAY;AAC3B,QAAM,IAAI,QAAQ,YAAY;AAC9B,SAAO,MAAM,KAAK,EAAE,SAAS,IAAI,CAAC,EAAE;AACtC;AAEA,SAAS,WAAW,MAAc,UAA2B;AAC3D,MAAI,gBAAgB,MAAM,gBAAgB,GAAG;AAC3C,WAAO;AAAA,EACT;AACA,MAAI,gBAAgB,MAAM,iBAAiB,GAAG;AAC5C,WAAO;AAAA,EACT;AACA,MAAI,gBAAgB,MAAM,YAAY,KAAK,gBAAgB,MAAM,WAAW,GAAG;AAC7E,WAAO,aAAa,WAAW,SAAS,WAAW,QAAQ,KAAK,SAAS,WAAW,QAAQ;AAAA,EAC9F;AACA,SAAO;AACT;AAEA,SAAS,eAAe,MAAc,UAA2B;AAC/D,aAAW,WAAW,gBAAgB;AACpC,QAAI,CAAC,gBAAgB,MAAM,OAAO,GAAG;AACnC;AAAA,IACF;AACA,QAAI,YAAY,gBAAgB;AAC9B,aAAO,SAAS,WAAW,OAAO;AAAA,IACpC;AACA,WAAO;AAAA,EACT;AACA,SAAO;AACT;AA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AM;AACxD,SAAO;AACT;AAKO,SAAS,oCACd,WACyB;AACzB,QAAM,SAAS,iCAAiC,SAAS;AACzD,MAAI,CAAC,OAAQ,QAAO;AACpB,SAAO,uBAAuB,MAAM;AACtC;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/content/site-content.ts"],"sourcesContent":["import {\n getJmpBlogPost,\n getJmpBlogPosts,\n getJmpFaqs,\n getJmpLandingPageDetail,\n getJmpLandingPageSitemap,\n getJmpLandingPages,\n getJmpLocations,\n getJmpLocationDetail,\n getJmpPopularPages,\n getJmpSiteProfile,\n getJmpTrustBundle,\n type JmpBlogPost,\n type JmpFaqItem,\n type JmpLandingPage,\n type JmpLandingPageDetail,\n type JmpLandingPageKind,\n type JmpLandingPageSitemapEntry,\n type JmpPopularPagesResult,\n type JmpWebsiteLocation,\n type JmpWebsiteLocationDetail,\n type JmpSiteProfile,\n type JmpTestimonial,\n type JmpTrustBundle,\n} from \"../index\"\nimport {\n getJmpContentConfig,\n getJmpSiteDefinition,\n type JmpSiteSocialLinks,\n} from \"../site-config\"\n\nexport type {\n JmpBlogPost,\n JmpFaqItem,\n JmpLandingPage,\n JmpLandingPageDetail,\n JmpLandingPageKind,\n JmpLandingPageSitemapEntry,\n JmpPopularPagesResult,\n JmpWebsiteLocation,\n JmpWebsiteLocationDetail,\n JmpSiteProfile,\n JmpTestimonial,\n JmpTrustBundle,\n}\n\nexport { getJmpContentConfig } from \"../site-config\"\n\nexport type { JmpSiteSocialLinks } from \"../site-config\"\n\nexport type ResolvedSiteContact = {\n displayName: string\n email: string\n founderName: string\n dashboardDemoUrl: string\n profilePhotoSrc: string\n linkedin: string | null\n social: JmpSiteSocialLinks\n phone: string | null\n address: string | null\n googleMapsUrl: string | null\n googleMapsEmbedUrl: string | null\n hours: string | null\n serviceArea: string | null\n privacyUrl: string\n termsUrl: string\n cta: { label: string | null; url: string | null }\n}\n\nconst DEFAULT_EXTRA_KEYS = {\n founderName: [\"founder-name\", \"founder_name\"],\n dashboardDemoUrl: [\"dashboard-demo-url\", \"sample-dashboard-url\"],\n profilePhotoSrc: [\"profile-photo-url\", \"profile_photo_url\"],\n hours: [\"hours\", \"business-hours\"],\n serviceArea: [\"service-area\", \"service_area\", \"service-area-text\"],\n googleMapsEmbedUrl: [\"google-maps-embed-url\", \"google_maps_embed_url\"],\n} as const\n\nfunction sortBlogPosts(posts: JmpBlogPost[]): JmpBlogPost[] {\n return [...posts].sort((a, b) => {\n const da = a.published_at ?? a.updated_at\n const db = b.published_at ?? b.updated_at\n return db.localeCompare(da)\n })\n}\n\nfunction sortFaqs(items: JmpFaqItem[]): JmpFaqItem[] {\n return [...items].sort((a, b) => a.sort_order - b.sort_order)\n}\n\nfunction readProfileExtra(\n profile: JmpSiteProfile | null,\n keys: readonly string[],\n): string | null {\n for (const key of keys) {\n const value = profile?.extras?.[key]?.trim()\n if (value) {\n return value\n }\n }\n return null\n}\n\n/** Resolve a path or URL against {@link defineJmpSite}'s `siteUrl`. */\nexport function absoluteSiteAssetUrl(src: string): string {\n const trimmed = src.trim()\n if (trimmed.startsWith(\"http://\") || trimmed.startsWith(\"https://\")) {\n return trimmed\n }\n const siteUrl = getJmpSiteDefinition()?.siteUrl?.replace(/\\/$/, \"\")\n if (!siteUrl) {\n return trimmed.startsWith(\"/\") ? trimmed : `/${trimmed}`\n }\n return `${siteUrl}${trimmed.startsWith(\"/\") ? trimmed : `/${trimmed}`}`\n}\n\nexport async function loadSiteProfile(): Promise<JmpSiteProfile | null> {\n const config = getJmpContentConfig()\n if (!config) {\n return null\n }\n try {\n return await getJmpSiteProfile(config)\n } catch {\n return null\n }\n}\n\nexport function resolveSiteContact(profile: JmpSiteProfile | null): ResolvedSiteContact {\n const site = getJmpSiteDefinition()\n const fallback = site?.contactFallback ?? {}\n const extraKeys = {\n ...DEFAULT_EXTRA_KEYS,\n ...site?.contactExtraKeys,\n }\n\n const email = profile?.email?.trim() || fallback.email || \"\"\n const social: JmpSiteSocialLinks = {\n linkedin:\n profile?.social?.linkedin?.trim() || fallback.linkedin || null,\n instagram:\n profile?.social?.instagram?.trim() || fallback.instagram || null,\n facebook:\n profile?.social?.facebook?.trim() || fallback.facebook || null,\n x: profile?.social?.x?.trim() || fallback.x || null,\n youtube:\n profile?.social?.youtube?.trim() || fallback.youtube || null,\n }\n const phone = profile?.phone?.trim() || fallback.phone || null\n\n return {\n displayName:\n profile?.display_name?.trim() ||\n profile?.name?.trim() ||\n fallback.displayName ||\n \"\",\n founderName:\n readProfileExtra(profile, extraKeys.founderName ?? []) ||\n fallback.founderName ||\n \"\",\n dashboardDemoUrl:\n readProfileExtra(profile, extraKeys.dashboardDemoUrl ?? []) ||\n fallback.dashboardDemoUrl ||\n \"\",\n profilePhotoSrc:\n readProfileExtra(profile, extraKeys.profilePhotoSrc ?? []) ||\n fallback.profilePhotoSrc ||\n \"\",\n email,\n linkedin: social.linkedin,\n social,\n phone,\n address: profile?.address?.trim() || fallback.address || null,\n googleMapsUrl:\n profile?.google_maps_url?.trim() || fallback.googleMapsUrl || null,\n googleMapsEmbedUrl:\n readProfileExtra(profile, extraKeys.googleMapsEmbedUrl ?? []) ||\n fallback.googleMapsEmbedUrl ||\n null,\n hours:\n readProfileExtra(profile, extraKeys.hours ?? []) || fallback.hours || null,\n serviceArea:\n readProfileExtra(profile, extraKeys.serviceArea ?? []) ||\n fallback.serviceArea ||\n null,\n privacyUrl: profile?.legal?.privacy_policy_url?.trim() || fallback.privacyUrl || \"/privacy\",\n termsUrl: profile?.legal?.terms_url?.trim() || fallback.termsUrl || \"/terms\",\n cta: {\n label: profile?.cta?.label?.trim() || null,\n url: profile?.cta?.url?.trim() || null,\n },\n }\n}\n\nexport async function getResolvedSiteContact(): Promise<ResolvedSiteContact> {\n const profile = await loadSiteProfile()\n return resolveSiteContact(profile)\n}\n\n/** Non-null social profile URLs in a stable order for JSON-LD `sameAs`. */\nexport function listResolvedSocialUrls(social: JmpSiteSocialLinks): string[] {\n return [\n social.linkedin,\n social.instagram,\n social.facebook,\n social.x,\n social.youtube,\n ].filter((url): url is string => Boolean(url))\n}\n\nexport async function loadBlogPosts(locale?: string): Promise<JmpBlogPost[]> {\n const c = getJmpContentConfig()\n if (!c) {\n return []\n }\n try {\n const posts = await getJmpBlogPosts(c, locale ? { locale } : undefined)\n return sortBlogPosts(posts)\n } catch {\n return []\n }\n}\n\nexport async function loadBlogPost(\n slug: string,\n locale?: string\n): Promise<JmpBlogPost | null> {\n const c = getJmpContentConfig()\n if (!c) {\n return null\n }\n try {\n return await getJmpBlogPost(c, slug, locale)\n } catch {\n return null\n }\n}\n\nexport async function loadFaqs(locale?: string): Promise<JmpFaqItem[]> {\n const c = getJmpContentConfig()\n if (!c) {\n return []\n }\n try {\n const faqs = await getJmpFaqs(c, locale ? { locale } : undefined)\n return sortFaqs(faqs)\n } catch {\n return []\n }\n}\n\nexport async function loadFaqBySlug(\n slug: string,\n locale?: string\n): Promise<JmpFaqItem | null> {\n const normalized = slug.trim()\n if (!normalized) {\n return null\n }\n const items = await loadFaqs(locale)\n return (\n items.find((item) => item.slug === normalized || item.id === normalized) ?? null\n )\n}\n\nexport async function loadLandingPages(filters?: {\n kind?: JmpLandingPageKind\n locale?: string\n}): Promise<JmpLandingPage[]> {\n const c = getJmpContentConfig()\n if (!c) {\n return []\n }\n try {\n return await getJmpLandingPages(c, filters)\n } catch {\n return []\n }\n}\n\nexport async function loadLandingPageDetail(\n kind: JmpLandingPageKind,\n slug: string,\n locale?: string\n): Promise<JmpLandingPageDetail | null> {\n const c = getJmpContentConfig()\n if (!c) {\n return null\n }\n try {\n return await getJmpLandingPageDetail(c, kind, slug, locale)\n } catch {\n return null\n }\n}\n\nexport async function loadLandingPageSitemap(): Promise<JmpLandingPageSitemapEntry[]> {\n const c = getJmpContentConfig()\n if (!c) {\n return []\n }\n try {\n return await getJmpLandingPageSitemap(c)\n } catch {\n return []\n }\n}\n\nexport async function loadLocations(): Promise<JmpWebsiteLocation[]> {\n const c = getJmpContentConfig()\n if (!c) {\n return []\n }\n try {\n return await getJmpLocations(c)\n } catch {\n return []\n }\n}\n\nexport async function loadLocationDetail(\n slug: string\n): Promise<JmpWebsiteLocationDetail | null> {\n const c = getJmpContentConfig()\n if (!c) {\n return null\n }\n try {\n return await getJmpLocationDetail(c, slug)\n } catch {\n return null\n }\n}\n\nexport async function loadTrustBundle(): Promise<JmpTrustBundle | null> {\n const c = getJmpContentConfig()\n if (!c) {\n return null\n }\n try {\n return await getJmpTrustBundle(c)\n } catch {\n return null\n }\n}\n\nexport function filterFeaturedTrustQuotes(\n testimonials: JmpTestimonial[],\n placement: \"testimonials\" | \"reviews\",\n limit = 2,\n): JmpTestimonial[] {\n return testimonials\n .filter((item) => {\n if (!item.featured) {\n return false\n }\n const bucket = item.placement?.trim().toLowerCase()\n if (placement === \"reviews\") {\n return bucket === \"reviews\"\n }\n return !bucket || bucket === \"testimonials\"\n })\n .sort((a, b) => a.sort_order - b.sort_order)\n .slice(0, limit)\n}\n\nexport async function loadPopularPages(filters?: {\n prefix?: string\n days?: number\n limit?: number\n}): Promise<JmpPopularPagesResult | null> {\n const c = getJmpContentConfig()\n if (!c) {\n return null\n }\n try {\n return await getJmpPopularPages(c, filters)\n } catch {\n return null\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAqEA,IAAM,qBAAqB;AAAA,EACzB,aAAa,CAAC,gBAAgB,cAAc;AAAA,EAC5C,kBAAkB,CAAC,sBAAsB,sBAAsB;AAAA,EAC/D,iBAAiB,CAAC,qBAAqB,mBAAmB;AAAA,EAC1D,OAAO,CAAC,SAAS,gBAAgB;AAAA,EACjC,aAAa,CAAC,gBAAgB,gBAAgB,mBAAmB;AAAA,EACjE,oBAAoB,CAAC,yBAAyB,uBAAuB;AACvE;AAEA,SAAS,cAAc,OAAqC;AAC1D,SAAO,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM;AAC/B,UAAM,KAAK,EAAE,gBAAgB,EAAE;AAC/B,UAAM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F;AAEO,SAAS,0BACd,cACA,WACA,QAAQ,GACU;AAClB,SAAO,aACJ,OAAO,CAAC,SAAS;AAChB,QAAI,CAAC,KAAK,UAAU;AAClB,aAAO;AAAA,IACT;AACA,UAAM,SAAS,KAAK,WAAW,KAAK,EAAE,YAAY;AAClD,QAAI,cAAc,WAAW;AAC3B,aAAO,WAAW;AAAA,IACpB;AACA,WAAO,CAAC,UAAU,WAAW;AAAA,EAC/B,CAAC,EACA,KAAK,CAAC,GAAG,MAAM,EAAE,aAAa,EAAE,UAAU,EAC1C,MAAM,GAAG,KAAK;AACnB;AAEA,eAAsB,iBAAiB,SAIG;AACxC,QAAM,IAAI,oBAAoB;AAC9B,MAAI,CAAC,GAAG;AACN,WAAO;AAAA,EACT;AACA,MAAI;AACF,WAAO,MAAM,mBAAmB,GAAG,OAAO;AAAA,EAC5C,QAAQ;AACN,WAAO;AAAA,EACT;AACF;","names":[]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|