@flamingo-stack/openframe-frontend-core 0.0.391 → 0.0.392

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.
Files changed (88) hide show
  1. package/dist/{chunk-V7WGZ7OA.cjs → chunk-4G2S3PWB.cjs} +5 -5
  2. package/dist/{chunk-V7WGZ7OA.cjs.map → chunk-4G2S3PWB.cjs.map} +1 -1
  3. package/dist/{chunk-GJ6TQJSO.js → chunk-4OLF4E3M.js} +2 -2
  4. package/dist/{chunk-2TFCOMFQ.js → chunk-5C3JVWS6.js} +2 -2
  5. package/dist/{chunk-UHCO2INP.js → chunk-APOFENYR.js} +2 -2
  6. package/dist/{chunk-SZ2A35GQ.cjs → chunk-DVM5HS6H.cjs} +7 -7
  7. package/dist/{chunk-SZ2A35GQ.cjs.map → chunk-DVM5HS6H.cjs.map} +1 -1
  8. package/dist/{chunk-MQTSJILV.js → chunk-FMCL72KB.js} +4 -4
  9. package/dist/{chunk-QEYIABOI.cjs → chunk-G7TYNT4T.cjs} +12 -12
  10. package/dist/{chunk-QEYIABOI.cjs.map → chunk-G7TYNT4T.cjs.map} +1 -1
  11. package/dist/{chunk-OTCBUP5O.js → chunk-LQHXLC7F.js} +4 -4
  12. package/dist/{chunk-ZONZ2HLZ.cjs → chunk-MNIXKGAB.cjs} +62 -62
  13. package/dist/{chunk-ZONZ2HLZ.cjs.map → chunk-MNIXKGAB.cjs.map} +1 -1
  14. package/dist/{chunk-QDLI65SB.js → chunk-N6KORCQJ.js} +211 -195
  15. package/dist/chunk-N6KORCQJ.js.map +1 -0
  16. package/dist/{chunk-IWWYZDOO.cjs → chunk-OCNXLJS2.cjs} +26 -26
  17. package/dist/{chunk-IWWYZDOO.cjs.map → chunk-OCNXLJS2.cjs.map} +1 -1
  18. package/dist/{chunk-7GG5RDQB.cjs → chunk-ONNCKONQ.cjs} +37 -37
  19. package/dist/{chunk-7GG5RDQB.cjs.map → chunk-ONNCKONQ.cjs.map} +1 -1
  20. package/dist/{chunk-V5ABSONJ.js → chunk-P5UU5S72.js} +2 -2
  21. package/dist/{chunk-GX67RMZM.js → chunk-S6JTTDWK.js} +4 -4
  22. package/dist/{chunk-3YV3FI5E.cjs → chunk-T5KEAEOT.cjs} +15 -15
  23. package/dist/{chunk-3YV3FI5E.cjs.map → chunk-T5KEAEOT.cjs.map} +1 -1
  24. package/dist/{chunk-XUPZ3KY5.js → chunk-TY6EPTFG.js} +4 -4
  25. package/dist/{chunk-V4KVHAAF.cjs → chunk-VQB5AWOI.cjs} +203 -187
  26. package/dist/chunk-VQB5AWOI.cjs.map +1 -0
  27. package/dist/{chunk-AFYFMJPJ.cjs → chunk-VV45SH3F.cjs} +31 -31
  28. package/dist/{chunk-AFYFMJPJ.cjs.map → chunk-VV45SH3F.cjs.map} +1 -1
  29. package/dist/{chunk-RYEF2GHD.cjs → chunk-VV6VLH54.cjs} +59 -59
  30. package/dist/{chunk-RYEF2GHD.cjs.map → chunk-VV6VLH54.cjs.map} +1 -1
  31. package/dist/{chunk-IEIDLOYZ.js → chunk-WEZEOIWI.js} +2 -2
  32. package/dist/{chunk-5HCC7RSF.cjs → chunk-WJIKMPKF.cjs} +9 -9
  33. package/dist/{chunk-5HCC7RSF.cjs.map → chunk-WJIKMPKF.cjs.map} +1 -1
  34. package/dist/{chunk-AC4E7PQD.cjs → chunk-X7ECA7BO.cjs} +26 -26
  35. package/dist/{chunk-AC4E7PQD.cjs.map → chunk-X7ECA7BO.cjs.map} +1 -1
  36. package/dist/{chunk-EXJXZAAJ.js → chunk-YCSATEAQ.js} +2 -2
  37. package/dist/{chunk-XDKKZB6T.js → chunk-ZJMOMD4Y.js} +2 -2
  38. package/dist/components/case-studies/index.cjs +8 -8
  39. package/dist/components/case-studies/index.js +2 -2
  40. package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
  41. package/dist/components/chat/index.cjs +2 -2
  42. package/dist/components/chat/index.js +1 -1
  43. package/dist/components/contact/index.cjs +3 -3
  44. package/dist/components/contact/index.js +2 -2
  45. package/dist/components/docs/index.cjs +5 -5
  46. package/dist/components/docs/index.js +4 -4
  47. package/dist/components/embeds/index.cjs +3 -3
  48. package/dist/components/embeds/index.js +2 -2
  49. package/dist/components/faq/index.cjs +3 -3
  50. package/dist/components/faq/index.js +2 -2
  51. package/dist/components/features/index.cjs +2 -2
  52. package/dist/components/features/index.js +1 -1
  53. package/dist/components/help-center-pages/index.cjs +20 -20
  54. package/dist/components/help-center-pages/index.js +11 -11
  55. package/dist/components/index.cjs +120 -120
  56. package/dist/components/index.js +9 -9
  57. package/dist/components/navigation/index.cjs +2 -2
  58. package/dist/components/navigation/index.js +1 -1
  59. package/dist/components/onboarding-guides/index.cjs +5 -5
  60. package/dist/components/onboarding-guides/index.js +4 -4
  61. package/dist/components/related-content/index.cjs +3 -3
  62. package/dist/components/related-content/index.js +2 -2
  63. package/dist/components/tickets/index.cjs +5 -5
  64. package/dist/components/tickets/index.js +4 -4
  65. package/dist/components/ui/index.cjs +2 -2
  66. package/dist/components/ui/index.js +1 -1
  67. package/dist/index.cjs +2 -2
  68. package/dist/index.js +1 -1
  69. package/dist/utils/format-date.d.ts +5 -0
  70. package/dist/utils/format-date.d.ts.map +1 -0
  71. package/package.json +1 -1
  72. package/src/components/chat/chat-message-enhanced.tsx +11 -1
  73. package/src/styles/app-globals.css +30 -17
  74. package/src/utils/.format-date.md +29 -0
  75. package/src/utils/format-date.ts +24 -0
  76. package/dist/chunk-QDLI65SB.js.map +0 -1
  77. package/dist/chunk-V4KVHAAF.cjs.map +0 -1
  78. /package/dist/{chunk-GJ6TQJSO.js.map → chunk-4OLF4E3M.js.map} +0 -0
  79. /package/dist/{chunk-2TFCOMFQ.js.map → chunk-5C3JVWS6.js.map} +0 -0
  80. /package/dist/{chunk-UHCO2INP.js.map → chunk-APOFENYR.js.map} +0 -0
  81. /package/dist/{chunk-MQTSJILV.js.map → chunk-FMCL72KB.js.map} +0 -0
  82. /package/dist/{chunk-OTCBUP5O.js.map → chunk-LQHXLC7F.js.map} +0 -0
  83. /package/dist/{chunk-V5ABSONJ.js.map → chunk-P5UU5S72.js.map} +0 -0
  84. /package/dist/{chunk-GX67RMZM.js.map → chunk-S6JTTDWK.js.map} +0 -0
  85. /package/dist/{chunk-XUPZ3KY5.js.map → chunk-TY6EPTFG.js.map} +0 -0
  86. /package/dist/{chunk-IEIDLOYZ.js.map → chunk-WEZEOIWI.js.map} +0 -0
  87. /package/dist/{chunk-EXJXZAAJ.js.map → chunk-YCSATEAQ.js.map} +0 -0
  88. /package/dist/{chunk-XDKKZB6T.js.map → chunk-ZJMOMD4Y.js.map} +0 -0
@@ -2119,16 +2119,16 @@ function formatWholeDollars(price, currency = "USD") {
2119
2119
  maximumFractionDigits: 0
2120
2120
  }).format(price);
2121
2121
  }
2122
- function formatCompactMetric(value, format2 = "number", options) {
2122
+ function formatCompactMetric(value, format3 = "number", options) {
2123
2123
  if (value === 0 || value === null || value === void 0) {
2124
- if (format2 === "currency") return `${options?.prefix || "$"}0`;
2125
- if (format2 === "percentage") return "0%";
2126
- if (format2 === "months") return `0 ${options?.suffix || "months"}`;
2124
+ if (format3 === "currency") return `${options?.prefix || "$"}0`;
2125
+ if (format3 === "percentage") return "0%";
2126
+ if (format3 === "months") return `0 ${options?.suffix || "months"}`;
2127
2127
  return "0";
2128
2128
  }
2129
2129
  const absValue = Math.abs(value);
2130
2130
  const sign = value < 0 ? "-" : "";
2131
- if (format2 === "currency") {
2131
+ if (format3 === "currency") {
2132
2132
  const prefix = options?.prefix || "$";
2133
2133
  const compact = (val, divisor, suffix) => {
2134
2134
  const divided = val / divisor;
@@ -2140,10 +2140,10 @@ function formatCompactMetric(value, format2 = "number", options) {
2140
2140
  if (absValue >= 1e3) return `${sign}${prefix}${(absValue / 1e3).toFixed(0)}K`;
2141
2141
  return `${sign}${prefix}${absValue.toLocaleString()}`;
2142
2142
  }
2143
- if (format2 === "percentage") {
2143
+ if (format3 === "percentage") {
2144
2144
  return `${sign}${absValue}%`;
2145
2145
  }
2146
- if (format2 === "months") {
2146
+ if (format3 === "months") {
2147
2147
  const rounded = Math.round(value * 10) / 10;
2148
2148
  return `${rounded} ${options?.suffix || "months"}`;
2149
2149
  }
@@ -4494,6 +4494,147 @@ ChatInput.displayName = "ChatInput";
4494
4494
  init_cn();
4495
4495
  import React9, { forwardRef as forwardRef11, memo as memo3, useMemo as useMemo6, useRef as useRef6 } from "react";
4496
4496
 
4497
+ // src/utils/date-utils.ts
4498
+ function formatTicketRelativeTime(iso) {
4499
+ const now = /* @__PURE__ */ new Date();
4500
+ const date = new Date(iso);
4501
+ if (Number.isNaN(date.getTime())) return "";
4502
+ const diffMs = now.getTime() - date.getTime();
4503
+ const diffMin = Math.floor(diffMs / 6e4);
4504
+ if (diffMin < 1) return "Just now";
4505
+ if (diffMin < 60) return `${diffMin} min ago`;
4506
+ const diffHours = Math.floor(diffMin / 60);
4507
+ if (diffHours < 24) return diffHours === 1 ? "1 hour ago" : `${diffHours} hours ago`;
4508
+ const mm = String(date.getUTCMonth() + 1).padStart(2, "0");
4509
+ const dd = String(date.getUTCDate()).padStart(2, "0");
4510
+ const yyyy = date.getUTCFullYear();
4511
+ return `${mm}/${dd}/${yyyy}`;
4512
+ }
4513
+ function formatTicketFullTimestamp(iso) {
4514
+ const date = new Date(iso);
4515
+ if (Number.isNaN(date.getTime())) return "";
4516
+ const mm = String(date.getUTCMonth() + 1).padStart(2, "0");
4517
+ const dd = String(date.getUTCDate()).padStart(2, "0");
4518
+ const yyyy = date.getUTCFullYear();
4519
+ let hours = date.getUTCHours();
4520
+ const minutes = String(date.getUTCMinutes()).padStart(2, "0");
4521
+ const ampm = hours >= 12 ? "PM" : "AM";
4522
+ hours = hours % 12 || 12;
4523
+ return `${mm}/${dd}/${yyyy}, ${hours}:${minutes} ${ampm}`;
4524
+ }
4525
+ function formatRelativeTime(timestamp) {
4526
+ const now = /* @__PURE__ */ new Date();
4527
+ const targetTime = typeof timestamp === "string" ? new Date(timestamp) : timestamp;
4528
+ if (isNaN(targetTime.getTime())) {
4529
+ console.warn("\u26A0\uFE0F Invalid timestamp in formatRelativeTime:", timestamp);
4530
+ return "Unknown time";
4531
+ }
4532
+ const diffInMs = now.getTime() - targetTime.getTime();
4533
+ const diffInMinutes = Math.floor(diffInMs / (1e3 * 60));
4534
+ if (diffInMinutes < 0) {
4535
+ return "Just now";
4536
+ }
4537
+ if (diffInMinutes < 1) return "Just now";
4538
+ if (diffInMinutes < 60) return `${diffInMinutes}m ago`;
4539
+ const diffInHours = Math.floor(diffInMinutes / 60);
4540
+ if (diffInHours < 24) return `${diffInHours}h ago`;
4541
+ const diffInDays = Math.floor(diffInHours / 24);
4542
+ if (diffInDays < 7) return `${diffInDays}d ago`;
4543
+ if (diffInDays < 30) {
4544
+ const weeks = Math.floor(diffInDays / 7);
4545
+ return `${weeks}w ago`;
4546
+ }
4547
+ return targetTime.toLocaleDateString("en-US", {
4548
+ month: "short",
4549
+ day: "numeric",
4550
+ year: targetTime.getUTCFullYear() !== now.getUTCFullYear() ? "numeric" : void 0,
4551
+ timeZone: "UTC"
4552
+ });
4553
+ }
4554
+ function formatAbsoluteDate(timestamp, options = {}) {
4555
+ const targetTime = typeof timestamp === "string" ? new Date(timestamp) : timestamp;
4556
+ if (isNaN(targetTime.getTime())) {
4557
+ console.warn("\u26A0\uFE0F Invalid timestamp in formatAbsoluteDate:", timestamp);
4558
+ return "Invalid date";
4559
+ }
4560
+ const defaultOptions2 = {
4561
+ year: "numeric",
4562
+ month: "short",
4563
+ day: "numeric",
4564
+ // Pin to UTC so SSR (Vercel = UTC) and the client agree (React #418).
4565
+ // Caller can override via `options`.
4566
+ timeZone: "UTC",
4567
+ ...options
4568
+ };
4569
+ return targetTime.toLocaleDateString("en-US", defaultOptions2);
4570
+ }
4571
+ function formatDateTime(timestamp, options = {}) {
4572
+ const targetTime = typeof timestamp === "string" ? new Date(timestamp) : timestamp;
4573
+ if (isNaN(targetTime.getTime())) {
4574
+ console.warn("\u26A0\uFE0F Invalid timestamp in formatDateTime:", timestamp);
4575
+ return "Invalid date";
4576
+ }
4577
+ const defaultOptions2 = {
4578
+ year: "numeric",
4579
+ month: "short",
4580
+ day: "numeric",
4581
+ hour: "numeric",
4582
+ minute: "2-digit",
4583
+ // Pin to UTC so SSR (Vercel = UTC) and the client agree (React #418).
4584
+ // Caller can override via `options`.
4585
+ timeZone: "UTC",
4586
+ ...options
4587
+ };
4588
+ return targetTime.toLocaleDateString("en-US", defaultOptions2);
4589
+ }
4590
+ function getDetailedTimeDifference(timestamp) {
4591
+ const now = /* @__PURE__ */ new Date();
4592
+ const targetTime = typeof timestamp === "string" ? new Date(timestamp) : timestamp;
4593
+ if (isNaN(targetTime.getTime())) {
4594
+ return "Invalid date";
4595
+ }
4596
+ const diffInMs = now.getTime() - targetTime.getTime();
4597
+ const diffInSeconds = Math.floor(diffInMs / 1e3);
4598
+ const diffInMinutes = Math.floor(diffInSeconds / 60);
4599
+ const diffInHours = Math.floor(diffInMinutes / 60);
4600
+ const diffInDays = Math.floor(diffInHours / 24);
4601
+ if (diffInSeconds < 60) return `${diffInSeconds} seconds ago`;
4602
+ if (diffInMinutes < 60) return `${diffInMinutes} minutes ago`;
4603
+ if (diffInHours < 24) return `${diffInHours} hours ago`;
4604
+ if (diffInDays < 30) return `${diffInDays} days ago`;
4605
+ const diffInMonths = Math.floor(diffInDays / 30);
4606
+ if (diffInMonths < 12) return `${diffInMonths} months ago`;
4607
+ const diffInYears = Math.floor(diffInDays / 365);
4608
+ return `${diffInYears} years ago`;
4609
+ }
4610
+ function isToday(timestamp) {
4611
+ const today = /* @__PURE__ */ new Date();
4612
+ const targetTime = typeof timestamp === "string" ? new Date(timestamp) : timestamp;
4613
+ return today.toDateString() === targetTime.toDateString();
4614
+ }
4615
+ function isWithinMinutes(timestamp, minutes) {
4616
+ const now = /* @__PURE__ */ new Date();
4617
+ const targetTime = typeof timestamp === "string" ? new Date(timestamp) : timestamp;
4618
+ const diffInMs = now.getTime() - targetTime.getTime();
4619
+ const diffInMinutes = diffInMs / (1e3 * 60);
4620
+ return diffInMinutes <= minutes && diffInMinutes >= 0;
4621
+ }
4622
+ function createUTCTimestamp() {
4623
+ return (/* @__PURE__ */ new Date()).toISOString();
4624
+ }
4625
+
4626
+ // src/utils/format-date.ts
4627
+ var toDate = (input) => input instanceof Date ? input : new Date(input);
4628
+ var INVALID_DATE_PLACEHOLDER = "\u2014";
4629
+ var dateFmt = new Intl.DateTimeFormat(void 0, { dateStyle: "short" });
4630
+ var timeFmt = new Intl.DateTimeFormat(void 0, { timeStyle: "short" });
4631
+ var format = (input, fmt) => {
4632
+ const date = toDate(input);
4633
+ return Number.isNaN(date.getTime()) ? INVALID_DATE_PLACEHOLDER : fmt.format(date);
4634
+ };
4635
+ var formatDate2 = (input) => format(input, dateFmt);
4636
+ var formatTime = (input) => format(input, timeFmt);
4637
+
4497
4638
  // src/components/chat/tool-execution-display.tsx
4498
4639
  init_cn();
4499
4640
  import { forwardRef as forwardRef10, useMemo as useMemo4, useState as useState9 } from "react";
@@ -5103,6 +5244,10 @@ function ChatContextChipStrip({
5103
5244
  import { Fragment as Fragment7, jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
5104
5245
  var MENTION_MARKER_REGEX = /(^|[^\w@])@[a-z]+:([A-Za-z0-9_.+/=-]*[A-Za-z0-9_+/=])/g;
5105
5246
  var CARD_MARKER_REGEX = /\[card:\/\/([a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+)[\])]/g;
5247
+ function formatMessageTimestamp(timestamp) {
5248
+ const time = formatTime(timestamp);
5249
+ return isToday(timestamp) ? time : `${formatDate2(timestamp)} ${time}`;
5250
+ }
5106
5251
  function normalizeContent(content) {
5107
5252
  if (typeof content === "string") {
5108
5253
  return content ? [{ type: "text", text: content }] : [];
@@ -5302,7 +5447,7 @@ var ChatMessageEnhanced = forwardRef11(
5302
5447
  name || (isUser ? "User" : assistantType === "mingo" ? "Mingo" : "Fae"),
5303
5448
  !isSystem && ":"
5304
5449
  ] }),
5305
- timestamp && /* @__PURE__ */ jsx26("span", { className: "font-sans text-heading-5 font-medium text-ods-text-secondary shrink-0 whitespace-nowrap", children: timestamp.toLocaleTimeString([], { hour: "numeric", minute: "2-digit" }) })
5450
+ timestamp && /* @__PURE__ */ jsx26("span", { className: "font-sans text-heading-5 font-medium text-ods-text-secondary shrink-0 whitespace-nowrap", children: formatMessageTimestamp(timestamp) })
5306
5451
  ] }),
5307
5452
  (!isSystem || segments.length > 0) && /* @__PURE__ */ jsx26("div", { className: "flex flex-col gap-2", children: segments.map((segment, index) => {
5308
5453
  if (segment.type === "text") {
@@ -13374,7 +13519,7 @@ function DatePickerCalendar({
13374
13519
  onSelect,
13375
13520
  numberOfMonths = 1,
13376
13521
  fromDate,
13377
- toDate: toDate2,
13522
+ toDate: toDate3,
13378
13523
  locale,
13379
13524
  fluid = false
13380
13525
  }) {
@@ -13546,7 +13691,7 @@ function DatePickerCalendar({
13546
13691
  showOutsideDays: true,
13547
13692
  fixedWeeks: true,
13548
13693
  fromDate,
13549
- toDate: toDate2,
13694
+ toDate: toDate3,
13550
13695
  locale,
13551
13696
  hideNavigation: true
13552
13697
  }
@@ -13597,7 +13742,7 @@ function DatePickerCalendar({
13597
13742
  showOutsideDays: true,
13598
13743
  fixedWeeks: true,
13599
13744
  fromDate,
13600
- toDate: toDate2,
13745
+ toDate: toDate3,
13601
13746
  locale,
13602
13747
  hideNavigation: true
13603
13748
  }
@@ -13630,7 +13775,7 @@ function DatePickerCalendar({
13630
13775
  showOutsideDays: true,
13631
13776
  fixedWeeks: true,
13632
13777
  fromDate,
13633
- toDate: toDate2,
13778
+ toDate: toDate3,
13634
13779
  locale,
13635
13780
  hideNavigation: true
13636
13781
  }
@@ -13671,12 +13816,12 @@ var timeSelectTriggerStyles = cn(
13671
13816
  function DatePicker(props) {
13672
13817
  const {
13673
13818
  placeholder = "Select date",
13674
- formatDate: formatDate2 = defaultFormatDate,
13819
+ formatDate: formatDate3 = defaultFormatDate,
13675
13820
  disabled = false,
13676
13821
  className,
13677
13822
  numberOfMonths = 1,
13678
13823
  fromDate,
13679
- toDate: toDate2,
13824
+ toDate: toDate3,
13680
13825
  locale,
13681
13826
  label,
13682
13827
  error,
@@ -13686,10 +13831,10 @@ function DatePicker(props) {
13686
13831
  const isInvalid = invalid || !!error;
13687
13832
  const displayValue = React41.useMemo(() => {
13688
13833
  if (props.mode === "single") {
13689
- return props.value ? formatDate2(props.value) : "";
13834
+ return props.value ? formatDate3(props.value) : "";
13690
13835
  }
13691
- return formatDateRange2(props.value, formatDate2);
13692
- }, [props.mode, props.value, formatDate2]);
13836
+ return formatDateRange2(props.value, formatDate3);
13837
+ }, [props.mode, props.value, formatDate3]);
13693
13838
  const handleSelect = (value) => {
13694
13839
  if (props.mode === "single") {
13695
13840
  props.onChange?.(value);
@@ -13746,7 +13891,7 @@ function DatePicker(props) {
13746
13891
  onSelect: handleSelect,
13747
13892
  numberOfMonths,
13748
13893
  fromDate,
13749
- toDate: toDate2,
13894
+ toDate: toDate3,
13750
13895
  locale
13751
13896
  }
13752
13897
  )
@@ -13766,12 +13911,12 @@ var generateMinuteOptions = () => {
13766
13911
  };
13767
13912
  function DatePickerInput({
13768
13913
  placeholder = "Select date",
13769
- formatDate: formatDate2 = defaultFormatDate,
13914
+ formatDate: formatDate3 = defaultFormatDate,
13770
13915
  disabled = false,
13771
13916
  className,
13772
13917
  numberOfMonths = 1,
13773
13918
  fromDate,
13774
- toDate: toDate2,
13919
+ toDate: toDate3,
13775
13920
  locale,
13776
13921
  value,
13777
13922
  onChange,
@@ -13783,7 +13928,7 @@ function DatePickerInput({
13783
13928
  }) {
13784
13929
  const [open, setOpen] = React41.useState(false);
13785
13930
  const isInvalid = invalid || !!error;
13786
- const displayValue = value ? formatDate2(value) : "";
13931
+ const displayValue = value ? formatDate3(value) : "";
13787
13932
  const hour = React41.useMemo(() => {
13788
13933
  if (!value) return "";
13789
13934
  const hours = value.getHours();
@@ -13886,7 +14031,7 @@ function DatePickerInput({
13886
14031
  onSelect: handleSelect,
13887
14032
  numberOfMonths,
13888
14033
  fromDate,
13889
- toDate: toDate2,
14034
+ toDate: toDate3,
13890
14035
  locale
13891
14036
  }
13892
14037
  )
@@ -13959,12 +14104,12 @@ var generateTimeOptions = (intervalMinutes, use24Hour) => {
13959
14104
  };
13960
14105
  function DatePickerInputSimple({
13961
14106
  placeholder = "Select date",
13962
- formatDate: formatDate2 = defaultFormatDate,
14107
+ formatDate: formatDate3 = defaultFormatDate,
13963
14108
  disabled = false,
13964
14109
  className,
13965
14110
  numberOfMonths = 1,
13966
14111
  fromDate,
13967
- toDate: toDate2,
14112
+ toDate: toDate3,
13968
14113
  locale,
13969
14114
  value,
13970
14115
  onChange,
@@ -13977,7 +14122,7 @@ function DatePickerInputSimple({
13977
14122
  }) {
13978
14123
  const [open, setOpen] = React41.useState(false);
13979
14124
  const isInvalid = invalid || !!error;
13980
- const displayValue = value ? formatDate2(value) : "";
14125
+ const displayValue = value ? formatDate3(value) : "";
13981
14126
  const timeValue = React41.useMemo(() => {
13982
14127
  if (!value) return "";
13983
14128
  const hours = value.getHours();
@@ -14058,7 +14203,7 @@ function DatePickerInputSimple({
14058
14203
  onSelect: handleSelect,
14059
14204
  numberOfMonths,
14060
14205
  fromDate,
14061
- toDate: toDate2,
14206
+ toDate: toDate3,
14062
14207
  locale
14063
14208
  }
14064
14209
  )
@@ -14089,7 +14234,7 @@ function DateFilterMenu({
14089
14234
  onClose,
14090
14235
  disabled = false,
14091
14236
  fromDate,
14092
- toDate: toDate2,
14237
+ toDate: toDate3,
14093
14238
  locale,
14094
14239
  align = "start",
14095
14240
  ascLabel = "Sort by Ascending",
@@ -14173,7 +14318,7 @@ function DateFilterMenu({
14173
14318
  onSelect: setDraftSelected,
14174
14319
  numberOfMonths: 1,
14175
14320
  fromDate,
14176
- toDate: toDate2,
14321
+ toDate: toDate3,
14177
14322
  locale,
14178
14323
  fluid: true
14179
14324
  }
@@ -18652,7 +18797,7 @@ function TwitterEmbedClient({ url, tweetId, maxWidth = 700 }) {
18652
18797
  url: link.href,
18653
18798
  text: link.textContent || link.href
18654
18799
  })).filter((link) => !link.url.includes("twitter.com") && !link.url.includes("x.com"));
18655
- const formatTime = () => {
18800
+ const formatTime2 = () => {
18656
18801
  return "on X";
18657
18802
  };
18658
18803
  const truncateText = (text, maxLength = 600) => {
@@ -18686,7 +18831,7 @@ function TwitterEmbedClient({ url, tweetId, maxWidth = 700 }) {
18686
18831
  /* @__PURE__ */ jsx134(UserIcon4, {}),
18687
18832
  /* @__PURE__ */ jsx134("span", { children: tweetData.author_name }),
18688
18833
  /* @__PURE__ */ jsx134(ClockIcon2, {}),
18689
- /* @__PURE__ */ jsx134("span", { children: formatTime() })
18834
+ /* @__PURE__ */ jsx134("span", { children: formatTime2() })
18690
18835
  ] })
18691
18836
  ] })
18692
18837
  ] }) }) }),
@@ -22413,135 +22558,6 @@ async function extractImageEdgeColorAsync(imageUrl) {
22413
22558
  });
22414
22559
  }
22415
22560
 
22416
- // src/utils/date-utils.ts
22417
- function formatTicketRelativeTime(iso) {
22418
- const now = /* @__PURE__ */ new Date();
22419
- const date = new Date(iso);
22420
- if (Number.isNaN(date.getTime())) return "";
22421
- const diffMs = now.getTime() - date.getTime();
22422
- const diffMin = Math.floor(diffMs / 6e4);
22423
- if (diffMin < 1) return "Just now";
22424
- if (diffMin < 60) return `${diffMin} min ago`;
22425
- const diffHours = Math.floor(diffMin / 60);
22426
- if (diffHours < 24) return diffHours === 1 ? "1 hour ago" : `${diffHours} hours ago`;
22427
- const mm = String(date.getUTCMonth() + 1).padStart(2, "0");
22428
- const dd = String(date.getUTCDate()).padStart(2, "0");
22429
- const yyyy = date.getUTCFullYear();
22430
- return `${mm}/${dd}/${yyyy}`;
22431
- }
22432
- function formatTicketFullTimestamp(iso) {
22433
- const date = new Date(iso);
22434
- if (Number.isNaN(date.getTime())) return "";
22435
- const mm = String(date.getUTCMonth() + 1).padStart(2, "0");
22436
- const dd = String(date.getUTCDate()).padStart(2, "0");
22437
- const yyyy = date.getUTCFullYear();
22438
- let hours = date.getUTCHours();
22439
- const minutes = String(date.getUTCMinutes()).padStart(2, "0");
22440
- const ampm = hours >= 12 ? "PM" : "AM";
22441
- hours = hours % 12 || 12;
22442
- return `${mm}/${dd}/${yyyy}, ${hours}:${minutes} ${ampm}`;
22443
- }
22444
- function formatRelativeTime(timestamp) {
22445
- const now = /* @__PURE__ */ new Date();
22446
- const targetTime = typeof timestamp === "string" ? new Date(timestamp) : timestamp;
22447
- if (isNaN(targetTime.getTime())) {
22448
- console.warn("\u26A0\uFE0F Invalid timestamp in formatRelativeTime:", timestamp);
22449
- return "Unknown time";
22450
- }
22451
- const diffInMs = now.getTime() - targetTime.getTime();
22452
- const diffInMinutes = Math.floor(diffInMs / (1e3 * 60));
22453
- if (diffInMinutes < 0) {
22454
- return "Just now";
22455
- }
22456
- if (diffInMinutes < 1) return "Just now";
22457
- if (diffInMinutes < 60) return `${diffInMinutes}m ago`;
22458
- const diffInHours = Math.floor(diffInMinutes / 60);
22459
- if (diffInHours < 24) return `${diffInHours}h ago`;
22460
- const diffInDays = Math.floor(diffInHours / 24);
22461
- if (diffInDays < 7) return `${diffInDays}d ago`;
22462
- if (diffInDays < 30) {
22463
- const weeks = Math.floor(diffInDays / 7);
22464
- return `${weeks}w ago`;
22465
- }
22466
- return targetTime.toLocaleDateString("en-US", {
22467
- month: "short",
22468
- day: "numeric",
22469
- year: targetTime.getUTCFullYear() !== now.getUTCFullYear() ? "numeric" : void 0,
22470
- timeZone: "UTC"
22471
- });
22472
- }
22473
- function formatAbsoluteDate(timestamp, options = {}) {
22474
- const targetTime = typeof timestamp === "string" ? new Date(timestamp) : timestamp;
22475
- if (isNaN(targetTime.getTime())) {
22476
- console.warn("\u26A0\uFE0F Invalid timestamp in formatAbsoluteDate:", timestamp);
22477
- return "Invalid date";
22478
- }
22479
- const defaultOptions2 = {
22480
- year: "numeric",
22481
- month: "short",
22482
- day: "numeric",
22483
- // Pin to UTC so SSR (Vercel = UTC) and the client agree (React #418).
22484
- // Caller can override via `options`.
22485
- timeZone: "UTC",
22486
- ...options
22487
- };
22488
- return targetTime.toLocaleDateString("en-US", defaultOptions2);
22489
- }
22490
- function formatDateTime(timestamp, options = {}) {
22491
- const targetTime = typeof timestamp === "string" ? new Date(timestamp) : timestamp;
22492
- if (isNaN(targetTime.getTime())) {
22493
- console.warn("\u26A0\uFE0F Invalid timestamp in formatDateTime:", timestamp);
22494
- return "Invalid date";
22495
- }
22496
- const defaultOptions2 = {
22497
- year: "numeric",
22498
- month: "short",
22499
- day: "numeric",
22500
- hour: "numeric",
22501
- minute: "2-digit",
22502
- // Pin to UTC so SSR (Vercel = UTC) and the client agree (React #418).
22503
- // Caller can override via `options`.
22504
- timeZone: "UTC",
22505
- ...options
22506
- };
22507
- return targetTime.toLocaleDateString("en-US", defaultOptions2);
22508
- }
22509
- function getDetailedTimeDifference(timestamp) {
22510
- const now = /* @__PURE__ */ new Date();
22511
- const targetTime = typeof timestamp === "string" ? new Date(timestamp) : timestamp;
22512
- if (isNaN(targetTime.getTime())) {
22513
- return "Invalid date";
22514
- }
22515
- const diffInMs = now.getTime() - targetTime.getTime();
22516
- const diffInSeconds = Math.floor(diffInMs / 1e3);
22517
- const diffInMinutes = Math.floor(diffInSeconds / 60);
22518
- const diffInHours = Math.floor(diffInMinutes / 60);
22519
- const diffInDays = Math.floor(diffInHours / 24);
22520
- if (diffInSeconds < 60) return `${diffInSeconds} seconds ago`;
22521
- if (diffInMinutes < 60) return `${diffInMinutes} minutes ago`;
22522
- if (diffInHours < 24) return `${diffInHours} hours ago`;
22523
- if (diffInDays < 30) return `${diffInDays} days ago`;
22524
- const diffInMonths = Math.floor(diffInDays / 30);
22525
- if (diffInMonths < 12) return `${diffInMonths} months ago`;
22526
- const diffInYears = Math.floor(diffInDays / 365);
22527
- return `${diffInYears} years ago`;
22528
- }
22529
- function isToday(timestamp) {
22530
- const today = /* @__PURE__ */ new Date();
22531
- const targetTime = typeof timestamp === "string" ? new Date(timestamp) : timestamp;
22532
- return today.toDateString() === targetTime.toDateString();
22533
- }
22534
- function isWithinMinutes(timestamp, minutes) {
22535
- const now = /* @__PURE__ */ new Date();
22536
- const targetTime = typeof timestamp === "string" ? new Date(timestamp) : timestamp;
22537
- const diffInMs = now.getTime() - targetTime.getTime();
22538
- const diffInMinutes = diffInMs / (1e3 * 60);
22539
- return diffInMinutes <= minutes && diffInMinutes >= 0;
22540
- }
22541
- function createUTCTimestamp() {
22542
- return (/* @__PURE__ */ new Date()).toISOString();
22543
- }
22544
-
22545
22561
  // src/utils/source-icons.ts
22546
22562
  var SOURCE_ICON_NAMES = {
22547
22563
  // Doc tables
@@ -41290,7 +41306,7 @@ function HslInputs({ value, onChange }) {
41290
41306
  }
41291
41307
  function ColorPickerInput({ value, onChange, disabled, className }) {
41292
41308
  const [open, setOpen] = React127.useState(false);
41293
- const [format2, setFormat] = React127.useState("HEX");
41309
+ const [format3, setFormat] = React127.useState("HEX");
41294
41310
  const formatGroups = [
41295
41311
  {
41296
41312
  items: FORMATS.map((f) => ({
@@ -41331,8 +41347,8 @@ function ColorPickerInput({ value, onChange, disabled, className }) {
41331
41347
  customTrigger: /* @__PURE__ */ jsx331(
41332
41348
  InputTrigger,
41333
41349
  {
41334
- "aria-label": `Color format: ${format2}`,
41335
- selectedLabel: format2,
41350
+ "aria-label": `Color format: ${format3}`,
41351
+ selectedLabel: format3,
41336
41352
  endIcon: /* @__PURE__ */ jsx331(TriggerChevron, {}),
41337
41353
  className: "group w-24 shrink-0"
41338
41354
  }
@@ -41340,9 +41356,9 @@ function ColorPickerInput({ value, onChange, disabled, className }) {
41340
41356
  }
41341
41357
  ),
41342
41358
  /* @__PURE__ */ jsxs263("div", { className: "flex flex-1 min-w-0 items-center gap-[var(--spacing-system-xs)]", children: [
41343
- format2 === "HEX" && /* @__PURE__ */ jsx331(HexInputs, { value, onChange }),
41344
- format2 === "RGB" && /* @__PURE__ */ jsx331(RgbInputs, { value, onChange }),
41345
- format2 === "HSL" && /* @__PURE__ */ jsx331(HslInputs, { value, onChange })
41359
+ format3 === "HEX" && /* @__PURE__ */ jsx331(HexInputs, { value, onChange }),
41360
+ format3 === "RGB" && /* @__PURE__ */ jsx331(RgbInputs, { value, onChange }),
41361
+ format3 === "HSL" && /* @__PURE__ */ jsx331(HslInputs, { value, onChange })
41346
41362
  ] })
41347
41363
  ] })
41348
41364
  ] })
@@ -42808,7 +42824,7 @@ function DataRoomDocCardSkeleton({ className }) {
42808
42824
  import { useState as useState103 } from "react";
42809
42825
 
42810
42826
  // node_modules/date-fns/toDate.mjs
42811
- function toDate(argument) {
42827
+ function toDate2(argument) {
42812
42828
  const argStr = Object.prototype.toString.call(argument);
42813
42829
  if (argument instanceof Date || typeof argument === "object" && argStr === "[object Date]") {
42814
42830
  return new argument.constructor(+argument);
@@ -42851,7 +42867,7 @@ function getDefaultOptions() {
42851
42867
  function startOfWeek(date, options) {
42852
42868
  const defaultOptions2 = getDefaultOptions();
42853
42869
  const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
42854
- const _date = toDate(date);
42870
+ const _date = toDate2(date);
42855
42871
  const day = _date.getDay();
42856
42872
  const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
42857
42873
  _date.setDate(_date.getDate() - diff);
@@ -42866,7 +42882,7 @@ function startOfISOWeek(date) {
42866
42882
 
42867
42883
  // node_modules/date-fns/getISOWeekYear.mjs
42868
42884
  function getISOWeekYear(date) {
42869
- const _date = toDate(date);
42885
+ const _date = toDate2(date);
42870
42886
  const year = _date.getFullYear();
42871
42887
  const fourthOfJanuaryOfNextYear = constructFrom(date, 0);
42872
42888
  fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
@@ -42887,14 +42903,14 @@ function getISOWeekYear(date) {
42887
42903
 
42888
42904
  // node_modules/date-fns/startOfDay.mjs
42889
42905
  function startOfDay(date) {
42890
- const _date = toDate(date);
42906
+ const _date = toDate2(date);
42891
42907
  _date.setHours(0, 0, 0, 0);
42892
42908
  return _date;
42893
42909
  }
42894
42910
 
42895
42911
  // node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.mjs
42896
42912
  function getTimezoneOffsetInMilliseconds(date) {
42897
- const _date = toDate(date);
42913
+ const _date = toDate2(date);
42898
42914
  const utcDate = new Date(
42899
42915
  Date.UTC(
42900
42916
  _date.getFullYear(),
@@ -42938,13 +42954,13 @@ function isValid(date) {
42938
42954
  if (!isDate(date) && typeof date !== "number") {
42939
42955
  return false;
42940
42956
  }
42941
- const _date = toDate(date);
42957
+ const _date = toDate2(date);
42942
42958
  return !isNaN(Number(_date));
42943
42959
  }
42944
42960
 
42945
42961
  // node_modules/date-fns/startOfYear.mjs
42946
42962
  function startOfYear(date) {
42947
- const cleanDate = toDate(date);
42963
+ const cleanDate = toDate2(date);
42948
42964
  const _date = constructFrom(date, 0);
42949
42965
  _date.setFullYear(cleanDate.getFullYear(), 0, 1);
42950
42966
  _date.setHours(0, 0, 0, 0);
@@ -43039,8 +43055,8 @@ var formatDistance = (token, count, options) => {
43039
43055
  function buildFormatLongFn(args) {
43040
43056
  return (options = {}) => {
43041
43057
  const width = options.width ? String(options.width) : args.defaultWidth;
43042
- const format2 = args.formats[width] || args.formats[args.defaultWidth];
43043
- return format2;
43058
+ const format3 = args.formats[width] || args.formats[args.defaultWidth];
43059
+ return format3;
43044
43060
  };
43045
43061
  }
43046
43062
 
@@ -43462,7 +43478,7 @@ var enUS = {
43462
43478
 
43463
43479
  // node_modules/date-fns/getDayOfYear.mjs
43464
43480
  function getDayOfYear(date) {
43465
- const _date = toDate(date);
43481
+ const _date = toDate2(date);
43466
43482
  const diff = differenceInCalendarDays(_date, startOfYear(_date));
43467
43483
  const dayOfYear = diff + 1;
43468
43484
  return dayOfYear;
@@ -43470,14 +43486,14 @@ function getDayOfYear(date) {
43470
43486
 
43471
43487
  // node_modules/date-fns/getISOWeek.mjs
43472
43488
  function getISOWeek(date) {
43473
- const _date = toDate(date);
43489
+ const _date = toDate2(date);
43474
43490
  const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);
43475
43491
  return Math.round(diff / millisecondsInWeek) + 1;
43476
43492
  }
43477
43493
 
43478
43494
  // node_modules/date-fns/getWeekYear.mjs
43479
43495
  function getWeekYear(date, options) {
43480
- const _date = toDate(date);
43496
+ const _date = toDate2(date);
43481
43497
  const year = _date.getFullYear();
43482
43498
  const defaultOptions2 = getDefaultOptions();
43483
43499
  const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
@@ -43512,7 +43528,7 @@ function startOfWeekYear(date, options) {
43512
43528
 
43513
43529
  // node_modules/date-fns/getWeek.mjs
43514
43530
  function getWeek(date, options) {
43515
- const _date = toDate(date);
43531
+ const _date = toDate2(date);
43516
43532
  const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);
43517
43533
  return Math.round(diff / millisecondsInWeek) + 1;
43518
43534
  }
@@ -44298,14 +44314,14 @@ function isProtectedDayOfYearToken(token) {
44298
44314
  function isProtectedWeekYearToken(token) {
44299
44315
  return weekYearTokenRE.test(token);
44300
44316
  }
44301
- function warnOrThrowProtectedError(token, format2, input) {
44302
- const _message = message(token, format2, input);
44317
+ function warnOrThrowProtectedError(token, format3, input) {
44318
+ const _message = message(token, format3, input);
44303
44319
  console.warn(_message);
44304
44320
  if (throwTokens.includes(token)) throw new RangeError(_message);
44305
44321
  }
44306
- function message(token, format2, input) {
44322
+ function message(token, format3, input) {
44307
44323
  const subject = token[0] === "Y" ? "years" : "days of the month";
44308
- return `Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format2}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
44324
+ return `Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format3}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
44309
44325
  }
44310
44326
 
44311
44327
  // node_modules/date-fns/format.mjs
@@ -44314,12 +44330,12 @@ var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
44314
44330
  var escapedStringRegExp = /^'([^]*?)'?$/;
44315
44331
  var doubleQuoteRegExp = /''/g;
44316
44332
  var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
44317
- function format(date, formatStr, options) {
44333
+ function format2(date, formatStr, options) {
44318
44334
  const defaultOptions2 = getDefaultOptions();
44319
44335
  const locale = options?.locale ?? defaultOptions2.locale ?? enUS;
44320
44336
  const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
44321
44337
  const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
44322
- const originalDate = toDate(date);
44338
+ const originalDate = toDate2(date);
44323
44339
  if (!isValid(originalDate)) {
44324
44340
  throw new RangeError("Invalid time value");
44325
44341
  }
@@ -44380,7 +44396,7 @@ import { ExternalLink as ExternalLink12, Clock as Clock2, Play as Play4, Video a
44380
44396
  init_cn();
44381
44397
  import { Fragment as Fragment73, jsx as jsx346, jsxs as jsxs277 } from "react/jsx-runtime";
44382
44398
  function formatUtc(date, fmt) {
44383
- return format(new Date(date.getTime() + date.getTimezoneOffset() * 6e4), fmt);
44399
+ return format2(new Date(date.getTime() + date.getTimezoneOffset() * 6e4), fmt);
44384
44400
  }
44385
44401
  function ProgramCardSkeleton({ size: size2 = "default" }) {
44386
44402
  if (size2 === "sm") {
@@ -52048,6 +52064,15 @@ export {
52048
52064
  ICON_OPTIONS,
52049
52065
  SlashCommandSuggestions,
52050
52066
  ChatInput,
52067
+ formatTicketRelativeTime,
52068
+ formatTicketFullTimestamp,
52069
+ formatRelativeTime,
52070
+ formatAbsoluteDate,
52071
+ formatDateTime,
52072
+ getDetailedTimeDifference,
52073
+ isToday,
52074
+ isWithinMinutes,
52075
+ createUTCTimestamp,
52051
52076
  ToolExecutionDisplay,
52052
52077
  remarkCardLinks,
52053
52078
  remarkMentionChips,
@@ -52394,15 +52419,6 @@ export {
52394
52419
  getBestContrastColor,
52395
52420
  analyzeImageColor,
52396
52421
  extractImageEdgeColorAsync,
52397
- formatTicketRelativeTime,
52398
- formatTicketFullTimestamp,
52399
- formatRelativeTime,
52400
- formatAbsoluteDate,
52401
- formatDateTime,
52402
- getDetailedTimeDifference,
52403
- isToday,
52404
- isWithinMinutes,
52405
- createUTCTimestamp,
52406
52422
  readLeadingDecisionFrame,
52407
52423
  AVAILABLE_SVG_ICONS,
52408
52424
  releaseTypeOptions,
@@ -52716,4 +52732,4 @@ export {
52716
52732
  LogsList,
52717
52733
  assets
52718
52734
  };
52719
- //# sourceMappingURL=chunk-QDLI65SB.js.map
52735
+ //# sourceMappingURL=chunk-N6KORCQJ.js.map