@manifest-editor/components 1.4.3 → 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.js
CHANGED
|
@@ -1,2213 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
// src/index.tsx
|
|
4
|
-
import "iiif-browser/dist/index.css";
|
|
5
|
-
|
|
6
|
-
// src/ActionButton.tsx
|
|
7
|
-
import { Button } from "react-aria-components";
|
|
8
|
-
import { twMerge } from "tailwind-merge";
|
|
9
|
-
import { jsx } from "react/jsx-runtime";
|
|
10
|
-
function ActionButton({
|
|
11
|
-
className: className2,
|
|
12
|
-
primary,
|
|
13
|
-
center,
|
|
14
|
-
large,
|
|
15
|
-
children,
|
|
16
|
-
...props
|
|
17
|
-
}) {
|
|
18
|
-
return /* @__PURE__ */ jsx(
|
|
19
|
-
Button,
|
|
20
|
-
{
|
|
21
|
-
className: (t) => twMerge(
|
|
22
|
-
//
|
|
23
|
-
"border-none flex gap-1 items-center bg-gray-100 text-me-primary-500 text-sm rounded hover:bg-gray-200",
|
|
24
|
-
primary ? "bg-me-primary-500 text-white hover:bg-me-primary-600" : "",
|
|
25
|
-
center ? "place-content-center" : "",
|
|
26
|
-
large ? "px-4 py-2" : "px-2 py-1",
|
|
27
|
-
t.isDisabled ? "opacity-70 cursor-not-allowed pointer-events-none" : "",
|
|
28
|
-
typeof className2 === "string" ? className2 : className2?.(t)
|
|
29
|
-
),
|
|
30
|
-
...props,
|
|
31
|
-
children
|
|
32
|
-
}
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// src/AccessibilityButton.tsx
|
|
37
|
-
import { Button as Button2 } from "react-aria-components";
|
|
38
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
39
|
-
function AccessibilityButton({ className: className2, children, ...props }) {
|
|
40
|
-
return /* @__PURE__ */ jsx2(Button2, { className: ["sr-only focus:not-sr-only p-2 bg-white text-black", className2].join(" "), ...props, children });
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// src/utils.ts
|
|
44
|
-
import { clsx } from "clsx";
|
|
45
|
-
import { twMerge as twMerge2 } from "tailwind-merge";
|
|
46
|
-
var cn = (...inputs) => {
|
|
47
|
-
return twMerge2(clsx(inputs));
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
// src/Tooltip.tsx
|
|
51
|
-
import {
|
|
52
|
-
FloatingPortal,
|
|
53
|
-
autoUpdate,
|
|
54
|
-
flip,
|
|
55
|
-
offset,
|
|
56
|
-
shift,
|
|
57
|
-
useDismiss,
|
|
58
|
-
useFloating,
|
|
59
|
-
useFocus,
|
|
60
|
-
useHover,
|
|
61
|
-
useInteractions,
|
|
62
|
-
useMergeRefs,
|
|
63
|
-
useRole
|
|
64
|
-
} from "@floating-ui/react";
|
|
65
|
-
import * as React from "react";
|
|
66
|
-
import { Button as Button3 } from "react-aria-components";
|
|
67
|
-
import { twMerge as twMerge3 } from "tailwind-merge";
|
|
68
|
-
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
69
|
-
function useTooltip({
|
|
70
|
-
initialOpen = false,
|
|
71
|
-
placement = "top",
|
|
72
|
-
open: controlledOpen,
|
|
73
|
-
onOpenChange: setControlledOpen
|
|
74
|
-
} = {}) {
|
|
75
|
-
const [uncontrolledOpen, setUncontrolledOpen] = React.useState(initialOpen);
|
|
76
|
-
const open = controlledOpen ?? uncontrolledOpen;
|
|
77
|
-
const setOpen = setControlledOpen ?? setUncontrolledOpen;
|
|
78
|
-
const data = useFloating({
|
|
79
|
-
placement,
|
|
80
|
-
open,
|
|
81
|
-
onOpenChange: setOpen,
|
|
82
|
-
whileElementsMounted: autoUpdate,
|
|
83
|
-
middleware: [
|
|
84
|
-
offset(5),
|
|
85
|
-
flip({
|
|
86
|
-
crossAxis: placement.includes("-"),
|
|
87
|
-
fallbackAxisSideDirection: "start",
|
|
88
|
-
padding: 5
|
|
89
|
-
}),
|
|
90
|
-
shift({ padding: 5 })
|
|
91
|
-
]
|
|
92
|
-
});
|
|
93
|
-
const context = data.context;
|
|
94
|
-
const hover = useHover(context, {
|
|
95
|
-
move: false,
|
|
96
|
-
enabled: controlledOpen == null
|
|
97
|
-
});
|
|
98
|
-
const focus = useFocus(context, {
|
|
99
|
-
enabled: controlledOpen == null
|
|
100
|
-
});
|
|
101
|
-
const dismiss = useDismiss(context);
|
|
102
|
-
const role = useRole(context, { role: "tooltip" });
|
|
103
|
-
const interactions = useInteractions([hover, focus, dismiss, role]);
|
|
104
|
-
return React.useMemo(
|
|
105
|
-
() => ({
|
|
106
|
-
open,
|
|
107
|
-
setOpen,
|
|
108
|
-
...interactions,
|
|
109
|
-
...data
|
|
110
|
-
}),
|
|
111
|
-
[open, setOpen, interactions, data]
|
|
112
|
-
);
|
|
113
|
-
}
|
|
114
|
-
var TooltipContext = React.createContext(null);
|
|
115
|
-
var useTooltipContext = () => {
|
|
116
|
-
const context = React.useContext(TooltipContext);
|
|
117
|
-
if (context == null) {
|
|
118
|
-
throw new Error("Tooltip components must be wrapped in <Tooltip />");
|
|
119
|
-
}
|
|
120
|
-
return context;
|
|
121
|
-
};
|
|
122
|
-
function Tooltip({ children, ...options }) {
|
|
123
|
-
const tooltip = useTooltip(options);
|
|
124
|
-
return /* @__PURE__ */ jsx3(TooltipContext.Provider, { value: tooltip, children });
|
|
125
|
-
}
|
|
126
|
-
var TooltipTrigger = React.forwardRef(function TooltipTrigger2({ children, asChild = false, ...props }, propRef) {
|
|
127
|
-
const context = useTooltipContext();
|
|
128
|
-
const childrenRef = children.ref;
|
|
129
|
-
const ref = useMergeRefs([context.refs.setReference, propRef, childrenRef]);
|
|
130
|
-
if (asChild && React.isValidElement(children)) {
|
|
131
|
-
return React.cloneElement(
|
|
132
|
-
children,
|
|
133
|
-
context.getReferenceProps({
|
|
134
|
-
ref,
|
|
135
|
-
...props,
|
|
136
|
-
...children.props,
|
|
137
|
-
"data-state": context.open ? "open" : "closed"
|
|
138
|
-
})
|
|
139
|
-
);
|
|
140
|
-
}
|
|
141
|
-
return /* @__PURE__ */ jsx3(
|
|
142
|
-
Button3,
|
|
143
|
-
{
|
|
144
|
-
ref,
|
|
145
|
-
"data-state": context.open ? "open" : "closed",
|
|
146
|
-
...context.getReferenceProps(props),
|
|
147
|
-
children
|
|
148
|
-
}
|
|
149
|
-
);
|
|
150
|
-
});
|
|
151
|
-
var TooltipContent = React.forwardRef(function TooltipContent2({ style, root, ...props }, propRef) {
|
|
152
|
-
const context = useTooltipContext();
|
|
153
|
-
const ref = useMergeRefs([context.refs.setFloating, propRef]);
|
|
154
|
-
if (!context.open)
|
|
155
|
-
return null;
|
|
156
|
-
return /* @__PURE__ */ jsx3(FloatingPortal, { root, children: /* @__PURE__ */ jsx3(
|
|
157
|
-
"div",
|
|
158
|
-
{
|
|
159
|
-
ref,
|
|
160
|
-
style: {
|
|
161
|
-
...context.floatingStyles,
|
|
162
|
-
...style
|
|
163
|
-
},
|
|
164
|
-
...context.getFloatingProps(props)
|
|
165
|
-
}
|
|
166
|
-
) });
|
|
167
|
-
});
|
|
168
|
-
function DefaultTooltipContent(props) {
|
|
169
|
-
return /* @__PURE__ */ jsx3(
|
|
170
|
-
TooltipContent,
|
|
171
|
-
{
|
|
172
|
-
root: props.root,
|
|
173
|
-
className: twMerge3("bg-me-gray-900 text-white text-sm px-3 py-2 rounded opacity-90 z-50", props.className),
|
|
174
|
-
children: props.children
|
|
175
|
-
}
|
|
176
|
-
);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
// src/Sidebar.tsx
|
|
180
|
-
import { jsx as jsx4, jsxs } from "react/jsx-runtime";
|
|
181
|
-
function Sidebar({ children }) {
|
|
182
|
-
return /* @__PURE__ */ jsx4("div", { className: "w-full h-full flex flex-col overflow-hidden", children });
|
|
183
|
-
}
|
|
184
|
-
function SidebarContent({
|
|
185
|
-
children,
|
|
186
|
-
className: className2,
|
|
187
|
-
padding
|
|
188
|
-
}) {
|
|
189
|
-
return /* @__PURE__ */ jsx4("div", { className: cn("flex-1 min-h-0 overflow-y-auto pb-64", className2, padding && "px-3 pt-3"), children });
|
|
190
|
-
}
|
|
191
|
-
function SidebarHeader(props) {
|
|
192
|
-
const { actions, title } = props;
|
|
193
|
-
return /* @__PURE__ */ 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: [
|
|
194
|
-
/* @__PURE__ */ jsx4("div", { className: "flex-1", children: title }),
|
|
195
|
-
/* @__PURE__ */ jsx4("div", { className: "ml-auto flex gap-2 items-center", children: actions?.map((action, index) => /* @__PURE__ */ jsxs(Tooltip, { placement: "bottom", children: [
|
|
196
|
-
/* @__PURE__ */ jsx4(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx4(
|
|
197
|
-
"button",
|
|
198
|
-
{
|
|
199
|
-
className: cn(
|
|
200
|
-
//
|
|
201
|
-
`p-1 rounded hover:bg-me-gray-300`,
|
|
202
|
-
action.toggled && "bg-me-gray-300",
|
|
203
|
-
action.disabled && "opacity-50 cursor-not-allowed"
|
|
204
|
-
),
|
|
205
|
-
onClick: action.onClick,
|
|
206
|
-
title: action.title,
|
|
207
|
-
disabled: action.disabled,
|
|
208
|
-
children: action.icon
|
|
209
|
-
},
|
|
210
|
-
index
|
|
211
|
-
) }),
|
|
212
|
-
!action.disabled ? /* @__PURE__ */ jsx4(DefaultTooltipContent, { children: action.title }) : null
|
|
213
|
-
] }, index)) })
|
|
214
|
-
] });
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// src/PanelSideMenu.tsx
|
|
218
|
-
import { Fragment } from "react/jsx-runtime";
|
|
219
|
-
|
|
220
|
-
// src/PanelSideMenuItem.tsx
|
|
221
|
-
import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
222
|
-
function PanelSideMenuItem(props) {
|
|
223
|
-
return /* @__PURE__ */ jsx5(Tooltip, { placement: "right", children: /* @__PURE__ */ jsx5(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs2(
|
|
224
|
-
"button",
|
|
225
|
-
{
|
|
226
|
-
className: cn(
|
|
227
|
-
"border-none aspect-square w-full flex justify-center items-center hover:bg-me-primary-100 hover:text-black [&>svg]:text-2xl cursor-default",
|
|
228
|
-
props.selected ? "bg-me-primary-500 hover:bg-me-primary-600 hover:text-white text-white" : "text-me-gray-700"
|
|
229
|
-
),
|
|
230
|
-
"aria-label": props.label,
|
|
231
|
-
onMouseDown: props.onClick,
|
|
232
|
-
children: [
|
|
233
|
-
props.icon,
|
|
234
|
-
/* @__PURE__ */ jsx5(TooltipContent, { className: "bg-me-gray-900 text-white text-sm px-3 py-2 rounded opacity-90 z-50", children: props.label })
|
|
235
|
-
]
|
|
236
|
-
}
|
|
237
|
-
) }) });
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
// src/PanelSideMenu.tsx
|
|
241
|
-
import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
242
|
-
function PanelSideMenu(props) {
|
|
243
|
-
return /* @__PURE__ */ jsx6("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__ */ jsxs3(Fragment, { children: [
|
|
244
|
-
panel.divide ? /* @__PURE__ */ jsx6("div", { className: "flex-1 block w-2 min-h-1" }) : null,
|
|
245
|
-
/* @__PURE__ */ jsx6(
|
|
246
|
-
PanelSideMenuItem,
|
|
247
|
-
{
|
|
248
|
-
label: panel.label,
|
|
249
|
-
selected: panel.id === props.current && props.open,
|
|
250
|
-
icon: panel.icon,
|
|
251
|
-
onClick: panel.onClick
|
|
252
|
-
},
|
|
253
|
-
panel.id
|
|
254
|
-
)
|
|
255
|
-
] }, panel.id)) });
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
// src/ThumbnailGridContainer.tsx
|
|
259
|
-
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
260
|
-
function ThumbnailGridContainer(props) {
|
|
261
|
-
if (props.wide) {
|
|
262
|
-
return /* @__PURE__ */ jsx7("div", { className: "grid grid-md gap-4 p-4 overflow-y-auto", children: props.children });
|
|
263
|
-
}
|
|
264
|
-
return /* @__PURE__ */ jsx7("div", { className: "grid grid-cols-2 gap-4 p-4", children: props.children });
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
// src/LazyThumbnail.tsx
|
|
268
|
-
import {
|
|
269
|
-
useCallback,
|
|
270
|
-
useEffect,
|
|
271
|
-
useRef,
|
|
272
|
-
useState as useState2
|
|
273
|
-
} from "react";
|
|
274
|
-
import {
|
|
275
|
-
useCanvas,
|
|
276
|
-
useRenderingStrategy,
|
|
277
|
-
useThumbnail
|
|
278
|
-
} from "react-iiif-vault";
|
|
279
|
-
import { LazyLoadComponent } from "react-lazy-load-image-component";
|
|
280
|
-
import { twMerge as twMerge4 } from "tailwind-merge";
|
|
281
|
-
|
|
282
|
-
// src/Spinner.tsx
|
|
283
|
-
import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
284
|
-
function Spinner(props) {
|
|
285
|
-
return /* @__PURE__ */ jsx8(
|
|
286
|
-
"svg",
|
|
287
|
-
{
|
|
288
|
-
width: "1em",
|
|
289
|
-
height: "1em",
|
|
290
|
-
viewBox: "0 0 42 42",
|
|
291
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
292
|
-
stroke: "currentColor",
|
|
293
|
-
...props,
|
|
294
|
-
children: /* @__PURE__ */ jsxs4("g", { transform: "translate(2 2)", strokeWidth: 5, fill: "none", fillRule: "evenodd", children: [
|
|
295
|
-
/* @__PURE__ */ jsx8("circle", { strokeOpacity: 0.5, cx: 18, cy: 18, r: 18 }),
|
|
296
|
-
/* @__PURE__ */ jsx8("path", { d: "M36 18c0-9.94-8.06-18-18-18", children: /* @__PURE__ */ jsx8(
|
|
297
|
-
"animateTransform",
|
|
298
|
-
{
|
|
299
|
-
attributeName: "transform",
|
|
300
|
-
type: "rotate",
|
|
301
|
-
from: "0 18 18",
|
|
302
|
-
to: "360 18 18",
|
|
303
|
-
dur: "1s",
|
|
304
|
-
repeatCount: "indefinite"
|
|
305
|
-
}
|
|
306
|
-
) })
|
|
307
|
-
] })
|
|
308
|
-
}
|
|
309
|
-
);
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
// src/icons/TextIcon.tsx
|
|
313
|
-
import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
314
|
-
function TextIcon(props) {
|
|
315
|
-
return /* @__PURE__ */ jsxs5(
|
|
316
|
-
"svg",
|
|
317
|
-
{
|
|
318
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
319
|
-
width: "1em",
|
|
320
|
-
height: "1em",
|
|
321
|
-
viewBox: "0 0 24 24",
|
|
322
|
-
...props,
|
|
323
|
-
children: [
|
|
324
|
-
/* @__PURE__ */ jsx9("title", { children: "Text" }),
|
|
325
|
-
/* @__PURE__ */ jsx9(
|
|
326
|
-
"path",
|
|
327
|
-
{
|
|
328
|
-
fill: "currentColor",
|
|
329
|
-
d: "M3 21v-2h18v2zm0-4v-2h12v2zm0-4v-2h18v2zm0-4V7h12v2zm0-4V3h18v2z"
|
|
330
|
-
}
|
|
331
|
-
)
|
|
332
|
-
]
|
|
333
|
-
}
|
|
334
|
-
);
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
// src/LazyThumbnail.tsx
|
|
338
|
-
import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
339
|
-
function LazyThumbnail({
|
|
340
|
-
cover,
|
|
341
|
-
fade = true
|
|
342
|
-
}) {
|
|
343
|
-
return /* @__PURE__ */ jsx10(LazyLoadComponent, { children: /* @__PURE__ */ jsx10(LazyThumbnailInner, { cover, fade }) });
|
|
344
|
-
}
|
|
345
|
-
var renderCache = /* @__PURE__ */ new Map();
|
|
346
|
-
function LazyThumbnailInner({
|
|
347
|
-
cover,
|
|
348
|
-
fade = true
|
|
349
|
-
}) {
|
|
350
|
-
const img = useRef(null);
|
|
351
|
-
const canvas = useCanvas();
|
|
352
|
-
const isCached = canvas ? !!renderCache.get(canvas?.id) : false;
|
|
353
|
-
const [isLoading, setIsLoading] = useState2(!isCached);
|
|
354
|
-
const thumbnail = useThumbnail({ height: 256, width: 256 }, true);
|
|
355
|
-
let thumbnailId = thumbnail?.id;
|
|
356
|
-
if (canvas?.id && thumbnailId) {
|
|
357
|
-
renderCache.set(canvas.id, thumbnailId);
|
|
358
|
-
} else if (canvas?.id && renderCache.get(canvas.id)) {
|
|
359
|
-
thumbnailId = renderCache.get(canvas?.id);
|
|
360
|
-
}
|
|
361
|
-
useEffect(() => {
|
|
362
|
-
if (thumbnailId && !isCached) {
|
|
363
|
-
setIsLoading(true);
|
|
364
|
-
}
|
|
365
|
-
}, [thumbnailId, isCached]);
|
|
366
|
-
const checkImage = useCallback(
|
|
367
|
-
(node) => {
|
|
368
|
-
if (node && !isCached) {
|
|
369
|
-
if (node.complete || node.naturalWidth > 0) {
|
|
370
|
-
setIsLoading(false);
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
},
|
|
374
|
-
[isCached]
|
|
375
|
-
);
|
|
376
|
-
return /* @__PURE__ */ jsxs6("div", { className: `w-full h-full relative`, children: [
|
|
377
|
-
thumbnail?.id ? /* @__PURE__ */ jsx10(
|
|
378
|
-
"img",
|
|
379
|
-
{
|
|
380
|
-
onLoad: () => setIsLoading(false),
|
|
381
|
-
ref: checkImage,
|
|
382
|
-
src: thumbnail?.id,
|
|
383
|
-
alt: "",
|
|
384
|
-
className: `w-full h-full ${cover ? "object-cover" : "object-contain"} ${!isLoading ? isCached ? "" : "animate-fadeIn" : "opacity-0"}`
|
|
385
|
-
}
|
|
386
|
-
) : /* @__PURE__ */ jsx10(ThumbnailFallback, {}),
|
|
387
|
-
!thumbnail?.id || isLoading ? /* @__PURE__ */ jsx10(
|
|
388
|
-
"div",
|
|
389
|
-
{
|
|
390
|
-
className: twMerge4(
|
|
391
|
-
"absolute inset-0 flex items-center justify-center bg-me-gray-100 text-2xl z-10",
|
|
392
|
-
fade && "animate-fadeIn"
|
|
393
|
-
),
|
|
394
|
-
children: /* @__PURE__ */ jsx10(Spinner, {})
|
|
395
|
-
}
|
|
396
|
-
) : null
|
|
397
|
-
] });
|
|
398
|
-
}
|
|
399
|
-
function ThumbnailFallback() {
|
|
400
|
-
const [strategy] = useRenderingStrategy();
|
|
401
|
-
if (strategy.type === "textual-content") {
|
|
402
|
-
return /* @__PURE__ */ jsx10("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__ */ jsx10(TextIcon, { className: "w-16 h-16" }) });
|
|
403
|
-
}
|
|
404
|
-
return /* @__PURE__ */ jsx10("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" });
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
// src/CanvasThumbnailGridItem.tsx
|
|
408
|
-
import { CanvasContext } from "react-iiif-vault";
|
|
409
|
-
|
|
410
|
-
// src/CanvasLabel.tsx
|
|
411
|
-
import { LocaleString, useCanvas as useCanvas2 } from "react-iiif-vault";
|
|
412
|
-
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
413
|
-
function CanvasLabel(props) {
|
|
414
|
-
const canvas = useCanvas2();
|
|
415
|
-
if (!canvas)
|
|
416
|
-
return null;
|
|
417
|
-
return /* @__PURE__ */ jsx11(LocaleString, { className: props.className, as: props.as, children: canvas.label });
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
// src/Card3D.tsx
|
|
421
|
-
import { useLayoutEffect as useLayoutEffect2, useRef as useRef2 } from "react";
|
|
422
|
-
import { twMerge as twMerge5 } from "tailwind-merge";
|
|
423
|
-
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
424
|
-
function Card3D({
|
|
425
|
-
className: className2,
|
|
426
|
-
shouldTranslate,
|
|
427
|
-
children,
|
|
428
|
-
...props
|
|
429
|
-
}) {
|
|
430
|
-
const outer = useRef2(null);
|
|
431
|
-
const inner = useRef2(null);
|
|
432
|
-
useLayoutEffect2(() => {
|
|
433
|
-
if (!outer.current || !inner.current)
|
|
434
|
-
return;
|
|
435
|
-
let bounds;
|
|
436
|
-
function rotateToMouse(e) {
|
|
437
|
-
const mouseX = e.clientX;
|
|
438
|
-
const mouseY = e.clientY;
|
|
439
|
-
const leftX = mouseX - bounds.x;
|
|
440
|
-
const topY = mouseY - bounds.y;
|
|
441
|
-
const center = {
|
|
442
|
-
x: leftX - bounds.width / 2,
|
|
443
|
-
y: topY - bounds.height / 2
|
|
444
|
-
};
|
|
445
|
-
const distance = Math.sqrt(center.x ** 2 + center.y ** 2);
|
|
446
|
-
if (shouldTranslate) {
|
|
447
|
-
outer.current.style.transform = `
|
|
1
|
+
"use client";import"./lib-B2FE6TzQ.js";import{Button as e,Checkbox as t,Form as n,Input as r,Label as i,ListBox as a,ListBoxItem as o,Menu as s,MenuItem as c,MenuTrigger as l,Popover as u,Radio as ee,RadioGroup as d,Tab as f,TabList as te,TabPanel as ne,Tabs as p,TextArea as re}from"react-aria-components";import{Fragment as m,jsx as h,jsxs as g}from"react/jsx-runtime";import{twMerge as _}from"tailwind-merge";import{useDrag as ie,useId as ae,usePress as v}from"react-aria";import{CanvasContext as oe,LocaleString as y,RenderSvgEditorControls as se,useAnnotation as ce,useCanvas as b,useCollection as le,useManifest as ue,useRenderingStrategy as x,useThumbnail as de,useVault as fe}from"react-iiif-vault";import*as S from"react";import pe,{forwardRef as C,useCallback as w,useEffect as T,useLayoutEffect as E,useMemo as D,useRef as O,useState as k}from"react";import{createThumbnailHelper as me,getValue as A}from"@iiif/helpers";import{LazyLoadComponent as he}from"react-lazy-load-image-component";import{clsx as ge}from"clsx";import{getValue as _e}from"@iiif/helpers/i18n";import{FloatingPortal as ve,autoUpdate as ye,flip as be,offset as xe,shift as Se,useDismiss as Ce,useFloating as we,useFocus as Te,useHover as Ee,useInteractions as De,useMergeRefs as j,useRole as Oe}from"@floating-ui/react";import{Converter as ke}from"showdown";import{useDebounce as Ae}from"tiny-use-debounce";import je from"turndown";import"@mdxeditor/editor/style.css";import{BlockTypeSelect as Me,BoldItalicUnderlineToggles as Ne,CreateLink as Pe,InsertImage as Fe,ListsToggle as Ie,MDXEditor as Le,UndoRedo as Re,diffSourcePlugin as ze,headingsPlugin as Be,imagePlugin as Ve,linkDialogPlugin as He,linkPlugin as Ue,listsPlugin as We,quotePlugin as Ge,thematicBreakPlugin as Ke,toolbarPlugin as qe}from"@mdxeditor/editor";import Je from"mitt";import"@vidstack/react/player/styles/base.css";import"@vidstack/react/player/styles/default/theme.css";import"@vidstack/react/player/styles/default/captions.css";import"@vidstack/react/player/styles/default/layouts/video.css";import{Gesture as M,MediaPlayer as Ye,MediaProvider as Xe,Poster as Ze,Track as Qe}from"@vidstack/react";import{DefaultVideoLayout as $e,defaultLayoutIcons as et}from"@vidstack/react/player/layouts/default";import{CloseButton as tt,Dialog as nt,DialogPanel as rt,DialogTitle as it}from"@headlessui/react";import{createPortal as N}from"react-dom";import at from"react-joyride";import{createHideableComponent as ot}from"@react-aria/collections";function st({className:t,children:n,...r}){return h(e,{className:[`sr-only focus:not-sr-only p-2 bg-white text-black`,t].join(` `),...r,children:n})}function P({className:t,primary:n,center:r,large:i,onDark:a,children:o,...s}){return h(e,{className:e=>_(`border-none flex gap-1 items-center bg-me-50 flex-nowrap whitespace-nowrap text-me-700 text-sm rounded hover:bg-me-100`,n&&!a?`bg-me-500 text-white hover:bg-me-600`:``,n&&a?`bg-me-700 text-white hover:bg-me-800`:``,r?`place-content-center`:``,i?`px-4 py-2`:`px-2 py-1`,e.isDisabled?`opacity-70 cursor-not-allowed pointer-events-none`:``,typeof t==`string`?t:t?.(e)),...s,children:o})}function ct({children:e,controlsId:t}){return g(`div`,{className:`bg-me-gray-100 border-b text-black p-1 flex gap-4 items-center h-12`,children:[h(`div`,{className:`px-4`,children:e}),h(`div`,{id:t||`atlas-controls`,className:`flex gap-2`})]})}function lt(e){let t=b();return t?h(y,{className:e.className,as:e.as,children:t.label}):null}function F({className:e,shouldTranslate:t,children:n,...r}){let i=O(null),a=O(null);return E(()=>{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=`
|
|
448
2
|
scale3d(1.07, 1.07, 1.07)
|
|
449
3
|
rotate3d(
|
|
450
|
-
${
|
|
451
|
-
${-
|
|
4
|
+
${l.y/100},
|
|
5
|
+
${-l.x/100},
|
|
452
6
|
0,
|
|
453
|
-
${Math.log(
|
|
7
|
+
${Math.log(u)*2}deg
|
|
454
8
|
)
|
|
455
|
-
|
|
456
|
-
}
|
|
457
|
-
inner.current.style.backgroundImage = `
|
|
9
|
+
`),a.current.style.backgroundImage=`
|
|
458
10
|
radial-gradient(
|
|
459
11
|
circle at
|
|
460
|
-
${
|
|
461
|
-
${
|
|
12
|
+
${l.x*2+e.width/2}px
|
|
13
|
+
${l.y*2+e.height/2}px,
|
|
462
14
|
#ffffff66,
|
|
463
15
|
#ffffff00
|
|
464
16
|
)
|
|
465
|
-
`;
|
|
466
|
-
|
|
467
|
-
function reset() {
|
|
468
|
-
outer.current.style.transform = "";
|
|
469
|
-
inner.current.style.backgroundImage = "";
|
|
470
|
-
}
|
|
471
|
-
let isActive = false;
|
|
472
|
-
const mouseenter = () => {
|
|
473
|
-
bounds = outer.current.getBoundingClientRect();
|
|
474
|
-
isActive = true;
|
|
475
|
-
};
|
|
476
|
-
const mouseleave = () => {
|
|
477
|
-
isActive = false;
|
|
478
|
-
reset();
|
|
479
|
-
};
|
|
480
|
-
const mousemove = (e) => {
|
|
481
|
-
if (!isActive)
|
|
482
|
-
return;
|
|
483
|
-
rotateToMouse(e);
|
|
484
|
-
};
|
|
485
|
-
outer.current.addEventListener("mouseenter", mouseenter);
|
|
486
|
-
outer.current.addEventListener("mouseleave", mouseleave);
|
|
487
|
-
outer.current.addEventListener("mousemove", mousemove);
|
|
488
|
-
return () => {
|
|
489
|
-
outer.current.removeEventListener("mouseenter", mouseenter);
|
|
490
|
-
outer.current.removeEventListener("mouseleave", mouseleave);
|
|
491
|
-
outer.current.removeEventListener("mousemove", mousemove);
|
|
492
|
-
};
|
|
493
|
-
}, []);
|
|
494
|
-
return /* @__PURE__ */ jsxs7(
|
|
495
|
-
"div",
|
|
496
|
-
{
|
|
497
|
-
ref: outer,
|
|
498
|
-
className: twMerge5(
|
|
499
|
-
//
|
|
500
|
-
"relative transition-all hover:duration-50",
|
|
501
|
-
shouldTranslate && "hover:shadow-xl",
|
|
502
|
-
className2
|
|
503
|
-
),
|
|
504
|
-
...props,
|
|
505
|
-
children: [
|
|
506
|
-
children,
|
|
507
|
-
/* @__PURE__ */ jsx12(
|
|
508
|
-
"div",
|
|
509
|
-
{
|
|
510
|
-
className: "pointer-events-none absolute inset-0 transition-all",
|
|
511
|
-
style: {
|
|
512
|
-
backgroundImage: "radial-gradient(circle at 50% -20%, #ffffff00, #ffffff00)"
|
|
513
|
-
},
|
|
514
|
-
ref: inner
|
|
515
|
-
}
|
|
516
|
-
)
|
|
517
|
-
]
|
|
518
|
-
}
|
|
519
|
-
);
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
// src/CanvasThumbnailGridItem.tsx
|
|
523
|
-
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
524
|
-
function CanvasThumbnailGridItem(props) {
|
|
525
|
-
return /* @__PURE__ */ jsx13(CanvasContext, { canvas: props.id, children: /* @__PURE__ */ jsxs8("div", { onMouseDown: props.onClick, className: "flex flex-col", "data-canvas-selected": props.selected, children: [
|
|
526
|
-
/* @__PURE__ */ jsx13("div", { className: "bg-me-gray-100 w-full aspect-square flex-1 overflow-hidden rounded", children: /* @__PURE__ */ jsx13(
|
|
527
|
-
Card3D,
|
|
528
|
-
{
|
|
529
|
-
"data-canvas-selected": props.active,
|
|
530
|
-
"aria-selected": props.active,
|
|
531
|
-
className: cn(
|
|
532
|
-
"border-2 border-transparent p-1 w-full h-full rounded",
|
|
533
|
-
props.selected && "border-me-primary-500"
|
|
534
|
-
),
|
|
535
|
-
children: /* @__PURE__ */ jsx13(LazyThumbnail, {})
|
|
536
|
-
}
|
|
537
|
-
) }),
|
|
538
|
-
/* @__PURE__ */ jsx13(CanvasLabel, { className: "text-sm text-center truncate mt-1", as: "div" })
|
|
539
|
-
] }) });
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
// src/Modal.tsx
|
|
543
|
-
import { CloseButton, Dialog, DialogPanel, DialogTitle } from "@headlessui/react";
|
|
544
|
-
import { createPortal } from "react-dom";
|
|
545
|
-
import { Fragment as Fragment2, jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
546
|
-
function ModalBackSlot({ children }) {
|
|
547
|
-
const element = document.getElementById("modal-back-slot");
|
|
548
|
-
if (!element)
|
|
549
|
-
return null;
|
|
550
|
-
return createPortal(children, element);
|
|
551
|
-
}
|
|
552
|
-
function Modal({ id, title, open = true, onClose, actions, children }) {
|
|
553
|
-
return /* @__PURE__ */ jsx14(Fragment2, { children: /* @__PURE__ */ jsxs9(Dialog, { open, onClose, id, className: "relative z-[500]", children: [
|
|
554
|
-
/* @__PURE__ */ jsx14("div", { className: `fixed inset-0 bg-black/30 animate-fadeIn z-[501]`, "aria-hidden": "true" }),
|
|
555
|
-
/* @__PURE__ */ jsx14("div", { className: "fixed inset-0 flex w-screen items-center justify-center p-4 z-[502]", children: /* @__PURE__ */ jsx14("div", { className: "relative p-4 w-full max-w-4xl max-h-full", children: /* @__PURE__ */ jsxs9(DialogPanel, { className: "relative bg-white rounded-lg overflow-hidden shadow-2xl max-h-[80vh] flex flex-col", children: [
|
|
556
|
-
/* @__PURE__ */ jsxs9("div", { className: "flex items-center justify-between gap-3 p-4 rounded-t-lg sticky top-0 bg-white", children: [
|
|
557
|
-
/* @__PURE__ */ jsx14("div", { id: "modal-back-slot" }),
|
|
558
|
-
/* @__PURE__ */ jsx14(DialogTitle, { className: "text-xl font-semibold text-gray-900 ", children: title }),
|
|
559
|
-
/* @__PURE__ */ jsxs9(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: [
|
|
560
|
-
/* @__PURE__ */ jsx14(
|
|
561
|
-
"svg",
|
|
562
|
-
{
|
|
563
|
-
className: "w-3 h-3",
|
|
564
|
-
"aria-hidden": "true",
|
|
565
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
566
|
-
fill: "none",
|
|
567
|
-
viewBox: "0 0 14 14",
|
|
568
|
-
children: /* @__PURE__ */ jsx14(
|
|
569
|
-
"path",
|
|
570
|
-
{
|
|
571
|
-
stroke: "currentColor",
|
|
572
|
-
strokeLinecap: "round",
|
|
573
|
-
strokeLinejoin: "round",
|
|
574
|
-
strokeWidth: "2",
|
|
575
|
-
d: "m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"
|
|
576
|
-
}
|
|
577
|
-
)
|
|
578
|
-
}
|
|
579
|
-
),
|
|
580
|
-
/* @__PURE__ */ jsx14("span", { className: "sr-only", children: "Close" })
|
|
581
|
-
] })
|
|
582
|
-
] }),
|
|
583
|
-
/* @__PURE__ */ jsx14("div", { className: "flex-1 min-h-0 overflow-y-auto flex flex-col", children }),
|
|
584
|
-
actions ? /* @__PURE__ */ jsx14("div", { className: "flex items-center p-4 border-t border-gray-200 rounded-b justify-end", children: actions }) : null
|
|
585
|
-
] }) }) })
|
|
586
|
-
] }) });
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
// src/ControlButton.tsx
|
|
590
|
-
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
591
|
-
function ControlButton({
|
|
592
|
-
children,
|
|
593
|
-
className: className2,
|
|
594
|
-
...props
|
|
595
|
-
}) {
|
|
596
|
-
return /* @__PURE__ */ jsx15(
|
|
597
|
-
"button",
|
|
598
|
-
{
|
|
599
|
-
className: cn(
|
|
600
|
-
"bg-white border border-me-primary-500 text-xs py-1 px-2 rounded text-me-primary-600 hover:bg-me-primary-50",
|
|
601
|
-
className2
|
|
602
|
-
),
|
|
603
|
-
...props,
|
|
604
|
-
children
|
|
605
|
-
}
|
|
606
|
-
);
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
// src/OpaqueControls.tsx
|
|
610
|
-
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
611
|
-
function OpaqueControls(props) {
|
|
612
|
-
return /* @__PURE__ */ jsx16(
|
|
613
|
-
"div",
|
|
614
|
-
{
|
|
615
|
-
className: cn("flex w-full p-0.5 opacity-0 transition-opacity duration-300 gap-2", props.active && "opacity-1"),
|
|
616
|
-
children: props.children
|
|
617
|
-
}
|
|
618
|
-
);
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
// src/Tabs.tsx
|
|
622
|
-
import {
|
|
623
|
-
Tabs as BaseTabs,
|
|
624
|
-
TabList as BaseTabList,
|
|
625
|
-
Tab as BaseTab,
|
|
626
|
-
TabPanel as BaseTabPanel
|
|
627
|
-
} from "react-aria-components";
|
|
628
|
-
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
629
|
-
function Tabs({ className: className2, children, ...props }) {
|
|
630
|
-
return /* @__PURE__ */ jsx17(
|
|
631
|
-
BaseTabs,
|
|
632
|
-
{
|
|
633
|
-
className: (state) => {
|
|
634
|
-
const cs = typeof className2 === "function" ? className2(state) : className2;
|
|
635
|
-
return cn("", cs);
|
|
636
|
-
},
|
|
637
|
-
...props,
|
|
638
|
-
children
|
|
639
|
-
}
|
|
640
|
-
);
|
|
641
|
-
}
|
|
642
|
-
function TabList({
|
|
643
|
-
className: className2,
|
|
644
|
-
children,
|
|
645
|
-
...props
|
|
646
|
-
}) {
|
|
647
|
-
return /* @__PURE__ */ jsx17(
|
|
648
|
-
BaseTabList,
|
|
649
|
-
{
|
|
650
|
-
className: (state) => {
|
|
651
|
-
const cs = typeof className2 === "function" ? className2(state) : className2;
|
|
652
|
-
return cn("flex gap-4", cs);
|
|
653
|
-
},
|
|
654
|
-
...props,
|
|
655
|
-
children
|
|
656
|
-
}
|
|
657
|
-
);
|
|
658
|
-
}
|
|
659
|
-
function Tab({ className: className2, children, ...props }) {
|
|
660
|
-
return /* @__PURE__ */ jsx17(
|
|
661
|
-
BaseTab,
|
|
662
|
-
{
|
|
663
|
-
className: (state) => {
|
|
664
|
-
const cs = typeof className2 === "function" ? className2(state) : className2;
|
|
665
|
-
return cn(
|
|
666
|
-
"cursor-default outline-none group py-1 font-semibold px-2 border-b-2 text-me-gray-700",
|
|
667
|
-
state.isSelected && "border-b-me-primary-600 text-black",
|
|
668
|
-
state.isFocusVisible && "focus-visible:bg-me-primary-100",
|
|
669
|
-
cs
|
|
670
|
-
);
|
|
671
|
-
},
|
|
672
|
-
...props,
|
|
673
|
-
children
|
|
674
|
-
}
|
|
675
|
-
);
|
|
676
|
-
}
|
|
677
|
-
function TabPanel({ className: className2, children, ...props }) {
|
|
678
|
-
return /* @__PURE__ */ jsx17(
|
|
679
|
-
BaseTabPanel,
|
|
680
|
-
{
|
|
681
|
-
className: (state) => {
|
|
682
|
-
const cs = typeof className2 === "function" ? className2(state) : className2;
|
|
683
|
-
return cn("", cs);
|
|
684
|
-
},
|
|
685
|
-
...props,
|
|
686
|
-
children
|
|
687
|
-
}
|
|
688
|
-
);
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
// src/CreatorGrid.tsx
|
|
692
|
-
import { ListBox, ListBoxItem } from "react-aria-components";
|
|
693
|
-
import { twMerge as twMerge6 } from "tailwind-merge";
|
|
694
|
-
import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
695
|
-
function CreatorGrid(props) {
|
|
696
|
-
return /* @__PURE__ */ jsx18(
|
|
697
|
-
ListBox,
|
|
698
|
-
{
|
|
699
|
-
orientation: "horizontal",
|
|
700
|
-
"aria-label": props.label,
|
|
701
|
-
selectionMode: "single",
|
|
702
|
-
items: props.items,
|
|
703
|
-
className: "grid grid-sm gap-4 p-4 mb-8",
|
|
704
|
-
children: (item) => /* @__PURE__ */ jsx18(CreatorGridItem, { ...item })
|
|
705
|
-
}
|
|
706
|
-
);
|
|
707
|
-
}
|
|
708
|
-
function CreatorGridItem(props) {
|
|
709
|
-
return /* @__PURE__ */ jsxs10(
|
|
710
|
-
ListBoxItem,
|
|
711
|
-
{
|
|
712
|
-
id: props.id,
|
|
713
|
-
onAction: props.onClick,
|
|
714
|
-
className: ($s) => twMerge6(
|
|
715
|
-
"bg-white p-2 border-me-gray-300 rounded-md border hover:border-me-primary-500",
|
|
716
|
-
$s.isFocused && "border-me-primary-500 outline-me-primary-500 outline-2"
|
|
717
|
-
),
|
|
718
|
-
children: [
|
|
719
|
-
/* @__PURE__ */ jsx18("div", { className: "rounded bg-me-gray-300 mb-2 flex items-center justify-center py-1 aspect-square", children: /* @__PURE__ */ jsx18("div", { className: "text-center [&>svg]:w-16 [&>svg]:h-16", children: props.icon }) }),
|
|
720
|
-
/* @__PURE__ */ jsx18("div", { className: "text-center font-semibold text-sm", children: props.title }),
|
|
721
|
-
/* @__PURE__ */ jsx18("div", { className: "text-sm text-center text-black/50", children: props.description })
|
|
722
|
-
]
|
|
723
|
-
}
|
|
724
|
-
);
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
// src/icons/DownloadIcon.tsx
|
|
728
|
-
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
729
|
-
var DownloadIcon = (props) => /* @__PURE__ */ jsx19("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "#5f6368", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx19(
|
|
730
|
-
"path",
|
|
731
|
-
{
|
|
732
|
-
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",
|
|
733
|
-
fill: "currentColor"
|
|
734
|
-
}
|
|
735
|
-
) });
|
|
736
|
-
|
|
737
|
-
// src/DownloadButton.tsx
|
|
738
|
-
import { useId } from "react-aria";
|
|
739
|
-
import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
740
|
-
function DownloadButton({ label, id: _id, getData, fileName, fileType }) {
|
|
741
|
-
const id = useId(_id);
|
|
742
|
-
return /* @__PURE__ */ jsx20(Tooltip, { placement: "bottom", children: /* @__PURE__ */ jsxs11(
|
|
743
|
-
TooltipTrigger,
|
|
744
|
-
{
|
|
745
|
-
className: "bg-me-gray-100 hover:bg-me-primary-500 hover:text-white p-1 rounded-md text-me-primary-500 text-2xl",
|
|
746
|
-
"aria-label": label,
|
|
747
|
-
id,
|
|
748
|
-
onPress: () => createDownload(getData(), fileName, fileType),
|
|
749
|
-
children: [
|
|
750
|
-
/* @__PURE__ */ jsx20(DownloadIcon, { "aria-labelledby": _id }),
|
|
751
|
-
/* @__PURE__ */ jsx20(DefaultTooltipContent, { children: label })
|
|
752
|
-
]
|
|
753
|
-
}
|
|
754
|
-
) });
|
|
755
|
-
}
|
|
756
|
-
function createDownload(data, fileName, fileType = "text/json") {
|
|
757
|
-
const blob = data instanceof Blob ? data : new Blob([data], { type: fileType });
|
|
758
|
-
const a = document.createElement("a");
|
|
759
|
-
a.download = fileName;
|
|
760
|
-
a.href = window.URL.createObjectURL(blob);
|
|
761
|
-
const clickEvt = new MouseEvent("click", {
|
|
762
|
-
view: window,
|
|
763
|
-
bubbles: true,
|
|
764
|
-
cancelable: true
|
|
765
|
-
});
|
|
766
|
-
a.dispatchEvent(clickEvt);
|
|
767
|
-
a.remove();
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
// src/AtlasBanner.tsx
|
|
771
|
-
import { jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
772
|
-
function AtlasBanner({ children, controlsId }) {
|
|
773
|
-
return /* @__PURE__ */ jsxs12("div", { className: "bg-me-gray-100 border-b text-black p-1 flex gap-4 items-center h-12", children: [
|
|
774
|
-
/* @__PURE__ */ jsx21("div", { className: "px-4", children }),
|
|
775
|
-
/* @__PURE__ */ jsx21("div", { id: controlsId || "atlas-controls", className: "flex gap-2" })
|
|
776
|
-
] });
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
// src/SvgControlBar.tsx
|
|
780
|
-
import { RenderSvgEditorControls } from "react-iiif-vault";
|
|
781
|
-
|
|
782
|
-
// src/icons/DrawIcon.tsx
|
|
783
|
-
import { jsx as jsx22, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
784
|
-
var DrawIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ jsxs13(
|
|
785
|
-
"svg",
|
|
786
|
-
{
|
|
787
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
788
|
-
width: "1em",
|
|
789
|
-
height: "1em",
|
|
790
|
-
viewBox: "0 -960 960 960",
|
|
791
|
-
"aria-labelledby": titleId,
|
|
792
|
-
...props,
|
|
793
|
-
children: [
|
|
794
|
-
title ? /* @__PURE__ */ jsx22("title", { id: titleId, children: title }) : null,
|
|
795
|
-
/* @__PURE__ */ jsx22(
|
|
796
|
-
"path",
|
|
797
|
-
{
|
|
798
|
-
fill: "currentColor",
|
|
799
|
-
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"
|
|
800
|
-
}
|
|
801
|
-
)
|
|
802
|
-
]
|
|
803
|
-
}
|
|
804
|
-
);
|
|
805
|
-
|
|
806
|
-
// src/icons/PolygonIcon.tsx
|
|
807
|
-
import { jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
808
|
-
var PolygonIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ jsxs14(
|
|
809
|
-
"svg",
|
|
810
|
-
{
|
|
811
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
812
|
-
width: "1em",
|
|
813
|
-
height: "1em",
|
|
814
|
-
viewBox: "0 -960 960 960",
|
|
815
|
-
"aria-labelledby": titleId,
|
|
816
|
-
...props,
|
|
817
|
-
children: [
|
|
818
|
-
title ? /* @__PURE__ */ jsx23("title", { id: titleId, children: title }) : null,
|
|
819
|
-
/* @__PURE__ */ jsx23(
|
|
820
|
-
"path",
|
|
821
|
-
{
|
|
822
|
-
fill: "currentColor",
|
|
823
|
-
d: "M600-80v-100L320-320H120v-240h172l108-124v-196h240v240H468L360-516v126l240 120v-50h240v240H600ZM480-720h80v-80h-80v80ZM200-400h80v-80h-80v80Zm480 240h80v-80h-80v80ZM520-760ZM240-440Zm480 240Z"
|
|
824
|
-
}
|
|
825
|
-
)
|
|
826
|
-
]
|
|
827
|
-
}
|
|
828
|
-
);
|
|
829
|
-
|
|
830
|
-
// src/icons/LineIcon.tsx
|
|
831
|
-
import { jsx as jsx24, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
832
|
-
function LineIcon({ title, titleId, ...props }) {
|
|
833
|
-
return /* @__PURE__ */ jsxs15("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", "aria-labelledby": titleId, ...props, children: [
|
|
834
|
-
title ? /* @__PURE__ */ jsx24("title", { id: titleId, children: title }) : null,
|
|
835
|
-
/* @__PURE__ */ jsxs15("g", { fill: "none", fillRule: "evenodd", children: [
|
|
836
|
-
/* @__PURE__ */ jsx24("circle", { cx: 4.5, cy: 4.5, r: 2.5, fill: "currentColor" }),
|
|
837
|
-
/* @__PURE__ */ jsx24("circle", { cx: 15.5, cy: 15.5, r: 2.5, fill: "currentColor" }),
|
|
838
|
-
/* @__PURE__ */ jsx24("path", { stroke: "currentColor", strokeLinecap: "square", strokeWidth: 2, d: "m13.5 13.5-9-9" })
|
|
839
|
-
] })
|
|
840
|
-
] });
|
|
841
|
-
}
|
|
842
|
-
|
|
843
|
-
// src/icons/LineBoxIcon.tsx
|
|
844
|
-
import { jsx as jsx25, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
845
|
-
function LineBoxIcon({ title, titleId, ...props }) {
|
|
846
|
-
return /* @__PURE__ */ jsxs16("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", "aria-labelledby": titleId, ...props, children: [
|
|
847
|
-
title ? /* @__PURE__ */ jsx25("title", { id: titleId, children: title }) : null,
|
|
848
|
-
/* @__PURE__ */ jsxs16("g", { fill: "none", fillRule: "evenodd", children: [
|
|
849
|
-
/* @__PURE__ */ jsx25("path", { d: "M0 0h20v20H0z" }),
|
|
850
|
-
/* @__PURE__ */ jsx25("path", { stroke: "currentColor", strokeLinecap: "square", strokeWidth: 2, d: "m8.5 11.5 6-6M16 4v3m0-3h-3m0 14L2 7" }),
|
|
851
|
-
/* @__PURE__ */ jsx25("path", { stroke: "currentColor", strokeOpacity: 0.407, strokeWidth: 2, d: "m2 7 5-5 11 11-5 5z" })
|
|
852
|
-
] })
|
|
853
|
-
] });
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
// src/icons/ShapesIcon.tsx
|
|
857
|
-
import { jsx as jsx26, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
858
|
-
var ShapesIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ jsxs17(
|
|
859
|
-
"svg",
|
|
860
|
-
{
|
|
861
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
862
|
-
width: "1em",
|
|
863
|
-
height: "1em",
|
|
864
|
-
viewBox: "0 -960 960 960",
|
|
865
|
-
"aria-labelledby": titleId,
|
|
866
|
-
...props,
|
|
867
|
-
children: [
|
|
868
|
-
title ? /* @__PURE__ */ jsx26("title", { id: titleId, children: title }) : null,
|
|
869
|
-
/* @__PURE__ */ jsx26(
|
|
870
|
-
"path",
|
|
871
|
-
{
|
|
872
|
-
fill: "currentColor",
|
|
873
|
-
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"
|
|
874
|
-
}
|
|
875
|
-
)
|
|
876
|
-
]
|
|
877
|
-
}
|
|
878
|
-
);
|
|
879
|
-
|
|
880
|
-
// src/icons/SquareIcon.tsx
|
|
881
|
-
import { jsx as jsx27, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
882
|
-
var SquareIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ jsxs18(
|
|
883
|
-
"svg",
|
|
884
|
-
{
|
|
885
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
886
|
-
width: "1em",
|
|
887
|
-
height: "1em",
|
|
888
|
-
viewBox: "0 -960 960 960",
|
|
889
|
-
"aria-labelledby": titleId,
|
|
890
|
-
...props,
|
|
891
|
-
children: [
|
|
892
|
-
title ? /* @__PURE__ */ jsx27("title", { id: titleId, children: title }) : null,
|
|
893
|
-
/* @__PURE__ */ jsx27(
|
|
894
|
-
"path",
|
|
895
|
-
{
|
|
896
|
-
fill: "currentColor",
|
|
897
|
-
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"
|
|
898
|
-
}
|
|
899
|
-
)
|
|
900
|
-
]
|
|
901
|
-
}
|
|
902
|
-
);
|
|
903
|
-
|
|
904
|
-
// src/icons/TriangleIcon.tsx
|
|
905
|
-
import { jsx as jsx28, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
906
|
-
var TriangleIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ jsxs19(
|
|
907
|
-
"svg",
|
|
908
|
-
{
|
|
909
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
910
|
-
width: "1em",
|
|
911
|
-
height: "1em",
|
|
912
|
-
viewBox: "0 -960 960 960",
|
|
913
|
-
"aria-labelledby": titleId,
|
|
914
|
-
...props,
|
|
915
|
-
children: [
|
|
916
|
-
title ? /* @__PURE__ */ jsx28("title", { id: titleId, children: title }) : null,
|
|
917
|
-
/* @__PURE__ */ jsx28("path", { d: "m80-160 400-640 400 640H80Zm144-80h512L480-650 224-240Zm256-205Z", fill: "currentColor" })
|
|
918
|
-
]
|
|
919
|
-
}
|
|
920
|
-
);
|
|
921
|
-
|
|
922
|
-
// src/icons/HexagonIcon.tsx
|
|
923
|
-
import { jsx as jsx29, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
924
|
-
var HexagonIcon = ({ title, titleId, ...props }) => /* @__PURE__ */ jsxs20(
|
|
925
|
-
"svg",
|
|
926
|
-
{
|
|
927
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
928
|
-
width: "1em",
|
|
929
|
-
height: "1em",
|
|
930
|
-
viewBox: "0 -960 960 960",
|
|
931
|
-
"aria-labelledby": titleId,
|
|
932
|
-
...props,
|
|
933
|
-
children: [
|
|
934
|
-
title ? /* @__PURE__ */ jsx29("title", { id: titleId, children: title }) : null,
|
|
935
|
-
/* @__PURE__ */ jsx29(
|
|
936
|
-
"path",
|
|
937
|
-
{
|
|
938
|
-
fill: "currentColor",
|
|
939
|
-
d: "M272-120 64-480l208-360h416l208 360-208 360H272Zm46-80h324l161-280-161-280H318L156-480l162 280Zm162-280Z"
|
|
940
|
-
}
|
|
941
|
-
)
|
|
942
|
-
]
|
|
943
|
-
}
|
|
944
|
-
);
|
|
945
|
-
|
|
946
|
-
// src/icons/DeleteForeverIcon.tsx
|
|
947
|
-
import { jsx as jsx30, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
948
|
-
function DeleteForeverIcon(props) {
|
|
949
|
-
return /* @__PURE__ */ jsxs21("svg", { height: "1em", width: "1em", viewBox: "0 0 24 24", ...props, children: [
|
|
950
|
-
/* @__PURE__ */ jsx30("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
951
|
-
/* @__PURE__ */ jsx30("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
952
|
-
/* @__PURE__ */ jsx30(
|
|
953
|
-
"path",
|
|
954
|
-
{
|
|
955
|
-
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",
|
|
956
|
-
fill: "currentColor"
|
|
957
|
-
}
|
|
958
|
-
)
|
|
959
|
-
] });
|
|
960
|
-
}
|
|
961
|
-
|
|
962
|
-
// src/SvgControlBar.tsx
|
|
963
|
-
import { useEffect as useEffect2 } from "react";
|
|
964
|
-
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
965
|
-
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';
|
|
966
|
-
var icons = {
|
|
967
|
-
DrawIcon: /* @__PURE__ */ jsx31(DrawIcon, {}),
|
|
968
|
-
PolygonIcon: /* @__PURE__ */ jsx31(PolygonIcon, {}),
|
|
969
|
-
LineIcon: /* @__PURE__ */ jsx31(LineIcon, {}),
|
|
970
|
-
LineBoxIcon: /* @__PURE__ */ jsx31(LineBoxIcon, {}),
|
|
971
|
-
ShapesIcon: /* @__PURE__ */ jsx31(ShapesIcon, {}),
|
|
972
|
-
SquareIcon: /* @__PURE__ */ jsx31(SquareIcon, {}),
|
|
973
|
-
TriangleIcon: /* @__PURE__ */ jsx31(TriangleIcon, {}),
|
|
974
|
-
HexagonIcon: /* @__PURE__ */ jsx31(HexagonIcon, {}),
|
|
975
|
-
DeleteForeverIcon: /* @__PURE__ */ jsx31(DeleteForeverIcon, {})
|
|
976
|
-
};
|
|
977
|
-
function SvgControlBar({
|
|
978
|
-
helper,
|
|
979
|
-
state,
|
|
980
|
-
showShapes
|
|
981
|
-
}) {
|
|
982
|
-
useEffect2(() => {
|
|
983
|
-
helper.stamps.square();
|
|
984
|
-
}, []);
|
|
985
|
-
return /* @__PURE__ */ jsx31(
|
|
986
|
-
RenderSvgEditorControls,
|
|
987
|
-
{
|
|
988
|
-
icons,
|
|
989
|
-
helper,
|
|
990
|
-
state,
|
|
991
|
-
showShapes,
|
|
992
|
-
classNames: {
|
|
993
|
-
button: className
|
|
994
|
-
}
|
|
995
|
-
}
|
|
996
|
-
);
|
|
997
|
-
}
|
|
998
|
-
|
|
999
|
-
// src/ConfirmSelectionButton.tsx
|
|
1000
|
-
import { Button as Button4 } from "react-aria-components";
|
|
1001
|
-
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1002
|
-
function ConfirmSelectionButton({ onPress, children }) {
|
|
1003
|
-
return /* @__PURE__ */ jsx32(Button4, { className: "bg-me-primary-500 px-3 py-1 hover:bg-me-primary-600 text-white rounded", onPress, children });
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
// src/ManifestOverviewEmptyState.tsx
|
|
1007
|
-
import { Button as Button5 } from "react-aria-components";
|
|
1008
|
-
import { jsx as jsx33, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1009
|
-
function ManifestOverviewEmptyState({ onCreate, canCreate }) {
|
|
1010
|
-
return /* @__PURE__ */ jsxs22("div", { className: "flex items-center flex-col gap-5 py-16", children: [
|
|
1011
|
-
/* @__PURE__ */ jsx33(
|
|
1012
|
-
Card3D,
|
|
1013
|
-
{
|
|
1014
|
-
shouldTranslate: true,
|
|
1015
|
-
onClick: canCreate ? onCreate : void 0,
|
|
1016
|
-
className: "border-2 border-dotted bg-black/5 aspect-[3/4] rounded w-32 border-black"
|
|
1017
|
-
}
|
|
1018
|
-
),
|
|
1019
|
-
/* @__PURE__ */ jsx33("div", { className: "font-bold text-lg", children: "Let's get started!" }),
|
|
1020
|
-
/* @__PURE__ */ jsx33("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." }),
|
|
1021
|
-
canCreate ? /* @__PURE__ */ jsx33(
|
|
1022
|
-
Button5,
|
|
1023
|
-
{
|
|
1024
|
-
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",
|
|
1025
|
-
onPress: onCreate,
|
|
1026
|
-
children: "Start adding content"
|
|
1027
|
-
}
|
|
1028
|
-
) : null
|
|
1029
|
-
] });
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
// src/SidebarTabs.tsx
|
|
1033
|
-
import { createHideableComponent } from "@react-aria/collections";
|
|
1034
|
-
import { useLayoutEffect as useLayoutEffect3, useMemo as useMemo2, useRef as useRef3, useState as useState3 } from "react";
|
|
1035
|
-
import { Button as Button6, Menu, MenuItem, MenuTrigger, Popover, Tab as Tab2, TabList as TabList2, TabPanel as TabPanel2, Tabs as Tabs2 } from "react-aria-components";
|
|
1036
|
-
import { createPortal as createPortal2 } from "react-dom";
|
|
1037
|
-
import { Fragment as Fragment3, jsx as jsx34, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1038
|
-
function SidebarTabs({ menu, menuId, selectedKey, onSelectionChange }) {
|
|
1039
|
-
const ref = useRef3(null);
|
|
1040
|
-
const [hidden, setHidden] = useState3(0);
|
|
1041
|
-
const [hiddenMenu, setHiddenMenu] = useState3(null);
|
|
1042
|
-
const widths = useRef3([]);
|
|
1043
|
-
const itemsRef = useRef3([]);
|
|
1044
|
-
const selectedIndex = useMemo2(() => menu.findIndex((item) => item.id === selectedKey), [menu, selectedKey]);
|
|
1045
|
-
useLayoutEffect3(() => {
|
|
1046
|
-
const cb = () => {
|
|
1047
|
-
if (widths.current.length === 0) {
|
|
1048
|
-
widths.current = [];
|
|
1049
|
-
for (const item of itemsRef.current) {
|
|
1050
|
-
if (item) {
|
|
1051
|
-
widths.current.push(item.getBoundingClientRect().width);
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
const fullWidth = widths.current.reduce((a, b) => a + b, 0);
|
|
1056
|
-
if (fullWidth && ref.current) {
|
|
1057
|
-
const el = ref.current;
|
|
1058
|
-
const width = el.getBoundingClientRect().width - 20;
|
|
1059
|
-
let hidden2 = 0;
|
|
1060
|
-
let total = 0;
|
|
1061
|
-
for (let i = widths.current.length - 1; i >= 0; i--) {
|
|
1062
|
-
total += widths.current[i];
|
|
1063
|
-
if (total > width) {
|
|
1064
|
-
hidden2 = i + 1;
|
|
1065
|
-
break;
|
|
1066
|
-
}
|
|
1067
|
-
}
|
|
1068
|
-
setHidden(hidden2);
|
|
1069
|
-
}
|
|
1070
|
-
};
|
|
1071
|
-
cb();
|
|
1072
|
-
const interval = setInterval(cb, 500);
|
|
1073
|
-
return () => {
|
|
1074
|
-
clearInterval(interval);
|
|
1075
|
-
};
|
|
1076
|
-
}, []);
|
|
1077
|
-
const menuHidden = menu.filter((item, idx) => hidden >= menu.length - idx);
|
|
1078
|
-
return /* @__PURE__ */ jsxs23(Fragment3, { children: [
|
|
1079
|
-
/* @__PURE__ */ jsxs23(
|
|
1080
|
-
Tabs2,
|
|
1081
|
-
{
|
|
1082
|
-
className: "w-full flex-1 overflow-hidden flex flex-col",
|
|
1083
|
-
selectedKey,
|
|
1084
|
-
onSelectionChange,
|
|
1085
|
-
children: [
|
|
1086
|
-
/* @__PURE__ */ jsxs23("div", { className: "flex items-center w-full tab-shadow", children: [
|
|
1087
|
-
/* @__PURE__ */ jsx34(TabList2, { ref, className: "flex-1 overflow-hidden w-full flex text-sm whitespace-nowrap", children: menu.map((item, idx) => {
|
|
1088
|
-
const isHidden = hidden >= menu.length - idx;
|
|
1089
|
-
return /* @__PURE__ */ jsx34(
|
|
1090
|
-
Tab2,
|
|
1091
|
-
{
|
|
1092
|
-
ref: (el) => itemsRef.current[idx] = el,
|
|
1093
|
-
id: item.id,
|
|
1094
|
-
className: (state) => cn(
|
|
1095
|
-
//
|
|
1096
|
-
"border-b-2 px-2 py-1 text-sm text-gray-400 select-none hover:text-black focus:ring-0 focus:outline-none",
|
|
1097
|
-
state.isSelected && "border-me-primary-500 text-black",
|
|
1098
|
-
state.isFocusVisible && "ring-0 bg-me-gray-100",
|
|
1099
|
-
isHidden && "hidden"
|
|
1100
|
-
),
|
|
1101
|
-
children: item.label
|
|
1102
|
-
},
|
|
1103
|
-
item.id
|
|
1104
|
-
);
|
|
1105
|
-
}) }),
|
|
1106
|
-
/* @__PURE__ */ jsx34("div", { ref: setHiddenMenu, id: "hidden-menu" })
|
|
1107
|
-
] }),
|
|
1108
|
-
menu.map((item) => /* @__PURE__ */ jsx34(TabPanel2, { id: item.id, className: "flex-1 overflow-y-auto h-full", children: item.renderComponent }, item.id))
|
|
1109
|
-
]
|
|
1110
|
-
},
|
|
1111
|
-
menuId
|
|
1112
|
-
),
|
|
1113
|
-
hiddenMenu && hidden > 0 ? createPortal2(
|
|
1114
|
-
/* @__PURE__ */ jsx34(
|
|
1115
|
-
MoreMenu,
|
|
1116
|
-
{
|
|
1117
|
-
hidden,
|
|
1118
|
-
menuHidden,
|
|
1119
|
-
selectedIndex,
|
|
1120
|
-
selectedKey,
|
|
1121
|
-
onSelectionChange
|
|
1122
|
-
}
|
|
1123
|
-
),
|
|
1124
|
-
hiddenMenu
|
|
1125
|
-
) : null
|
|
1126
|
-
] });
|
|
1127
|
-
}
|
|
1128
|
-
var MoreMenu = createHideableComponent(({ selectedIndex, hidden, menuHidden, selectedKey, onSelectionChange }) => {
|
|
1129
|
-
return /* @__PURE__ */ jsxs23(MenuTrigger, { children: [
|
|
1130
|
-
/* @__PURE__ */ jsx34(
|
|
1131
|
-
Button6,
|
|
1132
|
-
{
|
|
1133
|
-
className: cn(
|
|
1134
|
-
"border-none rounded bg-gray-100 px-1.5 py-1 mr-2 mb-1 text-me-primary-500 semibold uppercase text-[10px]",
|
|
1135
|
-
selectedIndex > hidden && "bg-me-primary-500 text-white rounded"
|
|
1136
|
-
),
|
|
1137
|
-
children: "MORE"
|
|
1138
|
-
}
|
|
1139
|
-
),
|
|
1140
|
-
/* @__PURE__ */ jsx34(Popover, { children: menuHidden.length ? /* @__PURE__ */ jsx34(Menu, { className: "bg-white rounded shadow-lg flex flex-col gap-0.5 p-0.5 min-w-28", children: menuHidden.map((item) => {
|
|
1141
|
-
return /* @__PURE__ */ jsx34(
|
|
1142
|
-
MenuItem,
|
|
1143
|
-
{
|
|
1144
|
-
className: (state) => cn(
|
|
1145
|
-
"hover:bg-me-gray-100 p-1 rounded-sm text-sm",
|
|
1146
|
-
selectedKey === item.id && "ring ring-me-primary-500"
|
|
1147
|
-
),
|
|
1148
|
-
onAction: () => onSelectionChange?.(item.id),
|
|
1149
|
-
children: item.label
|
|
1150
|
-
},
|
|
1151
|
-
item.id
|
|
1152
|
-
);
|
|
1153
|
-
}) }) : null })
|
|
1154
|
-
] });
|
|
1155
|
-
});
|
|
1156
|
-
|
|
1157
|
-
// src/MetadataContainer.tsx
|
|
1158
|
-
import { LocaleString as LocaleString2 } from "react-iiif-vault";
|
|
1159
|
-
import { jsx as jsx35, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1160
|
-
function MetadataContainer({
|
|
1161
|
-
className: className2,
|
|
1162
|
-
label,
|
|
1163
|
-
children,
|
|
1164
|
-
...props
|
|
1165
|
-
}) {
|
|
1166
|
-
return /* @__PURE__ */ jsxs24(
|
|
1167
|
-
"fieldset",
|
|
1168
|
-
{
|
|
1169
|
-
className: cn(
|
|
1170
|
-
"hover:ring ring-gray-200 focus-within:ring-me-primary-500 focus-within:ring p-2 rounded mb-2",
|
|
1171
|
-
className2
|
|
1172
|
-
),
|
|
1173
|
-
...props,
|
|
1174
|
-
children: [
|
|
1175
|
-
/* @__PURE__ */ jsx35(LocaleString2, { className: "text-lg font-bold text-[#333] mb-2", as: "h3", children: label }),
|
|
1176
|
-
children
|
|
1177
|
-
]
|
|
1178
|
-
}
|
|
1179
|
-
);
|
|
1180
|
-
}
|
|
1181
|
-
|
|
1182
|
-
// src/EmptyState.tsx
|
|
1183
|
-
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1184
|
-
function EmptyState(props) {
|
|
1185
|
-
return /* @__PURE__ */ jsx36(
|
|
1186
|
-
"div",
|
|
1187
|
-
{
|
|
1188
|
-
className: cn(
|
|
1189
|
-
"flex items-center justify-center text-gray-400 text-md",
|
|
1190
|
-
props.$noMargin ? "" : "m-4",
|
|
1191
|
-
props.$box ? "p-4 border border-gray-200 rounded" : ""
|
|
1192
|
-
),
|
|
1193
|
-
children: props.children
|
|
1194
|
-
}
|
|
1195
|
-
);
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
// src/ManifestEditorLogo.tsx
|
|
1199
|
-
import { jsx as jsx37, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
1200
|
-
function ManifestEditorLogo(props) {
|
|
1201
|
-
return /* @__PURE__ */ jsx37(
|
|
1202
|
-
"svg",
|
|
1203
|
-
{
|
|
1204
|
-
width: "1em",
|
|
1205
|
-
height: "1em",
|
|
1206
|
-
viewBox: "0 0 206 27",
|
|
1207
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1208
|
-
className: "me-logo h-[23px] w-[176px]",
|
|
1209
|
-
...props,
|
|
1210
|
-
children: /* @__PURE__ */ jsxs25("g", { fill: "none", children: [
|
|
1211
|
-
/* @__PURE__ */ jsx37(
|
|
1212
|
-
"path",
|
|
1213
|
-
{
|
|
1214
|
-
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",
|
|
1215
|
-
fill: "#000"
|
|
1216
|
-
}
|
|
1217
|
-
),
|
|
1218
|
-
/* @__PURE__ */ jsx37("path", { fill: "#E94581", className: "me-logo-1", d: "M0 13.343 13.343 0l13.343 13.343-13.343 13.343z" }),
|
|
1219
|
-
/* @__PURE__ */ jsx37("path", { fill: "#E94581", className: "me-logo-2", d: "M12.137 13.346 25.48.003l13.343 13.343L25.48 26.69z" }),
|
|
1220
|
-
/* @__PURE__ */ jsx37("path", { fill: "#C63E75", className: "me-logo-3", d: "m12.104 13.348 7.311-7.311 7.312 7.311-7.312 7.312z" })
|
|
1221
|
-
] })
|
|
1222
|
-
}
|
|
1223
|
-
);
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
// src/Forms.tsx
|
|
1227
|
-
import { Input, Label, Form as RAForm, Radio, RadioGroup, TextArea } from "react-aria-components";
|
|
1228
|
-
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
1229
|
-
function MeLabel({ className: className2, ...props }) {
|
|
1230
|
-
return /* @__PURE__ */ jsx38(
|
|
1231
|
-
Label,
|
|
1232
|
-
{
|
|
1233
|
-
className: cn(
|
|
1234
|
-
//
|
|
1235
|
-
"font-semibold text-sm",
|
|
1236
|
-
className2
|
|
1237
|
-
),
|
|
1238
|
-
...props
|
|
1239
|
-
}
|
|
1240
|
-
);
|
|
1241
|
-
}
|
|
1242
|
-
function MeRadioGroup({ className: className2, ...props }) {
|
|
1243
|
-
return /* @__PURE__ */ jsx38(
|
|
1244
|
-
RadioGroup,
|
|
1245
|
-
{
|
|
1246
|
-
className: cn(
|
|
1247
|
-
//
|
|
1248
|
-
"",
|
|
1249
|
-
className2
|
|
1250
|
-
),
|
|
1251
|
-
...props
|
|
1252
|
-
}
|
|
1253
|
-
);
|
|
1254
|
-
}
|
|
1255
|
-
function MeRadio({ className: className2, ...props }) {
|
|
1256
|
-
return /* @__PURE__ */ jsx38(
|
|
1257
|
-
Radio,
|
|
1258
|
-
{
|
|
1259
|
-
className: (state) => cn(
|
|
1260
|
-
//
|
|
1261
|
-
"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",
|
|
1262
|
-
className2
|
|
1263
|
-
),
|
|
1264
|
-
...props
|
|
1265
|
-
}
|
|
1266
|
-
);
|
|
1267
|
-
}
|
|
1268
|
-
function MeForm({ className: className2, ...props }) {
|
|
1269
|
-
return /* @__PURE__ */ jsx38(
|
|
1270
|
-
RAForm,
|
|
1271
|
-
{
|
|
1272
|
-
className: cn(
|
|
1273
|
-
//
|
|
1274
|
-
"",
|
|
1275
|
-
className2
|
|
1276
|
-
),
|
|
1277
|
-
...props
|
|
1278
|
-
}
|
|
1279
|
-
);
|
|
1280
|
-
}
|
|
1281
|
-
function MeInput({ className: className2, ...props }) {
|
|
1282
|
-
return /* @__PURE__ */ jsx38(
|
|
1283
|
-
Input,
|
|
1284
|
-
{
|
|
1285
|
-
className: cn(
|
|
1286
|
-
//
|
|
1287
|
-
"p-2 bg-me-gray-100 border-b border-b-me-gray-500",
|
|
1288
|
-
"focus:ring-0 outline-0 focus:border-me-primary-500 focus:bg-[#ECEEF5]",
|
|
1289
|
-
className2
|
|
1290
|
-
),
|
|
1291
|
-
...props
|
|
1292
|
-
}
|
|
1293
|
-
);
|
|
1294
|
-
}
|
|
1295
|
-
function MeTextArea({ className: className2, ...props }) {
|
|
1296
|
-
return /* @__PURE__ */ jsx38(
|
|
1297
|
-
TextArea,
|
|
1298
|
-
{
|
|
1299
|
-
className: cn(
|
|
1300
|
-
//
|
|
1301
|
-
"p-2 bg-me-gray-100 border-b border-b-me-gray-500",
|
|
1302
|
-
"focus:ring-0 outline-0 focus:border-me-primary-500 focus:bg-[#ECEEF5]",
|
|
1303
|
-
className2
|
|
1304
|
-
),
|
|
1305
|
-
...props
|
|
1306
|
-
}
|
|
1307
|
-
);
|
|
1308
|
-
}
|
|
1309
|
-
function MeInputContainer({
|
|
1310
|
-
horizontal,
|
|
1311
|
-
className: className2,
|
|
1312
|
-
...props
|
|
1313
|
-
}) {
|
|
1314
|
-
return /* @__PURE__ */ jsx38(
|
|
1315
|
-
"div",
|
|
1316
|
-
{
|
|
1317
|
-
className: cn(
|
|
1318
|
-
//
|
|
1319
|
-
"flex flex-col gap-2",
|
|
1320
|
-
horizontal && "flex-row",
|
|
1321
|
-
className2
|
|
1322
|
-
),
|
|
1323
|
-
...props
|
|
1324
|
-
}
|
|
1325
|
-
);
|
|
1326
|
-
}
|
|
1327
|
-
var Form = {
|
|
1328
|
-
Input: MeInput,
|
|
1329
|
-
Form: MeForm,
|
|
1330
|
-
Label: MeLabel,
|
|
1331
|
-
InputContainer: MeInputContainer,
|
|
1332
|
-
RadioGroup: MeRadioGroup,
|
|
1333
|
-
Radio: MeRadio,
|
|
1334
|
-
TextArea: MeTextArea
|
|
1335
|
-
};
|
|
1336
|
-
|
|
1337
|
-
// src/HTMLEditor.tsx
|
|
1338
|
-
import { useCallback as useCallback2, useEffect as useEffect3, useMemo as useMemo4, useRef as useRef4, useState as useState4 } from "react";
|
|
1339
|
-
import { Converter } from "showdown";
|
|
1340
|
-
import { useDebounce } from "tiny-use-debounce";
|
|
1341
|
-
import TurndownService from "turndown";
|
|
1342
|
-
|
|
1343
|
-
// src/MDXEditor.tsx
|
|
1344
|
-
import "@mdxeditor/editor/style.css";
|
|
1345
|
-
import {
|
|
1346
|
-
MDXEditor as BaseMDXEditor,
|
|
1347
|
-
BlockTypeSelect,
|
|
1348
|
-
BoldItalicUnderlineToggles,
|
|
1349
|
-
CreateLink,
|
|
1350
|
-
InsertImage,
|
|
1351
|
-
ListsToggle,
|
|
1352
|
-
UndoRedo,
|
|
1353
|
-
diffSourcePlugin,
|
|
1354
|
-
headingsPlugin,
|
|
1355
|
-
imagePlugin,
|
|
1356
|
-
linkDialogPlugin,
|
|
1357
|
-
linkPlugin,
|
|
1358
|
-
listsPlugin,
|
|
1359
|
-
quotePlugin,
|
|
1360
|
-
thematicBreakPlugin,
|
|
1361
|
-
toolbarPlugin
|
|
1362
|
-
} from "@mdxeditor/editor";
|
|
1363
|
-
import { useMemo as useMemo3 } from "react";
|
|
1364
|
-
import { Fragment as Fragment4, jsx as jsx39, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
1365
|
-
function MDXEditor({
|
|
1366
|
-
editorRef,
|
|
1367
|
-
...props
|
|
1368
|
-
}) {
|
|
1369
|
-
return /* @__PURE__ */ jsx39(
|
|
1370
|
-
BaseMDXEditor,
|
|
1371
|
-
{
|
|
1372
|
-
plugins: useMemo3(
|
|
1373
|
-
() => [
|
|
1374
|
-
// Example Plugin Usage
|
|
1375
|
-
headingsPlugin({ allowedHeadingLevels: [2, 3] }),
|
|
1376
|
-
listsPlugin(),
|
|
1377
|
-
linkPlugin(),
|
|
1378
|
-
quotePlugin(),
|
|
1379
|
-
thematicBreakPlugin(),
|
|
1380
|
-
linkDialogPlugin(),
|
|
1381
|
-
imagePlugin(),
|
|
1382
|
-
diffSourcePlugin(),
|
|
1383
|
-
toolbarPlugin({
|
|
1384
|
-
toolbarClassName: "mdx-toolbar",
|
|
1385
|
-
toolbarContents: () => /* @__PURE__ */ jsxs26(Fragment4, { children: [
|
|
1386
|
-
" ",
|
|
1387
|
-
/* @__PURE__ */ jsx39(UndoRedo, {}),
|
|
1388
|
-
/* @__PURE__ */ jsx39(BoldItalicUnderlineToggles, {}),
|
|
1389
|
-
/* @__PURE__ */ jsx39(BlockTypeSelect, {}),
|
|
1390
|
-
/* @__PURE__ */ jsx39(ListsToggle, { options: ["bullet", "number"] }),
|
|
1391
|
-
/* @__PURE__ */ jsx39(CreateLink, {}),
|
|
1392
|
-
/* @__PURE__ */ jsx39(InsertImage, {})
|
|
1393
|
-
] })
|
|
1394
|
-
})
|
|
1395
|
-
],
|
|
1396
|
-
[]
|
|
1397
|
-
),
|
|
1398
|
-
...props,
|
|
1399
|
-
ref: editorRef
|
|
1400
|
-
}
|
|
1401
|
-
);
|
|
1402
|
-
}
|
|
1403
|
-
|
|
1404
|
-
// src/HTMLEditor.tsx
|
|
1405
|
-
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
1406
|
-
var converter = new Converter();
|
|
1407
|
-
converter.setFlavor("github");
|
|
1408
|
-
var turndownService = new TurndownService();
|
|
1409
|
-
function HTMLEditor({
|
|
1410
|
-
value,
|
|
1411
|
-
onChange,
|
|
1412
|
-
disabled
|
|
1413
|
-
}) {
|
|
1414
|
-
const editorRef = useRef4(null);
|
|
1415
|
-
const [_value, _setValue] = useState4(void 0);
|
|
1416
|
-
const internalOnChange = useCallback2(() => {
|
|
1417
|
-
if (editorRef.current) {
|
|
1418
|
-
onChange(converter.makeHtml(editorRef.current.getMarkdown()));
|
|
1419
|
-
}
|
|
1420
|
-
}, []);
|
|
1421
|
-
const debounceSave = useDebounce(internalOnChange, 400);
|
|
1422
|
-
const memoState = useMemo4(() => {
|
|
1423
|
-
return turndownService.turndown(value);
|
|
1424
|
-
}, []);
|
|
1425
|
-
useEffect3(() => {
|
|
1426
|
-
const ref = editorRef.current;
|
|
1427
|
-
return () => {
|
|
1428
|
-
if (ref) {
|
|
1429
|
-
onChange(converter.makeHtml(ref.getMarkdown()));
|
|
1430
|
-
}
|
|
1431
|
-
};
|
|
1432
|
-
}, []);
|
|
1433
|
-
return /* @__PURE__ */ jsx40(
|
|
1434
|
-
MDXEditor,
|
|
1435
|
-
{
|
|
1436
|
-
editorRef,
|
|
1437
|
-
onBlur: internalOnChange,
|
|
1438
|
-
readOnly: disabled,
|
|
1439
|
-
className: [
|
|
1440
|
-
"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",
|
|
1441
|
-
"prose-ol:list-decimal",
|
|
1442
|
-
"focus-within:outline-none focus-within:border-me-primary-500 z-50 relative"
|
|
1443
|
-
].join(" "),
|
|
1444
|
-
markdown: memoState,
|
|
1445
|
-
suppressHtmlProcessing: true,
|
|
1446
|
-
onError: (err) => {
|
|
1447
|
-
console.log("err", err);
|
|
1448
|
-
},
|
|
1449
|
-
onChange: (value2) => {
|
|
1450
|
-
_setValue(value2);
|
|
1451
|
-
debounceSave();
|
|
1452
|
-
}
|
|
1453
|
-
}
|
|
1454
|
-
);
|
|
1455
|
-
}
|
|
1456
|
-
|
|
1457
|
-
// src/IconButton.tsx
|
|
1458
|
-
import { twMerge as twMerge7 } from "tailwind-merge";
|
|
1459
|
-
import { jsx as jsx41, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
1460
|
-
function IconButton({
|
|
1461
|
-
children,
|
|
1462
|
-
active,
|
|
1463
|
-
label,
|
|
1464
|
-
disabled,
|
|
1465
|
-
onPress,
|
|
1466
|
-
root,
|
|
1467
|
-
className: className2,
|
|
1468
|
-
placement = "top"
|
|
1469
|
-
}) {
|
|
1470
|
-
return /* @__PURE__ */ jsx41(Tooltip, { placement, children: /* @__PURE__ */ jsxs27(
|
|
1471
|
-
TooltipTrigger,
|
|
1472
|
-
{
|
|
1473
|
-
"aria-label": label,
|
|
1474
|
-
onClick: onPress,
|
|
1475
|
-
className: twMerge7(
|
|
1476
|
-
"rounded flex items-center bg-white justify-center p-2 hover:bg-gray-100 text-2xl",
|
|
1477
|
-
active ? "bg-me-primary-500 bg-opacity-40 hover:bg-opacity-70 hover:bg-me-primary-500" : "",
|
|
1478
|
-
disabled ? "opacity-50 pointer-events-none" : "",
|
|
1479
|
-
className2
|
|
1480
|
-
),
|
|
1481
|
-
children: [
|
|
1482
|
-
children,
|
|
1483
|
-
/* @__PURE__ */ jsx41(DefaultTooltipContent, { root, className: "translate-x-3 z-50", children: label })
|
|
1484
|
-
]
|
|
1485
|
-
}
|
|
1486
|
-
) });
|
|
1487
|
-
}
|
|
1488
|
-
|
|
1489
|
-
// src/ItemWithHandle.tsx
|
|
1490
|
-
import { jsx as jsx42, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
1491
|
-
function ItemWithHandle({
|
|
1492
|
-
children,
|
|
1493
|
-
handle,
|
|
1494
|
-
actions,
|
|
1495
|
-
grid
|
|
1496
|
-
}) {
|
|
1497
|
-
const gridStyleClassName = grid ? (
|
|
1498
|
-
// Tailwind
|
|
1499
|
-
"absolute flex p-1 gap-1 bg-white z-1 right-1 top-1 rounded"
|
|
1500
|
-
) : "flex-shrink-0 flex items-center gap-1 px-1";
|
|
1501
|
-
return /* @__PURE__ */ jsxs28("div", { className: grid ? "relative flex flex-col" : "flex items-center", children: [
|
|
1502
|
-
/* @__PURE__ */ jsx42("div", { className: "flex-1 min-w-0", style: { flex: 1, minWidth: 0 }, children }),
|
|
1503
|
-
/* @__PURE__ */ jsxs28("div", { className: gridStyleClassName, children: [
|
|
1504
|
-
actions,
|
|
1505
|
-
handle
|
|
1506
|
-
] })
|
|
1507
|
-
] });
|
|
1508
|
-
}
|
|
1509
|
-
|
|
1510
|
-
// src/HandleContainer.tsx
|
|
1511
|
-
import { forwardRef as forwardRef2 } from "react";
|
|
1512
|
-
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
1513
|
-
var HandleContainer = forwardRef2(function HandleContainer2({ className: className2, ...props }, ref) {
|
|
1514
|
-
return /* @__PURE__ */ jsx43(
|
|
1515
|
-
"div",
|
|
1516
|
-
{
|
|
1517
|
-
ref,
|
|
1518
|
-
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 || ""}`,
|
|
1519
|
-
...props
|
|
1520
|
-
}
|
|
1521
|
-
);
|
|
1522
|
-
});
|
|
1523
|
-
|
|
1524
|
-
// src/CollectionListItem.tsx
|
|
1525
|
-
import { LocaleString as LocaleString3, useCollection } from "react-iiif-vault";
|
|
1526
|
-
|
|
1527
|
-
// src/icons/CollectionIcon.tsx
|
|
1528
|
-
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
1529
|
-
function CollectionIcon(props) {
|
|
1530
|
-
return /* @__PURE__ */ jsx44(
|
|
1531
|
-
"svg",
|
|
1532
|
-
{
|
|
1533
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1534
|
-
width: "1em",
|
|
1535
|
-
height: "1em",
|
|
1536
|
-
viewBox: "0 -960 960 960",
|
|
1537
|
-
"aria-label": "collection",
|
|
1538
|
-
role: "img",
|
|
1539
|
-
...props,
|
|
1540
|
-
children: /* @__PURE__ */ jsx44(
|
|
1541
|
-
"path",
|
|
1542
|
-
{
|
|
1543
|
-
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",
|
|
1544
|
-
fill: "currentColor"
|
|
1545
|
-
}
|
|
1546
|
-
)
|
|
1547
|
-
}
|
|
1548
|
-
);
|
|
1549
|
-
}
|
|
1550
|
-
|
|
1551
|
-
// src/CollectionListItem.tsx
|
|
1552
|
-
import { usePress } from "react-aria";
|
|
1553
|
-
import { getValue } from "@iiif/helpers/i18n";
|
|
1554
|
-
import { jsx as jsx45, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
1555
|
-
function CollectionListItem({ isActive, onAction }) {
|
|
1556
|
-
const collection = useCollection({});
|
|
1557
|
-
const { pressProps } = usePress({
|
|
1558
|
-
onPress: onAction
|
|
1559
|
-
});
|
|
1560
|
-
return /* @__PURE__ */ jsxs29(
|
|
1561
|
-
"li",
|
|
1562
|
-
{
|
|
1563
|
-
"aria-label": getValue(collection?.label),
|
|
1564
|
-
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",
|
|
1565
|
-
"data-active": isActive || void 0,
|
|
1566
|
-
...pressProps,
|
|
1567
|
-
children: [
|
|
1568
|
-
/* @__PURE__ */ jsx45(
|
|
1569
|
-
CollectionIcon,
|
|
1570
|
-
{
|
|
1571
|
-
"data-active": isActive || void 0,
|
|
1572
|
-
className: "flex-shrink-0 text-2xl data-[active]:text-me-primary-500 text-gray-400"
|
|
1573
|
-
}
|
|
1574
|
-
),
|
|
1575
|
-
/* @__PURE__ */ jsx45(LocaleString3, { children: collection?.label })
|
|
1576
|
-
]
|
|
1577
|
-
}
|
|
1578
|
-
);
|
|
1579
|
-
}
|
|
1580
|
-
|
|
1581
|
-
// src/ManifestListItem.tsx
|
|
1582
|
-
import { LocaleString as LocaleString4, useManifest } from "react-iiif-vault";
|
|
1583
|
-
|
|
1584
|
-
// src/icons/ManifestIcon.tsx
|
|
1585
|
-
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
1586
|
-
function ManifestIcon(props) {
|
|
1587
|
-
return /* @__PURE__ */ jsx46(
|
|
1588
|
-
"svg",
|
|
1589
|
-
{
|
|
1590
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1591
|
-
width: "1em",
|
|
1592
|
-
height: "1em",
|
|
1593
|
-
viewBox: "20 -910 960 960",
|
|
1594
|
-
"aria-label": "manifest",
|
|
1595
|
-
role: "img",
|
|
1596
|
-
...props,
|
|
1597
|
-
children: /* @__PURE__ */ jsx46(
|
|
1598
|
-
"path",
|
|
1599
|
-
{
|
|
1600
|
-
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",
|
|
1601
|
-
fill: "currentColor"
|
|
1602
|
-
}
|
|
1603
|
-
)
|
|
1604
|
-
}
|
|
1605
|
-
);
|
|
1606
|
-
}
|
|
1607
|
-
|
|
1608
|
-
// src/ManifestListItem.tsx
|
|
1609
|
-
import { usePress as usePress2 } from "react-aria";
|
|
1610
|
-
import { getValue as getValue2 } from "@iiif/helpers";
|
|
1611
|
-
import { jsx as jsx47, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
1612
|
-
function ManifestListItem({ isActive, onAction }) {
|
|
1613
|
-
const manifest = useManifest();
|
|
1614
|
-
const { pressProps } = usePress2({
|
|
1615
|
-
onPress: onAction
|
|
1616
|
-
});
|
|
1617
|
-
return /* @__PURE__ */ jsxs30(
|
|
1618
|
-
"li",
|
|
1619
|
-
{
|
|
1620
|
-
"aria-label": getValue2(manifest?.label),
|
|
1621
|
-
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",
|
|
1622
|
-
"data-active": isActive || void 0,
|
|
1623
|
-
...pressProps,
|
|
1624
|
-
children: [
|
|
1625
|
-
/* @__PURE__ */ jsx47(
|
|
1626
|
-
ManifestIcon,
|
|
1627
|
-
{
|
|
1628
|
-
"data-active": isActive || void 0,
|
|
1629
|
-
className: "flex-shrink-0 text-2xl data-[active]:text-me-primary-500 text-gray-400"
|
|
1630
|
-
}
|
|
1631
|
-
),
|
|
1632
|
-
/* @__PURE__ */ jsx47(LocaleString4, { children: manifest?.label })
|
|
1633
|
-
]
|
|
1634
|
-
}
|
|
1635
|
-
);
|
|
1636
|
-
}
|
|
1637
|
-
|
|
1638
|
-
// src/icons/CreateCanvasIcon.tsx
|
|
1639
|
-
import { jsx as jsx48, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
1640
|
-
function CreateCanvasIcon() {
|
|
1641
|
-
return /* @__PURE__ */ jsxs31("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24", viewBox: "0 0 24 24", width: "24", children: [
|
|
1642
|
-
/* @__PURE__ */ jsx48("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
1643
|
-
/* @__PURE__ */ jsx48(
|
|
1644
|
-
"path",
|
|
1645
|
-
{
|
|
1646
|
-
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",
|
|
1647
|
-
fill: "currentColor"
|
|
1648
|
-
}
|
|
1649
|
-
)
|
|
1650
|
-
] });
|
|
1651
|
-
}
|
|
1652
|
-
|
|
1653
|
-
// src/icons/AddImageIcon.tsx
|
|
1654
|
-
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
1655
|
-
var AddImageIcon = (props) => /* @__PURE__ */ jsx49("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "#5f6368", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx49(
|
|
1656
|
-
"path",
|
|
1657
|
-
{
|
|
1658
|
-
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",
|
|
1659
|
-
fill: "currentColor"
|
|
1660
|
-
}
|
|
1661
|
-
) });
|
|
1662
|
-
|
|
1663
|
-
// src/icons/IIIFLogo.tsx
|
|
1664
|
-
import { jsx as jsx50, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
1665
|
-
var IIIFLogo = ({ mono = true, ...props }) => /* @__PURE__ */ jsxs32(
|
|
1666
|
-
"svg",
|
|
1667
|
-
{
|
|
1668
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1669
|
-
xmlSpace: "preserve",
|
|
1670
|
-
width: "1em",
|
|
1671
|
-
height: "1em",
|
|
1672
|
-
...props,
|
|
1673
|
-
viewBox: "0 0 493.36 441.333",
|
|
1674
|
-
children: [
|
|
1675
|
-
/* @__PURE__ */ jsx50(
|
|
1676
|
-
"path",
|
|
1677
|
-
{
|
|
1678
|
-
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",
|
|
1679
|
-
style: {
|
|
1680
|
-
fill: mono ? "currentColor" : "#2873ab",
|
|
1681
|
-
fillOpacity: 1,
|
|
1682
|
-
fillRule: "nonzero",
|
|
1683
|
-
stroke: "none"
|
|
1684
|
-
},
|
|
1685
|
-
transform: "matrix(.13333 0 0 -.13333 0 441.333)"
|
|
1686
|
-
}
|
|
1687
|
-
),
|
|
1688
|
-
/* @__PURE__ */ jsx50(
|
|
1689
|
-
"path",
|
|
1690
|
-
{
|
|
1691
|
-
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",
|
|
1692
|
-
style: {
|
|
1693
|
-
fill: mono ? "currentColor" : "#ed1d33",
|
|
1694
|
-
fillOpacity: 1,
|
|
1695
|
-
fillRule: "nonzero",
|
|
1696
|
-
stroke: "none"
|
|
1697
|
-
},
|
|
1698
|
-
transform: "matrix(.13333 0 0 -.13333 0 441.333)"
|
|
1699
|
-
}
|
|
1700
|
-
),
|
|
1701
|
-
/* @__PURE__ */ jsx50(
|
|
1702
|
-
"path",
|
|
1703
|
-
{
|
|
1704
|
-
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",
|
|
1705
|
-
style: {
|
|
1706
|
-
fill: mono ? "currentColor" : "#2873ab",
|
|
1707
|
-
fillOpacity: 1,
|
|
1708
|
-
fillRule: "nonzero",
|
|
1709
|
-
stroke: "none"
|
|
1710
|
-
},
|
|
1711
|
-
transform: "matrix(.13333 0 0 -.13333 0 441.333)"
|
|
1712
|
-
}
|
|
1713
|
-
),
|
|
1714
|
-
/* @__PURE__ */ jsx50(
|
|
1715
|
-
"path",
|
|
1716
|
-
{
|
|
1717
|
-
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",
|
|
1718
|
-
style: {
|
|
1719
|
-
fill: mono ? "currentColor" : "#ed1d33",
|
|
1720
|
-
fillOpacity: 1,
|
|
1721
|
-
fillRule: "nonzero",
|
|
1722
|
-
stroke: "none"
|
|
1723
|
-
},
|
|
1724
|
-
transform: "matrix(.13333 0 0 -.13333 0 441.333)"
|
|
1725
|
-
}
|
|
1726
|
-
)
|
|
1727
|
-
]
|
|
1728
|
-
}
|
|
1729
|
-
);
|
|
1730
|
-
|
|
1731
|
-
// src/icons/HTMLIcon.tsx
|
|
1732
|
-
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
1733
|
-
var HTMLIcon = (props) => /* @__PURE__ */ jsx51("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "#5f6368", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx51(
|
|
1734
|
-
"path",
|
|
1735
|
-
{
|
|
1736
|
-
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",
|
|
1737
|
-
fill: "currentColor"
|
|
1738
|
-
}
|
|
1739
|
-
) });
|
|
1740
|
-
|
|
1741
|
-
// src/icons/IIIFBrowserIcon.tsx
|
|
1742
|
-
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
1743
|
-
var IIIFBrowserIcon = (props) => /* @__PURE__ */ jsx52("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "#5f6368", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx52(
|
|
1744
|
-
"path",
|
|
1745
|
-
{
|
|
1746
|
-
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",
|
|
1747
|
-
fill: "currentColor"
|
|
1748
|
-
}
|
|
1749
|
-
) });
|
|
1750
|
-
|
|
1751
|
-
// src/icons/InfoIcon.tsx
|
|
1752
|
-
import { jsx as jsx53, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
1753
|
-
function InfoIcon({ title, titleId, ...props }) {
|
|
1754
|
-
return /* @__PURE__ */ jsxs33("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", "aria-labelledby": titleId, ...props, children: [
|
|
1755
|
-
title ? /* @__PURE__ */ jsx53("title", { id: titleId, children: title }) : null,
|
|
1756
|
-
/* @__PURE__ */ jsx53("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
1757
|
-
/* @__PURE__ */ jsx53(
|
|
1758
|
-
"path",
|
|
1759
|
-
{
|
|
1760
|
-
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",
|
|
1761
|
-
fill: "currentColor"
|
|
1762
|
-
}
|
|
1763
|
-
)
|
|
1764
|
-
] });
|
|
1765
|
-
}
|
|
1766
|
-
|
|
1767
|
-
// src/icons/ListingIcon.tsx
|
|
1768
|
-
import { jsx as jsx54, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
1769
|
-
function ListingIcon({
|
|
1770
|
-
title,
|
|
1771
|
-
titleId,
|
|
1772
|
-
...props
|
|
1773
|
-
}) {
|
|
1774
|
-
return /* @__PURE__ */ jsxs34(
|
|
1775
|
-
"svg",
|
|
1776
|
-
{
|
|
1777
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1778
|
-
viewBox: "0 0 24 24",
|
|
1779
|
-
width: "1em",
|
|
1780
|
-
height: "1em",
|
|
1781
|
-
"aria-labelledby": titleId,
|
|
1782
|
-
...props,
|
|
1783
|
-
children: [
|
|
1784
|
-
title ? /* @__PURE__ */ jsx54("title", { id: titleId, children: title }) : null,
|
|
1785
|
-
/* @__PURE__ */ jsxs34("g", { fill: "none", children: [
|
|
1786
|
-
/* @__PURE__ */ jsx54("path", { d: "M0 0h24v24H0V0z" }),
|
|
1787
|
-
/* @__PURE__ */ jsx54("path", { d: "M0 0h24v24H0V0z", opacity: ".87" })
|
|
1788
|
-
] }),
|
|
1789
|
-
/* @__PURE__ */ jsx54(
|
|
1790
|
-
"path",
|
|
1791
|
-
{
|
|
1792
|
-
d: "M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7zm-4 6h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z",
|
|
1793
|
-
fill: "currentColor"
|
|
1794
|
-
}
|
|
1795
|
-
)
|
|
1796
|
-
]
|
|
1797
|
-
}
|
|
1798
|
-
);
|
|
1799
|
-
}
|
|
1800
|
-
|
|
1801
|
-
// src/icons/YouTubeIcon.tsx
|
|
1802
|
-
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
1803
|
-
var YouTubeIcon = (props) => /* @__PURE__ */ jsx55("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "#5f6368", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx55(
|
|
1804
|
-
"path",
|
|
1805
|
-
{
|
|
1806
|
-
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",
|
|
1807
|
-
fill: "currentColor"
|
|
1808
|
-
}
|
|
1809
|
-
) });
|
|
1810
|
-
|
|
1811
|
-
// src/icons/ListEditIcon.tsx
|
|
1812
|
-
import { jsx as jsx56, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
1813
|
-
function ListEditIcon({
|
|
1814
|
-
title,
|
|
1815
|
-
titleId,
|
|
1816
|
-
...props
|
|
1817
|
-
}) {
|
|
1818
|
-
return /* @__PURE__ */ jsxs35(
|
|
1819
|
-
"svg",
|
|
1820
|
-
{
|
|
1821
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1822
|
-
height: "24",
|
|
1823
|
-
viewBox: "0 0 24 24",
|
|
1824
|
-
width: "24",
|
|
1825
|
-
"aria-labelledby": titleId,
|
|
1826
|
-
...props,
|
|
1827
|
-
children: [
|
|
1828
|
-
title ? /* @__PURE__ */ jsx56("title", { id: titleId, children: title }) : null,
|
|
1829
|
-
/* @__PURE__ */ jsx56("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
1830
|
-
/* @__PURE__ */ jsx56("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" })
|
|
1831
|
-
]
|
|
1832
|
-
}
|
|
1833
|
-
);
|
|
1834
|
-
}
|
|
1835
|
-
|
|
1836
|
-
// src/icons/VideoIcon.tsx
|
|
1837
|
-
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
1838
|
-
var VideoIcon = (props) => /* @__PURE__ */ jsx57("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "#5f6368", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx57(
|
|
1839
|
-
"path",
|
|
1840
|
-
{
|
|
1841
|
-
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",
|
|
1842
|
-
fill: "currentColor"
|
|
1843
|
-
}
|
|
1844
|
-
) });
|
|
1845
|
-
|
|
1846
|
-
// src/icons/AudioIcon.tsx
|
|
1847
|
-
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
1848
|
-
var AudioIcon = (props) => /* @__PURE__ */ jsx58("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "#5f6368", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx58(
|
|
1849
|
-
"path",
|
|
1850
|
-
{
|
|
1851
|
-
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",
|
|
1852
|
-
fill: "currentColor"
|
|
1853
|
-
}
|
|
1854
|
-
) });
|
|
1855
|
-
|
|
1856
|
-
// src/icons/EmptyCanvasIcon.tsx
|
|
1857
|
-
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
1858
|
-
var EmptyCanvasIcon = (props) => /* @__PURE__ */ jsx59("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "#5f6368", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx59(
|
|
1859
|
-
"path",
|
|
1860
|
-
{
|
|
1861
|
-
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",
|
|
1862
|
-
fill: "currentColor"
|
|
1863
|
-
}
|
|
1864
|
-
) });
|
|
1865
|
-
|
|
1866
|
-
// src/icons/AddIcon.tsx
|
|
1867
|
-
import { jsx as jsx60, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
1868
|
-
function AddIcon({
|
|
1869
|
-
className: className2,
|
|
1870
|
-
inline,
|
|
1871
|
-
height = 16,
|
|
1872
|
-
color = "black"
|
|
1873
|
-
}) {
|
|
1874
|
-
return /* @__PURE__ */ jsxs36(
|
|
1875
|
-
"svg",
|
|
1876
|
-
{
|
|
1877
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1878
|
-
height: `${height}px`,
|
|
1879
|
-
viewBox: "0 0 24 24",
|
|
1880
|
-
width: "24px",
|
|
1881
|
-
fill: color,
|
|
1882
|
-
style: { verticalAlign: inline ? "bottom" : void 0 },
|
|
1883
|
-
className: className2,
|
|
1884
|
-
children: [
|
|
1885
|
-
/* @__PURE__ */ jsx60("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
1886
|
-
/* @__PURE__ */ jsx60("path", { d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z", fill: "currentColor" })
|
|
1887
|
-
]
|
|
1888
|
-
}
|
|
1889
|
-
);
|
|
1890
|
-
}
|
|
1891
|
-
|
|
1892
|
-
// src/icons/MoreMenu.tsx
|
|
1893
|
-
import { jsx as jsx61, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
1894
|
-
function MoreMenu2() {
|
|
1895
|
-
return /* @__PURE__ */ jsxs37(
|
|
1896
|
-
"svg",
|
|
1897
|
-
{
|
|
1898
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1899
|
-
height: "1em",
|
|
1900
|
-
viewBox: "0 0 24 24",
|
|
1901
|
-
width: "1em",
|
|
1902
|
-
children: [
|
|
1903
|
-
/* @__PURE__ */ jsx61("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
1904
|
-
/* @__PURE__ */ jsx61(
|
|
1905
|
-
"path",
|
|
1906
|
-
{
|
|
1907
|
-
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",
|
|
1908
|
-
fill: "currentColor"
|
|
1909
|
-
}
|
|
1910
|
-
)
|
|
1911
|
-
]
|
|
1912
|
-
}
|
|
1913
|
-
);
|
|
1914
|
-
}
|
|
1915
|
-
|
|
1916
|
-
// src/icons/PreviewIcon.tsx
|
|
1917
|
-
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
1918
|
-
function PreviewIcon(props) {
|
|
1919
|
-
return /* @__PURE__ */ jsx62("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props, children: /* @__PURE__ */ jsx62(
|
|
1920
|
-
"path",
|
|
1921
|
-
{
|
|
1922
|
-
fill: "currentColor",
|
|
1923
|
-
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"
|
|
1924
|
-
}
|
|
1925
|
-
) });
|
|
1926
|
-
}
|
|
1927
|
-
|
|
1928
|
-
// src/icons/ImageListIcon.tsx
|
|
1929
|
-
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
1930
|
-
function ImageListIcon(props) {
|
|
1931
|
-
return /* @__PURE__ */ jsx63("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props, children: /* @__PURE__ */ jsx63(
|
|
1932
|
-
"path",
|
|
1933
|
-
{
|
|
1934
|
-
fill: "currentColor",
|
|
1935
|
-
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"
|
|
1936
|
-
}
|
|
1937
|
-
) });
|
|
1938
|
-
}
|
|
1939
|
-
|
|
1940
|
-
// src/icons/BackIcon.tsx
|
|
1941
|
-
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
1942
|
-
function BackIcon(props) {
|
|
1943
|
-
return /* @__PURE__ */ jsx64("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props, children: /* @__PURE__ */ jsx64("path", { fill: "currentColor", d: "M20 11H7.83l5.59-5.59L12 4l-8 8l8 8l1.41-1.41L7.83 13H20z" }) });
|
|
1944
|
-
}
|
|
1945
|
-
|
|
1946
|
-
// src/icons/GridIcon.tsx
|
|
1947
|
-
import { jsx as jsx65, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
1948
|
-
function GridIcon(props) {
|
|
1949
|
-
return /* @__PURE__ */ jsxs38("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props, children: [
|
|
1950
|
-
/* @__PURE__ */ jsx65(
|
|
1951
|
-
"path",
|
|
1952
|
-
{
|
|
1953
|
-
fill: "currentColor",
|
|
1954
|
-
d: "M10 10h4v4h-4zm0 6h4v4h-4zM4 4h4v4H4zm0 6h4v4H4zm0 6h4v4H4zM16 4h4v4h-4zm0 6h4v4h-4zm0 6h4v4h-4zM10 4h4v4h-4z",
|
|
1955
|
-
opacity: ".3"
|
|
1956
|
-
}
|
|
1957
|
-
),
|
|
1958
|
-
/* @__PURE__ */ jsx65(
|
|
1959
|
-
"path",
|
|
1960
|
-
{
|
|
1961
|
-
fill: "currentColor",
|
|
1962
|
-
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"
|
|
1963
|
-
}
|
|
1964
|
-
)
|
|
1965
|
-
] });
|
|
1966
|
-
}
|
|
1967
|
-
|
|
1968
|
-
// src/icons/ScaledImageIcon.tsx
|
|
1969
|
-
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
1970
|
-
function ScaledImageIcon(props) {
|
|
1971
|
-
return /* @__PURE__ */ jsx66("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props, children: /* @__PURE__ */ jsx66(
|
|
1972
|
-
"path",
|
|
1973
|
-
{
|
|
1974
|
-
fill: "currentColor",
|
|
1975
|
-
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"
|
|
1976
|
-
}
|
|
1977
|
-
) });
|
|
1978
|
-
}
|
|
1979
|
-
|
|
1980
|
-
// src/ErrorMessage.tsx
|
|
1981
|
-
import { twMerge as twMerge8 } from "tailwind-merge";
|
|
1982
|
-
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
1983
|
-
function ErrorMessage({ children, small = false, className: className2 }) {
|
|
1984
|
-
return /* @__PURE__ */ jsx67(
|
|
1985
|
-
"div",
|
|
1986
|
-
{
|
|
1987
|
-
className: twMerge8(
|
|
1988
|
-
"bg-red-500 text-white",
|
|
1989
|
-
"border-1 drop-shadow border-red-700 w-full rounded-md py-2 px-4 leading-[1.9em] flex items-center",
|
|
1990
|
-
"has-[a]:text-white",
|
|
1991
|
-
small && "text-xs whitespace-nowrap py-1 px-2 leading-[1.6em] w-fit",
|
|
1992
|
-
className2
|
|
1993
|
-
),
|
|
1994
|
-
children
|
|
1995
|
-
}
|
|
1996
|
-
);
|
|
1997
|
-
}
|
|
1998
|
-
|
|
1999
|
-
// src/hooks.ts
|
|
2000
|
-
import { useLayoutEffect as useLayoutEffect4, useState as useState5 } from "react";
|
|
2001
|
-
function useFastList(list, firstRender = 24) {
|
|
2002
|
-
const [isMounted, setIsMounted] = useState5(false);
|
|
2003
|
-
useLayoutEffect4(() => {
|
|
2004
|
-
if (list) {
|
|
2005
|
-
setTimeout(() => {
|
|
2006
|
-
setIsMounted(true);
|
|
2007
|
-
}, 0);
|
|
2008
|
-
}
|
|
2009
|
-
}, [list]);
|
|
2010
|
-
if (!list) {
|
|
2011
|
-
return [];
|
|
2012
|
-
}
|
|
2013
|
-
if (isMounted) {
|
|
2014
|
-
return list;
|
|
2015
|
-
}
|
|
2016
|
-
return list.slice(0, firstRender);
|
|
2017
|
-
}
|
|
2018
|
-
|
|
2019
|
-
// src/RenderTextualContent.tsx
|
|
2020
|
-
import { useState as useState6 } from "react";
|
|
2021
|
-
import { Button as Button7 } from "react-aria-components";
|
|
2022
|
-
import {
|
|
2023
|
-
LocaleString as LocaleString5
|
|
2024
|
-
} from "react-iiif-vault";
|
|
2025
|
-
import { jsx as jsx68, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
2026
|
-
function RenderTextualContent(props) {
|
|
2027
|
-
const languages = props.strategy.items.map(
|
|
2028
|
-
(item) => Object.keys(item.text)[0]
|
|
2029
|
-
);
|
|
2030
|
-
const [langauge, setLanguage] = useState6(languages[0]);
|
|
2031
|
-
const selected = props.strategy.items.find(
|
|
2032
|
-
(item) => Object.keys(item.text)[0] === langauge
|
|
2033
|
-
);
|
|
2034
|
-
return /* @__PURE__ */ jsxs39("div", { className: "overflow-y-auto bg-white shadow", children: [
|
|
2035
|
-
/* @__PURE__ */ jsx68("div", { className: "flex gap-2 border-b", children: languages.map((language) => {
|
|
2036
|
-
return /* @__PURE__ */ jsx68(
|
|
2037
|
-
Button7,
|
|
2038
|
-
{
|
|
2039
|
-
className: `py-1 px-3 ${langauge === language ? "bg-me-500 text-white" : "bg-white text-black"}`,
|
|
2040
|
-
onPress: () => setLanguage(language),
|
|
2041
|
-
children: language
|
|
2042
|
-
},
|
|
2043
|
-
language
|
|
2044
|
-
);
|
|
2045
|
-
}) }),
|
|
2046
|
-
/* @__PURE__ */ jsx68("div", { className: "p-4 prose", children: /* @__PURE__ */ jsx68(
|
|
2047
|
-
LocaleString5,
|
|
2048
|
-
{
|
|
2049
|
-
enableDangerouslySetInnerHTML: true,
|
|
2050
|
-
defaultText: /* @__PURE__ */ jsx68("span", { className: "text-gray-500 my-8", children: "No content available" }),
|
|
2051
|
-
children: selected?.text
|
|
2052
|
-
}
|
|
2053
|
-
) })
|
|
2054
|
-
] });
|
|
2055
|
-
}
|
|
2056
|
-
|
|
2057
|
-
// src/IIIFMediaPlayer.tsx
|
|
2058
|
-
import "@vidstack/react/player/styles/base.css";
|
|
2059
|
-
import "@vidstack/react/player/styles/default/theme.css";
|
|
2060
|
-
import "@vidstack/react/player/styles/default/captions.css";
|
|
2061
|
-
import "@vidstack/react/player/styles/default/layouts/video.css";
|
|
2062
|
-
import { MediaPlayer, MediaProvider, Poster, Gesture, Track } from "@vidstack/react";
|
|
2063
|
-
import { defaultLayoutIcons, DefaultVideoLayout } from "@vidstack/react/player/layouts/default";
|
|
2064
|
-
import { getValue as getValue3 } from "@iiif/helpers";
|
|
2065
|
-
import { useRef as useRef5 } from "react";
|
|
2066
|
-
import { Fragment as Fragment5, jsx as jsx69, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
2067
|
-
function IIIFMediaPlayer(props) {
|
|
2068
|
-
const mediaPlayer = useRef5(null);
|
|
2069
|
-
const captions = props.captions || [];
|
|
2070
|
-
const language = props.language;
|
|
2071
|
-
const timeRef = useRef5(props.startTime || 0);
|
|
2072
|
-
return /* @__PURE__ */ jsx69(
|
|
2073
|
-
MediaPlayer,
|
|
2074
|
-
{
|
|
2075
|
-
onTimeUpdate: (time) => {
|
|
2076
|
-
const newT = Math.round(time.currentTime);
|
|
2077
|
-
if (timeRef.current === newT)
|
|
2078
|
-
return;
|
|
2079
|
-
timeRef.current = newT;
|
|
2080
|
-
},
|
|
2081
|
-
ref: mediaPlayer,
|
|
2082
|
-
lang: language,
|
|
2083
|
-
className: "h-full w-full min-w-[275px] flex radius-0",
|
|
2084
|
-
playsInline: true,
|
|
2085
|
-
currentTime: props.startTime,
|
|
2086
|
-
duration: props.media.duration,
|
|
2087
|
-
src: [
|
|
2088
|
-
{
|
|
2089
|
-
src: props.media.url,
|
|
2090
|
-
type: props.media.format
|
|
2091
|
-
}
|
|
2092
|
-
],
|
|
2093
|
-
children: /* @__PURE__ */ jsxs40(MediaProvider, { className: "w-full h-full [&>video]:w-full [&>video]:h-full [&>video]:object-contain", children: [
|
|
2094
|
-
captions.map((caption) => {
|
|
2095
|
-
return /* @__PURE__ */ jsx69(
|
|
2096
|
-
Track,
|
|
2097
|
-
{
|
|
2098
|
-
src: caption.id,
|
|
2099
|
-
kind: "subtitles",
|
|
2100
|
-
label: getValue3(caption.label),
|
|
2101
|
-
default: caption.language === language,
|
|
2102
|
-
language: caption.language
|
|
2103
|
-
},
|
|
2104
|
-
caption.id
|
|
2105
|
-
);
|
|
2106
|
-
}),
|
|
2107
|
-
props.poster ? /* @__PURE__ */ jsx69(
|
|
2108
|
-
Poster,
|
|
2109
|
-
{
|
|
2110
|
-
className: "absolute inset-0 bg-black block h-full w-full opacity-0 transition-opacity data-[visible]:opacity-100 object-contain",
|
|
2111
|
-
src: props.poster
|
|
2112
|
-
}
|
|
2113
|
-
) : null,
|
|
2114
|
-
/* @__PURE__ */ jsx69(Gestures, {}),
|
|
2115
|
-
/* @__PURE__ */ jsx69(
|
|
2116
|
-
DefaultVideoLayout,
|
|
2117
|
-
{
|
|
2118
|
-
className: "z-1",
|
|
2119
|
-
noGestures: true,
|
|
2120
|
-
icons: defaultLayoutIcons
|
|
2121
|
-
}
|
|
2122
|
-
)
|
|
2123
|
-
] })
|
|
2124
|
-
}
|
|
2125
|
-
);
|
|
2126
|
-
}
|
|
2127
|
-
function Gestures() {
|
|
2128
|
-
return /* @__PURE__ */ jsxs40(Fragment5, { children: [
|
|
2129
|
-
/* @__PURE__ */ jsx69(
|
|
2130
|
-
Gesture,
|
|
2131
|
-
{
|
|
2132
|
-
className: "pointer-coarse:hidden absolute top-0 start-12 bottom-20 right-0 -z-1 block",
|
|
2133
|
-
event: "pointerup",
|
|
2134
|
-
action: "toggle:paused"
|
|
2135
|
-
}
|
|
2136
|
-
),
|
|
2137
|
-
/* @__PURE__ */ jsx69(Gesture, { className: "absolute inset-0 z-0 block h-full w-full", event: "dblpointerup", action: "toggle:fullscreen" })
|
|
2138
|
-
] });
|
|
2139
|
-
}
|
|
2140
|
-
export {
|
|
2141
|
-
AccessibilityButton,
|
|
2142
|
-
ActionButton,
|
|
2143
|
-
AddIcon,
|
|
2144
|
-
AddImageIcon,
|
|
2145
|
-
AtlasBanner,
|
|
2146
|
-
AudioIcon,
|
|
2147
|
-
BackIcon,
|
|
2148
|
-
CanvasThumbnailGridItem,
|
|
2149
|
-
Card3D,
|
|
2150
|
-
CollectionIcon,
|
|
2151
|
-
CollectionListItem,
|
|
2152
|
-
ConfirmSelectionButton,
|
|
2153
|
-
ControlButton,
|
|
2154
|
-
CreateCanvasIcon,
|
|
2155
|
-
CreatorGrid,
|
|
2156
|
-
DefaultTooltipContent,
|
|
2157
|
-
DeleteForeverIcon,
|
|
2158
|
-
DownloadButton,
|
|
2159
|
-
DownloadIcon,
|
|
2160
|
-
EmptyCanvasIcon,
|
|
2161
|
-
EmptyState,
|
|
2162
|
-
ErrorMessage,
|
|
2163
|
-
Form,
|
|
2164
|
-
GridIcon,
|
|
2165
|
-
HTMLEditor,
|
|
2166
|
-
HTMLIcon,
|
|
2167
|
-
HandleContainer,
|
|
2168
|
-
IIIFBrowserIcon,
|
|
2169
|
-
IIIFLogo,
|
|
2170
|
-
IIIFMediaPlayer,
|
|
2171
|
-
IconButton,
|
|
2172
|
-
ImageListIcon,
|
|
2173
|
-
InfoIcon,
|
|
2174
|
-
ItemWithHandle,
|
|
2175
|
-
LazyThumbnail,
|
|
2176
|
-
ListEditIcon,
|
|
2177
|
-
ListingIcon,
|
|
2178
|
-
MDXEditor,
|
|
2179
|
-
ManifestEditorLogo,
|
|
2180
|
-
ManifestIcon,
|
|
2181
|
-
ManifestListItem,
|
|
2182
|
-
ManifestOverviewEmptyState,
|
|
2183
|
-
MetadataContainer,
|
|
2184
|
-
Modal,
|
|
2185
|
-
ModalBackSlot,
|
|
2186
|
-
MoreMenu2 as MoreMenu,
|
|
2187
|
-
OpaqueControls,
|
|
2188
|
-
PanelSideMenu,
|
|
2189
|
-
PreviewIcon,
|
|
2190
|
-
RenderTextualContent,
|
|
2191
|
-
ScaledImageIcon,
|
|
2192
|
-
Sidebar,
|
|
2193
|
-
SidebarContent,
|
|
2194
|
-
SidebarHeader,
|
|
2195
|
-
SidebarTabs,
|
|
2196
|
-
Spinner,
|
|
2197
|
-
SvgControlBar,
|
|
2198
|
-
Tab,
|
|
2199
|
-
TabList,
|
|
2200
|
-
TabPanel,
|
|
2201
|
-
Tabs,
|
|
2202
|
-
TextIcon,
|
|
2203
|
-
ThumbnailGridContainer,
|
|
2204
|
-
Tooltip,
|
|
2205
|
-
TooltipContent,
|
|
2206
|
-
TooltipTrigger,
|
|
2207
|
-
VideoIcon,
|
|
2208
|
-
YouTubeIcon,
|
|
2209
|
-
createDownload,
|
|
2210
|
-
useFastList,
|
|
2211
|
-
useTooltip,
|
|
2212
|
-
useTooltipContext
|
|
2213
|
-
};
|
|
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)}},[]),g(`div`,{ref:i,className:_(`relative transition-all hover:duration-50`,t&&`hover:shadow-xl`,e),...r,children:[n,h(`div`,{className:`pointer-events-none absolute inset-0 transition-all`,style:{backgroundImage:`radial-gradient(circle at 50% -20%, #ffffff00, #ffffff00)`},ref:a})]})}function I(e){return g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:[h(`title`,{children:`Text`}),h(`path`,{fill:`currentColor`,d:`M3 21v-2h18v2zm0-4v-2h12v2zm0-4v-2h18v2zm0-4V7h12v2zm0-4V3h18v2z`})]})}function L(e){return h(`svg`,{width:`1em`,height:`1em`,viewBox:`0 0 42 42`,xmlns:`http://www.w3.org/2000/svg`,stroke:`currentColor`,...e,children:g(`g`,{transform:`translate(2 2)`,strokeWidth:5,fill:`none`,fillRule:`evenodd`,children:[h(`circle`,{strokeOpacity:.5,cx:18,cy:18,r:18}),h(`path`,{d:`M36 18c0-9.94-8.06-18-18-18`,children:h(`animateTransform`,{attributeName:`transform`,type:`rotate`,from:`0 18 18`,to:`360 18 18`,dur:`1s`,repeatCount:`indefinite`})})]})})}function R({cover:e,fade:t=!0}){return h(he,{children:h(ut,{cover:e,fade:t})})}const z=new Map;function ut({cover:e,fade:t=!0}){let[n]=x();return n.type===`images`&&n.images.length>1?h(pt,{cover:e,fade:t}):n.type===`textual-content`?h(`div`,{className:`text-black/30 flex items-center justify-center h-full bg-me-gray-100 animate-fadeInDelayed absolute inset-0`,children:h(I,{className:`w-16 h-16`})}):h(dt,{cover:e,fade:t})}function dt({cover:e,fade:t=!0}){O(null);let n=b(),r=n?!!z.get(n?.id):!1,[i,a]=k(!r),o=de({height:256,width:256},!0),s=o?.id;n?.id&&s?z.set(n.id,s):n?.id&&z.get(n.id)&&(s=z.get(n?.id)),T(()=>{s&&!r&&a(!0)},[s,r]);let c=w(e=>{e&&!r&&(e.complete||e.naturalWidth>0)&&a(!1)},[r]);return g(`div`,{className:`w-full h-full relative`,children:[o?.id?h(`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`}`}):h(ft,{}),!o?.id||i?h(`div`,{className:_(`absolute inset-0 flex items-center justify-center bg-me-gray-100 text-2xl z-10`,t&&`animate-fadeIn`),children:h(L,{})}):null]})}function ft(){let[e]=x();return e.type===`textual-content`?h(`div`,{className:`text-black/30 flex items-center justify-center h-full bg-me-gray-100 animate-fadeInDelayed absolute inset-0`,children:h(I,{className:`w-16 h-16`})}):h(`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 pt({cover:e,fade:t=!0}){let n=b(),[r]=x(),i=fe(),a=D(()=>me(i),[i]),[o,s]=k({canvasId:null,imagesToRender:[]});return T(()=>{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?h(`div`,{className:_(`absolute inset-0 flex items-center justify-center bg-me-gray-100 text-2xl z-10`,t&&`animate-fadeIn`),children:h(L,{})}):h(`div`,{className:`flex items-center justify-center w-full h-full`,children:h(`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=>h(`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:h(`img`,{className:`w-full h-full object-cover select-none`,src:e.image.id})},e.image.id))})})}const B=(...e)=>_(ge(e));function mt(e){let{dragProps:t}=ie({isDisabled:!e.dragState,getItems(){return[{"text/plain":JSON.stringify(e.dragState)}]}});return h(oe,{canvas:e.id,children:g(`div`,{...e.dragState?t:{},onClick:e.onClick,className:_(`flex flex-col`,e.className),"data-canvas-selected":e.selected,...e.containerProps||{},children:[g(`div`,{className:`bg-me-gray-100 relative w-full aspect-square group flex-1 overflow-hidden rounded`,children:[h(F,{"data-canvas-selected":e.active,"aria-selected":e.active,className:B(`border-2 border-transparent p-1 w-full h-full rounded select-none`,e.selected&&`border-me-primary-500`),children:h(R,{})}),e.icon||null]}),e.hideLabel?null:e.customLabel?e.customLabel({className:`text-sm text-center truncate mt-1`}):h(lt,{className:`text-sm text-center truncate mt-1`,as:`div`})]})})}function V(e){return h(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 -960 960 960`,"aria-label":`collection`,role:`img`,...e,children:h(`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 ht({isActive:e,onAction:t}){let n=le({}),{pressProps:r}=v({onPress:t});return g(`li`,{"aria-label":_e(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:[h(V,{"data-active":e||void 0,className:`flex-shrink-0 text-2xl data-[active]:text-me-primary-500 text-gray-400`}),h(y,{children:n?.label})]})}function gt({onPress:t,children:n}){return h(e,{className:`bg-me-primary-500 px-3 py-1 hover:bg-me-primary-600 text-white rounded`,onPress:t,children:n})}function _t({children:e,className:t,...n}){return h(`button`,{className:B(`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 vt(e){return h(a,{orientation:`horizontal`,"aria-label":e.label,selectionMode:`single`,items:e.items,className:`grid grid-sm gap-4 p-4 mb-8`,children:e=>h(yt,{...e})})}function yt(e){return g(o,{id:e.id,onAction:e.onClick,className:e=>_(`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:[h(`div`,{className:`rounded bg-me-gray-300 mb-2 flex items-center justify-center py-1 aspect-square`,children:h(`div`,{className:`text-center [&>svg]:w-16 [&>svg]:h-16`,children:e.icon})}),h(`div`,{className:`text-center font-semibold text-sm`,children:e.title}),h(`div`,{className:`text-sm text-center text-black/50`,children:e.description})]})}const H=e=>h(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`#5f6368`,viewBox:`0 -960 960 960`,...e,children:h(`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 U({initialOpen:e=!1,placement:t=`top`,open:n,onOpenChange:r}={}){let[i,a]=S.useState(e),o=n??i,s=r??a,c=we({placement:t,open:o,onOpenChange:s,whileElementsMounted:ye,middleware:[xe(5),be({crossAxis:t.includes(`-`),fallbackAxisSideDirection:`start`,padding:5}),Se({padding:5})]}),l=c.context,u=De([Ee(l,{move:!1,enabled:n==null}),Te(l,{enabled:n==null}),Ce(l),Oe(l,{role:`tooltip`})]);return S.useMemo(()=>({open:o,setOpen:s,...u,...c}),[o,s,u,c])}const W=S.createContext(null),G=()=>{let e=S.useContext(W);if(e==null)throw Error(`Tooltip components must be wrapped in <Tooltip />`);return e};function K({children:e,...t}){let n=U(t);return h(W.Provider,{value:n,children:e})}const q=S.forwardRef(function({children:t,as:n,asChild:r=!1,...i},a){let o=G(),s=t.ref,c=j([o.refs.setReference,a,s]);return r&&S.isValidElement(t)?S.cloneElement(t,o.getReferenceProps({ref:c,...i,...t.props,"data-state":o.open?`open`:`closed`})):h(n||e,{ref:c,"data-state":o.open?`open`:`closed`,...o.getReferenceProps(i),children:t})}),J=S.forwardRef(function({style:e,root:t,...n},r){let i=G(),a=j([i.refs.setFloating,r]);return i.open?h(ve,{root:t,children:h(`div`,{ref:a,style:{...i.floatingStyles,...e},...i.getFloatingProps(n)})}):null});function Y(e){return h(J,{root:e.root,className:_(`bg-me-gray-900 text-white text-sm px-3 py-2 rounded opacity-90 z-50`,e.className),children:e.children})}function bt({label:e,id:t,getData:n,fileName:r,fileType:i}){let a=ae(t);return h(K,{placement:`bottom`,children:g(q,{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:()=>xt(n(),r,i),children:[h(H,{"aria-labelledby":t}),h(Y,{children:e})]})})}function xt(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 St(e){return h(`div`,{className:B(`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 Ct({children:e,small:t=!1,className:n}){return h(`div`,{className:_(`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 wt({className:e,...t}){return h(i,{className:B(`font-semibold text-sm`,e),...t})}function Tt({className:e,...t}){return h(d,{className:B(``,e),...t})}function Et({className:e,...t}){return h(ee,{className:t=>B(`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 Dt({className:e,...t}){return h(n,{className:B(``,e),...t})}function Ot({className:e,...t}){return h(r,{className:B(`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 kt({className:e,...t}){return h(re,{className:B(`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 At({horizontal:e,className:t,...n}){return h(`div`,{className:B(`flex flex-col gap-2`,e&&`flex-row`,t),...n})}const jt={Input:Ot,Form:Dt,Label:wt,InputContainer:At,RadioGroup:Tt,Radio:Et,TextArea:kt},Mt=C(function({className:e,...t},n){return h(`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 Nt({className:e,locale:t}){let n=ce();return h(`div`,{className:e,children:D(()=>{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)=>h(`div`,{className:`prose-headings:mt-1 prose-headings:mb-1 prose-sm`,children:h(`div`,{dangerouslySetInnerHTML:{__html:e}})},t))})}function Pt({editorRef:e,...t}){return h(Le,{plugins:D(()=>[Be({allowedHeadingLevels:[2,3]}),We(),Ue(),Ge(),Ke(),He(),Ve(),ze(),qe({toolbarClassName:`mdx-toolbar`,toolbarContents:()=>g(m,{children:[` `,h(Re,{}),h(Ne,{}),h(Me,{}),h(Ie,{options:[`bullet`,`number`]}),h(Pe,{}),h(Fe,{})]})})],[]),...t,ref:e})}const X=new ke;X.setFlavor(`github`);const Ft=new je;function It({className:e,value:t,onChange:n,disabled:r}){let i=O(null),[a,o]=k(void 0),s=w(()=>{i.current&&n(X.makeHtml(i.current.getMarkdown()))},[]),c=Ae(s,400),l=D(()=>Ft.turndown(t),[]);return T(()=>{let e=i.current;return()=>{e&&n(X.makeHtml(e.getMarkdown()))}},[]),h(Pt,{editorRef:i,onBlur:s,readOnly:r,className:_([`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:l,suppressHtmlProcessing:!0,onError:e=>{console.log(`err`,e)},onChange:e=>{o(e),c()}})}function Lt(e,t=24){let[n,r]=k(!1);return E(()=>{e&&setTimeout(()=>{r(!0)},0)},[e]),e?n?e:e.slice(0,t):[]}globalThis.MS_LS_EMITTER=globalThis.MS_LS_EMITTER||Je();const Z=globalThis.MS_LS_EMITTER;function Rt(e,t,n){let[r,i]=k(t),[a,o]=Q(e,t);return n?[r,i]:[a,o]}function Q(e,t){let n=O();!n.current&&t!==void 0&&(n.current=JSON.stringify(t));let[r,i]=k(()=>{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 T(()=>{let t=({valueJson:e})=>{if(e&&e!==n.current)try{i(JSON.parse(e)),n.current=e}catch{}};return Z.on(`change:${e}`,t),()=>{Z.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,Z.emit(`change:${e}`,{valueJson:s}))}}catch(e){console.log(e)}},n]}function zt(e,t={}){let{defaultGridSize:n=`grid-md`,onDark:r=!1}=t,[i,a]=Q(e||`default-grid-size`,n||`grid-md`);return[{size:i},g(`div`,{className:`flex gap-2 items-center`,id:`grid-options`,children:[h(`div`,{className:r?`opacity-90 text-white text-sm`:`opacity-90 text-sm`,children:`Grid size:`}),h(P,{onDark:r,primary:i===`grid-sm`,onPress:()=>a(`grid-sm`),children:`Small`}),h(P,{onDark:r,primary:i===`grid-md`,onPress:()=>a(`grid-md`),children:`Medium`}),h(P,{onDark:r,primary:i===`grid-lg`,onPress:()=>a(`grid-lg`),children:`Large`})]})]}function Bt(e,t){let[n,r]=k(t.batchSize),i=D(()=>e.slice(0,n),[e,n]),a=w(()=>{r(e=>e+t.batchSize)},[t.batchSize]),o=D(()=>h(`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 Vt({children:e,active:t,label:n,disabled:r,onPress:i,root:a,className:o,placement:s=`top`}){return h(K,{placement:s,children:g(q,{"aria-label":n,onClick:i,className:_(`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,h(Y,{root:a,className:`translate-x-3 z-50`,children:n})]})})}const Ht=C(function({className:t,...n},r){return h(e,{className:_(`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`,t),...n,ref:r})});function Ut(e){let t=O(null),n=e.captions||[],r=e.language,i=O(e.startTime||0);return h(Ye,{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:g(Xe,{className:`w-full h-full [&>video]:w-full [&>video]:h-full [&>video]:object-contain`,children:[n.map(e=>h(Qe,{src:e.id,kind:`subtitles`,label:A(e.label),default:e.language===r,language:e.language},e.id)),e.poster?h(Ze,{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,h(Wt,{}),h($e,{className:`z-1`,noGestures:!0,icons:et})]})})}function Wt(){return g(m,{children:[h(M,{className:`pointer-coarse:hidden absolute top-0 start-12 bottom-20 right-0 -z-1 block`,event:`pointerup`,action:`toggle:paused`}),h(M,{className:`absolute inset-0 z-0 block h-full w-full`,event:`dblpointerup`,action:`toggle:fullscreen`})]})}function Gt({children:e,small:t=!1,className:n}){return h(`div`,{className:_(`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 Kt({children:e,handle:t,actions:n,grid:r}){return g(`div`,{className:r?`relative flex flex-col`:`flex items-center`,children:[h(`div`,{className:`flex-1 min-w-0`,style:{flex:1,minWidth:0},children:e}),g(`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 qt({className:e,inline:t,height:n=16,color:r=`black`}){return g(`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:[h(`path`,{d:`M0 0h24v24H0z`,fill:`none`}),h(`path`,{d:`M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z`,fill:`currentColor`})]})}const Jt=e=>h(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`#5f6368`,viewBox:`0 -960 960 960`,...e,children:h(`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 Yt(e){return h(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:h(`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 Xt(e){return h(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:h(`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 Zt=e=>h(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`#5f6368`,viewBox:`0 -960 960 960`,...e,children:h(`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 Qt(e){return h(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:h(`path`,{fill:`currentColor`,d:`M20 11H7.83l5.59-5.59L12 4l-8 8l8 8l1.41-1.41L7.83 13H20z`})})}function $t(e){return h(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:h(`path`,{fill:`currentColor`,d:`M9 16.17L4.83 12l-1.42 1.41L9 19L21 7l-1.41-1.41z`})})}function en(){return g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`24`,viewBox:`0 0 24 24`,width:`24`,children:[h(`path`,{d:`M0 0h24v24H0V0z`,fill:`none`}),h(`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 tn(e){return g(`svg`,{height:`1em`,width:`1em`,viewBox:`0 0 24 24`,...e,children:[h(`path`,{d:`M0 0h24v24H0z`,fill:`none`}),h(`path`,{d:`M0 0h24v24H0V0z`,fill:`none`}),h(`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 nn(e){return h(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:h(`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 rn(e){return h(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:h(`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 an=e=>h(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`#5f6368`,viewBox:`0 -960 960 960`,...e,children:h(`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 on(e){return g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:[h(`path`,{fill:`currentColor`,d:`M10 10h4v4h-4zm0 6h4v4h-4zM4 4h4v4H4zm0 6h4v4H4zm0 6h4v4H4zM16 4h4v4h-4zm0 6h4v4h-4zm0 6h4v4h-4zM10 4h4v4h-4z`,opacity:`.3`}),h(`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 sn=e=>h(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`#5f6368`,viewBox:`0 -960 960 960`,...e,children:h(`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`})}),cn=e=>h(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`#5f6368`,viewBox:`0 -960 960 960`,...e,children:h(`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`})}),ln=({mono:e=!0,...t})=>g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,xmlSpace:`preserve`,width:`1em`,height:`1em`,...t,viewBox:`0 0 493.36 441.333`,children:[h(`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)`}),h(`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)`}),h(`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)`}),h(`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 un(e){return h(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:h(`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 dn({title:e,titleId:t,...n}){return g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,"aria-labelledby":t,...n,children:[e?h(`title`,{id:t,children:e}):null,h(`path`,{d:`M0 0h24v24H0V0z`,fill:`none`}),h(`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 fn({title:e,titleId:t,...n}){return g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`24`,viewBox:`0 0 24 24`,width:`24`,"aria-labelledby":t,...n,children:[e?h(`title`,{id:t,children:e}):null,h(`path`,{d:`M0 0h24v24H0V0z`,fill:`none`}),h(`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 pn({title:e,titleId:t,...n}){return g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,width:`1em`,height:`1em`,"aria-labelledby":t,...n,children:[e?h(`title`,{id:t,children:e}):null,g(`g`,{fill:`none`,children:[h(`path`,{d:`M0 0h24v24H0V0z`}),h(`path`,{d:`M0 0h24v24H0V0z`,opacity:`.87`})]}),h(`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 mn(e){return h(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`20 -910 960 960`,"aria-label":`manifest`,role:`img`,...e,children:h(`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 hn(e){return h(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:h(`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 gn=hn;function _n(e){return h(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:h(`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 vn(e){return h(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:h(`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 yn(e){return g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`1em`,width:`1em`,viewBox:`0 0 24 24`,...e,children:[h(`path`,{d:`M0 0h24v24H0V0z`,fill:`none`}),h(`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 $({title:e,...t}){return g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,height:`1em`,width:`1em`,...t,children:[h(`path`,{fill:`none`,d:`M0 0h24v24H0z`}),h(`path`,{d:`M20 9H4v2h16V9zM4 15h16v-2H4v2z`}),e?h(`title`,{children:e}):null]})}function bn(e){return h(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:h(`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 xn(e){return h(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:h(`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 Sn=e=>h(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`#5f6368`,viewBox:`0 -960 960 960`,...e,children:h(`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`})}),Cn=e=>h(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`#5f6368`,viewBox:`0 -960 960 960`,...e,children:h(`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 wn(){return h(e,{slot:`drag`,className:`rounded-sm cursor-move bg-transparent text-gray-500 hover:bg-gray-300`,children:h($,{className:`text-xl cursor-move`})})}function Tn(e){return h(`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:g(`g`,{fill:`none`,children:[h(`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`}),h(`path`,{fill:`#E94581`,className:`me-logo-1`,d:`M0 13.343 13.343 0l13.343 13.343-13.343 13.343z`}),h(`path`,{fill:`#E94581`,className:`me-logo-2`,d:`M12.137 13.346 25.48.003l13.343 13.343L25.48 26.69z`}),h(`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 En({isActive:e,onAction:t}){let n=ue(),{pressProps:r}=v({onPress:t});return g(`li`,{"aria-label":A(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:[h(mn,{"data-active":e||void 0,className:`flex-shrink-0 text-2xl data-[active]:text-me-primary-500 text-gray-400`}),h(y,{children:n?.label})]})}function Dn({onCreate:t,canCreate:n}){return g(`div`,{className:`flex items-center flex-col gap-5 py-16`,children:[h(F,{shouldTranslate:!0,onClick:n?t:void 0,className:`border-2 border-dotted bg-black/5 aspect-[3/4] rounded w-32 border-black`}),h(`div`,{className:`font-bold text-lg`,children:`Let's get started!`}),h(`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.`}),n?h(e,{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:t,children:`Start adding content`}):null]})}function On({className:e,label:t,children:n,...r}){return g(`fieldset`,{className:B(`hover:ring ring-gray-200 focus-within:ring-me-primary-500 focus-within:ring p-2 rounded mb-2`,e),...r,children:[h(y,{className:`text-lg font-bold text-[#333] mb-2`,as:`h3`,children:t}),n]})}function kn({children:e}){let t=document.getElementById(`modal-back-slot`);return t?N(e,t):null}function An({id:e,className:t,title:n,open:r=!0,onClose:i,actions:a,children:o}){return h(m,{children:g(nt,{open:r,onClose:i,id:e,className:`relative z-[1000002]`,children:[h(`div`,{className:`fixed inset-0 bg-black/30 animate-fadeIn z-[1000003]`,"aria-hidden":`true`}),h(`div`,{className:`fixed inset-0 flex w-screen items-center justify-center p-4 z-[1000004]`,children:h(`div`,{className:_(`relative p-4 w-full max-w-4xl max-h-full`,t),children:g(rt,{className:`relative bg-white rounded-lg overflow-hidden shadow-2xl max-h-[80vh] flex flex-col`,children:[g(`div`,{className:`flex items-center justify-between gap-3 p-4 rounded-t-lg sticky top-0 bg-white`,children:[h(`div`,{id:`modal-back-slot`}),h(it,{className:`text-xl font-semibold text-gray-900 grow`,children:n}),g(tt,{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:[h(`svg`,{className:`w-3 h-3`,"aria-hidden":`true`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 14 14`,children:h(`path`,{stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6`})}),h(`span`,{className:`sr-only`,children:`Close`})]})]}),h(`div`,{className:`flex-1 min-h-0 overflow-y-auto flex flex-col`,children:o}),a?h(`div`,{className:`flex items-center p-4 border-t border-gray-200 rounded-b justify-end`,children:a}):null]})})})]})})}function jn(){return h(e,{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:h(gn,{className:`text-xl`})})}function Mn({id:e,steps:t,forceStart:n,onClose:r}){let[i,a]=Q(`tour_step/${e}`,!0);return T(()=>{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:h(at,{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 Nn(e){return h(`div`,{className:B(`flex w-full p-0.5 opacity-0 transition-opacity duration-300 gap-2`,e.active&&`opacity-1`),children:e.children})}const Pn=C(({className:e,...t},n)=>h(`div`,{ref:n,className:_(`px-4 py-2 flex-1 overflow-visible`,e),...t}));function Fn(t){return h(K,{placement:`right`,children:h(q,{asChild:!0,children:g(e,{className:B(`border-none aspect-square w-full flex justify-center items-center hover:bg-me-primary-100 hover:text-black [&>svg]:text-2xl cursor-default`,t.selected?`bg-me-primary-500 hover:bg-me-primary-600 hover:text-white text-white`:`text-me-gray-700`),"aria-label":t.label,onMouseDown:t.onClick,children:[t.icon,h(J,{className:`bg-me-gray-900 text-white text-sm px-3 py-2 rounded opacity-90 z-50`,children:t.label})]})})})}function In(e){return h(`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=>g(m,{children:[t.divide?h(`div`,{className:`flex-1 block w-2 min-h-1`}):null,h(Fn,{label:t.label,selected:t.id===e.current&&e.open,icon:t.icon,onClick:t.onClick},t.id)]},t.id))})}function Ln(t){let n=t.strategy.items.map(e=>Object.keys(e.text)[0]),[r,i]=k(n[0]),a=t.strategy.items.find(e=>Object.keys(e.text)[0]===r);return g(`div`,{className:`overflow-y-auto bg-white shadow`,children:[h(`div`,{className:`flex gap-2 border-b`,children:n.map(t=>h(e,{className:`py-1 px-3 ${r===t?`bg-me-500 text-white`:`bg-white text-black`}`,onPress:()=>i(t),children:t},t))}),h(`div`,{className:`p-4 prose`,children:h(y,{enableDangerouslySetInnerHTML:!0,defaultText:h(`span`,{className:`text-gray-500 my-8`,children:`No content available`}),children:a?.text})})]})}const Rn=C(function({className:t,...n},r){return h(e,{className:_(`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`,t),...n,ref:r})});function zn({alwaysVisible:e}){return h(t,{slot:`selection`,className:_(`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})=>h(`div`,{className:`flex items-center justify-center text-current`,children:h(`svg`,{viewBox:`0 -960 960 960`,"aria-hidden":`true`,fill:`currentColor`,children:t?h(`path`,{d:`M160-440v-80h640v80H160Z`}):e?h(`path`,{d:`M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z`}):null})})})}function Bn({children:e}){return h(`div`,{className:`w-full h-full flex flex-col overflow-hidden`,children:e})}function Vn({id:e,children:t,className:n,padding:r}){return h(`div`,{id:e,className:B(`flex-1 min-h-0 overflow-y-auto pb-64`,n,r&&`px-3 pt-3`),children:t})}function Hn(t){let{actions:n,title:r,customActions:i}=t;return g(`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:[h(y,{className:`flex-1`,children:r}),g(`div`,{className:`ml-auto flex gap-2 items-center`,children:[n?.map((t,n)=>t.menu?g(l,{children:[h(e,{id:t.id,className:B(`p-1 rounded hover:bg-me-gray-300`,t.toggled&&`bg-me-gray-300`,t.disabled&&`opacity-50 cursor-not-allowed`),"aria-label":typeof t.title==`string`?t.title:``,isDisabled:t.disabled,children:t.icon},n),h(u,{placement:`bottom right`,children:t.menu})]},n):g(K,{placement:`bottom`,children:[h(q,{asChild:!0,children:h(e,{id:t.id,className:B(`p-1 rounded hover:bg-me-gray-300`,t.toggled&&`bg-me-gray-300`,t.disabled&&`opacity-50 cursor-not-allowed`),onPress:t.onClick,"aria-label":typeof t.title==`string`?t.title:``,isDisabled:t.disabled,children:t.icon},n)}),t.disabled?null:h(Y,{children:t.title})]},n)),i]})]})}function Un({menu:e,menuId:t,selectedKey:n,onSelectionChange:r}){let i=O(null),[a,o]=k(0),[s,c]=k(null),l=O([]),u=O([]),ee=D(()=>e.findIndex(e=>e.id===n),[e,n]);E(()=>{let e=()=>{if(l.current.length===0){l.current=[];for(let e of u.current)e&&l.current.push(e.getBoundingClientRect().width)}if(l.current.reduce((e,t)=>e+t,0)&&i.current){let e=i.current.getBoundingClientRect().width-20,t=0,n=0;for(let r=l.current.length-1;r>=0;r--)if(n+=l.current[r],n>e){t=r+1;break}o(t)}};e();let t=setInterval(e,500);return()=>{clearInterval(t)}},[]);let d=e.filter((t,n)=>a>=e.length-n);return g(m,{children:[g(p,{className:`w-full flex-1 overflow-hidden flex flex-col`,selectedKey:n,onSelectionChange:r,children:[g(`div`,{className:`flex items-center w-full tab-shadow`,children:[h(te,{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 h(f,{ref:e=>u.current[n]=e,id:t.id,className:e=>B(`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)})}),h(`div`,{ref:c,id:`hidden-menu`})]}),e.map(e=>h(ne,{id:e.id,className:`flex-1 overflow-y-auto h-full`,children:e.renderComponent},e.id))]},t),s&&a>0?N(h(Wn,{hidden:a,menuHidden:d,selectedIndex:ee,selectedKey:n,onSelectionChange:r}),s):null]})}const Wn=ot(({selectedIndex:t,hidden:n,menuHidden:r,selectedKey:i,onSelectionChange:a})=>g(l,{children:[h(e,{className:B(`border-none rounded bg-gray-100 px-1.5 py-1 mr-2 mb-1 text-me-primary-500 semibold uppercase text-[10px]`,t>n&&`bg-me-primary-500 text-white rounded`),children:`MORE`}),h(u,{children:r.length?h(s,{className:`bg-white rounded shadow-lg flex flex-col gap-0.5 p-0.5 min-w-28`,children:r.map(e=>h(c,{className:t=>B(`hover:bg-me-gray-100 p-1 rounded-sm text-sm`,i===e.id&&`ring ring-me-primary-500`),onAction:()=>a?.(e.id),children:e.label},e.id))}):null})]})),Gn=({title:e,titleId:t,...n})=>g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 -960 960 960`,"aria-labelledby":t,...n,children:[e?h(`title`,{id:t,children:e}):null,h(`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`})]}),Kn=({title:e,titleId:t,...n})=>g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 -960 960 960`,"aria-labelledby":t,...n,children:[e?h(`title`,{id:t,children:e}):null,h(`path`,{fill:`currentColor`,d:`M272-120 64-480l208-360h416l208 360-208 360H272Zm46-80h324l161-280-161-280H318L156-480l162 280Zm162-280Z`})]});function qn({title:e,titleId:t,...n}){return g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,"aria-labelledby":t,...n,children:[e?h(`title`,{id:t,children:e}):null,g(`g`,{fill:`none`,fillRule:`evenodd`,children:[h(`path`,{d:`M0 0h20v20H0z`}),h(`path`,{stroke:`currentColor`,strokeLinecap:`square`,strokeWidth:2,d:`m8.5 11.5 6-6M16 4v3m0-3h-3m0 14L2 7`}),h(`path`,{stroke:`currentColor`,strokeOpacity:.407,strokeWidth:2,d:`m2 7 5-5 11 11-5 5z`})]})]})}function Jn({title:e,titleId:t,...n}){return g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,"aria-labelledby":t,...n,children:[e?h(`title`,{id:t,children:e}):null,g(`g`,{fill:`none`,fillRule:`evenodd`,children:[h(`circle`,{cx:4.5,cy:4.5,r:2.5,fill:`currentColor`}),h(`circle`,{cx:15.5,cy:15.5,r:2.5,fill:`currentColor`}),h(`path`,{stroke:`currentColor`,strokeLinecap:`square`,strokeWidth:2,d:`m13.5 13.5-9-9`})]})]})}const Yn={DrawIcon:h(Gn,{}),PolygonIcon:h(({title:e,titleId:t,...n})=>g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 -960 960 960`,"aria-labelledby":t,...n,children:[e?h(`title`,{id:t,children:e}):null,h(`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`})]}),{}),LineIcon:h(Jn,{}),LineBoxIcon:h(qn,{}),ShapesIcon:h(({title:e,titleId:t,...n})=>g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 -960 960 960`,"aria-labelledby":t,...n,children:[e?h(`title`,{id:t,children:e}):null,h(`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`})]}),{}),SquareIcon:h(({title:e,titleId:t,...n})=>g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 -960 960 960`,"aria-labelledby":t,...n,children:[e?h(`title`,{id:t,children:e}):null,h(`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`})]}),{}),TriangleIcon:h(({title:e,titleId:t,...n})=>g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 -960 960 960`,"aria-labelledby":t,...n,children:[e?h(`title`,{id:t,children:e}):null,h(`path`,{d:`m80-160 400-640 400 640H80Zm144-80h512L480-650 224-240Zm256-205Z`,fill:`currentColor`})]}),{}),HexagonIcon:h(Kn,{}),DeleteForeverIcon:h(tn,{})};function Xn({helper:e,showShapes:t}){return T(()=>{e.stamps.square()},[]),h(se,{icons:Yn,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 Zn({className:e,children:t,...n}){return h(p,{className:t=>B(``,typeof e==`function`?e(t):e),...n,children:t})}function Qn({className:e,children:t,...n}){return h(te,{className:t=>B(`flex gap-4`,typeof e==`function`?e(t):e),...n,children:t})}function $n({className:e,children:t,...n}){return h(f,{className:t=>{let n=typeof e==`function`?e(t):e;return B(`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 er({className:e,children:t,...n}){return h(ne,{className:t=>B(``,typeof e==`function`?e(t):e),...n,children:t})}function tr(e){return e.wide?h(`div`,{className:_(`grid`,e.size||`grid-md`,`gap-4 p-4 overflow-y-auto`),children:e.children}):h(`div`,{className:`grid grid-cols-2 gap-4 p-4`,children:e.children})}function nr({children:e,small:t=!1,className:n}){return h(`div`,{className:_(`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})}export{st as AccessibilityButton,P as ActionButton,qt as AddIcon,Jt as AddImageIcon,Yt as AnnotationPopInIcon,Xt as AnnotationPopOutIcon,ct as AtlasBanner,Zt as AudioIcon,Qt as BackIcon,mt as CanvasThumbnailGridItem,F as Card3D,$t as CheckIcon,V as CollectionIcon,ht as CollectionListItem,gt as ConfirmSelectionButton,_t as ControlButton,en as CreateCanvasIcon,vt as CreatorGrid,Y as DefaultTooltipContent,tn as DeleteForeverIcon,nn as DeleteIcon,bt as DownloadButton,H as DownloadIcon,rn as EditTextIcon,an as EmptyCanvasIcon,St as EmptyState,Ct as ErrorMessage,jt as Form,on as GridIcon,Nt as HTMLAnnotationBodyRender,It as HTMLEditor,sn as HTMLIcon,Mt as HandleContainer,cn as IIIFBrowserIcon,ln as IIIFLogo,Ut as IIIFMediaPlayer,Vt as IconButton,Ht as IconHandle,un as ImageListIcon,dn as InfoIcon,Gt as InfoMessage,Kt as ItemWithHandle,R as LazyThumbnail,fn as ListEditIcon,wn as ListResizeDragHandle,pn as ListingIcon,Pt as MDXEditor,Tn as ManifestEditorLogo,mn as ManifestIcon,En as ManifestListItem,Dn as ManifestOverviewEmptyState,On as MetadataContainer,An as Modal,kn as ModalBackSlot,hn as MoreMenu,jn as MoreMenuButton,gn as MoreMenuIcon,Mn as OnboardingTour,Nn as OpaqueControls,Pn as PaddedSidebarContainer,In as PanelSideMenu,_n as PreviewIcon,vn as RangesIcon,Ln as RenderTextualContent,yn as ResetIcon,Rn as ResizeHandle,$ as ResizeHandleIcon,bn as ScaledImageIcon,zn as SelectionCheckbox,Bn as Sidebar,Vn as SidebarContent,Hn as SidebarHeader,Un as SidebarTabs,L as Spinner,Xn as SvgControlBar,$n as Tab,Qn as TabList,er as TabPanel,Zn as Tabs,xn as TargetIcon,I as TextIcon,tr as ThumbnailGridContainer,K as Tooltip,J as TooltipContent,q as TooltipTrigger,Sn as VideoIcon,nr as WarningMessage,Cn as YouTubeIcon,xt as createDownload,Lt as useFastList,zt as useGridOptions,Bt as useLoadMoreItems,Q as useLocalStorage,Rt as useOptionalLocalStorage,U as useTooltip,G as useTooltipContext};
|
|
18
|
+
//# sourceMappingURL=index.js.map
|