@manifest-editor/components 1.4.2 → 2.0.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/index.cjs +8 -2188
- package/dist/index.css +6 -1801
- package/dist/index.css.map +1 -0
- package/dist/index.d.cts +735 -363
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +740 -363
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -2204
- package/dist/index.js.map +1 -0
- package/dist/lib-7rNuVt0m.cjs +1 -0
- package/dist/lib-B2FE6TzQ.js +1 -0
- package/dist/lib-BqGWq3P8.css +291 -0
- package/dist/lib-D-SwZ1Sg.css +293 -0
- package/dist/lib-D-SwZ1Sg.css.map +1 -0
- package/dist/lib.cjs +1 -0
- package/dist/lib.css +293 -0
- package/dist/lib.css.map +1 -0
- package/dist/lib.js +1 -0
- package/package.json +33 -25
package/dist/index.cjs
CHANGED
|
@@ -1,2197 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
"use strict";
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __export = (target, all) => {
|
|
10
|
-
for (var name in all)
|
|
11
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from))
|
|
16
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
-
mod
|
|
28
|
-
));
|
|
29
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
-
|
|
31
|
-
// src/index.tsx
|
|
32
|
-
var src_exports = {};
|
|
33
|
-
__export(src_exports, {
|
|
34
|
-
AccessibilityButton: () => AccessibilityButton,
|
|
35
|
-
ActionButton: () => ActionButton,
|
|
36
|
-
AddIcon: () => AddIcon,
|
|
37
|
-
AddImageIcon: () => AddImageIcon,
|
|
38
|
-
AtlasBanner: () => AtlasBanner,
|
|
39
|
-
AudioIcon: () => AudioIcon,
|
|
40
|
-
BackIcon: () => BackIcon,
|
|
41
|
-
CanvasThumbnailGridItem: () => CanvasThumbnailGridItem,
|
|
42
|
-
Card3D: () => Card3D,
|
|
43
|
-
CollectionIcon: () => CollectionIcon,
|
|
44
|
-
CollectionListItem: () => CollectionListItem,
|
|
45
|
-
ConfirmSelectionButton: () => ConfirmSelectionButton,
|
|
46
|
-
ControlButton: () => ControlButton,
|
|
47
|
-
CreateCanvasIcon: () => CreateCanvasIcon,
|
|
48
|
-
CreatorGrid: () => CreatorGrid,
|
|
49
|
-
DefaultTooltipContent: () => DefaultTooltipContent,
|
|
50
|
-
DeleteForeverIcon: () => DeleteForeverIcon,
|
|
51
|
-
DownloadButton: () => DownloadButton,
|
|
52
|
-
DownloadIcon: () => DownloadIcon,
|
|
53
|
-
EmptyCanvasIcon: () => EmptyCanvasIcon,
|
|
54
|
-
EmptyState: () => EmptyState,
|
|
55
|
-
ErrorMessage: () => ErrorMessage,
|
|
56
|
-
Form: () => Form,
|
|
57
|
-
GridIcon: () => GridIcon,
|
|
58
|
-
HTMLEditor: () => HTMLEditor,
|
|
59
|
-
HTMLIcon: () => HTMLIcon,
|
|
60
|
-
HandleContainer: () => HandleContainer,
|
|
61
|
-
IIIFBrowserIcon: () => IIIFBrowserIcon,
|
|
62
|
-
IIIFLogo: () => IIIFLogo,
|
|
63
|
-
IIIFMediaPlayer: () => IIIFMediaPlayer,
|
|
64
|
-
IconButton: () => IconButton,
|
|
65
|
-
ImageListIcon: () => ImageListIcon,
|
|
66
|
-
InfoIcon: () => InfoIcon,
|
|
67
|
-
ItemWithHandle: () => ItemWithHandle,
|
|
68
|
-
LazyThumbnail: () => LazyThumbnail,
|
|
69
|
-
ListEditIcon: () => ListEditIcon,
|
|
70
|
-
ListingIcon: () => ListingIcon,
|
|
71
|
-
MDXEditor: () => MDXEditor,
|
|
72
|
-
ManifestEditorLogo: () => ManifestEditorLogo,
|
|
73
|
-
ManifestIcon: () => ManifestIcon,
|
|
74
|
-
ManifestListItem: () => ManifestListItem,
|
|
75
|
-
ManifestOverviewEmptyState: () => ManifestOverviewEmptyState,
|
|
76
|
-
MetadataContainer: () => MetadataContainer,
|
|
77
|
-
Modal: () => Modal,
|
|
78
|
-
ModalBackSlot: () => ModalBackSlot,
|
|
79
|
-
MoreMenu: () => MoreMenu2,
|
|
80
|
-
OpaqueControls: () => OpaqueControls,
|
|
81
|
-
PanelSideMenu: () => PanelSideMenu,
|
|
82
|
-
PreviewIcon: () => PreviewIcon,
|
|
83
|
-
RenderTextualContent: () => RenderTextualContent,
|
|
84
|
-
ScaledImageIcon: () => ScaledImageIcon,
|
|
85
|
-
Sidebar: () => Sidebar,
|
|
86
|
-
SidebarContent: () => SidebarContent,
|
|
87
|
-
SidebarHeader: () => SidebarHeader,
|
|
88
|
-
SidebarTabs: () => SidebarTabs,
|
|
89
|
-
Spinner: () => Spinner,
|
|
90
|
-
SvgControlBar: () => SvgControlBar,
|
|
91
|
-
Tab: () => Tab,
|
|
92
|
-
TabList: () => TabList,
|
|
93
|
-
TabPanel: () => TabPanel,
|
|
94
|
-
Tabs: () => Tabs,
|
|
95
|
-
TextIcon: () => TextIcon,
|
|
96
|
-
ThumbnailGridContainer: () => ThumbnailGridContainer,
|
|
97
|
-
Tooltip: () => Tooltip,
|
|
98
|
-
TooltipContent: () => TooltipContent,
|
|
99
|
-
TooltipTrigger: () => TooltipTrigger,
|
|
100
|
-
VideoIcon: () => VideoIcon,
|
|
101
|
-
YouTubeIcon: () => YouTubeIcon,
|
|
102
|
-
createDownload: () => createDownload,
|
|
103
|
-
useFastList: () => useFastList,
|
|
104
|
-
useTooltip: () => useTooltip,
|
|
105
|
-
useTooltipContext: () => useTooltipContext
|
|
106
|
-
});
|
|
107
|
-
module.exports = __toCommonJS(src_exports);
|
|
108
|
-
var import_dist = require("iiif-browser/dist/index.css");
|
|
109
|
-
|
|
110
|
-
// src/ActionButton.tsx
|
|
111
|
-
var import_react_aria_components = require("react-aria-components");
|
|
112
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
113
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
114
|
-
function ActionButton({
|
|
115
|
-
className: className2,
|
|
116
|
-
primary,
|
|
117
|
-
center,
|
|
118
|
-
large,
|
|
119
|
-
children,
|
|
120
|
-
...props
|
|
121
|
-
}) {
|
|
122
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
123
|
-
import_react_aria_components.Button,
|
|
124
|
-
{
|
|
125
|
-
className: (t) => (0, import_tailwind_merge.twMerge)(
|
|
126
|
-
//
|
|
127
|
-
"border-none flex gap-1 items-center bg-gray-100 text-me-primary-500 text-sm rounded hover:bg-gray-200",
|
|
128
|
-
primary ? "bg-me-primary-500 text-white hover:bg-me-primary-600" : "",
|
|
129
|
-
center ? "place-content-center" : "",
|
|
130
|
-
large ? "px-4 py-2" : "px-2 py-1",
|
|
131
|
-
t.isDisabled ? "opacity-70 cursor-not-allowed pointer-events-none" : "",
|
|
132
|
-
typeof className2 === "string" ? className2 : className2?.(t)
|
|
133
|
-
),
|
|
134
|
-
...props,
|
|
135
|
-
children
|
|
136
|
-
}
|
|
137
|
-
);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
// src/AccessibilityButton.tsx
|
|
141
|
-
var import_react_aria_components2 = require("react-aria-components");
|
|
142
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
143
|
-
function AccessibilityButton({ className: className2, children, ...props }) {
|
|
144
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_aria_components2.Button, { className: ["sr-only focus:not-sr-only p-2 bg-white text-black", className2].join(" "), ...props, children });
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// src/utils.ts
|
|
148
|
-
var import_clsx = require("clsx");
|
|
149
|
-
var import_tailwind_merge2 = require("tailwind-merge");
|
|
150
|
-
var cn = (...inputs) => {
|
|
151
|
-
return (0, import_tailwind_merge2.twMerge)((0, import_clsx.clsx)(inputs));
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
// src/Tooltip.tsx
|
|
155
|
-
var import_react = require("@floating-ui/react");
|
|
156
|
-
var React = __toESM(require("react"), 1);
|
|
157
|
-
var import_react_aria_components3 = require("react-aria-components");
|
|
158
|
-
var import_tailwind_merge3 = require("tailwind-merge");
|
|
159
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
160
|
-
function useTooltip({
|
|
161
|
-
initialOpen = false,
|
|
162
|
-
placement = "top",
|
|
163
|
-
open: controlledOpen,
|
|
164
|
-
onOpenChange: setControlledOpen
|
|
165
|
-
} = {}) {
|
|
166
|
-
const [uncontrolledOpen, setUncontrolledOpen] = React.useState(initialOpen);
|
|
167
|
-
const open = controlledOpen ?? uncontrolledOpen;
|
|
168
|
-
const setOpen = setControlledOpen ?? setUncontrolledOpen;
|
|
169
|
-
const data = (0, import_react.useFloating)({
|
|
170
|
-
placement,
|
|
171
|
-
open,
|
|
172
|
-
onOpenChange: setOpen,
|
|
173
|
-
whileElementsMounted: import_react.autoUpdate,
|
|
174
|
-
middleware: [
|
|
175
|
-
(0, import_react.offset)(5),
|
|
176
|
-
(0, import_react.flip)({
|
|
177
|
-
crossAxis: placement.includes("-"),
|
|
178
|
-
fallbackAxisSideDirection: "start",
|
|
179
|
-
padding: 5
|
|
180
|
-
}),
|
|
181
|
-
(0, import_react.shift)({ padding: 5 })
|
|
182
|
-
]
|
|
183
|
-
});
|
|
184
|
-
const context = data.context;
|
|
185
|
-
const hover = (0, import_react.useHover)(context, {
|
|
186
|
-
move: false,
|
|
187
|
-
enabled: controlledOpen == null
|
|
188
|
-
});
|
|
189
|
-
const focus = (0, import_react.useFocus)(context, {
|
|
190
|
-
enabled: controlledOpen == null
|
|
191
|
-
});
|
|
192
|
-
const dismiss = (0, import_react.useDismiss)(context);
|
|
193
|
-
const role = (0, import_react.useRole)(context, { role: "tooltip" });
|
|
194
|
-
const interactions = (0, import_react.useInteractions)([hover, focus, dismiss, role]);
|
|
195
|
-
return React.useMemo(
|
|
196
|
-
() => ({
|
|
197
|
-
open,
|
|
198
|
-
setOpen,
|
|
199
|
-
...interactions,
|
|
200
|
-
...data
|
|
201
|
-
}),
|
|
202
|
-
[open, setOpen, interactions, data]
|
|
203
|
-
);
|
|
204
|
-
}
|
|
205
|
-
var TooltipContext = React.createContext(null);
|
|
206
|
-
var useTooltipContext = () => {
|
|
207
|
-
const context = React.useContext(TooltipContext);
|
|
208
|
-
if (context == null) {
|
|
209
|
-
throw new Error("Tooltip components must be wrapped in <Tooltip />");
|
|
210
|
-
}
|
|
211
|
-
return context;
|
|
212
|
-
};
|
|
213
|
-
function Tooltip({ children, ...options }) {
|
|
214
|
-
const tooltip = useTooltip(options);
|
|
215
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TooltipContext.Provider, { value: tooltip, children });
|
|
216
|
-
}
|
|
217
|
-
var TooltipTrigger = React.forwardRef(function TooltipTrigger2({ children, asChild = false, ...props }, propRef) {
|
|
218
|
-
const context = useTooltipContext();
|
|
219
|
-
const childrenRef = children.ref;
|
|
220
|
-
const ref = (0, import_react.useMergeRefs)([context.refs.setReference, propRef, childrenRef]);
|
|
221
|
-
if (asChild && React.isValidElement(children)) {
|
|
222
|
-
return React.cloneElement(
|
|
223
|
-
children,
|
|
224
|
-
context.getReferenceProps({
|
|
225
|
-
ref,
|
|
226
|
-
...props,
|
|
227
|
-
...children.props,
|
|
228
|
-
"data-state": context.open ? "open" : "closed"
|
|
229
|
-
})
|
|
230
|
-
);
|
|
231
|
-
}
|
|
232
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
233
|
-
import_react_aria_components3.Button,
|
|
234
|
-
{
|
|
235
|
-
ref,
|
|
236
|
-
"data-state": context.open ? "open" : "closed",
|
|
237
|
-
...context.getReferenceProps(props),
|
|
238
|
-
children
|
|
239
|
-
}
|
|
240
|
-
);
|
|
241
|
-
});
|
|
242
|
-
var TooltipContent = React.forwardRef(function TooltipContent2({ style, root, ...props }, propRef) {
|
|
243
|
-
const context = useTooltipContext();
|
|
244
|
-
const ref = (0, import_react.useMergeRefs)([context.refs.setFloating, propRef]);
|
|
245
|
-
if (!context.open)
|
|
246
|
-
return null;
|
|
247
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react.FloatingPortal, { root, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
248
|
-
"div",
|
|
249
|
-
{
|
|
250
|
-
ref,
|
|
251
|
-
style: {
|
|
252
|
-
...context.floatingStyles,
|
|
253
|
-
...style
|
|
254
|
-
},
|
|
255
|
-
...context.getFloatingProps(props)
|
|
256
|
-
}
|
|
257
|
-
) });
|
|
258
|
-
});
|
|
259
|
-
function DefaultTooltipContent(props) {
|
|
260
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
261
|
-
TooltipContent,
|
|
262
|
-
{
|
|
263
|
-
root: props.root,
|
|
264
|
-
className: (0, import_tailwind_merge3.twMerge)("bg-me-gray-900 text-white text-sm px-3 py-2 rounded opacity-90 z-50", props.className),
|
|
265
|
-
children: props.children
|
|
266
|
-
}
|
|
267
|
-
);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
// src/Sidebar.tsx
|
|
271
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
272
|
-
function Sidebar({ children }) {
|
|
273
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "w-full h-full flex flex-col overflow-hidden", children });
|
|
274
|
-
}
|
|
275
|
-
function SidebarContent({
|
|
276
|
-
children,
|
|
277
|
-
className: className2,
|
|
278
|
-
padding
|
|
279
|
-
}) {
|
|
280
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: cn("flex-1 min-h-0 overflow-y-auto pb-64", className2, padding && "px-3 pt-3"), children });
|
|
281
|
-
}
|
|
282
|
-
function SidebarHeader(props) {
|
|
283
|
-
const { actions, title } = props;
|
|
284
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "bg-me-gray-100 h-12 flex items-center px-3 z-10 text-black border-b-me-gray-300 border-b flex-shrink-0", children: [
|
|
285
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex-1", children: title }),
|
|
286
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "ml-auto flex gap-2 items-center", children: actions?.map((action, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Tooltip, { placement: "bottom", children: [
|
|
287
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
288
|
-
"button",
|
|
289
|
-
{
|
|
290
|
-
className: cn(
|
|
291
|
-
//
|
|
292
|
-
`p-1 rounded hover:bg-me-gray-300`,
|
|
293
|
-
action.toggled && "bg-me-gray-300",
|
|
294
|
-
action.disabled && "opacity-50 cursor-not-allowed"
|
|
295
|
-
),
|
|
296
|
-
onClick: action.onClick,
|
|
297
|
-
title: action.title,
|
|
298
|
-
disabled: action.disabled,
|
|
299
|
-
children: action.icon
|
|
300
|
-
},
|
|
301
|
-
index
|
|
302
|
-
) }),
|
|
303
|
-
!action.disabled ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DefaultTooltipContent, { children: action.title }) : null
|
|
304
|
-
] }, index)) })
|
|
305
|
-
] });
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
// src/PanelSideMenu.tsx
|
|
309
|
-
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
310
|
-
|
|
311
|
-
// src/PanelSideMenuItem.tsx
|
|
312
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
313
|
-
function PanelSideMenuItem(props) {
|
|
314
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Tooltip, { placement: "right", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
315
|
-
"button",
|
|
316
|
-
{
|
|
317
|
-
className: cn(
|
|
318
|
-
"border-none aspect-square w-full flex justify-center items-center hover:bg-me-primary-100 hover:text-black [&>svg]:text-2xl cursor-default",
|
|
319
|
-
props.selected ? "bg-me-primary-500 hover:bg-me-primary-600 hover:text-white text-white" : "text-me-gray-700"
|
|
320
|
-
),
|
|
321
|
-
"aria-label": props.label,
|
|
322
|
-
onMouseDown: props.onClick,
|
|
323
|
-
children: [
|
|
324
|
-
props.icon,
|
|
325
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TooltipContent, { className: "bg-me-gray-900 text-white text-sm px-3 py-2 rounded opacity-90 z-50", children: props.label })
|
|
326
|
-
]
|
|
327
|
-
}
|
|
328
|
-
) }) });
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
// src/PanelSideMenu.tsx
|
|
332
|
-
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
333
|
-
function PanelSideMenu(props) {
|
|
334
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "bg-white border-me-gray-300 border-t border-r flex flex-col w-12 pb-2", "data-open": props.open, children: props.items.map((panel) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
335
|
-
panel.divide ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex-1 block w-2 min-h-1" }) : null,
|
|
336
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
337
|
-
PanelSideMenuItem,
|
|
338
|
-
{
|
|
339
|
-
label: panel.label,
|
|
340
|
-
selected: panel.id === props.current && props.open,
|
|
341
|
-
icon: panel.icon,
|
|
342
|
-
onClick: panel.onClick
|
|
343
|
-
},
|
|
344
|
-
panel.id
|
|
345
|
-
)
|
|
346
|
-
] }, panel.id)) });
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
// src/ThumbnailGridContainer.tsx
|
|
350
|
-
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
351
|
-
function ThumbnailGridContainer(props) {
|
|
352
|
-
if (props.wide) {
|
|
353
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "grid grid-md gap-4 p-4 overflow-y-auto", children: props.children });
|
|
354
|
-
}
|
|
355
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "grid grid-cols-2 gap-4 p-4", children: props.children });
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
// src/LazyThumbnail.tsx
|
|
359
|
-
var import_react2 = require("react");
|
|
360
|
-
var import_react_iiif_vault = require("react-iiif-vault");
|
|
361
|
-
var import_react_lazy_load_image_component = require("react-lazy-load-image-component");
|
|
362
|
-
var import_tailwind_merge4 = require("tailwind-merge");
|
|
363
|
-
|
|
364
|
-
// src/Spinner.tsx
|
|
365
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
366
|
-
function Spinner(props) {
|
|
367
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
368
|
-
"svg",
|
|
369
|
-
{
|
|
370
|
-
width: "1em",
|
|
371
|
-
height: "1em",
|
|
372
|
-
viewBox: "0 0 42 42",
|
|
373
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
374
|
-
stroke: "currentColor",
|
|
375
|
-
...props,
|
|
376
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("g", { transform: "translate(2 2)", strokeWidth: 5, fill: "none", fillRule: "evenodd", children: [
|
|
377
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { strokeOpacity: 0.5, cx: 18, cy: 18, r: 18 }),
|
|
378
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M36 18c0-9.94-8.06-18-18-18", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
379
|
-
"animateTransform",
|
|
380
|
-
{
|
|
381
|
-
attributeName: "transform",
|
|
382
|
-
type: "rotate",
|
|
383
|
-
from: "0 18 18",
|
|
384
|
-
to: "360 18 18",
|
|
385
|
-
dur: "1s",
|
|
386
|
-
repeatCount: "indefinite"
|
|
387
|
-
}
|
|
388
|
-
) })
|
|
389
|
-
] })
|
|
390
|
-
}
|
|
391
|
-
);
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
// src/icons/TextIcon.tsx
|
|
395
|
-
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
396
|
-
function TextIcon(props) {
|
|
397
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
398
|
-
"svg",
|
|
399
|
-
{
|
|
400
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
401
|
-
width: "1em",
|
|
402
|
-
height: "1em",
|
|
403
|
-
viewBox: "0 0 24 24",
|
|
404
|
-
...props,
|
|
405
|
-
children: [
|
|
406
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("title", { children: "Text" }),
|
|
407
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
408
|
-
"path",
|
|
409
|
-
{
|
|
410
|
-
fill: "currentColor",
|
|
411
|
-
d: "M3 21v-2h18v2zm0-4v-2h12v2zm0-4v-2h18v2zm0-4V7h12v2zm0-4V3h18v2z"
|
|
412
|
-
}
|
|
413
|
-
)
|
|
414
|
-
]
|
|
415
|
-
}
|
|
416
|
-
);
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
// src/LazyThumbnail.tsx
|
|
420
|
-
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
421
|
-
function LazyThumbnail({
|
|
422
|
-
cover,
|
|
423
|
-
fade = true
|
|
424
|
-
}) {
|
|
425
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_lazy_load_image_component.LazyLoadComponent, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(LazyThumbnailInner, { cover, fade }) });
|
|
426
|
-
}
|
|
427
|
-
var renderCache = /* @__PURE__ */ new Map();
|
|
428
|
-
function LazyThumbnailInner({
|
|
429
|
-
cover,
|
|
430
|
-
fade = true
|
|
431
|
-
}) {
|
|
432
|
-
const img = (0, import_react2.useRef)(null);
|
|
433
|
-
const canvas = (0, import_react_iiif_vault.useCanvas)();
|
|
434
|
-
const isCached = canvas ? !!renderCache.get(canvas?.id) : false;
|
|
435
|
-
const [isLoading, setIsLoading] = (0, import_react2.useState)(!isCached);
|
|
436
|
-
const thumbnail = (0, import_react_iiif_vault.useThumbnail)({ height: 256, width: 256 }, true);
|
|
437
|
-
let thumbnailId = thumbnail?.id;
|
|
438
|
-
if (canvas?.id && thumbnailId) {
|
|
439
|
-
renderCache.set(canvas.id, thumbnailId);
|
|
440
|
-
} else if (canvas?.id && renderCache.get(canvas.id)) {
|
|
441
|
-
thumbnailId = renderCache.get(canvas?.id);
|
|
442
|
-
}
|
|
443
|
-
(0, import_react2.useEffect)(() => {
|
|
444
|
-
if (thumbnailId && !isCached) {
|
|
445
|
-
setIsLoading(true);
|
|
446
|
-
}
|
|
447
|
-
}, [thumbnailId, isCached]);
|
|
448
|
-
const checkImage = (0, import_react2.useCallback)(
|
|
449
|
-
(node) => {
|
|
450
|
-
if (node && !isCached) {
|
|
451
|
-
if (node.complete || node.naturalWidth > 0) {
|
|
452
|
-
setIsLoading(false);
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
},
|
|
456
|
-
[isCached]
|
|
457
|
-
);
|
|
458
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: `w-full h-full relative`, children: [
|
|
459
|
-
thumbnail?.id ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
460
|
-
"img",
|
|
461
|
-
{
|
|
462
|
-
onLoad: () => setIsLoading(false),
|
|
463
|
-
ref: checkImage,
|
|
464
|
-
src: thumbnail?.id,
|
|
465
|
-
alt: "",
|
|
466
|
-
className: `w-full h-full ${cover ? "object-cover" : "object-contain"} ${!isLoading ? isCached ? "" : "animate-fadeIn" : "opacity-0"}`
|
|
467
|
-
}
|
|
468
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ThumbnailFallback, {}),
|
|
469
|
-
!thumbnail?.id || isLoading ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
470
|
-
"div",
|
|
471
|
-
{
|
|
472
|
-
className: (0, import_tailwind_merge4.twMerge)(
|
|
473
|
-
"absolute inset-0 flex items-center justify-center bg-me-gray-100 text-2xl z-10",
|
|
474
|
-
fade && "animate-fadeIn"
|
|
475
|
-
),
|
|
476
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Spinner, {})
|
|
477
|
-
}
|
|
478
|
-
) : null
|
|
479
|
-
] });
|
|
480
|
-
}
|
|
481
|
-
function ThumbnailFallback() {
|
|
482
|
-
const [strategy] = (0, import_react_iiif_vault.useRenderingStrategy)();
|
|
483
|
-
if (strategy.type === "textual-content") {
|
|
484
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "text-black/30 flex items-center justify-center h-full bg-me-gray-100 animate-fadeInDelayed absolute inset-0 z-20", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TextIcon, { className: "w-16 h-16" }) });
|
|
485
|
-
}
|
|
486
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "text-black/30 flex items-center justify-center h-full bg-me-gray-100 animate-fadeInDelayed absolute inset-0 z-20", children: "No thumbnail" });
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
// src/CanvasThumbnailGridItem.tsx
|
|
490
|
-
var import_react_iiif_vault3 = require("react-iiif-vault");
|
|
491
|
-
|
|
492
|
-
// src/CanvasLabel.tsx
|
|
493
|
-
var import_react_iiif_vault2 = require("react-iiif-vault");
|
|
494
|
-
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
495
|
-
function CanvasLabel(props) {
|
|
496
|
-
const canvas = (0, import_react_iiif_vault2.useCanvas)();
|
|
497
|
-
if (!canvas)
|
|
498
|
-
return null;
|
|
499
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_iiif_vault2.LocaleString, { className: props.className, as: props.as, children: canvas.label });
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
// src/Card3D.tsx
|
|
503
|
-
var import_react3 = require("react");
|
|
504
|
-
var import_tailwind_merge5 = require("tailwind-merge");
|
|
505
|
-
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
506
|
-
function Card3D({
|
|
507
|
-
className: className2,
|
|
508
|
-
shouldTranslate,
|
|
509
|
-
children,
|
|
510
|
-
...props
|
|
511
|
-
}) {
|
|
512
|
-
const outer = (0, import_react3.useRef)(null);
|
|
513
|
-
const inner = (0, import_react3.useRef)(null);
|
|
514
|
-
(0, import_react3.useLayoutEffect)(() => {
|
|
515
|
-
if (!outer.current || !inner.current)
|
|
516
|
-
return;
|
|
517
|
-
let bounds;
|
|
518
|
-
function rotateToMouse(e) {
|
|
519
|
-
const mouseX = e.clientX;
|
|
520
|
-
const mouseY = e.clientY;
|
|
521
|
-
const leftX = mouseX - bounds.x;
|
|
522
|
-
const topY = mouseY - bounds.y;
|
|
523
|
-
const center = {
|
|
524
|
-
x: leftX - bounds.width / 2,
|
|
525
|
-
y: topY - bounds.height / 2
|
|
526
|
-
};
|
|
527
|
-
const distance = Math.sqrt(center.x ** 2 + center.y ** 2);
|
|
528
|
-
if (shouldTranslate) {
|
|
529
|
-
outer.current.style.transform = `
|
|
1
|
+
"use client";var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));require(`./lib-7rNuVt0m.cjs`);let c=require(`react-aria-components`),l=require(`react/jsx-runtime`),u=require(`tailwind-merge`),d=require(`react-aria`),f=require(`react-iiif-vault`),p=require(`react`);p=s(p);let m=require(`@iiif/helpers`),h=require(`react-lazy-load-image-component`),ee=require(`clsx`),te=require(`@iiif/helpers/i18n`),g=require(`@floating-ui/react`),_=require(`showdown`),v=require(`tiny-use-debounce`),y=require(`turndown`);y=s(y),require(`@mdxeditor/editor/style.css`);let b=require(`@mdxeditor/editor`),x=require(`mitt`);x=s(x),require(`@vidstack/react/player/styles/base.css`),require(`@vidstack/react/player/styles/default/theme.css`),require(`@vidstack/react/player/styles/default/captions.css`),require(`@vidstack/react/player/styles/default/layouts/video.css`);let S=require(`@vidstack/react`),C=require(`@vidstack/react/player/layouts/default`),w=require(`@headlessui/react`),T=require(`react-dom`),E=require(`react-joyride`);E=s(E);let ne=require(`@react-aria/collections`);function re({className:e,children:t,...n}){return(0,l.jsx)(c.Button,{className:[`sr-only focus:not-sr-only p-2 bg-white text-black`,e].join(` `),...n,children:t})}function D({className:e,primary:t,center:n,large:r,onDark:i,children:a,...o}){return(0,l.jsx)(c.Button,{className:a=>(0,u.twMerge)(`border-none flex gap-1 items-center bg-me-50 flex-nowrap whitespace-nowrap text-me-700 text-sm rounded hover:bg-me-100`,t&&!i?`bg-me-500 text-white hover:bg-me-600`:``,t&&i?`bg-me-700 text-white hover:bg-me-800`:``,n?`place-content-center`:``,r?`px-4 py-2`:`px-2 py-1`,a.isDisabled?`opacity-70 cursor-not-allowed pointer-events-none`:``,typeof e==`string`?e:e?.(a)),...o,children:a})}function ie({children:e,controlsId:t}){return(0,l.jsxs)(`div`,{className:`bg-me-gray-100 border-b text-black p-1 flex gap-4 items-center h-12`,children:[(0,l.jsx)(`div`,{className:`px-4`,children:e}),(0,l.jsx)(`div`,{id:t||`atlas-controls`,className:`flex gap-2`})]})}function ae(e){let t=(0,f.useCanvas)();return t?(0,l.jsx)(f.LocaleString,{className:e.className,as:e.as,children:t.label}):null}function O({className:e,shouldTranslate:t,children:n,...r}){let i=(0,p.useRef)(null),a=(0,p.useRef)(null);return(0,p.useLayoutEffect)(()=>{if(!i.current||!a.current)return;let e;function n(n){let r=n.clientX,o=n.clientY,s=r-e.x,c=o-e.y,l={x:s-e.width/2,y:c-e.height/2},u=Math.sqrt(l.x**2+l.y**2);t&&(i.current.style.transform=`
|
|
530
2
|
scale3d(1.07, 1.07, 1.07)
|
|
531
3
|
rotate3d(
|
|
532
|
-
${
|
|
533
|
-
${-
|
|
4
|
+
${l.y/100},
|
|
5
|
+
${-l.x/100},
|
|
534
6
|
0,
|
|
535
|
-
${Math.log(
|
|
7
|
+
${Math.log(u)*2}deg
|
|
536
8
|
)
|
|
537
|
-
|
|
538
|
-
}
|
|
539
|
-
inner.current.style.backgroundImage = `
|
|
9
|
+
`),a.current.style.backgroundImage=`
|
|
540
10
|
radial-gradient(
|
|
541
11
|
circle at
|
|
542
|
-
${
|
|
543
|
-
${
|
|
12
|
+
${l.x*2+e.width/2}px
|
|
13
|
+
${l.y*2+e.height/2}px,
|
|
544
14
|
#ffffff66,
|
|
545
15
|
#ffffff00
|
|
546
16
|
)
|
|
547
|
-
`;
|
|
548
|
-
}
|
|
549
|
-
function reset() {
|
|
550
|
-
outer.current.style.transform = "";
|
|
551
|
-
inner.current.style.backgroundImage = "";
|
|
552
|
-
}
|
|
553
|
-
let isActive = false;
|
|
554
|
-
const mouseenter = () => {
|
|
555
|
-
bounds = outer.current.getBoundingClientRect();
|
|
556
|
-
isActive = true;
|
|
557
|
-
};
|
|
558
|
-
const mouseleave = () => {
|
|
559
|
-
isActive = false;
|
|
560
|
-
reset();
|
|
561
|
-
};
|
|
562
|
-
const mousemove = (e) => {
|
|
563
|
-
if (!isActive)
|
|
564
|
-
return;
|
|
565
|
-
rotateToMouse(e);
|
|
566
|
-
};
|
|
567
|
-
outer.current.addEventListener("mouseenter", mouseenter);
|
|
568
|
-
outer.current.addEventListener("mouseleave", mouseleave);
|
|
569
|
-
outer.current.addEventListener("mousemove", mousemove);
|
|
570
|
-
return () => {
|
|
571
|
-
outer.current.removeEventListener("mouseenter", mouseenter);
|
|
572
|
-
outer.current.removeEventListener("mouseleave", mouseleave);
|
|
573
|
-
outer.current.removeEventListener("mousemove", mousemove);
|
|
574
|
-
};
|
|
575
|
-
}, []);
|
|
576
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
577
|
-
"div",
|
|
578
|
-
{
|
|
579
|
-
ref: outer,
|
|
580
|
-
className: (0, import_tailwind_merge5.twMerge)(
|
|
581
|
-
//
|
|
582
|
-
"relative transition-all hover:duration-50",
|
|
583
|
-
shouldTranslate && "hover:shadow-xl",
|
|
584
|
-
className2
|
|
585
|
-
),
|
|
586
|
-
...props,
|
|
587
|
-
children: [
|
|
588
|
-
children,
|
|
589
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
590
|
-
"div",
|
|
591
|
-
{
|
|
592
|
-
className: "pointer-events-none absolute inset-0 transition-all",
|
|
593
|
-
style: {
|
|
594
|
-
backgroundImage: "radial-gradient(circle at 50% -20%, #ffffff00, #ffffff00)"
|
|
595
|
-
},
|
|
596
|
-
ref: inner
|
|
597
|
-
}
|
|
598
|
-
)
|
|
599
|
-
]
|
|
600
|
-
}
|
|
601
|
-
);
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
// src/CanvasThumbnailGridItem.tsx
|
|
605
|
-
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
606
|
-
function CanvasThumbnailGridItem(props) {
|
|
607
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_iiif_vault3.CanvasContext, { canvas: props.id, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { onMouseDown: props.onClick, className: "flex flex-col", "data-canvas-selected": props.selected, children: [
|
|
608
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "bg-me-gray-100 w-full aspect-square flex-1 overflow-hidden rounded", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
609
|
-
Card3D,
|
|
610
|
-
{
|
|
611
|
-
"data-canvas-selected": props.active,
|
|
612
|
-
"aria-selected": props.active,
|
|
613
|
-
className: cn(
|
|
614
|
-
"border-2 border-transparent p-1 w-full h-full rounded",
|
|
615
|
-
props.selected && "border-me-primary-500"
|
|
616
|
-
),
|
|
617
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(LazyThumbnail, {})
|
|
618
|
-
}
|
|
619
|
-
) }),
|
|
620
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CanvasLabel, { className: "text-sm text-center truncate mt-1", as: "div" })
|
|
621
|
-
] }) });
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
// src/Modal.tsx
|
|
625
|
-
var import_react4 = require("@headlessui/react");
|
|
626
|
-
var import_react_dom = require("react-dom");
|
|
627
|
-
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
628
|
-
function ModalBackSlot({ children }) {
|
|
629
|
-
const element = document.getElementById("modal-back-slot");
|
|
630
|
-
if (!element)
|
|
631
|
-
return null;
|
|
632
|
-
return (0, import_react_dom.createPortal)(children, element);
|
|
633
|
-
}
|
|
634
|
-
function Modal({ id, title, open = true, onClose, actions, children }) {
|
|
635
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react4.Dialog, { open, onClose, id, className: "relative z-[500]", children: [
|
|
636
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: `fixed inset-0 bg-black/30 animate-fadeIn z-[501]`, "aria-hidden": "true" }),
|
|
637
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "fixed inset-0 flex w-screen items-center justify-center p-4 z-[502]", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "relative p-4 w-full max-w-4xl max-h-full", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react4.DialogPanel, { className: "relative bg-white rounded-lg overflow-hidden shadow-2xl max-h-[80vh] flex flex-col", children: [
|
|
638
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center justify-between gap-3 p-4 rounded-t-lg sticky top-0 bg-white", children: [
|
|
639
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { id: "modal-back-slot" }),
|
|
640
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react4.DialogTitle, { className: "text-xl font-semibold text-gray-900 ", children: title }),
|
|
641
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react4.CloseButton, { className: "text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center", children: [
|
|
642
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
643
|
-
"svg",
|
|
644
|
-
{
|
|
645
|
-
className: "w-3 h-3",
|
|
646
|
-
"aria-hidden": "true",
|
|
647
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
648
|
-
fill: "none",
|
|
649
|
-
viewBox: "0 0 14 14",
|
|
650
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
651
|
-
"path",
|
|
652
|
-
{
|
|
653
|
-
stroke: "currentColor",
|
|
654
|
-
strokeLinecap: "round",
|
|
655
|
-
strokeLinejoin: "round",
|
|
656
|
-
strokeWidth: "2",
|
|
657
|
-
d: "m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"
|
|
658
|
-
}
|
|
659
|
-
)
|
|
660
|
-
}
|
|
661
|
-
),
|
|
662
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "sr-only", children: "Close" })
|
|
663
|
-
] })
|
|
664
|
-
] }),
|
|
665
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex-1 min-h-0 overflow-y-auto flex flex-col", children }),
|
|
666
|
-
actions ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex items-center p-4 border-t border-gray-200 rounded-b justify-end", children: actions }) : null
|
|
667
|
-
] }) }) })
|
|
668
|
-
] }) });
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
// src/ControlButton.tsx
|
|
672
|
-
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
673
|
-
function ControlButton({
|
|
674
|
-
children,
|
|
675
|
-
className: className2,
|
|
676
|
-
...props
|
|
677
|
-
}) {
|
|
678
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
679
|
-
"button",
|
|
680
|
-
{
|
|
681
|
-
className: cn(
|
|
682
|
-
"bg-white border border-me-primary-500 text-xs py-1 px-2 rounded text-me-primary-600 hover:bg-me-primary-50",
|
|
683
|
-
className2
|
|
684
|
-
),
|
|
685
|
-
...props,
|
|
686
|
-
children
|
|
687
|
-
}
|
|
688
|
-
);
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
// src/OpaqueControls.tsx
|
|
692
|
-
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
693
|
-
function OpaqueControls(props) {
|
|
694
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
695
|
-
"div",
|
|
696
|
-
{
|
|
697
|
-
className: cn("flex w-full p-0.5 opacity-0 transition-opacity duration-300 gap-2", props.active && "opacity-1"),
|
|
698
|
-
children: props.children
|
|
699
|
-
}
|
|
700
|
-
);
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
// src/Tabs.tsx
|
|
704
|
-
var import_react_aria_components4 = require("react-aria-components");
|
|
705
|
-
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
706
|
-
function Tabs({ className: className2, children, ...props }) {
|
|
707
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
708
|
-
import_react_aria_components4.Tabs,
|
|
709
|
-
{
|
|
710
|
-
className: (state) => {
|
|
711
|
-
const cs = typeof className2 === "function" ? className2(state) : className2;
|
|
712
|
-
return cn("", cs);
|
|
713
|
-
},
|
|
714
|
-
...props,
|
|
715
|
-
children
|
|
716
|
-
}
|
|
717
|
-
);
|
|
718
|
-
}
|
|
719
|
-
function TabList({
|
|
720
|
-
className: className2,
|
|
721
|
-
children,
|
|
722
|
-
...props
|
|
723
|
-
}) {
|
|
724
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
725
|
-
import_react_aria_components4.TabList,
|
|
726
|
-
{
|
|
727
|
-
className: (state) => {
|
|
728
|
-
const cs = typeof className2 === "function" ? className2(state) : className2;
|
|
729
|
-
return cn("flex gap-4", cs);
|
|
730
|
-
},
|
|
731
|
-
...props,
|
|
732
|
-
children
|
|
733
|
-
}
|
|
734
|
-
);
|
|
735
|
-
}
|
|
736
|
-
function Tab({ className: className2, children, ...props }) {
|
|
737
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
738
|
-
import_react_aria_components4.Tab,
|
|
739
|
-
{
|
|
740
|
-
className: (state) => {
|
|
741
|
-
const cs = typeof className2 === "function" ? className2(state) : className2;
|
|
742
|
-
return cn(
|
|
743
|
-
"cursor-default outline-none group py-1 font-semibold px-2 border-b-2 text-me-gray-700",
|
|
744
|
-
state.isSelected && "border-b-me-primary-600 text-black",
|
|
745
|
-
state.isFocusVisible && "focus-visible:bg-me-primary-100",
|
|
746
|
-
cs
|
|
747
|
-
);
|
|
748
|
-
},
|
|
749
|
-
...props,
|
|
750
|
-
children
|
|
751
|
-
}
|
|
752
|
-
);
|
|
753
|
-
}
|
|
754
|
-
function TabPanel({ className: className2, children, ...props }) {
|
|
755
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
756
|
-
import_react_aria_components4.TabPanel,
|
|
757
|
-
{
|
|
758
|
-
className: (state) => {
|
|
759
|
-
const cs = typeof className2 === "function" ? className2(state) : className2;
|
|
760
|
-
return cn("", cs);
|
|
761
|
-
},
|
|
762
|
-
...props,
|
|
763
|
-
children
|
|
764
|
-
}
|
|
765
|
-
);
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
// src/CreatorGrid.tsx
|
|
769
|
-
var import_react_aria_components5 = require("react-aria-components");
|
|
770
|
-
var import_tailwind_merge6 = require("tailwind-merge");
|
|
771
|
-
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
772
|
-
function CreatorGrid(props) {
|
|
773
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
774
|
-
import_react_aria_components5.ListBox,
|
|
775
|
-
{
|
|
776
|
-
orientation: "horizontal",
|
|
777
|
-
"aria-label": props.label,
|
|
778
|
-
selectionMode: "single",
|
|
779
|
-
items: props.items,
|
|
780
|
-
className: "grid grid-sm gap-4 p-4 mb-8",
|
|
781
|
-
children: (item) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CreatorGridItem, { ...item })
|
|
782
|
-
}
|
|
783
|
-
);
|
|
784
|
-
}
|
|
785
|
-
function CreatorGridItem(props) {
|
|
786
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
787
|
-
import_react_aria_components5.ListBoxItem,
|
|
788
|
-
{
|
|
789
|
-
id: props.id,
|
|
790
|
-
onAction: props.onClick,
|
|
791
|
-
className: ($s) => (0, import_tailwind_merge6.twMerge)(
|
|
792
|
-
"bg-white p-2 border-me-gray-300 rounded-md border hover:border-me-primary-500",
|
|
793
|
-
$s.isFocused && "border-me-primary-500 outline-me-primary-500 outline-2"
|
|
794
|
-
),
|
|
795
|
-
children: [
|
|
796
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "rounded bg-me-gray-300 mb-2 flex items-center justify-center py-1 aspect-square", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "text-center [&>svg]:w-16 [&>svg]:h-16", children: props.icon }) }),
|
|
797
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "text-center font-semibold text-sm", children: props.title }),
|
|
798
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "text-sm text-center text-black/50", children: props.description })
|
|
799
|
-
]
|
|
800
|
-
}
|
|
801
|
-
);
|
|
802
|
-
}
|
|
803
|
-
|
|
804
|
-
// src/icons/DownloadIcon.tsx
|
|
805
|
-
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
806
|
-
var DownloadIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "#5f6368", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
807
|
-
"path",
|
|
808
|
-
{
|
|
809
|
-
d: "M480-320 280-520l56-58 104 104v-326h80v326l104-104 56 58-200 200ZM240-160q-33 0-56.5-23.5T160-240v-120h80v120h480v-120h80v120q0 33-23.5 56.5T720-160H240Z",
|
|
810
|
-
fill: "currentColor"
|
|
811
|
-
}
|
|
812
|
-
) });
|
|
813
|
-
|
|
814
|
-
// src/DownloadButton.tsx
|
|
815
|
-
var import_react_aria = require("react-aria");
|
|
816
|
-
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
817
|
-
function DownloadButton({ label, id: _id, getData, fileName, fileType }) {
|
|
818
|
-
const id = (0, import_react_aria.useId)(_id);
|
|
819
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Tooltip, { placement: "bottom", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
820
|
-
TooltipTrigger,
|
|
821
|
-
{
|
|
822
|
-
className: "bg-me-gray-100 hover:bg-me-primary-500 hover:text-white p-1 rounded-md text-me-primary-500 text-2xl",
|
|
823
|
-
"aria-label": label,
|
|
824
|
-
id,
|
|
825
|
-
onPress: () => createDownload(getData(), fileName, fileType),
|
|
826
|
-
children: [
|
|
827
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DownloadIcon, { "aria-labelledby": _id }),
|
|
828
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DefaultTooltipContent, { children: label })
|
|
829
|
-
]
|
|
830
|
-
}
|
|
831
|
-
) });
|
|
832
|
-
}
|
|
833
|
-
function createDownload(data, fileName, fileType = "text/json") {
|
|
834
|
-
const blob = data instanceof Blob ? data : new Blob([data], { type: fileType });
|
|
835
|
-
const a = document.createElement("a");
|
|
836
|
-
a.download = fileName;
|
|
837
|
-
a.href = window.URL.createObjectURL(blob);
|
|
838
|
-
const clickEvt = new MouseEvent("click", {
|
|
839
|
-
view: window,
|
|
840
|
-
bubbles: true,
|
|
841
|
-
cancelable: true
|
|
842
|
-
});
|
|
843
|
-
a.dispatchEvent(clickEvt);
|
|
844
|
-
a.remove();
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
// src/AtlasBanner.tsx
|
|
848
|
-
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
849
|
-
function AtlasBanner({ children, controlsId }) {
|
|
850
|
-
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "bg-me-gray-100 border-b text-black p-1 flex gap-4 items-center h-12", children: [
|
|
851
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "px-4", children }),
|
|
852
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { id: controlsId || "atlas-controls", className: "flex gap-2" })
|
|
853
|
-
] });
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
// src/SvgControlBar.tsx
|
|
857
|
-
var import_react_iiif_vault4 = require("react-iiif-vault");
|
|
858
|
-
|
|
859
|
-
// src/icons/DrawIcon.tsx
|
|
860
|
-
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
861
|
-
var DrawIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
862
|
-
"svg",
|
|
863
|
-
{
|
|
864
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
865
|
-
width: "1em",
|
|
866
|
-
height: "1em",
|
|
867
|
-
viewBox: "0 -960 960 960",
|
|
868
|
-
"aria-labelledby": titleId,
|
|
869
|
-
...props,
|
|
870
|
-
children: [
|
|
871
|
-
title ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("title", { id: titleId, children: title }) : null,
|
|
872
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
873
|
-
"path",
|
|
874
|
-
{
|
|
875
|
-
fill: "currentColor",
|
|
876
|
-
d: "M160-120v-170l527-526q12-12 27-18t30-6q16 0 30.5 6t25.5 18l56 56q12 11 18 25.5t6 30.5q0 15-6 30t-18 27L330-120H160Zm80-80h56l393-392-28-29-29-28-392 393v56Zm560-503-57-57 57 57Zm-139 82-29-28 57 57-28-29ZM560-120q74 0 137-37t63-103q0-36-19-62t-51-45l-59 59q23 10 36 22t13 26q0 23-36.5 41.5T560-200q-17 0-28.5 11.5T520-160q0 17 11.5 28.5T560-120ZM183-426l60-60q-20-8-31.5-16.5T200-520q0-12 18-24t76-37q88-38 117-69t29-70q0-55-44-87.5T280-840q-45 0-80.5 16T145-785q-11 13-9 29t15 26q13 11 29 9t27-13q14-14 31-20t42-6q41 0 60.5 12t19.5 28q0 14-17.5 25.5T262-654q-80 35-111 63.5T120-520q0 32 17 54.5t46 39.5Z"
|
|
877
|
-
}
|
|
878
|
-
)
|
|
879
|
-
]
|
|
880
|
-
}
|
|
881
|
-
);
|
|
882
|
-
|
|
883
|
-
// src/icons/PolygonIcon.tsx
|
|
884
|
-
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
885
|
-
var PolygonIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
886
|
-
"svg",
|
|
887
|
-
{
|
|
888
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
889
|
-
width: "1em",
|
|
890
|
-
height: "1em",
|
|
891
|
-
viewBox: "0 -960 960 960",
|
|
892
|
-
"aria-labelledby": titleId,
|
|
893
|
-
...props,
|
|
894
|
-
children: [
|
|
895
|
-
title ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("title", { id: titleId, children: title }) : null,
|
|
896
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
897
|
-
"path",
|
|
898
|
-
{
|
|
899
|
-
fill: "currentColor",
|
|
900
|
-
d: "M600-80v-100L320-320H120v-240h172l108-124v-196h240v240H468L360-516v126l240 120v-50h240v240H600ZM480-720h80v-80h-80v80ZM200-400h80v-80h-80v80Zm480 240h80v-80h-80v80ZM520-760ZM240-440Zm480 240Z"
|
|
901
|
-
}
|
|
902
|
-
)
|
|
903
|
-
]
|
|
904
|
-
}
|
|
905
|
-
);
|
|
906
|
-
|
|
907
|
-
// src/icons/LineIcon.tsx
|
|
908
|
-
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
909
|
-
function LineIcon({ title, titleId, ...props }) {
|
|
910
|
-
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", "aria-labelledby": titleId, ...props, children: [
|
|
911
|
-
title ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("title", { id: titleId, children: title }) : null,
|
|
912
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("g", { fill: "none", fillRule: "evenodd", children: [
|
|
913
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("circle", { cx: 4.5, cy: 4.5, r: 2.5, fill: "currentColor" }),
|
|
914
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("circle", { cx: 15.5, cy: 15.5, r: 2.5, fill: "currentColor" }),
|
|
915
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("path", { stroke: "currentColor", strokeLinecap: "square", strokeWidth: 2, d: "m13.5 13.5-9-9" })
|
|
916
|
-
] })
|
|
917
|
-
] });
|
|
918
|
-
}
|
|
919
|
-
|
|
920
|
-
// src/icons/LineBoxIcon.tsx
|
|
921
|
-
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
922
|
-
function LineBoxIcon({ title, titleId, ...props }) {
|
|
923
|
-
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", "aria-labelledby": titleId, ...props, children: [
|
|
924
|
-
title ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("title", { id: titleId, children: title }) : null,
|
|
925
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("g", { fill: "none", fillRule: "evenodd", children: [
|
|
926
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M0 0h20v20H0z" }),
|
|
927
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { stroke: "currentColor", strokeLinecap: "square", strokeWidth: 2, d: "m8.5 11.5 6-6M16 4v3m0-3h-3m0 14L2 7" }),
|
|
928
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { stroke: "currentColor", strokeOpacity: 0.407, strokeWidth: 2, d: "m2 7 5-5 11 11-5 5z" })
|
|
929
|
-
] })
|
|
930
|
-
] });
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
// src/icons/ShapesIcon.tsx
|
|
934
|
-
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
935
|
-
var ShapesIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
936
|
-
"svg",
|
|
937
|
-
{
|
|
938
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
939
|
-
width: "1em",
|
|
940
|
-
height: "1em",
|
|
941
|
-
viewBox: "0 -960 960 960",
|
|
942
|
-
"aria-labelledby": titleId,
|
|
943
|
-
...props,
|
|
944
|
-
children: [
|
|
945
|
-
title ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("title", { id: titleId, children: title }) : null,
|
|
946
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
947
|
-
"path",
|
|
948
|
-
{
|
|
949
|
-
fill: "currentColor",
|
|
950
|
-
d: "M600-360ZM320-242q10 1 19.5 1.5t20.5.5q11 0 20.5-.5T400-242v82h400v-400h-82q1-10 1.5-19.5t.5-20.5q0-11-.5-20.5T718-640h82q33 0 56.5 23.5T880-560v400q0 33-23.5 56.5T800-80H400q-33 0-56.5-23.5T320-160v-82Zm40-78q-117 0-198.5-81.5T80-600q0-117 81.5-198.5T360-880q117 0 198.5 81.5T640-600q0 117-81.5 198.5T360-320Zm0-80q83 0 141.5-58.5T560-600q0-83-58.5-141.5T360-800q-83 0-141.5 58.5T160-600q0 83 58.5 141.5T360-400Zm0-200Z"
|
|
951
|
-
}
|
|
952
|
-
)
|
|
953
|
-
]
|
|
954
|
-
}
|
|
955
|
-
);
|
|
956
|
-
|
|
957
|
-
// src/icons/SquareIcon.tsx
|
|
958
|
-
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
959
|
-
var SquareIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
960
|
-
"svg",
|
|
961
|
-
{
|
|
962
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
963
|
-
width: "1em",
|
|
964
|
-
height: "1em",
|
|
965
|
-
viewBox: "0 -960 960 960",
|
|
966
|
-
"aria-labelledby": titleId,
|
|
967
|
-
...props,
|
|
968
|
-
children: [
|
|
969
|
-
title ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("title", { id: titleId, children: title }) : null,
|
|
970
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
971
|
-
"path",
|
|
972
|
-
{
|
|
973
|
-
fill: "currentColor",
|
|
974
|
-
d: "M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm0 0v-560 560Z"
|
|
975
|
-
}
|
|
976
|
-
)
|
|
977
|
-
]
|
|
978
|
-
}
|
|
979
|
-
);
|
|
980
|
-
|
|
981
|
-
// src/icons/TriangleIcon.tsx
|
|
982
|
-
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
983
|
-
var TriangleIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
984
|
-
"svg",
|
|
985
|
-
{
|
|
986
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
987
|
-
width: "1em",
|
|
988
|
-
height: "1em",
|
|
989
|
-
viewBox: "0 -960 960 960",
|
|
990
|
-
"aria-labelledby": titleId,
|
|
991
|
-
...props,
|
|
992
|
-
children: [
|
|
993
|
-
title ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("title", { id: titleId, children: title }) : null,
|
|
994
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("path", { d: "m80-160 400-640 400 640H80Zm144-80h512L480-650 224-240Zm256-205Z", fill: "currentColor" })
|
|
995
|
-
]
|
|
996
|
-
}
|
|
997
|
-
);
|
|
998
|
-
|
|
999
|
-
// src/icons/HexagonIcon.tsx
|
|
1000
|
-
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1001
|
-
var HexagonIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
1002
|
-
"svg",
|
|
1003
|
-
{
|
|
1004
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1005
|
-
width: "1em",
|
|
1006
|
-
height: "1em",
|
|
1007
|
-
viewBox: "0 -960 960 960",
|
|
1008
|
-
"aria-labelledby": titleId,
|
|
1009
|
-
...props,
|
|
1010
|
-
children: [
|
|
1011
|
-
title ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("title", { id: titleId, children: title }) : null,
|
|
1012
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1013
|
-
"path",
|
|
1014
|
-
{
|
|
1015
|
-
fill: "currentColor",
|
|
1016
|
-
d: "M272-120 64-480l208-360h416l208 360-208 360H272Zm46-80h324l161-280-161-280H318L156-480l162 280Zm162-280Z"
|
|
1017
|
-
}
|
|
1018
|
-
)
|
|
1019
|
-
]
|
|
1020
|
-
}
|
|
1021
|
-
);
|
|
1022
|
-
|
|
1023
|
-
// src/icons/DeleteForeverIcon.tsx
|
|
1024
|
-
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1025
|
-
function DeleteForeverIcon(props) {
|
|
1026
|
-
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("svg", { height: "1em", width: "1em", viewBox: "0 0 24 24", ...props, children: [
|
|
1027
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
1028
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
1029
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1030
|
-
"path",
|
|
1031
|
-
{
|
|
1032
|
-
d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z",
|
|
1033
|
-
fill: "currentColor"
|
|
1034
|
-
}
|
|
1035
|
-
)
|
|
1036
|
-
] });
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
// src/SvgControlBar.tsx
|
|
1040
|
-
var import_react5 = require("react");
|
|
1041
|
-
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1042
|
-
var className = 'bg-me-gray-100 border hover:bg-me-gray-300 rounded p-1 text-2xl text-me-primary-500 data-[active="true"]:border-me-primary-600';
|
|
1043
|
-
var icons = {
|
|
1044
|
-
DrawIcon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DrawIcon, {}),
|
|
1045
|
-
PolygonIcon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(PolygonIcon, {}),
|
|
1046
|
-
LineIcon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(LineIcon, {}),
|
|
1047
|
-
LineBoxIcon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(LineBoxIcon, {}),
|
|
1048
|
-
ShapesIcon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ShapesIcon, {}),
|
|
1049
|
-
SquareIcon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SquareIcon, {}),
|
|
1050
|
-
TriangleIcon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TriangleIcon, {}),
|
|
1051
|
-
HexagonIcon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(HexagonIcon, {}),
|
|
1052
|
-
DeleteForeverIcon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DeleteForeverIcon, {})
|
|
1053
|
-
};
|
|
1054
|
-
function SvgControlBar({
|
|
1055
|
-
helper,
|
|
1056
|
-
state,
|
|
1057
|
-
showShapes
|
|
1058
|
-
}) {
|
|
1059
|
-
(0, import_react5.useEffect)(() => {
|
|
1060
|
-
helper.stamps.square();
|
|
1061
|
-
}, []);
|
|
1062
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1063
|
-
import_react_iiif_vault4.RenderSvgEditorControls,
|
|
1064
|
-
{
|
|
1065
|
-
icons,
|
|
1066
|
-
helper,
|
|
1067
|
-
state,
|
|
1068
|
-
showShapes,
|
|
1069
|
-
classNames: {
|
|
1070
|
-
button: className
|
|
1071
|
-
}
|
|
1072
|
-
}
|
|
1073
|
-
);
|
|
1074
|
-
}
|
|
1075
|
-
|
|
1076
|
-
// src/ConfirmSelectionButton.tsx
|
|
1077
|
-
var import_react_aria_components6 = require("react-aria-components");
|
|
1078
|
-
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1079
|
-
function ConfirmSelectionButton({ onPress, children }) {
|
|
1080
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_aria_components6.Button, { className: "bg-me-primary-500 px-3 py-1 hover:bg-me-primary-600 text-white rounded", onPress, children });
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
|
-
// src/ManifestOverviewEmptyState.tsx
|
|
1084
|
-
var import_react_aria_components7 = require("react-aria-components");
|
|
1085
|
-
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1086
|
-
function ManifestOverviewEmptyState({ onCreate, canCreate }) {
|
|
1087
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center flex-col gap-5 py-16", children: [
|
|
1088
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1089
|
-
Card3D,
|
|
1090
|
-
{
|
|
1091
|
-
shouldTranslate: true,
|
|
1092
|
-
onClick: canCreate ? onCreate : void 0,
|
|
1093
|
-
className: "border-2 border-dotted bg-black/5 aspect-[3/4] rounded w-32 border-black"
|
|
1094
|
-
}
|
|
1095
|
-
),
|
|
1096
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "font-bold text-lg", children: "Let's get started!" }),
|
|
1097
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "max-w-xl px-5 my-4", children: "Add a title and top level information for this manifest using the editing panel on the right, and then add some canvases and content." }),
|
|
1098
|
-
canCreate ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1099
|
-
import_react_aria_components7.Button,
|
|
1100
|
-
{
|
|
1101
|
-
className: "px-8 font-bold py-2 border rounded-lg border-me-primary-500 text-me-primary-500 hover:border-me-primary-600 hover:text-me-primary-600",
|
|
1102
|
-
onPress: onCreate,
|
|
1103
|
-
children: "Start adding content"
|
|
1104
|
-
}
|
|
1105
|
-
) : null
|
|
1106
|
-
] });
|
|
1107
|
-
}
|
|
1108
|
-
|
|
1109
|
-
// src/SidebarTabs.tsx
|
|
1110
|
-
var import_collections = require("@react-aria/collections");
|
|
1111
|
-
var import_react6 = require("react");
|
|
1112
|
-
var import_react_aria_components8 = require("react-aria-components");
|
|
1113
|
-
var import_react_dom2 = require("react-dom");
|
|
1114
|
-
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1115
|
-
function SidebarTabs({ menu, menuId, selectedKey, onSelectionChange }) {
|
|
1116
|
-
const ref = (0, import_react6.useRef)(null);
|
|
1117
|
-
const [hidden, setHidden] = (0, import_react6.useState)(0);
|
|
1118
|
-
const [hiddenMenu, setHiddenMenu] = (0, import_react6.useState)(null);
|
|
1119
|
-
const widths = (0, import_react6.useRef)([]);
|
|
1120
|
-
const itemsRef = (0, import_react6.useRef)([]);
|
|
1121
|
-
const selectedIndex = (0, import_react6.useMemo)(() => menu.findIndex((item) => item.id === selectedKey), [menu, selectedKey]);
|
|
1122
|
-
(0, import_react6.useLayoutEffect)(() => {
|
|
1123
|
-
const cb = () => {
|
|
1124
|
-
if (widths.current.length === 0) {
|
|
1125
|
-
widths.current = [];
|
|
1126
|
-
for (const item of itemsRef.current) {
|
|
1127
|
-
if (item) {
|
|
1128
|
-
widths.current.push(item.getBoundingClientRect().width);
|
|
1129
|
-
}
|
|
1130
|
-
}
|
|
1131
|
-
}
|
|
1132
|
-
const fullWidth = widths.current.reduce((a, b) => a + b, 0);
|
|
1133
|
-
if (fullWidth && ref.current) {
|
|
1134
|
-
const el = ref.current;
|
|
1135
|
-
const width = el.getBoundingClientRect().width - 20;
|
|
1136
|
-
let hidden2 = 0;
|
|
1137
|
-
let total = 0;
|
|
1138
|
-
for (let i = widths.current.length - 1; i >= 0; i--) {
|
|
1139
|
-
total += widths.current[i];
|
|
1140
|
-
if (total > width) {
|
|
1141
|
-
hidden2 = i + 1;
|
|
1142
|
-
break;
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1145
|
-
setHidden(hidden2);
|
|
1146
|
-
}
|
|
1147
|
-
};
|
|
1148
|
-
cb();
|
|
1149
|
-
const interval = setInterval(cb, 500);
|
|
1150
|
-
return () => {
|
|
1151
|
-
clearInterval(interval);
|
|
1152
|
-
};
|
|
1153
|
-
}, []);
|
|
1154
|
-
const menuHidden = menu.filter((item, idx) => hidden >= menu.length - idx);
|
|
1155
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
1156
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
1157
|
-
import_react_aria_components8.Tabs,
|
|
1158
|
-
{
|
|
1159
|
-
className: "w-full flex-1 overflow-hidden flex flex-col",
|
|
1160
|
-
selectedKey,
|
|
1161
|
-
onSelectionChange,
|
|
1162
|
-
children: [
|
|
1163
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center w-full tab-shadow", children: [
|
|
1164
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_aria_components8.TabList, { ref, className: "flex-1 overflow-hidden w-full flex text-sm whitespace-nowrap", children: menu.map((item, idx) => {
|
|
1165
|
-
const isHidden = hidden >= menu.length - idx;
|
|
1166
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1167
|
-
import_react_aria_components8.Tab,
|
|
1168
|
-
{
|
|
1169
|
-
ref: (el) => itemsRef.current[idx] = el,
|
|
1170
|
-
id: item.id,
|
|
1171
|
-
className: (state) => cn(
|
|
1172
|
-
//
|
|
1173
|
-
"border-b-2 px-2 py-1 text-sm text-gray-400 select-none hover:text-black focus:ring-0 focus:outline-none",
|
|
1174
|
-
state.isSelected && "border-me-primary-500 text-black",
|
|
1175
|
-
state.isFocusVisible && "ring-0 bg-me-gray-100",
|
|
1176
|
-
isHidden && "hidden"
|
|
1177
|
-
),
|
|
1178
|
-
children: item.label
|
|
1179
|
-
},
|
|
1180
|
-
item.id
|
|
1181
|
-
);
|
|
1182
|
-
}) }),
|
|
1183
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { ref: setHiddenMenu, id: "hidden-menu" })
|
|
1184
|
-
] }),
|
|
1185
|
-
menu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_aria_components8.TabPanel, { id: item.id, className: "flex-1 overflow-y-auto h-full", children: item.renderComponent }, item.id))
|
|
1186
|
-
]
|
|
1187
|
-
},
|
|
1188
|
-
menuId
|
|
1189
|
-
),
|
|
1190
|
-
hiddenMenu && hidden > 0 ? (0, import_react_dom2.createPortal)(
|
|
1191
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1192
|
-
MoreMenu,
|
|
1193
|
-
{
|
|
1194
|
-
hidden,
|
|
1195
|
-
menuHidden,
|
|
1196
|
-
selectedIndex,
|
|
1197
|
-
selectedKey,
|
|
1198
|
-
onSelectionChange
|
|
1199
|
-
}
|
|
1200
|
-
),
|
|
1201
|
-
hiddenMenu
|
|
1202
|
-
) : null
|
|
1203
|
-
] });
|
|
1204
|
-
}
|
|
1205
|
-
var MoreMenu = (0, import_collections.createHideableComponent)(({ selectedIndex, hidden, menuHidden, selectedKey, onSelectionChange }) => {
|
|
1206
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react_aria_components8.MenuTrigger, { children: [
|
|
1207
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1208
|
-
import_react_aria_components8.Button,
|
|
1209
|
-
{
|
|
1210
|
-
className: cn(
|
|
1211
|
-
"border-none rounded bg-gray-100 px-1.5 py-1 mr-2 mb-1 text-me-primary-500 semibold uppercase text-[10px]",
|
|
1212
|
-
selectedIndex > hidden && "bg-me-primary-500 text-white rounded"
|
|
1213
|
-
),
|
|
1214
|
-
children: "MORE"
|
|
1215
|
-
}
|
|
1216
|
-
),
|
|
1217
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_aria_components8.Popover, { children: menuHidden.length ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_aria_components8.Menu, { className: "bg-white rounded shadow-lg flex flex-col gap-0.5 p-0.5 min-w-28", children: menuHidden.map((item) => {
|
|
1218
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1219
|
-
import_react_aria_components8.MenuItem,
|
|
1220
|
-
{
|
|
1221
|
-
className: (state) => cn(
|
|
1222
|
-
"hover:bg-me-gray-100 p-1 rounded-sm text-sm",
|
|
1223
|
-
selectedKey === item.id && "ring ring-me-primary-500"
|
|
1224
|
-
),
|
|
1225
|
-
onAction: () => onSelectionChange?.(item.id),
|
|
1226
|
-
children: item.label
|
|
1227
|
-
},
|
|
1228
|
-
item.id
|
|
1229
|
-
);
|
|
1230
|
-
}) }) : null })
|
|
1231
|
-
] });
|
|
1232
|
-
});
|
|
1233
|
-
|
|
1234
|
-
// src/MetadataContainer.tsx
|
|
1235
|
-
var import_react_iiif_vault5 = require("react-iiif-vault");
|
|
1236
|
-
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1237
|
-
function MetadataContainer({
|
|
1238
|
-
className: className2,
|
|
1239
|
-
label,
|
|
1240
|
-
children,
|
|
1241
|
-
...props
|
|
1242
|
-
}) {
|
|
1243
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
1244
|
-
"fieldset",
|
|
1245
|
-
{
|
|
1246
|
-
className: cn(
|
|
1247
|
-
"hover:ring ring-gray-200 focus-within:ring-me-primary-500 focus-within:ring p-2 rounded mb-2",
|
|
1248
|
-
className2
|
|
1249
|
-
),
|
|
1250
|
-
...props,
|
|
1251
|
-
children: [
|
|
1252
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_iiif_vault5.LocaleString, { className: "text-lg font-bold text-[#333] mb-2", as: "h3", children: label }),
|
|
1253
|
-
children
|
|
1254
|
-
]
|
|
1255
|
-
}
|
|
1256
|
-
);
|
|
1257
|
-
}
|
|
1258
|
-
|
|
1259
|
-
// src/EmptyState.tsx
|
|
1260
|
-
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1261
|
-
function EmptyState(props) {
|
|
1262
|
-
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1263
|
-
"div",
|
|
1264
|
-
{
|
|
1265
|
-
className: cn(
|
|
1266
|
-
"flex items-center justify-center text-gray-400 text-md",
|
|
1267
|
-
props.$noMargin ? "" : "m-4",
|
|
1268
|
-
props.$box ? "p-4 border border-gray-200 rounded" : ""
|
|
1269
|
-
),
|
|
1270
|
-
children: props.children
|
|
1271
|
-
}
|
|
1272
|
-
);
|
|
1273
|
-
}
|
|
1274
|
-
|
|
1275
|
-
// src/ManifestEditorLogo.tsx
|
|
1276
|
-
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1277
|
-
function ManifestEditorLogo(props) {
|
|
1278
|
-
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1279
|
-
"svg",
|
|
1280
|
-
{
|
|
1281
|
-
width: "1em",
|
|
1282
|
-
height: "1em",
|
|
1283
|
-
viewBox: "0 0 206 27",
|
|
1284
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1285
|
-
className: "me-logo h-[23px] w-[176px]",
|
|
1286
|
-
...props,
|
|
1287
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("g", { fill: "none", children: [
|
|
1288
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1289
|
-
"path",
|
|
1290
|
-
{
|
|
1291
|
-
d: "M62.558 5.41v14.873h-2.983v-9.675l-3.985 9.675h-2.26l-4.006-9.675v9.675H46.34V5.41h3.388l4.73 11.06L59.19 5.41zm2.173 8.928c0-1.194.238-2.252.714-3.176.476-.923 1.123-1.633 1.94-2.13.816-.498 1.73-.746 2.738-.746.88 0 1.651.177 2.312.532.66.355 1.19.803 1.588 1.343V8.477h3.004v11.806h-3.004v-1.726c-.384.554-.913 1.012-1.588 1.374-.675.363-1.453.544-2.334.544-.994 0-1.9-.256-2.717-.767-.816-.512-1.463-1.233-1.939-2.163-.476-.93-.714-2-.714-3.207Zm9.292.042c0-.724-.143-1.346-.427-1.864a3.005 3.005 0 0 0-1.15-1.194 3.076 3.076 0 0 0-1.556-.415c-.554 0-1.066.135-1.534.405-.47.27-.85.664-1.14 1.182-.292.519-.437 1.133-.437 1.844 0 .71.145 1.331.437 1.864.29.533.674.941 1.15 1.226.476.284.984.426 1.524.426.554 0 1.073-.139 1.556-.416a3.005 3.005 0 0 0 1.15-1.193c.284-.519.427-1.14.427-1.865Zm12.466-6.073c1.406 0 2.543.444 3.41 1.332.866.888 1.3 2.127 1.3 3.718v6.926h-2.984v-6.52c0-.938-.234-1.66-.703-2.164-.47-.504-1.108-.756-1.918-.756-.824 0-1.474.252-1.95.756-.476.505-.714 1.226-.714 2.163v6.521h-2.983V8.477h2.983v1.47a4.121 4.121 0 0 1 1.524-1.203 4.713 4.713 0 0 1 2.035-.437Zm9.057-1.237c-.526 0-.963-.166-1.311-.5a1.657 1.657 0 0 1-.522-1.247c0-.497.174-.912.522-1.246.348-.334.785-.5 1.31-.5.526 0 .963.166 1.311.5.348.334.522.75.522 1.246 0 .498-.174.913-.522 1.247-.348.334-.785.5-1.31.5Zm1.47 1.407v11.806h-2.983V8.477h2.983Zm8.354 2.451h-2.068v9.355h-3.026v-9.355h-1.342v-2.45h1.342V7.88c0-1.45.412-2.515 1.236-3.197.824-.682 2.067-1.001 3.73-.959V6.24c-.725-.014-1.23.106-1.513.362-.284.256-.427.718-.427 1.385v.49h2.068v2.451Zm12.913 3.197c0 .426-.028.81-.085 1.15h-8.63c.07.853.369 1.52.895 2.003.525.483 1.172.725 1.939.725 1.108 0 1.896-.476 2.365-1.428h3.218c-.34 1.137-.994 2.07-1.96 2.802-.967.732-2.153 1.098-3.56 1.098-1.136 0-2.155-.252-3.057-.757a5.325 5.325 0 0 1-2.11-2.141c-.504-.924-.756-1.99-.756-3.197 0-1.222.248-2.294.745-3.218a5.204 5.204 0 0 1 2.089-2.13c.895-.498 1.925-.746 3.09-.746 1.122 0 2.127.241 3.015.724a5.1 5.1 0 0 1 2.067 2.057c.49.887.735 1.907.735 3.058Zm-3.09-.853c-.014-.767-.29-1.381-.83-1.843-.54-.462-1.201-.693-1.982-.693-.74 0-1.36.224-1.865.671-.504.448-.813 1.07-.927 1.865h5.604Zm9.782 7.203c-.966 0-1.833-.174-2.6-.522-.767-.348-1.375-.82-1.822-1.417a3.591 3.591 0 0 1-.735-1.982h3.004c.057.454.281.83.672 1.13.39.298.877.447 1.46.447.568 0 1.012-.114 1.331-.341.32-.227.48-.519.48-.874 0-.383-.196-.671-.586-.863-.391-.192-1.012-.401-1.865-.629-.88-.213-1.602-.433-2.163-.66a3.755 3.755 0 0 1-1.449-1.044c-.405-.47-.607-1.101-.607-1.897 0-.653.188-1.25.564-1.79.377-.54.917-.966 1.62-1.279.703-.312 1.53-.468 2.483-.468 1.406 0 2.528.351 3.367 1.054.838.704 1.3 1.652 1.385 2.845h-2.856c-.042-.469-.238-.841-.586-1.118-.348-.277-.813-.416-1.396-.416-.54 0-.955.1-1.246.298a.951.951 0 0 0-.437.831c0 .398.199.7.597.906.397.206 1.015.416 1.854.629.852.213 1.555.433 2.11.66a3.727 3.727 0 0 1 1.438 1.055c.405.476.614 1.105.628 1.886 0 .682-.188 1.293-.564 1.833-.377.54-.917.962-1.62 1.268-.703.305-1.524.458-2.461.458Zm10.569-9.547v5.711c0 .398.096.686.288.863.192.178.515.267.97.267h1.385v2.514h-1.875c-2.515 0-3.772-1.222-3.772-3.665v-5.69h-1.407v-2.45h1.407v-2.92h3.004v2.92h2.643v2.45h-2.643Zm12.851-3.111v3.73h5.007v2.364h-5.007v3.943h5.647v2.43h-8.631V5.386h8.63v2.43zm7.585 6.521c0-1.194.239-2.252.715-3.176.476-.923 1.126-1.633 1.95-2.13.824-.498 1.74-.746 2.749-.746.767 0 1.498.167 2.194.5.697.334 1.25.778 1.663 1.332V4.514h3.026v15.77h-3.026v-1.748c-.37.582-.888 1.051-1.556 1.406s-1.442.533-2.323.533a5.07 5.07 0 0 1-2.727-.767c-.824-.512-1.474-1.233-1.95-2.163-.476-.93-.714-2-.714-3.207Zm9.292.042c0-.724-.142-1.346-.426-1.864a3.005 3.005 0 0 0-1.151-1.194 3.076 3.076 0 0 0-1.556-.415 3.02 3.02 0 0 0-1.534.405c-.469.27-.849.664-1.14 1.182-.291.519-.437 1.133-.437 1.844 0 .71.146 1.331.437 1.864.291.533.675.941 1.15 1.226a2.93 2.93 0 0 0 1.524.426c.554 0 1.073-.139 1.556-.416a3.005 3.005 0 0 0 1.15-1.193c.285-.519.427-1.14.427-1.865Zm7.438-7.31c-.527 0-.963-.166-1.311-.5a1.657 1.657 0 0 1-.523-1.247c0-.497.174-.912.523-1.246.348-.334.784-.5 1.31-.5s.963.166 1.31.5c.349.334.523.75.523 1.246 0 .498-.174.913-.522 1.247-.348.334-.785.5-1.31.5Zm1.47 1.407v11.806h-2.984V8.477h2.984Zm6.414 2.451v5.711c0 .398.096.686.287.863.192.178.515.267.97.267h1.385v2.514h-1.875c-2.515 0-3.772-1.222-3.772-3.665v-5.69h-1.406v-2.45h1.406v-2.92h3.005v2.92h2.642v2.45h-2.642Zm10.036 9.547c-1.136 0-2.159-.252-3.068-.757a5.447 5.447 0 0 1-2.141-2.141c-.519-.924-.778-1.99-.778-3.197s.266-2.273.799-3.196a5.553 5.553 0 0 1 2.184-2.142c.924-.504 1.954-.756 3.09-.756 1.137 0 2.167.252 3.09.756a5.553 5.553 0 0 1 2.184 2.142c.533.923.8 1.989.8 3.196 0 1.208-.274 2.273-.821 3.197a5.681 5.681 0 0 1-2.216 2.141c-.93.505-1.971.757-3.122.757Zm0-2.6a3.1 3.1 0 0 0 1.524-.394c.476-.263.856-.657 1.14-1.183.285-.526.427-1.165.427-1.918 0-1.122-.295-1.985-.885-2.589a2.907 2.907 0 0 0-2.163-.906c-.852 0-1.566.302-2.141.906-.576.604-.863 1.467-.863 2.59 0 1.122.28 1.985.841 2.588.562.604 1.268.906 2.12.906Zm11.338-7.565a4.194 4.194 0 0 1 1.502-1.47c.618-.356 1.325-.533 2.12-.533v3.132h-.788c-.938 0-1.644.22-2.12.661-.476.44-.714 1.208-.714 2.302v5.881h-2.984V8.477h2.984v1.833Z",
|
|
1292
|
-
fill: "#000"
|
|
1293
|
-
}
|
|
1294
|
-
),
|
|
1295
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { fill: "#E94581", className: "me-logo-1", d: "M0 13.343 13.343 0l13.343 13.343-13.343 13.343z" }),
|
|
1296
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { fill: "#E94581", className: "me-logo-2", d: "M12.137 13.346 25.48.003l13.343 13.343L25.48 26.69z" }),
|
|
1297
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { fill: "#C63E75", className: "me-logo-3", d: "m12.104 13.348 7.311-7.311 7.312 7.311-7.312 7.312z" })
|
|
1298
|
-
] })
|
|
1299
|
-
}
|
|
1300
|
-
);
|
|
1301
|
-
}
|
|
1302
|
-
|
|
1303
|
-
// src/Forms.tsx
|
|
1304
|
-
var import_react_aria_components9 = require("react-aria-components");
|
|
1305
|
-
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1306
|
-
function MeLabel({ className: className2, ...props }) {
|
|
1307
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1308
|
-
import_react_aria_components9.Label,
|
|
1309
|
-
{
|
|
1310
|
-
className: cn(
|
|
1311
|
-
//
|
|
1312
|
-
"font-semibold text-sm",
|
|
1313
|
-
className2
|
|
1314
|
-
),
|
|
1315
|
-
...props
|
|
1316
|
-
}
|
|
1317
|
-
);
|
|
1318
|
-
}
|
|
1319
|
-
function MeRadioGroup({ className: className2, ...props }) {
|
|
1320
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1321
|
-
import_react_aria_components9.RadioGroup,
|
|
1322
|
-
{
|
|
1323
|
-
className: cn(
|
|
1324
|
-
//
|
|
1325
|
-
"",
|
|
1326
|
-
className2
|
|
1327
|
-
),
|
|
1328
|
-
...props
|
|
1329
|
-
}
|
|
1330
|
-
);
|
|
1331
|
-
}
|
|
1332
|
-
function MeRadio({ className: className2, ...props }) {
|
|
1333
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1334
|
-
import_react_aria_components9.Radio,
|
|
1335
|
-
{
|
|
1336
|
-
className: (state) => cn(
|
|
1337
|
-
//
|
|
1338
|
-
"outline outline-me-primary-500 outline-offset-2 w-5 h-5 rounded-full bg-white transition-all border-[7px] border-gray-700 group-pressed:border-gray-800 outline-0",
|
|
1339
|
-
className2
|
|
1340
|
-
),
|
|
1341
|
-
...props
|
|
1342
|
-
}
|
|
1343
|
-
);
|
|
1344
|
-
}
|
|
1345
|
-
function MeForm({ className: className2, ...props }) {
|
|
1346
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1347
|
-
import_react_aria_components9.Form,
|
|
1348
|
-
{
|
|
1349
|
-
className: cn(
|
|
1350
|
-
//
|
|
1351
|
-
"",
|
|
1352
|
-
className2
|
|
1353
|
-
),
|
|
1354
|
-
...props
|
|
1355
|
-
}
|
|
1356
|
-
);
|
|
1357
|
-
}
|
|
1358
|
-
function MeInput({ className: className2, ...props }) {
|
|
1359
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1360
|
-
import_react_aria_components9.Input,
|
|
1361
|
-
{
|
|
1362
|
-
className: cn(
|
|
1363
|
-
//
|
|
1364
|
-
"p-2 bg-me-gray-100 border-b border-b-me-gray-500",
|
|
1365
|
-
"focus:ring-0 outline-0 focus:border-me-primary-500 focus:bg-[#ECEEF5]",
|
|
1366
|
-
className2
|
|
1367
|
-
),
|
|
1368
|
-
...props
|
|
1369
|
-
}
|
|
1370
|
-
);
|
|
1371
|
-
}
|
|
1372
|
-
function MeTextArea({ className: className2, ...props }) {
|
|
1373
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1374
|
-
import_react_aria_components9.TextArea,
|
|
1375
|
-
{
|
|
1376
|
-
className: cn(
|
|
1377
|
-
//
|
|
1378
|
-
"p-2 bg-me-gray-100 border-b border-b-me-gray-500",
|
|
1379
|
-
"focus:ring-0 outline-0 focus:border-me-primary-500 focus:bg-[#ECEEF5]",
|
|
1380
|
-
className2
|
|
1381
|
-
),
|
|
1382
|
-
...props
|
|
1383
|
-
}
|
|
1384
|
-
);
|
|
1385
|
-
}
|
|
1386
|
-
function MeInputContainer({
|
|
1387
|
-
horizontal,
|
|
1388
|
-
className: className2,
|
|
1389
|
-
...props
|
|
1390
|
-
}) {
|
|
1391
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1392
|
-
"div",
|
|
1393
|
-
{
|
|
1394
|
-
className: cn(
|
|
1395
|
-
//
|
|
1396
|
-
"flex flex-col gap-2",
|
|
1397
|
-
horizontal && "flex-row",
|
|
1398
|
-
className2
|
|
1399
|
-
),
|
|
1400
|
-
...props
|
|
1401
|
-
}
|
|
1402
|
-
);
|
|
1403
|
-
}
|
|
1404
|
-
var Form = {
|
|
1405
|
-
Input: MeInput,
|
|
1406
|
-
Form: MeForm,
|
|
1407
|
-
Label: MeLabel,
|
|
1408
|
-
InputContainer: MeInputContainer,
|
|
1409
|
-
RadioGroup: MeRadioGroup,
|
|
1410
|
-
Radio: MeRadio,
|
|
1411
|
-
TextArea: MeTextArea
|
|
1412
|
-
};
|
|
1413
|
-
|
|
1414
|
-
// src/HTMLEditor.tsx
|
|
1415
|
-
var import_react8 = require("react");
|
|
1416
|
-
var import_showdown = require("showdown");
|
|
1417
|
-
var import_tiny_use_debounce = require("tiny-use-debounce");
|
|
1418
|
-
var import_turndown = __toESM(require("turndown"), 1);
|
|
1419
|
-
|
|
1420
|
-
// src/MDXEditor.tsx
|
|
1421
|
-
var import_style = require("@mdxeditor/editor/style.css");
|
|
1422
|
-
var import_editor = require("@mdxeditor/editor");
|
|
1423
|
-
var import_react7 = require("react");
|
|
1424
|
-
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1425
|
-
function MDXEditor({
|
|
1426
|
-
editorRef,
|
|
1427
|
-
...props
|
|
1428
|
-
}) {
|
|
1429
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1430
|
-
import_editor.MDXEditor,
|
|
1431
|
-
{
|
|
1432
|
-
plugins: (0, import_react7.useMemo)(
|
|
1433
|
-
() => [
|
|
1434
|
-
// Example Plugin Usage
|
|
1435
|
-
(0, import_editor.headingsPlugin)({ allowedHeadingLevels: [2, 3] }),
|
|
1436
|
-
(0, import_editor.listsPlugin)(),
|
|
1437
|
-
(0, import_editor.linkPlugin)(),
|
|
1438
|
-
(0, import_editor.quotePlugin)(),
|
|
1439
|
-
(0, import_editor.thematicBreakPlugin)(),
|
|
1440
|
-
(0, import_editor.linkDialogPlugin)(),
|
|
1441
|
-
(0, import_editor.imagePlugin)(),
|
|
1442
|
-
(0, import_editor.diffSourcePlugin)(),
|
|
1443
|
-
(0, import_editor.toolbarPlugin)({
|
|
1444
|
-
toolbarClassName: "mdx-toolbar",
|
|
1445
|
-
toolbarContents: () => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
|
|
1446
|
-
" ",
|
|
1447
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_editor.UndoRedo, {}),
|
|
1448
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_editor.BoldItalicUnderlineToggles, {}),
|
|
1449
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_editor.BlockTypeSelect, {}),
|
|
1450
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_editor.ListsToggle, { options: ["bullet", "number"] }),
|
|
1451
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_editor.CreateLink, {}),
|
|
1452
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_editor.InsertImage, {})
|
|
1453
|
-
] })
|
|
1454
|
-
})
|
|
1455
|
-
],
|
|
1456
|
-
[]
|
|
1457
|
-
),
|
|
1458
|
-
...props,
|
|
1459
|
-
ref: editorRef
|
|
1460
|
-
}
|
|
1461
|
-
);
|
|
1462
|
-
}
|
|
1463
|
-
|
|
1464
|
-
// src/HTMLEditor.tsx
|
|
1465
|
-
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1466
|
-
var converter = new import_showdown.Converter();
|
|
1467
|
-
converter.setFlavor("github");
|
|
1468
|
-
var turndownService = new import_turndown.default();
|
|
1469
|
-
function HTMLEditor({
|
|
1470
|
-
value,
|
|
1471
|
-
onChange,
|
|
1472
|
-
disabled
|
|
1473
|
-
}) {
|
|
1474
|
-
const editorRef = (0, import_react8.useRef)(null);
|
|
1475
|
-
const [_value, _setValue] = (0, import_react8.useState)(void 0);
|
|
1476
|
-
const internalOnChange = (0, import_react8.useCallback)(() => {
|
|
1477
|
-
if (editorRef.current) {
|
|
1478
|
-
onChange(converter.makeHtml(editorRef.current.getMarkdown()));
|
|
1479
|
-
}
|
|
1480
|
-
}, []);
|
|
1481
|
-
const debounceSave = (0, import_tiny_use_debounce.useDebounce)(internalOnChange, 400);
|
|
1482
|
-
const memoState = (0, import_react8.useMemo)(() => {
|
|
1483
|
-
return turndownService.turndown(value);
|
|
1484
|
-
}, []);
|
|
1485
|
-
(0, import_react8.useEffect)(() => {
|
|
1486
|
-
const ref = editorRef.current;
|
|
1487
|
-
return () => {
|
|
1488
|
-
if (ref) {
|
|
1489
|
-
onChange(converter.makeHtml(ref.getMarkdown()));
|
|
1490
|
-
}
|
|
1491
|
-
};
|
|
1492
|
-
}, []);
|
|
1493
|
-
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
1494
|
-
MDXEditor,
|
|
1495
|
-
{
|
|
1496
|
-
editorRef,
|
|
1497
|
-
onBlur: internalOnChange,
|
|
1498
|
-
readOnly: disabled,
|
|
1499
|
-
className: [
|
|
1500
|
-
"bg-white prose-sm text-sm border rounded-lg prose-a:text-me-primary-500 prose-a:underline prose-ul:list-disc p-0.5",
|
|
1501
|
-
"prose-ol:list-decimal",
|
|
1502
|
-
"focus-within:outline-none focus-within:border-me-primary-500 z-50 relative"
|
|
1503
|
-
].join(" "),
|
|
1504
|
-
markdown: memoState,
|
|
1505
|
-
suppressHtmlProcessing: true,
|
|
1506
|
-
onError: (err) => {
|
|
1507
|
-
console.log("err", err);
|
|
1508
|
-
},
|
|
1509
|
-
onChange: (value2) => {
|
|
1510
|
-
_setValue(value2);
|
|
1511
|
-
debounceSave();
|
|
1512
|
-
}
|
|
1513
|
-
}
|
|
1514
|
-
);
|
|
1515
|
-
}
|
|
1516
|
-
|
|
1517
|
-
// src/IconButton.tsx
|
|
1518
|
-
var import_tailwind_merge7 = require("tailwind-merge");
|
|
1519
|
-
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1520
|
-
function IconButton({
|
|
1521
|
-
children,
|
|
1522
|
-
active,
|
|
1523
|
-
label,
|
|
1524
|
-
disabled,
|
|
1525
|
-
onPress,
|
|
1526
|
-
root,
|
|
1527
|
-
className: className2,
|
|
1528
|
-
placement = "top"
|
|
1529
|
-
}) {
|
|
1530
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Tooltip, { placement, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
1531
|
-
TooltipTrigger,
|
|
1532
|
-
{
|
|
1533
|
-
"aria-label": label,
|
|
1534
|
-
onClick: onPress,
|
|
1535
|
-
className: (0, import_tailwind_merge7.twMerge)(
|
|
1536
|
-
"rounded flex items-center bg-white justify-center p-2 hover:bg-gray-100 text-2xl",
|
|
1537
|
-
active ? "bg-me-primary-500 bg-opacity-40 hover:bg-opacity-70 hover:bg-me-primary-500" : "",
|
|
1538
|
-
disabled ? "opacity-50 pointer-events-none" : "",
|
|
1539
|
-
className2
|
|
1540
|
-
),
|
|
1541
|
-
children: [
|
|
1542
|
-
children,
|
|
1543
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DefaultTooltipContent, { root, className: "translate-x-3 z-50", children: label })
|
|
1544
|
-
]
|
|
1545
|
-
}
|
|
1546
|
-
) });
|
|
1547
|
-
}
|
|
1548
|
-
|
|
1549
|
-
// src/ItemWithHandle.tsx
|
|
1550
|
-
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1551
|
-
function ItemWithHandle({
|
|
1552
|
-
children,
|
|
1553
|
-
handle,
|
|
1554
|
-
actions,
|
|
1555
|
-
grid
|
|
1556
|
-
}) {
|
|
1557
|
-
const gridStyleClassName = grid ? (
|
|
1558
|
-
// Tailwind
|
|
1559
|
-
"absolute flex p-1 gap-1 bg-white z-1 right-1 top-1 rounded"
|
|
1560
|
-
) : "flex-shrink-0 flex items-center gap-1 px-1";
|
|
1561
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: grid ? "relative flex flex-col" : "flex items-center", children: [
|
|
1562
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "flex-1 min-w-0", style: { flex: 1, minWidth: 0 }, children }),
|
|
1563
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: gridStyleClassName, children: [
|
|
1564
|
-
actions,
|
|
1565
|
-
handle
|
|
1566
|
-
] })
|
|
1567
|
-
] });
|
|
1568
|
-
}
|
|
1569
|
-
|
|
1570
|
-
// src/HandleContainer.tsx
|
|
1571
|
-
var import_react9 = require("react");
|
|
1572
|
-
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
1573
|
-
var HandleContainer = (0, import_react9.forwardRef)(function HandleContainer2({ className: className2, ...props }, ref) {
|
|
1574
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
1575
|
-
"div",
|
|
1576
|
-
{
|
|
1577
|
-
ref,
|
|
1578
|
-
className: `relative text-2xl flex p-0.5 rounded-sm aspect-square hover:bg-me-primary-100 aria-expanded:bg-me-primary-500 aria-expanded:text-white ${className2 || ""}`,
|
|
1579
|
-
...props
|
|
1580
|
-
}
|
|
1581
|
-
);
|
|
1582
|
-
});
|
|
1583
|
-
|
|
1584
|
-
// src/CollectionListItem.tsx
|
|
1585
|
-
var import_react_iiif_vault6 = require("react-iiif-vault");
|
|
1586
|
-
|
|
1587
|
-
// src/icons/CollectionIcon.tsx
|
|
1588
|
-
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
1589
|
-
function CollectionIcon(props) {
|
|
1590
|
-
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
1591
|
-
"svg",
|
|
1592
|
-
{
|
|
1593
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1594
|
-
width: "1em",
|
|
1595
|
-
height: "1em",
|
|
1596
|
-
viewBox: "0 -960 960 960",
|
|
1597
|
-
"aria-label": "collection",
|
|
1598
|
-
role: "img",
|
|
1599
|
-
...props,
|
|
1600
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
1601
|
-
"path",
|
|
1602
|
-
{
|
|
1603
|
-
d: "M320-320h480v-480h-80v280l-100-60-100 60v-280H320v480Zm0 80q-33 0-56.5-23.5T240-320v-480q0-33 23.5-56.5T320-880h480q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H320ZM160-80q-33 0-56.5-23.5T80-160v-560h80v560h560v80H160Zm360-720h200-200Zm-200 0h480-480Z",
|
|
1604
|
-
fill: "currentColor"
|
|
1605
|
-
}
|
|
1606
|
-
)
|
|
1607
|
-
}
|
|
1608
|
-
);
|
|
1609
|
-
}
|
|
1610
|
-
|
|
1611
|
-
// src/CollectionListItem.tsx
|
|
1612
|
-
var import_react_aria2 = require("react-aria");
|
|
1613
|
-
var import_i18n = require("@iiif/helpers/i18n");
|
|
1614
|
-
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
1615
|
-
function CollectionListItem({ isActive, onAction }) {
|
|
1616
|
-
const collection = (0, import_react_iiif_vault6.useCollection)({});
|
|
1617
|
-
const { pressProps } = (0, import_react_aria2.usePress)({
|
|
1618
|
-
onPress: onAction
|
|
1619
|
-
});
|
|
1620
|
-
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
1621
|
-
"li",
|
|
1622
|
-
{
|
|
1623
|
-
"aria-label": (0, import_i18n.getValue)(collection?.label),
|
|
1624
|
-
className: "border-b-2 border-b-gray-200 flex p-2 gap-3 text-left truncate items-center w-full hover:bg-gray-100 data-[active]:bg-gray-200 data-[active]:border-b-me-primary-500",
|
|
1625
|
-
"data-active": isActive || void 0,
|
|
1626
|
-
...pressProps,
|
|
1627
|
-
children: [
|
|
1628
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
1629
|
-
CollectionIcon,
|
|
1630
|
-
{
|
|
1631
|
-
"data-active": isActive || void 0,
|
|
1632
|
-
className: "flex-shrink-0 text-2xl data-[active]:text-me-primary-500 text-gray-400"
|
|
1633
|
-
}
|
|
1634
|
-
),
|
|
1635
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_iiif_vault6.LocaleString, { children: collection?.label })
|
|
1636
|
-
]
|
|
1637
|
-
}
|
|
1638
|
-
);
|
|
1639
|
-
}
|
|
1640
|
-
|
|
1641
|
-
// src/ManifestListItem.tsx
|
|
1642
|
-
var import_react_iiif_vault7 = require("react-iiif-vault");
|
|
1643
|
-
|
|
1644
|
-
// src/icons/ManifestIcon.tsx
|
|
1645
|
-
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
1646
|
-
function ManifestIcon(props) {
|
|
1647
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
1648
|
-
"svg",
|
|
1649
|
-
{
|
|
1650
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1651
|
-
width: "1em",
|
|
1652
|
-
height: "1em",
|
|
1653
|
-
viewBox: "20 -910 960 960",
|
|
1654
|
-
"aria-label": "manifest",
|
|
1655
|
-
role: "img",
|
|
1656
|
-
...props,
|
|
1657
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
1658
|
-
"path",
|
|
1659
|
-
{
|
|
1660
|
-
d: "M480-160q-48-38-104-59t-116-21q-42 0-82.5 11T100-198q-21 11-40.5-1T40-234v-482q0-11 5.5-21T62-752q46-24 96-36t102-12q58 0 113.5 15T480-740v484q51-32 107-48t113-16q36 0 70.5 6t69.5 18v-480q15 5 29.5 10.5T898-752q11 5 16.5 15t5.5 21v482q0 23-19.5 35t-40.5 1q-37-20-77.5-31T700-240q-60 0-116 21t-104 59Zm80-200v-380l200-200v400L560-360Zm-160 65v-396q-33-14-68.5-21.5T260-720q-37 0-72 7t-68 21v397q35-13 69.5-19t70.5-6q36 0 70.5 6t69.5 19Zm0 0v-396 396Z",
|
|
1661
|
-
fill: "currentColor"
|
|
1662
|
-
}
|
|
1663
|
-
)
|
|
1664
|
-
}
|
|
1665
|
-
);
|
|
1666
|
-
}
|
|
1667
|
-
|
|
1668
|
-
// src/ManifestListItem.tsx
|
|
1669
|
-
var import_react_aria3 = require("react-aria");
|
|
1670
|
-
var import_helpers = require("@iiif/helpers");
|
|
1671
|
-
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
1672
|
-
function ManifestListItem({ isActive, onAction }) {
|
|
1673
|
-
const manifest = (0, import_react_iiif_vault7.useManifest)();
|
|
1674
|
-
const { pressProps } = (0, import_react_aria3.usePress)({
|
|
1675
|
-
onPress: onAction
|
|
1676
|
-
});
|
|
1677
|
-
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
1678
|
-
"li",
|
|
1679
|
-
{
|
|
1680
|
-
"aria-label": (0, import_helpers.getValue)(manifest?.label),
|
|
1681
|
-
className: "border-b-2 border-b-gray-200 flex p-2 gap-3 text-left truncate items-center w-full hover:bg-gray-100 data-[active]:bg-gray-200 data-[active]:border-b-me-primary-500",
|
|
1682
|
-
"data-active": isActive || void 0,
|
|
1683
|
-
...pressProps,
|
|
1684
|
-
children: [
|
|
1685
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
1686
|
-
ManifestIcon,
|
|
1687
|
-
{
|
|
1688
|
-
"data-active": isActive || void 0,
|
|
1689
|
-
className: "flex-shrink-0 text-2xl data-[active]:text-me-primary-500 text-gray-400"
|
|
1690
|
-
}
|
|
1691
|
-
),
|
|
1692
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_iiif_vault7.LocaleString, { children: manifest?.label })
|
|
1693
|
-
]
|
|
1694
|
-
}
|
|
1695
|
-
);
|
|
1696
|
-
}
|
|
1697
|
-
|
|
1698
|
-
// src/icons/CreateCanvasIcon.tsx
|
|
1699
|
-
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
1700
|
-
function CreateCanvasIcon() {
|
|
1701
|
-
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24", viewBox: "0 0 24 24", width: "24", children: [
|
|
1702
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
1703
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
1704
|
-
"path",
|
|
1705
|
-
{
|
|
1706
|
-
d: "M13 11h-2v3H8v2h3v3h2v-3h3v-2h-3zm1-9H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z",
|
|
1707
|
-
fill: "currentColor"
|
|
1708
|
-
}
|
|
1709
|
-
)
|
|
1710
|
-
] });
|
|
1711
|
-
}
|
|
1712
|
-
|
|
1713
|
-
// src/icons/AddImageIcon.tsx
|
|
1714
|
-
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
1715
|
-
var AddImageIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "#5f6368", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
1716
|
-
"path",
|
|
1717
|
-
{
|
|
1718
|
-
d: "M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h360v80H200v560h560v-360h80v360q0 33-23.5 56.5T760-120H200Zm480-480v-80h-80v-80h80v-80h80v80h80v80h-80v80h-80ZM240-280h480L570-480 450-320l-90-120-120 160Zm-40-480v560-560Z",
|
|
1719
|
-
fill: "currentColor"
|
|
1720
|
-
}
|
|
1721
|
-
) });
|
|
1722
|
-
|
|
1723
|
-
// src/icons/IIIFLogo.tsx
|
|
1724
|
-
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
1725
|
-
var IIIFLogo = ({ mono = true, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
1726
|
-
"svg",
|
|
1727
|
-
{
|
|
1728
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1729
|
-
xmlSpace: "preserve",
|
|
1730
|
-
width: "1em",
|
|
1731
|
-
height: "1em",
|
|
1732
|
-
...props,
|
|
1733
|
-
viewBox: "0 0 493.36 441.333",
|
|
1734
|
-
children: [
|
|
1735
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
1736
|
-
"path",
|
|
1737
|
-
{
|
|
1738
|
-
d: "m65.242 2178.75 710-263.75-1.25-1900-708.75 261.25v1902.5m738.903 461.34c81.441-240.91-26.473-436.2-241.04-436.2-214.558 0-454.511 195.29-535.953 436.2-81.433 240.89 26.48 436.18 241.039 436.18 214.567 0 454.512-195.29 535.954-436.18",
|
|
1739
|
-
style: {
|
|
1740
|
-
fill: mono ? "currentColor" : "#2873ab",
|
|
1741
|
-
fillOpacity: 1,
|
|
1742
|
-
fillRule: "nonzero",
|
|
1743
|
-
stroke: "none"
|
|
1744
|
-
},
|
|
1745
|
-
transform: "matrix(.13333 0 0 -.13333 0 441.333)"
|
|
1746
|
-
}
|
|
1747
|
-
),
|
|
1748
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
1749
|
-
"path",
|
|
1750
|
-
{
|
|
1751
|
-
d: "M1678.58 2178.75 968.578 1915l1.25-1900 708.752 261.25v1902.5m-743.498 461.34c-81.437-240.91 26.477-436.2 241.038-436.2 214.56 0 454.51 195.29 535.96 436.2 81.43 240.89-26.48 436.18-241.04 436.18-214.57 0-454.52-195.29-535.958-436.18",
|
|
1752
|
-
style: {
|
|
1753
|
-
fill: mono ? "currentColor" : "#ed1d33",
|
|
1754
|
-
fillOpacity: 1,
|
|
1755
|
-
fillRule: "nonzero",
|
|
1756
|
-
stroke: "none"
|
|
1757
|
-
},
|
|
1758
|
-
transform: "matrix(.13333 0 0 -.13333 0 441.333)"
|
|
1759
|
-
}
|
|
1760
|
-
),
|
|
1761
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
1762
|
-
"path",
|
|
1763
|
-
{
|
|
1764
|
-
d: "m1860.24 2178.75 710-263.75-1.25-1900-708.75 261.25v1902.5m743.5 461.34c81.45-240.91-26.47-436.2-241.03-436.2-214.58 0-454.52 195.29-535.96 436.2-81.44 240.89 26.48 436.18 241.03 436.18 214.57 0 454.51-195.29 535.96-436.18",
|
|
1765
|
-
style: {
|
|
1766
|
-
fill: mono ? "currentColor" : "#2873ab",
|
|
1767
|
-
fillOpacity: 1,
|
|
1768
|
-
fillRule: "nonzero",
|
|
1769
|
-
stroke: "none"
|
|
1770
|
-
},
|
|
1771
|
-
transform: "matrix(.13333 0 0 -.13333 0 441.333)"
|
|
1772
|
-
}
|
|
1773
|
-
),
|
|
1774
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
1775
|
-
"path",
|
|
1776
|
-
{
|
|
1777
|
-
d: "M3700.24 3310v-652.5s-230 90-257.5-142.5c-2.5-247.5 0-336.25 0-336.25l257.5 83.75V1690l-258.61-92.5v-1335L2735.24 0v2360s-15 850 965 950",
|
|
1778
|
-
style: {
|
|
1779
|
-
fill: mono ? "currentColor" : "#ed1d33",
|
|
1780
|
-
fillOpacity: 1,
|
|
1781
|
-
fillRule: "nonzero",
|
|
1782
|
-
stroke: "none"
|
|
1783
|
-
},
|
|
1784
|
-
transform: "matrix(.13333 0 0 -.13333 0 441.333)"
|
|
1785
|
-
}
|
|
1786
|
-
)
|
|
1787
|
-
]
|
|
1788
|
-
}
|
|
1789
|
-
);
|
|
1790
|
-
|
|
1791
|
-
// src/icons/HTMLIcon.tsx
|
|
1792
|
-
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
1793
|
-
var HTMLIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "#5f6368", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
1794
|
-
"path",
|
|
1795
|
-
{
|
|
1796
|
-
d: "M0-360v-240h60v80h80v-80h60v240h-60v-100H60v100H0Zm310 0v-180h-70v-60h200v60h-70v180h-60Zm170 0v-200q0-17 11.5-28.5T520-600h180q17 0 28.5 11.5T740-560v200h-60v-180h-40v140h-60v-140h-40v180h-60Zm320 0v-240h60v180h100v60H800Z",
|
|
1797
|
-
fill: "currentColor"
|
|
1798
|
-
}
|
|
1799
|
-
) });
|
|
1800
|
-
|
|
1801
|
-
// src/icons/IIIFBrowserIcon.tsx
|
|
1802
|
-
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
1803
|
-
var IIIFBrowserIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "#5f6368", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
1804
|
-
"path",
|
|
1805
|
-
{
|
|
1806
|
-
d: "M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h200v80H200v560h560v-214l80 80v134q0 33-23.5 56.5T760-120H200Zm40-160 120-160 90 120 120-160 150 200H240Zm622-144L738-548q-21 14-45 21t-51 7q-74 0-126-52.5T464-700q0-75 52.5-127.5T644-880q75 0 127.5 52.5T824-700q0 27-8 52t-20 46l122 122-56 56ZM644-600q42 0 71-29t29-71q0-42-29-71t-71-29q-42 0-71 29t-29 71q0 42 29 71t71 29Z",
|
|
1807
|
-
fill: "currentColor"
|
|
1808
|
-
}
|
|
1809
|
-
) });
|
|
1810
|
-
|
|
1811
|
-
// src/icons/InfoIcon.tsx
|
|
1812
|
-
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
1813
|
-
function InfoIcon({ title, titleId, ...props }) {
|
|
1814
|
-
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", "aria-labelledby": titleId, ...props, children: [
|
|
1815
|
-
title ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("title", { id: titleId, children: title }) : null,
|
|
1816
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
1817
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
1818
|
-
"path",
|
|
1819
|
-
{
|
|
1820
|
-
d: "M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z",
|
|
1821
|
-
fill: "currentColor"
|
|
1822
|
-
}
|
|
1823
|
-
)
|
|
1824
|
-
] });
|
|
1825
|
-
}
|
|
1826
|
-
|
|
1827
|
-
// src/icons/ListingIcon.tsx
|
|
1828
|
-
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
1829
|
-
function ListingIcon({
|
|
1830
|
-
title,
|
|
1831
|
-
titleId,
|
|
1832
|
-
...props
|
|
1833
|
-
}) {
|
|
1834
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
1835
|
-
"svg",
|
|
1836
|
-
{
|
|
1837
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1838
|
-
viewBox: "0 0 24 24",
|
|
1839
|
-
width: "1em",
|
|
1840
|
-
height: "1em",
|
|
1841
|
-
"aria-labelledby": titleId,
|
|
1842
|
-
...props,
|
|
1843
|
-
children: [
|
|
1844
|
-
title ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("title", { id: titleId, children: title }) : null,
|
|
1845
|
-
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("g", { fill: "none", children: [
|
|
1846
|
-
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("path", { d: "M0 0h24v24H0V0z" }),
|
|
1847
|
-
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("path", { d: "M0 0h24v24H0V0z", opacity: ".87" })
|
|
1848
|
-
] }),
|
|
1849
|
-
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
1850
|
-
"path",
|
|
1851
|
-
{
|
|
1852
|
-
d: "M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7zm-4 6h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z",
|
|
1853
|
-
fill: "currentColor"
|
|
1854
|
-
}
|
|
1855
|
-
)
|
|
1856
|
-
]
|
|
1857
|
-
}
|
|
1858
|
-
);
|
|
1859
|
-
}
|
|
1860
|
-
|
|
1861
|
-
// src/icons/YouTubeIcon.tsx
|
|
1862
|
-
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
1863
|
-
var YouTubeIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "#5f6368", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
1864
|
-
"path",
|
|
1865
|
-
{
|
|
1866
|
-
d: "M616-242q-27 1-51.5 1.5t-43.5.5h-41q-71 0-133-2-53-2-104.5-5.5T168-257q-26-7-45-26t-26-45q-6-23-9.5-56T82-447q-2-36-2-73t2-73q2-30 5.5-63t9.5-56q7-26 26-45t45-26q23-6 74.5-9.5T347-798q62-2 133-2t133 2q53 2 104.5 5.5T792-783q26 7 45 26t26 45q6 23 9.5 56t5.5 63q2 36 2 73v17q-19-8-39-12.5t-41-4.5q-83 0-141.5 58.5T600-320q0 21 4 40.5t12 37.5ZM400-400l208-120-208-120v240Zm360 200v-80h-80v-80h80v-80h80v80h80v80h-80v80h-80Z",
|
|
1867
|
-
fill: "currentColor"
|
|
1868
|
-
}
|
|
1869
|
-
) });
|
|
1870
|
-
|
|
1871
|
-
// src/icons/ListEditIcon.tsx
|
|
1872
|
-
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
1873
|
-
function ListEditIcon({
|
|
1874
|
-
title,
|
|
1875
|
-
titleId,
|
|
1876
|
-
...props
|
|
1877
|
-
}) {
|
|
1878
|
-
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
1879
|
-
"svg",
|
|
1880
|
-
{
|
|
1881
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1882
|
-
height: "24",
|
|
1883
|
-
viewBox: "0 0 24 24",
|
|
1884
|
-
width: "24",
|
|
1885
|
-
"aria-labelledby": titleId,
|
|
1886
|
-
...props,
|
|
1887
|
-
children: [
|
|
1888
|
-
title ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("title", { id: titleId, children: title }) : null,
|
|
1889
|
-
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
1890
|
-
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("path", { d: "M14.06 9.02l.92.92L5.92 19H5v-.92l9.06-9.06M17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75z" })
|
|
1891
|
-
]
|
|
1892
|
-
}
|
|
1893
|
-
);
|
|
1894
|
-
}
|
|
1895
|
-
|
|
1896
|
-
// src/icons/VideoIcon.tsx
|
|
1897
|
-
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
1898
|
-
var VideoIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "#5f6368", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
1899
|
-
"path",
|
|
1900
|
-
{
|
|
1901
|
-
d: "M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h480q33 0 56.5 23.5T720-720v180l160-160v440L720-420v180q0 33-23.5 56.5T640-160H160Zm0-80h480v-480H160v480Zm0 0v-480 480Z",
|
|
1902
|
-
fill: "currentColor"
|
|
1903
|
-
}
|
|
1904
|
-
) });
|
|
1905
|
-
|
|
1906
|
-
// src/icons/AudioIcon.tsx
|
|
1907
|
-
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
1908
|
-
var AudioIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "#5f6368", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
1909
|
-
"path",
|
|
1910
|
-
{
|
|
1911
|
-
d: "M480-400q-50 0-85-35t-35-85v-240q0-50 35-85t85-35q50 0 85 35t35 85v240q0 50-35 85t-85 35Zm0-240Zm-40 520v-123q-104-14-172-93t-68-184h80q0 83 58.5 141.5T480-320q83 0 141.5-58.5T680-520h80q0 105-68 184t-172 93v123h-80Zm40-360q17 0 28.5-11.5T520-520v-240q0-17-11.5-28.5T480-800q-17 0-28.5 11.5T440-760v240q0 17 11.5 28.5T480-480Z",
|
|
1912
|
-
fill: "currentColor"
|
|
1913
|
-
}
|
|
1914
|
-
) });
|
|
1915
|
-
|
|
1916
|
-
// src/icons/EmptyCanvasIcon.tsx
|
|
1917
|
-
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
1918
|
-
var EmptyCanvasIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "#5f6368", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
1919
|
-
"path",
|
|
1920
|
-
{
|
|
1921
|
-
d: "M240-80q-33 0-56.5-23.5T160-160v-640q0-33 23.5-56.5T240-880h320l240 240v480q0 33-23.5 56.5T720-80H240Zm280-520v-200H240v640h480v-440H520ZM240-800v200-200 640-640Z",
|
|
1922
|
-
fill: "currentColor"
|
|
1923
|
-
}
|
|
1924
|
-
) });
|
|
1925
|
-
|
|
1926
|
-
// src/icons/AddIcon.tsx
|
|
1927
|
-
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
1928
|
-
function AddIcon({
|
|
1929
|
-
className: className2,
|
|
1930
|
-
inline,
|
|
1931
|
-
height = 16,
|
|
1932
|
-
color = "black"
|
|
1933
|
-
}) {
|
|
1934
|
-
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
1935
|
-
"svg",
|
|
1936
|
-
{
|
|
1937
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1938
|
-
height: `${height}px`,
|
|
1939
|
-
viewBox: "0 0 24 24",
|
|
1940
|
-
width: "24px",
|
|
1941
|
-
fill: color,
|
|
1942
|
-
style: { verticalAlign: inline ? "bottom" : void 0 },
|
|
1943
|
-
className: className2,
|
|
1944
|
-
children: [
|
|
1945
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
1946
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z", fill: "currentColor" })
|
|
1947
|
-
]
|
|
1948
|
-
}
|
|
1949
|
-
);
|
|
1950
|
-
}
|
|
1951
|
-
|
|
1952
|
-
// src/icons/MoreMenu.tsx
|
|
1953
|
-
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
1954
|
-
function MoreMenu2() {
|
|
1955
|
-
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
1956
|
-
"svg",
|
|
1957
|
-
{
|
|
1958
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1959
|
-
height: "1em",
|
|
1960
|
-
viewBox: "0 0 24 24",
|
|
1961
|
-
width: "1em",
|
|
1962
|
-
children: [
|
|
1963
|
-
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
1964
|
-
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
1965
|
-
"path",
|
|
1966
|
-
{
|
|
1967
|
-
d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z",
|
|
1968
|
-
fill: "currentColor"
|
|
1969
|
-
}
|
|
1970
|
-
)
|
|
1971
|
-
]
|
|
1972
|
-
}
|
|
1973
|
-
);
|
|
1974
|
-
}
|
|
1975
|
-
|
|
1976
|
-
// src/icons/PreviewIcon.tsx
|
|
1977
|
-
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
1978
|
-
function PreviewIcon(props) {
|
|
1979
|
-
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
1980
|
-
"path",
|
|
1981
|
-
{
|
|
1982
|
-
fill: "currentColor",
|
|
1983
|
-
d: "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5s5 2.24 5 5s-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3s3-1.34 3-3s-1.34-3-3-3"
|
|
1984
|
-
}
|
|
1985
|
-
) });
|
|
1986
|
-
}
|
|
1987
|
-
|
|
1988
|
-
// src/icons/ImageListIcon.tsx
|
|
1989
|
-
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
1990
|
-
function ImageListIcon(props) {
|
|
1991
|
-
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
1992
|
-
"path",
|
|
1993
|
-
{
|
|
1994
|
-
fill: "currentColor",
|
|
1995
|
-
d: "M1 5h2v14H1zm4 0h2v14H5zm17 0H10c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1M11 17l2.5-3.15L15.29 16l2.5-3.22L21 17z"
|
|
1996
|
-
}
|
|
1997
|
-
) });
|
|
1998
|
-
}
|
|
1999
|
-
|
|
2000
|
-
// src/icons/BackIcon.tsx
|
|
2001
|
-
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
2002
|
-
function BackIcon(props) {
|
|
2003
|
-
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("path", { fill: "currentColor", d: "M20 11H7.83l5.59-5.59L12 4l-8 8l8 8l1.41-1.41L7.83 13H20z" }) });
|
|
2004
|
-
}
|
|
2005
|
-
|
|
2006
|
-
// src/icons/GridIcon.tsx
|
|
2007
|
-
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
2008
|
-
function GridIcon(props) {
|
|
2009
|
-
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props, children: [
|
|
2010
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
2011
|
-
"path",
|
|
2012
|
-
{
|
|
2013
|
-
fill: "currentColor",
|
|
2014
|
-
d: "M10 10h4v4h-4zm0 6h4v4h-4zM4 4h4v4H4zm0 6h4v4H4zm0 6h4v4H4zM16 4h4v4h-4zm0 6h4v4h-4zm0 6h4v4h-4zM10 4h4v4h-4z",
|
|
2015
|
-
opacity: ".3"
|
|
2016
|
-
}
|
|
2017
|
-
),
|
|
2018
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
2019
|
-
"path",
|
|
2020
|
-
{
|
|
2021
|
-
fill: "currentColor",
|
|
2022
|
-
d: "M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M8 20H4v-4h4zm0-6H4v-4h4zm0-6H4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4z"
|
|
2023
|
-
}
|
|
2024
|
-
)
|
|
2025
|
-
] });
|
|
2026
|
-
}
|
|
2027
|
-
|
|
2028
|
-
// src/icons/ScaledImageIcon.tsx
|
|
2029
|
-
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
2030
|
-
function ScaledImageIcon(props) {
|
|
2031
|
-
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2032
|
-
"path",
|
|
2033
|
-
{
|
|
2034
|
-
fill: "currentColor",
|
|
2035
|
-
d: "M21 15h2v2h-2zm0-4h2v2h-2zm2 8h-2v2c1 0 2-1 2-2M13 3h2v2h-2zm8 4h2v2h-2zm0-4v2h2c0-1-1-2-2-2M1 7h2v2H1zm16-4h2v2h-2zm0 16h2v2h-2zM3 3C2 3 1 4 1 5h2zm6 0h2v2H9zM5 3h2v2H5zm-4 8v8c0 1.1.9 2 2 2h12V11zm2 8l2.5-3.21l1.79 2.15l2.5-3.22L13 19z"
|
|
2036
|
-
}
|
|
2037
|
-
) });
|
|
2038
|
-
}
|
|
2039
|
-
|
|
2040
|
-
// src/ErrorMessage.tsx
|
|
2041
|
-
var import_tailwind_merge8 = require("tailwind-merge");
|
|
2042
|
-
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
2043
|
-
function ErrorMessage({ children, small = false, className: className2 }) {
|
|
2044
|
-
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
2045
|
-
"div",
|
|
2046
|
-
{
|
|
2047
|
-
className: (0, import_tailwind_merge8.twMerge)(
|
|
2048
|
-
"bg-red-500 text-white",
|
|
2049
|
-
"border-1 drop-shadow border-red-700 w-full rounded-md py-2 px-4 leading-[1.9em] flex items-center",
|
|
2050
|
-
"has-[a]:text-white",
|
|
2051
|
-
small && "text-xs whitespace-nowrap py-1 px-2 leading-[1.6em] w-fit",
|
|
2052
|
-
className2
|
|
2053
|
-
),
|
|
2054
|
-
children
|
|
2055
|
-
}
|
|
2056
|
-
);
|
|
2057
|
-
}
|
|
2058
|
-
|
|
2059
|
-
// src/hooks.ts
|
|
2060
|
-
var import_react10 = require("react");
|
|
2061
|
-
function useFastList(list, firstRender = 24) {
|
|
2062
|
-
const [isMounted, setIsMounted] = (0, import_react10.useState)(false);
|
|
2063
|
-
(0, import_react10.useLayoutEffect)(() => {
|
|
2064
|
-
if (list) {
|
|
2065
|
-
setTimeout(() => {
|
|
2066
|
-
setIsMounted(true);
|
|
2067
|
-
}, 0);
|
|
2068
|
-
}
|
|
2069
|
-
}, [list]);
|
|
2070
|
-
if (!list) {
|
|
2071
|
-
return [];
|
|
2072
|
-
}
|
|
2073
|
-
if (isMounted) {
|
|
2074
|
-
return list;
|
|
2075
|
-
}
|
|
2076
|
-
return list.slice(0, firstRender);
|
|
2077
|
-
}
|
|
2078
|
-
|
|
2079
|
-
// src/RenderTextualContent.tsx
|
|
2080
|
-
var import_react11 = require("react");
|
|
2081
|
-
var import_react_aria_components10 = require("react-aria-components");
|
|
2082
|
-
var import_react_iiif_vault8 = require("react-iiif-vault");
|
|
2083
|
-
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
2084
|
-
function RenderTextualContent(props) {
|
|
2085
|
-
const languages = props.strategy.items.map(
|
|
2086
|
-
(item) => Object.keys(item.text)[0]
|
|
2087
|
-
);
|
|
2088
|
-
const [langauge, setLanguage] = (0, import_react11.useState)(languages[0]);
|
|
2089
|
-
const selected = props.strategy.items.find(
|
|
2090
|
-
(item) => Object.keys(item.text)[0] === langauge
|
|
2091
|
-
);
|
|
2092
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "overflow-y-auto bg-white shadow", children: [
|
|
2093
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "flex gap-2 border-b", children: languages.map((language) => {
|
|
2094
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
2095
|
-
import_react_aria_components10.Button,
|
|
2096
|
-
{
|
|
2097
|
-
className: `py-1 px-3 ${langauge === language ? "bg-me-500 text-white" : "bg-white text-black"}`,
|
|
2098
|
-
onPress: () => setLanguage(language),
|
|
2099
|
-
children: language
|
|
2100
|
-
},
|
|
2101
|
-
language
|
|
2102
|
-
);
|
|
2103
|
-
}) }),
|
|
2104
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "p-4 prose", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
2105
|
-
import_react_iiif_vault8.LocaleString,
|
|
2106
|
-
{
|
|
2107
|
-
enableDangerouslySetInnerHTML: true,
|
|
2108
|
-
defaultText: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "text-gray-500 my-8", children: "No content available" }),
|
|
2109
|
-
children: selected?.text
|
|
2110
|
-
}
|
|
2111
|
-
) })
|
|
2112
|
-
] });
|
|
2113
|
-
}
|
|
2114
|
-
|
|
2115
|
-
// src/IIIFMediaPlayer.tsx
|
|
2116
|
-
var import_base = require("@vidstack/react/player/styles/base.css");
|
|
2117
|
-
var import_theme = require("@vidstack/react/player/styles/default/theme.css");
|
|
2118
|
-
var import_captions = require("@vidstack/react/player/styles/default/captions.css");
|
|
2119
|
-
var import_video = require("@vidstack/react/player/styles/default/layouts/video.css");
|
|
2120
|
-
var import_react12 = require("@vidstack/react");
|
|
2121
|
-
var import_default = require("@vidstack/react/player/layouts/default");
|
|
2122
|
-
var import_helpers2 = require("@iiif/helpers");
|
|
2123
|
-
var import_react13 = require("react");
|
|
2124
|
-
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
2125
|
-
function IIIFMediaPlayer(props) {
|
|
2126
|
-
const mediaPlayer = (0, import_react13.useRef)(null);
|
|
2127
|
-
const captions = props.captions || [];
|
|
2128
|
-
const language = props.language;
|
|
2129
|
-
const timeRef = (0, import_react13.useRef)(props.startTime || 0);
|
|
2130
|
-
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
2131
|
-
import_react12.MediaPlayer,
|
|
2132
|
-
{
|
|
2133
|
-
onTimeUpdate: (time) => {
|
|
2134
|
-
const newT = Math.round(time.currentTime);
|
|
2135
|
-
if (timeRef.current === newT)
|
|
2136
|
-
return;
|
|
2137
|
-
timeRef.current = newT;
|
|
2138
|
-
},
|
|
2139
|
-
ref: mediaPlayer,
|
|
2140
|
-
lang: language,
|
|
2141
|
-
className: "h-full w-full min-w-[275px] flex radius-0",
|
|
2142
|
-
playsInline: true,
|
|
2143
|
-
currentTime: props.startTime,
|
|
2144
|
-
duration: props.media.duration,
|
|
2145
|
-
src: [
|
|
2146
|
-
{
|
|
2147
|
-
src: props.media.url,
|
|
2148
|
-
type: props.media.format
|
|
2149
|
-
}
|
|
2150
|
-
],
|
|
2151
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_react12.MediaProvider, { className: "w-full h-full [&>video]:w-full [&>video]:h-full [&>video]:object-contain", children: [
|
|
2152
|
-
captions.map((caption) => {
|
|
2153
|
-
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
2154
|
-
import_react12.Track,
|
|
2155
|
-
{
|
|
2156
|
-
src: caption.id,
|
|
2157
|
-
kind: "subtitles",
|
|
2158
|
-
label: (0, import_helpers2.getValue)(caption.label),
|
|
2159
|
-
default: caption.language === language,
|
|
2160
|
-
language: caption.language
|
|
2161
|
-
},
|
|
2162
|
-
caption.id
|
|
2163
|
-
);
|
|
2164
|
-
}),
|
|
2165
|
-
props.poster ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
2166
|
-
import_react12.Poster,
|
|
2167
|
-
{
|
|
2168
|
-
className: "absolute inset-0 bg-black block h-full w-full opacity-0 transition-opacity data-[visible]:opacity-100 object-contain",
|
|
2169
|
-
src: props.poster
|
|
2170
|
-
}
|
|
2171
|
-
) : null,
|
|
2172
|
-
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Gestures, {}),
|
|
2173
|
-
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
2174
|
-
import_default.DefaultVideoLayout,
|
|
2175
|
-
{
|
|
2176
|
-
className: "z-1",
|
|
2177
|
-
noGestures: true,
|
|
2178
|
-
icons: import_default.defaultLayoutIcons
|
|
2179
|
-
}
|
|
2180
|
-
)
|
|
2181
|
-
] })
|
|
2182
|
-
}
|
|
2183
|
-
);
|
|
2184
|
-
}
|
|
2185
|
-
function Gestures() {
|
|
2186
|
-
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_jsx_runtime70.Fragment, { children: [
|
|
2187
|
-
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
2188
|
-
import_react12.Gesture,
|
|
2189
|
-
{
|
|
2190
|
-
className: "pointer-coarse:hidden absolute top-0 start-12 bottom-20 right-0 -z-1 block",
|
|
2191
|
-
event: "pointerup",
|
|
2192
|
-
action: "toggle:paused"
|
|
2193
|
-
}
|
|
2194
|
-
),
|
|
2195
|
-
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react12.Gesture, { className: "absolute inset-0 z-0 block h-full w-full", event: "dblpointerup", action: "toggle:fullscreen" })
|
|
2196
|
-
] });
|
|
2197
|
-
}
|
|
17
|
+
`}function r(){i.current.style.transform=``,a.current.style.backgroundImage=``}let o=!1,s=()=>{e=i.current.getBoundingClientRect(),o=!0},c=()=>{o=!1,r()},l=e=>{o&&n(e)};return i.current.addEventListener(`mouseenter`,s),i.current.addEventListener(`mouseleave`,c),i.current.addEventListener(`mousemove`,l),()=>{i.current.removeEventListener(`mouseenter`,s),i.current.removeEventListener(`mouseleave`,c),i.current.removeEventListener(`mousemove`,l)}},[]),(0,l.jsxs)(`div`,{ref:i,className:(0,u.twMerge)(`relative transition-all hover:duration-50`,t&&`hover:shadow-xl`,e),...r,children:[n,(0,l.jsx)(`div`,{className:`pointer-events-none absolute inset-0 transition-all`,style:{backgroundImage:`radial-gradient(circle at 50% -20%, #ffffff00, #ffffff00)`},ref:a})]})}function k(e){return(0,l.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:[(0,l.jsx)(`title`,{children:`Text`}),(0,l.jsx)(`path`,{fill:`currentColor`,d:`M3 21v-2h18v2zm0-4v-2h12v2zm0-4v-2h18v2zm0-4V7h12v2zm0-4V3h18v2z`})]})}function A(e){return(0,l.jsx)(`svg`,{width:`1em`,height:`1em`,viewBox:`0 0 42 42`,xmlns:`http://www.w3.org/2000/svg`,stroke:`currentColor`,...e,children:(0,l.jsxs)(`g`,{transform:`translate(2 2)`,strokeWidth:5,fill:`none`,fillRule:`evenodd`,children:[(0,l.jsx)(`circle`,{strokeOpacity:.5,cx:18,cy:18,r:18}),(0,l.jsx)(`path`,{d:`M36 18c0-9.94-8.06-18-18-18`,children:(0,l.jsx)(`animateTransform`,{attributeName:`transform`,type:`rotate`,from:`0 18 18`,to:`360 18 18`,dur:`1s`,repeatCount:`indefinite`})})]})})}function j({cover:e,fade:t=!0}){return(0,l.jsx)(h.LazyLoadComponent,{children:(0,l.jsx)(oe,{cover:e,fade:t})})}const M=new Map;function oe({cover:e,fade:t=!0}){let[n]=(0,f.useRenderingStrategy)();return n.type===`images`&&n.images.length>1?(0,l.jsx)(le,{cover:e,fade:t}):n.type===`textual-content`?(0,l.jsx)(`div`,{className:`text-black/30 flex items-center justify-center h-full bg-me-gray-100 animate-fadeInDelayed absolute inset-0`,children:(0,l.jsx)(k,{className:`w-16 h-16`})}):(0,l.jsx)(se,{cover:e,fade:t})}function se({cover:e,fade:t=!0}){(0,p.useRef)(null);let n=(0,f.useCanvas)(),r=n?!!M.get(n?.id):!1,[i,a]=(0,p.useState)(!r),o=(0,f.useThumbnail)({height:256,width:256},!0),s=o?.id;n?.id&&s?M.set(n.id,s):n?.id&&M.get(n.id)&&(s=M.get(n?.id)),(0,p.useEffect)(()=>{s&&!r&&a(!0)},[s,r]);let c=(0,p.useCallback)(e=>{e&&!r&&(e.complete||e.naturalWidth>0)&&a(!1)},[r]);return(0,l.jsxs)(`div`,{className:`w-full h-full relative`,children:[o?.id?(0,l.jsx)(`img`,{onLoad:()=>a(!1),ref:c,src:o?.id,alt:``,className:`select-none w-full h-full ${e?`object-cover`:`object-contain`} ${i?`opacity-0`:r?``:`animate-fadeIn`}`}):(0,l.jsx)(ce,{}),!o?.id||i?(0,l.jsx)(`div`,{className:(0,u.twMerge)(`absolute inset-0 flex items-center justify-center bg-me-gray-100 text-2xl z-10`,t&&`animate-fadeIn`),children:(0,l.jsx)(A,{})}):null]})}function ce(){let[e]=(0,f.useRenderingStrategy)();return e.type===`textual-content`?(0,l.jsx)(`div`,{className:`text-black/30 flex items-center justify-center h-full bg-me-gray-100 animate-fadeInDelayed absolute inset-0`,children:(0,l.jsx)(k,{className:`w-16 h-16`})}):(0,l.jsx)(`div`,{className:`text-black/30 flex items-center justify-center h-full bg-me-gray-100 animate-fadeInDelayed absolute inset-0`,children:`No thumbnail`})}function le({cover:e,fade:t=!0}){let n=(0,f.useCanvas)(),[r]=(0,f.useRenderingStrategy)(),i=(0,f.useVault)(),a=(0,p.useMemo)(()=>(0,m.createThumbnailHelper)(i),[i]),[o,s]=(0,p.useState)({canvasId:null,imagesToRender:[]});return(0,p.useEffect)(()=>{let e=new AbortController;return(async()=>{if(!n||r.type!==`images`||r.images.length<=1)return;let t=[];for(let o of r.images){let r=o.annotation.body[0]?i.get(o.annotation.body[0]):o.annotation;if(await a.getBestThumbnailAtSize(r,{width:256,height:256,maxWidth:768,maxHeight:768,unsafeImageService:!0,allowUnsafe:!0,returnAllOptions:!0}).then(n=>{if(!e.signal.aborted&&n.best?.type===`fixed`){if(n.best.id.includes(`/full/full/`)){t.push({image:{...n.best,id:n.best.id.replace(`/full/full/`,`/full/256,/`)},target:o.target});return}t.push({image:n.best,target:o.target})}}),e.signal.aborted)return;s({canvasId:n.id,imagesToRender:t})}})().catch(e=>{}),()=>{e.abort()}},[r,a]),!o||!n||o.canvasId!==n?.id?(0,l.jsx)(`div`,{className:(0,u.twMerge)(`absolute inset-0 flex items-center justify-center bg-me-gray-100 text-2xl z-10`,t&&`animate-fadeIn`),children:(0,l.jsx)(A,{})}):(0,l.jsx)(`div`,{className:`flex items-center justify-center w-full h-full`,children:(0,l.jsx)(`div`,{className:`relative overflow-hidden margin-auto h-full w-full basis-[content] bg-white`,style:{aspectRatio:`${n.width/n.height}`},children:o.imagesToRender.map(e=>(0,l.jsx)(`div`,{className:`absolute`,style:{width:`${e.target.spatial.width/n.width*100}%`,height:`${e.target.spatial.height/n.height*100}%`,top:`${e.target.spatial.y/n.height*100}%`,left:`${e.target.spatial.x/n.width*100}%`},children:(0,l.jsx)(`img`,{className:`w-full h-full object-cover select-none`,src:e.image.id})},e.image.id))})})}const N=(...e)=>(0,u.twMerge)((0,ee.clsx)(e));function ue(e){let{dragProps:t}=(0,d.useDrag)({isDisabled:!e.dragState,getItems(){return[{"text/plain":JSON.stringify(e.dragState)}]}});return(0,l.jsx)(f.CanvasContext,{canvas:e.id,children:(0,l.jsxs)(`div`,{...e.dragState?t:{},onClick:e.onClick,className:(0,u.twMerge)(`flex flex-col`,e.className),"data-canvas-selected":e.selected,...e.containerProps||{},children:[(0,l.jsxs)(`div`,{className:`bg-me-gray-100 relative w-full aspect-square group flex-1 overflow-hidden rounded`,children:[(0,l.jsx)(O,{"data-canvas-selected":e.active,"aria-selected":e.active,className:N(`border-2 border-transparent p-1 w-full h-full rounded select-none`,e.selected&&`border-me-primary-500`),children:(0,l.jsx)(j,{})}),e.icon||null]}),e.hideLabel?null:e.customLabel?e.customLabel({className:`text-sm text-center truncate mt-1`}):(0,l.jsx)(ae,{className:`text-sm text-center truncate mt-1`,as:`div`})]})})}function P(e){return(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 -960 960 960`,"aria-label":`collection`,role:`img`,...e,children:(0,l.jsx)(`path`,{d:`M320-320h480v-480h-80v280l-100-60-100 60v-280H320v480Zm0 80q-33 0-56.5-23.5T240-320v-480q0-33 23.5-56.5T320-880h480q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H320ZM160-80q-33 0-56.5-23.5T80-160v-560h80v560h560v80H160Zm360-720h200-200Zm-200 0h480-480Z`,fill:`currentColor`})})}function de({isActive:e,onAction:t}){let n=(0,f.useCollection)({}),{pressProps:r}=(0,d.usePress)({onPress:t});return(0,l.jsxs)(`li`,{"aria-label":(0,te.getValue)(n?.label),className:`border-b-2 border-b-gray-200 flex p-2 gap-3 text-left truncate items-center w-full hover:bg-gray-100 data-[active]:bg-gray-200 data-[active]:border-b-me-primary-500`,"data-active":e||void 0,...r,children:[(0,l.jsx)(P,{"data-active":e||void 0,className:`flex-shrink-0 text-2xl data-[active]:text-me-primary-500 text-gray-400`}),(0,l.jsx)(f.LocaleString,{children:n?.label})]})}function fe({onPress:e,children:t}){return(0,l.jsx)(c.Button,{className:`bg-me-primary-500 px-3 py-1 hover:bg-me-primary-600 text-white rounded`,onPress:e,children:t})}function pe({children:e,className:t,...n}){return(0,l.jsx)(`button`,{className:N(`bg-white border border-me-primary-500 text-xs py-1 px-2 rounded text-me-primary-600 hover:bg-me-primary-50`,t),...n,children:e})}function me(e){return(0,l.jsx)(c.ListBox,{orientation:`horizontal`,"aria-label":e.label,selectionMode:`single`,items:e.items,className:`grid grid-sm gap-4 p-4 mb-8`,children:e=>(0,l.jsx)(he,{...e})})}function he(e){return(0,l.jsxs)(c.ListBoxItem,{id:e.id,onAction:e.onClick,className:e=>(0,u.twMerge)(`bg-white p-2 border-me-gray-300 rounded-md border hover:border-me-primary-500`,e.isFocused&&`border-me-primary-500 outline-me-primary-500 outline-2`),children:[(0,l.jsx)(`div`,{className:`rounded bg-me-gray-300 mb-2 flex items-center justify-center py-1 aspect-square`,children:(0,l.jsx)(`div`,{className:`text-center [&>svg]:w-16 [&>svg]:h-16`,children:e.icon})}),(0,l.jsx)(`div`,{className:`text-center font-semibold text-sm`,children:e.title}),(0,l.jsx)(`div`,{className:`text-sm text-center text-black/50`,children:e.description})]})}const F=e=>(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`#5f6368`,viewBox:`0 -960 960 960`,...e,children:(0,l.jsx)(`path`,{d:`M480-320 280-520l56-58 104 104v-326h80v326l104-104 56 58-200 200ZM240-160q-33 0-56.5-23.5T160-240v-120h80v120h480v-120h80v120q0 33-23.5 56.5T720-160H240Z`,fill:`currentColor`})});function I({initialOpen:e=!1,placement:t=`top`,open:n,onOpenChange:r}={}){let[i,a]=p.useState(e),o=n??i,s=r??a,c=(0,g.useFloating)({placement:t,open:o,onOpenChange:s,whileElementsMounted:g.autoUpdate,middleware:[(0,g.offset)(5),(0,g.flip)({crossAxis:t.includes(`-`),fallbackAxisSideDirection:`start`,padding:5}),(0,g.shift)({padding:5})]}),l=c.context,u=(0,g.useInteractions)([(0,g.useHover)(l,{move:!1,enabled:n==null}),(0,g.useFocus)(l,{enabled:n==null}),(0,g.useDismiss)(l),(0,g.useRole)(l,{role:`tooltip`})]);return p.useMemo(()=>({open:o,setOpen:s,...u,...c}),[o,s,u,c])}const L=p.createContext(null),R=()=>{let e=p.useContext(L);if(e==null)throw Error(`Tooltip components must be wrapped in <Tooltip />`);return e};function z({children:e,...t}){let n=I(t);return(0,l.jsx)(L.Provider,{value:n,children:e})}const B=p.forwardRef(function({children:e,as:t,asChild:n=!1,...r},i){let a=R(),o=e.ref,s=(0,g.useMergeRefs)([a.refs.setReference,i,o]);return n&&p.isValidElement(e)?p.cloneElement(e,a.getReferenceProps({ref:s,...r,...e.props,"data-state":a.open?`open`:`closed`})):(0,l.jsx)(t||c.Button,{ref:s,"data-state":a.open?`open`:`closed`,...a.getReferenceProps(r),children:e})}),V=p.forwardRef(function({style:e,root:t,...n},r){let i=R(),a=(0,g.useMergeRefs)([i.refs.setFloating,r]);return i.open?(0,l.jsx)(g.FloatingPortal,{root:t,children:(0,l.jsx)(`div`,{ref:a,style:{...i.floatingStyles,...e},...i.getFloatingProps(n)})}):null});function H(e){return(0,l.jsx)(V,{root:e.root,className:(0,u.twMerge)(`bg-me-gray-900 text-white text-sm px-3 py-2 rounded opacity-90 z-50`,e.className),children:e.children})}function ge({label:e,id:t,getData:n,fileName:r,fileType:i}){let a=(0,d.useId)(t);return(0,l.jsx)(z,{placement:`bottom`,children:(0,l.jsxs)(B,{className:`bg-me-gray-100 hover:bg-me-primary-500 hover:text-white p-1 rounded-md text-me-primary-500 text-2xl`,"aria-label":e,id:a,onPress:()=>U(n(),r,i),children:[(0,l.jsx)(F,{"aria-labelledby":t}),(0,l.jsx)(H,{children:e})]})})}function U(e,t,n=`text/json`){let r=e instanceof Blob?e:new Blob([e],{type:n}),i=document.createElement(`a`);i.download=t,i.href=window.URL.createObjectURL(r);let a=new MouseEvent(`click`,{view:window,bubbles:!0,cancelable:!0});i.dispatchEvent(a),i.remove()}function _e(e){return(0,l.jsx)(`div`,{className:N(`flex items-center justify-center text-gray-400 text-md`,e.$noMargin?``:`m-4`,e.$box?`p-4 border border-gray-200 rounded`:``),children:e.children})}function ve({children:e,small:t=!1,className:n}){return(0,l.jsx)(`div`,{className:(0,u.twMerge)(`bg-red-500 text-white`,`border-1 drop-shadow border-red-700 w-full rounded-md py-2 px-4 leading-[1.9em] flex items-center`,`has-[a]:text-white`,t&&`text-xs whitespace-nowrap py-1 px-2 leading-[1.6em] w-fit`,n),children:e})}function ye({className:e,...t}){return(0,l.jsx)(c.Label,{className:N(`font-semibold text-sm`,e),...t})}function be({className:e,...t}){return(0,l.jsx)(c.RadioGroup,{className:N(``,e),...t})}function xe({className:e,...t}){return(0,l.jsx)(c.Radio,{className:t=>N(`outline outline-me-primary-500 outline-offset-2 w-5 h-5 rounded-full bg-white transition-all border-[7px] border-gray-700 group-pressed:border-gray-800 outline-0`,e),...t})}function Se({className:e,...t}){return(0,l.jsx)(c.Form,{className:N(``,e),...t})}function Ce({className:e,...t}){return(0,l.jsx)(c.Input,{className:N(`p-2 bg-me-gray-100 border-b border-b-me-gray-500`,`focus:ring-0 outline-0 focus:border-me-primary-500 focus:bg-[#ECEEF5]`,e),...t})}function we({className:e,...t}){return(0,l.jsx)(c.TextArea,{className:N(`p-2 bg-me-gray-100 border-b border-b-me-gray-500`,`focus:ring-0 outline-0 focus:border-me-primary-500 focus:bg-[#ECEEF5]`,e),...t})}function Te({horizontal:e,className:t,...n}){return(0,l.jsx)(`div`,{className:N(`flex flex-col gap-2`,e&&`flex-row`,t),...n})}const Ee={Input:Ce,Form:Se,Label:ye,InputContainer:Te,RadioGroup:be,Radio:xe,TextArea:we},De=(0,p.forwardRef)(function({className:e,...t},n){return(0,l.jsx)(`div`,{ref:n,className:`relative text-2xl flex p-0.5 rounded-sm aspect-square hover:bg-me-primary-100 aria-expanded:bg-me-primary-500 aria-expanded:text-white ${e||``}`,...t})});function Oe({className:e,locale:t}){let n=(0,f.useAnnotation)();return(0,l.jsx)(`div`,{className:e,children:(0,p.useMemo)(()=>{if(!n?.body)return[];let e=[];if(t&&n){let r=n.body.filter(e=>(Array.isArray(e.language)?e.language[0]:e.language)===t);e=r.length?r:[n.body[0]]}else e=n.body;return e.filter(e=>e).map(e=>e.value).filter(Boolean)},[t,n]).map((e,t)=>(0,l.jsx)(`div`,{className:`prose-headings:mt-1 prose-headings:mb-1 prose-sm`,children:(0,l.jsx)(`div`,{dangerouslySetInnerHTML:{__html:e}})},t))})}function W({editorRef:e,...t}){return(0,l.jsx)(b.MDXEditor,{plugins:(0,p.useMemo)(()=>[(0,b.headingsPlugin)({allowedHeadingLevels:[2,3]}),(0,b.listsPlugin)(),(0,b.linkPlugin)(),(0,b.quotePlugin)(),(0,b.thematicBreakPlugin)(),(0,b.linkDialogPlugin)(),(0,b.imagePlugin)(),(0,b.diffSourcePlugin)(),(0,b.toolbarPlugin)({toolbarClassName:`mdx-toolbar`,toolbarContents:()=>(0,l.jsxs)(l.Fragment,{children:[` `,(0,l.jsx)(b.UndoRedo,{}),(0,l.jsx)(b.BoldItalicUnderlineToggles,{}),(0,l.jsx)(b.BlockTypeSelect,{}),(0,l.jsx)(b.ListsToggle,{options:[`bullet`,`number`]}),(0,l.jsx)(b.CreateLink,{}),(0,l.jsx)(b.InsertImage,{})]})})],[]),...t,ref:e})}const G=new _.Converter;G.setFlavor(`github`);const ke=new y.default;function Ae({className:e,value:t,onChange:n,disabled:r}){let i=(0,p.useRef)(null),[a,o]=(0,p.useState)(void 0),s=(0,p.useCallback)(()=>{i.current&&n(G.makeHtml(i.current.getMarkdown()))},[]),c=(0,v.useDebounce)(s,400),d=(0,p.useMemo)(()=>ke.turndown(t),[]);return(0,p.useEffect)(()=>{let e=i.current;return()=>{e&&n(G.makeHtml(e.getMarkdown()))}},[]),(0,l.jsx)(W,{editorRef:i,onBlur:s,readOnly:r,className:(0,u.twMerge)([`bg-white prose-sm text-sm border rounded prose-a:text-me-primary-500 prose-a:underline prose-ul:list-disc p-0.5`,`prose-ol:list-decimal`,`focus-within:outline-none focus-within:border-me-primary-500 z-50 relative`].join(` `),e),markdown:d,suppressHtmlProcessing:!0,onError:e=>{console.log(`err`,e)},onChange:e=>{o(e),c()}})}function je(e,t=24){let[n,r]=(0,p.useState)(!1);return(0,p.useLayoutEffect)(()=>{e&&setTimeout(()=>{r(!0)},0)},[e]),e?n?e:e.slice(0,t):[]}globalThis.MS_LS_EMITTER=globalThis.MS_LS_EMITTER||(0,x.default)();const K=globalThis.MS_LS_EMITTER;function Me(e,t,n){let[r,i]=(0,p.useState)(t),[a,o]=q(e,t);return n?[r,i]:[a,o]}function q(e,t){let n=(0,p.useRef)();!n.current&&t!==void 0&&(n.current=JSON.stringify(t));let[r,i]=(0,p.useState)(()=>{try{if(typeof window>`u`||window.localStorage===void 0)return t;let r=window.localStorage.getItem(e);return r!=null&&(n.current=r),r?JSON.parse(r):t}catch(e){return console.log(e),t}});return(0,p.useEffect)(()=>{let t=({valueJson:e})=>{if(e&&e!==n.current)try{i(JSON.parse(e)),n.current=e}catch{}};return K.on(`change:${e}`,t),()=>{K.off(`change:${e}`,t)}},[e]),[r,r=>{try{if(typeof window<`u`&&window.localStorage!==void 0){let a=t;try{a=n.current===void 0?t:JSON.parse(n.current)}catch{}let o=r instanceof Function?r(a):r;i(o);let s=JSON.stringify(o);window.localStorage.setItem(e,s),s!==n.current&&(n.current=s,K.emit(`change:${e}`,{valueJson:s}))}}catch(e){console.log(e)}},n]}function Ne(e,t={}){let{defaultGridSize:n=`grid-md`,onDark:r=!1}=t,[i,a]=q(e||`default-grid-size`,n||`grid-md`);return[{size:i},(0,l.jsxs)(`div`,{className:`flex gap-2 items-center`,id:`grid-options`,children:[(0,l.jsx)(`div`,{className:r?`opacity-90 text-white text-sm`:`opacity-90 text-sm`,children:`Grid size:`}),(0,l.jsx)(D,{onDark:r,primary:i===`grid-sm`,onPress:()=>a(`grid-sm`),children:`Small`}),(0,l.jsx)(D,{onDark:r,primary:i===`grid-md`,onPress:()=>a(`grid-md`),children:`Medium`}),(0,l.jsx)(D,{onDark:r,primary:i===`grid-lg`,onPress:()=>a(`grid-lg`),children:`Large`})]})]}function Pe(e,t){let[n,r]=(0,p.useState)(t.batchSize),i=(0,p.useMemo)(()=>e.slice(0,n),[e,n]),a=(0,p.useCallback)(()=>{r(e=>e+t.batchSize)},[t.batchSize]),o=(0,p.useMemo)(()=>(0,l.jsx)(`div`,{style:{width:1,height:1},ref:e=>{let t=new IntersectionObserver(e=>{e[0]?.isIntersecting&&a()},{root:e?.parentElement,threshold:.1});return e&&t.observe(e),()=>{e&&t.unobserve(e)}}}),[a]),s=n>=e.length;return[s?e:i,{intersector:s?null:o,loadMore:a,isFullyLoaded:s,reset:()=>{r(t.batchSize)}}]}function Fe({children:e,active:t,label:n,disabled:r,onPress:i,root:a,className:o,placement:s=`top`}){return(0,l.jsx)(z,{placement:s,children:(0,l.jsxs)(B,{"aria-label":n,onClick:i,className:(0,u.twMerge)(`rounded flex items-center bg-white justify-center p-2 hover:bg-gray-100 text-2xl`,t?`bg-me-primary-500 bg-opacity-40 hover:bg-opacity-70 hover:bg-me-primary-500`:``,r?`opacity-50 pointer-events-none`:``,o),children:[e,(0,l.jsx)(H,{root:a,className:`translate-x-3 z-50`,children:n})]})})}const Ie=(0,p.forwardRef)(function({className:e,...t},n){return(0,l.jsx)(c.Button,{className:(0,u.twMerge)(`transition-all mt-1 mb-1 opacity-0 transform scale-y-70 focus:ring focus:ring-me-500`,`bg-white h-8 w-8 flex items-center justify-center rounded-full drop-shadow select-none group-hover:opacity-100 text-gray-500`,`hover:text-me-500 hover:bg-me-100`,e),...t,ref:n})});function Le(e){let t=(0,p.useRef)(null),n=e.captions||[],r=e.language,i=(0,p.useRef)(e.startTime||0);return(0,l.jsx)(S.MediaPlayer,{onTimeUpdate:e=>{let t=Math.round(e.currentTime);i.current!==t&&(i.current=t)},ref:t,lang:r,className:`h-full w-full min-w-[275px] flex radius-0`,playsInline:!0,currentTime:e.startTime,duration:e.media.duration,src:[{src:e.media.url,type:e.media.format}],children:(0,l.jsxs)(S.MediaProvider,{className:`w-full h-full [&>video]:w-full [&>video]:h-full [&>video]:object-contain`,children:[n.map(e=>(0,l.jsx)(S.Track,{src:e.id,kind:`subtitles`,label:(0,m.getValue)(e.label),default:e.language===r,language:e.language},e.id)),e.poster?(0,l.jsx)(S.Poster,{className:`absolute inset-0 bg-black block h-full w-full opacity-0 transition-opacity data-[visible]:opacity-100 object-contain`,src:e.poster}):null,(0,l.jsx)(Re,{}),(0,l.jsx)(C.DefaultVideoLayout,{className:`z-1`,noGestures:!0,icons:C.defaultLayoutIcons})]})})}function Re(){return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(S.Gesture,{className:`pointer-coarse:hidden absolute top-0 start-12 bottom-20 right-0 -z-1 block`,event:`pointerup`,action:`toggle:paused`}),(0,l.jsx)(S.Gesture,{className:`absolute inset-0 z-0 block h-full w-full`,event:`dblpointerup`,action:`toggle:fullscreen`})]})}function ze({children:e,small:t=!1,className:n}){return(0,l.jsx)(`div`,{className:(0,u.twMerge)(`bg-me-500 text-white`,`border-1 drop-shadow border-me-700 w-full rounded-md py-2 px-4 leading-[1.9em] flex items-center`,`has-[a]:text-white`,t&&`text-xs whitespace-nowrap py-1 px-2 leading-[1.6em] w-fit`,n),children:e})}function Be({children:e,handle:t,actions:n,grid:r}){return(0,l.jsxs)(`div`,{className:r?`relative flex flex-col`:`flex items-center`,children:[(0,l.jsx)(`div`,{className:`flex-1 min-w-0`,style:{flex:1,minWidth:0},children:e}),(0,l.jsxs)(`div`,{className:r?`absolute flex p-1 gap-1 bg-white z-1 right-1 top-1 rounded`:`flex-shrink-0 flex items-center gap-1 px-1`,children:[n,t]})]})}function Ve({className:e,inline:t,height:n=16,color:r=`black`}){return(0,l.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`${n}px`,viewBox:`0 0 24 24`,width:`24px`,fill:r,style:{verticalAlign:t?`bottom`:void 0},className:e,children:[(0,l.jsx)(`path`,{d:`M0 0h24v24H0z`,fill:`none`}),(0,l.jsx)(`path`,{d:`M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z`,fill:`currentColor`})]})}const He=e=>(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`#5f6368`,viewBox:`0 -960 960 960`,...e,children:(0,l.jsx)(`path`,{d:`M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h360v80H200v560h560v-360h80v360q0 33-23.5 56.5T760-120H200Zm480-480v-80h-80v-80h80v-80h80v80h80v80h-80v80h-80ZM240-280h480L570-480 450-320l-90-120-120 160Zm-40-480v560-560Z`,fill:`currentColor`})});function Ue(e){return(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:(0,l.jsx)(`path`,{fill:`currentColor`,d:`M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm9-2V5H5v14z`})})}function We(e){return(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:(0,l.jsx)(`path`,{fill:`currentColor`,d:`M4 20q-.825 0-1.413-.588T2 18V6q0-.825.588-1.413T4 4h16q.825 0 1.413.588T22 6v5h-2V6H4v12h11v2H4Zm7.075-5.5l1.425-1.425L9.4 10H12V8H6v6h2v-2.575l3.075 3.075ZM17 20v-7h5v7h-5Zm-5-8Z`})})}const Ge=e=>(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`#5f6368`,viewBox:`0 -960 960 960`,...e,children:(0,l.jsx)(`path`,{d:`M480-400q-50 0-85-35t-35-85v-240q0-50 35-85t85-35q50 0 85 35t35 85v240q0 50-35 85t-85 35Zm0-240Zm-40 520v-123q-104-14-172-93t-68-184h80q0 83 58.5 141.5T480-320q83 0 141.5-58.5T680-520h80q0 105-68 184t-172 93v123h-80Zm40-360q17 0 28.5-11.5T520-520v-240q0-17-11.5-28.5T480-800q-17 0-28.5 11.5T440-760v240q0 17 11.5 28.5T480-480Z`,fill:`currentColor`})});function Ke(e){return(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:(0,l.jsx)(`path`,{fill:`currentColor`,d:`M20 11H7.83l5.59-5.59L12 4l-8 8l8 8l1.41-1.41L7.83 13H20z`})})}function qe(e){return(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:(0,l.jsx)(`path`,{fill:`currentColor`,d:`M9 16.17L4.83 12l-1.42 1.41L9 19L21 7l-1.41-1.41z`})})}function Je(){return(0,l.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`24`,viewBox:`0 0 24 24`,width:`24`,children:[(0,l.jsx)(`path`,{d:`M0 0h24v24H0V0z`,fill:`none`}),(0,l.jsx)(`path`,{d:`M13 11h-2v3H8v2h3v3h2v-3h3v-2h-3zm1-9H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z`,fill:`currentColor`})]})}function J(e){return(0,l.jsxs)(`svg`,{height:`1em`,width:`1em`,viewBox:`0 0 24 24`,...e,children:[(0,l.jsx)(`path`,{d:`M0 0h24v24H0z`,fill:`none`}),(0,l.jsx)(`path`,{d:`M0 0h24v24H0V0z`,fill:`none`}),(0,l.jsx)(`path`,{d:`M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z`,fill:`currentColor`})]})}function Ye(e){return(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:(0,l.jsx)(`path`,{fill:`currentColor`,d:`M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12l1.41 1.41L13.41 14l2.12 2.12l-1.41 1.41L12 15.41l-2.12 2.12l-1.41-1.41L10.59 14zM15.5 4l-1-1h-5l-1 1H5v2h14V4z`})})}function Xe(e){return(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:(0,l.jsx)(`path`,{fill:`currentColor`,d:`M14 11c0 .55-.45 1-1 1H4c-.55 0-1-.45-1-1s.45-1 1-1h9c.55 0 1 .45 1 1M3 7c0 .55.45 1 1 1h9c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1m7 8c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1h5c.55 0 1-.45 1-1m8.01-2.13l.71-.71a.996.996 0 0 1 1.41 0l.71.71c.39.39.39 1.02 0 1.41l-.71.71zm-.71.71l-5.16 5.16c-.09.09-.14.21-.14.35v1.41c0 .28.22.5.5.5h1.41c.13 0 .26-.05.35-.15l5.16-5.16z`})})}const Ze=e=>(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`#5f6368`,viewBox:`0 -960 960 960`,...e,children:(0,l.jsx)(`path`,{d:`M240-80q-33 0-56.5-23.5T160-160v-640q0-33 23.5-56.5T240-880h320l240 240v480q0 33-23.5 56.5T720-80H240Zm280-520v-200H240v640h480v-440H520ZM240-800v200-200 640-640Z`,fill:`currentColor`})});function Qe(e){return(0,l.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:[(0,l.jsx)(`path`,{fill:`currentColor`,d:`M10 10h4v4h-4zm0 6h4v4h-4zM4 4h4v4H4zm0 6h4v4H4zm0 6h4v4H4zM16 4h4v4h-4zm0 6h4v4h-4zm0 6h4v4h-4zM10 4h4v4h-4z`,opacity:`.3`}),(0,l.jsx)(`path`,{fill:`currentColor`,d:`M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M8 20H4v-4h4zm0-6H4v-4h4zm0-6H4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4z`})]})}const $e=e=>(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`#5f6368`,viewBox:`0 -960 960 960`,...e,children:(0,l.jsx)(`path`,{d:`M0-360v-240h60v80h80v-80h60v240h-60v-100H60v100H0Zm310 0v-180h-70v-60h200v60h-70v180h-60Zm170 0v-200q0-17 11.5-28.5T520-600h180q17 0 28.5 11.5T740-560v200h-60v-180h-40v140h-60v-140h-40v180h-60Zm320 0v-240h60v180h100v60H800Z`,fill:`currentColor`})}),et=e=>(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`#5f6368`,viewBox:`0 -960 960 960`,...e,children:(0,l.jsx)(`path`,{d:`M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h200v80H200v560h560v-214l80 80v134q0 33-23.5 56.5T760-120H200Zm40-160 120-160 90 120 120-160 150 200H240Zm622-144L738-548q-21 14-45 21t-51 7q-74 0-126-52.5T464-700q0-75 52.5-127.5T644-880q75 0 127.5 52.5T824-700q0 27-8 52t-20 46l122 122-56 56ZM644-600q42 0 71-29t29-71q0-42-29-71t-71-29q-42 0-71 29t-29 71q0 42 29 71t71 29Z`,fill:`currentColor`})}),tt=({mono:e=!0,...t})=>(0,l.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,xmlSpace:`preserve`,width:`1em`,height:`1em`,...t,viewBox:`0 0 493.36 441.333`,children:[(0,l.jsx)(`path`,{d:`m65.242 2178.75 710-263.75-1.25-1900-708.75 261.25v1902.5m738.903 461.34c81.441-240.91-26.473-436.2-241.04-436.2-214.558 0-454.511 195.29-535.953 436.2-81.433 240.89 26.48 436.18 241.039 436.18 214.567 0 454.512-195.29 535.954-436.18`,style:{fill:e?`currentColor`:`#2873ab`,fillOpacity:1,fillRule:`nonzero`,stroke:`none`},transform:`matrix(.13333 0 0 -.13333 0 441.333)`}),(0,l.jsx)(`path`,{d:`M1678.58 2178.75 968.578 1915l1.25-1900 708.752 261.25v1902.5m-743.498 461.34c-81.437-240.91 26.477-436.2 241.038-436.2 214.56 0 454.51 195.29 535.96 436.2 81.43 240.89-26.48 436.18-241.04 436.18-214.57 0-454.52-195.29-535.958-436.18`,style:{fill:e?`currentColor`:`#ed1d33`,fillOpacity:1,fillRule:`nonzero`,stroke:`none`},transform:`matrix(.13333 0 0 -.13333 0 441.333)`}),(0,l.jsx)(`path`,{d:`m1860.24 2178.75 710-263.75-1.25-1900-708.75 261.25v1902.5m743.5 461.34c81.45-240.91-26.47-436.2-241.03-436.2-214.58 0-454.52 195.29-535.96 436.2-81.44 240.89 26.48 436.18 241.03 436.18 214.57 0 454.51-195.29 535.96-436.18`,style:{fill:e?`currentColor`:`#2873ab`,fillOpacity:1,fillRule:`nonzero`,stroke:`none`},transform:`matrix(.13333 0 0 -.13333 0 441.333)`}),(0,l.jsx)(`path`,{d:`M3700.24 3310v-652.5s-230 90-257.5-142.5c-2.5-247.5 0-336.25 0-336.25l257.5 83.75V1690l-258.61-92.5v-1335L2735.24 0v2360s-15 850 965 950`,style:{fill:e?`currentColor`:`#ed1d33`,fillOpacity:1,fillRule:`nonzero`,stroke:`none`},transform:`matrix(.13333 0 0 -.13333 0 441.333)`})]});function nt(e){return(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:(0,l.jsx)(`path`,{fill:`currentColor`,d:`M1 5h2v14H1zm4 0h2v14H5zm17 0H10c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1M11 17l2.5-3.15L15.29 16l2.5-3.22L21 17z`})})}function rt({title:e,titleId:t,...n}){return(0,l.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,"aria-labelledby":t,...n,children:[e?(0,l.jsx)(`title`,{id:t,children:e}):null,(0,l.jsx)(`path`,{d:`M0 0h24v24H0V0z`,fill:`none`}),(0,l.jsx)(`path`,{d:`M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z`,fill:`currentColor`})]})}function it({title:e,titleId:t,...n}){return(0,l.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`24`,viewBox:`0 0 24 24`,width:`24`,"aria-labelledby":t,...n,children:[e?(0,l.jsx)(`title`,{id:t,children:e}):null,(0,l.jsx)(`path`,{d:`M0 0h24v24H0V0z`,fill:`none`}),(0,l.jsx)(`path`,{d:`M14.06 9.02l.92.92L5.92 19H5v-.92l9.06-9.06M17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75z`})]})}function at({title:e,titleId:t,...n}){return(0,l.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,width:`1em`,height:`1em`,"aria-labelledby":t,...n,children:[e?(0,l.jsx)(`title`,{id:t,children:e}):null,(0,l.jsxs)(`g`,{fill:`none`,children:[(0,l.jsx)(`path`,{d:`M0 0h24v24H0V0z`}),(0,l.jsx)(`path`,{d:`M0 0h24v24H0V0z`,opacity:`.87`})]}),(0,l.jsx)(`path`,{d:`M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7zm-4 6h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z`,fill:`currentColor`})]})}function Y(e){return(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`20 -910 960 960`,"aria-label":`manifest`,role:`img`,...e,children:(0,l.jsx)(`path`,{d:`M480-160q-48-38-104-59t-116-21q-42 0-82.5 11T100-198q-21 11-40.5-1T40-234v-482q0-11 5.5-21T62-752q46-24 96-36t102-12q58 0 113.5 15T480-740v484q51-32 107-48t113-16q36 0 70.5 6t69.5 18v-480q15 5 29.5 10.5T898-752q11 5 16.5 15t5.5 21v482q0 23-19.5 35t-40.5 1q-37-20-77.5-31T700-240q-60 0-116 21t-104 59Zm80-200v-380l200-200v400L560-360Zm-160 65v-396q-33-14-68.5-21.5T260-720q-37 0-72 7t-68 21v397q35-13 69.5-19t70.5-6q36 0 70.5 6t69.5 19Zm0 0v-396 396Z`,fill:`currentColor`})})}function X(e){return(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:(0,l.jsx)(`path`,{fill:`currentColor`,d:`M12 8c1.1 0 2-.9 2-2s-.9-2-2-2s-2 .9-2 2s.9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2`})})}const Z=X;function ot(e){return(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:(0,l.jsx)(`path`,{fill:`currentColor`,d:`M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5s5 2.24 5 5s-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3s3-1.34 3-3s-1.34-3-3-3`})})}function st(e){return(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:(0,l.jsx)(`path`,{fill:`currentColor`,d:`M17 4v16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m-4-2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 18H4V4h9zm8-14v12c.83 0 1.5-.67 1.5-1.5v-9c0-.83-.67-1.5-1.5-1.5`})})}function ct(e){return(0,l.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`1em`,width:`1em`,viewBox:`0 0 24 24`,...e,children:[(0,l.jsx)(`path`,{d:`M0 0h24v24H0V0z`,fill:`none`}),(0,l.jsx)(`path`,{d:`M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8zM6 13c0-1.65.67-3.15 1.76-4.24L6.34 7.34A8.014 8.014 0 0 0 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91z`,fill:`currentColor`})]})}function Q({title:e,...t}){return(0,l.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,height:`1em`,width:`1em`,...t,children:[(0,l.jsx)(`path`,{fill:`none`,d:`M0 0h24v24H0z`}),(0,l.jsx)(`path`,{d:`M20 9H4v2h16V9zM4 15h16v-2H4v2z`}),e?(0,l.jsx)(`title`,{children:e}):null]})}function lt(e){return(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:(0,l.jsx)(`path`,{fill:`currentColor`,d:`M21 15h2v2h-2zm0-4h2v2h-2zm2 8h-2v2c1 0 2-1 2-2M13 3h2v2h-2zm8 4h2v2h-2zm0-4v2h2c0-1-1-2-2-2M1 7h2v2H1zm16-4h2v2h-2zm0 16h2v2h-2zM3 3C2 3 1 4 1 5h2zm6 0h2v2H9zM5 3h2v2H5zm-4 8v8c0 1.1.9 2 2 2h12V11zm2 8l2.5-3.21l1.79 2.15l2.5-3.22L13 19z`})})}function ut(e){return(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:(0,l.jsx)(`path`,{fill:`currentColor`,d:`M21 15h2v2h-2zm0-4h2v2h-2zm2 8h-2v2c1 0 2-1 2-2M13 3h2v2h-2zm8 4h2v2h-2zm0-4v2h2c0-1-1-2-2-2M1 7h2v2H1zm16-4h2v2h-2zm0 16h2v2h-2zM3 3C2 3 1 4 1 5h2zm6 0h2v2H9zM5 3h2v2H5zm-4 8v8c0 1.1.9 2 2 2h12V11zm2 8l2.5-3.21l1.79 2.15l2.5-3.22L13 19z`})})}const dt=e=>(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`#5f6368`,viewBox:`0 -960 960 960`,...e,children:(0,l.jsx)(`path`,{d:`M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h480q33 0 56.5 23.5T720-720v180l160-160v440L720-420v180q0 33-23.5 56.5T640-160H160Zm0-80h480v-480H160v480Zm0 0v-480 480Z`,fill:`currentColor`})}),ft=e=>(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`#5f6368`,viewBox:`0 -960 960 960`,...e,children:(0,l.jsx)(`path`,{d:`M616-242q-27 1-51.5 1.5t-43.5.5h-41q-71 0-133-2-53-2-104.5-5.5T168-257q-26-7-45-26t-26-45q-6-23-9.5-56T82-447q-2-36-2-73t2-73q2-30 5.5-63t9.5-56q7-26 26-45t45-26q23-6 74.5-9.5T347-798q62-2 133-2t133 2q53 2 104.5 5.5T792-783q26 7 45 26t26 45q6 23 9.5 56t5.5 63q2 36 2 73v17q-19-8-39-12.5t-41-4.5q-83 0-141.5 58.5T600-320q0 21 4 40.5t12 37.5ZM400-400l208-120-208-120v240Zm360 200v-80h-80v-80h80v-80h80v80h80v80h-80v80h-80Z`,fill:`currentColor`})});function pt(){return(0,l.jsx)(c.Button,{slot:`drag`,className:`rounded-sm cursor-move bg-transparent text-gray-500 hover:bg-gray-300`,children:(0,l.jsx)(Q,{className:`text-xl cursor-move`})})}function mt(e){return(0,l.jsx)(`svg`,{width:`1em`,height:`1em`,viewBox:`0 0 206 27`,xmlns:`http://www.w3.org/2000/svg`,className:`me-logo h-[23px] w-[176px]`,...e,children:(0,l.jsxs)(`g`,{fill:`none`,children:[(0,l.jsx)(`path`,{d:`M62.558 5.41v14.873h-2.983v-9.675l-3.985 9.675h-2.26l-4.006-9.675v9.675H46.34V5.41h3.388l4.73 11.06L59.19 5.41zm2.173 8.928c0-1.194.238-2.252.714-3.176.476-.923 1.123-1.633 1.94-2.13.816-.498 1.73-.746 2.738-.746.88 0 1.651.177 2.312.532.66.355 1.19.803 1.588 1.343V8.477h3.004v11.806h-3.004v-1.726c-.384.554-.913 1.012-1.588 1.374-.675.363-1.453.544-2.334.544-.994 0-1.9-.256-2.717-.767-.816-.512-1.463-1.233-1.939-2.163-.476-.93-.714-2-.714-3.207Zm9.292.042c0-.724-.143-1.346-.427-1.864a3.005 3.005 0 0 0-1.15-1.194 3.076 3.076 0 0 0-1.556-.415c-.554 0-1.066.135-1.534.405-.47.27-.85.664-1.14 1.182-.292.519-.437 1.133-.437 1.844 0 .71.145 1.331.437 1.864.29.533.674.941 1.15 1.226.476.284.984.426 1.524.426.554 0 1.073-.139 1.556-.416a3.005 3.005 0 0 0 1.15-1.193c.284-.519.427-1.14.427-1.865Zm12.466-6.073c1.406 0 2.543.444 3.41 1.332.866.888 1.3 2.127 1.3 3.718v6.926h-2.984v-6.52c0-.938-.234-1.66-.703-2.164-.47-.504-1.108-.756-1.918-.756-.824 0-1.474.252-1.95.756-.476.505-.714 1.226-.714 2.163v6.521h-2.983V8.477h2.983v1.47a4.121 4.121 0 0 1 1.524-1.203 4.713 4.713 0 0 1 2.035-.437Zm9.057-1.237c-.526 0-.963-.166-1.311-.5a1.657 1.657 0 0 1-.522-1.247c0-.497.174-.912.522-1.246.348-.334.785-.5 1.31-.5.526 0 .963.166 1.311.5.348.334.522.75.522 1.246 0 .498-.174.913-.522 1.247-.348.334-.785.5-1.31.5Zm1.47 1.407v11.806h-2.983V8.477h2.983Zm8.354 2.451h-2.068v9.355h-3.026v-9.355h-1.342v-2.45h1.342V7.88c0-1.45.412-2.515 1.236-3.197.824-.682 2.067-1.001 3.73-.959V6.24c-.725-.014-1.23.106-1.513.362-.284.256-.427.718-.427 1.385v.49h2.068v2.451Zm12.913 3.197c0 .426-.028.81-.085 1.15h-8.63c.07.853.369 1.52.895 2.003.525.483 1.172.725 1.939.725 1.108 0 1.896-.476 2.365-1.428h3.218c-.34 1.137-.994 2.07-1.96 2.802-.967.732-2.153 1.098-3.56 1.098-1.136 0-2.155-.252-3.057-.757a5.325 5.325 0 0 1-2.11-2.141c-.504-.924-.756-1.99-.756-3.197 0-1.222.248-2.294.745-3.218a5.204 5.204 0 0 1 2.089-2.13c.895-.498 1.925-.746 3.09-.746 1.122 0 2.127.241 3.015.724a5.1 5.1 0 0 1 2.067 2.057c.49.887.735 1.907.735 3.058Zm-3.09-.853c-.014-.767-.29-1.381-.83-1.843-.54-.462-1.201-.693-1.982-.693-.74 0-1.36.224-1.865.671-.504.448-.813 1.07-.927 1.865h5.604Zm9.782 7.203c-.966 0-1.833-.174-2.6-.522-.767-.348-1.375-.82-1.822-1.417a3.591 3.591 0 0 1-.735-1.982h3.004c.057.454.281.83.672 1.13.39.298.877.447 1.46.447.568 0 1.012-.114 1.331-.341.32-.227.48-.519.48-.874 0-.383-.196-.671-.586-.863-.391-.192-1.012-.401-1.865-.629-.88-.213-1.602-.433-2.163-.66a3.755 3.755 0 0 1-1.449-1.044c-.405-.47-.607-1.101-.607-1.897 0-.653.188-1.25.564-1.79.377-.54.917-.966 1.62-1.279.703-.312 1.53-.468 2.483-.468 1.406 0 2.528.351 3.367 1.054.838.704 1.3 1.652 1.385 2.845h-2.856c-.042-.469-.238-.841-.586-1.118-.348-.277-.813-.416-1.396-.416-.54 0-.955.1-1.246.298a.951.951 0 0 0-.437.831c0 .398.199.7.597.906.397.206 1.015.416 1.854.629.852.213 1.555.433 2.11.66a3.727 3.727 0 0 1 1.438 1.055c.405.476.614 1.105.628 1.886 0 .682-.188 1.293-.564 1.833-.377.54-.917.962-1.62 1.268-.703.305-1.524.458-2.461.458Zm10.569-9.547v5.711c0 .398.096.686.288.863.192.178.515.267.97.267h1.385v2.514h-1.875c-2.515 0-3.772-1.222-3.772-3.665v-5.69h-1.407v-2.45h1.407v-2.92h3.004v2.92h2.643v2.45h-2.643Zm12.851-3.111v3.73h5.007v2.364h-5.007v3.943h5.647v2.43h-8.631V5.386h8.63v2.43zm7.585 6.521c0-1.194.239-2.252.715-3.176.476-.923 1.126-1.633 1.95-2.13.824-.498 1.74-.746 2.749-.746.767 0 1.498.167 2.194.5.697.334 1.25.778 1.663 1.332V4.514h3.026v15.77h-3.026v-1.748c-.37.582-.888 1.051-1.556 1.406s-1.442.533-2.323.533a5.07 5.07 0 0 1-2.727-.767c-.824-.512-1.474-1.233-1.95-2.163-.476-.93-.714-2-.714-3.207Zm9.292.042c0-.724-.142-1.346-.426-1.864a3.005 3.005 0 0 0-1.151-1.194 3.076 3.076 0 0 0-1.556-.415 3.02 3.02 0 0 0-1.534.405c-.469.27-.849.664-1.14 1.182-.291.519-.437 1.133-.437 1.844 0 .71.146 1.331.437 1.864.291.533.675.941 1.15 1.226a2.93 2.93 0 0 0 1.524.426c.554 0 1.073-.139 1.556-.416a3.005 3.005 0 0 0 1.15-1.193c.285-.519.427-1.14.427-1.865Zm7.438-7.31c-.527 0-.963-.166-1.311-.5a1.657 1.657 0 0 1-.523-1.247c0-.497.174-.912.523-1.246.348-.334.784-.5 1.31-.5s.963.166 1.31.5c.349.334.523.75.523 1.246 0 .498-.174.913-.522 1.247-.348.334-.785.5-1.31.5Zm1.47 1.407v11.806h-2.984V8.477h2.984Zm6.414 2.451v5.711c0 .398.096.686.287.863.192.178.515.267.97.267h1.385v2.514h-1.875c-2.515 0-3.772-1.222-3.772-3.665v-5.69h-1.406v-2.45h1.406v-2.92h3.005v2.92h2.642v2.45h-2.642Zm10.036 9.547c-1.136 0-2.159-.252-3.068-.757a5.447 5.447 0 0 1-2.141-2.141c-.519-.924-.778-1.99-.778-3.197s.266-2.273.799-3.196a5.553 5.553 0 0 1 2.184-2.142c.924-.504 1.954-.756 3.09-.756 1.137 0 2.167.252 3.09.756a5.553 5.553 0 0 1 2.184 2.142c.533.923.8 1.989.8 3.196 0 1.208-.274 2.273-.821 3.197a5.681 5.681 0 0 1-2.216 2.141c-.93.505-1.971.757-3.122.757Zm0-2.6a3.1 3.1 0 0 0 1.524-.394c.476-.263.856-.657 1.14-1.183.285-.526.427-1.165.427-1.918 0-1.122-.295-1.985-.885-2.589a2.907 2.907 0 0 0-2.163-.906c-.852 0-1.566.302-2.141.906-.576.604-.863 1.467-.863 2.59 0 1.122.28 1.985.841 2.588.562.604 1.268.906 2.12.906Zm11.338-7.565a4.194 4.194 0 0 1 1.502-1.47c.618-.356 1.325-.533 2.12-.533v3.132h-.788c-.938 0-1.644.22-2.12.661-.476.44-.714 1.208-.714 2.302v5.881h-2.984V8.477h2.984v1.833Z`,fill:`#000`}),(0,l.jsx)(`path`,{fill:`#E94581`,className:`me-logo-1`,d:`M0 13.343 13.343 0l13.343 13.343-13.343 13.343z`}),(0,l.jsx)(`path`,{fill:`#E94581`,className:`me-logo-2`,d:`M12.137 13.346 25.48.003l13.343 13.343L25.48 26.69z`}),(0,l.jsx)(`path`,{fill:`#C63E75`,className:`me-logo-3`,d:`m12.104 13.348 7.311-7.311 7.312 7.311-7.312 7.312z`})]})})}function ht({isActive:e,onAction:t}){let n=(0,f.useManifest)(),{pressProps:r}=(0,d.usePress)({onPress:t});return(0,l.jsxs)(`li`,{"aria-label":(0,m.getValue)(n?.label),className:`border-b-2 border-b-gray-200 flex p-2 gap-3 text-left truncate items-center w-full hover:bg-gray-100 data-[active]:bg-gray-200 data-[active]:border-b-me-primary-500`,"data-active":e||void 0,...r,children:[(0,l.jsx)(Y,{"data-active":e||void 0,className:`flex-shrink-0 text-2xl data-[active]:text-me-primary-500 text-gray-400`}),(0,l.jsx)(f.LocaleString,{children:n?.label})]})}function gt({onCreate:e,canCreate:t}){return(0,l.jsxs)(`div`,{className:`flex items-center flex-col gap-5 py-16`,children:[(0,l.jsx)(O,{shouldTranslate:!0,onClick:t?e:void 0,className:`border-2 border-dotted bg-black/5 aspect-[3/4] rounded w-32 border-black`}),(0,l.jsx)(`div`,{className:`font-bold text-lg`,children:`Let's get started!`}),(0,l.jsx)(`div`,{className:`max-w-xl px-5 my-4`,children:`Add a title and top level information for this manifest using the editing panel on the right, and then add some canvases and content.`}),t?(0,l.jsx)(c.Button,{className:`px-8 font-bold py-2 border rounded-lg border-me-primary-500 text-me-primary-500 hover:border-me-primary-600 hover:text-me-primary-600`,onPress:e,children:`Start adding content`}):null]})}function _t({className:e,label:t,children:n,...r}){return(0,l.jsxs)(`fieldset`,{className:N(`hover:ring ring-gray-200 focus-within:ring-me-primary-500 focus-within:ring p-2 rounded mb-2`,e),...r,children:[(0,l.jsx)(f.LocaleString,{className:`text-lg font-bold text-[#333] mb-2`,as:`h3`,children:t}),n]})}function vt({children:e}){let t=document.getElementById(`modal-back-slot`);return t?(0,T.createPortal)(e,t):null}function yt({id:e,className:t,title:n,open:r=!0,onClose:i,actions:a,children:o}){return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(w.Dialog,{open:r,onClose:i,id:e,className:`relative z-[1000002]`,children:[(0,l.jsx)(`div`,{className:`fixed inset-0 bg-black/30 animate-fadeIn z-[1000003]`,"aria-hidden":`true`}),(0,l.jsx)(`div`,{className:`fixed inset-0 flex w-screen items-center justify-center p-4 z-[1000004]`,children:(0,l.jsx)(`div`,{className:(0,u.twMerge)(`relative p-4 w-full max-w-4xl max-h-full`,t),children:(0,l.jsxs)(w.DialogPanel,{className:`relative bg-white rounded-lg overflow-hidden shadow-2xl max-h-[80vh] flex flex-col`,children:[(0,l.jsxs)(`div`,{className:`flex items-center justify-between gap-3 p-4 rounded-t-lg sticky top-0 bg-white`,children:[(0,l.jsx)(`div`,{id:`modal-back-slot`}),(0,l.jsx)(w.DialogTitle,{className:`text-xl font-semibold text-gray-900 grow`,children:n}),(0,l.jsxs)(w.CloseButton,{className:`text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center`,children:[(0,l.jsx)(`svg`,{className:`w-3 h-3`,"aria-hidden":`true`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 14 14`,children:(0,l.jsx)(`path`,{stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6`})}),(0,l.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]}),(0,l.jsx)(`div`,{className:`flex-1 min-h-0 overflow-y-auto flex flex-col`,children:o}),a?(0,l.jsx)(`div`,{className:`flex items-center p-4 border-t border-gray-200 rounded-b justify-end`,children:a}):null]})})})]})})}function bt(){return(0,l.jsx)(c.Button,{className:`rounded-full bg-gray-200 text-gray-500 hover:bg-me-600 hover:text-white data-[pressed]:bg-me-600 data-[pressed]:text-white`,children:(0,l.jsx)(Z,{className:`text-xl`})})}function xt({id:e,steps:t,forceStart:n,onClose:r}){let[i,a]=q(`tour_step/${e}`,!0);return(0,p.useEffect)(()=>{let t=t=>{t.detail?.id===e&&a(!0)};return window.addEventListener(`onboarding:restart`,t),()=>window.removeEventListener(`onboarding:restart`,t)},[e]),t.length===0?null:(0,l.jsx)(E.default,{showProgress:!0,showSkipButton:!0,continuous:!0,steps:t,run:i||n,callback:e=>{(e.action===`close`||e.action===`skip`||e.action===`stop`||e.action===`reset`)&&(a(!1),r?.())},styles:{options:{primaryColor:`#b84c74`,textColor:`#000000`,zIndex:1e4}}},e)}function St(e){return(0,l.jsx)(`div`,{className:N(`flex w-full p-0.5 opacity-0 transition-opacity duration-300 gap-2`,e.active&&`opacity-1`),children:e.children})}const Ct=(0,p.forwardRef)(({className:e,...t},n)=>(0,l.jsx)(`div`,{ref:n,className:(0,u.twMerge)(`px-4 py-2 flex-1 overflow-visible`,e),...t}));function wt(e){return(0,l.jsx)(z,{placement:`right`,children:(0,l.jsx)(B,{asChild:!0,children:(0,l.jsxs)(c.Button,{className:N(`border-none aspect-square w-full flex justify-center items-center hover:bg-me-primary-100 hover:text-black [&>svg]:text-2xl cursor-default`,e.selected?`bg-me-primary-500 hover:bg-me-primary-600 hover:text-white text-white`:`text-me-gray-700`),"aria-label":e.label,onMouseDown:e.onClick,children:[e.icon,(0,l.jsx)(V,{className:`bg-me-gray-900 text-white text-sm px-3 py-2 rounded opacity-90 z-50`,children:e.label})]})})})}function Tt(e){return(0,l.jsx)(`div`,{className:`bg-white border-me-gray-300 border-t border-r flex flex-col w-12 pb-2`,"data-open":e.open,children:e.items.map(t=>(0,l.jsxs)(l.Fragment,{children:[t.divide?(0,l.jsx)(`div`,{className:`flex-1 block w-2 min-h-1`}):null,(0,l.jsx)(wt,{label:t.label,selected:t.id===e.current&&e.open,icon:t.icon,onClick:t.onClick},t.id)]},t.id))})}function Et(e){let t=e.strategy.items.map(e=>Object.keys(e.text)[0]),[n,r]=(0,p.useState)(t[0]),i=e.strategy.items.find(e=>Object.keys(e.text)[0]===n);return(0,l.jsxs)(`div`,{className:`overflow-y-auto bg-white shadow`,children:[(0,l.jsx)(`div`,{className:`flex gap-2 border-b`,children:t.map(e=>(0,l.jsx)(c.Button,{className:`py-1 px-3 ${n===e?`bg-me-500 text-white`:`bg-white text-black`}`,onPress:()=>r(e),children:e},e))}),(0,l.jsx)(`div`,{className:`p-4 prose`,children:(0,l.jsx)(f.LocaleString,{enableDangerouslySetInnerHTML:!0,defaultText:(0,l.jsx)(`span`,{className:`text-gray-500 my-8`,children:`No content available`}),children:i?.text})})]})}const Dt=(0,p.forwardRef)(function({className:e,...t},n){return(0,l.jsx)(c.Button,{className:(0,u.twMerge)(`transition-all mt-2 mb-2 opacity-0 transform scale-y-70 focus:ring focus:ring-me-500`,`bg-white h-10 w-3 rounded shadow select-none group-hover:opacity-100`,e),...t,ref:n})});function Ot({alwaysVisible:e}){return(0,l.jsx)(c.Checkbox,{slot:`selection`,className:(0,u.twMerge)(`bg-white/50`,`group-hover:opacity-100 block h-5 w-5 shrink-0 rounded border border-gray-300 hover:border-gray-400 ring-offset-1`,`data-[disabled]:hidden data-[indeterminate]:bg-me-700 data-[selected]:bg-me-700 data-[indeterminate]:text-white`,`data-[selected]:border-me-700 data-[indeterminate]:border-me-700`,`data-[selected]:text-white data-[disabled]:opacity-50 data-[focus-visible]:outline-none data-[focus-visible]:ring-2`,`data-[focus-visible]:ring-me-700 data-[focus-visible]:ring-offset-2 data-[focus-visible]:opacity-100`,!e&&`opacity-0 group-hover:opacity-100 data-[selected]:opacity-100 data-[indeterminate]:opacity-100`),children:({isSelected:e,isIndeterminate:t})=>(0,l.jsx)(`div`,{className:`flex items-center justify-center text-current`,children:(0,l.jsx)(`svg`,{viewBox:`0 -960 960 960`,"aria-hidden":`true`,fill:`currentColor`,children:t?(0,l.jsx)(`path`,{d:`M160-440v-80h640v80H160Z`}):e?(0,l.jsx)(`path`,{d:`M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z`}):null})})})}function kt({children:e}){return(0,l.jsx)(`div`,{className:`w-full h-full flex flex-col overflow-hidden`,children:e})}function At({id:e,children:t,className:n,padding:r}){return(0,l.jsx)(`div`,{id:e,className:N(`flex-1 min-h-0 overflow-y-auto pb-64`,n,r&&`px-3 pt-3`),children:t})}function jt(e){let{actions:t,title:n,customActions:r}=e;return(0,l.jsxs)(`div`,{className:`bg-me-gray-100 h-12 flex items-center px-3 z-10 text-black border-b-me-gray-300 border-b flex-shrink-0`,children:[(0,l.jsx)(f.LocaleString,{className:`flex-1`,children:n}),(0,l.jsxs)(`div`,{className:`ml-auto flex gap-2 items-center`,children:[t?.map((e,t)=>e.menu?(0,l.jsxs)(c.MenuTrigger,{children:[(0,l.jsx)(c.Button,{id:e.id,className:N(`p-1 rounded hover:bg-me-gray-300`,e.toggled&&`bg-me-gray-300`,e.disabled&&`opacity-50 cursor-not-allowed`),"aria-label":typeof e.title==`string`?e.title:``,isDisabled:e.disabled,children:e.icon},t),(0,l.jsx)(c.Popover,{placement:`bottom right`,children:e.menu})]},t):(0,l.jsxs)(z,{placement:`bottom`,children:[(0,l.jsx)(B,{asChild:!0,children:(0,l.jsx)(c.Button,{id:e.id,className:N(`p-1 rounded hover:bg-me-gray-300`,e.toggled&&`bg-me-gray-300`,e.disabled&&`opacity-50 cursor-not-allowed`),onPress:e.onClick,"aria-label":typeof e.title==`string`?e.title:``,isDisabled:e.disabled,children:e.icon},t)}),e.disabled?null:(0,l.jsx)(H,{children:e.title})]},t)),r]})]})}function Mt({menu:e,menuId:t,selectedKey:n,onSelectionChange:r}){let i=(0,p.useRef)(null),[a,o]=(0,p.useState)(0),[s,u]=(0,p.useState)(null),d=(0,p.useRef)([]),f=(0,p.useRef)([]),m=(0,p.useMemo)(()=>e.findIndex(e=>e.id===n),[e,n]);(0,p.useLayoutEffect)(()=>{let e=()=>{if(d.current.length===0){d.current=[];for(let e of f.current)e&&d.current.push(e.getBoundingClientRect().width)}if(d.current.reduce((e,t)=>e+t,0)&&i.current){let e=i.current.getBoundingClientRect().width-20,t=0,n=0;for(let r=d.current.length-1;r>=0;r--)if(n+=d.current[r],n>e){t=r+1;break}o(t)}};e();let t=setInterval(e,500);return()=>{clearInterval(t)}},[]);let h=e.filter((t,n)=>a>=e.length-n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(c.Tabs,{className:`w-full flex-1 overflow-hidden flex flex-col`,selectedKey:n,onSelectionChange:r,children:[(0,l.jsxs)(`div`,{className:`flex items-center w-full tab-shadow`,children:[(0,l.jsx)(c.TabList,{ref:i,className:`flex-1 overflow-hidden w-full flex text-sm whitespace-nowrap`,children:e.map((t,n)=>{let r=a>=e.length-n;return(0,l.jsx)(c.Tab,{ref:e=>f.current[n]=e,id:t.id,className:e=>N(`border-b-2 px-2 py-1 text-sm text-gray-400 select-none hover:text-black focus:ring-0 focus:outline-none`,e.isSelected&&`border-me-primary-500 text-black`,e.isFocusVisible&&`ring-0 bg-me-gray-100`,r&&`hidden`),children:t.label},t.id)})}),(0,l.jsx)(`div`,{ref:u,id:`hidden-menu`})]}),e.map(e=>(0,l.jsx)(c.TabPanel,{id:e.id,className:`flex-1 overflow-y-auto h-full`,children:e.renderComponent},e.id))]},t),s&&a>0?(0,T.createPortal)((0,l.jsx)(Nt,{hidden:a,menuHidden:h,selectedIndex:m,selectedKey:n,onSelectionChange:r}),s):null]})}const Nt=(0,ne.createHideableComponent)(({selectedIndex:e,hidden:t,menuHidden:n,selectedKey:r,onSelectionChange:i})=>(0,l.jsxs)(c.MenuTrigger,{children:[(0,l.jsx)(c.Button,{className:N(`border-none rounded bg-gray-100 px-1.5 py-1 mr-2 mb-1 text-me-primary-500 semibold uppercase text-[10px]`,e>t&&`bg-me-primary-500 text-white rounded`),children:`MORE`}),(0,l.jsx)(c.Popover,{children:n.length?(0,l.jsx)(c.Menu,{className:`bg-white rounded shadow-lg flex flex-col gap-0.5 p-0.5 min-w-28`,children:n.map(e=>(0,l.jsx)(c.MenuItem,{className:t=>N(`hover:bg-me-gray-100 p-1 rounded-sm text-sm`,r===e.id&&`ring ring-me-primary-500`),onAction:()=>i?.(e.id),children:e.label},e.id))}):null})]})),$=({title:e,titleId:t,...n})=>(0,l.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 -960 960 960`,"aria-labelledby":t,...n,children:[e?(0,l.jsx)(`title`,{id:t,children:e}):null,(0,l.jsx)(`path`,{fill:`currentColor`,d:`M160-120v-170l527-526q12-12 27-18t30-6q16 0 30.5 6t25.5 18l56 56q12 11 18 25.5t6 30.5q0 15-6 30t-18 27L330-120H160Zm80-80h56l393-392-28-29-29-28-392 393v56Zm560-503-57-57 57 57Zm-139 82-29-28 57 57-28-29ZM560-120q74 0 137-37t63-103q0-36-19-62t-51-45l-59 59q23 10 36 22t13 26q0 23-36.5 41.5T560-200q-17 0-28.5 11.5T520-160q0 17 11.5 28.5T560-120ZM183-426l60-60q-20-8-31.5-16.5T200-520q0-12 18-24t76-37q88-38 117-69t29-70q0-55-44-87.5T280-840q-45 0-80.5 16T145-785q-11 13-9 29t15 26q13 11 29 9t27-13q14-14 31-20t42-6q41 0 60.5 12t19.5 28q0 14-17.5 25.5T262-654q-80 35-111 63.5T120-520q0 32 17 54.5t46 39.5Z`})]}),Pt=({title:e,titleId:t,...n})=>(0,l.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 -960 960 960`,"aria-labelledby":t,...n,children:[e?(0,l.jsx)(`title`,{id:t,children:e}):null,(0,l.jsx)(`path`,{fill:`currentColor`,d:`M272-120 64-480l208-360h416l208 360-208 360H272Zm46-80h324l161-280-161-280H318L156-480l162 280Zm162-280Z`})]});function Ft({title:e,titleId:t,...n}){return(0,l.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,"aria-labelledby":t,...n,children:[e?(0,l.jsx)(`title`,{id:t,children:e}):null,(0,l.jsxs)(`g`,{fill:`none`,fillRule:`evenodd`,children:[(0,l.jsx)(`path`,{d:`M0 0h20v20H0z`}),(0,l.jsx)(`path`,{stroke:`currentColor`,strokeLinecap:`square`,strokeWidth:2,d:`m8.5 11.5 6-6M16 4v3m0-3h-3m0 14L2 7`}),(0,l.jsx)(`path`,{stroke:`currentColor`,strokeOpacity:.407,strokeWidth:2,d:`m2 7 5-5 11 11-5 5z`})]})]})}function It({title:e,titleId:t,...n}){return(0,l.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,"aria-labelledby":t,...n,children:[e?(0,l.jsx)(`title`,{id:t,children:e}):null,(0,l.jsxs)(`g`,{fill:`none`,fillRule:`evenodd`,children:[(0,l.jsx)(`circle`,{cx:4.5,cy:4.5,r:2.5,fill:`currentColor`}),(0,l.jsx)(`circle`,{cx:15.5,cy:15.5,r:2.5,fill:`currentColor`}),(0,l.jsx)(`path`,{stroke:`currentColor`,strokeLinecap:`square`,strokeWidth:2,d:`m13.5 13.5-9-9`})]})]})}const Lt=({title:e,titleId:t,...n})=>(0,l.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 -960 960 960`,"aria-labelledby":t,...n,children:[e?(0,l.jsx)(`title`,{id:t,children:e}):null,(0,l.jsx)(`path`,{fill:`currentColor`,d:`M600-80v-100L320-320H120v-240h172l108-124v-196h240v240H468L360-516v126l240 120v-50h240v240H600ZM480-720h80v-80h-80v80ZM200-400h80v-80h-80v80Zm480 240h80v-80h-80v80ZM520-760ZM240-440Zm480 240Z`})]}),Rt=({title:e,titleId:t,...n})=>(0,l.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 -960 960 960`,"aria-labelledby":t,...n,children:[e?(0,l.jsx)(`title`,{id:t,children:e}):null,(0,l.jsx)(`path`,{fill:`currentColor`,d:`M600-360ZM320-242q10 1 19.5 1.5t20.5.5q11 0 20.5-.5T400-242v82h400v-400h-82q1-10 1.5-19.5t.5-20.5q0-11-.5-20.5T718-640h82q33 0 56.5 23.5T880-560v400q0 33-23.5 56.5T800-80H400q-33 0-56.5-23.5T320-160v-82Zm40-78q-117 0-198.5-81.5T80-600q0-117 81.5-198.5T360-880q117 0 198.5 81.5T640-600q0 117-81.5 198.5T360-320Zm0-80q83 0 141.5-58.5T560-600q0-83-58.5-141.5T360-800q-83 0-141.5 58.5T160-600q0 83 58.5 141.5T360-400Zm0-200Z`})]}),zt=({title:e,titleId:t,...n})=>(0,l.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 -960 960 960`,"aria-labelledby":t,...n,children:[e?(0,l.jsx)(`title`,{id:t,children:e}):null,(0,l.jsx)(`path`,{fill:`currentColor`,d:`M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm0 0v-560 560Z`})]}),Bt=({title:e,titleId:t,...n})=>(0,l.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 -960 960 960`,"aria-labelledby":t,...n,children:[e?(0,l.jsx)(`title`,{id:t,children:e}):null,(0,l.jsx)(`path`,{d:`m80-160 400-640 400 640H80Zm144-80h512L480-650 224-240Zm256-205Z`,fill:`currentColor`})]}),Vt=`bg-me-gray-100 border hover:bg-me-gray-300 rounded p-1 text-2xl text-me-primary-500 data-[active="true"]:border-me-primary-600`,Ht={DrawIcon:(0,l.jsx)($,{}),PolygonIcon:(0,l.jsx)(Lt,{}),LineIcon:(0,l.jsx)(It,{}),LineBoxIcon:(0,l.jsx)(Ft,{}),ShapesIcon:(0,l.jsx)(Rt,{}),SquareIcon:(0,l.jsx)(zt,{}),TriangleIcon:(0,l.jsx)(Bt,{}),HexagonIcon:(0,l.jsx)(Pt,{}),DeleteForeverIcon:(0,l.jsx)(J,{})};function Ut({helper:e,showShapes:t}){return(0,p.useEffect)(()=>{e.stamps.square()},[]),(0,l.jsx)(f.RenderSvgEditorControls,{icons:Ht,showShapes:t,classNames:{button:`bg-me-gray-100 border hover:bg-me-gray-300 rounded p-1 text-2xl text-me-primary-500 data-[active="true"]:border-me-primary-600`}})}function Wt({className:e,children:t,...n}){return(0,l.jsx)(c.Tabs,{className:t=>N(``,typeof e==`function`?e(t):e),...n,children:t})}function Gt({className:e,children:t,...n}){return(0,l.jsx)(c.TabList,{className:t=>N(`flex gap-4`,typeof e==`function`?e(t):e),...n,children:t})}function Kt({className:e,children:t,...n}){return(0,l.jsx)(c.Tab,{className:t=>{let n=typeof e==`function`?e(t):e;return N(`cursor-default outline-none group py-1 font-semibold px-2 border-b-2 text-me-gray-700`,t.isSelected&&`border-b-me-primary-600 text-black`,t.isFocusVisible&&`focus-visible:bg-me-primary-100`,n)},...n,children:t})}function qt({className:e,children:t,...n}){return(0,l.jsx)(c.TabPanel,{className:t=>N(``,typeof e==`function`?e(t):e),...n,children:t})}function Jt(e){return e.wide?(0,l.jsx)(`div`,{className:(0,u.twMerge)(`grid`,e.size||`grid-md`,`gap-4 p-4 overflow-y-auto`),children:e.children}):(0,l.jsx)(`div`,{className:`grid grid-cols-2 gap-4 p-4`,children:e.children})}function Yt({children:e,small:t=!1,className:n}){return(0,l.jsx)(`div`,{className:(0,u.twMerge)(`bg-orange-500 text-white`,`border-1 drop-shadow border-orange-700 w-full rounded-md py-2 px-4 leading-[1.9em] flex items-center`,`has-[a]:text-white`,t&&`text-xs whitespace-nowrap py-1 px-2 leading-[1.6em] w-fit`,n),children:e})}exports.AccessibilityButton=re,exports.ActionButton=D,exports.AddIcon=Ve,exports.AddImageIcon=He,exports.AnnotationPopInIcon=Ue,exports.AnnotationPopOutIcon=We,exports.AtlasBanner=ie,exports.AudioIcon=Ge,exports.BackIcon=Ke,exports.CanvasThumbnailGridItem=ue,exports.Card3D=O,exports.CheckIcon=qe,exports.CollectionIcon=P,exports.CollectionListItem=de,exports.ConfirmSelectionButton=fe,exports.ControlButton=pe,exports.CreateCanvasIcon=Je,exports.CreatorGrid=me,exports.DefaultTooltipContent=H,exports.DeleteForeverIcon=J,exports.DeleteIcon=Ye,exports.DownloadButton=ge,exports.DownloadIcon=F,exports.EditTextIcon=Xe,exports.EmptyCanvasIcon=Ze,exports.EmptyState=_e,exports.ErrorMessage=ve,exports.Form=Ee,exports.GridIcon=Qe,exports.HTMLAnnotationBodyRender=Oe,exports.HTMLEditor=Ae,exports.HTMLIcon=$e,exports.HandleContainer=De,exports.IIIFBrowserIcon=et,exports.IIIFLogo=tt,exports.IIIFMediaPlayer=Le,exports.IconButton=Fe,exports.IconHandle=Ie,exports.ImageListIcon=nt,exports.InfoIcon=rt,exports.InfoMessage=ze,exports.ItemWithHandle=Be,exports.LazyThumbnail=j,exports.ListEditIcon=it,exports.ListResizeDragHandle=pt,exports.ListingIcon=at,exports.MDXEditor=W,exports.ManifestEditorLogo=mt,exports.ManifestIcon=Y,exports.ManifestListItem=ht,exports.ManifestOverviewEmptyState=gt,exports.MetadataContainer=_t,exports.Modal=yt,exports.ModalBackSlot=vt,exports.MoreMenu=X,exports.MoreMenuButton=bt,exports.MoreMenuIcon=Z,exports.OnboardingTour=xt,exports.OpaqueControls=St,exports.PaddedSidebarContainer=Ct,exports.PanelSideMenu=Tt,exports.PreviewIcon=ot,exports.RangesIcon=st,exports.RenderTextualContent=Et,exports.ResetIcon=ct,exports.ResizeHandle=Dt,exports.ResizeHandleIcon=Q,exports.ScaledImageIcon=lt,exports.SelectionCheckbox=Ot,exports.Sidebar=kt,exports.SidebarContent=At,exports.SidebarHeader=jt,exports.SidebarTabs=Mt,exports.Spinner=A,exports.SvgControlBar=Ut,exports.Tab=Kt,exports.TabList=Gt,exports.TabPanel=qt,exports.Tabs=Wt,exports.TargetIcon=ut,exports.TextIcon=k,exports.ThumbnailGridContainer=Jt,exports.Tooltip=z,exports.TooltipContent=V,exports.TooltipTrigger=B,exports.VideoIcon=dt,exports.WarningMessage=Yt,exports.YouTubeIcon=ft,exports.createDownload=U,exports.useFastList=je,exports.useGridOptions=Ne,exports.useLoadMoreItems=Pe,exports.useLocalStorage=q,exports.useOptionalLocalStorage=Me,exports.useTooltip=I,exports.useTooltipContext=R;
|