@codebards/ik-embeddable-form 0.0.2804300632-qa → 0.0.2805157325-qa
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/dist/embed.js +197 -187
- package/dist/embed.js.map +1 -1
- package/package.json +1 -1
package/dist/embed.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
var IKEmbeddableFormBundle = function(exports) {
|
|
2
2
|
"use strict";
|
|
3
|
+
var _a, _b, _c, _d;
|
|
3
4
|
const loadedContainerIds = /* @__PURE__ */ new Set();
|
|
4
5
|
function resolveContainerId(override) {
|
|
5
6
|
const id = ((override == null ? void 0 : override.trim()) || "GTM-P335R9N").trim();
|
|
@@ -94,8 +95,8 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
94
95
|
function buildFieldOwnerMap(config) {
|
|
95
96
|
const map = {};
|
|
96
97
|
config.steps.forEach((step) => {
|
|
97
|
-
var
|
|
98
|
-
(
|
|
98
|
+
var _a2;
|
|
99
|
+
(_a2 = step.fields) == null ? void 0 : _a2.forEach((field) => {
|
|
99
100
|
map[field.name] = [...map[field.name] ?? [], step.id];
|
|
100
101
|
});
|
|
101
102
|
});
|
|
@@ -104,10 +105,10 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
104
105
|
function buildFieldLabelMap(config) {
|
|
105
106
|
const map = {};
|
|
106
107
|
config.steps.forEach((step) => {
|
|
107
|
-
var
|
|
108
|
-
(
|
|
109
|
-
var
|
|
110
|
-
if (!((
|
|
108
|
+
var _a2;
|
|
109
|
+
(_a2 = step.fields) == null ? void 0 : _a2.forEach((field) => {
|
|
110
|
+
var _a3;
|
|
111
|
+
if (!((_a3 = field.options) == null ? void 0 : _a3.length)) return;
|
|
111
112
|
const byValue = {};
|
|
112
113
|
field.options.forEach((opt) => {
|
|
113
114
|
byValue[String(opt.value)] = opt.label;
|
|
@@ -126,13 +127,13 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
126
127
|
function buildFormValues(formData, labels = {}, fields = ANALYTICS_VALUE_FIELDS) {
|
|
127
128
|
const snapshot = {};
|
|
128
129
|
fields.forEach((key) => {
|
|
129
|
-
var
|
|
130
|
+
var _a2;
|
|
130
131
|
const value = formData[key];
|
|
131
132
|
if (value === void 0 || value === null || value === "") return;
|
|
132
133
|
if (!isPrimitive$1(value)) return;
|
|
133
134
|
const snakeKey = toSnakeCase(key);
|
|
134
135
|
snapshot[snakeKey] = value;
|
|
135
|
-
const label = (
|
|
136
|
+
const label = (_a2 = labels[key]) == null ? void 0 : _a2[String(value)];
|
|
136
137
|
if (label) snapshot[`${snakeKey}_label`] = label;
|
|
137
138
|
});
|
|
138
139
|
return snapshot;
|
|
@@ -713,9 +714,9 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
713
714
|
return path.startsWith("/") ? path : `/${path}`;
|
|
714
715
|
}
|
|
715
716
|
function resolveStaticCtaPageUrl(openConfig) {
|
|
716
|
-
var
|
|
717
|
+
var _a2;
|
|
717
718
|
const { ctaPagePrefix } = getSiteStaticDefaults(openConfig.site);
|
|
718
|
-
if ((
|
|
719
|
+
if ((_a2 = openConfig.ctaPageUrl) == null ? void 0 : _a2.trim()) {
|
|
719
720
|
const raw = openConfig.ctaPageUrl.trim();
|
|
720
721
|
if (raw.includes("://") || raw.startsWith("learn.com") || raw.startsWith("ik.com")) {
|
|
721
722
|
return raw;
|
|
@@ -946,7 +947,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
946
947
|
}
|
|
947
948
|
const UNKNOWN = { browserName: "Unknown", browserVersion: "Unknown" };
|
|
948
949
|
function getBrowserDetails() {
|
|
949
|
-
var
|
|
950
|
+
var _a2, _b2, _c2;
|
|
950
951
|
try {
|
|
951
952
|
const ua = navigator.userAgent;
|
|
952
953
|
let browserName = "Unknown";
|
|
@@ -956,16 +957,16 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
956
957
|
version = ua.split("Firefox/")[1] || "Unknown";
|
|
957
958
|
} else if (ua.indexOf("Chrome") > -1 && ua.indexOf("Edg/") === -1) {
|
|
958
959
|
browserName = "Chrome";
|
|
959
|
-
version = ((
|
|
960
|
+
version = ((_a2 = ua.split("Chrome/")[1]) == null ? void 0 : _a2.split(" ")[0]) || "Unknown";
|
|
960
961
|
} else if (ua.indexOf("Safari") > -1 && ua.indexOf("Chrome") === -1) {
|
|
961
962
|
browserName = "Safari";
|
|
962
|
-
version = ((
|
|
963
|
+
version = ((_b2 = ua.split("Version/")[1]) == null ? void 0 : _b2.split(" ")[0]) || "Unknown";
|
|
963
964
|
} else if (ua.indexOf("Edg/") > -1) {
|
|
964
965
|
browserName = "Edge";
|
|
965
966
|
version = ua.split("Edg/")[1] || "Unknown";
|
|
966
967
|
} else if (ua.indexOf("Trident/") > -1) {
|
|
967
968
|
browserName = "Internet Explorer";
|
|
968
|
-
version = ((
|
|
969
|
+
version = ((_c2 = ua.split("rv:")[1]) == null ? void 0 : _c2.split(")")[0]) || "Unknown";
|
|
969
970
|
}
|
|
970
971
|
return { browserName, browserVersion: version };
|
|
971
972
|
} catch {
|
|
@@ -1061,8 +1062,8 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
1061
1062
|
day: "2-digit"
|
|
1062
1063
|
}).formatToParts(/* @__PURE__ */ new Date());
|
|
1063
1064
|
const get2 = (type) => {
|
|
1064
|
-
var
|
|
1065
|
-
return Number((
|
|
1065
|
+
var _a2;
|
|
1066
|
+
return Number((_a2 = parts.find((p2) => p2.type === type)) == null ? void 0 : _a2.value);
|
|
1066
1067
|
};
|
|
1067
1068
|
return { year: get2("year"), month: get2("month"), day: get2("day") };
|
|
1068
1069
|
}
|
|
@@ -1078,8 +1079,8 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
1078
1079
|
hourCycle: "h23"
|
|
1079
1080
|
}).formatToParts(date);
|
|
1080
1081
|
const get2 = (type) => {
|
|
1081
|
-
var
|
|
1082
|
-
return Number((
|
|
1082
|
+
var _a2;
|
|
1083
|
+
return Number((_a2 = parts.find((p2) => p2.type === type)) == null ? void 0 : _a2.value);
|
|
1083
1084
|
};
|
|
1084
1085
|
return {
|
|
1085
1086
|
year: get2("year"),
|
|
@@ -1091,9 +1092,9 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
1091
1092
|
};
|
|
1092
1093
|
}
|
|
1093
1094
|
function timeZoneOffsetString(timeZone, at) {
|
|
1094
|
-
var
|
|
1095
|
+
var _a2;
|
|
1095
1096
|
try {
|
|
1096
|
-
const raw = ((
|
|
1097
|
+
const raw = ((_a2 = new Intl.DateTimeFormat("en-US", { timeZone, timeZoneName: "longOffset" }).formatToParts(at).find((p2) => p2.type === "timeZoneName")) == null ? void 0 : _a2.value) ?? "GMT+00:00";
|
|
1097
1098
|
let offset = raw.replace("GMT", "") || "+00:00";
|
|
1098
1099
|
if (/^[+-]\d:/.test(offset)) offset = offset.replace(/^([+-])(\d):/, "$10$2:");
|
|
1099
1100
|
return offset || "+00:00";
|
|
@@ -1343,13 +1344,13 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
1343
1344
|
return new Date(year, monthIndex, day, hour24, minute);
|
|
1344
1345
|
}
|
|
1345
1346
|
function formatFirstSlotBadgeDate(slots) {
|
|
1346
|
-
var
|
|
1347
|
-
const startTime = (
|
|
1347
|
+
var _a2, _b2, _c2;
|
|
1348
|
+
const startTime = (_a2 = slots == null ? void 0 : slots[0]) == null ? void 0 : _a2.startTime;
|
|
1348
1349
|
if (!startTime) return null;
|
|
1349
1350
|
const date = new Date(startTime);
|
|
1350
1351
|
if (Number.isNaN(date.getTime())) return null;
|
|
1351
|
-
const weekday = ((
|
|
1352
|
-
const month = ((
|
|
1352
|
+
const weekday = ((_b2 = WEEKDAYS[date.getDay()]) == null ? void 0 : _b2.slice(0, 3)) ?? "";
|
|
1353
|
+
const month = ((_c2 = MONTHS[date.getMonth()]) == null ? void 0 : _c2.slice(0, 3)) ?? "";
|
|
1353
1354
|
return `${weekday}, ${date.getDate()} ${month}`;
|
|
1354
1355
|
}
|
|
1355
1356
|
const defaultVariant = {
|
|
@@ -1699,14 +1700,14 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
1699
1700
|
return value.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
1700
1701
|
}
|
|
1701
1702
|
function resolveOfferUtmTerm() {
|
|
1702
|
-
var
|
|
1703
|
+
var _a2;
|
|
1703
1704
|
const fromUrl = new URLSearchParams(window.location.search).get("utm_term");
|
|
1704
1705
|
if (fromUrl == null ? void 0 : fromUrl.trim()) return fromUrl;
|
|
1705
|
-
return ((
|
|
1706
|
+
return ((_a2 = getWebinarContextOrNull()) == null ? void 0 : _a2.utm.utm_term) ?? "";
|
|
1706
1707
|
}
|
|
1707
1708
|
function offerQualifies(offer, utmTerm) {
|
|
1708
|
-
var
|
|
1709
|
-
const gates = (
|
|
1709
|
+
var _a2;
|
|
1710
|
+
const gates = (_a2 = offer.showForUtmTerms) == null ? void 0 : _a2.filter((gate) => normalizeTerm(gate).length > 0);
|
|
1710
1711
|
if (!(gates == null ? void 0 : gates.length)) return true;
|
|
1711
1712
|
const term = normalizeTerm(utmTerm);
|
|
1712
1713
|
if (!term) return false;
|
|
@@ -1725,15 +1726,15 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
1725
1726
|
const STYLE_VARIANTS = ["default", "webinar-card"];
|
|
1726
1727
|
const DEFAULT_STYLE_VARIANT = "default";
|
|
1727
1728
|
function resolveLayoutConfig(config) {
|
|
1728
|
-
var
|
|
1729
|
-
if (((
|
|
1729
|
+
var _a2, _b2, _c2, _d2, _e, _f;
|
|
1730
|
+
if (((_a2 = config.layout) == null ? void 0 : _a2.type) === "split") {
|
|
1730
1731
|
return config.layout;
|
|
1731
1732
|
}
|
|
1732
|
-
if (((
|
|
1733
|
+
if (((_b2 = config.theme) == null ? void 0 : _b2.layout) === "split") {
|
|
1733
1734
|
return {
|
|
1734
1735
|
type: "split",
|
|
1735
|
-
modalMaxWidth: config.theme.modalMaxWidth ?? ((
|
|
1736
|
-
modalMinHeight: ((
|
|
1736
|
+
modalMaxWidth: config.theme.modalMaxWidth ?? ((_c2 = config.layout) == null ? void 0 : _c2.modalMaxWidth),
|
|
1737
|
+
modalMinHeight: ((_d2 = config.layout) == null ? void 0 : _d2.modalMinHeight) ?? "618px",
|
|
1737
1738
|
leftPanel: ((_e = config.layout) == null ? void 0 : _e.leftPanel) ?? (config.theme.sidebar ? {
|
|
1738
1739
|
type: "webinar-promo",
|
|
1739
1740
|
data: config.theme.sidebar
|
|
@@ -1747,17 +1748,17 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
1747
1748
|
return config.layout ?? null;
|
|
1748
1749
|
}
|
|
1749
1750
|
function isSplitLayout(config) {
|
|
1750
|
-
var
|
|
1751
|
-
return ((
|
|
1751
|
+
var _a2;
|
|
1752
|
+
return ((_a2 = resolveLayoutConfig(config)) == null ? void 0 : _a2.type) === "split";
|
|
1752
1753
|
}
|
|
1753
1754
|
function getLeftPanel(config) {
|
|
1754
|
-
var
|
|
1755
|
-
const panel = (
|
|
1755
|
+
var _a2;
|
|
1756
|
+
const panel = (_a2 = resolveLayoutConfig(config)) == null ? void 0 : _a2.leftPanel;
|
|
1756
1757
|
return panel ? resolveLeftPanelOffer(panel) : void 0;
|
|
1757
1758
|
}
|
|
1758
1759
|
function getRightPanel(config) {
|
|
1759
|
-
var
|
|
1760
|
-
const panel = ((
|
|
1760
|
+
var _a2;
|
|
1761
|
+
const panel = ((_a2 = resolveLayoutConfig(config)) == null ? void 0 : _a2.rightPanel) ?? {};
|
|
1761
1762
|
if (!panel.privacyPolicyUrl) return panel;
|
|
1762
1763
|
return {
|
|
1763
1764
|
...panel,
|
|
@@ -1765,9 +1766,9 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
1765
1766
|
};
|
|
1766
1767
|
}
|
|
1767
1768
|
function shouldShowLeftPanel(config, openConfig, currentStepId) {
|
|
1768
|
-
var
|
|
1769
|
+
var _a2;
|
|
1769
1770
|
if (openConfig == null ? void 0 : openConfig.hideLeftPanel) return false;
|
|
1770
|
-
if ((
|
|
1771
|
+
if ((_a2 = resolveLayoutConfig(config)) == null ? void 0 : _a2.hideLeftPanel) return false;
|
|
1771
1772
|
const currentStep = config.steps.find((s2) => s2.id === currentStepId);
|
|
1772
1773
|
if (currentStep == null ? void 0 : currentStep.hideLeftPanel) return false;
|
|
1773
1774
|
return !!getLeftPanel(config);
|
|
@@ -1782,9 +1783,9 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
1782
1783
|
return getDisplayMode(openConfig) === "modal";
|
|
1783
1784
|
}
|
|
1784
1785
|
function isStepperEnabled(config, openConfig) {
|
|
1785
|
-
var
|
|
1786
|
+
var _a2;
|
|
1786
1787
|
if ((openConfig == null ? void 0 : openConfig.showStepper) !== void 0) return openConfig.showStepper;
|
|
1787
|
-
const rightPanel = (
|
|
1788
|
+
const rightPanel = (_a2 = resolveLayoutConfig(config)) == null ? void 0 : _a2.rightPanel;
|
|
1788
1789
|
if ((rightPanel == null ? void 0 : rightPanel.showStepper) !== void 0) return rightPanel.showStepper;
|
|
1789
1790
|
return true;
|
|
1790
1791
|
}
|
|
@@ -1798,8 +1799,8 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
1798
1799
|
return trimmed || void 0;
|
|
1799
1800
|
}
|
|
1800
1801
|
function getFormIntro(config, openConfig) {
|
|
1801
|
-
var
|
|
1802
|
-
const panelIntro = (
|
|
1802
|
+
var _a2, _b2;
|
|
1803
|
+
const panelIntro = (_b2 = (_a2 = resolveLayoutConfig(config)) == null ? void 0 : _a2.rightPanel) == null ? void 0 : _b2.formIntro;
|
|
1803
1804
|
const runtimeIntro = openConfig == null ? void 0 : openConfig.formIntro;
|
|
1804
1805
|
const intro = {
|
|
1805
1806
|
tag: trimIntroField((runtimeIntro == null ? void 0 : runtimeIntro.tag) ?? (panelIntro == null ? void 0 : panelIntro.tag)),
|
|
@@ -1812,10 +1813,10 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
1812
1813
|
return intro;
|
|
1813
1814
|
}
|
|
1814
1815
|
function shouldShowFormIntro(config, openConfig, progressSteps, currentStepId) {
|
|
1815
|
-
var
|
|
1816
|
+
var _a2;
|
|
1816
1817
|
const intro = getFormIntro(config, openConfig);
|
|
1817
1818
|
if (!intro) return false;
|
|
1818
|
-
const firstFormStepId = (
|
|
1819
|
+
const firstFormStepId = (_a2 = progressSteps.find((s2) => s2.type === "form")) == null ? void 0 : _a2.id;
|
|
1819
1820
|
return firstFormStepId === currentStepId;
|
|
1820
1821
|
}
|
|
1821
1822
|
const warnedStyleVariants = /* @__PURE__ */ new Set();
|
|
@@ -1833,16 +1834,16 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
1833
1834
|
return null;
|
|
1834
1835
|
}
|
|
1835
1836
|
function getStyleVariant(config, openConfig) {
|
|
1836
|
-
var
|
|
1837
|
-
return normalizeStyleVariant(openConfig == null ? void 0 : openConfig.styleVariant) ?? normalizeStyleVariant((
|
|
1837
|
+
var _a2;
|
|
1838
|
+
return normalizeStyleVariant(openConfig == null ? void 0 : openConfig.styleVariant) ?? normalizeStyleVariant((_a2 = resolveLayoutConfig(config)) == null ? void 0 : _a2.styleVariant) ?? DEFAULT_STYLE_VARIANT;
|
|
1838
1839
|
}
|
|
1839
1840
|
function getCardChrome(config) {
|
|
1840
|
-
var
|
|
1841
|
-
return ((
|
|
1841
|
+
var _a2;
|
|
1842
|
+
return ((_a2 = resolveLayoutConfig(config)) == null ? void 0 : _a2.card) ?? {};
|
|
1842
1843
|
}
|
|
1843
1844
|
function getDesignTokens(config, openConfig) {
|
|
1844
|
-
var
|
|
1845
|
-
return { ...((
|
|
1845
|
+
var _a2;
|
|
1846
|
+
return { ...((_a2 = config.theme) == null ? void 0 : _a2.tokens) ?? {}, ...(openConfig == null ? void 0 : openConfig.themeTokens) ?? {} };
|
|
1846
1847
|
}
|
|
1847
1848
|
function shouldShowContinueBrowsingButton(openConfig) {
|
|
1848
1849
|
if ((openConfig == null ? void 0 : openConfig.showContinueBrowsingButton) !== void 0) {
|
|
@@ -2138,13 +2139,13 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
2138
2139
|
return this.resolveLinearNext(currentStep, allSteps, formData);
|
|
2139
2140
|
}
|
|
2140
2141
|
resolveLinearNext(currentStep, allSteps, formData) {
|
|
2141
|
-
var
|
|
2142
|
+
var _a2;
|
|
2142
2143
|
const visible = this.resolveVisibleSteps(allSteps, formData);
|
|
2143
2144
|
const idx = visible.findIndex((s2) => s2.id === currentStep.id);
|
|
2144
2145
|
let nextIdx = idx + 1;
|
|
2145
2146
|
while (nextIdx < visible.length) {
|
|
2146
2147
|
const next = visible[nextIdx];
|
|
2147
|
-
if (next.type === "auto" && ((
|
|
2148
|
+
if (next.type === "auto" && ((_a2 = next.autoExecute) == null ? void 0 : _a2.background) && next.autoExecute.onSuccess) {
|
|
2148
2149
|
return next.autoExecute.onSuccess;
|
|
2149
2150
|
}
|
|
2150
2151
|
return next.id;
|
|
@@ -2450,10 +2451,10 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
2450
2451
|
}
|
|
2451
2452
|
}
|
|
2452
2453
|
async function sha256Hex(value) {
|
|
2453
|
-
var
|
|
2454
|
+
var _a2;
|
|
2454
2455
|
const normalized = value.trim().toLowerCase();
|
|
2455
2456
|
if (!normalized) return "";
|
|
2456
|
-
const subtle = (
|
|
2457
|
+
const subtle = (_a2 = globalThis.crypto) == null ? void 0 : _a2.subtle;
|
|
2457
2458
|
if (!subtle) return "";
|
|
2458
2459
|
try {
|
|
2459
2460
|
const bytes = new TextEncoder().encode(normalized);
|
|
@@ -2465,7 +2466,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
2465
2466
|
}
|
|
2466
2467
|
class FormEngine {
|
|
2467
2468
|
constructor(config, openConfig, apiClient2, analytics2) {
|
|
2468
|
-
var
|
|
2469
|
+
var _a2;
|
|
2469
2470
|
this.listeners = /* @__PURE__ */ new Set();
|
|
2470
2471
|
this.slotsPrefetchPromise = null;
|
|
2471
2472
|
this.slotBookingPromise = null;
|
|
@@ -2477,7 +2478,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
2477
2478
|
this.analytics = analytics2;
|
|
2478
2479
|
this.fieldLabels = buildFieldLabelMap(config);
|
|
2479
2480
|
this.fieldOwnerSteps = buildFieldOwnerMap(config);
|
|
2480
|
-
this.valueFields = ((
|
|
2481
|
+
this.valueFields = ((_a2 = config.analytics) == null ? void 0 : _a2.valueFields) ?? ANALYTICS_VALUE_FIELDS;
|
|
2481
2482
|
const initialFormData = this.buildInitialFormData();
|
|
2482
2483
|
const firstStep = this.resolveFirstStep(initialFormData);
|
|
2483
2484
|
this.state = {
|
|
@@ -2570,11 +2571,11 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
2570
2571
|
return () => this.listeners.delete(listener);
|
|
2571
2572
|
}
|
|
2572
2573
|
async start() {
|
|
2573
|
-
var
|
|
2574
|
+
var _a2;
|
|
2574
2575
|
resetFormValues();
|
|
2575
2576
|
await this.ensureEmailDigest();
|
|
2576
2577
|
this.analytics.trackFormOpen(this.config.id, this.openConfig.variant);
|
|
2577
|
-
const dataClickId = (
|
|
2578
|
+
const dataClickId = (_a2 = this.openConfig.dataClickId) == null ? void 0 : _a2.trim();
|
|
2578
2579
|
if (dataClickId) {
|
|
2579
2580
|
void trackClickActivity(dataClickId, {});
|
|
2580
2581
|
}
|
|
@@ -2709,8 +2710,8 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
2709
2710
|
return Boolean(timeSlot || linkedIn || resume);
|
|
2710
2711
|
}
|
|
2711
2712
|
resolveStepApis(step, stepFormData) {
|
|
2712
|
-
var
|
|
2713
|
-
if ((
|
|
2713
|
+
var _a2;
|
|
2714
|
+
if ((_a2 = step.apis) == null ? void 0 : _a2.length) {
|
|
2714
2715
|
return step.apis.filter((api) => {
|
|
2715
2716
|
if (!api.requiresField) return true;
|
|
2716
2717
|
const value = this.state.formData[api.requiresField] ?? stepFormData[api.requiresField];
|
|
@@ -2817,8 +2818,8 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
2817
2818
|
hasSlotBookingStep() {
|
|
2818
2819
|
return this.stepResolver.resolveVisibleSteps(this.config.steps, this.state.formData).some(
|
|
2819
2820
|
(step) => {
|
|
2820
|
-
var
|
|
2821
|
-
return step.id === "slot-selection" || ((
|
|
2821
|
+
var _a2;
|
|
2822
|
+
return step.id === "slot-selection" || ((_a2 = step.autoExecute) == null ? void 0 : _a2.action) === "book-webinar-slot";
|
|
2822
2823
|
}
|
|
2823
2824
|
);
|
|
2824
2825
|
}
|
|
@@ -2887,10 +2888,10 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
2887
2888
|
await this.ensureSlotsReady(step);
|
|
2888
2889
|
}
|
|
2889
2890
|
async runStepSuccess(step, response) {
|
|
2890
|
-
var
|
|
2891
|
+
var _a2;
|
|
2891
2892
|
if (step.onStepSuccess === "webinar-contact-success") {
|
|
2892
2893
|
const res = response;
|
|
2893
|
-
const sfUuid = (res == null ? void 0 : res.salesforce_uuid) ?? ((
|
|
2894
|
+
const sfUuid = (res == null ? void 0 : res.salesforce_uuid) ?? ((_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.salesforce_uuid);
|
|
2894
2895
|
if (sfUuid) {
|
|
2895
2896
|
persistSalesforceUuid(String(sfUuid));
|
|
2896
2897
|
this.mergeFormData({ salesforceUuid: sfUuid });
|
|
@@ -2989,7 +2990,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
2989
2990
|
}
|
|
2990
2991
|
/** Terminal bookkeeping for a finished flow — idempotent per session. */
|
|
2991
2992
|
markFormComplete(stepId, response) {
|
|
2992
|
-
var
|
|
2993
|
+
var _a2, _b2;
|
|
2993
2994
|
if (this.state.isComplete) return;
|
|
2994
2995
|
const result = {
|
|
2995
2996
|
success: true,
|
|
@@ -3005,11 +3006,11 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
3005
3006
|
this.openConfig.variant,
|
|
3006
3007
|
this.recordValues()
|
|
3007
3008
|
);
|
|
3008
|
-
(
|
|
3009
|
+
(_b2 = (_a2 = this.openConfig).onSuccess) == null ? void 0 : _b2.call(_a2, result);
|
|
3009
3010
|
}
|
|
3010
3011
|
async finalSubmit() {
|
|
3011
|
-
var
|
|
3012
|
-
if (!((
|
|
3012
|
+
var _a2, _b2, _c2;
|
|
3013
|
+
if (!((_a2 = this.config.api) == null ? void 0 : _a2.payloadBuilder)) return;
|
|
3013
3014
|
const enrichedData = this.enrichFormDataForApi();
|
|
3014
3015
|
const { mappedData, response } = await this.apiClient.execute(
|
|
3015
3016
|
this.config.api,
|
|
@@ -3030,7 +3031,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
3030
3031
|
this.recordValues()
|
|
3031
3032
|
);
|
|
3032
3033
|
this.setState({ isComplete: true });
|
|
3033
|
-
(
|
|
3034
|
+
(_c2 = (_b2 = this.openConfig).onSuccess) == null ? void 0 : _c2.call(_b2, result);
|
|
3034
3035
|
}
|
|
3035
3036
|
navigateTo(stepId) {
|
|
3036
3037
|
const next = this.getStepById(stepId);
|
|
@@ -3083,8 +3084,8 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
3083
3084
|
if (fromIdx === -1 || toIdx === -1 || toIdx <= fromIdx + 1) return;
|
|
3084
3085
|
const autoStep = visible.slice(fromIdx + 1, toIdx).find(
|
|
3085
3086
|
(step) => {
|
|
3086
|
-
var
|
|
3087
|
-
return this.stepResolver.isAutoStep(step) && ((
|
|
3087
|
+
var _a2;
|
|
3088
|
+
return this.stepResolver.isAutoStep(step) && ((_a2 = step.autoExecute) == null ? void 0 : _a2.background) && step.autoExecute.action === "book-webinar-slot";
|
|
3088
3089
|
}
|
|
3089
3090
|
);
|
|
3090
3091
|
if (!(autoStep == null ? void 0 : autoStep.autoExecute)) return;
|
|
@@ -3131,7 +3132,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
3131
3132
|
this.analytics.trackStepComplete(this.config.id, sourceStepId);
|
|
3132
3133
|
}
|
|
3133
3134
|
handleError(err, stepId) {
|
|
3134
|
-
var
|
|
3135
|
+
var _a2, _b2;
|
|
3135
3136
|
this.analytics.trackError(err, { stepId, formId: this.config.id });
|
|
3136
3137
|
const error = err && typeof err === "object" && "code" in err ? err : {
|
|
3137
3138
|
code: "UNKNOWN_ERROR",
|
|
@@ -3139,10 +3140,10 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
3139
3140
|
stepId
|
|
3140
3141
|
};
|
|
3141
3142
|
this.setState({ error });
|
|
3142
|
-
(
|
|
3143
|
+
(_b2 = (_a2 = this.openConfig).onError) == null ? void 0 : _b2.call(_a2, error);
|
|
3143
3144
|
}
|
|
3144
3145
|
fireStepAnalytics(step) {
|
|
3145
|
-
var
|
|
3146
|
+
var _a2;
|
|
3146
3147
|
const progressSteps = this.getProgressSteps();
|
|
3147
3148
|
const stepIndex = progressSteps.findIndex((s2) => s2.id === step.id);
|
|
3148
3149
|
recordStepId(step.id);
|
|
@@ -3160,7 +3161,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
3160
3161
|
);
|
|
3161
3162
|
}
|
|
3162
3163
|
const values = this.recordValues();
|
|
3163
|
-
(
|
|
3164
|
+
(_a2 = step.analyticsEvents) == null ? void 0 : _a2.forEach((event) => {
|
|
3164
3165
|
this.analytics.track({
|
|
3165
3166
|
...event,
|
|
3166
3167
|
metadata: { ...event.metadata, [FORM_VALUES_DL_KEY]: values }
|
|
@@ -3212,8 +3213,8 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
3212
3213
|
Object.assign(data, this.openConfig.prefilledValues);
|
|
3213
3214
|
}
|
|
3214
3215
|
this.config.steps.forEach((step) => {
|
|
3215
|
-
var
|
|
3216
|
-
(
|
|
3216
|
+
var _a2;
|
|
3217
|
+
(_a2 = step.fields) == null ? void 0 : _a2.forEach((field) => {
|
|
3217
3218
|
if (field.defaultValue !== void 0 && data[field.name] === void 0) {
|
|
3218
3219
|
data[field.name] = field.defaultValue;
|
|
3219
3220
|
}
|
|
@@ -3520,9 +3521,9 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
3520
3521
|
};
|
|
3521
3522
|
}
|
|
3522
3523
|
function resolveOptionLabel(options, value) {
|
|
3523
|
-
var
|
|
3524
|
+
var _a2;
|
|
3524
3525
|
if (!value) return "";
|
|
3525
|
-
const resolved = ((
|
|
3526
|
+
const resolved = ((_a2 = options.find((option) => option.value === value)) == null ? void 0 : _a2.label) ?? value;
|
|
3526
3527
|
return normalizeAsciiDash(resolved);
|
|
3527
3528
|
}
|
|
3528
3529
|
function normalizeExperienceForApi(value) {
|
|
@@ -3830,8 +3831,8 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
3830
3831
|
captureError(error, context);
|
|
3831
3832
|
}
|
|
3832
3833
|
trackFormOpen(formId, variant) {
|
|
3833
|
-
var
|
|
3834
|
-
const visitorId = (
|
|
3834
|
+
var _a2;
|
|
3835
|
+
const visitorId = (_a2 = getWebinarContextOrNull()) == null ? void 0 : _a2.visitorId;
|
|
3835
3836
|
if (visitorId) setClarityContext(visitorId);
|
|
3836
3837
|
this.track({
|
|
3837
3838
|
name: "form_open",
|
|
@@ -3937,8 +3938,8 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
3937
3938
|
return merged;
|
|
3938
3939
|
}
|
|
3939
3940
|
function isStepInVariantScope(step, variantId) {
|
|
3940
|
-
var
|
|
3941
|
-
if (!((
|
|
3941
|
+
var _a2;
|
|
3942
|
+
if (!((_a2 = step.variantScope) == null ? void 0 : _a2.length)) return true;
|
|
3942
3943
|
return step.variantScope.includes(variantId);
|
|
3943
3944
|
}
|
|
3944
3945
|
function mergeVariantConfig(base, variantId, overrides) {
|
|
@@ -4581,7 +4582,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
4581
4582
|
return handleResult(ctx, result);
|
|
4582
4583
|
}
|
|
4583
4584
|
"~validate"(data) {
|
|
4584
|
-
var
|
|
4585
|
+
var _a2, _b2;
|
|
4585
4586
|
const ctx = {
|
|
4586
4587
|
common: {
|
|
4587
4588
|
issues: [],
|
|
@@ -4602,7 +4603,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
4602
4603
|
issues: ctx.common.issues
|
|
4603
4604
|
};
|
|
4604
4605
|
} catch (err) {
|
|
4605
|
-
if ((
|
|
4606
|
+
if ((_b2 = (_a2 = err == null ? void 0 : err.message) == null ? void 0 : _a2.toLowerCase()) == null ? void 0 : _b2.includes("encountered")) {
|
|
4606
4607
|
this["~standard"].async = true;
|
|
4607
4608
|
}
|
|
4608
4609
|
ctx.common = {
|
|
@@ -6342,8 +6343,8 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
6342
6343
|
unknownKeys: "strict",
|
|
6343
6344
|
...message !== void 0 ? {
|
|
6344
6345
|
errorMap: (issue, ctx) => {
|
|
6345
|
-
var
|
|
6346
|
-
const defaultError = ((
|
|
6346
|
+
var _a2, _b2;
|
|
6347
|
+
const defaultError = ((_b2 = (_a2 = this._def).errorMap) == null ? void 0 : _b2.call(_a2, issue, ctx).message) ?? ctx.defaultError;
|
|
6347
6348
|
if (issue.code === "unrecognized_keys")
|
|
6348
6349
|
return {
|
|
6349
6350
|
message: errorUtil.errToObj(message).message ?? defaultError
|
|
@@ -7963,8 +7964,8 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
7963
7964
|
return resolved;
|
|
7964
7965
|
}
|
|
7965
7966
|
findBundledVariantOverrides(config, variantId) {
|
|
7966
|
-
var
|
|
7967
|
-
return (
|
|
7967
|
+
var _a2, _b2;
|
|
7968
|
+
return (_b2 = (_a2 = config.variants) == null ? void 0 : _a2.find((v2) => v2.id === variantId)) == null ? void 0 : _b2.overrides;
|
|
7968
7969
|
}
|
|
7969
7970
|
applyPrefilledValues(config, values) {
|
|
7970
7971
|
const clone = this.deepClone(config);
|
|
@@ -9257,17 +9258,17 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
9257
9258
|
this._addCountryCode(c3.iso2, c3.dialCode, c3.priority);
|
|
9258
9259
|
}
|
|
9259
9260
|
for (var _i = 0; _i < this.countries.length; _i++) {
|
|
9260
|
-
var
|
|
9261
|
-
if (
|
|
9262
|
-
var rootCountryCode = this.countryCodes[
|
|
9263
|
-
for (var j2 = 0; j2 <
|
|
9264
|
-
var areaCode =
|
|
9261
|
+
var _c2 = this.countries[_i];
|
|
9262
|
+
if (_c2.areaCodes) {
|
|
9263
|
+
var rootCountryCode = this.countryCodes[_c2.dialCode][0];
|
|
9264
|
+
for (var j2 = 0; j2 < _c2.areaCodes.length; j2++) {
|
|
9265
|
+
var areaCode = _c2.areaCodes[j2];
|
|
9265
9266
|
for (var k2 = 1; k2 < areaCode.length; k2++) {
|
|
9266
|
-
var partialDialCode =
|
|
9267
|
+
var partialDialCode = _c2.dialCode + areaCode.substr(0, k2);
|
|
9267
9268
|
this._addCountryCode(rootCountryCode, partialDialCode);
|
|
9268
|
-
this._addCountryCode(
|
|
9269
|
+
this._addCountryCode(_c2.iso2, partialDialCode);
|
|
9269
9270
|
}
|
|
9270
|
-
this._addCountryCode(
|
|
9271
|
+
this._addCountryCode(_c2.iso2, _c2.dialCode + areaCode);
|
|
9271
9272
|
}
|
|
9272
9273
|
}
|
|
9273
9274
|
}
|
|
@@ -15930,7 +15931,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
15930
15931
|
}
|
|
15931
15932
|
}));
|
|
15932
15933
|
y(() => {
|
|
15933
|
-
var
|
|
15934
|
+
var _a2;
|
|
15934
15935
|
const container = containerRef.current;
|
|
15935
15936
|
if (!container || inputRef.current) return;
|
|
15936
15937
|
const input = document.createElement("input");
|
|
@@ -15943,7 +15944,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
15943
15944
|
if (dataTestId) input.dataset.testid = dataTestId;
|
|
15944
15945
|
container.appendChild(input);
|
|
15945
15946
|
inputRef.current = input;
|
|
15946
|
-
const initialCountry = (
|
|
15947
|
+
const initialCountry = (_a2 = initialCountryRef.current) == null ? void 0 : _a2.toLowerCase();
|
|
15947
15948
|
const iti = intlTelInput$1(input, {
|
|
15948
15949
|
initialCountry: initialCountry ?? "auto",
|
|
15949
15950
|
geoIpLookup: initialCountry ? void 0 : (callback) => {
|
|
@@ -15956,10 +15957,10 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
15956
15957
|
});
|
|
15957
15958
|
itiRef.current = iti;
|
|
15958
15959
|
const emitCountryChange = () => {
|
|
15959
|
-
var
|
|
15960
|
+
var _a3;
|
|
15960
15961
|
const data = iti.getSelectedCountryData();
|
|
15961
15962
|
if (!(data == null ? void 0 : data.iso2)) return;
|
|
15962
|
-
(
|
|
15963
|
+
(_a3 = onCountryChangeRef.current) == null ? void 0 : _a3.call(onCountryChangeRef, `+${data.dialCode}`, data.iso2);
|
|
15963
15964
|
};
|
|
15964
15965
|
const handleInput = () => {
|
|
15965
15966
|
const digits = input.value.replace(/\D/g, "");
|
|
@@ -15971,12 +15972,12 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
15971
15972
|
});
|
|
15972
15973
|
};
|
|
15973
15974
|
const handleBlur = (event) => {
|
|
15974
|
-
var
|
|
15975
|
-
(
|
|
15975
|
+
var _a3;
|
|
15976
|
+
(_a3 = onBlurRef.current) == null ? void 0 : _a3.call(onBlurRef, event);
|
|
15976
15977
|
};
|
|
15977
15978
|
const handleFocus = (event) => {
|
|
15978
|
-
var
|
|
15979
|
-
(
|
|
15979
|
+
var _a3;
|
|
15980
|
+
(_a3 = onFocusRef.current) == null ? void 0 : _a3.call(onFocusRef, event);
|
|
15980
15981
|
};
|
|
15981
15982
|
const handleOpen = () => container.classList.add("ik-phone-input--open");
|
|
15982
15983
|
const handleClose = () => container.classList.remove("ik-phone-input--open");
|
|
@@ -16571,10 +16572,10 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
16571
16572
|
"data-testid": leftPanelTestId(panelId, "progress-tracker"),
|
|
16572
16573
|
"aria-label": "Registration progress groups",
|
|
16573
16574
|
children: groups.map((group, idx) => {
|
|
16574
|
-
var
|
|
16575
|
+
var _a2;
|
|
16575
16576
|
const isActive = idx === activeGroupIndex;
|
|
16576
16577
|
const isPassed = idx < activeGroupIndex;
|
|
16577
|
-
const isPending = isPassed && !!((
|
|
16578
|
+
const isPending = isPassed && !!((_a2 = group.pendingOnStepIds) == null ? void 0 : _a2.includes(currentStepId));
|
|
16578
16579
|
const isComplete = isPassed && !isPending;
|
|
16579
16580
|
const isUpcoming = !isActive && !isComplete && !isPending;
|
|
16580
16581
|
const isLast = idx === groups.length - 1;
|
|
@@ -16817,9 +16818,9 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
16817
16818
|
firstSlotDateLabel,
|
|
16818
16819
|
closeButton
|
|
16819
16820
|
}) {
|
|
16820
|
-
var
|
|
16821
|
+
var _a2;
|
|
16821
16822
|
const testBase = modalTestId2 ? modalSectionTestId(modalTestId2, "form-intro") : void 0;
|
|
16822
|
-
const badges = ((
|
|
16823
|
+
const badges = ((_a2 = intro.badges) == null ? void 0 : _a2.filter((badge) => badge.show !== false)) ?? [];
|
|
16823
16824
|
return /* @__PURE__ */ u$1(
|
|
16824
16825
|
"div",
|
|
16825
16826
|
{
|
|
@@ -17174,7 +17175,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
17174
17175
|
}
|
|
17175
17176
|
}
|
|
17176
17177
|
function ensureFontLoaded(tokens) {
|
|
17177
|
-
var
|
|
17178
|
+
var _a2, _b2;
|
|
17178
17179
|
const clean = sanitizeDesignTokens(tokens);
|
|
17179
17180
|
const url = clean.fontUrl;
|
|
17180
17181
|
if (!url || loadedFontUrls.has(url)) return;
|
|
@@ -17184,7 +17185,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
17184
17185
|
loadFontStylesheet(url);
|
|
17185
17186
|
return;
|
|
17186
17187
|
}
|
|
17187
|
-
const family = clean.fontName ?? ((
|
|
17188
|
+
const family = clean.fontName ?? ((_b2 = (_a2 = clean.fontFamily) == null ? void 0 : _a2.split(",")[0]) == null ? void 0 : _b2.replace(/['"]/g, "").trim());
|
|
17188
17189
|
if (!family) {
|
|
17189
17190
|
console.warn(
|
|
17190
17191
|
"[IKForm] design token `fontUrl` points at a font file but neither `fontName` nor `fontFamily` was supplied — the font cannot be registered."
|
|
@@ -17454,7 +17455,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
17454
17455
|
modalTestId: modalTestId2,
|
|
17455
17456
|
children
|
|
17456
17457
|
}) {
|
|
17457
|
-
var
|
|
17458
|
+
var _a2;
|
|
17458
17459
|
const chrome = T$1(() => resolveCardChrome(getCardChrome(config)), [config]);
|
|
17459
17460
|
const tokens = T$1(() => getDesignTokens(config, openConfig), [config, openConfig]);
|
|
17460
17461
|
const showCloseButton = shouldShowCloseButton(openConfig);
|
|
@@ -17463,7 +17464,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
17463
17464
|
}, [tokens.fontUrl, tokens.fontName, tokens.fontFamily]);
|
|
17464
17465
|
const currentStep = config.steps.find((step) => step.id === currentStepId);
|
|
17465
17466
|
const isTerminalStep = (currentStep == null ? void 0 : currentStep.type) === "success" || (currentStep == null ? void 0 : currentStep.type) === "error";
|
|
17466
|
-
const showCapsules = chrome.capsules.show !== false && (((
|
|
17467
|
+
const showCapsules = chrome.capsules.show !== false && (((_a2 = chrome.capsules.items) == null ? void 0 : _a2.length) ?? 0) > 0;
|
|
17467
17468
|
const showTabs = chrome.tabs.show !== false && !isTerminalStep;
|
|
17468
17469
|
const showFooterNote = chrome.footerNote.show !== false && !!chrome.footerNote.text;
|
|
17469
17470
|
const showCountdown = chrome.countdown.show !== false;
|
|
@@ -17544,11 +17545,11 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
17544
17545
|
onClose,
|
|
17545
17546
|
showContinueButton = true
|
|
17546
17547
|
}) {
|
|
17547
|
-
var
|
|
17548
|
+
var _a2;
|
|
17548
17549
|
const slots = state.formData.slots ?? [];
|
|
17549
17550
|
const slotId = state.formData.slotId;
|
|
17550
17551
|
const slot = slots.find((s2) => s2.id === slotId) ?? slots[0];
|
|
17551
|
-
const timezone = formatTimezoneWithOffset((
|
|
17552
|
+
const timezone = formatTimezoneWithOffset((_a2 = getWebinarContextOrNull()) == null ? void 0 : _a2.userTimezone);
|
|
17552
17553
|
const { success } = resolveCardChrome(getCardChrome(config));
|
|
17553
17554
|
const handleContinue = () => {
|
|
17554
17555
|
onClose();
|
|
@@ -17582,7 +17583,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
17582
17583
|
] });
|
|
17583
17584
|
}
|
|
17584
17585
|
function formatTimezoneWithOffset(timezone) {
|
|
17585
|
-
var
|
|
17586
|
+
var _a2;
|
|
17586
17587
|
const tz = timezone ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
17587
17588
|
if (!tz) return null;
|
|
17588
17589
|
try {
|
|
@@ -17590,7 +17591,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
17590
17591
|
timeZone: tz,
|
|
17591
17592
|
timeZoneName: "longOffset"
|
|
17592
17593
|
}).formatToParts(/* @__PURE__ */ new Date());
|
|
17593
|
-
const raw = (
|
|
17594
|
+
const raw = (_a2 = parts.find((p2) => p2.type === "timeZoneName")) == null ? void 0 : _a2.value;
|
|
17594
17595
|
if (!raw) return tz;
|
|
17595
17596
|
const normalized = raw.replace(/GMT([+-])0?(\d+)/, "GMT$1$2");
|
|
17596
17597
|
return `${tz} (${normalized})`;
|
|
@@ -17720,10 +17721,10 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
17720
17721
|
modalTestId: modalId,
|
|
17721
17722
|
children
|
|
17722
17723
|
}) {
|
|
17723
|
-
var
|
|
17724
|
+
var _a2;
|
|
17724
17725
|
const currentStep = progressSteps.find((s2) => s2.id === currentStepId);
|
|
17725
17726
|
const showProgress = shouldShowStepper(config, openConfig, progressSteps, currentStepId);
|
|
17726
|
-
const maxWidth = ((
|
|
17727
|
+
const maxWidth = ((_a2 = config.theme) == null ? void 0 : _a2.modalMaxWidth) ?? "520px";
|
|
17727
17728
|
return /* @__PURE__ */ u$1(
|
|
17728
17729
|
"div",
|
|
17729
17730
|
{
|
|
@@ -19828,13 +19829,13 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
19828
19829
|
}
|
|
19829
19830
|
}, [control, formState.isDirty]);
|
|
19830
19831
|
gn.useEffect(() => {
|
|
19831
|
-
var
|
|
19832
|
+
var _a2;
|
|
19832
19833
|
if (props.values && !deepEqual(props.values, _values.current)) {
|
|
19833
19834
|
control._reset(props.values, {
|
|
19834
19835
|
keepFieldsRef: true,
|
|
19835
19836
|
...control._options.resetOptions
|
|
19836
19837
|
});
|
|
19837
|
-
if (!((
|
|
19838
|
+
if (!((_a2 = control._options.resetOptions) === null || _a2 === void 0 ? void 0 : _a2.keepIsValid)) {
|
|
19838
19839
|
control._setValid();
|
|
19839
19840
|
}
|
|
19840
19841
|
_values.current = props.values;
|
|
@@ -19914,8 +19915,8 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
19914
19915
|
defaultValue: field.defaultValue ?? "",
|
|
19915
19916
|
rules,
|
|
19916
19917
|
render: ({ field: rhfField, fieldState }) => {
|
|
19917
|
-
var
|
|
19918
|
-
const errorMsg = (
|
|
19918
|
+
var _a2, _b2, _c2;
|
|
19919
|
+
const errorMsg = (_a2 = fieldState.error) == null ? void 0 : _a2.message;
|
|
19919
19920
|
const withFieldInteract = (props) => ({
|
|
19920
19921
|
...props,
|
|
19921
19922
|
onFocus: (e2) => {
|
|
@@ -19952,7 +19953,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
19952
19953
|
}
|
|
19953
19954
|
);
|
|
19954
19955
|
case "tel":
|
|
19955
|
-
if ((
|
|
19956
|
+
if ((_b2 = field.props) == null ? void 0 : _b2.phoneInput) {
|
|
19956
19957
|
const { ref: _phoneFieldRef, ...phoneControllerField } = rhfField;
|
|
19957
19958
|
return /* @__PURE__ */ u$1(
|
|
19958
19959
|
PhoneInput,
|
|
@@ -20012,7 +20013,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
20012
20013
|
onFieldInteract();
|
|
20013
20014
|
rhfField.onChange(value);
|
|
20014
20015
|
},
|
|
20015
|
-
layout: ((
|
|
20016
|
+
layout: ((_c2 = field.props) == null ? void 0 : _c2.layout) ?? "card",
|
|
20016
20017
|
"data-testid": fieldControlTestId(scope, field.name, "radio"),
|
|
20017
20018
|
optionTestId: (optionValue) => radioOptionTestId(scope, field.name, optionValue)
|
|
20018
20019
|
}
|
|
@@ -20063,17 +20064,17 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
20063
20064
|
}
|
|
20064
20065
|
}
|
|
20065
20066
|
function resolveFieldRules(field, phoneFieldProps) {
|
|
20066
|
-
var
|
|
20067
|
-
const isIntlPhoneField = field.type === "tel" && Boolean((
|
|
20067
|
+
var _a2, _b2, _c2;
|
|
20068
|
+
const isIntlPhoneField = field.type === "tel" && Boolean((_a2 = field.props) == null ? void 0 : _a2.phoneInput);
|
|
20068
20069
|
const rules = buildRules(field.validation ?? [], { intlPhone: isIntlPhoneField });
|
|
20069
20070
|
if (!isIntlPhoneField) return rules;
|
|
20070
|
-
const phoneMessage = ((
|
|
20071
|
+
const phoneMessage = ((_c2 = (_b2 = field.validation) == null ? void 0 : _b2.find((rule) => rule.type === "phone" || rule.type === "pattern")) == null ? void 0 : _c2.message) ?? "Enter a valid phone number.";
|
|
20071
20072
|
return {
|
|
20072
20073
|
...rules,
|
|
20073
20074
|
validate: (value) => {
|
|
20074
|
-
var
|
|
20075
|
+
var _a3, _b3;
|
|
20075
20076
|
if (value == null || String(value).trim() === "") return true;
|
|
20076
|
-
if (!((
|
|
20077
|
+
if (!((_b3 = (_a3 = phoneFieldProps == null ? void 0 : phoneFieldProps.inputRef) == null ? void 0 : _a3.current) == null ? void 0 : _b3.isValidNumber())) return phoneMessage;
|
|
20077
20078
|
return true;
|
|
20078
20079
|
}
|
|
20079
20080
|
};
|
|
@@ -20127,11 +20128,11 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
20127
20128
|
config,
|
|
20128
20129
|
onNext
|
|
20129
20130
|
}) {
|
|
20130
|
-
var
|
|
20131
|
+
var _a2, _b2;
|
|
20131
20132
|
const privacyPolicyUrl = getRightPanel(config).privacyPolicyUrl;
|
|
20132
20133
|
const ctx = getWebinarContextOrNull();
|
|
20133
20134
|
const defaultPhoneCode = state.formData.phoneCode || (ctx ? countryCodeToDialCode(ctx.vCountryCode) : "+91");
|
|
20134
|
-
const defaultCountryIso = state.formData.phoneCountryIso || ((
|
|
20135
|
+
const defaultCountryIso = state.formData.phoneCountryIso || ((_a2 = ctx == null ? void 0 : ctx.vCountryCode) == null ? void 0 : _a2.toLowerCase()) || "in";
|
|
20135
20136
|
const phoneInputRef = A$1(null);
|
|
20136
20137
|
const {
|
|
20137
20138
|
control,
|
|
@@ -20154,10 +20155,10 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
20154
20155
|
[setValue]
|
|
20155
20156
|
);
|
|
20156
20157
|
const onSubmit = (data) => {
|
|
20157
|
-
var
|
|
20158
|
+
var _a3;
|
|
20158
20159
|
const phoneCode = String(data.phoneCode ?? defaultPhoneCode);
|
|
20159
20160
|
const phoneDigits = String(data.phone ?? "").replace(/\D/g, "");
|
|
20160
|
-
const phoneNumberFull = ((
|
|
20161
|
+
const phoneNumberFull = ((_a3 = phoneInputRef.current) == null ? void 0 : _a3.getE164Number()) || `${phoneCode}${phoneDigits}`;
|
|
20161
20162
|
const fullName = String(data.fullName ?? "").trim();
|
|
20162
20163
|
const nameParts = fullName.split(/\s+/);
|
|
20163
20164
|
onNext({
|
|
@@ -20178,7 +20179,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
20178
20179
|
class: "ik-gql-step-shell",
|
|
20179
20180
|
children: [
|
|
20180
20181
|
/* @__PURE__ */ u$1(FormStepFieldsRegion, { scope: step.id, class: "flex flex-col gap-4 py-2", children: [
|
|
20181
|
-
(
|
|
20182
|
+
(_b2 = step.fields) == null ? void 0 : _b2.map((field) => /* @__PURE__ */ u$1(
|
|
20182
20183
|
FieldRenderer,
|
|
20183
20184
|
{
|
|
20184
20185
|
field,
|
|
@@ -20239,9 +20240,9 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
20239
20240
|
);
|
|
20240
20241
|
}
|
|
20241
20242
|
function buildDefaultValues$2(step, formData) {
|
|
20242
|
-
var
|
|
20243
|
+
var _a2;
|
|
20243
20244
|
const defaults = {};
|
|
20244
|
-
(
|
|
20245
|
+
(_a2 = step.fields) == null ? void 0 : _a2.forEach((field) => {
|
|
20245
20246
|
defaults[field.name] = formData[field.name] ?? field.defaultValue ?? "";
|
|
20246
20247
|
});
|
|
20247
20248
|
return defaults;
|
|
@@ -20528,7 +20529,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
20528
20529
|
onNext,
|
|
20529
20530
|
onBack
|
|
20530
20531
|
}) {
|
|
20531
|
-
var
|
|
20532
|
+
var _a2;
|
|
20532
20533
|
const {
|
|
20533
20534
|
control,
|
|
20534
20535
|
handleSubmit,
|
|
@@ -20555,7 +20556,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
20555
20556
|
/* @__PURE__ */ u$1(StepParagraph, { scope: step.id, name: "title", class: "text-[16px] font-semibold leading-normal text-[#101828]", children: step.title }),
|
|
20556
20557
|
step.subtitle && /* @__PURE__ */ u$1(StepParagraph, { scope: step.id, name: "subtitle", class: "text-[14px] font-normal leading-[1.5] text-black", children: step.subtitle })
|
|
20557
20558
|
] }),
|
|
20558
|
-
/* @__PURE__ */ u$1(FormStepFieldsRegion, { scope: step.id, class: "flex flex-col gap-6", children: (
|
|
20559
|
+
/* @__PURE__ */ u$1(FormStepFieldsRegion, { scope: step.id, class: "flex flex-col gap-6", children: (_a2 = step.fields) == null ? void 0 : _a2.map((field) => /* @__PURE__ */ u$1(
|
|
20559
20560
|
FieldRenderer,
|
|
20560
20561
|
{
|
|
20561
20562
|
field,
|
|
@@ -20618,9 +20619,9 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
20618
20619
|
] });
|
|
20619
20620
|
}
|
|
20620
20621
|
function buildDefaultValues$1(step, formData) {
|
|
20621
|
-
var
|
|
20622
|
+
var _a2;
|
|
20622
20623
|
const defaults = {};
|
|
20623
|
-
(
|
|
20624
|
+
(_a2 = step.fields) == null ? void 0 : _a2.forEach((field) => {
|
|
20624
20625
|
defaults[field.name] = formData[field.name] ?? field.defaultValue ?? "";
|
|
20625
20626
|
});
|
|
20626
20627
|
return defaults;
|
|
@@ -20836,22 +20837,22 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
20836
20837
|
resumeError ? "border-red-400" : ""
|
|
20837
20838
|
].join(" "),
|
|
20838
20839
|
onClick: () => {
|
|
20839
|
-
var
|
|
20840
|
+
var _a2;
|
|
20840
20841
|
reportFieldClickActivity("resumeFile");
|
|
20841
|
-
(
|
|
20842
|
+
(_a2 = fileInputRef.current) == null ? void 0 : _a2.click();
|
|
20842
20843
|
},
|
|
20843
20844
|
onKeyDown: (e2) => {
|
|
20844
|
-
var
|
|
20845
|
+
var _a2;
|
|
20845
20846
|
if (e2.key === "Enter" || e2.key === " ") {
|
|
20846
20847
|
e2.preventDefault();
|
|
20847
|
-
(
|
|
20848
|
+
(_a2 = fileInputRef.current) == null ? void 0 : _a2.click();
|
|
20848
20849
|
}
|
|
20849
20850
|
},
|
|
20850
20851
|
onDragOver: (e2) => e2.preventDefault(),
|
|
20851
20852
|
onDrop: (e2) => {
|
|
20852
|
-
var
|
|
20853
|
+
var _a2, _b2;
|
|
20853
20854
|
e2.preventDefault();
|
|
20854
|
-
handleFileChange(((
|
|
20855
|
+
handleFileChange(((_b2 = (_a2 = e2.dataTransfer) == null ? void 0 : _a2.files) == null ? void 0 : _b2[0]) ?? null);
|
|
20855
20856
|
},
|
|
20856
20857
|
role: "button",
|
|
20857
20858
|
tabIndex: 0,
|
|
@@ -20868,8 +20869,8 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
20868
20869
|
"data-testid": stepTestId(scope, "resume-input"),
|
|
20869
20870
|
"aria-invalid": !!resumeError,
|
|
20870
20871
|
onChange: (e2) => {
|
|
20871
|
-
var
|
|
20872
|
-
return handleFileChange(((
|
|
20872
|
+
var _a2;
|
|
20873
|
+
return handleFileChange(((_a2 = e2.target.files) == null ? void 0 : _a2[0]) ?? null);
|
|
20873
20874
|
}
|
|
20874
20875
|
}
|
|
20875
20876
|
),
|
|
@@ -21219,14 +21220,14 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
21219
21220
|
state,
|
|
21220
21221
|
onClose
|
|
21221
21222
|
}) {
|
|
21222
|
-
var
|
|
21223
|
+
var _a2, _b2, _c2;
|
|
21223
21224
|
const inviteeStart = state.formData.inviteeStartTime;
|
|
21224
21225
|
const eventStartTime = state.formData.eventStartTime;
|
|
21225
21226
|
const slotParts = formatInviteeParts(inviteeStart, eventStartTime);
|
|
21226
21227
|
const fallbackSlot = state.formData.slotDisplay ?? "";
|
|
21227
|
-
const heading = (
|
|
21228
|
-
const note = (
|
|
21229
|
-
const cta = (
|
|
21228
|
+
const heading = (_a2 = step.success) == null ? void 0 : _a2.heading;
|
|
21229
|
+
const note = (_b2 = step.success) == null ? void 0 : _b2.note;
|
|
21230
|
+
const cta = (_c2 = step.success) == null ? void 0 : _c2.cta;
|
|
21230
21231
|
return /* @__PURE__ */ u$1(
|
|
21231
21232
|
"div",
|
|
21232
21233
|
{
|
|
@@ -21544,14 +21545,14 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
21544
21545
|
onClose,
|
|
21545
21546
|
onSlotSelect
|
|
21546
21547
|
}) {
|
|
21547
|
-
var
|
|
21548
|
+
var _a2;
|
|
21548
21549
|
const handleBack = () => {
|
|
21549
21550
|
reportBackClickActivity();
|
|
21550
21551
|
onBack();
|
|
21551
21552
|
};
|
|
21552
21553
|
const showContinueBrowsingButton = shouldShowContinueBrowsingButton(openConfig);
|
|
21553
21554
|
if (step.type === "auto") {
|
|
21554
|
-
return /* @__PURE__ */ u$1(AutoStep, { step, error: ((
|
|
21555
|
+
return /* @__PURE__ */ u$1(AutoStep, { step, error: ((_a2 = state.error) == null ? void 0 : _a2.message) ?? null });
|
|
21555
21556
|
}
|
|
21556
21557
|
if (step.type === "success") {
|
|
21557
21558
|
if (step.successStyle === "lead-magnet") {
|
|
@@ -21835,9 +21836,9 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
21835
21836
|
);
|
|
21836
21837
|
}
|
|
21837
21838
|
function buildDefaultValues(step, formData) {
|
|
21838
|
-
var
|
|
21839
|
+
var _a2;
|
|
21839
21840
|
const defaults = {};
|
|
21840
|
-
(
|
|
21841
|
+
(_a2 = step.fields) == null ? void 0 : _a2.forEach((field) => {
|
|
21841
21842
|
defaults[field.name] = formData[field.name] ?? field.defaultValue ?? "";
|
|
21842
21843
|
});
|
|
21843
21844
|
return defaults;
|
|
@@ -22017,9 +22018,9 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
22017
22018
|
handleClose();
|
|
22018
22019
|
};
|
|
22019
22020
|
const registrationDeadline = T$1(() => {
|
|
22020
|
-
var
|
|
22021
|
+
var _a2;
|
|
22021
22022
|
if (getStyleVariant(config, openConfig) !== "webinar-card") return null;
|
|
22022
|
-
const leadMinutes = ((
|
|
22023
|
+
const leadMinutes = ((_a2 = getCardChrome(config).countdown) == null ? void 0 : _a2.leadMinutes) ?? 0;
|
|
22023
22024
|
return resolveRegistrationDeadline(state.formData.slots, leadMinutes);
|
|
22024
22025
|
}, [config, openConfig, state.formData.slots]);
|
|
22025
22026
|
const firstSlotDateLabel = T$1(
|
|
@@ -22531,7 +22532,10 @@ ${intlTelStyles}`;
|
|
|
22531
22532
|
currentMountParent = null;
|
|
22532
22533
|
}
|
|
22533
22534
|
const GQL_GATE_CONFIG = {
|
|
22534
|
-
|
|
22535
|
+
// Sent as `event_name` in every payload this gate produces (register / add-info /
|
|
22536
|
+
// qualifier) and used as the analytics label. Fixed for the lead-magnet flow so its
|
|
22537
|
+
// leads are attributable to it rather than folded in with the generic webinar form.
|
|
22538
|
+
eventName: "Accelerate your tech career in the AI-era",
|
|
22535
22539
|
webinarType: "REGULAR",
|
|
22536
22540
|
site: "organic",
|
|
22537
22541
|
// No slot picker — this is a registration gate on a blog page, not a webinar booking.
|
|
@@ -22722,7 +22726,7 @@ ${intlTelStyles}`;
|
|
|
22722
22726
|
}
|
|
22723
22727
|
return url.toString();
|
|
22724
22728
|
}
|
|
22725
|
-
const leadMagnetStyles = "/* Scoped to the lead-magnet shadow root. `base.css` (injected alongside this file by\n mount.ts) supplies the `:host { all: initial }` reset and the compiled Tailwind\n utilities; everything visual for these three surfaces lives here.\n\n Values are transcribed from the comp attached to PDC-225 (\"Blog Lead Magnets (1).html\")\n and AC8/AC9, NOT from AC7's table. AC7 describes the earlier prototype — gradient card,\n radius 12, \"Most popular\" ribbon — which the attached HTML supersedes. See the note in\n LEAD-MAGNETS-PLAN.md before reconciling the two.\n\n Tokens are redeclared locally rather than inherited: the widget renders on WordPress\n blog pages that may not ship the design system, and `:host { all: initial }` gives us\n no cascade to fall back on. Fonts are the exception — @font-face is document-scoped and\n reaches into shadow trees, so the IK stacks resolve on ik pages and degrade to system\n elsewhere. */\n\n.ik-lm-root {\n /* ink */\n --lm-ink: #0b1b34;\n --lm-ink-soft: #3b4a63;\n --lm-muted: #66738c;\n /* brand ramp */\n --lm-brand-50: #eef6fe;\n --lm-brand-100: #d9ecfe;\n --lm-brand-200: #bcddfc;\n --lm-brand-400: #66b5f9;\n --lm-brand-500: #49a9f8;\n --lm-brand-600: #2f93ec;\n --lm-brand-700: #1f78cc;\n --lm-brand-800: #1c63a6;\n /* accents + surfaces */\n --lm-accent: #ff7a18;\n --lm-accent-soft: #fff1e6;\n --lm-success: #1a9e62;\n --lm-success-soft: #e8f6ee;\n --lm-danger: #dc2626;\n --lm-line: #e4e9f2;\n --lm-surface-2: #f6f8fc;\n --lm-surface-3: #eef2f9;\n /* type */\n --lm-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;\n --lm-display: 'Space Grotesk', 'Inter', ui-sans-serif, system-ui, sans-serif;\n --lm-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;\n\n font-family: var(--lm-sans);\n color: var(--lm-ink);\n -webkit-font-smoothing: antialiased;\n}\n\n.ik-lm-root *,\n.ik-lm-root *::before,\n.ik-lm-root *::after {\n box-sizing: border-box;\n}\n\n/* ---------- shared atoms ---------- */\n\n.ik-lm-eyebrow {\n font-family: var(--lm-mono);\n font-size: 10px;\n font-weight: 700;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n color: var(--lm-brand-700);\n margin: 0;\n}\n\n.ik-lm-tile {\n display: grid;\n place-items: center;\n flex: none;\n border-radius: 10px;\n width: 32px;\n height: 32px;\n background: var(--lm-brand-50);\n color: var(--lm-brand-700);\n}\n.ik-lm-tile--lg {\n width: 42px;\n height: 42px;\n border-radius: 12px;\n}\n.ik-lm-tile--success {\n background: var(--lm-success-soft);\n color: var(--lm-success);\n}\n.ik-lm-tile--accent {\n background: var(--lm-accent-soft);\n color: var(--lm-accent);\n}\n.ik-lm-tile--onwhite {\n background: #fff;\n border: 1px solid var(--lm-brand-200);\n}\n\n.ik-lm-btn {\n display: block;\n width: 100%;\n border: 0;\n cursor: pointer;\n font-family: inherit;\n font-size: 15px;\n font-weight: 600;\n text-align: center;\n padding: 12px;\n border-radius: 12px;\n background: var(--lm-brand-500);\n color: #fff;\n transition: background 0.15s cubic-bezier(0.4, 0, 0.2, 1);\n}\n.ik-lm-btn:hover:not(:disabled) {\n background: var(--lm-brand-600);\n}\n.ik-lm-btn:disabled {\n opacity: 0.6;\n cursor: default;\n}\n/* Inline rather than a flex child: these labels wrap, and a flex arrow would park\n itself beside the whole block instead of trailing the last word. */\n.ik-lm-btn__tail {\n white-space: nowrap;\n}\n.ik-lm-btn__arrow {\n display: inline-flex;\n vertical-align: middle;\n margin-left: 8px;\n}\n\n.ik-lm-fineprint {\n font-size: 12px;\n color: var(--lm-muted);\n text-align: center;\n margin: 8px 0 0;\n}\n\n.ik-lm-error {\n font-size: 12.5px;\n color: var(--lm-danger);\n margin: 8px 0 0;\n}\n\n/* dashed upload affordance */\n.ik-lm-drop {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 12px 13px;\n border-radius: 16px;\n border: 1px dashed var(--lm-brand-400);\n background: #fff;\n color: var(--lm-ink);\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n transition: border-color 0.15s, background 0.15s;\n}\n.ik-lm-drop:hover {\n border-color: var(--lm-brand-500);\n background: var(--lm-brand-50);\n}\n.ik-lm-drop__label {\n display: block;\n font-size: 14px;\n font-weight: 600;\n}\n.ik-lm-drop__meta {\n display: block;\n font-family: var(--lm-mono);\n font-size: 10px;\n letter-spacing: 0.06em;\n color: var(--lm-muted);\n}\n\n/* filename chip that replaces the dashed slot once a file is chosen */\n.ik-lm-chip {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 12px 13px;\n border-radius: 16px;\n border: 1px solid var(--lm-brand-200);\n background: var(--lm-brand-50);\n}\n.ik-lm-chip__name {\n flex: 1;\n min-width: 0;\n font-size: 14px;\n font-weight: 600;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.ik-lm-chip__change {\n flex: none;\n border: 0;\n background: none;\n padding: 0;\n cursor: pointer;\n font-family: inherit;\n font-size: 12.5px;\n color: var(--lm-brand-700);\n text-decoration: underline;\n}\n\n/* analysis loader — shown between pressing analyse and the gate opening */\n\n.ik-lm-progress {\n margin-top: 12px;\n}\n\n.ik-lm-progress__track {\n height: 6px;\n width: 100%;\n overflow: hidden;\n border-radius: 999px;\n background: var(--lm-brand-100);\n}\n\n/* The long, heavily front-loaded ease is the point: the bar moves visibly the instant a\n step begins, then crawls toward that step's target without arriving. A call that takes\n 40s still looks like it is working, and no JS timer is needed to fake it. */\n.ik-lm-progress__fill {\n display: block;\n height: 100%;\n border-radius: 999px;\n background: linear-gradient(90deg, var(--lm-brand-500), var(--lm-brand-700));\n transition: width 18s cubic-bezier(0.06, 0.9, 0.2, 1);\n}\n\n.ik-lm-progress__steps {\n display: grid;\n gap: 7px;\n margin: 12px 0 0;\n padding: 0;\n list-style: none;\n}\n\n.ik-lm-progress__step {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 12.5px;\n line-height: 1.35;\n color: var(--lm-muted);\n transition: color 0.2s ease;\n}\n.ik-lm-progress__step[data-state='active'] {\n font-weight: 600;\n color: var(--lm-ink);\n}\n.ik-lm-progress__step[data-state='done'] {\n color: var(--lm-success);\n}\n\n.ik-lm-progress__mark {\n display: grid;\n place-items: center;\n flex: none;\n width: 16px;\n height: 16px;\n}\n\n.ik-lm-progress__dot {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: currentColor;\n opacity: 0.45;\n}\n.ik-lm-progress__step[data-state='active'] .ik-lm-progress__dot {\n opacity: 1;\n background: var(--lm-brand-600);\n animation: ik-lm-pulse 1.1s ease-in-out infinite;\n}\n\n@keyframes ik-lm-pulse {\n 0%, 100% { transform: scale(1); opacity: 1; }\n 50% { transform: scale(1.55); opacity: 0.45; }\n}\n\n/* Compact: end-of-read cards have no room for a three-line step list. */\n.ik-lm-progress__now {\n margin: 10px 0 0;\n font-size: 12.5px;\n font-weight: 600;\n color: var(--lm-ink);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .ik-lm-progress__fill {\n transition: none;\n }\n .ik-lm-progress__step[data-state='active'] .ik-lm-progress__dot {\n animation: none;\n }\n}\n\n/* ---------- surface 1: rail panel (ToolCardList) ---------- */\n\n.ik-lm-panel {\n border: 1px solid var(--lm-line);\n border-radius: 20px;\n background: #fff;\n box-shadow: 0 1px 2px rgba(11, 27, 52, 0.06), 0 10px 24px rgba(11, 27, 52, 0.05);\n overflow: hidden;\n}\n.ik-lm-panel__head {\n padding: 18px 20px 14px;\n border-bottom: 1px solid var(--lm-line);\n background-image: radial-gradient(var(--lm-brand-100) 1px, transparent 1px);\n background-size: 22px 22px;\n}\n.ik-lm-panel__title {\n font-family: var(--lm-display);\n font-weight: 700;\n font-size: 19px;\n line-height: 1.25;\n margin: 6px 0 0;\n}\n\n.ik-lm-feature {\n padding: 18px 20px;\n border-bottom: 1px solid var(--lm-line);\n background: var(--lm-brand-50);\n}\n/* Either shape can be the panel's last section now that any tool can be the open one. */\n.ik-lm-feature:last-child {\n border-bottom: 0;\n}\n.ik-lm-feature__top {\n display: flex;\n align-items: center;\n gap: 10px;\n margin-bottom: 10px;\n}\n.ik-lm-feature__name {\n font-size: 15px;\n font-weight: 600;\n margin: 0;\n}\n.ik-lm-feature__meta {\n font-family: var(--lm-mono);\n font-size: 10px;\n letter-spacing: 0.06em;\n color: var(--lm-brand-800);\n margin: 0;\n}\n.ik-lm-feature__desc {\n font-size: 13px;\n line-height: 1.55;\n color: var(--lm-ink-soft);\n margin: 0 0 12px;\n}\n\n/* compact rows for the non-featured tools */\n.ik-lm-row {\n display: flex;\n align-items: center;\n gap: 12px;\n width: 100%;\n padding: 14px 20px;\n border: 0;\n border-bottom: 1px solid var(--lm-line);\n background: none;\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n transition: background 0.15s;\n}\n.ik-lm-row:last-child {\n border-bottom: 0;\n}\n.ik-lm-row:hover {\n background: var(--lm-surface-3);\n}\n.ik-lm-row__body {\n flex: 1;\n min-width: 0;\n}\n.ik-lm-row__name {\n display: block;\n font-size: 15px;\n font-weight: 600;\n color: var(--lm-ink);\n}\n.ik-lm-row__sub {\n display: block;\n font-size: 12.5px;\n color: var(--lm-muted);\n}\n.ik-lm-row__arrow {\n flex: none;\n color: var(--lm-brand-700);\n display: inline-flex;\n}\n\n/* ---------- surface 2: mid-article banner (ToolBanner) ---------- */\n\n.ik-lm-banner {\n border: 1px solid var(--lm-brand-200);\n border-radius: 20px;\n background: var(--lm-brand-50);\n padding: 24px;\n display: flex;\n align-items: center;\n gap: 24px;\n flex-wrap: wrap;\n}\n.ik-lm-banner__left {\n flex: 1 1 300px;\n min-width: 0;\n}\n.ik-lm-banner__head {\n display: flex;\n align-items: center;\n gap: 12px;\n margin-bottom: 12px;\n}\n.ik-lm-banner__title {\n font-family: var(--lm-display);\n font-weight: 700;\n font-size: 19px;\n line-height: 1.25;\n margin: 0;\n}\n.ik-lm-banner__right {\n flex: 0 1 240px;\n display: grid;\n gap: 8px;\n}\n.ik-lm-checklist {\n display: grid;\n gap: 8px;\n list-style: none;\n margin: 0;\n padding: 0;\n}\n.ik-lm-check {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n color: var(--lm-ink-soft);\n}\n.ik-lm-check__mark {\n color: var(--lm-success);\n display: inline-flex;\n flex: none;\n}\n\n/* ---------- surface 3: end-of-read grid (ToolGrid) ---------- */\n\n.ik-lm-grid-section {\n padding: 32px;\n border-radius: 20px;\n border: 1px solid var(--lm-line);\n background: var(--lm-surface-2);\n}\n.ik-lm-grid-section__title {\n font-family: var(--lm-display);\n font-weight: 800;\n letter-spacing: -0.02em;\n font-size: 30px;\n line-height: 1.2;\n margin: 10px 0 8px;\n}\n.ik-lm-grid-section__sub {\n font-size: 15px;\n color: var(--lm-ink-soft);\n margin: 0 0 24px;\n}\n.ik-lm-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));\n gap: 16px;\n}\n.ik-lm-gcard {\n position: relative;\n display: flex;\n flex-direction: column;\n gap: 10px;\n background: #fff;\n border: 1px solid var(--lm-line);\n border-radius: 20px;\n padding: 22px;\n transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;\n}\n.ik-lm-gcard:hover {\n border-color: var(--lm-brand-200);\n box-shadow: 0 12px 40px rgba(11, 27, 52, 0.1);\n transform: translateY(-2px);\n}\n.ik-lm-gcard__name {\n font-family: var(--lm-display);\n font-weight: 700;\n font-size: 16px;\n margin: 0;\n}\n.ik-lm-gcard__desc {\n font-size: 13px;\n line-height: 1.6;\n color: var(--lm-ink-soft);\n margin: 0;\n}\n.ik-lm-gcard__foot {\n margin-top: auto;\n padding-top: 12px;\n border-top: 1px solid var(--lm-line);\n}\n.ik-lm-pill {\n position: absolute;\n top: 18px;\n right: 18px;\n font-family: var(--lm-mono);\n font-size: 9.5px;\n font-weight: 700;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n padding: 4px 9px;\n border-radius: 999px;\n background: var(--lm-success-soft);\n color: var(--lm-success);\n}\n.ik-lm-textlink {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n width: 100%;\n border: 0;\n background: none;\n padding: 0;\n cursor: pointer;\n font-family: inherit;\n font-size: 14px;\n font-weight: 600;\n color: var(--lm-brand-700);\n}\n/* Breathing room once the filename chip sits directly above this control — without it the\n two rows collide and read as one block. Only in the chosen state: idle has no chip, and\n the card foot's own padding already spaces it off the divider. */\n.ik-lm-textlink--after-chip {\n margin-top: 14px;\n}\n.ik-lm-textlink__arrow {\n display: grid;\n place-items: center;\n flex: none;\n width: 26px;\n height: 26px;\n border-radius: 999px;\n background: var(--lm-brand-50);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .ik-lm-gcard,\n .ik-lm-btn,\n .ik-lm-drop,\n .ik-lm-row {\n transition: none;\n }\n .ik-lm-gcard:hover {\n transform: none;\n }\n}\n";
|
|
22729
|
+
const leadMagnetStyles = "/* Scoped to the lead-magnet shadow root. `base.css` (injected alongside this file by\n mount.ts) supplies the `:host { all: initial }` reset and the compiled Tailwind\n utilities; everything visual for these three surfaces lives here.\n\n Values are transcribed from the comp attached to PDC-225 (\"Blog Lead Magnets (1).html\")\n and AC8/AC9, NOT from AC7's table. AC7 describes the earlier prototype — gradient card,\n radius 12, \"Most popular\" ribbon — which the attached HTML supersedes. See the note in\n LEAD-MAGNETS-PLAN.md before reconciling the two.\n\n Tokens are redeclared locally rather than inherited: the widget renders on WordPress\n blog pages that may not ship the design system, and `:host { all: initial }` gives us\n no cascade to fall back on. Fonts are the exception — @font-face is document-scoped and\n reaches into shadow trees, so the IK stacks resolve on ik pages and degrade to system\n elsewhere. */\n\n.ik-lm-root {\n /* ink */\n --lm-ink: #0b1b34;\n --lm-ink-soft: #3b4a63;\n --lm-muted: #66738c;\n /* brand ramp */\n --lm-brand-50: #eef6fe;\n --lm-brand-100: #d9ecfe;\n --lm-brand-200: #bcddfc;\n --lm-brand-400: #66b5f9;\n --lm-brand-500: #49a9f8;\n --lm-brand-600: #2f93ec;\n --lm-brand-700: #1f78cc;\n --lm-brand-800: #1c63a6;\n /* accents + surfaces */\n --lm-accent: #ff7a18;\n --lm-accent-soft: #fff1e6;\n --lm-success: #1a9e62;\n --lm-success-soft: #e8f6ee;\n --lm-danger: #dc2626;\n --lm-line: #e4e9f2;\n --lm-surface-2: #f6f8fc;\n --lm-surface-3: #eef2f9;\n /* type */\n --lm-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;\n --lm-display: 'Space Grotesk', 'Inter', ui-sans-serif, system-ui, sans-serif;\n --lm-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;\n\n font-family: var(--lm-sans);\n color: var(--lm-ink);\n -webkit-font-smoothing: antialiased;\n}\n\n.ik-lm-root *,\n.ik-lm-root *::before,\n.ik-lm-root *::after {\n box-sizing: border-box;\n}\n\n/* ---------- shared atoms ---------- */\n\n.ik-lm-eyebrow {\n font-family: var(--lm-mono);\n font-size: 10px;\n font-weight: 700;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n color: var(--lm-brand-700);\n margin: 0;\n}\n\n.ik-lm-tile {\n display: grid;\n place-items: center;\n flex: none;\n border-radius: 10px;\n width: 32px;\n height: 32px;\n background: var(--lm-brand-50);\n color: var(--lm-brand-700);\n}\n.ik-lm-tile--lg {\n width: 42px;\n height: 42px;\n border-radius: 12px;\n}\n.ik-lm-tile--success {\n background: var(--lm-success-soft);\n color: var(--lm-success);\n}\n.ik-lm-tile--accent {\n background: var(--lm-accent-soft);\n color: var(--lm-accent);\n}\n.ik-lm-tile--onwhite {\n background: #fff;\n border: 1px solid var(--lm-brand-200);\n}\n\n.ik-lm-btn {\n display: block;\n width: 100%;\n border: 0;\n cursor: pointer;\n font-family: inherit;\n font-size: 15px;\n font-weight: 600;\n text-align: center;\n padding: 12px;\n border-radius: 12px;\n background: var(--lm-brand-500);\n color: #fff;\n transition: background 0.15s cubic-bezier(0.4, 0, 0.2, 1);\n}\n.ik-lm-btn:hover:not(:disabled) {\n background: var(--lm-brand-600);\n}\n.ik-lm-btn:disabled {\n opacity: 0.6;\n cursor: default;\n}\n/* Inline rather than a flex child: these labels wrap, and a flex arrow would park\n itself beside the whole block instead of trailing the last word. */\n.ik-lm-btn__tail {\n white-space: nowrap;\n}\n.ik-lm-btn__arrow {\n display: inline-flex;\n vertical-align: middle;\n margin-left: 8px;\n}\n\n.ik-lm-fineprint {\n font-size: 12px;\n color: var(--lm-muted);\n text-align: center;\n margin: 8px 0 0;\n}\n\n.ik-lm-error {\n font-size: 12.5px;\n color: var(--lm-danger);\n margin: 8px 0 0;\n}\n\n/* dashed upload affordance */\n.ik-lm-drop {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 12px 13px;\n border-radius: 16px;\n border: 1px dashed var(--lm-brand-400);\n background: #fff;\n color: var(--lm-ink);\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n transition: border-color 0.15s, background 0.15s;\n}\n.ik-lm-drop:hover {\n border-color: var(--lm-brand-500);\n background: var(--lm-brand-50);\n}\n.ik-lm-drop__label {\n display: block;\n font-size: 14px;\n font-weight: 600;\n}\n.ik-lm-drop__meta {\n display: block;\n font-family: var(--lm-mono);\n font-size: 10px;\n letter-spacing: 0.06em;\n color: var(--lm-muted);\n}\n\n/* filename chip that replaces the dashed slot once a file is chosen */\n.ik-lm-chip {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n /* Same min-content trap as the banner column — the chip appears on every surface, so it\n defends itself rather than relying on each container to remember. */\n min-width: 0;\n max-width: 100%;\n padding: 12px 13px;\n border-radius: 16px;\n border: 1px solid var(--lm-brand-200);\n background: var(--lm-brand-50);\n}\n.ik-lm-chip__name {\n flex: 1;\n min-width: 0;\n font-size: 14px;\n font-weight: 600;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.ik-lm-chip__change {\n flex: none;\n border: 0;\n background: none;\n padding: 0;\n cursor: pointer;\n font-family: inherit;\n font-size: 12.5px;\n color: var(--lm-brand-700);\n text-decoration: underline;\n}\n\n/* analysis loader — shown between pressing analyse and the gate opening */\n\n.ik-lm-progress {\n margin-top: 12px;\n}\n\n.ik-lm-progress__track {\n height: 6px;\n width: 100%;\n overflow: hidden;\n border-radius: 999px;\n background: var(--lm-brand-100);\n}\n\n/* The long, heavily front-loaded ease is the point: the bar moves visibly the instant a\n step begins, then crawls toward that step's target without arriving. A call that takes\n 40s still looks like it is working, and no JS timer is needed to fake it. */\n.ik-lm-progress__fill {\n display: block;\n height: 100%;\n border-radius: 999px;\n background: linear-gradient(90deg, var(--lm-brand-500), var(--lm-brand-700));\n transition: width 18s cubic-bezier(0.06, 0.9, 0.2, 1);\n}\n\n.ik-lm-progress__steps {\n display: grid;\n gap: 7px;\n margin: 12px 0 0;\n padding: 0;\n list-style: none;\n}\n\n.ik-lm-progress__step {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 12.5px;\n line-height: 1.35;\n color: var(--lm-muted);\n transition: color 0.2s ease;\n}\n.ik-lm-progress__step[data-state='active'] {\n font-weight: 600;\n color: var(--lm-ink);\n}\n.ik-lm-progress__step[data-state='done'] {\n color: var(--lm-success);\n}\n\n.ik-lm-progress__mark {\n display: grid;\n place-items: center;\n flex: none;\n width: 16px;\n height: 16px;\n}\n\n.ik-lm-progress__dot {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: currentColor;\n opacity: 0.45;\n}\n.ik-lm-progress__step[data-state='active'] .ik-lm-progress__dot {\n opacity: 1;\n background: var(--lm-brand-600);\n animation: ik-lm-pulse 1.1s ease-in-out infinite;\n}\n\n@keyframes ik-lm-pulse {\n 0%, 100% { transform: scale(1); opacity: 1; }\n 50% { transform: scale(1.55); opacity: 0.45; }\n}\n\n/* Compact: end-of-read cards have no room for a three-line step list. */\n.ik-lm-progress__now {\n margin: 10px 0 0;\n font-size: 12.5px;\n font-weight: 600;\n color: var(--lm-ink);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .ik-lm-progress__fill {\n transition: none;\n }\n .ik-lm-progress__step[data-state='active'] .ik-lm-progress__dot {\n animation: none;\n }\n}\n\n/* ---------- surface 1: rail panel (ToolCardList) ---------- */\n\n.ik-lm-panel {\n border: 1px solid var(--lm-line);\n border-radius: 20px;\n background: #fff;\n box-shadow: 0 1px 2px rgba(11, 27, 52, 0.06), 0 10px 24px rgba(11, 27, 52, 0.05);\n overflow: hidden;\n}\n.ik-lm-panel__head {\n padding: 18px 20px 14px;\n border-bottom: 1px solid var(--lm-line);\n background-image: radial-gradient(var(--lm-brand-100) 1px, transparent 1px);\n background-size: 22px 22px;\n}\n.ik-lm-panel__title {\n font-family: var(--lm-display);\n font-weight: 700;\n font-size: 19px;\n line-height: 1.25;\n margin: 6px 0 0;\n}\n\n.ik-lm-feature {\n padding: 18px 20px;\n border-bottom: 1px solid var(--lm-line);\n background: var(--lm-brand-50);\n}\n/* Either shape can be the panel's last section now that any tool can be the open one. */\n.ik-lm-feature:last-child {\n border-bottom: 0;\n}\n.ik-lm-feature__top {\n display: flex;\n align-items: center;\n gap: 10px;\n margin-bottom: 10px;\n}\n.ik-lm-feature__name {\n font-size: 15px;\n font-weight: 600;\n margin: 0;\n}\n.ik-lm-feature__meta {\n font-family: var(--lm-mono);\n font-size: 10px;\n letter-spacing: 0.06em;\n color: var(--lm-brand-800);\n margin: 0;\n}\n.ik-lm-feature__desc {\n font-size: 13px;\n line-height: 1.55;\n color: var(--lm-ink-soft);\n margin: 0 0 12px;\n}\n\n/* compact rows for the non-featured tools */\n.ik-lm-row {\n display: flex;\n align-items: center;\n gap: 12px;\n width: 100%;\n padding: 14px 20px;\n border: 0;\n border-bottom: 1px solid var(--lm-line);\n background: none;\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n transition: background 0.15s;\n}\n.ik-lm-row:last-child {\n border-bottom: 0;\n}\n.ik-lm-row:hover {\n background: var(--lm-surface-3);\n}\n.ik-lm-row__body {\n flex: 1;\n min-width: 0;\n}\n.ik-lm-row__name {\n display: block;\n font-size: 15px;\n font-weight: 600;\n color: var(--lm-ink);\n}\n.ik-lm-row__sub {\n display: block;\n font-size: 12.5px;\n color: var(--lm-muted);\n}\n.ik-lm-row__arrow {\n flex: none;\n color: var(--lm-brand-700);\n display: inline-flex;\n}\n\n/* ---------- surface 2: mid-article banner (ToolBanner) ---------- */\n\n.ik-lm-banner {\n border: 1px solid var(--lm-brand-200);\n border-radius: 20px;\n background: var(--lm-brand-50);\n padding: 24px;\n display: flex;\n align-items: center;\n gap: 24px;\n flex-wrap: wrap;\n}\n.ik-lm-banner__left {\n flex: 1 1 300px;\n min-width: 0;\n}\n.ik-lm-banner__head {\n display: flex;\n align-items: center;\n gap: 12px;\n margin-bottom: 12px;\n}\n.ik-lm-banner__title {\n font-family: var(--lm-display);\n font-weight: 700;\n font-size: 19px;\n line-height: 1.25;\n margin: 0;\n}\n.ik-lm-banner__right {\n flex: 0 1 240px;\n /* Both needed, and for the same reason: a flex item's automatic minimum size and a grid\n item's `auto` minimum are the *content's* min-content width, and the filename chip is\n `white-space: nowrap`. Without these a long filename widens this column past the card\n instead of ellipsizing inside it. */\n min-width: 0;\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n gap: 8px;\n}\n.ik-lm-checklist {\n display: grid;\n gap: 8px;\n list-style: none;\n margin: 0;\n padding: 0;\n}\n.ik-lm-check {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n color: var(--lm-ink-soft);\n}\n.ik-lm-check__mark {\n color: var(--lm-success);\n display: inline-flex;\n flex: none;\n}\n\n/* ---------- surface 3: end-of-read grid (ToolGrid) ---------- */\n\n.ik-lm-grid-section {\n padding: 32px;\n border-radius: 20px;\n border: 1px solid var(--lm-line);\n background: var(--lm-surface-2);\n}\n.ik-lm-grid-section__title {\n font-family: var(--lm-display);\n font-weight: 800;\n letter-spacing: -0.02em;\n font-size: 30px;\n line-height: 1.2;\n margin: 10px 0 8px;\n}\n.ik-lm-grid-section__sub {\n font-size: 15px;\n color: var(--lm-ink-soft);\n margin: 0 0 24px;\n}\n.ik-lm-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));\n gap: 16px;\n}\n.ik-lm-gcard {\n position: relative;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 10px;\n background: #fff;\n border: 1px solid var(--lm-line);\n border-radius: 20px;\n padding: 22px;\n transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;\n}\n.ik-lm-gcard:hover {\n border-color: var(--lm-brand-200);\n box-shadow: 0 12px 40px rgba(11, 27, 52, 0.1);\n transform: translateY(-2px);\n}\n.ik-lm-gcard__name {\n font-family: var(--lm-display);\n font-weight: 700;\n font-size: 16px;\n margin: 0;\n}\n.ik-lm-gcard__desc {\n font-size: 13px;\n line-height: 1.6;\n color: var(--lm-ink-soft);\n margin: 0;\n}\n.ik-lm-gcard__foot {\n margin-top: auto;\n padding-top: 12px;\n border-top: 1px solid var(--lm-line);\n}\n.ik-lm-pill {\n position: absolute;\n top: 18px;\n right: 18px;\n font-family: var(--lm-mono);\n font-size: 9.5px;\n font-weight: 700;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n padding: 4px 9px;\n border-radius: 999px;\n background: var(--lm-success-soft);\n color: var(--lm-success);\n}\n.ik-lm-textlink {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n width: 100%;\n border: 0;\n background: none;\n padding: 0;\n cursor: pointer;\n font-family: inherit;\n font-size: 14px;\n font-weight: 600;\n color: var(--lm-brand-700);\n}\n/* Breathing room once the filename chip sits directly above this control — without it the\n two rows collide and read as one block. Only in the chosen state: idle has no chip, and\n the card foot's own padding already spaces it off the divider. */\n.ik-lm-textlink--after-chip {\n margin-top: 14px;\n}\n.ik-lm-textlink__arrow {\n display: grid;\n place-items: center;\n flex: none;\n width: 26px;\n height: 26px;\n border-radius: 999px;\n background: var(--lm-brand-50);\n}\n\n/* ---------- narrow viewports ---------- */\n\n/* The banner is a two-column comp; below this the left column's 300px basis can no longer\n sit beside the upload slot, so it wraps. Once wrapped, the right column must take the\n full row — its 240px basis would otherwise leave the CTA stranded at two-thirds width. */\n@media (max-width: 560px) {\n .ik-lm-banner {\n padding: 18px;\n gap: 16px;\n }\n .ik-lm-banner__left,\n .ik-lm-banner__right {\n flex: 1 1 100%;\n }\n .ik-lm-banner__title {\n font-size: 17px;\n }\n .ik-lm-chip,\n .ik-lm-drop {\n padding: 11px;\n gap: 8px;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .ik-lm-gcard,\n .ik-lm-btn,\n .ik-lm-drop,\n .ik-lm-row {\n transition: none;\n }\n .ik-lm-gcard:hover {\n transform: none;\n }\n}\n";
|
|
22726
22730
|
const instances = /* @__PURE__ */ new Map();
|
|
22727
22731
|
function ensureInstance(container) {
|
|
22728
22732
|
const existing = instances.get(container);
|
|
@@ -22926,8 +22930,8 @@ ${leadMagnetStyles}`;
|
|
|
22926
22930
|
return { uuid, sessionId: session_id, data };
|
|
22927
22931
|
}
|
|
22928
22932
|
async function submitAnalyse(uuid, sessionId, identity, timeoutMs = 3e4) {
|
|
22929
|
-
var
|
|
22930
|
-
const job_role = (
|
|
22933
|
+
var _a2;
|
|
22934
|
+
const job_role = (_a2 = identity.recommended_job_roles) == null ? void 0 : _a2[0];
|
|
22931
22935
|
if (!job_role) {
|
|
22932
22936
|
throw new Error("The analyser could not read that resume. Please try another file.");
|
|
22933
22937
|
}
|
|
@@ -23066,10 +23070,10 @@ ${leadMagnetStyles}`;
|
|
|
23066
23070
|
return;
|
|
23067
23071
|
}
|
|
23068
23072
|
setTimeout(() => {
|
|
23069
|
-
var
|
|
23073
|
+
var _a2;
|
|
23070
23074
|
if (settled) return;
|
|
23071
23075
|
settled = true;
|
|
23072
|
-
(
|
|
23076
|
+
(_a2 = claim.release()) == null ? void 0 : _a2.close();
|
|
23073
23077
|
onDismissed == null ? void 0 : onDismissed();
|
|
23074
23078
|
}, 3e3);
|
|
23075
23079
|
};
|
|
@@ -23138,9 +23142,9 @@ ${leadMagnetStyles}`;
|
|
|
23138
23142
|
};
|
|
23139
23143
|
const BANNER_LEGACY_CLICK_ID = "ai-readiness-banner";
|
|
23140
23144
|
function resolveClickId(surface, toolId) {
|
|
23141
|
-
var
|
|
23145
|
+
var _a2;
|
|
23142
23146
|
if (surface === "banner") return BANNER_LEGACY_CLICK_ID;
|
|
23143
|
-
return ((
|
|
23147
|
+
return ((_a2 = LEGACY_CLICK_IDS[surface]) == null ? void 0 : _a2[toolId]) ?? `lm_${surface}_${toolId}_cta`;
|
|
23144
23148
|
}
|
|
23145
23149
|
function resolveCardListHeadClickId(toolId) {
|
|
23146
23150
|
return CARD_LIST_HEAD_CLICK_IDS[toolId];
|
|
@@ -23165,7 +23169,7 @@ ${leadMagnetStyles}`;
|
|
|
23165
23169
|
return null;
|
|
23166
23170
|
}
|
|
23167
23171
|
function buildView(tool) {
|
|
23168
|
-
var
|
|
23172
|
+
var _a2;
|
|
23169
23173
|
const shared2 = getShared();
|
|
23170
23174
|
const state = getToolState(tool.id);
|
|
23171
23175
|
if (state.status === "analysing") {
|
|
@@ -23186,7 +23190,7 @@ ${leadMagnetStyles}`;
|
|
|
23186
23190
|
return {
|
|
23187
23191
|
mode: "blocked",
|
|
23188
23192
|
fileName: shared2.resumeName,
|
|
23189
|
-
blockedBy: (
|
|
23193
|
+
blockedBy: (_a2 = getTool(shared2.activeToolId)) == null ? void 0 : _a2.copy.title,
|
|
23190
23194
|
error: state.error,
|
|
23191
23195
|
// No swapping the file while another tool is mid-run against it.
|
|
23192
23196
|
canChangeFile: false
|
|
@@ -23361,12 +23365,12 @@ ${leadMagnetStyles}`;
|
|
|
23361
23365
|
compact: compact2 = false,
|
|
23362
23366
|
testId
|
|
23363
23367
|
}) {
|
|
23364
|
-
var
|
|
23368
|
+
var _a2, _b2;
|
|
23365
23369
|
const activeIndex = Math.max(
|
|
23366
23370
|
0,
|
|
23367
23371
|
STEPS.findIndex((s2) => s2.phase === phase)
|
|
23368
23372
|
);
|
|
23369
|
-
const width = ((
|
|
23373
|
+
const width = ((_a2 = STEPS[activeIndex]) == null ? void 0 : _a2.target) ?? 38;
|
|
23370
23374
|
return /* @__PURE__ */ u$1(
|
|
23371
23375
|
"div",
|
|
23372
23376
|
{
|
|
@@ -23376,7 +23380,7 @@ ${leadMagnetStyles}`;
|
|
|
23376
23380
|
"data-testid": testId,
|
|
23377
23381
|
children: [
|
|
23378
23382
|
/* @__PURE__ */ u$1("div", { class: "ik-lm-progress__track", "aria-hidden": "true", children: /* @__PURE__ */ u$1("span", { class: "ik-lm-progress__fill", style: `width:${width}%` }) }),
|
|
23379
|
-
compact2 ? /* @__PURE__ */ u$1("p", { class: "ik-lm-progress__now", "data-testid": testId ? `${testId}-label` : void 0, children: (
|
|
23383
|
+
compact2 ? /* @__PURE__ */ u$1("p", { class: "ik-lm-progress__now", "data-testid": testId ? `${testId}-label` : void 0, children: (_b2 = STEPS[activeIndex]) == null ? void 0 : _b2.label }) : /* @__PURE__ */ u$1("ol", { class: "ik-lm-progress__steps", children: STEPS.map((step, i2) => /* @__PURE__ */ u$1(
|
|
23380
23384
|
"li",
|
|
23381
23385
|
{
|
|
23382
23386
|
class: "ik-lm-progress__step",
|
|
@@ -23417,8 +23421,8 @@ ${leadMagnetStyles}`;
|
|
|
23417
23421
|
const head = splitAt === -1 ? "" : primaryLabel.slice(0, splitAt + 1);
|
|
23418
23422
|
const tail = splitAt === -1 ? primaryLabel : primaryLabel.slice(splitAt + 1);
|
|
23419
23423
|
const openPicker = () => {
|
|
23420
|
-
var
|
|
23421
|
-
return (
|
|
23424
|
+
var _a2;
|
|
23425
|
+
return (_a2 = inputRef.current) == null ? void 0 : _a2.click();
|
|
23422
23426
|
};
|
|
23423
23427
|
const handleSlotClick = () => {
|
|
23424
23428
|
reportLeadMagnetClick(ctaClickId);
|
|
@@ -23445,9 +23449,9 @@ ${leadMagnetStyles}`;
|
|
|
23445
23449
|
class: "hidden",
|
|
23446
23450
|
"data-testid": `leadmagnet-${tool.id}-upload-input`,
|
|
23447
23451
|
onChange: (e2) => {
|
|
23448
|
-
var
|
|
23452
|
+
var _a2;
|
|
23449
23453
|
setNudge(false);
|
|
23450
|
-
onFileSelected(((
|
|
23454
|
+
onFileSelected(((_a2 = e2.target.files) == null ? void 0 : _a2[0]) ?? null);
|
|
23451
23455
|
}
|
|
23452
23456
|
}
|
|
23453
23457
|
),
|
|
@@ -23550,8 +23554,8 @@ ${leadMagnetStyles}`;
|
|
|
23550
23554
|
eyebrow = DEFAULTS$1.eyebrow,
|
|
23551
23555
|
heading = DEFAULTS$1.heading
|
|
23552
23556
|
}) {
|
|
23553
|
-
var
|
|
23554
|
-
const featuredId = featured ?? ((
|
|
23557
|
+
var _a2;
|
|
23558
|
+
const featuredId = featured ?? ((_a2 = tools[0]) == null ? void 0 : _a2.id);
|
|
23555
23559
|
const [openId, setOpenId] = d(featuredId);
|
|
23556
23560
|
const ordered = tools.slice().sort((a2, b2) => rank(a2, featuredId) - rank(b2, featuredId));
|
|
23557
23561
|
return /* @__PURE__ */ u$1("div", { class: "ik-lm-panel", "data-testid": "leadmagnet-card-list", children: [
|
|
@@ -23780,26 +23784,32 @@ ${leadMagnetStyles}`;
|
|
|
23780
23784
|
}
|
|
23781
23785
|
};
|
|
23782
23786
|
if (typeof window !== "undefined") {
|
|
23783
|
-
window.IKLeadMagnet
|
|
23787
|
+
if (!window.IKLeadMagnet) {
|
|
23788
|
+
window.IKLeadMagnet = IKLeadMagnetInstance;
|
|
23789
|
+
} else if (((_b = (_a = window.IKLeadMagnet).getVersion) == null ? void 0 : _b.call(_a)) !== IKLeadMagnetInstance.getVersion()) {
|
|
23790
|
+
console.warn(
|
|
23791
|
+
`[IKLeadMagnet] embed.js loaded again at a different version (${(_d = (_c = window.IKLeadMagnet).getVersion) == null ? void 0 : _d.call(_c)} already active, ${IKLeadMagnetInstance.getVersion()} ignored). Remove the duplicate <script src="embed.js"> tags from the page.`
|
|
23792
|
+
);
|
|
23793
|
+
}
|
|
23784
23794
|
}
|
|
23785
23795
|
let isOpen = false;
|
|
23786
23796
|
const IKFormSDKInstance = {
|
|
23787
23797
|
open(config) {
|
|
23788
|
-
var
|
|
23798
|
+
var _a2, _b2;
|
|
23789
23799
|
if (isOpen) {
|
|
23790
23800
|
unmount$1();
|
|
23791
23801
|
}
|
|
23792
23802
|
if (config.displayMode === "inline" && !config.container) {
|
|
23793
23803
|
console.error('IKForm.open: container is required when displayMode is "inline"');
|
|
23794
|
-
(
|
|
23804
|
+
(_a2 = config.onError) == null ? void 0 : _a2.call(config, { code: "INVALID_CONFIG", message: "container is required for inline displayMode" });
|
|
23795
23805
|
return;
|
|
23796
23806
|
}
|
|
23797
23807
|
isOpen = true;
|
|
23798
23808
|
const handleClose = () => {
|
|
23799
|
-
var
|
|
23809
|
+
var _a3;
|
|
23800
23810
|
isOpen = false;
|
|
23801
23811
|
unmount$1();
|
|
23802
|
-
(
|
|
23812
|
+
(_a3 = config.onClose) == null ? void 0 : _a3.call(config);
|
|
23803
23813
|
};
|
|
23804
23814
|
try {
|
|
23805
23815
|
mount$1({
|
|
@@ -23813,7 +23823,7 @@ ${leadMagnetStyles}`;
|
|
|
23813
23823
|
isOpen = false;
|
|
23814
23824
|
const message = err instanceof Error ? err.message : "Failed to open form";
|
|
23815
23825
|
console.error(message);
|
|
23816
|
-
(
|
|
23826
|
+
(_b2 = config.onError) == null ? void 0 : _b2.call(config, { code: "MOUNT_FAILED", message });
|
|
23817
23827
|
}
|
|
23818
23828
|
},
|
|
23819
23829
|
close() {
|