@factorialco/f0-react 12.12.0 → 12.13.0
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/{ArchiveThumbnail-b34U-zTc.js → ArchiveThumbnail-BZgITTo2.js} +4 -4
- package/dist/{ArchiveViewer-BpmryW7A.js → ArchiveViewer-BHu224N3.js} +2 -2
- package/dist/{ChatPostComposerDialog-Cr207fXs.js → ChatPostComposerDialog-CsxxDqxh.js} +2 -2
- package/dist/{CoachmarkProvider-CsytVD-X.js → CoachmarkProvider-9PVhiN-N.js} +17650 -17650
- package/dist/{CodeThumbnail-8NiQ3uzU.js → CodeThumbnail-ChpXV1S-.js} +1 -1
- package/dist/{CodeViewer-BNZqt-5s.js → CodeViewer-BKw04W0G.js} +5 -5
- package/dist/{DocumentToolbar-DUe9R1rU.js → DocumentToolbar-mB3bK8uS.js} +1 -1
- package/dist/{DocxViewer-BUMy2iL7.js → DocxViewer-Dr8WXU1s.js} +1 -1
- package/dist/{F0AiProcessingOverlay-CiUTeBwG.js → F0AiProcessingOverlay-BUynKfyI.js} +542 -542
- package/dist/{F0Alert-Ca8sBfXN.js → F0Alert-ALRcL0Af.js} +10 -10
- package/dist/F0AudioPlayer-Cd9nIQX5.js +2 -0
- package/dist/{F0AudioPlayer-BefDLQA2.js → F0AudioPlayer-vRJmmSpp.js} +423 -331
- package/dist/{F0CanvasPanel-BOo_mxBl.js → F0CanvasPanel-D1QmpvzX.js} +799 -780
- package/dist/{F0DocumentViewer-CaYAO9ok.js → F0DocumentViewer-CEuF9b_u.js} +1 -1
- package/dist/{F0DocumentViewer-h0XY5tgT.js → F0DocumentViewer-ChCqzIK3.js} +2 -2
- package/dist/{F0Map-b1uYlF_H.js → F0Map-CWhV5A03.js} +10 -10
- package/dist/F0VideoPlayer-DUw-DouS.js +1 -0
- package/dist/{F0VideoPlayer-D85XCpqh.js → F0VideoPlayer-wTc25_qN.js} +62 -62
- package/dist/{HtmlViewer-DxOnMV30.js → HtmlViewer-Uxb8n2vn.js} +3 -3
- package/dist/{Map-BOMgctnS.js → Map-95w5slTZ.js} +9 -9
- package/dist/{PdfThumbnail-98PDy4ud.js → PdfThumbnail-BYrhsyMw.js} +1 -1
- package/dist/{PdfViewer-nBnKrTYD.js → PdfViewer-DUxhQr-O.js} +5 -5
- package/dist/{SheetViewer-CD9SHbXJ.js → SheetViewer-C9Rbh_xJ.js} +12 -12
- package/dist/{TextViewer-DxRBCXzV.js → TextViewer-DP9lYxAB.js} +1 -1
- package/dist/ai.js +3 -3
- package/dist/component-status.js +1 -1
- package/dist/experimental.d.ts +14 -2
- package/dist/experimental.js +4984 -4897
- package/dist/f0.d.ts +6 -127
- package/dist/f0.js +171 -172
- package/dist/{highlight-CqFL-_MG.js → highlight-Bjt-wXg6.js} +7 -7
- package/dist/{maplibre-Ip4Qe9dM.js → maplibre-tJ3UolSF.js} +1 -1
- package/dist/{pdfWorker-DMjHHAyP.js → pdfWorker-BBnYtb1A.js} +1 -1
- package/dist/{types-geibVrTM.d.ts → types-oJKIDe-E.d.ts} +122 -1
- package/package.json +1 -1
- package/dist/F0AudioPlayer-CNb4kXOk.js +0 -3
- package/dist/F0SegmentedControl-DXoAzTmH.js +0 -103
- package/dist/F0VideoPlayer-_zLFiEIp.js +0 -1
|
@@ -40476,24 +40476,20 @@ var S$ = o("F0FileItem", r(x$)), C$ = S$, w$ = 2, T$ = 70, E$ = .08, D$ = 6, O$
|
|
|
40476
40476
|
let e = a1();
|
|
40477
40477
|
if (!e) throw Error("useAttachmentImagePreview must be used within an AttachmentPreviewProvider");
|
|
40478
40478
|
return e;
|
|
40479
|
-
}, c1 = () => {
|
|
40480
|
-
let e =
|
|
40481
|
-
if (!e) throw Error("useAttachmentDocumentPreview must be used within an AttachmentPreviewProvider");
|
|
40482
|
-
return e;
|
|
40483
|
-
}, l1 = Lr(null), u1 = Lr(null), d1 = () => Hr(l1), f1 = () => {
|
|
40484
|
-
let e = d1();
|
|
40479
|
+
}, c1 = Lr(null), l1 = Lr(null), u1 = () => Hr(c1), d1 = () => {
|
|
40480
|
+
let e = u1();
|
|
40485
40481
|
if (!e) throw Error("useAttachmentViewer must be used within an AttachmentViewerProvider");
|
|
40486
40482
|
return e;
|
|
40487
|
-
},
|
|
40483
|
+
}, f1 = () => Hr(l1), p1 = wr.ease.outSwift, m1 = {
|
|
40488
40484
|
duration: .16,
|
|
40489
|
-
ease:
|
|
40490
|
-
},
|
|
40485
|
+
ease: p1
|
|
40486
|
+
}, h1 = {
|
|
40491
40487
|
duration: .12,
|
|
40492
40488
|
ease: "easeIn"
|
|
40493
|
-
},
|
|
40489
|
+
}, g1 = {
|
|
40494
40490
|
duration: .15,
|
|
40495
|
-
ease:
|
|
40496
|
-
},
|
|
40491
|
+
ease: p1
|
|
40492
|
+
}, _1 = ({ className: e, onLoad: t, onLoadedChange: n, eager: r = !1, ...i }) => {
|
|
40497
40493
|
let { reducedMotion: a } = H$(), [o, s] = H(!1), l = () => {
|
|
40498
40494
|
s(!0), n?.(!0);
|
|
40499
40495
|
};
|
|
@@ -40509,7 +40505,7 @@ var S$ = o("F0FileItem", r(x$)), C$ = S$, w$ = 2, T$ = 70, E$ = .08, D$ = 6, O$
|
|
|
40509
40505
|
},
|
|
40510
40506
|
className: c(!a && "transition-opacity duration-200", o ? "opacity-100" : "opacity-0", e)
|
|
40511
40507
|
});
|
|
40512
|
-
},
|
|
40508
|
+
}, v1 = {
|
|
40513
40509
|
"application/pdf": "pdf",
|
|
40514
40510
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "sheet",
|
|
40515
40511
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.template": "sheet",
|
|
@@ -40521,41 +40517,41 @@ var S$ = o("F0FileItem", r(x$)), C$ = S$, w$ = 2, T$ = 70, E$ = .08, D$ = 6, O$
|
|
|
40521
40517
|
"application/xhtml+xml": "html",
|
|
40522
40518
|
"text/markdown": "text",
|
|
40523
40519
|
"text/x-markdown": "text"
|
|
40524
|
-
},
|
|
40525
|
-
...
|
|
40520
|
+
}, y1 = /* @__PURE__ */ "javascript.typescript.python.ruby.go.rust.java.kotlin.swift.scala.dart.lua.perl.r.c.cpp.objectivec.csharp.php.sql.graphql.protobuf.bash.powershell.dos.yaml.ini.properties.json.xml.css.scss.less.diff.dockerfile.makefile.groovy.elixir.erlang.haskell.markdown".split("."), b1 = (e, t) => t.map((t) => [t, e]), x1 = Object.fromEntries([
|
|
40521
|
+
...b1("javascript", [
|
|
40526
40522
|
"js",
|
|
40527
40523
|
"mjs",
|
|
40528
40524
|
"cjs",
|
|
40529
40525
|
"jsx"
|
|
40530
40526
|
]),
|
|
40531
|
-
...
|
|
40527
|
+
...b1("typescript", [
|
|
40532
40528
|
"ts",
|
|
40533
40529
|
"mts",
|
|
40534
40530
|
"cts",
|
|
40535
40531
|
"tsx"
|
|
40536
40532
|
]),
|
|
40537
|
-
...
|
|
40533
|
+
...b1("python", [
|
|
40538
40534
|
"py",
|
|
40539
40535
|
"pyw",
|
|
40540
40536
|
"pyi"
|
|
40541
40537
|
]),
|
|
40542
|
-
...
|
|
40538
|
+
...b1("ruby", [
|
|
40543
40539
|
"rb",
|
|
40544
40540
|
"rake",
|
|
40545
40541
|
"gemspec"
|
|
40546
40542
|
]),
|
|
40547
|
-
...
|
|
40548
|
-
...
|
|
40549
|
-
...
|
|
40550
|
-
...
|
|
40551
|
-
...
|
|
40552
|
-
...
|
|
40553
|
-
...
|
|
40554
|
-
...
|
|
40555
|
-
...
|
|
40556
|
-
...
|
|
40557
|
-
...
|
|
40558
|
-
...
|
|
40543
|
+
...b1("go", ["go"]),
|
|
40544
|
+
...b1("rust", ["rs"]),
|
|
40545
|
+
...b1("java", ["java"]),
|
|
40546
|
+
...b1("kotlin", ["kt", "kts"]),
|
|
40547
|
+
...b1("swift", ["swift"]),
|
|
40548
|
+
...b1("scala", ["scala", "sc"]),
|
|
40549
|
+
...b1("dart", ["dart"]),
|
|
40550
|
+
...b1("lua", ["lua"]),
|
|
40551
|
+
...b1("perl", ["pl", "pm"]),
|
|
40552
|
+
...b1("r", ["r"]),
|
|
40553
|
+
...b1("c", ["c", "h"]),
|
|
40554
|
+
...b1("cpp", [
|
|
40559
40555
|
"cpp",
|
|
40560
40556
|
"cc",
|
|
40561
40557
|
"cxx",
|
|
@@ -40563,30 +40559,30 @@ var S$ = o("F0FileItem", r(x$)), C$ = S$, w$ = 2, T$ = 70, E$ = .08, D$ = 6, O$
|
|
|
40563
40559
|
"hh",
|
|
40564
40560
|
"hxx"
|
|
40565
40561
|
]),
|
|
40566
|
-
...
|
|
40567
|
-
...
|
|
40568
|
-
...
|
|
40569
|
-
...
|
|
40570
|
-
...
|
|
40571
|
-
...
|
|
40572
|
-
...
|
|
40562
|
+
...b1("objectivec", ["m", "mm"]),
|
|
40563
|
+
...b1("csharp", ["cs"]),
|
|
40564
|
+
...b1("php", ["php"]),
|
|
40565
|
+
...b1("sql", ["sql"]),
|
|
40566
|
+
...b1("graphql", ["graphql", "gql"]),
|
|
40567
|
+
...b1("protobuf", ["proto"]),
|
|
40568
|
+
...b1("bash", [
|
|
40573
40569
|
"sh",
|
|
40574
40570
|
"bash",
|
|
40575
40571
|
"zsh",
|
|
40576
40572
|
"ksh",
|
|
40577
40573
|
"fish"
|
|
40578
40574
|
]),
|
|
40579
|
-
...
|
|
40580
|
-
...
|
|
40581
|
-
...
|
|
40582
|
-
...
|
|
40575
|
+
...b1("powershell", ["ps1", "psm1"]),
|
|
40576
|
+
...b1("dos", ["bat", "cmd"]),
|
|
40577
|
+
...b1("yaml", ["yaml", "yml"]),
|
|
40578
|
+
...b1("ini", [
|
|
40583
40579
|
"toml",
|
|
40584
40580
|
"ini",
|
|
40585
40581
|
"cfg",
|
|
40586
40582
|
"conf"
|
|
40587
40583
|
]),
|
|
40588
|
-
...
|
|
40589
|
-
...
|
|
40584
|
+
...b1("properties", ["properties"]),
|
|
40585
|
+
...b1("json", [
|
|
40590
40586
|
"json",
|
|
40591
40587
|
"jsonc",
|
|
40592
40588
|
"json5",
|
|
@@ -40594,7 +40590,7 @@ var S$ = o("F0FileItem", r(x$)), C$ = S$, w$ = 2, T$ = 70, E$ = .08, D$ = 6, O$
|
|
|
40594
40590
|
"webmanifest",
|
|
40595
40591
|
"geojson"
|
|
40596
40592
|
]),
|
|
40597
|
-
...
|
|
40593
|
+
...b1("xml", [
|
|
40598
40594
|
"xml",
|
|
40599
40595
|
"xsd",
|
|
40600
40596
|
"xsl",
|
|
@@ -40603,15 +40599,15 @@ var S$ = o("F0FileItem", r(x$)), C$ = S$, w$ = 2, T$ = 70, E$ = .08, D$ = 6, O$
|
|
|
40603
40599
|
"vue",
|
|
40604
40600
|
"svelte"
|
|
40605
40601
|
]),
|
|
40606
|
-
...
|
|
40607
|
-
...
|
|
40608
|
-
...
|
|
40609
|
-
...
|
|
40610
|
-
...
|
|
40611
|
-
...
|
|
40612
|
-
...
|
|
40613
|
-
...
|
|
40614
|
-
]),
|
|
40602
|
+
...b1("css", ["css"]),
|
|
40603
|
+
...b1("scss", ["scss", "sass"]),
|
|
40604
|
+
...b1("less", ["less"]),
|
|
40605
|
+
...b1("diff", ["diff", "patch"]),
|
|
40606
|
+
...b1("groovy", ["gradle"]),
|
|
40607
|
+
...b1("elixir", ["ex", "exs"]),
|
|
40608
|
+
...b1("erlang", ["erl"]),
|
|
40609
|
+
...b1("haskell", ["hs"])
|
|
40610
|
+
]), S1 = [
|
|
40615
40611
|
["dockerfile", "dockerfile"],
|
|
40616
40612
|
["containerfile", "dockerfile"],
|
|
40617
40613
|
["makefile", "makefile"],
|
|
@@ -40626,7 +40622,7 @@ var S$ = o("F0FileItem", r(x$)), C$ = S$, w$ = 2, T$ = 70, E$ = .08, D$ = 6, O$
|
|
|
40626
40622
|
[".dockerignore", "ini"],
|
|
40627
40623
|
[".npmrc", "ini"],
|
|
40628
40624
|
[".editorconfig", "ini"]
|
|
40629
|
-
],
|
|
40625
|
+
], C1 = /* @__PURE__ */ new Set([
|
|
40630
40626
|
"txt",
|
|
40631
40627
|
"text",
|
|
40632
40628
|
"log",
|
|
@@ -40640,16 +40636,16 @@ var S$ = o("F0FileItem", r(x$)), C$ = S$, w$ = 2, T$ = 70, E$ = .08, D$ = 6, O$
|
|
|
40640
40636
|
"srt",
|
|
40641
40637
|
"vtt",
|
|
40642
40638
|
"nfo"
|
|
40643
|
-
]),
|
|
40639
|
+
]), w1 = /* @__PURE__ */ new Set([
|
|
40644
40640
|
"xlsx",
|
|
40645
40641
|
"xltx",
|
|
40646
40642
|
"csv",
|
|
40647
40643
|
"tsv"
|
|
40648
|
-
]),
|
|
40644
|
+
]), T1 = /* @__PURE__ */ new Set(["docx", "dotx"]), E1 = /* @__PURE__ */ new Set([
|
|
40649
40645
|
"html",
|
|
40650
40646
|
"htm",
|
|
40651
40647
|
"xhtml"
|
|
40652
|
-
]),
|
|
40648
|
+
]), D1 = /* @__PURE__ */ new Set(["zip"]), O1 = /* @__PURE__ */ new Set([
|
|
40653
40649
|
"mp3",
|
|
40654
40650
|
"m4a",
|
|
40655
40651
|
"aac",
|
|
@@ -40659,7 +40655,7 @@ var S$ = o("F0FileItem", r(x$)), C$ = S$, w$ = 2, T$ = 70, E$ = .08, D$ = 6, O$
|
|
|
40659
40655
|
"opus",
|
|
40660
40656
|
"flac",
|
|
40661
40657
|
"weba"
|
|
40662
|
-
]),
|
|
40658
|
+
]), k1 = /* @__PURE__ */ new Set([
|
|
40663
40659
|
"m4v",
|
|
40664
40660
|
"mov",
|
|
40665
40661
|
"mp4",
|
|
@@ -40667,7 +40663,7 @@ var S$ = o("F0FileItem", r(x$)), C$ = S$, w$ = 2, T$ = 70, E$ = .08, D$ = 6, O$
|
|
|
40667
40663
|
"webm",
|
|
40668
40664
|
"mts",
|
|
40669
40665
|
"m2ts"
|
|
40670
|
-
]),
|
|
40666
|
+
]), A1 = /* @__PURE__ */ new Set([
|
|
40671
40667
|
"rtf",
|
|
40672
40668
|
"eml",
|
|
40673
40669
|
"mht",
|
|
@@ -40683,7 +40679,7 @@ var S$ = o("F0FileItem", r(x$)), C$ = S$, w$ = 2, T$ = 70, E$ = .08, D$ = 6, O$
|
|
|
40683
40679
|
"xlsm",
|
|
40684
40680
|
"docm",
|
|
40685
40681
|
"pptm"
|
|
40686
|
-
]),
|
|
40682
|
+
]), j1 = {
|
|
40687
40683
|
"application/zip": "archive",
|
|
40688
40684
|
"application/x-zip-compressed": "archive",
|
|
40689
40685
|
"application/x-zip": "archive",
|
|
@@ -40706,7 +40702,7 @@ var S$ = o("F0FileItem", r(x$)), C$ = S$, w$ = 2, T$ = 70, E$ = .08, D$ = 6, O$
|
|
|
40706
40702
|
"text/x-vcard": "text",
|
|
40707
40703
|
"text/rtf": null,
|
|
40708
40704
|
"application/rtf": null
|
|
40709
|
-
},
|
|
40705
|
+
}, M1 = {
|
|
40710
40706
|
png: "image/png",
|
|
40711
40707
|
jpg: "image/jpeg",
|
|
40712
40708
|
jpeg: "image/jpeg",
|
|
@@ -40760,7 +40756,7 @@ var S$ = o("F0FileItem", r(x$)), C$ = S$, w$ = 2, T$ = 70, E$ = .08, D$ = 6, O$
|
|
|
40760
40756
|
opus: "audio/ogg",
|
|
40761
40757
|
flac: "audio/flac",
|
|
40762
40758
|
weba: "audio/webm"
|
|
40763
|
-
},
|
|
40759
|
+
}, N1 = 1048576, P1 = (e) => {
|
|
40764
40760
|
if (e < 1024) return `${e} B`;
|
|
40765
40761
|
if (e < 1048576) {
|
|
40766
40762
|
let t = e / 1024;
|
|
@@ -40772,118 +40768,141 @@ var S$ = o("F0FileItem", r(x$)), C$ = S$, w$ = 2, T$ = 70, E$ = .08, D$ = 6, O$
|
|
|
40772
40768
|
}
|
|
40773
40769
|
let t = e / 1073741824;
|
|
40774
40770
|
return `${Number.isInteger(t) ? t : t.toFixed(1)} GB`;
|
|
40775
|
-
},
|
|
40771
|
+
}, F1 = (e) => {
|
|
40776
40772
|
let t = e.trim().replace(/[.\s]+$/, "").split(/[\\/]/).at(-1) ?? "", n = t.lastIndexOf(".");
|
|
40777
40773
|
return n > 0 ? t.slice(n + 1).toLowerCase() : void 0;
|
|
40778
|
-
},
|
|
40774
|
+
}, I1 = (e) => {
|
|
40779
40775
|
if (!e) return;
|
|
40780
40776
|
let t = (e.split(/[?#]/, 1)[0] ?? "").split("/").at(-1) ?? "", n = t.lastIndexOf(".");
|
|
40781
40777
|
return n > 0 ? t.slice(n + 1).toLowerCase() : void 0;
|
|
40782
|
-
},
|
|
40778
|
+
}, L1 = (e) => (e.trim().split(/[\\/]/).at(-1) ?? "").toLowerCase(), R1 = /^(application\/octet-stream|application\/vnd\.factorial\.)/i, z1 = /^application\/(vnd\.ms-excel|msword|vnd\.ms-powerpoint)$/, B1 = /* @__PURE__ */ new Set([
|
|
40783
40779
|
"ts",
|
|
40784
40780
|
"tsx",
|
|
40785
40781
|
"mts",
|
|
40786
40782
|
"cts"
|
|
40787
|
-
]),
|
|
40783
|
+
]), V1 = (e) => {
|
|
40788
40784
|
let t = e?.trim();
|
|
40789
|
-
if (t && !
|
|
40790
|
-
},
|
|
40791
|
-
let t = (
|
|
40792
|
-
return t.startsWith("video/") && n !== void 0 &&
|
|
40793
|
-
},
|
|
40794
|
-
if (
|
|
40795
|
-
let t =
|
|
40796
|
-
return t === void 0 || !
|
|
40785
|
+
if (t && !R1.test(t)) return t;
|
|
40786
|
+
}, H1 = (e) => {
|
|
40787
|
+
let t = (V1(e.mimeType) ?? "").split(";")[0].trim().toLowerCase(), n = F1(e.name);
|
|
40788
|
+
return t.startsWith("video/") && n !== void 0 && B1.has(n) || z1.test(t) ? "" : t;
|
|
40789
|
+
}, U1 = (e) => e.size === void 0 || e.size > 2 * N1, W1 = (e) => {
|
|
40790
|
+
if (H1(e).startsWith("video/")) return !0;
|
|
40791
|
+
let t = F1(e.name) ?? I1(e.url);
|
|
40792
|
+
return t === void 0 || !k1.has(t) ? !1 : t === "mts" || t === "m2ts" ? U1(e) : !0;
|
|
40793
|
+
}, G1 = (e) => {
|
|
40794
|
+
if (H1(e).startsWith("audio/")) return !0;
|
|
40795
|
+
let t = F1(e.name) ?? I1(e.url);
|
|
40796
|
+
return t !== void 0 && O1.has(t);
|
|
40797
40797
|
}, K1 = (e) => {
|
|
40798
|
-
|
|
40799
|
-
let t
|
|
40800
|
-
return t !== void 0 && k1.has(t);
|
|
40801
|
-
}, q1 = (e) => {
|
|
40802
|
-
let t = R1(e);
|
|
40803
|
-
for (let [e, n] of C1) if (t === e || t.startsWith(`${e}.`)) return n;
|
|
40798
|
+
let t = L1(e);
|
|
40799
|
+
for (let [e, n] of S1) if (t === e || t.startsWith(`${e}.`)) return n;
|
|
40804
40800
|
return null;
|
|
40805
|
-
},
|
|
40806
|
-
let t =
|
|
40807
|
-
return t === void 0 ?
|
|
40808
|
-
},
|
|
40809
|
-
let t =
|
|
40801
|
+
}, q1 = (e) => {
|
|
40802
|
+
let t = F1(e);
|
|
40803
|
+
return t === void 0 ? K1(e) ? "code" : null : t === "pdf" ? "pdf" : w1.has(t) ? "sheet" : T1.has(t) ? "docx" : E1.has(t) ? "html" : D1.has(t) ? "archive" : C1.has(t) ? "text" : Dr(x1, t) || K1(e) ? "code" : null;
|
|
40804
|
+
}, J1 = (e) => e ? e in j1 ? Dr(j1, e) ?? null : /^(image|video|audio)\//.test(e) || e.includes("officedocument") ? null : e.endsWith("+json") || e.endsWith("+xml") ? "code" : e.endsWith("+zip") ? "archive" : e.startsWith("text/x-") ? "code" : e.startsWith("text/") ? "text" : null : null, Y1 = (e) => {
|
|
40805
|
+
let t = H1(e), n = Dr(v1, t);
|
|
40810
40806
|
if (n) return n;
|
|
40811
|
-
let r =
|
|
40812
|
-
return r !== void 0 &&
|
|
40813
|
-
},
|
|
40814
|
-
let t =
|
|
40807
|
+
let r = F1(e.name);
|
|
40808
|
+
return r !== void 0 && A1.has(r) ? null : q1(e.name) ?? J1(t);
|
|
40809
|
+
}, X1 = (e) => {
|
|
40810
|
+
let t = F1(e.name), n = t === void 0 ? void 0 : Dr(x1, t);
|
|
40815
40811
|
if (n) return n;
|
|
40816
|
-
let r =
|
|
40812
|
+
let r = K1(e.name);
|
|
40817
40813
|
if (r) return r;
|
|
40818
|
-
let i =
|
|
40814
|
+
let i = H1(e);
|
|
40819
40815
|
return i === "application/json" || i.endsWith("+json") ? "json" : i.includes("xml") ? "xml" : i.includes("javascript") ? "javascript" : i.includes("typescript") ? "typescript" : i.includes("yaml") ? "yaml" : i === "application/x-sh" ? "bash" : i === "application/sql" ? "sql" : i === "text/x-python" ? "python" : null;
|
|
40820
|
-
},
|
|
40816
|
+
}, Z1 = {
|
|
40821
40817
|
pdf: Infinity,
|
|
40822
|
-
sheet: 10 *
|
|
40823
|
-
docx: 10 *
|
|
40824
|
-
text: 2 *
|
|
40825
|
-
code: 2 *
|
|
40826
|
-
html: 5 *
|
|
40827
|
-
archive: 200 *
|
|
40828
|
-
},
|
|
40818
|
+
sheet: 10 * N1,
|
|
40819
|
+
docx: 10 * N1,
|
|
40820
|
+
text: 2 * N1,
|
|
40821
|
+
code: 2 * N1,
|
|
40822
|
+
html: 5 * N1,
|
|
40823
|
+
archive: 200 * N1
|
|
40824
|
+
}, Q1 = 20 * N1, $1 = (e, t) => t && !R$(e.url) && !(e.size !== void 0 && e.size > 0 && e.size <= 20971520), e0 = (e, t) => (e.size ?? 0) <= Z1[t], t0 = [
|
|
40825
|
+
["application/pdf", "pdf"],
|
|
40826
|
+
["spreadsheetml", "sheet"],
|
|
40827
|
+
["text/csv", "sheet"],
|
|
40828
|
+
["wordprocessingml", "docx"],
|
|
40829
|
+
["text/markdown", "text"],
|
|
40830
|
+
["text/plain", "text"],
|
|
40831
|
+
["application/json", "text"]
|
|
40832
|
+
], n0 = {
|
|
40833
|
+
pdf: "pdf",
|
|
40834
|
+
xlsx: "sheet",
|
|
40835
|
+
csv: "sheet",
|
|
40836
|
+
docx: "docx",
|
|
40837
|
+
txt: "text",
|
|
40838
|
+
md: "text",
|
|
40839
|
+
markdown: "text",
|
|
40840
|
+
log: "text",
|
|
40841
|
+
json: "text"
|
|
40842
|
+
}, r0 = (e) => {
|
|
40843
|
+
let t = e.mimeType?.toLowerCase() ?? "";
|
|
40844
|
+
for (let [e, n] of t0) if (t.includes(e)) return n;
|
|
40845
|
+
let n = e.name.toLowerCase(), r = n.lastIndexOf(".");
|
|
40846
|
+
return r > 0 ? Dr(n0, n.slice(r + 1)) ?? null : null;
|
|
40847
|
+
}, i0 = (e) => {
|
|
40829
40848
|
let t = e.split("?")[1];
|
|
40830
40849
|
if (t) try {
|
|
40831
40850
|
return new URLSearchParams(t.split("#")[0]).get("path") ?? void 0;
|
|
40832
40851
|
} catch {
|
|
40833
40852
|
return;
|
|
40834
40853
|
}
|
|
40835
|
-
},
|
|
40854
|
+
}, a0 = (e) => {
|
|
40836
40855
|
let t = (e.split(/[?#]/, 1)[0] ?? "").split("/").filter(Boolean).at(-1) ?? "";
|
|
40837
40856
|
try {
|
|
40838
40857
|
return decodeURIComponent(t);
|
|
40839
40858
|
} catch {
|
|
40840
40859
|
return t;
|
|
40841
40860
|
}
|
|
40842
|
-
},
|
|
40843
|
-
let t =
|
|
40844
|
-
if (t &&
|
|
40861
|
+
}, o0 = (e) => {
|
|
40862
|
+
let t = V1(e.mimeType);
|
|
40863
|
+
if (t && H1(e)) return t;
|
|
40845
40864
|
let n = [
|
|
40846
|
-
|
|
40847
|
-
|
|
40848
|
-
|
|
40865
|
+
F1(e.name),
|
|
40866
|
+
I1(i0(e.url)),
|
|
40867
|
+
I1(e.url)
|
|
40849
40868
|
];
|
|
40850
40869
|
for (let e of n) {
|
|
40851
|
-
let t = e ? Dr(
|
|
40870
|
+
let t = e ? Dr(M1, e) : void 0;
|
|
40852
40871
|
if (t) return t;
|
|
40853
40872
|
}
|
|
40854
40873
|
return t;
|
|
40855
|
-
},
|
|
40856
|
-
let t =
|
|
40874
|
+
}, s0 = /^image\/(png|jpeg|gif|webp|avif|bmp|svg\+xml)$/, c0 = /^image\/(heic|heif|tiff)$/, l0 = (e) => s0.test(o0(e) ?? ""), u0 = (e) => c0.test(o0(e) ?? ""), d0 = (e) => {
|
|
40875
|
+
let t = o0(e);
|
|
40857
40876
|
return t === e.mimeType ? e : {
|
|
40858
40877
|
...e,
|
|
40859
40878
|
mimeType: t
|
|
40860
40879
|
};
|
|
40861
|
-
},
|
|
40880
|
+
}, f0 = (e) => {
|
|
40862
40881
|
if (e.previewUrl) return {
|
|
40863
40882
|
kind: "pdf",
|
|
40864
40883
|
url: e.previewUrl
|
|
40865
40884
|
};
|
|
40866
|
-
let t =
|
|
40885
|
+
let t = Y1({
|
|
40867
40886
|
name: e.name,
|
|
40868
|
-
mimeType:
|
|
40887
|
+
mimeType: o0(e)
|
|
40869
40888
|
});
|
|
40870
|
-
return !t || !
|
|
40889
|
+
return !t || !e0(e, t) ? null : {
|
|
40871
40890
|
kind: t,
|
|
40872
40891
|
url: e.url
|
|
40873
40892
|
};
|
|
40874
|
-
},
|
|
40875
|
-
let n =
|
|
40876
|
-
if (t && (
|
|
40877
|
-
if (!e.previewUrl &&
|
|
40878
|
-
if (!e.previewUrl &&
|
|
40879
|
-
let r =
|
|
40893
|
+
}, p0 = (e, { inferImages: t = !0 } = {}) => {
|
|
40894
|
+
let n = d0(e);
|
|
40895
|
+
if (t && (l0(n) || u0(n))) return { bucket: "image" };
|
|
40896
|
+
if (!e.previewUrl && W1(n)) return { bucket: "video" };
|
|
40897
|
+
if (!e.previewUrl && G1(n)) return { bucket: "audio" };
|
|
40898
|
+
let r = f0(n);
|
|
40880
40899
|
return r ? {
|
|
40881
40900
|
bucket: "document",
|
|
40882
40901
|
kind: r.kind,
|
|
40883
40902
|
url: r.url,
|
|
40884
40903
|
rendering: !!e.previewUrl
|
|
40885
40904
|
} : { bucket: "file" };
|
|
40886
|
-
},
|
|
40905
|
+
}, m0 = (e, t) => {
|
|
40887
40906
|
let n = {
|
|
40888
40907
|
images: [],
|
|
40889
40908
|
videos: [],
|
|
@@ -40893,7 +40912,7 @@ var S$ = o("F0FileItem", r(x$)), C$ = S$, w$ = 2, T$ = 70, E$ = .08, D$ = 6, O$
|
|
|
40893
40912
|
ordered: []
|
|
40894
40913
|
};
|
|
40895
40914
|
for (let r of e) {
|
|
40896
|
-
let e =
|
|
40915
|
+
let e = p0(r, t);
|
|
40897
40916
|
n.ordered.push({
|
|
40898
40917
|
file: r,
|
|
40899
40918
|
cls: e
|
|
@@ -40903,17 +40922,17 @@ var S$ = o("F0FileItem", r(x$)), C$ = S$, w$ = 2, T$ = 70, E$ = .08, D$ = 6, O$
|
|
|
40903
40922
|
}) : n.files.push(r);
|
|
40904
40923
|
}
|
|
40905
40924
|
return n;
|
|
40906
|
-
},
|
|
40925
|
+
}, h0 = (e) => ({
|
|
40907
40926
|
url: e.url,
|
|
40908
40927
|
name: e.name,
|
|
40909
40928
|
thumbnailUrl: e.thumbnailUrl,
|
|
40910
|
-
mimeType:
|
|
40911
|
-
}),
|
|
40929
|
+
mimeType: o0(e)
|
|
40930
|
+
}), g0 = {
|
|
40912
40931
|
ArrowLeft: "previous",
|
|
40913
40932
|
ArrowRight: "next",
|
|
40914
40933
|
Home: "first",
|
|
40915
40934
|
End: "last"
|
|
40916
|
-
},
|
|
40935
|
+
}, _0 = "data-viewer-stage", v0 = "data-viewer-chrome", y0 = [
|
|
40917
40936
|
"menu",
|
|
40918
40937
|
"menubar",
|
|
40919
40938
|
"menuitem",
|
|
@@ -40925,24 +40944,24 @@ var S$ = o("F0FileItem", r(x$)), C$ = S$, w$ = 2, T$ = 70, E$ = .08, D$ = 6, O$
|
|
|
40925
40944
|
"radiogroup",
|
|
40926
40945
|
"grid",
|
|
40927
40946
|
"spinbutton"
|
|
40928
|
-
].map((e) => `[role="${e}"]`).join(","),
|
|
40947
|
+
].map((e) => `[role="${e}"]`).join(","), b0 = (e) => e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement || e instanceof HTMLElement && e.isContentEditable, x0 = (e) => {
|
|
40929
40948
|
let t = window.getSelection();
|
|
40930
40949
|
if (!t || t.isCollapsed || t.rangeCount === 0) return !1;
|
|
40931
40950
|
let n = t.anchorNode;
|
|
40932
40951
|
return n !== null && e.contains(n);
|
|
40933
|
-
},
|
|
40934
|
-
let n =
|
|
40952
|
+
}, S0 = (e, t) => e === t || e.hasAttribute("data-viewer-stage") ? !0 : e instanceof HTMLIFrameElement ? e.closest(`[${_0}]`) !== null : (e instanceof HTMLButtonElement || e.getAttribute("role") === "button") && e.closest("[data-viewer-chrome]") !== null, C0 = (e, t) => {
|
|
40953
|
+
let n = g0[e.key];
|
|
40935
40954
|
if (!n || !t || e.defaultPrevented || e.isComposing || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) return null;
|
|
40936
40955
|
let r = e.target;
|
|
40937
|
-
return !(r instanceof Element) || !t.contains(r) ||
|
|
40938
|
-
},
|
|
40956
|
+
return !(r instanceof Element) || !t.contains(r) || b0(r) || r.closest(y0) !== null || r.closest("[data-viewer-owns-arrows]") !== null || !S0(r, t) || x0(t) ? null : n;
|
|
40957
|
+
}, w0 = ({ enabled: e, rootRef: t, onPage: n }) => {
|
|
40939
40958
|
let r = V(n);
|
|
40940
40959
|
Gr(() => {
|
|
40941
40960
|
r.current = n;
|
|
40942
40961
|
}), B(() => {
|
|
40943
40962
|
if (!e) return;
|
|
40944
40963
|
let n = 0, i = (e) => {
|
|
40945
|
-
let i =
|
|
40964
|
+
let i = C0(e, t.current);
|
|
40946
40965
|
if (!i) return;
|
|
40947
40966
|
e.preventDefault();
|
|
40948
40967
|
let a = performance.now();
|
|
@@ -40950,89 +40969,89 @@ var S$ = o("F0FileItem", r(x$)), C$ = S$, w$ = 2, T$ = 70, E$ = .08, D$ = 6, O$
|
|
|
40950
40969
|
};
|
|
40951
40970
|
return window.addEventListener("keydown", i), () => window.removeEventListener("keydown", i);
|
|
40952
40971
|
}, [e, t]);
|
|
40953
|
-
},
|
|
40972
|
+
}, T0 = (e, t, n) => n === 0 ? 0 : ((e + t) % n + n) % n, E0 = (e, t) => Number.isInteger(e) && e >= 0 && e < t, D0 = (e, t) => {
|
|
40954
40973
|
switch (t.type) {
|
|
40955
|
-
case "open": return
|
|
40974
|
+
case "open": return E0(t.index, t.items.length) ? {
|
|
40956
40975
|
items: t.items,
|
|
40957
40976
|
index: t.index,
|
|
40958
40977
|
origin: t.origin
|
|
40959
40978
|
} : e;
|
|
40960
40979
|
case "step": return !e || e.items.length < 2 ? e : {
|
|
40961
40980
|
...e,
|
|
40962
|
-
index:
|
|
40981
|
+
index: T0(e.index, t.delta, e.items.length)
|
|
40963
40982
|
};
|
|
40964
|
-
case "goTo": return !e || t.index === e.index || !
|
|
40983
|
+
case "goTo": return !e || t.index === e.index || !E0(t.index, e.items.length) ? e : {
|
|
40965
40984
|
...e,
|
|
40966
40985
|
index: t.index
|
|
40967
40986
|
};
|
|
40968
40987
|
case "close": return null;
|
|
40969
40988
|
}
|
|
40970
|
-
},
|
|
40989
|
+
}, O0 = (e, t) => ({
|
|
40971
40990
|
kind: "image",
|
|
40972
40991
|
key: t,
|
|
40973
40992
|
image: e
|
|
40974
|
-
}),
|
|
40975
|
-
let r =
|
|
40993
|
+
}), k0 = (e, t, n) => {
|
|
40994
|
+
let r = p0(e, n);
|
|
40976
40995
|
switch (r.bucket) {
|
|
40977
40996
|
case "image": return {
|
|
40978
40997
|
kind: "image",
|
|
40979
40998
|
key: t,
|
|
40980
|
-
image:
|
|
40999
|
+
image: h0(e),
|
|
40981
41000
|
size: e.size
|
|
40982
41001
|
};
|
|
40983
41002
|
case "video": return {
|
|
40984
41003
|
kind: "video",
|
|
40985
41004
|
key: t,
|
|
40986
|
-
file:
|
|
41005
|
+
file: d0(e)
|
|
40987
41006
|
};
|
|
40988
41007
|
case "audio": return {
|
|
40989
41008
|
kind: "audio",
|
|
40990
41009
|
key: t,
|
|
40991
|
-
file:
|
|
41010
|
+
file: d0(e)
|
|
40992
41011
|
};
|
|
40993
41012
|
case "document": return r.kind === "archive" ? null : {
|
|
40994
41013
|
kind: "document",
|
|
40995
41014
|
key: t,
|
|
40996
|
-
file:
|
|
41015
|
+
file: d0(e),
|
|
40997
41016
|
documentKind: r.kind,
|
|
40998
41017
|
url: r.url,
|
|
40999
41018
|
rendering: r.rendering
|
|
41000
41019
|
};
|
|
41001
41020
|
case "file": return null;
|
|
41002
41021
|
}
|
|
41003
|
-
},
|
|
41022
|
+
}, A0 = (e, t) => `${e}:${t}`, j0 = (e) => e.kind === "image" ? e.image.name : e.file.name, M0 = (e) => e.kind === "image" ? e.image.url : e.file.url, N0 = (e) => e.kind === "image" ? e.image.mimeType : o0(e.file), P0 = (e) => {
|
|
41004
41023
|
let t = e.lastIndexOf(".");
|
|
41005
41024
|
return `${t > 0 ? e.slice(0, t) : e}.pdf`;
|
|
41006
|
-
},
|
|
41007
|
-
url:
|
|
41008
|
-
name:
|
|
41009
|
-
}),
|
|
41025
|
+
}, F0 = (e) => ({
|
|
41026
|
+
url: M0(e),
|
|
41027
|
+
name: j0(e)
|
|
41028
|
+
}), I0 = () => import("./F0DocumentViewer-CEuF9b_u.js"), L0 = (e, t) => {
|
|
41010
41029
|
if (e.length < 2) return [];
|
|
41011
|
-
let n =
|
|
41030
|
+
let n = T0(t, 1, e.length), r = T0(t, -1, e.length);
|
|
41012
41031
|
return [.../* @__PURE__ */ new Set([n, r])].filter((e) => e !== t).map((t) => e[t]);
|
|
41013
|
-
},
|
|
41032
|
+
}, R0 = (e) => {
|
|
41014
41033
|
let t = new Image();
|
|
41015
41034
|
t.src = e, t.decode?.().catch(() => void 0);
|
|
41016
|
-
},
|
|
41035
|
+
}, z0 = (e, t, n) => {
|
|
41017
41036
|
let { urlCache: r } = H$();
|
|
41018
41037
|
B(() => {
|
|
41019
41038
|
if (!e || !n) return;
|
|
41020
41039
|
let i = [];
|
|
41021
|
-
for (let n of
|
|
41040
|
+
for (let n of L0(e, t)) {
|
|
41022
41041
|
if (n.kind === "document") {
|
|
41023
|
-
|
|
41042
|
+
I0().catch(() => void 0);
|
|
41024
41043
|
continue;
|
|
41025
41044
|
}
|
|
41026
41045
|
if (n.kind !== "image" || (n.size ?? 0) > 10485760) continue;
|
|
41027
41046
|
let e = n.image.url;
|
|
41028
41047
|
if (!r || R$(e)) {
|
|
41029
|
-
|
|
41048
|
+
R0(e);
|
|
41030
41049
|
continue;
|
|
41031
41050
|
}
|
|
41032
41051
|
r.acquire(e);
|
|
41033
41052
|
let t = !1, a = () => {
|
|
41034
41053
|
let n = r.getSnapshot(e);
|
|
41035
|
-
!t && n.status === "ready" && (t = !0,
|
|
41054
|
+
!t && n.status === "ready" && (t = !0, R0(n.url));
|
|
41036
41055
|
}, o = r.subscribe(e, a);
|
|
41037
41056
|
a(), i.push(() => {
|
|
41038
41057
|
o(), r.release(e);
|
|
@@ -41045,12 +41064,12 @@ var S$ = o("F0FileItem", r(x$)), C$ = S$, w$ = 2, T$ = 70, E$ = .08, D$ = 6, O$
|
|
|
41045
41064
|
n,
|
|
41046
41065
|
r
|
|
41047
41066
|
]);
|
|
41048
|
-
},
|
|
41067
|
+
}, B0 = Br(() => I0().then((e) => ({ default: e.F0DocumentViewer }))), V0 = Br(() => import("./F0VideoPlayer-DUw-DouS.js").then((e) => ({ default: e.F0VideoPlayer }))), H0 = Br(() => import("./F0AudioPlayer-Cd9nIQX5.js").then((e) => ({ default: e.F0AudioPlayer }))), U0 = 24, W0 = () => {}, G0 = R(({ item: e, reloadKey: t = 0, direction: n, immersive: r = !1, onDownload: i, onSettled: a }, o) => {
|
|
41049
41068
|
let { reducedMotion: s } = H$(), l = e.kind === "document";
|
|
41050
41069
|
return /* @__PURE__ */ U("div", {
|
|
41051
41070
|
ref: o,
|
|
41052
41071
|
tabIndex: -1,
|
|
41053
|
-
[
|
|
41072
|
+
[_0]: "",
|
|
41054
41073
|
className: c("relative flex min-h-0 flex-1 items-center justify-center overflow-hidden outline-none", l ? null : r ? "px-2 pb-2 [container-type:size] sm:px-0 sm:pb-6" : "bg-f1-background-secondary p-4 sm:p-6"),
|
|
41055
41074
|
"data-testid": "attachment-viewer-stage",
|
|
41056
41075
|
children: /* @__PURE__ */ U(Oe, {
|
|
@@ -41063,7 +41082,7 @@ var S$ = o("F0FileItem", r(x$)), C$ = S$, w$ = 2, T$ = 70, E$ = .08, D$ = 6, O$
|
|
|
41063
41082
|
variants: {
|
|
41064
41083
|
enter: (e) => s ? { opacity: 0 } : {
|
|
41065
41084
|
opacity: 0,
|
|
41066
|
-
x: e *
|
|
41085
|
+
x: e * U0
|
|
41067
41086
|
},
|
|
41068
41087
|
center: {
|
|
41069
41088
|
opacity: 1,
|
|
@@ -41086,11 +41105,11 @@ var S$ = o("F0FileItem", r(x$)), C$ = S$, w$ = 2, T$ = 70, E$ = .08, D$ = 6, O$
|
|
|
41086
41105
|
exit: "exit",
|
|
41087
41106
|
transition: {
|
|
41088
41107
|
duration: .18,
|
|
41089
|
-
ease:
|
|
41108
|
+
ease: p1
|
|
41090
41109
|
},
|
|
41091
41110
|
"data-testid": "attachment-viewer-page",
|
|
41092
41111
|
"data-item-kind": e.kind,
|
|
41093
|
-
children: /* @__PURE__ */ U(
|
|
41112
|
+
children: /* @__PURE__ */ U(K0, {
|
|
41094
41113
|
item: e,
|
|
41095
41114
|
onDownload: i,
|
|
41096
41115
|
onSettled: a
|
|
@@ -41099,32 +41118,32 @@ var S$ = o("F0FileItem", r(x$)), C$ = S$, w$ = 2, T$ = 70, E$ = .08, D$ = 6, O$
|
|
|
41099
41118
|
})
|
|
41100
41119
|
});
|
|
41101
41120
|
});
|
|
41102
|
-
|
|
41103
|
-
var
|
|
41121
|
+
G0.displayName = "AttachmentViewerStage";
|
|
41122
|
+
var K0 = ({ item: e, onDownload: t, onSettled: n }) => {
|
|
41104
41123
|
let r = () => n(e.key);
|
|
41105
41124
|
switch (e.kind) {
|
|
41106
|
-
case "image": return /* @__PURE__ */ U(
|
|
41125
|
+
case "image": return /* @__PURE__ */ U(X0, {
|
|
41107
41126
|
image: e.image,
|
|
41108
41127
|
onDownload: t,
|
|
41109
41128
|
onSettled: r
|
|
41110
41129
|
});
|
|
41111
|
-
case "video": return /* @__PURE__ */ U(
|
|
41130
|
+
case "video": return /* @__PURE__ */ U(Z0, {
|
|
41112
41131
|
file: e.file,
|
|
41113
41132
|
onDownload: t,
|
|
41114
41133
|
onSettled: r
|
|
41115
41134
|
});
|
|
41116
|
-
case "document": return /* @__PURE__ */ U(
|
|
41135
|
+
case "document": return /* @__PURE__ */ U(Q0, {
|
|
41117
41136
|
item: e,
|
|
41118
41137
|
onDownload: t,
|
|
41119
41138
|
onSettled: r
|
|
41120
41139
|
});
|
|
41121
|
-
case "audio": return /* @__PURE__ */ U(
|
|
41140
|
+
case "audio": return /* @__PURE__ */ U(e2, {
|
|
41122
41141
|
file: e.file,
|
|
41123
41142
|
onDownload: t,
|
|
41124
41143
|
onSettled: r
|
|
41125
41144
|
});
|
|
41126
41145
|
}
|
|
41127
|
-
},
|
|
41146
|
+
}, q0 = (e, t) => {
|
|
41128
41147
|
let n = V(t);
|
|
41129
41148
|
Gr(() => {
|
|
41130
41149
|
n.current = t;
|
|
@@ -41133,7 +41152,7 @@ var W0 = ({ item: e, onDownload: t, onSettled: n }) => {
|
|
|
41133
41152
|
B(() => {
|
|
41134
41153
|
e && !r.current && (r.current = !0, n.current());
|
|
41135
41154
|
}, [e]);
|
|
41136
|
-
},
|
|
41155
|
+
}, J0 = (e) => {
|
|
41137
41156
|
let t = j();
|
|
41138
41157
|
B(() => {
|
|
41139
41158
|
t || e.current?.querySelector("video, audio")?.pause();
|
|
@@ -41141,7 +41160,7 @@ var W0 = ({ item: e, onDownload: t, onSettled: n }) => {
|
|
|
41141
41160
|
let t = e.current;
|
|
41142
41161
|
return () => t?.querySelector("video, audio")?.pause();
|
|
41143
41162
|
}, [e]);
|
|
41144
|
-
},
|
|
41163
|
+
}, Y0 = ({ item: e, onDownload: t }) => {
|
|
41145
41164
|
let n = a();
|
|
41146
41165
|
return /* @__PURE__ */ W("div", {
|
|
41147
41166
|
className: "pointer-events-auto flex max-w-sm flex-col items-center gap-3 rounded-lg bg-f1-background p-6 text-center",
|
|
@@ -41174,15 +41193,15 @@ var W0 = ({ item: e, onDownload: t, onSettled: n }) => {
|
|
|
41174
41193
|
})
|
|
41175
41194
|
]
|
|
41176
41195
|
});
|
|
41177
|
-
},
|
|
41196
|
+
}, X0 = ({ image: e, onDownload: t, onSettled: n }) => {
|
|
41178
41197
|
let r = e1(e.url), [i, a] = H(!1), [o, c] = H(!1), l = o || r.status === "error";
|
|
41179
|
-
return
|
|
41198
|
+
return q0(i || l, n), l ? /* @__PURE__ */ U(Y0, {
|
|
41180
41199
|
item: {
|
|
41181
41200
|
name: e.name,
|
|
41182
41201
|
mimeType: e.mimeType
|
|
41183
41202
|
},
|
|
41184
41203
|
onDownload: t
|
|
41185
|
-
}) : r.status === "loading" ? /* @__PURE__ */ U(s, { className: "size-24 rounded-lg" }) : /* @__PURE__ */ U(
|
|
41204
|
+
}) : r.status === "loading" ? /* @__PURE__ */ U(s, { className: "size-24 rounded-lg" }) : /* @__PURE__ */ U(_1, {
|
|
41186
41205
|
src: r.url,
|
|
41187
41206
|
alt: e.name,
|
|
41188
41207
|
eager: !0,
|
|
@@ -41190,9 +41209,9 @@ var W0 = ({ item: e, onDownload: t, onSettled: n }) => {
|
|
|
41190
41209
|
onError: () => c(!0),
|
|
41191
41210
|
className: "pointer-events-auto max-h-full max-w-full rounded-lg object-contain"
|
|
41192
41211
|
});
|
|
41193
|
-
},
|
|
41212
|
+
}, Z0 = ({ file: e, onDownload: t, onSettled: n }) => {
|
|
41194
41213
|
let r = a(), i = V(null), o = e1(e.url), c = e1(e.thumbnailUrl), [l, u] = H(!1), d = l || o.status === "error";
|
|
41195
|
-
return
|
|
41214
|
+
return q0(o.status !== "loading" || l, n), J0(i), d ? /* @__PURE__ */ U(Y0, {
|
|
41196
41215
|
item: {
|
|
41197
41216
|
name: e.name,
|
|
41198
41217
|
mimeType: e.mimeType
|
|
@@ -41206,7 +41225,7 @@ var W0 = ({ item: e, onDownload: t, onSettled: n }) => {
|
|
|
41206
41225
|
},
|
|
41207
41226
|
children: o.status === "ready" ? /* @__PURE__ */ U(Fr, {
|
|
41208
41227
|
fallback: /* @__PURE__ */ U(s, { className: "h-full w-full" }),
|
|
41209
|
-
children: /* @__PURE__ */ U(
|
|
41228
|
+
children: /* @__PURE__ */ U(V0, {
|
|
41210
41229
|
src: o.url,
|
|
41211
41230
|
ariaLabel: r.t("chat.videoPlayerLabel", { name: e.name }),
|
|
41212
41231
|
poster: c.status === "ready" ? c.url : void 0,
|
|
@@ -41216,26 +41235,26 @@ var W0 = ({ item: e, onDownload: t, onSettled: n }) => {
|
|
|
41216
41235
|
})
|
|
41217
41236
|
}) : /* @__PURE__ */ U(s, { className: "h-full w-full" })
|
|
41218
41237
|
});
|
|
41219
|
-
},
|
|
41238
|
+
}, Q0 = ({ item: e, onDownload: t, onSettled: n = W0 }) => {
|
|
41220
41239
|
let { file: r, documentKind: i, rendering: a, sender: o } = e, { htmlSandbox: c, htmlExecution: l } = H$(), u = e1(e.url);
|
|
41221
|
-
return
|
|
41240
|
+
return q0(u.status !== "loading", n), u.status === "error" ? /* @__PURE__ */ U(Y0, {
|
|
41222
41241
|
item: {
|
|
41223
41242
|
name: r.name,
|
|
41224
|
-
mimeType:
|
|
41243
|
+
mimeType: N0(e)
|
|
41225
41244
|
},
|
|
41226
41245
|
onDownload: t
|
|
41227
41246
|
}) : /* @__PURE__ */ U("div", {
|
|
41228
41247
|
className: "h-full w-full overflow-hidden",
|
|
41229
41248
|
children: u.status === "loading" ? /* @__PURE__ */ U(s, { className: "h-full w-full" }) : /* @__PURE__ */ U(Fr, {
|
|
41230
41249
|
fallback: /* @__PURE__ */ U(s, { className: "h-full w-full" }),
|
|
41231
|
-
children: /* @__PURE__ */ U(
|
|
41250
|
+
children: /* @__PURE__ */ U(B0, {
|
|
41232
41251
|
url: u.url,
|
|
41233
41252
|
kind: i,
|
|
41234
|
-
filename: a ?
|
|
41253
|
+
filename: a ? P0(r.name) : r.name,
|
|
41235
41254
|
mimeType: a ? "application/pdf" : r.mimeType,
|
|
41236
41255
|
initialScale: "page-width",
|
|
41237
41256
|
withCredentials: !1,
|
|
41238
|
-
language: i === "code" ?
|
|
41257
|
+
language: i === "code" ? X1(r) ?? void 0 : void 0,
|
|
41239
41258
|
htmlSandbox: c,
|
|
41240
41259
|
htmlExecution: l,
|
|
41241
41260
|
sender: o,
|
|
@@ -41244,7 +41263,7 @@ var W0 = ({ item: e, onDownload: t, onSettled: n }) => {
|
|
|
41244
41263
|
})
|
|
41245
41264
|
})
|
|
41246
41265
|
});
|
|
41247
|
-
},
|
|
41266
|
+
}, $0 = (e) => {
|
|
41248
41267
|
let { urlCache: t } = H$(), n = t !== null && !R$(e), [r, i] = H(!1), a = e1(e, { enabled: !n || r }), o = V(a), s = V([]);
|
|
41249
41268
|
return Gr(() => {
|
|
41250
41269
|
if (o.current = a, !r || a.status === "loading") return;
|
|
@@ -41258,9 +41277,9 @@ var W0 = ({ item: e, onDownload: t, onSettled: n }) => {
|
|
|
41258
41277
|
reject: t
|
|
41259
41278
|
}), i(!0));
|
|
41260
41279
|
}) : e, [n, e]);
|
|
41261
|
-
},
|
|
41262
|
-
let r = V(null), i =
|
|
41263
|
-
return
|
|
41280
|
+
}, e2 = ({ file: e, onDownload: t, onSettled: n }) => {
|
|
41281
|
+
let r = V(null), i = $0(e.url), [a, o] = H(!1);
|
|
41282
|
+
return q0(!0, n), J0(r), a ? /* @__PURE__ */ U(Y0, {
|
|
41264
41283
|
item: {
|
|
41265
41284
|
name: e.name,
|
|
41266
41285
|
mimeType: e.mimeType
|
|
@@ -41287,7 +41306,7 @@ var W0 = ({ item: e, onDownload: t, onSettled: n }) => {
|
|
|
41287
41306
|
}),
|
|
41288
41307
|
/* @__PURE__ */ U(Fr, {
|
|
41289
41308
|
fallback: /* @__PURE__ */ U(s, { className: "h-10 w-full rounded" }),
|
|
41290
|
-
children: /* @__PURE__ */ U(
|
|
41309
|
+
children: /* @__PURE__ */ U(H0, {
|
|
41291
41310
|
src: i,
|
|
41292
41311
|
ariaLabel: e.name,
|
|
41293
41312
|
className: "w-full",
|
|
@@ -41296,7 +41315,7 @@ var W0 = ({ item: e, onDownload: t, onSettled: n }) => {
|
|
|
41296
41315
|
})
|
|
41297
41316
|
]
|
|
41298
41317
|
});
|
|
41299
|
-
},
|
|
41318
|
+
}, t2 = ({ icon: e, label: t, onClick: n, shortcut: r }) => /* @__PURE__ */ U("span", {
|
|
41300
41319
|
className: "shadow-sm pointer-events-auto z-50 flex rounded bg-f1-background",
|
|
41301
41320
|
ref: (e) => {
|
|
41302
41321
|
r && e?.querySelector("button")?.setAttribute("aria-keyshortcuts", r);
|
|
@@ -41308,25 +41327,25 @@ var W0 = ({ item: e, onDownload: t, onSettled: n }) => {
|
|
|
41308
41327
|
label: t,
|
|
41309
41328
|
onClick: n
|
|
41310
41329
|
})
|
|
41311
|
-
}),
|
|
41330
|
+
}), n2 = (e, t) => {
|
|
41312
41331
|
let n = e.lastIndexOf("."), r = n > 0 ? e.slice(n + 1).trim() : "";
|
|
41313
41332
|
return r && r.length <= 5 ? r.toUpperCase() : nt({
|
|
41314
41333
|
name: e,
|
|
41315
41334
|
type: t ?? ""
|
|
41316
41335
|
}).type;
|
|
41317
|
-
},
|
|
41336
|
+
}, r2 = "min-w-0 truncate text-lg font-semibold leading-6 text-f1-foreground", i2 = ({ icon: e, label: t, onClick: n }) => /* @__PURE__ */ U(me, {
|
|
41318
41337
|
variant: "outline",
|
|
41319
41338
|
hideLabel: !0,
|
|
41320
41339
|
icon: e,
|
|
41321
41340
|
label: t,
|
|
41322
41341
|
onClick: n
|
|
41323
|
-
}),
|
|
41324
|
-
let f = a(), p =
|
|
41342
|
+
}), a2 = ({ item: e, index: t, count: n, onDownload: r, onReload: i, onClose: o, onPrevious: s, onNext: l, immersive: u = !1, titleAs: d = "dialog" }) => {
|
|
41343
|
+
let f = a(), p = j0(e), m = N0(e), h = n > 1, g = e.kind === "document" ? e.sender : void 0, _ = /* @__PURE__ */ U("bdi", {
|
|
41325
41344
|
dir: "auto",
|
|
41326
41345
|
children: p || (e.kind === "image" ? f.chat.imagePreview : f.chat.documentPreview)
|
|
41327
|
-
}), v = u ?
|
|
41346
|
+
}), v = u ? t2 : i2;
|
|
41328
41347
|
return /* @__PURE__ */ W("div", {
|
|
41329
|
-
[
|
|
41348
|
+
[v0]: "",
|
|
41330
41349
|
className: c("flex shrink-0 items-center gap-3 py-3 pl-4 pr-3", u ? "pointer-events-auto" : "border-0 border-b border-solid border-f1-border-secondary"),
|
|
41331
41350
|
"data-testid": "attachment-viewer-header",
|
|
41332
41351
|
children: [
|
|
@@ -41343,18 +41362,18 @@ var W0 = ({ item: e, onDownload: t, onSettled: n }) => {
|
|
|
41343
41362
|
children: [d === "dialog" ? /* @__PURE__ */ U(YV, {
|
|
41344
41363
|
asChild: !0,
|
|
41345
41364
|
children: /* @__PURE__ */ U("span", {
|
|
41346
|
-
className:
|
|
41365
|
+
className: r2,
|
|
41347
41366
|
children: _
|
|
41348
41367
|
})
|
|
41349
41368
|
}) : /* @__PURE__ */ U("h2", {
|
|
41350
|
-
className: c("m-0",
|
|
41369
|
+
className: c("m-0", r2),
|
|
41351
41370
|
children: _
|
|
41352
41371
|
}), /* @__PURE__ */ W("span", {
|
|
41353
41372
|
className: "flex min-w-0 items-center gap-1.5 text-sm text-f1-foreground",
|
|
41354
41373
|
children: [
|
|
41355
41374
|
/* @__PURE__ */ U("span", {
|
|
41356
41375
|
className: "shrink-0",
|
|
41357
|
-
children:
|
|
41376
|
+
children: n2(p, m)
|
|
41358
41377
|
}),
|
|
41359
41378
|
h ? /* @__PURE__ */ W(Jr, { children: [/* @__PURE__ */ U("span", {
|
|
41360
41379
|
"aria-hidden": !0,
|
|
@@ -41423,25 +41442,25 @@ var W0 = ({ item: e, onDownload: t, onSettled: n }) => {
|
|
|
41423
41442
|
})
|
|
41424
41443
|
]
|
|
41425
41444
|
});
|
|
41426
|
-
},
|
|
41445
|
+
}, o2 = ({ imagesOnly: e, onPrevious: t, onNext: n }) => {
|
|
41427
41446
|
let r = a(), i = e ? r.chat.previousImage : r.chat.previousAttachment, o = e ? r.chat.nextImage : r.chat.nextAttachment;
|
|
41428
41447
|
return /* @__PURE__ */ W("div", {
|
|
41429
|
-
[
|
|
41448
|
+
[v0]: "",
|
|
41430
41449
|
className: "pointer-events-none absolute inset-x-0 bottom-0 z-10 flex items-center justify-center gap-2 p-3 sm:inset-y-0 sm:justify-between",
|
|
41431
41450
|
"data-testid": "attachment-viewer-nav",
|
|
41432
|
-
children: [/* @__PURE__ */ U(
|
|
41451
|
+
children: [/* @__PURE__ */ U(t2, {
|
|
41433
41452
|
icon: jt,
|
|
41434
41453
|
label: i,
|
|
41435
41454
|
onClick: t,
|
|
41436
41455
|
shortcut: "ArrowLeft"
|
|
41437
|
-
}), /* @__PURE__ */ U(
|
|
41456
|
+
}), /* @__PURE__ */ U(t2, {
|
|
41438
41457
|
icon: An,
|
|
41439
41458
|
label: o,
|
|
41440
41459
|
onClick: n,
|
|
41441
41460
|
shortcut: "ArrowRight"
|
|
41442
41461
|
})]
|
|
41443
41462
|
});
|
|
41444
|
-
},
|
|
41463
|
+
}, s2 = (e) => c("pointer-events-none absolute flex justify-center", e ? "inset-x-0 bottom-16 top-0 sm:inset-x-20 sm:bottom-0" : "inset-x-2 bottom-16 top-2 sm:inset-x-20 sm:inset-y-6"), c2 = (e) => c("flex h-full w-full flex-col", !e && "pointer-events-auto max-w-5xl overflow-hidden rounded-xl bg-f1-background shadow-lg"), l2 = ({ state: e, onClose: t, onStep: n, onGoTo: r, onDownloaded: i, onFocusFallback: o }) => {
|
|
41445
41464
|
let s = a(), c = n1(), l = e !== null, [u] = H(() => typeof document > "u" ? null : document.body), f = V(null), p = V(null), [m, h] = H(null), g = V(!1), _ = V(null);
|
|
41446
41465
|
Gr(() => {
|
|
41447
41466
|
if (l && !_.current) {
|
|
@@ -41465,14 +41484,14 @@ var W0 = ({ item: e, onDownload: t, onSettled: n }) => {
|
|
|
41465
41484
|
D,
|
|
41466
41485
|
y
|
|
41467
41486
|
]);
|
|
41468
|
-
|
|
41487
|
+
w0({
|
|
41469
41488
|
enabled: l && S,
|
|
41470
41489
|
rootRef: f,
|
|
41471
41490
|
onPage: O
|
|
41472
41491
|
});
|
|
41473
41492
|
let [k, A] = H(null), [j, M] = H(0);
|
|
41474
|
-
if (
|
|
41475
|
-
let N =
|
|
41493
|
+
if (z0(l ? v : void 0, b, x !== void 0 && k === x.key), !e || !x) return null;
|
|
41494
|
+
let N = F0(x), P = () => {
|
|
41476
41495
|
c(N.url, N.name), i?.(x, x.kind === "document" && !!x.rendering);
|
|
41477
41496
|
}, ee = x.kind === "image" || x.kind === "video", te = x.kind === "document" && x.documentKind === "html" ? () => M((e) => e + 1) : void 0;
|
|
41478
41497
|
return /* @__PURE__ */ U(XV, {
|
|
@@ -41509,12 +41528,12 @@ var W0 = ({ item: e, onDownload: t, onSettled: n }) => {
|
|
|
41509
41528
|
onClick: t
|
|
41510
41529
|
}),
|
|
41511
41530
|
/* @__PURE__ */ U("div", {
|
|
41512
|
-
className:
|
|
41531
|
+
className: s2(ee),
|
|
41513
41532
|
children: /* @__PURE__ */ W("div", {
|
|
41514
|
-
className:
|
|
41533
|
+
className: c2(ee),
|
|
41515
41534
|
"data-testid": "attachment-viewer-panel",
|
|
41516
41535
|
"data-immersive": ee ? "" : void 0,
|
|
41517
|
-
children: [/* @__PURE__ */ U(
|
|
41536
|
+
children: [/* @__PURE__ */ U(a2, {
|
|
41518
41537
|
item: x,
|
|
41519
41538
|
index: b,
|
|
41520
41539
|
count: y,
|
|
@@ -41524,7 +41543,7 @@ var W0 = ({ item: e, onDownload: t, onSettled: n }) => {
|
|
|
41524
41543
|
immersive: ee
|
|
41525
41544
|
}), /* @__PURE__ */ U(d, {
|
|
41526
41545
|
container: m,
|
|
41527
|
-
children: /* @__PURE__ */ U(
|
|
41546
|
+
children: /* @__PURE__ */ U(G0, {
|
|
41528
41547
|
ref: p,
|
|
41529
41548
|
item: x,
|
|
41530
41549
|
reloadKey: j,
|
|
@@ -41536,7 +41555,7 @@ var W0 = ({ item: e, onDownload: t, onSettled: n }) => {
|
|
|
41536
41555
|
})]
|
|
41537
41556
|
})
|
|
41538
41557
|
}),
|
|
41539
|
-
S ? /* @__PURE__ */ U(
|
|
41558
|
+
S ? /* @__PURE__ */ U(o2, {
|
|
41540
41559
|
imagesOnly: C,
|
|
41541
41560
|
onPrevious: () => E(-1),
|
|
41542
41561
|
onNext: () => E(1)
|
|
@@ -41548,9 +41567,9 @@ var W0 = ({ item: e, onDownload: t, onSettled: n }) => {
|
|
|
41548
41567
|
]
|
|
41549
41568
|
})
|
|
41550
41569
|
});
|
|
41551
|
-
},
|
|
41552
|
-
let n =
|
|
41553
|
-
return n ? /* @__PURE__ */ U(
|
|
41570
|
+
}, u2 = ({ onDownloaded: e, onFocusFallback: t }) => {
|
|
41571
|
+
let n = f1(), { close: r, step: i, goTo: a } = d1();
|
|
41572
|
+
return n ? /* @__PURE__ */ U(l2, {
|
|
41554
41573
|
state: n,
|
|
41555
41574
|
onClose: r,
|
|
41556
41575
|
onStep: i,
|
|
@@ -41558,13 +41577,13 @@ var W0 = ({ item: e, onDownload: t, onSettled: n }) => {
|
|
|
41558
41577
|
onDownloaded: e,
|
|
41559
41578
|
onFocusFallback: t
|
|
41560
41579
|
}) : null;
|
|
41561
|
-
},
|
|
41580
|
+
}, d2 = ({ children: e, onEvent: t, onFocusFallback: n }) => {
|
|
41562
41581
|
let [r, i] = H(null), a = V(r), o = V(t);
|
|
41563
41582
|
Gr(() => {
|
|
41564
41583
|
o.current = t;
|
|
41565
41584
|
});
|
|
41566
41585
|
let s = z((e) => {
|
|
41567
|
-
let t = a.current, n =
|
|
41586
|
+
let t = a.current, n = D0(t, e);
|
|
41568
41587
|
return n === t ? null : (a.current = n, i(n), n);
|
|
41569
41588
|
}, []), c = Kr(() => {
|
|
41570
41589
|
let e = (e) => {
|
|
@@ -41613,7 +41632,7 @@ var W0 = ({ item: e, onDownload: t, onSettled: n }) => {
|
|
|
41613
41632
|
}, []), u = Kr(() => ({
|
|
41614
41633
|
imagePreview: null,
|
|
41615
41634
|
openImagePreview: (e, t) => c.open({
|
|
41616
|
-
items: e.map((e, t) =>
|
|
41635
|
+
items: e.map((e, t) => O0(e, A0(t, e.url))),
|
|
41617
41636
|
index: t
|
|
41618
41637
|
}),
|
|
41619
41638
|
closeImagePreview: c.close,
|
|
@@ -41621,7 +41640,7 @@ var W0 = ({ item: e, onDownload: t, onSettled: n }) => {
|
|
|
41621
41640
|
}), [c]), d = Kr(() => ({
|
|
41622
41641
|
documentPreview: null,
|
|
41623
41642
|
openDocumentPreview: (e) => {
|
|
41624
|
-
let t =
|
|
41643
|
+
let t = k0(e, A0(0, e.url));
|
|
41625
41644
|
t && c.open({
|
|
41626
41645
|
items: [t],
|
|
41627
41646
|
index: 0
|
|
@@ -41629,15 +41648,15 @@ var W0 = ({ item: e, onDownload: t, onSettled: n }) => {
|
|
|
41629
41648
|
},
|
|
41630
41649
|
closeDocumentPreview: c.close
|
|
41631
41650
|
}), [c]);
|
|
41632
|
-
return /* @__PURE__ */ U(
|
|
41651
|
+
return /* @__PURE__ */ U(c1.Provider, {
|
|
41633
41652
|
value: c,
|
|
41634
41653
|
children: /* @__PURE__ */ U(r1.Provider, {
|
|
41635
41654
|
value: u,
|
|
41636
41655
|
children: /* @__PURE__ */ W(i1.Provider, {
|
|
41637
41656
|
value: d,
|
|
41638
|
-
children: [e, /* @__PURE__ */ U(
|
|
41657
|
+
children: [e, /* @__PURE__ */ U(l1.Provider, {
|
|
41639
41658
|
value: r,
|
|
41640
|
-
children: /* @__PURE__ */ U(
|
|
41659
|
+
children: /* @__PURE__ */ U(u2, {
|
|
41641
41660
|
onDownloaded: l,
|
|
41642
41661
|
onFocusFallback: n
|
|
41643
41662
|
})
|
|
@@ -41645,53 +41664,53 @@ var W0 = ({ item: e, onDownload: t, onSettled: n }) => {
|
|
|
41645
41664
|
})
|
|
41646
41665
|
})
|
|
41647
41666
|
});
|
|
41648
|
-
},
|
|
41667
|
+
}, f2 = d2, p2 = Lr({
|
|
41649
41668
|
remotePreviews: !1,
|
|
41650
41669
|
provided: !1
|
|
41651
|
-
}),
|
|
41670
|
+
}), m2 = () => Hr(p2), h2 = ({ filePreviews: e, children: t }) => {
|
|
41652
41671
|
let n = ue(), r = !!(e?.resolveUrl || e?.directUrls);
|
|
41653
|
-
return /* @__PURE__ */ U(
|
|
41654
|
-
value: r ?
|
|
41672
|
+
return /* @__PURE__ */ U(p2.Provider, {
|
|
41673
|
+
value: r ? g2 : _2,
|
|
41655
41674
|
children: /* @__PURE__ */ U(V$, {
|
|
41656
41675
|
reducedMotion: n,
|
|
41657
41676
|
resolveUrl: e?.resolveUrl,
|
|
41658
|
-
children: /* @__PURE__ */ U(
|
|
41677
|
+
children: /* @__PURE__ */ U(f2, { children: t })
|
|
41659
41678
|
})
|
|
41660
41679
|
});
|
|
41661
|
-
},
|
|
41680
|
+
}, g2 = {
|
|
41662
41681
|
remotePreviews: !0,
|
|
41663
41682
|
provided: !0
|
|
41664
|
-
},
|
|
41683
|
+
}, _2 = {
|
|
41665
41684
|
remotePreviews: !1,
|
|
41666
41685
|
provided: !0
|
|
41667
|
-
},
|
|
41668
|
-
let n =
|
|
41686
|
+
}, v2 = Er.min, y2 = Er.max, b2 = Er.default, { min: x2, max: S2, default: C2, mainMin: w2, mainHardMin: T2, splitMinFrame: E2 } = Er, D2 = E2, O2 = (e, t) => {
|
|
41687
|
+
let n = k2(t), r = Math.min(S2, n);
|
|
41669
41688
|
if (!Number.isFinite(e) || e <= 0) return {
|
|
41670
|
-
min:
|
|
41689
|
+
min: x2,
|
|
41671
41690
|
max: n,
|
|
41672
41691
|
autoMax: r,
|
|
41673
41692
|
shouldOverlay: !1
|
|
41674
41693
|
};
|
|
41675
|
-
if (e <
|
|
41676
|
-
min:
|
|
41694
|
+
if (e < D2) return {
|
|
41695
|
+
min: x2,
|
|
41677
41696
|
max: n,
|
|
41678
41697
|
autoMax: r,
|
|
41679
41698
|
shouldOverlay: !0
|
|
41680
41699
|
};
|
|
41681
|
-
let i = Math.min(n, Math.max(e -
|
|
41700
|
+
let i = Math.min(n, Math.max(e - T2, x2));
|
|
41682
41701
|
return {
|
|
41683
|
-
min:
|
|
41702
|
+
min: x2,
|
|
41684
41703
|
max: i,
|
|
41685
|
-
autoMax: Math.min(
|
|
41704
|
+
autoMax: Math.min(S2, i, Math.max(e - w2, x2)),
|
|
41686
41705
|
shouldOverlay: !1
|
|
41687
41706
|
};
|
|
41688
|
-
},
|
|
41689
|
-
let { min: r, max: i, autoMax: a } =
|
|
41690
|
-
return Math.max(r, Math.min(e ===
|
|
41691
|
-
},
|
|
41707
|
+
}, k2 = (e) => e !== void 0 && Number.isFinite(e) ? Math.max(x2, e) : S2, A2 = (e, t, n) => {
|
|
41708
|
+
let { min: r, max: i, autoMax: a } = O2(t, n);
|
|
41709
|
+
return Math.max(r, Math.min(e === C2 ? a : i, e));
|
|
41710
|
+
}, j2 = "f0-side-panel-width", M2 = "f0-side-panel-open", N2 = "f0-side-panel-layout", P2 = "f0-side-panel-view-id", F2 = ["ONE-ai-chat-width"], I2 = ["ONE-ai-chat-open"], L2 = ["ONE-ai-chat-visualization-mode"], R2 = ["ONE-ai-chat-panel-content-id"];
|
|
41692
41711
|
//#endregion
|
|
41693
41712
|
//#region src/elements/lib/local-storage.ts
|
|
41694
|
-
function
|
|
41713
|
+
function z2(e, t) {
|
|
41695
41714
|
try {
|
|
41696
41715
|
let n = localStorage.getItem(e);
|
|
41697
41716
|
return n === null ? t : JSON.parse(n);
|
|
@@ -41699,18 +41718,18 @@ function I2(e, t) {
|
|
|
41699
41718
|
return t;
|
|
41700
41719
|
}
|
|
41701
41720
|
}
|
|
41702
|
-
function
|
|
41721
|
+
function B2(e, t) {
|
|
41703
41722
|
try {
|
|
41704
41723
|
localStorage.setItem(e, JSON.stringify(t));
|
|
41705
41724
|
} catch {}
|
|
41706
41725
|
}
|
|
41707
41726
|
//#endregion
|
|
41708
41727
|
//#region src/elements/lib/persisted-state.ts
|
|
41709
|
-
function
|
|
41728
|
+
function V2({ key: e, legacyKeys: t, fallback: n, validate: r, shouldWrite: i, debounceMs: a = 0 }) {
|
|
41710
41729
|
let [o, s] = H(() => {
|
|
41711
41730
|
if (typeof window > "u") return n;
|
|
41712
41731
|
for (let n of [e, ...t ?? []]) {
|
|
41713
|
-
let e =
|
|
41732
|
+
let e = z2(n, null);
|
|
41714
41733
|
if (e !== null && (!r || r(e))) return e;
|
|
41715
41734
|
}
|
|
41716
41735
|
return n;
|
|
@@ -41718,10 +41737,10 @@ function R2({ key: e, legacyKeys: t, fallback: n, validate: r, shouldWrite: i, d
|
|
|
41718
41737
|
return B(() => {
|
|
41719
41738
|
if (typeof window > "u" || i && !i(o)) return;
|
|
41720
41739
|
if (a <= 0) {
|
|
41721
|
-
|
|
41740
|
+
B2(e, o);
|
|
41722
41741
|
return;
|
|
41723
41742
|
}
|
|
41724
|
-
let t = window.setTimeout(() =>
|
|
41743
|
+
let t = window.setTimeout(() => B2(e, o), a);
|
|
41725
41744
|
return () => window.clearTimeout(t);
|
|
41726
41745
|
}, [
|
|
41727
41746
|
e,
|
|
@@ -41732,29 +41751,29 @@ function R2({ key: e, legacyKeys: t, fallback: n, validate: r, shouldWrite: i, d
|
|
|
41732
41751
|
}
|
|
41733
41752
|
//#endregion
|
|
41734
41753
|
//#region src/blocks/ApplicationFrame/SidePanel/SidePanelProvider.tsx
|
|
41735
|
-
var
|
|
41736
|
-
let o = t.some((e) => e.available !== !1), s = t.some((e) => e.available !== !1 && e.restoresContent), [c, l] =
|
|
41737
|
-
key:
|
|
41738
|
-
legacyKeys:
|
|
41739
|
-
fallback:
|
|
41740
|
-
validate: (e) => typeof e == "number" && !isNaN(e) && e >=
|
|
41754
|
+
var H2 = Lr(null), { min: U2, max: W2 } = Er, G2 = 5e3, K2 = () => {}, q2 = [], J2 = ({ children: e, views: t = q2, side: n = "right", contentSide: r, resizable: i = !1, defaultLayout: a = "sidepanel" }) => {
|
|
41755
|
+
let o = t.some((e) => e.available !== !1), s = t.some((e) => e.available !== !1 && e.restoresContent), [c, l] = V2({
|
|
41756
|
+
key: j2,
|
|
41757
|
+
legacyKeys: F2,
|
|
41758
|
+
fallback: b2,
|
|
41759
|
+
validate: (e) => typeof e == "number" && !isNaN(e) && e >= U2 && e <= W2,
|
|
41741
41760
|
debounceMs: 150
|
|
41742
41761
|
}), [u, d] = H(!1), [f, p] = H(0), [m, h] = H(null), g = m?.maxWidth, _ = Kr(function() {
|
|
41743
|
-
return
|
|
41762
|
+
return O2(f, g);
|
|
41744
41763
|
}, [f, g]), v = Kr(function() {
|
|
41745
|
-
return
|
|
41764
|
+
return A2(c, f, g);
|
|
41746
41765
|
}, [
|
|
41747
41766
|
c,
|
|
41748
41767
|
f,
|
|
41749
41768
|
g
|
|
41750
|
-
]), y = re("(pointer: coarse)", { initializeWithValue: !0 }), b = re(`(max-width: ${Tr.md}px)`, { initializeWithValue: !0 }), x = y && b || _.shouldOverlay, S = o || m !== null, [C, w] =
|
|
41751
|
-
key:
|
|
41752
|
-
legacyKeys:
|
|
41769
|
+
]), y = re("(pointer: coarse)", { initializeWithValue: !0 }), b = re(`(max-width: ${Tr.md}px)`, { initializeWithValue: !0 }), x = y && b || _.shouldOverlay, S = o || m !== null, [C, w] = V2({
|
|
41770
|
+
key: M2,
|
|
41771
|
+
legacyKeys: I2,
|
|
41753
41772
|
fallback: a === "fullscreen",
|
|
41754
41773
|
validate: (e) => typeof e == "boolean"
|
|
41755
|
-
}), T = C && S, [E, D] =
|
|
41756
|
-
key:
|
|
41757
|
-
legacyKeys:
|
|
41774
|
+
}), T = C && S, [E, D] = V2({
|
|
41775
|
+
key: N2,
|
|
41776
|
+
legacyKeys: L2,
|
|
41758
41777
|
fallback: a,
|
|
41759
41778
|
validate: (e) => e === "sidepanel" || e === "fullscreen"
|
|
41760
41779
|
}), O = z(function(e) {
|
|
@@ -41762,9 +41781,9 @@ var z2 = Lr(null), { min: B2, max: V2 } = Er, H2 = 5e3, U2 = () => {}, W2 = [],
|
|
|
41762
41781
|
let n = typeof e == "function" ? e(t) : e;
|
|
41763
41782
|
return n === "fullscreen" && w(!0), n;
|
|
41764
41783
|
});
|
|
41765
|
-
}, [D, w]), [k, A] = H(() => E !== "fullscreen"), [j, M] =
|
|
41766
|
-
key:
|
|
41767
|
-
legacyKeys:
|
|
41784
|
+
}, [D, w]), [k, A] = H(() => E !== "fullscreen"), [j, M] = V2({
|
|
41785
|
+
key: P2,
|
|
41786
|
+
legacyKeys: R2,
|
|
41768
41787
|
fallback: null,
|
|
41769
41788
|
validate: (e) => e === null || typeof e == "string"
|
|
41770
41789
|
}), [N, P] = H(() => T && s ? j : null), [ee, te] = H({
|
|
@@ -41780,7 +41799,7 @@ var z2 = Lr(null), { min: B2, max: V2 } = Er, H2 = 5e3, U2 = () => {}, W2 = [],
|
|
|
41780
41799
|
}, []), ae = z(function() {
|
|
41781
41800
|
return P(null);
|
|
41782
41801
|
}, []), oe = z(function() {
|
|
41783
|
-
return l(
|
|
41802
|
+
return l(b2);
|
|
41784
41803
|
}, [l]);
|
|
41785
41804
|
B(function() {
|
|
41786
41805
|
N || M(m?.id ?? null);
|
|
@@ -41794,7 +41813,7 @@ var z2 = Lr(null), { min: B2, max: V2 } = Er, H2 = 5e3, U2 = () => {}, W2 = [],
|
|
|
41794
41813
|
if (!N) return;
|
|
41795
41814
|
let e = setTimeout(() => {
|
|
41796
41815
|
process.env.NODE_ENV !== "production" && console.warn(`[f0] Side panel restore for "${N}" timed out: no view answered it with present() or cancelRestore().`), P(null);
|
|
41797
|
-
},
|
|
41816
|
+
}, G2);
|
|
41798
41817
|
return () => clearTimeout(e);
|
|
41799
41818
|
}, [N]), B(function() {
|
|
41800
41819
|
if (!T) {
|
|
@@ -41860,47 +41879,47 @@ var z2 = Lr(null), { min: B2, max: V2 } = Er, H2 = 5e3, U2 = () => {}, W2 = [],
|
|
|
41860
41879
|
i,
|
|
41861
41880
|
k
|
|
41862
41881
|
]);
|
|
41863
|
-
return /* @__PURE__ */ U(
|
|
41882
|
+
return /* @__PURE__ */ U(H2.Provider, {
|
|
41864
41883
|
value: fe,
|
|
41865
41884
|
children: e
|
|
41866
41885
|
});
|
|
41867
|
-
},
|
|
41886
|
+
}, Y2 = Object.freeze({
|
|
41868
41887
|
hasAvailableView: !1,
|
|
41869
41888
|
open: !1,
|
|
41870
|
-
setOpen:
|
|
41889
|
+
setOpen: K2,
|
|
41871
41890
|
layout: "sidepanel",
|
|
41872
|
-
setLayout:
|
|
41891
|
+
setLayout: K2,
|
|
41873
41892
|
side: "right",
|
|
41874
|
-
setSide:
|
|
41893
|
+
setSide: K2,
|
|
41875
41894
|
contentSide: "right",
|
|
41876
|
-
setContentSide:
|
|
41895
|
+
setContentSide: K2,
|
|
41877
41896
|
activeContent: null,
|
|
41878
|
-
present:
|
|
41879
|
-
clear:
|
|
41897
|
+
present: K2,
|
|
41898
|
+
clear: K2,
|
|
41880
41899
|
restoringViewId: null,
|
|
41881
|
-
cancelRestore:
|
|
41882
|
-
width:
|
|
41883
|
-
setWidth:
|
|
41884
|
-
resetWidth:
|
|
41885
|
-
effectiveWidth:
|
|
41886
|
-
widthBounds:
|
|
41900
|
+
cancelRestore: K2,
|
|
41901
|
+
width: b2,
|
|
41902
|
+
setWidth: K2,
|
|
41903
|
+
resetWidth: K2,
|
|
41904
|
+
effectiveWidth: b2,
|
|
41905
|
+
widthBounds: O2(0),
|
|
41887
41906
|
panelOverlays: !1,
|
|
41888
|
-
setFrameWidth:
|
|
41907
|
+
setFrameWidth: K2,
|
|
41889
41908
|
isResizing: !1,
|
|
41890
|
-
setIsResizing:
|
|
41909
|
+
setIsResizing: K2,
|
|
41891
41910
|
resizable: !1,
|
|
41892
41911
|
shouldPlayEntranceAnimation: !0,
|
|
41893
|
-
setShouldPlayEntranceAnimation:
|
|
41912
|
+
setShouldPlayEntranceAnimation: K2
|
|
41894
41913
|
});
|
|
41895
|
-
function
|
|
41896
|
-
return Hr(
|
|
41914
|
+
function X2() {
|
|
41915
|
+
return Hr(H2) ?? Y2;
|
|
41897
41916
|
}
|
|
41898
|
-
function
|
|
41899
|
-
return Hr(
|
|
41917
|
+
function Z2() {
|
|
41918
|
+
return Hr(H2) !== null;
|
|
41900
41919
|
}
|
|
41901
41920
|
//#endregion
|
|
41902
41921
|
//#region src/blocks/ApplicationFrame/SidePanel/SidePanelResizeHandle.tsx
|
|
41903
|
-
var
|
|
41922
|
+
var Q2 = 16, $2 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, flushInnerSeam: i, side: o = "right", value: s, minValue: u, maxValue: d }) => {
|
|
41904
41923
|
let f = V(0), p = V(0), m = V(null), h = a(), g = z((e) => {
|
|
41905
41924
|
e.preventDefault(), f.current = e.clientX, r(!0);
|
|
41906
41925
|
}, [r]), _ = z(() => {
|
|
@@ -41931,10 +41950,10 @@ var Y2 = 16, X2 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
41931
41950
|
let r;
|
|
41932
41951
|
switch (n.key) {
|
|
41933
41952
|
case "ArrowLeft":
|
|
41934
|
-
r = o === "left" ? -16 :
|
|
41953
|
+
r = o === "left" ? -16 : Q2;
|
|
41935
41954
|
break;
|
|
41936
41955
|
case "ArrowRight":
|
|
41937
|
-
r = o === "left" ?
|
|
41956
|
+
r = o === "left" ? Q2 : -16;
|
|
41938
41957
|
break;
|
|
41939
41958
|
case "Home":
|
|
41940
41959
|
r = u - s;
|
|
@@ -41980,20 +41999,20 @@ var Y2 = 16, X2 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
41980
41999
|
})]
|
|
41981
42000
|
})
|
|
41982
42001
|
});
|
|
41983
|
-
}, { duration:
|
|
42002
|
+
}, { duration: e4, ease: t4 } = wr, n4 = { leaving: ({ exitStyle: e, closedClipPath: t, reducedMotion: n }) => n ? {
|
|
41984
42003
|
opacity: 0,
|
|
41985
42004
|
transition: { duration: 0 }
|
|
41986
42005
|
} : e === "hold" ? {
|
|
41987
42006
|
opacity: 0,
|
|
41988
42007
|
transition: {
|
|
41989
|
-
delay:
|
|
42008
|
+
delay: e4.base,
|
|
41990
42009
|
duration: 0
|
|
41991
42010
|
}
|
|
41992
42011
|
} : {
|
|
41993
42012
|
opacity: 0,
|
|
41994
42013
|
clipPath: t
|
|
41995
|
-
} },
|
|
41996
|
-
let { open: l, layout: u, shouldPlayEntranceAnimation: d, setShouldPlayEntranceAnimation: f, resizable: p, width: m, effectiveWidth: h, setWidth: g, resetWidth: _, widthBounds: v, panelOverlays: y, setIsResizing: b, side: x } =
|
|
42014
|
+
} }, r4 = ({ children: e, visible: t, side: n, exitStyle: r = "shrink", flushInnerSeam: i = !1, surfaceProps: a, surfaceRef: o, decorations: s }) => {
|
|
42015
|
+
let { open: l, layout: u, shouldPlayEntranceAnimation: d, setShouldPlayEntranceAnimation: f, resizable: p, width: m, effectiveWidth: h, setWidth: g, resetWidth: _, widthBounds: v, panelOverlays: y, setIsResizing: b, side: x } = X2(), S = t ?? l, C = ue(), w = (n ?? x) === "left", T = V(!1);
|
|
41997
42016
|
B(() => {
|
|
41998
42017
|
T.current = l;
|
|
41999
42018
|
});
|
|
@@ -42002,8 +42021,8 @@ var Y2 = 16, X2 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
42002
42021
|
if (D) return b(!0), () => b(!1);
|
|
42003
42022
|
}, [D, b]);
|
|
42004
42023
|
let { min: k, max: A } = v ?? {
|
|
42005
|
-
min:
|
|
42006
|
-
max:
|
|
42024
|
+
min: v2,
|
|
42025
|
+
max: y2
|
|
42007
42026
|
}, j = p && !E && !(y ?? !1) && A > k, N = Math.max(k, Math.min(A, h ?? m)), P = z((e) => {
|
|
42008
42027
|
g((t) => {
|
|
42009
42028
|
let n = t + e;
|
|
@@ -42014,8 +42033,8 @@ var Y2 = 16, X2 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
42014
42033
|
k,
|
|
42015
42034
|
A
|
|
42016
42035
|
]), ee = Kr(() => D || C ? { duration: 0 } : {
|
|
42017
|
-
duration:
|
|
42018
|
-
ease:
|
|
42036
|
+
duration: e4.base,
|
|
42037
|
+
ease: t4.outSwift
|
|
42019
42038
|
}, [D, C]), te = w ? "inset(0% 100% 0% 0%)" : "inset(0% 0% 0% 100%)", ne = {
|
|
42020
42039
|
exitStyle: r,
|
|
42021
42040
|
closedClipPath: te,
|
|
@@ -42024,7 +42043,7 @@ var Y2 = 16, X2 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
42024
42043
|
return /* @__PURE__ */ U(Oe, {
|
|
42025
42044
|
custom: ne,
|
|
42026
42045
|
children: S ? /* @__PURE__ */ W(M.div, {
|
|
42027
|
-
variants:
|
|
42046
|
+
variants: n4,
|
|
42028
42047
|
className: c("bg-f1-transparent pointer-events-auto relative flex h-full dark:bg-f1-background xs:py-1", E ? "xs:pr-1" : w ? "mr-auto" : "ml-auto xs:pr-1"),
|
|
42029
42048
|
initial: re ? {
|
|
42030
42049
|
opacity: 0,
|
|
@@ -42044,7 +42063,7 @@ var Y2 = 16, X2 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
42044
42063
|
d && f(!1);
|
|
42045
42064
|
},
|
|
42046
42065
|
children: [
|
|
42047
|
-
j && !w ? /* @__PURE__ */ U(
|
|
42066
|
+
j && !w ? /* @__PURE__ */ U($2, {
|
|
42048
42067
|
onResize: P,
|
|
42049
42068
|
onReset: _,
|
|
42050
42069
|
isResizing: D,
|
|
@@ -42065,7 +42084,7 @@ var Y2 = 16, X2 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
42065
42084
|
children: e
|
|
42066
42085
|
}), s]
|
|
42067
42086
|
}),
|
|
42068
|
-
j && w ? /* @__PURE__ */ U(
|
|
42087
|
+
j && w ? /* @__PURE__ */ U($2, {
|
|
42069
42088
|
onResize: P,
|
|
42070
42089
|
onReset: _,
|
|
42071
42090
|
isResizing: D,
|
|
@@ -42079,18 +42098,18 @@ var Y2 = 16, X2 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
42079
42098
|
]
|
|
42080
42099
|
}, "chat-wrapper") : null
|
|
42081
42100
|
});
|
|
42082
|
-
},
|
|
42101
|
+
}, i4 = Lr(!1), a4 = Lr(!1), o4 = () => Hr(a4), s4 = (e, { preferText: t = !1 } = {}) => {
|
|
42083
42102
|
let n = Array.from(e.files ?? []);
|
|
42084
42103
|
return n.length === 0 || t && e.getData("text/plain").trim() !== "" && n.every((e) => e.type.startsWith("image/")) ? [] : n;
|
|
42085
|
-
},
|
|
42104
|
+
}, c4 = ({ enabled: e, onFiles: t, preferText: n = !1 }) => z((r) => {
|
|
42086
42105
|
if (!e) return;
|
|
42087
|
-
let i =
|
|
42106
|
+
let i = s4(r.clipboardData, { preferText: n });
|
|
42088
42107
|
i.length !== 0 && (r.preventDefault(), t(i));
|
|
42089
42108
|
}, [
|
|
42090
42109
|
e,
|
|
42091
42110
|
t,
|
|
42092
42111
|
n
|
|
42093
|
-
]),
|
|
42112
|
+
]), l4 = "text-base leading-5 max-sm:text-[16px] [@media(pointer:coarse)]:text-[16px]", u4 = `whitespace-pre-wrap break-words p-3 ${l4}`, d4 = "min-h-[44px] max-h-[140px]", f4 = ({ placeholders: e, defaultPlaceholder: t, inputValue: n, inProgress: r }) => {
|
|
42094
42113
|
let i = ue(), [a, o] = H(""), [s, l] = H(0), [u, d] = H(!1), f = V(null), p = V(null), m = V(null), h = e[s] ?? t;
|
|
42095
42114
|
return B(() => {
|
|
42096
42115
|
let t = () => {
|
|
@@ -42132,7 +42151,7 @@ var Y2 = 16, X2 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
42132
42151
|
animate: { opacity: 1 },
|
|
42133
42152
|
exit: { opacity: 0 },
|
|
42134
42153
|
transition: { duration: i ? 0 : .4 },
|
|
42135
|
-
className: c("col-start-1 row-start-1", "pointer-events-none", "text-f1-foreground-secondary",
|
|
42154
|
+
className: c("col-start-1 row-start-1", "pointer-events-none", "text-f1-foreground-secondary", l4, "font-normal", "p-3"),
|
|
42136
42155
|
children: /* @__PURE__ */ W("div", {
|
|
42137
42156
|
"data-a11y-color-contrast-ignore": !0,
|
|
42138
42157
|
className: c("overflow-hidden text-ellipsis whitespace-nowrap", "whitespace-pre-wrap break-words overflow-visible"),
|
|
@@ -42142,20 +42161,20 @@ var Y2 = 16, X2 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
42142
42161
|
}) : null]
|
|
42143
42162
|
})
|
|
42144
42163
|
}) });
|
|
42145
|
-
},
|
|
42164
|
+
}, p4 = ({ textareaRef: e, highlightRef: t, value: n, placeholder: r, ariaLabel: i, role: a, name: o, onChange: s, onKeyDown: l, onPaste: u, onFocus: d, onBlur: f, onCursorUpdate: p, onScroll: m, highlightSegments: h, hasOverlay: g, isAutocompleteOpen: _ = !1, autocompleteListboxId: v, activeAutocompleteOptionId: y, isInvalid: b, errorMessageId: x, className: S }) => {
|
|
42146
42165
|
let C = r.mode === "overlay" ? r.texts : [], w = C.length > 1, T = r.mode === "overlay" && !w && n.length === 0 ? C[0] ?? r.fallback : null;
|
|
42147
42166
|
return /* @__PURE__ */ W("div", {
|
|
42148
42167
|
className: c("grid grid-cols-1 grid-rows-1", S),
|
|
42149
42168
|
children: [
|
|
42150
42169
|
/* @__PURE__ */ U("div", {
|
|
42151
42170
|
"aria-hidden": !0,
|
|
42152
|
-
className: c("col-start-1 row-start-1", "pointer-events-none invisible",
|
|
42171
|
+
className: c("col-start-1 row-start-1", "pointer-events-none invisible", u4, d4),
|
|
42153
42172
|
children: n.endsWith("\n") ? n + "_" : n || " "
|
|
42154
42173
|
}),
|
|
42155
42174
|
g ? /* @__PURE__ */ U("div", {
|
|
42156
42175
|
ref: t,
|
|
42157
42176
|
"aria-hidden": !0,
|
|
42158
|
-
className: c("col-start-1 row-start-1", "pointer-events-none text-f1-foreground",
|
|
42177
|
+
className: c("col-start-1 row-start-1", "pointer-events-none text-f1-foreground", u4, d4, "overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"),
|
|
42159
42178
|
children: h.map((e, t) => e.type === "mention" ? /* @__PURE__ */ U("span", {
|
|
42160
42179
|
className: "text-f1-foreground-secondary",
|
|
42161
42180
|
children: e.text
|
|
@@ -42166,7 +42185,7 @@ var Y2 = 16, X2 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
42166
42185
|
}) : null,
|
|
42167
42186
|
T === null ? null : /* @__PURE__ */ U("p", {
|
|
42168
42187
|
"aria-hidden": !0,
|
|
42169
|
-
className: c("col-start-1 row-start-1", "pointer-events-none text-f1-foreground-secondary",
|
|
42188
|
+
className: c("col-start-1 row-start-1", "pointer-events-none text-f1-foreground-secondary", u4, "overflow-hidden text-ellipsis whitespace-nowrap"),
|
|
42170
42189
|
children: T
|
|
42171
42190
|
}),
|
|
42172
42191
|
/* @__PURE__ */ U("textarea", {
|
|
@@ -42192,9 +42211,9 @@ var Y2 = 16, X2 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
42192
42211
|
"aria-activedescendant": y,
|
|
42193
42212
|
"aria-invalid": b || void 0,
|
|
42194
42213
|
"aria-describedby": b ? x : void 0,
|
|
42195
|
-
className: c("col-start-1 row-start-1", "w-full resize-none bg-transparent outline-none", "placeholder:text-f1-foreground-secondary",
|
|
42214
|
+
className: c("col-start-1 row-start-1", "w-full resize-none bg-transparent outline-none", "placeholder:text-f1-foreground-secondary", u4, d4, "overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", g ? "text-transparent caret-f1-foreground" : "text-f1-foreground", !g && w && n.length === 0 && "caret-transparent")
|
|
42196
42215
|
}),
|
|
42197
|
-
w && r.mode === "overlay" ? /* @__PURE__ */ U(
|
|
42216
|
+
w && r.mode === "overlay" ? /* @__PURE__ */ U(f4, {
|
|
42198
42217
|
placeholders: C,
|
|
42199
42218
|
defaultPlaceholder: r.fallback,
|
|
42200
42219
|
inputValue: n,
|
|
@@ -42202,8 +42221,8 @@ var Y2 = 16, X2 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
42202
42221
|
}) : null
|
|
42203
42222
|
]
|
|
42204
42223
|
});
|
|
42205
|
-
},
|
|
42206
|
-
function
|
|
42224
|
+
}, m4 = 4e3;
|
|
42225
|
+
function h4(e = m4) {
|
|
42207
42226
|
let [t, n] = H(null), r = V(null), i = z(() => {
|
|
42208
42227
|
r.current && clearTimeout(r.current), r.current = null, n(null);
|
|
42209
42228
|
}, []), a = z((t, i) => {
|
|
@@ -42221,7 +42240,7 @@ function f4(e = d4) {
|
|
|
42221
42240
|
}
|
|
42222
42241
|
//#endregion
|
|
42223
42242
|
//#region src/elements/primitives/_primitives/F0ChatComposer/parts/ComposerMentionPopover.tsx
|
|
42224
|
-
var
|
|
42243
|
+
var g4 = (e, t) => `${e}-option-${`${t.type}-${t.id}`.replace(/[^a-zA-Z0-9_-]/g, "-")}`, _4 = (e) => e.type === "icon" || e.type === "emoji" ? "sm" : "xs", v4 = Vr(R(({ id: e, item: t, source: n, isSelected: r, onSelect: i, description: a }, o) => {
|
|
42225
42244
|
let s = !n;
|
|
42226
42245
|
return /* @__PURE__ */ W("div", {
|
|
42227
42246
|
ref: o,
|
|
@@ -42243,7 +42262,7 @@ var p4 = (e, t) => `${e}-option-${`${t.type}-${t.id}`.replace(/[^a-zA-Z0-9_-]/g,
|
|
|
42243
42262
|
color: "default"
|
|
42244
42263
|
})
|
|
42245
42264
|
}) : t.avatar ? /* @__PURE__ */ U(Je, {
|
|
42246
|
-
size:
|
|
42265
|
+
size: _4(t.avatar),
|
|
42247
42266
|
avatar: t.avatar
|
|
42248
42267
|
}) : t.type === "person" ? /* @__PURE__ */ U(Je, {
|
|
42249
42268
|
size: "xs",
|
|
@@ -42264,13 +42283,13 @@ var p4 = (e, t) => `${e}-option-${`${t.type}-${t.id}`.replace(/[^a-zA-Z0-9_-]/g,
|
|
|
42264
42283
|
})]
|
|
42265
42284
|
});
|
|
42266
42285
|
}));
|
|
42267
|
-
|
|
42268
|
-
var
|
|
42286
|
+
v4.displayName = "ComposerMentionRow";
|
|
42287
|
+
var y4 = () => /* @__PURE__ */ U(Jr, { children: Array.from({ length: 3 }, (e, t) => /* @__PURE__ */ W("div", {
|
|
42269
42288
|
className: "flex items-center gap-2 p-2",
|
|
42270
42289
|
"aria-hidden": "true",
|
|
42271
42290
|
children: [/* @__PURE__ */ U(s, { className: "size-5 shrink-0 rounded-full" }), /* @__PURE__ */ U(s, { className: c("h-4 rounded", t === 1 ? "w-24" : "w-32") })]
|
|
42272
42291
|
}, t)) });
|
|
42273
|
-
function
|
|
42292
|
+
function b4({ isOpen: e, listboxId: t, label: n, rows: r, groups: i, showGroupLabels: a, isLoading: o, selectedIndex: s, position: l, onSelect: u, pinnedDescription: d }) {
|
|
42274
42293
|
let f = V(null), p = V(null), m = V(u);
|
|
42275
42294
|
Gr(() => {
|
|
42276
42295
|
m.current = u;
|
|
@@ -42300,9 +42319,9 @@ function _4({ isOpen: e, listboxId: t, label: n, rows: r, groups: i, showGroupLa
|
|
|
42300
42319
|
},
|
|
42301
42320
|
className: c("z-50", "w-64 max-h-60 overflow-y-auto", "rounded-lg border border-solid border-f1-border-secondary", "bg-f1-background shadow-md", "p-1"),
|
|
42302
42321
|
children: [
|
|
42303
|
-
g ? /* @__PURE__ */ U(
|
|
42322
|
+
g ? /* @__PURE__ */ U(v4, {
|
|
42304
42323
|
ref: s === 0 ? p : void 0,
|
|
42305
|
-
id:
|
|
42324
|
+
id: g4(t, g.item),
|
|
42306
42325
|
item: g.item,
|
|
42307
42326
|
source: g.source,
|
|
42308
42327
|
isSelected: s === 0,
|
|
@@ -42319,9 +42338,9 @@ function _4({ isOpen: e, listboxId: t, label: n, rows: r, groups: i, showGroupLa
|
|
|
42319
42338
|
}) : null, e.items.map((n) => {
|
|
42320
42339
|
v++;
|
|
42321
42340
|
let r = v === s;
|
|
42322
|
-
return /* @__PURE__ */ U(
|
|
42341
|
+
return /* @__PURE__ */ U(v4, {
|
|
42323
42342
|
ref: r ? p : void 0,
|
|
42324
|
-
id:
|
|
42343
|
+
id: g4(t, n),
|
|
42325
42344
|
item: n,
|
|
42326
42345
|
source: e.source,
|
|
42327
42346
|
isSelected: r,
|
|
@@ -42329,13 +42348,13 @@ function _4({ isOpen: e, listboxId: t, label: n, rows: r, groups: i, showGroupLa
|
|
|
42329
42348
|
}, `${n.type}:${n.id}`);
|
|
42330
42349
|
})]
|
|
42331
42350
|
}, e.source.type)),
|
|
42332
|
-
o && !_ ? /* @__PURE__ */ U(
|
|
42351
|
+
o && !_ ? /* @__PURE__ */ U(y4, {}) : null
|
|
42333
42352
|
]
|
|
42334
42353
|
});
|
|
42335
42354
|
}
|
|
42336
42355
|
//#endregion
|
|
42337
42356
|
//#region src/elements/primitives/_primitives/F0ChatComposer/parts/ComposerNotices.tsx
|
|
42338
|
-
var
|
|
42357
|
+
var x4 = ({ message: e, id: t, reducedMotion: n }) => /* @__PURE__ */ U(Oe, {
|
|
42339
42358
|
initial: !1,
|
|
42340
42359
|
children: e ? /* @__PURE__ */ U(M.div, {
|
|
42341
42360
|
id: t,
|
|
@@ -42373,7 +42392,7 @@ var v4 = ({ message: e, id: t, reducedMotion: n }) => /* @__PURE__ */ U(Oe, {
|
|
|
42373
42392
|
})]
|
|
42374
42393
|
})
|
|
42375
42394
|
}, "composer-error") : null
|
|
42376
|
-
}),
|
|
42395
|
+
}), S4 = "relative flex flex-col rounded-lg border border-solid border-f1-border-secondary bg-f1-background/95 shadow-md transition-colors", C4 = (e, t) => {
|
|
42377
42396
|
let n = Math.min(e.length, t.length), r = 0;
|
|
42378
42397
|
for (; r < n && e[r] === t[r];) r++;
|
|
42379
42398
|
let i = 0;
|
|
@@ -42383,16 +42402,16 @@ var v4 = ({ message: e, id: t, reducedMotion: n }) => /* @__PURE__ */ U(Oe, {
|
|
|
42383
42402
|
prevEnd: e.length - i,
|
|
42384
42403
|
nextEnd: t.length - i
|
|
42385
42404
|
};
|
|
42386
|
-
},
|
|
42387
|
-
let { start: n, prevEnd: r, nextEnd: i } =
|
|
42405
|
+
}, w4 = 600, T4 = 100, E4 = (e, t) => {
|
|
42406
|
+
let { start: n, prevEnd: r, nextEnd: i } = C4(e, t), a = r - n, o = i - n;
|
|
42388
42407
|
return a === 0 && o === 1 ? /\s/.test(t[n] ?? "") ? "other" : "insert" : o === 0 && a === 1 ? "delete" : "other";
|
|
42389
|
-
},
|
|
42408
|
+
}, D4 = () => {
|
|
42390
42409
|
let e = V([]), t = V([]), n = V("other"), r = V(0);
|
|
42391
42410
|
return {
|
|
42392
42411
|
record: z((i, a) => {
|
|
42393
42412
|
t.current = [];
|
|
42394
|
-
let o =
|
|
42395
|
-
n.current = o, r.current = s, !c && (e.current.push(i), e.current.length >
|
|
42413
|
+
let o = E4(i.value, a.value), s = Date.now(), c = o !== "other" && o === n.current && s - r.current <= w4 && i.mentions === a.mentions && e.current.length > 0;
|
|
42414
|
+
n.current = o, r.current = s, !c && (e.current.push(i), e.current.length > T4 && e.current.shift());
|
|
42396
42415
|
}, []),
|
|
42397
42416
|
undo: z((r) => {
|
|
42398
42417
|
let i = e.current.pop();
|
|
@@ -42406,10 +42425,10 @@ var v4 = ({ message: e, id: t, reducedMotion: n }) => /* @__PURE__ */ U(Oe, {
|
|
|
42406
42425
|
e.current = [], t.current = [], n.current = "other", r.current = 0;
|
|
42407
42426
|
}, [])
|
|
42408
42427
|
};
|
|
42409
|
-
},
|
|
42428
|
+
}, O4 = /* @__PURE__ */ "direction.boxSizing.width.height.overflowX.overflowY.borderTopWidth.borderRightWidth.borderBottomWidth.borderLeftWidth.borderStyle.paddingTop.paddingRight.paddingBottom.paddingLeft.fontStyle.fontVariant.fontWeight.fontStretch.fontSize.fontSizeAdjust.lineHeight.fontFamily.textAlign.textTransform.textIndent.textDecoration.letterSpacing.wordSpacing.tabSize.MozTabSize.whiteSpace.wordWrap.wordBreak".split("."), k4 = (e) => {
|
|
42410
42429
|
let t = document.createElement("div"), n = t.style, r = window.getComputedStyle(e);
|
|
42411
42430
|
n.whiteSpace = "pre-wrap", n.wordWrap = "break-word", n.position = "absolute", n.visibility = "hidden", n.overflow = "hidden";
|
|
42412
|
-
for (let e of
|
|
42431
|
+
for (let e of O4) n.setProperty(e, r.getPropertyValue(e));
|
|
42413
42432
|
let i = document.createTextNode(""), a = document.createElement("span");
|
|
42414
42433
|
return t.appendChild(i), t.appendChild(a), document.body.appendChild(t), {
|
|
42415
42434
|
textarea: e,
|
|
@@ -42418,53 +42437,53 @@ var v4 = ({ message: e, id: t, reducedMotion: n }) => /* @__PURE__ */ U(Oe, {
|
|
|
42418
42437
|
prefix: i,
|
|
42419
42438
|
span: a
|
|
42420
42439
|
};
|
|
42421
|
-
},
|
|
42440
|
+
}, A4 = (e) => {
|
|
42422
42441
|
e.div.remove();
|
|
42423
|
-
},
|
|
42442
|
+
}, j4 = (e, t) => {
|
|
42424
42443
|
let { value: n } = e.textarea;
|
|
42425
42444
|
return e.prefix.data = n.substring(0, t), e.span.textContent = n.substring(t) || "", {
|
|
42426
42445
|
left: e.span.offsetLeft,
|
|
42427
42446
|
top: e.span.offsetTop - e.textarea.scrollTop
|
|
42428
42447
|
};
|
|
42429
42448
|
};
|
|
42430
|
-
function
|
|
42431
|
-
let n =
|
|
42449
|
+
function M4(e, t) {
|
|
42450
|
+
let n = k4(e);
|
|
42432
42451
|
try {
|
|
42433
|
-
return
|
|
42452
|
+
return j4(n, t);
|
|
42434
42453
|
} finally {
|
|
42435
|
-
|
|
42454
|
+
A4(n);
|
|
42436
42455
|
}
|
|
42437
42456
|
}
|
|
42438
42457
|
//#endregion
|
|
42439
42458
|
//#region src/elements/primitives/_primitives/F0ChatComposer/utils/sanitize-text.ts
|
|
42440
|
-
var
|
|
42459
|
+
var N4 = /(\p{M}{3})\p{M}+/gu, P4 = /[\u202A-\u202E\u2066-\u2069]/g, F4 = "NFC", I4 = (e) => e.normalize(F4).replace(N4, "$1").replace(P4, ""), L4 = /[\s\S]\p{M}*/uy, R4 = /[\p{M}\u1161-\u1175\u11A8-\u11C2]/uy, z4 = (e, t) => (R4.lastIndex = t, R4.test(e)), B4 = /\P{ASCII}/u, V4 = (e, t) => (L4.lastIndex = t, L4.exec(e), Math.max(L4.lastIndex, t + 1)), H4 = (e, t, n) => {
|
|
42441
42460
|
let r = t;
|
|
42442
42461
|
for (;;) {
|
|
42443
|
-
let i =
|
|
42444
|
-
if (i === n) return
|
|
42445
|
-
if (r === e.length || !n.startsWith(i) && !
|
|
42446
|
-
r =
|
|
42462
|
+
let i = I4(e.slice(t, r));
|
|
42463
|
+
if (i === n) return z4(e, r) ? -1 : r;
|
|
42464
|
+
if (r === e.length || !n.startsWith(i) && !z4(e, r)) return -1;
|
|
42465
|
+
r = V4(e, r);
|
|
42447
42466
|
}
|
|
42448
|
-
},
|
|
42467
|
+
}, U4 = (e, t, n) => {
|
|
42449
42468
|
let r = t + n.length;
|
|
42450
|
-
return e.startsWith(n, t) && !
|
|
42451
|
-
},
|
|
42452
|
-
let a =
|
|
42469
|
+
return e.startsWith(n, t) && !z4(e, r) ? r : -1;
|
|
42470
|
+
}, W4 = (e, t, { pattern: n, asWritten: r, foldable: i }) => {
|
|
42471
|
+
let a = U4(e, t, n);
|
|
42453
42472
|
if (a !== -1) return a;
|
|
42454
42473
|
if (r !== n) {
|
|
42455
|
-
let n =
|
|
42474
|
+
let n = U4(e, t, r);
|
|
42456
42475
|
if (n !== -1) return n;
|
|
42457
42476
|
}
|
|
42458
|
-
return i ?
|
|
42459
|
-
},
|
|
42477
|
+
return i ? H4(e, t, n) : -1;
|
|
42478
|
+
}, G4 = (e, t) => {
|
|
42460
42479
|
let n = ((t) => {
|
|
42461
|
-
let n = [], r =
|
|
42480
|
+
let n = [], r = B4.test(e);
|
|
42462
42481
|
for (let i of t) {
|
|
42463
42482
|
let t = 0;
|
|
42464
42483
|
for (;;) {
|
|
42465
42484
|
let a = e.indexOf("@", t);
|
|
42466
42485
|
if (a === -1) break;
|
|
42467
|
-
let o = i.candidates.reduce((t, { asWritten: n }) => Math.max(t,
|
|
42486
|
+
let o = i.candidates.reduce((t, { asWritten: n }) => Math.max(t, W4(e, a, {
|
|
42468
42487
|
pattern: i.pattern,
|
|
42469
42488
|
asWritten: n,
|
|
42470
42489
|
foldable: r
|
|
@@ -42485,7 +42504,7 @@ var A4 = /(\p{M}{3})\p{M}+/gu, j4 = /[\u202A-\u202E\u2066-\u2069]/g, M4 = "NFC",
|
|
|
42485
42504
|
return {
|
|
42486
42505
|
entry: n,
|
|
42487
42506
|
asWritten: e,
|
|
42488
|
-
pattern:
|
|
42507
|
+
pattern: I4(e)
|
|
42489
42508
|
};
|
|
42490
42509
|
})(), r = e.get(t.pattern);
|
|
42491
42510
|
r ? r.candidates.push(t) : e.set(t.pattern, {
|
|
@@ -42503,7 +42522,7 @@ var A4 = /(\p{M}{3})\p{M}+/gu, j4 = /[\u202A-\u202E\u2066-\u2069]/g, M4 = "NFC",
|
|
|
42503
42522
|
let o = t.candidates.map((e, t) => ({
|
|
42504
42523
|
candidate: e,
|
|
42505
42524
|
index: t
|
|
42506
|
-
})).filter(({ candidate: t }) =>
|
|
42525
|
+
})).filter(({ candidate: t }) => U4(e, n, t.asWritten) === r), s = o.find(({ index: e }) => !i.has(e)) ?? o.at(-1) ?? t.candidates.map((e, t) => ({
|
|
42507
42526
|
candidate: e,
|
|
42508
42527
|
index: t
|
|
42509
42528
|
})).find(({ index: e }) => !i.has(e)) ?? {
|
|
@@ -42516,7 +42535,7 @@ var A4 = /(\p{M}{3})\p{M}+/gu, j4 = /[\u202A-\u202E\u2066-\u2069]/g, M4 = "NFC",
|
|
|
42516
42535
|
end: r
|
|
42517
42536
|
};
|
|
42518
42537
|
});
|
|
42519
|
-
},
|
|
42538
|
+
}, K4 = (e) => e.start + e.length, q4 = ({ type: e, id: t, label: n, start: r }) => ({
|
|
42520
42539
|
type: e,
|
|
42521
42540
|
id: t,
|
|
42522
42541
|
label: n,
|
|
@@ -42524,7 +42543,7 @@ var A4 = /(\p{M}{3})\p{M}+/gu, j4 = /[\u202A-\u202E\u2066-\u2069]/g, M4 = "NFC",
|
|
|
42524
42543
|
});
|
|
42525
42544
|
//#endregion
|
|
42526
42545
|
//#region src/elements/primitives/_primitives/F0ChatComposer/mentions/anchors.ts
|
|
42527
|
-
function
|
|
42546
|
+
function J4(e, t, n) {
|
|
42528
42547
|
let r = e.slice(0, t).lastIndexOf("@");
|
|
42529
42548
|
if (r === -1) return null;
|
|
42530
42549
|
if (r > 0) {
|
|
@@ -42537,7 +42556,7 @@ function G4(e, t, n) {
|
|
|
42537
42556
|
query: i
|
|
42538
42557
|
};
|
|
42539
42558
|
}
|
|
42540
|
-
var
|
|
42559
|
+
var Y4 = (e, t, n) => n.at >= 0 && t.slice(0, n.at) === e.slice(0, n.at) && t.slice(n.at + n.inserted) === e.slice(n.at + n.removed), X4 = (e, t) => e.every((e) => e.start >= K4(t) || K4(e) <= t.start), Z4 = (e, t, n, r) => e >= r || t <= n, Q4 = ({ start: e, end: t, editStart: n, previousEditEnd: r, nextEditEnd: i, delta: a }) => {
|
|
42541
42560
|
let o = e < n, s = t > r;
|
|
42542
42561
|
if (o && s) return [{
|
|
42543
42562
|
start: e,
|
|
@@ -42551,11 +42570,11 @@ var K4 = (e, t, n) => n.at >= 0 && t.slice(0, n.at) === e.slice(0, n.at) && t.sl
|
|
|
42551
42570
|
start: i,
|
|
42552
42571
|
end: t + a
|
|
42553
42572
|
}), c;
|
|
42554
|
-
},
|
|
42555
|
-
let { start: r, prevEnd: i, nextEnd: a } =
|
|
42573
|
+
}, $4 = (e, t, n) => {
|
|
42574
|
+
let { start: r, prevEnd: i, nextEnd: a } = C4(e, t), o = t.length - e.length, s = i - r, c = a - r, l = [], u = [];
|
|
42556
42575
|
for (let d of n) {
|
|
42557
|
-
let n = d.start, f =
|
|
42558
|
-
if (
|
|
42576
|
+
let n = d.start, f = K4(d);
|
|
42577
|
+
if (Z4(r, i, n, f)) {
|
|
42559
42578
|
let e = n < r ? 0 : o;
|
|
42560
42579
|
l.push({
|
|
42561
42580
|
...d,
|
|
@@ -42567,11 +42586,11 @@ var K4 = (e, t, n) => n.at >= 0 && t.slice(0, n.at) === e.slice(0, n.at) && t.sl
|
|
|
42567
42586
|
...d,
|
|
42568
42587
|
start: n + o
|
|
42569
42588
|
};
|
|
42570
|
-
|
|
42589
|
+
X4(l, p) && Y4(e, t, {
|
|
42571
42590
|
at: n - s,
|
|
42572
42591
|
removed: s,
|
|
42573
42592
|
inserted: c
|
|
42574
|
-
}) ? l.push(p) : u.push(...
|
|
42593
|
+
}) ? l.push(p) : u.push(...Q4({
|
|
42575
42594
|
start: n,
|
|
42576
42595
|
end: f,
|
|
42577
42596
|
editStart: r,
|
|
@@ -42584,7 +42603,7 @@ var K4 = (e, t, n) => n.at >= 0 && t.slice(0, n.at) === e.slice(0, n.at) && t.sl
|
|
|
42584
42603
|
kept: l,
|
|
42585
42604
|
touched: u
|
|
42586
42605
|
};
|
|
42587
|
-
},
|
|
42606
|
+
}, e3 = (e, t, n, r) => {
|
|
42588
42607
|
let i = [];
|
|
42589
42608
|
for (let e of [...t].sort((e, t) => e.start - t.start)) {
|
|
42590
42609
|
let t = i[i.length - 1];
|
|
@@ -42604,10 +42623,10 @@ var K4 = (e, t, n) => n.at >= 0 && t.slice(0, n.at) === e.slice(0, n.at) && t.sl
|
|
|
42604
42623
|
})),
|
|
42605
42624
|
caret: r - a(r)
|
|
42606
42625
|
};
|
|
42607
|
-
},
|
|
42626
|
+
}, t3 = {
|
|
42608
42627
|
query: "",
|
|
42609
42628
|
groups: []
|
|
42610
|
-
},
|
|
42629
|
+
}, n3 = (e, t) => !!e && e.atIndex === t.atIndex && t.query.startsWith(e.query), r3 = (e) => e.normalize("NFC"), i3 = (e, t) => e.toLowerCase().startsWith(t.toLowerCase()), a3 = (e, t, n) => t === n || n.length === 0 || i3(e.label, n), o3 = (e, t) => typeof e.order == "function" ? e.order(t) : e.order ?? 0, s3 = (e, t, n) => Promise.all(e.map((e) => e.search(t, n).then((t) => ({
|
|
42611
42630
|
source: e,
|
|
42612
42631
|
items: t,
|
|
42613
42632
|
failed: !1
|
|
@@ -42615,16 +42634,16 @@ var K4 = (e, t, n) => n.at >= 0 && t.slice(0, n.at) === e.slice(0, n.at) && t.sl
|
|
|
42615
42634
|
source: e,
|
|
42616
42635
|
items: [],
|
|
42617
42636
|
failed: !0
|
|
42618
|
-
})))),
|
|
42637
|
+
})))), c3 = (e, t) => e.filter((e) => e.items.length > 0).map(({ source: e, items: t }) => ({
|
|
42619
42638
|
source: e,
|
|
42620
42639
|
items: t
|
|
42621
|
-
})).sort((e, n) =>
|
|
42640
|
+
})).sort((e, n) => o3(e.source, t) - o3(n.source, t)), l3 = (e, t) => e.length === t.length && e.every((e, n) => {
|
|
42622
42641
|
let r = t[n];
|
|
42623
42642
|
return r !== void 0 && r.id === e.id && r.type === e.type && r.label === e.label && r.start === e.start && r.length === e.length;
|
|
42624
42643
|
});
|
|
42625
|
-
function
|
|
42626
|
-
let [f, p] = H(!1), [m, h] = H(""), [g, _] = H(
|
|
42627
|
-
|
|
42644
|
+
function u3({ inputValue: e, setInputValue: t, cursorPosition: n, setCursorPosition: r, requestSelection: i, onMentionErased: a, textareaRef: o, enabled: s, sources: c, pinned: l, scopeKey: u, onInserted: d }) {
|
|
42645
|
+
let [f, p] = H(!1), [m, h] = H(""), [g, _] = H(t3), [v, y] = H(!1), [b, x] = H(0), [S, C] = H([]), w = V(S), T = z((e) => {
|
|
42646
|
+
l3(w.current, e) || (w.current = e, C(e));
|
|
42628
42647
|
}, []), E = V(e), D = V(e);
|
|
42629
42648
|
D.current = e;
|
|
42630
42649
|
let O = V(-1), k = V(null), A = V(0), j = V(null), M = V(null), N = V(c), P = V(d), ee = V(u);
|
|
@@ -42632,15 +42651,15 @@ function s3({ inputValue: e, setInputValue: t, cursorPosition: n, setCursorPosit
|
|
|
42632
42651
|
N.current = c, P.current = d;
|
|
42633
42652
|
});
|
|
42634
42653
|
let te = s && (c.length > 0 || !!l), ne = z(() => {
|
|
42635
|
-
k.current &&= (clearTimeout(k.current), null), A.current++, y(!1), _((e) => e.groups.length === 0 ? e :
|
|
42654
|
+
k.current &&= (clearTimeout(k.current), null), A.current++, y(!1), _((e) => e.groups.length === 0 ? e : t3);
|
|
42636
42655
|
}, []), re = ee.current === u;
|
|
42637
42656
|
Gr(() => {
|
|
42638
42657
|
ee.current !== u && (ee.current = u, j.current = null, ne());
|
|
42639
42658
|
}, [u, ne]);
|
|
42640
42659
|
let ie = z(() => {
|
|
42641
42660
|
let e = M.current;
|
|
42642
|
-
e && (M.current = null,
|
|
42643
|
-
}, []), ae = z((e) => !!l && l.matches(e), [l]), oe = Kr(() => ae(m), [ae, m]), se = Kr(() => g.groups.map((e) => e.items.map((e) => re &&
|
|
42661
|
+
e && (M.current = null, A4(e));
|
|
42662
|
+
}, []), ae = z((e) => !!l && l.matches(e), [l]), oe = Kr(() => ae(m), [ae, m]), se = Kr(() => g.groups.map((e) => e.items.map((e) => re && a3(e, g.query, m) ? "1" : "0").join("")).join("|"), [
|
|
42644
42663
|
g,
|
|
42645
42664
|
re,
|
|
42646
42665
|
m
|
|
@@ -42668,12 +42687,12 @@ function s3({ inputValue: e, setInputValue: t, cursorPosition: n, setCursorPosit
|
|
|
42668
42687
|
ne(), p(!1);
|
|
42669
42688
|
return;
|
|
42670
42689
|
}
|
|
42671
|
-
let t =
|
|
42690
|
+
let t = J4(e, n, S);
|
|
42672
42691
|
if (!t) {
|
|
42673
42692
|
ne(), p(!1), h(""), x(0), O.current = -1, j.current = null;
|
|
42674
42693
|
return;
|
|
42675
42694
|
}
|
|
42676
|
-
if (
|
|
42695
|
+
if (n3(j.current, t)) {
|
|
42677
42696
|
ne();
|
|
42678
42697
|
return;
|
|
42679
42698
|
}
|
|
@@ -42681,14 +42700,14 @@ function s3({ inputValue: e, setInputValue: t, cursorPosition: n, setCursorPosit
|
|
|
42681
42700
|
let r = ++A.current, i = {
|
|
42682
42701
|
text: e,
|
|
42683
42702
|
cursor: n,
|
|
42684
|
-
mentionsBefore: S.filter((e) =>
|
|
42703
|
+
mentionsBefore: S.filter((e) => K4(e) <= t.atIndex).map(q4)
|
|
42685
42704
|
};
|
|
42686
42705
|
return k.current = setTimeout(() => {
|
|
42687
42706
|
let e = N.current;
|
|
42688
|
-
e.length === 0 ? r === A.current && y(!1) :
|
|
42707
|
+
e.length === 0 ? r === A.current && y(!1) : s3(e, t.query, i).then((e) => {
|
|
42689
42708
|
if (r !== A.current) return;
|
|
42690
42709
|
y(!1);
|
|
42691
|
-
let n =
|
|
42710
|
+
let n = c3(e, i);
|
|
42692
42711
|
_({
|
|
42693
42712
|
query: t.query,
|
|
42694
42713
|
groups: n
|
|
@@ -42721,7 +42740,7 @@ function s3({ inputValue: e, setInputValue: t, cursorPosition: n, setCursorPosit
|
|
|
42721
42740
|
if (a === -1) return;
|
|
42722
42741
|
let { item: o } = r, s = e.slice(0, a), c = e.slice(n), l = `@${o.label} `, u = s + l + c, d = s.length + l.length;
|
|
42723
42742
|
t(u);
|
|
42724
|
-
let f = l.length - (n - a), p = w.current.filter((e) =>
|
|
42743
|
+
let f = l.length - (n - a), p = w.current.filter((e) => K4(e) <= a || e.start >= n).map((e) => e.start >= n ? {
|
|
42725
42744
|
...e,
|
|
42726
42745
|
start: e.start + f
|
|
42727
42746
|
} : e);
|
|
@@ -42747,12 +42766,12 @@ function s3({ inputValue: e, setInputValue: t, cursorPosition: n, setCursorPosit
|
|
|
42747
42766
|
case "ArrowUp": return e.preventDefault(), x((e) => (e + le.length - 1) % le.length), !0;
|
|
42748
42767
|
case "Tab": {
|
|
42749
42768
|
let t = le[b];
|
|
42750
|
-
return t && (m.length === 0 ||
|
|
42769
|
+
return t && (m.length === 0 || i3(t.item.label, m)) ? (e.preventDefault(), fe(t), !0) : !1;
|
|
42751
42770
|
}
|
|
42752
42771
|
case "Enter": {
|
|
42753
42772
|
e.preventDefault();
|
|
42754
42773
|
let t = le[b];
|
|
42755
|
-
return t &&
|
|
42774
|
+
return t && a3(t.item, g.query, m) && fe(t), !0;
|
|
42756
42775
|
}
|
|
42757
42776
|
default: return !1;
|
|
42758
42777
|
}
|
|
@@ -42770,12 +42789,12 @@ function s3({ inputValue: e, setInputValue: t, cursorPosition: n, setCursorPosit
|
|
|
42770
42789
|
E.current = n;
|
|
42771
42790
|
let r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
|
|
42772
42791
|
for (let t of e) {
|
|
42773
|
-
let e =
|
|
42792
|
+
let e = r3(t.label), n = r.get(e);
|
|
42774
42793
|
n ? n.push(t) : r.set(e, [t]), i.add(t.label);
|
|
42775
42794
|
}
|
|
42776
42795
|
let a = /* @__PURE__ */ new Set();
|
|
42777
|
-
T(
|
|
42778
|
-
let o = r.get(
|
|
42796
|
+
T(G4(n, [...i].map((e) => ({ name: e }))).flatMap(({ entry: { name: e }, start: t, end: i }) => {
|
|
42797
|
+
let o = r.get(r3(e)) ?? [], s = o.filter((e) => !a.has(e)), c = n.slice(t + 1, i), l = s.find((e) => e.label === c) ?? s[0] ?? o[o.length - 1];
|
|
42779
42798
|
return l && a.add(l), l ? [{
|
|
42780
42799
|
...l,
|
|
42781
42800
|
start: t,
|
|
@@ -42791,12 +42810,12 @@ function s3({ inputValue: e, setInputValue: t, cursorPosition: n, setCursorPosit
|
|
|
42791
42810
|
E.current = e;
|
|
42792
42811
|
let s = w.current;
|
|
42793
42812
|
if (s.length === 0) return;
|
|
42794
|
-
let { kept: c, touched: l } =
|
|
42813
|
+
let { kept: c, touched: l } = $4(o, e, s);
|
|
42795
42814
|
if (l.length === 0) {
|
|
42796
42815
|
T(c);
|
|
42797
42816
|
return;
|
|
42798
42817
|
}
|
|
42799
|
-
let u =
|
|
42818
|
+
let u = e3(e, l, c, n);
|
|
42800
42819
|
E.current = u.text, T(u.mentions), t(u.text), r(u.caret), i(u.caret, u.text), a?.(u.text);
|
|
42801
42820
|
}, [
|
|
42802
42821
|
e,
|
|
@@ -42819,8 +42838,8 @@ function s3({ inputValue: e, setInputValue: t, cursorPosition: n, setCursorPosit
|
|
|
42819
42838
|
return;
|
|
42820
42839
|
}
|
|
42821
42840
|
let t = M.current;
|
|
42822
|
-
(!t || t.textarea !== e || t.width !== e.clientWidth) && (t &&
|
|
42823
|
-
let n =
|
|
42841
|
+
(!t || t.textarea !== e || t.width !== e.clientWidth) && (t && A4(t), t = k4(e), M.current = t);
|
|
42842
|
+
let n = j4(t, O.current), r = e.offsetLeft + n.left, i = e.offsetParent, a = (i instanceof HTMLElement ? i.offsetHeight : 0) - (e.offsetTop + n.top);
|
|
42824
42843
|
ge((e) => e?.left === r && e.bottom === a ? e : {
|
|
42825
42844
|
left: r,
|
|
42826
42845
|
bottom: a
|
|
@@ -42846,7 +42865,7 @@ function s3({ inputValue: e, setInputValue: t, cursorPosition: n, setCursorPosit
|
|
|
42846
42865
|
let e = le[b];
|
|
42847
42866
|
if (!e) return null;
|
|
42848
42867
|
let t = e.item.label;
|
|
42849
|
-
return m.length === 0 ? t :
|
|
42868
|
+
return m.length === 0 ? t : i3(t, m) ? t.slice(m.length) : null;
|
|
42850
42869
|
}, [
|
|
42851
42870
|
f,
|
|
42852
42871
|
le,
|
|
@@ -42863,10 +42882,10 @@ function s3({ inputValue: e, setInputValue: t, cursorPosition: n, setCursorPosit
|
|
|
42863
42882
|
}
|
|
42864
42883
|
//#endregion
|
|
42865
42884
|
//#region src/elements/primitives/_primitives/F0ChatComposer/utils/highlight.ts
|
|
42866
|
-
function
|
|
42885
|
+
function d3(e, t, n) {
|
|
42867
42886
|
let r = n?.cursorPosition ?? e.length, i = n?.inlineCompletion ?? null, a = t.map((e) => ({
|
|
42868
42887
|
start: e.start,
|
|
42869
|
-
end:
|
|
42888
|
+
end: K4(e)
|
|
42870
42889
|
})).filter((t) => t.start >= 0 && t.end <= e.length).sort((e, t) => e.start - t.start), o = [], s = 0, c = !1, l = (t) => {
|
|
42871
42890
|
!i || c || r < s || r > t ? (t > s && o.push({
|
|
42872
42891
|
type: "text",
|
|
@@ -42896,19 +42915,19 @@ function c3(e, t, n) {
|
|
|
42896
42915
|
}
|
|
42897
42916
|
//#endregion
|
|
42898
42917
|
//#region src/elements/primitives/_primitives/F0ChatComposer/useComposerEditor.ts
|
|
42899
|
-
var
|
|
42900
|
-
function
|
|
42918
|
+
var f3 = 1500, p3 = (e) => e.nativeEvent.isComposing || e.keyCode === 229;
|
|
42919
|
+
function m3({ mentions: e, transformChange: t, onTextChange: n, historySuspended: r = !1 }) {
|
|
42901
42920
|
let [i, a] = H(""), [o, s] = H(0), c = V(null), l = V(null), u = V(null), d = z((e, t, n = !1) => {
|
|
42902
42921
|
u.current = {
|
|
42903
42922
|
caret: e,
|
|
42904
42923
|
forText: t,
|
|
42905
42924
|
focus: n
|
|
42906
42925
|
};
|
|
42907
|
-
}, []), f =
|
|
42926
|
+
}, []), f = D4(), p = V({
|
|
42908
42927
|
value: "",
|
|
42909
42928
|
caret: 0,
|
|
42910
42929
|
mentions: []
|
|
42911
|
-
}), m = V(!1), h = V(null), g = V(!1), _ =
|
|
42930
|
+
}), m = V(!1), h = V(null), g = V(!1), _ = u3({
|
|
42912
42931
|
inputValue: i,
|
|
42913
42932
|
setInputValue: a,
|
|
42914
42933
|
cursorPosition: o,
|
|
@@ -43002,7 +43021,7 @@ function d3({ mentions: e, transformChange: t, onTextChange: n, historySuspended
|
|
|
43002
43021
|
S
|
|
43003
43022
|
]), N = z((e) => e.key !== "Escape" || i.length === 0 ? !1 : (e.preventDefault(), e.stopPropagation(), y ? (M(), !0) : (b(!0), x.current && clearTimeout(x.current), x.current = setTimeout(() => {
|
|
43004
43023
|
x.current = null, b(!1);
|
|
43005
|
-
},
|
|
43024
|
+
}, f3), !0)), [
|
|
43006
43025
|
i.length,
|
|
43007
43026
|
y,
|
|
43008
43027
|
M
|
|
@@ -43035,10 +43054,10 @@ function d3({ mentions: e, transformChange: t, onTextChange: n, historySuspended
|
|
|
43035
43054
|
breakHistory: P
|
|
43036
43055
|
};
|
|
43037
43056
|
}
|
|
43038
|
-
function
|
|
43057
|
+
function h3(e, { suppressGhost: t = !1 } = {}) {
|
|
43039
43058
|
let { value: n, cursorPosition: r, mentions: i } = e, a = t ? null : i.inlineCompletion;
|
|
43040
43059
|
return {
|
|
43041
|
-
highlightSegments: Kr(() =>
|
|
43060
|
+
highlightSegments: Kr(() => d3(n, i.mentions, {
|
|
43042
43061
|
cursorPosition: r,
|
|
43043
43062
|
inlineCompletion: a
|
|
43044
43063
|
}), [
|
|
@@ -43052,7 +43071,7 @@ function f3(e, { suppressGhost: t = !1 } = {}) {
|
|
|
43052
43071
|
}
|
|
43053
43072
|
//#endregion
|
|
43054
43073
|
//#region src/elements/primitives/_primitives/F0ChatComposer/F0ChatComposer.tsx
|
|
43055
|
-
var
|
|
43074
|
+
var g3 = [], _3 = () => null, v3 = ({ onSend: e, inProgress: t = !1, onStop: n, sendKind: r = "send", hasAttachments: i = !1, sendBlocked: o = !1, maxLength: s, maxLengthError: l, error: u = null, labels: d, placeholders: f, placeholdersPaused: p, role: m = "combobox", name: h, mentions: g, autocomplete: _, voice: v, onTextChange: y, onCleared: b, onEscape: x, onArrowUpWhenEmpty: S, onPasteFiles: C, pastePreferText: w = !1, onStateChange: T, header: E, tray: D, leading: O, toolbarStart: k, toolbarCenter: A, collapsible: j = !1, collapsed: N = !1, replacement: P, accent: ee = !1, asForm: te = !1, className: ne, surfaceRef: re, onSurfaceFocus: ie, onSurfaceBlur: ae, handleRef: oe, reducedMotion: se = !1, "data-testid": ce }) => {
|
|
43056
43075
|
let le = a(), ue = {
|
|
43057
43076
|
placeholder: le.chat.placeholder,
|
|
43058
43077
|
listening: le.chat.listening,
|
|
@@ -43067,7 +43086,7 @@ var p3 = [], m3 = () => null, h3 = ({ onSend: e, inProgress: t = !1, onStop: n,
|
|
|
43067
43086
|
micError: le.chat.micError,
|
|
43068
43087
|
transcriptionError: le.chat.transcriptionError,
|
|
43069
43088
|
...d
|
|
43070
|
-
}, de = P != null, { error: fe, show: F, clear: pe } =
|
|
43089
|
+
}, de = P != null, { error: fe, show: F, clear: pe } = h4(), he = V(() => {}), ge = V(() => {}), _e = V(""), ve = z((e) => {
|
|
43071
43090
|
let t = _e.current, n = t && !/\s$/.test(t) ? " " : "";
|
|
43072
43091
|
he.current(`${t}${n}${e}`);
|
|
43073
43092
|
}, []), ye = {
|
|
@@ -43082,10 +43101,10 @@ var p3 = [], m3 = () => null, h3 = ({ onSend: e, inProgress: t = !1, onStop: n,
|
|
|
43082
43101
|
},
|
|
43083
43102
|
onError: (e) => F(ye[e]),
|
|
43084
43103
|
onAudio: v?.onAudio
|
|
43085
|
-
}), [xe, Se] = H(!1), Ce = be.status === "recording", we = be.status === "transcribing", Te = !!v && (!!v.onTranscribe || !!v.onAudio) && be.isSupported, Ee = !v?.onAudio && (be.status !== "idle" || xe), [De, ke] = H(!1), Ae =
|
|
43104
|
+
}), [xe, Se] = H(!1), Ce = be.status === "recording", we = be.status === "transcribing", Te = !!v && (!!v.onTranscribe || !!v.onAudio) && be.isSupported, Ee = !v?.onAudio && (be.status !== "idle" || xe), [De, ke] = H(!1), Ae = m3({
|
|
43086
43105
|
mentions: {
|
|
43087
43106
|
enabled: !!g && g.sources.length + +!!g.pinned > 0 && !De && !de,
|
|
43088
|
-
sources: g?.sources ??
|
|
43107
|
+
sources: g?.sources ?? g3,
|
|
43089
43108
|
pinned: g?.pinned,
|
|
43090
43109
|
scopeKey: g?.scopeKey,
|
|
43091
43110
|
onInserted: g?.onInserted
|
|
@@ -43101,11 +43120,11 @@ var p3 = [], m3 = () => null, h3 = ({ onSend: e, inProgress: t = !1, onStop: n,
|
|
|
43101
43120
|
Be.current = je;
|
|
43102
43121
|
let Ve = V(Ie.mentions);
|
|
43103
43122
|
Ve.current = Ie.mentions;
|
|
43104
|
-
let He = (_?.useAutocomplete ??
|
|
43123
|
+
let He = (_?.useAutocomplete ?? _3)(Ae), Ue = He?.isOpen ?? !1, We = Ie.dismissCurrentTrigger;
|
|
43105
43124
|
B(() => {
|
|
43106
43125
|
ke(Ue), Ue && We();
|
|
43107
43126
|
}, [Ue, We]);
|
|
43108
|
-
let { highlightSegments: Ge, hasOverlay: Ke } =
|
|
43127
|
+
let { highlightSegments: Ge, hasOverlay: Ke } = h3(Ae, { suppressGhost: Ue }), qe = z((e) => {
|
|
43109
43128
|
let t = Pe.current;
|
|
43110
43129
|
if (!t) return;
|
|
43111
43130
|
t.focus(e);
|
|
@@ -43220,14 +43239,14 @@ var p3 = [], m3 = () => null, h3 = ({ onSend: e, inProgress: t = !1, onStop: n,
|
|
|
43220
43239
|
let t = ht;
|
|
43221
43240
|
return gt(e) ? (t && (Ze(!1), b?.()), !0) : !1;
|
|
43222
43241
|
}, yt = (e) => {
|
|
43223
|
-
de ||
|
|
43242
|
+
de || p3(e) || _t(e) || He?.handleKeyDown(e) || Ie.handleKeyDown(e) || vt(e) || (e.key === "ArrowUp" && !e.shiftKey && !e.altKey && !e.metaKey && !e.ctrlKey && je === "" && be.status === "idle" && !xe && !v?.busy && S?.() ? e.preventDefault() : e.key === "Enter" && !e.shiftKey && (e.preventDefault(), t || ot()));
|
|
43224
43243
|
}, bt = (e) => {
|
|
43225
43244
|
e.preventDefault(), !de && (t && !Ee ? (Ie.close(), n?.(), Pe.current?.focus()) : ot());
|
|
43226
|
-
}, xt =
|
|
43245
|
+
}, xt = c4({
|
|
43227
43246
|
enabled: !!C && !de,
|
|
43228
43247
|
onFiles: C ?? (() => {}),
|
|
43229
43248
|
preferText: w
|
|
43230
|
-
}), St = Ur(), Ct = Ur(), wt = `chat-composer-mentions-${St.replace(/:/g, "")}`, Tt = Ie.isOpen && !Ue && !de && (Ie.isLoading || Ie.rows.length > 0), Et = Ie.rows[Ie.selectedIndex] ?? Ie.rows[0], Dt = Tt && Et ?
|
|
43249
|
+
}), St = Ur(), Ct = Ur(), wt = `chat-composer-mentions-${St.replace(/:/g, "")}`, Tt = Ie.isOpen && !Ue && !de && (Ie.isLoading || Ie.rows.length > 0), Et = Ie.rows[Ie.selectedIndex] ?? Ie.rows[0], Dt = Tt && Et ? g4(wt, Et.item) : void 0, Ot = (e) => Te ? /* @__PURE__ */ U(me, {
|
|
43231
43250
|
type: "button",
|
|
43232
43251
|
variant: "outline",
|
|
43233
43252
|
size: e,
|
|
@@ -43256,7 +43275,7 @@ var p3 = [], m3 = () => null, h3 = ({ onSend: e, inProgress: t = !1, onStop: n,
|
|
|
43256
43275
|
},
|
|
43257
43276
|
transition: {
|
|
43258
43277
|
duration: .15,
|
|
43259
|
-
ease:
|
|
43278
|
+
ease: p1
|
|
43260
43279
|
},
|
|
43261
43280
|
children: at ? /* @__PURE__ */ U(me, {
|
|
43262
43281
|
type: te ? "submit" : "button",
|
|
@@ -43344,7 +43363,7 @@ var p3 = [], m3 = () => null, h3 = ({ onSend: e, inProgress: t = !1, onStop: n,
|
|
|
43344
43363
|
]
|
|
43345
43364
|
}, Ft = /* @__PURE__ */ W(Jr, { children: [
|
|
43346
43365
|
E,
|
|
43347
|
-
/* @__PURE__ */ U(
|
|
43366
|
+
/* @__PURE__ */ U(x4, {
|
|
43348
43367
|
message: et,
|
|
43349
43368
|
id: Ct,
|
|
43350
43369
|
reducedMotion: se
|
|
@@ -43354,7 +43373,7 @@ var p3 = [], m3 = () => null, h3 = ({ onSend: e, inProgress: t = !1, onStop: n,
|
|
|
43354
43373
|
className: c((O || N) && "flex items-end", N && "pr-3"),
|
|
43355
43374
|
children: [
|
|
43356
43375
|
O,
|
|
43357
|
-
/* @__PURE__ */ U(
|
|
43376
|
+
/* @__PURE__ */ U(p4, {
|
|
43358
43377
|
className: "min-w-0 flex-1",
|
|
43359
43378
|
textareaRef: Pe,
|
|
43360
43379
|
highlightRef: Fe,
|
|
@@ -43415,7 +43434,7 @@ var p3 = [], m3 = () => null, h3 = ({ onSend: e, inProgress: t = !1, onStop: n,
|
|
|
43415
43434
|
}) : Nt
|
|
43416
43435
|
] }), It = /* @__PURE__ */ W(Jr, { children: [
|
|
43417
43436
|
He?.popover,
|
|
43418
|
-
/* @__PURE__ */ U(
|
|
43437
|
+
/* @__PURE__ */ U(b4, {
|
|
43419
43438
|
isOpen: Tt,
|
|
43420
43439
|
listboxId: wt,
|
|
43421
43440
|
label: ue.mentionSuggestions,
|
|
@@ -43498,7 +43517,7 @@ var p3 = [], m3 = () => null, h3 = ({ onSend: e, inProgress: t = !1, onStop: n,
|
|
|
43498
43517
|
children: Ft
|
|
43499
43518
|
}, "input")
|
|
43500
43519
|
})
|
|
43501
|
-
] }), Lt = c(
|
|
43520
|
+
] }), Lt = c(S4, ee && "!border-f1-border-selected", ne);
|
|
43502
43521
|
return te ? /* @__PURE__ */ U("form", {
|
|
43503
43522
|
ref: re,
|
|
43504
43523
|
"data-testid": ce,
|
|
@@ -43521,10 +43540,10 @@ var p3 = [], m3 = () => null, h3 = ({ onSend: e, inProgress: t = !1, onStop: n,
|
|
|
43521
43540
|
onBlur: ae,
|
|
43522
43541
|
children: It
|
|
43523
43542
|
});
|
|
43524
|
-
},
|
|
43543
|
+
}, y3 = Lr(null), b3 = () => {}, x3 = [{
|
|
43525
43544
|
id: "ai",
|
|
43526
43545
|
restoresContent: !0
|
|
43527
|
-
}],
|
|
43546
|
+
}], S3 = (e) => ({
|
|
43528
43547
|
open: e.open,
|
|
43529
43548
|
setOpen: e.setOpen,
|
|
43530
43549
|
resizable: e.resizable,
|
|
@@ -43547,15 +43566,15 @@ var p3 = [], m3 = () => null, h3 = ({ onSend: e, inProgress: t = !1, onStop: n,
|
|
|
43547
43566
|
setPanelContentSide: e.setContentSide,
|
|
43548
43567
|
shouldPlayEntranceAnimation: e.shouldPlayEntranceAnimation,
|
|
43549
43568
|
setShouldPlayEntranceAnimation: e.setShouldPlayEntranceAnimation
|
|
43550
|
-
}),
|
|
43551
|
-
views:
|
|
43569
|
+
}), C3 = (e) => Z2() ? /* @__PURE__ */ U(w3, { ...e }) : /* @__PURE__ */ U(J2, {
|
|
43570
|
+
views: x3,
|
|
43552
43571
|
side: e.side,
|
|
43553
43572
|
contentSide: e.panelContentSide,
|
|
43554
43573
|
resizable: e.resizable,
|
|
43555
43574
|
defaultLayout: e.defaultVisualizationMode === "fullscreen" ? "fullscreen" : "sidepanel",
|
|
43556
|
-
children: /* @__PURE__ */ U(
|
|
43557
|
-
}),
|
|
43558
|
-
let [O, k] = H(m), [A, j] = H(t), M =
|
|
43575
|
+
children: /* @__PURE__ */ U(w3, { ...e })
|
|
43576
|
+
}), w3 = ({ children: e, enabled: t, agent: n, initialMessage: r, chatHeader: i, chatMessages: o, chatInput: s, chatOverlay: c, welcomeScreenSuggestions: l = [], welcomeScreenCards: u = [], disclaimer: d, lockVisualizationMode: f = !1, historyEnabled: p = !1, footer: m, VoiceMode: h, entityRefs: g, canvasActions: _, canvasEntities: v, credits: y, employeeCredits: b, creditWarning: x, fileAttachments: S, filePreviews: C, onTranscribe: w, onThumbsDown: T, onThumbsUp: E, tracking: D }) => {
|
|
43577
|
+
let [O, k] = H(m), [A, j] = H(t), M = X2(), { open: P, setOpen: ee, layout: te, setLayout: ne } = M, [re, ie] = H("chat"), [ae, oe] = H(n), [se, ce] = H(l), [le, ue] = H(u), de = a(), { currentPath: fe } = N(), [F, pe] = H([de.t("ai.inputPlaceholder")]), [me, he] = H(r), [ge, _e] = H(null), [ve, ye] = H(null), be = ge !== null && ve === ge, xe = V(null), Se = z((e) => {
|
|
43559
43578
|
xe.current = e, ye(e);
|
|
43560
43579
|
}, []), Ce = ge && !be ? "canvas" : te, we = V(!1), Te = V(ge);
|
|
43561
43580
|
Te.current = ge;
|
|
@@ -43622,7 +43641,7 @@ var p3 = [], m3 = () => null, h3 = ({ onSend: e, inProgress: t = !1, onStop: n,
|
|
|
43622
43641
|
let it = z((e) => {
|
|
43623
43642
|
e && _e(null), M.present(e);
|
|
43624
43643
|
}, [M]);
|
|
43625
|
-
return /* @__PURE__ */ U(
|
|
43644
|
+
return /* @__PURE__ */ U(y3.Provider, {
|
|
43626
43645
|
value: {
|
|
43627
43646
|
enabled: A,
|
|
43628
43647
|
setEnabled: j,
|
|
@@ -43687,19 +43706,19 @@ var p3 = [], m3 = () => null, h3 = ({ onSend: e, inProgress: t = !1, onStop: n,
|
|
|
43687
43706
|
},
|
|
43688
43707
|
children: e
|
|
43689
43708
|
});
|
|
43690
|
-
},
|
|
43709
|
+
}, T3 = /* @__PURE__ */ new Set([
|
|
43691
43710
|
"enabled",
|
|
43692
43711
|
"isCanvasCovered",
|
|
43693
43712
|
"fileDragOver",
|
|
43694
43713
|
"lockVisualizationMode",
|
|
43695
43714
|
"historyEnabled",
|
|
43696
43715
|
"isClarifying"
|
|
43697
|
-
]),
|
|
43716
|
+
]), E3 = /* @__PURE__ */ new Set([
|
|
43698
43717
|
"canvasContent",
|
|
43699
43718
|
"pendingContext",
|
|
43700
43719
|
"pendingQuote",
|
|
43701
43720
|
"activeGame"
|
|
43702
|
-
]),
|
|
43721
|
+
]), D3 = /* @__PURE__ */ new Set([
|
|
43703
43722
|
"agent",
|
|
43704
43723
|
"initialMessage",
|
|
43705
43724
|
"chatHeader",
|
|
@@ -43721,34 +43740,34 @@ var p3 = [], m3 = () => null, h3 = ({ onSend: e, inProgress: t = !1, onStop: n,
|
|
|
43721
43740
|
"onTranscribe",
|
|
43722
43741
|
"onThumbsUp",
|
|
43723
43742
|
"onThumbsDown"
|
|
43724
|
-
]),
|
|
43743
|
+
]), O3 = {
|
|
43725
43744
|
visualizationMode: "sidepanel",
|
|
43726
43745
|
mode: "chat",
|
|
43727
43746
|
placeholders: [],
|
|
43728
43747
|
welcomeScreenSuggestions: [],
|
|
43729
43748
|
welcomeScreenCards: [],
|
|
43730
43749
|
focusChatInput: () => !1
|
|
43731
|
-
},
|
|
43750
|
+
}, k3 = (e) => {
|
|
43732
43751
|
let t = e;
|
|
43733
|
-
if (t in
|
|
43734
|
-
if (
|
|
43735
|
-
if (!
|
|
43752
|
+
if (t in O3) return O3[t];
|
|
43753
|
+
if (E3.has(t)) return null;
|
|
43754
|
+
if (!D3.has(t)) return !T3.has(t) && b3;
|
|
43736
43755
|
};
|
|
43737
|
-
function
|
|
43738
|
-
let e = Hr(
|
|
43756
|
+
function A3() {
|
|
43757
|
+
let e = Hr(y3), t = X2();
|
|
43739
43758
|
return Kr(() => {
|
|
43740
|
-
let n =
|
|
43759
|
+
let n = S3(t);
|
|
43741
43760
|
return e ? {
|
|
43742
43761
|
...e,
|
|
43743
43762
|
...n
|
|
43744
43763
|
} : new Proxy({}, { get(e, t) {
|
|
43745
|
-
if (typeof t == "string") return t in n ? n[t] :
|
|
43764
|
+
if (typeof t == "string") return t in n ? n[t] : k3(t);
|
|
43746
43765
|
} });
|
|
43747
43766
|
}, [e, t]);
|
|
43748
43767
|
}
|
|
43749
43768
|
//#endregion
|
|
43750
43769
|
//#region src/elements/primitives/_primitives/F0Attachments/components/ClampText.tsx
|
|
43751
|
-
var
|
|
43770
|
+
var j3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ */ U("span", {
|
|
43752
43771
|
title: e,
|
|
43753
43772
|
className: c("line-clamp-1 min-w-0 max-w-full overflow-hidden whitespace-normal", t),
|
|
43754
43773
|
style: {
|
|
@@ -43760,7 +43779,7 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
43760
43779
|
title: e,
|
|
43761
43780
|
className: c("block min-w-0 max-w-full overflow-hidden text-ellipsis whitespace-nowrap", t),
|
|
43762
43781
|
children: e
|
|
43763
|
-
}),
|
|
43782
|
+
}), M3 = ({ label: e, onDownload: t }) => /* @__PURE__ */ U("div", {
|
|
43764
43783
|
className: "pointer-events-none absolute inset-0 z-10 flex rounded-[inherit] items-center justify-center bg-f1-background/35 opacity-0 backdrop-blur-sm transition-opacity duration-150 focus-within:pointer-events-auto focus-within:opacity-100 group-hover/attachment:pointer-events-auto group-hover/attachment:opacity-100 motion-reduce:transition-none [@media(hover:none)]:pointer-events-auto [@media(hover:none)]:opacity-100",
|
|
43765
43784
|
"data-testid": "attachment-download-overlay",
|
|
43766
43785
|
children: /* @__PURE__ */ U(me, {
|
|
@@ -43772,17 +43791,17 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
43772
43791
|
label: e,
|
|
43773
43792
|
onClick: t
|
|
43774
43793
|
})
|
|
43775
|
-
}),
|
|
43794
|
+
}), N3 = {
|
|
43776
43795
|
md: "h-[132px] w-[168px]",
|
|
43777
43796
|
sm: "h-[96px] w-[120px]"
|
|
43778
|
-
},
|
|
43797
|
+
}, P3 = {
|
|
43779
43798
|
md: 158,
|
|
43780
43799
|
sm: 110
|
|
43781
|
-
},
|
|
43800
|
+
}, F3 = ({ file: e, preview: t, icon: n = uo, onOpen: r, action: i, overlay: o, previewDisabled: s = !1, busy: u = !1, cornerClass: d = "rounded-xl", surfaceClassName: f, testId: p, failed: m = !1, size: h = "md" }) => {
|
|
43782
43801
|
let g = a(), _ = r ? {
|
|
43783
43802
|
label: g.t("chat.openNamedDocument", { name: e.name }),
|
|
43784
43803
|
onClick: r
|
|
43785
|
-
} : null, v = !r && i ? /* @__PURE__ */ U(
|
|
43804
|
+
} : null, v = !r && i ? /* @__PURE__ */ U(M3, {
|
|
43786
43805
|
label: i.label,
|
|
43787
43806
|
onDownload: i.onClick
|
|
43788
43807
|
}) : null, y = /* @__PURE__ */ U(Jr, { children: t ?? /* @__PURE__ */ U("span", {
|
|
@@ -43793,7 +43812,7 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
43793
43812
|
})
|
|
43794
43813
|
}) }), b = c("relative grid min-h-0 flex-1 place-items-center overflow-hidden rounded-md border-0 bg-f1-background-secondary p-0", f);
|
|
43795
43814
|
return /* @__PURE__ */ W("div", {
|
|
43796
|
-
className: c("group/attachment relative box-border flex shrink-0 flex-col gap-1 overflow-hidden border border-solid border-f1-border-secondary bg-f1-background p-1",
|
|
43815
|
+
className: c("group/attachment relative box-border flex shrink-0 flex-col gap-1 overflow-hidden border border-solid border-f1-border-secondary bg-f1-background p-1", N3[h], d, f),
|
|
43797
43816
|
"data-testid": p,
|
|
43798
43817
|
"data-preview-failed": m || void 0,
|
|
43799
43818
|
children: [
|
|
@@ -43821,7 +43840,7 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
43821
43840
|
}), /* @__PURE__ */ U("bdi", {
|
|
43822
43841
|
dir: "auto",
|
|
43823
43842
|
className: "min-w-0 flex-1",
|
|
43824
|
-
children: /* @__PURE__ */ U(
|
|
43843
|
+
children: /* @__PURE__ */ U(j3, {
|
|
43825
43844
|
className: c("font-medium text-f1-foreground", h === "sm" ? "text-xs" : "text-sm"),
|
|
43826
43845
|
children: e.name
|
|
43827
43846
|
})
|
|
@@ -43842,7 +43861,7 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
43842
43861
|
o
|
|
43843
43862
|
]
|
|
43844
43863
|
});
|
|
43845
|
-
},
|
|
43864
|
+
}, I3 = () => {
|
|
43846
43865
|
let [e, t] = H(() => typeof IntersectionObserver > "u"), n = V(null), r = V(e);
|
|
43847
43866
|
return {
|
|
43848
43867
|
ref: z((e) => {
|
|
@@ -43854,86 +43873,86 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
43854
43873
|
}, []),
|
|
43855
43874
|
shouldMount: e
|
|
43856
43875
|
};
|
|
43857
|
-
},
|
|
43876
|
+
}, L3 = () => import("./PdfThumbnail-BYrhsyMw.js"), R3 = () => import("./SheetThumbnail-HtGezPp4.js"), z3 = () => import("./DocxThumbnail-CK9vFoTB.js"), B3 = () => import("./TextThumbnail-DKNxh344.js"), V3 = () => import("./CodeThumbnail-ChpXV1S-.js"), H3 = () => import("./HtmlThumbnail-BJuJkuvu.js"), U3 = () => import("./ArchiveThumbnail-BZgITTo2.js"), W3 = Br(L3), G3 = Br(R3), K3 = Br(z3), q3 = Br(B3), J3 = Br(V3), Y3 = Br(H3), X3 = Br(U3), Z3 = 384, Q3 = 160, $3 = ({ kind: e, file: t, url: n, width: r, onError: i, onRendered: a }) => e === "pdf" ? /* @__PURE__ */ U(W3, {
|
|
43858
43877
|
url: n,
|
|
43859
43878
|
width: r,
|
|
43860
43879
|
onError: i,
|
|
43861
43880
|
onRendered: a
|
|
43862
|
-
}) : e === "sheet" ? /* @__PURE__ */ U(
|
|
43881
|
+
}) : e === "sheet" ? /* @__PURE__ */ U(G3, {
|
|
43863
43882
|
url: n,
|
|
43864
43883
|
onError: i,
|
|
43865
43884
|
onRendered: a
|
|
43866
|
-
}) : e === "docx" ? /* @__PURE__ */ U(
|
|
43885
|
+
}) : e === "docx" ? /* @__PURE__ */ U(K3, {
|
|
43867
43886
|
url: n,
|
|
43868
43887
|
width: r,
|
|
43869
43888
|
onError: i,
|
|
43870
43889
|
onRendered: a
|
|
43871
|
-
}) : e === "text" ? /* @__PURE__ */ U(
|
|
43890
|
+
}) : e === "text" ? /* @__PURE__ */ U(q3, {
|
|
43872
43891
|
url: n,
|
|
43873
43892
|
onError: i,
|
|
43874
43893
|
onRendered: a
|
|
43875
|
-
}) : e === "code" ? /* @__PURE__ */ U(
|
|
43894
|
+
}) : e === "code" ? /* @__PURE__ */ U(J3, {
|
|
43876
43895
|
url: n,
|
|
43877
|
-
language:
|
|
43896
|
+
language: X1(t),
|
|
43878
43897
|
onError: i,
|
|
43879
43898
|
onRendered: a
|
|
43880
|
-
}) : e === "html" ? /* @__PURE__ */ U(
|
|
43899
|
+
}) : e === "html" ? /* @__PURE__ */ U(Y3, {
|
|
43881
43900
|
url: n,
|
|
43882
43901
|
width: r,
|
|
43883
43902
|
title: t.name,
|
|
43884
43903
|
onError: i,
|
|
43885
43904
|
onRendered: a
|
|
43886
|
-
}) : e === "archive" ? /* @__PURE__ */ U(
|
|
43905
|
+
}) : e === "archive" ? /* @__PURE__ */ U(X3, {
|
|
43887
43906
|
url: n,
|
|
43888
43907
|
size: t.size,
|
|
43889
43908
|
onError: i,
|
|
43890
43909
|
onRendered: a
|
|
43891
|
-
}) : null,
|
|
43892
|
-
let
|
|
43893
|
-
label:
|
|
43910
|
+
}) : null, e6 = ({ file: e, kind: t, cornerClass: n = "rounded-xl", action: r, previewDisabled: i = !1, compact: o = !1, compactSize: s = "md", surfaceClassName: l, onBeforeOpen: u, onDownloaded: d, testIdPrefix: f = "chat", lazyMount: p = !1, failedAction: m, fitWidth: h = !1, decorativeSnapshot: g = !1, onOpen: _ }) => {
|
|
43911
|
+
let v = a(), y = o1(), b = n1(), [x, S] = H(!1), C = I3(), w = !p || C.shouldMount, T = t === "pdf" ? e.previewUrl ?? e.url : e.url, { urlCache: E } = H$(), D = t === "archive" && $1(e, E !== null), O = e1(T, { enabled: w && !D }), k = r ?? {
|
|
43912
|
+
label: v.t("chat.downloadNamedFile", { name: e.name }),
|
|
43894
43913
|
icon: Qa,
|
|
43895
43914
|
onClick: () => {
|
|
43896
|
-
|
|
43915
|
+
b(e.url, e.name), d?.();
|
|
43897
43916
|
}
|
|
43898
|
-
},
|
|
43899
|
-
|
|
43917
|
+
}, A = Z3, j = t6(h && !o, A), M = C.ref, N = j.setElement, P = z((e) => {
|
|
43918
|
+
p && M(e), N(e);
|
|
43900
43919
|
}, [
|
|
43901
|
-
|
|
43902
|
-
|
|
43903
|
-
|
|
43904
|
-
]),
|
|
43905
|
-
|
|
43920
|
+
p,
|
|
43921
|
+
M,
|
|
43922
|
+
N
|
|
43923
|
+
]), ee = x || D || O.status === "error", te = t === "archive", ne = m === void 0 ? k : m, re = () => {
|
|
43924
|
+
u?.() !== !1 && (_ ? _() : y?.openDocumentPreview(e));
|
|
43906
43925
|
};
|
|
43907
43926
|
return o ? /* @__PURE__ */ U("div", {
|
|
43908
|
-
ref:
|
|
43927
|
+
ref: p ? M : void 0,
|
|
43909
43928
|
className: "shrink-0",
|
|
43910
|
-
children: /* @__PURE__ */ U(
|
|
43929
|
+
children: /* @__PURE__ */ U(F3, {
|
|
43911
43930
|
file: e,
|
|
43912
|
-
testId: `${
|
|
43931
|
+
testId: `${f}-document-attachment`,
|
|
43913
43932
|
size: s,
|
|
43914
43933
|
cornerClass: n,
|
|
43915
43934
|
surfaceClassName: l,
|
|
43916
|
-
failed:
|
|
43935
|
+
failed: ee,
|
|
43917
43936
|
previewDisabled: i,
|
|
43918
|
-
busy: !
|
|
43919
|
-
onOpen:
|
|
43920
|
-
action:
|
|
43921
|
-
preview:
|
|
43937
|
+
busy: !ee && O.status !== "ready",
|
|
43938
|
+
onOpen: ee || te ? void 0 : re,
|
|
43939
|
+
action: ee || te ? ne : r ?? null,
|
|
43940
|
+
preview: ee ? void 0 : /* @__PURE__ */ U(a6, {
|
|
43922
43941
|
kind: t,
|
|
43923
|
-
scale:
|
|
43942
|
+
scale: P3[s] / i6,
|
|
43924
43943
|
file: e,
|
|
43925
|
-
url:
|
|
43926
|
-
decorative:
|
|
43927
|
-
testIdPrefix:
|
|
43928
|
-
onFailed: () =>
|
|
43944
|
+
url: w && O.status === "ready" ? O.url : void 0,
|
|
43945
|
+
decorative: g,
|
|
43946
|
+
testIdPrefix: f,
|
|
43947
|
+
onFailed: () => S(!0)
|
|
43929
43948
|
})
|
|
43930
43949
|
})
|
|
43931
43950
|
}) : /* @__PURE__ */ W("div", {
|
|
43932
|
-
ref:
|
|
43951
|
+
ref: P,
|
|
43933
43952
|
className: c("group/attachment relative flex max-w-full flex-col overflow-hidden border border-solid border-f1-border-secondary bg-f1-background", n, l),
|
|
43934
|
-
style: { width:
|
|
43935
|
-
"data-testid": `${
|
|
43936
|
-
"data-preview-failed":
|
|
43953
|
+
style: { width: A },
|
|
43954
|
+
"data-testid": `${f}-document-attachment`,
|
|
43955
|
+
"data-preview-failed": ee || void 0,
|
|
43937
43956
|
children: [/* @__PURE__ */ W("div", {
|
|
43938
43957
|
className: "flex items-center gap-2 px-2 py-2",
|
|
43939
43958
|
children: [
|
|
@@ -43944,7 +43963,7 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
43944
43963
|
},
|
|
43945
43964
|
size: "md"
|
|
43946
43965
|
}),
|
|
43947
|
-
/* @__PURE__ */ U(
|
|
43966
|
+
/* @__PURE__ */ U(j3, {
|
|
43948
43967
|
className: "grow text-sm font-medium text-f1-foreground",
|
|
43949
43968
|
children: e.name
|
|
43950
43969
|
}),
|
|
@@ -43958,28 +43977,28 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
43958
43977
|
onClick: r.onClick
|
|
43959
43978
|
}) : null
|
|
43960
43979
|
]
|
|
43961
|
-
}),
|
|
43962
|
-
height:
|
|
43980
|
+
}), ee ? /* @__PURE__ */ U(n6, {
|
|
43981
|
+
height: Q3,
|
|
43963
43982
|
surfaceClassName: l,
|
|
43964
|
-
testIdPrefix:
|
|
43965
|
-
download: r ? void 0 :
|
|
43966
|
-
}) : /* @__PURE__ */ U(
|
|
43983
|
+
testIdPrefix: f,
|
|
43984
|
+
download: r ? void 0 : k
|
|
43985
|
+
}) : /* @__PURE__ */ U(r6, {
|
|
43967
43986
|
file: e,
|
|
43968
43987
|
kind: t,
|
|
43969
|
-
url:
|
|
43988
|
+
url: w && O.status === "ready" ? O.url : void 0,
|
|
43970
43989
|
width: 382,
|
|
43971
|
-
height:
|
|
43972
|
-
scale:
|
|
43990
|
+
height: Q3,
|
|
43991
|
+
scale: j.value,
|
|
43973
43992
|
previewDisabled: i,
|
|
43974
|
-
decorative:
|
|
43993
|
+
decorative: g,
|
|
43975
43994
|
surfaceClassName: l,
|
|
43976
|
-
testIdPrefix:
|
|
43977
|
-
download:
|
|
43978
|
-
onOpen:
|
|
43979
|
-
onFailed: () =>
|
|
43995
|
+
testIdPrefix: f,
|
|
43996
|
+
download: te ? k : void 0,
|
|
43997
|
+
onOpen: re,
|
|
43998
|
+
onFailed: () => S(!0)
|
|
43980
43999
|
})]
|
|
43981
44000
|
});
|
|
43982
|
-
},
|
|
44001
|
+
}, t6 = (e, t) => {
|
|
43983
44002
|
let [n, r] = H(null), [i, a] = H(1);
|
|
43984
44003
|
return Gr(() => {
|
|
43985
44004
|
if (!e || !n) return;
|
|
@@ -43998,7 +44017,7 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
43998
44017
|
setElement: r,
|
|
43999
44018
|
value: i
|
|
44000
44019
|
};
|
|
44001
|
-
},
|
|
44020
|
+
}, n6 = ({ height: e, surfaceClassName: t, testIdPrefix: n, download: r }) => {
|
|
44002
44021
|
let i = a();
|
|
44003
44022
|
return /* @__PURE__ */ W("div", {
|
|
44004
44023
|
className: c("flex flex-col items-center justify-center gap-2 border-0 border-t border-solid border-f1-border-secondary bg-f1-background-secondary px-4", t),
|
|
@@ -44017,7 +44036,7 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
44017
44036
|
onClick: r.onClick
|
|
44018
44037
|
}) : null]
|
|
44019
44038
|
});
|
|
44020
|
-
},
|
|
44039
|
+
}, r6 = ({ file: e, kind: t, url: n, width: r, height: i, scale: o, previewDisabled: u, decorative: d, surfaceClassName: f, testIdPrefix: p, download: m, onOpen: h, onFailed: g }) => {
|
|
44021
44040
|
let _ = a(), { reducedMotion: v } = H$(), [y, b] = H(!1), x = c("relative block w-full overflow-hidden border-0 border-solid border-f1-border-secondary bg-f1-background-secondary p-0", "border-t", f), S = /* @__PURE__ */ W(Jr, { children: [/* @__PURE__ */ U(s, { className: c("absolute inset-0 h-full w-full rounded-none motion-reduce:animate-none", f) }), /* @__PURE__ */ U("div", {
|
|
44022
44041
|
className: c("relative", !v && "transition-opacity duration-200", y ? "opacity-100" : "opacity-0"),
|
|
44023
44042
|
style: o < 1 ? {
|
|
@@ -44029,7 +44048,7 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
44029
44048
|
"data-testid": `${p}-document-snapshot`,
|
|
44030
44049
|
children: /* @__PURE__ */ U(Fr, {
|
|
44031
44050
|
fallback: null,
|
|
44032
|
-
children: n ? /* @__PURE__ */ U(
|
|
44051
|
+
children: n ? /* @__PURE__ */ U($3, {
|
|
44033
44052
|
kind: t,
|
|
44034
44053
|
file: e,
|
|
44035
44054
|
url: n,
|
|
@@ -44043,7 +44062,7 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
44043
44062
|
className: c(x, "rounded-b-[inherit]"),
|
|
44044
44063
|
"aria-busy": !y || void 0,
|
|
44045
44064
|
style: { height: i },
|
|
44046
|
-
children: [S, /* @__PURE__ */ U(
|
|
44065
|
+
children: [S, /* @__PURE__ */ U(M3, {
|
|
44047
44066
|
label: m.label,
|
|
44048
44067
|
onDownload: m.onClick
|
|
44049
44068
|
})]
|
|
@@ -44057,32 +44076,32 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
44057
44076
|
style: { height: i },
|
|
44058
44077
|
children: S
|
|
44059
44078
|
});
|
|
44060
|
-
},
|
|
44079
|
+
}, i6 = 300, a6 = ({ kind: e, scale: t, file: n, url: r, decorative: i, testIdPrefix: a, onFailed: o }) => {
|
|
44061
44080
|
let { reducedMotion: l } = H$(), [u, d] = H(!1);
|
|
44062
44081
|
return /* @__PURE__ */ W("span", {
|
|
44063
44082
|
className: "absolute inset-0",
|
|
44064
44083
|
children: [/* @__PURE__ */ U(s, { className: "absolute inset-0 h-full w-full rounded-none motion-reduce:animate-none" }), /* @__PURE__ */ U("span", {
|
|
44065
44084
|
className: c("absolute left-0 top-0 block origin-top-left", !l && "transition-opacity duration-200", u ? "opacity-100" : "opacity-0"),
|
|
44066
44085
|
style: {
|
|
44067
|
-
width:
|
|
44086
|
+
width: i6,
|
|
44068
44087
|
transform: `scale(${t})`
|
|
44069
44088
|
},
|
|
44070
44089
|
"aria-hidden": i ? !0 : void 0,
|
|
44071
44090
|
"data-testid": `${a}-document-snapshot`,
|
|
44072
44091
|
children: /* @__PURE__ */ U(Fr, {
|
|
44073
44092
|
fallback: null,
|
|
44074
|
-
children: r ? /* @__PURE__ */ U(
|
|
44093
|
+
children: r ? /* @__PURE__ */ U($3, {
|
|
44075
44094
|
kind: e,
|
|
44076
44095
|
file: n,
|
|
44077
44096
|
url: r,
|
|
44078
|
-
width:
|
|
44097
|
+
width: i6,
|
|
44079
44098
|
onError: o,
|
|
44080
44099
|
onRendered: () => d(!0)
|
|
44081
44100
|
}) : null
|
|
44082
44101
|
})
|
|
44083
44102
|
})]
|
|
44084
44103
|
});
|
|
44085
|
-
},
|
|
44104
|
+
}, o6 = [
|
|
44086
44105
|
8,
|
|
44087
44106
|
14,
|
|
44088
44107
|
20,
|
|
@@ -44095,11 +44114,11 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
44095
44114
|
15,
|
|
44096
44115
|
7,
|
|
44097
44116
|
13
|
|
44098
|
-
],
|
|
44117
|
+
], s6 = ({ className: e }) => /* @__PURE__ */ U("svg", {
|
|
44099
44118
|
viewBox: "0 0 58 24",
|
|
44100
44119
|
"aria-hidden": "true",
|
|
44101
44120
|
className: c("h-6 w-14 text-f1-foreground-tertiary", e),
|
|
44102
|
-
children:
|
|
44121
|
+
children: o6.map((e, t) => /* @__PURE__ */ U("rect", {
|
|
44103
44122
|
x: t * 4.9,
|
|
44104
44123
|
y: 12 - e / 2,
|
|
44105
44124
|
width: 2.6,
|
|
@@ -44107,7 +44126,7 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
44107
44126
|
rx: 1.3,
|
|
44108
44127
|
fill: "currentColor"
|
|
44109
44128
|
}, t))
|
|
44110
|
-
}),
|
|
44129
|
+
}), c6 = "w-[24rem] max-w-full", l6 = "w-[32rem] max-w-full", u6 = "gap-0.5", d6 = "pointer-events-none absolute inset-x-0 bottom-0 h-[46%] bg-[linear-gradient(to_top,rgba(0,0,0,0.5),rgba(0,0,0,0.18)_45%,transparent)]", f6 = "bg-[hsl(222_31%_11%)]", p6 = "bg-[hsl(220_39%_6%/0.72)]", m6 = "bg-[hsl(220_39%_6%/0.6)]", h6 = "bg-[hsl(220_39%_6%/0.55)]", g6 = ({ url: e, posterUrl: t, onError: n, className: r }) => t ? /* @__PURE__ */ U(_1, {
|
|
44111
44130
|
src: t,
|
|
44112
44131
|
alt: "",
|
|
44113
44132
|
onError: n,
|
|
@@ -44126,11 +44145,11 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
44126
44145
|
},
|
|
44127
44146
|
"aria-hidden": "true",
|
|
44128
44147
|
className: c("pointer-events-none h-full w-full object-cover", r)
|
|
44129
|
-
}),
|
|
44148
|
+
}), _6 = ({ duration: e }) => /* @__PURE__ */ W(Jr, { children: [/* @__PURE__ */ U("span", {
|
|
44130
44149
|
"aria-hidden": "true",
|
|
44131
44150
|
className: "pointer-events-none absolute inset-0 grid place-items-center",
|
|
44132
44151
|
children: /* @__PURE__ */ U("span", {
|
|
44133
|
-
className: c("grid h-8 w-8 place-items-center rounded-full text-f1-foreground-inverse",
|
|
44152
|
+
className: c("grid h-8 w-8 place-items-center rounded-full text-f1-foreground-inverse", m6),
|
|
44134
44153
|
children: /* @__PURE__ */ U(Me, {
|
|
44135
44154
|
icon: Fc,
|
|
44136
44155
|
size: "sm"
|
|
@@ -44138,27 +44157,27 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
44138
44157
|
})
|
|
44139
44158
|
}), e ? /* @__PURE__ */ U("span", {
|
|
44140
44159
|
"aria-hidden": "true",
|
|
44141
|
-
className: c("pointer-events-none absolute bottom-1.5 right-2 rounded-full px-1.5 text-xs font-semibold text-f1-foreground-inverse",
|
|
44160
|
+
className: c("pointer-events-none absolute bottom-1.5 right-2 rounded-full px-1.5 text-xs font-semibold text-f1-foreground-inverse", m6),
|
|
44142
44161
|
children: e
|
|
44143
|
-
}) : null] }),
|
|
44144
|
-
let l = a(), u = t === "uploading", d = t === "error", f = t === "ready" ? o : void 0, [p, m] = H(null), h = p === e.url, g = e.kind === "image" ? { bucket: "image" } :
|
|
44145
|
-
e.kind === "image" ? (v = "image-preview", y =
|
|
44162
|
+
}) : null] }), v6 = c("box-border border border-solid border-f1-border-secondary bg-f1-background-secondary", N3.sm), y6 = ({ attachment: e, status: t, errorMessage: n, removeLabel: r, onRemove: i, onOpen: o, testIdPrefix: s = "chat" }) => {
|
|
44163
|
+
let l = a(), u = t === "uploading", d = t === "error", f = t === "ready" ? o : void 0, [p, m] = H(null), h = p === e.url, g = e.kind === "image" ? { bucket: "image" } : p0(e, { inferImages: !1 }), _, v, y = "";
|
|
44164
|
+
e.kind === "image" ? (v = "image-preview", y = v6, _ = /* @__PURE__ */ U(b6, {
|
|
44146
44165
|
label: l.t("chat.openNamedDocument", { name: e.name }),
|
|
44147
44166
|
onClick: f,
|
|
44148
|
-
children: /* @__PURE__ */ U(
|
|
44167
|
+
children: /* @__PURE__ */ U(_1, {
|
|
44149
44168
|
src: e.thumbnailUrl ?? e.url,
|
|
44150
44169
|
alt: e.name,
|
|
44151
44170
|
className: "h-full w-full object-cover"
|
|
44152
44171
|
})
|
|
44153
|
-
})) : g.bucket === "video" && !h ? (v = "video-preview", y =
|
|
44172
|
+
})) : g.bucket === "video" && !h ? (v = "video-preview", y = v6, _ = /* @__PURE__ */ W(b6, {
|
|
44154
44173
|
label: l.t("chat.openNamedDocument", { name: e.name }),
|
|
44155
44174
|
onClick: f,
|
|
44156
|
-
children: [/* @__PURE__ */ U(
|
|
44175
|
+
children: [/* @__PURE__ */ U(g6, {
|
|
44157
44176
|
url: e.url,
|
|
44158
44177
|
posterUrl: e.thumbnailUrl,
|
|
44159
44178
|
onError: () => m(e.url)
|
|
44160
|
-
}), /* @__PURE__ */ U(
|
|
44161
|
-
})) : g.bucket === "document" ? (v = "document-preview", _ = /* @__PURE__ */ U(
|
|
44179
|
+
}), /* @__PURE__ */ U(_6, {})]
|
|
44180
|
+
})) : g.bucket === "document" ? (v = "document-preview", _ = /* @__PURE__ */ U(e6, {
|
|
44162
44181
|
file: e,
|
|
44163
44182
|
kind: g.kind,
|
|
44164
44183
|
cornerClass: "rounded-xl",
|
|
@@ -44168,15 +44187,15 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
44168
44187
|
onOpen: f,
|
|
44169
44188
|
failedAction: null,
|
|
44170
44189
|
testIdPrefix: s
|
|
44171
|
-
})) : g.bucket === "audio" ? (v = "audio-preview", _ = /* @__PURE__ */ U(
|
|
44190
|
+
})) : g.bucket === "audio" ? (v = "audio-preview", _ = /* @__PURE__ */ U(F3, {
|
|
44172
44191
|
file: e,
|
|
44173
44192
|
testId: `${s}-audio-attachment`,
|
|
44174
|
-
preview: /* @__PURE__ */ U(
|
|
44193
|
+
preview: /* @__PURE__ */ U(s6, {}),
|
|
44175
44194
|
size: "sm",
|
|
44176
44195
|
onOpen: f,
|
|
44177
44196
|
previewDisabled: u || d,
|
|
44178
44197
|
action: null
|
|
44179
|
-
})) : (v = "file-preview", _ = /* @__PURE__ */ U(
|
|
44198
|
+
})) : (v = "file-preview", _ = /* @__PURE__ */ U(F3, {
|
|
44180
44199
|
file: e,
|
|
44181
44200
|
testId: `${s}-file-tile`,
|
|
44182
44201
|
size: "sm",
|
|
@@ -44190,11 +44209,11 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
44190
44209
|
"data-testid": `${s}-composer-${v}`,
|
|
44191
44210
|
"data-status": t,
|
|
44192
44211
|
children: [
|
|
44193
|
-
/* @__PURE__ */ U(
|
|
44212
|
+
/* @__PURE__ */ U(x6, {
|
|
44194
44213
|
active: u,
|
|
44195
44214
|
children: _
|
|
44196
44215
|
}),
|
|
44197
|
-
/* @__PURE__ */ U(
|
|
44216
|
+
/* @__PURE__ */ U(S6, {
|
|
44198
44217
|
uploading: u,
|
|
44199
44218
|
failed: d,
|
|
44200
44219
|
testIdPrefix: s
|
|
@@ -44221,7 +44240,7 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
44221
44240
|
label: n,
|
|
44222
44241
|
children: b
|
|
44223
44242
|
}) : b;
|
|
44224
|
-
},
|
|
44243
|
+
}, b6 = ({ label: e, onClick: t, children: n }) => t ? /* @__PURE__ */ U("button", {
|
|
44225
44244
|
type: "button",
|
|
44226
44245
|
"aria-label": e,
|
|
44227
44246
|
onClick: t,
|
|
@@ -44230,13 +44249,13 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
44230
44249
|
}) : /* @__PURE__ */ U("div", {
|
|
44231
44250
|
className: "relative h-full w-full",
|
|
44232
44251
|
children: n
|
|
44233
|
-
}),
|
|
44252
|
+
}), x6 = ({ active: e, children: t }) => {
|
|
44234
44253
|
let { reducedMotion: n } = H$();
|
|
44235
44254
|
return /* @__PURE__ */ U("div", {
|
|
44236
44255
|
className: c("flex h-full w-full", !n && "transition-[filter,transform] duration-200 ease-out", e && "scale-[1.08] blur-[4px]"),
|
|
44237
44256
|
children: t
|
|
44238
44257
|
});
|
|
44239
|
-
},
|
|
44258
|
+
}, S6 = ({ uploading: e, failed: t, testIdPrefix: n }) => {
|
|
44240
44259
|
let { reducedMotion: r } = H$(), i = {
|
|
44241
44260
|
duration: r ? 0 : .18,
|
|
44242
44261
|
ease: "easeOut"
|
|
@@ -44275,7 +44294,7 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
44275
44294
|
})
|
|
44276
44295
|
}, "overlay") : null
|
|
44277
44296
|
});
|
|
44278
|
-
},
|
|
44297
|
+
}, C6 = ({ items: e, label: t, busy: n, reducedMotion: r, stripRef: i, testIdPrefix: a = "chat" }) => /* @__PURE__ */ U(Oe, {
|
|
44279
44298
|
initial: !1,
|
|
44280
44299
|
children: e.length > 0 ? /* @__PURE__ */ U(M.div, {
|
|
44281
44300
|
className: "overflow-hidden",
|
|
@@ -44293,7 +44312,7 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
44293
44312
|
},
|
|
44294
44313
|
transition: {
|
|
44295
44314
|
duration: r ? 0 : .18,
|
|
44296
|
-
ease:
|
|
44315
|
+
ease: p1
|
|
44297
44316
|
},
|
|
44298
44317
|
children: /* @__PURE__ */ U("div", {
|
|
44299
44318
|
ref: i,
|
|
@@ -44321,11 +44340,11 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
44321
44340
|
exit: r ? void 0 : {
|
|
44322
44341
|
opacity: 0,
|
|
44323
44342
|
scale: .95,
|
|
44324
|
-
transition:
|
|
44343
|
+
transition: h1
|
|
44325
44344
|
},
|
|
44326
44345
|
transition: {
|
|
44327
|
-
...
|
|
44328
|
-
layout:
|
|
44346
|
+
...m1,
|
|
44347
|
+
layout: g1
|
|
44329
44348
|
},
|
|
44330
44349
|
children: /* @__PURE__ */ U(M.div, {
|
|
44331
44350
|
className: "flex",
|
|
@@ -44338,7 +44357,7 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
44338
44357
|
})
|
|
44339
44358
|
})
|
|
44340
44359
|
}, "attachments-row") : null
|
|
44341
|
-
}),
|
|
44360
|
+
}), w6 = je({
|
|
44342
44361
|
base: "flex gap-md",
|
|
44343
44362
|
variants: {
|
|
44344
44363
|
align: {
|
|
@@ -44398,11 +44417,11 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
44398
44417
|
fullWidthOnStack: !1,
|
|
44399
44418
|
reverseOnStack: !1
|
|
44400
44419
|
}
|
|
44401
|
-
}),
|
|
44420
|
+
}), T6 = {
|
|
44402
44421
|
sm: 640,
|
|
44403
44422
|
md: 768,
|
|
44404
44423
|
"container-md": 448
|
|
44405
|
-
},
|
|
44424
|
+
}, E6 = (e) => "type" in e && e.type === "separator", D6 = (e) => "type" in e && e.type === "split", O6 = (e) => !("type" in e), k6 = (e, t, n) => /* @__PURE__ */ U(Se, {
|
|
44406
44425
|
label: e.label,
|
|
44407
44426
|
icon: e.icon,
|
|
44408
44427
|
iconPosition: e.iconPosition,
|
|
@@ -44416,29 +44435,29 @@ var O3 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ *
|
|
|
44416
44435
|
href: e.href,
|
|
44417
44436
|
target: e.target
|
|
44418
44437
|
}
|
|
44419
|
-
}, e.id),
|
|
44438
|
+
}, e.id), A6 = (e, t, n) => {
|
|
44420
44439
|
let { id: r, type: i, ...a } = e;
|
|
44421
44440
|
return /* @__PURE__ */ U($B, {
|
|
44422
44441
|
...a,
|
|
44423
44442
|
size: t,
|
|
44424
44443
|
variant: n
|
|
44425
44444
|
}, r);
|
|
44426
|
-
},
|
|
44445
|
+
}, j6 = (e, t) => /* @__PURE__ */ U(Se, {
|
|
44427
44446
|
label: e.label,
|
|
44428
44447
|
variant: "outline",
|
|
44429
44448
|
size: t,
|
|
44430
44449
|
disabled: e.disabled,
|
|
44431
44450
|
href: e.href,
|
|
44432
44451
|
target: e.target
|
|
44433
|
-
}, "secondary-link"),
|
|
44452
|
+
}, "secondary-link"), M6 = (e, t) => {
|
|
44434
44453
|
let n = e.variant ?? "default";
|
|
44435
|
-
return
|
|
44454
|
+
return D6(e) ? A6(e, t, n) : k6(e, t, n);
|
|
44436
44455
|
};
|
|
44437
|
-
function
|
|
44456
|
+
function N6({ primaryAction: e, secondaryActions: t, otherActions: n = [], size: r = "md", align: i = "end", stack: a = "none", fullWidthOnStack: o = !1, reverseOnStack: s = !1, canOverflow: l = !0, className: u }) {
|
|
44438
44457
|
let d = V(null), { width: f = 0 } = k({
|
|
44439
44458
|
ref: d,
|
|
44440
44459
|
box: "border-box"
|
|
44441
|
-
}), p = a === "sm" || a === "md" ?
|
|
44460
|
+
}), p = a === "sm" || a === "md" ? T6[a] : T6.md, m = re(`(min-width: ${p}px)`, { initializeWithValue: !1 }), h = a === "none" ? !0 : a === "container-md" ? f >= T6["container-md"] : m, g = typeof r == "string" ? r : r.base, _ = typeof r == "string" ? r : r.md, v = h ? _ : g, y = {
|
|
44442
44461
|
primaryAction: e,
|
|
44443
44462
|
secondaryItems: Array.isArray(t) ? t : [],
|
|
44444
44463
|
secondaryLink: t != null && !Array.isArray(t) ? t : void 0,
|
|
@@ -44450,26 +44469,26 @@ function A6({ primaryAction: e, secondaryActions: t, otherActions: n = [], size:
|
|
|
44450
44469
|
return /* @__PURE__ */ U("div", {
|
|
44451
44470
|
ref: d,
|
|
44452
44471
|
role: "group",
|
|
44453
|
-
className: c(h ? "flex w-full items-center gap-md [&>*:not(:first-child)]:shrink-0" :
|
|
44472
|
+
className: c(h ? "flex w-full items-center gap-md [&>*:not(:first-child)]:shrink-0" : w6({
|
|
44454
44473
|
align: i,
|
|
44455
44474
|
stack: a,
|
|
44456
44475
|
fullWidthOnStack: o,
|
|
44457
44476
|
reverseOnStack: s
|
|
44458
44477
|
}), u),
|
|
44459
|
-
children: h ? /* @__PURE__ */ U(
|
|
44478
|
+
children: h ? /* @__PURE__ */ U(F6, { ...y }, "row") : /* @__PURE__ */ U(P6, { ...y }, "stacked")
|
|
44460
44479
|
});
|
|
44461
44480
|
}
|
|
44462
|
-
function
|
|
44463
|
-
let a = t.filter((e) => !
|
|
44481
|
+
function P6({ primaryAction: e, secondaryItems: t, secondaryLink: n, otherActions: r, size: i }) {
|
|
44482
|
+
let a = t.filter((e) => !E6(e)).map((e) => D6(e) ? A6(e, i, "outline") : k6(e, i, "outline"));
|
|
44464
44483
|
return /* @__PURE__ */ W(Jr, { children: [
|
|
44465
44484
|
r.length > 0 ? /* @__PURE__ */ U(uf, { items: r }) : null,
|
|
44466
44485
|
a,
|
|
44467
|
-
n ?
|
|
44468
|
-
e ?
|
|
44486
|
+
n ? j6(n, i) : null,
|
|
44487
|
+
e ? M6(e, i) : null
|
|
44469
44488
|
] });
|
|
44470
44489
|
}
|
|
44471
|
-
function
|
|
44472
|
-
let s = Kr(() => t.filter(
|
|
44490
|
+
function F6({ primaryAction: e, secondaryItems: t, secondaryLink: n, otherActions: r, size: i, align: a, canOverflow: o }) {
|
|
44491
|
+
let s = Kr(() => t.filter(O6), [t]), { containerRef: l, measurementContainerRef: u, customOverflowIndicatorRef: d, visibleItems: f, overflowItems: p, isInitialized: m } = qe(s, 8);
|
|
44473
44492
|
B(() => {
|
|
44474
44493
|
u.current?.setAttribute("inert", "");
|
|
44475
44494
|
}, [u]);
|
|
@@ -44479,14 +44498,14 @@ function M6({ primaryAction: e, secondaryItems: t, secondaryLink: n, otherAction
|
|
|
44479
44498
|
} : {
|
|
44480
44499
|
shown: f,
|
|
44481
44500
|
overflowed: p
|
|
44482
|
-
}, _ = new Set(h.map((e) => e.id)), v = e ?
|
|
44501
|
+
}, _ = new Set(h.map((e) => e.id)), v = e ? M6(e, i) : null, y = t.filter(D6), b = t[t.length - 1], x = b != null && E6(b) && (y.length > 0 || v != null), S = [];
|
|
44483
44502
|
t.forEach((e, t) => {
|
|
44484
|
-
|
|
44503
|
+
D6(e) || (E6(e) ? S.push({
|
|
44485
44504
|
kind: "sep",
|
|
44486
44505
|
key: `sep-${t}`
|
|
44487
44506
|
}) : _.has(e.id) && S.push({
|
|
44488
44507
|
kind: "node",
|
|
44489
|
-
node:
|
|
44508
|
+
node: k6(e, i, "outline")
|
|
44490
44509
|
}));
|
|
44491
44510
|
});
|
|
44492
44511
|
let C = S.filter((e, t) => e.kind === "node" || S[t - 1]?.kind === "node" && S[t + 1]?.kind === "node"), w = [
|
|
@@ -44509,7 +44528,7 @@ function M6({ primaryAction: e, secondaryItems: t, secondaryLink: n, otherAction
|
|
|
44509
44528
|
ref: u,
|
|
44510
44529
|
"aria-hidden": "true",
|
|
44511
44530
|
className: "pointer-events-none invisible absolute left-0 top-0 flex items-center gap-md whitespace-nowrap",
|
|
44512
|
-
children: s.map((e) =>
|
|
44531
|
+
children: s.map((e) => k6(e, i, "outline"))
|
|
44513
44532
|
}) : null,
|
|
44514
44533
|
w.length > 0 ? /* @__PURE__ */ U("div", {
|
|
44515
44534
|
ref: d,
|
|
@@ -44519,16 +44538,16 @@ function M6({ primaryAction: e, secondaryItems: t, secondaryLink: n, otherAction
|
|
|
44519
44538
|
size: i
|
|
44520
44539
|
})
|
|
44521
44540
|
}) : null,
|
|
44522
|
-
C.map((e) => e.kind === "sep" ? /* @__PURE__ */ U(
|
|
44523
|
-
n ?
|
|
44541
|
+
C.map((e) => e.kind === "sep" ? /* @__PURE__ */ U(I6, {}, e.key) : e.node),
|
|
44542
|
+
n ? j6(n, i) : null
|
|
44524
44543
|
]
|
|
44525
44544
|
}),
|
|
44526
|
-
y.map((e) =>
|
|
44527
|
-
x ? /* @__PURE__ */ U(
|
|
44545
|
+
y.map((e) => A6(e, i, "outline")),
|
|
44546
|
+
x ? /* @__PURE__ */ U(I6, {}) : null,
|
|
44528
44547
|
v
|
|
44529
44548
|
] });
|
|
44530
44549
|
}
|
|
44531
|
-
function
|
|
44550
|
+
function I6() {
|
|
44532
44551
|
return /* @__PURE__ */ U("div", {
|
|
44533
44552
|
role: "separator",
|
|
44534
44553
|
"aria-orientation": "vertical",
|
|
@@ -44537,22 +44556,22 @@ function N6() {
|
|
|
44537
44556
|
}
|
|
44538
44557
|
//#endregion
|
|
44539
44558
|
//#region src/elements/F0CardHorizontal/components/CardHorizontalActions.tsx
|
|
44540
|
-
var
|
|
44559
|
+
var L6 = {
|
|
44541
44560
|
sm: "flex flex-col @xs:flex-row @xs:items-start @xs:justify-between @xs:gap-4",
|
|
44542
44561
|
md: "flex flex-col @md:flex-row @md:items-start @md:justify-between @md:gap-4",
|
|
44543
44562
|
lg: "flex flex-col @lg:flex-row @lg:items-start @lg:justify-between @lg:gap-4",
|
|
44544
44563
|
never: "flex flex-row items-start justify-between gap-4"
|
|
44545
|
-
},
|
|
44564
|
+
}, R6 = {
|
|
44546
44565
|
sm: "@xs:self-center",
|
|
44547
44566
|
md: "@md:self-center",
|
|
44548
44567
|
lg: "@lg:self-center",
|
|
44549
44568
|
never: "self-center"
|
|
44550
|
-
},
|
|
44569
|
+
}, z6 = {
|
|
44551
44570
|
sm: "@xs:flex-1",
|
|
44552
44571
|
md: "@md:flex-1",
|
|
44553
44572
|
lg: "@lg:flex-1",
|
|
44554
44573
|
never: "flex-1"
|
|
44555
|
-
},
|
|
44574
|
+
}, B6 = {
|
|
44556
44575
|
sm: {
|
|
44557
44576
|
sm: "@xs:pt-2",
|
|
44558
44577
|
md: "@md:pt-2",
|
|
@@ -44565,46 +44584,46 @@ var P6 = {
|
|
|
44565
44584
|
lg: "@lg:pt-1",
|
|
44566
44585
|
never: "pt-1"
|
|
44567
44586
|
}
|
|
44568
|
-
},
|
|
44587
|
+
}, V6 = {
|
|
44569
44588
|
sm: "@xs:min-h-10",
|
|
44570
44589
|
md: "@md:min-h-10",
|
|
44571
44590
|
lg: "@lg:min-h-10",
|
|
44572
44591
|
never: "min-h-10"
|
|
44573
|
-
},
|
|
44592
|
+
}, H6 = {
|
|
44574
44593
|
sm: "hidden @xs:flex",
|
|
44575
44594
|
md: "hidden @md:flex",
|
|
44576
44595
|
lg: "hidden @lg:flex",
|
|
44577
44596
|
never: "flex"
|
|
44578
|
-
},
|
|
44597
|
+
}, U6 = {
|
|
44579
44598
|
sm: "flex @xs:hidden",
|
|
44580
44599
|
md: "flex @md:hidden",
|
|
44581
44600
|
lg: "flex @lg:hidden",
|
|
44582
44601
|
never: "hidden"
|
|
44583
|
-
},
|
|
44602
|
+
}, W6 = {
|
|
44584
44603
|
sm: "-mx-4 mt-4 border-0 border-t border-solid border-t-f1-border-secondary px-4 pt-4 @xs:mx-0 @xs:mt-0 @xs:border-t-0 @xs:px-0 @xs:pt-0",
|
|
44585
44604
|
md: "-mx-4 mt-4 border-0 border-t border-solid border-t-f1-border-secondary px-4 pt-4 @md:mx-0 @md:mt-0 @md:border-t-0 @md:px-0 @md:pt-0",
|
|
44586
44605
|
lg: "-mx-4 mt-4 border-0 border-t border-solid border-t-f1-border-secondary px-4 pt-4 @lg:mx-0 @lg:mt-0 @lg:border-t-0 @lg:px-0 @lg:pt-0",
|
|
44587
44606
|
never: ""
|
|
44588
|
-
},
|
|
44607
|
+
}, G6 = {
|
|
44589
44608
|
neutral: "secondary",
|
|
44590
44609
|
info: "info",
|
|
44591
44610
|
positive: "positive",
|
|
44592
44611
|
warning: "warning",
|
|
44593
44612
|
critical: "critical"
|
|
44594
44613
|
};
|
|
44595
|
-
function
|
|
44596
|
-
let u = l ?
|
|
44614
|
+
function K6({ primaryAction: e, secondaryActions: t, otherActions: n, size: r = "md", confirmAction: i, rejectAction: a, status: o, stackAt: s = "never", hasAvatar: l = !1 }) {
|
|
44615
|
+
let u = l ? B6[r][s] : void 0;
|
|
44597
44616
|
if (o) return /* @__PURE__ */ U("div", {
|
|
44598
|
-
className: c("flex items-center justify-end", l &&
|
|
44617
|
+
className: c("flex items-center justify-end", l && V6[s], W6[s]),
|
|
44599
44618
|
children: /* @__PURE__ */ U(Me, {
|
|
44600
44619
|
icon: o.icon,
|
|
44601
|
-
color:
|
|
44620
|
+
color: G6[o.variant],
|
|
44602
44621
|
size: "lg",
|
|
44603
44622
|
role: "img",
|
|
44604
44623
|
"aria-label": o.label
|
|
44605
44624
|
})
|
|
44606
44625
|
});
|
|
44607
|
-
let d = c("relative z-[1]",
|
|
44626
|
+
let d = c("relative z-[1]", z6[s], W6[s], u), f = (e) => /* @__PURE__ */ U("div", {
|
|
44608
44627
|
className: d,
|
|
44609
44628
|
onClick: (e) => e.stopPropagation(),
|
|
44610
44629
|
children: e
|
|
@@ -44626,19 +44645,19 @@ function U6({ primaryAction: e, secondaryActions: t, otherActions: n, size: r =
|
|
|
44626
44645
|
disabled: i.disabled,
|
|
44627
44646
|
onClick: i.onClick
|
|
44628
44647
|
} : void 0;
|
|
44629
|
-
return /* @__PURE__ */ U(
|
|
44648
|
+
return /* @__PURE__ */ U(N6, {
|
|
44630
44649
|
primaryAction: n,
|
|
44631
44650
|
secondaryActions: t ? [t] : void 0,
|
|
44632
44651
|
size: r,
|
|
44633
44652
|
canOverflow: !1
|
|
44634
44653
|
});
|
|
44635
44654
|
}, t = /* @__PURE__ */ U("div", {
|
|
44636
|
-
className: c("relative z-[1] flex-1", u,
|
|
44655
|
+
className: c("relative z-[1] flex-1", u, H6[s]),
|
|
44637
44656
|
onClick: (e) => e.stopPropagation(),
|
|
44638
44657
|
children: e(!0)
|
|
44639
44658
|
});
|
|
44640
44659
|
return s === "never" ? t : /* @__PURE__ */ W(Jr, { children: [t, /* @__PURE__ */ U("div", {
|
|
44641
|
-
className: c("relative z-[1]",
|
|
44660
|
+
className: c("relative z-[1]", U6[s], W6[s]),
|
|
44642
44661
|
onClick: (e) => e.stopPropagation(),
|
|
44643
44662
|
children: e(!1)
|
|
44644
44663
|
})] });
|
|
@@ -44660,7 +44679,7 @@ function U6({ primaryAction: e, secondaryActions: t, otherActions: n, size: r =
|
|
|
44660
44679
|
onClick: e.onClick,
|
|
44661
44680
|
variant: e.variant
|
|
44662
44681
|
} : void 0;
|
|
44663
|
-
return m || (Array.isArray(t) ? t.length > 0 : t) || (n?.length ?? 0) > 0 ? f(/* @__PURE__ */ U(
|
|
44682
|
+
return m || (Array.isArray(t) ? t.length > 0 : t) || (n?.length ?? 0) > 0 ? f(/* @__PURE__ */ U(N6, {
|
|
44664
44683
|
primaryAction: m,
|
|
44665
44684
|
secondaryActions: p,
|
|
44666
44685
|
otherActions: n,
|
|
@@ -44669,7 +44688,7 @@ function U6({ primaryAction: e, secondaryActions: t, otherActions: n, size: r =
|
|
|
44669
44688
|
}
|
|
44670
44689
|
//#endregion
|
|
44671
44690
|
//#region src/elements/F0CardHorizontal/F0CardHorizontal.tsx
|
|
44672
|
-
var
|
|
44691
|
+
var q6 = ({ title: e, tag: t, inactive: n }) => {
|
|
44673
44692
|
let r = /* @__PURE__ */ U(br, {
|
|
44674
44693
|
variant: "body",
|
|
44675
44694
|
content: e,
|
|
@@ -44686,14 +44705,14 @@ var W6 = ({ title: e, tag: t, inactive: n }) => {
|
|
|
44686
44705
|
})
|
|
44687
44706
|
})]
|
|
44688
44707
|
}) : r;
|
|
44689
|
-
},
|
|
44690
|
-
className: c("flex min-w-0 flex-row gap-3",
|
|
44708
|
+
}, J6 = ({ avatar: e, title: t, tag: n, description: r, inactive: i, descriptionAsSingleLine: a, stackAt: o }) => /* @__PURE__ */ W("div", {
|
|
44709
|
+
className: c("flex min-w-0 flex-row gap-3", R6[o], e ? "items-start" : "items-center"),
|
|
44691
44710
|
children: [e ? /* @__PURE__ */ U(DV, {
|
|
44692
44711
|
avatar: e,
|
|
44693
44712
|
size: "lg"
|
|
44694
44713
|
}) : null, /* @__PURE__ */ W("div", {
|
|
44695
44714
|
className: "flex min-w-0 flex-col gap-0",
|
|
44696
|
-
children: [/* @__PURE__ */ U(
|
|
44715
|
+
children: [/* @__PURE__ */ U(q6, {
|
|
44697
44716
|
title: t,
|
|
44698
44717
|
tag: n,
|
|
44699
44718
|
inactive: i
|
|
@@ -44704,7 +44723,7 @@ var W6 = ({ title: e, tag: t, inactive: n }) => {
|
|
|
44704
44723
|
className: c(!a && "break-words", i && "line-through")
|
|
44705
44724
|
}) : null]
|
|
44706
44725
|
})]
|
|
44707
|
-
}),
|
|
44726
|
+
}), Y6 = R(function({ title: e, tag: t, description: n, avatar: r, primaryAction: i, secondaryActions: a, otherActions: o, actionsSize: s = "md", confirmAction: u, rejectAction: d, status: f, inactive: p = !1, fullHeight: m = !1, alert: h, link: g, onClick: _, disableOverlayLink: v = !1, stackAt: y = "never", disabled: b = !1, descriptionAsSingleLine: x = !1 }, S) {
|
|
44708
44727
|
let C = !!h && h.visible !== !1, w = /* @__PURE__ */ W(Cl, {
|
|
44709
44728
|
ref: C ? void 0 : S,
|
|
44710
44729
|
className: c("group relative @container bg-f1-background shadow-none transition-all", m && "h-full", (!!g || !!_) && !b && "cursor-pointer focus-within:border-f1-border-hover focus-within:shadow-md hover:border-f1-border-hover hover:shadow-md", b && "pointer-events-none opacity-50"),
|
|
@@ -44721,8 +44740,8 @@ var W6 = ({ title: e, tag: t, inactive: n }) => {
|
|
|
44721
44740
|
"aria-label": t ? `${e}, ${t.text}` : e,
|
|
44722
44741
|
children: "\xA0"
|
|
44723
44742
|
}) : null, /* @__PURE__ */ W("div", {
|
|
44724
|
-
className:
|
|
44725
|
-
children: [/* @__PURE__ */ U(
|
|
44743
|
+
className: L6[y],
|
|
44744
|
+
children: [/* @__PURE__ */ U(J6, {
|
|
44726
44745
|
avatar: r,
|
|
44727
44746
|
title: e,
|
|
44728
44747
|
tag: t,
|
|
@@ -44730,7 +44749,7 @@ var W6 = ({ title: e, tag: t, inactive: n }) => {
|
|
|
44730
44749
|
inactive: p,
|
|
44731
44750
|
descriptionAsSingleLine: x,
|
|
44732
44751
|
stackAt: y
|
|
44733
|
-
}), /* @__PURE__ */ U(
|
|
44752
|
+
}), /* @__PURE__ */ U(K6, {
|
|
44734
44753
|
primaryAction: i,
|
|
44735
44754
|
secondaryActions: a,
|
|
44736
44755
|
otherActions: o,
|
|
@@ -44750,8 +44769,8 @@ var W6 = ({ title: e, tag: t, inactive: n }) => {
|
|
|
44750
44769
|
children: w
|
|
44751
44770
|
}) : w;
|
|
44752
44771
|
});
|
|
44753
|
-
|
|
44754
|
-
var
|
|
44772
|
+
Y6.displayName = "F0CardHorizontal";
|
|
44773
|
+
var X6 = r(o("F0CardHorizontal", Ql(Y6, () => /* @__PURE__ */ U(Cl, {
|
|
44755
44774
|
className: c("group relative bg-f1-background shadow-none"),
|
|
44756
44775
|
"aria-busy": "true",
|
|
44757
44776
|
"aria-live": "polite",
|
|
@@ -44765,7 +44784,7 @@ var q6 = r(o("F0CardHorizontal", Ql(K6, () => /* @__PURE__ */ U(Cl, {
|
|
|
44765
44784
|
})]
|
|
44766
44785
|
}), /* @__PURE__ */ U(s, { className: "h-9 w-24 rounded-md" })]
|
|
44767
44786
|
})
|
|
44768
|
-
})))),
|
|
44787
|
+
})))), Z6 = ({ visible: e, onFilesDropped: t, mode: n = "files" }) => {
|
|
44769
44788
|
let r = a(), i = n === "discuss";
|
|
44770
44789
|
return /* @__PURE__ */ W("div", {
|
|
44771
44790
|
"aria-hidden": !e,
|
|
@@ -44798,7 +44817,7 @@ var q6 = r(o("F0CardHorizontal", Ql(K6, () => /* @__PURE__ */ U(Cl, {
|
|
|
44798
44817
|
};
|
|
44799
44818
|
//#endregion
|
|
44800
44819
|
//#region src/addons/ai/ai/F0AiPong/components/PongBall.tsx
|
|
44801
|
-
function
|
|
44820
|
+
function Q6({ size: e = 40, className: t, style: n }) {
|
|
44802
44821
|
return /* @__PURE__ */ U("div", {
|
|
44803
44822
|
className: c(t, "rounded-full"),
|
|
44804
44823
|
style: {
|
|
@@ -44811,38 +44830,38 @@ function Y6({ size: e = 40, className: t, style: n }) {
|
|
|
44811
44830
|
}
|
|
44812
44831
|
//#endregion
|
|
44813
44832
|
//#region src/addons/ai/ai/F0AiPong/F0AiPong.tsx
|
|
44814
|
-
var
|
|
44815
|
-
function
|
|
44833
|
+
var $6 = 40, e8 = 93, t8 = e8 * .5, n8 = 32, r8 = 24, i8 = 8, a8 = 48, o8 = 10, s8 = 7, c8 = 18, l8 = .25, u8 = .15, d8 = 800, f8 = Math.PI / 3, p8 = $6 / 2, m8 = .12, h8 = 8, g8 = 5, _8 = .08;
|
|
44834
|
+
function v8(e, t, n) {
|
|
44816
44835
|
return Math.max(t, Math.min(n, e));
|
|
44817
44836
|
}
|
|
44818
|
-
function
|
|
44837
|
+
function y8() {
|
|
44819
44838
|
let e = (Math.random() * 50 + 65) * Math.PI / 180, t = Math.random() > .5 ? 1 : -1, n = Math.random() > .5 ? 1 : -1;
|
|
44820
44839
|
return {
|
|
44821
|
-
vx: Math.cos(e) *
|
|
44822
|
-
vy: Math.sin(e) *
|
|
44840
|
+
vx: Math.cos(e) * s8 * t,
|
|
44841
|
+
vy: Math.sin(e) * s8 * n
|
|
44823
44842
|
};
|
|
44824
44843
|
}
|
|
44825
|
-
var
|
|
44844
|
+
var b8 = ({ onClose: e }) => {
|
|
44826
44845
|
let t = a(), n = ue(), r = V(null), i = V(null), o = V(null), s = V(null), [l, u] = H(null), d = V(/* @__PURE__ */ new Set()), f = V({
|
|
44827
44846
|
x: 0,
|
|
44828
44847
|
y: 0,
|
|
44829
44848
|
vx: 0,
|
|
44830
44849
|
vy: 0,
|
|
44831
|
-
speed:
|
|
44850
|
+
speed: s8
|
|
44832
44851
|
}), p = V(0), m = V(0), h = V(0), _ = V({
|
|
44833
44852
|
player: 0,
|
|
44834
44853
|
ai: 0
|
|
44835
44854
|
}), v = V("countdown"), y = V(0), b = V(0), x = V([]), S = V(0), C = V(0), w = V({
|
|
44836
44855
|
width: 0,
|
|
44837
44856
|
height: 0
|
|
44838
|
-
}), T = V(0), E = V(0), D = V(
|
|
44857
|
+
}), T = V(0), E = V(0), D = V(e8), O = V(0), k = V(0), A = V(0), j = V(0), M = V(null), [N, P] = H({
|
|
44839
44858
|
x: 0,
|
|
44840
44859
|
y: 0
|
|
44841
44860
|
}), [ee, te] = H(0), [ne, re] = H(0), [ie, ae] = H({
|
|
44842
44861
|
player: 0,
|
|
44843
44862
|
ai: 0
|
|
44844
|
-
}), [oe, se] = H(
|
|
44845
|
-
let { width: e, height: t } = w.current, n =
|
|
44863
|
+
}), [oe, se] = H(e8), [ce, le] = H("countdown"), [de, fe] = H(3), [F, pe] = H([]), [me, he] = H(0), [ge, _e] = H(0), [ve, ye] = H(null), [be, xe] = H(null), Ce = z(() => {
|
|
44864
|
+
let { width: e, height: t } = w.current, n = s8 + O.current;
|
|
44846
44865
|
f.current = {
|
|
44847
44866
|
x: e / 2,
|
|
44848
44867
|
y: t / 2,
|
|
@@ -44851,7 +44870,7 @@ var _8 = ({ onClose: e }) => {
|
|
|
44851
44870
|
speed: n
|
|
44852
44871
|
}, x.current = [], b.current = 0;
|
|
44853
44872
|
}, []), we = z(() => {
|
|
44854
|
-
let e =
|
|
44873
|
+
let e = s8 + O.current, { vx: t, vy: n } = y8(), r = e / s8;
|
|
44855
44874
|
f.current.vx = t * r, f.current.vy = n * r, f.current.speed = e, v.current = "playing", le("playing"), M.current = null, xe(null);
|
|
44856
44875
|
}, []), Te = z(() => {
|
|
44857
44876
|
Ce(), v.current = "countdown", le("countdown"), fe(3);
|
|
@@ -44877,9 +44896,9 @@ var _8 = ({ onClose: e }) => {
|
|
|
44877
44896
|
});
|
|
44878
44897
|
}, [n]), De = z((n) => {
|
|
44879
44898
|
let r = { ..._.current };
|
|
44880
|
-
n === "player" ? r.player++ : r.ai++, _.current = r, ae(r), T.current = 8, M.current = n, xe(n), O.current = Math.min(11, O.current +
|
|
44899
|
+
n === "player" ? r.player++ : r.ai++, _.current = r, ae(r), T.current = 8, M.current = n, xe(n), O.current = Math.min(11, O.current + u8), n === "player" && Ee(), r.player >= 3 || r.ai >= 3 ? (v.current = "gameover", le("gameover"), Ce(), ye(r.player >= 3 ? t.ai.pong.youWin : t.ai.pong.youLose), setTimeout(() => e(), 2e3)) : (v.current = "scored", le("scored"), Ce(), y.current = d8, setTimeout(() => {
|
|
44881
44900
|
v.current === "scored" && Te();
|
|
44882
|
-
},
|
|
44901
|
+
}, d8));
|
|
44883
44902
|
}, [
|
|
44884
44903
|
Ce,
|
|
44885
44904
|
Te,
|
|
@@ -44920,10 +44939,10 @@ var _8 = ({ onClose: e }) => {
|
|
|
44920
44939
|
}, ae({
|
|
44921
44940
|
player: 0,
|
|
44922
44941
|
ai: 0
|
|
44923
|
-
}), E.current = 0, D.current =
|
|
44942
|
+
}), E.current = 0, D.current = e8, se(e8), O.current = 0, k.current = 0;
|
|
44924
44943
|
let r = Te(), a = (t) => {
|
|
44925
44944
|
let n = e.getBoundingClientRect(), r = D.current;
|
|
44926
|
-
p.current =
|
|
44945
|
+
p.current = v8(t.clientX - n.left, r / 2 + i8, n.width - r / 2 - i8);
|
|
44927
44946
|
};
|
|
44928
44947
|
e.addEventListener("pointermove", a);
|
|
44929
44948
|
let o = (e) => {
|
|
@@ -44931,34 +44950,34 @@ var _8 = ({ onClose: e }) => {
|
|
|
44931
44950
|
let t = (e - S.current) / 16.667, n = Math.min(t, 3);
|
|
44932
44951
|
S.current = e;
|
|
44933
44952
|
let { width: r, height: i } = w.current, a = f.current, s = D.current;
|
|
44934
|
-
if (d.current.has("ArrowLeft") && (p.current =
|
|
44953
|
+
if (d.current.has("ArrowLeft") && (p.current = v8(p.current - o8 * n, s / 2 + i8, r - s / 2 - i8)), d.current.has("ArrowRight") && (p.current = v8(p.current + o8 * n, s / 2 + i8, r - s / 2 - i8)), T.current > 0 && (T.current *= .85, T.current < .5 && (T.current = 0)), v.current === "playing") {
|
|
44935
44954
|
x.current.push({
|
|
44936
44955
|
x: a.x,
|
|
44937
44956
|
y: a.y
|
|
44938
|
-
}), x.current.length >
|
|
44939
|
-
let e = r -
|
|
44957
|
+
}), x.current.length > g8 && (x.current = x.current.slice(-5)), a.x += a.vx * n, a.y += a.vy * n, A.current += j.current * n, j.current *= .96;
|
|
44958
|
+
let e = r - i8 - $6 / 2;
|
|
44940
44959
|
a.x <= 28 && (a.x = 28, a.vx = Math.abs(a.vx), j.current *= -.5), a.x >= e && (a.x = e, a.vx = -Math.abs(a.vx), j.current *= -.5);
|
|
44941
|
-
let t = i -
|
|
44942
|
-
if (a.y +
|
|
44943
|
-
a.y = t -
|
|
44944
|
-
let e =
|
|
44945
|
-
a.speed = Math.min(a.speed +
|
|
44946
|
-
let n = e *
|
|
44960
|
+
let t = i - r8 - n8, o = s / 2;
|
|
44961
|
+
if (a.y + p8 >= t && a.y - p8 <= t + n8 && a.vy > 0 && a.x >= p.current - o - p8 && a.x <= p.current + o + p8) {
|
|
44962
|
+
a.y = t - p8;
|
|
44963
|
+
let e = v8((a.x - p.current) / o, -1, 1);
|
|
44964
|
+
a.speed = Math.min(a.speed + l8, c8);
|
|
44965
|
+
let n = e * f8;
|
|
44947
44966
|
a.vx = Math.sin(n) * a.speed, a.vy = -Math.cos(n) * a.speed, j.current = e * 1.2, b.current++, E.current++;
|
|
44948
|
-
let r =
|
|
44949
|
-
D.current =
|
|
44967
|
+
let r = t8 / e8 + (1 - t8 / e8) * Math.exp(-E.current * .03);
|
|
44968
|
+
D.current = e8 * r;
|
|
44950
44969
|
}
|
|
44951
|
-
let c =
|
|
44952
|
-
if (a.y -
|
|
44970
|
+
let c = e8 / 2;
|
|
44971
|
+
if (a.y - p8 <= 56 && a.y + p8 >= r8 && a.vy < 0 && a.x >= m.current - c - p8 && a.x <= m.current + c + p8) {
|
|
44953
44972
|
a.y = 76;
|
|
44954
|
-
let e =
|
|
44955
|
-
a.speed = Math.min(a.speed +
|
|
44956
|
-
let t = e *
|
|
44973
|
+
let e = v8((a.x - m.current) / c, -1, 1);
|
|
44974
|
+
a.speed = Math.min(a.speed + l8, c8);
|
|
44975
|
+
let t = e * f8;
|
|
44957
44976
|
a.vx = Math.sin(t) * a.speed, a.vy = Math.cos(t) * a.speed, j.current = e * 1.2, b.current++;
|
|
44958
44977
|
}
|
|
44959
44978
|
if (a.y < -80 ? De("player") : a.y > i + 80 && De("ai"), a.vy < 0) {
|
|
44960
|
-
let e = Math.max(1, (a.y -
|
|
44961
|
-
h.current += i *
|
|
44979
|
+
let e = Math.max(1, (a.y - r8) / -a.vy), t = a.x + a.vx * e, r = h8 * (1 + a.speed / c8), i = t + (Math.random() - .5) * r - h.current;
|
|
44980
|
+
h.current += i * m8 * n;
|
|
44962
44981
|
} else {
|
|
44963
44982
|
let e = Math.sin(Date.now() * .002) * 15;
|
|
44964
44983
|
h.current += (r / 2 + e - h.current) * .025 * n;
|
|
@@ -44966,7 +44985,7 @@ var _8 = ({ onClose: e }) => {
|
|
|
44966
44985
|
let l = (h.current - m.current) * .1 * n;
|
|
44967
44986
|
k.current += l, k.current *= .88;
|
|
44968
44987
|
let u = 6 + b.current * .12;
|
|
44969
|
-
k.current =
|
|
44988
|
+
k.current = v8(k.current, -u, u), m.current += k.current * n, m.current = v8(m.current, 54.5, r - e8 / 2 - i8);
|
|
44970
44989
|
}
|
|
44971
44990
|
P({
|
|
44972
44991
|
x: a.x,
|
|
@@ -45012,13 +45031,13 @@ var _8 = ({ onClose: e }) => {
|
|
|
45012
45031
|
children: [
|
|
45013
45032
|
/* @__PURE__ */ U("div", { className: "pointer-events-none absolute left-0 right-0 top-1/2 h-px translate-y-1/2 bg-f1-border" }),
|
|
45014
45033
|
F.map((e, t) => {
|
|
45015
|
-
let n = (t + 1) / F.length, r =
|
|
45034
|
+
let n = (t + 1) / F.length, r = $6 * (.15 + n * .25);
|
|
45016
45035
|
return /* @__PURE__ */ U("div", {
|
|
45017
45036
|
className: "pointer-events-none absolute rounded-full bg-f1-foreground-secondary/40",
|
|
45018
45037
|
style: {
|
|
45019
45038
|
width: r,
|
|
45020
45039
|
height: r,
|
|
45021
|
-
opacity: n *
|
|
45040
|
+
opacity: n * _8,
|
|
45022
45041
|
transform: `translate(${e.x - r / 2}px, ${e.y - r / 2}px)`
|
|
45023
45042
|
}
|
|
45024
45043
|
}, t);
|
|
@@ -45026,19 +45045,19 @@ var _8 = ({ onClose: e }) => {
|
|
|
45026
45045
|
/* @__PURE__ */ U("div", {
|
|
45027
45046
|
className: c("absolute isolate rounded", "border border-solid border-f1-border", "before:pointer-events-none before:absolute before:inset-0 before:z-[-1]", "before:rounded-[inherit] before:bg-f1-special-page before:content-['']", "after:pointer-events-none after:absolute after:inset-0.5 after:z-[-2]", "after:rounded-[inherit] after:blur-[5px] after:content-['']", "after:bg-[conic-gradient(from_var(--gradient-angle),var(--tw-gradient-stops))]", "from-[#E55619] via-[#A1ADE5] to-[#E51943]", "after:scale-100 after:opacity-100"),
|
|
45028
45047
|
style: {
|
|
45029
|
-
width:
|
|
45030
|
-
height:
|
|
45031
|
-
top:
|
|
45032
|
-
transform: `translateX(${ne -
|
|
45048
|
+
width: e8,
|
|
45049
|
+
height: n8,
|
|
45050
|
+
top: r8,
|
|
45051
|
+
transform: `translateX(${ne - e8 / 2}px)`,
|
|
45033
45052
|
animation: "pong-ai-glow 4s linear infinite",
|
|
45034
45053
|
"--gradient-angle": "0deg"
|
|
45035
45054
|
}
|
|
45036
45055
|
}),
|
|
45037
|
-
/* @__PURE__ */ U(
|
|
45038
|
-
size:
|
|
45056
|
+
/* @__PURE__ */ U(Q6, {
|
|
45057
|
+
size: $6,
|
|
45039
45058
|
className: "pointer-events-none absolute z-30",
|
|
45040
45059
|
style: {
|
|
45041
|
-
transform: `translate(${N.x -
|
|
45060
|
+
transform: `translate(${N.x - $6 / 2}px, ${N.y - $6 / 2}px) rotate(${ge}rad)`,
|
|
45042
45061
|
opacity: ce === "countdown" ? 0 : 1,
|
|
45043
45062
|
transition: "opacity 0.3s ease-in"
|
|
45044
45063
|
}
|
|
@@ -45047,8 +45066,8 @@ var _8 = ({ onClose: e }) => {
|
|
|
45047
45066
|
className: "absolute rounded border-2 border-solid border-f1-border",
|
|
45048
45067
|
style: {
|
|
45049
45068
|
width: oe,
|
|
45050
|
-
height:
|
|
45051
|
-
bottom:
|
|
45069
|
+
height: n8,
|
|
45070
|
+
bottom: r8,
|
|
45052
45071
|
transform: `translateX(${ee - oe / 2}px)`,
|
|
45053
45072
|
transition: "width 0.3s ease-out"
|
|
45054
45073
|
},
|
|
@@ -45086,7 +45105,7 @@ var _8 = ({ onClose: e }) => {
|
|
|
45086
45105
|
]
|
|
45087
45106
|
}), /* @__PURE__ */ U("div", {
|
|
45088
45107
|
className: "pointer-events-none absolute inset-y-0 right-0 flex flex-col items-center justify-center",
|
|
45089
|
-
style: { width:
|
|
45108
|
+
style: { width: a8 },
|
|
45090
45109
|
children: /* @__PURE__ */ W("div", {
|
|
45091
45110
|
className: "flex flex-col items-center gap-6",
|
|
45092
45111
|
children: [/* @__PURE__ */ U("span", {
|
|
@@ -45109,8 +45128,8 @@ var _8 = ({ onClose: e }) => {
|
|
|
45109
45128
|
]
|
|
45110
45129
|
})]
|
|
45111
45130
|
}), l);
|
|
45112
|
-
},
|
|
45113
|
-
let { fileAttachments: n, isClarifying: r, setFileDragOver: i, processDroppedFiles: a, setPendingQuote: o, focusChatInput: s, activeGame: c } =
|
|
45131
|
+
}, x8 = "f0:widget-drag-start", S8 = "f0:widget-drag-end", C8 = ({ isVisible: e, acceptsWidgetDrop: t }) => {
|
|
45132
|
+
let { fileAttachments: n, isClarifying: r, setFileDragOver: i, processDroppedFiles: a, setPendingQuote: o, focusChatInput: s, activeGame: c } = A3(), l = t && c === null && e && !r, u = V(l);
|
|
45114
45133
|
u.current = l;
|
|
45115
45134
|
let d = V(null), f = V(0), p = n?.onUploadFiles != null && !r;
|
|
45116
45135
|
B(() => {
|
|
@@ -45133,8 +45152,8 @@ var _8 = ({ onClose: e }) => {
|
|
|
45133
45152
|
let t = e.detail;
|
|
45134
45153
|
typeof t?.id == "string" && t.id && typeof t.title == "string" && t.title.trim() && x(t);
|
|
45135
45154
|
}, t = () => x(null);
|
|
45136
|
-
return window.addEventListener(
|
|
45137
|
-
window.removeEventListener(
|
|
45155
|
+
return window.addEventListener(x8, e), window.addEventListener(S8, t), () => {
|
|
45156
|
+
window.removeEventListener(x8, e), window.removeEventListener(S8, t);
|
|
45138
45157
|
};
|
|
45139
45158
|
}, [l, x]), B(() => {
|
|
45140
45159
|
l || x(null);
|
|
@@ -45183,32 +45202,32 @@ var _8 = ({ onClose: e }) => {
|
|
|
45183
45202
|
} : void 0
|
|
45184
45203
|
}
|
|
45185
45204
|
};
|
|
45186
|
-
},
|
|
45187
|
-
let { open: a, visualizationMode: o, fileDragOver: s, activeGame: c, closeGame: l } =
|
|
45205
|
+
}, w8 = ({ children: e, visible: t, side: n, exitStyle: r = "shrink", acceptsWidgetDrop: i = !1 }) => {
|
|
45206
|
+
let { open: a, visualizationMode: o, fileDragOver: s, activeGame: c, closeGame: l } = A3(), u = t ?? a, d = o === "canvas", f = o4(), { surfaceRef: p, surfaceProps: m, decorations: h } = C8({
|
|
45188
45207
|
isVisible: u,
|
|
45189
45208
|
acceptsWidgetDrop: i
|
|
45190
45209
|
});
|
|
45191
|
-
return /* @__PURE__ */ U(
|
|
45210
|
+
return /* @__PURE__ */ U(r4, {
|
|
45192
45211
|
visible: t,
|
|
45193
45212
|
side: n,
|
|
45194
45213
|
exitStyle: r,
|
|
45195
45214
|
flushInnerSeam: d || f && o !== "fullscreen",
|
|
45196
45215
|
surfaceRef: p,
|
|
45197
45216
|
surfaceProps: m,
|
|
45198
|
-
decorations: /* @__PURE__ */ W(Jr, { children: [h.canDrop || h.canAcceptWidgetDrop && h.dragQuote !== null ? /* @__PURE__ */ U(
|
|
45217
|
+
decorations: /* @__PURE__ */ W(Jr, { children: [h.canDrop || h.canAcceptWidgetDrop && h.dragQuote !== null ? /* @__PURE__ */ U(Z6, {
|
|
45199
45218
|
visible: h.canDrop && s || h.dragQuote !== null,
|
|
45200
45219
|
mode: h.dragQuote === null ? "files" : "discuss",
|
|
45201
45220
|
onFilesDropped: h.onFilesDropped
|
|
45202
|
-
}) : null, c === "pong" ? /* @__PURE__ */ U(
|
|
45221
|
+
}) : null, c === "pong" ? /* @__PURE__ */ U(b8, { onClose: l }) : null] }),
|
|
45203
45222
|
children: e
|
|
45204
45223
|
});
|
|
45205
|
-
},
|
|
45224
|
+
}, T8 = "--f0-ai-composer-overlap", E8 = () => {
|
|
45206
45225
|
let [e, t] = H(null), [n, r] = H(null), [i, a] = H(!1), [o, s] = H(!1);
|
|
45207
45226
|
return Gr(() => {
|
|
45208
45227
|
if (!e || !n) return;
|
|
45209
45228
|
let t = -1, r = () => {
|
|
45210
45229
|
let r = n.querySelector("[data-composer-layout=\"welcome\"]") !== null, i = r ? 0 : Math.ceil(n.getBoundingClientRect().height);
|
|
45211
|
-
s(r), a(!r && (n.querySelector("[data-composer-layout=\"docked\"]") !== null || i > 0)), i !== t && (t = i, e.style.setProperty(
|
|
45230
|
+
s(r), a(!r && (n.querySelector("[data-composer-layout=\"docked\"]") !== null || i > 0)), i !== t && (t = i, e.style.setProperty(T8, `${i}px`));
|
|
45212
45231
|
};
|
|
45213
45232
|
if (r(), typeof ResizeObserver > "u") return;
|
|
45214
45233
|
let i = new ResizeObserver(r);
|
|
@@ -45220,7 +45239,7 @@ var _8 = ({ onClose: e }) => {
|
|
|
45220
45239
|
attributes: !0,
|
|
45221
45240
|
attributeFilter: ["data-composer-layout"]
|
|
45222
45241
|
}), () => {
|
|
45223
|
-
i.disconnect(), o.disconnect(), e.style.removeProperty(
|
|
45242
|
+
i.disconnect(), o.disconnect(), e.style.removeProperty(T8);
|
|
45224
45243
|
};
|
|
45225
45244
|
}, [e, n]), {
|
|
45226
45245
|
setShell: t,
|
|
@@ -45228,7 +45247,7 @@ var _8 = ({ onClose: e }) => {
|
|
|
45228
45247
|
floating: i,
|
|
45229
45248
|
welcome: o
|
|
45230
45249
|
};
|
|
45231
|
-
},
|
|
45250
|
+
}, D8 = ({ enabled: e = !1, side: t, panelContentSide: n, initialMessage: r, chatHeader: i, chatMessages: a, chatInput: o, chatOverlay: s, welcomeScreenSuggestions: c, welcomeScreenCards: l, disclaimer: u, resizable: d = !1, defaultVisualizationMode: f, lockVisualizationMode: p, historyEnabled: m, footer: h, VoiceMode: g, entityRefs: _, canvasActions: v, canvasEntities: y, credits: b, employeeCredits: x, creditWarning: S, fileAttachments: C, filePreviews: w, onTranscribe: T, onThumbsUp: E, onThumbsDown: D, children: O, agent: k, tracking: A }) => /* @__PURE__ */ U(C3, {
|
|
45232
45251
|
enabled: e,
|
|
45233
45252
|
side: t,
|
|
45234
45253
|
panelContentSide: n,
|
|
@@ -45260,8 +45279,8 @@ var _8 = ({ onClose: e }) => {
|
|
|
45260
45279
|
filePreviews: w,
|
|
45261
45280
|
onTranscribe: T,
|
|
45262
45281
|
children: O
|
|
45263
|
-
}),
|
|
45264
|
-
let { enabled: i, open: o, setOpen: l, mode: u, VoiceMode: d, tracking: f, chatHeader: p, chatMessages: m, chatInput: h, chatOverlay: g, panelContent: _, panelSide: v, panelContentSide: y, restoringPanelContentId: b, filePreviews: x } =
|
|
45282
|
+
}), O8 = o("F0AiChat", ({ header: e, messages: t, input: n, overlay: r }) => {
|
|
45283
|
+
let { enabled: i, open: o, setOpen: l, mode: u, VoiceMode: d, tracking: f, chatHeader: p, chatMessages: m, chatInput: h, chatOverlay: g, panelContent: _, panelSide: v, panelContentSide: y, restoringPanelContentId: b, filePreviews: x } = A3(), S = a(), C = y !== v, w = ue(), T = E8(), E = e ?? p, D = t ?? m, O = n ?? h, k = r ?? g;
|
|
45265
45284
|
if (!i) return null;
|
|
45266
45285
|
let { viewKey: A, viewContent: j } = _ && !C ? {
|
|
45267
45286
|
viewKey: `panel:${_.id}`,
|
|
@@ -45320,9 +45339,9 @@ var _8 = ({ onClose: e }) => {
|
|
|
45320
45339
|
}) : null]
|
|
45321
45340
|
})
|
|
45322
45341
|
};
|
|
45323
|
-
return /* @__PURE__ */ U(
|
|
45342
|
+
return /* @__PURE__ */ U(h2, {
|
|
45324
45343
|
filePreviews: x,
|
|
45325
|
-
children: /* @__PURE__ */ U(
|
|
45344
|
+
children: /* @__PURE__ */ U(w8, {
|
|
45326
45345
|
visible: C ? o && !_ && !b : void 0,
|
|
45327
45346
|
exitStyle: C && o ? "hold" : "shrink",
|
|
45328
45347
|
acceptsWidgetDrop: A === "chat" && !k,
|
|
@@ -45342,23 +45361,23 @@ var _8 = ({ onClose: e }) => {
|
|
|
45342
45361
|
})
|
|
45343
45362
|
})
|
|
45344
45363
|
});
|
|
45345
|
-
}),
|
|
45364
|
+
}), k8 = o("F0AiChatProvider", D8), A8 = 31, j8 = async (e) => {
|
|
45346
45365
|
let { default: t } = await import("./browser-Chetd4xB.js");
|
|
45347
45366
|
return t(e.map(({ name: e, rows: t }) => ({
|
|
45348
|
-
sheet: e.slice(0,
|
|
45367
|
+
sheet: e.slice(0, A8),
|
|
45349
45368
|
data: t,
|
|
45350
45369
|
dateFormat: "yyyy-mm-dd"
|
|
45351
45370
|
}))).toBlob();
|
|
45352
|
-
},
|
|
45371
|
+
}, M8 = async (t) => {
|
|
45353
45372
|
let { default: n } = await import("./papaparse.min-BwPbUAd9.js").then((t) => /* @__PURE__ */ e(t.t(), 1)), r = n.unparse(t.map((e) => e.map((e) => e instanceof Date ? e.toISOString() : e)));
|
|
45354
45373
|
return new Blob([r], { type: "text/csv;charset=utf-8;" });
|
|
45355
|
-
},
|
|
45374
|
+
}, N8 = /^-?\d+(\.\d+)?$/, P8 = (e) => Array.from(e.rows, (e) => Array.from(e.cells, (e) => {
|
|
45356
45375
|
let t = e.textContent?.trim() ?? "";
|
|
45357
|
-
return
|
|
45358
|
-
})),
|
|
45376
|
+
return N8.test(t) ? Number(t) : t;
|
|
45377
|
+
})), F8 = (e, t) => {
|
|
45359
45378
|
let n = document.createElement("a");
|
|
45360
45379
|
n.href = URL.createObjectURL(e), n.download = t, n.click(), URL.revokeObjectURL(n.href);
|
|
45361
|
-
},
|
|
45380
|
+
}, I8 = o("F0PersonCard", ({ name: e, avatar: t, subtitle: n, profileHref: r, onProfileClick: o, actions: s = [], dataTestId: c }) => {
|
|
45362
45381
|
let l = a();
|
|
45363
45382
|
return /* @__PURE__ */ U(i, {
|
|
45364
45383
|
dataTestId: c,
|
|
@@ -45388,7 +45407,7 @@ var _8 = ({ onClose: e }) => {
|
|
|
45388
45407
|
}) : null
|
|
45389
45408
|
})
|
|
45390
45409
|
});
|
|
45391
|
-
}),
|
|
45410
|
+
}), L8 = je({
|
|
45392
45411
|
base: c("inline-flex items-center justify-center rounded-sm text-sm font-medium transition-colors hover:bg-f1-background-secondary hover:text-f1-foreground-secondary disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-f1-background-secondary data-[state=on]:text-f1-foreground", l()),
|
|
45393
45412
|
variants: {
|
|
45394
45413
|
variant: {
|
|
@@ -45405,26 +45424,26 @@ var _8 = ({ onClose: e }) => {
|
|
|
45405
45424
|
variant: "default",
|
|
45406
45425
|
size: "default"
|
|
45407
45426
|
}
|
|
45408
|
-
}),
|
|
45427
|
+
}), R8 = I.forwardRef(({ className: e, variant: t, size: n, ...r }, i) => /* @__PURE__ */ U(In, {
|
|
45409
45428
|
ref: i,
|
|
45410
|
-
className: c(
|
|
45429
|
+
className: c(L8({
|
|
45411
45430
|
variant: t,
|
|
45412
45431
|
size: n,
|
|
45413
45432
|
className: e
|
|
45414
45433
|
})),
|
|
45415
45434
|
...r
|
|
45416
45435
|
}));
|
|
45417
|
-
|
|
45436
|
+
R8.displayName = In.displayName;
|
|
45418
45437
|
//#endregion
|
|
45419
45438
|
//#region src/elements/ToggleGroup/ToggleGroup.tsx
|
|
45420
|
-
var
|
|
45439
|
+
var z8 = I.createContext({
|
|
45421
45440
|
size: "default",
|
|
45422
45441
|
variant: "default"
|
|
45423
|
-
}),
|
|
45442
|
+
}), B8 = I.forwardRef(({ className: e, variant: t, size: n, children: r, ...i }, a) => /* @__PURE__ */ U(kr, {
|
|
45424
45443
|
ref: a,
|
|
45425
45444
|
className: c("flex items-center justify-center gap-1.5", e),
|
|
45426
45445
|
...i,
|
|
45427
|
-
children: /* @__PURE__ */ U(
|
|
45446
|
+
children: /* @__PURE__ */ U(z8.Provider, {
|
|
45428
45447
|
value: {
|
|
45429
45448
|
variant: t,
|
|
45430
45449
|
size: n
|
|
@@ -45432,12 +45451,12 @@ var I8 = I.createContext({
|
|
|
45432
45451
|
children: r
|
|
45433
45452
|
})
|
|
45434
45453
|
}));
|
|
45435
|
-
|
|
45436
|
-
var
|
|
45437
|
-
let o = I.useContext(
|
|
45454
|
+
B8.displayName = kr.displayName;
|
|
45455
|
+
var V8 = I.forwardRef(({ className: e, children: t, variant: n, size: r, ...i }, a) => {
|
|
45456
|
+
let o = I.useContext(z8);
|
|
45438
45457
|
return /* @__PURE__ */ U(Ar, {
|
|
45439
45458
|
ref: a,
|
|
45440
|
-
className: c(
|
|
45459
|
+
className: c(L8({
|
|
45441
45460
|
variant: o.variant || n,
|
|
45442
45461
|
size: o.size || r
|
|
45443
45462
|
}), e),
|
|
@@ -45445,10 +45464,10 @@ var R8 = I.forwardRef(({ className: e, children: t, variant: n, size: r, ...i },
|
|
|
45445
45464
|
children: t
|
|
45446
45465
|
});
|
|
45447
45466
|
});
|
|
45448
|
-
|
|
45467
|
+
V8.displayName = Ar.displayName;
|
|
45449
45468
|
//#endregion
|
|
45450
45469
|
//#region src/blocks/Widgets/Content/Weekdays/Weekdays.tsx
|
|
45451
|
-
var
|
|
45470
|
+
var H8 = [
|
|
45452
45471
|
"Monday",
|
|
45453
45472
|
"Tuesday",
|
|
45454
45473
|
"Wednesday",
|
|
@@ -45456,26 +45475,26 @@ var z8 = [
|
|
|
45456
45475
|
"Friday",
|
|
45457
45476
|
"Saturday",
|
|
45458
45477
|
"Sunday"
|
|
45459
|
-
],
|
|
45478
|
+
], U8 = R(function({ daysOfTheWeek: e = H8, activatedDays: t = [] }, n) {
|
|
45460
45479
|
let r = t.map((t) => `${t}-${e[t]}`);
|
|
45461
|
-
return /* @__PURE__ */ U(
|
|
45480
|
+
return /* @__PURE__ */ U(B8, {
|
|
45462
45481
|
type: "multiple",
|
|
45463
45482
|
value: r,
|
|
45464
45483
|
disabled: !0,
|
|
45465
45484
|
className: "flex justify-start",
|
|
45466
45485
|
ref: n,
|
|
45467
|
-
children: e.map((e, t) => /* @__PURE__ */ U(
|
|
45486
|
+
children: e.map((e, t) => /* @__PURE__ */ U(V8, {
|
|
45468
45487
|
"aria-label": e,
|
|
45469
45488
|
value: `${t}-${e}`,
|
|
45470
45489
|
className: "h-6 w-6 shrink-0 grow-0 basis-6 p-0 text-sm font-medium disabled:select-none disabled:bg-f1-background-tertiary disabled:text-f1-foreground-secondary disabled:opacity-100 disabled:data-[state=on]:border disabled:data-[state=on]:border-solid disabled:data-[state=on]:border-f1-border-selected disabled:data-[state=on]:bg-f1-background-selected disabled:data-[state=on]:text-f1-foreground-selected",
|
|
45471
45490
|
children: e[0]
|
|
45472
45491
|
}, t))
|
|
45473
45492
|
});
|
|
45474
|
-
}),
|
|
45493
|
+
}), W8 = 750, G8 = ({ text: e, children: t }) => {
|
|
45475
45494
|
let [n, r] = H(!1);
|
|
45476
45495
|
return B(() => {
|
|
45477
45496
|
if (n) {
|
|
45478
|
-
let e = setTimeout(() => r(!1),
|
|
45497
|
+
let e = setTimeout(() => r(!1), W8);
|
|
45479
45498
|
return () => clearTimeout(e);
|
|
45480
45499
|
}
|
|
45481
45500
|
}, [n]), /* @__PURE__ */ W("button", {
|
|
@@ -45539,7 +45558,7 @@ var z8 = [
|
|
|
45539
45558
|
})
|
|
45540
45559
|
})]
|
|
45541
45560
|
});
|
|
45542
|
-
},
|
|
45561
|
+
}, K8 = Vr(({ children: e, className: t, ...n }) => /* @__PURE__ */ W(O, {
|
|
45543
45562
|
...n,
|
|
45544
45563
|
className: c("text-inherit group flex items-center gap-1.5 rounded p-1.5 text-f1-foreground", "no-underline hover:bg-f1-background-hover focus-visible:outline focus-visible:outline-2 focus-visible:outline-f1-border-selected-bold active:bg-f1-background-secondary-hover", t),
|
|
45545
45564
|
children: [e, /* @__PURE__ */ U("div", {
|
|
@@ -45551,10 +45570,10 @@ var z8 = [
|
|
|
45551
45570
|
})
|
|
45552
45571
|
})]
|
|
45553
45572
|
}));
|
|
45554
|
-
|
|
45573
|
+
K8.displayName = "NavigateAction";
|
|
45555
45574
|
//#endregion
|
|
45556
45575
|
//#region src/elements/DataList/actions/OpenLinkAction.tsx
|
|
45557
|
-
var
|
|
45576
|
+
var q8 = Vr(({ children: e, className: t, href: n, ...r }) => /* @__PURE__ */ W(O, {
|
|
45558
45577
|
...r,
|
|
45559
45578
|
target: "_blank",
|
|
45560
45579
|
href: n,
|
|
@@ -45570,15 +45589,15 @@ var W8 = Vr(({ children: e, className: t, href: n, ...r }) => /* @__PURE__ */ W(
|
|
|
45570
45589
|
})
|
|
45571
45590
|
})]
|
|
45572
45591
|
}));
|
|
45573
|
-
|
|
45592
|
+
q8.displayName = "OpenLinkAction";
|
|
45574
45593
|
//#endregion
|
|
45575
45594
|
//#region src/elements/DataList/ItemContainer.tsx
|
|
45576
|
-
var
|
|
45595
|
+
var J8 = R((e, t) => {
|
|
45577
45596
|
let { text: n, leftIcon: r, className: i, action: a = { type: "noop" } } = e;
|
|
45578
45597
|
return /* @__PURE__ */ U("li", {
|
|
45579
45598
|
className: "flex rounded font-medium text-f1-foreground *:flex-1",
|
|
45580
45599
|
ref: t,
|
|
45581
|
-
children: /* @__PURE__ */ W(
|
|
45600
|
+
children: /* @__PURE__ */ W(Y8, {
|
|
45582
45601
|
action: a,
|
|
45583
45602
|
className: c("flex items-center gap-1.5 p-1.5", i),
|
|
45584
45603
|
children: [r ? typeof r == "function" ? r({}) : /* @__PURE__ */ U(Me, {
|
|
@@ -45592,21 +45611,21 @@ var G8 = R((e, t) => {
|
|
|
45592
45611
|
})
|
|
45593
45612
|
});
|
|
45594
45613
|
});
|
|
45595
|
-
|
|
45596
|
-
var
|
|
45614
|
+
J8.displayName = "ItemContainer";
|
|
45615
|
+
var Y8 = ({ children: e, action: t, ...n }) => {
|
|
45597
45616
|
let r = t.type;
|
|
45598
45617
|
switch (r) {
|
|
45599
|
-
case "copy": return /* @__PURE__ */ U(
|
|
45618
|
+
case "copy": return /* @__PURE__ */ U(G8, {
|
|
45600
45619
|
...t,
|
|
45601
45620
|
...n,
|
|
45602
45621
|
children: e
|
|
45603
45622
|
});
|
|
45604
|
-
case "navigate": return /* @__PURE__ */ U(
|
|
45623
|
+
case "navigate": return /* @__PURE__ */ U(K8, {
|
|
45605
45624
|
...t,
|
|
45606
45625
|
...n,
|
|
45607
45626
|
children: e
|
|
45608
45627
|
});
|
|
45609
|
-
case "open-link": return /* @__PURE__ */ U(
|
|
45628
|
+
case "open-link": return /* @__PURE__ */ U(q8, {
|
|
45610
45629
|
...t,
|
|
45611
45630
|
...n,
|
|
45612
45631
|
children: e
|
|
@@ -45617,19 +45636,19 @@ var K8 = ({ children: e, action: t, ...n }) => {
|
|
|
45617
45636
|
});
|
|
45618
45637
|
default: return r;
|
|
45619
45638
|
}
|
|
45620
|
-
},
|
|
45639
|
+
}, X8 = (e, t) => e && e.type === "copy" ? {
|
|
45621
45640
|
type: "copy",
|
|
45622
45641
|
text: e.text ?? t
|
|
45623
|
-
} : e,
|
|
45642
|
+
} : e, Z8 = R(({ text: e, icon: t, action: n }, r) => /* @__PURE__ */ U(J8, {
|
|
45624
45643
|
ref: r,
|
|
45625
45644
|
text: e,
|
|
45626
45645
|
leftIcon: t,
|
|
45627
|
-
action:
|
|
45646
|
+
action: X8(n, e)
|
|
45628
45647
|
}));
|
|
45629
|
-
|
|
45630
|
-
var
|
|
45648
|
+
Z8.displayName = "DataList.Item";
|
|
45649
|
+
var Q8 = o("DataList.Item", Z8), $8 = R(({ action: e, avatarUrl: t, firstName: n, lastName: r }, i) => {
|
|
45631
45650
|
let a = `${n} ${r}`;
|
|
45632
|
-
return /* @__PURE__ */ U(
|
|
45651
|
+
return /* @__PURE__ */ U(J8, {
|
|
45633
45652
|
ref: i,
|
|
45634
45653
|
leftIcon: () => /* @__PURE__ */ U(Xe, {
|
|
45635
45654
|
size: "xs",
|
|
@@ -45638,11 +45657,11 @@ var Y8 = o("DataList.Item", J8), X8 = R(({ action: e, avatarUrl: t, firstName: n
|
|
|
45638
45657
|
lastName: r
|
|
45639
45658
|
}),
|
|
45640
45659
|
text: a,
|
|
45641
|
-
action:
|
|
45660
|
+
action: X8(e, a)
|
|
45642
45661
|
});
|
|
45643
45662
|
});
|
|
45644
|
-
|
|
45645
|
-
var
|
|
45663
|
+
$8.displayName = "PersonItem";
|
|
45664
|
+
var e5 = o("PersonItem", $8), t5 = R(({ avatarUrl: e, name: t, action: n }, r) => /* @__PURE__ */ U(J8, {
|
|
45646
45665
|
ref: r,
|
|
45647
45666
|
leftIcon: () => /* @__PURE__ */ U(Pe, {
|
|
45648
45667
|
name: t,
|
|
@@ -45650,62 +45669,62 @@ var Z8 = o("PersonItem", X8), Q8 = R(({ avatarUrl: e, name: t, action: n }, r) =
|
|
|
45650
45669
|
src: e
|
|
45651
45670
|
}),
|
|
45652
45671
|
text: t,
|
|
45653
|
-
action:
|
|
45672
|
+
action: X8(n, t)
|
|
45654
45673
|
}));
|
|
45655
|
-
|
|
45656
|
-
var
|
|
45674
|
+
t5.displayName = "CompanyItem";
|
|
45675
|
+
var n5 = o("CompanyItem", t5), r5 = R(({ action: e, name: t }, n) => /* @__PURE__ */ U(J8, {
|
|
45657
45676
|
ref: n,
|
|
45658
45677
|
leftIcon: () => /* @__PURE__ */ U($e, {
|
|
45659
45678
|
name: t,
|
|
45660
45679
|
size: "xs"
|
|
45661
45680
|
}),
|
|
45662
45681
|
text: t,
|
|
45663
|
-
action:
|
|
45682
|
+
action: X8(e, t)
|
|
45664
45683
|
}));
|
|
45665
|
-
|
|
45666
|
-
var
|
|
45684
|
+
r5.displayName = "TeamItem";
|
|
45685
|
+
var i5 = o("TeamItem", r5), a5 = R(({ ...e }, t) => /* @__PURE__ */ U("li", {
|
|
45667
45686
|
ref: t,
|
|
45668
45687
|
className: "flex items-start pt-1",
|
|
45669
45688
|
children: /* @__PURE__ */ U(st, { ...e })
|
|
45670
45689
|
}));
|
|
45671
|
-
|
|
45672
|
-
var
|
|
45690
|
+
a5.displayName = "DotTagItem";
|
|
45691
|
+
var o5 = o("DotTagItem", a5), s5 = R(({ ...e }, t) => /* @__PURE__ */ U("li", {
|
|
45673
45692
|
ref: t,
|
|
45674
45693
|
className: "flex items-start pt-1",
|
|
45675
45694
|
children: /* @__PURE__ */ U(Mt, { ...e })
|
|
45676
45695
|
}));
|
|
45677
|
-
|
|
45678
|
-
var
|
|
45696
|
+
s5.displayName = "AlertTagItem";
|
|
45697
|
+
var c5 = o("AlertTagItem", s5), l5 = R(({ ...e }, t) => /* @__PURE__ */ U("li", {
|
|
45679
45698
|
ref: t,
|
|
45680
45699
|
className: "flex items-start pt-1",
|
|
45681
45700
|
children: /* @__PURE__ */ U(Ct, { ...e })
|
|
45682
45701
|
}));
|
|
45683
|
-
|
|
45684
|
-
var
|
|
45702
|
+
l5.displayName = "BalanceTagItem";
|
|
45703
|
+
var u5 = o("BalanceTagItem", l5), d5 = R(({ ...e }, t) => /* @__PURE__ */ U("li", {
|
|
45685
45704
|
ref: t,
|
|
45686
45705
|
className: "flex items-start pt-1",
|
|
45687
45706
|
children: /* @__PURE__ */ U(On, { ...e })
|
|
45688
45707
|
}));
|
|
45689
|
-
|
|
45690
|
-
var
|
|
45708
|
+
d5.displayName = "StatusTagItem";
|
|
45709
|
+
var f5 = o("StatusTagItem", d5), p5 = R(({ ...e }, t) => /* @__PURE__ */ U("li", {
|
|
45691
45710
|
ref: t,
|
|
45692
45711
|
className: "flex items-start pt-1",
|
|
45693
45712
|
children: /* @__PURE__ */ U(ft, { ...e })
|
|
45694
45713
|
}));
|
|
45695
|
-
|
|
45696
|
-
var
|
|
45714
|
+
p5.displayName = "RawTagItem";
|
|
45715
|
+
var m5 = o("RawTagItem", p5);
|
|
45697
45716
|
//#endregion
|
|
45698
45717
|
//#region src/elements/DataList/items/TagListItem.tsx
|
|
45699
|
-
function
|
|
45718
|
+
function h5(e, t) {
|
|
45700
45719
|
return /* @__PURE__ */ U("li", {
|
|
45701
45720
|
ref: t,
|
|
45702
45721
|
className: "flex items-start pt-1",
|
|
45703
45722
|
children: /* @__PURE__ */ U(hn, { ...e })
|
|
45704
45723
|
});
|
|
45705
45724
|
}
|
|
45706
|
-
var
|
|
45707
|
-
|
|
45708
|
-
var
|
|
45725
|
+
var g5 = R(h5);
|
|
45726
|
+
g5.displayName = "TagListItem";
|
|
45727
|
+
var _5 = o("TagListItem", g5), v5 = R(({ children: e, label: t, isHorizontal: n = !1 }, r) => /* @__PURE__ */ W("div", {
|
|
45709
45728
|
className: c(n ? "flex min-h-12 flex-1 flex-col py-1.5 pl-3 pr-1.5 xs:flex-row" : "min-w-32"),
|
|
45710
45729
|
children: [t ? /* @__PURE__ */ U("p", {
|
|
45711
45730
|
className: c("px-1.5 text-f1-foreground-secondary", n ? "mt-2 w-44 xs:px-0" : "mb-0.5"),
|
|
@@ -45716,33 +45735,33 @@ var m5 = o("TagListItem", p5), h5 = R(({ children: e, label: t, isHorizontal: n
|
|
|
45716
45735
|
children: e
|
|
45717
45736
|
})]
|
|
45718
45737
|
}));
|
|
45719
|
-
|
|
45720
|
-
var
|
|
45721
|
-
Item:
|
|
45722
|
-
CompanyItem:
|
|
45723
|
-
PersonItem:
|
|
45724
|
-
TeamItem:
|
|
45725
|
-
DotTagItem:
|
|
45726
|
-
AlertTagItem:
|
|
45727
|
-
BalanceTagItem:
|
|
45728
|
-
StatusTagItem:
|
|
45729
|
-
RawTagItem:
|
|
45730
|
-
TagListItem:
|
|
45731
|
-
}),
|
|
45738
|
+
v5.displayName = "DataList";
|
|
45739
|
+
var y5 = o("DataList", v5), b5 = Object.assign(y5, {
|
|
45740
|
+
Item: Q8,
|
|
45741
|
+
CompanyItem: n5,
|
|
45742
|
+
PersonItem: e5,
|
|
45743
|
+
TeamItem: i5,
|
|
45744
|
+
DotTagItem: o5,
|
|
45745
|
+
AlertTagItem: c5,
|
|
45746
|
+
BalanceTagItem: u5,
|
|
45747
|
+
StatusTagItem: f5,
|
|
45748
|
+
RawTagItem: m5,
|
|
45749
|
+
TagListItem: _5
|
|
45750
|
+
}), x5 = ({ content: e }) => /* @__PURE__ */ W(Jr, { children: [
|
|
45732
45751
|
e.type === "weekdays" ? /* @__PURE__ */ U("li", {
|
|
45733
45752
|
className: "list-none px-1.5 py-1",
|
|
45734
|
-
children: /* @__PURE__ */ U(
|
|
45753
|
+
children: /* @__PURE__ */ U(U8, { ...e })
|
|
45735
45754
|
}) : null,
|
|
45736
|
-
e.type === "person" ? /* @__PURE__ */ U(
|
|
45737
|
-
e.type === "item" ? /* @__PURE__ */ U(
|
|
45738
|
-
e.type === "team" ? /* @__PURE__ */ U(
|
|
45739
|
-
e.type === "company" ? /* @__PURE__ */ U(
|
|
45740
|
-
e.type === "dot-tag" ? /* @__PURE__ */ U(
|
|
45741
|
-
e.type === "alert-tag" ? /* @__PURE__ */ U(
|
|
45742
|
-
e.type === "balance-tag" ? /* @__PURE__ */ U(
|
|
45743
|
-
e.type === "status-tag" ? /* @__PURE__ */ U(
|
|
45744
|
-
e.type === "raw-tag" ? /* @__PURE__ */ U(
|
|
45745
|
-
e.type === "tag-list" ? /* @__PURE__ */ U(
|
|
45755
|
+
e.type === "person" ? /* @__PURE__ */ U(b5.PersonItem, { ...e }) : null,
|
|
45756
|
+
e.type === "item" ? /* @__PURE__ */ U(b5.Item, { ...e }) : null,
|
|
45757
|
+
e.type === "team" ? /* @__PURE__ */ U(b5.TeamItem, { ...e }) : null,
|
|
45758
|
+
e.type === "company" ? /* @__PURE__ */ U(b5.CompanyItem, { ...e }) : null,
|
|
45759
|
+
e.type === "dot-tag" ? /* @__PURE__ */ U(b5.DotTagItem, { ...e }) : null,
|
|
45760
|
+
e.type === "alert-tag" ? /* @__PURE__ */ U(b5.AlertTagItem, { ...e }) : null,
|
|
45761
|
+
e.type === "balance-tag" ? /* @__PURE__ */ U(b5.BalanceTagItem, { ...e }) : null,
|
|
45762
|
+
e.type === "status-tag" ? /* @__PURE__ */ U(b5.StatusTagItem, { ...e }) : null,
|
|
45763
|
+
e.type === "raw-tag" ? /* @__PURE__ */ U(b5.RawTagItem, { ...e }) : null,
|
|
45764
|
+
e.type === "tag-list" ? /* @__PURE__ */ U(b5.TagListItem, { ...e.tagList }) : null,
|
|
45746
45765
|
e.type === "avatar-list" ? /* @__PURE__ */ U("li", {
|
|
45747
45766
|
className: "list-none px-1.5 py-1",
|
|
45748
45767
|
children: /* @__PURE__ */ U(Qe, { ...e.avatarList })
|
|
@@ -45754,25 +45773,25 @@ var g5 = o("DataList", h5), _5 = Object.assign(g5, {
|
|
|
45754
45773
|
children: /* @__PURE__ */ U(S$, { ...n })
|
|
45755
45774
|
});
|
|
45756
45775
|
})() : null
|
|
45757
|
-
] }),
|
|
45776
|
+
] }), S5 = R(function({ title: e, content: t, isHorizontal: n = !1, verticalLayout: r = !1, spacingAtTheBottom: i }, a) {
|
|
45758
45777
|
let o = Array.isArray(t) ? t : [t];
|
|
45759
45778
|
return /* @__PURE__ */ U("div", {
|
|
45760
45779
|
ref: a,
|
|
45761
45780
|
className: c("flex flex-col gap-0.5", i && !n && "pb-3", n && !r && "xs:[&_ul>li]:p-0 [&_ul]:flex-1", n && r && "[&_ul>li>*]:px-0 [&_ul]:flex-1 xs:[&>div]:flex-col"),
|
|
45762
|
-
children: /* @__PURE__ */ U(
|
|
45781
|
+
children: /* @__PURE__ */ U(b5, {
|
|
45763
45782
|
label: e,
|
|
45764
45783
|
isHorizontal: n,
|
|
45765
|
-
children: o.map((e, t) => /* @__PURE__ */ U(
|
|
45784
|
+
children: o.map((e, t) => /* @__PURE__ */ U(x5, { content: e }, t))
|
|
45766
45785
|
})
|
|
45767
45786
|
});
|
|
45768
|
-
}),
|
|
45787
|
+
}), C5 = r(o("DetailsItem", S5)), w5 = ({ onClick: e }) => {
|
|
45769
45788
|
let t = a();
|
|
45770
45789
|
return /* @__PURE__ */ U(Se, {
|
|
45771
45790
|
label: t.actions.seeMore,
|
|
45772
45791
|
onClick: e,
|
|
45773
45792
|
variant: "neutral"
|
|
45774
45793
|
});
|
|
45775
|
-
},
|
|
45794
|
+
}, T5 = R(function({ title: e, tableView: t = !1, details: n, dataTestId: r, showSeeMore: a, onClickSeeMore: o }, s) {
|
|
45776
45795
|
return /* @__PURE__ */ U(i, {
|
|
45777
45796
|
dataTestId: r,
|
|
45778
45797
|
children: /* @__PURE__ */ W("div", {
|
|
@@ -45785,7 +45804,7 @@ var g5 = o("DataList", h5), _5 = Object.assign(g5, {
|
|
|
45785
45804
|
}) : null,
|
|
45786
45805
|
/* @__PURE__ */ U("div", {
|
|
45787
45806
|
className: c("flex flex-col", t ? "rounded-md border border-solid border-f1-border-secondary" : "gap-3"),
|
|
45788
|
-
children: n?.map((e, r) => /* @__PURE__ */ W(L.Fragment, { children: [/* @__PURE__ */ U(
|
|
45807
|
+
children: n?.map((e, r) => /* @__PURE__ */ W(L.Fragment, { children: [/* @__PURE__ */ U(C5, {
|
|
45789
45808
|
title: e.title,
|
|
45790
45809
|
content: e.content,
|
|
45791
45810
|
spacingAtTheBottom: e.spacingAtTheBottom,
|
|
@@ -45793,11 +45812,11 @@ var g5 = o("DataList", h5), _5 = Object.assign(g5, {
|
|
|
45793
45812
|
verticalLayout: e.verticalLayout
|
|
45794
45813
|
}, e.title), t && r !== n.length - 1 ? /* @__PURE__ */ U("div", { className: "h-[1px] w-full bg-f1-border-secondary" }) : null] }, e.title))
|
|
45795
45814
|
}),
|
|
45796
|
-
a ? /* @__PURE__ */ U(
|
|
45815
|
+
a ? /* @__PURE__ */ U(w5, { onClick: o }) : null
|
|
45797
45816
|
]
|
|
45798
45817
|
})
|
|
45799
45818
|
});
|
|
45800
|
-
}),
|
|
45819
|
+
}), E5 = o("DetailsItemsList", T5), D5 = ({ image: e, aspectRatio: t, spanFull: n, inset: r, surfaceClassName: i, label: a, onOpen: o, overlay: s, eager: u = !0, onImageError: d, testIdPrefix: f = "chat", preventDrag: p = !1 }) => {
|
|
45801
45820
|
let { reducedMotion: m } = H$(), [h, g] = H(!1), _ = e1(e.thumbnailUrl ?? e.url);
|
|
45802
45821
|
return t1(_.status, d), /* @__PURE__ */ W("button", {
|
|
45803
45822
|
type: "button",
|
|
@@ -45815,7 +45834,7 @@ var g5 = o("DataList", h5), _5 = Object.assign(g5, {
|
|
|
45815
45834
|
className: "pointer-events-none absolute inset-0 h-full w-full scale-105 object-cover blur-md",
|
|
45816
45835
|
"data-testid": `${f}-image-blur`
|
|
45817
45836
|
}) : null,
|
|
45818
|
-
_.status === "ready" ? /* @__PURE__ */ U(
|
|
45837
|
+
_.status === "ready" ? /* @__PURE__ */ U(_1, {
|
|
45819
45838
|
src: _.url,
|
|
45820
45839
|
alt: e.name,
|
|
45821
45840
|
eager: u,
|
|
@@ -45831,8 +45850,8 @@ var g5 = o("DataList", h5), _5 = Object.assign(g5, {
|
|
|
45831
45850
|
s
|
|
45832
45851
|
]
|
|
45833
45852
|
});
|
|
45834
|
-
},
|
|
45835
|
-
let u = a(), { urlCache: d } = H$(), f = n1(), [p, m] = H(!1), [h, g] = H(!1), _ = d !== null && !R$(e.url), [v, y] = H(!1), b = e1(e.url, { enabled: !_ || v }), x = e1(e.thumbnailUrl), S = x.status === "ready" ? x.url : void 0, C = e.size == null ? null :
|
|
45853
|
+
}, O5 = Br(() => import("./F0VideoPlayer-DUw-DouS.js").then((e) => ({ default: e.F0VideoPlayer }))), k5 = ({ file: e, cornerClass: t, className: n, surfaceClassName: r, meta: i, onDownloaded: o, testIdPrefix: s = "chat" }) => {
|
|
45854
|
+
let u = a(), { urlCache: d } = H$(), f = n1(), [p, m] = H(!1), [h, g] = H(!1), _ = d !== null && !R$(e.url), [v, y] = H(!1), b = e1(e.url, { enabled: !_ || v }), x = e1(e.thumbnailUrl), S = x.status === "ready" ? x.url : void 0, C = e.size == null ? null : P1(e.size), w = {
|
|
45836
45855
|
label: u.t("chat.downloadNamedFile", { name: e.name }),
|
|
45837
45856
|
icon: Qa,
|
|
45838
45857
|
onClick: () => {
|
|
@@ -45842,7 +45861,7 @@ var g5 = o("DataList", h5), _5 = Object.assign(g5, {
|
|
|
45842
45861
|
return /* @__PURE__ */ W("figure", {
|
|
45843
45862
|
"aria-label": e.name,
|
|
45844
45863
|
"aria-busy": !h && !T || void 0,
|
|
45845
|
-
className: c("group/video relative m-0 aspect-video max-w-full overflow-hidden",
|
|
45864
|
+
className: c("group/video relative m-0 aspect-video max-w-full overflow-hidden", c6, f6, t, n),
|
|
45846
45865
|
onErrorCapture: (e) => {
|
|
45847
45866
|
e.target instanceof HTMLVideoElement && m(!0);
|
|
45848
45867
|
},
|
|
@@ -45855,7 +45874,7 @@ var g5 = o("DataList", h5), _5 = Object.assign(g5, {
|
|
|
45855
45874
|
T ? /* @__PURE__ */ W("div", {
|
|
45856
45875
|
className: "absolute inset-0 flex flex-col items-center justify-center gap-2 p-4",
|
|
45857
45876
|
"data-testid": `${s}-video-error`,
|
|
45858
|
-
children: [/* @__PURE__ */ U(
|
|
45877
|
+
children: [/* @__PURE__ */ U(F3, {
|
|
45859
45878
|
file: e,
|
|
45860
45879
|
testId: `${s}-video-file-tile`,
|
|
45861
45880
|
action: w
|
|
@@ -45869,7 +45888,7 @@ var g5 = o("DataList", h5), _5 = Object.assign(g5, {
|
|
|
45869
45888
|
"aria-hidden": h ? !0 : void 0,
|
|
45870
45889
|
"data-testid": `${s}-video-placeholder`,
|
|
45871
45890
|
children: [
|
|
45872
|
-
/* @__PURE__ */ U(
|
|
45891
|
+
/* @__PURE__ */ U(A5, {
|
|
45873
45892
|
name: e.name,
|
|
45874
45893
|
poster: S,
|
|
45875
45894
|
announce: !h,
|
|
@@ -45877,11 +45896,11 @@ var g5 = o("DataList", h5), _5 = Object.assign(g5, {
|
|
|
45877
45896
|
}),
|
|
45878
45897
|
/* @__PURE__ */ U("span", { className: "absolute inset-0 bg-[hsl(0_0%_0%/0.2)]" }),
|
|
45879
45898
|
/* @__PURE__ */ U("span", {
|
|
45880
|
-
className: c("absolute left-1/2 top-1/2 flex size-14 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full text-f1-foreground-inverse",
|
|
45899
|
+
className: c("absolute left-1/2 top-1/2 flex size-14 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full text-f1-foreground-inverse", p6),
|
|
45881
45900
|
children: /* @__PURE__ */ U(Fc, { className: "size-6" })
|
|
45882
45901
|
}),
|
|
45883
45902
|
C ? /* @__PURE__ */ U("span", {
|
|
45884
|
-
className: c("absolute bottom-2 left-2 rounded-full px-2 py-0.5 text-sm font-medium text-f1-foreground-inverse",
|
|
45903
|
+
className: c("absolute bottom-2 left-2 rounded-full px-2 py-0.5 text-sm font-medium text-f1-foreground-inverse", m6),
|
|
45885
45904
|
"data-testid": `${s}-video-size`,
|
|
45886
45905
|
children: C
|
|
45887
45906
|
}) : null
|
|
@@ -45899,7 +45918,7 @@ var g5 = o("DataList", h5), _5 = Object.assign(g5, {
|
|
|
45899
45918
|
"data-testid": `${s}-video-player-shell`,
|
|
45900
45919
|
children: /* @__PURE__ */ U(Fr, {
|
|
45901
45920
|
fallback: null,
|
|
45902
|
-
children: b.status === "ready" ? /* @__PURE__ */ U(
|
|
45921
|
+
children: b.status === "ready" ? /* @__PURE__ */ U(O5, {
|
|
45903
45922
|
src: b.url,
|
|
45904
45923
|
ariaLabel: u.t("chat.videoPlayerLabel", { name: e.name }),
|
|
45905
45924
|
poster: S,
|
|
@@ -45925,25 +45944,25 @@ var g5 = o("DataList", h5), _5 = Object.assign(g5, {
|
|
|
45925
45944
|
})
|
|
45926
45945
|
]
|
|
45927
45946
|
});
|
|
45928
|
-
},
|
|
45947
|
+
}, A5 = ({ name: e, poster: t, announce: n = !0, surfaceClassName: r }) => {
|
|
45929
45948
|
let i = a();
|
|
45930
45949
|
return /* @__PURE__ */ U("div", {
|
|
45931
45950
|
role: n ? "status" : void 0,
|
|
45932
45951
|
"aria-label": n ? i.t("chat.loadingVideo", { name: e }) : void 0,
|
|
45933
45952
|
"aria-hidden": !n || void 0,
|
|
45934
45953
|
className: "relative h-full w-full",
|
|
45935
|
-
children: t ? /* @__PURE__ */ U(
|
|
45954
|
+
children: t ? /* @__PURE__ */ U(_1, {
|
|
45936
45955
|
src: t,
|
|
45937
45956
|
alt: "",
|
|
45938
45957
|
"aria-hidden": "true",
|
|
45939
45958
|
className: "h-full w-full object-contain"
|
|
45940
45959
|
}) : /* @__PURE__ */ U(s, { className: c("h-full w-full", n ? "motion-reduce:animate-none" : "animate-none", r) })
|
|
45941
45960
|
});
|
|
45942
|
-
},
|
|
45943
|
-
let t =
|
|
45961
|
+
}, j5 = /* @__PURE__ */ new Map(), M5 = /* @__PURE__ */ new Set(), N5 = /* @__PURE__ */ new Map(), P5 = (e) => j5.get(e) ?? (M5.has(e) ? null : void 0), F5 = (e) => {
|
|
45962
|
+
let t = j5.get(e);
|
|
45944
45963
|
if (t) return Promise.resolve(t);
|
|
45945
|
-
if (
|
|
45946
|
-
let n =
|
|
45964
|
+
if (M5.has(e)) return Promise.resolve(null);
|
|
45965
|
+
let n = N5.get(e);
|
|
45947
45966
|
if (n) return n;
|
|
45948
45967
|
if (typeof Image > "u") return Promise.resolve(null);
|
|
45949
45968
|
let r = new Promise((t) => {
|
|
@@ -45953,20 +45972,20 @@ var g5 = o("DataList", h5), _5 = Object.assign(g5, {
|
|
|
45953
45972
|
width: n.naturalWidth,
|
|
45954
45973
|
height: n.naturalHeight
|
|
45955
45974
|
};
|
|
45956
|
-
r.width > 0 && r.height > 0 ? (
|
|
45975
|
+
r.width > 0 && r.height > 0 ? (j5.set(e, r), t(r)) : (M5.add(e), t(null));
|
|
45957
45976
|
}, n.onerror = () => {
|
|
45958
|
-
|
|
45977
|
+
M5.add(e), t(null);
|
|
45959
45978
|
}, n.src = e;
|
|
45960
45979
|
}).finally(() => {
|
|
45961
|
-
|
|
45980
|
+
N5.delete(e);
|
|
45962
45981
|
});
|
|
45963
|
-
return
|
|
45964
|
-
},
|
|
45982
|
+
return N5.set(e, r), r;
|
|
45983
|
+
}, I5 = (e, t) => {
|
|
45965
45984
|
let n = t?.width, r = t?.height, i = !!(n && r), [, a] = H(null);
|
|
45966
45985
|
return B(() => {
|
|
45967
45986
|
if (!e || i) return;
|
|
45968
45987
|
let t = !1;
|
|
45969
|
-
return
|
|
45988
|
+
return F5(e).then((n) => {
|
|
45970
45989
|
t || a({
|
|
45971
45990
|
src: e,
|
|
45972
45991
|
size: n
|
|
@@ -45977,8 +45996,8 @@ var g5 = o("DataList", h5), _5 = Object.assign(g5, {
|
|
|
45977
45996
|
}, [e, i]), n && r ? {
|
|
45978
45997
|
width: n,
|
|
45979
45998
|
height: r
|
|
45980
|
-
} : e ?
|
|
45981
|
-
},
|
|
45999
|
+
} : e ? P5(e) : void 0;
|
|
46000
|
+
}, L5 = 1.3, R5 = .6, z5 = (e, t) => {
|
|
45982
46001
|
if (!e || !t) return null;
|
|
45983
46002
|
let n = Math.min(e, 384), r = n * t / e;
|
|
45984
46003
|
r > 512 && (r = 512, n = r * e / t);
|
|
@@ -45989,10 +46008,10 @@ var g5 = o("DataList", h5), _5 = Object.assign(g5, {
|
|
|
45989
46008
|
scaleX: Math.min(1, n / i),
|
|
45990
46009
|
scaleY: Math.min(1, r / a)
|
|
45991
46010
|
};
|
|
45992
|
-
},
|
|
46011
|
+
}, B5 = (e) => {
|
|
45993
46012
|
if (e.length === 0) return [];
|
|
45994
46013
|
if (e.length === 1) {
|
|
45995
|
-
let t =
|
|
46014
|
+
let t = z5(e[0]?.width, e[0]?.height), n = t ? t.scaleX < 1 || t.scaleY < 1 : !1;
|
|
45996
46015
|
return [{
|
|
45997
46016
|
index: 0,
|
|
45998
46017
|
span: 2,
|
|
@@ -46007,14 +46026,14 @@ var g5 = o("DataList", h5), _5 = Object.assign(g5, {
|
|
|
46007
46026
|
if (e.length === 2) return e.map((e, t) => ({
|
|
46008
46027
|
index: t,
|
|
46009
46028
|
span: 1,
|
|
46010
|
-
aspectRatio: 1 /
|
|
46029
|
+
aspectRatio: 1 / L5,
|
|
46011
46030
|
hiddenCount: 0
|
|
46012
46031
|
}));
|
|
46013
46032
|
if (e.length === 3) return [
|
|
46014
46033
|
{
|
|
46015
46034
|
index: 0,
|
|
46016
46035
|
span: 2,
|
|
46017
|
-
aspectRatio: 1 /
|
|
46036
|
+
aspectRatio: 1 / R5,
|
|
46018
46037
|
hiddenCount: 0
|
|
46019
46038
|
},
|
|
46020
46039
|
{
|
|
@@ -46040,8 +46059,8 @@ var g5 = o("DataList", h5), _5 = Object.assign(g5, {
|
|
|
46040
46059
|
};
|
|
46041
46060
|
//#endregion
|
|
46042
46061
|
//#region src/addons/ai/ai/F0AiChat/providers/useAiChatToggle.ts
|
|
46043
|
-
function
|
|
46044
|
-
let { enabled: e, open: t, setOpen: n, panelContent: r, clearPanelContent: i, restoringPanelContentId: a } =
|
|
46062
|
+
function V5() {
|
|
46063
|
+
let { enabled: e, open: t, setOpen: n, panelContent: r, clearPanelContent: i, restoringPanelContentId: a } = A3();
|
|
46045
46064
|
return {
|
|
46046
46065
|
enabled: e,
|
|
46047
46066
|
open: t && !r && !a,
|
|
@@ -46052,8 +46071,8 @@ function R5() {
|
|
|
46052
46071
|
}
|
|
46053
46072
|
//#endregion
|
|
46054
46073
|
//#region src/addons/ai/ai/F0OneSwitch/F0OneSwitch.tsx
|
|
46055
|
-
var
|
|
46056
|
-
let m =
|
|
46074
|
+
var H5 = ({ className: e, disabled: t, onVisible: n, tooltip: r, autoOpen: i = !1, onToggle: o, checked: s, onCheckedChange: d }) => {
|
|
46075
|
+
let m = V5(), h = a(), g = d !== void 0, _ = g ? !0 : m.enabled, v = g ? !!s : m.open, y = g ? d : m.setOpen, [b, x] = H(!1), [S, C] = H(!1), [w, T] = H(i), E = t && r?.whenDisabled ? r?.whenDisabled : r?.whenEnabled ?? h.ai.welcome, D = i ? w : S;
|
|
46057
46076
|
return B(() => {
|
|
46058
46077
|
i && T(!0);
|
|
46059
46078
|
}, [i]), B(() => {
|
|
@@ -46099,8 +46118,8 @@ var z5 = ({ className: e, disabled: t, onVisible: n, tooltip: r, autoOpen: i = !
|
|
|
46099
46118
|
})]
|
|
46100
46119
|
})
|
|
46101
46120
|
}) : null;
|
|
46102
|
-
},
|
|
46103
|
-
function
|
|
46121
|
+
}, U5 = (e, t) => c("flex h-full flex-col bg-f1-special-page p-0 md:py-1 border border-solid border-f1-border-secondary", e ? "md:rounded-lg md:px-1" : t ? "md:rounded-r-lg md:pr-1 border-l-0" : "md:rounded-l-lg md:pl-1 border-r-0"), W5 = c("flex h-full w-full flex-col overflow-hidden", "bg-f1-background", "md:shadow-md shadow-none", "rounded-none border-none md:rounded-md md:border md:border-solid border-f1-border-secondary");
|
|
46122
|
+
function G5({ content: e, onClose: t, entities: n, side: r = "right", animated: i = !0, bodyDelayMs: a = 0 }) {
|
|
46104
46123
|
let o = r === "left", s = e?.coversChat === !0, l = ue(), [u, d] = H(0), f = V(e);
|
|
46105
46124
|
B(() => {
|
|
46106
46125
|
e && f.current && e !== f.current && d((e) => e + 1), f.current = e;
|
|
@@ -46131,7 +46150,7 @@ function H5({ content: e, onClose: t, entities: n, side: r = "right", animated:
|
|
|
46131
46150
|
}, i);
|
|
46132
46151
|
}
|
|
46133
46152
|
return i;
|
|
46134
|
-
}, _ =
|
|
46153
|
+
}, _ = U5(s, o);
|
|
46135
46154
|
return i ? /* @__PURE__ */ U(Oe, { children: e ? /* @__PURE__ */ U(M.div, {
|
|
46136
46155
|
className: c("pointer-events-auto flex h-full flex-col", "md:py-1 dark:bg-f1-background p-0"),
|
|
46137
46156
|
initial: {
|
|
@@ -46158,7 +46177,7 @@ function H5({ content: e, onClose: t, entities: n, side: r = "right", animated:
|
|
|
46158
46177
|
children: /* @__PURE__ */ U("div", {
|
|
46159
46178
|
className: _,
|
|
46160
46179
|
children: /* @__PURE__ */ U(M.div, {
|
|
46161
|
-
className:
|
|
46180
|
+
className: W5,
|
|
46162
46181
|
initial: { opacity: 0 },
|
|
46163
46182
|
animate: { opacity: 1 },
|
|
46164
46183
|
transition: {
|
|
@@ -46173,12 +46192,12 @@ function H5({ content: e, onClose: t, entities: n, side: r = "right", animated:
|
|
|
46173
46192
|
children: /* @__PURE__ */ U("div", {
|
|
46174
46193
|
className: _,
|
|
46175
46194
|
children: /* @__PURE__ */ U("div", {
|
|
46176
|
-
className:
|
|
46195
|
+
className: W5,
|
|
46177
46196
|
children: g()
|
|
46178
46197
|
})
|
|
46179
46198
|
})
|
|
46180
46199
|
}) : null;
|
|
46181
46200
|
}
|
|
46182
|
-
|
|
46201
|
+
G5.displayName = "F0CanvasPanel";
|
|
46183
46202
|
//#endregion
|
|
46184
|
-
export {
|
|
46203
|
+
export { V2 as $, gl as $a, c_ as $i, kK as $n, ws as $o, OV as $r, va as $s, VZ as $t, u6 as A, Xd as Aa, BO as Ai, Qq as An, hc as Ao, bH as Ar, uo as As, u1 as At, A3 as B, Ul as Ba, KT as Bi, mq as Bn, qs as Bo, rH as Br, Za as Bs, A$ as Bt, x8 as C, vf as Ca, vA as Ci, uY as Cn, Pc as Co, QH as Cr, Co as Cs, x1 as Ct, X6 as D, ef as Da, lk as Di, nJ as Dn, Sc as Do, kH as Dr, ho as Ds, s1 as Dt, Z6 as E, ff as Ea, fk as Ei, tJ as En, Dc as Eo, NH as Er, vo as Es, p1 as Et, s6 as F, Iu as Fa, FD as Fi, Bq as Fn, ac as Fo, mH as Fr, io as Fs, V$ as Ft, M4 as G, Al as Ga, mx as Gi, RK as Gn, Bs as Go, qV as Gr, Ma as Gs, p$ as Gt, K4 as H, Cl as Ha, Yx as Hi, JK as Hn, Gs as Ho, XV as Hr, Ua as Hs, C$ as Ht, e6 as I, Nu as Ia, hD as Ii, Rq as In, nc as Io, uH as Ir, to as Is, H$ as It, a4 as J, Tl as Ja, oy as Ji, BK as Jn, Ls as Jo, LV as Jr, Ta as Js, $Z as Jt, h4 as K, wl as Ka, db as Ki, VK as Kn, zs as Ko, GV as Kr, ja as Ks, uQ as Kt, I3 as L, $l as La, WE as Li, zq as Ln, ec as Lo, aH as Lr, eo as Ls, R$ as Lt, d6 as M, Yd as Ma, oO as Mi, qq as Mn, fc as Mo, yH as Mr, so as Ms, t1 as Mt, l6 as N, Lu as Na, qD as Ni, Uq as Nn, dc as No, gH as Nr, oo as Ns, e1 as Nt, C6 as O, uf as Oa, PO as Oi, eJ as On, xc as Oo, EH as Or, po as Os, d1 as Ot, c6 as P, zu as Pa, JD as Pi, Hq as Pn, lc as Po, pH as Pr, ao as Ps, Z$ as Pt, X2 as Q, yl as Qa, A_ as Qi, OK as Qn, Ts as Qo, kV as Qr, ya as Qs, GZ as Qt, F3 as R, Ql as Ra, YT as Ri, xq as Rn, Zs as Ro, sH as Rr, $a as Rs, F$ as Rt, S8 as S, yf as Sa, Zr as Sc, qM as Si, lY as Sn, Fc as So, aU as Sr, Do as Ss, d0 as St, Q6 as T, mf as Ta, Mk as Ti, NJ as Tn, Oc as To, MH as Tr, xo as Ts, _1 as Tt, G4 as U, jl as Ua, Ux as Ui, GK as Un, Ws as Uo, YV as Ur, Va as Us, _$ as Ut, v3 as V, Ll as Va, Xx as Vi, hq as Vn, Ks as Vo, nH as Vr, Wa as Vs, S$ as Vt, I4 as W, kl as Wa, Rx as Wi, WK as Wn, Vs as Wo, JV as Wr, La as Ws, g$ as Wt, J2 as X, bl as Xa, Bv as Xi, AK as Xn, Ns as Xo, jV as Xr, Ca as Xs, UZ as Xt, r4 as Y, Sl as Ya, Kv as Yi, UK as Yn, Fs as Yo, NV as Yr, wa as Ys, oQ as Yt, Z2 as Z, vl as Za, xv as Zi, MK as Zn, Ds as Zo, MV as Zr, ba as Zs, KZ as Zt, F8 as _, Ef as _a, Ni as _c, JF as _i, hX as _n, Wc as _o, gW as _r, Bo as _s, l0 as _t, I5 as a, jp as aa, oa as ac, JB as ai, NX as an, ol as ao, JW as ar, ps as as, d2 as at, O8 as b, wf as ba, ki as bc, fN as bi, sX as bn, Vc as bo, iU as br, jo as bs, m0 as bt, k5 as c, cp as ca, Yi as cc, sz as ci, kX as cn, nl as co, BW as cr, os as cs, A0 as ct, C5 as d, G as da, Vi as dc, QL as di, vX as dn, $c as do, UW as dr, ts as ds, a0 as dt, Og as ea, _a as ec, mV as ei, WZ as en, dl as eo, DK as er, Cs as es, z2 as et, U8 as f, Qf as fa, zi as fc, bI as fi, DX as fn, Qc as fo, GW as fr, Qo as fs, r0 as ft, M8 as g, Of as ga, Pi as gc, xI as gi, wX as gn, Kc as go, AW as gr, Ho as gs, o0 as gt, I8 as h, Bf as ha, Fi as hc, wI as hi, TX as hn, Yc as ho, LW as hr, Ko as hs, P1 as ht, z5 as i, Rp as ia, fa as ic, $B as ii, MX as in, sl as io, Y as ir, ms as is, m2 as it, h6 as j, Qd as ja, MO as ji, Jq as jn, pc as jo, vH as jr, co as js, n1 as jt, y6 as k, Kd as ka, NO as ki, $q as kn, gc as ko, TH as kr, fo as ks, a1 as kt, D5 as l, rp as la, Ui as lc, WR as li, PX as ln, tl as lo, KW as lr, is as ls, M0 as lt, V8 as m, Vf as ma, Ii as mc, TI as mi, CX as mn, Xc as mo, RW as mr, Jo as ms, X1 as mt, H5 as n, tm as na, ha as nc, hV as ni, HZ as nn, ll as no, EK as nr, bs as ns, b2 as nt, P5 as o, Ip as oa, ia as oc, qB as oi, IX as on, il as oo, YW as or, fs as os, k0 as ot, B8 as p, np as pa, Li as pc, EI as pi, gX as pn, Zc as po, zW as pr, Yo as ps, p0 as pt, i4 as q, El as qa, sy as qi, HK as qn, Rs as qo, HV as qr, Oa as qs, aQ as qt, B5 as r, $p as ra, ma as rc, tV as ri, jX as rn, cl as ro, jK as rr, gs as rs, h2 as rt, F5 as s, bp as sa, Zi as sc, wz as si, OX as sn, rl as so, VW as sr, ls as ss, O0 as st, G5 as t, Yh as ta, ga as tc, gV as ti, qZ as tn, ul as to, NK as tr, Ss as ts, B2 as tt, E5 as u, op as ua, Hi as uc, xR as ui, EX as un, el as uo, WW as ur, ns as us, Q1 as ut, P8 as v, bf as va, Mi as vc, RF as vi, mX as vn, Uc as vo, yW as vr, No as vs, u0 as vt, b8 as w, hf as wa, cA as wi, aY as wn, Nc as wo, RH as wr, So as ws, y1 as wt, k8 as x, Tf as xa, Oi as xc, uN as xi, oX as xn, Ic as xo, eU as xr, Oo as xs, h0 as xt, j8 as y, xf as ya, ji as yc, aP as yi, SX as yn, Hc as yo, vW as yr, Mo as ys, W1 as yt, j3 as z, Zl as za, qT as zi, oq as zn, Xs as zo, oH as zr, Qa as zs, N$ as zt };
|