opencami 1.5.1 → 1.6.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/README.md +4 -1
- package/dist/client/assets/{CSPContext-BBLAL_m_.js → CSPContext-Bq8j4nl9.js} +1 -1
- package/dist/client/assets/DirectionContext-BdX86BHP.js +1 -0
- package/dist/client/assets/_sessionKey-DsjnpErt.js +14 -0
- package/dist/client/assets/agents-DwxKcpP6.js +2 -0
- package/dist/client/assets/agents-screen-DwIY8hze.js +1 -0
- package/dist/client/assets/bots-CRlm-3-d.js +2 -0
- package/dist/client/assets/bots-screen-c78I920d.js +1 -0
- package/dist/client/assets/button-Dg7VFQQn.js +1 -0
- package/dist/client/assets/composite-DBl8R3ae.js +1 -0
- package/dist/client/assets/{connect-DHr3hhUR.js → connect-NYvOqiBJ.js} +1 -1
- package/dist/client/assets/file-explorer-screen-BSMbs0vi.js +1 -0
- package/dist/client/assets/files-BJbMx0_w.js +2 -0
- package/dist/client/assets/{index-B2iG4EM1.js → index-CMATW8VA.js} +1 -1
- package/dist/client/assets/{index-GTR-Xzl2.js → index-rOIRO-8E.js} +1 -1
- package/dist/client/assets/keyboard-shortcuts-dialog-BTGWdJMl.js +1 -0
- package/dist/client/assets/{main-mIHr_ble.js → main-B_dlfHME.js} +9 -9
- package/dist/client/assets/markdown-BVzT7z4x.js +87 -0
- package/dist/client/assets/memory-S3Yws6a5.js +2 -0
- package/dist/client/assets/memory-screen-C-Z9o31m.js +1 -0
- package/dist/client/assets/menu-DHNgWk_8.js +1 -0
- package/dist/client/assets/{opencami-logo-CRIdKbbZ.js → opencami-logo-BQQETnJG.js} +1 -1
- package/dist/client/assets/owner-CpRnf1fI.js +1 -0
- package/dist/client/assets/popupStateMapping-BRPDXnjv.js +1 -0
- package/dist/client/assets/proxy-BcUh9kMA.js +9 -0
- package/dist/client/assets/{react-Cfq4ot0g.js → react-irH8OzhB.js} +1 -1
- package/dist/client/assets/search-dialog-B96zx_ng.js +1 -0
- package/dist/client/assets/session-export-dialog-DPuHnhgv.js +1 -0
- package/dist/client/assets/settings-dialog-DZcRCaPj.js +1 -0
- package/dist/client/assets/skills-YZe3I63y.js +2 -0
- package/dist/client/assets/{skills-panel-Cv-N_MDk.js → skills-panel-WDUfIwnI.js} +2 -2
- package/dist/client/assets/styles-Bwo-K6Y4.css +1 -0
- package/dist/client/assets/{switch-Bh9tVOYh.js → switch-DPocNFRG.js} +1 -1
- package/dist/client/assets/tabs-B0cro1hL.js +1 -0
- package/dist/client/assets/tooltip-Dg9fy-vT.js +1 -0
- package/dist/client/assets/use-file-explorer-state-DzT0bksg.js +12 -0
- package/dist/client/assets/{useButton-DsMdJPGn.js → useButton-Cbl_9oFG.js} +1 -1
- package/dist/client/assets/useCompositeItem-BDAzTxVe.js +1 -0
- package/dist/client/assets/{useControlled-wOKVgKF4.js → useControlled-Dscz_s4f.js} +1 -1
- package/dist/client/assets/{useMutation-fJnleJAb.js → useMutation-B1FlDsNN.js} +1 -1
- package/dist/client/assets/visuallyHidden-ONmQ-0U2.js +1 -0
- package/dist/server/assets/{_sessionKey-B5UHBd2U.js → _sessionKey-B0ZlLAjH.js} +172 -567
- package/dist/server/assets/_tanstack-start-manifest_v-D5UVTs1o.js +4 -0
- package/dist/server/assets/{file-explorer-screen-CVlFiAFu.js → file-explorer-screen-DH4UFK03.js} +3 -2
- package/dist/server/assets/{files-BIEcSPGp.js → files-DYdXlQDr.js} +1 -1
- package/dist/server/assets/{index--_jH_0mX.js → index-CiUjUD0t.js} +1 -1
- package/dist/server/assets/{keyboard-shortcuts-dialog-CsNP85q8.js → keyboard-shortcuts-dialog-Cr6fOqHz.js} +1 -2
- package/dist/server/assets/markdown-BFE5y9YH.js +565 -0
- package/dist/server/assets/memory-BqZOoD7Q.js +11 -0
- package/dist/server/assets/memory-screen-BK5phS8K.js +235 -0
- package/dist/server/assets/menu-D90CDTi2.js +45 -0
- package/dist/server/assets/{router-DJA7GtMo.js → router-Uuagl6O7.js} +55 -45
- package/dist/server/assets/{search-dialog-C2a3OYm_.js → search-dialog-DZTS5SEi.js} +6 -4
- package/dist/server/assets/{session-export-dialog-CwclV0Aj.js → session-export-dialog-C53RRAah.js} +1 -2
- package/dist/server/assets/{settings-dialog-CHVzrou9.js → settings-dialog-CSYDj2qm.js} +75 -20
- package/dist/server/assets/{use-file-explorer-state-Il1LlBAe.js → use-file-explorer-state-s7CS50ho.js} +0 -41
- package/dist/server/server.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/DirectionContext-DXnZc0zz.js +0 -1
- package/dist/client/assets/_sessionKey-BidmO1-D.js +0 -100
- package/dist/client/assets/agents-CtZs_u1j.js +0 -2
- package/dist/client/assets/agents-screen-Basce5qo.js +0 -1
- package/dist/client/assets/bots-C_dWjy3z.js +0 -2
- package/dist/client/assets/bots-screen-n_xhYOEE.js +0 -1
- package/dist/client/assets/button-BaHefIXU.js +0 -1
- package/dist/client/assets/file-explorer-screen-8t6M4Xco.js +0 -1
- package/dist/client/assets/files-BdlpK3Cy.js +0 -2
- package/dist/client/assets/keyboard-shortcuts-dialog-CcKSlK52.js +0 -1
- package/dist/client/assets/search-dialog-D19x_xaG.js +0 -1
- package/dist/client/assets/session-export-dialog-DRlJwhMa.js +0 -1
- package/dist/client/assets/settings-dialog-BA5FjiyP.js +0 -1
- package/dist/client/assets/skills-lmNPZksG.js +0 -2
- package/dist/client/assets/styles-JgjN_ZCd.css +0 -1
- package/dist/client/assets/tabs-BfaEc9zS.js +0 -1
- package/dist/client/assets/tooltip-w9D-e_R-.js +0 -1
- package/dist/client/assets/use-file-explorer-state-CLaDuI9X.js +0 -12
- package/dist/client/assets/useCompositeItem-CaYygSfB.js +0 -1
- package/dist/client/assets/visuallyHidden-CqGRL_Oq.js +0 -9
- package/dist/server/assets/_tanstack-start-manifest_v-D11xMFUx.js +0 -4
|
@@ -2,19 +2,18 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState, useEffect, useRef } from "react";
|
|
3
3
|
import { B as Button, c as cn } from "./button-CwY2OHFj.js";
|
|
4
4
|
import { HugeiconsIcon } from "@hugeicons/react";
|
|
5
|
-
import { Cancel01Icon, Link01Icon, PaintBoardIcon, MessageEdit01Icon, UserIcon, VoiceIcon, AiBrain01Icon, InformationCircleIcon, ComputerIcon, Sun01Icon, Moon01Icon, Leaf01Icon, DropletIcon, Loading02Icon, Tick01Icon, Cancel02Icon } from "@hugeicons/core-free-icons";
|
|
6
|
-
import { D as DialogRoot, a as DialogContent, b as DialogTitle, c as DialogDescription, d as DialogClose } from "./use-file-explorer-state-
|
|
5
|
+
import { Cancel01Icon, Link01Icon, PaintBoardIcon, MessageEdit01Icon, Settings02Icon, UserIcon, VoiceIcon, AiBrain01Icon, InformationCircleIcon, ComputerIcon, Sun01Icon, Moon01Icon, Leaf01Icon, DropletIcon, Loading02Icon, Tick01Icon, Cancel02Icon } from "@hugeicons/core-free-icons";
|
|
6
|
+
import { D as DialogRoot, a as DialogContent, b as DialogTitle, c as DialogDescription, d as DialogClose } from "./use-file-explorer-state-s7CS50ho.js";
|
|
7
7
|
import { S as Switch } from "./switch-BbkUeVDV.js";
|
|
8
8
|
import { T as Tabs, a as TabsList, b as TabsTab } from "./tabs-DDFZob0m.js";
|
|
9
9
|
import { u as useChatSettings } from "./index-Dl2BOKP7.js";
|
|
10
|
-
import { u as useLlmSettings, g as getLlmProviderDefaults } from "./_sessionKey-
|
|
10
|
+
import { u as useLlmSettings, g as getLlmProviderDefaults } from "./_sessionKey-B0ZlLAjH.js";
|
|
11
11
|
import "@base-ui/react/merge-props";
|
|
12
12
|
import "@base-ui/react/use-render";
|
|
13
13
|
import "class-variance-authority";
|
|
14
14
|
import "clsx";
|
|
15
15
|
import "tailwind-merge";
|
|
16
16
|
import "@base-ui/react/dialog";
|
|
17
|
-
import "@base-ui/react/menu";
|
|
18
17
|
import "zustand";
|
|
19
18
|
import "@base-ui/react/switch";
|
|
20
19
|
import "@base-ui/react/tabs";
|
|
@@ -27,13 +26,16 @@ import "motion/react";
|
|
|
27
26
|
import "@base-ui/react/alert-dialog";
|
|
28
27
|
import "@base-ui/react/collapsible";
|
|
29
28
|
import "@base-ui/react/scroll-area";
|
|
29
|
+
import "./menu-D90CDTi2.js";
|
|
30
|
+
import "@base-ui/react/menu";
|
|
30
31
|
import "./opencami-logo-C-43FL3R.js";
|
|
32
|
+
import "./markdown-BFE5y9YH.js";
|
|
31
33
|
import "marked";
|
|
32
34
|
import "react-markdown";
|
|
33
35
|
import "remark-breaks";
|
|
34
36
|
import "remark-gfm";
|
|
35
37
|
import "react-dom";
|
|
36
|
-
import "./router-
|
|
38
|
+
import "./router-Uuagl6O7.js";
|
|
37
39
|
import "node:crypto";
|
|
38
40
|
import "ws";
|
|
39
41
|
import "node:fs";
|
|
@@ -564,6 +566,7 @@ function SettingsDialog({
|
|
|
564
566
|
{ id: "connection", label: "Connection", icon: Link01Icon },
|
|
565
567
|
{ id: "appearance", label: "Appearance", icon: PaintBoardIcon },
|
|
566
568
|
{ id: "chat", label: "Chat", icon: MessageEdit01Icon },
|
|
569
|
+
{ id: "workspace", label: "Workspace", icon: Settings02Icon },
|
|
567
570
|
{ id: "personas", label: "Personas", icon: UserIcon },
|
|
568
571
|
{ id: "voice", label: "Voice", icon: VoiceIcon },
|
|
569
572
|
{ id: "llm", label: "LLM Features", icon: AiBrain01Icon },
|
|
@@ -695,6 +698,73 @@ function SettingsDialog({
|
|
|
695
698
|
onCheckedChange: (checked) => updateSettings({ showSearchSources: checked })
|
|
696
699
|
}
|
|
697
700
|
) }),
|
|
701
|
+
/* @__PURE__ */ jsx(
|
|
702
|
+
SettingsRow,
|
|
703
|
+
{
|
|
704
|
+
inline: true,
|
|
705
|
+
label: "Inline File Preview",
|
|
706
|
+
description: "Make file paths in messages clickable to preview file contents",
|
|
707
|
+
children: /* @__PURE__ */ jsx(
|
|
708
|
+
Switch,
|
|
709
|
+
{
|
|
710
|
+
checked: settings.inlineFilePreview,
|
|
711
|
+
onCheckedChange: (checked) => updateSettings({ inlineFilePreview: checked })
|
|
712
|
+
}
|
|
713
|
+
)
|
|
714
|
+
}
|
|
715
|
+
)
|
|
716
|
+
] }),
|
|
717
|
+
/* @__PURE__ */ jsxs(SettingsSection, { title: "Workspace", tabId: "workspace", activeTab, children: [
|
|
718
|
+
/* @__PURE__ */ jsx(
|
|
719
|
+
SettingsRow,
|
|
720
|
+
{
|
|
721
|
+
inline: true,
|
|
722
|
+
label: "File Explorer",
|
|
723
|
+
description: "Browse and edit workspace files from the sidebar",
|
|
724
|
+
children: /* @__PURE__ */ jsx(
|
|
725
|
+
Switch,
|
|
726
|
+
{
|
|
727
|
+
checked: (() => {
|
|
728
|
+
try {
|
|
729
|
+
const v = localStorage.getItem("opencami-file-explorer");
|
|
730
|
+
return v === null ? true : v === "true";
|
|
731
|
+
} catch {
|
|
732
|
+
return true;
|
|
733
|
+
}
|
|
734
|
+
})(),
|
|
735
|
+
onCheckedChange: (checked) => {
|
|
736
|
+
localStorage.setItem("opencami-file-explorer", String(checked));
|
|
737
|
+
window.location.reload();
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
)
|
|
741
|
+
}
|
|
742
|
+
),
|
|
743
|
+
/* @__PURE__ */ jsx(
|
|
744
|
+
SettingsRow,
|
|
745
|
+
{
|
|
746
|
+
inline: true,
|
|
747
|
+
label: "Memory Viewer",
|
|
748
|
+
description: "Browse and edit MEMORY.md and daily memory files",
|
|
749
|
+
children: /* @__PURE__ */ jsx(
|
|
750
|
+
Switch,
|
|
751
|
+
{
|
|
752
|
+
checked: (() => {
|
|
753
|
+
try {
|
|
754
|
+
const v = localStorage.getItem("opencami-memory-viewer");
|
|
755
|
+
return v === null ? true : v === "true";
|
|
756
|
+
} catch {
|
|
757
|
+
return true;
|
|
758
|
+
}
|
|
759
|
+
})(),
|
|
760
|
+
onCheckedChange: (checked) => {
|
|
761
|
+
localStorage.setItem("opencami-memory-viewer", String(checked));
|
|
762
|
+
window.location.reload();
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
)
|
|
766
|
+
}
|
|
767
|
+
),
|
|
698
768
|
/* @__PURE__ */ jsx(
|
|
699
769
|
SettingsRow,
|
|
700
770
|
{
|
|
@@ -766,21 +836,6 @@ function SettingsDialog({
|
|
|
766
836
|
}
|
|
767
837
|
)
|
|
768
838
|
}
|
|
769
|
-
),
|
|
770
|
-
/* @__PURE__ */ jsx(
|
|
771
|
-
SettingsRow,
|
|
772
|
-
{
|
|
773
|
-
inline: true,
|
|
774
|
-
label: "Inline File Preview",
|
|
775
|
-
description: "Make file paths in messages clickable to preview file contents",
|
|
776
|
-
children: /* @__PURE__ */ jsx(
|
|
777
|
-
Switch,
|
|
778
|
-
{
|
|
779
|
-
checked: settings.inlineFilePreview,
|
|
780
|
-
onCheckedChange: (checked) => updateSettings({ inlineFilePreview: checked })
|
|
781
|
-
}
|
|
782
|
-
)
|
|
783
|
-
}
|
|
784
839
|
)
|
|
785
840
|
] }),
|
|
786
841
|
/* @__PURE__ */ jsxs(SettingsSection, { title: "Personas", tabId: "personas", activeTab, children: [
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Dialog } from "@base-ui/react/dialog";
|
|
3
3
|
import { c as cn, B as Button } from "./button-CwY2OHFj.js";
|
|
4
|
-
import { Menu } from "@base-ui/react/menu";
|
|
5
4
|
import { create } from "zustand";
|
|
6
5
|
function DialogRoot({ children, ...props }) {
|
|
7
6
|
return /* @__PURE__ */ jsx(Dialog.Root, { ...props, children });
|
|
@@ -52,42 +51,6 @@ function DialogClose({ className, render, ...props }) {
|
|
|
52
51
|
}
|
|
53
52
|
);
|
|
54
53
|
}
|
|
55
|
-
function MenuRoot({ children, ...props }) {
|
|
56
|
-
return /* @__PURE__ */ jsx(Menu.Root, { ...props, children });
|
|
57
|
-
}
|
|
58
|
-
function MenuTrigger({ className, ...props }) {
|
|
59
|
-
return /* @__PURE__ */ jsx(Menu.Trigger, { className: cn(className), ...props });
|
|
60
|
-
}
|
|
61
|
-
function MenuContent({
|
|
62
|
-
className,
|
|
63
|
-
side = "bottom",
|
|
64
|
-
align = "end",
|
|
65
|
-
children
|
|
66
|
-
}) {
|
|
67
|
-
return /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, { side, align, children: /* @__PURE__ */ jsx(
|
|
68
|
-
Menu.Popup,
|
|
69
|
-
{
|
|
70
|
-
className: cn(
|
|
71
|
-
"min-w-[110px] rounded-lg bg-primary-50 p-1 text-sm text-primary-900 shadow-lg outline outline-primary-900/10",
|
|
72
|
-
className
|
|
73
|
-
),
|
|
74
|
-
children
|
|
75
|
-
}
|
|
76
|
-
) }) });
|
|
77
|
-
}
|
|
78
|
-
function MenuItem({ className, ...props }) {
|
|
79
|
-
return /* @__PURE__ */ jsx(
|
|
80
|
-
Menu.Item,
|
|
81
|
-
{
|
|
82
|
-
className: cn(
|
|
83
|
-
"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm text-primary-900 hover:bg-primary-100 data-highlighted:bg-primary-100",
|
|
84
|
-
"select-none font-[450]",
|
|
85
|
-
className
|
|
86
|
-
),
|
|
87
|
-
...props
|
|
88
|
-
}
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
54
|
const useFileExplorerState = create((set, get) => ({
|
|
92
55
|
currentPath: "/",
|
|
93
56
|
viewMode: "list",
|
|
@@ -155,13 +118,9 @@ const useFileExplorerState = create((set, get) => ({
|
|
|
155
118
|
}));
|
|
156
119
|
export {
|
|
157
120
|
DialogRoot as D,
|
|
158
|
-
MenuRoot as M,
|
|
159
121
|
DialogContent as a,
|
|
160
122
|
DialogTitle as b,
|
|
161
123
|
DialogDescription as c,
|
|
162
124
|
DialogClose as d,
|
|
163
|
-
MenuTrigger as e,
|
|
164
|
-
MenuContent as f,
|
|
165
|
-
MenuItem as g,
|
|
166
125
|
useFileExplorerState as u
|
|
167
126
|
};
|
package/dist/server/server.js
CHANGED
|
@@ -184,7 +184,7 @@ function getResponse() {
|
|
|
184
184
|
return event.res;
|
|
185
185
|
}
|
|
186
186
|
async function getStartManifest(matchedRoutes) {
|
|
187
|
-
const { tsrStartManifest } = await import("./assets/_tanstack-start-manifest_v-
|
|
187
|
+
const { tsrStartManifest } = await import("./assets/_tanstack-start-manifest_v-D5UVTs1o.js");
|
|
188
188
|
const startManifest = tsrStartManifest();
|
|
189
189
|
const rootRoute = startManifest.routes[rootRouteId] = startManifest.routes[rootRouteId] || {};
|
|
190
190
|
rootRoute.assets = rootRoute.assets || [];
|
|
@@ -656,7 +656,7 @@ function getStartResponseHeaders(opts) {
|
|
|
656
656
|
let entriesPromise;
|
|
657
657
|
let manifestPromise;
|
|
658
658
|
async function loadEntries() {
|
|
659
|
-
const routerEntry = await import("./assets/router-
|
|
659
|
+
const routerEntry = await import("./assets/router-Uuagl6O7.js").then((n) => n.r);
|
|
660
660
|
const startEntry = await import("./assets/start-HYkvq4Ni.js");
|
|
661
661
|
return { startEntry, routerEntry };
|
|
662
662
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as p}from"./main-mIHr_ble.js";import{c as T,i as y}from"./useButton-DsMdJPGn.js";const E=[];function H(t){p.useEffect(t,E)}const a=typeof navigator<"u",u=w(),h=R(),b=S(),$=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),q=u.platform==="MacIntel"&&u.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(u.platform),z=a&&/apple/i.test(navigator.vendor),c=a&&/android/i.test(h)||/android/i.test(b),G=a&&h.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,A=b.includes("jsdom/");function w(){if(!a)return{platform:"",maxTouchPoints:-1};const t=navigator.userAgentData;return t?.platform?{platform:t.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function S(){if(!a)return"";const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(({brand:n,version:e})=>`${n}/${e}`).join(" "):navigator.userAgent}function R(){if(!a)return"";const t=navigator.userAgentData;return t?.platform?t.platform:navigator.platform??""}const m="data-base-ui-focusable",J="active",Q="selected",D="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",X="ArrowLeft",Z="ArrowRight",tt="ArrowUp",nt="ArrowDown";function et(t){let n=t.activeElement;for(;n?.shadowRoot?.activeElement!=null;)n=n.shadowRoot.activeElement;return n}function ot(t,n){if(!t||!n)return!1;const e=n.getRootNode?.();if(t.contains(n))return!0;if(e&&T(e)){let o=n;for(;o;){if(t===o)return!0;o=o.parentNode||o.host}}return!1}function rt(t){return"composedPath"in t?t.composedPath()[0]:t.target}function st(t,n){if(n==null)return!1;if("composedPath"in t)return t.composedPath().includes(n);const e=t;return e.target!=null&&n.contains(e.target)}function it(t){return t.matches("html,body")}function at(t){return t?.ownerDocument||document}function O(t){return y(t)&&t.matches(D)}function ut(t){return t?t.getAttribute("role")==="combobox"&&O(t):!1}function ct(t){if(!t||A)return!0;try{return t.matches(":focus-visible")}catch{return!0}}function ft(t){return t?t.hasAttribute(m)?t:t.querySelector(`[${m}]`)||t:null}function lt(t){t.preventDefault(),t.stopPropagation()}function pt(t){return"nativeEvent"in t}function mt(t){return t.mozInputSource===0&&t.isTrusted?!0:c&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function gt(t){return A?!1:!c&&t.width===0&&t.height===0||c&&t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"||t.width<1&&t.height<1&&t.pressure===0&&t.detail===0&&t.pointerType==="touch"}function dt(t,n){const e=["mouse","pen"];return n||e.push("",void 0),e.includes(t)}function ht(t){const n=t.type;return n==="click"||n==="mousedown"||n==="keydown"||n==="keyup"}const bt=["top","right","bottom","left"],C=Math.min,M=Math.max,At=Math.round,xt=Math.floor,Pt=t=>({x:t,y:t}),L={left:"right",right:"left",bottom:"top",top:"bottom"},k={start:"end",end:"start"};function Tt(t,n,e){return M(t,C(n,e))}function yt(t,n){return typeof t=="function"?t(n):t}function x(t){return t.split("-")[0]}function P(t){return t.split("-")[1]}function v(t){return t==="x"?"y":"x"}function W(t){return t==="y"?"height":"width"}const _=new Set(["top","bottom"]);function I(t){return _.has(x(t))?"y":"x"}function N(t){return v(I(t))}function Et(t,n,e){e===void 0&&(e=!1);const o=P(t),s=N(t),r=W(s);let i=s==="x"?o===(e?"end":"start")?"right":"left":o==="start"?"bottom":"top";return n.reference[r]>n.floating[r]&&(i=l(i)),[i,l(i)]}function wt(t){const n=l(t);return[f(t),n,f(n)]}function f(t){return t.replace(/start|end/g,n=>k[n])}const g=["left","right"],d=["right","left"],F=["top","bottom"],U=["bottom","top"];function j(t,n,e){switch(t){case"top":case"bottom":return e?n?d:g:n?g:d;case"left":case"right":return n?F:U;default:return[]}}function St(t,n,e,o){const s=P(t);let r=j(x(t),e==="start",o);return s&&(r=r.map(i=>i+"-"+s),n&&(r=r.concat(r.map(f)))),r}function l(t){return t.replace(/left|right|bottom|top/g,n=>L[n])}function V(t){return{top:0,right:0,bottom:0,left:0,...t}}function Rt(t){return typeof t!="number"?V(t):{top:t,right:t,bottom:t,left:t}}function Dt(t){const{x:n,y:e,width:o,height:s}=t;return{width:o,height:s,top:e,left:n,right:n+o,bottom:e+s,x:n,y:e}}function Ot(t){return t?.ownerDocument||document}const Y=p.createContext(void 0);function Ct(){return p.useContext(Y)?.direction??"ltr"}export{tt as A,l as B,wt as C,St as D,Et as E,P as F,C as G,M as H,bt as I,N as J,Rt as K,Dt as L,W as M,Tt as N,v as O,Pt as P,pt as Q,it as R,st as S,ct as T,G as U,D as V,m as W,J as X,Q as Y,nt as a,X as b,Z as c,et as d,ot as e,xt as f,H as g,at as h,ut as i,ft as j,mt as k,gt as l,rt as m,dt as n,Ot as o,ht as p,O as q,At as r,lt as s,q as t,Ct as u,$ as v,z as w,yt as x,x as y,I as z};
|