@flamingo-stack/openframe-frontend-core 0.0.643 → 0.0.644-2208.6319.1
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/chat-protocol/index.cjs +20 -3
- package/dist/chat-protocol/index.cjs.map +1 -1
- package/dist/chat-protocol/index.js +20 -3
- package/dist/chat-protocol/index.js.map +1 -1
- package/dist/chat-protocol/source-metadata.d.ts +7 -1
- package/dist/chat-protocol/source-metadata.d.ts.map +1 -1
- package/dist/{chunk-B42INNRA.cjs → chunk-2UA3DT5O.cjs} +199 -199
- package/dist/{chunk-B42INNRA.cjs.map → chunk-2UA3DT5O.cjs.map} +1 -1
- package/dist/{chunk-KX2FT7AS.cjs → chunk-2ZGEXLQW.cjs} +28 -28
- package/dist/{chunk-KX2FT7AS.cjs.map → chunk-2ZGEXLQW.cjs.map} +1 -1
- package/dist/{chunk-2NRLRRMR.cjs → chunk-3HSRNCDV.cjs} +226 -203
- package/dist/chunk-3HSRNCDV.cjs.map +1 -0
- package/dist/{chunk-64KDKDYC.js → chunk-5ELZ2NQ5.js} +6 -6
- package/dist/{chunk-2DJH6KHA.cjs → chunk-B46Q4DTN.cjs} +382 -386
- package/dist/chunk-B46Q4DTN.cjs.map +1 -0
- package/dist/{chunk-N7UYD57Q.js → chunk-C7RU466R.js} +3 -3
- package/dist/{chunk-2NODQ7FO.js → chunk-DSJZYRS6.js} +17 -21
- package/dist/{chunk-2NODQ7FO.js.map → chunk-DSJZYRS6.js.map} +1 -1
- package/dist/{chunk-26D6FM6L.cjs → chunk-EKSCVXA3.cjs} +6 -6
- package/dist/{chunk-26D6FM6L.cjs.map → chunk-EKSCVXA3.cjs.map} +1 -1
- package/dist/{chunk-7HL2PNQ3.js → chunk-GEGE3JXC.js} +5 -5
- package/dist/{chunk-7T673MHJ.cjs → chunk-GUB6BR26.cjs} +22 -22
- package/dist/{chunk-7T673MHJ.cjs.map → chunk-GUB6BR26.cjs.map} +1 -1
- package/dist/{chunk-3IPL6G7S.js → chunk-GXNQPCL4.js} +164 -141
- package/dist/chunk-GXNQPCL4.js.map +1 -0
- package/dist/{chunk-D6TWJEFW.cjs → chunk-GZXW5QWQ.cjs} +15 -15
- package/dist/{chunk-D6TWJEFW.cjs.map → chunk-GZXW5QWQ.cjs.map} +1 -1
- package/dist/{chunk-4TE53O6U.js → chunk-HAQRGJFL.js} +4 -4
- package/dist/{chunk-TIOHTWDA.js → chunk-INISTVWK.js} +6 -6
- package/dist/{chunk-IU3IYXMM.js → chunk-IRV2W7GN.js} +7 -7
- package/dist/{chunk-R2IU2Y2O.cjs → chunk-JWCAWGLG.cjs} +33 -33
- package/dist/{chunk-R2IU2Y2O.cjs.map → chunk-JWCAWGLG.cjs.map} +1 -1
- package/dist/{chunk-77EO26XV.cjs → chunk-LNLNPCII.cjs} +5 -5
- package/dist/{chunk-77EO26XV.cjs.map → chunk-LNLNPCII.cjs.map} +1 -1
- package/dist/{chunk-42NXGOTG.cjs → chunk-N3M56EE5.cjs} +3 -3
- package/dist/{chunk-42NXGOTG.cjs.map → chunk-N3M56EE5.cjs.map} +1 -1
- package/dist/{chunk-O7JMF5OT.js → chunk-O47SGDBV.js} +3 -3
- package/dist/{chunk-EWQI5MV6.cjs → chunk-OANRA5ML.cjs} +20 -20
- package/dist/{chunk-EWQI5MV6.cjs.map → chunk-OANRA5ML.cjs.map} +1 -1
- package/dist/{chunk-NCHLLTAR.js → chunk-PR6IR22M.js} +3 -3
- package/dist/{chunk-6MQBLFUM.js → chunk-Q7JDIDE2.js} +5 -5
- package/dist/{chunk-YG7KLZE7.js → chunk-R5EIFOW2.js} +4 -4
- package/dist/{chunk-5E6Y6766.cjs → chunk-S2E4I3WP.cjs} +29 -29
- package/dist/{chunk-5E6Y6766.cjs.map → chunk-S2E4I3WP.cjs.map} +1 -1
- package/dist/{chunk-SE6YRE3R.cjs → chunk-SAD5IUSO.cjs} +32 -32
- package/dist/{chunk-SE6YRE3R.cjs.map → chunk-SAD5IUSO.cjs.map} +1 -1
- package/dist/{chunk-3LXJEXPH.js → chunk-TAP4MJPF.js} +2 -2
- package/dist/{chunk-M3W5Y5DK.cjs → chunk-TEKH3J65.cjs} +11 -11
- package/dist/{chunk-M3W5Y5DK.cjs.map → chunk-TEKH3J65.cjs.map} +1 -1
- package/dist/{chunk-HA2U7WHU.js → chunk-TXNWDP3M.js} +3 -3
- package/dist/{chunk-IIZX3K2R.js → chunk-URGDDCJL.js} +2 -2
- package/dist/{chunk-TQ7KTANJ.js → chunk-V52INSJH.js} +3 -3
- package/dist/{chunk-FO7SD2IQ.cjs → chunk-VA6N7IVZ.cjs} +6 -6
- package/dist/{chunk-FO7SD2IQ.cjs.map → chunk-VA6N7IVZ.cjs.map} +1 -1
- package/dist/{chunk-CWHLVXUW.cjs → chunk-WYS66RIO.cjs} +10 -10
- package/dist/{chunk-CWHLVXUW.cjs.map → chunk-WYS66RIO.cjs.map} +1 -1
- package/dist/{chunk-XJLWGYL4.cjs → chunk-XVGWYNRY.cjs} +81 -81
- package/dist/{chunk-XJLWGYL4.cjs.map → chunk-XVGWYNRY.cjs.map} +1 -1
- package/dist/{chunk-ZU2JBBOE.cjs → chunk-XYJ3URIN.cjs} +59 -59
- package/dist/{chunk-ZU2JBBOE.cjs.map → chunk-XYJ3URIN.cjs.map} +1 -1
- package/dist/{chunk-FVIT23I5.js → chunk-Z5KAIEZ4.js} +3 -3
- package/dist/{chunk-YT6RGA3X.js → chunk-ZPLT4XLC.js} +3 -3
- package/dist/components/case-studies/index.cjs +16 -16
- package/dist/components/case-studies/index.js +4 -4
- package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/program-card.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +3 -9
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.js +2 -8
- package/dist/components/chat/types/entities/program-types.d.ts +29 -18
- package/dist/components/chat/types/entities/program-types.d.ts.map +1 -1
- package/dist/components/chat/utils/compact-card-classes.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +5 -5
- package/dist/components/contact/index.js +4 -4
- package/dist/components/docs/index.cjs +8 -8
- package/dist/components/docs/index.js +7 -7
- package/dist/components/embeds/index.cjs +5 -5
- package/dist/components/embeds/index.js +4 -4
- package/dist/components/faq/index.cjs +5 -5
- package/dist/components/faq/index.js +4 -4
- package/dist/components/features/index.cjs +4 -4
- package/dist/components/features/index.js +3 -3
- package/dist/components/help-center-pages/index.cjs +24 -24
- package/dist/components/help-center-pages/index.js +15 -15
- package/dist/components/index.cjs +53 -59
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +15 -21
- package/dist/components/index.js.map +1 -1
- package/dist/components/meeting-scheduler/index.cjs +34 -34
- package/dist/components/meeting-scheduler/index.js +3 -3
- package/dist/components/navigation/index.cjs +7 -7
- package/dist/components/navigation/index.js +6 -6
- package/dist/components/onboarding-guides/index.cjs +7 -7
- package/dist/components/onboarding-guides/index.js +6 -6
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +8 -8
- package/dist/components/tickets/index.js +7 -7
- package/dist/components/ui/index.cjs +4 -10
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +3 -9
- package/dist/index.cjs +24 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +30 -14
- package/dist/index.js.map +1 -1
- package/dist/utils/format.d.ts +127 -4
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/index.cjs +113 -5
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +4 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +103 -6
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/program-instant.d.ts +171 -0
- package/dist/utils/program-instant.d.ts.map +1 -0
- package/dist/utils/program-meta-renderers.d.ts +3 -0
- package/dist/utils/program-meta-renderers.d.ts.map +1 -0
- package/dist/utils/url-safety.d.ts +35 -0
- package/dist/utils/url-safety.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/chat-protocol/__tests__/source-metadata.test.ts +76 -0
- package/src/chat-protocol/source-metadata.ts +40 -6
- package/src/components/chat/entity-cards/.program-card.md +1 -1
- package/src/components/chat/entity-cards/dispatch.tsx +9 -27
- package/src/components/chat/entity-cards/program-card.tsx +42 -81
- package/src/components/chat/types/entities/program-types.ts +29 -89
- package/src/components/chat/utils/.compact-card-classes.md +1 -1
- package/src/components/chat/utils/compact-card-classes.ts +5 -3
- package/src/utils/.format.md +5 -2
- package/src/utils/__tests__/format-program-dates.test.ts +180 -0
- package/src/utils/__tests__/program-instant.test.ts +170 -0
- package/src/utils/__tests__/url-safety.test.ts +44 -0
- package/src/utils/format.ts +228 -13
- package/src/utils/index.ts +22 -0
- package/src/utils/program-instant.ts +211 -0
- package/src/utils/program-meta-renderers.ts +18 -0
- package/src/utils/url-safety.ts +45 -0
- package/dist/chunk-2DJH6KHA.cjs.map +0 -1
- package/dist/chunk-2NRLRRMR.cjs.map +0 -1
- package/dist/chunk-3IPL6G7S.js.map +0 -1
- /package/dist/{chunk-64KDKDYC.js.map → chunk-5ELZ2NQ5.js.map} +0 -0
- /package/dist/{chunk-N7UYD57Q.js.map → chunk-C7RU466R.js.map} +0 -0
- /package/dist/{chunk-7HL2PNQ3.js.map → chunk-GEGE3JXC.js.map} +0 -0
- /package/dist/{chunk-4TE53O6U.js.map → chunk-HAQRGJFL.js.map} +0 -0
- /package/dist/{chunk-TIOHTWDA.js.map → chunk-INISTVWK.js.map} +0 -0
- /package/dist/{chunk-IU3IYXMM.js.map → chunk-IRV2W7GN.js.map} +0 -0
- /package/dist/{chunk-O7JMF5OT.js.map → chunk-O47SGDBV.js.map} +0 -0
- /package/dist/{chunk-NCHLLTAR.js.map → chunk-PR6IR22M.js.map} +0 -0
- /package/dist/{chunk-6MQBLFUM.js.map → chunk-Q7JDIDE2.js.map} +0 -0
- /package/dist/{chunk-YG7KLZE7.js.map → chunk-R5EIFOW2.js.map} +0 -0
- /package/dist/{chunk-3LXJEXPH.js.map → chunk-TAP4MJPF.js.map} +0 -0
- /package/dist/{chunk-HA2U7WHU.js.map → chunk-TXNWDP3M.js.map} +0 -0
- /package/dist/{chunk-IIZX3K2R.js.map → chunk-URGDDCJL.js.map} +0 -0
- /package/dist/{chunk-TQ7KTANJ.js.map → chunk-V52INSJH.js.map} +0 -0
- /package/dist/{chunk-FVIT23I5.js.map → chunk-Z5KAIEZ4.js.map} +0 -0
- /package/dist/{chunk-YT6RGA3X.js.map → chunk-ZPLT4XLC.js.map} +0 -0
|
@@ -189,14 +189,16 @@ function formatDurationCompact(seconds) {
|
|
|
189
189
|
}
|
|
190
190
|
return `${minutes} min`;
|
|
191
191
|
}
|
|
192
|
-
function formatTimeWithTimezone(date, timezone) {
|
|
192
|
+
function formatTimeWithTimezone(date, timezone, options) {
|
|
193
193
|
if (!date) return "";
|
|
194
194
|
const dateObj = typeof date === "string" ? new Date(date) : date;
|
|
195
|
+
if (Number.isNaN(dateObj.getTime())) return "";
|
|
195
196
|
const opts = {
|
|
196
197
|
hour: "numeric",
|
|
197
198
|
minute: "2-digit",
|
|
198
199
|
hour12: true,
|
|
199
|
-
timeZone: timezone || "UTC"
|
|
200
|
+
timeZone: timezone || "UTC",
|
|
201
|
+
..._optionalChain([options, 'optionalAccess', _ => _.withZoneLabel]) ? { timeZoneName: "short" } : {}
|
|
200
202
|
};
|
|
201
203
|
try {
|
|
202
204
|
return dateObj.toLocaleTimeString("en-US", opts);
|
|
@@ -204,12 +206,41 @@ function formatTimeWithTimezone(date, timezone) {
|
|
|
204
206
|
return dateObj.toLocaleTimeString("en-US", { ...opts, timeZone: "UTC" });
|
|
205
207
|
}
|
|
206
208
|
}
|
|
209
|
+
var ZONED_DATE_STYLES = {
|
|
210
|
+
medium: { year: "numeric", month: "short", day: "numeric" },
|
|
211
|
+
weekday: { weekday: "long", day: "numeric", month: "long" },
|
|
212
|
+
// Spelled-out month, no weekday — what an SEO description reads best as.
|
|
213
|
+
long: { year: "numeric", month: "long", day: "numeric" }
|
|
214
|
+
};
|
|
215
|
+
function formatDateWithTimezone(date, timezone, style = "medium") {
|
|
216
|
+
if (!date) return "";
|
|
217
|
+
const dateObj = typeof date === "string" ? new Date(date) : date;
|
|
218
|
+
if (Number.isNaN(dateObj.getTime())) return "";
|
|
219
|
+
const opts = {
|
|
220
|
+
...ZONED_DATE_STYLES[style],
|
|
221
|
+
timeZone: timezone || "UTC"
|
|
222
|
+
};
|
|
223
|
+
try {
|
|
224
|
+
return dateObj.toLocaleDateString("en-US", opts);
|
|
225
|
+
} catch (e3) {
|
|
226
|
+
return dateObj.toLocaleDateString("en-US", { ...opts, timeZone: "UTC" });
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
function formatProgramDate(at, style = "medium") {
|
|
230
|
+
return formatDateWithTimezone(_nullishCoalesce(at.instant, () => ( at.utcDate)), at.timezone, style);
|
|
231
|
+
}
|
|
232
|
+
function isOrderedRange(from, to) {
|
|
233
|
+
if (!from || !to) return false;
|
|
234
|
+
const a = (typeof from === "string" ? new Date(from) : from).getTime();
|
|
235
|
+
const b = (typeof to === "string" ? new Date(to) : to).getTime();
|
|
236
|
+
return Number.isFinite(a) && Number.isFinite(b) && b > a;
|
|
237
|
+
}
|
|
207
238
|
function formatDurationFromRange(startAt, endAt) {
|
|
208
|
-
if (!startAt
|
|
239
|
+
if (!isOrderedRange(startAt, endAt)) return "";
|
|
209
240
|
const start = typeof startAt === "string" ? new Date(startAt) : startAt;
|
|
210
241
|
const end = typeof endAt === "string" ? new Date(endAt) : endAt;
|
|
211
|
-
const
|
|
212
|
-
|
|
242
|
+
const minutes = Math.round((end.getTime() - start.getTime()) / 6e4);
|
|
243
|
+
if (minutes <= 0) return "";
|
|
213
244
|
if (minutes >= 60) {
|
|
214
245
|
const hours = Math.floor(minutes / 60);
|
|
215
246
|
const mins = minutes % 60;
|
|
@@ -269,17 +300,17 @@ function formatWholeDollars(price, currency = "USD") {
|
|
|
269
300
|
maximumFractionDigits: 0
|
|
270
301
|
}).format(price);
|
|
271
302
|
}
|
|
272
|
-
function formatCompactMetric(value,
|
|
303
|
+
function formatCompactMetric(value, format = "number", options) {
|
|
273
304
|
if (value === 0 || value === null || value === void 0) {
|
|
274
|
-
if (
|
|
275
|
-
if (
|
|
276
|
-
if (
|
|
305
|
+
if (format === "currency") return `${_optionalChain([options, 'optionalAccess', _2 => _2.prefix]) || "$"}0`;
|
|
306
|
+
if (format === "percentage") return "0%";
|
|
307
|
+
if (format === "months") return `0 ${_optionalChain([options, 'optionalAccess', _3 => _3.suffix]) || "months"}`;
|
|
277
308
|
return "0";
|
|
278
309
|
}
|
|
279
310
|
const absValue = Math.abs(value);
|
|
280
311
|
const sign = value < 0 ? "-" : "";
|
|
281
|
-
if (
|
|
282
|
-
const prefix = _optionalChain([options, 'optionalAccess',
|
|
312
|
+
if (format === "currency") {
|
|
313
|
+
const prefix = _optionalChain([options, 'optionalAccess', _4 => _4.prefix]) || "$";
|
|
283
314
|
const compact = (val, divisor, suffix) => {
|
|
284
315
|
const divided = val / divisor;
|
|
285
316
|
const formatted = divided % 1 === 0 ? divided.toFixed(0) : divided.toFixed(1);
|
|
@@ -290,12 +321,12 @@ function formatCompactMetric(value, format2 = "number", options) {
|
|
|
290
321
|
if (absValue >= 1e3) return `${sign}${prefix}${(absValue / 1e3).toFixed(0)}K`;
|
|
291
322
|
return `${sign}${prefix}${absValue.toLocaleString()}`;
|
|
292
323
|
}
|
|
293
|
-
if (
|
|
324
|
+
if (format === "percentage") {
|
|
294
325
|
return `${sign}${absValue}%`;
|
|
295
326
|
}
|
|
296
|
-
if (
|
|
327
|
+
if (format === "months") {
|
|
297
328
|
const rounded = Math.round(value * 10) / 10;
|
|
298
|
-
return `${rounded} ${_optionalChain([options, 'optionalAccess',
|
|
329
|
+
return `${rounded} ${_optionalChain([options, 'optionalAccess', _5 => _5.suffix]) || "months"}`;
|
|
299
330
|
}
|
|
300
331
|
if (absValue >= 1e6) return `${sign}${(absValue / 1e6).toFixed(1)}M`;
|
|
301
332
|
if (absValue >= 1e3) return `${sign}${(absValue / 1e3).toFixed(1)}K`;
|
|
@@ -398,6 +429,22 @@ function formatBioText(aboutHtml, fallback = "") {
|
|
|
398
429
|
}
|
|
399
430
|
return stripHtml(aboutHtml).trim() || fallback;
|
|
400
431
|
}
|
|
432
|
+
function formatProgramTimeRange(at, opts = {}) {
|
|
433
|
+
if (at.dateOnly) return "";
|
|
434
|
+
const source = _nullishCoalesce(_nullishCoalesce(at.instant, () => ( at.utcDate)), () => ( opts.startAt));
|
|
435
|
+
const label = opts.withZoneLabel === true;
|
|
436
|
+
const bare = formatTimeWithTimezone(source, at.timezone);
|
|
437
|
+
const labelled = label ? formatTimeWithTimezone(source, at.timezone, { withZoneLabel: true }) : bare;
|
|
438
|
+
const ordered = isOrderedRange(source, opts.endAt);
|
|
439
|
+
const end = ordered && opts.endAt ? formatTimeWithTimezone(opts.endAt, at.timezone, { withZoneLabel: label }) : "";
|
|
440
|
+
if (!bare) return "";
|
|
441
|
+
return end ? `${bare} - ${end}` : labelled;
|
|
442
|
+
}
|
|
443
|
+
function formatWebinarTimeMeta(at, opts) {
|
|
444
|
+
const duration = formatDurationFromRange(opts.startAt, opts.endAt);
|
|
445
|
+
const time = formatProgramTimeRange(at, { startAt: opts.startAt, withZoneLabel: opts.withZoneLabel });
|
|
446
|
+
return [time, duration].filter(Boolean).join(" \xB7 ");
|
|
447
|
+
}
|
|
401
448
|
|
|
402
449
|
// src/components/ui/square-avatar.tsx
|
|
403
450
|
|
|
@@ -864,8 +911,8 @@ function DepartmentBadge({
|
|
|
864
911
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
865
912
|
PaletteBadge,
|
|
866
913
|
{
|
|
867
|
-
text: _optionalChain([department, 'optionalAccess',
|
|
868
|
-
color: _optionalChain([department, 'optionalAccess',
|
|
914
|
+
text: _optionalChain([department, 'optionalAccess', _6 => _6.name]) || emptyLabel,
|
|
915
|
+
color: _optionalChain([department, 'optionalAccess', _7 => _7.name]) ? department.color : null,
|
|
869
916
|
className,
|
|
870
917
|
variant
|
|
871
918
|
}
|
|
@@ -875,9 +922,9 @@ function DepartmentBadge({
|
|
|
875
922
|
// src/utils/image-proxy.ts
|
|
876
923
|
function getProxiedImageUrl(imageUrl, options) {
|
|
877
924
|
if (!imageUrl) return null;
|
|
878
|
-
const proxyPrefix = _optionalChain([options, 'optionalAccess',
|
|
879
|
-
const skipDomains = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
880
|
-
const directHttps = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
925
|
+
const proxyPrefix = _optionalChain([options, 'optionalAccess', _8 => _8.proxyPrefix]);
|
|
926
|
+
const skipDomains = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _9 => _9.skipDomains]), () => ( []));
|
|
927
|
+
const directHttps = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _10 => _10.directHttps]), () => ( false));
|
|
881
928
|
if (proxyPrefix && imageUrl.includes(proxyPrefix)) {
|
|
882
929
|
return imageUrl;
|
|
883
930
|
}
|
|
@@ -900,7 +947,7 @@ function getProxiedImageUrl(imageUrl, options) {
|
|
|
900
947
|
function urlPathLooksLikeSvg(imageUrl) {
|
|
901
948
|
try {
|
|
902
949
|
return /\.svg$/i.test(new URL(imageUrl).pathname);
|
|
903
|
-
} catch (
|
|
950
|
+
} catch (e4) {
|
|
904
951
|
return /\.svg(\?|#|$)/i.test(imageUrl);
|
|
905
952
|
}
|
|
906
953
|
}
|
|
@@ -942,14 +989,14 @@ function isSameOriginAbsoluteHref(href) {
|
|
|
942
989
|
if (!/^https?:\/\//i.test(href)) return false;
|
|
943
990
|
try {
|
|
944
991
|
return new URL(href).origin === new URL(window.location.href).origin;
|
|
945
|
-
} catch (
|
|
992
|
+
} catch (e5) {
|
|
946
993
|
return false;
|
|
947
994
|
}
|
|
948
995
|
}
|
|
949
996
|
function computeIsNewTab(runtime, href, targetPlatform) {
|
|
950
997
|
if (!href) return false;
|
|
951
998
|
if (runtime.navigation.mode === "embed") return !isSameOriginAbsoluteHref(href);
|
|
952
|
-
return _nullishCoalesce(_optionalChain([runtime, 'access',
|
|
999
|
+
return _nullishCoalesce(_optionalChain([runtime, 'access', _11 => _11.navigation, 'access', _12 => _12.decideNewTab, 'optionalCall', _13 => _13({ href, targetPlatform })]), () => ( decideNewTab({
|
|
953
1000
|
href,
|
|
954
1001
|
targetPlatform,
|
|
955
1002
|
currentSource: _nullishCoalesce(runtime.source, () => ( ""))
|
|
@@ -1015,7 +1062,7 @@ function EntityAuthorCard({
|
|
|
1015
1062
|
renderEmptyAuthor = false,
|
|
1016
1063
|
className
|
|
1017
1064
|
}) {
|
|
1018
|
-
const hasAuthor = !!_optionalChain([author, 'optionalAccess',
|
|
1065
|
+
const hasAuthor = !!_optionalChain([author, 'optionalAccess', _14 => _14.full_name]);
|
|
1019
1066
|
if (!hasAuthor && !renderEmptyAuthor) return null;
|
|
1020
1067
|
const effectiveAuthor = hasAuthor ? author : EMPTY_AUTHOR_PLACEHOLDER;
|
|
1021
1068
|
const formatted = publishedAt ? formatDate(publishedAt) : "";
|
|
@@ -1104,7 +1151,7 @@ function EntityPortraitCard({
|
|
|
1104
1151
|
}) {
|
|
1105
1152
|
const { src, onError: onMediaError } = useCoverImageFallback(imageUrl, placeholderUrl);
|
|
1106
1153
|
const [measured, setMeasured] = _react.useState.call(void 0, null);
|
|
1107
|
-
const isWide = _optionalChain([measured, 'optionalAccess',
|
|
1154
|
+
const isWide = _optionalChain([measured, 'optionalAccess', _15 => _15.src]) === src ? measured.isWide : null;
|
|
1108
1155
|
const onMediaLoad = (e) => {
|
|
1109
1156
|
const img = e.currentTarget;
|
|
1110
1157
|
if (img.naturalWidth > 0 && img.naturalHeight > 0) {
|
|
@@ -1404,8 +1451,8 @@ function AdminContentCard({
|
|
|
1404
1451
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: _chunk23V5BSHDcjs.cn.call(void 0, "line-clamp-2 break-words text-ods-text-primary text-h3", reserveRows && "min-h-[2lh]"), children: title }),
|
|
1405
1452
|
(subtitle || reserveRows) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: _chunk23V5BSHDcjs.cn.call(void 0, "truncate text-ods-text-secondary text-h6", reserveRows && "min-h-[1lh]"), children: subtitle }),
|
|
1406
1453
|
(summary || reserveRows) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: _chunk23V5BSHDcjs.cn.call(void 0, "line-clamp-2 text-ods-text-secondary text-h6", reserveRows && "min-h-[2lh]"), children: summary }),
|
|
1407
|
-
(Number(_optionalChain([platforms, 'optionalAccess',
|
|
1408
|
-
_optionalChain([platforms, 'optionalAccess',
|
|
1454
|
+
(Number(_optionalChain([platforms, 'optionalAccess', _16 => _16.length])) > 0 || badges || reserveRows) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunk23V5BSHDcjs.cn.call(void 0, "flex flex-wrap items-center gap-2", reserveRows && "min-h-7"), children: [
|
|
1455
|
+
_optionalChain([platforms, 'optionalAccess', _17 => _17.map, 'call', _18 => _18((p) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1409
1456
|
PlatformBadge,
|
|
1410
1457
|
{
|
|
1411
1458
|
platform: { id: p.id || p.platform_id || "", name: p.name, display_name: p.display_name || p.name },
|
|
@@ -1485,7 +1532,7 @@ function EmployeeEntryCard({
|
|
|
1485
1532
|
] }) : null,
|
|
1486
1533
|
meta: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1487
1534
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex min-w-0 items-center gap-2", children: [
|
|
1488
|
-
_optionalChain([entry, 'access',
|
|
1535
|
+
_optionalChain([entry, 'access', _19 => _19.author, 'optionalAccess', _20 => _20.avatar_url]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1489
1536
|
_chunkWLSFBRT5cjs.next_image_default,
|
|
1490
1537
|
{
|
|
1491
1538
|
src: _nullishCoalesce(getProxiedImageUrl2(entry.author.avatar_url), () => ( entry.author.avatar_url)),
|
|
@@ -1496,7 +1543,7 @@ function EmployeeEntryCard({
|
|
|
1496
1543
|
unoptimized: true
|
|
1497
1544
|
}
|
|
1498
1545
|
) : null,
|
|
1499
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "truncate", children: _nullishCoalesce(_optionalChain([entry, 'access',
|
|
1546
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "truncate", children: _nullishCoalesce(_optionalChain([entry, 'access', _21 => _21.author, 'optionalAccess', _22 => _22.full_name]), () => ( "")) })
|
|
1500
1547
|
] }),
|
|
1501
1548
|
dateLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: dateLabel }) : null
|
|
1502
1549
|
] }),
|
|
@@ -1569,7 +1616,7 @@ var HowIWorkCardSkeleton = EmployeeEntryCardSkeleton;
|
|
|
1569
1616
|
// src/components/chat/entity-cards/ai-prompt-card.tsx
|
|
1570
1617
|
|
|
1571
1618
|
function AiPromptCard({ entry, placeholderUrl, actions, anchorProps, className }) {
|
|
1572
|
-
const departmentName = _optionalChain([entry, 'access',
|
|
1619
|
+
const departmentName = _optionalChain([entry, 'access', _23 => _23.department, 'optionalAccess', _24 => _24.name, 'optionalAccess', _25 => _25.trim, 'call', _26 => _26()]);
|
|
1573
1620
|
const steps = typeof entry.step_count === "number" ? entry.step_count : 0;
|
|
1574
1621
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1575
1622
|
EmployeeEntryCard,
|
|
@@ -1577,7 +1624,7 @@ function AiPromptCard({ entry, placeholderUrl, actions, anchorProps, className }
|
|
|
1577
1624
|
entry,
|
|
1578
1625
|
dateLabel: entry.published_at ? formatDateUTC(entry.published_at, { fallback: "" }) || null : null,
|
|
1579
1626
|
extraBadges: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1580
|
-
departmentName ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DepartmentBadge, { department: { name: departmentName, color: _nullishCoalesce(_optionalChain([entry, 'access',
|
|
1627
|
+
departmentName ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DepartmentBadge, { department: { name: departmentName, color: _nullishCoalesce(_optionalChain([entry, 'access', _27 => _27.department, 'optionalAccess', _28 => _28.color]), () => ( null)) } }) : null,
|
|
1581
1628
|
steps > 1 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EmployeeEntryBadge, { children: `${steps} steps` }) : null
|
|
1582
1629
|
] }),
|
|
1583
1630
|
untitledLabel: "Untitled prompt",
|
|
@@ -1593,7 +1640,7 @@ var AiPromptCardSkeleton = EmployeeEntryCardSkeleton;
|
|
|
1593
1640
|
// src/components/features/video-bites-shared.ts
|
|
1594
1641
|
var DEFAULT_VIDEO_BITES_TITLE = "Key Moments";
|
|
1595
1642
|
function toStripProfile(p, fallbackSubtitle) {
|
|
1596
|
-
if (!_optionalChain([p, 'optionalAccess',
|
|
1643
|
+
if (!_optionalChain([p, 'optionalAccess', _29 => _29.full_name])) return null;
|
|
1597
1644
|
return {
|
|
1598
1645
|
name: p.full_name,
|
|
1599
1646
|
avatarUrl: _nullishCoalesce(p.avatar_url, () => ( null)),
|
|
@@ -1635,7 +1682,7 @@ function ProductReleaseCard({
|
|
|
1635
1682
|
changelogCounts
|
|
1636
1683
|
}) {
|
|
1637
1684
|
if (size === "lg") {
|
|
1638
|
-
const totalChangelog = (_nullishCoalesce(_optionalChain([changelogCounts, 'optionalAccess',
|
|
1685
|
+
const totalChangelog = (_nullishCoalesce(_optionalChain([changelogCounts, 'optionalAccess', _30 => _30.features]), () => ( 0))) + (_nullishCoalesce(_optionalChain([changelogCounts, 'optionalAccess', _31 => _31.fixes]), () => ( 0))) + (_nullishCoalesce(_optionalChain([changelogCounts, 'optionalAccess', _32 => _32.improvements]), () => ( 0))) + (_nullishCoalesce(_optionalChain([changelogCounts, 'optionalAccess', _33 => _33.breaking]), () => ( 0)));
|
|
1639
1686
|
const valueCells = [
|
|
1640
1687
|
releaseType && releaseTypeBadgeColor ? {
|
|
1641
1688
|
value: releaseType.toUpperCase(),
|
|
@@ -1654,7 +1701,7 @@ function ProductReleaseCard({
|
|
|
1654
1701
|
uppercase: false
|
|
1655
1702
|
} : { value: "\u2014", label: "Released", uppercase: false }
|
|
1656
1703
|
];
|
|
1657
|
-
const effectiveAuthor = _optionalChain([author, 'optionalAccess',
|
|
1704
|
+
const effectiveAuthor = _optionalChain([author, 'optionalAccess', _34 => _34.full_name]) ? author : { full_name: "\u2014", avatar_url: null, job_title: "Unknown" };
|
|
1658
1705
|
const gridColsClass = "md:grid-cols-4";
|
|
1659
1706
|
const dividerClass = "border-b md:border-b-0 md:border-r border-ods-border";
|
|
1660
1707
|
const frameClass = _chunk23V5BSHDcjs.cn.call(void 0,
|
|
@@ -2028,14 +2075,25 @@ function buildProductReleaseCardProps(item) {
|
|
|
2028
2075
|
job_title: release.author.job_title
|
|
2029
2076
|
} : void 0,
|
|
2030
2077
|
changelogCounts: {
|
|
2031
|
-
features: _nullishCoalesce(_optionalChain([release, 'access',
|
|
2032
|
-
fixes: _nullishCoalesce(_optionalChain([release, 'access',
|
|
2033
|
-
improvements: _nullishCoalesce(_optionalChain([release, 'access',
|
|
2034
|
-
breaking: _nullishCoalesce(_optionalChain([release, 'access',
|
|
2078
|
+
features: _nullishCoalesce(_optionalChain([release, 'access', _35 => _35.features_added, 'optionalAccess', _36 => _36.length]), () => ( 0)),
|
|
2079
|
+
fixes: _nullishCoalesce(_optionalChain([release, 'access', _37 => _37.bugs_fixed, 'optionalAccess', _38 => _38.length]), () => ( 0)),
|
|
2080
|
+
improvements: _nullishCoalesce(_optionalChain([release, 'access', _39 => _39.improvements, 'optionalAccess', _40 => _40.length]), () => ( 0)),
|
|
2081
|
+
breaking: _nullishCoalesce(_optionalChain([release, 'access', _41 => _41.breaking_changes, 'optionalAccess', _42 => _42.length]), () => ( 0))
|
|
2035
2082
|
}
|
|
2036
2083
|
};
|
|
2037
2084
|
}
|
|
2038
2085
|
|
|
2086
|
+
// src/utils/url-safety.ts
|
|
2087
|
+
var UNSAFE_URL_CHARS = /[\u0000-\u001f\u007f\u200b-\u200d\u2028\u2029\ufeff]/;
|
|
2088
|
+
var SAME_ORIGIN_PROBE = "https://_sameorigin_.invalid";
|
|
2089
|
+
function isSameOriginPath(candidate) {
|
|
2090
|
+
try {
|
|
2091
|
+
return new URL(candidate, SAME_ORIGIN_PROBE).origin === SAME_ORIGIN_PROBE;
|
|
2092
|
+
} catch (e6) {
|
|
2093
|
+
return false;
|
|
2094
|
+
}
|
|
2095
|
+
}
|
|
2096
|
+
|
|
2039
2097
|
// src/components/chat/utils/compact-card-classes.ts
|
|
2040
2098
|
var COMPACT_CARD_OUTER = "my-1.5 flex items-start gap-3 w-full p-2 rounded-lg border border-ods-border bg-ods-card no-underline transition-colors hover:border-ods-text-secondary/40";
|
|
2041
2099
|
var COMPACT_CARD_OUTER_STATIC = "my-1.5 flex items-start gap-3 w-full p-2 rounded-lg border border-ods-border bg-ods-card no-underline cursor-default";
|
|
@@ -2054,10 +2112,10 @@ var COMPACT_CARD_ROW_FILLER = "\xA0";
|
|
|
2054
2112
|
var SAFE_URL_SCHEMES = ["http:", "https:", "mailto:"];
|
|
2055
2113
|
function safeHref(url) {
|
|
2056
2114
|
if (!url) return null;
|
|
2057
|
-
if (
|
|
2115
|
+
if (UNSAFE_URL_CHARS.test(url)) return null;
|
|
2058
2116
|
const trimmed = url.trim();
|
|
2059
2117
|
if (!trimmed) return null;
|
|
2060
|
-
if (trimmed.startsWith("/")
|
|
2118
|
+
if (trimmed.startsWith("/")) return isSameOriginPath(trimmed) ? trimmed : null;
|
|
2061
2119
|
if (trimmed.startsWith("#")) return trimmed;
|
|
2062
2120
|
if (/^[a-z][a-z0-9+.-]*:$/i.test(trimmed)) return null;
|
|
2063
2121
|
try {
|
|
@@ -2065,7 +2123,7 @@ function safeHref(url) {
|
|
|
2065
2123
|
if (!SAFE_URL_SCHEMES.includes(parsed.protocol)) return null;
|
|
2066
2124
|
if ((parsed.protocol === "https:" || parsed.protocol === "http:") && !parsed.hostname) return null;
|
|
2067
2125
|
return trimmed;
|
|
2068
|
-
} catch (
|
|
2126
|
+
} catch (e7) {
|
|
2069
2127
|
return null;
|
|
2070
2128
|
}
|
|
2071
2129
|
}
|
|
@@ -2157,7 +2215,7 @@ function BlogCard({
|
|
|
2157
2215
|
day: "numeric",
|
|
2158
2216
|
timeZone: "UTC"
|
|
2159
2217
|
}) : "";
|
|
2160
|
-
const firstCategory = _optionalChain([post, 'access',
|
|
2218
|
+
const firstCategory = _optionalChain([post, 'access', _43 => _43.categories, 'optionalAccess', _44 => _44.find, 'call', _45 => _45((c) => c && c.name), 'optionalAccess', _46 => _46.name]);
|
|
2161
2219
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
2162
2220
|
"a",
|
|
2163
2221
|
{
|
|
@@ -2375,7 +2433,7 @@ function CaseStudyCard({
|
|
|
2375
2433
|
_chunkWLSFBRT5cjs.next_image_default,
|
|
2376
2434
|
{
|
|
2377
2435
|
src: coverImage,
|
|
2378
|
-
alt: `${_optionalChain([study, 'access',
|
|
2436
|
+
alt: `${_optionalChain([study, 'access', _47 => _47.msp, 'optionalAccess', _48 => _48.name]) || study.title} cover`,
|
|
2379
2437
|
className: "object-contain",
|
|
2380
2438
|
fill: true,
|
|
2381
2439
|
sizes: "56px",
|
|
@@ -2385,7 +2443,7 @@ function CaseStudyCard({
|
|
|
2385
2443
|
) : null }),
|
|
2386
2444
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: COMPACT_CARD_TEXT_COL, children: [
|
|
2387
2445
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: COMPACT_CARD_TITLE_ROW, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: COMPACT_CARD_TITLE, children: study.title }) }),
|
|
2388
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: COMPACT_CARD_SUBTITLE, children: [_optionalChain([study, 'access',
|
|
2446
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: COMPACT_CARD_SUBTITLE, children: [_optionalChain([study, 'access', _49 => _49.msp, 'optionalAccess', _50 => _50.name]), _optionalChain([study, 'access', _51 => _51.user, 'optionalAccess', _52 => _52.full_name])].filter(Boolean).join(" \xB7 ") || "Case study" }) }),
|
|
2389
2447
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: COMPACT_CARD_SUMMARY, children: study.summary || COMPACT_CARD_ROW_FILLER }) })
|
|
2390
2448
|
] })
|
|
2391
2449
|
] });
|
|
@@ -2400,13 +2458,13 @@ function CaseStudyCard({
|
|
|
2400
2458
|
typeLabel: showTypeBadge ? "Case Study" : void 0,
|
|
2401
2459
|
imageUrl: study.featured_image,
|
|
2402
2460
|
placeholderUrl,
|
|
2403
|
-
imageAlt: _optionalChain([study, 'access',
|
|
2461
|
+
imageAlt: _optionalChain([study, 'access', _53 => _53.msp, 'optionalAccess', _54 => _54.name]) || study.title,
|
|
2404
2462
|
title: study.title,
|
|
2405
2463
|
person: {
|
|
2406
|
-
name: _optionalChain([study, 'access',
|
|
2407
|
-
avatarUrl: _optionalChain([study, 'access',
|
|
2408
|
-
subtitle: _nullishCoalesce(_optionalChain([study, 'access',
|
|
2409
|
-
iconOverlayUrl: _nullishCoalesce(_optionalChain([study, 'access',
|
|
2464
|
+
name: _optionalChain([study, 'access', _55 => _55.user, 'optionalAccess', _56 => _56.full_name]) || "Anonymous",
|
|
2465
|
+
avatarUrl: _optionalChain([study, 'access', _57 => _57.user, 'optionalAccess', _58 => _58.avatar_url]),
|
|
2466
|
+
subtitle: _nullishCoalesce(_optionalChain([study, 'access', _59 => _59.msp, 'optionalAccess', _60 => _60.name]), () => ( null)),
|
|
2467
|
+
iconOverlayUrl: _nullishCoalesce(_optionalChain([study, 'access', _61 => _61.msp, 'optionalAccess', _62 => _62.icon_url]), () => ( null))
|
|
2410
2468
|
},
|
|
2411
2469
|
className
|
|
2412
2470
|
}
|
|
@@ -2417,7 +2475,7 @@ function CaseStudyCard({
|
|
|
2417
2475
|
_chunkWLSFBRT5cjs.next_image_default,
|
|
2418
2476
|
{
|
|
2419
2477
|
src: coverImage,
|
|
2420
|
-
alt: _optionalChain([study, 'access',
|
|
2478
|
+
alt: _optionalChain([study, 'access', _63 => _63.msp, 'optionalAccess', _64 => _64.name]) || study.title,
|
|
2421
2479
|
className: "h-full w-full object-cover",
|
|
2422
2480
|
sizes: "(min-width: 1545px) 515px, (min-width: 1280px) 33vw, (min-width: 800px) 50vw, 100vw",
|
|
2423
2481
|
fill: true,
|
|
@@ -2428,18 +2486,18 @@ function CaseStudyCard({
|
|
|
2428
2486
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-[72px] shrink-0 items-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "line-clamp-3 break-words text-ods-text-primary text-h4", children: study.title }) }),
|
|
2429
2487
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-[60px] shrink-0 items-center", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full min-w-0 items-center gap-3", children: [
|
|
2430
2488
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "relative h-12 w-12 shrink-0", children: [
|
|
2431
|
-
_optionalChain([study, 'access',
|
|
2489
|
+
_optionalChain([study, 'access', _65 => _65.user, 'optionalAccess', _66 => _66.avatar_url]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2432
2490
|
_chunkWLSFBRT5cjs.next_image_default,
|
|
2433
2491
|
{
|
|
2434
2492
|
src: study.user.avatar_url,
|
|
2435
|
-
alt: _optionalChain([study, 'access',
|
|
2493
|
+
alt: _optionalChain([study, 'access', _67 => _67.user, 'optionalAccess', _68 => _68.full_name]) || "User",
|
|
2436
2494
|
className: "h-12 w-12 rounded-full border border-ods-border bg-ods-bg object-cover",
|
|
2437
2495
|
width: 48,
|
|
2438
2496
|
height: 48,
|
|
2439
2497
|
unoptimized: true
|
|
2440
2498
|
}
|
|
2441
|
-
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-12 w-12 items-center justify-center rounded-full border border-ods-border bg-ods-bg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-text-secondary text-h4", children: (_optionalChain([study, 'access',
|
|
2442
|
-
_optionalChain([study, 'access',
|
|
2499
|
+
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-12 w-12 items-center justify-center rounded-full border border-ods-border bg-ods-bg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-text-secondary text-h4", children: (_optionalChain([study, 'access', _69 => _69.user, 'optionalAccess', _70 => _70.full_name]) || "A").charAt(0).toUpperCase() }) }),
|
|
2500
|
+
_optionalChain([study, 'access', _71 => _71.msp, 'optionalAccess', _72 => _72.icon_url]) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "absolute -bottom-1 -right-1 flex h-6 w-6 items-center justify-center overflow-hidden rounded-full bg-ods-text-primary ring-1 ring-ods-bg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2443
2501
|
_chunkWLSFBRT5cjs.next_image_default,
|
|
2444
2502
|
{
|
|
2445
2503
|
src: study.msp.icon_url,
|
|
@@ -2453,13 +2511,13 @@ function CaseStudyCard({
|
|
|
2453
2511
|
] }),
|
|
2454
2512
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "min-w-0 flex-1", children: [
|
|
2455
2513
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "truncate text-ods-text-primary text-h6", children: [
|
|
2456
|
-
_optionalChain([study, 'access',
|
|
2457
|
-
_optionalChain([study, 'access',
|
|
2514
|
+
_optionalChain([study, 'access', _73 => _73.user, 'optionalAccess', _74 => _74.full_name]) || "Anonymous",
|
|
2515
|
+
_optionalChain([study, 'access', _75 => _75.msp, 'optionalAccess', _76 => _76.name]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "text-ods-text-secondary", children: [
|
|
2458
2516
|
" \u2022 ",
|
|
2459
2517
|
study.msp.name
|
|
2460
2518
|
] })
|
|
2461
2519
|
] }),
|
|
2462
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "truncate text-ods-text-secondary text-h6", children: _optionalChain([study, 'access',
|
|
2520
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "truncate text-ods-text-secondary text-h6", children: _optionalChain([study, 'access', _77 => _77.user, 'optionalAccess', _78 => _78.job_title]) || "\xA0" })
|
|
2463
2521
|
] })
|
|
2464
2522
|
] }) })
|
|
2465
2523
|
] }) });
|
|
@@ -2541,7 +2599,7 @@ function CustomerInterviewCard({
|
|
|
2541
2599
|
] }),
|
|
2542
2600
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: COMPACT_CARD_TEXT_COL, children: [
|
|
2543
2601
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: COMPACT_CARD_TITLE_ROW, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: COMPACT_CARD_TITLE, children: interview.title }) }),
|
|
2544
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: COMPACT_CARD_SUBTITLE, children: [_optionalChain([interview, 'access',
|
|
2602
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: COMPACT_CARD_SUBTITLE, children: [_optionalChain([interview, 'access', _79 => _79.user, 'optionalAccess', _80 => _80.full_name]), _optionalChain([interview, 'access', _81 => _81.msp, 'optionalAccess', _82 => _82.name])].filter(Boolean).join(" \xB7 ") || "Customer interview" }) }),
|
|
2545
2603
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: COMPACT_CARD_SUMMARY, children: interview.video_summary || COMPACT_CARD_ROW_FILLER }) })
|
|
2546
2604
|
] })
|
|
2547
2605
|
] });
|
|
@@ -2559,10 +2617,10 @@ function CustomerInterviewCard({
|
|
|
2559
2617
|
imageAlt: interview.title,
|
|
2560
2618
|
title: interview.title,
|
|
2561
2619
|
person: {
|
|
2562
|
-
name: _optionalChain([interview, 'access',
|
|
2563
|
-
avatarUrl: _optionalChain([interview, 'access',
|
|
2564
|
-
subtitle: _nullishCoalesce(_optionalChain([interview, 'access',
|
|
2565
|
-
iconOverlayUrl: _nullishCoalesce(_optionalChain([interview, 'access',
|
|
2620
|
+
name: _optionalChain([interview, 'access', _83 => _83.user, 'optionalAccess', _84 => _84.full_name]) || "Customer",
|
|
2621
|
+
avatarUrl: _optionalChain([interview, 'access', _85 => _85.user, 'optionalAccess', _86 => _86.avatar_url]),
|
|
2622
|
+
subtitle: _nullishCoalesce(_optionalChain([interview, 'access', _87 => _87.msp, 'optionalAccess', _88 => _88.name]), () => ( null)),
|
|
2623
|
+
iconOverlayUrl: _nullishCoalesce(_optionalChain([interview, 'access', _89 => _89.msp, 'optionalAccess', _90 => _90.icon_url]), () => ( null))
|
|
2566
2624
|
},
|
|
2567
2625
|
className
|
|
2568
2626
|
}
|
|
@@ -2588,18 +2646,18 @@ function CustomerInterviewCard({
|
|
|
2588
2646
|
interview.video_summary && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "shrink-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "line-clamp-3 text-ods-text-secondary text-h6", children: interview.video_summary }) }),
|
|
2589
2647
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-auto flex h-[60px] shrink-0 items-center", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full min-w-0 items-center gap-3", children: [
|
|
2590
2648
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "relative h-12 w-12 shrink-0", children: [
|
|
2591
|
-
_optionalChain([interview, 'access',
|
|
2649
|
+
_optionalChain([interview, 'access', _91 => _91.user, 'optionalAccess', _92 => _92.avatar_url]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2592
2650
|
_chunkWLSFBRT5cjs.next_image_default,
|
|
2593
2651
|
{
|
|
2594
2652
|
src: interview.user.avatar_url,
|
|
2595
|
-
alt: _optionalChain([interview, 'access',
|
|
2653
|
+
alt: _optionalChain([interview, 'access', _93 => _93.user, 'optionalAccess', _94 => _94.full_name]) || "Customer",
|
|
2596
2654
|
className: "h-12 w-12 rounded-full border border-ods-border bg-ods-bg object-cover",
|
|
2597
2655
|
width: 48,
|
|
2598
2656
|
height: 48,
|
|
2599
2657
|
unoptimized: true
|
|
2600
2658
|
}
|
|
2601
|
-
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-12 w-12 items-center justify-center rounded-full border border-ods-border bg-ods-bg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-text-secondary text-h4", children: (_optionalChain([interview, 'access',
|
|
2602
|
-
_optionalChain([interview, 'access',
|
|
2659
|
+
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-12 w-12 items-center justify-center rounded-full border border-ods-border bg-ods-bg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-text-secondary text-h4", children: (_optionalChain([interview, 'access', _95 => _95.user, 'optionalAccess', _96 => _96.full_name]) || "A").charAt(0).toUpperCase() }) }),
|
|
2660
|
+
_optionalChain([interview, 'access', _97 => _97.msp, 'optionalAccess', _98 => _98.icon_url]) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "absolute -bottom-1 -right-1 flex h-6 w-6 items-center justify-center overflow-hidden rounded-full bg-ods-text-primary ring-1 ring-ods-bg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2603
2661
|
_chunkWLSFBRT5cjs.next_image_default,
|
|
2604
2662
|
{
|
|
2605
2663
|
src: interview.msp.icon_url,
|
|
@@ -2613,13 +2671,13 @@ function CustomerInterviewCard({
|
|
|
2613
2671
|
] }),
|
|
2614
2672
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "min-w-0 flex-1", children: [
|
|
2615
2673
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "truncate text-ods-text-primary text-h6", children: [
|
|
2616
|
-
_optionalChain([interview, 'access',
|
|
2617
|
-
_optionalChain([interview, 'access',
|
|
2674
|
+
_optionalChain([interview, 'access', _99 => _99.user, 'optionalAccess', _100 => _100.full_name]) || "Anonymous",
|
|
2675
|
+
_optionalChain([interview, 'access', _101 => _101.msp, 'optionalAccess', _102 => _102.name]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "text-ods-text-secondary", children: [
|
|
2618
2676
|
" \u2022 ",
|
|
2619
2677
|
interview.msp.name
|
|
2620
2678
|
] })
|
|
2621
2679
|
] }),
|
|
2622
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "truncate text-ods-text-secondary text-h6", children: _optionalChain([interview, 'access',
|
|
2680
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "truncate text-ods-text-secondary text-h6", children: _optionalChain([interview, 'access', _103 => _103.user, 'optionalAccess', _104 => _104.job_title]) || " " })
|
|
2623
2681
|
] })
|
|
2624
2682
|
] }) })
|
|
2625
2683
|
] }) });
|
|
@@ -2629,7 +2687,7 @@ function CustomerInterviewCard({
|
|
|
2629
2687
|
function formatInvestorUpdatePeriod(start, end, options) {
|
|
2630
2688
|
if (!start && !end) return "";
|
|
2631
2689
|
const fmt = (d) => new Date(d).toLocaleDateString("en-US", {
|
|
2632
|
-
month: _optionalChain([options, 'optionalAccess',
|
|
2690
|
+
month: _optionalChain([options, 'optionalAccess', _105 => _105.monthFormat]) || "short",
|
|
2633
2691
|
year: "numeric",
|
|
2634
2692
|
// Pin to UTC so SSR (Vercel = UTC) and the client agree (React #418).
|
|
2635
2693
|
timeZone: "UTC"
|
|
@@ -2744,7 +2802,7 @@ function InvestorUpdateCard({
|
|
|
2744
2802
|
imageUrl: update.featured_image,
|
|
2745
2803
|
placeholderUrl,
|
|
2746
2804
|
title: update.title || `Update #${update.update_number || "?"}`,
|
|
2747
|
-
summary: _optionalChain([update, 'access',
|
|
2805
|
+
summary: _optionalChain([update, 'access', _106 => _106.strategic_update, 'optionalAccess', _107 => _107.slice, 'call', _108 => _108(0, 120)]) || _optionalChain([update, 'access', _109 => _109.content, 'optionalAccess', _110 => _110.slice, 'call', _111 => _111(0, 120)]) || "No description",
|
|
2748
2806
|
badges: update.update_number ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rounded bg-ods-accent/10 px-2 py-0.5 text-xs font-medium text-ods-accent", children: [
|
|
2749
2807
|
"#",
|
|
2750
2808
|
update.update_number
|
|
@@ -2953,7 +3011,7 @@ function OnboardingGuideCard({
|
|
|
2953
3011
|
const compactCover = coverImage || placeholderUrl || null;
|
|
2954
3012
|
const hasVideoCover = !guide.featured_image && !!guide.main_video_thumbnail;
|
|
2955
3013
|
const summary2 = stripMarkdownPreview(guide.video_summary || guide.content || "");
|
|
2956
|
-
const author = _optionalChain([guide, 'access',
|
|
3014
|
+
const author = _optionalChain([guide, 'access', _112 => _112.author, 'optionalAccess', _113 => _113.full_name, 'optionalAccess', _114 => _114.trim, 'call', _115 => _115()]) || "";
|
|
2957
3015
|
const subtitleParts = [`Step ${guide.step_order}`, guide.section, author].filter(
|
|
2958
3016
|
(s) => typeof s === "string" && s.length > 0
|
|
2959
3017
|
);
|
|
@@ -3078,7 +3136,7 @@ function AvatarStack({
|
|
|
3078
3136
|
|
|
3079
3137
|
// src/components/chat/utils/agent-status-message.ts
|
|
3080
3138
|
function getStatusColorScheme(status) {
|
|
3081
|
-
const s = _optionalChain([status, 'optionalAccess',
|
|
3139
|
+
const s = _optionalChain([status, 'optionalAccess', _116 => _116.toLowerCase, 'call', _117 => _117()]) || "";
|
|
3082
3140
|
switch (status) {
|
|
3083
3141
|
case "completed":
|
|
3084
3142
|
case "success":
|
|
@@ -3320,7 +3378,7 @@ function RoadmapCard({
|
|
|
3320
3378
|
const compactHref = safeHref(_nullishCoalesce(href, () => ( null)));
|
|
3321
3379
|
const hasVotes = (_nullishCoalesce(item.upvotes, () => ( 0))) > 0 || (_nullishCoalesce(item.downvotes, () => ( 0))) > 0;
|
|
3322
3380
|
const hasFigma = !!item.figmaUrl;
|
|
3323
|
-
const hasScreenshots = (_nullishCoalesce(_optionalChain([item, 'access',
|
|
3381
|
+
const hasScreenshots = (_nullishCoalesce(_optionalChain([item, 'access', _118 => _118.screenshots, 'optionalAccess', _119 => _119.length]), () => ( 0))) > 0;
|
|
3324
3382
|
const typeLabel = getTaskTypeLabel(item.customItemId);
|
|
3325
3383
|
const useTypeIcon = cardType === "internal_task" || !iconSrc && item.customItemId != null;
|
|
3326
3384
|
const body = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
@@ -3339,7 +3397,7 @@ function RoadmapCard({
|
|
|
3339
3397
|
unoptimized: true,
|
|
3340
3398
|
className: "h-8 w-8 object-contain"
|
|
3341
3399
|
}
|
|
3342
|
-
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "uppercase text-ods-text-secondary text-h6", children: _optionalChain([item, 'access',
|
|
3400
|
+
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "uppercase text-ods-text-secondary text-h6", children: _optionalChain([item, 'access', _120 => _120.title, 'optionalAccess', _121 => _121.substring, 'call', _122 => _122(0, 2)]) || "??" })
|
|
3343
3401
|
}
|
|
3344
3402
|
),
|
|
3345
3403
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: COMPACT_CARD_TEXT_COL, children: [
|
|
@@ -3419,7 +3477,7 @@ function RoadmapCard({
|
|
|
3419
3477
|
unoptimized: true,
|
|
3420
3478
|
className: "object-contain p-1"
|
|
3421
3479
|
}
|
|
3422
|
-
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-xs font-medium uppercase text-ods-text-secondary", children: _optionalChain([item, 'access',
|
|
3480
|
+
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-xs font-medium uppercase text-ods-text-secondary", children: _optionalChain([item, 'access', _123 => _123.title, 'optionalAccess', _124 => _124.substring, 'call', _125 => _125(0, 2)]) || "??" }) }),
|
|
3423
3481
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
3424
3482
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex min-h-[48px] items-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "line-clamp-2 flex-1 text-ods-text-primary text-h3", children: item.title }) }),
|
|
3425
3483
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex min-h-[20px] items-center", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "truncate text-ods-text-secondary text-h5", children: [
|
|
@@ -3520,10 +3578,10 @@ var MEDIA_TYPE = {
|
|
|
3520
3578
|
VIDEO: "video"
|
|
3521
3579
|
};
|
|
3522
3580
|
function isVideoMedia(media) {
|
|
3523
|
-
return _optionalChain([media, 'optionalAccess',
|
|
3581
|
+
return _optionalChain([media, 'optionalAccess', _126 => _126.media_type]) === MEDIA_TYPE.VIDEO;
|
|
3524
3582
|
}
|
|
3525
3583
|
function isImageMedia(media) {
|
|
3526
|
-
return _optionalChain([media, 'optionalAccess',
|
|
3584
|
+
return _optionalChain([media, 'optionalAccess', _127 => _127.media_type]) === MEDIA_TYPE.IMAGE;
|
|
3527
3585
|
}
|
|
3528
3586
|
function isPublishableMediaType(mediaType) {
|
|
3529
3587
|
return mediaType === MEDIA_TYPE.VIDEO || mediaType === MEDIA_TYPE.IMAGE;
|
|
@@ -3535,95 +3593,69 @@ function partitionMediaByType(media) {
|
|
|
3535
3593
|
};
|
|
3536
3594
|
}
|
|
3537
3595
|
|
|
3538
|
-
// src/
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
const
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
function transformEventToProgram(event) {
|
|
3596
|
+
// src/utils/program-instant.ts
|
|
3597
|
+
var programStr = (value) => typeof value === "string" && value ? value : null;
|
|
3598
|
+
function programDateInstant(item) {
|
|
3599
|
+
const declaredZone = programStr(item.timezone);
|
|
3600
|
+
const dateOnly = item.date_is_display_override === true;
|
|
3601
|
+
const date = programStr(item.date);
|
|
3602
|
+
const startAt = programStr(item.start_at);
|
|
3603
|
+
const timezone = dateOnly ? null : declaredZone;
|
|
3547
3604
|
return {
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
date: event.start_at,
|
|
3553
|
-
external_url: _nullishCoalesce(event.event_url, () => ( null)),
|
|
3554
|
-
hosts: _nullishCoalesce(event.hosts, () => ( null)),
|
|
3555
|
-
luma_api_id: event.luma_api_id,
|
|
3556
|
-
end_at: event.end_at,
|
|
3557
|
-
timezone: _nullishCoalesce(event.timezone, () => ( null)),
|
|
3558
|
-
location_name: _nullishCoalesce(event.location_name, () => ( null)),
|
|
3559
|
-
location_full_address: _nullishCoalesce(event.location_full_address, () => ( null)),
|
|
3560
|
-
geo_latitude: _nullishCoalesce(event.geo_latitude, () => ( null)),
|
|
3561
|
-
geo_longitude: _nullishCoalesce(event.geo_longitude, () => ( null)),
|
|
3562
|
-
meeting_url: _nullishCoalesce(event.meeting_url, () => ( null)),
|
|
3563
|
-
event_url: _nullishCoalesce(event.event_url, () => ( null)),
|
|
3564
|
-
guest_count: _nullishCoalesce(event.guest_count, () => ( null)),
|
|
3565
|
-
visibility: _nullishCoalesce(event.visibility, () => ( null)),
|
|
3566
|
-
is_deleted: _nullishCoalesce(event.is_deleted, () => ( false))
|
|
3605
|
+
instant: timezone ? _nullishCoalesce(date, () => ( startAt)) : null,
|
|
3606
|
+
timezone,
|
|
3607
|
+
dateOnly,
|
|
3608
|
+
utcDate: _nullishCoalesce(date, () => ( startAt))
|
|
3567
3609
|
};
|
|
3568
3610
|
}
|
|
3569
|
-
function
|
|
3570
|
-
return {
|
|
3571
|
-
id: episode.id,
|
|
3572
|
-
title: episode.title,
|
|
3573
|
-
description: _nullishCoalesce(episode.description, () => ( null)),
|
|
3574
|
-
// Use cover_image_override if set, otherwise use cover_url
|
|
3575
|
-
cover_url: _nullishCoalesce(_nullishCoalesce(episode.cover_image_override, () => ( episode.cover_url)), () => ( null)),
|
|
3576
|
-
date: _nullishCoalesce(episode.published_at, () => ( episode.created_at)),
|
|
3577
|
-
external_url: _nullishCoalesce(episode.external_url, () => ( null)),
|
|
3578
|
-
hosts: _nullishCoalesce(episode.hosts, () => ( null)),
|
|
3579
|
-
podbean_episode_id: episode.podbean_episode_id,
|
|
3580
|
-
podbean_podcast_id: episode.podbean_podcast_id,
|
|
3581
|
-
audio_url: _nullishCoalesce(episode.audio_url, () => ( null)),
|
|
3582
|
-
main_video_url: _nullishCoalesce(episode.main_video_url, () => ( null)),
|
|
3583
|
-
media_type: _nullishCoalesce(episode.media_type, () => ( "audio")),
|
|
3584
|
-
duration_seconds: _nullishCoalesce(episode.duration_seconds, () => ( null)),
|
|
3585
|
-
status: _nullishCoalesce(episode.status, () => ( "published")),
|
|
3586
|
-
published_at: _nullishCoalesce(episode.published_at, () => ( null)),
|
|
3587
|
-
is_deleted: _nullishCoalesce(episode.is_deleted, () => ( false)),
|
|
3588
|
-
// Override fields
|
|
3589
|
-
cover_image_override: _nullishCoalesce(episode.cover_image_override, () => ( null)),
|
|
3590
|
-
custom_video_url: _nullishCoalesce(episode.custom_video_url, () => ( null))
|
|
3591
|
-
};
|
|
3611
|
+
function webinarTiming(item) {
|
|
3612
|
+
return { startAt: programStr(item.start_at), endAt: programStr(item.end_at) };
|
|
3592
3613
|
}
|
|
3593
|
-
function
|
|
3614
|
+
function programMetaLine(item, kind, fmt) {
|
|
3615
|
+
const at = programDateInstant(item);
|
|
3616
|
+
const isScheduled = item.status === "scheduled";
|
|
3617
|
+
let typeMeta = null;
|
|
3618
|
+
if (kind === "podcast" && typeof item.duration_seconds === "number" && item.duration_seconds > 0 && !isScheduled) {
|
|
3619
|
+
typeMeta = fmt.duration(item.duration_seconds);
|
|
3620
|
+
} else if (kind === "event" && typeof item.location_name === "string" && item.location_name.trim().length > 0) {
|
|
3621
|
+
typeMeta = item.location_name;
|
|
3622
|
+
} else if (kind === "webinar" && programStr(item.start_at)) {
|
|
3623
|
+
typeMeta = fmt.webinarMeta(at, webinarTiming(item)) || null;
|
|
3624
|
+
}
|
|
3625
|
+
return { at, typeMeta, line: [fmt.date(at), typeMeta].filter(Boolean).join(" \xB7 ") };
|
|
3626
|
+
}
|
|
3627
|
+
function programMetaFormatters(fmt, opts = {}) {
|
|
3628
|
+
const withZoneLabel = opts.withZoneLabel !== false;
|
|
3594
3629
|
return {
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
date: _nullishCoalesce(webinar.display_date_override, () => ( webinar.start_at)),
|
|
3602
|
-
external_url: _nullishCoalesce(webinar.registration_url, () => ( null)),
|
|
3603
|
-
hosts: _nullishCoalesce(webinar.hosts, () => ( null)),
|
|
3604
|
-
livestorm_event_id: webinar.livestorm_event_id,
|
|
3605
|
-
start_at: webinar.start_at,
|
|
3606
|
-
end_at: _nullishCoalesce(webinar.end_at, () => ( null)),
|
|
3607
|
-
timezone: _nullishCoalesce(webinar.timezone, () => ( null)),
|
|
3608
|
-
registration_url: _nullishCoalesce(webinar.registration_url, () => ( null)),
|
|
3609
|
-
is_deleted: _nullishCoalesce(webinar.is_deleted, () => ( false)),
|
|
3610
|
-
main_video_url: _nullishCoalesce(webinar.main_video_url, () => ( null)),
|
|
3611
|
-
// Override fields
|
|
3612
|
-
custom_video_url: _nullishCoalesce(webinar.custom_video_url, () => ( null)),
|
|
3613
|
-
display_date_override: _nullishCoalesce(webinar.display_date_override, () => ( null)),
|
|
3614
|
-
cover_image_override: _nullishCoalesce(webinar.cover_image_override, () => ( null))
|
|
3630
|
+
// The meta line always renders the compact day; the one surface that wants
|
|
3631
|
+
// the weekday form renders it in its own slot, so a `dateStyle` option here
|
|
3632
|
+
// would exist for no caller.
|
|
3633
|
+
date: (at) => fmt.date(at, "medium"),
|
|
3634
|
+
duration: fmt.duration,
|
|
3635
|
+
webinarMeta: (at, o) => fmt.webinarMeta(at, { ...o, withZoneLabel })
|
|
3615
3636
|
};
|
|
3616
3637
|
}
|
|
3617
3638
|
|
|
3639
|
+
// src/utils/program-meta-renderers.ts
|
|
3640
|
+
var PROGRAM_META_RENDERERS = {
|
|
3641
|
+
date: formatProgramDate,
|
|
3642
|
+
duration: formatDurationCompact,
|
|
3643
|
+
webinarMeta: formatWebinarTimeMeta
|
|
3644
|
+
};
|
|
3645
|
+
|
|
3646
|
+
// src/components/chat/types/entities/program-types.ts
|
|
3647
|
+
function programItemToStripProfile(item) {
|
|
3648
|
+
const fromAuthor = toStripProfile(item.author);
|
|
3649
|
+
if (fromAuthor) return fromAuthor;
|
|
3650
|
+
const host = Array.isArray(item.hosts) ? item.hosts[0] : null;
|
|
3651
|
+
if (!_optionalChain([host, 'optionalAccess', _128 => _128.name])) return null;
|
|
3652
|
+
return toStripProfile({ full_name: host.name, avatar_url: _nullishCoalesce(host.avatar_url, () => ( null)) });
|
|
3653
|
+
}
|
|
3654
|
+
|
|
3618
3655
|
// src/components/chat/entity-cards/program-card.tsx
|
|
3619
|
-
var _datefns = require('date-fns');
|
|
3620
3656
|
|
|
3621
3657
|
|
|
3622
3658
|
|
|
3623
|
-
function formatUtc(date, fmt) {
|
|
3624
|
-
if (Number.isNaN(date.getTime())) return "";
|
|
3625
|
-
return _datefns.format.call(void 0, new Date(date.getTime() + date.getTimezoneOffset() * 6e4), fmt);
|
|
3626
|
-
}
|
|
3627
3659
|
function ProgramCardSkeleton({ size = "default" }) {
|
|
3628
3660
|
if (size === "sm") {
|
|
3629
3661
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: COMPACT_CARD_SKELETON_OUTER, children: [
|
|
@@ -3688,14 +3720,6 @@ function getHosts(hosts) {
|
|
|
3688
3720
|
}
|
|
3689
3721
|
return [];
|
|
3690
3722
|
}
|
|
3691
|
-
function webinarTiming(item) {
|
|
3692
|
-
const str = (value) => typeof value === "string" && value ? value : null;
|
|
3693
|
-
return {
|
|
3694
|
-
startAt: "start_at" in item ? str(item.start_at) : null,
|
|
3695
|
-
endAt: "end_at" in item ? str(item.end_at) : null,
|
|
3696
|
-
timezone: "timezone" in item ? str(item.timezone) : null
|
|
3697
|
-
};
|
|
3698
|
-
}
|
|
3699
3723
|
function MediaGallery({ images, title }) {
|
|
3700
3724
|
const [selectedImageIndex, setSelectedImageIndex] = _react.useState.call(void 0, null);
|
|
3701
3725
|
const [isModalOpen, setIsModalOpen] = _react.useState.call(void 0, false);
|
|
@@ -3774,25 +3798,17 @@ function ProgramCard({
|
|
|
3774
3798
|
const hosts = getHosts(item.hosts);
|
|
3775
3799
|
const accentColor = "var(--color-accent-primary)";
|
|
3776
3800
|
const isScheduled = "status" in item && item.status === "scheduled";
|
|
3777
|
-
const
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
const { startAt, endAt, timezone } = webinarTiming(item);
|
|
3786
|
-
const time = formatTimeWithTimezone(startAt, timezone);
|
|
3787
|
-
const dur = formatDurationFromRange(startAt, endAt);
|
|
3788
|
-
return dur ? `${time} \xB7 ${dur}` : time;
|
|
3789
|
-
}
|
|
3790
|
-
return null;
|
|
3791
|
-
};
|
|
3792
|
-
const compactDate = formatUtc(new Date(item.date), "MMM d, yyyy");
|
|
3801
|
+
const {
|
|
3802
|
+
at: zonedDate,
|
|
3803
|
+
typeMeta: compactTypeMetaValue,
|
|
3804
|
+
line: compactMetaLine
|
|
3805
|
+
// Compact densities join plain strings, so the zone rides inline here; the
|
|
3806
|
+
// default density below renders it as its own styled span instead.
|
|
3807
|
+
} = programMetaLine(item, config.type, programMetaFormatters(PROGRAM_META_RENDERERS));
|
|
3808
|
+
const compactDate = formatProgramDate(zonedDate, "medium");
|
|
3793
3809
|
if (size === "portrait") {
|
|
3794
3810
|
const profile = programItemToStripProfile(item);
|
|
3795
|
-
const dateMeta =
|
|
3811
|
+
const dateMeta = compactMetaLine;
|
|
3796
3812
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3797
3813
|
EntityPortraitCard,
|
|
3798
3814
|
{
|
|
@@ -3811,10 +3827,10 @@ function ProgramCard({
|
|
|
3811
3827
|
);
|
|
3812
3828
|
}
|
|
3813
3829
|
if (size === "sm") {
|
|
3814
|
-
const
|
|
3830
|
+
const itemDate = compactDate;
|
|
3815
3831
|
const compactCover = coverImage || placeholderUrl || null;
|
|
3816
|
-
const typeMeta =
|
|
3817
|
-
const subtitleParts = [
|
|
3832
|
+
const typeMeta = compactTypeMetaValue;
|
|
3833
|
+
const subtitleParts = [itemDate, typeMeta, _optionalChain([config, 'access', _129 => _129.labels, 'optionalAccess', _130 => _130.singular])].filter(
|
|
3818
3834
|
(s) => typeof s === "string" && s.length > 0
|
|
3819
3835
|
);
|
|
3820
3836
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "a", { href, target, rel, className: _chunk23V5BSHDcjs.cn.call(void 0, COMPACT_CARD_OUTER, className), children: [
|
|
@@ -3830,32 +3846,29 @@ function ProgramCard({
|
|
|
3830
3846
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex h-5 shrink-0 items-center self-start text-ods-text-secondary", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "h-3.5 w-3.5" }) })
|
|
3831
3847
|
] });
|
|
3832
3848
|
}
|
|
3833
|
-
const
|
|
3834
|
-
const
|
|
3849
|
+
const dateFormat = formatProgramDate(zonedDate, "weekday");
|
|
3850
|
+
const { typeMeta: defaultTypeMeta } = programMetaLine(
|
|
3851
|
+
item,
|
|
3852
|
+
config.type,
|
|
3853
|
+
programMetaFormatters(PROGRAM_META_RENDERERS, { withZoneLabel: false })
|
|
3854
|
+
);
|
|
3835
3855
|
const defaultRenderMeta = () => {
|
|
3836
|
-
if (config.type === "podcast"
|
|
3837
|
-
|
|
3838
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
3856
|
+
if (config.type === "podcast") {
|
|
3857
|
+
return defaultTypeMeta ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
3839
3858
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Clock, { className: "h-4 w-4 text-ods-text-secondary" }),
|
|
3840
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "font-body text-ods-text-secondary", children:
|
|
3841
|
-
] });
|
|
3859
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "font-body text-ods-text-secondary", children: defaultTypeMeta })
|
|
3860
|
+
] }) : null;
|
|
3842
3861
|
}
|
|
3843
|
-
if (config.type === "event"
|
|
3844
|
-
|
|
3845
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "font-body text-ods-text-secondary", children: typeof loc === "string" && loc || "Location TBD" });
|
|
3862
|
+
if (config.type === "event") {
|
|
3863
|
+
return defaultTypeMeta ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "font-body text-ods-text-secondary", children: defaultTypeMeta }) : null;
|
|
3846
3864
|
}
|
|
3847
|
-
if (config.type === "webinar" &&
|
|
3848
|
-
const { startAt, endAt, timezone } = webinarTiming(item);
|
|
3849
|
-
const duration = formatDurationFromRange(startAt, endAt);
|
|
3865
|
+
if (config.type === "webinar" && (defaultTypeMeta || zonedDate.timezone)) {
|
|
3850
3866
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
3851
3867
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Video, { className: "h-4 w-4 text-ods-text-secondary" }),
|
|
3852
|
-
/* @__PURE__ */ _jsxruntime.
|
|
3853
|
-
|
|
3854
|
-
duration && ` \xB7 ${duration}`
|
|
3855
|
-
] }),
|
|
3856
|
-
timezone && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "text-ods-text-secondary text-h6", children: [
|
|
3868
|
+
defaultTypeMeta && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "font-body text-ods-text-secondary", children: defaultTypeMeta }),
|
|
3869
|
+
zonedDate.timezone && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "text-ods-text-secondary text-h6", children: [
|
|
3857
3870
|
"(",
|
|
3858
|
-
timezone,
|
|
3871
|
+
zonedDate.timezone,
|
|
3859
3872
|
")"
|
|
3860
3873
|
] })
|
|
3861
3874
|
] });
|
|
@@ -4208,5 +4221,15 @@ function buildListUrl(contentRefType, ids, base = "") {
|
|
|
4208
4221
|
|
|
4209
4222
|
|
|
4210
4223
|
|
|
4211
|
-
|
|
4212
|
-
|
|
4224
|
+
|
|
4225
|
+
|
|
4226
|
+
|
|
4227
|
+
|
|
4228
|
+
|
|
4229
|
+
|
|
4230
|
+
|
|
4231
|
+
|
|
4232
|
+
|
|
4233
|
+
|
|
4234
|
+
exports.Card = Card; exports.CardHeader = CardHeader; exports.CardTitle = CardTitle; exports.CardDescription = CardDescription; exports.CardContent = CardContent; exports.CardFooter = CardFooter; exports.CardHorizontal = CardHorizontal; exports.formatDate = formatDate; exports.formatNumber = formatNumber; exports.formatPrice = formatPrice; exports.formatBytes = formatBytes; exports.formatBytesShort = formatBytesShort; exports.formatFileSize = formatFileSize; exports.formatLargeNumber = formatLargeNumber; exports.formatAbbreviatedNumber = formatAbbreviatedNumber; exports.nameInitials = nameInitials; exports.personInitials = personInitials; exports.personFirstName = personFirstName; exports.singleInitial = singleInitial; exports.formatDurationMMSS = formatDurationMMSS; exports.formatDurationCompact = formatDurationCompact; exports.formatTimeWithTimezone = formatTimeWithTimezone; exports.formatDateWithTimezone = formatDateWithTimezone; exports.formatProgramDate = formatProgramDate; exports.isOrderedRange = isOrderedRange; exports.formatDurationFromRange = formatDurationFromRange; exports.formatDateUTC = formatDateUTC; exports.formatEntryMonthUTC = formatEntryMonthUTC; exports.formatLegalDate = formatLegalDate; exports.formatCurrency = formatCurrency; exports.formatPercent = formatPercent; exports.formatWholeDollars = formatWholeDollars; exports.formatCompactMetric = formatCompactMetric; exports.getTrendColors = getTrendColors; exports.formatDateRange = formatDateRange; exports.formatDateTimeAt = formatDateTimeAt; exports.formatDurationFromMs = formatDurationFromMs; exports.formatDuration = formatDuration; exports.titleCaseFromSlug = titleCaseFromSlug; exports.formatUnderscoreText = formatUnderscoreText; exports.stripHtml = stripHtml; exports.formatClassification = formatClassification; exports.formatPricingModel = formatPricingModel; exports.formatBioText = formatBioText; exports.formatProgramTimeRange = formatProgramTimeRange; exports.formatWebinarTimeMeta = formatWebinarTimeMeta; exports.SquareAvatar = SquareAvatar; exports.InteractiveCard = InteractiveCard; exports.Modal = Modal; exports.ModalContent = ModalContent; exports.ModalHeader = ModalHeader; exports.ModalTitle = ModalTitle; exports.ModalFooter = ModalFooter; exports.ImageGalleryModal = ImageGalleryModal; exports.statusBadgeVariants = statusBadgeVariants; exports.genBadgeBgOpacity = genBadgeBgOpacity; exports.generationTierFromLabel = generationTierFromLabel; exports.StatusBadge = StatusBadge; exports.BADGE_PALETTE = BADGE_PALETTE; exports.isBadgePaletteKey = isBadgePaletteKey; exports.pickBadgePaletteColor = pickBadgePaletteColor; exports.PaletteBadge = PaletteBadge; exports.DepartmentBadge = DepartmentBadge; exports.getProxiedImageUrl = getProxiedImageUrl; exports.urlPathLooksLikeSvg = urlPathLooksLikeSvg; exports.shouldProxyImage = shouldProxyImage; exports.generateImageSizes = generateImageSizes; exports.isCrossOriginUrl = isCrossOriginUrl; exports.decideNewTab = decideNewTab; exports.isSameOriginAbsoluteHref = isSameOriginAbsoluteHref; exports.computeIsNewTab = computeIsNewTab; exports.newTabAnchorAttrs = newTabAnchorAttrs; exports.buildAnchorProps = buildAnchorProps; exports.EMPTY_AUTHOR_PLACEHOLDER = EMPTY_AUTHOR_PLACEHOLDER; exports.EntityMetadataValueCell = EntityMetadataValueCell; exports.EntityMetadataAuthorCell = EntityMetadataAuthorCell; exports.EntityAuthorCard = EntityAuthorCard; exports.BlogImagePlaceholder = BlogImagePlaceholder; exports.useCoverImageFallback = useCoverImageFallback; exports.hideOnError = hideOnError; exports.EntityPortraitCard = EntityPortraitCard; exports.FlamingoLogo = FlamingoLogo; exports.PlatformBadge = PlatformBadge; exports.AdminContentCard = AdminContentCard; exports.getProxiedImageUrl2 = getProxiedImageUrl2; exports.EmployeeEntryBadge = EmployeeEntryBadge; exports.EmployeeEntryCard = EmployeeEntryCard; exports.EmployeeEntryCardSkeleton = EmployeeEntryCardSkeleton; exports.WhatIShippedCard = WhatIShippedCard; exports.WhatIShippedCardSkeleton = WhatIShippedCardSkeleton; exports.HowIWorkCard = HowIWorkCard; exports.HowIWorkCardSkeleton = HowIWorkCardSkeleton; exports.AiPromptCard = AiPromptCard; exports.AiPromptCardSkeleton = AiPromptCardSkeleton; exports.DEFAULT_VIDEO_BITES_TITLE = DEFAULT_VIDEO_BITES_TITLE; exports.toStripProfile = toStripProfile; exports.sortBitesByCreatedAtDesc = sortBitesByCreatedAtDesc; exports.sortBitesByFeaturedAtDesc = sortBitesByFeaturedAtDesc; exports.ProductReleaseCard = ProductReleaseCard; exports.ProductReleaseCardSkeleton = ProductReleaseCardSkeleton; exports.formatReleaseDate = formatReleaseDate; exports.formatDateShort = formatDateShort; exports.formatDateSlashUTC = formatDateSlashUTC; exports.releaseTypeToBadgeColor = releaseTypeToBadgeColor; exports.resolveReleaseCover = resolveReleaseCover; exports.defaultBuildProductReleaseCardProps = defaultBuildProductReleaseCardProps; exports.buildProductReleaseCardProps = buildProductReleaseCardProps; exports.UNSAFE_URL_CHARS = UNSAFE_URL_CHARS; exports.isSameOriginPath = isSameOriginPath; exports.COMPACT_CARD_OUTER = COMPACT_CARD_OUTER; exports.COMPACT_CARD_OUTER_STATIC = COMPACT_CARD_OUTER_STATIC; exports.COMPACT_CARD_SKELETON_OUTER = COMPACT_CARD_SKELETON_OUTER; exports.COMPACT_CARD_IMAGE_SLOT = COMPACT_CARD_IMAGE_SLOT; exports.COMPACT_CARD_SKELETON_IMAGE_SLOT = COMPACT_CARD_SKELETON_IMAGE_SLOT; exports.COMPACT_CARD_ICON_SLOT = COMPACT_CARD_ICON_SLOT; exports.COMPACT_CARD_TEXT_COL = COMPACT_CARD_TEXT_COL; exports.COMPACT_CARD_TITLE_ROW = COMPACT_CARD_TITLE_ROW; exports.COMPACT_CARD_META_ROW_BOX = COMPACT_CARD_META_ROW_BOX; exports.COMPACT_CARD_TITLE = COMPACT_CARD_TITLE; exports.COMPACT_CARD_SUBTITLE = COMPACT_CARD_SUBTITLE; exports.COMPACT_CARD_SUMMARY = COMPACT_CARD_SUMMARY; exports.COMPACT_CARD_META_ROW = COMPACT_CARD_META_ROW; exports.COMPACT_CARD_ROW_FILLER = COMPACT_CARD_ROW_FILLER; exports.safeHref = safeHref; exports.useEntityCardLink = useEntityCardLink; exports.BlogCardSkeleton = BlogCardSkeleton; exports.BlogCard = BlogCard; exports.CaseStudyCardSkeleton = CaseStudyCardSkeleton; exports.CaseStudyCard = CaseStudyCard; exports.CustomerInterviewCardSkeleton = CustomerInterviewCardSkeleton; exports.CustomerInterviewCard = CustomerInterviewCard; exports.formatInvestorUpdatePeriod = formatInvestorUpdatePeriod; exports.InvestorUpdateCardSkeleton = InvestorUpdateCardSkeleton; exports.InvestorUpdateCard = InvestorUpdateCard; exports.OnboardingGuideCardSkeleton = OnboardingGuideCardSkeleton; exports.OnboardingGuideCard = OnboardingGuideCard; exports.AvatarStack = AvatarStack; exports.getStatusColorScheme = getStatusColorScheme; exports.CUSTOM_ITEM_ID = CUSTOM_ITEM_ID; exports.getTaskTypeLabel = getTaskTypeLabel; exports.RoadmapVoteButton = RoadmapVoteButton; exports.TaskTypeIcon = TaskTypeIcon; exports.RoadmapCardSkeleton = RoadmapCardSkeleton; exports.RoadmapCard = RoadmapCard; exports.MEDIA_TYPE = MEDIA_TYPE; exports.isVideoMedia = isVideoMedia; exports.isImageMedia = isImageMedia; exports.isPublishableMediaType = isPublishableMediaType; exports.partitionMediaByType = partitionMediaByType; exports.programStr = programStr; exports.programDateInstant = programDateInstant; exports.webinarTiming = webinarTiming; exports.programMetaLine = programMetaLine; exports.programMetaFormatters = programMetaFormatters; exports.PROGRAM_META_RENDERERS = PROGRAM_META_RENDERERS; exports.programItemToStripProfile = programItemToStripProfile; exports.ProgramCardSkeleton = ProgramCardSkeleton; exports.ProgramCard = ProgramCard; exports.extractItems = extractItems; exports.extractItemId = extractItemId; exports.canonicalContentRefType = canonicalContentRefType; exports.buildListUrl = buildListUrl;
|
|
4235
|
+
//# sourceMappingURL=chunk-3HSRNCDV.cjs.map
|