@weasel-js/labkit 1.6.0 → 1.6.1
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/_dts/{CanvasStackContext-DQgcH1ny.d.ts → CanvasStackContext-Wo6OwIVM.d.ts} +1 -1
- package/dist/_dts/FloatingPanel-7j0IcXwz.d.ts +30 -0
- package/dist/_dts/{LayerList.d-2c9yup5Y.d.ts → LayerList.d-BoELAMsM.d.ts} +2 -2
- package/dist/_dts/{index-DINmCuLA.d.ts → PropertyField.d-D0ndfIIt.d.ts} +34 -83
- package/dist/_dts/{Select.d-BchGMC2Y.d.ts → Select.d-Cr8-zoup.d.ts} +4 -5
- package/dist/_dts/{usePanZoom-Bq73pwFe.d.ts → Stage-DWBBi8IU.d.ts} +80 -35
- package/dist/_dts/{index-B0--8PEM.d.ts → index-CKyX0ME_.d.ts} +12 -13
- package/dist/_dts/{frac-DTRq7Xpb.d.ts → types-B7yBTTF9.d.ts} +699 -649
- package/dist/_dts/{types-B7y8hX1D.d.ts → types-DTuViBvc.d.ts} +20 -1
- package/dist/_dts/{useTrialState-CP4jfuKl.d.ts → useTrialState-CMaV6UD4.d.ts} +2 -3
- package/dist/canvas/index.d.ts +39 -7
- package/dist/canvas/index.js +5 -3
- package/dist/chrome/index.d.ts +4 -5
- package/dist/chrome/index.js +8 -6
- package/dist/chunk-24W5VEJW.js +18 -0
- package/dist/chunk-24W5VEJW.js.map +1 -0
- package/dist/chunk-3RY6WL5T.js +38 -0
- package/dist/chunk-3RY6WL5T.js.map +1 -0
- package/dist/{chunk-H5VIV7MQ.js → chunk-4TT3PNPR.js} +60 -51
- package/dist/chunk-4TT3PNPR.js.map +1 -0
- package/dist/{chunk-ZORVNOKX.js → chunk-6FLXL3I7.js} +9 -145
- package/dist/chunk-6FLXL3I7.js.map +1 -0
- package/dist/{chunk-HFRE4QQV.js → chunk-ASOK76ZH.js} +53 -22
- package/dist/chunk-ASOK76ZH.js.map +1 -0
- package/dist/chunk-AWQG7FCC.js +19 -0
- package/dist/chunk-AWQG7FCC.js.map +1 -0
- package/dist/chunk-CGHF6RZV.js +300 -0
- package/dist/chunk-CGHF6RZV.js.map +1 -0
- package/dist/chunk-DWMSB4CA.js +228 -0
- package/dist/chunk-DWMSB4CA.js.map +1 -0
- package/dist/{chunk-USO6TERP.js → chunk-GHGO52SO.js} +11 -9
- package/dist/chunk-GHGO52SO.js.map +1 -0
- package/dist/{chunk-MOLIUNVH.js → chunk-HKV7LRHY.js} +4 -4
- package/dist/{chunk-MOLIUNVH.js.map → chunk-HKV7LRHY.js.map} +1 -1
- package/dist/{chunk-VQ47KWD5.js → chunk-IRTGUQ5O.js} +5 -4
- package/dist/chunk-IRTGUQ5O.js.map +1 -0
- package/dist/{chunk-H6ZAOWNE.js → chunk-JVBYV6TL.js} +3 -3
- package/dist/{chunk-H6ZAOWNE.js.map → chunk-JVBYV6TL.js.map} +1 -1
- package/dist/chunk-KHK5FGER.js +145 -0
- package/dist/chunk-KHK5FGER.js.map +1 -0
- package/dist/chunk-NEXR37YJ.js +144 -0
- package/dist/chunk-NEXR37YJ.js.map +1 -0
- package/dist/{chunk-BVL7Y574.js → chunk-O6FFFOHS.js} +14 -6
- package/dist/chunk-O6FFFOHS.js.map +1 -0
- package/dist/chunk-QGMOA2YE.js +731 -0
- package/dist/chunk-QGMOA2YE.js.map +1 -0
- package/dist/{chunk-ERFMC6WU.js → chunk-S4NCI32V.js} +19 -10
- package/dist/chunk-S4NCI32V.js.map +1 -0
- package/dist/{chunk-3FI7Y4R4.js → chunk-SLAQPUI4.js} +4 -4
- package/dist/{chunk-3FI7Y4R4.js.map → chunk-SLAQPUI4.js.map} +1 -1
- package/dist/{chunk-AWH3SRPW.js → chunk-TJ77A4A3.js} +3 -31
- package/dist/chunk-TJ77A4A3.js.map +1 -0
- package/dist/{chunk-WUJXJC5O.js → chunk-TYN6MLXX.js} +691 -1395
- package/dist/chunk-TYN6MLXX.js.map +1 -0
- package/dist/{chunk-RS3HRQWU.js → chunk-WPLAANH4.js} +4 -3
- package/dist/chunk-WPLAANH4.js.map +1 -0
- package/dist/config/index.d.ts +36 -35
- package/dist/config/index.js +4 -5
- package/dist/controls/index.d.ts +91 -7
- package/dist/controls/index.js +5 -4
- package/dist/dragdrop/index.d.ts +8 -6
- package/dist/dragdrop/index.js +3 -2
- package/dist/index.d.ts +50 -77
- package/dist/index.js +138 -254
- package/dist/index.js.map +1 -1
- package/dist/layers/index.d.ts +3 -4
- package/dist/layers/index.js +2 -1
- package/dist/loupe/index.d.ts +19 -16
- package/dist/loupe/index.js +5 -3
- package/dist/overview/index.d.ts +56 -0
- package/dist/overview/index.js +288 -0
- package/dist/overview/index.js.map +1 -0
- package/dist/passthrough/weasel-ui.d.ts +38 -38
- package/dist/passthrough/weasel-ui.js +2 -1
- package/dist/primitives/index.d.ts +19 -43
- package/dist/primitives/index.js +5 -3
- package/dist/state/index.d.ts +7 -7
- package/dist/state/index.js +4 -5
- package/dist/state/index.js.map +1 -1
- package/dist/styles.css +63 -1
- package/dist/undo/index.d.ts +3 -3
- package/package.json +13 -9
- package/src/annotations/index.ts +1 -0
- package/src/annotations/store.test.ts +26 -0
- package/src/annotations/store.ts +25 -6
- package/src/annotations/toolMap.test.ts +37 -2
- package/src/annotations/toolMap.ts +13 -0
- package/src/annotations/types.ts +27 -0
- package/src/canvas/AGENTS.md +8 -10
- package/src/canvas/CameraInput.test.tsx +136 -0
- package/src/canvas/CameraInput.tsx +311 -0
- package/src/canvas/CanvasStack.tsx +42 -58
- package/src/canvas/LinkedCursor.less +16 -0
- package/src/canvas/LinkedCursor.tsx +54 -0
- package/src/canvas/Stage.tsx +42 -37
- package/src/canvas/cameraView.test.ts +60 -0
- package/src/canvas/cameraView.ts +61 -0
- package/src/canvas/index.ts +11 -2
- package/src/chrome/regions/SidebarRegion.test.tsx +9 -2
- package/src/config/builder.ts +3 -3
- package/src/config/entry.test.ts +3 -1
- package/src/config/fromConfigField.ts +1 -0
- package/src/config/index.ts +4 -1
- package/src/config/resolve.ts +11 -1
- package/src/config/sectionTree.test.ts +12 -6
- package/src/config/sectionTree.ts +15 -5
- package/src/config/types.ts +21 -0
- package/src/controls/ControlPanel.test.tsx +12 -2
- package/src/controls/ControlPanel.tsx +28 -9
- package/src/controls/inDialog.test.tsx +18 -0
- package/src/controls/inDialog.tsx +2 -10
- package/src/index.test.ts +1 -1
- package/src/index.ts +8 -4
- package/src/instrument/SineWave.smoke.test.tsx +2 -0
- package/src/instrument/types.ts +10 -1
- package/src/lab/Lab.nebula.test.tsx +11 -2
- package/src/lab/Lab.test.tsx +3 -1
- package/src/lab/Lab.tsx +4 -4
- package/src/loupe/AGENTS.md +7 -6
- package/src/loupe/LoupeGestures.tsx +14 -9
- package/src/loupe/TrialLoupe.tsx +5 -5
- package/src/loupe/index.ts +1 -0
- package/src/loupe/loupeActions.ts +6 -2
- package/src/overview/AGENTS.md +38 -0
- package/src/overview/OverviewMarks.test.tsx +100 -0
- package/src/overview/OverviewMarks.tsx +93 -0
- package/src/overview/TrialOverview.less +53 -0
- package/src/overview/TrialOverview.stories.tsx +50 -0
- package/src/overview/TrialOverview.test.tsx +116 -0
- package/src/overview/TrialOverview.tsx +374 -0
- package/src/overview/index.ts +2 -0
- package/src/passthrough/weasel-ui.ts +7 -0
- package/src/specimen/Specimen.tsx +19 -2
- package/src/state/labRecords.test.ts +4 -1
- package/src/state/store.test.ts +4 -4
- package/src/state/useTrialState.test.tsx +1 -1
- package/src/styles.less +2 -0
- package/src/theme/Interstellar.stories.tsx +1 -5
- package/src/tools/labTool.ts +6 -2
- package/src/trial/Trial.annotations.test.tsx +16 -0
- package/src/trial/Trial.loupe.test.tsx +73 -1
- package/src/trial/Trial.stories.tsx +2 -0
- package/src/trial/Trial.tsx +17 -1
- package/src/trial/trialOps.test.ts +4 -4
- package/dist/_dts/inDialog-D5ZKGjiD.d.ts +0 -23
- package/dist/_dts/number.d-OeQYQoUO.d.ts +0 -28
- package/dist/chunk-2AYGEN57.js +0 -32
- package/dist/chunk-2AYGEN57.js.map +0 -1
- package/dist/chunk-AWH3SRPW.js.map +0 -1
- package/dist/chunk-BVL7Y574.js.map +0 -1
- package/dist/chunk-ERFMC6WU.js.map +0 -1
- package/dist/chunk-H5VIV7MQ.js.map +0 -1
- package/dist/chunk-HFRE4QQV.js.map +0 -1
- package/dist/chunk-RS3HRQWU.js.map +0 -1
- package/dist/chunk-TT5C5S6R.js +0 -368
- package/dist/chunk-TT5C5S6R.js.map +0 -1
- package/dist/chunk-USO6TERP.js.map +0 -1
- package/dist/chunk-VQ47KWD5.js.map +0 -1
- package/dist/chunk-WUJXJC5O.js.map +0 -1
- package/dist/chunk-ZORVNOKX.js.map +0 -1
- package/src/canvas/usePanZoom.test.ts +0 -244
- package/src/canvas/usePanZoom.ts +0 -147
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { tilePreviewCssUrl } from './chunk-QGMOA2YE.js';
|
|
2
|
+
import { ACTION_GLYPHS, useVisibleRaf, oklchDegToHex, useActionsRegistry, useOptionalDepRegistry, actionItems, buildDepsFromRequires, evaluateEnabled, startThresholdDrag, openPointerSession, toHex8, getAlpha01, withGradientKind, sampleGradientStops, listPaintKinds, getPaintKind, withAlpha01, isBuiltinToolPref, actionShortcuts, isMeshGradientFill, asPaint, UnknownIcon, sampleTrack, EASINGS, resolveEasing, cubicBezierEasing } from '@weasel-js/core';
|
|
3
|
+
export { SelectIcon as A, LineIcon as C, PencilIcon as E, UndoIcon as F, RectIcon as O, TextIcon as P, HandIcon as b, EllipseIcon as h, RedoIcon as k, ArrowIcon as o } from '@weasel-js/core';
|
|
4
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
4
5
|
import { createContext, forwardRef, useState, useRef, useEffect, useId, useMemo, useCallback, useImperativeHandle, useLayoutEffect, memo, useContext, Children, isValidElement, useSyncExternalStore, Fragment as Fragment$1, createElement } from 'react';
|
|
5
6
|
import { Focusable, Checkbox, TextField, Label, Input, Text, FieldError, NumberField, Group, Button, Switch, TooltipTrigger, Tooltip, OverlayArrow, Select, SelectValue, Popover, ListBox, UNSTABLE_ToastQueue, ListBoxSection, Header, ListBoxItem, ModalOverlay, Modal, Dialog, Heading, RadioGroup, Radio, Tabs, TabList, Tab, TabPanel, MenuTrigger, Menu, MenuItem, ComboBox, ComboBoxStateContext, Slider, SliderOutput, SliderTrack, SliderThumb, UNSTABLE_ToastRegion, UNSTABLE_Toast, UNSTABLE_ToastContent, DialogTrigger } from 'react-aria-components';
|
|
6
7
|
export { DialogTrigger as u6 } from 'react-aria-components';
|
|
7
8
|
import { colorCssAt, tokenPx } from '@weasel-js/theme';
|
|
8
9
|
import { useTones } from '@weasel-js/theme/react';
|
|
9
10
|
import { createPortal, flushSync } from 'react-dom';
|
|
10
|
-
import { tileGeometry } from '@weasel-js/core/patterns-builtin';
|
|
11
11
|
|
|
12
|
-
// ../ui/dist/chunks/dlog-
|
|
12
|
+
// ../ui/dist/chunks/dlog-F0I8KsIW.js
|
|
13
13
|
var e = ["weasel.debug", "weaseldraw.debug"];
|
|
14
14
|
var t = null;
|
|
15
15
|
function n() {
|
|
@@ -21,7 +21,7 @@ function n() {
|
|
|
21
21
|
try {
|
|
22
22
|
for (let t41 of e) {
|
|
23
23
|
let e28 = localStorage.getItem(t41);
|
|
24
|
-
if (
|
|
24
|
+
if (e28 != null && e28 !== "") return e28 === "1" || e28 === "true" || e28 === "*" ? {
|
|
25
25
|
all: true,
|
|
26
26
|
set: /* @__PURE__ */ new Set()
|
|
27
27
|
} : {
|
|
@@ -397,71 +397,71 @@ function l({ name: e28, className: i53, size: s44 = 20, label: l40, filled: u37
|
|
|
397
397
|
fillOpacity: f30 ? d33 : void 0,
|
|
398
398
|
role: l40 ? "img" : void 0,
|
|
399
399
|
"aria-label": l40,
|
|
400
|
-
"aria-hidden": l40
|
|
400
|
+
"aria-hidden": !l40 || void 0,
|
|
401
401
|
dangerouslySetInnerHTML: c(f30 + n2[e28])
|
|
402
402
|
});
|
|
403
403
|
}
|
|
404
|
-
var
|
|
404
|
+
var z = (t40) => /* @__PURE__ */ jsx(l, {
|
|
405
405
|
name: "clone",
|
|
406
406
|
...t40
|
|
407
407
|
});
|
|
408
|
-
var
|
|
408
|
+
var B = (t40) => /* @__PURE__ */ jsx(l, {
|
|
409
409
|
name: "reset",
|
|
410
410
|
...t40
|
|
411
411
|
});
|
|
412
|
-
var
|
|
412
|
+
var V = (t40) => /* @__PURE__ */ jsx(l, {
|
|
413
413
|
name: "close",
|
|
414
414
|
...t40
|
|
415
415
|
});
|
|
416
|
-
var
|
|
416
|
+
var H = (t40) => /* @__PURE__ */ jsx(l, {
|
|
417
417
|
name: "export",
|
|
418
418
|
...t40
|
|
419
419
|
});
|
|
420
|
-
var
|
|
420
|
+
var U = (t40) => /* @__PURE__ */ jsx(l, {
|
|
421
421
|
name: "zoomIn",
|
|
422
422
|
...t40
|
|
423
423
|
});
|
|
424
|
-
var
|
|
424
|
+
var G = (t40) => /* @__PURE__ */ jsx(l, {
|
|
425
425
|
name: "add",
|
|
426
426
|
...t40
|
|
427
427
|
});
|
|
428
|
-
var
|
|
428
|
+
var K = (t40) => /* @__PURE__ */ jsx(l, {
|
|
429
429
|
name: "modeLight",
|
|
430
430
|
...t40
|
|
431
431
|
});
|
|
432
|
-
var
|
|
432
|
+
var q = (t40) => /* @__PURE__ */ jsx(l, {
|
|
433
433
|
name: "modeDark",
|
|
434
434
|
...t40
|
|
435
435
|
});
|
|
436
|
-
var
|
|
436
|
+
var te = (t40) => /* @__PURE__ */ jsx(l, {
|
|
437
437
|
name: "modeAuto",
|
|
438
438
|
...t40
|
|
439
439
|
});
|
|
440
|
-
var
|
|
440
|
+
var X = (t40) => /* @__PURE__ */ jsx(l, {
|
|
441
441
|
name: "zoomOut",
|
|
442
442
|
...t40
|
|
443
443
|
});
|
|
444
|
-
var
|
|
444
|
+
var Z = (t40) => /* @__PURE__ */ jsx(l, {
|
|
445
445
|
name: "fit",
|
|
446
446
|
...t40
|
|
447
447
|
});
|
|
448
|
-
var
|
|
448
|
+
var Q = (t40) => /* @__PURE__ */ jsx(l, {
|
|
449
449
|
name: "snapshot",
|
|
450
450
|
...t40
|
|
451
451
|
});
|
|
452
|
-
var
|
|
452
|
+
var ne = (t40) => /* @__PURE__ */ jsx(l, {
|
|
453
453
|
name: "play",
|
|
454
454
|
...t40
|
|
455
455
|
});
|
|
456
|
-
var
|
|
456
|
+
var re = (t40) => /* @__PURE__ */ jsx(l, {
|
|
457
457
|
name: "pause",
|
|
458
458
|
...t40
|
|
459
459
|
});
|
|
460
|
-
var
|
|
460
|
+
var ie = (t40) => /* @__PURE__ */ jsx(l, {
|
|
461
461
|
name: "stop",
|
|
462
462
|
...t40
|
|
463
463
|
});
|
|
464
|
-
var
|
|
464
|
+
var ae = (t40) => /* @__PURE__ */ jsx(l, {
|
|
465
465
|
name: "stepBack",
|
|
466
466
|
...t40
|
|
467
467
|
});
|
|
@@ -469,32 +469,32 @@ var $ = (t40) => /* @__PURE__ */ jsx(l, {
|
|
|
469
469
|
name: "stepForward",
|
|
470
470
|
...t40
|
|
471
471
|
});
|
|
472
|
-
var
|
|
472
|
+
var fe = (t40) => /* @__PURE__ */ jsx(l, {
|
|
473
473
|
name: "loupe",
|
|
474
474
|
...t40
|
|
475
475
|
});
|
|
476
|
-
var
|
|
476
|
+
var he = (t40) => /* @__PURE__ */ jsx(l, {
|
|
477
477
|
name: "lock",
|
|
478
478
|
...t40
|
|
479
479
|
});
|
|
480
|
-
var
|
|
480
|
+
var xe = (t40) => /* @__PURE__ */ jsx(l, {
|
|
481
481
|
name: "collapse",
|
|
482
482
|
...t40
|
|
483
483
|
});
|
|
484
|
-
var
|
|
484
|
+
var Se = (t40) => /* @__PURE__ */ jsx(l, {
|
|
485
485
|
name: "expand",
|
|
486
486
|
...t40
|
|
487
487
|
});
|
|
488
|
-
var
|
|
488
|
+
var je = (t40) => /* @__PURE__ */ jsx(l, {
|
|
489
489
|
name: "warning",
|
|
490
490
|
...t40
|
|
491
491
|
});
|
|
492
|
-
var
|
|
492
|
+
var Me = (t40) => /* @__PURE__ */ jsx(l, {
|
|
493
493
|
name: "error",
|
|
494
494
|
...t40
|
|
495
495
|
});
|
|
496
496
|
|
|
497
|
-
// ../ui/dist/chunks/keyGlyph-
|
|
497
|
+
// ../ui/dist/chunks/keyGlyph-C0qTakG-.js
|
|
498
498
|
function e3(e28) {
|
|
499
499
|
switch (e28) {
|
|
500
500
|
case "Escape":
|
|
@@ -524,7 +524,7 @@ function e3(e28) {
|
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
526
|
|
|
527
|
-
// ../ui/dist/chunks/formatShortcut-
|
|
527
|
+
// ../ui/dist/chunks/formatShortcut-DRQrVThu.js
|
|
528
528
|
function t4(t40) {
|
|
529
529
|
if (!t40) return;
|
|
530
530
|
let n45 = Array.isArray(t40.key) ? t40.key[0] : t40.key, r48 = [];
|
|
@@ -600,17 +600,17 @@ function _2(e28, t40) {
|
|
|
600
600
|
return r48 ? `${e28} (${r48})` : e28;
|
|
601
601
|
}
|
|
602
602
|
function v2(n45) {
|
|
603
|
-
let { group: i53, orientation: v19 = "horizontal", icons: y18, labels:
|
|
603
|
+
let { group: i53, orientation: v19 = "horizontal", icons: y18, labels: b17, className: x18 } = n45, S17 = useActionsRegistry(), C14 = useOptionalDepRegistry(), w13 = useSyncExternalStore(S17 ? S17.subscribe : h2, S17 ? S17.list : () => m2, S17 ? S17.list : () => m2).filter((e28) => e28.group === i53).flatMap(actionItems), T13 = [
|
|
604
|
+
p2.bar,
|
|
605
|
+
v19 === "vertical" && p2.vertical,
|
|
606
|
+
x18
|
|
607
|
+
].filter(Boolean).join(" ");
|
|
604
608
|
return /* @__PURE__ */ jsx("div", {
|
|
605
|
-
className:
|
|
606
|
-
p2.bar,
|
|
607
|
-
v19 === "vertical" && p2.vertical,
|
|
608
|
-
x18
|
|
609
|
-
].filter(Boolean).join(" "),
|
|
609
|
+
className: T13,
|
|
610
610
|
role: "toolbar",
|
|
611
611
|
"aria-label": `${i53} actions`,
|
|
612
612
|
children: w13.map((n46) => {
|
|
613
|
-
let r48 =
|
|
613
|
+
let r48 = b17?.[n46.key] ?? n46.label, i54 = g2(n46, y18?.[n46.key]), s44 = C14 ? buildDepsFromRequires(n46.action, C14) : void 0, { enabled: c42 } = evaluateEnabled(n46.action, s44), d33 = !c42, m26 = _2(r48, n46);
|
|
614
614
|
return /* @__PURE__ */ jsxs(l3, {
|
|
615
615
|
isDisabled: d33,
|
|
616
616
|
children: [/* @__PURE__ */ jsx(Focusable, {
|
|
@@ -916,7 +916,7 @@ function A2(e28, t40, n45, r48, i53) {
|
|
|
916
916
|
let u37 = "";
|
|
917
917
|
for (let e29 = 0; e29 < l40.length; e29++) {
|
|
918
918
|
let t41 = l40[(e29 + l40.length - 1) % l40.length], n46 = l40[e29], r49 = l40[(e29 + 1) % l40.length], i54 = c42 * 0.45, a55 = n46[0] + (t41[0] - n46[0]) * i54, o50 = n46[1] + (t41[1] - n46[1]) * i54, s45 = n46[0] + (r49[0] - n46[0]) * i54, d33 = n46[1] + (r49[1] - n46[1]) * i54;
|
|
919
|
-
e29 === 0 ?
|
|
919
|
+
u37 += e29 === 0 ? `M ${a55.toFixed(2)} ${o50.toFixed(2)}` : ` L ${a55.toFixed(2)} ${o50.toFixed(2)}`, u37 += ` Q ${n46[0].toFixed(2)} ${n46[1].toFixed(2)} ${s45.toFixed(2)} ${d33.toFixed(2)}`;
|
|
920
920
|
}
|
|
921
921
|
return u37 + " Z";
|
|
922
922
|
}
|
|
@@ -1095,13 +1095,13 @@ var ie2 = {
|
|
|
1095
1095
|
stretches: true,
|
|
1096
1096
|
defaults: re2
|
|
1097
1097
|
};
|
|
1098
|
-
var
|
|
1098
|
+
var ae2 = {
|
|
1099
1099
|
points: 16,
|
|
1100
1100
|
outerR: 58,
|
|
1101
1101
|
innerR: 50,
|
|
1102
1102
|
rotation: -5
|
|
1103
1103
|
};
|
|
1104
|
-
function
|
|
1104
|
+
function oe(e28, t40, n45, r48) {
|
|
1105
1105
|
let i53 = e28 * 2, a54 = Math.PI * 2 / i53, o49 = r48 * Math.PI / 180, s44 = "";
|
|
1106
1106
|
for (let e29 = 0; e29 < i53; e29++) {
|
|
1107
1107
|
let r49 = e29 % 2 == 0 ? t40 : n45, i54 = o49 + e29 * a54, c42 = 50 + Math.cos(i54) * r49, l40 = 50 + Math.sin(i54) * r49;
|
|
@@ -1109,12 +1109,12 @@ function oe2(e28, t40, n45, r48) {
|
|
|
1109
1109
|
}
|
|
1110
1110
|
return s44 + " Z";
|
|
1111
1111
|
}
|
|
1112
|
-
var
|
|
1112
|
+
var se = {
|
|
1113
1113
|
Component: ({ variant: e28, focused: t40, params: n45 }) => {
|
|
1114
1114
|
let { points: r48, outerR: i53, innerR: c42, rotation: l40 } = {
|
|
1115
|
-
...
|
|
1115
|
+
...ae2,
|
|
1116
1116
|
...n45
|
|
1117
|
-
}, u37 =
|
|
1117
|
+
}, u37 = oe(r48, i53, c42, l40), d33 = oe(r48, i53 + 4, c42 + 3, l40);
|
|
1118
1118
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1119
1119
|
(e28 === "solid" || e28 === "subtle") && /* @__PURE__ */ jsx("path", {
|
|
1120
1120
|
className: "badge-fill",
|
|
@@ -1137,17 +1137,17 @@ var se2 = {
|
|
|
1137
1137
|
left: 4
|
|
1138
1138
|
},
|
|
1139
1139
|
stretches: true,
|
|
1140
|
-
defaults:
|
|
1140
|
+
defaults: ae2
|
|
1141
1141
|
};
|
|
1142
|
-
var
|
|
1142
|
+
var ce = {
|
|
1143
1143
|
biteRadius: 3,
|
|
1144
1144
|
biteSpacing: 8,
|
|
1145
1145
|
irregularity: 0
|
|
1146
1146
|
};
|
|
1147
|
-
var
|
|
1147
|
+
var le = {
|
|
1148
1148
|
compose: (e28) => {
|
|
1149
1149
|
let t40 = {
|
|
1150
|
-
...
|
|
1150
|
+
...ce,
|
|
1151
1151
|
...e28
|
|
1152
1152
|
};
|
|
1153
1153
|
return {
|
|
@@ -1170,7 +1170,7 @@ var le2 = {
|
|
|
1170
1170
|
left: 6
|
|
1171
1171
|
},
|
|
1172
1172
|
stretches: true,
|
|
1173
|
-
defaults:
|
|
1173
|
+
defaults: ce
|
|
1174
1174
|
};
|
|
1175
1175
|
var ue = {
|
|
1176
1176
|
bumpWidth: 24,
|
|
@@ -1206,15 +1206,15 @@ var de = {
|
|
|
1206
1206
|
stretches: true,
|
|
1207
1207
|
defaults: ue
|
|
1208
1208
|
};
|
|
1209
|
-
var
|
|
1209
|
+
var I2 = {
|
|
1210
1210
|
eaveY: 32,
|
|
1211
1211
|
peakHeight: 32,
|
|
1212
1212
|
roofOverhang: 0
|
|
1213
1213
|
};
|
|
1214
|
-
var
|
|
1214
|
+
var fe2 = {
|
|
1215
1215
|
compose: (e28) => {
|
|
1216
1216
|
let t40 = {
|
|
1217
|
-
...
|
|
1217
|
+
...I2,
|
|
1218
1218
|
...e28
|
|
1219
1219
|
}, n45 = Math.max(2, Math.min(t40.eaveY, 95)), r48 = n45 - Math.max(0, t40.peakHeight), i53 = Math.max(0, Math.min(t40.roofOverhang, 12));
|
|
1220
1220
|
return {
|
|
@@ -1237,19 +1237,19 @@ var pe2 = {
|
|
|
1237
1237
|
left: 4
|
|
1238
1238
|
},
|
|
1239
1239
|
stretches: true,
|
|
1240
|
-
defaults:
|
|
1240
|
+
defaults: I2
|
|
1241
1241
|
};
|
|
1242
|
-
var
|
|
1242
|
+
var L2 = {
|
|
1243
1243
|
bevelWidth: 6,
|
|
1244
1244
|
lightFrom: "tl",
|
|
1245
1245
|
rivetRadius: 2.4,
|
|
1246
1246
|
rivetInset: 7,
|
|
1247
1247
|
sheenIntensity: 0.22
|
|
1248
1248
|
};
|
|
1249
|
-
var
|
|
1249
|
+
var pe = {
|
|
1250
1250
|
compose: (e28) => {
|
|
1251
1251
|
let t40 = {
|
|
1252
|
-
...
|
|
1252
|
+
...L2,
|
|
1253
1253
|
...e28
|
|
1254
1254
|
};
|
|
1255
1255
|
return {
|
|
@@ -1288,13 +1288,13 @@ var me2 = {
|
|
|
1288
1288
|
left: 8
|
|
1289
1289
|
},
|
|
1290
1290
|
stretches: true,
|
|
1291
|
-
defaults:
|
|
1291
|
+
defaults: L2
|
|
1292
1292
|
};
|
|
1293
|
-
var
|
|
1293
|
+
var me = {
|
|
1294
1294
|
topInset: 12,
|
|
1295
1295
|
pointDepth: 100
|
|
1296
1296
|
};
|
|
1297
|
-
function
|
|
1297
|
+
function he2(e28, t40) {
|
|
1298
1298
|
let n45 = Math.max(0, Math.min(e28, 35)), r48 = Math.max(60, Math.min(t40, 110));
|
|
1299
1299
|
return [
|
|
1300
1300
|
`M ${n45} 6`,
|
|
@@ -1307,12 +1307,12 @@ function ge2(e28, t40) {
|
|
|
1307
1307
|
"Z"
|
|
1308
1308
|
].join(" ");
|
|
1309
1309
|
}
|
|
1310
|
-
var
|
|
1310
|
+
var R2 = {
|
|
1311
1311
|
Component: ({ variant: e28, focused: t40, params: n45 }) => {
|
|
1312
1312
|
let r48 = {
|
|
1313
|
-
...
|
|
1313
|
+
...me,
|
|
1314
1314
|
...n45
|
|
1315
|
-
}, i53 =
|
|
1315
|
+
}, i53 = he2(r48.topInset, r48.pointDepth);
|
|
1316
1316
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1317
1317
|
(e28 === "solid" || e28 === "subtle") && /* @__PURE__ */ jsx("path", {
|
|
1318
1318
|
className: "badge-fill",
|
|
@@ -1336,22 +1336,22 @@ var L2 = {
|
|
|
1336
1336
|
left: 10
|
|
1337
1337
|
},
|
|
1338
1338
|
stretches: true,
|
|
1339
|
-
defaults:
|
|
1339
|
+
defaults: me
|
|
1340
1340
|
};
|
|
1341
|
-
var
|
|
1342
|
-
var
|
|
1341
|
+
var z2 = "M 35 0 L 30 12 Q 15 30 15 55 Q 15 75 30 90 L 30 100 L 70 100 L 70 90 Q 85 75 85 55 Q 85 30 70 12 L 65 0 Z";
|
|
1342
|
+
var ge = {
|
|
1343
1343
|
Component: ({ variant: e28, focused: t40 }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1344
1344
|
(e28 === "solid" || e28 === "subtle") && /* @__PURE__ */ jsx("path", {
|
|
1345
1345
|
className: "badge-fill",
|
|
1346
|
-
d:
|
|
1346
|
+
d: z2
|
|
1347
1347
|
}),
|
|
1348
1348
|
(e28 === "outline" || e28 === "solid") && /* @__PURE__ */ jsx("path", {
|
|
1349
1349
|
className: "badge-stroke",
|
|
1350
|
-
d:
|
|
1350
|
+
d: z2
|
|
1351
1351
|
}),
|
|
1352
1352
|
t40 && /* @__PURE__ */ jsx("path", {
|
|
1353
1353
|
className: "badge-focus",
|
|
1354
|
-
d:
|
|
1354
|
+
d: z2,
|
|
1355
1355
|
transform: "translate(50 50) scale(1.05) translate(-50 -50)"
|
|
1356
1356
|
})
|
|
1357
1357
|
] }),
|
|
@@ -1363,7 +1363,7 @@ var _e2 = {
|
|
|
1363
1363
|
},
|
|
1364
1364
|
stretches: true
|
|
1365
1365
|
};
|
|
1366
|
-
var
|
|
1366
|
+
var B2 = {
|
|
1367
1367
|
headX: 6,
|
|
1368
1368
|
headHalfHeight: 23,
|
|
1369
1369
|
shoulderX: 33,
|
|
@@ -1371,10 +1371,10 @@ var z2 = {
|
|
|
1371
1371
|
footX: 100,
|
|
1372
1372
|
footHalfHeight: 29
|
|
1373
1373
|
};
|
|
1374
|
-
var
|
|
1374
|
+
var _e = {
|
|
1375
1375
|
compose: (e28) => {
|
|
1376
1376
|
let t40 = {
|
|
1377
|
-
...
|
|
1377
|
+
...B2,
|
|
1378
1378
|
...e28
|
|
1379
1379
|
}, n45 = Math.max(0, Math.min(t40.headX, 40)), r48 = Math.max(n45 + 1, Math.min(t40.shoulderX, 70)), i53 = Math.max(r48 + 1, Math.min(t40.footX, 100)), a54 = Math.max(2, Math.min(t40.headHalfHeight, 50)), o49 = Math.max(0, Math.min(t40.shoulderHalfHeight, 50)), s44 = Math.min(50, a54 + o49), c42 = Math.max(2, Math.min(t40.footHalfHeight, 50));
|
|
1380
1380
|
return {
|
|
@@ -1396,14 +1396,14 @@ var ve2 = {
|
|
|
1396
1396
|
left: 11
|
|
1397
1397
|
},
|
|
1398
1398
|
stretches: true,
|
|
1399
|
-
defaults:
|
|
1399
|
+
defaults: B2
|
|
1400
1400
|
};
|
|
1401
|
-
var
|
|
1401
|
+
var V2 = {
|
|
1402
1402
|
teeth: 11,
|
|
1403
1403
|
tearDepth: 4,
|
|
1404
1404
|
sideToTopRatio: 3
|
|
1405
1405
|
};
|
|
1406
|
-
function
|
|
1406
|
+
function H2(e28, t40) {
|
|
1407
1407
|
let n45 = Math.max(3, Math.floor(e28)), r48 = Math.max(1, t40), i53 = (e29) => r48 * (0.55 + 0.55 * Math.abs(Math.sin(e29 * 1.73 + 0.5))), a54 = "M 0 0 L 100 0";
|
|
1408
1408
|
for (let e29 = 0; e29 < n45; e29++) {
|
|
1409
1409
|
let t41 = (e29 + 0.5) / n45 * 100, r49 = (e29 + 1) / n45 * 100;
|
|
@@ -1416,13 +1416,13 @@ function V2(e28, t40) {
|
|
|
1416
1416
|
}
|
|
1417
1417
|
return a54 + " Z";
|
|
1418
1418
|
}
|
|
1419
|
-
var
|
|
1420
|
-
var
|
|
1419
|
+
var ve = 2;
|
|
1420
|
+
var ye = {
|
|
1421
1421
|
Component: ({ variant: e28, focused: t40, params: n45 }) => {
|
|
1422
1422
|
let r48 = {
|
|
1423
|
-
...
|
|
1423
|
+
...V2,
|
|
1424
1424
|
...n45
|
|
1425
|
-
}, i53 =
|
|
1425
|
+
}, i53 = H2(r48.teeth, r48.tearDepth);
|
|
1426
1426
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1427
1427
|
(e28 === "solid" || e28 === "subtle") && /* @__PURE__ */ jsx("path", {
|
|
1428
1428
|
className: "badge-fill",
|
|
@@ -1440,7 +1440,7 @@ var be = {
|
|
|
1440
1440
|
] });
|
|
1441
1441
|
},
|
|
1442
1442
|
insets: (e28) => {
|
|
1443
|
-
let t40 = Math.max(0.2, Math.min(e28.sideToTopRatio ??
|
|
1443
|
+
let t40 = Math.max(0.2, Math.min(e28.sideToTopRatio ?? V2.sideToTopRatio, 10)), n45 = ve, r48 = Math.round(n45 * t40);
|
|
1444
1444
|
return {
|
|
1445
1445
|
top: n45,
|
|
1446
1446
|
right: r48,
|
|
@@ -1449,18 +1449,18 @@ var be = {
|
|
|
1449
1449
|
};
|
|
1450
1450
|
},
|
|
1451
1451
|
stretches: true,
|
|
1452
|
-
defaults:
|
|
1452
|
+
defaults: V2
|
|
1453
1453
|
};
|
|
1454
|
-
var
|
|
1455
|
-
var
|
|
1454
|
+
var U2 = "M 8 30 Q 0 50 8 70 L 92 70 Q 100 50 92 30 Z";
|
|
1455
|
+
var be = {
|
|
1456
1456
|
Component: ({ variant: e28, focused: t40 }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1457
1457
|
(e28 === "solid" || e28 === "subtle") && /* @__PURE__ */ jsx("path", {
|
|
1458
1458
|
className: "badge-fill",
|
|
1459
|
-
d:
|
|
1459
|
+
d: U2
|
|
1460
1460
|
}),
|
|
1461
1461
|
(e28 === "outline" || e28 === "solid") && /* @__PURE__ */ jsx("path", {
|
|
1462
1462
|
className: "badge-stroke",
|
|
1463
|
-
d:
|
|
1463
|
+
d: U2
|
|
1464
1464
|
}),
|
|
1465
1465
|
(e28 === "outline" || e28 === "solid") && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1466
1466
|
/* @__PURE__ */ jsx("path", {
|
|
@@ -1517,7 +1517,7 @@ var xe = {
|
|
|
1517
1517
|
] }),
|
|
1518
1518
|
t40 && /* @__PURE__ */ jsx("path", {
|
|
1519
1519
|
className: "badge-focus",
|
|
1520
|
-
d:
|
|
1520
|
+
d: U2,
|
|
1521
1521
|
transform: "translate(50 50) scale(1.05) translate(-50 -50)"
|
|
1522
1522
|
})
|
|
1523
1523
|
] }),
|
|
@@ -1529,7 +1529,7 @@ var xe = {
|
|
|
1529
1529
|
},
|
|
1530
1530
|
stretches: true
|
|
1531
1531
|
};
|
|
1532
|
-
var
|
|
1532
|
+
var W = {
|
|
1533
1533
|
spikeR: 50,
|
|
1534
1534
|
lobeR: 42,
|
|
1535
1535
|
valleyR: 25,
|
|
@@ -1544,7 +1544,7 @@ var U2 = {
|
|
|
1544
1544
|
rotation: 0,
|
|
1545
1545
|
samples: 192
|
|
1546
1546
|
};
|
|
1547
|
-
var
|
|
1547
|
+
var xe2 = {
|
|
1548
1548
|
pill: h3,
|
|
1549
1549
|
plain: g3,
|
|
1550
1550
|
square: v3,
|
|
@@ -1556,21 +1556,21 @@ var Se = {
|
|
|
1556
1556
|
shield: te2,
|
|
1557
1557
|
ribbon: ne2,
|
|
1558
1558
|
beavis: ie2,
|
|
1559
|
-
sparkler:
|
|
1560
|
-
postage:
|
|
1559
|
+
sparkler: se,
|
|
1560
|
+
postage: le,
|
|
1561
1561
|
cloud: de,
|
|
1562
|
-
house:
|
|
1563
|
-
plaque:
|
|
1564
|
-
crest:
|
|
1565
|
-
urn:
|
|
1566
|
-
coffin:
|
|
1567
|
-
receipt:
|
|
1568
|
-
wood:
|
|
1562
|
+
house: fe2,
|
|
1563
|
+
plaque: pe,
|
|
1564
|
+
crest: R2,
|
|
1565
|
+
urn: ge,
|
|
1566
|
+
coffin: _e,
|
|
1567
|
+
receipt: ye,
|
|
1568
|
+
wood: be,
|
|
1569
1569
|
quatrefoil: {
|
|
1570
1570
|
compose: (e28) => ({
|
|
1571
1571
|
base: "quatrefoil",
|
|
1572
1572
|
baseParams: {
|
|
1573
|
-
...
|
|
1573
|
+
...W,
|
|
1574
1574
|
...e28
|
|
1575
1575
|
}
|
|
1576
1576
|
}),
|
|
@@ -1581,14 +1581,14 @@ var Se = {
|
|
|
1581
1581
|
left: 14
|
|
1582
1582
|
},
|
|
1583
1583
|
stretches: true,
|
|
1584
|
-
defaults:
|
|
1584
|
+
defaults: W
|
|
1585
1585
|
}
|
|
1586
1586
|
};
|
|
1587
|
-
var
|
|
1588
|
-
var
|
|
1587
|
+
var G2 = { chamfer: 6 };
|
|
1588
|
+
var K2 = {
|
|
1589
1589
|
build: (e28, t40, n45) => {
|
|
1590
1590
|
let r48 = {
|
|
1591
|
-
...
|
|
1591
|
+
...G2,
|
|
1592
1592
|
...e28
|
|
1593
1593
|
}, i53 = 100 / t40, a54 = 100 / n45, o49 = r48.chamfer * i53, s44 = r48.chamfer * a54, c42 = [
|
|
1594
1594
|
[o49, 0],
|
|
@@ -1631,7 +1631,7 @@ var G2 = {
|
|
|
1631
1631
|
totalCss: d33
|
|
1632
1632
|
};
|
|
1633
1633
|
},
|
|
1634
|
-
defaults:
|
|
1634
|
+
defaults: G2,
|
|
1635
1635
|
insets: {
|
|
1636
1636
|
top: 0,
|
|
1637
1637
|
right: 4,
|
|
@@ -1639,15 +1639,15 @@ var G2 = {
|
|
|
1639
1639
|
left: 4
|
|
1640
1640
|
}
|
|
1641
1641
|
};
|
|
1642
|
-
var
|
|
1642
|
+
var Se2 = {
|
|
1643
1643
|
erosion: 0.16,
|
|
1644
1644
|
eccentricity: 1,
|
|
1645
1645
|
pinch: 0
|
|
1646
1646
|
};
|
|
1647
|
-
var
|
|
1647
|
+
var Ce = {
|
|
1648
1648
|
build: (e28, t40, n45) => {
|
|
1649
1649
|
let r48 = {
|
|
1650
|
-
...
|
|
1650
|
+
...Se2,
|
|
1651
1651
|
...e28
|
|
1652
1652
|
}, i53 = 100 / t40, a54 = 100 / n45, o49 = Math.max(0, Math.min(r48.erosion, 1)), s44 = Math.max(0.1, Math.min(r48.eccentricity, 10)), c42 = Math.min(t40, n45) / 2 * o49, l40 = c42 * i53 * s44, u37 = c42 * a54 / s44, d33 = Math.max(0, Math.min(l40, 50)), f30 = Math.max(0, Math.min(u37, 50)), p26 = (100 - 2 * d33) / i53, m26 = (100 - 2 * f30) / a54, h25 = c42 + c42 || 1, g22 = Math.PI * h25 * 1 / 4, _21 = [
|
|
1653
1653
|
{
|
|
@@ -1684,7 +1684,7 @@ var we = {
|
|
|
1684
1684
|
}
|
|
1685
1685
|
], v19 = [0];
|
|
1686
1686
|
for (let e29 of _21) v19.push(v19[v19.length - 1] + e29.cssLen);
|
|
1687
|
-
let y18 = v19[v19.length - 1],
|
|
1687
|
+
let y18 = v19[v19.length - 1], b17 = (e29) => {
|
|
1688
1688
|
let t41 = (e29 % y18 + y18) % y18, n46 = 0;
|
|
1689
1689
|
for (; n46 < _21.length - 1 && t41 > v19[n46 + 1]; ) n46++;
|
|
1690
1690
|
let r49 = t41 - v19[n46], i54 = _21[n46], a55 = i54.cssLen > 0 ? r49 / i54.cssLen : 0;
|
|
@@ -1764,7 +1764,7 @@ var we = {
|
|
|
1764
1764
|
if (x18 === 0) return t41;
|
|
1765
1765
|
let n46 = Math.abs(e29 - 50) / 50;
|
|
1766
1766
|
return 50 + (t41 - 50) * (1 - n46 * x18);
|
|
1767
|
-
}, C14, w13 =
|
|
1767
|
+
}, C14, w13 = b17;
|
|
1768
1768
|
if (x18 === 0) C14 = [
|
|
1769
1769
|
`M ${d33} 0`,
|
|
1770
1770
|
`L ${100 - d33} 0`,
|
|
@@ -1780,14 +1780,14 @@ var we = {
|
|
|
1780
1780
|
else {
|
|
1781
1781
|
let e29 = [];
|
|
1782
1782
|
for (let t41 = 0; t41 < 240; t41++) {
|
|
1783
|
-
let n46 =
|
|
1783
|
+
let n46 = b17(t41 / 240 * y18);
|
|
1784
1784
|
e29.push({
|
|
1785
1785
|
x: n46.x,
|
|
1786
1786
|
y: S17(n46.x, n46.y)
|
|
1787
1787
|
});
|
|
1788
1788
|
}
|
|
1789
1789
|
C14 = e29.reduce((e30, t41, n46) => e30 + (n46 === 0 ? `M ${t41.x.toFixed(3)} ${t41.y.toFixed(3)}` : ` L ${t41.x.toFixed(3)} ${t41.y.toFixed(3)}`), "") + " Z", w13 = (e30) => {
|
|
1790
|
-
let t41 = (e30 % y18 + y18) % y18, n46 =
|
|
1790
|
+
let t41 = (e30 % y18 + y18) % y18, n46 = b17(t41), r49 = n46.x, o50 = S17(n46.x, n46.y), s45 = y18 / 480, c43 = b17(t41 - s45), l41 = b17(t41 + s45), u38 = c43.x, d34 = S17(c43.x, c43.y), f31 = l41.x, p27 = S17(l41.x, l41.y), m27 = (f31 - u38) / i53, h26 = (p27 - d34) / a54, g23 = Math.hypot(m27, h26) || 1;
|
|
1791
1791
|
return {
|
|
1792
1792
|
x: r49,
|
|
1793
1793
|
y: o50,
|
|
@@ -1802,7 +1802,7 @@ var we = {
|
|
|
1802
1802
|
totalCss: y18
|
|
1803
1803
|
};
|
|
1804
1804
|
},
|
|
1805
|
-
defaults:
|
|
1805
|
+
defaults: Se2,
|
|
1806
1806
|
insets: {
|
|
1807
1807
|
top: 0,
|
|
1808
1808
|
right: 4,
|
|
@@ -1810,7 +1810,7 @@ var we = {
|
|
|
1810
1810
|
left: 4
|
|
1811
1811
|
}
|
|
1812
1812
|
};
|
|
1813
|
-
function
|
|
1813
|
+
function q2(e28, t40, n45) {
|
|
1814
1814
|
let r48 = 100 / t40, i53 = 100 / n45, a54 = [], o49 = [0];
|
|
1815
1815
|
for (let t41 = 0; t41 < e28.length; t41++) {
|
|
1816
1816
|
let n46 = e28[t41], s45 = e28[(t41 + 1) % e28.length], c42 = (s45[0] - n46[0]) / r48, l40 = (s45[1] - n46[1]) / i53, u37 = Math.hypot(c42, l40);
|
|
@@ -1843,15 +1843,15 @@ function K2(e28, t40, n45) {
|
|
|
1843
1843
|
totalCss: s44
|
|
1844
1844
|
};
|
|
1845
1845
|
}
|
|
1846
|
-
var
|
|
1846
|
+
var J = [
|
|
1847
1847
|
[0, 0],
|
|
1848
1848
|
[100, 0],
|
|
1849
1849
|
[100, 100],
|
|
1850
1850
|
[0, 100]
|
|
1851
1851
|
];
|
|
1852
|
-
var
|
|
1853
|
-
build: (e28, t40, n45) =>
|
|
1854
|
-
defaults: { vertices:
|
|
1852
|
+
var we = {
|
|
1853
|
+
build: (e28, t40, n45) => q2(e28?.vertices && e28.vertices.length >= 3 ? e28.vertices : J, t40, n45),
|
|
1854
|
+
defaults: { vertices: J },
|
|
1855
1855
|
insets: {
|
|
1856
1856
|
top: 0,
|
|
1857
1857
|
right: 4,
|
|
@@ -1859,7 +1859,7 @@ var Te2 = {
|
|
|
1859
1859
|
left: 4
|
|
1860
1860
|
}
|
|
1861
1861
|
};
|
|
1862
|
-
var
|
|
1862
|
+
var Te = {
|
|
1863
1863
|
top: "out",
|
|
1864
1864
|
right: "in",
|
|
1865
1865
|
bottom: "out",
|
|
@@ -1867,10 +1867,10 @@ var Ee = {
|
|
|
1867
1867
|
tabSize: 12,
|
|
1868
1868
|
arcSamples: 18
|
|
1869
1869
|
};
|
|
1870
|
-
var
|
|
1871
|
-
function
|
|
1870
|
+
var Y = 0.62;
|
|
1871
|
+
function X2(e28, t40, n45, r48, i53, a54, o49) {
|
|
1872
1872
|
if (i53 === "flat") return [t40];
|
|
1873
|
-
let s44 = i53 === "out" ? 1 : -1, c42 = t40[0] - e28[0], l40 = t40[1] - e28[1], u37 = Math.hypot(c42, l40) || 1, d33 = c42 / u37, f30 = l40 / u37, p26 = (e28[0] + t40[0]) / 2, m26 = (e28[1] + t40[1]) / 2, h25 = p26 + n45 * s44 * a54 *
|
|
1873
|
+
let s44 = i53 === "out" ? 1 : -1, c42 = t40[0] - e28[0], l40 = t40[1] - e28[1], u37 = Math.hypot(c42, l40) || 1, d33 = c42 / u37, f30 = l40 / u37, p26 = (e28[0] + t40[0]) / 2, m26 = (e28[1] + t40[1]) / 2, h25 = p26 + n45 * s44 * a54 * Y, g22 = m26 + r48 * s44 * a54 * Y, _21 = a54 * Math.sqrt(Math.max(0, 1 - Y * Y)), v19 = [p26 - d33 * _21, m26 - f30 * _21], y18 = [p26 + d33 * _21, m26 + f30 * _21], b17 = [p26 + n45 * s44 * (a54 + a54 * 0.38), m26 + r48 * s44 * (a54 + a54 * 0.38)], x18 = Math.hypot(v19[0] - h25, v19[1] - g22), S17 = Math.atan2(v19[1] - g22, v19[0] - h25), C14 = Math.atan2(y18[1] - g22, y18[0] - h25), w13 = Math.atan2(b17[1] - g22, b17[0] - h25), T13 = Math.PI * 2, E12 = ((w13 - S17) % T13 + T13) % T13, D12 = ((C14 - S17) % T13 + T13) % T13, O12 = E12 < D12 ? D12 : D12 - T13, k12 = [];
|
|
1874
1874
|
k12.push(v19);
|
|
1875
1875
|
for (let e29 = 1; e29 <= o49; e29++) {
|
|
1876
1876
|
let t41 = S17 + e29 / o49 * O12;
|
|
@@ -1878,15 +1878,15 @@ function Y(e28, t40, n45, r48, i53, a54, o49) {
|
|
|
1878
1878
|
}
|
|
1879
1879
|
return k12.push(t40), k12;
|
|
1880
1880
|
}
|
|
1881
|
-
var
|
|
1881
|
+
var Ee = {
|
|
1882
1882
|
build: (e28, t40, n45) => {
|
|
1883
1883
|
let r48 = {
|
|
1884
|
-
...
|
|
1884
|
+
...Te,
|
|
1885
1885
|
...e28
|
|
1886
1886
|
}, i53 = Math.max(2, Math.min(r48.tabSize, 40)), a54 = Math.max(6, Math.floor(r48.arcSamples)), o49 = [0, 0], s44 = [100, 0], c42 = [100, 100], l40 = [0, 100], u37 = [o49];
|
|
1887
|
-
return u37.push(...
|
|
1887
|
+
return u37.push(...X2(o49, s44, 0, -1, r48.top, i53, a54)), u37.push(...X2(s44, c42, 1, 0, r48.right, i53, a54)), u37.push(...X2(c42, l40, 0, 1, r48.bottom, i53, a54)), u37.push(...X2(l40, o49, -1, 0, r48.left, i53, a54)), u37.length > 1 && u37[u37.length - 1][0] === o49[0] && u37[u37.length - 1][1] === o49[1] && u37.pop(), q2(u37, t40, n45);
|
|
1888
1888
|
},
|
|
1889
|
-
defaults:
|
|
1889
|
+
defaults: Te,
|
|
1890
1890
|
insets: {
|
|
1891
1891
|
top: 12,
|
|
1892
1892
|
right: 16,
|
|
@@ -1894,7 +1894,7 @@ var De = {
|
|
|
1894
1894
|
left: 16
|
|
1895
1895
|
}
|
|
1896
1896
|
};
|
|
1897
|
-
var
|
|
1897
|
+
var De = {
|
|
1898
1898
|
spikeR: 50,
|
|
1899
1899
|
lobeR: 42,
|
|
1900
1900
|
valleyR: 25,
|
|
@@ -1909,7 +1909,7 @@ var X2 = {
|
|
|
1909
1909
|
rotation: 0,
|
|
1910
1910
|
samples: 192
|
|
1911
1911
|
};
|
|
1912
|
-
function
|
|
1912
|
+
function Oe(e28, t40, n45) {
|
|
1913
1913
|
let r48 = e28 - t40;
|
|
1914
1914
|
return (e28 + t40 + Math.sqrt(r48 * r48 + n45 * n45)) / 2;
|
|
1915
1915
|
}
|
|
@@ -1921,18 +1921,18 @@ function ke(e28, t40, n45, r48) {
|
|
|
1921
1921
|
}
|
|
1922
1922
|
function Ae(e28 = {}) {
|
|
1923
1923
|
let t40 = {
|
|
1924
|
-
...
|
|
1924
|
+
...De,
|
|
1925
1925
|
...e28
|
|
1926
1926
|
}, n45 = Math.max(5, Math.min(t40.spikeR, 50)), r48 = Math.max(5, Math.min(t40.lobeR, 50 * Math.SQRT2)), i53 = Math.max(0, Math.min(t40.valleyR, Math.min(n45, r48))), a54 = Math.max(0.05, Math.min(t40.valleyAt, 0.95)), o49 = Math.max(0.2, t40.spikeCurvature), s44 = Math.max(-0.95, Math.min(t40.spikeBend, 0.95)), c42 = Math.max(0, Math.min(t40.spikeTipErosion, 1)), l40 = Math.max(0.2, t40.lobeCurvature), u37 = Math.max(-0.95, Math.min(t40.lobeBend, 0.95)), d33 = Math.max(0, Math.min(t40.lobeTipErosion, 1)), f30 = Math.max(0, t40.valleySmooth), p26 = t40.rotation * Math.PI / 180, m26 = Math.max(24, Math.floor(t40.samples)), h25 = [];
|
|
1927
1927
|
for (let e29 = 0; e29 < m26; e29++) {
|
|
1928
|
-
let t41 = e29 / m26 * 2 * Math.PI, g22 = Math.abs(Math.sin(2 * (t41 - p26))), _21 = (a54 - g22) / a54, v19 = (g22 - a54) / (1 - a54), y18 =
|
|
1928
|
+
let t41 = e29 / m26 * 2 * Math.PI, g22 = Math.abs(Math.sin(2 * (t41 - p26))), _21 = (a54 - g22) / a54, v19 = (g22 - a54) / (1 - a54), y18 = Oe(i53 + (n45 - i53) * ke(Math.max(0, _21), o49, s44, c42), i53 + (r48 - i53) * ke(Math.max(0, v19), l40, u37, d33), f30);
|
|
1929
1929
|
h25.push([50 + y18 * Math.cos(t41), 50 + y18 * Math.sin(t41)]);
|
|
1930
1930
|
}
|
|
1931
1931
|
return h25;
|
|
1932
1932
|
}
|
|
1933
|
-
var
|
|
1934
|
-
build: (e28, t40, n45) =>
|
|
1935
|
-
defaults:
|
|
1933
|
+
var je2 = {
|
|
1934
|
+
build: (e28, t40, n45) => q2(Ae(e28), t40, n45),
|
|
1935
|
+
defaults: De,
|
|
1936
1936
|
insets: {
|
|
1937
1937
|
top: 10,
|
|
1938
1938
|
right: 14,
|
|
@@ -1940,7 +1940,7 @@ var je = {
|
|
|
1940
1940
|
left: 14
|
|
1941
1941
|
}
|
|
1942
1942
|
};
|
|
1943
|
-
var
|
|
1943
|
+
var Me2 = {
|
|
1944
1944
|
mode: "octant",
|
|
1945
1945
|
count: 5,
|
|
1946
1946
|
s0: 0,
|
|
@@ -1984,7 +1984,7 @@ var Me = {
|
|
|
1984
1984
|
};
|
|
1985
1985
|
function Ne(e28 = {}) {
|
|
1986
1986
|
let t40 = {
|
|
1987
|
-
...
|
|
1987
|
+
...Me2,
|
|
1988
1988
|
...e28
|
|
1989
1989
|
}, n45 = Math.max(3, Math.min(Math.floor(t40.count), 12)), r48 = [
|
|
1990
1990
|
"s0",
|
|
@@ -2033,7 +2033,7 @@ function Ne(e28 = {}) {
|
|
|
2033
2033
|
});
|
|
2034
2034
|
return o49.sort((e29, t41) => e29.s - t41.s), o49[0].s = 0, o49[n45 - 1].s = 1, t40.mode === "quadrant" && (o49[n45 - 1].r = o49[0].r, o49[n45 - 1].w = o49[0].w), o49;
|
|
2035
2035
|
}
|
|
2036
|
-
function
|
|
2036
|
+
function Pe(e28) {
|
|
2037
2037
|
let t40 = e28.length - 1, n45 = Array(t40);
|
|
2038
2038
|
for (let r49 = 0; r49 < t40; r49++) n45[r49] = Math.max(1e-9, e28[r49 + 1].s - e28[r49].s);
|
|
2039
2039
|
let r48 = Array(t40 + 1), i53 = Array(t40 + 1), a54 = Array(t40 + 1), o49 = Array(t40 + 1);
|
|
@@ -2049,10 +2049,10 @@ function Pe2(e28) {
|
|
|
2049
2049
|
for (let e29 = t40 - 1; e29 >= 0; e29--) s44[e29] = (o49[e29] - a54[e29] * s44[e29 + 1]) / i53[e29];
|
|
2050
2050
|
return s44;
|
|
2051
2051
|
}
|
|
2052
|
-
function
|
|
2052
|
+
function Fe(e28) {
|
|
2053
2053
|
return {
|
|
2054
2054
|
anchors: e28,
|
|
2055
|
-
M:
|
|
2055
|
+
M: Pe(e28)
|
|
2056
2056
|
};
|
|
2057
2057
|
}
|
|
2058
2058
|
function Ie(e28, t40) {
|
|
@@ -2070,18 +2070,18 @@ function Ie(e28, t40) {
|
|
|
2070
2070
|
var Le = {
|
|
2071
2071
|
build: (e28, t40, n45) => {
|
|
2072
2072
|
let r48 = {
|
|
2073
|
-
...
|
|
2073
|
+
...Me2,
|
|
2074
2074
|
...e28
|
|
2075
|
-
}, i53 =
|
|
2075
|
+
}, i53 = Fe(Ne(r48)), a54 = r48.rotation * Math.PI / 180, o49 = Math.max(48, Math.floor(r48.samples)), s44 = [], c42 = Math.PI / 2;
|
|
2076
2076
|
for (let e29 = 0; e29 < o49; e29++) {
|
|
2077
2077
|
let t41 = e29 / o49 * 2 * Math.PI, n46 = t41 - a54, l40;
|
|
2078
2078
|
l40 = r48.mode === "quadrant" ? (n46 % c42 + c42) % c42 / c42 : Math.abs(Math.sin(2 * n46));
|
|
2079
2079
|
let u37 = Ie(l40, i53);
|
|
2080
2080
|
s44.push([50 + u37 * Math.cos(t41), 50 + u37 * Math.sin(t41)]);
|
|
2081
2081
|
}
|
|
2082
|
-
return
|
|
2082
|
+
return q2(s44, t40, n45);
|
|
2083
2083
|
},
|
|
2084
|
-
defaults:
|
|
2084
|
+
defaults: Me2,
|
|
2085
2085
|
insets: {
|
|
2086
2086
|
top: 10,
|
|
2087
2087
|
right: 14,
|
|
@@ -2237,7 +2237,7 @@ function Ue(e28, t40, n45, r48) {
|
|
|
2237
2237
|
}
|
|
2238
2238
|
return i53;
|
|
2239
2239
|
}
|
|
2240
|
-
function
|
|
2240
|
+
function We(e28) {
|
|
2241
2241
|
let t40 = Be(e28);
|
|
2242
2242
|
return {
|
|
2243
2243
|
extended: t40,
|
|
@@ -2245,7 +2245,7 @@ function We2(e28) {
|
|
|
2245
2245
|
degree: 3
|
|
2246
2246
|
};
|
|
2247
2247
|
}
|
|
2248
|
-
function
|
|
2248
|
+
function Ge(e28, t40) {
|
|
2249
2249
|
let { extended: n45, knots: r48, degree: i53 } = t40, a54 = n45.length, o49 = Math.max(0, Math.min(1, e28)), s44 = He(o49, r48, i53, a54), c42 = Ue(s44, o49, r48, i53), l40 = 0, u37 = 0, d33 = 0;
|
|
2250
2250
|
for (let e29 = 0; e29 <= i53; e29++) {
|
|
2251
2251
|
let t41 = n45[s44 - i53 + e29], r49 = t41.w * c42[e29];
|
|
@@ -2260,28 +2260,28 @@ function Ge2(e28, t40) {
|
|
|
2260
2260
|
};
|
|
2261
2261
|
}
|
|
2262
2262
|
function Ke(e28, t40) {
|
|
2263
|
-
if (e28 <= 0) return
|
|
2264
|
-
if (e28 >= 1) return
|
|
2263
|
+
if (e28 <= 0) return Ge(0, t40).r;
|
|
2264
|
+
if (e28 >= 1) return Ge(1, t40).r;
|
|
2265
2265
|
let n45 = 0, r48 = 1;
|
|
2266
2266
|
for (let i53 = 0; i53 < 30; i53++) {
|
|
2267
|
-
let i54 = (n45 + r48) * 0.5, { s: a54 } =
|
|
2267
|
+
let i54 = (n45 + r48) * 0.5, { s: a54 } = Ge(i54, t40);
|
|
2268
2268
|
if (a54 < e28 ? n45 = i54 : r48 = i54, r48 - n45 < 1e-5) break;
|
|
2269
2269
|
}
|
|
2270
|
-
return
|
|
2270
|
+
return Ge((n45 + r48) * 0.5, t40).r;
|
|
2271
2271
|
}
|
|
2272
2272
|
var qe = {
|
|
2273
2273
|
build: (e28, t40, n45) => {
|
|
2274
2274
|
let r48 = {
|
|
2275
2275
|
...Re,
|
|
2276
2276
|
...e28
|
|
2277
|
-
}, i53 =
|
|
2277
|
+
}, i53 = We(ze(r48)), a54 = r48.rotation * Math.PI / 180, o49 = Math.max(48, Math.floor(r48.samples)), s44 = [], c42 = Math.PI / 2;
|
|
2278
2278
|
for (let e29 = 0; e29 < o49; e29++) {
|
|
2279
2279
|
let t41 = e29 / o49 * 2 * Math.PI, n46 = t41 - a54, l40;
|
|
2280
2280
|
l40 = r48.mode === "quadrant" ? (n46 % c42 + c42) % c42 / c42 : Math.abs(Math.sin(2 * n46));
|
|
2281
2281
|
let u37 = Ke(l40, i53);
|
|
2282
2282
|
s44.push([50 + u37 * Math.cos(t41), 50 + u37 * Math.sin(t41)]);
|
|
2283
2283
|
}
|
|
2284
|
-
return
|
|
2284
|
+
return q2(s44, t40, n45);
|
|
2285
2285
|
},
|
|
2286
2286
|
defaults: Re,
|
|
2287
2287
|
insets: {
|
|
@@ -2335,7 +2335,7 @@ var Ze = {
|
|
|
2335
2335
|
...Je,
|
|
2336
2336
|
...e28
|
|
2337
2337
|
}, i53 = Math.max(0, r48.taperWidth), a54 = t40 > 0 ? i53 / t40 * 100 : 0, o49 = Ye(r48.left, 0, 1, a54), s44 = Ye(r48.right, 100, -1, a54), c42 = [o49.top];
|
|
2338
|
-
return c42.push(s44.top), s44.mid && c42.push(s44.mid), c42.push(s44.bottom), c42.push(o49.bottom), o49.mid && c42.push(o49.mid),
|
|
2338
|
+
return c42.push(s44.top), s44.mid && c42.push(s44.mid), c42.push(s44.bottom), c42.push(o49.bottom), o49.mid && c42.push(o49.mid), q2(c42, t40, n45);
|
|
2339
2339
|
},
|
|
2340
2340
|
insets: (e28) => {
|
|
2341
2341
|
let t40 = {
|
|
@@ -2370,11 +2370,11 @@ var et = {
|
|
|
2370
2370
|
};
|
|
2371
2371
|
var tt = 64;
|
|
2372
2372
|
var nt = {
|
|
2373
|
-
"chamfered-rect":
|
|
2374
|
-
"rounded-rect":
|
|
2375
|
-
polygon:
|
|
2376
|
-
puzzle:
|
|
2377
|
-
quatrefoil:
|
|
2373
|
+
"chamfered-rect": K2,
|
|
2374
|
+
"rounded-rect": Ce,
|
|
2375
|
+
polygon: we,
|
|
2376
|
+
puzzle: Ee,
|
|
2377
|
+
quatrefoil: je2,
|
|
2378
2378
|
"octant-spline": Le,
|
|
2379
2379
|
"octant-bspline": qe,
|
|
2380
2380
|
ribbon: Ze,
|
|
@@ -2415,7 +2415,7 @@ var nt = {
|
|
|
2415
2415
|
nx: 0,
|
|
2416
2416
|
ny: 1
|
|
2417
2417
|
});
|
|
2418
|
-
for (let e29 =
|
|
2418
|
+
for (let e29 = 63; e29 >= 1; e29--) {
|
|
2419
2419
|
let t41 = e29 / tt, n46 = 0 + i53(t41, o49);
|
|
2420
2420
|
l40.push({
|
|
2421
2421
|
x: n46 * s44,
|
|
@@ -2503,7 +2503,7 @@ var it = {
|
|
|
2503
2503
|
dx: 0,
|
|
2504
2504
|
dy: 0
|
|
2505
2505
|
};
|
|
2506
|
-
let m26 = 1 - Math.abs(p26) / c42, h25 = i53(f30), g22 = h25.nx, _21 = h25.ny, v19 = Math.abs(h25.nx), y18 = Math.abs(h25.ny),
|
|
2506
|
+
let m26 = 1 - Math.abs(p26) / c42, h25 = i53(f30), g22 = h25.nx, _21 = h25.ny, v19 = Math.abs(h25.nx), y18 = Math.abs(h25.ny), b17 = Math.min(1, 2 * v19 * y18), x18 = (y18 > v19 ? a54.vertScale : a54.horzScale) * (1 - b17) + a54.diagonalScale * b17, S17 = 1 + a54.irregularity * 0.5 * Math.sin(d33 * 1.73 + 0.7), C14 = Math.max(s44 * 0.5, c42), w13 = 0;
|
|
2507
2507
|
for (let e29 = 0; e29 < 5; e29++) {
|
|
2508
2508
|
let t41 = (e29 + 0.5) / 5, n46 = f30 - C14 + t41 * 2 * C14 - C14 / 5, r49 = f30 - C14 + t41 * 2 * C14 + C14 / 5, a55 = i53(n46), o50 = i53(r49);
|
|
2509
2509
|
w13 += Math.hypot(o50.nx - a55.nx, o50.ny - a55.ny) / (r49 - n46);
|
|
@@ -2758,13 +2758,13 @@ var bt = {
|
|
|
2758
2758
|
let i53 = {
|
|
2759
2759
|
...yt,
|
|
2760
2760
|
...r48
|
|
2761
|
-
}, c42 = 100 / e28, l40 = 100 / t40, u37 = i53.radius * c42, d33 = i53.radius * l40, f30 = i53.inset * c42, p26 = i53.inset * l40, m26 = i53.lightFrom[1] === "l" ? -i53.radius * 0.32 : i53.radius * 0.32, h25 = i53.lightFrom[0] === "t" ? -i53.radius * 0.32 : i53.radius * 0.32
|
|
2762
|
-
return /* @__PURE__ */ jsx(Fragment, { children: [
|
|
2761
|
+
}, c42 = 100 / e28, l40 = 100 / t40, u37 = i53.radius * c42, d33 = i53.radius * l40, f30 = i53.inset * c42, p26 = i53.inset * l40, m26 = i53.lightFrom[1] === "l" ? -i53.radius * 0.32 : i53.radius * 0.32, h25 = i53.lightFrom[0] === "t" ? -i53.radius * 0.32 : i53.radius * 0.32, g22 = [
|
|
2763
2762
|
[f30, p26],
|
|
2764
2763
|
[100 - f30, p26],
|
|
2765
2764
|
[f30, 100 - p26],
|
|
2766
2765
|
[100 - f30, 100 - p26]
|
|
2767
|
-
]
|
|
2766
|
+
];
|
|
2767
|
+
return /* @__PURE__ */ jsx(Fragment, { children: g22.map(([e29, t41], n46) => /* @__PURE__ */ jsxs("g", { children: [
|
|
2768
2768
|
/* @__PURE__ */ jsx("ellipse", {
|
|
2769
2769
|
className: "badge-bevel-dark",
|
|
2770
2770
|
cx: e29,
|
|
@@ -2948,7 +2948,7 @@ var jt = {
|
|
|
2948
2948
|
}, v19.push(y18)) : y18.idxs.push(e29);
|
|
2949
2949
|
}
|
|
2950
2950
|
v19.length > 1 && v19[0].bucket === v19[v19.length - 1].bucket && (v19[v19.length - 1].idxs = v19[v19.length - 1].idxs.concat(v19[0].idxs), v19.shift());
|
|
2951
|
-
let
|
|
2951
|
+
let b17 = (e29) => {
|
|
2952
2952
|
let t41 = e29.idxs[0], n46 = e29.idxs[e29.idxs.length - 1], r49 = (t41 - 1 + Q2) % Q2, i54 = (n46 + 1) % Q2, a54 = [
|
|
2953
2953
|
r49,
|
|
2954
2954
|
...e29.idxs,
|
|
@@ -2964,7 +2964,7 @@ var jt = {
|
|
|
2964
2964
|
clipPath: `url(#${c42})`,
|
|
2965
2965
|
children: v19.map((e29, t41) => /* @__PURE__ */ jsx("path", {
|
|
2966
2966
|
className: kt[e29.bucket],
|
|
2967
|
-
d:
|
|
2967
|
+
d: b17(e29)
|
|
2968
2968
|
}, t41))
|
|
2969
2969
|
})] });
|
|
2970
2970
|
},
|
|
@@ -3016,7 +3016,7 @@ var Ft = {
|
|
|
3016
3016
|
let i53 = {
|
|
3017
3017
|
...Pt,
|
|
3018
3018
|
...r48
|
|
3019
|
-
}, c42 = useId(), l40 = useId(), d33 = useId(), f30 = 100 / t40, p26 = 100 / n45, m26 = Math.max(0, Math.min(i53.irregularity, 1)), h25 = (e29) => 1 + m26 * 0.45 * Math.sin(e29 * 1.73 + 0.7), g22 = (e29) => 1 + m26 * 0.5 * Math.sin(e29 * 2.31 + 1.3), _21 = (e29) => m26 * 8 * Math.sin(e29 * 3.07 + 0.4), v19 = i53.width * f30, y18 = i53.gap * f30,
|
|
3019
|
+
}, c42 = useId(), l40 = useId(), d33 = useId(), f30 = 100 / t40, p26 = 100 / n45, m26 = Math.max(0, Math.min(i53.irregularity, 1)), h25 = (e29) => 1 + m26 * 0.45 * Math.sin(e29 * 1.73 + 0.7), g22 = (e29) => 1 + m26 * 0.5 * Math.sin(e29 * 2.31 + 1.3), _21 = (e29) => m26 * 8 * Math.sin(e29 * 3.07 + 0.4), v19 = i53.width * f30, y18 = i53.gap * f30, b17 = i53.offset * f30, x18 = 50 - (i53.count * v19 + (i53.count - 1) * y18) / 2 + b17, S17 = [];
|
|
3020
3020
|
for (let e29 = 0; e29 < i53.count; e29++) {
|
|
3021
3021
|
let t41 = v19 * h25(e29), n46 = x18, r49 = x18 + t41, a54 = Math.tan((i53.angle + _21(e29)) * Math.PI / 180) * (f30 / p26) * 200 / 2, o49 = [
|
|
3022
3022
|
[n46 + a54, -50],
|
|
@@ -3142,7 +3142,7 @@ var Rt = {
|
|
|
3142
3142
|
})) : h25 = null;
|
|
3143
3143
|
}
|
|
3144
3144
|
if (m26.length > 1) {
|
|
3145
|
-
let t41 = e28.perimeterAt(0), n46 = e28.perimeterAt(
|
|
3145
|
+
let t41 = e28.perimeterAt(0), n46 = e28.perimeterAt(239 / Lt * p26);
|
|
3146
3146
|
if (t41.ny < 0 && n46.ny < 0) {
|
|
3147
3147
|
let e29 = m26.shift();
|
|
3148
3148
|
m26[m26.length - 1].push(...e29);
|
|
@@ -3155,7 +3155,7 @@ var Rt = {
|
|
|
3155
3155
|
for (let n46 = 1; n46 < e29.length; n46++) t41 += ` L ${e29[n46].x.toFixed(3)} ${e29[n46].y.toFixed(3)}`;
|
|
3156
3156
|
g22.push(t41);
|
|
3157
3157
|
}
|
|
3158
|
-
let _21 = 100 / t40, v19 = 100 / n45, y18 = Math.max(_21, v19),
|
|
3158
|
+
let _21 = 100 / t40, v19 = 100 / n45, y18 = Math.max(_21, v19), b17 = f30.bezelWidth * y18, x18 = f30.rimWidth * y18, S17 = Math.max(0, f30.equator - f30.equatorSpread), C14 = Math.min(100, f30.equator + f30.equatorSpread * 1.6), w13 = `color-mix(in srgb, ${f30.accent} ${f30.equatorTint}%, white)`, T13 = `color-mix(in srgb, ${f30.accent} ${f30.baseTint}%, black)`;
|
|
3159
3159
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3160
3160
|
/* @__PURE__ */ jsxs("defs", { children: [
|
|
3161
3161
|
/* @__PURE__ */ jsxs("linearGradient", {
|
|
@@ -3256,7 +3256,7 @@ var Rt = {
|
|
|
3256
3256
|
fill: "none",
|
|
3257
3257
|
stroke: "white",
|
|
3258
3258
|
strokeOpacity: f30.bezelAlpha,
|
|
3259
|
-
strokeWidth:
|
|
3259
|
+
strokeWidth: b17,
|
|
3260
3260
|
strokeLinecap: "round",
|
|
3261
3261
|
vectorEffect: "non-scaling-stroke",
|
|
3262
3262
|
style: { pointerEvents: "none" }
|
|
@@ -3321,7 +3321,7 @@ var $2 = {
|
|
|
3321
3321
|
})) : g22 = null;
|
|
3322
3322
|
}
|
|
3323
3323
|
if (h25.length > 1) {
|
|
3324
|
-
let t41 = e28.perimeterAt(0), n46 = e28.perimeterAt(
|
|
3324
|
+
let t41 = e28.perimeterAt(0), n46 = e28.perimeterAt(239 / Bt * m26);
|
|
3325
3325
|
if (t41.ny < 0 && n46.ny < 0) {
|
|
3326
3326
|
let e29 = h25.shift();
|
|
3327
3327
|
h25[h25.length - 1].push(...e29);
|
|
@@ -3334,7 +3334,7 @@ var $2 = {
|
|
|
3334
3334
|
for (let n46 = 1; n46 < e29.length; n46++) t41 += ` L ${e29[n46].x.toFixed(3)} ${e29[n46].y.toFixed(3)}`;
|
|
3335
3335
|
_21.push(t41);
|
|
3336
3336
|
}
|
|
3337
|
-
let v19 = 100 / t40, y18 = 100 / n45,
|
|
3337
|
+
let v19 = 100 / t40, y18 = 100 / n45, b17 = Math.max(v19, y18), x18 = f30.bezelWidth * b17, S17 = f30.rimWidth * b17, C14 = Math.max(0, f30.equator - f30.equatorSpread), w13 = Math.min(100, f30.equator + f30.equatorSpread), T13 = 100 - Math.round(p26 * 85), E12 = `color-mix(in srgb, ${f30.accent} ${T13}%, white)`, D12 = `color-mix(in srgb, ${f30.accent} ${f30.topDarkness}%, black)`, O12 = `color-mix(in srgb, ${f30.accent} ${f30.baseDarkness}%, black)`, k12 = 100 - Math.round(p26 * 50), A11 = 100 - Math.round(p26 * 30), j11 = `color-mix(in srgb, ${f30.accent} ${k12}%, white)`, M12 = `color-mix(in srgb, ${f30.accent} ${A11}%, white)`, N11 = f30.glossAlphaTop * p26, P10 = f30.bezelAlpha * (0.4 + 0.6 * p26), ee7 = f30.rimAlpha * (0.6 + 0.4 * p26);
|
|
3338
3338
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3339
3339
|
/* @__PURE__ */ jsxs("defs", { children: [
|
|
3340
3340
|
/* @__PURE__ */ jsxs("linearGradient", {
|
|
@@ -3419,7 +3419,7 @@ var $2 = {
|
|
|
3419
3419
|
d: e28.bodyPath,
|
|
3420
3420
|
fill: "none",
|
|
3421
3421
|
stroke: "black",
|
|
3422
|
-
strokeOpacity:
|
|
3422
|
+
strokeOpacity: ee7,
|
|
3423
3423
|
strokeWidth: S17,
|
|
3424
3424
|
vectorEffect: "non-scaling-stroke",
|
|
3425
3425
|
style: { pointerEvents: "none" }
|
|
@@ -3434,56 +3434,56 @@ function Vt(e28) {
|
|
|
3434
3434
|
return e28.as ? e28.as : e28.href ? "a" : e28.onClick ? "button" : "span";
|
|
3435
3435
|
}
|
|
3436
3436
|
var Ht = forwardRef(function(c42, d33) {
|
|
3437
|
-
let { shape: h25 = "pill", status: g22 = "neutral", stance: _21, tone: v19, variant: y18 = "outline", size:
|
|
3438
|
-
...
|
|
3437
|
+
let { shape: h25 = "pill", status: g22 = "neutral", stance: _21, tone: v19, variant: y18 = "outline", size: b17 = "sm", onClick: x18, onRemove: C14, removeLabel: w13, href: T13, children: E12, className: D12, shapeParams: O12, bloat: k12, padding: A11, style: j11, breakStyle: M12, crawl: N11, base: P10, baseParams: ee7, effects: te6, tooltip: F11, as: ne6, "aria-label": re6, onFocus: ie6, onBlur: ae6, ...oe6 } = c42, se5 = Vt(c42), ce5 = F11 != null && se5 === "span", le5 = re6 ?? (ce5 && (typeof E12 == "string" || typeof E12 == "number") ? String(E12) : void 0), [ue5, de5] = useState(false), [I9, fe5] = useState(0), L9 = xe2[h25] ?? xe2.pill, pe5 = xe2[h25] ? h25 : "pill", me5 = L9.Component, he5 = {
|
|
3438
|
+
...L9.defaults ?? {},
|
|
3439
3439
|
...O12 ?? {}
|
|
3440
|
-
},
|
|
3441
|
-
let t40 = typeof N11 == "number" ? N11 : 0.2, n45 =
|
|
3442
|
-
|
|
3440
|
+
}, R8 = useRef(null), z7 = useVisibleRaf((e28) => {
|
|
3441
|
+
let t40 = typeof N11 == "number" ? N11 : 0.2, n45 = R8.current;
|
|
3442
|
+
R8.current = e28, n45 !== null && fe5((r48) => (r48 + t40 * (e28 - n45) / 1e3) % 1), z7.request();
|
|
3443
3443
|
}, { onResume: () => {
|
|
3444
|
-
|
|
3444
|
+
R8.current = null;
|
|
3445
3445
|
} });
|
|
3446
3446
|
useEffect(() => {
|
|
3447
3447
|
if (!N11) {
|
|
3448
|
-
|
|
3448
|
+
fe5(0);
|
|
3449
3449
|
return;
|
|
3450
3450
|
}
|
|
3451
|
-
return
|
|
3452
|
-
}, [N11,
|
|
3453
|
-
let
|
|
3451
|
+
return R8.current = null, z7.request(), () => z7.cancel();
|
|
3452
|
+
}, [N11, z7]);
|
|
3453
|
+
let ge4 = [m3.badge, D12].filter(Boolean).join(" "), B6 = n7({
|
|
3454
3454
|
stance: _21,
|
|
3455
3455
|
tone: v19
|
|
3456
|
-
}),
|
|
3457
|
-
...
|
|
3458
|
-
...
|
|
3459
|
-
} : null,
|
|
3456
|
+
}), _e4 = !P10 && L9.compose ? L9.compose(he5) : null, V6 = P10 ?? _e4?.base, H6 = V6 ? nt[V6] : null, ve3 = P10 ? ee7 : _e4?.baseParams, ye3 = P10 ? te6 : _e4?.effects ?? te6, U6 = H6 ? {
|
|
3457
|
+
...H6.defaults ?? {},
|
|
3458
|
+
...ve3 ?? {}
|
|
3459
|
+
} : null, be3 = useRef(null), W7 = S2(be3, H6), G7 = H6 ? H6.build(U6, W7.w, W7.h) : null, K7 = H6 ? (typeof H6.insets == "function" ? H6.insets(U6) : H6.insets) ?? {
|
|
3460
3460
|
top: 0,
|
|
3461
3461
|
right: 0,
|
|
3462
3462
|
bottom: 0,
|
|
3463
3463
|
left: 0
|
|
3464
|
-
} : typeof
|
|
3465
|
-
...
|
|
3466
|
-
"--badge-inset-top": `${
|
|
3467
|
-
"--badge-inset-right": `${
|
|
3468
|
-
"--badge-inset-bottom": `${
|
|
3469
|
-
"--badge-inset-left": `${
|
|
3464
|
+
} : typeof L9.insets == "function" ? L9.insets(he5) : L9.insets, Se3 = {
|
|
3465
|
+
...B6.style,
|
|
3466
|
+
"--badge-inset-top": `${K7.top}px`,
|
|
3467
|
+
"--badge-inset-right": `${K7.right}px`,
|
|
3468
|
+
"--badge-inset-bottom": `${K7.bottom}px`,
|
|
3469
|
+
"--badge-inset-left": `${K7.left}px`,
|
|
3470
3470
|
...A11 !== void 0 && { padding: typeof A11 == "number" ? `${A11}px` : A11 },
|
|
3471
3471
|
...M12 !== void 0 && {
|
|
3472
3472
|
boxDecorationBreak: M12,
|
|
3473
3473
|
WebkitBoxDecorationBreak: M12
|
|
3474
3474
|
},
|
|
3475
3475
|
...j11
|
|
3476
|
-
},
|
|
3476
|
+
}, Ce3 = {
|
|
3477
3477
|
...oe6,
|
|
3478
3478
|
...ce5 && oe6.role === void 0 && { role: "img" },
|
|
3479
|
-
className:
|
|
3480
|
-
style:
|
|
3481
|
-
"data-shape":
|
|
3479
|
+
className: ge4,
|
|
3480
|
+
style: Se3,
|
|
3481
|
+
"data-shape": H6 ? "compose" : pe5,
|
|
3482
3482
|
"data-status": g22,
|
|
3483
|
-
"data-stance":
|
|
3484
|
-
"data-tone":
|
|
3483
|
+
"data-stance": B6["data-stance"],
|
|
3484
|
+
"data-tone": B6["data-tone"],
|
|
3485
3485
|
"data-variant": y18,
|
|
3486
|
-
"data-size":
|
|
3486
|
+
"data-size": b17,
|
|
3487
3487
|
"data-focused": ue5 ? "true" : void 0,
|
|
3488
3488
|
onFocus: (e28) => {
|
|
3489
3489
|
de5(true), ie6?.(e28);
|
|
@@ -3492,9 +3492,9 @@ var Ht = forwardRef(function(c42, d33) {
|
|
|
3492
3492
|
de5(false), ae6?.(e28);
|
|
3493
3493
|
},
|
|
3494
3494
|
"aria-label": le5
|
|
3495
|
-
},
|
|
3496
|
-
if (!
|
|
3497
|
-
let e28 = (
|
|
3495
|
+
}, q7 = (() => {
|
|
3496
|
+
if (!H6 || !G7) return null;
|
|
3497
|
+
let e28 = (ye3 ?? []).map((e29) => {
|
|
3498
3498
|
let t41 = $2[e29.type];
|
|
3499
3499
|
if (!t41?.offsetAt) return null;
|
|
3500
3500
|
let n46 = {
|
|
@@ -3506,15 +3506,15 @@ var Ht = forwardRef(function(c42, d33) {
|
|
|
3506
3506
|
params: n46
|
|
3507
3507
|
};
|
|
3508
3508
|
}).filter(Boolean), t40 = k12 ?? 0;
|
|
3509
|
-
if (e28.length === 0 && t40 === 0) return
|
|
3510
|
-
let n45 = 100 /
|
|
3511
|
-
let o50 = (a55 % i53 + i53) % i53, s44 =
|
|
3509
|
+
if (e28.length === 0 && t40 === 0) return G7;
|
|
3510
|
+
let n45 = 100 / W7.w, r48 = 100 / W7.h, i53 = G7.totalCss, a54 = (a55) => {
|
|
3511
|
+
let o50 = (a55 % i53 + i53) % i53, s44 = G7.perimeterAt(o50), c43 = s44.nx * t40, l40 = s44.ny * t40;
|
|
3512
3512
|
for (let t41 of e28) {
|
|
3513
3513
|
let e29 = t41.offsetAt(o50, {
|
|
3514
3514
|
params: t41.params,
|
|
3515
|
-
phase:
|
|
3515
|
+
phase: I9,
|
|
3516
3516
|
totalCss: i53,
|
|
3517
|
-
perimeterAt:
|
|
3517
|
+
perimeterAt: G7.perimeterAt
|
|
3518
3518
|
});
|
|
3519
3519
|
c43 += e29.dx, l40 += e29.dy;
|
|
3520
3520
|
}
|
|
@@ -3530,7 +3530,7 @@ var Ht = forwardRef(function(c42, d33) {
|
|
|
3530
3530
|
return o49 += " Z", {
|
|
3531
3531
|
bodyPath: o49,
|
|
3532
3532
|
perimeterAt: (e29) => {
|
|
3533
|
-
let t41 = (e29 % i53 + i53) % i53, o50 = a54(t41), s44 = i53 /
|
|
3533
|
+
let t41 = (e29 % i53 + i53) % i53, o50 = a54(t41), s44 = i53 / 1200, c43 = a54(t41 - s44), l40 = a54(t41 + s44), u37 = (l40.x - c43.x) / n45, d34 = (l40.y - c43.y) / r48, f30 = Math.hypot(u37, d34) || 1, p26 = d34 / f30, m26 = -u37 / f30;
|
|
3534
3534
|
return {
|
|
3535
3535
|
x: o50.x,
|
|
3536
3536
|
y: o50.y,
|
|
@@ -3540,30 +3540,30 @@ var Ht = forwardRef(function(c42, d33) {
|
|
|
3540
3540
|
},
|
|
3541
3541
|
totalCss: i53
|
|
3542
3542
|
};
|
|
3543
|
-
})(),
|
|
3543
|
+
})(), J7 = (ye3 ?? []).filter((e28) => $2[e28.type]?.Component), we3 = J7.filter((e28) => ($2[e28.type].zone ?? "foreground") === "background"), Te3 = J7.filter((e28) => ($2[e28.type].zone ?? "foreground") === "foreground"), Y7 = J7.filter((e28) => $2[e28.type].zone === "mask"), X7 = `badge-mask-${useId().replace(/:/g, "")}`, Ee3 = (e28, t40) => {
|
|
3544
3544
|
let n45 = $2[e28.type], r48 = n45?.Component;
|
|
3545
|
-
if (!r48 || !
|
|
3545
|
+
if (!r48 || !q7) return null;
|
|
3546
3546
|
let i53 = {
|
|
3547
3547
|
...n45.defaults ?? {},
|
|
3548
3548
|
...e28.params ?? {}
|
|
3549
3549
|
};
|
|
3550
3550
|
return /* @__PURE__ */ jsx(r48, {
|
|
3551
|
-
sampler:
|
|
3552
|
-
boxW:
|
|
3553
|
-
boxH:
|
|
3551
|
+
sampler: q7,
|
|
3552
|
+
boxW: W7.w,
|
|
3553
|
+
boxH: W7.h,
|
|
3554
3554
|
variant: y18,
|
|
3555
3555
|
params: i53,
|
|
3556
|
-
phase:
|
|
3556
|
+
phase: I9
|
|
3557
3557
|
}, `${e28.type}-${t40}`);
|
|
3558
|
-
},
|
|
3559
|
-
ref:
|
|
3558
|
+
}, De3 = H6 && q7 ? /* @__PURE__ */ jsxs("svg", {
|
|
3559
|
+
ref: be3,
|
|
3560
3560
|
className: m3.deco,
|
|
3561
3561
|
viewBox: "0 0 100 100",
|
|
3562
3562
|
preserveAspectRatio: "none",
|
|
3563
3563
|
"aria-hidden": "true",
|
|
3564
3564
|
children: [
|
|
3565
|
-
|
|
3566
|
-
id:
|
|
3565
|
+
Y7.length > 0 && /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("mask", {
|
|
3566
|
+
id: X7,
|
|
3567
3567
|
maskUnits: "userSpaceOnUse",
|
|
3568
3568
|
x: "-10",
|
|
3569
3569
|
y: "-10",
|
|
@@ -3575,33 +3575,33 @@ var Ht = forwardRef(function(c42, d33) {
|
|
|
3575
3575
|
width: "120",
|
|
3576
3576
|
height: "120",
|
|
3577
3577
|
fill: "white"
|
|
3578
|
-
}),
|
|
3578
|
+
}), Y7.map(Ee3)]
|
|
3579
3579
|
}) }),
|
|
3580
|
-
|
|
3580
|
+
we3.map(Ee3),
|
|
3581
3581
|
/* @__PURE__ */ jsxs("g", {
|
|
3582
|
-
...
|
|
3582
|
+
...Y7.length > 0 ? { mask: `url(#${X7})` } : {},
|
|
3583
3583
|
children: [(y18 === "solid" || y18 === "subtle") && /* @__PURE__ */ jsx("path", {
|
|
3584
3584
|
className: "badge-fill",
|
|
3585
|
-
d:
|
|
3585
|
+
d: q7.bodyPath
|
|
3586
3586
|
}), (y18 === "outline" || y18 === "solid") && /* @__PURE__ */ jsx("path", {
|
|
3587
3587
|
className: "badge-stroke",
|
|
3588
|
-
d:
|
|
3588
|
+
d: q7.bodyPath
|
|
3589
3589
|
})]
|
|
3590
3590
|
}),
|
|
3591
|
-
|
|
3591
|
+
Te3.map(Ee3)
|
|
3592
3592
|
]
|
|
3593
|
-
}) :
|
|
3593
|
+
}) : L9.renderMode !== "css" && me5 ? /* @__PURE__ */ jsx("svg", {
|
|
3594
3594
|
className: m3.deco,
|
|
3595
3595
|
viewBox: "0 0 100 100",
|
|
3596
|
-
preserveAspectRatio:
|
|
3596
|
+
preserveAspectRatio: L9.stretches === false ? "xMidYMid meet" : "none",
|
|
3597
3597
|
"aria-hidden": "true",
|
|
3598
|
-
children: /* @__PURE__ */ jsx(
|
|
3598
|
+
children: /* @__PURE__ */ jsx(me5, {
|
|
3599
3599
|
variant: y18,
|
|
3600
3600
|
focused: ue5,
|
|
3601
|
-
params:
|
|
3602
|
-
phase:
|
|
3601
|
+
params: he5,
|
|
3602
|
+
phase: I9
|
|
3603
3603
|
})
|
|
3604
|
-
}) : null, /* @__PURE__ */ jsxs("span", {
|
|
3604
|
+
}) : null, Oe3 = /* @__PURE__ */ jsxs(Fragment, { children: [De3, /* @__PURE__ */ jsxs("span", {
|
|
3605
3605
|
className: m3.content,
|
|
3606
3606
|
children: [/* @__PURE__ */ jsx("span", { children: E12 }), C14 && /* @__PURE__ */ jsx("button", {
|
|
3607
3607
|
type: "button",
|
|
@@ -3625,24 +3625,24 @@ var Ht = forwardRef(function(c42, d33) {
|
|
|
3625
3625
|
})
|
|
3626
3626
|
})
|
|
3627
3627
|
})]
|
|
3628
|
-
})] }),
|
|
3629
|
-
return
|
|
3628
|
+
})] }), ke3;
|
|
3629
|
+
return ke3 = se5 === "button" ? /* @__PURE__ */ jsx("button", {
|
|
3630
3630
|
type: "button",
|
|
3631
|
-
...
|
|
3631
|
+
...Ce3,
|
|
3632
3632
|
ref: d33,
|
|
3633
3633
|
onClick: x18,
|
|
3634
|
-
children:
|
|
3634
|
+
children: Oe3
|
|
3635
3635
|
}) : se5 === "a" ? /* @__PURE__ */ jsx("a", {
|
|
3636
3636
|
href: T13,
|
|
3637
|
-
...
|
|
3637
|
+
...Ce3,
|
|
3638
3638
|
ref: d33,
|
|
3639
3639
|
onClick: x18,
|
|
3640
|
-
children:
|
|
3640
|
+
children: Oe3
|
|
3641
3641
|
}) : /* @__PURE__ */ jsx("span", {
|
|
3642
|
-
...
|
|
3642
|
+
...Ce3,
|
|
3643
3643
|
ref: d33,
|
|
3644
|
-
children:
|
|
3645
|
-
}), F11 == null ?
|
|
3644
|
+
children: Oe3
|
|
3645
|
+
}), F11 == null ? ke3 : /* @__PURE__ */ jsxs(l3, { children: [/* @__PURE__ */ jsx(Focusable, { children: ke3 }), /* @__PURE__ */ jsx(u2, { children: F11 })] });
|
|
3646
3646
|
});
|
|
3647
3647
|
function a8(e28) {
|
|
3648
3648
|
if (e28.tooltip !== void 0) return e28.tooltip;
|
|
@@ -3709,16 +3709,16 @@ function s7() {
|
|
|
3709
3709
|
});
|
|
3710
3710
|
}
|
|
3711
3711
|
var c7 = forwardRef(function(a54, c42) {
|
|
3712
|
-
let { variant: l40 = "secondary", size: u37 = "md", status: d33, stance: f30, tone: p26, pressed: m26, disabled: h25, loading: g22, leadingIcon: _21, trailingIcon: v19, fullWidth: y18, iconOnly:
|
|
3712
|
+
let { variant: l40 = "secondary", size: u37 = "md", status: d33, stance: f30, tone: p26, pressed: m26, disabled: h25, loading: g22, leadingIcon: _21, trailingIcon: v19, fullWidth: y18, iconOnly: b17, ariaLabel: x18, type: S17 = "button", className: C14, style: w13, children: T13, onClick: E12, shortcut: D12, tooltip: O12 } = a54, k12 = [
|
|
3713
3713
|
o8.button,
|
|
3714
3714
|
o8[`variant_${l40}`],
|
|
3715
3715
|
o8[`size_${u37}`],
|
|
3716
3716
|
y18 && o8.fullWidth,
|
|
3717
3717
|
m26 && o8.pressed,
|
|
3718
|
-
|
|
3718
|
+
b17 && o8.iconOnly,
|
|
3719
3719
|
g22 && o8.loading,
|
|
3720
3720
|
C14
|
|
3721
|
-
].filter(Boolean).join(" "), A11 = !
|
|
3721
|
+
].filter(Boolean).join(" "), A11 = !b17 && (g22 || _21), j11 = n7({
|
|
3722
3722
|
stance: f30,
|
|
3723
3723
|
tone: p26
|
|
3724
3724
|
});
|
|
@@ -3751,14 +3751,14 @@ var c7 = forwardRef(function(a54, c42) {
|
|
|
3751
3751
|
className: o8.iconSlot,
|
|
3752
3752
|
children: g22 ? /* @__PURE__ */ jsx(s7, {}) : _21
|
|
3753
3753
|
}),
|
|
3754
|
-
|
|
3754
|
+
b17 ? g22 ? /* @__PURE__ */ jsx(s7, {}) : /* @__PURE__ */ jsx("span", {
|
|
3755
3755
|
className: o8.iconSlot,
|
|
3756
3756
|
children: T13
|
|
3757
3757
|
}) : T13 !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
3758
3758
|
className: o8.label,
|
|
3759
3759
|
children: T13
|
|
3760
3760
|
}),
|
|
3761
|
-
!
|
|
3761
|
+
!b17 && v19 && /* @__PURE__ */ jsx("span", {
|
|
3762
3762
|
className: o8.iconSlot,
|
|
3763
3763
|
children: v19
|
|
3764
3764
|
})
|
|
@@ -3767,7 +3767,7 @@ var c7 = forwardRef(function(a54, c42) {
|
|
|
3767
3767
|
});
|
|
3768
3768
|
});
|
|
3769
3769
|
|
|
3770
|
-
// ../ui/dist/chunks/interactiveTarget-
|
|
3770
|
+
// ../ui/dist/chunks/interactiveTarget-BNZmTow2.js
|
|
3771
3771
|
var e6 = [
|
|
3772
3772
|
"button",
|
|
3773
3773
|
"input",
|
|
@@ -3843,7 +3843,7 @@ function u5(u37) {
|
|
|
3843
3843
|
p26.current = e28;
|
|
3844
3844
|
}, []), y18 = useCallback(() => {
|
|
3845
3845
|
m26.current = null, g22(o9);
|
|
3846
|
-
}, []),
|
|
3846
|
+
}, []), b17 = useCallback((n45, r48, i53) => {
|
|
3847
3847
|
let a54 = p26.current;
|
|
3848
3848
|
if (!a54 || m26.current || t8(i53.target, i53.currentTarget)) return;
|
|
3849
3849
|
let o49 = {
|
|
@@ -3851,13 +3851,13 @@ function u5(u37) {
|
|
|
3851
3851
|
ctrlKey: i53.ctrlKey,
|
|
3852
3852
|
metaKey: i53.metaKey,
|
|
3853
3853
|
altKey: i53.altKey
|
|
3854
|
-
}, s44 = [], u38 = 0, h26 = i53.currentTarget, v20 = (Array.from(a54.children).find((e28) => e28.contains(h26)) ?? h26).getBoundingClientRect(),
|
|
3854
|
+
}, s44 = [], u38 = 0, h26 = i53.currentTarget, v20 = (Array.from(a54.children).find((e28) => e28.contains(h26)) ?? h26).getBoundingClientRect(), b18 = {
|
|
3855
3855
|
x: i53.clientX - v20.left,
|
|
3856
3856
|
y: i53.clientY - v20.top
|
|
3857
3857
|
}, x18 = (e28) => ({
|
|
3858
3858
|
ids: s44,
|
|
3859
|
-
left: e28.clientX -
|
|
3860
|
-
top: e28.clientY -
|
|
3859
|
+
left: e28.clientX - b18.x,
|
|
3860
|
+
top: e28.clientY - b18.y,
|
|
3861
3861
|
width: v20.width
|
|
3862
3862
|
});
|
|
3863
3863
|
m26.current = startThresholdDrag(i53, {
|
|
@@ -3897,7 +3897,7 @@ function u5(u37) {
|
|
|
3897
3897
|
let [m27, h26] = s8(r48, t40), g23 = n45 < 0 ? d33 - 1 : p27 + 2;
|
|
3898
3898
|
return g23 < m27 || g23 > h26 || l6(r48, o49, g23) ? false : (a54(o49, g23), true);
|
|
3899
3899
|
}, []),
|
|
3900
|
-
rowProps: (e28, t40) => ({ onPointerDown: (n45) =>
|
|
3900
|
+
rowProps: (e28, t40) => ({ onPointerDown: (n45) => b17(e28, t40, n45) }),
|
|
3901
3901
|
containerProps: { ref: v19 },
|
|
3902
3902
|
state: h25
|
|
3903
3903
|
};
|
|
@@ -3983,7 +3983,7 @@ function d5(e28) {
|
|
|
3983
3983
|
return !!t40 && e28.currentTarget.contains(t40);
|
|
3984
3984
|
}
|
|
3985
3985
|
function f4(u37) {
|
|
3986
|
-
let { rows: f30, columns: p26, defaultSort: m26, onReorder: h25, empty: g22 = "\u2014", className: _21, rowClassName: v19, onRowClick: y18, renderDetail:
|
|
3986
|
+
let { rows: f30, columns: p26, defaultSort: m26, onReorder: h25, empty: g22 = "\u2014", className: _21, rowClassName: v19, onRowClick: y18, renderDetail: b17, rowExpandable: x18, expandedIds: S17, defaultExpandedIds: C14, onExpandedChange: w13 } = u37, [T13, E12] = useState(m26 ?? null), [D12, O12] = useState(() => new Set(C14)), k12 = S17 ?? D12, A11 = useId(), j11 = (e28) => {
|
|
3987
3987
|
let t40 = new Set(k12);
|
|
3988
3988
|
t40.has(e28) ? t40.delete(e28) : t40.add(e28), S17 || O12(t40), w13?.(t40);
|
|
3989
3989
|
}, M12 = useMemo(() => {
|
|
@@ -4016,9 +4016,9 @@ function f4(u37) {
|
|
|
4016
4016
|
onReorder: h25 ?? (() => {
|
|
4017
4017
|
}),
|
|
4018
4018
|
rowSelector: ":not([data-detail-of])"
|
|
4019
|
-
}), F11 = !!h25, I9 = !!
|
|
4019
|
+
}), F11 = !!h25, I9 = !!b17, L9 = p26.length + +!!F11 + +!!I9, R8 = [l7.grid, _21].filter(Boolean).join(" ");
|
|
4020
4020
|
return /* @__PURE__ */ jsx("div", {
|
|
4021
|
-
className:
|
|
4021
|
+
className: R8,
|
|
4022
4022
|
children: /* @__PURE__ */ jsxs("table", {
|
|
4023
4023
|
className: l7.table,
|
|
4024
4024
|
children: [/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
@@ -4050,15 +4050,15 @@ function f4(u37) {
|
|
|
4050
4050
|
className: l7.empty,
|
|
4051
4051
|
children: g22
|
|
4052
4052
|
}) }), M12.map((e28, n45) => {
|
|
4053
|
-
let o49 = P10.state.draggedIds?.includes(e28.id) ?? false, s44 = P10.state.targetIndex, c42 = I9 && (x18?.(e28) ?? true), u38 = c42 && k12.has(e28.id), f31 = u38 ?
|
|
4053
|
+
let o49 = P10.state.draggedIds?.includes(e28.id) ?? false, s44 = P10.state.targetIndex, c42 = I9 && (x18?.(e28) ?? true), u38 = c42 && k12.has(e28.id), f31 = u38 ? b17(e28) : null, m27 = `${A11}-detail-${e28.id}`, h26 = [
|
|
4054
|
+
y18 && l7.clickable,
|
|
4055
|
+
o49 && l7.dragging,
|
|
4056
|
+
s44 === n45 && l7.dropBefore,
|
|
4057
|
+
s44 === M12.length && n45 === M12.length - 1 && l7.dropAfter,
|
|
4058
|
+
v19?.(e28)
|
|
4059
|
+
].filter(Boolean).join(" ");
|
|
4054
4060
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("tr", {
|
|
4055
|
-
className:
|
|
4056
|
-
y18 && l7.clickable,
|
|
4057
|
-
o49 && l7.dragging,
|
|
4058
|
-
s44 === n45 && l7.dropBefore,
|
|
4059
|
-
s44 === M12.length && n45 === M12.length - 1 && l7.dropAfter,
|
|
4060
|
-
v19?.(e28)
|
|
4061
|
-
].filter(Boolean).join(" ") || void 0,
|
|
4061
|
+
className: h26 || void 0,
|
|
4062
4062
|
"data-expanded": u38 || void 0,
|
|
4063
4063
|
tabIndex: y18 ? 0 : void 0,
|
|
4064
4064
|
onClick: y18 ? (t40) => {
|
|
@@ -4658,7 +4658,7 @@ function C3(e28, t40, n45, r48, i53) {
|
|
|
4658
4658
|
}));
|
|
4659
4659
|
}
|
|
4660
4660
|
var w3 = forwardRef(function(r48, p26) {
|
|
4661
|
-
let { width: m26, height: h25, xRange: g22 = [0, 1], yRange: _21 = [0, 1], grid: v19, axes:
|
|
4661
|
+
let { width: m26, height: h25, xRange: g22 = [0, 1], yRange: _21 = [0, 1], grid: v19, axes: b17, xTicks: x18, yTicks: w13, tabIndex: T13, role: E12 = "img", className: D12, style: O12, onPointerDown: k12, onKeyDown: A11, children: j11 } = r48, M12 = useRef(null), N11 = useMemo(() => ({
|
|
4662
4662
|
xMin: g22[0],
|
|
4663
4663
|
xMax: g22[1],
|
|
4664
4664
|
yMin: _21[0],
|
|
@@ -4697,10 +4697,10 @@ var w3 = forwardRef(function(r48, p26) {
|
|
|
4697
4697
|
]);
|
|
4698
4698
|
let I9 = useCallback((e28) => {
|
|
4699
4699
|
if (!k12) return;
|
|
4700
|
-
let t40 = F11(e28);
|
|
4700
|
+
let t40 = F11(e28), n45 = f6(t40, N11, P10);
|
|
4701
4701
|
k12(e28, {
|
|
4702
4702
|
plot: t40,
|
|
4703
|
-
model:
|
|
4703
|
+
model: n45
|
|
4704
4704
|
});
|
|
4705
4705
|
}, [
|
|
4706
4706
|
k12,
|
|
@@ -4713,7 +4713,7 @@ var w3 = forwardRef(function(r48, p26) {
|
|
|
4713
4713
|
}, N11, P10).x) : [], R8 = w13 ? C3(w13, "y", _21, h25, (e28) => d7({
|
|
4714
4714
|
x: g22[0],
|
|
4715
4715
|
y: e28
|
|
4716
|
-
}, N11, P10).y) : [], z7 = !!w13 && (w13.labels ?? "inside") === "inside", B6 = useRef(null), [V6, H6] = useState(0);
|
|
4716
|
+
}, N11, P10).y) : [], z7 = !!w13 && (w13.labels ?? "inside") === "inside", B6 = useRef(null), [V6, H6] = useState(0), U6 = z7 ? R8.map((e28) => e28.label).join("\n") : "";
|
|
4717
4717
|
useLayoutEffect(() => {
|
|
4718
4718
|
if (!z7) return;
|
|
4719
4719
|
let e28 = () => {
|
|
@@ -4728,8 +4728,8 @@ var w3 = forwardRef(function(r48, p26) {
|
|
|
4728
4728
|
}), () => {
|
|
4729
4729
|
t40 = false;
|
|
4730
4730
|
};
|
|
4731
|
-
}, [z7,
|
|
4732
|
-
let
|
|
4731
|
+
}, [z7, U6]);
|
|
4732
|
+
let W7 = [y3.root, D12].filter(Boolean).join(" "), G7 = (e28, n45, r49) => !r49 || r49.lines === false || n45.length === 0 ? null : /* @__PURE__ */ jsx("g", { children: n45.map((n46) => /* @__PURE__ */ jsx("line", {
|
|
4733
4733
|
"data-plot-element": "tick",
|
|
4734
4734
|
"data-axis": e28,
|
|
4735
4735
|
className: y3.tick,
|
|
@@ -4744,7 +4744,7 @@ var w3 = forwardRef(function(r48, p26) {
|
|
|
4744
4744
|
y1: n46.at,
|
|
4745
4745
|
y2: n46.at
|
|
4746
4746
|
}
|
|
4747
|
-
}, `t${e28}-${n46.value}`)) }),
|
|
4747
|
+
}, `t${e28}-${n46.value}`)) }), K7 = (e28, n45, r49) => {
|
|
4748
4748
|
if (!r49 || n45.length === 0) return null;
|
|
4749
4749
|
let i53 = r49.labels ?? "inside";
|
|
4750
4750
|
if (i53 === false) return null;
|
|
@@ -4787,7 +4787,7 @@ var w3 = forwardRef(function(r48, p26) {
|
|
|
4787
4787
|
};
|
|
4788
4788
|
return /* @__PURE__ */ jsxs("svg", {
|
|
4789
4789
|
ref: M12,
|
|
4790
|
-
className:
|
|
4790
|
+
className: W7,
|
|
4791
4791
|
style: O12,
|
|
4792
4792
|
width: m26,
|
|
4793
4793
|
height: h25,
|
|
@@ -4819,10 +4819,10 @@ var w3 = forwardRef(function(r48, p26) {
|
|
|
4819
4819
|
y2: e29 * h25
|
|
4820
4820
|
}, `gy-${e29}`))] });
|
|
4821
4821
|
})(),
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
let e28 =
|
|
4822
|
+
G7("x", L9, x18),
|
|
4823
|
+
G7("y", R8, w13),
|
|
4824
|
+
b17 !== false && b17 !== null && (() => {
|
|
4825
|
+
let e28 = b17?.color;
|
|
4826
4826
|
return /* @__PURE__ */ jsxs("g", { children: [/* @__PURE__ */ jsx("line", {
|
|
4827
4827
|
"data-plot-element": "axis",
|
|
4828
4828
|
className: y3.axis,
|
|
@@ -4841,14 +4841,14 @@ var w3 = forwardRef(function(r48, p26) {
|
|
|
4841
4841
|
y2: h25
|
|
4842
4842
|
})] });
|
|
4843
4843
|
})(),
|
|
4844
|
-
|
|
4845
|
-
|
|
4844
|
+
K7("x", L9, x18),
|
|
4845
|
+
K7("y", R8, w13),
|
|
4846
4846
|
j11
|
|
4847
4847
|
]
|
|
4848
4848
|
});
|
|
4849
4849
|
});
|
|
4850
4850
|
|
|
4851
|
-
// ../ui/dist/chunks/snap-
|
|
4851
|
+
// ../ui/dist/chunks/snap-DRjbOiG9.js
|
|
4852
4852
|
function e10(e28, t40, n45) {
|
|
4853
4853
|
let r48 = e28, i53 = n45;
|
|
4854
4854
|
for (let n46 of t40) {
|
|
@@ -4879,10 +4879,10 @@ function v5(e28, t40, n45) {
|
|
|
4879
4879
|
m26 < 0 ? m26 = 0 : m26 > 1 && (m26 = 1);
|
|
4880
4880
|
let h25 = s44.x + m26 * l40, g22 = s44.y + m26 * u37, _21 = h25 - t40.x, v19 = g22 - t40.y, y18 = _21 * _21 + v19 * v19;
|
|
4881
4881
|
if (y18 > r48) continue;
|
|
4882
|
-
let
|
|
4882
|
+
let b17 = (e29 + m26) / o49;
|
|
4883
4883
|
(i53 === null || y18 < i53.d2) && (i53 = {
|
|
4884
4884
|
segIdx: n46,
|
|
4885
|
-
t:
|
|
4885
|
+
t: b17,
|
|
4886
4886
|
d2: y18
|
|
4887
4887
|
});
|
|
4888
4888
|
}
|
|
@@ -4929,7 +4929,7 @@ function w4(e28) {
|
|
|
4929
4929
|
};
|
|
4930
4930
|
}
|
|
4931
4931
|
function T3(i53) {
|
|
4932
|
-
let { layers: a54, onLayerChange: s44, onLayerCommit: c42, width: g22, height: _21, xRange: v19 = [0, 1], yRange: y18 = [0, 1], grid:
|
|
4932
|
+
let { layers: a54, onLayerChange: s44, onLayerCommit: c42, width: g22, height: _21, xRange: v19 = [0, 1], yRange: y18 = [0, 1], grid: b17, axes: x18, xTicks: T13, yTicks: E12, className: D12, style: O12, children: k12 } = i53, A11 = i53.history !== false, j11 = useMemo(() => ({
|
|
4933
4933
|
xMin: v19[0],
|
|
4934
4934
|
xMax: v19[1],
|
|
4935
4935
|
yMin: y18[0],
|
|
@@ -4983,7 +4983,7 @@ function T3(i53) {
|
|
|
4983
4983
|
U6,
|
|
4984
4984
|
W7
|
|
4985
4985
|
]), q7 = useRef(() => {
|
|
4986
|
-
}),
|
|
4986
|
+
}), J7 = useRef(() => {
|
|
4987
4987
|
}), Y7 = useRef(() => {
|
|
4988
4988
|
}), X7 = useRef(null), Z7 = useCallback(() => {
|
|
4989
4989
|
X7.current = null, R8.current = null, B6(null);
|
|
@@ -4999,7 +4999,7 @@ function T3(i53) {
|
|
|
4999
4999
|
if (i54 === void 0) return;
|
|
5000
5000
|
let a55 = L9(w4(e28)), o49 = t40.gesture.onMove(i54, r48, e28, a55);
|
|
5001
5001
|
o49 !== i54 && s44(t40.layerId, o49);
|
|
5002
|
-
},
|
|
5002
|
+
}, J7.current = (e28) => {
|
|
5003
5003
|
let t40 = R8.current;
|
|
5004
5004
|
if (!t40) return;
|
|
5005
5005
|
let n45 = Q6(t40.layerId);
|
|
@@ -5021,68 +5021,68 @@ function T3(i53) {
|
|
|
5021
5021
|
r48 !== t40 && s44(e28.layerId, r48), Z7();
|
|
5022
5022
|
};
|
|
5023
5023
|
let $6 = useCallback((e28, t40, n45) => {
|
|
5024
|
-
let r48 = U6();
|
|
5024
|
+
let r48 = U6(), i54 = r48.get(e28);
|
|
5025
5025
|
R8.current = {
|
|
5026
5026
|
layerId: e28,
|
|
5027
5027
|
gesture: n45,
|
|
5028
5028
|
startStates: r48,
|
|
5029
|
-
startSelfState:
|
|
5029
|
+
startSelfState: i54
|
|
5030
5030
|
}, B6(e28), X7.current = openPointerSession(t40.currentTarget, t40, {
|
|
5031
5031
|
onMove: (e29) => q7.current(e29),
|
|
5032
|
-
onEnd: (e29) =>
|
|
5032
|
+
onEnd: (e29) => J7.current(e29),
|
|
5033
5033
|
onCancel: () => Y7.current()
|
|
5034
5034
|
}, { capture: false });
|
|
5035
|
-
}, [U6]),
|
|
5035
|
+
}, [U6]), ee7 = useCallback((t40, n45) => {
|
|
5036
5036
|
if (R8.current) return;
|
|
5037
|
-
let r48 =
|
|
5037
|
+
let r48 = w4(t40), i54 = L9(r48), a55 = N11.current, o49 = t40.nativeEvent;
|
|
5038
5038
|
a("layered-curve-editor", "pointerdown", {
|
|
5039
5039
|
plot: n45.plot,
|
|
5040
5040
|
model: n45.model,
|
|
5041
|
-
layers:
|
|
5041
|
+
layers: a55.length
|
|
5042
5042
|
});
|
|
5043
|
-
let
|
|
5044
|
-
for (let e28 =
|
|
5045
|
-
let
|
|
5046
|
-
if (!
|
|
5047
|
-
let d33 =
|
|
5043
|
+
let l40 = U6();
|
|
5044
|
+
for (let e28 = a55.length - 1; e28 >= 0; e28--) {
|
|
5045
|
+
let r49 = a55[e28], u38 = r49.layer.hitTest?.(r49.state, n45.plot, i54);
|
|
5046
|
+
if (!u38) continue;
|
|
5047
|
+
let d33 = r49.state, f30, p26 = r49.layer.onPointerDown?.(d33, u38, o49, i54, {
|
|
5048
5048
|
plot: n45.plot,
|
|
5049
5049
|
model: n45.model,
|
|
5050
5050
|
commit(e29) {
|
|
5051
|
-
f30 = e29, s44(
|
|
5051
|
+
f30 = e29, s44(r49.layer.id, e29);
|
|
5052
5052
|
}
|
|
5053
5053
|
});
|
|
5054
5054
|
if (t40.stopPropagation(), p26) {
|
|
5055
|
-
$6(
|
|
5055
|
+
$6(r49.layer.id, t40, p26);
|
|
5056
5056
|
return;
|
|
5057
5057
|
}
|
|
5058
|
-
f30 !== void 0 && (A11 && (V6.current.push(
|
|
5058
|
+
f30 !== void 0 && (A11 && (V6.current.push(l40), H6.current = []), c42?.(r49.layer.id, f30, d33));
|
|
5059
5059
|
return;
|
|
5060
5060
|
}
|
|
5061
|
-
let
|
|
5062
|
-
for (let e28 =
|
|
5063
|
-
let
|
|
5064
|
-
if (!
|
|
5065
|
-
let
|
|
5061
|
+
let u37 = null;
|
|
5062
|
+
for (let e28 = a55.length - 1; e28 >= 0; e28--) {
|
|
5063
|
+
let r49 = a55[e28];
|
|
5064
|
+
if (!r49.layer.onEmptyPointerDown) continue;
|
|
5065
|
+
let c43 = r49.state, d33, f30 = r49.layer.onEmptyPointerDown(c43, n45.model, o49, i54, {
|
|
5066
5066
|
plot: n45.plot,
|
|
5067
5067
|
model: n45.model,
|
|
5068
5068
|
commit(e29) {
|
|
5069
|
-
d33 = e29, s44(
|
|
5069
|
+
d33 = e29, s44(r49.layer.id, e29);
|
|
5070
5070
|
}
|
|
5071
5071
|
});
|
|
5072
5072
|
if (f30) {
|
|
5073
|
-
$6(
|
|
5073
|
+
$6(r49.layer.id, t40, f30), d33 !== void 0 && R8.current !== null && (R8.current.startStates = l40, R8.current.startSelfState = l40.get(r49.layer.id));
|
|
5074
5074
|
return;
|
|
5075
5075
|
}
|
|
5076
5076
|
if (d33 !== void 0) {
|
|
5077
|
-
|
|
5078
|
-
id:
|
|
5077
|
+
u37 = {
|
|
5078
|
+
id: r49.layer.id,
|
|
5079
5079
|
next: d33,
|
|
5080
|
-
prev:
|
|
5080
|
+
prev: c43
|
|
5081
5081
|
};
|
|
5082
5082
|
break;
|
|
5083
5083
|
}
|
|
5084
5084
|
}
|
|
5085
|
-
|
|
5085
|
+
u37 && (A11 && (V6.current.push(l40), H6.current = []), c42?.(u37.id, u37.next, u37.prev));
|
|
5086
5086
|
}, [
|
|
5087
5087
|
L9,
|
|
5088
5088
|
$6,
|
|
@@ -5091,7 +5091,7 @@ function T3(i53) {
|
|
|
5091
5091
|
A11,
|
|
5092
5092
|
U6
|
|
5093
5093
|
]), te6 = useCallback((e28) => {
|
|
5094
|
-
let t40 =
|
|
5094
|
+
let t40 = w4(e28), n45 = L9(t40), r48 = N11.current;
|
|
5095
5095
|
if (A11 && (e28.metaKey || e28.ctrlKey)) {
|
|
5096
5096
|
let t41 = e28.key.toLowerCase();
|
|
5097
5097
|
if (t41 === "z") {
|
|
@@ -5103,11 +5103,11 @@ function T3(i53) {
|
|
|
5103
5103
|
return;
|
|
5104
5104
|
}
|
|
5105
5105
|
}
|
|
5106
|
-
for (let
|
|
5107
|
-
let i54 =
|
|
5106
|
+
for (let t41 = r48.length - 1; t41 >= 0; t41--) {
|
|
5107
|
+
let i54 = r48[t41];
|
|
5108
5108
|
if (!i54.layer.onKeyDown) continue;
|
|
5109
5109
|
let a55 = U6(), o49;
|
|
5110
|
-
if (i54.layer.onKeyDown(i54.state, e28.nativeEvent,
|
|
5110
|
+
if (i54.layer.onKeyDown(i54.state, e28.nativeEvent, n45, { commit(e29) {
|
|
5111
5111
|
o49 = e29, s44(i54.layer.id, e29);
|
|
5112
5112
|
} }), o49 !== void 0 && (A11 && (V6.current.push(a55), H6.current = []), c42?.(i54.layer.id, o49, i54.state)), e28.nativeEvent.defaultPrevented) return;
|
|
5113
5113
|
}
|
|
@@ -5128,23 +5128,23 @@ function T3(i53) {
|
|
|
5128
5128
|
plotSize: M12,
|
|
5129
5129
|
toPlot: (e28) => d7(e28, j11, M12),
|
|
5130
5130
|
toModel: (e28) => f6(e28, j11, M12)
|
|
5131
|
-
}), [j11, M12]);
|
|
5131
|
+
}), [j11, M12]), re6 = [S4.root, D12].filter(Boolean).join(" ");
|
|
5132
5132
|
return /* @__PURE__ */ jsxs(w3, {
|
|
5133
5133
|
ref: I9,
|
|
5134
|
-
className:
|
|
5134
|
+
className: re6,
|
|
5135
5135
|
style: O12,
|
|
5136
5136
|
width: g22,
|
|
5137
5137
|
height: _21,
|
|
5138
5138
|
xRange: v19,
|
|
5139
5139
|
yRange: y18,
|
|
5140
|
-
grid:
|
|
5140
|
+
grid: b17,
|
|
5141
5141
|
axes: x18,
|
|
5142
5142
|
xTicks: T13,
|
|
5143
5143
|
yTicks: E12,
|
|
5144
5144
|
tabIndex: A11 ? 0 : void 0,
|
|
5145
5145
|
role: "group",
|
|
5146
5146
|
"aria-label": i53["aria-label"],
|
|
5147
|
-
onPointerDown:
|
|
5147
|
+
onPointerDown: ee7,
|
|
5148
5148
|
onKeyDown: te6,
|
|
5149
5149
|
children: [k12, a54.map((e28) => {
|
|
5150
5150
|
let t40 = {
|
|
@@ -5376,7 +5376,7 @@ function z3(e28 = {}) {
|
|
|
5376
5376
|
payload: { segment: a54.segIdx + 1 }
|
|
5377
5377
|
} : null;
|
|
5378
5378
|
}
|
|
5379
|
-
function
|
|
5379
|
+
function b17(t41) {
|
|
5380
5380
|
return {
|
|
5381
5381
|
onMove(n46, r49, a54, s44) {
|
|
5382
5382
|
let c42 = F3(r49.x, e28.xClamp);
|
|
@@ -5465,7 +5465,7 @@ function z3(e28 = {}) {
|
|
|
5465
5465
|
t: r50.t,
|
|
5466
5466
|
value: r50.value
|
|
5467
5467
|
}
|
|
5468
|
-
}),
|
|
5468
|
+
}), b17(n47);
|
|
5469
5469
|
}
|
|
5470
5470
|
if (t41.kind === "segment") {
|
|
5471
5471
|
let { segment: n47 } = t41.payload;
|
|
@@ -5547,10 +5547,10 @@ function h6(e28, t40, n45, r48, i53, a54 = 0.5) {
|
|
|
5547
5547
|
x: t40.x + (n45.x - t40.x) * i53,
|
|
5548
5548
|
y: t40.y + (n45.y - t40.y) * i53
|
|
5549
5549
|
};
|
|
5550
|
-
let l40 = o49 + i53 * (s44 - o49), u37 = ((o49 - l40) * e28.x + (l40 - 0) * t40.x) / (o49 - 0), d33 = ((o49 - l40) * e28.y + (l40 - 0) * t40.y) / (o49 - 0), f30 = ((s44 - l40) * t40.x + (l40 - o49) * n45.x) / (s44 - o49), p26 = ((s44 - l40) * t40.y + (l40 - o49) * n45.y) / (s44 - o49), h25 = ((c42 - l40) * n45.x + (l40 - s44) * r48.x) / (c42 - s44), g22 = ((c42 - l40) * n45.y + (l40 - s44) * r48.y) / (c42 - s44), _21 = ((s44 - l40) * u37 + (l40 - 0) * f30) / (s44 - 0), v19 = ((s44 - l40) * d33 + (l40 - 0) * p26) / (s44 - 0), y18 = ((c42 - l40) * f30 + (l40 - o49) * h25) / (c42 - o49),
|
|
5550
|
+
let l40 = o49 + i53 * (s44 - o49), u37 = ((o49 - l40) * e28.x + (l40 - 0) * t40.x) / (o49 - 0), d33 = ((o49 - l40) * e28.y + (l40 - 0) * t40.y) / (o49 - 0), f30 = ((s44 - l40) * t40.x + (l40 - o49) * n45.x) / (s44 - o49), p26 = ((s44 - l40) * t40.y + (l40 - o49) * n45.y) / (s44 - o49), h25 = ((c42 - l40) * n45.x + (l40 - s44) * r48.x) / (c42 - s44), g22 = ((c42 - l40) * n45.y + (l40 - s44) * r48.y) / (c42 - s44), _21 = ((s44 - l40) * u37 + (l40 - 0) * f30) / (s44 - 0), v19 = ((s44 - l40) * d33 + (l40 - 0) * p26) / (s44 - 0), y18 = ((c42 - l40) * f30 + (l40 - o49) * h25) / (c42 - o49), b17 = ((c42 - l40) * p26 + (l40 - o49) * g22) / (c42 - o49);
|
|
5551
5551
|
return {
|
|
5552
5552
|
x: ((s44 - l40) * _21 + (l40 - o49) * y18) / (s44 - o49),
|
|
5553
|
-
y: ((s44 - l40) * v19 + (l40 - o49) *
|
|
5553
|
+
y: ((s44 - l40) * v19 + (l40 - o49) * b17) / (s44 - o49)
|
|
5554
5554
|
};
|
|
5555
5555
|
}
|
|
5556
5556
|
function g6(e28, t40, n45 = 0.5) {
|
|
@@ -5773,18 +5773,18 @@ function F4(n45 = {}) {
|
|
|
5773
5773
|
}
|
|
5774
5774
|
function _21(e28, t40, n46) {
|
|
5775
5775
|
if (!m26) return null;
|
|
5776
|
-
let i54 =
|
|
5777
|
-
if (
|
|
5776
|
+
let i54 = M4(e28.points, n46), o49 = _5(i54, t40, T4);
|
|
5777
|
+
if (o49) return {
|
|
5778
5778
|
kind: "anchor",
|
|
5779
|
-
payload: { index:
|
|
5779
|
+
payload: { index: o49.index }
|
|
5780
5780
|
};
|
|
5781
5781
|
if (f30 === "click-curve" && h25) {
|
|
5782
|
-
let r48 =
|
|
5783
|
-
if (
|
|
5782
|
+
let r48 = N4(e28.points, p26, n46), i55 = v5(r48, t40, E4);
|
|
5783
|
+
if (i55) return {
|
|
5784
5784
|
kind: "curve",
|
|
5785
5785
|
payload: {
|
|
5786
|
-
segIdx:
|
|
5787
|
-
t:
|
|
5786
|
+
segIdx: i55.segIdx,
|
|
5787
|
+
t: i55.t
|
|
5788
5788
|
}
|
|
5789
5789
|
};
|
|
5790
5790
|
}
|
|
@@ -5834,7 +5834,7 @@ function F4(n45 = {}) {
|
|
|
5834
5834
|
}
|
|
5835
5835
|
};
|
|
5836
5836
|
}
|
|
5837
|
-
function
|
|
5837
|
+
function b17(t40, r48, a54, o49, s44) {
|
|
5838
5838
|
if (r48.kind === "anchor") {
|
|
5839
5839
|
let { index: c42 } = r48.payload;
|
|
5840
5840
|
if (a("function-layer", "anchor-down", {
|
|
@@ -5919,7 +5919,7 @@ function F4(n45 = {}) {
|
|
|
5919
5919
|
x: d34.x + c42 * Math.abs(h26) * D4 * p27,
|
|
5920
5920
|
y: d34.y + l41 * Math.abs(f31.yMax - f31.yMin) * D4 * p27
|
|
5921
5921
|
}, r48), _22 = g23.points[u38];
|
|
5922
|
-
_22.x
|
|
5922
|
+
(_22.x !== d34.x || _22.y !== d34.y) && a54.commit({
|
|
5923
5923
|
...g23,
|
|
5924
5924
|
activeIndex: null
|
|
5925
5925
|
});
|
|
@@ -5928,13 +5928,13 @@ function F4(n45 = {}) {
|
|
|
5928
5928
|
id: i53,
|
|
5929
5929
|
render: g22,
|
|
5930
5930
|
hitTest: _21,
|
|
5931
|
-
onPointerDown:
|
|
5931
|
+
onPointerDown: b17,
|
|
5932
5932
|
onEmptyPointerDown: F11,
|
|
5933
5933
|
onKeyDown: I9
|
|
5934
5934
|
};
|
|
5935
5935
|
}
|
|
5936
5936
|
function L4(e28) {
|
|
5937
|
-
let { value: t40, onInput: r48, onChange: i53, domain: a54, endpoints: o49, interpolation: c42, constrain: m26, addPointMode: h25, minPoints: g22, maxPoints: _21, curve: v19, fill: y18, hideNonInteractive:
|
|
5937
|
+
let { value: t40, onInput: r48, onChange: i53, domain: a54, endpoints: o49, interpolation: c42, constrain: m26, addPointMode: h25, minPoints: g22, maxPoints: _21, curve: v19, fill: y18, hideNonInteractive: b17, renderAnchor: x18, width: S17, height: C14, xRange: w13, yRange: T13, grid: E12, axes: D12, xTicks: O12, yTicks: k12, history: A11, className: j11, style: M12, decorations: N11 } = e28, P10 = useMemo(() => F4({
|
|
5938
5938
|
id: "function",
|
|
5939
5939
|
domain: a54,
|
|
5940
5940
|
endpoints: o49,
|
|
@@ -5945,7 +5945,7 @@ function L4(e28) {
|
|
|
5945
5945
|
maxPoints: _21,
|
|
5946
5946
|
curve: v19,
|
|
5947
5947
|
fill: y18,
|
|
5948
|
-
hideNonInteractive:
|
|
5948
|
+
hideNonInteractive: b17,
|
|
5949
5949
|
renderAnchor: x18
|
|
5950
5950
|
}), [
|
|
5951
5951
|
a54,
|
|
@@ -5957,7 +5957,7 @@ function L4(e28) {
|
|
|
5957
5957
|
_21,
|
|
5958
5958
|
v19,
|
|
5959
5959
|
y18,
|
|
5960
|
-
|
|
5960
|
+
b17,
|
|
5961
5961
|
x18
|
|
5962
5962
|
]), [I9, L9] = useState(() => ({
|
|
5963
5963
|
points: t40,
|
|
@@ -5976,33 +5976,33 @@ function L4(e28) {
|
|
|
5976
5976
|
if (!i53) return;
|
|
5977
5977
|
let r49 = t41, a55 = n45;
|
|
5978
5978
|
r49.points !== a55.points && i53?.(r49.points, a55.points);
|
|
5979
|
-
}, [i53])
|
|
5979
|
+
}, [i53]), V6 = useCallback((e29) => {
|
|
5980
|
+
let t41 = e29.target?.closest?.("[data-anchor-index]");
|
|
5981
|
+
if (!t41) return;
|
|
5982
|
+
e29.preventDefault(), e29.stopPropagation();
|
|
5983
|
+
let n45 = t41.getAttribute("data-anchor-index");
|
|
5984
|
+
if (n45 === null) return;
|
|
5985
|
+
let a55 = Number(n45), s44 = R8.current.points;
|
|
5986
|
+
if (!Number.isInteger(a55) || a55 < 0 || a55 >= s44.length || s44[a55]?.locked || o49 !== void 0 && o49 !== "free" && (a55 === 0 || a55 === s44.length - 1) || g22 !== void 0 && s44.length <= g22) return;
|
|
5987
|
+
let c43 = s44.filter((e30, t42) => t42 !== a55);
|
|
5988
|
+
L9({
|
|
5989
|
+
points: c43,
|
|
5990
|
+
activeIndex: null
|
|
5991
|
+
}), r48(c43), i53?.(c43, s44);
|
|
5992
|
+
}, [
|
|
5993
|
+
o49,
|
|
5994
|
+
g22,
|
|
5995
|
+
r48,
|
|
5996
|
+
i53
|
|
5997
|
+
]), H6 = useMemo(() => [{
|
|
5998
|
+
layer: P10,
|
|
5999
|
+
state: I9
|
|
6000
|
+
}], [P10, I9]);
|
|
5980
6001
|
return /* @__PURE__ */ jsx("div", {
|
|
5981
|
-
onContextMenu:
|
|
5982
|
-
let t41 = e29.target?.closest?.("[data-anchor-index]");
|
|
5983
|
-
if (!t41) return;
|
|
5984
|
-
e29.preventDefault(), e29.stopPropagation();
|
|
5985
|
-
let n45 = t41.getAttribute("data-anchor-index");
|
|
5986
|
-
if (n45 === null) return;
|
|
5987
|
-
let a55 = Number(n45), s44 = R8.current.points;
|
|
5988
|
-
if (!Number.isInteger(a55) || a55 < 0 || a55 >= s44.length || s44[a55]?.locked || o49 !== void 0 && o49 !== "free" && (a55 === 0 || a55 === s44.length - 1) || g22 !== void 0 && s44.length <= g22) return;
|
|
5989
|
-
let c43 = s44.filter((e30, t42) => t42 !== a55);
|
|
5990
|
-
L9({
|
|
5991
|
-
points: c43,
|
|
5992
|
-
activeIndex: null
|
|
5993
|
-
}), r48(c43), i53?.(c43, s44);
|
|
5994
|
-
}, [
|
|
5995
|
-
o49,
|
|
5996
|
-
g22,
|
|
5997
|
-
r48,
|
|
5998
|
-
i53
|
|
5999
|
-
]),
|
|
6002
|
+
onContextMenu: V6,
|
|
6000
6003
|
style: { display: "contents" },
|
|
6001
6004
|
children: /* @__PURE__ */ jsx(T3, {
|
|
6002
|
-
layers:
|
|
6003
|
-
layer: P10,
|
|
6004
|
-
state: I9
|
|
6005
|
-
}], [P10, I9]),
|
|
6005
|
+
layers: H6,
|
|
6006
6006
|
onLayerChange: z7,
|
|
6007
6007
|
onLayerCommit: B6,
|
|
6008
6008
|
width: S17,
|
|
@@ -6031,10 +6031,10 @@ var l12 = {
|
|
|
6031
6031
|
footer: "_footer_122x3_288"
|
|
6032
6032
|
};
|
|
6033
6033
|
function u11(u37) {
|
|
6034
|
-
let { title: d33, showCloseButton: f30, children: p26, footer: m26, role: h25 = "dialog", className: g22, bodyClassName: _21, isOpen: v19, onOpenChange: y18, portalContainer:
|
|
6034
|
+
let { title: d33, showCloseButton: f30, children: p26, footer: m26, role: h25 = "dialog", className: g22, bodyClassName: _21, isOpen: v19, onOpenChange: y18, portalContainer: b17, stance: x18, tone: S17, ...C14 } = u37, w13 = n7({
|
|
6035
6035
|
stance: x18,
|
|
6036
6036
|
tone: S17
|
|
6037
|
-
}), T13 = f30 ?? !!y18, { anchor: E12, portalProps: D12 } = c3(
|
|
6037
|
+
}), T13 = f30 ?? !!y18, { anchor: E12, portalProps: D12 } = c3(b17);
|
|
6038
6038
|
return /* @__PURE__ */ jsxs(Fragment, { children: [E12, /* @__PURE__ */ jsx(ModalOverlay, {
|
|
6039
6039
|
...C14,
|
|
6040
6040
|
isOpen: v19,
|
|
@@ -6077,7 +6077,7 @@ function u11(u37) {
|
|
|
6077
6077
|
})] });
|
|
6078
6078
|
}
|
|
6079
6079
|
|
|
6080
|
-
// ../ui/dist/chunks/number-
|
|
6080
|
+
// ../ui/dist/chunks/number-D3NEx_8r.js
|
|
6081
6081
|
var e11 = "\u2212";
|
|
6082
6082
|
function t15(e28, t40) {
|
|
6083
6083
|
return (Number.isFinite(e28) ? e28.toLocaleString(void 0, t40) : String(e28)).replace(/^-/, "\u2212");
|
|
@@ -6202,12 +6202,13 @@ var t17 = {
|
|
|
6202
6202
|
row: "_row_1dekc_28"
|
|
6203
6203
|
};
|
|
6204
6204
|
function n18({ orientation: n45 = "stacked", className: r48, children: i53 }) {
|
|
6205
|
+
let a54 = [
|
|
6206
|
+
t17.field,
|
|
6207
|
+
n45 === "row" && t17.row,
|
|
6208
|
+
r48
|
|
6209
|
+
].filter(Boolean).join(" ");
|
|
6205
6210
|
return /* @__PURE__ */ jsx("div", {
|
|
6206
|
-
className:
|
|
6207
|
-
t17.field,
|
|
6208
|
-
n45 === "row" && t17.row,
|
|
6209
|
-
r48
|
|
6210
|
-
].filter(Boolean).join(" "),
|
|
6211
|
+
className: a54,
|
|
6211
6212
|
children: i53
|
|
6212
6213
|
});
|
|
6213
6214
|
}
|
|
@@ -6243,7 +6244,7 @@ function w6(e28) {
|
|
|
6243
6244
|
return "options" in e28;
|
|
6244
6245
|
}
|
|
6245
6246
|
function T5(o49) {
|
|
6246
|
-
let { label: s44, orientation: c42 = "stacked", description: l40, errorMessage: m26, placeholder: _21, options: v19, children: T13, selectedKey: E12, defaultSelectedKey: D12, onSelectionChange: k12, width: A11 = "fill", variant: I9 = "field", indicator: L9 = I9 === "bare" ? "underline" : "chevron", popup: R8 = "over", triggerId: z7, className: B6, portalContainer: V6, shortcut: H6, tooltip: U6, ...W7 } = o49, { anchor: G7, portalProps: K7 } = c3(V6), q7 = useRef(null),
|
|
6247
|
+
let { label: s44, orientation: c42 = "stacked", description: l40, errorMessage: m26, placeholder: _21, options: v19, children: T13, selectedKey: E12, defaultSelectedKey: D12, onSelectionChange: k12, width: A11 = "fill", variant: I9 = "field", indicator: L9 = I9 === "bare" ? "underline" : "chevron", popup: R8 = "over", triggerId: z7, className: B6, portalContainer: V6, shortcut: H6, tooltip: U6, ...W7 } = o49, { anchor: G7, portalProps: K7 } = c3(V6), q7 = useRef(null), J7 = useRef(null), [Y7, X7] = useState(O5);
|
|
6247
6248
|
return /* @__PURE__ */ jsxs(Select, {
|
|
6248
6249
|
...W7,
|
|
6249
6250
|
selectedKey: E12,
|
|
@@ -6279,7 +6280,7 @@ function T5(o49) {
|
|
|
6279
6280
|
ref: q7,
|
|
6280
6281
|
className: C6.trigger,
|
|
6281
6282
|
onPointerDown: (e28) => {
|
|
6282
|
-
|
|
6283
|
+
J7.current = {
|
|
6283
6284
|
x: e28.clientX,
|
|
6284
6285
|
y: e28.clientY,
|
|
6285
6286
|
at: performance.now()
|
|
@@ -6330,7 +6331,7 @@ function T5(o49) {
|
|
|
6330
6331
|
...K7,
|
|
6331
6332
|
children: [R8 === "over" && /* @__PURE__ */ jsx(j5, {
|
|
6332
6333
|
triggerRef: q7,
|
|
6333
|
-
pressRef:
|
|
6334
|
+
pressRef: J7,
|
|
6334
6335
|
applied: Y7,
|
|
6335
6336
|
onMeasure: X7
|
|
6336
6337
|
}), /* @__PURE__ */ jsx(ListBox, {
|
|
@@ -6500,12 +6501,12 @@ var h8 = {
|
|
|
6500
6501
|
ghost: "_ghost_1v3hc_113"
|
|
6501
6502
|
};
|
|
6502
6503
|
var g8 = forwardRef(function(e28, t40) {
|
|
6503
|
-
let { label: a54, orientation: o49 = "stacked", description: s44, errorMessage: g22, hideSteppers: _21, ghost: v19, placeholder: y18, width:
|
|
6504
|
+
let { label: a54, orientation: o49 = "stacked", description: s44, errorMessage: g22, hideSteppers: _21, ghost: v19, placeholder: y18, width: b17 = "fill", className: x18, ...S17 } = e28;
|
|
6504
6505
|
return /* @__PURE__ */ jsxs(NumberField, {
|
|
6505
6506
|
...S17,
|
|
6506
6507
|
className: [
|
|
6507
6508
|
h8.field,
|
|
6508
|
-
|
|
6509
|
+
b17 === "fit" && h8.fit,
|
|
6509
6510
|
r18.root,
|
|
6510
6511
|
o49 === "row" && r18.row,
|
|
6511
6512
|
o49 === "row" && h8.row,
|
|
@@ -6549,7 +6550,7 @@ var g8 = forwardRef(function(e28, t40) {
|
|
|
6549
6550
|
});
|
|
6550
6551
|
});
|
|
6551
6552
|
function _8({ value: i53, onChange: a54, minValue: c42, maxValue: l40, step: u37 = 1, accepts: d33, placeholder: f30, ghost: p26, width: m26 = "fill", className: g22, "aria-label": _21 }) {
|
|
6552
|
-
let [v19, y18] = useState(null),
|
|
6553
|
+
let [v19, y18] = useState(null), b17 = useRef(false), x18 = Number.isFinite(i53) ? t15(i53, {
|
|
6553
6554
|
useGrouping: false,
|
|
6554
6555
|
maximumFractionDigits: 20
|
|
6555
6556
|
}) : "", S17 = (e28) => Math.min(l40 ?? Infinity, Math.max(c42 ?? -Infinity, e28)), C14 = (e28) => {
|
|
@@ -6573,10 +6574,10 @@ function _8({ value: i53, onChange: a54, minValue: c42, maxValue: l40, step: u37
|
|
|
6573
6574
|
value: v19 ?? x18,
|
|
6574
6575
|
onChange: (e28) => y18(e28.target.value),
|
|
6575
6576
|
onFocus: () => {
|
|
6576
|
-
|
|
6577
|
+
b17.current = false;
|
|
6577
6578
|
},
|
|
6578
6579
|
onBlur: () => {
|
|
6579
|
-
if (v19 !== null && !
|
|
6580
|
+
if (v19 !== null && !b17.current) {
|
|
6580
6581
|
let t40 = a18(v19, d33);
|
|
6581
6582
|
Number.isFinite(t40) && C14(t40);
|
|
6582
6583
|
}
|
|
@@ -6584,7 +6585,7 @@ function _8({ value: i53, onChange: a54, minValue: c42, maxValue: l40, step: u37
|
|
|
6584
6585
|
},
|
|
6585
6586
|
onKeyDown: (t40) => {
|
|
6586
6587
|
if (t40.key === "Enter") t40.currentTarget.blur();
|
|
6587
|
-
else if (t40.key === "Escape")
|
|
6588
|
+
else if (t40.key === "Escape") b17.current = true, t40.currentTarget.blur();
|
|
6588
6589
|
else if (t40.key === "ArrowUp" || t40.key === "ArrowDown") {
|
|
6589
6590
|
t40.preventDefault();
|
|
6590
6591
|
let n45 = v19 === null ? i53 : a18(v19, d33), r48 = S17((Number.isFinite(n45) ? n45 : 0) + (t40.key === "ArrowUp" ? u37 : -u37));
|
|
@@ -6671,15 +6672,17 @@ function a24(a54) {
|
|
|
6671
6672
|
return t40 !== void 0 && t40.includes(e28) && !p26(e28);
|
|
6672
6673
|
}, h25 = (e28) => () => {
|
|
6673
6674
|
let t40 = o49[e28];
|
|
6674
|
-
if (!t40.disabled)
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
a54.
|
|
6680
|
-
|
|
6675
|
+
if (!t40.disabled) {
|
|
6676
|
+
if (f30 === "multiple") {
|
|
6677
|
+
let e29 = a54.value, n45 = e29.includes(t40.value) ? e29.filter((e30) => e30 !== t40.value) : [...e29, t40.value];
|
|
6678
|
+
a54.onChange(n45);
|
|
6679
|
+
} else {
|
|
6680
|
+
if (a54.value === t40.value) {
|
|
6681
|
+
a54.allowDeselect && a54.onChange(null);
|
|
6682
|
+
return;
|
|
6683
|
+
}
|
|
6684
|
+
a54.onChange(t40.value);
|
|
6681
6685
|
}
|
|
6682
|
-
a54.onChange(t40.value);
|
|
6683
6686
|
}
|
|
6684
6687
|
}, g22 = f30 === "single" ? o49.findIndex((e28) => e28.value === a54.value) : -1, _21 = a23({
|
|
6685
6688
|
items: o49,
|
|
@@ -6781,26 +6784,26 @@ function h9(e28, t40, n45, r48) {
|
|
|
6781
6784
|
}
|
|
6782
6785
|
return i53 === -1 ? e28[0] : e28[Math.max(0, i53 - (r48 - 1))];
|
|
6783
6786
|
}
|
|
6784
|
-
function
|
|
6787
|
+
function ee3(e28, t40, n45) {
|
|
6785
6788
|
return e28 !== void 0 && e28 > 0 ? e28 : (n45 - t40) / 100;
|
|
6786
6789
|
}
|
|
6787
|
-
function
|
|
6790
|
+
function g9(e28, t40, n45, r48, i53, a54) {
|
|
6788
6791
|
let o49 = a54 !== void 0 && a54 > 0 ? a54 : (i53 - r48) / 1e3;
|
|
6789
6792
|
return u16(e28, n45 > 0 ? t40[n45 - 1].value + o49 : r48, n45 < t40.length - 1 ? t40[n45 + 1].value - o49 : i53);
|
|
6790
6793
|
}
|
|
6791
|
-
function
|
|
6794
|
+
function _9(e28, t40, n45, r48) {
|
|
6792
6795
|
if (!e28.bounds) return [n45, r48];
|
|
6793
6796
|
let i53 = typeof e28.bounds == "function" ? e28.bounds(t40) : e28.bounds;
|
|
6794
6797
|
return [i53[0], i53[1]];
|
|
6795
6798
|
}
|
|
6796
|
-
function
|
|
6799
|
+
function v8(t40) {
|
|
6797
6800
|
return t15(t40.value, {
|
|
6798
6801
|
minimumFractionDigits: 3,
|
|
6799
6802
|
maximumFractionDigits: 3
|
|
6800
6803
|
});
|
|
6801
6804
|
}
|
|
6802
|
-
function
|
|
6803
|
-
let { thumbs:
|
|
6805
|
+
function y6(e28) {
|
|
6806
|
+
let { thumbs: y18, onInput: b17, onChange: x18, step: S17, constraint: C14, trackHeight: w13, density: T13, ariaLabel: E12, className: D12 } = e28, O12 = useMemo(() => p10(e28.stops, e28.min, e28.max), [
|
|
6804
6807
|
e28.stops,
|
|
6805
6808
|
e28.min,
|
|
6806
6809
|
e28.max
|
|
@@ -6832,44 +6835,46 @@ function b7(e28) {
|
|
|
6832
6835
|
]), z7 = useCallback((e29, t40) => {
|
|
6833
6836
|
let n45 = R8(e29);
|
|
6834
6837
|
if (j11) return m10(n45, k12, Infinity, L9);
|
|
6835
|
-
let r48 = u16(l17(n45,
|
|
6838
|
+
let r48 = u16(l17(n45, S17, M12), M12, N11);
|
|
6836
6839
|
return k12.length > 0 ? m10(r48, k12, d12 / t40, L9) : r48;
|
|
6837
6840
|
}, [
|
|
6838
6841
|
R8,
|
|
6839
6842
|
L9,
|
|
6840
6843
|
j11,
|
|
6841
6844
|
k12,
|
|
6842
|
-
|
|
6845
|
+
S17,
|
|
6843
6846
|
M12,
|
|
6844
6847
|
N11
|
|
6845
6848
|
]), B6 = useCallback((n45, r48, i53, a54) => {
|
|
6846
|
-
I9.current?.cancel()
|
|
6847
|
-
let o49 =
|
|
6849
|
+
I9.current?.cancel();
|
|
6850
|
+
let o49 = (a54 ?? y18).map((e29) => ({ ...e29 }));
|
|
6851
|
+
F11.current = o49;
|
|
6852
|
+
let s44 = false;
|
|
6848
6853
|
I9.current = openPointerSession(n45, r48, {
|
|
6849
6854
|
onMove: (t40) => {
|
|
6850
6855
|
let n46 = P10.current, r49 = F11.current;
|
|
6851
6856
|
if (!n46 || !r49) return;
|
|
6852
|
-
let a55 = n46.getBoundingClientRect(),
|
|
6857
|
+
let a55 = n46.getBoundingClientRect(), o50 = z7((t40.clientX - a55.left) / a55.width, a55.width), [c42, l40] = _9(r49[i53], {
|
|
6853
6858
|
thumbs: r49,
|
|
6854
6859
|
index: i53
|
|
6855
6860
|
}, M12, N11);
|
|
6856
|
-
|
|
6861
|
+
o50 = u16(o50, c42, l40), C14 === "ordered" && (o50 = g9(o50, r49, i53, M12, N11, S17));
|
|
6857
6862
|
let d33 = a55.height;
|
|
6858
|
-
e28.onRemoveThumb && (
|
|
6863
|
+
e28.onRemoveThumb && (s44 = t40.clientY < a55.top - d33 || t40.clientY > a55.bottom + d33), r49[i53] = {
|
|
6859
6864
|
...r49[i53],
|
|
6860
|
-
value:
|
|
6861
|
-
},
|
|
6865
|
+
value: o50
|
|
6866
|
+
}, b17(r49.map((e29) => ({ ...e29 })));
|
|
6862
6867
|
},
|
|
6863
6868
|
onEnd: () => {
|
|
6864
6869
|
I9.current = null;
|
|
6865
6870
|
let t40 = F11.current;
|
|
6866
6871
|
if (F11.current = null, t40) {
|
|
6867
|
-
if (
|
|
6872
|
+
if (s44 && e28.onRemoveThumb && e28.onRemoveThumb(i53)) {
|
|
6868
6873
|
let e29 = t40.filter((e30, t41) => t41 !== i53).map((e30) => ({ ...e30 }));
|
|
6869
|
-
|
|
6874
|
+
b17(e29), x18?.(e29);
|
|
6870
6875
|
return;
|
|
6871
6876
|
}
|
|
6872
|
-
|
|
6877
|
+
x18?.(t40.map((e29) => ({ ...e29 })));
|
|
6873
6878
|
}
|
|
6874
6879
|
},
|
|
6875
6880
|
onCancel: () => {
|
|
@@ -6877,18 +6882,18 @@ function b7(e28) {
|
|
|
6877
6882
|
}
|
|
6878
6883
|
}, f11);
|
|
6879
6884
|
}, [
|
|
6880
|
-
|
|
6885
|
+
y18,
|
|
6886
|
+
b17,
|
|
6881
6887
|
x18,
|
|
6882
|
-
S17,
|
|
6883
6888
|
z7,
|
|
6884
6889
|
M12,
|
|
6885
6890
|
N11,
|
|
6891
|
+
S17,
|
|
6886
6892
|
C14,
|
|
6887
|
-
w13,
|
|
6888
6893
|
e28
|
|
6889
6894
|
]), V6 = useCallback((e29, n45, r48) => {
|
|
6890
6895
|
I9.current?.cancel();
|
|
6891
|
-
let i53 =
|
|
6896
|
+
let i53 = y18.map((e30) => ({ ...e30 })), a54 = i53.map((e30) => e30.value);
|
|
6892
6897
|
F11.current = i53, I9.current = openPointerSession(e29, n45, {
|
|
6893
6898
|
onMove: (e30) => {
|
|
6894
6899
|
let t40 = P10.current, n46 = F11.current;
|
|
@@ -6900,11 +6905,11 @@ function b7(e28) {
|
|
|
6900
6905
|
...n46[r49],
|
|
6901
6906
|
value: R8(e31[r49] + t41)
|
|
6902
6907
|
};
|
|
6903
|
-
|
|
6908
|
+
b17(n46.map((e32) => ({ ...e32 })));
|
|
6904
6909
|
return;
|
|
6905
6910
|
}
|
|
6906
6911
|
let s44 = o49 * (N11 - M12);
|
|
6907
|
-
s44 = l17(s44,
|
|
6912
|
+
s44 = l17(s44, S17, 0);
|
|
6908
6913
|
let c42 = -Infinity, d33 = Infinity;
|
|
6909
6914
|
for (let e31 = 0; e31 < a54.length; e31++) c42 = Math.max(c42, M12 - a54[e31]), d33 = Math.min(d33, N11 - a54[e31]);
|
|
6910
6915
|
s44 = u16(s44, c42, d33);
|
|
@@ -6912,24 +6917,24 @@ function b7(e28) {
|
|
|
6912
6917
|
...n46[e31],
|
|
6913
6918
|
value: u16(a54[e31] + s44, M12, N11)
|
|
6914
6919
|
};
|
|
6915
|
-
|
|
6920
|
+
b17(n46.map((e31) => ({ ...e31 })));
|
|
6916
6921
|
},
|
|
6917
6922
|
onEnd: () => {
|
|
6918
6923
|
I9.current = null;
|
|
6919
6924
|
let e30 = F11.current;
|
|
6920
|
-
F11.current = null, e30 &&
|
|
6925
|
+
F11.current = null, e30 && x18?.(e30.map((e31) => ({ ...e31 })));
|
|
6921
6926
|
},
|
|
6922
6927
|
onCancel: () => {
|
|
6923
6928
|
I9.current = null, F11.current = null;
|
|
6924
6929
|
}
|
|
6925
6930
|
}, f11);
|
|
6926
6931
|
}, [
|
|
6927
|
-
|
|
6932
|
+
y18,
|
|
6933
|
+
b17,
|
|
6928
6934
|
x18,
|
|
6929
|
-
S17,
|
|
6930
6935
|
M12,
|
|
6931
6936
|
N11,
|
|
6932
|
-
|
|
6937
|
+
S17,
|
|
6933
6938
|
A11,
|
|
6934
6939
|
L9,
|
|
6935
6940
|
R8
|
|
@@ -6940,11 +6945,11 @@ function b7(e28) {
|
|
|
6940
6945
|
n45.shiftKey && e28.allowShiftAll ? V6(r48, n45, n45.clientX) : B6(r48, n45, t40);
|
|
6941
6946
|
}, U6 = (t40) => (n45) => {
|
|
6942
6947
|
if (!e28.onRemoveThumb || (n45.preventDefault(), !e28.onRemoveThumb(t40))) return;
|
|
6943
|
-
let r48 =
|
|
6944
|
-
|
|
6948
|
+
let r48 = y18.filter((e29, n46) => n46 !== t40).map((e29) => ({ ...e29 }));
|
|
6949
|
+
b17(r48), x18?.(r48);
|
|
6945
6950
|
}, W7 = (t40) => {
|
|
6946
6951
|
if (typeof t40.button == "number" && t40.button > 0) return;
|
|
6947
|
-
let n45 = (e28.trackClick ?? "none") === "move-nearest" &&
|
|
6952
|
+
let n45 = (e28.trackClick ?? (y18.length === 1 ? "move-nearest" : "none")) === "move-nearest" && y18.length > 0;
|
|
6948
6953
|
if (!e28.onAddThumb && !n45 || t40.target.closest(`.${c19.thumb}`)) return;
|
|
6949
6954
|
t40.preventDefault();
|
|
6950
6955
|
let r48 = P10.current;
|
|
@@ -6953,22 +6958,22 @@ function b7(e28) {
|
|
|
6953
6958
|
if (e28.onAddThumb) {
|
|
6954
6959
|
let t41 = e28.onAddThumb(a54);
|
|
6955
6960
|
if (!t41) return;
|
|
6956
|
-
let n46 = [...
|
|
6957
|
-
|
|
6961
|
+
let n46 = [...y18.map((e29) => ({ ...e29 })), t41];
|
|
6962
|
+
b17(n46), x18?.(n46);
|
|
6958
6963
|
return;
|
|
6959
6964
|
}
|
|
6960
6965
|
let o49 = 0;
|
|
6961
|
-
for (let e29 = 1; e29 <
|
|
6962
|
-
let s44 =
|
|
6966
|
+
for (let e29 = 1; e29 < y18.length; e29++) Math.abs(y18[e29].value - a54) < Math.abs(y18[o49].value - a54) && (o49 = e29);
|
|
6967
|
+
let s44 = y18.map((e29) => ({ ...e29 })), [l40, d33] = _9(s44[o49], {
|
|
6963
6968
|
thumbs: s44,
|
|
6964
6969
|
index: o49
|
|
6965
6970
|
}, M12, N11), f30 = u16(a54, l40, d33);
|
|
6966
|
-
|
|
6971
|
+
C14 === "ordered" && (f30 = g9(f30, s44, o49, M12, N11, S17)), s44[o49] = {
|
|
6967
6972
|
...s44[o49],
|
|
6968
6973
|
value: f30
|
|
6969
|
-
},
|
|
6974
|
+
}, b17(s44), r48.querySelectorAll(`.${c19.thumb}`)[o49]?.focus(), B6(r48, t40, o49, s44);
|
|
6970
6975
|
}, G7 = (e29) => (t40) => {
|
|
6971
|
-
let n45 =
|
|
6976
|
+
let n45 = ee3(S17, M12, N11), r48 = 0, i53 = 0, a54 = null;
|
|
6972
6977
|
switch (t40.key) {
|
|
6973
6978
|
case "ArrowRight":
|
|
6974
6979
|
case "ArrowUp":
|
|
@@ -6994,16 +6999,16 @@ function b7(e28) {
|
|
|
6994
6999
|
return;
|
|
6995
7000
|
}
|
|
6996
7001
|
t40.preventDefault();
|
|
6997
|
-
let o49 =
|
|
7002
|
+
let o49 = y18.map((e30) => ({ ...e30 })), [s44, c42] = _9(o49[e29], {
|
|
6998
7003
|
thumbs: o49,
|
|
6999
7004
|
index: e29
|
|
7000
7005
|
}, M12, N11), d33 = Math.max(M12, s44), f30 = Math.min(N11, c42), p26;
|
|
7001
|
-
p26 = a54 === "home" ? d33 : a54 === "end" ? f30 : k12.length > 0 ? h9(k12, o49[e29].value, i53 > 0 ? 1 : -1, Math.abs(i53)) : l17(o49[e29].value + r48,
|
|
7006
|
+
p26 = a54 === "home" ? d33 : a54 === "end" ? f30 : k12.length > 0 ? h9(k12, o49[e29].value, i53 > 0 ? 1 : -1, Math.abs(i53)) : l17(o49[e29].value + r48, S17, M12), p26 = u16(p26, d33, f30), C14 === "ordered" && (p26 = g9(p26, o49, e29, d33, f30, S17)), o49[e29] = {
|
|
7002
7007
|
...o49[e29],
|
|
7003
7008
|
value: p26
|
|
7004
|
-
},
|
|
7005
|
-
}, K7 = e28.readoutPlacement ?? "none", q7 = e28.renderReadout,
|
|
7006
|
-
|
|
7009
|
+
}, b17(o49), x18?.(o49);
|
|
7010
|
+
}, K7 = e28.readoutPlacement ?? "none", q7 = e28.renderReadout, J7 = T13 === "slim", Y7 = {};
|
|
7011
|
+
J7 && (Y7["--rp-track-height"] = "var(--wzl-slider-track-h)", Y7["--rp-thumb-size"] = "var(--wzl-slider-thumb-size)"), w13 !== void 0 && (Y7["--rp-track-height"] = `${w13}px`);
|
|
7007
7012
|
let X7 = e28.stopLabels ?? "all", Z7 = O12.length - 1, Q6 = X7 === "none" ? [] : O12.map((e29, t40) => ({
|
|
7008
7013
|
stop: e29,
|
|
7009
7014
|
i: t40
|
|
@@ -7014,19 +7019,19 @@ function b7(e28) {
|
|
|
7014
7019
|
children: Q6.map(({ stop: e29, i: t40 }) => /* @__PURE__ */ jsx("span", {
|
|
7015
7020
|
className: c19.stopLabel,
|
|
7016
7021
|
"data-slider-stop-label": true,
|
|
7017
|
-
"data-selected":
|
|
7022
|
+
"data-selected": y18.some((t41) => t41.value === e29.value) ? "true" : void 0,
|
|
7018
7023
|
"data-edge": t40 === 0 ? "start" : t40 === Z7 ? "end" : void 0,
|
|
7019
7024
|
style: { left: `${L9(e29.value) * 100}%` },
|
|
7020
7025
|
children: e29.label
|
|
7021
7026
|
}, e29.value))
|
|
7022
|
-
})
|
|
7027
|
+
}), te6 = [
|
|
7028
|
+
c19.root,
|
|
7029
|
+
J7 && c19.slim,
|
|
7030
|
+
$6 && c19.withStopLabels,
|
|
7031
|
+
D12
|
|
7032
|
+
].filter(Boolean).join(" ");
|
|
7023
7033
|
return /* @__PURE__ */ jsxs("div", {
|
|
7024
|
-
className:
|
|
7025
|
-
c19.root,
|
|
7026
|
-
J6 && c19.slim,
|
|
7027
|
-
$6 && c19.withStopLabels,
|
|
7028
|
-
D12
|
|
7029
|
-
].filter(Boolean).join(" "),
|
|
7034
|
+
className: te6,
|
|
7030
7035
|
style: Object.keys(Y7).length > 0 ? Y7 : void 0,
|
|
7031
7036
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
7032
7037
|
className: c19.row,
|
|
@@ -7057,7 +7062,7 @@ function b7(e28) {
|
|
|
7057
7062
|
})
|
|
7058
7063
|
}),
|
|
7059
7064
|
$6,
|
|
7060
|
-
|
|
7065
|
+
y18.map((e29, t40) => {
|
|
7061
7066
|
let r48 = e29.shape === "notched", i53 = typeof e29.shape == "object" && e29.shape !== null ? e29.shape.render : null, a54 = `${c19.thumb}${r48 ? ` ${c19.notched}` : ""}`;
|
|
7062
7067
|
return /* @__PURE__ */ jsx("div", {
|
|
7063
7068
|
role: "slider",
|
|
@@ -7067,7 +7072,7 @@ function b7(e28) {
|
|
|
7067
7072
|
"aria-valuemax": N11,
|
|
7068
7073
|
"aria-valuenow": e29.value,
|
|
7069
7074
|
"aria-valuetext": e29.valueText,
|
|
7070
|
-
"aria-label": [
|
|
7075
|
+
"aria-label": [E12, e29.label].filter(Boolean).join(" ") || void 0,
|
|
7071
7076
|
className: a54,
|
|
7072
7077
|
style: { left: `${L9(e29.value) * 100}%` },
|
|
7073
7078
|
onPointerDown: H6(t40),
|
|
@@ -7084,15 +7089,15 @@ function b7(e28) {
|
|
|
7084
7089
|
}), K7 === "inline-after" && /* @__PURE__ */ jsx("span", {
|
|
7085
7090
|
"data-readout": "inline",
|
|
7086
7091
|
className: c19.readoutInline,
|
|
7087
|
-
children:
|
|
7092
|
+
children: y18.map((e29, t40) => /* @__PURE__ */ jsxs("span", { children: [t40 > 0 ? " / " : "", q7 ? q7(e29, t40) : v8(e29)] }, t40))
|
|
7088
7093
|
})]
|
|
7089
7094
|
}), K7 === "below-thumb" && /* @__PURE__ */ jsx("div", {
|
|
7090
7095
|
className: c19.readoutsBelow,
|
|
7091
|
-
children:
|
|
7096
|
+
children: y18.map((e29, t40) => /* @__PURE__ */ jsx("span", {
|
|
7092
7097
|
"data-readout": "below",
|
|
7093
7098
|
className: c19.readoutBelow,
|
|
7094
7099
|
style: { left: `${L9(e29.value) * 100}%` },
|
|
7095
|
-
children: q7 ? q7(e29, t40) :
|
|
7100
|
+
children: q7 ? q7(e29, t40) : v8(e29)
|
|
7096
7101
|
}, t40))
|
|
7097
7102
|
})]
|
|
7098
7103
|
});
|
|
@@ -7130,12 +7135,12 @@ var c20 = {
|
|
|
7130
7135
|
alphaReadout: "_alphaReadout_1m1zl_50"
|
|
7131
7136
|
};
|
|
7132
7137
|
function l18(l40) {
|
|
7133
|
-
let { value: u37, mixed: d33 = false, alpha: f30 = false, onInput: p26, onChange: m26, className: h25 } = l40, g22 = toHex8(u37 ?? "#000000"), _21 = g22.slice(0, 7), v19 = getAlpha01(g22), y18 = Math.round(v19 * 100), [
|
|
7134
|
-
|
|
7138
|
+
let { value: u37, mixed: d33 = false, alpha: f30 = false, onInput: p26, onChange: m26, className: h25 } = l40, g22 = toHex8(u37 ?? "#000000"), _21 = g22.slice(0, 7), v19 = getAlpha01(g22), y18 = Math.round(v19 * 100), [b17, x18] = useState(null), [S17, C14] = useState(null), w13 = b17 ?? _21, T13 = S17 ?? y18, E12 = (e28, t40) => f30 ? withAlpha01(e28, t40) : e28, D12 = d33 && b17 === null, O12 = (e28, t40) => {
|
|
7139
|
+
(b17 !== null || S17 !== null) && (m26(E12(e28, t40)), x18(null), C14(null));
|
|
7135
7140
|
};
|
|
7136
7141
|
return /* @__PURE__ */ jsxs("span", {
|
|
7137
7142
|
className: [c20.root, h25].filter(Boolean).join(" "),
|
|
7138
|
-
...d33 &&
|
|
7143
|
+
...d33 && b17 === null ? { "data-mixed": "" } : {},
|
|
7139
7144
|
children: [/* @__PURE__ */ jsx("span", {
|
|
7140
7145
|
className: c20.chip,
|
|
7141
7146
|
children: /* @__PURE__ */ jsx("input", {
|
|
@@ -7191,17 +7196,19 @@ function v9(e28) {
|
|
|
7191
7196
|
let t41 = e29.valueToFraction(r48[0]) * 100, n46 = e29.valueToFraction(r48[1]) * 100, a55 = {
|
|
7192
7197
|
..._10,
|
|
7193
7198
|
...i53
|
|
7194
|
-
}, o50 = `repeating-linear-gradient(${a55.angleDeg}deg, transparent 0 ${a55.stripe}px, var(--wzl-surface) ${a55.stripe}px ${a55.stripe + a55.gap}px)`,
|
|
7199
|
+
}, o50 = `repeating-linear-gradient(${a55.angleDeg}deg, transparent 0 ${a55.stripe}px, var(--wzl-surface) ${a55.stripe}px ${a55.stripe + a55.gap}px)`, c43 = `color-mix(in srgb, var(--wzl-surface) ${a55.dim}%, transparent)`, l40 = `linear-gradient(${c43}, ${c43})`;
|
|
7195
7200
|
if (t41 > 0 && (s44.push(`${l40} left 0 / ${t41.toFixed(2)}% 100% no-repeat`), s44.push(`${o50} left 0 / ${t41.toFixed(2)}% 100% no-repeat`)), n46 < 100) {
|
|
7196
7201
|
let e30 = (100 - n46).toFixed(2);
|
|
7197
7202
|
s44.push(`${l40} right 0 / ${e30}% 100% no-repeat`), s44.push(`${o50} right 0 / ${e30}% 100% no-repeat`);
|
|
7198
7203
|
}
|
|
7199
7204
|
}
|
|
7200
|
-
|
|
7205
|
+
s44.push(o49);
|
|
7206
|
+
let c42 = {
|
|
7201
7207
|
position: "absolute",
|
|
7202
7208
|
inset: 0,
|
|
7203
7209
|
background: s44.join(", ")
|
|
7204
|
-
}
|
|
7210
|
+
};
|
|
7211
|
+
return /* @__PURE__ */ jsx("div", { style: c42 });
|
|
7205
7212
|
};
|
|
7206
7213
|
}
|
|
7207
7214
|
var y7 = {
|
|
@@ -7209,7 +7216,7 @@ var y7 = {
|
|
|
7209
7216
|
swatches: "_swatches_c0ev4_8",
|
|
7210
7217
|
swatch: "_swatch_c0ev4_8"
|
|
7211
7218
|
};
|
|
7212
|
-
var
|
|
7219
|
+
var b7 = [
|
|
7213
7220
|
{
|
|
7214
7221
|
value: "linear-gradient",
|
|
7215
7222
|
label: "Linear"
|
|
@@ -7259,13 +7266,13 @@ function C7(r48) {
|
|
|
7259
7266
|
className: [y7.root, u37].filter(Boolean).join(" "),
|
|
7260
7267
|
children: [
|
|
7261
7268
|
c42 && /* @__PURE__ */ jsx(a24, {
|
|
7262
|
-
items:
|
|
7269
|
+
items: b7,
|
|
7263
7270
|
value: i53.fill,
|
|
7264
7271
|
size: "sm",
|
|
7265
7272
|
ariaLabel: "Gradient kind",
|
|
7266
7273
|
onChange: (e28) => e28 && o49(withGradientKind(i53, e28))
|
|
7267
7274
|
}),
|
|
7268
|
-
/* @__PURE__ */ jsx(
|
|
7275
|
+
/* @__PURE__ */ jsx(y6, {
|
|
7269
7276
|
min: 0,
|
|
7270
7277
|
max: 1,
|
|
7271
7278
|
step: 5e-3,
|
|
@@ -7600,7 +7607,7 @@ function listCanvasFonts() {
|
|
|
7600
7607
|
if (!isCanvasFont(family)) continue;
|
|
7601
7608
|
out.push({ family, enrollment: autoEnrolledFamilies.has(family) ? "auto" : "explicit" });
|
|
7602
7609
|
}
|
|
7603
|
-
return out.sort((a54,
|
|
7610
|
+
return out.sort((a54, b17) => a54.family.localeCompare(b17.family));
|
|
7604
7611
|
}
|
|
7605
7612
|
function isExplicitCanvasFont(family) {
|
|
7606
7613
|
return canvasFamilies.has(family) && !autoEnrolledFamilies.has(family);
|
|
@@ -7757,7 +7764,7 @@ function listFonts() {
|
|
|
7757
7764
|
const variants = [...variantMap.keys()].map((key) => {
|
|
7758
7765
|
const [w13, s44] = key.split("|");
|
|
7759
7766
|
return { weight: Number(w13), style: s44 };
|
|
7760
|
-
}).sort((a54,
|
|
7767
|
+
}).sort((a54, b17) => a54.weight - b17.weight || a54.style.localeCompare(b17.style));
|
|
7761
7768
|
out.push({ family, variants });
|
|
7762
7769
|
}
|
|
7763
7770
|
return out;
|
|
@@ -7941,7 +7948,7 @@ function resolveFontVariantInternal(family, weight, style, suppressWarn) {
|
|
|
7941
7948
|
return missResolveResult(family, weight, style, suppressWarn);
|
|
7942
7949
|
}
|
|
7943
7950
|
|
|
7944
|
-
// ../ui/dist/chunks/FontFamilySelect-
|
|
7951
|
+
// ../ui/dist/chunks/FontFamilySelect-DXlMKWfK.js
|
|
7945
7952
|
function a30(e28, t40, n45) {
|
|
7946
7953
|
let { substituted: r48 } = resolveFontVariant(e28, t40, n45);
|
|
7947
7954
|
return r48 ? `${e28} \u2014 not loaded, showing ${r48.resolved}` : `${e28} \u2014 not loaded`;
|
|
@@ -8077,731 +8084,6 @@ function u19(e28, n45) {
|
|
|
8077
8084
|
function d14(e28) {
|
|
8078
8085
|
return isMeshGradientFill(e28);
|
|
8079
8086
|
}
|
|
8080
|
-
|
|
8081
|
-
// ../geom/dist/index.js
|
|
8082
|
-
function identity() {
|
|
8083
|
-
return [1, 0, 0, 1, 0, 0];
|
|
8084
|
-
}
|
|
8085
|
-
function multiply(m26, n45) {
|
|
8086
|
-
return [
|
|
8087
|
-
m26[0] * n45[0] + m26[2] * n45[1],
|
|
8088
|
-
m26[1] * n45[0] + m26[3] * n45[1],
|
|
8089
|
-
m26[0] * n45[2] + m26[2] * n45[3],
|
|
8090
|
-
m26[1] * n45[2] + m26[3] * n45[3],
|
|
8091
|
-
m26[0] * n45[4] + m26[2] * n45[5] + m26[4],
|
|
8092
|
-
m26[1] * n45[4] + m26[3] * n45[5] + m26[5]
|
|
8093
|
-
];
|
|
8094
|
-
}
|
|
8095
|
-
var IDENTITY_MATRIX = identity();
|
|
8096
|
-
function isIdentity(m26, eps = 1e-9) {
|
|
8097
|
-
return Math.abs(m26[0] - 1) < eps && Math.abs(m26[1]) < eps && Math.abs(m26[2]) < eps && Math.abs(m26[3] - 1) < eps && Math.abs(m26[4]) < eps && Math.abs(m26[5]) < eps;
|
|
8098
|
-
}
|
|
8099
|
-
function formatMatrix(m26) {
|
|
8100
|
-
if (isIdentity(m26)) return null;
|
|
8101
|
-
return `matrix(${m26.map((n45) => trimNumber(n45)).join(" ")})`;
|
|
8102
|
-
}
|
|
8103
|
-
function trimNumber(n45) {
|
|
8104
|
-
if (!Number.isFinite(n45)) return "0";
|
|
8105
|
-
const r48 = Math.round(n45 * 1e6) / 1e6;
|
|
8106
|
-
if (Number.isInteger(r48)) return String(r48);
|
|
8107
|
-
return String(r48);
|
|
8108
|
-
}
|
|
8109
|
-
function anchorOffset(style, width) {
|
|
8110
|
-
const edge = resolveAlign(style?.align ?? "left", style?.direction ?? "ltr");
|
|
8111
|
-
return edge === "center" ? width / 2 : edge === "right" ? width : 0;
|
|
8112
|
-
}
|
|
8113
|
-
function patternSpecOf(paint) {
|
|
8114
|
-
return "tile" in paint.pattern ? paint.pattern : null;
|
|
8115
|
-
}
|
|
8116
|
-
function patternXml(id, paint, onWarn) {
|
|
8117
|
-
const spec = patternSpecOf(paint);
|
|
8118
|
-
if (!spec) {
|
|
8119
|
-
onWarn?.("pattern fill carries a TextureHandle, which has no vector form \u2014 omitted from <defs>");
|
|
8120
|
-
return "";
|
|
8121
|
-
}
|
|
8122
|
-
const geometry = tileGeometry(spec);
|
|
8123
|
-
const body = geometry.shapes.map(shapeXml).join("");
|
|
8124
|
-
const origin = paint.origin ?? { x: 0, y: 0 };
|
|
8125
|
-
const attrs = [
|
|
8126
|
-
`id="${id}"`,
|
|
8127
|
-
'patternUnits="userSpaceOnUse"',
|
|
8128
|
-
`width="${trimNumber(geometry.size)}"`,
|
|
8129
|
-
`height="${trimNumber(geometry.size)}"`
|
|
8130
|
-
];
|
|
8131
|
-
if (origin.x !== 0 || origin.y !== 0) {
|
|
8132
|
-
attrs.push(`x="${trimNumber(origin.x)}"`, `y="${trimNumber(origin.y)}"`);
|
|
8133
|
-
}
|
|
8134
|
-
attrs.push(`data-weasel-tile="${escapeAttr(JSON.stringify(spec))}"`);
|
|
8135
|
-
return `<pattern ${attrs.join(" ")}>${body}</pattern>`;
|
|
8136
|
-
}
|
|
8137
|
-
function tilePreviewSvg(spec, background) {
|
|
8138
|
-
const geometry = tileGeometry(spec);
|
|
8139
|
-
const s44 = trimNumber(geometry.size);
|
|
8140
|
-
const bg = "";
|
|
8141
|
-
return `<svg xmlns="http://www.w3.org/2000/svg" width="${s44}" height="${s44}" viewBox="0 0 ${s44} ${s44}">${bg}${geometry.shapes.map(shapeXml).join("")}</svg>`;
|
|
8142
|
-
}
|
|
8143
|
-
function tilePreviewCssUrl(spec, background) {
|
|
8144
|
-
return `url("data:image/svg+xml,${encodeURIComponent(tilePreviewSvg(spec))}")`;
|
|
8145
|
-
}
|
|
8146
|
-
function shapeXml(shape) {
|
|
8147
|
-
switch (shape.kind) {
|
|
8148
|
-
case "line":
|
|
8149
|
-
return `<line x1="${trimNumber(shape.x1)}" y1="${trimNumber(shape.y1)}" x2="${trimNumber(shape.x2)}" y2="${trimNumber(shape.y2)}" stroke="${shape.color}" stroke-width="${trimNumber(shape.width)}"/>`;
|
|
8150
|
-
case "circle":
|
|
8151
|
-
return `<circle cx="${trimNumber(shape.cx)}" cy="${trimNumber(shape.cy)}" r="${trimNumber(shape.r)}" fill="${shape.color}"/>`;
|
|
8152
|
-
case "ellipse": {
|
|
8153
|
-
const deg = shape.rotation * 180 / Math.PI;
|
|
8154
|
-
const transform = deg === 0 ? "" : ` transform="rotate(${trimNumber(deg)} ${trimNumber(shape.cx)} ${trimNumber(shape.cy)})"`;
|
|
8155
|
-
return `<ellipse cx="${trimNumber(shape.cx)}" cy="${trimNumber(shape.cy)}" rx="${trimNumber(shape.rx)}" ry="${trimNumber(shape.ry)}" fill="${shape.color}"${transform}/>`;
|
|
8156
|
-
}
|
|
8157
|
-
case "rect":
|
|
8158
|
-
return `<rect x="${trimNumber(shape.x)}" y="${trimNumber(shape.y)}" width="${trimNumber(shape.width)}" height="${trimNumber(shape.height)}" fill="${shape.color}"/>`;
|
|
8159
|
-
default:
|
|
8160
|
-
return "";
|
|
8161
|
-
}
|
|
8162
|
-
}
|
|
8163
|
-
function escapeAttr(s44) {
|
|
8164
|
-
return s44.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
8165
|
-
}
|
|
8166
|
-
function serializePathD(path) {
|
|
8167
|
-
if (path.kind === "rect") {
|
|
8168
|
-
const { x: x18, y: y18, width, height } = path;
|
|
8169
|
-
return `M${trimNumber(x18)} ${trimNumber(y18)}h${trimNumber(width)}v${trimNumber(height)}h${trimNumber(-width)}Z`;
|
|
8170
|
-
}
|
|
8171
|
-
const cmds = path.commands;
|
|
8172
|
-
const xs = path.coords;
|
|
8173
|
-
const out = [];
|
|
8174
|
-
let ci = 0;
|
|
8175
|
-
for (let i53 = 0; i53 < cmds.length; i53++) {
|
|
8176
|
-
const c42 = cmds[i53];
|
|
8177
|
-
if (c42 === PATH_M) {
|
|
8178
|
-
out.push(`M${trimNumber(xs[ci])} ${trimNumber(xs[ci + 1])}`);
|
|
8179
|
-
ci += 2;
|
|
8180
|
-
} else if (c42 === PATH_L) {
|
|
8181
|
-
out.push(`L${trimNumber(xs[ci])} ${trimNumber(xs[ci + 1])}`);
|
|
8182
|
-
ci += 2;
|
|
8183
|
-
} else if (c42 === PATH_C) {
|
|
8184
|
-
out.push(
|
|
8185
|
-
`C${trimNumber(xs[ci])} ${trimNumber(xs[ci + 1])} ${trimNumber(xs[ci + 2])} ${trimNumber(xs[ci + 3])} ${trimNumber(xs[ci + 4])} ${trimNumber(xs[ci + 5])}`
|
|
8186
|
-
);
|
|
8187
|
-
ci += 6;
|
|
8188
|
-
} else if (c42 === PATH_Q) {
|
|
8189
|
-
out.push(
|
|
8190
|
-
`Q${trimNumber(xs[ci])} ${trimNumber(xs[ci + 1])} ${trimNumber(xs[ci + 2])} ${trimNumber(xs[ci + 3])}`
|
|
8191
|
-
);
|
|
8192
|
-
ci += 4;
|
|
8193
|
-
} else if (c42 === PATH_Z) {
|
|
8194
|
-
out.push("Z");
|
|
8195
|
-
}
|
|
8196
|
-
}
|
|
8197
|
-
return out.join("");
|
|
8198
|
-
}
|
|
8199
|
-
var WEASEL_NS = "urn:weasel-js:svg";
|
|
8200
|
-
var WEASEL_NS_PREFIX = "wzl";
|
|
8201
|
-
function hasNativeSvgForm(paint) {
|
|
8202
|
-
const kind = paint.fill ?? "solid";
|
|
8203
|
-
return kind === "solid" || kind === "linear-gradient" || kind === "radial-gradient" || kind === "pattern";
|
|
8204
|
-
}
|
|
8205
|
-
var INTERPOLATE_SPACES = /* @__PURE__ */ new Set(["rgb", "oklab", "oklch"]);
|
|
8206
|
-
function interpolateAttr(space) {
|
|
8207
|
-
if (!space || space === "rgb") return "";
|
|
8208
|
-
return ` ${WEASEL_NS_PREFIX}:interpolate="${space}"`;
|
|
8209
|
-
}
|
|
8210
|
-
function usesInterpolateAttr(paint) {
|
|
8211
|
-
const space = paint.interpolate;
|
|
8212
|
-
return space != null && space !== "rgb" && INTERPOLATE_SPACES.has(space);
|
|
8213
|
-
}
|
|
8214
|
-
var PaintServerRegistry = class {
|
|
8215
|
-
byPaint = /* @__PURE__ */ new Map();
|
|
8216
|
-
order = [];
|
|
8217
|
-
counter = 0;
|
|
8218
|
-
// Marker keys referenced by any stroke, in first-use order. The `<defs>`
|
|
8219
|
-
// id is the marker key itself, not a minted counter id: `parseSvg` reads a
|
|
8220
|
-
// `marker-end="url(#id)"` fragment back as the marker key directly when the
|
|
8221
|
-
// registry knows it, so a synthetic id would come back as a stranger.
|
|
8222
|
-
markerKeys = [];
|
|
8223
|
-
markerKeySet = /* @__PURE__ */ new Set();
|
|
8224
|
-
// Clip paths, in first-use order. Identity, not value: two groups clipped by
|
|
8225
|
-
// equal outlines get a def each, which costs bytes and misleads nobody.
|
|
8226
|
-
clips = [];
|
|
8227
|
-
clipIds = /* @__PURE__ */ new Map();
|
|
8228
|
-
register(paint) {
|
|
8229
|
-
const existing = this.byPaint.get(paint);
|
|
8230
|
-
if (existing) return existing;
|
|
8231
|
-
const id = paint.fill === "pattern" ? `pat${this.counter++}` : `grad${this.counter++}`;
|
|
8232
|
-
this.byPaint.set(paint, id);
|
|
8233
|
-
this.order.push(paint);
|
|
8234
|
-
return id;
|
|
8235
|
-
}
|
|
8236
|
-
/**
|
|
8237
|
-
* The `fill` / `stroke` attribute value referencing this paint server: a
|
|
8238
|
-
* `url(#id)` reference, plus the fallback paint SVG's own grammar allows
|
|
8239
|
-
* after one for any kind SVG cannot express. A renderer that cannot resolve
|
|
8240
|
-
* the reference takes the fallback instead of dropping the fill, which is
|
|
8241
|
-
* the difference between a flat shape and a vanished one.
|
|
8242
|
-
*/
|
|
8243
|
-
ref(paint) {
|
|
8244
|
-
const id = this.register(paint);
|
|
8245
|
-
if (hasNativeSvgForm(paint)) return `url(#${id})`;
|
|
8246
|
-
return `url(#${id}) ${paintFallback(paint)}`;
|
|
8247
|
-
}
|
|
8248
|
-
/** Whether any registered paint serializes outside SVG's own vocabulary, so
|
|
8249
|
-
* the root has to declare {@link WEASEL_NS}. */
|
|
8250
|
-
usesPrivateNamespace() {
|
|
8251
|
-
return this.order.some((paint) => !hasNativeSvgForm(paint) || usesInterpolateAttr(paint));
|
|
8252
|
-
}
|
|
8253
|
-
/** The `<defs>` id for a marker key — the key itself, minting nothing.
|
|
8254
|
-
* `undefined` when nothing is registered under `key`, so a caller emits no
|
|
8255
|
-
* attribute at all rather than a `url(#…)` pointing at a def that will
|
|
8256
|
-
* never be written. */
|
|
8257
|
-
markerId(key) {
|
|
8258
|
-
if (getMarker(key) === void 0) return void 0;
|
|
8259
|
-
if (!this.markerKeySet.has(key)) {
|
|
8260
|
-
this.markerKeySet.add(key);
|
|
8261
|
-
this.markerKeys.push(key);
|
|
8262
|
-
}
|
|
8263
|
-
return key;
|
|
8264
|
-
}
|
|
8265
|
-
/** Mint (or recall) the `<defs>` id for a clip outline. */
|
|
8266
|
-
clipId(path) {
|
|
8267
|
-
const existing = this.clipIds.get(path);
|
|
8268
|
-
if (existing) return existing;
|
|
8269
|
-
const id = `clip${this.clips.length}`;
|
|
8270
|
-
this.clipIds.set(path, id);
|
|
8271
|
-
this.clips.push(path);
|
|
8272
|
-
return id;
|
|
8273
|
-
}
|
|
8274
|
-
/** Emit `<defs>...</defs>` XML for every registered paint server, marker
|
|
8275
|
-
* and clip path. */
|
|
8276
|
-
toDefsXml(onWarn) {
|
|
8277
|
-
if (this.order.length === 0 && this.markerKeys.length === 0 && this.clips.length === 0) {
|
|
8278
|
-
return "";
|
|
8279
|
-
}
|
|
8280
|
-
const parts = ["<defs>"];
|
|
8281
|
-
for (const paint of this.order) {
|
|
8282
|
-
parts.push(paintServerXml(this.byPaint.get(paint), paint, onWarn));
|
|
8283
|
-
}
|
|
8284
|
-
for (const key of this.markerKeys) {
|
|
8285
|
-
const entry = getMarker(key);
|
|
8286
|
-
if (!entry) continue;
|
|
8287
|
-
parts.push(entry.toSvg ? entry.toSvg(key, entry) : defaultMarkerXml(key, entry, onWarn));
|
|
8288
|
-
}
|
|
8289
|
-
for (const path of this.clips) {
|
|
8290
|
-
parts.push(
|
|
8291
|
-
`<clipPath id="${this.clipIds.get(path)}"><path d="${serializePathD(path)}"/></clipPath>`
|
|
8292
|
-
);
|
|
8293
|
-
}
|
|
8294
|
-
parts.push("</defs>");
|
|
8295
|
-
return parts.join("");
|
|
8296
|
-
}
|
|
8297
|
-
};
|
|
8298
|
-
function defaultMarkerXml(id, entry, onWarn) {
|
|
8299
|
-
const path = entry.path({ size: 1, stroke: { paint: { fill: "solid", color: "#000" } } });
|
|
8300
|
-
const d33 = serializePathD(path);
|
|
8301
|
-
const fill = markerPaintAttrs("fill", entry.fill, id, onWarn);
|
|
8302
|
-
const outline = entry.outline ? ` ${markerPaintAttrs("stroke", entry.outline.paint, id, onWarn)} stroke-width="${trimNumber(entry.outline.width)}" stroke-linecap="round" stroke-linejoin="round"` : "";
|
|
8303
|
-
const orient = typeof entry.orient === "number" ? trimNumber(entry.orient * 180 / Math.PI) : "auto-start-reverse";
|
|
8304
|
-
return `<marker id="${id}" markerUnits="strokeWidth" markerWidth="8" markerHeight="8" refX="0" refY="0" orient="${orient}" overflow="visible"><path d="${d33}" ${fill}${outline}/></marker>`;
|
|
8305
|
-
}
|
|
8306
|
-
function markerPaintAttrs(attr, paint, id, onWarn) {
|
|
8307
|
-
if (paint === "none") return `${attr}="none"`;
|
|
8308
|
-
if (paint === void 0 || paint === "line") return `${attr}="context-stroke"`;
|
|
8309
|
-
if ("color" in paint && (paint.fill === void 0 || paint.fill === "solid")) {
|
|
8310
|
-
return paint.opacity != null && paint.opacity !== 1 ? `${attr}="${paint.color}" ${attr}-opacity="${trimNumber(paint.opacity)}"` : `${attr}="${paint.color}"`;
|
|
8311
|
-
}
|
|
8312
|
-
onWarn?.(`marker "${id}" ${attr} is a paint server, which a <marker> def cannot reference here; written as the line's paint`);
|
|
8313
|
-
return `${attr}="context-stroke"`;
|
|
8314
|
-
}
|
|
8315
|
-
function paintServerXml(id, paint, onWarn) {
|
|
8316
|
-
if (paint.fill === "pattern") return patternXml(id, paint, onWarn);
|
|
8317
|
-
const builtin = gradientXml(id, paint);
|
|
8318
|
-
if (builtin) return builtin;
|
|
8319
|
-
const custom = getPaintKind(paint.fill)?.toSvg?.(id, paint);
|
|
8320
|
-
if (custom) return custom;
|
|
8321
|
-
onWarn?.(`${paint.fill} fill has no vector form \u2014 omitted from <defs>`);
|
|
8322
|
-
return "";
|
|
8323
|
-
}
|
|
8324
|
-
function gradientUnitsAttr(units) {
|
|
8325
|
-
return units === "bounds" ? "objectBoundingBox" : "userSpaceOnUse";
|
|
8326
|
-
}
|
|
8327
|
-
function gradientXml(id, paint) {
|
|
8328
|
-
if (paint.fill === "linear-gradient") {
|
|
8329
|
-
const stops = paint.stops.map(stopXml).join("");
|
|
8330
|
-
return `<linearGradient id="${id}" gradientUnits="${gradientUnitsAttr(paint.units)}" x1="${trimNumber(paint.from.x)}" y1="${trimNumber(paint.from.y)}" x2="${trimNumber(paint.to.x)}" y2="${trimNumber(paint.to.y)}"${interpolateAttr(paint.interpolate)}>${stops}</linearGradient>`;
|
|
8331
|
-
}
|
|
8332
|
-
if (paint.fill === "conic-gradient") {
|
|
8333
|
-
const stops = paint.stops.map(stopXml).join("");
|
|
8334
|
-
const P10 = WEASEL_NS_PREFIX;
|
|
8335
|
-
return `<${P10}:conicGradient id="${id}" gradientUnits="${gradientUnitsAttr(paint.units)}" cx="${trimNumber(paint.center.x)}" cy="${trimNumber(paint.center.y)}" angle="${trimNumber(paint.angle)}"${interpolateAttr(paint.interpolate)}>${stops}</${P10}:conicGradient>`;
|
|
8336
|
-
}
|
|
8337
|
-
if (paint.fill === "radial-gradient") {
|
|
8338
|
-
const stops = paint.stops.map(stopXml).join("");
|
|
8339
|
-
return `<radialGradient id="${id}" gradientUnits="${gradientUnitsAttr(paint.units)}" cx="${trimNumber(paint.center.x)}" cy="${trimNumber(paint.center.y)}" r="${trimNumber(paint.radius)}"${interpolateAttr(paint.interpolate)}>${stops}</radialGradient>`;
|
|
8340
|
-
}
|
|
8341
|
-
return "";
|
|
8342
|
-
}
|
|
8343
|
-
function paintFallback(paint) {
|
|
8344
|
-
const color = getPaintKind(paint.fill)?.colorOf(paint);
|
|
8345
|
-
if (!color) return "none";
|
|
8346
|
-
const packed = /^#([0-9a-f]{6})[0-9a-f]{2}$/i.exec(color);
|
|
8347
|
-
return packed ? `#${packed[1].toLowerCase()}` : color;
|
|
8348
|
-
}
|
|
8349
|
-
function stopXml(s44) {
|
|
8350
|
-
const m26 = /^#([0-9a-f]{6})([0-9a-f]{2})$/i.exec(s44.color);
|
|
8351
|
-
if (m26) {
|
|
8352
|
-
const alpha = parseInt(m26[2], 16) / 255;
|
|
8353
|
-
return `<stop offset="${trimNumber(s44.offset)}" stop-color="#${m26[1].toLowerCase()}" stop-opacity="${trimNumber(alpha)}"/>`;
|
|
8354
|
-
}
|
|
8355
|
-
return `<stop offset="${trimNumber(s44.offset)}" stop-color="${s44.color}"/>`;
|
|
8356
|
-
}
|
|
8357
|
-
function serializeSvg(nodes, opts = {}) {
|
|
8358
|
-
const registry2 = new PaintServerRegistry();
|
|
8359
|
-
registerPaintServers(nodes, registry2);
|
|
8360
|
-
const bounds = opts.viewBox ?? computeBounds(nodes);
|
|
8361
|
-
const vb = `${trimNumber(bounds.x)} ${trimNumber(bounds.y)} ${trimNumber(bounds.width)} ${trimNumber(bounds.height)}`;
|
|
8362
|
-
const namespaces = opts.namespaces ?? {};
|
|
8363
|
-
const rootAttrs = [`xmlns="http://www.w3.org/2000/svg"`];
|
|
8364
|
-
if (registry2.usesPrivateNamespace() && namespaces[WEASEL_NS_PREFIX] == null) {
|
|
8365
|
-
rootAttrs.push(`xmlns:${WEASEL_NS_PREFIX}="${WEASEL_NS}"`);
|
|
8366
|
-
}
|
|
8367
|
-
for (const [prefix, uri] of Object.entries(namespaces)) {
|
|
8368
|
-
rootAttrs.push(`xmlns:${prefix}="${escapeAttr2(uri)}"`);
|
|
8369
|
-
}
|
|
8370
|
-
rootAttrs.push(`viewBox="${vb}"`);
|
|
8371
|
-
if (opts.width != null) rootAttrs.push(`width="${trimNumber(opts.width)}"`);
|
|
8372
|
-
if (opts.height != null) rootAttrs.push(`height="${trimNumber(opts.height)}"`);
|
|
8373
|
-
if (opts.documentMeta) {
|
|
8374
|
-
for (const prefix of Object.keys(namespaces)) {
|
|
8375
|
-
const bucket = opts.documentMeta[prefix];
|
|
8376
|
-
if (!bucket?.attrs) continue;
|
|
8377
|
-
for (const [name, value] of Object.entries(bucket.attrs)) {
|
|
8378
|
-
rootAttrs.push(`${prefix}:${name}="${escapeAttr2(value)}"`);
|
|
8379
|
-
}
|
|
8380
|
-
}
|
|
8381
|
-
}
|
|
8382
|
-
let docMetaXml = "";
|
|
8383
|
-
if (opts.documentMeta) {
|
|
8384
|
-
for (const prefix of Object.keys(namespaces)) {
|
|
8385
|
-
const bucket = opts.documentMeta[prefix];
|
|
8386
|
-
if (!bucket?.elements) continue;
|
|
8387
|
-
for (const [localName2, list] of Object.entries(bucket.elements)) {
|
|
8388
|
-
for (const el of list) docMetaXml += namespacedElementXml(prefix, localName2, el);
|
|
8389
|
-
}
|
|
8390
|
-
}
|
|
8391
|
-
}
|
|
8392
|
-
const defsXml = registry2.toDefsXml(opts.onWarn);
|
|
8393
|
-
const said = /* @__PURE__ */ new Set();
|
|
8394
|
-
const warn = (m26) => {
|
|
8395
|
-
if (!opts.onWarn || said.has(m26)) return;
|
|
8396
|
-
said.add(m26);
|
|
8397
|
-
opts.onWarn(m26);
|
|
8398
|
-
};
|
|
8399
|
-
const bodyXml = nodes.map((n45) => nodeXml(n45, registry2, namespaces, warn)).join("");
|
|
8400
|
-
const titleXml = opts.title && opts.title.length > 0 ? `<title>${escapeText(opts.title)}</title>` : "";
|
|
8401
|
-
return `<svg ${rootAttrs.join(" ")}>${titleXml}${defsXml}${docMetaXml}${bodyXml}</svg>`;
|
|
8402
|
-
}
|
|
8403
|
-
function namespacedElementXml(prefix, localName2, el) {
|
|
8404
|
-
const attrs = [];
|
|
8405
|
-
for (const [name, value] of Object.entries(el.attrs)) {
|
|
8406
|
-
attrs.push(`${name}="${escapeAttr2(value)}"`);
|
|
8407
|
-
}
|
|
8408
|
-
const head = attrs.length > 0 ? `<${prefix}:${localName2} ${attrs.join(" ")}>` : `<${prefix}:${localName2}>`;
|
|
8409
|
-
let body = "";
|
|
8410
|
-
if (el.children) {
|
|
8411
|
-
for (const [childName, list] of Object.entries(el.children)) {
|
|
8412
|
-
for (const child of list) body += namespacedElementXml(prefix, childName, child);
|
|
8413
|
-
}
|
|
8414
|
-
} else if (el.text != null) {
|
|
8415
|
-
body = escapeText(el.text);
|
|
8416
|
-
}
|
|
8417
|
-
return `${head}${body}</${prefix}:${localName2}>`;
|
|
8418
|
-
}
|
|
8419
|
-
function metaAttrsXml(meta, namespaces) {
|
|
8420
|
-
if (!meta) return "";
|
|
8421
|
-
const parts = [];
|
|
8422
|
-
for (const prefix of Object.keys(namespaces)) {
|
|
8423
|
-
const bucket = meta[prefix];
|
|
8424
|
-
if (!bucket?.attrs) continue;
|
|
8425
|
-
for (const [name, value] of Object.entries(bucket.attrs)) {
|
|
8426
|
-
parts.push(`${prefix}:${name}="${escapeAttr2(value)}"`);
|
|
8427
|
-
}
|
|
8428
|
-
}
|
|
8429
|
-
return parts.length > 0 ? ` ${parts.join(" ")}` : "";
|
|
8430
|
-
}
|
|
8431
|
-
function metaElementsXml(meta, namespaces) {
|
|
8432
|
-
if (!meta) return "";
|
|
8433
|
-
let out = "";
|
|
8434
|
-
for (const prefix of Object.keys(namespaces)) {
|
|
8435
|
-
const bucket = meta[prefix];
|
|
8436
|
-
if (!bucket?.elements) continue;
|
|
8437
|
-
for (const [localName2, list] of Object.entries(bucket.elements)) {
|
|
8438
|
-
for (const el of list) out += namespacedElementXml(prefix, localName2, el);
|
|
8439
|
-
}
|
|
8440
|
-
}
|
|
8441
|
-
return out;
|
|
8442
|
-
}
|
|
8443
|
-
function registerPaintServers(nodes, registry2) {
|
|
8444
|
-
for (const n45 of nodes) {
|
|
8445
|
-
if (n45.kind === "group") {
|
|
8446
|
-
if (n45.clip) registry2.clipId(n45.clip);
|
|
8447
|
-
registerPaintServers(n45.children, registry2);
|
|
8448
|
-
} else if (n45.kind === "path") {
|
|
8449
|
-
if (n45.fill.kind === "gradient") registry2.register(n45.fill.paint);
|
|
8450
|
-
if (n45.stroke && n45.stroke.paint.kind === "gradient") registry2.register(n45.stroke.paint.paint);
|
|
8451
|
-
registerMarkers(n45.stroke, registry2);
|
|
8452
|
-
} else if (n45.kind === "text") {
|
|
8453
|
-
registerTextPaint(n45.fill, registry2);
|
|
8454
|
-
registerTextPaint(n45.stroke?.paint, registry2);
|
|
8455
|
-
registerMarkers(n45.stroke, registry2);
|
|
8456
|
-
for (const run of n45.runs ?? []) {
|
|
8457
|
-
registerTextPaint(run.fill, registry2);
|
|
8458
|
-
registerTextPaint(run.stroke?.paint, registry2);
|
|
8459
|
-
}
|
|
8460
|
-
}
|
|
8461
|
-
}
|
|
8462
|
-
}
|
|
8463
|
-
function registerTextPaint(paint, registry2) {
|
|
8464
|
-
if (paint && !("color" in paint)) registry2.register(paint);
|
|
8465
|
-
}
|
|
8466
|
-
function markerKeyOfRef(ref) {
|
|
8467
|
-
if (typeof ref === "string") return ref;
|
|
8468
|
-
if (ref && typeof ref === "object" && "key" in ref) return String(ref.key);
|
|
8469
|
-
return void 0;
|
|
8470
|
-
}
|
|
8471
|
-
function registerMarkers(stroke, registry2) {
|
|
8472
|
-
if (!stroke) return;
|
|
8473
|
-
for (const ref of [stroke.markerStart, stroke.markerMid, stroke.markerEnd]) {
|
|
8474
|
-
const key = markerKeyOfRef(ref);
|
|
8475
|
-
if (key) registry2.markerId(key);
|
|
8476
|
-
}
|
|
8477
|
-
}
|
|
8478
|
-
function nodeXml(node, registry2, namespaces, warn) {
|
|
8479
|
-
if (node.kind === "group") return groupXml(node, registry2, namespaces, warn);
|
|
8480
|
-
if (node.kind === "text") return textXml(node, registry2, namespaces, warn);
|
|
8481
|
-
if (node.kind === "image") return imageXml(node, namespaces);
|
|
8482
|
-
return pathXml(node, registry2, namespaces, warn);
|
|
8483
|
-
}
|
|
8484
|
-
function warnStrokeAlign(align, warn) {
|
|
8485
|
-
if (align && align !== "center") {
|
|
8486
|
-
warn(`a stroke aligned "${align}" of its edge is written centered: SVG has no stroke alignment`);
|
|
8487
|
-
}
|
|
8488
|
-
}
|
|
8489
|
-
function imageXml(node, namespaces) {
|
|
8490
|
-
const box = `x="${trimNumber(node.x)}" y="${trimNumber(node.y)}" width="${trimNumber(node.width)}" height="${trimNumber(node.height)}"`;
|
|
8491
|
-
const outer = [];
|
|
8492
|
-
if (node.opacity != null && node.opacity !== 1) {
|
|
8493
|
-
outer.push(`opacity="${trimNumber(node.opacity)}"`);
|
|
8494
|
-
}
|
|
8495
|
-
if (node.rotation != null && node.rotation !== 0) {
|
|
8496
|
-
const cx = node.x + node.width / 2;
|
|
8497
|
-
const cy = node.y + node.height / 2;
|
|
8498
|
-
const deg = node.rotation * 180 / Math.PI;
|
|
8499
|
-
outer.push(`transform="rotate(${trimNumber(deg)} ${trimNumber(cx)} ${trimNumber(cy)})"`);
|
|
8500
|
-
}
|
|
8501
|
-
const metaAttrs = metaAttrsXml(node.meta, namespaces);
|
|
8502
|
-
const metaEls = metaElementsXml(node.meta, namespaces);
|
|
8503
|
-
const href = `href="${escapeAttr2(node.href)}"`;
|
|
8504
|
-
if (!node.source && !node.flipX && !node.flipY) {
|
|
8505
|
-
const attrs = [href, box, 'preserveAspectRatio="none"', ...outer].join(" ");
|
|
8506
|
-
if (metaEls) return `<image ${attrs}${metaAttrs}>${metaEls}</image>`;
|
|
8507
|
-
return `<image ${attrs}${metaAttrs}/>`;
|
|
8508
|
-
}
|
|
8509
|
-
const src = node.source ?? { x: 0, y: 0, width: 1, height: 1 };
|
|
8510
|
-
const viewBox = [src.x, src.y, src.width, src.height].map(trimNumber).join(" ");
|
|
8511
|
-
const flip = node.flipX || node.flipY ? ` transform="matrix(${node.flipX ? -1 : 1} 0 0 ${node.flipY ? -1 : 1} ${trimNumber(node.flipX ? 2 * src.x + src.width : 0)} ${trimNumber(node.flipY ? 2 * src.y + src.height : 0)})"` : "";
|
|
8512
|
-
const head = ['<g data-weasel-image="true"', ...outer].join(" ");
|
|
8513
|
-
return `${head}${metaAttrs}><svg ${box} viewBox="${viewBox}" preserveAspectRatio="none"><image ${href} x="0" y="0" width="1" height="1" preserveAspectRatio="none"${flip}/></svg>${metaEls}</g>`;
|
|
8514
|
-
}
|
|
8515
|
-
function groupXml(node, registry2, namespaces, warn) {
|
|
8516
|
-
const attrs = [];
|
|
8517
|
-
if (node.transform) {
|
|
8518
|
-
const m26 = formatMatrix(node.transform);
|
|
8519
|
-
if (m26) attrs.push(`transform="${m26}"`);
|
|
8520
|
-
}
|
|
8521
|
-
if (node.clip) {
|
|
8522
|
-
attrs.push(`clip-path="url(#${registry2.clipId(node.clip)})"`);
|
|
8523
|
-
}
|
|
8524
|
-
if (node.opacity != null && node.opacity !== 1) {
|
|
8525
|
-
attrs.push(`opacity="${trimNumber(node.opacity)}"`);
|
|
8526
|
-
}
|
|
8527
|
-
const metaAttrs = metaAttrsXml(node.meta, namespaces);
|
|
8528
|
-
const head = attrs.length > 0 ? `<g ${attrs.join(" ")}${metaAttrs}>` : `<g${metaAttrs}>`;
|
|
8529
|
-
const body = node.children.map((c42) => nodeXml(c42, registry2, namespaces, warn)).join("");
|
|
8530
|
-
return `${head}${body}${metaElementsXml(node.meta, namespaces)}</g>`;
|
|
8531
|
-
}
|
|
8532
|
-
function pathXml(node, registry2, namespaces, warn) {
|
|
8533
|
-
const attrs = [`d="${serializePathD(node.path)}"`];
|
|
8534
|
-
const fillAttrs = paintAttrs(node.fill, "fill", registry2);
|
|
8535
|
-
for (const a54 of fillAttrs) attrs.push(a54);
|
|
8536
|
-
if (node.path.kind === "polygon" && node.path.fillRule === "evenodd") {
|
|
8537
|
-
attrs.push(`fill-rule="evenodd"`);
|
|
8538
|
-
}
|
|
8539
|
-
if (node.stroke) {
|
|
8540
|
-
const strokeAttrs = strokeAttrsFor(node.stroke, registry2, warn);
|
|
8541
|
-
for (const a54 of strokeAttrs) attrs.push(a54);
|
|
8542
|
-
} else {
|
|
8543
|
-
attrs.push('stroke="none"');
|
|
8544
|
-
}
|
|
8545
|
-
if (node.opacity != null && node.opacity !== 1) {
|
|
8546
|
-
attrs.push(`opacity="${trimNumber(node.opacity)}"`);
|
|
8547
|
-
}
|
|
8548
|
-
if (node.rotation != null && node.rotation !== 0) {
|
|
8549
|
-
const b18 = pathBounds(node.path);
|
|
8550
|
-
const cx = b18.minX + (b18.maxX - b18.minX) / 2;
|
|
8551
|
-
const cy = b18.minY + (b18.maxY - b18.minY) / 2;
|
|
8552
|
-
const deg = node.rotation * 180 / Math.PI;
|
|
8553
|
-
attrs.push(`transform="rotate(${trimNumber(deg)} ${trimNumber(cx)} ${trimNumber(cy)})"`);
|
|
8554
|
-
}
|
|
8555
|
-
const metaAttrs = metaAttrsXml(node.meta, namespaces);
|
|
8556
|
-
const metaEls = metaElementsXml(node.meta, namespaces);
|
|
8557
|
-
if (metaEls) {
|
|
8558
|
-
return `<path ${attrs.join(" ")}${metaAttrs}>${metaEls}</path>`;
|
|
8559
|
-
}
|
|
8560
|
-
return `<path ${attrs.join(" ")}${metaAttrs}/>`;
|
|
8561
|
-
}
|
|
8562
|
-
function paintAttrs(paint, name, registry2, includeOpacity = true) {
|
|
8563
|
-
if (paint.kind === "none") return [`${name}="none"`];
|
|
8564
|
-
if (paint.kind === "solid") {
|
|
8565
|
-
const out = [`${name}="${paint.color}"`];
|
|
8566
|
-
if (includeOpacity && paint.opacity != null && paint.opacity !== 1) {
|
|
8567
|
-
out.push(`${name}-opacity="${trimNumber(paint.opacity)}"`);
|
|
8568
|
-
}
|
|
8569
|
-
return out;
|
|
8570
|
-
}
|
|
8571
|
-
return [`${name}="${registry2.ref(paint.paint)}"`];
|
|
8572
|
-
}
|
|
8573
|
-
function strokeWidthAttrs(width) {
|
|
8574
|
-
if (typeof width === "number") return [`stroke-width="${trimNumber(width)}"`];
|
|
8575
|
-
return [`stroke-width="${trimNumber(width.px)}"`, 'vector-effect="non-scaling-stroke"'];
|
|
8576
|
-
}
|
|
8577
|
-
function coreStrokeAttrs(stroke, registry2, warn) {
|
|
8578
|
-
const paint = stroke?.paint;
|
|
8579
|
-
if (!stroke || !paint) return [];
|
|
8580
|
-
const width = stroke.width ?? 1;
|
|
8581
|
-
if (!((typeof width === "object" ? width.px : width) > 0)) return [];
|
|
8582
|
-
warnStrokeAlign(stroke.align, warn);
|
|
8583
|
-
const attrs = [];
|
|
8584
|
-
if ("color" in paint) {
|
|
8585
|
-
attrs.push(`stroke="${paint.color}"`);
|
|
8586
|
-
if (paint.opacity != null && paint.opacity !== 1) {
|
|
8587
|
-
attrs.push(`stroke-opacity="${trimNumber(paint.opacity)}"`);
|
|
8588
|
-
}
|
|
8589
|
-
} else {
|
|
8590
|
-
attrs.push(`stroke="${registry2.ref(paint)}"`);
|
|
8591
|
-
}
|
|
8592
|
-
attrs.push(...strokeWidthAttrs(width));
|
|
8593
|
-
if (stroke.cap) attrs.push(`stroke-linecap="${stroke.cap}"`);
|
|
8594
|
-
if (stroke.join) attrs.push(`stroke-linejoin="${stroke.join}"`);
|
|
8595
|
-
if (stroke.dash && stroke.dash.length > 0) {
|
|
8596
|
-
attrs.push(`stroke-dasharray="${stroke.dash.map(trimNumber).join(" ")}"`);
|
|
8597
|
-
}
|
|
8598
|
-
if (stroke.miterLimit != null) attrs.push(`stroke-miterlimit="${trimNumber(stroke.miterLimit)}"`);
|
|
8599
|
-
for (const [field, attr] of [
|
|
8600
|
-
["markerStart", "marker-start"],
|
|
8601
|
-
["markerMid", "marker-mid"],
|
|
8602
|
-
["markerEnd", "marker-end"]
|
|
8603
|
-
]) {
|
|
8604
|
-
const ref = stroke[field];
|
|
8605
|
-
if (ref === void 0) continue;
|
|
8606
|
-
const key = typeof ref === "string" ? ref : ref.key;
|
|
8607
|
-
const id = registry2.markerId(key);
|
|
8608
|
-
if (id === void 0) continue;
|
|
8609
|
-
attrs.push(`${attr}="url(#${id})"`);
|
|
8610
|
-
}
|
|
8611
|
-
return attrs;
|
|
8612
|
-
}
|
|
8613
|
-
function strokeAttrsFor(stroke, registry2, warn) {
|
|
8614
|
-
warnStrokeAlign(stroke.align, warn);
|
|
8615
|
-
const attrs = paintAttrs(stroke.paint, "stroke", registry2, false);
|
|
8616
|
-
attrs.push(...strokeWidthAttrs(stroke.width));
|
|
8617
|
-
const opacity = stroke.opacity ?? (stroke.paint.kind === "solid" ? stroke.paint.opacity : void 0);
|
|
8618
|
-
if (opacity != null && opacity !== 1) {
|
|
8619
|
-
attrs.push(`stroke-opacity="${trimNumber(opacity)}"`);
|
|
8620
|
-
}
|
|
8621
|
-
if (stroke.cap) {
|
|
8622
|
-
attrs.push(`stroke-linecap="${stroke.cap}"`);
|
|
8623
|
-
}
|
|
8624
|
-
if (stroke.join) {
|
|
8625
|
-
attrs.push(`stroke-linejoin="${stroke.join}"`);
|
|
8626
|
-
}
|
|
8627
|
-
if (stroke.dash && stroke.dash.length > 0) {
|
|
8628
|
-
attrs.push(`stroke-dasharray="${stroke.dash.map(trimNumber).join(" ")}"`);
|
|
8629
|
-
}
|
|
8630
|
-
if (stroke.miterLimit != null) {
|
|
8631
|
-
attrs.push(`stroke-miterlimit="${trimNumber(stroke.miterLimit)}"`);
|
|
8632
|
-
}
|
|
8633
|
-
for (const [field, attr] of [
|
|
8634
|
-
["markerStart", "marker-start"],
|
|
8635
|
-
["markerMid", "marker-mid"],
|
|
8636
|
-
["markerEnd", "marker-end"]
|
|
8637
|
-
]) {
|
|
8638
|
-
const ref = stroke[field];
|
|
8639
|
-
if (ref === void 0) continue;
|
|
8640
|
-
const id = registry2.markerId(ref);
|
|
8641
|
-
if (id === void 0) continue;
|
|
8642
|
-
attrs.push(`${attr}="url(#${id})"`);
|
|
8643
|
-
}
|
|
8644
|
-
return attrs;
|
|
8645
|
-
}
|
|
8646
|
-
function computeBounds(nodes) {
|
|
8647
|
-
let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
|
|
8648
|
-
const visit = (n45, ctm) => {
|
|
8649
|
-
if (n45.kind === "group") {
|
|
8650
|
-
const childCtm = n45.transform ? multiply(ctm, n45.transform) : ctm;
|
|
8651
|
-
n45.children.forEach((c42) => visit(c42, childCtm));
|
|
8652
|
-
return;
|
|
8653
|
-
}
|
|
8654
|
-
const b18 = n45.kind === "text" || n45.kind === "image" ? { minX: n45.x, minY: n45.y, maxX: n45.x + n45.width, maxY: n45.y + n45.height } : pathBounds(n45.path);
|
|
8655
|
-
const local = n45.rotation ? rotateAboutCenter(ctm, b18, n45.rotation) : ctm;
|
|
8656
|
-
for (const [x18, y18] of corners(b18)) {
|
|
8657
|
-
const px = local[0] * x18 + local[2] * y18 + local[4];
|
|
8658
|
-
const py = local[1] * x18 + local[3] * y18 + local[5];
|
|
8659
|
-
if (px < minX) minX = px;
|
|
8660
|
-
if (py < minY) minY = py;
|
|
8661
|
-
if (px > maxX) maxX = px;
|
|
8662
|
-
if (py > maxY) maxY = py;
|
|
8663
|
-
}
|
|
8664
|
-
};
|
|
8665
|
-
nodes.forEach((n45) => visit(n45, IDENTITY_MATRIX));
|
|
8666
|
-
if (!Number.isFinite(minX)) {
|
|
8667
|
-
return { x: 0, y: 0, width: 0, height: 0 };
|
|
8668
|
-
}
|
|
8669
|
-
return { x: minX, y: minY, width: maxX - minX, height: maxY - minY };
|
|
8670
|
-
}
|
|
8671
|
-
function corners(b18) {
|
|
8672
|
-
return [[b18.minX, b18.minY], [b18.maxX, b18.minY], [b18.maxX, b18.maxY], [b18.minX, b18.maxY]];
|
|
8673
|
-
}
|
|
8674
|
-
function rotateAboutCenter(ctm, b18, angle) {
|
|
8675
|
-
const cx = (b18.minX + b18.maxX) / 2;
|
|
8676
|
-
const cy = (b18.minY + b18.maxY) / 2;
|
|
8677
|
-
const c42 = Math.cos(angle);
|
|
8678
|
-
const s44 = Math.sin(angle);
|
|
8679
|
-
return multiply(ctm, [c42, s44, -s44, c42, cx - cx * c42 + cy * s44, cy - cx * s44 - cy * c42]);
|
|
8680
|
-
}
|
|
8681
|
-
function textXml(node, registry2, namespaces, warn) {
|
|
8682
|
-
const attrs = [
|
|
8683
|
-
`x="${trimNumber(node.x + anchorOffset(node.style, node.width))}"`,
|
|
8684
|
-
`y="${trimNumber(node.y)}"`,
|
|
8685
|
-
`dominant-baseline="text-before-edge"`,
|
|
8686
|
-
// The runs model stores real line breaks; SVG's default whitespace
|
|
8687
|
-
// handling would collapse them (and any indentation) away on re-import.
|
|
8688
|
-
`xml:space="preserve"`,
|
|
8689
|
-
`data-weasel-width="${trimNumber(node.width)}"`,
|
|
8690
|
-
`data-weasel-height="${trimNumber(node.height)}"`
|
|
8691
|
-
];
|
|
8692
|
-
const style = node.style;
|
|
8693
|
-
if (style?.fontSize != null) attrs.push(`font-size="${trimNumber(resolveScreenLength(style.fontSize, 1))}"`);
|
|
8694
|
-
if (style?.fontFamily) attrs.push(`font-family="${escapeAttr2(style.fontFamily)}"`);
|
|
8695
|
-
if (style?.fontWeight != null) attrs.push(`font-weight="${String(style.fontWeight)}"`);
|
|
8696
|
-
if (style?.fontStyle && style.fontStyle !== "normal") attrs.push(`font-style="${style.fontStyle}"`);
|
|
8697
|
-
const direction = style?.direction ?? "ltr";
|
|
8698
|
-
if (direction === "rtl") attrs.push('direction="rtl"');
|
|
8699
|
-
if (style?.align != null || direction === "rtl") {
|
|
8700
|
-
const align = style?.align ?? "left";
|
|
8701
|
-
const anchor = align === "center" ? "middle" : align === "start" ? "start" : align === "end" ? "end" : align === "left" === (direction === "ltr") ? "start" : "end";
|
|
8702
|
-
if (anchor !== "start") attrs.push(`text-anchor="${anchor}"`);
|
|
8703
|
-
}
|
|
8704
|
-
if (style?.letterSpacing != null && style.letterSpacing !== 0) {
|
|
8705
|
-
attrs.push(`letter-spacing="${trimNumber(resolveScreenLength(style.letterSpacing, 1))}"`);
|
|
8706
|
-
}
|
|
8707
|
-
const decoration = textDecorationValue(style?.underline, style?.strikethrough, style?.overline);
|
|
8708
|
-
if (decoration) attrs.push(`text-decoration="${decoration}"`);
|
|
8709
|
-
if (style?.textTransform && style.textTransform !== "none") {
|
|
8710
|
-
attrs.push(`style="text-transform:${style.textTransform}"`);
|
|
8711
|
-
}
|
|
8712
|
-
if (style?.wrap) {
|
|
8713
|
-
attrs.push('data-weasel-wrap="true"');
|
|
8714
|
-
warn("text that wraps at its box width is written unwrapped: SVG text does not wrap, so other readers draw one line per hard break (weasel reads the wrap back)");
|
|
8715
|
-
}
|
|
8716
|
-
if (node.verticalAlign && node.verticalAlign !== "top") {
|
|
8717
|
-
attrs.push(`data-weasel-vertical-align="${node.verticalAlign}"`);
|
|
8718
|
-
warn(`text aligned to the ${node.verticalAlign} of its box is written top-aligned: SVG text has no box, so other readers draw it at the top (weasel reads the alignment back)`);
|
|
8719
|
-
}
|
|
8720
|
-
if (node.fill === null) {
|
|
8721
|
-
attrs.push('fill="none"');
|
|
8722
|
-
} else if (node.fill) {
|
|
8723
|
-
if ("color" in node.fill) {
|
|
8724
|
-
attrs.push(`fill="${node.fill.color}"`);
|
|
8725
|
-
if (node.fill.opacity != null && node.fill.opacity !== 1) {
|
|
8726
|
-
attrs.push(`fill-opacity="${trimNumber(node.fill.opacity)}"`);
|
|
8727
|
-
}
|
|
8728
|
-
} else {
|
|
8729
|
-
attrs.push(`fill="${registry2.ref(node.fill)}"`);
|
|
8730
|
-
}
|
|
8731
|
-
}
|
|
8732
|
-
for (const a54 of coreStrokeAttrs(node.stroke, registry2, warn)) attrs.push(a54);
|
|
8733
|
-
if (node.opacity != null && node.opacity !== 1) {
|
|
8734
|
-
attrs.push(`opacity="${trimNumber(node.opacity)}"`);
|
|
8735
|
-
}
|
|
8736
|
-
if (node.rotation != null && node.rotation !== 0) {
|
|
8737
|
-
const cx = node.x + node.width / 2;
|
|
8738
|
-
const cy = node.y + node.height / 2;
|
|
8739
|
-
const deg = node.rotation * 180 / Math.PI;
|
|
8740
|
-
attrs.push(`transform="rotate(${trimNumber(deg)} ${trimNumber(cx)} ${trimNumber(cy)})"`);
|
|
8741
|
-
}
|
|
8742
|
-
const body = node.runs && node.runs.length > 0 ? node.runs.map((r48) => runXml(r48, registry2, warn)).join("") : escapeText(node.text);
|
|
8743
|
-
const metaAttrs = metaAttrsXml(node.meta, namespaces);
|
|
8744
|
-
const metaEls = metaElementsXml(node.meta, namespaces);
|
|
8745
|
-
return `<text ${attrs.join(" ")}${metaAttrs}>${body}${metaEls}</text>`;
|
|
8746
|
-
}
|
|
8747
|
-
function runXml(run, registry2, warn) {
|
|
8748
|
-
const attrs = [];
|
|
8749
|
-
if (run.bold) attrs.push(`font-weight="700"`);
|
|
8750
|
-
if (run.italic) attrs.push(`font-style="italic"`);
|
|
8751
|
-
if (run.fontFamily) attrs.push(`font-family="${escapeAttr2(run.fontFamily)}"`);
|
|
8752
|
-
const presetScale = run.script != null && run.baselineShift != null ? SCRIPT_METRICS[run.script].size : void 0;
|
|
8753
|
-
const scale = run.fontScale ?? presetScale;
|
|
8754
|
-
if (run.fontSize != null) attrs.push(`font-size="${trimNumber(resolveScreenLength(run.fontSize, 1))}"`);
|
|
8755
|
-
else if (scale != null) attrs.push(`font-size="${trimNumber(scale * 100)}%"`);
|
|
8756
|
-
if (run.baselineShift != null) {
|
|
8757
|
-
attrs.push(`baseline-shift="${trimNumber(run.baselineShift * 100)}%"`);
|
|
8758
|
-
} else if (run.script) {
|
|
8759
|
-
attrs.push(`baseline-shift="${run.script}"`);
|
|
8760
|
-
}
|
|
8761
|
-
if (run.letterSpacing != null) {
|
|
8762
|
-
attrs.push(`letter-spacing="${trimNumber(resolveScreenLength(run.letterSpacing, 1))}"`);
|
|
8763
|
-
}
|
|
8764
|
-
const runDecoration = textDecorationValue(run.underline, run.strikethrough, run.overline);
|
|
8765
|
-
if (runDecoration) attrs.push(`text-decoration="${runDecoration}"`);
|
|
8766
|
-
if (run.fill) {
|
|
8767
|
-
if ("color" in run.fill) {
|
|
8768
|
-
attrs.push(`fill="${run.fill.color}"`);
|
|
8769
|
-
} else {
|
|
8770
|
-
attrs.push(`fill="${registry2.ref(run.fill)}"`);
|
|
8771
|
-
}
|
|
8772
|
-
}
|
|
8773
|
-
for (const a54 of coreStrokeAttrs(run.stroke, registry2, warn)) attrs.push(a54);
|
|
8774
|
-
if (run.textTransform) attrs.push(`style="text-transform:${run.textTransform}"`);
|
|
8775
|
-
const head = attrs.length > 0 ? `<tspan ${attrs.join(" ")}>` : "<tspan>";
|
|
8776
|
-
return `${head}${escapeText(run.text)}</tspan>`;
|
|
8777
|
-
}
|
|
8778
|
-
function textDecorationValue(underline, strikethrough, overline) {
|
|
8779
|
-
const tokens = [];
|
|
8780
|
-
if (underline) tokens.push("underline");
|
|
8781
|
-
if (strikethrough) tokens.push("line-through");
|
|
8782
|
-
if (overline) tokens.push("overline");
|
|
8783
|
-
return tokens.length > 0 ? tokens.join(" ") : null;
|
|
8784
|
-
}
|
|
8785
|
-
function escapeAttr2(s44) {
|
|
8786
|
-
return s44.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<");
|
|
8787
|
-
}
|
|
8788
|
-
function escapeText(s44) {
|
|
8789
|
-
return s44.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
8790
|
-
}
|
|
8791
|
-
function pathBounds(path) {
|
|
8792
|
-
if (path.kind === "rect") {
|
|
8793
|
-
return {
|
|
8794
|
-
minX: path.x,
|
|
8795
|
-
minY: path.y,
|
|
8796
|
-
maxX: path.x + path.width,
|
|
8797
|
-
maxY: path.y + path.height
|
|
8798
|
-
};
|
|
8799
|
-
}
|
|
8800
|
-
const b18 = boundsOfPath(path);
|
|
8801
|
-
return { minX: b18.x, minY: b18.y, maxX: b18.x + b18.width, maxY: b18.y + b18.height };
|
|
8802
|
-
}
|
|
8803
|
-
|
|
8804
|
-
// ../ui/dist/chunks/PatternPicker-DdfpxoQy.js
|
|
8805
8087
|
var i31 = {
|
|
8806
8088
|
root: "_root_dgwqj_2",
|
|
8807
8089
|
grid: "_grid_dgwqj_9",
|
|
@@ -8907,7 +8189,7 @@ var v10 = [
|
|
|
8907
8189
|
function y8(e28) {
|
|
8908
8190
|
return e28 !== void 0 && v10.includes(e28.fill ?? "");
|
|
8909
8191
|
}
|
|
8910
|
-
function
|
|
8192
|
+
function b8(e28) {
|
|
8911
8193
|
return e28?.fill === "pattern";
|
|
8912
8194
|
}
|
|
8913
8195
|
function x8(e28) {
|
|
@@ -8984,7 +8266,7 @@ function S8(S17) {
|
|
|
8984
8266
|
onInput: O12,
|
|
8985
8267
|
onChange: k12
|
|
8986
8268
|
});
|
|
8987
|
-
if (
|
|
8269
|
+
if (b8(C14)) return /* @__PURE__ */ jsx(d15, {
|
|
8988
8270
|
value: C14,
|
|
8989
8271
|
color: L9(),
|
|
8990
8272
|
onChange: k12
|
|
@@ -9024,7 +8306,7 @@ function d17(e28, t40) {
|
|
|
9024
8306
|
return t40 ? "Mixed" : e28 === null ? "None" : e28 === void 0 ? "\u2014" : getPaintKind(e28.fill ?? "solid")?.label ?? e28.fill ?? "solid";
|
|
9025
8307
|
}
|
|
9026
8308
|
function f14(r48) {
|
|
9027
|
-
let { value: f30, mixed: p26 = false, unset: m26 = false, kinds: h25, allowNone: g22 = true, onInput: _21, onChange: v19, className: y18, portalContainer:
|
|
8309
|
+
let { value: f30, mixed: p26 = false, unset: m26 = false, kinds: h25, allowNone: g22 = true, onInput: _21, onChange: v19, className: y18, portalContainer: b17 } = r48, x18 = r48["aria-label"], { anchor: S17, portalProps: C14 } = c3(b17), w13 = p26 ? void 0 : o26(f30);
|
|
9028
8310
|
return /* @__PURE__ */ jsxs(DialogTrigger, { children: [
|
|
9029
8311
|
S17,
|
|
9030
8312
|
/* @__PURE__ */ jsxs(Button, {
|
|
@@ -9140,7 +8422,7 @@ function P5(e28, { density: t40, align: n45 }, r48) {
|
|
|
9140
8422
|
].filter(Boolean).join(" ");
|
|
9141
8423
|
}
|
|
9142
8424
|
var F6 = createContext(false);
|
|
9143
|
-
function
|
|
8425
|
+
function ae3({ title: e28, actions: t40, selectable: n45, children: i53, className: a54, density: o49, align: s44, stance: c42, tone: l40 }) {
|
|
9144
8426
|
let u37 = useContext(F6), d33 = n7({
|
|
9145
8427
|
stance: c42,
|
|
9146
8428
|
tone: l40
|
|
@@ -9168,17 +8450,18 @@ function ae2({ title: e28, actions: t40, selectable: n45, children: i53, classNa
|
|
|
9168
8450
|
})]
|
|
9169
8451
|
});
|
|
9170
8452
|
}
|
|
9171
|
-
var
|
|
8453
|
+
var oe2 = forwardRef(function({ children: e28, className: t40, pack: n45 = "auto-color", density: r48, align: i53 }, a54) {
|
|
8454
|
+
let o49 = `${N6.list}${n45 === "pairs" ? ` ${N6.listPairs}` : n45 === "one-up" ? ` ${N6.listOneUp}` : ""}`;
|
|
9172
8455
|
return /* @__PURE__ */ jsx("div", {
|
|
9173
8456
|
ref: a54,
|
|
9174
|
-
className: P5(
|
|
8457
|
+
className: P5(o49, {
|
|
9175
8458
|
density: r48,
|
|
9176
8459
|
align: i53
|
|
9177
8460
|
}, t40),
|
|
9178
8461
|
children: e28
|
|
9179
8462
|
});
|
|
9180
8463
|
});
|
|
9181
|
-
function
|
|
8464
|
+
function se2({ children: e28, className: t40 }) {
|
|
9182
8465
|
return /* @__PURE__ */ jsx("div", {
|
|
9183
8466
|
className: t40 ? `${N6.span} ${t40}` : N6.span,
|
|
9184
8467
|
children: e28
|
|
@@ -9201,7 +8484,7 @@ function L6({ label: e28, readout: t40, description: n45, variant: r48 = "defaul
|
|
|
9201
8484
|
].filter(Boolean).join(" "), {
|
|
9202
8485
|
density: u37,
|
|
9203
8486
|
align: d33
|
|
9204
|
-
}, l40),
|
|
8487
|
+
}, l40), b17 = _21 === "inline" && t40 != null, x18 = /* @__PURE__ */ jsxs("span", {
|
|
9205
8488
|
className: N6.rowLabel,
|
|
9206
8489
|
children: [
|
|
9207
8490
|
p26 ? /* @__PURE__ */ jsx(R4, {
|
|
@@ -9213,12 +8496,12 @@ function L6({ label: e28, readout: t40, description: n45, variant: r48 = "defaul
|
|
|
9213
8496
|
label: e28,
|
|
9214
8497
|
description: n45
|
|
9215
8498
|
}) : null,
|
|
9216
|
-
t40 != null && !
|
|
8499
|
+
t40 != null && !b17 && /* @__PURE__ */ jsx("em", {
|
|
9217
8500
|
className: N6.readout,
|
|
9218
8501
|
children: t40
|
|
9219
8502
|
})
|
|
9220
8503
|
]
|
|
9221
|
-
}), S17 =
|
|
8504
|
+
}), S17 = b17 ? /* @__PURE__ */ jsx("em", {
|
|
9222
8505
|
className: `${N6.readout} ${N6.readoutAfter}`,
|
|
9223
8506
|
children: t40
|
|
9224
8507
|
}) : null;
|
|
@@ -9342,13 +8625,13 @@ function U3(e28) {
|
|
|
9342
8625
|
case "boolean":
|
|
9343
8626
|
return /* @__PURE__ */ jsx(G3, { ...e28 });
|
|
9344
8627
|
case "number":
|
|
9345
|
-
return /* @__PURE__ */ jsx(
|
|
8628
|
+
return /* @__PURE__ */ jsx(ce2, { ...e28 });
|
|
9346
8629
|
case "string":
|
|
9347
8630
|
return /* @__PURE__ */ jsx(de2, { ...e28 });
|
|
9348
8631
|
case "enum":
|
|
9349
8632
|
return /* @__PURE__ */ jsx(fe3, { ...e28 });
|
|
9350
8633
|
case "color":
|
|
9351
|
-
return /* @__PURE__ */ jsx(
|
|
8634
|
+
return /* @__PURE__ */ jsx(pe2, { ...e28 });
|
|
9352
8635
|
case "paint":
|
|
9353
8636
|
return /* @__PURE__ */ jsx(he3, { ...e28 });
|
|
9354
8637
|
case "font-family":
|
|
@@ -9365,7 +8648,7 @@ function U3(e28) {
|
|
|
9365
8648
|
throw Error(`PropertyControl: no control for kind "${e28.kind}"`);
|
|
9366
8649
|
}
|
|
9367
8650
|
}
|
|
9368
|
-
function
|
|
8651
|
+
function W2({ mixed: e28, unset: t40, children: n45 }) {
|
|
9369
8652
|
return !e28 && !t40 ? /* @__PURE__ */ jsx(Fragment, { children: n45 }) : /* @__PURE__ */ jsx("span", {
|
|
9370
8653
|
className: N6.dimmed,
|
|
9371
8654
|
title: e28 ? "Mixed" : "Not set",
|
|
@@ -9391,7 +8674,7 @@ function G3(e28) {
|
|
|
9391
8674
|
mixedValues: e28.mixed ? ["on"] : [],
|
|
9392
8675
|
onChange: (t41) => e28.onChange(t41.includes("on"))
|
|
9393
8676
|
});
|
|
9394
|
-
if (e28.control === "switch") return /* @__PURE__ */ jsx(
|
|
8677
|
+
if (e28.control === "switch") return /* @__PURE__ */ jsx(W2, {
|
|
9395
8678
|
mixed: e28.mixed,
|
|
9396
8679
|
unset: e28.unset,
|
|
9397
8680
|
children: /* @__PURE__ */ jsx(a29, {
|
|
@@ -9416,7 +8699,7 @@ function G3(e28) {
|
|
|
9416
8699
|
checked: t40,
|
|
9417
8700
|
onChange: (t41) => e28.onChange(t41.target.checked)
|
|
9418
8701
|
});
|
|
9419
|
-
return /* @__PURE__ */ jsx(
|
|
8702
|
+
return /* @__PURE__ */ jsx(W2, {
|
|
9420
8703
|
unset: e28.unset,
|
|
9421
8704
|
children: r48
|
|
9422
8705
|
});
|
|
@@ -9438,7 +8721,7 @@ function q3(e28, t40) {
|
|
|
9438
8721
|
children: e28
|
|
9439
8722
|
}) : e28;
|
|
9440
8723
|
}
|
|
9441
|
-
function
|
|
8724
|
+
function ce2(e28) {
|
|
9442
8725
|
let t40 = e28.onInput ?? e28.onChange, n45 = K3(e28.onInput && ((t41) => {
|
|
9443
8726
|
if (t41 === "") return;
|
|
9444
8727
|
let n46 = Number(t41);
|
|
@@ -9539,13 +8822,13 @@ function Y2(t40) {
|
|
|
9539
8822
|
}
|
|
9540
8823
|
function X3(e28) {
|
|
9541
8824
|
let { min: t40, max: n45, step: r48 } = J2(e28);
|
|
9542
|
-
if (
|
|
8825
|
+
if (e28.mixed || typeof e28.value != "number" || !Number.isFinite(e28.value)) return /* @__PURE__ */ jsx(Fragment, { children: Z3("\u2014") });
|
|
9543
8826
|
let i53 = r48 >= 1 ? 0 : Math.min(6, Math.max(0, Math.ceil(-Math.log10(r48)))), s44 = e28.format ?? (e28.notation === "compact" ? (e29) => i16(e29, i53) : (e29) => t15(e29, {
|
|
9544
8827
|
useGrouping: false,
|
|
9545
8828
|
minimumFractionDigits: i53,
|
|
9546
8829
|
maximumFractionDigits: i53
|
|
9547
8830
|
}));
|
|
9548
|
-
return /* @__PURE__ */ jsx(
|
|
8831
|
+
return /* @__PURE__ */ jsx(le2, {
|
|
9549
8832
|
name: e28.name,
|
|
9550
8833
|
value: e28.value,
|
|
9551
8834
|
min: t40,
|
|
@@ -9566,7 +8849,7 @@ function Z3(e28) {
|
|
|
9566
8849
|
})
|
|
9567
8850
|
});
|
|
9568
8851
|
}
|
|
9569
|
-
function
|
|
8852
|
+
function le2({ name: e28, value: t40, min: n45, max: r48, format: a54, unit: o49, onCommit: s44 }) {
|
|
9570
8853
|
let [c42, l40] = useState(null), u37 = (e29) => {
|
|
9571
8854
|
let t41 = a54(e29);
|
|
9572
8855
|
return typeof t41 == "string" ? t41 : String(t41);
|
|
@@ -9737,7 +9020,7 @@ function $3(e28) {
|
|
|
9737
9020
|
alpha: 1
|
|
9738
9021
|
};
|
|
9739
9022
|
}
|
|
9740
|
-
function
|
|
9023
|
+
function pe2(e28) {
|
|
9741
9024
|
let t40 = e28.alpha === true, n45 = $3(e28.value), r48 = typeof e28.alpha == "number" ? e28.alpha : n45.alpha, i53 = (e29, n46) => t40 ? withAlpha01(e29, n46) : e29, a54 = (e29) => (t41) => e29(i53(t41, r48)), o49 = (e29, r49) => t40 ? e29 && ((t41) => e29(withAlpha01(n45.rgb, t41))) : r49, s44 = o49(e28.onChange, e28.onAlphaChange), c42 = o49(e28.onInput, e28.onAlphaInput);
|
|
9742
9025
|
if (e28.chrome === "framed") {
|
|
9743
9026
|
let t41 = e28.alpha !== void 0 && e28.alpha !== false, i54 = (t42, i55) => t42 && ((a55) => {
|
|
@@ -9758,7 +9041,7 @@ function pe3(e28) {
|
|
|
9758
9041
|
"aria-label": e28.name
|
|
9759
9042
|
});
|
|
9760
9043
|
}
|
|
9761
|
-
return /* @__PURE__ */ jsx(
|
|
9044
|
+
return /* @__PURE__ */ jsx(me2, {
|
|
9762
9045
|
p: e28,
|
|
9763
9046
|
rgb: n45.rgb,
|
|
9764
9047
|
alpha: e28.alpha === void 0 || e28.alpha === false ? void 0 : r48,
|
|
@@ -9768,7 +9051,7 @@ function pe3(e28) {
|
|
|
9768
9051
|
onAlphaInput: c42
|
|
9769
9052
|
});
|
|
9770
9053
|
}
|
|
9771
|
-
function
|
|
9054
|
+
function me2({ p: e28, rgb: t40, alpha: n45, onColorChange: r48, onColorInput: i53, onAlphaChange: a54, onAlphaInput: o49 }) {
|
|
9772
9055
|
let s44 = i53 ?? r48, l40 = K3(i53 && ((e29) => r48(e29))), u37 = o49 ?? a54, d33 = K3(o49 && a54 && ((e29) => a54(Number(e29))));
|
|
9773
9056
|
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("input", {
|
|
9774
9057
|
ref: l40,
|
|
@@ -9793,7 +9076,8 @@ function me3({ p: e28, rgb: t40, alpha: n45, onColorChange: r48, onColorInput: i
|
|
|
9793
9076
|
})] });
|
|
9794
9077
|
}
|
|
9795
9078
|
function he3(e28) {
|
|
9796
|
-
|
|
9079
|
+
let t40 = e28.control === "inline" ? S8 : f14;
|
|
9080
|
+
return /* @__PURE__ */ jsx(t40, {
|
|
9797
9081
|
className: e28.className,
|
|
9798
9082
|
value: e28.value,
|
|
9799
9083
|
mixed: e28.mixed,
|
|
@@ -9949,7 +9233,7 @@ function _12({ values: t40, min: n45, max: r48, step: a54, width: o49, height: s
|
|
|
9949
9233
|
})]
|
|
9950
9234
|
});
|
|
9951
9235
|
}
|
|
9952
|
-
function v11({ label: e28, summary: t40, children: r48, title: i53, footer: o49, layout: s44, description: f30, readout: p26, span: m26, density: g22, align: _21, auto: v19, onAutoChange:
|
|
9236
|
+
function v11({ label: e28, summary: t40, children: r48, title: i53, footer: o49, layout: s44, description: f30, readout: p26, span: m26, density: g22, align: _21, auto: v19, onAutoChange: b17 }) {
|
|
9953
9237
|
let [x18, S17] = useState(false), C14 = () => S17(false), w13 = typeof e28 == "string" ? e28 : void 0;
|
|
9954
9238
|
return /* @__PURE__ */ jsxs(L6, {
|
|
9955
9239
|
label: e28,
|
|
@@ -9960,7 +9244,7 @@ function v11({ label: e28, summary: t40, children: r48, title: i53, footer: o49,
|
|
|
9960
9244
|
density: g22,
|
|
9961
9245
|
align: _21,
|
|
9962
9246
|
auto: v19,
|
|
9963
|
-
onAutoChange:
|
|
9247
|
+
onAutoChange: b17,
|
|
9964
9248
|
group: true,
|
|
9965
9249
|
children: [/* @__PURE__ */ jsxs("button", {
|
|
9966
9250
|
type: "button",
|
|
@@ -9995,7 +9279,7 @@ function v11({ label: e28, summary: t40, children: r48, title: i53, footer: o49,
|
|
|
9995
9279
|
function y9({ render: e28, close: t40 }) {
|
|
9996
9280
|
return e28(t40);
|
|
9997
9281
|
}
|
|
9998
|
-
function
|
|
9282
|
+
function b9({ title: e28, leading: n45, actions: i53, description: a54, hidden: l40, collapsible: f30, defaultCollapsed: m26, collapsed: g22, onCollapsedChange: _21, children: v19, className: y18, span: b17, pack: x18 = "auto-color", density: S17, align: C14, stance: w13, tone: T13 }) {
|
|
9999
9283
|
let E12 = useId(), [D12, O12] = useState(m26 ?? false), k12 = n7({
|
|
10000
9284
|
stance: w13,
|
|
10001
9285
|
tone: T13
|
|
@@ -10003,7 +9287,7 @@ function b10({ title: e28, leading: n45, actions: i53, description: a54, hidden:
|
|
|
10003
9287
|
if (l40) return null;
|
|
10004
9288
|
let A11 = f30 ?? (m26 !== void 0 || g22 !== void 0 || _21 !== void 0), j11 = A11 && (g22 ?? D12), M12 = () => {
|
|
10005
9289
|
g22 === void 0 && O12(!j11), _21?.(!j11);
|
|
10006
|
-
}, N11 = `${N6.group}${x18 === "pairs" ? ` ${N6.groupPairs}` : x18 === "one-up" ? ` ${N6.groupOneUp}` : ""}`, P10 = P5(
|
|
9290
|
+
}, N11 = `${N6.group}${x18 === "pairs" ? ` ${N6.groupPairs}` : x18 === "one-up" ? ` ${N6.groupOneUp}` : ""}`, P10 = P5(b17 ? `${N11} ${N6.span}` : N11, {
|
|
10007
9291
|
density: S17,
|
|
10008
9292
|
align: C14
|
|
10009
9293
|
}, y18), F11 = /* @__PURE__ */ jsxs("h3", {
|
|
@@ -10050,11 +9334,12 @@ function b10({ title: e28, leading: n45, actions: i53, description: a54, hidden:
|
|
|
10050
9334
|
});
|
|
10051
9335
|
}
|
|
10052
9336
|
function x9({ title: e28, children: n45, className: r48, density: i53, align: a54, stance: s44, tone: l40 }) {
|
|
9337
|
+
let f30 = P5(N6.subpanel, {
|
|
9338
|
+
density: i53,
|
|
9339
|
+
align: a54
|
|
9340
|
+
}, r48);
|
|
10053
9341
|
return /* @__PURE__ */ jsxs("div", {
|
|
10054
|
-
className:
|
|
10055
|
-
density: i53,
|
|
10056
|
-
align: a54
|
|
10057
|
-
}, r48),
|
|
9342
|
+
className: f30,
|
|
10058
9343
|
...n7({
|
|
10059
9344
|
stance: s44,
|
|
10060
9345
|
tone: l40
|
|
@@ -10066,7 +9351,7 @@ function x9({ title: e28, children: n45, className: r48, density: i53, align: a5
|
|
|
10066
9351
|
});
|
|
10067
9352
|
}
|
|
10068
9353
|
|
|
10069
|
-
// ../ui/dist/chunks/ItemList.module-
|
|
9354
|
+
// ../ui/dist/chunks/ItemList.module-BSpCSxan.js
|
|
10070
9355
|
var e18 = {
|
|
10071
9356
|
list: "_list_1ugdl_4",
|
|
10072
9357
|
row: "_row_1ugdl_14",
|
|
@@ -10229,9 +9514,9 @@ function D7(t40) {
|
|
|
10229
9514
|
bodies: D12,
|
|
10230
9515
|
nudgers: R8,
|
|
10231
9516
|
keys: U6
|
|
10232
|
-
}, G7 = s44 ? o49 ?? [] : [];
|
|
9517
|
+
}, G7 = s44 ? o49 ?? [] : [], K7 = u37 ? `${x10.root} ${u37}` : x10.root;
|
|
10233
9518
|
return /* @__PURE__ */ jsxs("div", {
|
|
10234
|
-
className:
|
|
9519
|
+
className: K7,
|
|
10235
9520
|
children: [(a54 !== void 0 || G7.length > 0) && /* @__PURE__ */ jsxs("div", {
|
|
10236
9521
|
className: x10.head,
|
|
10237
9522
|
children: [a54 !== void 0 && /* @__PURE__ */ jsx("h2", {
|
|
@@ -10291,12 +9576,12 @@ function k7({ items: t40, parentId: n45, shared: r48, path: s44, level: d33 }) {
|
|
|
10291
9576
|
let [v19, y18] = useState(null), S17 = (e28) => {
|
|
10292
9577
|
y18(e28), _21.containerProps.ref(e28);
|
|
10293
9578
|
}, C14 = t40.map((e28) => r48.bodies.get(e28.id)), w13 = C14.some(E7), { draggedIds: T13, targetIndex: D12, ghost: O12 } = _21.state, F11 = (e28, i53, o49) => {
|
|
10294
|
-
let u37 = C14[i53], m26 = e28.children ?? [], v20 = !r48.collapsed.has(e28.id), y19 = `${r48.uid}${s44}-${i53}`,
|
|
9579
|
+
let u37 = C14[i53], m26 = e28.children ?? [], v20 = !r48.collapsed.has(e28.id), y19 = `${r48.uid}${s44}-${i53}`, b17 = o49 ? void 0 : _21.rowProps(e28.id, i53).onPointerDown, S18 = p26.includes(e28.id), w14 = [x10.entry];
|
|
10295
9580
|
o49 || (T13?.includes(e28.id) && w14.push(x10.dragging), D12 === i53 && !T13?.includes(e28.id) && w14.push(x10.dropBefore), D12 === t40.length && i53 === t40.length - 1 && w14.push(x10.dropAfter));
|
|
10296
9581
|
let O13 = /* @__PURE__ */ jsx(N7, {
|
|
10297
9582
|
item: e28,
|
|
10298
9583
|
shared: r48
|
|
10299
|
-
}), F12 = E7(u37) ? /* @__PURE__ */ jsx(
|
|
9584
|
+
}), F12 = E7(u37) ? /* @__PURE__ */ jsx(b9, {
|
|
10300
9585
|
className: x10.card,
|
|
10301
9586
|
title: e28.title ?? e28.label,
|
|
10302
9587
|
...e28.tone === void 0 ? {} : { tone: e28.tone },
|
|
@@ -10305,7 +9590,7 @@ function k7({ items: t40, parentId: n45, shared: r48, path: s44, level: d33 }) {
|
|
|
10305
9590
|
leading: /* @__PURE__ */ jsx(M7, {
|
|
10306
9591
|
item: e28,
|
|
10307
9592
|
reorder: f30.onReorder !== void 0,
|
|
10308
|
-
onPointerDown:
|
|
9593
|
+
onPointerDown: b17,
|
|
10309
9594
|
onNudge: (t41) => r48.nudgers.get(n45)?.(e28.id, t41)
|
|
10310
9595
|
}),
|
|
10311
9596
|
actions: o49 ? void 0 : O13,
|
|
@@ -10318,7 +9603,7 @@ function k7({ items: t40, parentId: n45, shared: r48, path: s44, level: d33 }) {
|
|
|
10318
9603
|
].filter(Boolean).join(" "),
|
|
10319
9604
|
"data-selected": S18 ? "true" : void 0,
|
|
10320
9605
|
"data-locked": e28.locked ? "true" : void 0,
|
|
10321
|
-
onPointerDown:
|
|
9606
|
+
onPointerDown: b17,
|
|
10322
9607
|
...o49 ? {} : {
|
|
10323
9608
|
role: "row",
|
|
10324
9609
|
"aria-level": d33,
|
|
@@ -10381,7 +9666,7 @@ function k7({ items: t40, parentId: n45, shared: r48, path: s44, level: d33 }) {
|
|
|
10381
9666
|
})]
|
|
10382
9667
|
}, e28.id);
|
|
10383
9668
|
};
|
|
10384
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [w13 ? /* @__PURE__ */ jsx(
|
|
9669
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [w13 ? /* @__PURE__ */ jsx(oe2, {
|
|
10385
9670
|
ref: S17,
|
|
10386
9671
|
className: `${x10.level} ${x10.cards}`,
|
|
10387
9672
|
children: t40.map((e28, t41) => F11(e28, t41, false))
|
|
@@ -10406,7 +9691,7 @@ function j7({ item: e28, reorder: n45 }) {
|
|
|
10406
9691
|
className: x10.lock,
|
|
10407
9692
|
role: "img",
|
|
10408
9693
|
"aria-label": "Locked",
|
|
10409
|
-
children: /* @__PURE__ */ jsx(
|
|
9694
|
+
children: /* @__PURE__ */ jsx(he, { size: 12 })
|
|
10410
9695
|
}) : !n45 && e28.badge === void 0 ? null : /* @__PURE__ */ jsx("span", {
|
|
10411
9696
|
className: x10.grip,
|
|
10412
9697
|
"aria-hidden": "true",
|
|
@@ -10418,7 +9703,7 @@ function M7({ item: e28, reorder: t40, onPointerDown: n45, onNudge: r48 }) {
|
|
|
10418
9703
|
item: e28,
|
|
10419
9704
|
reorder: t40
|
|
10420
9705
|
});
|
|
10421
|
-
if (
|
|
9706
|
+
if (t40 || e28.badge !== void 0) return /* @__PURE__ */ jsx("button", {
|
|
10422
9707
|
type: "button",
|
|
10423
9708
|
className: x10.handle,
|
|
10424
9709
|
"aria-label": `Drag to reorder ${e28.label}`,
|
|
@@ -10455,7 +9740,7 @@ function P6({ item: e28, shared: t40 }) {
|
|
|
10455
9740
|
iconOnly: true,
|
|
10456
9741
|
ariaLabel: `Remove ${e28.label}`,
|
|
10457
9742
|
onClick: () => i53(e28.id),
|
|
10458
|
-
children: /* @__PURE__ */ jsx(
|
|
9743
|
+
children: /* @__PURE__ */ jsx(V, { size: 14 })
|
|
10459
9744
|
})
|
|
10460
9745
|
});
|
|
10461
9746
|
}
|
|
@@ -10482,7 +9767,7 @@ function s26({ value: s44, onChange: c42, placeholder: l40, empty: u37 = "None",
|
|
|
10482
9767
|
c42(s44.filter((t40, n45) => n45 !== e28)), s44.length > 1 && g22(Math.max(0, e28 - 1));
|
|
10483
9768
|
}, y18 = (e28, t40) => {
|
|
10484
9769
|
e28.key === "Enter" ? (e28.preventDefault(), _21(t40 + 1)) : e28.key === "Backspace" && s44[t40] === "" && (e28.preventDefault(), v19(t40));
|
|
10485
|
-
},
|
|
9770
|
+
}, b17 = (e28) => `${f30 ?? "Entry"} ${e28 + 1}`;
|
|
10486
9771
|
return /* @__PURE__ */ jsxs("div", {
|
|
10487
9772
|
className: [o30.editor, p26].filter(Boolean).join(" "),
|
|
10488
9773
|
role: "group",
|
|
@@ -10500,7 +9785,7 @@ function s26({ value: s44, onChange: c42, placeholder: l40, empty: u37 = "None",
|
|
|
10500
9785
|
},
|
|
10501
9786
|
type: "text",
|
|
10502
9787
|
className: o30.input,
|
|
10503
|
-
"aria-label":
|
|
9788
|
+
"aria-label": b17(i53),
|
|
10504
9789
|
value: r48,
|
|
10505
9790
|
placeholder: l40,
|
|
10506
9791
|
onChange: (e28) => c42(s44.map((t40, n45) => n45 === i53 ? e28.target.value : t40)),
|
|
@@ -10509,7 +9794,7 @@ function s26({ value: s44, onChange: c42, placeholder: l40, empty: u37 = "None",
|
|
|
10509
9794
|
variant: "ghost",
|
|
10510
9795
|
size: "sm",
|
|
10511
9796
|
iconOnly: true,
|
|
10512
|
-
ariaLabel: `Remove ${
|
|
9797
|
+
ariaLabel: `Remove ${b17(i53)}`,
|
|
10513
9798
|
onClick: () => v19(i53),
|
|
10514
9799
|
children: "\xD7"
|
|
10515
9800
|
})]
|
|
@@ -10528,19 +9813,19 @@ function a36(r48) {
|
|
|
10528
9813
|
return [
|
|
10529
9814
|
{
|
|
10530
9815
|
value: "auto",
|
|
10531
|
-
label: /* @__PURE__ */ jsx(
|
|
9816
|
+
label: /* @__PURE__ */ jsx(te, { size: r48 }),
|
|
10532
9817
|
ariaLabel: "Auto",
|
|
10533
9818
|
tooltip: "Auto \u2014 follow the system"
|
|
10534
9819
|
},
|
|
10535
9820
|
{
|
|
10536
9821
|
value: "light",
|
|
10537
|
-
label: /* @__PURE__ */ jsx(
|
|
9822
|
+
label: /* @__PURE__ */ jsx(K, { size: r48 }),
|
|
10538
9823
|
ariaLabel: "Light",
|
|
10539
9824
|
tooltip: "Light"
|
|
10540
9825
|
},
|
|
10541
9826
|
{
|
|
10542
9827
|
value: "dark",
|
|
10543
|
-
label: /* @__PURE__ */ jsx(
|
|
9828
|
+
label: /* @__PURE__ */ jsx(q, { size: r48 }),
|
|
10544
9829
|
ariaLabel: "Dark",
|
|
10545
9830
|
tooltip: "Dark"
|
|
10546
9831
|
}
|
|
@@ -10564,7 +9849,7 @@ function s27({ value: e28, onChange: t40, ariaLabel: n45 = "Color mode", size: a
|
|
|
10564
9849
|
});
|
|
10565
9850
|
}
|
|
10566
9851
|
|
|
10567
|
-
// ../ui/dist/chunks/segmentedControl.module-
|
|
9852
|
+
// ../ui/dist/chunks/segmentedControl.module-Bv7DEg8f.js
|
|
10568
9853
|
var e19 = {
|
|
10569
9854
|
root: "_root_4jvk7_10",
|
|
10570
9855
|
segment: "_segment_4jvk7_32",
|
|
@@ -10645,7 +9930,7 @@ function a37(a54) {
|
|
|
10645
9930
|
});
|
|
10646
9931
|
}
|
|
10647
9932
|
|
|
10648
|
-
// ../ui/dist/chunks/paintValue-
|
|
9933
|
+
// ../ui/dist/chunks/paintValue-BpaGPjV3.js
|
|
10649
9934
|
function e20(e28) {
|
|
10650
9935
|
if (typeof e28 != "object" || !e28) return false;
|
|
10651
9936
|
let t40 = e28;
|
|
@@ -10848,28 +10133,32 @@ var n30 = {
|
|
|
10848
10133
|
segment: "_segment_1a09e_15"
|
|
10849
10134
|
};
|
|
10850
10135
|
function r35({ segments: r48, startCap: i53 = "flat", size: a54, variant: o49, depth: s44, gap: c42, className: l40, ...u37 }) {
|
|
10136
|
+
let d33 = [n30.row, l40].filter(Boolean).join(" "), f30 = c42 === void 0 ? void 0 : { "--powerline-gap": typeof c42 == "number" ? `${c42}px` : c42 };
|
|
10851
10137
|
return /* @__PURE__ */ jsx("span", {
|
|
10852
|
-
className:
|
|
10853
|
-
style:
|
|
10138
|
+
className: d33,
|
|
10139
|
+
style: f30,
|
|
10854
10140
|
"aria-label": u37["aria-label"],
|
|
10855
|
-
children: r48.map((c43, l41) =>
|
|
10856
|
-
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
|
|
10860
|
-
|
|
10861
|
-
|
|
10862
|
-
|
|
10863
|
-
|
|
10864
|
-
|
|
10865
|
-
|
|
10866
|
-
|
|
10867
|
-
|
|
10868
|
-
|
|
10869
|
-
|
|
10870
|
-
|
|
10871
|
-
|
|
10872
|
-
|
|
10141
|
+
children: r48.map((c43, l41) => {
|
|
10142
|
+
let u38 = l41 === 0 ? i53 : r48[l41 - 1].endCap ?? "flat", d34 = c43.endCap ?? "flat";
|
|
10143
|
+
return /* @__PURE__ */ jsx(Ht, {
|
|
10144
|
+
base: "powerline",
|
|
10145
|
+
baseParams: {
|
|
10146
|
+
leftEdge: u38,
|
|
10147
|
+
rightEdge: d34,
|
|
10148
|
+
...s44 !== void 0 && { depth: s44 }
|
|
10149
|
+
},
|
|
10150
|
+
status: c43.status,
|
|
10151
|
+
stance: c43.stance,
|
|
10152
|
+
tone: c43.tone,
|
|
10153
|
+
variant: c43.variant ?? o49,
|
|
10154
|
+
size: c43.size ?? a54,
|
|
10155
|
+
onClick: c43.onClick,
|
|
10156
|
+
href: c43.href,
|
|
10157
|
+
"aria-label": c43["aria-label"],
|
|
10158
|
+
className: n30.segment,
|
|
10159
|
+
children: c43.text
|
|
10160
|
+
}, l41);
|
|
10161
|
+
})
|
|
10873
10162
|
});
|
|
10874
10163
|
}
|
|
10875
10164
|
function y11(e28, t40 = 8) {
|
|
@@ -10880,9 +10169,9 @@ function y11(e28, t40 = 8) {
|
|
|
10880
10169
|
}
|
|
10881
10170
|
return n45;
|
|
10882
10171
|
}
|
|
10883
|
-
var
|
|
10172
|
+
var b11 = 700;
|
|
10884
10173
|
function x11(e28) {
|
|
10885
|
-
let { rootRef: t40, ids: n45, slack: r48 } = e28, [i53, a54] = useState(null), o49 = useRef(null), s44 = useRef(null), c42 = useRef(null), l40 = useCallback(() => {
|
|
10174
|
+
let { rootRef: t40, ids: n45, slack: r48 } = e28, [i53, a54] = useState(null), o49 = useRef(null), s44 = useRef(null), c42 = useRef(null), l40 = n45.join("\0"), u37 = useCallback(() => {
|
|
10886
10175
|
let e29 = t40.current;
|
|
10887
10176
|
if (!e29) return;
|
|
10888
10177
|
if (o49.current !== null) {
|
|
@@ -10900,33 +10189,33 @@ function x11(e28) {
|
|
|
10900
10189
|
a54(y11(s45, r48));
|
|
10901
10190
|
}, [
|
|
10902
10191
|
t40,
|
|
10903
|
-
|
|
10192
|
+
l40,
|
|
10904
10193
|
r48
|
|
10905
10194
|
]);
|
|
10906
10195
|
useEffect(() => {
|
|
10907
10196
|
let e29 = t40.current;
|
|
10908
|
-
if (e29) return
|
|
10909
|
-
}, [t40,
|
|
10910
|
-
let
|
|
10197
|
+
if (e29) return u37(), e29.addEventListener("scroll", u37, { passive: true }), () => e29.removeEventListener("scroll", u37);
|
|
10198
|
+
}, [t40, u37]);
|
|
10199
|
+
let d33 = useCallback((e29) => {
|
|
10911
10200
|
let n46 = t40.current;
|
|
10912
10201
|
if (!n46) return;
|
|
10913
10202
|
let r49 = n46.querySelector(`[data-spy-section="${CSS.escape(e29)}"]`);
|
|
10914
10203
|
o49.current = e29, a54(e29);
|
|
10915
10204
|
let i54 = () => {
|
|
10916
|
-
o49.current = null, n46.removeEventListener("scrollend", i54),
|
|
10205
|
+
o49.current = null, n46.removeEventListener("scrollend", i54), u37();
|
|
10917
10206
|
};
|
|
10918
|
-
if (c42.current?.(), s44.current !== null && clearTimeout(s44.current), c42.current = i54, s44.current = setTimeout(i54,
|
|
10919
|
-
let
|
|
10207
|
+
if (c42.current?.(), s44.current !== null && clearTimeout(s44.current), c42.current = i54, s44.current = setTimeout(i54, b11), n46.addEventListener("scrollend", i54), !r49) return;
|
|
10208
|
+
let l41 = r49.getBoundingClientRect().top - n46.getBoundingClientRect().top + n46.scrollTop;
|
|
10920
10209
|
n46.scrollTo?.({
|
|
10921
|
-
top:
|
|
10210
|
+
top: l41,
|
|
10922
10211
|
behavior: S11() ? "auto" : "smooth"
|
|
10923
10212
|
});
|
|
10924
|
-
}, [t40,
|
|
10213
|
+
}, [t40, u37]);
|
|
10925
10214
|
return useEffect(() => () => {
|
|
10926
10215
|
s44.current !== null && clearTimeout(s44.current), c42.current?.();
|
|
10927
10216
|
}, []), {
|
|
10928
10217
|
active: i53,
|
|
10929
|
-
scrollTo:
|
|
10218
|
+
scrollTo: d33
|
|
10930
10219
|
};
|
|
10931
10220
|
}
|
|
10932
10221
|
function S11() {
|
|
@@ -11039,8 +10328,9 @@ function E8({ ctx: e28 }) {
|
|
|
11039
10328
|
pref: d33,
|
|
11040
10329
|
value: a54?.[u37],
|
|
11041
10330
|
setValue: (e29) => {
|
|
10331
|
+
let t40 = a54 ?? n45.fromScalar?.(r48) ?? {};
|
|
11042
10332
|
i53({
|
|
11043
|
-
...
|
|
10333
|
+
...t40,
|
|
11044
10334
|
[u37]: e29
|
|
11045
10335
|
});
|
|
11046
10336
|
},
|
|
@@ -11173,7 +10463,7 @@ function A8(e28) {
|
|
|
11173
10463
|
t40,
|
|
11174
10464
|
s44,
|
|
11175
10465
|
h25
|
|
11176
|
-
]),
|
|
10466
|
+
]), b17 = {
|
|
11177
10467
|
values: n45,
|
|
11178
10468
|
onChange: i53,
|
|
11179
10469
|
renderers: a54
|
|
@@ -11189,7 +10479,7 @@ function A8(e28) {
|
|
|
11189
10479
|
return u37 === "rail" ? /* @__PURE__ */ jsx(j8, {
|
|
11190
10480
|
...e28,
|
|
11191
10481
|
root: y18,
|
|
11192
|
-
ctx:
|
|
10482
|
+
ctx: b17,
|
|
11193
10483
|
query: h25,
|
|
11194
10484
|
filterField: x18,
|
|
11195
10485
|
onClearFilter: () => _21("")
|
|
@@ -11203,11 +10493,11 @@ function A8(e28) {
|
|
|
11203
10493
|
children: Object.entries(y18.children).map(([e29, t41]) => /* @__PURE__ */ jsx("div", {
|
|
11204
10494
|
className: C10.column,
|
|
11205
10495
|
children: s28(t41) ? /* @__PURE__ */ jsx(w9, {
|
|
11206
|
-
ctx:
|
|
10496
|
+
ctx: b17,
|
|
11207
10497
|
path: e29,
|
|
11208
10498
|
pref: t41
|
|
11209
10499
|
}) : /* @__PURE__ */ jsx(P7, {
|
|
11210
|
-
ctx:
|
|
10500
|
+
ctx: b17,
|
|
11211
10501
|
group: t41,
|
|
11212
10502
|
path: e29,
|
|
11213
10503
|
depth: 0
|
|
@@ -11217,7 +10507,7 @@ function A8(e28) {
|
|
|
11217
10507
|
});
|
|
11218
10508
|
}
|
|
11219
10509
|
function j8(e28) {
|
|
11220
|
-
let { schema: t40, root: n45, ctx: r48, query: i53, filterField: o49, onClearFilter: s44, className: c42 } = e28, l40 = useMemo(() => n45 === null ? [] : d20(n45), [n45]), [u37, d33] = useState(() => e28.defaultSection ?? ""), m26 = e28.section ?? u37, h25 = l40.some((e29) => e29.path === m26 && e29.depth === 0) ? m26 : l40.find((e29) => e29.depth === 0)?.path ?? "", y18 = useRef(null),
|
|
10510
|
+
let { schema: t40, root: n45, ctx: r48, query: i53, filterField: o49, onClearFilter: s44, className: c42 } = e28, l40 = useMemo(() => n45 === null ? [] : d20(n45), [n45]), [u37, d33] = useState(() => e28.defaultSection ?? ""), m26 = e28.section ?? u37, h25 = l40.some((e29) => e29.path === m26 && e29.depth === 0) ? m26 : l40.find((e29) => e29.depth === 0)?.path ?? "", y18 = useRef(null), b17 = x11({
|
|
11221
10511
|
rootRef: y18,
|
|
11222
10512
|
ids: useMemo(() => l40.filter((e29) => e29.depth === 1 && e29.section === h25).map((e29) => e29.path), [l40, h25])
|
|
11223
10513
|
}), S17 = (t41) => {
|
|
@@ -11228,9 +10518,9 @@ function j8(e28) {
|
|
|
11228
10518
|
children: [/* @__PURE__ */ jsx(k8, {
|
|
11229
10519
|
items: l40,
|
|
11230
10520
|
section: h25,
|
|
11231
|
-
current:
|
|
10521
|
+
current: b17.active,
|
|
11232
10522
|
onOpen: S17,
|
|
11233
|
-
onScrollTo:
|
|
10523
|
+
onScrollTo: b17.scrollTo,
|
|
11234
10524
|
ariaLabel: t40.name,
|
|
11235
10525
|
header: o49,
|
|
11236
10526
|
showCounts: i53.trim() !== ""
|
|
@@ -11332,14 +10622,14 @@ var t30 = {
|
|
|
11332
10622
|
right: "_right_1vns0_12"
|
|
11333
10623
|
};
|
|
11334
10624
|
function n31(n45) {
|
|
11335
|
-
let { side: r48, ariaLabel: i53, children: a54, className: o49, style: s44 } = n45
|
|
10625
|
+
let { side: r48, ariaLabel: i53, children: a54, className: o49, style: s44 } = n45, c42 = [
|
|
10626
|
+
t30.sidebar,
|
|
10627
|
+
r48 === "left" && t30.left,
|
|
10628
|
+
r48 === "right" && t30.right,
|
|
10629
|
+
o49
|
|
10630
|
+
].filter(Boolean).join(" ");
|
|
11336
10631
|
return /* @__PURE__ */ jsx("aside", {
|
|
11337
|
-
className:
|
|
11338
|
-
t30.sidebar,
|
|
11339
|
-
r48 === "left" && t30.left,
|
|
11340
|
-
r48 === "right" && t30.right,
|
|
11341
|
-
o49
|
|
11342
|
-
].filter(Boolean).join(" "),
|
|
10632
|
+
className: c42,
|
|
11343
10633
|
"aria-label": i53,
|
|
11344
10634
|
style: s44,
|
|
11345
10635
|
children: a54
|
|
@@ -11440,13 +10730,13 @@ var t31 = {
|
|
|
11440
10730
|
horizontal: "_horizontal_1gc9v_6"
|
|
11441
10731
|
};
|
|
11442
10732
|
function n33(n45) {
|
|
11443
|
-
let { children: r48, orientation: i53 = "vertical", groupKey: a54, ariaLabel: o49, className: s44 } = n45
|
|
10733
|
+
let { children: r48, orientation: i53 = "vertical", groupKey: a54, ariaLabel: o49, className: s44 } = n45, c42 = [
|
|
10734
|
+
t31.group,
|
|
10735
|
+
i53 === "horizontal" && t31.horizontal,
|
|
10736
|
+
s44
|
|
10737
|
+
].filter(Boolean).join(" ");
|
|
11444
10738
|
return /* @__PURE__ */ jsx("div", {
|
|
11445
|
-
className:
|
|
11446
|
-
t31.group,
|
|
11447
|
-
i53 === "horizontal" && t31.horizontal,
|
|
11448
|
-
s44
|
|
11449
|
-
].filter(Boolean).join(" "),
|
|
10739
|
+
className: c42,
|
|
11450
10740
|
role: "group",
|
|
11451
10741
|
"data-group": a54,
|
|
11452
10742
|
"aria-label": o49,
|
|
@@ -11468,7 +10758,7 @@ function eligibleContribution(reg, entry) {
|
|
|
11468
10758
|
return eligibleForMode(reg.current(), entry.eligibility?.capabilities ?? []);
|
|
11469
10759
|
}
|
|
11470
10760
|
|
|
11471
|
-
// ../ui/dist/chunks/ToolPalette-
|
|
10761
|
+
// ../ui/dist/chunks/ToolPalette-CKG9qY6P.js
|
|
11472
10762
|
var l26 = {
|
|
11473
10763
|
palette: "_palette_zei9m_1",
|
|
11474
10764
|
horizontal: "_horizontal_zei9m_11",
|
|
@@ -11503,11 +10793,11 @@ function m17(e28) {
|
|
|
11503
10793
|
return t40 == null ? /* @__PURE__ */ jsx(UnknownIcon, {}) : typeof t40 == "function" ? t40(void 0) : t40;
|
|
11504
10794
|
}
|
|
11505
10795
|
function h16(i53) {
|
|
11506
|
-
let { tools: d33, orientation: h25 = "vertical", className: g22, lookupShortcut: _21, modeRegistry: v19, groupOrder: y18 = u25 } = i53,
|
|
10796
|
+
let { tools: d33, orientation: h25 = "vertical", className: g22, lookupShortcut: _21, modeRegistry: v19, groupOrder: y18 = u25 } = i53, b17 = f19(Object.values(d33.registry)), x18 = p17(b17, y18), S17 = [
|
|
11507
10797
|
l26.palette,
|
|
11508
10798
|
h25 === "horizontal" && l26.horizontal,
|
|
11509
10799
|
g22
|
|
11510
|
-
].filter(Boolean).join(" "), C14 = x18.flatMap((e28) =>
|
|
10800
|
+
].filter(Boolean).join(" "), C14 = x18.flatMap((e28) => b17.get(e28)), w13 = C14.map((e28) => !v19 || eligibleContribution(v19, e28)), T13 = C14.findIndex((e28) => e28.id === d33.active), E12 = a23({
|
|
11511
10801
|
items: w13.map((e28) => ({ disabled: !e28 })),
|
|
11512
10802
|
itemClassName: l26.paletteBtn,
|
|
11513
10803
|
...T13 >= 0 && w13[T13] ? { tabStopIndex: T13 } : {}
|
|
@@ -11524,7 +10814,7 @@ function h16(i53) {
|
|
|
11524
10814
|
}), /* @__PURE__ */ jsx(n33, {
|
|
11525
10815
|
orientation: h25,
|
|
11526
10816
|
groupKey: t40,
|
|
11527
|
-
children:
|
|
10817
|
+
children: b17.get(t40).map((t41) => {
|
|
11528
10818
|
let r48 = ++D12, i55 = t41.presentation?.label ?? t41.id, o49 = t41.presentation?.shortcut ?? n4(_21 ? _21(t41.id) : t41.keybinding), s44 = w13[r48], c42 = v19 ? v19.current().id : void 0, u37 = !s44 && c42 ? `${i55}${o49 ? ` (${o49})` : ""} \u2014 disabled in ${c42} mode` : void 0;
|
|
11529
10819
|
return /* @__PURE__ */ jsx(o34, {
|
|
11530
10820
|
icon: m17(t41),
|
|
@@ -11585,9 +10875,9 @@ var u26 = {
|
|
|
11585
10875
|
item: "_item_1wmxr_60"
|
|
11586
10876
|
};
|
|
11587
10877
|
function d23({ label: d33, items: f30, onAction: p26, isDisabled: m26, className: h25, "aria-label": g22, portalContainer: _21, shortcut: v19, tooltip: y18 }) {
|
|
11588
|
-
let { anchor:
|
|
10878
|
+
let { anchor: b17, portalProps: x18 } = c3(_21);
|
|
11589
10879
|
return /* @__PURE__ */ jsxs(MenuTrigger, { children: [
|
|
11590
|
-
|
|
10880
|
+
b17,
|
|
11591
10881
|
/* @__PURE__ */ jsx(s6, {
|
|
11592
10882
|
content: a8({
|
|
11593
10883
|
tooltip: y18,
|
|
@@ -11675,7 +10965,7 @@ function y12(i53) {
|
|
|
11675
10965
|
className: r18.label,
|
|
11676
10966
|
children: a54
|
|
11677
10967
|
}),
|
|
11678
|
-
/* @__PURE__ */ jsx(
|
|
10968
|
+
/* @__PURE__ */ jsx(b12, {
|
|
11679
10969
|
placeholder: l40,
|
|
11680
10970
|
isLoading: O12,
|
|
11681
10971
|
onCommitText: A11 && ((e28) => A11({
|
|
@@ -11722,7 +11012,7 @@ function y12(i53) {
|
|
|
11722
11012
|
]
|
|
11723
11013
|
});
|
|
11724
11014
|
}
|
|
11725
|
-
function
|
|
11015
|
+
function b12({ placeholder: e28, isLoading: t40, onCommitText: i53, children: a54 }) {
|
|
11726
11016
|
let c42 = useContext(ComboBoxStateContext);
|
|
11727
11017
|
return /* @__PURE__ */ jsxs("div", {
|
|
11728
11018
|
className: _15.frame,
|
|
@@ -11821,8 +11111,8 @@ var h18 = {
|
|
|
11821
11111
|
footer: "_footer_1jx7k_271"
|
|
11822
11112
|
};
|
|
11823
11113
|
function g16(u37) {
|
|
11824
|
-
let { children: g22, className: _21, title: v19, footer: y18, stance:
|
|
11825
|
-
stance:
|
|
11114
|
+
let { children: g22, className: _21, title: v19, footer: y18, stance: b17 = "notice", tone: x18, modal: S17 = false, showCloseButton: C14, onDismiss: w13, triggerRef: T13, anchorRect: E12, placement: D12 = "top", offset: O12 = 12, maxHeight: k12 = 400, onOpenChange: A11, shouldCloseOnInteractOutside: j11, "aria-label": M12, "aria-labelledby": N11, portalContainer: P10, ...F11 } = u37, I9 = useRef(null), L9 = n7({
|
|
11115
|
+
stance: b17,
|
|
11826
11116
|
tone: x18
|
|
11827
11117
|
}), { anchor: R8, portalProps: z7 } = c3(P10), B6 = C14 ?? !S17, V6 = useRef(w13);
|
|
11828
11118
|
V6.current = w13;
|
|
@@ -11832,7 +11122,7 @@ function g16(u37) {
|
|
|
11832
11122
|
U6.current?.removeEventListener("keydown", H6.current), U6.current = e28, e28?.addEventListener("keydown", H6.current);
|
|
11833
11123
|
}, []), G7 = useId(), K7 = E12 !== void 0;
|
|
11834
11124
|
useEffect(() => {
|
|
11835
|
-
|
|
11125
|
+
K7 && typeof window < "u" && window.dispatchEvent(new Event("resize"));
|
|
11836
11126
|
}, [
|
|
11837
11127
|
K7,
|
|
11838
11128
|
E12?.x,
|
|
@@ -11840,7 +11130,7 @@ function g16(u37) {
|
|
|
11840
11130
|
E12?.width,
|
|
11841
11131
|
E12?.height
|
|
11842
11132
|
]);
|
|
11843
|
-
let q7 = S17 && v19 !== void 0 ? G7 : N11,
|
|
11133
|
+
let q7 = S17 && v19 !== void 0 ? G7 : N11, J7 = S17 ? M12 : void 0;
|
|
11844
11134
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11845
11135
|
R8,
|
|
11846
11136
|
E12 !== void 0 && createPortal(/* @__PURE__ */ jsx("span", {
|
|
@@ -11864,7 +11154,7 @@ function g16(u37) {
|
|
|
11864
11154
|
maxHeight: k12,
|
|
11865
11155
|
onOpenChange: A11,
|
|
11866
11156
|
shouldCloseOnInteractOutside: j11 ?? (S17 ? () => false : void 0),
|
|
11867
|
-
"aria-label":
|
|
11157
|
+
"aria-label": J7,
|
|
11868
11158
|
"aria-labelledby": q7,
|
|
11869
11159
|
className: [h18.popover, _21].filter(Boolean).join(" "),
|
|
11870
11160
|
...L9,
|
|
@@ -11917,13 +11207,14 @@ function g16(u37) {
|
|
|
11917
11207
|
] });
|
|
11918
11208
|
}
|
|
11919
11209
|
function n38(n45) {
|
|
11920
|
-
|
|
11210
|
+
let r48 = {
|
|
11921
11211
|
...n45,
|
|
11922
11212
|
addPointMode: n45.addPointMode ?? "click-empty",
|
|
11923
11213
|
curve: false,
|
|
11924
11214
|
fill: false,
|
|
11925
11215
|
endpoints: "free"
|
|
11926
|
-
}
|
|
11216
|
+
};
|
|
11217
|
+
return /* @__PURE__ */ jsx(L4, { ...r48 });
|
|
11927
11218
|
}
|
|
11928
11219
|
var g17 = /^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/i;
|
|
11929
11220
|
var _16 = /^rgba?\(\s*(\d{1,3})[\s,]+(\d{1,3})[\s,]+(\d{1,3})\b/i;
|
|
@@ -11950,10 +11241,10 @@ var y13 = /* @__PURE__ */ new Set([
|
|
|
11950
11241
|
"pink",
|
|
11951
11242
|
"brown"
|
|
11952
11243
|
]);
|
|
11953
|
-
function
|
|
11244
|
+
function b13() {
|
|
11954
11245
|
return typeof CSS < "u" && typeof CSS.supports == "function" ? (e28) => CSS.supports("color", e28) : null;
|
|
11955
11246
|
}
|
|
11956
|
-
function x13(e28, t40 =
|
|
11247
|
+
function x13(e28, t40 = b13()) {
|
|
11957
11248
|
let n45 = e28.trim();
|
|
11958
11249
|
return !n45 || n45.includes("var(") ? false : t40 ? t40(n45) : g17.test(n45) || v15.test(n45) || y13.has(n45.toLowerCase());
|
|
11959
11250
|
}
|
|
@@ -12115,7 +11406,7 @@ function U4(e28) {
|
|
|
12115
11406
|
unit: t40[2] ?? ""
|
|
12116
11407
|
} : null;
|
|
12117
11408
|
}
|
|
12118
|
-
function
|
|
11409
|
+
function W3(e28) {
|
|
12119
11410
|
let t40 = L7.exec(e28.trim());
|
|
12120
11411
|
if (!t40) return null;
|
|
12121
11412
|
let [n45, r48, i53, a54] = t40.slice(1, 5).map(Number);
|
|
@@ -12212,17 +11503,20 @@ function Q4({ token: e28, set: t40 }) {
|
|
|
12212
11503
|
children: e29.unit
|
|
12213
11504
|
}) : null] });
|
|
12214
11505
|
}
|
|
12215
|
-
if (r48 === "fontWeight")
|
|
12216
|
-
|
|
12217
|
-
|
|
12218
|
-
|
|
12219
|
-
|
|
12220
|
-
|
|
12221
|
-
label:
|
|
12222
|
-
|
|
12223
|
-
|
|
12224
|
-
|
|
12225
|
-
|
|
11506
|
+
if (r48 === "fontWeight") {
|
|
11507
|
+
let e29 = (G4.includes(s44) ? G4 : [...G4, s44]).map((e30) => ({
|
|
11508
|
+
value: e30,
|
|
11509
|
+
label: e30
|
|
11510
|
+
}));
|
|
11511
|
+
return /* @__PURE__ */ jsx(T5, {
|
|
11512
|
+
"aria-label": n45,
|
|
11513
|
+
width: "fit",
|
|
11514
|
+
selectedKey: s44,
|
|
11515
|
+
options: e29,
|
|
11516
|
+
onSelectionChange: t40
|
|
11517
|
+
});
|
|
11518
|
+
}
|
|
11519
|
+
let m26 = r48 === "cubicBezier" ? W3(s44) : null;
|
|
12226
11520
|
return /* @__PURE__ */ jsxs(Fragment, { children: [m26 ? /* @__PURE__ */ jsx(Z4, {
|
|
12227
11521
|
points: m26,
|
|
12228
11522
|
label: `${n45} curve`
|
|
@@ -12269,7 +11563,7 @@ var $4 = memo(function({ token: e28, onChange: t40 }) {
|
|
|
12269
11563
|
})]
|
|
12270
11564
|
});
|
|
12271
11565
|
}, (e28, t40) => e28.onChange === t40.onChange && e28.token.name === t40.token.name && e28.token.type === t40.token.type && e28.token.value === t40.token.value && e28.token.overridden === t40.token.overridden && e28.token.description === t40.token.description);
|
|
12272
|
-
function
|
|
11566
|
+
function ee5({ group: n45, tokens: r48, onChange: i53 }) {
|
|
12273
11567
|
let [a54, o49] = useState(null), s44 = r48.find((e28) => e28.name === a54) ?? null;
|
|
12274
11568
|
return /* @__PURE__ */ jsxs("div", {
|
|
12275
11569
|
className: E9.family,
|
|
@@ -12496,7 +11790,7 @@ function ie4({ group: e28, tokens: t40, generator: r48, onChange: i53, onScaleCh
|
|
|
12496
11790
|
]
|
|
12497
11791
|
});
|
|
12498
11792
|
}
|
|
12499
|
-
function
|
|
11793
|
+
function ae4({ title: e28, open: t40, onToggle: n45, tokens: i53, familySize: a54, scales: o49, onChange: s44, onScaleChange: c42 }) {
|
|
12500
11794
|
let d33 = useMemo(() => Y3(i53, a54), [i53, a54]);
|
|
12501
11795
|
return /* @__PURE__ */ jsxs("section", {
|
|
12502
11796
|
className: E9.section,
|
|
@@ -12521,7 +11815,7 @@ function ae3({ title: e28, open: t40, onToggle: n45, tokens: i53, familySize: a5
|
|
|
12521
11815
|
generator: o49?.[e29.group],
|
|
12522
11816
|
onChange: s44,
|
|
12523
11817
|
onScaleChange: c42
|
|
12524
|
-
}, `scale:${e29.group}`) : /* @__PURE__ */ jsx(
|
|
11818
|
+
}, `scale:${e29.group}`) : /* @__PURE__ */ jsx(ee5, {
|
|
12525
11819
|
group: e29.group,
|
|
12526
11820
|
tokens: e29.tokens,
|
|
12527
11821
|
onChange: s44
|
|
@@ -12529,7 +11823,7 @@ function ae3({ title: e28, open: t40, onToggle: n45, tokens: i53, familySize: a5
|
|
|
12529
11823
|
}) : null]
|
|
12530
11824
|
});
|
|
12531
11825
|
}
|
|
12532
|
-
function
|
|
11826
|
+
function oe3({ tokens: e28, onChange: t40, collapsed: n45, onCollapsedChange: r48, scales: i53, onScaleChange: a54, categorize: o49 = j9, familySize: s44 = 3, density: c42 = "normal", className: u37 }) {
|
|
12533
11827
|
let [d33, f30] = useState({}), h25 = n45 ?? d33, g22 = useMemo(() => {
|
|
12534
11828
|
let t41 = /* @__PURE__ */ new Map();
|
|
12535
11829
|
for (let n46 of e28) {
|
|
@@ -12548,7 +11842,7 @@ function oe4({ tokens: e28, onChange: t40, collapsed: n45, onCollapsedChange: r4
|
|
|
12548
11842
|
let c43 = g22.get(e29);
|
|
12549
11843
|
if (!c43) return null;
|
|
12550
11844
|
let u38 = !h25[e29];
|
|
12551
|
-
return /* @__PURE__ */ jsx(
|
|
11845
|
+
return /* @__PURE__ */ jsx(ae4, {
|
|
12552
11846
|
title: o50,
|
|
12553
11847
|
open: u38,
|
|
12554
11848
|
onToggle: () => {
|
|
@@ -12573,7 +11867,7 @@ var c34 = {
|
|
|
12573
11867
|
caption: "_caption_ctrrf_24"
|
|
12574
11868
|
};
|
|
12575
11869
|
function l33(l40) {
|
|
12576
|
-
let { index: d33, count: f30, playing: p26, onPlay: m26, onStep: h25, onScrub: g22, unit: _21 = "Step", caption: v19, className: y18 } = l40,
|
|
11870
|
+
let { index: d33, count: f30, playing: p26, onPlay: m26, onStep: h25, onScrub: g22, unit: _21 = "Step", caption: v19, className: y18 } = l40, b17 = Math.max(0, f30 - 1), x18 = Math.min(Math.max(d33, 0), b17), S17 = `${_21} ${x18 + 1} of ${f30}`;
|
|
12577
11871
|
return /* @__PURE__ */ jsxs("div", {
|
|
12578
11872
|
className: [c34.jog, y18].filter(Boolean).join(" "),
|
|
12579
11873
|
children: [
|
|
@@ -12584,7 +11878,7 @@ function l33(l40) {
|
|
|
12584
11878
|
ariaLabel: `Previous ${_21.toLowerCase()}`,
|
|
12585
11879
|
disabled: x18 <= 0,
|
|
12586
11880
|
onClick: () => h25(-1),
|
|
12587
|
-
children: /* @__PURE__ */ jsx(
|
|
11881
|
+
children: /* @__PURE__ */ jsx(ae, { size: 14 })
|
|
12588
11882
|
}),
|
|
12589
11883
|
/* @__PURE__ */ jsx(c7, {
|
|
12590
11884
|
iconOnly: true,
|
|
@@ -12593,21 +11887,21 @@ function l33(l40) {
|
|
|
12593
11887
|
ariaLabel: p26 ? "Pause" : "Play",
|
|
12594
11888
|
disabled: f30 < 2,
|
|
12595
11889
|
onClick: () => m26(!p26),
|
|
12596
|
-
children: jsx(p26 ?
|
|
11890
|
+
children: jsx(p26 ? re : ne, { size: 14 })
|
|
12597
11891
|
}),
|
|
12598
11892
|
/* @__PURE__ */ jsx(c7, {
|
|
12599
11893
|
iconOnly: true,
|
|
12600
11894
|
size: "sm",
|
|
12601
11895
|
variant: "ghost",
|
|
12602
11896
|
ariaLabel: `Next ${_21.toLowerCase()}`,
|
|
12603
|
-
disabled: x18 >=
|
|
11897
|
+
disabled: x18 >= b17,
|
|
12604
11898
|
onClick: () => h25(1),
|
|
12605
11899
|
children: /* @__PURE__ */ jsx($, { size: 14 })
|
|
12606
11900
|
}),
|
|
12607
|
-
g22 && /* @__PURE__ */ jsx(
|
|
11901
|
+
g22 && /* @__PURE__ */ jsx(y6, {
|
|
12608
11902
|
className: c34.scrub,
|
|
12609
11903
|
min: 0,
|
|
12610
|
-
max:
|
|
11904
|
+
max: b17,
|
|
12611
11905
|
step: 1,
|
|
12612
11906
|
snap: "strict",
|
|
12613
11907
|
density: "slim",
|
|
@@ -12651,7 +11945,7 @@ var f23 = {
|
|
|
12651
11945
|
row: "row"
|
|
12652
11946
|
}
|
|
12653
11947
|
};
|
|
12654
|
-
var p21 = forwardRef(function({ rows: s44, empty: p26, className: g22, selection: _21, onActivate: v19, onNudge: y18, onSelectRange:
|
|
11948
|
+
var p21 = forwardRef(function({ rows: s44, empty: p26, className: g22, selection: _21, onActivate: v19, onNudge: y18, onSelectRange: b17, dropIndex: x18, overlay: S17, containerProps: C14, ghost: w13 }, T13) {
|
|
12655
11949
|
let E12 = s44.some((e28) => e28.trailing != null) || v19 && !_21 ? "grid" : _21 ? "listbox" : "list", D12 = E12 !== "list", [O12, k12] = useState(null), A11 = useCallback((e28) => {
|
|
12656
11950
|
k12(e28), typeof T13 == "function" ? T13(e28) : T13 && (T13.current = e28);
|
|
12657
11951
|
}, [T13]), j11 = useRef(/* @__PURE__ */ new Map()), [M12, N11] = useState(null), P10 = useRef(null), F11 = useRef(null), I9 = useRef(null), L9 = s44.some((e28) => e28.id === M12) ? M12 : (s44.find((e28) => e28.selected) ?? s44[0])?.id;
|
|
@@ -12677,20 +11971,20 @@ var p21 = forwardRef(function({ rows: s44, empty: p26, className: g22, selection
|
|
|
12677
11971
|
let z7 = (e28) => {
|
|
12678
11972
|
let t40 = s44[Math.max(0, Math.min(s44.length - 1, e28))];
|
|
12679
11973
|
t40 && j11.current.get(t40.id)?.focus();
|
|
12680
|
-
}, B6 = _21 === "multi" &&
|
|
11974
|
+
}, B6 = _21 === "multi" && b17 !== void 0, V6 = (e28, t40, n45) => {
|
|
12681
11975
|
let r48 = Math.max(0, Math.min(s44.length - 1, t40));
|
|
12682
11976
|
if (!n45 || !B6) {
|
|
12683
11977
|
z7(r48);
|
|
12684
11978
|
return;
|
|
12685
11979
|
}
|
|
12686
11980
|
let i53 = s44.findIndex((e29) => e29.id === F11.current);
|
|
12687
|
-
i53 < 0 && (F11.current = e28.id, i53 = s44.indexOf(e28)), I9.current = s44[r48].id, z7(r48), I9.current = null,
|
|
11981
|
+
i53 < 0 && (F11.current = e28.id, i53 = s44.indexOf(e28)), I9.current = s44[r48].id, z7(r48), I9.current = null, b17(s44.slice(Math.min(i53, r48), Math.max(i53, r48) + 1).map((e29) => e29.id));
|
|
12688
11982
|
}, H6 = (e28, n45) => (i53) => {
|
|
12689
11983
|
if (e28.rowProps?.onKeyDown?.(i53), i53.defaultPrevented) return;
|
|
12690
11984
|
let a54 = j11.current.get(e28.id);
|
|
12691
11985
|
if (!a54) return;
|
|
12692
11986
|
let o49 = i53.target === a54, c42 = E12 === "grid" ? i53.currentTarget.querySelector(`.${e18.trailing}`) : null;
|
|
12693
|
-
if (
|
|
11987
|
+
if (o49 || c42?.contains(i53.target)) switch (i53.key) {
|
|
12694
11988
|
case "ArrowDown":
|
|
12695
11989
|
case "ArrowUp": {
|
|
12696
11990
|
i53.preventDefault();
|
|
@@ -12736,7 +12030,7 @@ var p21 = forwardRef(function({ rows: s44, empty: p26, className: g22, selection
|
|
|
12736
12030
|
ref: A11,
|
|
12737
12031
|
...C14,
|
|
12738
12032
|
role: K7.container,
|
|
12739
|
-
"aria-multiselectable": _21 === "multi" && E12 !== "list"
|
|
12033
|
+
"aria-multiselectable": _21 === "multi" && E12 !== "list" || void 0,
|
|
12740
12034
|
children: [
|
|
12741
12035
|
S17,
|
|
12742
12036
|
w13 && O12 ? /* @__PURE__ */ jsx(a13, {
|
|
@@ -13078,9 +12372,9 @@ var s39 = {
|
|
|
13078
12372
|
cellLabel: "_cellLabel_17mjm_74"
|
|
13079
12373
|
};
|
|
13080
12374
|
function c37(e28) {
|
|
13081
|
-
let { label: t40, schema: n45, values: r48, onChange: i53, mixed: c42, renderers: d33, children: f30, className: p26 } = e28;
|
|
12375
|
+
let { label: t40, schema: n45, values: r48, onChange: i53, mixed: c42, renderers: d33, children: f30, className: p26 } = e28, m26 = [s39.root, p26].filter(Boolean).join(" ");
|
|
13082
12376
|
return /* @__PURE__ */ jsxs("div", {
|
|
13083
|
-
className:
|
|
12377
|
+
className: m26,
|
|
13084
12378
|
role: "toolbar",
|
|
13085
12379
|
"aria-label": t40,
|
|
13086
12380
|
children: [t40 !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
@@ -13111,7 +12405,8 @@ function l36(n45) {
|
|
|
13111
12405
|
return i53(n45, ""), x14(r48);
|
|
13112
12406
|
}
|
|
13113
12407
|
function u33({ row: e28, values: t40, mixed: r48, renderers: c42, onChange: l40 }) {
|
|
13114
|
-
|
|
12408
|
+
let u37 = e28.leaves.map((e29) => f25(e29, e29.leaf.name, t40, r48, c42, l40));
|
|
12409
|
+
return /* @__PURE__ */ jsx(Fragment, { children: f24(u37, c42).map((e29) => /* @__PURE__ */ jsxs("span", {
|
|
13115
12410
|
className: s39.cell,
|
|
13116
12411
|
children: [d29(e29.leaf) && /* @__PURE__ */ jsx("span", {
|
|
13117
12412
|
className: s39.cellLabel,
|
|
@@ -13159,23 +12454,23 @@ function s40(e28, t40, n45, r48) {
|
|
|
13159
12454
|
function c38(o49) {
|
|
13160
12455
|
let { orientation: c42 = "vertical", value: l40, min: u37, max: d33, invert: f30, onInput: p26, onChange: m26, step: h25 = 1, ariaLabel: g22, className: _21 } = o49, v19 = useRef(o49);
|
|
13161
12456
|
v19.current = o49;
|
|
13162
|
-
let y18 = useRef(null),
|
|
12457
|
+
let y18 = useRef(null), b17 = useRef(null);
|
|
13163
12458
|
useEffect(() => () => {
|
|
13164
|
-
|
|
12459
|
+
b17.current?.cancel();
|
|
13165
12460
|
}, []);
|
|
13166
12461
|
let x18 = (e28) => {
|
|
13167
12462
|
let t40 = y18.current, n45 = v19.current, r48 = e28 - t40.origin;
|
|
13168
12463
|
return s40(t40.startValue + (n45.invert ? -r48 : r48), n45.min, n45.max, n45.step ?? 1);
|
|
13169
12464
|
}, S17 = (e28) => {
|
|
13170
|
-
y18.current = null,
|
|
12465
|
+
y18.current = null, b17.current = null, v19.current.onChange?.(e28);
|
|
13171
12466
|
}, C14 = useCallback((t40) => {
|
|
13172
|
-
if (t40.button !== 0 ||
|
|
12467
|
+
if (t40.button !== 0 || b17.current) return;
|
|
13173
12468
|
let n45 = v19.current, r48 = (n45.orientation ?? "vertical") === "vertical", i53 = (e28) => r48 ? e28.clientX : e28.clientY;
|
|
13174
12469
|
y18.current = {
|
|
13175
12470
|
origin: i53(t40),
|
|
13176
12471
|
startValue: n45.value,
|
|
13177
12472
|
last: s40(n45.value, n45.min, n45.max, n45.step ?? 1)
|
|
13178
|
-
},
|
|
12473
|
+
}, b17.current = openPointerSession(t40.currentTarget, t40, {
|
|
13179
12474
|
onMove: (e28) => {
|
|
13180
12475
|
let t41 = x18(i53(e28));
|
|
13181
12476
|
y18.current.last = t41, v19.current.onInput(t41);
|
|
@@ -13202,13 +12497,13 @@ function c38(o49) {
|
|
|
13202
12497
|
c42,
|
|
13203
12498
|
h25,
|
|
13204
12499
|
l40
|
|
13205
|
-
])
|
|
12500
|
+
]), T13 = [
|
|
12501
|
+
a50.handle,
|
|
12502
|
+
c42 === "horizontal" && a50.horizontal,
|
|
12503
|
+
_21
|
|
12504
|
+
].filter(Boolean).join(" ");
|
|
13206
12505
|
return /* @__PURE__ */ jsx("div", {
|
|
13207
|
-
className:
|
|
13208
|
-
a50.handle,
|
|
13209
|
-
c42 === "horizontal" && a50.horizontal,
|
|
13210
|
-
_21
|
|
13211
|
-
].filter(Boolean).join(" "),
|
|
12506
|
+
className: T13,
|
|
13212
12507
|
role: "separator",
|
|
13213
12508
|
tabIndex: 0,
|
|
13214
12509
|
"aria-label": g22,
|
|
@@ -13236,14 +12531,14 @@ function n40(n45) {
|
|
|
13236
12531
|
});
|
|
13237
12532
|
}
|
|
13238
12533
|
function r44(n45) {
|
|
13239
|
-
let { title: r48, muted: i53, children: a54, className: o49 } = n45
|
|
12534
|
+
let { title: r48, muted: i53, children: a54, className: o49 } = n45, s44 = [
|
|
12535
|
+
t36.item,
|
|
12536
|
+
i53 && t36.muted,
|
|
12537
|
+
r48 !== void 0 && t36.hasTitle,
|
|
12538
|
+
o49
|
|
12539
|
+
].filter(Boolean).join(" ");
|
|
13240
12540
|
return /* @__PURE__ */ jsx("span", {
|
|
13241
|
-
className:
|
|
13242
|
-
t36.item,
|
|
13243
|
-
i53 && t36.muted,
|
|
13244
|
-
r48 !== void 0 && t36.hasTitle,
|
|
13245
|
-
o49
|
|
13246
|
-
].filter(Boolean).join(" "),
|
|
12541
|
+
className: s44,
|
|
13247
12542
|
title: r48,
|
|
13248
12543
|
children: a54
|
|
13249
12544
|
});
|
|
@@ -13278,16 +12573,16 @@ function s41(e28, t40) {
|
|
|
13278
12573
|
return String(typeof e28 == "string" || typeof e28 == "number" ? e28 : t40);
|
|
13279
12574
|
}
|
|
13280
12575
|
function c39(c42) {
|
|
13281
|
-
let { value: l40, onChange: u37, onCommit: d33, formatLabel: f30, ariaLabel: p26, className: m26 } = c42, h25 = a51(c42.items), g22 = o46(h25, l40), _21 = Math.max(0, h25.length - 1), v19 = (e28, t40) => e28.label ?? f30?.(e28.value, t40) ?? String(e28.value), y18 = useRef(g22),
|
|
12576
|
+
let { value: l40, onChange: u37, onCommit: d33, formatLabel: f30, ariaLabel: p26, className: m26 } = c42, h25 = a51(c42.items), g22 = o46(h25, l40), _21 = Math.max(0, h25.length - 1), v19 = (e28, t40) => e28.label ?? f30?.(e28.value, t40) ?? String(e28.value), y18 = useRef(g22), b17 = useRef(false);
|
|
13282
12577
|
useEffect(() => {
|
|
13283
12578
|
y18.current = g22;
|
|
13284
12579
|
}, [g22]);
|
|
13285
12580
|
let x18 = (e28) => {
|
|
13286
12581
|
let t40 = e28[0].value;
|
|
13287
|
-
t40 !== y18.current && (y18.current = t40,
|
|
12582
|
+
t40 !== y18.current && (y18.current = t40, b17.current = true, u37(h25[t40].value, t40));
|
|
13288
12583
|
}, S17 = (e28) => {
|
|
13289
|
-
if (!
|
|
13290
|
-
|
|
12584
|
+
if (!b17.current) return;
|
|
12585
|
+
b17.current = false;
|
|
13291
12586
|
let t40 = e28[0].value;
|
|
13292
12587
|
d33?.(h25[t40].value, t40);
|
|
13293
12588
|
}, C14 = h25[g22];
|
|
@@ -13301,7 +12596,7 @@ function c39(c42) {
|
|
|
13301
12596
|
}));
|
|
13302
12597
|
return /* @__PURE__ */ jsx("div", {
|
|
13303
12598
|
className: m26 ? `${i49.root} ${m26}` : i49.root,
|
|
13304
|
-
children: /* @__PURE__ */ jsx(
|
|
12599
|
+
children: /* @__PURE__ */ jsx(y6, {
|
|
13305
12600
|
className: i49.slider,
|
|
13306
12601
|
min: 0,
|
|
13307
12602
|
max: _21,
|
|
@@ -13397,7 +12692,7 @@ var y15 = {
|
|
|
13397
12692
|
description: "_description_831f7_64",
|
|
13398
12693
|
close: "_close_831f7_71"
|
|
13399
12694
|
};
|
|
13400
|
-
var
|
|
12695
|
+
var b14 = {
|
|
13401
12696
|
"bottom-right": y15.bottomRight,
|
|
13402
12697
|
"bottom-left": y15.bottomLeft,
|
|
13403
12698
|
"top-right": y15.topRight,
|
|
@@ -13416,7 +12711,7 @@ function S14(o49) {
|
|
|
13416
12711
|
"aria-label": "Notifications",
|
|
13417
12712
|
className: [
|
|
13418
12713
|
y15.region,
|
|
13419
|
-
|
|
12714
|
+
b14[l40],
|
|
13420
12715
|
u37
|
|
13421
12716
|
].filter(Boolean).join(" "),
|
|
13422
12717
|
children: ({ toast: o50 }) => /* @__PURE__ */ jsxs(UNSTABLE_Toast, {
|
|
@@ -13499,7 +12794,7 @@ function y16(e28, t40, n45) {
|
|
|
13499
12794
|
let r48 = e28.map((e29) => ({ ...e29 }));
|
|
13500
12795
|
return r48[t40 + 1].from = n45, r48;
|
|
13501
12796
|
}
|
|
13502
|
-
function
|
|
12797
|
+
function b15(e28, t40, n45, r48) {
|
|
13503
12798
|
let i53 = e28.map((e29, i54) => i54 === 0 ? 0 : l38(t40.toUnit(e29.from, n45, r48)));
|
|
13504
12799
|
return i53.push(1), i53;
|
|
13505
12800
|
}
|
|
@@ -13551,7 +12846,7 @@ function k10(u37) {
|
|
|
13551
12846
|
useEffect(() => () => {
|
|
13552
12847
|
V6.current?.cancel();
|
|
13553
12848
|
}, []);
|
|
13554
|
-
let H6 = useId(), U6 = h23(d33, k12), W7 = m24(j11, k12), G7 = (e28) => l38(W7.toUnit(e28, k12, A11)), K7 = (e28) => W7.fromUnit(l38(e28), k12, A11), q7 = () => B6.current?.getBoundingClientRect().width ?? 0,
|
|
12849
|
+
let H6 = useId(), U6 = h23(d33, k12), W7 = m24(j11, k12), G7 = (e28) => l38(W7.toUnit(e28, k12, A11)), K7 = (e28) => W7.fromUnit(l38(e28), k12, A11), q7 = () => B6.current?.getBoundingClientRect().width ?? 0, J7 = (e28) => {
|
|
13555
12850
|
let t40 = B6.current?.getBoundingClientRect();
|
|
13556
12851
|
return !t40 || t40.width === 0 ? 0 : l38((e28 - t40.left) / t40.width);
|
|
13557
12852
|
}, Y7 = (t40, n45) => {
|
|
@@ -13573,7 +12868,8 @@ function k10(u37) {
|
|
|
13573
12868
|
t40.preventDefault(), t40.stopPropagation();
|
|
13574
12869
|
let n45 = U6, r48 = null;
|
|
13575
12870
|
X7(t40, (t41) => {
|
|
13576
|
-
|
|
12871
|
+
let i53 = v17(n45, e28, K7(Y7(J7(t41.clientX), t41.altKey)), k12, A11);
|
|
12872
|
+
r48 = y16(n45, e28, i53), f30?.(r48);
|
|
13577
12873
|
}, () => {
|
|
13578
12874
|
r48 && p26(r48);
|
|
13579
12875
|
});
|
|
@@ -13584,7 +12880,7 @@ function k10(u37) {
|
|
|
13584
12880
|
else {
|
|
13585
12881
|
let n46 = 0;
|
|
13586
12882
|
if (t40.key === "ArrowRight" || t40.key === "ArrowUp") n46 = t40.shiftKey ? T10 * 10 : T10;
|
|
13587
|
-
else if (t40.key === "ArrowLeft" || t40.key === "ArrowDown") n46 = t40.shiftKey ? -
|
|
12883
|
+
else if (t40.key === "ArrowLeft" || t40.key === "ArrowDown") n46 = t40.shiftKey ? -0.1 : -0.01;
|
|
13588
12884
|
else return;
|
|
13589
12885
|
i53 = K7(G7(U6[e28 + 1].from) + n46);
|
|
13590
12886
|
}
|
|
@@ -13593,14 +12889,14 @@ function k10(u37) {
|
|
|
13593
12889
|
a54 !== U6 && p26(a54);
|
|
13594
12890
|
}, $6 = (e28) => (t40) => {
|
|
13595
12891
|
if (typeof t40.button == "number" && t40.button > 0 || (e28 !== P10 && F11?.(e28), e28 === 0 || e28 === U6.length - 1)) return;
|
|
13596
|
-
let n45 = U6, r48 =
|
|
12892
|
+
let n45 = U6, r48 = b15(n45, W7, k12, A11), i53 = J7(t40.clientX), a54 = null;
|
|
13597
12893
|
X7(t40, (t41) => {
|
|
13598
|
-
let o49 = x16(r48, e28,
|
|
12894
|
+
let o49 = x16(r48, e28, J7(t41.clientX) - i53);
|
|
13599
12895
|
a54 = S15(n45, e28, K7(r48[e28] + o49), K7(r48[e28 + 1] + o49)), f30?.(a54);
|
|
13600
12896
|
}, () => {
|
|
13601
12897
|
a54 && p26(a54);
|
|
13602
12898
|
});
|
|
13603
|
-
},
|
|
12899
|
+
}, ee7 = (e28) => () => {
|
|
13604
12900
|
e28 !== P10 && F11?.(e28);
|
|
13605
12901
|
};
|
|
13606
12902
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -13626,7 +12922,7 @@ function k10(u37) {
|
|
|
13626
12922
|
onPointerDown: (e28) => {
|
|
13627
12923
|
if (typeof e28.button == "number" && e28.button > 0) return;
|
|
13628
12924
|
e28.preventDefault();
|
|
13629
|
-
let t40 = C12(U6, K7(
|
|
12925
|
+
let t40 = C12(U6, K7(J7(e28.clientX)), k12, A11, z7);
|
|
13630
12926
|
t40 !== U6 && p26(t40);
|
|
13631
12927
|
},
|
|
13632
12928
|
children: M12?.map((e28, t40) => /* @__PURE__ */ jsx("span", {
|
|
@@ -13654,7 +12950,7 @@ function k10(u37) {
|
|
|
13654
12950
|
"aria-pressed": s44,
|
|
13655
12951
|
"data-band-index": t40,
|
|
13656
12952
|
onPointerDown: $6(t40),
|
|
13657
|
-
onFocus:
|
|
12953
|
+
onFocus: ee7(t40),
|
|
13658
12954
|
children: /* @__PURE__ */ jsx("span", {
|
|
13659
12955
|
className: c41.bandContent,
|
|
13660
12956
|
children: N11?.(e28, t40)
|
|
@@ -13802,7 +13098,7 @@ var M10 = [
|
|
|
13802
13098
|
1
|
|
13803
13099
|
];
|
|
13804
13100
|
function N10(e28) {
|
|
13805
|
-
let { value: t40, onChange: n45 } = e28, r48 = E11(t40), i53 = D11(t40), a54 = r48 === null && k11.includes(i53), o49 = r48 === null ? a54 ? i53 : "linear" : "custom", s44 = O11(t40, A10).map((e29, t41) => `${t41 /
|
|
13101
|
+
let { value: t40, onChange: n45 } = e28, r48 = E11(t40), i53 = D11(t40), a54 = r48 === null && k11.includes(i53), o49 = r48 === null ? a54 ? i53 : "linear" : "custom", s44 = O11(t40, A10).map((e29, t41) => `${t41 / 23 * 100},${100 - e29 * 100}`).join(" ");
|
|
13806
13102
|
return /* @__PURE__ */ jsxs("div", {
|
|
13807
13103
|
className: w12.easingPicker,
|
|
13808
13104
|
children: [
|
|
@@ -13877,30 +13173,30 @@ function B5(e28, t40) {
|
|
|
13877
13173
|
to: r48 + n45
|
|
13878
13174
|
};
|
|
13879
13175
|
}
|
|
13880
|
-
function
|
|
13176
|
+
function V5(e28, t40, n45, r48) {
|
|
13881
13177
|
let i53 = e28.to - e28.from, a54 = r48.to - r48.from, o49 = Math.min(a54, Math.max(P9, i53 * n45)), s44 = i53 === 0 ? 0.5 : (t40 - e28.from) / i53;
|
|
13882
13178
|
return B5({
|
|
13883
13179
|
from: t40 - s44 * o49,
|
|
13884
13180
|
to: t40 + (1 - s44) * o49
|
|
13885
13181
|
}, r48);
|
|
13886
13182
|
}
|
|
13887
|
-
function
|
|
13183
|
+
function ee6(e28, t40, n45) {
|
|
13888
13184
|
return B5({
|
|
13889
13185
|
from: e28.from + t40,
|
|
13890
13186
|
to: e28.to + t40
|
|
13891
13187
|
}, n45);
|
|
13892
13188
|
}
|
|
13893
|
-
function
|
|
13189
|
+
function H5(e28, t40, n45) {
|
|
13894
13190
|
let i53 = e28.to - e28.from;
|
|
13895
13191
|
if (t40 <= 0 || i53 <= 0) return [];
|
|
13896
13192
|
let a54 = m5(n45 / t40 * i53), o49 = [];
|
|
13897
13193
|
for (let t41 = Math.ceil(e28.from / a54) * a54; t41 <= e28.to + 1e-9; t41 += a54) o49.push(Math.round(t41 / a54) * a54);
|
|
13898
13194
|
return o49;
|
|
13899
13195
|
}
|
|
13900
|
-
var
|
|
13196
|
+
var te5 = 8;
|
|
13901
13197
|
var ne5 = 10;
|
|
13902
13198
|
function re5(e28) {
|
|
13903
|
-
let t40 = e28.map((e29) => e29.value), n45 = Math.min(...t40), r48 = Math.max(...t40) - n45 || 1, i53 = r48 *
|
|
13199
|
+
let t40 = e28.map((e29) => e29.value), n45 = Math.min(...t40), r48 = Math.max(...t40) - n45 || 1, i53 = r48 * te5 / 84;
|
|
13904
13200
|
return [n45 - i53, n45 + r48 + i53];
|
|
13905
13201
|
}
|
|
13906
13202
|
function ie5(e28) {
|
|
@@ -13960,7 +13256,7 @@ function ie5(e28) {
|
|
|
13960
13256
|
D12(null);
|
|
13961
13257
|
let r49 = t41;
|
|
13962
13258
|
r49.keys !== n46.keys && m26(r49.keys);
|
|
13963
|
-
}, [N11, P10] = re5(O12.keys), F11 = _21.width > 0 ?
|
|
13259
|
+
}, [N11, P10] = re5(O12.keys), F11 = _21.width > 0 ? H5(r48, _21.width, 64) : [];
|
|
13964
13260
|
return /* @__PURE__ */ jsx("div", {
|
|
13965
13261
|
ref: g22,
|
|
13966
13262
|
className: w12.graphHost,
|
|
@@ -13988,12 +13284,12 @@ function ie5(e28) {
|
|
|
13988
13284
|
}) : null
|
|
13989
13285
|
});
|
|
13990
13286
|
}
|
|
13991
|
-
var
|
|
13992
|
-
function
|
|
13287
|
+
var ae5 = 10;
|
|
13288
|
+
function oe4(e28) {
|
|
13993
13289
|
return e28.kind === "sampled" ? e28.track.keys.map((e29) => e29.t) : e28.kind === "event" ? e28.track.events.map((e29) => e29.t) : [];
|
|
13994
13290
|
}
|
|
13995
|
-
function
|
|
13996
|
-
let { row: t40, window: r48, mode: i53, selection: a54, onSelect: o49, onKeyInput: c42, onKeyCommit: l40, onInsert: d33, onToggleExpand: f30, expanded: p26, snapTimes: _21, selectedSegment: y18 = null, onSelectSegment:
|
|
13291
|
+
function se3(e28) {
|
|
13292
|
+
let { row: t40, window: r48, mode: i53, selection: a54, onSelect: o49, onKeyInput: c42, onKeyCommit: l40, onInsert: d33, onToggleExpand: f30, expanded: p26, snapTimes: _21, selectedSegment: y18 = null, onSelectSegment: b17, onKeysInput: x18, onKeysCommit: T13 } = e28, E12 = useRef(null), D12 = useRef(null);
|
|
13997
13293
|
useEffect(() => () => {
|
|
13998
13294
|
D12.current?.cancel();
|
|
13999
13295
|
}, []);
|
|
@@ -14001,8 +13297,8 @@ function se4(e28) {
|
|
|
14001
13297
|
let n45 = E12.current?.getBoundingClientRect();
|
|
14002
13298
|
return n45 ? F9(r48, n45.width).toMs(e29 - n45.left) - t40.offset : r48.from;
|
|
14003
13299
|
}, M12 = () => {
|
|
14004
|
-
let e29 =
|
|
14005
|
-
return
|
|
13300
|
+
let e29 = E12.current?.getBoundingClientRect().width ?? 0, t41 = F9(r48, e29);
|
|
13301
|
+
return t41.toMs(6) - t41.toMs(0);
|
|
14006
13302
|
}, N11 = i53 === "graph" && t40.numeric, P10 = t40.kind === "sampled" ? t40.track.keys : [], I9 = (e29) => (n45) => {
|
|
14007
13303
|
if (n45.button !== 0) return;
|
|
14008
13304
|
n45.stopPropagation(), o49(e29);
|
|
@@ -14030,9 +13326,9 @@ function se4(e28) {
|
|
|
14030
13326
|
onCancel: i54
|
|
14031
13327
|
}, { capture: false });
|
|
14032
13328
|
}, R8 = (e29, t41) => (n45) => {
|
|
14033
|
-
let r49 =
|
|
13329
|
+
let r49 = ae5 * (n45.shiftKey ? 10 : 1);
|
|
14034
13330
|
n45.key === "ArrowRight" && (n45.preventDefault(), l40(e29, t41 + r49)), n45.key === "ArrowLeft" && (n45.preventDefault(), l40(e29, Math.max(0, t41 - r49)));
|
|
14035
|
-
}, B6 =
|
|
13331
|
+
}, B6 = oe4(t40);
|
|
14036
13332
|
return /* @__PURE__ */ jsxs("div", {
|
|
14037
13333
|
className: w12.lane,
|
|
14038
13334
|
"data-depth": t40.depth,
|
|
@@ -14068,7 +13364,7 @@ function se4(e28) {
|
|
|
14068
13364
|
selection: a54,
|
|
14069
13365
|
selectedSegment: y18,
|
|
14070
13366
|
onSelect: o49,
|
|
14071
|
-
onSelectSegment:
|
|
13367
|
+
onSelectSegment: b17,
|
|
14072
13368
|
onKeysInput: x18,
|
|
14073
13369
|
onKeysCommit: (e29) => T13?.(e29)
|
|
14074
13370
|
}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -14093,9 +13389,9 @@ function se4(e28) {
|
|
|
14093
13389
|
left: A11(P10[i54 - 1].t),
|
|
14094
13390
|
width: z6(r48, e29.t - P10[i54 - 1].t)
|
|
14095
13391
|
},
|
|
14096
|
-
onClick: () =>
|
|
13392
|
+
onClick: () => b17?.(i54),
|
|
14097
13393
|
onKeyDown: (e30) => {
|
|
14098
|
-
(e30.key === "Enter" || e30.key === " ") && (e30.preventDefault(),
|
|
13394
|
+
(e30.key === "Enter" || e30.key === " ") && (e30.preventDefault(), b17?.(i54));
|
|
14099
13395
|
}
|
|
14100
13396
|
}, `seg-${i54}`);
|
|
14101
13397
|
}) : null,
|
|
@@ -14121,8 +13417,8 @@ function se4(e28) {
|
|
|
14121
13417
|
})]
|
|
14122
13418
|
});
|
|
14123
13419
|
}
|
|
14124
|
-
var
|
|
14125
|
-
function
|
|
13420
|
+
var ce3 = 15e-4;
|
|
13421
|
+
function le3(e28) {
|
|
14126
13422
|
return e28 >= 1e3 ? `${(e28 / 1e3).toFixed(e28 % 1e3 == 0 ? 0 : 2)}s` : `${Math.round(e28)}ms`;
|
|
14127
13423
|
}
|
|
14128
13424
|
function ue3(e28) {
|
|
@@ -14158,12 +13454,12 @@ function ue3(e28) {
|
|
|
14158
13454
|
onCancel: t41
|
|
14159
13455
|
}, { capture: false });
|
|
14160
13456
|
}, m26 = (e29) => {
|
|
14161
|
-
if (e29.ctrlKey) a54(
|
|
13457
|
+
if (e29.ctrlKey) a54(V5(t40, f30(e29.clientX), Math.exp(e29.deltaY * ce3), n45));
|
|
14162
13458
|
else {
|
|
14163
13459
|
let r49 = d33(), i54 = r49 === 0 ? 0 : (t40.to - t40.from) / r49;
|
|
14164
|
-
a54(
|
|
13460
|
+
a54(ee6(t40, e29.deltaY * i54, n45));
|
|
14165
13461
|
}
|
|
14166
|
-
}, _21 =
|
|
13462
|
+
}, _21 = H5(t40, c42, 64), b17 = (e29) => L8(t40, e29);
|
|
14167
13463
|
return /* @__PURE__ */ jsxs("div", {
|
|
14168
13464
|
className: w12.ruler,
|
|
14169
13465
|
ref: o49,
|
|
@@ -14173,12 +13469,12 @@ function ue3(e28) {
|
|
|
14173
13469
|
children: [_21.map((e29) => /* @__PURE__ */ jsx("span", {
|
|
14174
13470
|
className: w12.tick,
|
|
14175
13471
|
"data-testid": "timeline-tick",
|
|
14176
|
-
style: { left:
|
|
14177
|
-
children:
|
|
13472
|
+
style: { left: b17(e29) },
|
|
13473
|
+
children: le3(e29)
|
|
14178
13474
|
}, e29)), /* @__PURE__ */ jsx("div", {
|
|
14179
13475
|
className: w12.playhead,
|
|
14180
13476
|
"data-testid": "timeline-playhead",
|
|
14181
|
-
style: { left:
|
|
13477
|
+
style: { left: b17(r48) }
|
|
14182
13478
|
})]
|
|
14183
13479
|
});
|
|
14184
13480
|
}
|
|
@@ -14189,7 +13485,7 @@ var U5 = [
|
|
|
14189
13485
|
2,
|
|
14190
13486
|
4
|
|
14191
13487
|
];
|
|
14192
|
-
var
|
|
13488
|
+
var W4 = (e28) => `${(e28 / 1e3).toFixed(2)}s`;
|
|
14193
13489
|
function G5(n45) {
|
|
14194
13490
|
let { paused: r48, loop: i53, rate: a54, playhead: o49, duration: s44, onPlay: l40, onPause: u37, onLoopChange: d33, onRateChange: f30 } = n45, p26 = i53 !== false && i53 !== 0, m26 = U5.includes(a54) ? U5 : [...U5, a54].sort((e28, t40) => e28 - t40);
|
|
14195
13491
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -14200,7 +13496,7 @@ function G5(n45) {
|
|
|
14200
13496
|
className: w12.transportButton,
|
|
14201
13497
|
"aria-label": r48 ? "Play" : "Pause",
|
|
14202
13498
|
onClick: r48 ? l40 : u37,
|
|
14203
|
-
children: jsx(r48 ?
|
|
13499
|
+
children: jsx(r48 ? ne : re, { size: 14 })
|
|
14204
13500
|
}),
|
|
14205
13501
|
/* @__PURE__ */ jsx("button", {
|
|
14206
13502
|
type: "button",
|
|
@@ -14234,9 +13530,9 @@ function G5(n45) {
|
|
|
14234
13530
|
className: w12.time,
|
|
14235
13531
|
"data-testid": "timeline-time",
|
|
14236
13532
|
children: [
|
|
14237
|
-
|
|
13533
|
+
W4(o49),
|
|
14238
13534
|
" / ",
|
|
14239
|
-
|
|
13535
|
+
W4(s44)
|
|
14240
13536
|
]
|
|
14241
13537
|
})
|
|
14242
13538
|
]
|
|
@@ -14282,7 +13578,7 @@ function J4(e28, t40) {
|
|
|
14282
13578
|
keys: t40
|
|
14283
13579
|
};
|
|
14284
13580
|
}
|
|
14285
|
-
function
|
|
13581
|
+
function pe3(e28, t40) {
|
|
14286
13582
|
return {
|
|
14287
13583
|
...e28,
|
|
14288
13584
|
events: t40
|
|
@@ -14323,7 +13619,7 @@ function X5(e28, t40, n45) {
|
|
|
14323
13619
|
t: i53
|
|
14324
13620
|
}, o49 = n46.events.filter((e29, n47) => n47 !== t40.keyIndex), s44 = o49.findIndex((e29) => e29.t > i53), c42 = s44 === -1 ? o49.length : s44;
|
|
14325
13621
|
return o49.splice(c42, 0, a54), {
|
|
14326
|
-
tracks: Y4(e28, t40.trackPath,
|
|
13622
|
+
tracks: Y4(e28, t40.trackPath, pe3(r48, o49)),
|
|
14327
13623
|
selection: {
|
|
14328
13624
|
trackPath: t40.trackPath,
|
|
14329
13625
|
keyIndex: c42
|
|
@@ -14335,7 +13631,7 @@ function X5(e28, t40, n45) {
|
|
|
14335
13631
|
selection: t40
|
|
14336
13632
|
};
|
|
14337
13633
|
}
|
|
14338
|
-
function
|
|
13634
|
+
function me3(e28, t40, n45) {
|
|
14339
13635
|
let r48 = K5(e28, t40);
|
|
14340
13636
|
if (r48?.kind !== "sampled") return {
|
|
14341
13637
|
tracks: e28.slice(),
|
|
@@ -14381,7 +13677,7 @@ function Q5(e28, t40, n45) {
|
|
|
14381
13677
|
let r48 = K5(e28, t40);
|
|
14382
13678
|
return r48?.kind === "sampled" ? Y4(e28, t40, J4(r48, n45.slice())) : e28.slice();
|
|
14383
13679
|
}
|
|
14384
|
-
function
|
|
13680
|
+
function ge2(e28, t40, n45) {
|
|
14385
13681
|
let r48 = K5(e28, t40.trackPath);
|
|
14386
13682
|
if (r48?.kind !== "sampled") return e28.slice();
|
|
14387
13683
|
let i53 = r48.keys.slice();
|
|
@@ -14468,7 +13764,7 @@ function $5(e28) {
|
|
|
14468
13764
|
className: w12.lanes,
|
|
14469
13765
|
children: O12.map((n46) => {
|
|
14470
13766
|
let r49 = n46.path;
|
|
14471
|
-
return /* @__PURE__ */ jsx(
|
|
13767
|
+
return /* @__PURE__ */ jsx(se3, {
|
|
14472
13768
|
row: n46,
|
|
14473
13769
|
window: x18,
|
|
14474
13770
|
mode: e28.mode ?? "dope",
|
|
@@ -14496,7 +13792,7 @@ function $5(e28) {
|
|
|
14496
13792
|
onKeysInput: (e29) => i53?.(Q5(t40, r49, e29)),
|
|
14497
13793
|
onKeysCommit: (e29) => a54(Q5(t40, r49, e29)),
|
|
14498
13794
|
onInsert: (e29) => {
|
|
14499
|
-
let n47 =
|
|
13795
|
+
let n47 = me3(t40, r49, e29);
|
|
14500
13796
|
a54(n47.tracks), E12(n47.selection);
|
|
14501
13797
|
},
|
|
14502
13798
|
selectedSegment: v19 && q5(v19.trackPath, r49) ? v19.keyIndex : null,
|
|
@@ -14513,7 +13809,7 @@ function $5(e28) {
|
|
|
14513
13809
|
key: P10,
|
|
14514
13810
|
track: M12,
|
|
14515
13811
|
selection: T13,
|
|
14516
|
-
commit: (e29) => a54(
|
|
13812
|
+
commit: (e29) => a54(ge2(t40, T13, e29.value)),
|
|
14517
13813
|
setEasing: (e29) => a54(Z5(t40, T13, e29))
|
|
14518
13814
|
})
|
|
14519
13815
|
}) : null,
|
|
@@ -14532,7 +13828,7 @@ function Z6(e28, t40) {
|
|
|
14532
13828
|
let [n45, r48] = t40.lRange;
|
|
14533
13829
|
return e28 <= n45 ? t40.cBot : e28 >= r48 ? t40.cTop : e28 <= t40.midL ? t40.cBot + (t40.cPeak - t40.cBot) * ((e28 - n45) / (t40.midL - n45)) : t40.cPeak + (t40.cTop - t40.cPeak) * ((e28 - t40.midL) / (r48 - t40.midL));
|
|
14534
13830
|
}
|
|
14535
|
-
function
|
|
13831
|
+
function Li({ load: e28, debounceMs: t40 = 150, minLength: n45 = 0 }) {
|
|
14536
13832
|
let [r48, i53] = useState(""), [a54, o49] = useState([]), [s44, c42] = useState(false), [l40, u37] = useState(null), d33 = useRef(e28);
|
|
14537
13833
|
d33.current = e28;
|
|
14538
13834
|
let f30 = useRef(0), p26 = useRef(0), m26 = useRef(null);
|
|
@@ -14563,6 +13859,6 @@ function wi({ load: e28, debounceMs: t40 = 150, minLength: n45 = 0 }) {
|
|
|
14563
13859
|
};
|
|
14564
13860
|
}
|
|
14565
13861
|
|
|
14566
|
-
export { $, $5 as $2, A8 as A2, B3 as
|
|
14567
|
-
//# sourceMappingURL=chunk-
|
|
14568
|
-
//# sourceMappingURL=chunk-
|
|
13862
|
+
export { $, $5 as $2, A8 as A2, B, B3 as B2, C7 as C2, D7 as D, F7 as F2, G, H, H4 as H2, Ht, L4 as L, L5 as L2, L6 as L3, Li, Me, O9 as O2, Q, Qe, S8 as S, S10 as S2, S12 as S3, S14 as S4, Se, T5 as T, U, V, V3 as V2, X, X6 as X2, Z, Z6 as Z2, _12 as _, a, a11 as a2, a13 as a3, a23 as a4, a24 as a5, a29 as a6, a37 as a7, ae, ae3 as ae2, b9 as b2, c7 as c, c27 as c2, c37 as c3, c38 as c4, c28 as c5, c39 as c6, d6 as d, d23 as d2, e3 as e, e11 as e2, f4 as f, f5 as f2, fe, g8 as g, g16 as g2, h16 as h2, i, i10 as i2, i24 as i3, i48 as i4, ie, je, k10 as k2, l, l3 as l2, l8 as l3, l18 as l4, l20 as l5, l25 as l6, l27 as l7, l30 as l8, l33 as l9, m4 as m, m15 as m2, m23 as m3, n2 as n, n4 as n2, n7 as n3, n13 as n4, n18 as n5, n31 as n6, n40 as n7, n33 as n8, n38 as n9, ne, o11 as o2, o17 as o3, o34 as o4, o36 as o5, oe2 as oe, oe3 as oe2, p4 as p, p21 as p2, r10 as r, r18 as r2, r33 as r3, r35 as r4, r44 as r5, re, s10 as s, s26 as s2, s27 as s3, s28 as s4, s29 as s5, s31 as s6, se2 as se, t4 as t, t15 as t2, u2 as u, u5 as u2, u11 as u3, u14 as u4, u18 as u5, v2 as v, v9 as v2, v11 as v3, w3 as w, x9 as x, xe, y6 as y, y12 as y2, z };
|
|
13863
|
+
//# sourceMappingURL=chunk-TYN6MLXX.js.map
|
|
13864
|
+
//# sourceMappingURL=chunk-TYN6MLXX.js.map
|