@printine/pod-editor 0.1.18 → 0.1.20
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/{design-CWY-22HD.js → design-Ce0Lyr8f.js} +598 -592
- package/dist/engine/editor.js +120 -116
- package/dist/full-designer.js +2 -2
- package/dist/index.js +4 -4
- package/dist/pixel-map-CSpWvUYE.js +315 -0
- package/dist/{pixi-print-base-CKs4lF7h.js → pixi-print-base-DIvtSF7v.js} +1 -1
- package/dist/renderer/pixel-map.d.ts +9 -2
- package/dist/{semi-interact-editor-nZVBXXQn.js → semi-interact-editor-DpzQN5ZB.js} +2 -2
- package/dist/semi-renderer.js +1 -1
- package/dist/style.css +1 -1
- package/docs/HOST_DATA_CONTRACT.md +1 -1
- package/docs/SEMI_RENDERER.md +37 -1
- package/package.json +1 -1
- package/dist/pixel-map-BvQ0VU_i.js +0 -199
|
@@ -2,7 +2,7 @@ var gl = (e) => {
|
|
|
2
2
|
throw TypeError(e);
|
|
3
3
|
};
|
|
4
4
|
var vl = (e, t, n) => t.has(e) || gl("Cannot " + n);
|
|
5
|
-
var tt = (e, t, n) => (vl(e, t, "read from private field"), n ? n.call(e) : t.get(e)), bl = (e, t, n) => t.has(e) ? gl("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n),
|
|
5
|
+
var tt = (e, t, n) => (vl(e, t, "read from private field"), n ? n.call(e) : t.get(e)), bl = (e, t, n) => t.has(e) ? gl("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), ja = (e, t, n, r) => (vl(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n);
|
|
6
6
|
import { jsx as l, jsxs as D, Fragment as Me } from "react/jsx-runtime";
|
|
7
7
|
import * as h from "react";
|
|
8
8
|
import q, { createContext as $n, useContext as $t, useCallback as he, useState as Y, useEffect as Z, forwardRef as sr, createElement as bi, useRef as re, useImperativeHandle as sa, useMemo as ge, useLayoutEffect as ns, memo as Xp, useReducer as Zp, cloneElement as Jp } from "react";
|
|
@@ -11,12 +11,12 @@ import { useShallow as tr } from "zustand/react/shallow";
|
|
|
11
11
|
import { HistoryManager as wi } from "./engine/history.js";
|
|
12
12
|
import { createRoot as Qp } from "react-dom/client";
|
|
13
13
|
import { d as zc, a as e1 } from "./config-D2qm60gf.js";
|
|
14
|
-
import { isSvg as t1, inchToPixel as
|
|
14
|
+
import { isSvg as t1, inchToPixel as Vo } from "./engine/utils/measure.js";
|
|
15
15
|
import { a as ze, A as Bc } from "./designer-store-Da9fICz8.js";
|
|
16
|
-
import { BLEND_MODES_MAP as
|
|
16
|
+
import { BLEND_MODES_MAP as jc, DEFAULT_FONT_SIZE as n1, ALIGN_TYPES as r1, ELEMENT_TITLE_MAP as Vc, LAYER_BLACK_LIST as o1 } from "./engine/constants.js";
|
|
17
17
|
import { StickerPlugin as a1, Sticker3DPlugin as Hc } from "./renderer/sticker.js";
|
|
18
|
-
import { P as
|
|
19
|
-
import { renderPixiWithPrintBase as s1 } from "./pixi-print-base-
|
|
18
|
+
import { P as Va, h as Kn, M as wl, b as i1 } from "./pixel-map-CSpWvUYE.js";
|
|
19
|
+
import { renderPixiWithPrintBase as s1 } from "./pixi-print-base-DIvtSF7v.js";
|
|
20
20
|
import Uc from "lodash-es/throttle";
|
|
21
21
|
import { debounce as yi } from "lodash-es";
|
|
22
22
|
import { blobUrlToFile as l1, generateThumbImage as c1, xyToDirectionOffset as d1, directionOffsetToXY as u1, urlToBlob as yl, dataUrlToFile as Cl } from "./engine/utils/common.js";
|
|
@@ -54,7 +54,7 @@ const lr = (e = 768) => {
|
|
|
54
54
|
return r.addEventListener("change", o), n(window.innerWidth < e), () => r.removeEventListener("change", o);
|
|
55
55
|
}, []), t;
|
|
56
56
|
};
|
|
57
|
-
function
|
|
57
|
+
function Be({
|
|
58
58
|
src: e,
|
|
59
59
|
alt: t,
|
|
60
60
|
width: n,
|
|
@@ -290,17 +290,17 @@ const z1 = [
|
|
|
290
290
|
const B1 = [
|
|
291
291
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
292
292
|
["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
|
|
293
|
-
],
|
|
293
|
+
], j1 = Re("copy", B1);
|
|
294
294
|
/**
|
|
295
295
|
* @license lucide-react v0.545.0 - ISC
|
|
296
296
|
*
|
|
297
297
|
* This source code is licensed under the ISC license.
|
|
298
298
|
* See the LICENSE file in the root directory of this source tree.
|
|
299
299
|
*/
|
|
300
|
-
const
|
|
300
|
+
const V1 = [
|
|
301
301
|
["path", { d: "M6 2v14a2 2 0 0 0 2 2h14", key: "ron5a4" }],
|
|
302
302
|
["path", { d: "M18 22V8a2 2 0 0 0-2-2H2", key: "7s9ehn" }]
|
|
303
|
-
], H1 = Re("crop",
|
|
303
|
+
], H1 = Re("crop", V1);
|
|
304
304
|
/**
|
|
305
305
|
* @license lucide-react v0.545.0 - ISC
|
|
306
306
|
*
|
|
@@ -732,7 +732,7 @@ const Ph = (e, t) => {
|
|
|
732
732
|
baseClassName: n,
|
|
733
733
|
maybePostfixModifierPosition: r,
|
|
734
734
|
isExternal: o
|
|
735
|
-
}),
|
|
735
|
+
}), jh = (e) => {
|
|
736
736
|
const {
|
|
737
737
|
prefix: t,
|
|
738
738
|
experimentalParseClassName: n
|
|
@@ -779,7 +779,7 @@ const Ph = (e, t) => {
|
|
|
779
779
|
});
|
|
780
780
|
}
|
|
781
781
|
return r;
|
|
782
|
-
},
|
|
782
|
+
}, Vh = (e) => {
|
|
783
783
|
const t = /* @__PURE__ */ new Map();
|
|
784
784
|
return e.orderSensitiveModifiers.forEach((n, r) => {
|
|
785
785
|
t.set(n, 1e6 + r);
|
|
@@ -794,8 +794,8 @@ const Ph = (e, t) => {
|
|
|
794
794
|
};
|
|
795
795
|
}, Hh = (e) => ({
|
|
796
796
|
cache: zh(e.cacheSize),
|
|
797
|
-
parseClassName:
|
|
798
|
-
sortModifiers:
|
|
797
|
+
parseClassName: jh(e),
|
|
798
|
+
sortModifiers: Vh(e),
|
|
799
799
|
postfixLookupClassGroupIds: Uh(e),
|
|
800
800
|
...Ah(e)
|
|
801
801
|
}), Uh = (e) => {
|
|
@@ -916,13 +916,13 @@ const Ph = (e, t) => {
|
|
|
916
916
|
"left-bottom"
|
|
917
917
|
], x = () => [...y(), le, ie], S = () => ["auto", "hidden", "clip", "visible", "scroll"], E = () => ["auto", "contain", "none"], R = () => [le, ie, c], N = () => [cn, "full", "auto", ...R()], I = () => [Mt, "none", "subgrid", le, ie], F = () => ["auto", {
|
|
918
918
|
span: ["full", Mt, le, ie]
|
|
919
|
-
}, Mt, le, ie],
|
|
919
|
+
}, Mt, le, ie], j = () => [Mt, "auto", le, ie], P = () => ["auto", "min", "max", "fr", le, ie], T = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], L = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], z = () => ["auto", ...R()], A = () => [cn, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...R()], $ = () => [s, cn, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...R()], U = () => [cn, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...R()], _ = () => [e, le, ie], ne = () => [...y(), Nl, Pl, {
|
|
920
920
|
position: [le, ie]
|
|
921
921
|
}], M = () => ["no-repeat", {
|
|
922
922
|
repeat: ["", "x", "y", "space", "round"]
|
|
923
|
-
}],
|
|
923
|
+
}], G = () => ["auto", "cover", "contain", fm, sm, {
|
|
924
924
|
size: [le, ie]
|
|
925
|
-
}], ee = () => [Ha, Er, Pn],
|
|
925
|
+
}], ee = () => [Ha, Er, Pn], K = () => [
|
|
926
926
|
// Deprecated since Tailwind CSS v4.0.0
|
|
927
927
|
"",
|
|
928
928
|
"none",
|
|
@@ -930,7 +930,7 @@ const Ph = (e, t) => {
|
|
|
930
930
|
d,
|
|
931
931
|
le,
|
|
932
932
|
ie
|
|
933
|
-
], Q = () => ["", Se, Er, Pn], B = () => ["solid", "dashed", "dotted", "double"],
|
|
933
|
+
], Q = () => ["", Se, Er, Pn], B = () => ["solid", "dashed", "dotted", "double"], V = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], J = () => [Se, Ha, Nl, Pl], ce = () => [
|
|
934
934
|
// Deprecated since Tailwind CSS v4.0.0
|
|
935
935
|
"",
|
|
936
936
|
"none",
|
|
@@ -1294,14 +1294,14 @@ const Ph = (e, t) => {
|
|
|
1294
1294
|
* @see https://tailwindcss.com/docs/grid-column
|
|
1295
1295
|
*/
|
|
1296
1296
|
"col-start": [{
|
|
1297
|
-
"col-start":
|
|
1297
|
+
"col-start": j()
|
|
1298
1298
|
}],
|
|
1299
1299
|
/**
|
|
1300
1300
|
* Grid Column End
|
|
1301
1301
|
* @see https://tailwindcss.com/docs/grid-column
|
|
1302
1302
|
*/
|
|
1303
1303
|
"col-end": [{
|
|
1304
|
-
"col-end":
|
|
1304
|
+
"col-end": j()
|
|
1305
1305
|
}],
|
|
1306
1306
|
/**
|
|
1307
1307
|
* Grid Template Rows
|
|
@@ -1322,14 +1322,14 @@ const Ph = (e, t) => {
|
|
|
1322
1322
|
* @see https://tailwindcss.com/docs/grid-row
|
|
1323
1323
|
*/
|
|
1324
1324
|
"row-start": [{
|
|
1325
|
-
"row-start":
|
|
1325
|
+
"row-start": j()
|
|
1326
1326
|
}],
|
|
1327
1327
|
/**
|
|
1328
1328
|
* Grid Row End
|
|
1329
1329
|
* @see https://tailwindcss.com/docs/grid-row
|
|
1330
1330
|
*/
|
|
1331
1331
|
"row-end": [{
|
|
1332
|
-
"row-end":
|
|
1332
|
+
"row-end": j()
|
|
1333
1333
|
}],
|
|
1334
1334
|
/**
|
|
1335
1335
|
* Grid Auto Flow
|
|
@@ -2026,7 +2026,7 @@ const Ph = (e, t) => {
|
|
|
2026
2026
|
* @see https://tailwindcss.com/docs/background-size
|
|
2027
2027
|
*/
|
|
2028
2028
|
"bg-size": [{
|
|
2029
|
-
bg:
|
|
2029
|
+
bg: G()
|
|
2030
2030
|
}],
|
|
2031
2031
|
/**
|
|
2032
2032
|
* Background Image
|
|
@@ -2098,105 +2098,105 @@ const Ph = (e, t) => {
|
|
|
2098
2098
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2099
2099
|
*/
|
|
2100
2100
|
rounded: [{
|
|
2101
|
-
rounded:
|
|
2101
|
+
rounded: K()
|
|
2102
2102
|
}],
|
|
2103
2103
|
/**
|
|
2104
2104
|
* Border Radius Start
|
|
2105
2105
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2106
2106
|
*/
|
|
2107
2107
|
"rounded-s": [{
|
|
2108
|
-
"rounded-s":
|
|
2108
|
+
"rounded-s": K()
|
|
2109
2109
|
}],
|
|
2110
2110
|
/**
|
|
2111
2111
|
* Border Radius End
|
|
2112
2112
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2113
2113
|
*/
|
|
2114
2114
|
"rounded-e": [{
|
|
2115
|
-
"rounded-e":
|
|
2115
|
+
"rounded-e": K()
|
|
2116
2116
|
}],
|
|
2117
2117
|
/**
|
|
2118
2118
|
* Border Radius Top
|
|
2119
2119
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2120
2120
|
*/
|
|
2121
2121
|
"rounded-t": [{
|
|
2122
|
-
"rounded-t":
|
|
2122
|
+
"rounded-t": K()
|
|
2123
2123
|
}],
|
|
2124
2124
|
/**
|
|
2125
2125
|
* Border Radius Right
|
|
2126
2126
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2127
2127
|
*/
|
|
2128
2128
|
"rounded-r": [{
|
|
2129
|
-
"rounded-r":
|
|
2129
|
+
"rounded-r": K()
|
|
2130
2130
|
}],
|
|
2131
2131
|
/**
|
|
2132
2132
|
* Border Radius Bottom
|
|
2133
2133
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2134
2134
|
*/
|
|
2135
2135
|
"rounded-b": [{
|
|
2136
|
-
"rounded-b":
|
|
2136
|
+
"rounded-b": K()
|
|
2137
2137
|
}],
|
|
2138
2138
|
/**
|
|
2139
2139
|
* Border Radius Left
|
|
2140
2140
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2141
2141
|
*/
|
|
2142
2142
|
"rounded-l": [{
|
|
2143
|
-
"rounded-l":
|
|
2143
|
+
"rounded-l": K()
|
|
2144
2144
|
}],
|
|
2145
2145
|
/**
|
|
2146
2146
|
* Border Radius Start Start
|
|
2147
2147
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2148
2148
|
*/
|
|
2149
2149
|
"rounded-ss": [{
|
|
2150
|
-
"rounded-ss":
|
|
2150
|
+
"rounded-ss": K()
|
|
2151
2151
|
}],
|
|
2152
2152
|
/**
|
|
2153
2153
|
* Border Radius Start End
|
|
2154
2154
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2155
2155
|
*/
|
|
2156
2156
|
"rounded-se": [{
|
|
2157
|
-
"rounded-se":
|
|
2157
|
+
"rounded-se": K()
|
|
2158
2158
|
}],
|
|
2159
2159
|
/**
|
|
2160
2160
|
* Border Radius End End
|
|
2161
2161
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2162
2162
|
*/
|
|
2163
2163
|
"rounded-ee": [{
|
|
2164
|
-
"rounded-ee":
|
|
2164
|
+
"rounded-ee": K()
|
|
2165
2165
|
}],
|
|
2166
2166
|
/**
|
|
2167
2167
|
* Border Radius End Start
|
|
2168
2168
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2169
2169
|
*/
|
|
2170
2170
|
"rounded-es": [{
|
|
2171
|
-
"rounded-es":
|
|
2171
|
+
"rounded-es": K()
|
|
2172
2172
|
}],
|
|
2173
2173
|
/**
|
|
2174
2174
|
* Border Radius Top Left
|
|
2175
2175
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2176
2176
|
*/
|
|
2177
2177
|
"rounded-tl": [{
|
|
2178
|
-
"rounded-tl":
|
|
2178
|
+
"rounded-tl": K()
|
|
2179
2179
|
}],
|
|
2180
2180
|
/**
|
|
2181
2181
|
* Border Radius Top Right
|
|
2182
2182
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2183
2183
|
*/
|
|
2184
2184
|
"rounded-tr": [{
|
|
2185
|
-
"rounded-tr":
|
|
2185
|
+
"rounded-tr": K()
|
|
2186
2186
|
}],
|
|
2187
2187
|
/**
|
|
2188
2188
|
* Border Radius Bottom Right
|
|
2189
2189
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2190
2190
|
*/
|
|
2191
2191
|
"rounded-br": [{
|
|
2192
|
-
"rounded-br":
|
|
2192
|
+
"rounded-br": K()
|
|
2193
2193
|
}],
|
|
2194
2194
|
/**
|
|
2195
2195
|
* Border Radius Bottom Left
|
|
2196
2196
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2197
2197
|
*/
|
|
2198
2198
|
"rounded-bl": [{
|
|
2199
|
-
"rounded-bl":
|
|
2199
|
+
"rounded-bl": K()
|
|
2200
2200
|
}],
|
|
2201
2201
|
/**
|
|
2202
2202
|
* Border Width
|
|
@@ -2544,14 +2544,14 @@ const Ph = (e, t) => {
|
|
|
2544
2544
|
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
2545
2545
|
*/
|
|
2546
2546
|
"mix-blend": [{
|
|
2547
|
-
"mix-blend": [...
|
|
2547
|
+
"mix-blend": [...V(), "plus-darker", "plus-lighter"]
|
|
2548
2548
|
}],
|
|
2549
2549
|
/**
|
|
2550
2550
|
* Background Blend Mode
|
|
2551
2551
|
* @see https://tailwindcss.com/docs/background-blend-mode
|
|
2552
2552
|
*/
|
|
2553
2553
|
"bg-blend": [{
|
|
2554
|
-
"bg-blend":
|
|
2554
|
+
"bg-blend": V()
|
|
2555
2555
|
}],
|
|
2556
2556
|
/**
|
|
2557
2557
|
* Mask Clip
|
|
@@ -2733,7 +2733,7 @@ const Ph = (e, t) => {
|
|
|
2733
2733
|
* @see https://tailwindcss.com/docs/mask-size
|
|
2734
2734
|
*/
|
|
2735
2735
|
"mask-size": [{
|
|
2736
|
-
mask:
|
|
2736
|
+
mask: G()
|
|
2737
2737
|
}],
|
|
2738
2738
|
/**
|
|
2739
2739
|
* Mask Type
|
|
@@ -4054,7 +4054,7 @@ function km(e) {
|
|
|
4054
4054
|
}, [e]), t;
|
|
4055
4055
|
}
|
|
4056
4056
|
const Rm = sr(function({ models: t, designPreviewMap: n, renderColor: r, renderer: o = "pixel-map", onPreview: a }, i) {
|
|
4057
|
-
const { currentViewName: s } = et(), c = lr(), u = ((typeof window < "u" ? new URLSearchParams(window.location.search).get("printineRenderer") : null) ?? o) === "pixel-map" &&
|
|
4057
|
+
const { currentViewName: s } = et(), c = lr(), u = ((typeof window < "u" ? new URLSearchParams(window.location.search).get("printineRenderer") : null) ?? o) === "pixel-map" && Va.isSupported(), f = u && !t.some((A) => Kn(A.render_areas)), { rendering: p, setRendering: m } = ze(
|
|
4058
4058
|
tr((A) => ({
|
|
4059
4059
|
rendering: A.rendering,
|
|
4060
4060
|
setRendering: A.setRendering
|
|
@@ -4084,7 +4084,7 @@ const Rm = sr(function({ models: t, designPreviewMap: n, renderColor: r, rendere
|
|
|
4084
4084
|
(A) => {
|
|
4085
4085
|
const $ = R.current.get(A);
|
|
4086
4086
|
if ($) return $;
|
|
4087
|
-
const U = !u, _ = U ? new a1({ width: 1, height: 1 }, !0, { subdiv: 8 }) : N.current ??= new
|
|
4087
|
+
const U = !u, _ = U ? new a1({ width: 1, height: 1 }, !0, { subdiv: 8 }) : N.current ??= new Va(), ne = {
|
|
4088
4088
|
key: A,
|
|
4089
4089
|
plugin: _,
|
|
4090
4090
|
ownsPlugin: U,
|
|
@@ -4092,33 +4092,33 @@ const Rm = sr(function({ models: t, designPreviewMap: n, renderColor: r, rendere
|
|
|
4092
4092
|
pendingAreas: null,
|
|
4093
4093
|
resolvers: [],
|
|
4094
4094
|
runner: (() => {
|
|
4095
|
-
const
|
|
4095
|
+
const G = Uc(async () => {
|
|
4096
4096
|
if (!ne.pendingAreas) return;
|
|
4097
|
-
const
|
|
4097
|
+
const K = ne.pendingAreas;
|
|
4098
4098
|
ne.pendingAreas = null, ne.queue = ne.queue.then(async () => {
|
|
4099
4099
|
try {
|
|
4100
|
-
const Q = performance.now(), B = u ? await ne.plugin.onOffscreenRender(
|
|
4100
|
+
const Q = performance.now(), B = u ? await ne.plugin.onOffscreenRender(K, {
|
|
4101
4101
|
color: r,
|
|
4102
4102
|
targetSize: c ? 320 : 600,
|
|
4103
4103
|
composition: f ? "design-layer" : "full",
|
|
4104
4104
|
format: "image/png",
|
|
4105
4105
|
cacheKey: A
|
|
4106
|
-
}) : await s1(ne.plugin,
|
|
4106
|
+
}) : await s1(ne.plugin, K, {
|
|
4107
4107
|
color: r,
|
|
4108
4108
|
cleanCache: !1,
|
|
4109
4109
|
scale: 0.8
|
|
4110
|
-
}) ?? null,
|
|
4111
|
-
console.log(`[render] ${A}: ${Math.floor(
|
|
4110
|
+
}) ?? null, V = performance.now();
|
|
4111
|
+
console.log(`[render] ${A}: ${Math.floor(V - Q)} ms ${B === null}`), ne.resolvers.forEach((J) => J(B)), ne.resolvers = [];
|
|
4112
4112
|
} catch (Q) {
|
|
4113
4113
|
console.log(`[render] ${A} failed`, Q), ne.resolvers.forEach((B) => B(null)), ne.resolvers = [];
|
|
4114
4114
|
} finally {
|
|
4115
4115
|
ne.resolvers = [];
|
|
4116
4116
|
}
|
|
4117
4117
|
}), await ne.queue;
|
|
4118
|
-
}, c ? 160 : 80, { leading: !1, trailing: !0 }), ee = ((
|
|
4119
|
-
ne.resolvers.push(Q),
|
|
4118
|
+
}, c ? 160 : 80, { leading: !1, trailing: !0 }), ee = ((K) => (ne.pendingAreas = K, new Promise((Q) => {
|
|
4119
|
+
ne.resolvers.push(Q), G();
|
|
4120
4120
|
})));
|
|
4121
|
-
return ee.cancel =
|
|
4121
|
+
return ee.cancel = G.cancel, ee;
|
|
4122
4122
|
})()
|
|
4123
4123
|
};
|
|
4124
4124
|
return R.current.set(A, ne), ne;
|
|
@@ -4131,7 +4131,7 @@ const Rm = sr(function({ models: t, designPreviewMap: n, renderColor: r, rendere
|
|
|
4131
4131
|
}), R.current.clear(), N.current?.destroy(), N.current = null;
|
|
4132
4132
|
}, [o, u, f]), Z(() => {
|
|
4133
4133
|
if (!u || !s) return;
|
|
4134
|
-
const A = t.flatMap((_) => _.render_areas.filter((ne) => ne.design && ne.area?.name === s).map((ne) => ne.image)), $ = N.current ??= new
|
|
4134
|
+
const A = t.flatMap((_) => _.render_areas.filter((ne) => ne.design && ne.area?.name === s).map((ne) => ne.image)), $ = N.current ??= new Va();
|
|
4135
4135
|
let U = !0;
|
|
4136
4136
|
return $.preloadAssets(A).catch((_) => {
|
|
4137
4137
|
U && console.warn("[render] asset preload failed", _);
|
|
@@ -4139,13 +4139,13 @@ const Rm = sr(function({ models: t, designPreviewMap: n, renderColor: r, rendere
|
|
|
4139
4139
|
U = !1;
|
|
4140
4140
|
};
|
|
4141
4141
|
}, [s, t, u, o]);
|
|
4142
|
-
const
|
|
4142
|
+
const j = he((A) => A.render_areas.flatMap(($) => {
|
|
4143
4143
|
const U = $.area?.name ? n[$.area.name] : "";
|
|
4144
4144
|
if ($.design && !U && !Kn([$])) return [];
|
|
4145
4145
|
let _ = $.texture_transform;
|
|
4146
4146
|
return _ && !u ? _ = {
|
|
4147
4147
|
..._,
|
|
4148
|
-
blendMode:
|
|
4148
|
+
blendMode: jc[_.blendMode]
|
|
4149
4149
|
} : _ && (_ = { ..._ }), [{ ...$, texture: U || "", config: _ }];
|
|
4150
4150
|
}), [n, u]), P = he((A) => A.render_areas.filter((U) => !!U.design).every((U) => {
|
|
4151
4151
|
const _ = U.area?.name;
|
|
@@ -4164,11 +4164,11 @@ const Rm = sr(function({ models: t, designPreviewMap: n, renderColor: r, rendere
|
|
|
4164
4164
|
try {
|
|
4165
4165
|
const U = t[$];
|
|
4166
4166
|
if (!U) return null;
|
|
4167
|
-
const _ =
|
|
4168
|
-
if (!
|
|
4169
|
-
const ee = URL.createObjectURL(
|
|
4170
|
-
return y((
|
|
4171
|
-
const Q = [...
|
|
4167
|
+
const _ = j(U), ne = I(U, $), G = await F(ne).runner(_);
|
|
4168
|
+
if (!G) throw new Error("Could not render product preview");
|
|
4169
|
+
const ee = URL.createObjectURL(G);
|
|
4170
|
+
return y((K) => {
|
|
4171
|
+
const Q = [...K], B = Q[$];
|
|
4172
4172
|
return B && B.startsWith("blob:") && URL.revokeObjectURL(B), Q[$] = ee, Q;
|
|
4173
4173
|
}), { idx: $, img: ee || "", key: ne };
|
|
4174
4174
|
} catch {
|
|
@@ -4186,7 +4186,7 @@ const Rm = sr(function({ models: t, designPreviewMap: n, renderColor: r, rendere
|
|
|
4186
4186
|
}
|
|
4187
4187
|
}
|
|
4188
4188
|
},
|
|
4189
|
-
[
|
|
4189
|
+
[j, I, F, t, m]
|
|
4190
4190
|
);
|
|
4191
4191
|
sa(i, () => ({
|
|
4192
4192
|
getDesignLayers() {
|
|
@@ -4365,7 +4365,7 @@ const Rm = sr(function({ models: t, designPreviewMap: n, renderColor: r, rendere
|
|
|
4365
4365
|
"difference",
|
|
4366
4366
|
"exclusion"
|
|
4367
4367
|
]), Dm = new Map(
|
|
4368
|
-
Object.entries(
|
|
4368
|
+
Object.entries(jc).map(([e, t]) => [String(t), e])
|
|
4369
4369
|
), _r = (e) => {
|
|
4370
4370
|
if (e == null || e === "") return "normal";
|
|
4371
4371
|
const t = String(e).trim().toLowerCase().replaceAll("_", "-"), n = Dm.get(t);
|
|
@@ -4587,7 +4587,7 @@ const Om = q.forwardRef(function({ imageList: t, renderParams: n, index: r, mode
|
|
|
4587
4587
|
},
|
|
4588
4588
|
x.id || y
|
|
4589
4589
|
);
|
|
4590
|
-
}) }) : k ? /* @__PURE__ */ l(
|
|
4590
|
+
}) }) : k ? /* @__PURE__ */ l(Be, { src: k, width: 800, height: 800, alt: i("Preview"), className: "w-full h-full object-contain" }) : null
|
|
4591
4591
|
}
|
|
4592
4592
|
) }),
|
|
4593
4593
|
p.length > 1 && /* @__PURE__ */ D("div", { className: te("w-2/5 bg-white rounded p-4", d && "w-full"), children: [
|
|
@@ -4613,7 +4613,7 @@ const Om = q.forwardRef(function({ imageList: t, renderParams: n, index: r, mode
|
|
|
4613
4613
|
imageSize: d ? "l_400" : "l_600"
|
|
4614
4614
|
}
|
|
4615
4615
|
) : w ? /* @__PURE__ */ l(
|
|
4616
|
-
|
|
4616
|
+
Be,
|
|
4617
4617
|
{
|
|
4618
4618
|
src: w,
|
|
4619
4619
|
width: 160,
|
|
@@ -4704,7 +4704,7 @@ function kt(e) {
|
|
|
4704
4704
|
if (!i) {
|
|
4705
4705
|
if (o || o === 0)
|
|
4706
4706
|
throw new Error(
|
|
4707
|
-
s ? Hm(e) :
|
|
4707
|
+
s ? Hm(e) : Vm(e)
|
|
4708
4708
|
);
|
|
4709
4709
|
return o;
|
|
4710
4710
|
}
|
|
@@ -4749,16 +4749,16 @@ function bd(e) {
|
|
|
4749
4749
|
return h.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === hd;
|
|
4750
4750
|
}
|
|
4751
4751
|
Nt(bd, "isSlottable");
|
|
4752
|
-
var
|
|
4752
|
+
var jm = Symbol.for("react.lazy");
|
|
4753
4753
|
function ki(e) {
|
|
4754
|
-
return e != null && typeof e == "object" && "$$typeof" in e && e.$$typeof ===
|
|
4754
|
+
return e != null && typeof e == "object" && "$$typeof" in e && e.$$typeof === jm && "_payload" in e && wd(e._payload);
|
|
4755
4755
|
}
|
|
4756
4756
|
Nt(ki, "isLazyComponent");
|
|
4757
4757
|
function wd(e) {
|
|
4758
4758
|
return typeof e == "object" && e !== null && "then" in e;
|
|
4759
4759
|
}
|
|
4760
4760
|
Nt(wd, "isPromiseLike");
|
|
4761
|
-
var
|
|
4761
|
+
var Vm = /* @__PURE__ */ Nt((e) => `${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`, "createSlotError"), Hm = /* @__PURE__ */ Nt((e) => `${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`, "createSlottableError"), Co = h[" use ".trim().toString()];
|
|
4762
4762
|
const Il = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Tl = fn, cs = (e, t) => (n) => {
|
|
4763
4763
|
var r;
|
|
4764
4764
|
if (t?.variants == null) return Tl(e, n?.class, n?.className);
|
|
@@ -5109,8 +5109,8 @@ var cg = Object.defineProperty, Xe = (e, t) => cg(e, "name", { value: t, configu
|
|
|
5109
5109
|
} = t, f = h.useContext(Pd), [p, m] = h.useState(null), v = p?.ownerDocument ?? globalThis?.document, [, b] = h.useState({}), g = ye(n, m), C = Array.from(f.layers), [k] = [
|
|
5110
5110
|
...f.layersWithOutsidePointerEventsDisabled
|
|
5111
5111
|
].slice(-1), w = k ? C.indexOf(k) : -1, y = p ? C.indexOf(p) : -1, x = f.layersWithOutsidePointerEventsDisabled.size > 0, S = y >= w, E = h.useRef(!1), R = Dd(
|
|
5112
|
-
(
|
|
5113
|
-
i?.(
|
|
5112
|
+
(j) => {
|
|
5113
|
+
i?.(j), c?.(j), j.defaultPrevented || d?.();
|
|
5114
5114
|
},
|
|
5115
5115
|
{
|
|
5116
5116
|
ownerDocument: v,
|
|
@@ -5118,24 +5118,24 @@ var cg = Object.defineProperty, Xe = (e, t) => cg(e, "name", { value: t, configu
|
|
|
5118
5118
|
isDeferredPointerDownOutsideRef: E,
|
|
5119
5119
|
dismissableSurfaces: f.dismissableSurfaces,
|
|
5120
5120
|
shouldHandlePointerDownOutside: h.useCallback(
|
|
5121
|
-
(
|
|
5122
|
-
if (!(
|
|
5121
|
+
(j) => {
|
|
5122
|
+
if (!(j instanceof Node))
|
|
5123
5123
|
return !1;
|
|
5124
5124
|
const P = [...f.branches].some(
|
|
5125
|
-
(T) => T.contains(
|
|
5125
|
+
(T) => T.contains(j)
|
|
5126
5126
|
);
|
|
5127
5127
|
return S && !P;
|
|
5128
5128
|
},
|
|
5129
5129
|
[f.branches, S]
|
|
5130
5130
|
)
|
|
5131
5131
|
}
|
|
5132
|
-
), N = Ad((
|
|
5132
|
+
), N = Ad((j) => {
|
|
5133
5133
|
if (o && E.current)
|
|
5134
5134
|
return;
|
|
5135
|
-
const P =
|
|
5136
|
-
[...f.branches].some((L) => L.contains(P)) || (s?.(
|
|
5137
|
-
}, v), I = p ? y === C.length - 1 : !1, F = yt((
|
|
5138
|
-
|
|
5135
|
+
const P = j.target;
|
|
5136
|
+
[...f.branches].some((L) => L.contains(P)) || (s?.(j), c?.(j), j.defaultPrevented || d?.());
|
|
5137
|
+
}, v), I = p ? y === C.length - 1 : !1, F = yt((j) => {
|
|
5138
|
+
j.key === "Escape" && (a?.(j), !j.defaultPrevented && d && (j.preventDefault(), d()));
|
|
5139
5139
|
});
|
|
5140
5140
|
return h.useEffect(() => {
|
|
5141
5141
|
if (I)
|
|
@@ -5148,8 +5148,8 @@ var cg = Object.defineProperty, Xe = (e, t) => cg(e, "name", { value: t, configu
|
|
|
5148
5148
|
}, [p, v, r, f]), h.useEffect(() => () => {
|
|
5149
5149
|
p && (f.layers.delete(p), f.layersWithOutsidePointerEventsDisabled.delete(p), Ni());
|
|
5150
5150
|
}, [p, f]), h.useEffect(() => {
|
|
5151
|
-
const
|
|
5152
|
-
return document.addEventListener(Pi,
|
|
5151
|
+
const j = /* @__PURE__ */ Xe(() => b({}), "handleUpdate");
|
|
5152
|
+
return document.addEventListener(Pi, j), () => document.removeEventListener(Pi, j);
|
|
5153
5153
|
}, []), /* @__PURE__ */ l(
|
|
5154
5154
|
fe.div,
|
|
5155
5155
|
{
|
|
@@ -5562,7 +5562,7 @@ var Ot = function() {
|
|
|
5562
5562
|
return t;
|
|
5563
5563
|
}, Ot.apply(this, arguments);
|
|
5564
5564
|
};
|
|
5565
|
-
function
|
|
5565
|
+
function jd(e, t) {
|
|
5566
5566
|
var n = {};
|
|
5567
5567
|
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
5568
5568
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -5683,8 +5683,8 @@ function Pg(e) {
|
|
|
5683
5683
|
var t = Rg(null);
|
|
5684
5684
|
return t.options = Ot({ async: !0, ssr: !1 }, e), t;
|
|
5685
5685
|
}
|
|
5686
|
-
var
|
|
5687
|
-
var t = e.sideCar, n =
|
|
5686
|
+
var Vd = function(e) {
|
|
5687
|
+
var t = e.sideCar, n = jd(e, ["sideCar"]);
|
|
5688
5688
|
if (!t)
|
|
5689
5689
|
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
5690
5690
|
var r = t.read();
|
|
@@ -5692,9 +5692,9 @@ var jd = function(e) {
|
|
|
5692
5692
|
throw new Error("Sidecar medium not found");
|
|
5693
5693
|
return h.createElement(r, Ot({}, n));
|
|
5694
5694
|
};
|
|
5695
|
-
|
|
5695
|
+
Vd.isSideCarExport = !0;
|
|
5696
5696
|
function Ng(e, t) {
|
|
5697
|
-
return e.useMedium(t),
|
|
5697
|
+
return e.useMedium(t), Vd;
|
|
5698
5698
|
}
|
|
5699
5699
|
var Hd = Pg(), Ya = function() {
|
|
5700
5700
|
}, da = h.forwardRef(function(e, t) {
|
|
@@ -5702,7 +5702,7 @@ var Hd = Pg(), Ya = function() {
|
|
|
5702
5702
|
onScrollCapture: Ya,
|
|
5703
5703
|
onWheelCapture: Ya,
|
|
5704
5704
|
onTouchMoveCapture: Ya
|
|
5705
|
-
}), o = r[0], a = r[1], i = e.forwardProps, s = e.children, c = e.className, d = e.removeScrollBar, u = e.enabled, f = e.shards, p = e.sideCar, m = e.noRelative, v = e.noIsolation, b = e.inert, g = e.allowPinchZoom, C = e.as, k = C === void 0 ? "div" : C, w = e.gapMode, y =
|
|
5705
|
+
}), o = r[0], a = r[1], i = e.forwardProps, s = e.children, c = e.className, d = e.removeScrollBar, u = e.enabled, f = e.shards, p = e.sideCar, m = e.noRelative, v = e.noIsolation, b = e.inert, g = e.allowPinchZoom, C = e.as, k = C === void 0 ? "div" : C, w = e.gapMode, y = jd(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), x = p, S = Eg([n, t]), E = Ot(Ot({}, y), o);
|
|
5706
5706
|
return h.createElement(
|
|
5707
5707
|
h.Fragment,
|
|
5708
5708
|
null,
|
|
@@ -5837,7 +5837,7 @@ var _g = function() {
|
|
|
5837
5837
|
e <= 0 ? document.body.removeAttribute(nr) : document.body.setAttribute(nr, e.toString());
|
|
5838
5838
|
};
|
|
5839
5839
|
}, []);
|
|
5840
|
-
},
|
|
5840
|
+
}, jg = function(e) {
|
|
5841
5841
|
var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
|
|
5842
5842
|
Bg();
|
|
5843
5843
|
var a = h.useMemo(function() {
|
|
@@ -5856,7 +5856,7 @@ if (typeof window < "u")
|
|
|
5856
5856
|
} catch {
|
|
5857
5857
|
_i = !1;
|
|
5858
5858
|
}
|
|
5859
|
-
var qn = _i ? { passive: !1 } : !1,
|
|
5859
|
+
var qn = _i ? { passive: !1 } : !1, Vg = function(e) {
|
|
5860
5860
|
return e.tagName === "TEXTAREA";
|
|
5861
5861
|
}, Wd = function(e, t) {
|
|
5862
5862
|
if (!(e instanceof Element))
|
|
@@ -5865,13 +5865,13 @@ var qn = _i ? { passive: !1 } : !1, jg = function(e) {
|
|
|
5865
5865
|
return (
|
|
5866
5866
|
// not-not-scrollable
|
|
5867
5867
|
n[t] !== "hidden" && // contains scroll inside self
|
|
5868
|
-
!(n.overflowY === n.overflowX && !
|
|
5868
|
+
!(n.overflowY === n.overflowX && !Vg(e) && n[t] === "visible")
|
|
5869
5869
|
);
|
|
5870
5870
|
}, Hg = function(e) {
|
|
5871
5871
|
return Wd(e, "overflowY");
|
|
5872
5872
|
}, Ug = function(e) {
|
|
5873
5873
|
return Wd(e, "overflowX");
|
|
5874
|
-
},
|
|
5874
|
+
}, jl = function(e, t) {
|
|
5875
5875
|
var n = t.ownerDocument, r = t;
|
|
5876
5876
|
do {
|
|
5877
5877
|
typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
|
|
@@ -5921,7 +5921,7 @@ var qn = _i ? { passive: !1 } : !1, jg = function(e) {
|
|
|
5921
5921
|
return (u && Math.abs(f) < 1 || !u && Math.abs(p) < 1) && (d = !0), d;
|
|
5922
5922
|
}, Eo = function(e) {
|
|
5923
5923
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
5924
|
-
},
|
|
5924
|
+
}, Vl = function(e) {
|
|
5925
5925
|
return [e.deltaX, e.deltaY];
|
|
5926
5926
|
}, Hl = function(e) {
|
|
5927
5927
|
return e && "current" in e ? e.current : e;
|
|
@@ -5959,19 +5959,19 @@ function Jg(e) {
|
|
|
5959
5959
|
var R = window.getSelection(), N = R && R.anchorNode, I = N ? N === S || N.contains(S) : !1;
|
|
5960
5960
|
if (I)
|
|
5961
5961
|
return !1;
|
|
5962
|
-
var F =
|
|
5962
|
+
var F = jl(E, S);
|
|
5963
5963
|
if (!F)
|
|
5964
5964
|
return !0;
|
|
5965
|
-
if (F ? x = E : (x = E === "v" ? "h" : "v", F =
|
|
5965
|
+
if (F ? x = E : (x = E === "v" ? "h" : "v", F = jl(E, S)), !F)
|
|
5966
5966
|
return !1;
|
|
5967
5967
|
if (!r.current && "changedTouches" in b && (w || y) && (r.current = x), !x)
|
|
5968
5968
|
return !0;
|
|
5969
|
-
var
|
|
5970
|
-
return Yg(
|
|
5969
|
+
var j = r.current || x;
|
|
5970
|
+
return Yg(j, g, b, j === "h" ? w : y);
|
|
5971
5971
|
}, []), c = h.useCallback(function(b) {
|
|
5972
5972
|
var g = b;
|
|
5973
5973
|
if (!(!Xn.length || Xn[Xn.length - 1] !== a)) {
|
|
5974
|
-
var C = "deltaY" in g ?
|
|
5974
|
+
var C = "deltaY" in g ? Vl(g) : Eo(g), k = t.current.filter(function(x) {
|
|
5975
5975
|
return x.name === g.type && (x.target === g.target || g.target === x.shadowParent) && qg(x.delta, C);
|
|
5976
5976
|
})[0];
|
|
5977
5977
|
if (k && k.should) {
|
|
@@ -5995,7 +5995,7 @@ function Jg(e) {
|
|
|
5995
5995
|
}, []), u = h.useCallback(function(b) {
|
|
5996
5996
|
n.current = Eo(b), r.current = void 0;
|
|
5997
5997
|
}, []), f = h.useCallback(function(b) {
|
|
5998
|
-
d(b.type,
|
|
5998
|
+
d(b.type, Vl(b), b.target, s(b, e.lockRef.current));
|
|
5999
5999
|
}, []), p = h.useCallback(function(b) {
|
|
6000
6000
|
d(b.type, Eo(b), b.target, s(b, e.lockRef.current));
|
|
6001
6001
|
}, []);
|
|
@@ -6015,7 +6015,7 @@ function Jg(e) {
|
|
|
6015
6015
|
h.Fragment,
|
|
6016
6016
|
null,
|
|
6017
6017
|
v ? h.createElement(a, { styles: Xg(o) }) : null,
|
|
6018
|
-
m ? h.createElement(
|
|
6018
|
+
m ? h.createElement(jg, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
|
|
6019
6019
|
);
|
|
6020
6020
|
}
|
|
6021
6021
|
function Qg(e) {
|
|
@@ -6076,7 +6076,7 @@ var t0 = function(e) {
|
|
|
6076
6076
|
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), r0(r, o, n, "aria-hidden")) : function() {
|
|
6077
6077
|
return null;
|
|
6078
6078
|
};
|
|
6079
|
-
}, o0 = Object.defineProperty, xt = (e, t) => o0(e, "name", { value: t, configurable: !0 }), hs = "Dialog", [qd, J9] = /* @__PURE__ */ nt(hs), [a0,
|
|
6079
|
+
}, o0 = Object.defineProperty, xt = (e, t) => o0(e, "name", { value: t, configurable: !0 }), hs = "Dialog", [qd, J9] = /* @__PURE__ */ nt(hs), [a0, Vt] = qd(hs), ms = /* @__PURE__ */ xt((e) => {
|
|
6080
6080
|
const {
|
|
6081
6081
|
__scopeDialog: t,
|
|
6082
6082
|
children: n,
|
|
@@ -6113,17 +6113,17 @@ var t0 = function(e) {
|
|
|
6113
6113
|
}, "Dialog"), Xd = "DialogPortal", [i0, Zd] = qd(Xd, {
|
|
6114
6114
|
forceMount: void 0
|
|
6115
6115
|
}), gs = /* @__PURE__ */ xt((e) => {
|
|
6116
|
-
const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, a =
|
|
6116
|
+
const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, a = Vt(Xd, t);
|
|
6117
6117
|
return /* @__PURE__ */ l(i0, { scope: t, forceMount: n, children: h.Children.map(r, (i) => /* @__PURE__ */ l(Ct, { present: n || a.open, children: /* @__PURE__ */ l(Jr, { asChild: !0, container: o, children: i }) })) });
|
|
6118
6118
|
}, "DialogPortal"), Mi = "DialogOverlay", vs = /* @__PURE__ */ h.forwardRef(
|
|
6119
6119
|
/* @__PURE__ */ xt(function(t, n) {
|
|
6120
|
-
const r = Zd(Mi, t.__scopeDialog), { forceMount: o = r.forceMount, ...a } = t, i =
|
|
6120
|
+
const r = Zd(Mi, t.__scopeDialog), { forceMount: o = r.forceMount, ...a } = t, i = Vt(Mi, t.__scopeDialog);
|
|
6121
6121
|
return i.modal ? /* @__PURE__ */ l(Ct, { present: o || i.open, children: /* @__PURE__ */ l(l0, { ...a, ref: n }) }) : null;
|
|
6122
6122
|
}, "DialogOverlay")
|
|
6123
6123
|
), s0 = /* @__PURE__ */ kt("DialogOverlay.RemoveScroll"), l0 = /* @__PURE__ */ h.forwardRef(
|
|
6124
6124
|
// blank line to reduce diff noise
|
|
6125
6125
|
/* @__PURE__ */ xt(function(t, n) {
|
|
6126
|
-
const { __scopeDialog: r, ...o } = t, a =
|
|
6126
|
+
const { __scopeDialog: r, ...o } = t, a = Vt(Mi, r), i = Nd(), s = ye(n, i);
|
|
6127
6127
|
return (
|
|
6128
6128
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
6129
6129
|
// ie. when `Overlay` and `Content` are siblings
|
|
@@ -6140,13 +6140,13 @@ var t0 = function(e) {
|
|
|
6140
6140
|
}, "DialogOverlayImpl")
|
|
6141
6141
|
), Br = "DialogContent", bs = /* @__PURE__ */ h.forwardRef(
|
|
6142
6142
|
/* @__PURE__ */ xt(function(t, n) {
|
|
6143
|
-
const r = Zd(Br, t.__scopeDialog), { forceMount: o = r.forceMount, ...a } = t, i =
|
|
6143
|
+
const r = Zd(Br, t.__scopeDialog), { forceMount: o = r.forceMount, ...a } = t, i = Vt(Br, t.__scopeDialog);
|
|
6144
6144
|
return /* @__PURE__ */ l(Ct, { present: o || i.open, children: i.modal ? /* @__PURE__ */ l(c0, { ...a, ref: n }) : /* @__PURE__ */ l(d0, { ...a, ref: n }) });
|
|
6145
6145
|
}, "DialogContent")
|
|
6146
6146
|
), c0 = /* @__PURE__ */ h.forwardRef(
|
|
6147
6147
|
// blank line to reduce diff noise
|
|
6148
6148
|
/* @__PURE__ */ xt(function(t, n) {
|
|
6149
|
-
const r =
|
|
6149
|
+
const r = Vt(Br, t.__scopeDialog), o = h.useRef(null), a = ye(n, r.contentRef, o);
|
|
6150
6150
|
return h.useEffect(() => {
|
|
6151
6151
|
const i = o.current;
|
|
6152
6152
|
if (i) return ua(i);
|
|
@@ -6174,7 +6174,7 @@ var t0 = function(e) {
|
|
|
6174
6174
|
), d0 = /* @__PURE__ */ h.forwardRef(
|
|
6175
6175
|
// blank line to reduce diff noise
|
|
6176
6176
|
/* @__PURE__ */ xt(function(t, n) {
|
|
6177
|
-
const r =
|
|
6177
|
+
const r = Vt(Br, t.__scopeDialog), o = h.useRef(!1), a = h.useRef(!1);
|
|
6178
6178
|
return /* @__PURE__ */ l(
|
|
6179
6179
|
Jd,
|
|
6180
6180
|
{
|
|
@@ -6196,7 +6196,7 @@ var t0 = function(e) {
|
|
|
6196
6196
|
), Jd = /* @__PURE__ */ h.forwardRef(
|
|
6197
6197
|
// blank line to reduce diff noise
|
|
6198
6198
|
/* @__PURE__ */ xt(function(t, n) {
|
|
6199
|
-
const { __scopeDialog: r, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: i, ...s } = t, c =
|
|
6199
|
+
const { __scopeDialog: r, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: i, ...s } = t, c = Vt(Br, r);
|
|
6200
6200
|
return fr(), /* @__PURE__ */ l(Me, { children: /* @__PURE__ */ l(
|
|
6201
6201
|
ca,
|
|
6202
6202
|
{
|
|
@@ -6224,18 +6224,18 @@ var t0 = function(e) {
|
|
|
6224
6224
|
}, "DialogContentImpl")
|
|
6225
6225
|
), u0 = "DialogTitle", Qd = /* @__PURE__ */ h.forwardRef(
|
|
6226
6226
|
/* @__PURE__ */ xt(function(t, n) {
|
|
6227
|
-
const { __scopeDialog: r, ...o } = t, a =
|
|
6227
|
+
const { __scopeDialog: r, ...o } = t, a = Vt(u0, r), { setTitleCount: i } = a;
|
|
6228
6228
|
return Fe(() => (i((s) => s + 1), () => i((s) => s - 1)), [i]), /* @__PURE__ */ l(fe.h2, { id: a.titleId, ...o, ref: n });
|
|
6229
6229
|
}, "DialogTitle")
|
|
6230
6230
|
), f0 = "DialogDescription", p0 = /* @__PURE__ */ h.forwardRef(
|
|
6231
6231
|
// blank line to reduce diff noise
|
|
6232
6232
|
/* @__PURE__ */ xt(function(t, n) {
|
|
6233
|
-
const { __scopeDialog: r, ...o } = t, a =
|
|
6233
|
+
const { __scopeDialog: r, ...o } = t, a = Vt(f0, r), { setDescriptionCount: i } = a;
|
|
6234
6234
|
return Fe(() => (i((s) => s + 1), () => i((s) => s - 1)), [i]), /* @__PURE__ */ l(fe.p, { id: a.descriptionId, ...o, ref: n });
|
|
6235
6235
|
}, "DialogDescription")
|
|
6236
6236
|
), h0 = "DialogClose", m0 = /* @__PURE__ */ h.forwardRef(
|
|
6237
6237
|
/* @__PURE__ */ xt(function(t, n) {
|
|
6238
|
-
const { __scopeDialog: r, ...o } = t, a =
|
|
6238
|
+
const { __scopeDialog: r, ...o } = t, a = Vt(h0, r);
|
|
6239
6239
|
return /* @__PURE__ */ l(
|
|
6240
6240
|
fe.button,
|
|
6241
6241
|
{
|
|
@@ -6472,7 +6472,7 @@ function b0({
|
|
|
6472
6472
|
T.objects && T.objects.length && T.objects.forEach((L) => {
|
|
6473
6473
|
k[L.id] && (E.current = !0, L.customConfig = k[L.id], L.customConfig.moveable || (L.customConfig.originalWidth = L.width * Math.abs(L.scaleX || 1), L.customConfig.originalHeight = L.height * Math.abs(L.scaleY || 1)));
|
|
6474
6474
|
});
|
|
6475
|
-
}), P), [N, I] = Y(!1), F = re(null),
|
|
6475
|
+
}), P), [N, I] = Y(!1), F = re(null), j = async () => {
|
|
6476
6476
|
if (!(u && !await fa({
|
|
6477
6477
|
title: p("Keep saving?"),
|
|
6478
6478
|
description: p("There are still views that have not been designed. Do you want to continue saving?"),
|
|
@@ -6511,7 +6511,7 @@ function b0({
|
|
|
6511
6511
|
/* @__PURE__ */ l(Yc, { className: "size-5 cursor-pointer", onClick: () => e?.() }),
|
|
6512
6512
|
/* @__PURE__ */ l("div", { className: "flex-1 flex items-center", children: (s?.assets?.[0]?.full_url || s?.product?.title || s?.variant_title || s?.price) && /* @__PURE__ */ D(Me, { children: [
|
|
6513
6513
|
s.assets?.[0]?.full_url && /* @__PURE__ */ l(
|
|
6514
|
-
|
|
6514
|
+
Be,
|
|
6515
6515
|
{
|
|
6516
6516
|
src: s.assets[0].full_url,
|
|
6517
6517
|
alt: s.product?.title || "",
|
|
@@ -6526,7 +6526,7 @@ function b0({
|
|
|
6526
6526
|
s.price && /* @__PURE__ */ l("div", { className: "mt-1 font-bold", children: s.price })
|
|
6527
6527
|
] })
|
|
6528
6528
|
] }) }),
|
|
6529
|
-
!!c && v && /* @__PURE__ */ l(Tn, { className: "ml-5 rounded-full min-w-20", onClick:
|
|
6529
|
+
!!c && v && /* @__PURE__ */ l(Tn, { className: "ml-5 rounded-full min-w-20", onClick: j, loading: N, children: p("Done") })
|
|
6530
6530
|
] }),
|
|
6531
6531
|
/* @__PURE__ */ D(
|
|
6532
6532
|
"div",
|
|
@@ -6629,7 +6629,7 @@ function w0({ semiDesignPermission: e }) {
|
|
|
6629
6629
|
className: `px-0 flex flex-col rounded-printine-md items-center cursor-pointer break-words hover:bg-gray-100 py-3 mb-1 ${o === c.type ? "bg-gray-100" : ""}`,
|
|
6630
6630
|
onClick: () => s(c.type),
|
|
6631
6631
|
children: [
|
|
6632
|
-
/* @__PURE__ */ l(
|
|
6632
|
+
/* @__PURE__ */ l(Be, { src: c.icon, alt: c.label ? t(c.label) : c.type, width: 24, height: 24 }),
|
|
6633
6633
|
c.label && /* @__PURE__ */ l("div", { className: "text-printine-tiny", children: t(c.label) })
|
|
6634
6634
|
]
|
|
6635
6635
|
},
|
|
@@ -6963,7 +6963,7 @@ const I0 = 50, T0 = async (e, t, n) => {
|
|
|
6963
6963
|
}, m = Rs(o), v = ks(m), b = await i.getDimensions(d), g = m === "y", C = g ? "top" : "left", k = g ? "bottom" : "right", w = g ? "clientHeight" : "clientWidth", y = a.reference[v] + a.reference[m] - p[m] - a.floating[v], x = p[m] - a.reference[m], S = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(d));
|
|
6964
6964
|
let E = S ? S[w] : 0;
|
|
6965
6965
|
(!E || !await (i.isElement == null ? void 0 : i.isElement(S))) && (E = s.floating[w] || a.floating[v]);
|
|
6966
|
-
const R = y / 2 - x / 2, N = E / 2 - b[v] / 2 - 1, I = hn(f[C], N), F = hn(f[k], N),
|
|
6966
|
+
const R = y / 2 - x / 2, N = E / 2 - b[v] / 2 - 1, I = hn(f[C], N), F = hn(f[k], N), j = E - b[v] - F, P = E / 2 - b[v] / 2 + R, T = ru(I, P, j), L = !c.arrow && pr(o) != null && P !== T && a.reference[v] / 2 - (P < I ? I : F) - b[v] / 2 < 0, z = L ? P < I ? P - I : P - j : 0;
|
|
6967
6967
|
return {
|
|
6968
6968
|
[m]: p[m] + z,
|
|
6969
6969
|
data: {
|
|
@@ -7012,7 +7012,7 @@ const I0 = 50, T0 = async (e, t, n) => {
|
|
|
7012
7012
|
placement: o,
|
|
7013
7013
|
overflows: N
|
|
7014
7014
|
}], !N.every((T) => T <= 0)) {
|
|
7015
|
-
var F,
|
|
7015
|
+
var F, j;
|
|
7016
7016
|
const T = (((F = a.flip) == null ? void 0 : F.index) || 0) + 1, L = E[T];
|
|
7017
7017
|
if (L && (!(f === "alignment" ? k !== Ft(L) : !1) || // We leave the current main axis only if every placement on that axis
|
|
7018
7018
|
// overflows the main axis.
|
|
@@ -7026,7 +7026,7 @@ const I0 = 50, T0 = async (e, t, n) => {
|
|
|
7026
7026
|
placement: L
|
|
7027
7027
|
}
|
|
7028
7028
|
};
|
|
7029
|
-
let z = (
|
|
7029
|
+
let z = (j = I.filter((A) => A.overflows[0] <= 0).sort((A, $) => A.overflows[1] - $.overflows[1])[0]) == null ? void 0 : j.placement;
|
|
7030
7030
|
if (!z)
|
|
7031
7031
|
switch (m) {
|
|
7032
7032
|
case "bestFit": {
|
|
@@ -7322,10 +7322,10 @@ function ha(e) {
|
|
|
7322
7322
|
overflowX: n,
|
|
7323
7323
|
overflowY: r,
|
|
7324
7324
|
display: o
|
|
7325
|
-
} =
|
|
7325
|
+
} = jt(e);
|
|
7326
7326
|
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && o !== "inline" && o !== "contents";
|
|
7327
7327
|
}
|
|
7328
|
-
function
|
|
7328
|
+
function j0(e) {
|
|
7329
7329
|
return /^(table|td|th)$/.test(hr(e));
|
|
7330
7330
|
}
|
|
7331
7331
|
function ma(e) {
|
|
@@ -7340,15 +7340,15 @@ function ma(e) {
|
|
|
7340
7340
|
return !1;
|
|
7341
7341
|
}
|
|
7342
7342
|
}
|
|
7343
|
-
const
|
|
7343
|
+
const V0 = /transform|translate|scale|rotate|perspective|filter/, H0 = /paint|layout|strict|content/, Nn = (e) => !!e && e !== "none";
|
|
7344
7344
|
let Qa;
|
|
7345
7345
|
function Ps(e) {
|
|
7346
|
-
const t = Bt(e) ?
|
|
7347
|
-
return Nn(t.transform) || Nn(t.translate) || Nn(t.scale) || Nn(t.rotate) || Nn(t.perspective) || !Ns() && (Nn(t.backdropFilter) || Nn(t.filter)) ||
|
|
7346
|
+
const t = Bt(e) ? jt(e) : e;
|
|
7347
|
+
return Nn(t.transform) || Nn(t.translate) || Nn(t.scale) || Nn(t.rotate) || Nn(t.perspective) || !Ns() && (Nn(t.backdropFilter) || Nn(t.filter)) || V0.test(t.willChange || "") || H0.test(t.contain || "");
|
|
7348
7348
|
}
|
|
7349
7349
|
function U0(e) {
|
|
7350
7350
|
let t = _n(e);
|
|
7351
|
-
for (; wn(t) && !
|
|
7351
|
+
for (; wn(t) && !jr(t); ) {
|
|
7352
7352
|
if (Ps(t))
|
|
7353
7353
|
return t;
|
|
7354
7354
|
if (ma(t))
|
|
@@ -7360,10 +7360,10 @@ function U0(e) {
|
|
|
7360
7360
|
function Ns() {
|
|
7361
7361
|
return Qa == null && (Qa = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), Qa;
|
|
7362
7362
|
}
|
|
7363
|
-
function
|
|
7363
|
+
function jr(e) {
|
|
7364
7364
|
return /^(html|body|#document)$/.test(hr(e));
|
|
7365
7365
|
}
|
|
7366
|
-
function
|
|
7366
|
+
function jt(e) {
|
|
7367
7367
|
return dt(e).getComputedStyle(e);
|
|
7368
7368
|
}
|
|
7369
7369
|
function ga(e) {
|
|
@@ -7389,23 +7389,23 @@ function _n(e) {
|
|
|
7389
7389
|
}
|
|
7390
7390
|
function su(e) {
|
|
7391
7391
|
const t = _n(e);
|
|
7392
|
-
return
|
|
7392
|
+
return jr(t) ? (e.ownerDocument || e).body : wn(t) && ha(t) ? t : su(t);
|
|
7393
7393
|
}
|
|
7394
|
-
function
|
|
7394
|
+
function Vr(e, t, n) {
|
|
7395
7395
|
var r;
|
|
7396
7396
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
7397
7397
|
const o = su(e), a = o === ((r = e.ownerDocument) == null ? void 0 : r.body), i = dt(o);
|
|
7398
7398
|
if (a) {
|
|
7399
7399
|
const s = Fi(i);
|
|
7400
|
-
return t.concat(i, i.visualViewport || [], ha(o) ? o : [], s && n ?
|
|
7400
|
+
return t.concat(i, i.visualViewport || [], ha(o) ? o : [], s && n ? Vr(s) : []);
|
|
7401
7401
|
} else
|
|
7402
|
-
return t.concat(o,
|
|
7402
|
+
return t.concat(o, Vr(o, [], n));
|
|
7403
7403
|
}
|
|
7404
7404
|
function Fi(e) {
|
|
7405
7405
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
7406
7406
|
}
|
|
7407
7407
|
function lu(e) {
|
|
7408
|
-
const t =
|
|
7408
|
+
const t = jt(e);
|
|
7409
7409
|
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
|
|
7410
7410
|
const o = wn(e), a = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, s = qo(n) !== a || qo(r) !== i;
|
|
7411
7411
|
return s && (n = a, r = i), {
|
|
@@ -7454,7 +7454,7 @@ function Mn(e, t, n, r) {
|
|
|
7454
7454
|
const p = dt(a), m = Bt(r) ? dt(r) : r;
|
|
7455
7455
|
let v = p, b = Fi(v);
|
|
7456
7456
|
for (; b && m !== v; ) {
|
|
7457
|
-
const g = rr(b), C = b.getBoundingClientRect(), k =
|
|
7457
|
+
const g = rr(b), C = b.getBoundingClientRect(), k = jt(b), w = C.left + (b.clientLeft + parseFloat(k.paddingLeft)) * g.x, y = C.top + (b.clientTop + parseFloat(k.paddingTop)) * g.y;
|
|
7458
7458
|
c *= g.x, d *= g.y, u *= g.x, f *= g.y, c += w, d += y, v = dt(b), b = Fi(v);
|
|
7459
7459
|
}
|
|
7460
7460
|
}
|
|
@@ -7510,7 +7510,7 @@ function q0(e) {
|
|
|
7510
7510
|
const t = ga(e), n = e.ownerDocument.body, r = Yt(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), o = Yt(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
|
|
7511
7511
|
let a = -t.scrollLeft + va(e);
|
|
7512
7512
|
const i = -t.scrollTop;
|
|
7513
|
-
return
|
|
7513
|
+
return jt(n).direction === "rtl" && (a += Yt(e.clientWidth, n.clientWidth) - r), {
|
|
7514
7514
|
width: r,
|
|
7515
7515
|
height: o,
|
|
7516
7516
|
x: a,
|
|
@@ -7569,11 +7569,11 @@ function Q0(e, t) {
|
|
|
7569
7569
|
const n = t.get(e);
|
|
7570
7570
|
if (n)
|
|
7571
7571
|
return n;
|
|
7572
|
-
let r =
|
|
7573
|
-
const a =
|
|
7572
|
+
let r = Vr(e, [], !1).filter((s) => Bt(s) && hr(s) !== "body"), o = null;
|
|
7573
|
+
const a = jt(e).position === "fixed";
|
|
7574
7574
|
let i = a ? _n(e) : e;
|
|
7575
|
-
for (; Bt(i) && !
|
|
7576
|
-
const s =
|
|
7575
|
+
for (; Bt(i) && !jr(i); ) {
|
|
7576
|
+
const s = jt(i), c = Ps(i), d = o ? o.position : a ? "fixed" : "";
|
|
7577
7577
|
!c && (d === "fixed" || d === "absolute" && s.position === "static") ? r = r.filter((f) => f !== i) : o = s, i = _n(i);
|
|
7578
7578
|
}
|
|
7579
7579
|
return t.set(e, r), r;
|
|
@@ -7629,10 +7629,10 @@ function nv(e, t, n) {
|
|
|
7629
7629
|
};
|
|
7630
7630
|
}
|
|
7631
7631
|
function ei(e) {
|
|
7632
|
-
return
|
|
7632
|
+
return jt(e).position === "static";
|
|
7633
7633
|
}
|
|
7634
7634
|
function Zl(e, t) {
|
|
7635
|
-
if (!wn(e) ||
|
|
7635
|
+
if (!wn(e) || jt(e).position === "fixed")
|
|
7636
7636
|
return null;
|
|
7637
7637
|
if (t)
|
|
7638
7638
|
return t(e);
|
|
@@ -7645,7 +7645,7 @@ function uu(e, t) {
|
|
|
7645
7645
|
return n;
|
|
7646
7646
|
if (!wn(e)) {
|
|
7647
7647
|
let o = _n(e);
|
|
7648
|
-
for (; o && !
|
|
7648
|
+
for (; o && !jr(o); ) {
|
|
7649
7649
|
if (Bt(o) && !ei(o))
|
|
7650
7650
|
return o;
|
|
7651
7651
|
o = _n(o);
|
|
@@ -7653,9 +7653,9 @@ function uu(e, t) {
|
|
|
7653
7653
|
return n;
|
|
7654
7654
|
}
|
|
7655
7655
|
let r = Zl(e, t);
|
|
7656
|
-
for (; r &&
|
|
7656
|
+
for (; r && j0(r) && ei(r); )
|
|
7657
7657
|
r = Zl(r, t);
|
|
7658
|
-
return r &&
|
|
7658
|
+
return r && jr(r) && ei(r) && !Ps(r) ? n : r || U0(e) || n;
|
|
7659
7659
|
}
|
|
7660
7660
|
const rv = async function(e) {
|
|
7661
7661
|
const t = this.getOffsetParent || uu, n = this.getDimensions, r = await n(e.floating);
|
|
@@ -7670,7 +7670,7 @@ const rv = async function(e) {
|
|
|
7670
7670
|
};
|
|
7671
7671
|
};
|
|
7672
7672
|
function ov(e) {
|
|
7673
|
-
return
|
|
7673
|
+
return jt(e).direction === "rtl";
|
|
7674
7674
|
}
|
|
7675
7675
|
const av = {
|
|
7676
7676
|
convertOffsetParentRelativeRectToViewportRelativeRect: K0,
|
|
@@ -7746,7 +7746,7 @@ function sv(e, t, n, r) {
|
|
|
7746
7746
|
elementResize: i = typeof ResizeObserver == "function",
|
|
7747
7747
|
layoutShift: s = typeof IntersectionObserver == "function",
|
|
7748
7748
|
animationFrame: c = !1
|
|
7749
|
-
} = r, d = Ds(e), u = o || a ? [...d ?
|
|
7749
|
+
} = r, d = Ds(e), u = o || a ? [...d ? Vr(d) : [], ...t ? Vr(t) : []] : [];
|
|
7750
7750
|
u.forEach((C) => {
|
|
7751
7751
|
o && C.addEventListener("scroll", n), a && C.addEventListener("resize", n);
|
|
7752
7752
|
});
|
|
@@ -7855,7 +7855,7 @@ function vv(e) {
|
|
|
7855
7855
|
$ !== S.current && (S.current = $, b($));
|
|
7856
7856
|
}, []), w = h.useCallback(($) => {
|
|
7857
7857
|
$ !== E.current && (E.current = $, C($));
|
|
7858
|
-
}, []), y = a || v, x = i || g, S = h.useRef(null), E = h.useRef(null), R = h.useRef(u), N = c != null, I = ti(c), F = ti(o),
|
|
7858
|
+
}, []), y = a || v, x = i || g, S = h.useRef(null), E = h.useRef(null), R = h.useRef(u), N = c != null, I = ti(c), F = ti(o), j = ti(d), P = h.useCallback(() => {
|
|
7859
7859
|
if (!S.current || !E.current)
|
|
7860
7860
|
return;
|
|
7861
7861
|
const $ = {
|
|
@@ -7870,13 +7870,13 @@ function vv(e) {
|
|
|
7870
7870
|
// but still mounted (such as when transitioning out). To ensure
|
|
7871
7871
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
7872
7872
|
// setting it to `true` when `open === false` (must be specified).
|
|
7873
|
-
isPositioned:
|
|
7873
|
+
isPositioned: j.current !== !1
|
|
7874
7874
|
};
|
|
7875
7875
|
T.current && !Jo(R.current, _) && (R.current = _, Yr.flushSync(() => {
|
|
7876
7876
|
f(_);
|
|
7877
7877
|
}));
|
|
7878
7878
|
});
|
|
7879
|
-
}, [p, t, n, F,
|
|
7879
|
+
}, [p, t, n, F, j]);
|
|
7880
7880
|
zo(() => {
|
|
7881
7881
|
d === !1 && R.current.isPositioned && (R.current.isPositioned = !1, f(($) => ({
|
|
7882
7882
|
...$,
|
|
@@ -8092,9 +8092,9 @@ var Tv = Object.defineProperty, Xt = (e, t) => Tv(e, "name", { value: t, configu
|
|
|
8092
8092
|
updatePositionStrategy: v = "optimized",
|
|
8093
8093
|
onPlaced: b,
|
|
8094
8094
|
...g
|
|
8095
|
-
} = t, C = gu(vu, r), [k, w] = h.useState(null), y = ye(n, w), [x, S] = h.useState(null), E = eo(x), R = E?.width ?? 0, N = E?.height ?? 0, I = o + (i !== "center" ? "-" + i : ""), F = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f },
|
|
8095
|
+
} = t, C = gu(vu, r), [k, w] = h.useState(null), y = ye(n, w), [x, S] = h.useState(null), E = eo(x), R = E?.width ?? 0, N = E?.height ?? 0, I = o + (i !== "center" ? "-" + i : ""), F = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, j = Array.isArray(u) ? u : [u], P = j.length > 0, T = {
|
|
8096
8096
|
padding: F,
|
|
8097
|
-
boundary:
|
|
8097
|
+
boundary: j.filter(bu),
|
|
8098
8098
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
8099
8099
|
altBoundary: P
|
|
8100
8100
|
}, { refs: L, floatingStyles: z, placement: A, isPositioned: $, middlewareData: U } = vv({
|
|
@@ -8142,13 +8142,13 @@ var Tv = Object.defineProperty, Xt = (e, t) => Tv(e, "name", { value: t, configu
|
|
|
8142
8142
|
Fe(() => (_(A), () => {
|
|
8143
8143
|
_(void 0);
|
|
8144
8144
|
}), [A, _]);
|
|
8145
|
-
const [ne, M] = ba(A),
|
|
8145
|
+
const [ne, M] = ba(A), G = yt(b);
|
|
8146
8146
|
Fe(() => {
|
|
8147
|
-
$ &&
|
|
8148
|
-
}, [$,
|
|
8149
|
-
const ee = U.arrow?.x,
|
|
8147
|
+
$ && G?.();
|
|
8148
|
+
}, [$, G]);
|
|
8149
|
+
const ee = U.arrow?.x, K = U.arrow?.y, Q = U.arrow?.centerOffset !== 0, [B, V] = h.useState();
|
|
8150
8150
|
return Fe(() => {
|
|
8151
|
-
k &&
|
|
8151
|
+
k && V(window.getComputedStyle(k).zIndex);
|
|
8152
8152
|
}, [k]), /* @__PURE__ */ l(
|
|
8153
8153
|
"div",
|
|
8154
8154
|
{
|
|
@@ -8181,7 +8181,7 @@ var Tv = Object.defineProperty, Xt = (e, t) => Tv(e, "name", { value: t, configu
|
|
|
8181
8181
|
placedAlign: M,
|
|
8182
8182
|
onArrowChange: S,
|
|
8183
8183
|
arrowX: ee,
|
|
8184
|
-
arrowY:
|
|
8184
|
+
arrowY: K,
|
|
8185
8185
|
shouldHideArrow: Q,
|
|
8186
8186
|
children: /* @__PURE__ */ l(
|
|
8187
8187
|
fe.div,
|
|
@@ -8204,14 +8204,14 @@ var Tv = Object.defineProperty, Xt = (e, t) => Tv(e, "name", { value: t, configu
|
|
|
8204
8204
|
}
|
|
8205
8205
|
);
|
|
8206
8206
|
}, "PopperContent")
|
|
8207
|
-
), Bv = "PopperArrow",
|
|
8207
|
+
), Bv = "PopperArrow", jv = {
|
|
8208
8208
|
top: "bottom",
|
|
8209
8209
|
right: "left",
|
|
8210
8210
|
bottom: "top",
|
|
8211
8211
|
left: "right"
|
|
8212
|
-
},
|
|
8212
|
+
}, Vv = /* @__PURE__ */ h.forwardRef(
|
|
8213
8213
|
/* @__PURE__ */ Xt(function(t, n) {
|
|
8214
|
-
const { __scopePopper: r, ...o } = t, a = $v(Bv, r), i =
|
|
8214
|
+
const { __scopePopper: r, ...o } = t, a = $v(Bv, r), i = jv[a.placedSide];
|
|
8215
8215
|
return (
|
|
8216
8216
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
8217
8217
|
// doesn't report size as we'd expect on SVG elements.
|
|
@@ -8274,7 +8274,7 @@ function ba(e) {
|
|
|
8274
8274
|
return [t, n];
|
|
8275
8275
|
}
|
|
8276
8276
|
Xt(ba, "getSideAndAlignFromPlacement");
|
|
8277
|
-
var wa = Mv, ya = Lv, Ca = zv, wu =
|
|
8277
|
+
var wa = Mv, ya = Lv, Ca = zv, wu = Vv, Uv = Object.defineProperty, on = (e, t) => Uv(e, "name", { value: t, configurable: !0 }), As = "Popover", [yu, ex] = /* @__PURE__ */ nt(As, [
|
|
8278
8278
|
yn
|
|
8279
8279
|
]), xa = yn(), [Wv, mr] = yu(As), Gv = /* @__PURE__ */ on((e) => {
|
|
8280
8280
|
const {
|
|
@@ -8600,24 +8600,24 @@ function gr(e) {
|
|
|
8600
8600
|
];
|
|
8601
8601
|
}
|
|
8602
8602
|
Ze(gr, "createCollection");
|
|
8603
|
-
var ec = /* @__PURE__ */ new WeakMap(),
|
|
8603
|
+
var ec = /* @__PURE__ */ new WeakMap(), je, ht, ni = (ht = class extends Map {
|
|
8604
8604
|
constructor(n) {
|
|
8605
8605
|
super(n);
|
|
8606
|
-
bl(this,
|
|
8607
|
-
|
|
8606
|
+
bl(this, je);
|
|
8607
|
+
ja(this, je, [...super.keys()]), ec.set(this, !0);
|
|
8608
8608
|
}
|
|
8609
8609
|
set(n, r) {
|
|
8610
|
-
return ec.get(this) && (this.has(n) ? tt(this,
|
|
8610
|
+
return ec.get(this) && (this.has(n) ? tt(this, je)[tt(this, je).indexOf(n)] = n : tt(this, je).push(n)), super.set(n, r), this;
|
|
8611
8611
|
}
|
|
8612
8612
|
insert(n, r, o) {
|
|
8613
|
-
const a = this.has(r), i = tt(this,
|
|
8613
|
+
const a = this.has(r), i = tt(this, je).length, s = Ts(n);
|
|
8614
8614
|
let c = s >= 0 ? s : i + s;
|
|
8615
8615
|
const d = c < 0 || c >= i ? -1 : c;
|
|
8616
8616
|
if (d === this.size || a && d === this.size - 1 || d === -1)
|
|
8617
8617
|
return this.set(r, o), this;
|
|
8618
8618
|
const u = this.size + (a ? 0 : 1);
|
|
8619
8619
|
s < 0 && c++;
|
|
8620
|
-
const f = [...tt(this,
|
|
8620
|
+
const f = [...tt(this, je)];
|
|
8621
8621
|
let p, m = !1;
|
|
8622
8622
|
for (let v = c; v < u; v++)
|
|
8623
8623
|
if (c === v) {
|
|
@@ -8635,7 +8635,7 @@ var ec = /* @__PURE__ */ new WeakMap(), Be, ht, ni = (ht = class extends Map {
|
|
|
8635
8635
|
return a.insert(n, r, o), a;
|
|
8636
8636
|
}
|
|
8637
8637
|
before(n) {
|
|
8638
|
-
const r = tt(this,
|
|
8638
|
+
const r = tt(this, je).indexOf(n) - 1;
|
|
8639
8639
|
if (!(r < 0))
|
|
8640
8640
|
return this.entryAt(r);
|
|
8641
8641
|
}
|
|
@@ -8643,11 +8643,11 @@ var ec = /* @__PURE__ */ new WeakMap(), Be, ht, ni = (ht = class extends Map {
|
|
|
8643
8643
|
* Sets a new key-value pair at the position before the given key.
|
|
8644
8644
|
*/
|
|
8645
8645
|
setBefore(n, r, o) {
|
|
8646
|
-
const a = tt(this,
|
|
8646
|
+
const a = tt(this, je).indexOf(n);
|
|
8647
8647
|
return a === -1 ? this : this.insert(a, r, o);
|
|
8648
8648
|
}
|
|
8649
8649
|
after(n) {
|
|
8650
|
-
let r = tt(this,
|
|
8650
|
+
let r = tt(this, je).indexOf(n);
|
|
8651
8651
|
if (r = r === -1 || r === this.size - 1 ? -1 : r + 1, r !== -1)
|
|
8652
8652
|
return this.entryAt(r);
|
|
8653
8653
|
}
|
|
@@ -8655,7 +8655,7 @@ var ec = /* @__PURE__ */ new WeakMap(), Be, ht, ni = (ht = class extends Map {
|
|
|
8655
8655
|
* Sets a new key-value pair at the position after the given key.
|
|
8656
8656
|
*/
|
|
8657
8657
|
setAfter(n, r, o) {
|
|
8658
|
-
const a = tt(this,
|
|
8658
|
+
const a = tt(this, je).indexOf(n);
|
|
8659
8659
|
return a === -1 ? this : this.insert(a + 1, r, o);
|
|
8660
8660
|
}
|
|
8661
8661
|
first() {
|
|
@@ -8665,31 +8665,31 @@ var ec = /* @__PURE__ */ new WeakMap(), Be, ht, ni = (ht = class extends Map {
|
|
|
8665
8665
|
return this.entryAt(-1);
|
|
8666
8666
|
}
|
|
8667
8667
|
clear() {
|
|
8668
|
-
return
|
|
8668
|
+
return ja(this, je, []), super.clear();
|
|
8669
8669
|
}
|
|
8670
8670
|
delete(n) {
|
|
8671
8671
|
const r = super.delete(n);
|
|
8672
|
-
return r && tt(this,
|
|
8672
|
+
return r && tt(this, je).splice(tt(this, je).indexOf(n), 1), r;
|
|
8673
8673
|
}
|
|
8674
8674
|
deleteAt(n) {
|
|
8675
8675
|
const r = this.keyAt(n);
|
|
8676
8676
|
return r !== void 0 ? this.delete(r) : !1;
|
|
8677
8677
|
}
|
|
8678
8678
|
at(n) {
|
|
8679
|
-
const r = Bo(tt(this,
|
|
8679
|
+
const r = Bo(tt(this, je), n);
|
|
8680
8680
|
if (r !== void 0)
|
|
8681
8681
|
return this.get(r);
|
|
8682
8682
|
}
|
|
8683
8683
|
entryAt(n) {
|
|
8684
|
-
const r = Bo(tt(this,
|
|
8684
|
+
const r = Bo(tt(this, je), n);
|
|
8685
8685
|
if (r !== void 0)
|
|
8686
8686
|
return [r, this.get(r)];
|
|
8687
8687
|
}
|
|
8688
8688
|
indexOf(n) {
|
|
8689
|
-
return tt(this,
|
|
8689
|
+
return tt(this, je).indexOf(n);
|
|
8690
8690
|
}
|
|
8691
8691
|
keyAt(n) {
|
|
8692
|
-
return Bo(tt(this,
|
|
8692
|
+
return Bo(tt(this, je), n);
|
|
8693
8693
|
}
|
|
8694
8694
|
from(n, r) {
|
|
8695
8695
|
const o = this.indexOf(n);
|
|
@@ -8798,7 +8798,7 @@ var ec = /* @__PURE__ */ new WeakMap(), Be, ht, ni = (ht = class extends Map {
|
|
|
8798
8798
|
}
|
|
8799
8799
|
return !1;
|
|
8800
8800
|
}
|
|
8801
|
-
},
|
|
8801
|
+
}, je = new WeakMap(), Ze(ht, "OrderedDict"), ht);
|
|
8802
8802
|
function Bo(e, t) {
|
|
8803
8803
|
if ("at" in Array.prototype)
|
|
8804
8804
|
return Array.prototype.at.call(e, t);
|
|
@@ -8837,7 +8837,7 @@ function pb(e) {
|
|
|
8837
8837
|
const c = /* @__PURE__ */ Ze((w) => {
|
|
8838
8838
|
const { scope: y, children: x, state: S } = w, E = h.useRef(null), [R, N] = h.useState(
|
|
8839
8839
|
null
|
|
8840
|
-
), I = ye(E, N), [F,
|
|
8840
|
+
), I = ye(E, N), [F, j] = S;
|
|
8841
8841
|
return h.useEffect(() => {
|
|
8842
8842
|
if (!R) return;
|
|
8843
8843
|
const P = Du(() => {
|
|
@@ -8853,7 +8853,7 @@ function pb(e) {
|
|
|
8853
8853
|
{
|
|
8854
8854
|
scope: y,
|
|
8855
8855
|
itemMap: F,
|
|
8856
|
-
setItemMap:
|
|
8856
|
+
setItemMap: j,
|
|
8857
8857
|
collectionRef: I,
|
|
8858
8858
|
collectionRefObject: E,
|
|
8859
8859
|
collectionElement: R,
|
|
@@ -8871,7 +8871,7 @@ function pb(e) {
|
|
|
8871
8871
|
f.displayName = d;
|
|
8872
8872
|
const p = e + "CollectionItemSlot", m = "data-radix-collection-item", v = /* @__PURE__ */ kt(p), b = h.forwardRef(
|
|
8873
8873
|
(w, y) => {
|
|
8874
|
-
const { scope: x, children: S, ...E } = w, R = h.useRef(null), [N, I] = h.useState(null), F = ye(y, R, I),
|
|
8874
|
+
const { scope: x, children: S, ...E } = w, R = h.useRef(null), [N, I] = h.useState(null), F = ye(y, R, I), j = a(p, x), { setItemMap: P } = j, T = h.useRef(E);
|
|
8875
8875
|
Pu(T.current, E) || (T.current = E);
|
|
8876
8876
|
const L = T.current;
|
|
8877
8877
|
return h.useEffect(() => {
|
|
@@ -9183,7 +9183,7 @@ var Nb = Object.defineProperty, mt = (e, t) => Nb(e, "name", { value: t, configu
|
|
|
9183
9183
|
}
|
|
9184
9184
|
);
|
|
9185
9185
|
}, "AccordionItem")
|
|
9186
|
-
), Bb = "AccordionHeader",
|
|
9186
|
+
), Bb = "AccordionHeader", jb = /* @__PURE__ */ h.forwardRef(
|
|
9187
9187
|
// blank line to reduce diff noise
|
|
9188
9188
|
/* @__PURE__ */ mt(function(t, n) {
|
|
9189
9189
|
const { __scopeAccordion: r, ...o } = t, a = ka(Ht, r), i = Fs(Bb, r);
|
|
@@ -9198,7 +9198,7 @@ var Nb = Object.defineProperty, mt = (e, t) => Nb(e, "name", { value: t, configu
|
|
|
9198
9198
|
}
|
|
9199
9199
|
);
|
|
9200
9200
|
}, "AccordionHeader")
|
|
9201
|
-
), tc = "AccordionTrigger",
|
|
9201
|
+
), tc = "AccordionTrigger", Vb = /* @__PURE__ */ h.forwardRef(
|
|
9202
9202
|
// blank line to reduce diff noise
|
|
9203
9203
|
/* @__PURE__ */ mt(function(t, n) {
|
|
9204
9204
|
const { __scopeAccordion: r, ...o } = t, a = ka(Ht, r), i = Fs(tc, r), s = Mb(tc, r), c = Ls(r);
|
|
@@ -9240,7 +9240,7 @@ function $s(e) {
|
|
|
9240
9240
|
return e ? "open" : "closed";
|
|
9241
9241
|
}
|
|
9242
9242
|
mt($s, "getState");
|
|
9243
|
-
var Wb = Tb, Gb = zb, Kb =
|
|
9243
|
+
var Wb = Tb, Gb = zb, Kb = jb, Yb = Vb, qb = Ub;
|
|
9244
9244
|
function Xb({ ...e }) {
|
|
9245
9245
|
return /* @__PURE__ */ l(Wb, { "data-slot": "accordion", ...e });
|
|
9246
9246
|
}
|
|
@@ -9364,7 +9364,7 @@ var r2 = "CheckboxTrigger", o2 = /* @__PURE__ */ h.forwardRef(
|
|
|
9364
9364
|
role: "checkbox",
|
|
9365
9365
|
"aria-checked": Zt(d) ? "mixed" : d,
|
|
9366
9366
|
"aria-required": u,
|
|
9367
|
-
"data-state":
|
|
9367
|
+
"data-state": js(d),
|
|
9368
9368
|
"data-disabled": c ? "" : void 0,
|
|
9369
9369
|
disabled: c,
|
|
9370
9370
|
value: s,
|
|
@@ -9436,7 +9436,7 @@ var r2 = "CheckboxTrigger", o2 = /* @__PURE__ */ h.forwardRef(
|
|
|
9436
9436
|
children: /* @__PURE__ */ l(
|
|
9437
9437
|
fe.span,
|
|
9438
9438
|
{
|
|
9439
|
-
"data-state":
|
|
9439
|
+
"data-state": js(i.checked),
|
|
9440
9440
|
"data-disabled": i.disabled ? "" : void 0,
|
|
9441
9441
|
...a,
|
|
9442
9442
|
ref: n,
|
|
@@ -9471,10 +9471,10 @@ var r2 = "CheckboxTrigger", o2 = /* @__PURE__ */ h.forwardRef(
|
|
|
9471
9471
|
"checked"
|
|
9472
9472
|
).set, F = s !== x.current;
|
|
9473
9473
|
x.current = s;
|
|
9474
|
-
const
|
|
9474
|
+
const j = y.current !== c;
|
|
9475
9475
|
y.current = c;
|
|
9476
9476
|
const P = !(F && i.current);
|
|
9477
|
-
if (
|
|
9477
|
+
if (j && I) {
|
|
9478
9478
|
w.current = !F;
|
|
9479
9479
|
const T = new Event("click", { bubbles: P });
|
|
9480
9480
|
E.indeterminate = Zt(c), I.call(E, Zt(c) ? !1 : c), E.dispatchEvent(T), w.current = !1;
|
|
@@ -9522,10 +9522,10 @@ function Zt(e) {
|
|
|
9522
9522
|
return e === "indeterminate";
|
|
9523
9523
|
}
|
|
9524
9524
|
tn(Zt, "isIndeterminate");
|
|
9525
|
-
function
|
|
9525
|
+
function js(e) {
|
|
9526
9526
|
return Zt(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
9527
9527
|
}
|
|
9528
|
-
tn(
|
|
9528
|
+
tn(js, "getState");
|
|
9529
9529
|
function Bi({
|
|
9530
9530
|
className: e,
|
|
9531
9531
|
...t
|
|
@@ -9563,7 +9563,7 @@ function d2(e, t) {
|
|
|
9563
9563
|
};
|
|
9564
9564
|
}, [e, t]), n;
|
|
9565
9565
|
}
|
|
9566
|
-
const
|
|
9566
|
+
const Vs = sr(({ type: e, onUpdate: t, onDone: n, checkedList: r }, o) => {
|
|
9567
9567
|
const { canvasEditor: a } = et(), i = ze((f) => f.fontList), s = he(
|
|
9568
9568
|
(f, p) => {
|
|
9569
9569
|
if (e === "UPDATE") {
|
|
@@ -9734,23 +9734,23 @@ function f2({ item: e, getTextStyle: t, onAddText: n, onCheck: r, checkedFonts:
|
|
|
9734
9734
|
);
|
|
9735
9735
|
}
|
|
9736
9736
|
var nc = 1, p2 = 0.9, h2 = 0.8, m2 = 0.17, ri = 0.1, oi = 0.999, g2 = 0.9999, v2 = 0.99, b2 = /[\\\/_+.#"@\[\(\{&]/, w2 = /[\\\/_+.#"@\[\(\{&]/g, y2 = /[\s-]/, Fu = /[\s-]/g;
|
|
9737
|
-
function
|
|
9737
|
+
function ji(e, t, n, r, o, a, i) {
|
|
9738
9738
|
if (a === t.length) return o === e.length ? nc : v2;
|
|
9739
9739
|
var s = `${o},${a}`;
|
|
9740
9740
|
if (i[s] !== void 0) return i[s];
|
|
9741
|
-
for (var c = r.charAt(a), d = n.indexOf(c, o), u = 0, f, p, m, v; d >= 0; ) f =
|
|
9741
|
+
for (var c = r.charAt(a), d = n.indexOf(c, o), u = 0, f, p, m, v; d >= 0; ) f = ji(e, t, n, r, d + 1, a + 1, i), f > u && (d === o ? f *= nc : b2.test(e.charAt(d - 1)) ? (f *= h2, m = e.slice(o, d - 1).match(w2), m && o > 0 && (f *= Math.pow(oi, m.length))) : y2.test(e.charAt(d - 1)) ? (f *= p2, v = e.slice(o, d - 1).match(Fu), v && o > 0 && (f *= Math.pow(oi, v.length))) : (f *= m2, o > 0 && (f *= Math.pow(oi, d - o))), e.charAt(d) !== t.charAt(a) && (f *= g2)), (f < ri && n.charAt(d - 1) === r.charAt(a + 1) || r.charAt(a + 1) === r.charAt(a) && n.charAt(d - 1) !== r.charAt(a)) && (p = ji(e, t, n, r, d + 1, a + 2, i), p * ri > f && (f = p * ri)), f > u && (u = f), d = n.indexOf(c, d + 1);
|
|
9742
9742
|
return i[s] = u, u;
|
|
9743
9743
|
}
|
|
9744
9744
|
function rc(e) {
|
|
9745
9745
|
return e.toLowerCase().replace(Fu, " ");
|
|
9746
9746
|
}
|
|
9747
9747
|
function C2(e, t, n) {
|
|
9748
|
-
return e = n && n.length > 0 ? `${e + " " + n.join(" ")}` : e,
|
|
9748
|
+
return e = n && n.length > 0 ? `${e + " " + n.join(" ")}` : e, ji(e, t, rc(e), rc(t), 0, 0, {});
|
|
9749
9749
|
}
|
|
9750
|
-
var Rr = '[cmdk-group=""]', ai = '[cmdk-group-items=""]', x2 = '[cmdk-group-heading=""]', $u = '[cmdk-item=""]', oc = `${$u}:not([aria-disabled="true"])`,
|
|
9750
|
+
var Rr = '[cmdk-group=""]', ai = '[cmdk-group-items=""]', x2 = '[cmdk-group-heading=""]', $u = '[cmdk-item=""]', oc = `${$u}:not([aria-disabled="true"])`, Vi = "cmdk-item-select", Qn = "data-value", S2 = (e, t, n) => C2(e, t, n), zu = h.createContext(void 0), no = () => h.useContext(zu), Bu = h.createContext(void 0), Hs = () => h.useContext(Bu), ju = h.createContext(void 0), Vu = h.forwardRef((e, t) => {
|
|
9751
9751
|
let n = er(() => {
|
|
9752
|
-
var M,
|
|
9753
|
-
return { search: "", value: (
|
|
9752
|
+
var M, G;
|
|
9753
|
+
return { search: "", value: (G = (M = e.value) != null ? M : e.defaultValue) != null ? G : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
|
|
9754
9754
|
}), r = er(() => /* @__PURE__ */ new Set()), o = er(() => /* @__PURE__ */ new Map()), a = er(() => /* @__PURE__ */ new Map()), i = er(() => /* @__PURE__ */ new Set()), s = Hu(e), { label: c, children: d, value: u, onValueChange: f, filter: p, shouldFilter: m, loop: v, disablePointerSelection: b = !1, vimBindings: g = !0, ...C } = e, k = Qe(), w = Qe(), y = Qe(), x = h.useRef(null), S = M2();
|
|
9755
9755
|
On(() => {
|
|
9756
9756
|
if (u !== void 0) {
|
|
@@ -9760,21 +9760,21 @@ var Rr = '[cmdk-group=""]', ai = '[cmdk-group-items=""]', x2 = '[cmdk-group-head
|
|
|
9760
9760
|
}, [u]), On(() => {
|
|
9761
9761
|
S(6, P);
|
|
9762
9762
|
}, []);
|
|
9763
|
-
let E = h.useMemo(() => ({ subscribe: (M) => (i.current.add(M), () => i.current.delete(M)), snapshot: () => n.current, setState: (M,
|
|
9764
|
-
var
|
|
9765
|
-
if (!Object.is(n.current[M],
|
|
9766
|
-
if (n.current[M] =
|
|
9763
|
+
let E = h.useMemo(() => ({ subscribe: (M) => (i.current.add(M), () => i.current.delete(M)), snapshot: () => n.current, setState: (M, G, ee) => {
|
|
9764
|
+
var K, Q, B, V;
|
|
9765
|
+
if (!Object.is(n.current[M], G)) {
|
|
9766
|
+
if (n.current[M] = G, M === "search") j(), I(), S(1, F);
|
|
9767
9767
|
else if (M === "value") {
|
|
9768
9768
|
if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
|
|
9769
9769
|
let J = document.getElementById(y);
|
|
9770
|
-
J ? J.focus() : (
|
|
9770
|
+
J ? J.focus() : (K = document.getElementById(k)) == null || K.focus();
|
|
9771
9771
|
}
|
|
9772
9772
|
if (S(7, () => {
|
|
9773
9773
|
var J;
|
|
9774
9774
|
n.current.selectedItemId = (J = T()) == null ? void 0 : J.id, E.emit();
|
|
9775
9775
|
}), ee || S(5, P), ((Q = s.current) == null ? void 0 : Q.value) !== void 0) {
|
|
9776
|
-
let J =
|
|
9777
|
-
(
|
|
9776
|
+
let J = G ?? "";
|
|
9777
|
+
(V = (B = s.current).onValueChange) == null || V.call(B, J);
|
|
9778
9778
|
return;
|
|
9779
9779
|
}
|
|
9780
9780
|
}
|
|
@@ -9782,57 +9782,57 @@ var Rr = '[cmdk-group=""]', ai = '[cmdk-group-items=""]', x2 = '[cmdk-group-head
|
|
|
9782
9782
|
}
|
|
9783
9783
|
}, emit: () => {
|
|
9784
9784
|
i.current.forEach((M) => M());
|
|
9785
|
-
} }), []), R = h.useMemo(() => ({ value: (M,
|
|
9786
|
-
var
|
|
9787
|
-
|
|
9785
|
+
} }), []), R = h.useMemo(() => ({ value: (M, G, ee) => {
|
|
9786
|
+
var K;
|
|
9787
|
+
G !== ((K = a.current.get(M)) == null ? void 0 : K.value) && (a.current.set(M, { value: G, keywords: ee }), n.current.filtered.items.set(M, N(G, ee)), S(2, () => {
|
|
9788
9788
|
I(), E.emit();
|
|
9789
9789
|
}));
|
|
9790
|
-
}, item: (M,
|
|
9791
|
-
|
|
9790
|
+
}, item: (M, G) => (r.current.add(M), G && (o.current.has(G) ? o.current.get(G).add(M) : o.current.set(G, /* @__PURE__ */ new Set([M]))), S(3, () => {
|
|
9791
|
+
j(), I(), n.current.value || F(), E.emit();
|
|
9792
9792
|
}), () => {
|
|
9793
9793
|
a.current.delete(M), r.current.delete(M), n.current.filtered.items.delete(M);
|
|
9794
9794
|
let ee = T();
|
|
9795
9795
|
S(4, () => {
|
|
9796
|
-
|
|
9796
|
+
j(), ee?.getAttribute("id") === M && F(), E.emit();
|
|
9797
9797
|
});
|
|
9798
9798
|
}), group: (M) => (o.current.has(M) || o.current.set(M, /* @__PURE__ */ new Set()), () => {
|
|
9799
9799
|
a.current.delete(M), o.current.delete(M);
|
|
9800
9800
|
}), filter: () => s.current.shouldFilter, label: c || e["aria-label"], getDisablePointerSelection: () => s.current.disablePointerSelection, listId: k, inputId: y, labelId: w, listInnerRef: x }), []);
|
|
9801
|
-
function N(M,
|
|
9802
|
-
var ee,
|
|
9803
|
-
let Q = (
|
|
9804
|
-
return M ? Q(M, n.current.search,
|
|
9801
|
+
function N(M, G) {
|
|
9802
|
+
var ee, K;
|
|
9803
|
+
let Q = (K = (ee = s.current) == null ? void 0 : ee.filter) != null ? K : S2;
|
|
9804
|
+
return M ? Q(M, n.current.search, G) : 0;
|
|
9805
9805
|
}
|
|
9806
9806
|
function I() {
|
|
9807
9807
|
if (!n.current.search || s.current.shouldFilter === !1) return;
|
|
9808
|
-
let M = n.current.filtered.items,
|
|
9809
|
-
n.current.filtered.groups.forEach((
|
|
9810
|
-
let Q = o.current.get(
|
|
9811
|
-
Q.forEach((
|
|
9812
|
-
let J = M.get(
|
|
9808
|
+
let M = n.current.filtered.items, G = [];
|
|
9809
|
+
n.current.filtered.groups.forEach((K) => {
|
|
9810
|
+
let Q = o.current.get(K), B = 0;
|
|
9811
|
+
Q.forEach((V) => {
|
|
9812
|
+
let J = M.get(V);
|
|
9813
9813
|
B = Math.max(J, B);
|
|
9814
|
-
}),
|
|
9814
|
+
}), G.push([K, B]);
|
|
9815
9815
|
});
|
|
9816
9816
|
let ee = x.current;
|
|
9817
|
-
L().sort((
|
|
9818
|
-
var B,
|
|
9819
|
-
let J =
|
|
9820
|
-
return ((B = M.get(ce)) != null ? B : 0) - ((
|
|
9821
|
-
}).forEach((
|
|
9822
|
-
let Q =
|
|
9823
|
-
Q ? Q.appendChild(
|
|
9824
|
-
}),
|
|
9817
|
+
L().sort((K, Q) => {
|
|
9818
|
+
var B, V;
|
|
9819
|
+
let J = K.getAttribute("id"), ce = Q.getAttribute("id");
|
|
9820
|
+
return ((B = M.get(ce)) != null ? B : 0) - ((V = M.get(J)) != null ? V : 0);
|
|
9821
|
+
}).forEach((K) => {
|
|
9822
|
+
let Q = K.closest(ai);
|
|
9823
|
+
Q ? Q.appendChild(K.parentElement === Q ? K : K.closest(`${ai} > *`)) : ee.appendChild(K.parentElement === ee ? K : K.closest(`${ai} > *`));
|
|
9824
|
+
}), G.sort((K, Q) => Q[1] - K[1]).forEach((K) => {
|
|
9825
9825
|
var Q;
|
|
9826
|
-
let B = (Q = x.current) == null ? void 0 : Q.querySelector(`${Rr}[${Qn}="${encodeURIComponent(
|
|
9826
|
+
let B = (Q = x.current) == null ? void 0 : Q.querySelector(`${Rr}[${Qn}="${encodeURIComponent(K[0])}"]`);
|
|
9827
9827
|
B?.parentElement.appendChild(B);
|
|
9828
9828
|
});
|
|
9829
9829
|
}
|
|
9830
9830
|
function F() {
|
|
9831
|
-
let M = L().find((ee) => ee.getAttribute("aria-disabled") !== "true"),
|
|
9832
|
-
E.setState("value",
|
|
9831
|
+
let M = L().find((ee) => ee.getAttribute("aria-disabled") !== "true"), G = M?.getAttribute(Qn);
|
|
9832
|
+
E.setState("value", G || void 0);
|
|
9833
9833
|
}
|
|
9834
|
-
function
|
|
9835
|
-
var M,
|
|
9834
|
+
function j() {
|
|
9835
|
+
var M, G, ee, K;
|
|
9836
9836
|
if (!n.current.search || s.current.shouldFilter === !1) {
|
|
9837
9837
|
n.current.filtered.count = r.current.size;
|
|
9838
9838
|
return;
|
|
@@ -9840,19 +9840,19 @@ var Rr = '[cmdk-group=""]', ai = '[cmdk-group-items=""]', x2 = '[cmdk-group-head
|
|
|
9840
9840
|
n.current.filtered.groups = /* @__PURE__ */ new Set();
|
|
9841
9841
|
let Q = 0;
|
|
9842
9842
|
for (let B of r.current) {
|
|
9843
|
-
let
|
|
9843
|
+
let V = (G = (M = a.current.get(B)) == null ? void 0 : M.value) != null ? G : "", J = (K = (ee = a.current.get(B)) == null ? void 0 : ee.keywords) != null ? K : [], ce = N(V, J);
|
|
9844
9844
|
n.current.filtered.items.set(B, ce), ce > 0 && Q++;
|
|
9845
9845
|
}
|
|
9846
|
-
for (let [B,
|
|
9846
|
+
for (let [B, V] of o.current) for (let J of V) if (n.current.filtered.items.get(J) > 0) {
|
|
9847
9847
|
n.current.filtered.groups.add(B);
|
|
9848
9848
|
break;
|
|
9849
9849
|
}
|
|
9850
9850
|
n.current.filtered.count = Q;
|
|
9851
9851
|
}
|
|
9852
9852
|
function P() {
|
|
9853
|
-
var M,
|
|
9854
|
-
let
|
|
9855
|
-
|
|
9853
|
+
var M, G, ee;
|
|
9854
|
+
let K = T();
|
|
9855
|
+
K && (((M = K.parentElement) == null ? void 0 : M.firstChild) === K && ((ee = (G = K.closest(Rr)) == null ? void 0 : G.querySelector(x2)) == null || ee.scrollIntoView({ block: "nearest" })), K.scrollIntoView({ block: "nearest" }));
|
|
9856
9856
|
}
|
|
9857
9857
|
function T() {
|
|
9858
9858
|
var M;
|
|
@@ -9863,18 +9863,18 @@ var Rr = '[cmdk-group=""]', ai = '[cmdk-group-items=""]', x2 = '[cmdk-group-head
|
|
|
9863
9863
|
return Array.from(((M = x.current) == null ? void 0 : M.querySelectorAll(oc)) || []);
|
|
9864
9864
|
}
|
|
9865
9865
|
function z(M) {
|
|
9866
|
-
let
|
|
9867
|
-
|
|
9866
|
+
let G = L()[M];
|
|
9867
|
+
G && E.setState("value", G.getAttribute(Qn));
|
|
9868
9868
|
}
|
|
9869
9869
|
function A(M) {
|
|
9870
|
-
var
|
|
9871
|
-
let ee = T(),
|
|
9872
|
-
(
|
|
9870
|
+
var G;
|
|
9871
|
+
let ee = T(), K = L(), Q = K.findIndex((V) => V === ee), B = K[Q + M];
|
|
9872
|
+
(G = s.current) != null && G.loop && (B = Q + M < 0 ? K[K.length - 1] : Q + M === K.length ? K[0] : K[Q + M]), B && E.setState("value", B.getAttribute(Qn));
|
|
9873
9873
|
}
|
|
9874
9874
|
function $(M) {
|
|
9875
|
-
let
|
|
9876
|
-
for (; ee && !
|
|
9877
|
-
|
|
9875
|
+
let G = T(), ee = G?.closest(Rr), K;
|
|
9876
|
+
for (; ee && !K; ) ee = M > 0 ? T2(ee, Rr) : _2(ee, Rr), K = ee?.querySelector(oc);
|
|
9877
|
+
K ? E.setState("value", K.getAttribute(Qn)) : A(M);
|
|
9878
9878
|
}
|
|
9879
9879
|
let U = () => z(L().length - 1), _ = (M) => {
|
|
9880
9880
|
M.preventDefault(), M.metaKey ? U() : M.altKey ? $(1) : A(1);
|
|
@@ -9882,8 +9882,8 @@ var Rr = '[cmdk-group=""]', ai = '[cmdk-group-items=""]', x2 = '[cmdk-group-head
|
|
|
9882
9882
|
M.preventDefault(), M.metaKey ? z(0) : M.altKey ? $(-1) : A(-1);
|
|
9883
9883
|
};
|
|
9884
9884
|
return h.createElement(fe.div, { ref: t, tabIndex: -1, ...C, "cmdk-root": "", onKeyDown: (M) => {
|
|
9885
|
-
var
|
|
9886
|
-
(
|
|
9885
|
+
var G;
|
|
9886
|
+
(G = C.onKeyDown) == null || G.call(C, M);
|
|
9887
9887
|
let ee = M.nativeEvent.isComposing || M.keyCode === 229;
|
|
9888
9888
|
if (!(M.defaultPrevented || ee)) switch (M.key) {
|
|
9889
9889
|
case "n":
|
|
@@ -9914,24 +9914,24 @@ var Rr = '[cmdk-group=""]', ai = '[cmdk-group-items=""]', x2 = '[cmdk-group-head
|
|
|
9914
9914
|
}
|
|
9915
9915
|
case "Enter": {
|
|
9916
9916
|
M.preventDefault();
|
|
9917
|
-
let
|
|
9918
|
-
if (
|
|
9919
|
-
let Q = new Event(
|
|
9920
|
-
|
|
9917
|
+
let K = T();
|
|
9918
|
+
if (K) {
|
|
9919
|
+
let Q = new Event(Vi);
|
|
9920
|
+
K.dispatchEvent(Q);
|
|
9921
9921
|
}
|
|
9922
9922
|
}
|
|
9923
9923
|
}
|
|
9924
9924
|
} }, h.createElement("label", { "cmdk-label": "", htmlFor: R.inputId, id: R.labelId, style: L2 }, c), Ra(e, (M) => h.createElement(Bu.Provider, { value: E }, h.createElement(zu.Provider, { value: R }, M))));
|
|
9925
9925
|
}), E2 = h.forwardRef((e, t) => {
|
|
9926
9926
|
var n, r;
|
|
9927
|
-
let o = Qe(), a = h.useRef(null), i = h.useContext(
|
|
9927
|
+
let o = Qe(), a = h.useRef(null), i = h.useContext(ju), s = no(), c = Hu(e), d = (r = (n = c.current) == null ? void 0 : n.forceMount) != null ? r : i?.forceMount;
|
|
9928
9928
|
On(() => {
|
|
9929
9929
|
if (!d) return s.item(o, i?.id);
|
|
9930
9930
|
}, [d]);
|
|
9931
9931
|
let u = Uu(o, a, [e.value, e.children, a], e.keywords), f = Hs(), p = gn((S) => S.value && S.value === u.current), m = gn((S) => d || s.filter() === !1 ? !0 : S.search ? S.filtered.items.get(o) > 0 : !0);
|
|
9932
9932
|
h.useEffect(() => {
|
|
9933
9933
|
let S = a.current;
|
|
9934
|
-
if (!(!S || e.disabled)) return S.addEventListener(
|
|
9934
|
+
if (!(!S || e.disabled)) return S.addEventListener(Vi, v), () => S.removeEventListener(Vi, v);
|
|
9935
9935
|
}, [m, e.onSelect, e.disabled]);
|
|
9936
9936
|
function v() {
|
|
9937
9937
|
var S, E;
|
|
@@ -9947,7 +9947,7 @@ var Rr = '[cmdk-group=""]', ai = '[cmdk-group-items=""]', x2 = '[cmdk-group-head
|
|
|
9947
9947
|
let { heading: n, children: r, forceMount: o, ...a } = e, i = Qe(), s = h.useRef(null), c = h.useRef(null), d = Qe(), u = no(), f = gn((m) => o || u.filter() === !1 ? !0 : m.search ? m.filtered.groups.has(i) : !0);
|
|
9948
9948
|
On(() => u.group(i), []), Uu(i, s, [e.value, e.heading, c]);
|
|
9949
9949
|
let p = h.useMemo(() => ({ id: i, forceMount: o }), [o]);
|
|
9950
|
-
return h.createElement(fe.div, { ref: In(s, t), ...a, "cmdk-group": "", role: "presentation", hidden: f ? void 0 : !0 }, n && h.createElement("div", { ref: c, "cmdk-group-heading": "", "aria-hidden": !0, id: d }, n), Ra(e, (m) => h.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? d : void 0 }, h.createElement(
|
|
9950
|
+
return h.createElement(fe.div, { ref: In(s, t), ...a, "cmdk-group": "", role: "presentation", hidden: f ? void 0 : !0 }, n && h.createElement("div", { ref: c, "cmdk-group-heading": "", "aria-hidden": !0, id: d }, n), Ra(e, (m) => h.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? d : void 0 }, h.createElement(ju.Provider, { value: p }, m))));
|
|
9951
9951
|
}), R2 = h.forwardRef((e, t) => {
|
|
9952
9952
|
let { alwaysRender: n, ...r } = e, o = h.useRef(null), a = gn((i) => !i.search);
|
|
9953
9953
|
return !n && !a ? null : h.createElement(fe.div, { ref: In(o, t), ...r, "cmdk-separator": "", role: "separator" });
|
|
@@ -9975,11 +9975,11 @@ var Rr = '[cmdk-group=""]', ai = '[cmdk-group-items=""]', x2 = '[cmdk-group-head
|
|
|
9975
9975
|
}, []), h.createElement(fe.div, { ref: In(a, t), ...o, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": s, "aria-label": r, id: c.listId }, Ra(e, (d) => h.createElement("div", { ref: In(i, c.listInnerRef), "cmdk-list-sizer": "" }, d)));
|
|
9976
9976
|
}), D2 = h.forwardRef((e, t) => {
|
|
9977
9977
|
let { open: n, onOpenChange: r, overlayClassName: o, contentClassName: a, container: i, ...s } = e;
|
|
9978
|
-
return h.createElement(ms, { open: n, onOpenChange: r }, h.createElement(gs, { container: i }, h.createElement(vs, { "cmdk-overlay": "", className: o }), h.createElement(bs, { "aria-label": e.label, "cmdk-dialog": "", className: a }, h.createElement(
|
|
9978
|
+
return h.createElement(ms, { open: n, onOpenChange: r }, h.createElement(gs, { container: i }, h.createElement(vs, { "cmdk-overlay": "", className: o }), h.createElement(bs, { "aria-label": e.label, "cmdk-dialog": "", className: a }, h.createElement(Vu, { ref: t, ...s }))));
|
|
9979
9979
|
}), A2 = h.forwardRef((e, t) => gn((n) => n.filtered.count === 0) ? h.createElement(fe.div, { ref: t, ...e, "cmdk-empty": "", role: "presentation" }) : null), I2 = h.forwardRef((e, t) => {
|
|
9980
9980
|
let { progress: n, children: r, label: o = "Loading...", ...a } = e;
|
|
9981
9981
|
return h.createElement(fe.div, { ref: t, ...a, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": o }, Ra(e, (i) => h.createElement("div", { "aria-hidden": !0 }, i)));
|
|
9982
|
-
}), ro = Object.assign(
|
|
9982
|
+
}), ro = Object.assign(Vu, { List: N2, Item: E2, Input: P2, Group: k2, Separator: R2, Dialog: D2, Empty: A2, Loading: I2 });
|
|
9983
9983
|
function T2(e, t) {
|
|
9984
9984
|
let n = e.nextElementSibling;
|
|
9985
9985
|
for (; n; ) {
|
|
@@ -10099,7 +10099,7 @@ function B2({
|
|
|
10099
10099
|
}
|
|
10100
10100
|
);
|
|
10101
10101
|
}
|
|
10102
|
-
function
|
|
10102
|
+
function j2({
|
|
10103
10103
|
className: e,
|
|
10104
10104
|
...t
|
|
10105
10105
|
}) {
|
|
@@ -10115,7 +10115,7 @@ function V2({
|
|
|
10115
10115
|
}
|
|
10116
10116
|
);
|
|
10117
10117
|
}
|
|
10118
|
-
function
|
|
10118
|
+
function V2({
|
|
10119
10119
|
value: e,
|
|
10120
10120
|
options: t,
|
|
10121
10121
|
onChange: n,
|
|
@@ -10171,7 +10171,7 @@ function j2({
|
|
|
10171
10171
|
/* @__PURE__ */ l(ku, { className: "w-20 p-0", align: "start", onOpenAutoFocus: (v) => v.preventDefault(), children: /* @__PURE__ */ l(F2, { shouldFilter: !1, children: /* @__PURE__ */ D($2, { children: [
|
|
10172
10172
|
/* @__PURE__ */ l(z2, { children: i("No results.") }),
|
|
10173
10173
|
/* @__PURE__ */ l(B2, { className: "max-h-40 overflow-y-auto", children: t.map((v) => /* @__PURE__ */ l(
|
|
10174
|
-
|
|
10174
|
+
j2,
|
|
10175
10175
|
{
|
|
10176
10176
|
value: String(v),
|
|
10177
10177
|
onSelect: () => m(v),
|
|
@@ -10206,23 +10206,23 @@ function Wu({ className: e, ...t }) {
|
|
|
10206
10206
|
}, R = (B) => {
|
|
10207
10207
|
a.current?.textProcessor.updateTextDisplay(B);
|
|
10208
10208
|
}, N = ge(() => {
|
|
10209
|
-
const B = s.find((
|
|
10209
|
+
const B = s.find((V) => V.family === w.fontFamily);
|
|
10210
10210
|
return B ? B.variants.includes("700") : !1;
|
|
10211
10211
|
}, [s, w.fontFamily]), I = (w.fontWeight || 400) >= 700, F = () => {
|
|
10212
10212
|
R({ fontWeight: I ? 400 : 700 });
|
|
10213
|
-
},
|
|
10214
|
-
const B = s.find((
|
|
10215
|
-
return B ? B.variants.some((
|
|
10213
|
+
}, j = ge(() => {
|
|
10214
|
+
const B = s.find((V) => V.family === w.fontFamily);
|
|
10215
|
+
return B ? B.variants.some((V) => String(V).endsWith("italic")) : !1;
|
|
10216
10216
|
}, [s, w.fontFamily]), P = w.fontStyle === "italic", T = () => {
|
|
10217
10217
|
R({ fontStyle: P ? "normal" : "italic" });
|
|
10218
10218
|
}, L = (B) => (B || "").split(/\r?\n/).length || 1, z = ge(() => {
|
|
10219
10219
|
const B = a.current?.workspaceManager.printAreaSize?.height || 1;
|
|
10220
|
-
return n1.map((
|
|
10220
|
+
return n1.map((V) => Math.round(V * B));
|
|
10221
10221
|
}, [a.current?.workspaceManager.printAreaSize?.height]), A = (B) => {
|
|
10222
10222
|
if (!B) return;
|
|
10223
|
-
const
|
|
10224
|
-
if (!
|
|
10225
|
-
const J = (
|
|
10223
|
+
const V = i[0];
|
|
10224
|
+
if (!V) return;
|
|
10225
|
+
const J = (V.height || 0) / L(V.text || ""), ce = J ? B / J : 1;
|
|
10226
10226
|
R({ scaleX: ce, scaleY: ce });
|
|
10227
10227
|
}, $ = (B) => {
|
|
10228
10228
|
B !== b && (g(B), R({ textAlign: B }));
|
|
@@ -10230,15 +10230,15 @@ function Wu({ className: e, ...t }) {
|
|
|
10230
10230
|
k(B), R({ fill: B });
|
|
10231
10231
|
}, _ = (B) => {
|
|
10232
10232
|
S(B), a.current?.imageProcessor.updateSvgColor(B);
|
|
10233
|
-
}, [ne, M] = Y(!1), [
|
|
10233
|
+
}, [ne, M] = Y(!1), [G, ee] = Y(!1), K = re(null), Q = () => {
|
|
10234
10234
|
ee(!0), a?.current?.templateProcessor.saveAsTemplate().then((B) => {
|
|
10235
|
-
B != null && (
|
|
10235
|
+
B != null && (K.current = B, M(!0));
|
|
10236
10236
|
}).finally(() => ee(!1));
|
|
10237
10237
|
};
|
|
10238
10238
|
return Z(() => {
|
|
10239
10239
|
if (u) {
|
|
10240
|
-
const B = i[0],
|
|
10241
|
-
v(Math.round((B.getScaledHeight?.() || 0) / Math.max(1,
|
|
10240
|
+
const B = i[0], V = L(B.text || "");
|
|
10241
|
+
v(Math.round((B.getScaledHeight?.() || 0) / Math.max(1, V))), k(B.fill || "#000000"), y({
|
|
10242
10242
|
fontFamily: B.fontFamily || "",
|
|
10243
10243
|
fontWeight: B.fontWeight || 400,
|
|
10244
10244
|
fontStyle: B.fontStyle || "normal"
|
|
@@ -10320,8 +10320,8 @@ function Wu({ className: e, ...t }) {
|
|
|
10320
10320
|
Ur,
|
|
10321
10321
|
{
|
|
10322
10322
|
value: x,
|
|
10323
|
-
onChange: (
|
|
10324
|
-
_(
|
|
10323
|
+
onChange: (V, J) => {
|
|
10324
|
+
_(V), J !== "custom" && B();
|
|
10325
10325
|
},
|
|
10326
10326
|
custom: !0
|
|
10327
10327
|
}
|
|
@@ -10345,11 +10345,11 @@ function Wu({ className: e, ...t }) {
|
|
|
10345
10345
|
align: "start",
|
|
10346
10346
|
autoFocus: !1,
|
|
10347
10347
|
content: (B) => /* @__PURE__ */ l(
|
|
10348
|
-
|
|
10348
|
+
Vs,
|
|
10349
10349
|
{
|
|
10350
10350
|
type: "UPDATE",
|
|
10351
|
-
onUpdate: (
|
|
10352
|
-
R(
|
|
10351
|
+
onUpdate: (V) => {
|
|
10352
|
+
R(V), B();
|
|
10353
10353
|
}
|
|
10354
10354
|
}
|
|
10355
10355
|
),
|
|
@@ -10357,7 +10357,7 @@ function Wu({ className: e, ...t }) {
|
|
|
10357
10357
|
}
|
|
10358
10358
|
),
|
|
10359
10359
|
/* @__PURE__ */ l(
|
|
10360
|
-
|
|
10360
|
+
V2,
|
|
10361
10361
|
{
|
|
10362
10362
|
value: m,
|
|
10363
10363
|
options: z,
|
|
@@ -10382,7 +10382,7 @@ function Wu({ className: e, ...t }) {
|
|
|
10382
10382
|
Ce,
|
|
10383
10383
|
{
|
|
10384
10384
|
variant: "ghost",
|
|
10385
|
-
disabled: !
|
|
10385
|
+
disabled: !j,
|
|
10386
10386
|
onClick: T,
|
|
10387
10387
|
className: "!px-2 flex-col gap-1 h-12 md:h-9",
|
|
10388
10388
|
children: [
|
|
@@ -10396,21 +10396,21 @@ function Wu({ className: e, ...t }) {
|
|
|
10396
10396
|
{
|
|
10397
10397
|
className: "w-auto p-2",
|
|
10398
10398
|
align: "start",
|
|
10399
|
-
content: (B) => /* @__PURE__ */ l("div", { children: r1.map((
|
|
10399
|
+
content: (B) => /* @__PURE__ */ l("div", { children: r1.map((V) => /* @__PURE__ */ D(
|
|
10400
10400
|
Ce,
|
|
10401
10401
|
{
|
|
10402
10402
|
variant: "ghost",
|
|
10403
|
-
className: `!px-2 not-first:ml-1 ${
|
|
10403
|
+
className: `!px-2 not-first:ml-1 ${V === b ? "bg-printine-accent" : ""}`,
|
|
10404
10404
|
onClick: () => {
|
|
10405
|
-
$(
|
|
10405
|
+
$(V), B();
|
|
10406
10406
|
},
|
|
10407
10407
|
children: [
|
|
10408
|
-
|
|
10409
|
-
|
|
10410
|
-
|
|
10408
|
+
V === "left" && /* @__PURE__ */ l(Ho, { className: "size-5" }),
|
|
10409
|
+
V === "center" && /* @__PURE__ */ l(Ci, { className: "size-5" }),
|
|
10410
|
+
V === "right" && /* @__PURE__ */ l(xi, { className: "size-5" })
|
|
10411
10411
|
]
|
|
10412
10412
|
},
|
|
10413
|
-
|
|
10413
|
+
V
|
|
10414
10414
|
)) }),
|
|
10415
10415
|
children: /* @__PURE__ */ D(Ce, { variant: "ghost", className: "!px-2 flex-col gap-1 h-12 md:h-9", children: [
|
|
10416
10416
|
/* @__PURE__ */ l(Ho, { className: "size-5" }),
|
|
@@ -10427,8 +10427,8 @@ function Wu({ className: e, ...t }) {
|
|
|
10427
10427
|
Ur,
|
|
10428
10428
|
{
|
|
10429
10429
|
value: C,
|
|
10430
|
-
onChange: (
|
|
10431
|
-
U(
|
|
10430
|
+
onChange: (V, J) => {
|
|
10431
|
+
U(V), J !== "custom" && B();
|
|
10432
10432
|
},
|
|
10433
10433
|
custom: !0
|
|
10434
10434
|
}
|
|
@@ -10459,7 +10459,7 @@ function Wu({ className: e, ...t }) {
|
|
|
10459
10459
|
className: "!px-2 flex-col gap-1 h-12 md:h-9",
|
|
10460
10460
|
onClick: () => a.current?.imageProcessor.copy(),
|
|
10461
10461
|
children: [
|
|
10462
|
-
/* @__PURE__ */ l(
|
|
10462
|
+
/* @__PURE__ */ l(j1, { className: "size-5" }),
|
|
10463
10463
|
/* @__PURE__ */ l("div", { className: "font-bold text-printine-tiny md:hidden", children: n("Copy") })
|
|
10464
10464
|
]
|
|
10465
10465
|
}
|
|
@@ -10480,7 +10480,7 @@ function Wu({ className: e, ...t }) {
|
|
|
10480
10480
|
/* @__PURE__ */ l(
|
|
10481
10481
|
nu,
|
|
10482
10482
|
{
|
|
10483
|
-
loading:
|
|
10483
|
+
loading: G,
|
|
10484
10484
|
onClick: Q,
|
|
10485
10485
|
className: "font-bold text-sm shrink-0 rounded-printine-sm",
|
|
10486
10486
|
variant: "outline",
|
|
@@ -10492,7 +10492,7 @@ function Wu({ className: e, ...t }) {
|
|
|
10492
10492
|
{
|
|
10493
10493
|
show: ne,
|
|
10494
10494
|
onChange: (B) => M(B),
|
|
10495
|
-
template:
|
|
10495
|
+
template: K.current
|
|
10496
10496
|
}
|
|
10497
10497
|
)
|
|
10498
10498
|
] })
|
|
@@ -10849,8 +10849,8 @@ function uw({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
|
|
|
10849
10849
|
const P = I ? F : p ? N * E.height : 0;
|
|
10850
10850
|
return p ? s === "bottom" ? E.height - P : -E.height + P : P;
|
|
10851
10851
|
}
|
|
10852
|
-
const
|
|
10853
|
-
return p ? s === "right" ? E.width -
|
|
10852
|
+
const j = I ? F : p ? N * E.width : 0;
|
|
10853
|
+
return p ? s === "right" ? E.width - j : -E.width + j : j;
|
|
10854
10854
|
})) != null ? R : [];
|
|
10855
10855
|
}, [
|
|
10856
10856
|
n,
|
|
@@ -10895,8 +10895,8 @@ function uw({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
|
|
|
10895
10895
|
]);
|
|
10896
10896
|
function y({ draggedDistance: E, closeDrawer: R, velocity: N, dismissible: I }) {
|
|
10897
10897
|
if (a === void 0) return;
|
|
10898
|
-
const F = s === "bottom" || s === "right" ? (k ?? 0) - E : (k ?? 0) + E,
|
|
10899
|
-
if (
|
|
10898
|
+
const F = s === "bottom" || s === "right" ? (k ?? 0) - E : (k ?? 0) + E, j = b === a - 1, P = b === 0, T = E > 0;
|
|
10899
|
+
if (j && We(o.current, {
|
|
10900
10900
|
transition: `opacity ${Le.DURATION}s cubic-bezier(${Le.EASE.join(",")})`
|
|
10901
10901
|
}), !d && N > 2 && !T) {
|
|
10902
10902
|
I ? R() : w(C[0]);
|
|
@@ -10933,7 +10933,7 @@ function uw({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
|
|
|
10933
10933
|
return 0;
|
|
10934
10934
|
if (N && !R) return 1;
|
|
10935
10935
|
if (!g && !N) return null;
|
|
10936
|
-
const F = N ? b + 1 : b - 1,
|
|
10936
|
+
const F = N ? b + 1 : b - 1, j = N ? C[F] - C[F - 1] : C[F + 1] - C[F], P = E / Math.abs(j);
|
|
10937
10937
|
return N ? 1 - P : P;
|
|
10938
10938
|
}
|
|
10939
10939
|
return {
|
|
@@ -11058,7 +11058,7 @@ function hw({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRes
|
|
|
11058
11058
|
restorePositionSetting: u
|
|
11059
11059
|
};
|
|
11060
11060
|
}
|
|
11061
|
-
function mw({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, snapPoints: a, shouldScaleBackground: i = !1, setBackgroundColorOnScale: s = !0, closeThreshold: c = lw, scrollLockTimeout: d = cw, dismissible: u = !0, handleOnly: f = !1, fadeFromIndex: p = a && a.length - 1, activeSnapPoint: m, setActiveSnapPoint: v, fixed: b, modal: g = !0, onClose: C, nested: k, noBodyStyles: w = !1, direction: y = "bottom", defaultOpen: x = !1, disablePreventScroll: S = !0, snapToSequentialPoint: E = !1, preventScrollRestoration: R = !1, repositionInputs: N = !0, onAnimationEnd: I, container: F, autoFocus:
|
|
11061
|
+
function mw({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, snapPoints: a, shouldScaleBackground: i = !1, setBackgroundColorOnScale: s = !0, closeThreshold: c = lw, scrollLockTimeout: d = cw, dismissible: u = !0, handleOnly: f = !1, fadeFromIndex: p = a && a.length - 1, activeSnapPoint: m, setActiveSnapPoint: v, fixed: b, modal: g = !0, onClose: C, nested: k, noBodyStyles: w = !1, direction: y = "bottom", defaultOpen: x = !1, disablePreventScroll: S = !0, snapToSequentialPoint: E = !1, preventScrollRestoration: R = !1, repositionInputs: N = !0, onAnimationEnd: I, container: F, autoFocus: j = !1 }) {
|
|
11062
11062
|
var P, T;
|
|
11063
11063
|
const [L = !1, z] = ef({
|
|
11064
11064
|
defaultProp: x,
|
|
@@ -11070,7 +11070,7 @@ function mw({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
11070
11070
|
document.body.style.pointerEvents = "auto";
|
|
11071
11071
|
}), pe || (document.body.style.pointerEvents = "auto");
|
|
11072
11072
|
}
|
|
11073
|
-
}), [A, $] = q.useState(!1), [U, _] = q.useState(!1), [ne, M] = q.useState(!1),
|
|
11073
|
+
}), [A, $] = q.useState(!1), [U, _] = q.useState(!1), [ne, M] = q.useState(!1), G = q.useRef(null), ee = q.useRef(null), K = q.useRef(null), Q = q.useRef(null), B = q.useRef(null), V = q.useRef(!1), J = q.useRef(null), ce = q.useRef(0), be = q.useRef(!1), ve = q.useRef(!x), Ee = q.useRef(0), ae = q.useRef(null), Oe = q.useRef(((P = ae.current) == null ? void 0 : P.getBoundingClientRect().height) || 0), rt = q.useRef(((T = ae.current) == null ? void 0 : T.getBoundingClientRect().width) || 0), it = q.useRef(0), Dt = q.useCallback((pe) => {
|
|
11074
11074
|
a && pe === It.length - 1 && (ee.current = /* @__PURE__ */ new Date());
|
|
11075
11075
|
}, []), { activeSnapPoint: an, activeSnapPointIndex: Ye, setActiveSnapPoint: st, onRelease: At, snapPointsOffset: It, onDrag: sn, shouldFade: xn, getPercentageDragged: Sn } = uw({
|
|
11076
11076
|
snapPoints: a,
|
|
@@ -11078,7 +11078,7 @@ function mw({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
11078
11078
|
setActiveSnapPointProp: v,
|
|
11079
11079
|
drawerRef: ae,
|
|
11080
11080
|
fadeFromIndex: p,
|
|
11081
|
-
overlayRef:
|
|
11081
|
+
overlayRef: G,
|
|
11082
11082
|
onSnapPointChange: Dt,
|
|
11083
11083
|
direction: y,
|
|
11084
11084
|
container: F,
|
|
@@ -11099,15 +11099,15 @@ function mw({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
11099
11099
|
return (window.innerWidth - Ui) / window.innerWidth;
|
|
11100
11100
|
}
|
|
11101
11101
|
function St(pe) {
|
|
11102
|
-
var O,
|
|
11103
|
-
!u && !a || ae.current && !ae.current.contains(pe.target) || (Oe.current = ((O = ae.current) == null ? void 0 : O.getBoundingClientRect().height) || 0, rt.current = ((
|
|
11102
|
+
var O, W;
|
|
11103
|
+
!u && !a || ae.current && !ae.current.contains(pe.target) || (Oe.current = ((O = ae.current) == null ? void 0 : O.getBoundingClientRect().height) || 0, rt.current = ((W = ae.current) == null ? void 0 : W.getBoundingClientRect().width) || 0, _(!0), K.current = /* @__PURE__ */ new Date(), Ku() && window.addEventListener("touchend", () => V.current = !1, {
|
|
11104
11104
|
once: !0
|
|
11105
11105
|
}), pe.target.setPointerCapture(pe.pointerId), ce.current = Ve(y) ? pe.pageY : pe.pageX);
|
|
11106
11106
|
}
|
|
11107
11107
|
function En(pe, O) {
|
|
11108
|
-
var
|
|
11108
|
+
var W;
|
|
11109
11109
|
let H = pe;
|
|
11110
|
-
const X = (
|
|
11110
|
+
const X = (W = window.getSelection()) == null ? void 0 : W.toString(), de = ae.current ? Do(ae.current, y) : null, se = /* @__PURE__ */ new Date();
|
|
11111
11111
|
if (H.tagName === "SELECT" || H.hasAttribute("data-vaul-no-drag") || H.closest("[data-vaul-no-drag]"))
|
|
11112
11112
|
return !1;
|
|
11113
11113
|
if (y === "right" || y === "left")
|
|
@@ -11133,30 +11133,30 @@ function mw({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
11133
11133
|
}
|
|
11134
11134
|
function ft(pe) {
|
|
11135
11135
|
if (ae.current && U) {
|
|
11136
|
-
const O = y === "bottom" || y === "right" ? 1 : -1,
|
|
11136
|
+
const O = y === "bottom" || y === "right" ? 1 : -1, W = (ce.current - (Ve(y) ? pe.pageY : pe.pageX)) * O, H = W > 0, X = a && !u && !H;
|
|
11137
11137
|
if (X && Ye === 0) return;
|
|
11138
|
-
const de = Math.abs(
|
|
11138
|
+
const de = Math.abs(W), se = document.querySelector("[data-vaul-drawer-wrapper]"), we = y === "bottom" || y === "top" ? Oe.current : rt.current;
|
|
11139
11139
|
let me = de / we;
|
|
11140
11140
|
const Ae = Sn(de, H);
|
|
11141
|
-
if (Ae !== null && (me = Ae), X && me >= 1 || !
|
|
11142
|
-
if (ae.current.classList.add(ci),
|
|
11141
|
+
if (Ae !== null && (me = Ae), X && me >= 1 || !V.current && !En(pe.target, H)) return;
|
|
11142
|
+
if (ae.current.classList.add(ci), V.current = !0, We(ae.current, {
|
|
11143
11143
|
transition: "none"
|
|
11144
|
-
}), We(
|
|
11144
|
+
}), We(G.current, {
|
|
11145
11145
|
transition: "none"
|
|
11146
11146
|
}), a && sn({
|
|
11147
|
-
draggedDistance:
|
|
11147
|
+
draggedDistance: W
|
|
11148
11148
|
}), H && !a) {
|
|
11149
|
-
const ke = iw(
|
|
11149
|
+
const ke = iw(W), He = Math.min(ke * -1, 0) * O;
|
|
11150
11150
|
We(ae.current, {
|
|
11151
11151
|
transform: Ve(y) ? `translate3d(0, ${He}px, 0)` : `translate3d(${He}px, 0, 0)`
|
|
11152
11152
|
});
|
|
11153
11153
|
return;
|
|
11154
11154
|
}
|
|
11155
11155
|
const Te = 1 - me;
|
|
11156
|
-
if ((xn || p && Ye === p - 1) && (r?.(pe, me), We(
|
|
11156
|
+
if ((xn || p && Ye === p - 1) && (r?.(pe, me), We(G.current, {
|
|
11157
11157
|
opacity: `${Te}`,
|
|
11158
11158
|
transition: "none"
|
|
11159
|
-
}, !0)), se &&
|
|
11159
|
+
}, !0)), se && G.current && i) {
|
|
11160
11160
|
const ke = Math.min(lt() + me * (1 - lt()), 1), He = 8 - me * 8, xe = Math.max(0, 14 - me * 14);
|
|
11161
11161
|
We(se, {
|
|
11162
11162
|
borderRadius: `${He}px`,
|
|
@@ -11180,8 +11180,8 @@ function mw({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
11180
11180
|
var pe;
|
|
11181
11181
|
function O() {
|
|
11182
11182
|
if (!ae.current || !N) return;
|
|
11183
|
-
const
|
|
11184
|
-
if (Hi(
|
|
11183
|
+
const W = document.activeElement;
|
|
11184
|
+
if (Hi(W) || be.current) {
|
|
11185
11185
|
var H;
|
|
11186
11186
|
const X = ((H = window.visualViewport) == null ? void 0 : H.height) || 0, de = window.innerHeight;
|
|
11187
11187
|
let se = de - X;
|
|
@@ -11201,8 +11201,8 @@ function mw({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
11201
11201
|
}
|
|
11202
11202
|
}
|
|
11203
11203
|
return (pe = window.visualViewport) == null || pe.addEventListener("resize", O), () => {
|
|
11204
|
-
var
|
|
11205
|
-
return (
|
|
11204
|
+
var W;
|
|
11205
|
+
return (W = window.visualViewport) == null ? void 0 : W.removeEventListener("resize", O);
|
|
11206
11206
|
};
|
|
11207
11207
|
}, [
|
|
11208
11208
|
Ye,
|
|
@@ -11220,7 +11220,7 @@ function mw({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
11220
11220
|
We(ae.current, {
|
|
11221
11221
|
transform: "translate3d(0, 0, 0)",
|
|
11222
11222
|
transition: `transform ${Le.DURATION}s cubic-bezier(${Le.EASE.join(",")})`
|
|
11223
|
-
}), We(
|
|
11223
|
+
}), We(G.current, {
|
|
11224
11224
|
transition: `opacity ${Le.DURATION}s cubic-bezier(${Le.EASE.join(",")})`,
|
|
11225
11225
|
opacity: "1"
|
|
11226
11226
|
}), i && O && O > 0 && L && We(pe, {
|
|
@@ -11239,14 +11239,14 @@ function mw({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
11239
11239
|
}, !0);
|
|
11240
11240
|
}
|
|
11241
11241
|
function Un() {
|
|
11242
|
-
!U || !ae.current || (ae.current.classList.remove(ci),
|
|
11242
|
+
!U || !ae.current || (ae.current.classList.remove(ci), V.current = !1, _(!1), Q.current = /* @__PURE__ */ new Date());
|
|
11243
11243
|
}
|
|
11244
11244
|
function kn(pe) {
|
|
11245
11245
|
if (!U || !ae.current) return;
|
|
11246
|
-
ae.current.classList.remove(ci),
|
|
11246
|
+
ae.current.classList.remove(ci), V.current = !1, _(!1), Q.current = /* @__PURE__ */ new Date();
|
|
11247
11247
|
const O = Do(ae.current, y);
|
|
11248
|
-
if (!pe || !En(pe.target, !1) || !O || Number.isNaN(O) ||
|
|
11249
|
-
const
|
|
11248
|
+
if (!pe || !En(pe.target, !1) || !O || Number.isNaN(O) || K.current === null) return;
|
|
11249
|
+
const W = Q.current.getTime() - K.current.getTime(), H = ce.current - (Ve(y) ? pe.pageY : pe.pageX), X = Math.abs(H) / W;
|
|
11250
11250
|
if (X > 0.05 && (M(!0), setTimeout(() => {
|
|
11251
11251
|
M(!1);
|
|
11252
11252
|
}, 200)), a) {
|
|
@@ -11284,10 +11284,10 @@ function mw({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
11284
11284
|
L
|
|
11285
11285
|
]);
|
|
11286
11286
|
function Wn(pe) {
|
|
11287
|
-
const O = pe ? (window.innerWidth - An) / window.innerWidth : 1,
|
|
11287
|
+
const O = pe ? (window.innerWidth - An) / window.innerWidth : 1, W = pe ? -An : 0;
|
|
11288
11288
|
J.current && window.clearTimeout(J.current), We(ae.current, {
|
|
11289
11289
|
transition: `transform ${Le.DURATION}s cubic-bezier(${Le.EASE.join(",")})`,
|
|
11290
|
-
transform: Ve(y) ? `scale(${O}) translate3d(0, ${
|
|
11290
|
+
transform: Ve(y) ? `scale(${O}) translate3d(0, ${W}px, 0)` : `scale(${O}) translate3d(${W}px, 0, 0)`
|
|
11291
11291
|
}), !pe && ae.current && (J.current = setTimeout(() => {
|
|
11292
11292
|
const H = Do(ae.current, y);
|
|
11293
11293
|
We(ae.current, {
|
|
@@ -11298,14 +11298,14 @@ function mw({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
11298
11298
|
}
|
|
11299
11299
|
function xr(pe, O) {
|
|
11300
11300
|
if (O < 0) return;
|
|
11301
|
-
const
|
|
11301
|
+
const W = (window.innerWidth - An) / window.innerWidth, H = W + O * (1 - W), X = -An + O * An;
|
|
11302
11302
|
We(ae.current, {
|
|
11303
11303
|
transform: Ve(y) ? `scale(${H}) translate3d(0, ${X}px, 0)` : `scale(${H}) translate3d(${X}px, 0, 0)`,
|
|
11304
11304
|
transition: "none"
|
|
11305
11305
|
});
|
|
11306
11306
|
}
|
|
11307
11307
|
function Gn(pe, O) {
|
|
11308
|
-
const
|
|
11308
|
+
const W = Ve(y) ? window.innerHeight : window.innerWidth, H = O ? (W - An) / W : 1, X = O ? -An : 0;
|
|
11309
11309
|
O && We(ae.current, {
|
|
11310
11310
|
transition: `transform ${Le.DURATION}s cubic-bezier(${Le.EASE.join(",")})`,
|
|
11311
11311
|
transform: Ve(y) ? `scale(${H}) translate3d(0, ${X}px, 0)` : `scale(${H}) translate3d(${X}px, 0, 0)`
|
|
@@ -11329,7 +11329,7 @@ function mw({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
11329
11329
|
snapPoints: a,
|
|
11330
11330
|
setActiveSnapPoint: st,
|
|
11331
11331
|
drawerRef: ae,
|
|
11332
|
-
overlayRef:
|
|
11332
|
+
overlayRef: G,
|
|
11333
11333
|
onOpenChange: t,
|
|
11334
11334
|
onPress: St,
|
|
11335
11335
|
onRelease: kn,
|
|
@@ -11353,7 +11353,7 @@ function mw({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
11353
11353
|
setBackgroundColorOnScale: s,
|
|
11354
11354
|
noBodyStyles: w,
|
|
11355
11355
|
container: F,
|
|
11356
|
-
autoFocus:
|
|
11356
|
+
autoFocus: j
|
|
11357
11357
|
}
|
|
11358
11358
|
}, n));
|
|
11359
11359
|
}
|
|
@@ -11396,7 +11396,7 @@ const nf = /* @__PURE__ */ q.forwardRef(function({ onPointerDownOutside: e, styl
|
|
|
11396
11396
|
x(!0);
|
|
11397
11397
|
});
|
|
11398
11398
|
}, []);
|
|
11399
|
-
function
|
|
11399
|
+
function j(P) {
|
|
11400
11400
|
E.current = null, N.current = !1, s(P);
|
|
11401
11401
|
}
|
|
11402
11402
|
return /* @__PURE__ */ q.createElement(bs, {
|
|
@@ -11446,10 +11446,10 @@ const nf = /* @__PURE__ */ q.forwardRef(function({ onPointerDownOutside: e, styl
|
|
|
11446
11446
|
r.onPointerUp == null || r.onPointerUp.call(r, P), E.current = null, N.current = !1, s(P);
|
|
11447
11447
|
},
|
|
11448
11448
|
onPointerOut: (P) => {
|
|
11449
|
-
r.onPointerOut == null || r.onPointerOut.call(r, P),
|
|
11449
|
+
r.onPointerOut == null || r.onPointerOut.call(r, P), j(R.current);
|
|
11450
11450
|
},
|
|
11451
11451
|
onContextMenu: (P) => {
|
|
11452
|
-
r.onContextMenu == null || r.onContextMenu.call(r, P), R.current &&
|
|
11452
|
+
r.onContextMenu == null || r.onContextMenu.call(r, P), R.current && j(R.current);
|
|
11453
11453
|
}
|
|
11454
11454
|
});
|
|
11455
11455
|
});
|
|
@@ -11661,7 +11661,7 @@ function Sw({ show: e, setShow: t, onAddVariant: n }) {
|
|
|
11661
11661
|
className: "border border-gray-300 border-solid rounded px-3 py-4 flex items-center cursor-pointer hover:bg-gray-50 transition-colors",
|
|
11662
11662
|
onClick: () => s(c.type),
|
|
11663
11663
|
children: [
|
|
11664
|
-
/* @__PURE__ */ l(
|
|
11664
|
+
/* @__PURE__ */ l(Be, { src: c.icon, alt: r(c.label || c.type), width: 24, height: 24 }),
|
|
11665
11665
|
/* @__PURE__ */ l("span", { className: "ml-3", children: r(c.label) })
|
|
11666
11666
|
]
|
|
11667
11667
|
},
|
|
@@ -11867,10 +11867,10 @@ var Pw = Object.defineProperty, Nw = (e, t) => Pw(e, "name", { value: t, configu
|
|
|
11867
11867
|
}, "TooltipTrigger")
|
|
11868
11868
|
), df = "TooltipPortal", [zw, Bw] = Ws(df, {
|
|
11869
11869
|
forceMount: void 0
|
|
11870
|
-
}),
|
|
11870
|
+
}), jw = /* @__PURE__ */ Ke((e) => {
|
|
11871
11871
|
const { __scopeTooltip: t, forceMount: n, children: r, container: o } = e, a = io(df, t);
|
|
11872
11872
|
return /* @__PURE__ */ l(zw, { scope: t, forceMount: n, children: /* @__PURE__ */ l(Ct, { present: n || a.open, children: /* @__PURE__ */ l(Jr, { asChild: !0, container: o, children: r }) }) });
|
|
11873
|
-
}, "TooltipPortal"), Wr = "TooltipContent",
|
|
11873
|
+
}, "TooltipPortal"), Wr = "TooltipContent", Vw = /* @__PURE__ */ h.forwardRef(
|
|
11874
11874
|
/* @__PURE__ */ Ke(function(t, n) {
|
|
11875
11875
|
const r = Bw(Wr, t.__scopeTooltip), { forceMount: o = r.forceMount, side: a = "top", ...i } = t, s = io(Wr, t.__scopeTooltip);
|
|
11876
11876
|
return /* @__PURE__ */ l(Ct, { present: o || s.open, children: s.disableHoverableContent ? /* @__PURE__ */ l(uf, { side: a, ...i, ref: n }) : /* @__PURE__ */ l(Hw, { side: a, ...i, ref: n }) });
|
|
@@ -12063,7 +12063,7 @@ function vf(e) {
|
|
|
12063
12063
|
return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
|
|
12064
12064
|
}
|
|
12065
12065
|
Ke(vf, "getHullPresorted");
|
|
12066
|
-
var Gw = Ow, Kw = Fw, Yw = $w, qw =
|
|
12066
|
+
var Gw = Ow, Kw = Fw, Yw = $w, qw = jw, Xw = Vw, Zw = Ww;
|
|
12067
12067
|
function Jw({
|
|
12068
12068
|
delayDuration: e = 0,
|
|
12069
12069
|
...t
|
|
@@ -12131,7 +12131,7 @@ function ry({ activePlacement: e, list: t, onChange: n }) {
|
|
|
12131
12131
|
renderLabel: (o) => {
|
|
12132
12132
|
const a = o.display_name || o.name;
|
|
12133
12133
|
return /* @__PURE__ */ D(Me, { children: [
|
|
12134
|
-
/* @__PURE__ */ l(ny, { content: a, children: /* @__PURE__ */ l(
|
|
12134
|
+
/* @__PURE__ */ l(ny, { content: a, children: /* @__PURE__ */ l(Be, { src: o.image, alt: a, width: 200, height: 200, className: "w-full h-full object-contain" }) }),
|
|
12135
12135
|
e === o.name && /* @__PURE__ */ l(M1, { className: "absolute left-2 top-2 size-4 text-printine-primary" })
|
|
12136
12136
|
] });
|
|
12137
12137
|
}
|
|
@@ -12145,7 +12145,7 @@ function oy({ show: e }) {
|
|
|
12145
12145
|
return /* @__PURE__ */ D("div", { className: "h-full overflow-auto pb-15 hidden-scrollbar", style: { display: e ? "block" : "none" }, children: [
|
|
12146
12146
|
s && /* @__PURE__ */ D("div", { className: "flex gap-2 items-center", children: [
|
|
12147
12147
|
t.assets?.[0]?.full_url && /* @__PURE__ */ l(
|
|
12148
|
-
|
|
12148
|
+
Be,
|
|
12149
12149
|
{
|
|
12150
12150
|
src: t?.assets?.[0]?.full_url,
|
|
12151
12151
|
alt: t?.product?.title || "",
|
|
@@ -12541,7 +12541,7 @@ function my({ show: e, type: t = "sidebar", isShapeUpload: n = !1 }) {
|
|
|
12541
12541
|
onClick: () => v(b),
|
|
12542
12542
|
children: [
|
|
12543
12543
|
/* @__PURE__ */ l(
|
|
12544
|
-
|
|
12544
|
+
Be,
|
|
12545
12545
|
{
|
|
12546
12546
|
src: pn(b.thumbnailUrl || b.url, "w_120"),
|
|
12547
12547
|
alt: b.name,
|
|
@@ -12565,7 +12565,7 @@ function my({ show: e, type: t = "sidebar", isShapeUpload: n = !1 }) {
|
|
|
12565
12565
|
b.id
|
|
12566
12566
|
)) }),
|
|
12567
12567
|
s.loading && /* @__PURE__ */ l("div", { className: "mt-4 flex justify-center", children: /* @__PURE__ */ l(zt, { className: "w-8 h-8" }) }),
|
|
12568
|
-
s.empty && !s.loading && /* @__PURE__ */ l("div", { className: "h-full flex flex-col items-center justify-center", children: /* @__PURE__ */ l(
|
|
12568
|
+
s.empty && !s.loading && /* @__PURE__ */ l("div", { className: "h-full flex flex-col items-center justify-center", children: /* @__PURE__ */ l(Be, { src: "/images/design/asset_empty.png", alt: r("Empty"), width: 150, height: 150 }) })
|
|
12569
12569
|
] });
|
|
12570
12570
|
}
|
|
12571
12571
|
function gy({ show: e, isShapeUpload: t = !1, type: n, file: r }) {
|
|
@@ -12645,7 +12645,7 @@ function gy({ show: e, isShapeUpload: t = !1, type: n, file: r }) {
|
|
|
12645
12645
|
onDragLeave: k,
|
|
12646
12646
|
onDrop: w,
|
|
12647
12647
|
children: [
|
|
12648
|
-
/* @__PURE__ */ l(
|
|
12648
|
+
/* @__PURE__ */ l(Be, { src: "/images/design/design/image.svg", alt: o("Upload"), width: 36, height: 36 }),
|
|
12649
12649
|
/* @__PURE__ */ D(
|
|
12650
12650
|
Tn,
|
|
12651
12651
|
{
|
|
@@ -12676,7 +12676,7 @@ function gy({ show: e, isShapeUpload: t = !1, type: n, file: r }) {
|
|
|
12676
12676
|
] });
|
|
12677
12677
|
}
|
|
12678
12678
|
function vy({ show: e, position: t }) {
|
|
12679
|
-
return /* @__PURE__ */ l("div", { className: "flex flex-col h-full", style: { display: e ? "block" : "none" }, children: /* @__PURE__ */ l(
|
|
12679
|
+
return /* @__PURE__ */ l("div", { className: "flex flex-col h-full", style: { display: e ? "block" : "none" }, children: /* @__PURE__ */ l(Vs, { type: "ADD", onDone: () => {
|
|
12680
12680
|
t === "sheet" && ue.emit("design:menuContentSheet", !1);
|
|
12681
12681
|
} }) });
|
|
12682
12682
|
}
|
|
@@ -12852,10 +12852,10 @@ var Cy = "SwitchTrigger", xy = /* @__PURE__ */ h.forwardRef(
|
|
|
12852
12852
|
"checked"
|
|
12853
12853
|
).set, F = s !== x.current;
|
|
12854
12854
|
x.current = s;
|
|
12855
|
-
const
|
|
12855
|
+
const j = y.current !== c;
|
|
12856
12856
|
y.current = c;
|
|
12857
12857
|
const P = !(F && i.current);
|
|
12858
|
-
if (
|
|
12858
|
+
if (j && I) {
|
|
12859
12859
|
w.current = !F;
|
|
12860
12860
|
const T = new Event("click", { bubbles: P });
|
|
12861
12861
|
I.call(E, c), E.dispatchEvent(T), w.current = !1;
|
|
@@ -12977,11 +12977,11 @@ var Ty = Object.defineProperty, De = (e, t) => Ty(e, "name", { value: t, configu
|
|
|
12977
12977
|
focusVisible: w.current
|
|
12978
12978
|
}), w.current = !1, p(A);
|
|
12979
12979
|
}, "onChange")
|
|
12980
|
-
}), F = h.useRef(N),
|
|
12980
|
+
}), F = h.useRef(N), j = h.useRef(N);
|
|
12981
12981
|
h.useEffect(() => {
|
|
12982
12982
|
const A = b ? S?.ownerDocument.getElementById(b) : S?.closest("form");
|
|
12983
12983
|
if (A instanceof HTMLFormElement) {
|
|
12984
|
-
const $ = /* @__PURE__ */ De(() => I(
|
|
12984
|
+
const $ = /* @__PURE__ */ De(() => I(j.current), "reset");
|
|
12985
12985
|
return A.addEventListener("reset", $), () => A.removeEventListener("reset", $);
|
|
12986
12986
|
}
|
|
12987
12987
|
}, [S, b, I]);
|
|
@@ -13000,14 +13000,14 @@ var Ty = Object.defineProperty, De = (e, t) => Ty(e, "name", { value: t, configu
|
|
|
13000
13000
|
De(L, "handleSlideEnd");
|
|
13001
13001
|
function z(A, $, { commit: U } = { commit: !1 }) {
|
|
13002
13002
|
const _ = el(i), ne = Mr(Math.round((A - o) / i) * i + o, _), M = Gr(ne, [o, a]);
|
|
13003
|
-
I((
|
|
13004
|
-
const ee = Df(
|
|
13003
|
+
I((G = []) => {
|
|
13004
|
+
const ee = Df(G, M, $);
|
|
13005
13005
|
if (Mf(ee, d * i)) {
|
|
13006
13006
|
k.current = ee.indexOf(M);
|
|
13007
|
-
const
|
|
13008
|
-
return
|
|
13007
|
+
const K = String(ee) !== String(G);
|
|
13008
|
+
return K && U && m(ee), K ? ee : G;
|
|
13009
13009
|
} else
|
|
13010
|
-
return
|
|
13010
|
+
return G;
|
|
13011
13011
|
});
|
|
13012
13012
|
}
|
|
13013
13013
|
return De(z, "updateValues"), /* @__PURE__ */ l(
|
|
@@ -13048,7 +13048,7 @@ var Ty = Object.defineProperty, De = (e, t) => Ty(e, "name", { value: t, configu
|
|
|
13048
13048
|
onStepKeyDown: ({ event: A, direction: $ }) => {
|
|
13049
13049
|
if (!c) {
|
|
13050
13050
|
w.current = !0;
|
|
13051
|
-
const ne = Cf.includes(A.key) || A.shiftKey && xf.includes(A.key) ? 10 : 1, M = k.current,
|
|
13051
|
+
const ne = Cf.includes(A.key) || A.shiftKey && xf.includes(A.key) ? 10 : 1, M = k.current, G = N[M], ee = Of(G, {
|
|
13052
13052
|
min: o,
|
|
13053
13053
|
step: i,
|
|
13054
13054
|
direction: $,
|
|
@@ -13225,7 +13225,7 @@ var Ty = Object.defineProperty, De = (e, t) => Ty(e, "name", { value: t, configu
|
|
|
13225
13225
|
}
|
|
13226
13226
|
);
|
|
13227
13227
|
}, "SliderTrack")
|
|
13228
|
-
), uc = "SliderRange",
|
|
13228
|
+
), uc = "SliderRange", jy = /* @__PURE__ */ h.forwardRef(
|
|
13229
13229
|
/* @__PURE__ */ De(function(t, n) {
|
|
13230
13230
|
const { __scopeSlider: r, ...o } = t, a = lo(uc, r), i = kf(uc, r), s = h.useRef(null), c = ye(n, s), d = a.values.length, u = a.values.map(
|
|
13231
13231
|
(m) => Qs(m, a.min, a.max)
|
|
@@ -13245,7 +13245,7 @@ var Ty = Object.defineProperty, De = (e, t) => Ty(e, "name", { value: t, configu
|
|
|
13245
13245
|
}
|
|
13246
13246
|
);
|
|
13247
13247
|
}, "SliderRange")
|
|
13248
|
-
),
|
|
13248
|
+
), Vy = "SliderThumb", [Hy, Pf] = Js(Vy), Uy = "SliderThumbProvider";
|
|
13249
13249
|
function Nf(e) {
|
|
13250
13250
|
const {
|
|
13251
13251
|
__scopeSlider: t,
|
|
@@ -13478,7 +13478,7 @@ function Io({
|
|
|
13478
13478
|
"bg-printine-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
|
|
13479
13479
|
),
|
|
13480
13480
|
children: /* @__PURE__ */ l(
|
|
13481
|
-
|
|
13481
|
+
jy,
|
|
13482
13482
|
{
|
|
13483
13483
|
"data-slot": "slider-range",
|
|
13484
13484
|
className: te("bg-printine-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")
|
|
@@ -13906,7 +13906,7 @@ function r3({ show: e, type: t = "sidebar" }) {
|
|
|
13906
13906
|
m.id || v
|
|
13907
13907
|
)) }),
|
|
13908
13908
|
!a && s.length === 0 && /* @__PURE__ */ D("div", { className: "text-center", children: [
|
|
13909
|
-
/* @__PURE__ */ l(
|
|
13909
|
+
/* @__PURE__ */ l(Be, { src: "/images/design/empty.png", alt: n("No saved designs yet"), width: 100, height: 100, className: "mx-auto" }),
|
|
13910
13910
|
/* @__PURE__ */ l("div", { className: "text-gray-500", children: n("Add your design to quickly reuse it later.") })
|
|
13911
13911
|
] })
|
|
13912
13912
|
] }) });
|
|
@@ -13956,7 +13956,7 @@ function o3({ show: e, type: t = "sidebar" }) {
|
|
|
13956
13956
|
className: "flex items-center p-1 justify-center transparent-bg rounded cursor-pointer aspect-square hover:shadow-[0_0_10px_0_rgba(0,0,0,0.2)]",
|
|
13957
13957
|
onClick: () => m(b.url, b.name),
|
|
13958
13958
|
children: /* @__PURE__ */ l(
|
|
13959
|
-
|
|
13959
|
+
Be,
|
|
13960
13960
|
{
|
|
13961
13961
|
src: b.url,
|
|
13962
13962
|
alt: b.name,
|
|
@@ -14073,7 +14073,7 @@ function fo(e, t) {
|
|
|
14073
14073
|
return ui[e] = n, e + "-" + n;
|
|
14074
14074
|
}, [e, t]);
|
|
14075
14075
|
}
|
|
14076
|
-
function
|
|
14076
|
+
function jf(e) {
|
|
14077
14077
|
return function(t) {
|
|
14078
14078
|
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++)
|
|
14079
14079
|
r[o - 1] = arguments[o];
|
|
@@ -14089,7 +14089,7 @@ function Vf(e) {
|
|
|
14089
14089
|
});
|
|
14090
14090
|
};
|
|
14091
14091
|
}
|
|
14092
|
-
const or = /* @__PURE__ */
|
|
14092
|
+
const or = /* @__PURE__ */ jf(1), ta = /* @__PURE__ */ jf(-1);
|
|
14093
14093
|
function s3(e) {
|
|
14094
14094
|
return "clientX" in e && "clientY" in e;
|
|
14095
14095
|
}
|
|
@@ -14229,9 +14229,9 @@ function p3() {
|
|
|
14229
14229
|
announcement: e
|
|
14230
14230
|
};
|
|
14231
14231
|
}
|
|
14232
|
-
const
|
|
14232
|
+
const Vf = /* @__PURE__ */ $n(null);
|
|
14233
14233
|
function h3(e) {
|
|
14234
|
-
const t = $t(
|
|
14234
|
+
const t = $t(Vf);
|
|
14235
14235
|
Z(() => {
|
|
14236
14236
|
if (!t)
|
|
14237
14237
|
throw new Error("useDndMonitor must be used within a children of <DndContext>");
|
|
@@ -14818,7 +14818,7 @@ var bt;
|
|
|
14818
14818
|
function mc(e) {
|
|
14819
14819
|
e.preventDefault();
|
|
14820
14820
|
}
|
|
14821
|
-
function
|
|
14821
|
+
function j3(e) {
|
|
14822
14822
|
e.stopPropagation();
|
|
14823
14823
|
}
|
|
14824
14824
|
var Ie;
|
|
@@ -14829,7 +14829,7 @@ const tp = {
|
|
|
14829
14829
|
start: [Ie.Space, Ie.Enter],
|
|
14830
14830
|
cancel: [Ie.Esc],
|
|
14831
14831
|
end: [Ie.Space, Ie.Enter, Ie.Tab]
|
|
14832
|
-
},
|
|
14832
|
+
}, V3 = (e, t) => {
|
|
14833
14833
|
let {
|
|
14834
14834
|
currentCoordinates: n
|
|
14835
14835
|
} = t;
|
|
@@ -14884,7 +14884,7 @@ class np {
|
|
|
14884
14884
|
options: o
|
|
14885
14885
|
} = this.props, {
|
|
14886
14886
|
keyboardCodes: a = tp,
|
|
14887
|
-
coordinateGetter: i =
|
|
14887
|
+
coordinateGetter: i = V3,
|
|
14888
14888
|
scrollBehavior: s = "smooth"
|
|
14889
14889
|
} = o, {
|
|
14890
14890
|
code: c
|
|
@@ -14929,29 +14929,29 @@ class np {
|
|
|
14929
14929
|
y: Math.min(g === Ie.Down ? E.bottom - E.height / 2 : E.bottom, Math.max(g === Ie.Down ? E.top : E.top + E.height / 2, f.y))
|
|
14930
14930
|
}, N = g === Ie.Right && !k || g === Ie.Left && !w, I = g === Ie.Down && !y || g === Ie.Up && !C;
|
|
14931
14931
|
if (N && R.x !== f.x) {
|
|
14932
|
-
const F = b.scrollLeft + p.x,
|
|
14933
|
-
if (
|
|
14932
|
+
const F = b.scrollLeft + p.x, j = g === Ie.Right && F <= x.x || g === Ie.Left && F >= S.x;
|
|
14933
|
+
if (j && !p.y) {
|
|
14934
14934
|
b.scrollTo({
|
|
14935
14935
|
left: F,
|
|
14936
14936
|
behavior: s
|
|
14937
14937
|
});
|
|
14938
14938
|
return;
|
|
14939
14939
|
}
|
|
14940
|
-
|
|
14940
|
+
j ? m.x = b.scrollLeft - F : m.x = g === Ie.Right ? b.scrollLeft - x.x : b.scrollLeft - S.x, m.x && b.scrollBy({
|
|
14941
14941
|
left: -m.x,
|
|
14942
14942
|
behavior: s
|
|
14943
14943
|
});
|
|
14944
14944
|
break;
|
|
14945
14945
|
} else if (I && R.y !== f.y) {
|
|
14946
|
-
const F = b.scrollTop + p.y,
|
|
14947
|
-
if (
|
|
14946
|
+
const F = b.scrollTop + p.y, j = g === Ie.Down && F <= x.y || g === Ie.Up && F >= S.y;
|
|
14947
|
+
if (j && !p.x) {
|
|
14948
14948
|
b.scrollTo({
|
|
14949
14949
|
top: F,
|
|
14950
14950
|
behavior: s
|
|
14951
14951
|
});
|
|
14952
14952
|
return;
|
|
14953
14953
|
}
|
|
14954
|
-
|
|
14954
|
+
j ? m.y = b.scrollTop - F : m.y = g === Ie.Down ? b.scrollTop - x.y : b.scrollTop - S.y, m.y && b.scrollBy({
|
|
14955
14955
|
top: -m.y,
|
|
14956
14956
|
behavior: s
|
|
14957
14957
|
});
|
|
@@ -15068,7 +15068,7 @@ class al {
|
|
|
15068
15068
|
} = this, {
|
|
15069
15069
|
onStart: n
|
|
15070
15070
|
} = this.props;
|
|
15071
|
-
t && (this.activated = !0, this.documentListeners.add(bt.Click,
|
|
15071
|
+
t && (this.activated = !0, this.documentListeners.add(bt.Click, j3, {
|
|
15072
15072
|
capture: !0
|
|
15073
15073
|
}), this.removeTextSelection(), this.documentListeners.add(bt.SelectionChange, this.removeTextSelection), n(t));
|
|
15074
15074
|
}
|
|
@@ -15697,7 +15697,7 @@ const cC = [{
|
|
|
15697
15697
|
options: {}
|
|
15698
15698
|
}], dC = {
|
|
15699
15699
|
current: {}
|
|
15700
|
-
},
|
|
15700
|
+
}, jo = {
|
|
15701
15701
|
draggable: {
|
|
15702
15702
|
measure: hc
|
|
15703
15703
|
},
|
|
@@ -15751,7 +15751,7 @@ const uC = {
|
|
|
15751
15751
|
},
|
|
15752
15752
|
scrollableAncestors: [],
|
|
15753
15753
|
scrollableAncestorRects: [],
|
|
15754
|
-
measuringConfiguration:
|
|
15754
|
+
measuringConfiguration: jo,
|
|
15755
15755
|
measureDroppableContainers: ra,
|
|
15756
15756
|
windowRect: null,
|
|
15757
15757
|
measuringScheduled: !1
|
|
@@ -15930,15 +15930,15 @@ function mC(e) {
|
|
|
15930
15930
|
return ge(
|
|
15931
15931
|
() => ({
|
|
15932
15932
|
draggable: {
|
|
15933
|
-
...
|
|
15933
|
+
...jo.draggable,
|
|
15934
15934
|
...e?.draggable
|
|
15935
15935
|
},
|
|
15936
15936
|
droppable: {
|
|
15937
|
-
...
|
|
15937
|
+
...jo.droppable,
|
|
15938
15938
|
...e?.droppable
|
|
15939
15939
|
},
|
|
15940
15940
|
dragOverlay: {
|
|
15941
|
-
...
|
|
15941
|
+
...jo.dragOverlay,
|
|
15942
15942
|
...e?.dragOverlay
|
|
15943
15943
|
}
|
|
15944
15944
|
}),
|
|
@@ -16011,7 +16011,7 @@ const lp = /* @__PURE__ */ Xp(function(t) {
|
|
|
16011
16011
|
droppable: {
|
|
16012
16012
|
containers: I
|
|
16013
16013
|
}
|
|
16014
|
-
} = g, F = E != null ? R.get(E) : null,
|
|
16014
|
+
} = g, F = E != null ? R.get(E) : null, j = re({
|
|
16015
16015
|
initial: null,
|
|
16016
16016
|
translated: null
|
|
16017
16017
|
}), P = ge(() => {
|
|
@@ -16020,20 +16020,20 @@ const lp = /* @__PURE__ */ Xp(function(t) {
|
|
|
16020
16020
|
id: E,
|
|
16021
16021
|
// It's possible for the active node to unmount while dragging
|
|
16022
16022
|
data: (H = F?.data) != null ? H : dC,
|
|
16023
|
-
rect:
|
|
16023
|
+
rect: j
|
|
16024
16024
|
} : null;
|
|
16025
16025
|
}, [E, F]), T = re(null), [L, z] = Y(null), [A, $] = Y(null), U = Kr(v, Object.values(v)), _ = fo("DndDescribedBy", i), ne = ge(() => I.getEnabled(), [I]), M = mC(p), {
|
|
16026
|
-
droppableRects:
|
|
16026
|
+
droppableRects: G,
|
|
16027
16027
|
measureDroppableContainers: ee,
|
|
16028
|
-
measuringScheduled:
|
|
16028
|
+
measuringScheduled: K
|
|
16029
16029
|
} = J3(ne, {
|
|
16030
16030
|
dragging: S,
|
|
16031
16031
|
dependencies: [N.x, N.y],
|
|
16032
16032
|
config: M.droppable
|
|
16033
|
-
}), Q = X3(R, E), B = ge(() => A ? na(A) : null, [A]),
|
|
16033
|
+
}), Q = X3(R, E), B = ge(() => A ? na(A) : null, [A]), V = W(), J = Q3(Q, M.draggable.measure);
|
|
16034
16034
|
gC({
|
|
16035
16035
|
activeNode: E != null ? R.get(E) : null,
|
|
16036
|
-
config:
|
|
16036
|
+
config: V.layoutShiftCompensation,
|
|
16037
16037
|
initialRect: J,
|
|
16038
16038
|
measure: M.draggable.measure
|
|
16039
16039
|
});
|
|
@@ -16043,7 +16043,7 @@ const lp = /* @__PURE__ */ Xp(function(t) {
|
|
|
16043
16043
|
activeNode: Q,
|
|
16044
16044
|
collisionRect: null,
|
|
16045
16045
|
collisions: null,
|
|
16046
|
-
droppableRects:
|
|
16046
|
+
droppableRects: G,
|
|
16047
16047
|
draggableNodes: R,
|
|
16048
16048
|
draggingNode: null,
|
|
16049
16049
|
draggingNodeRect: null,
|
|
@@ -16073,7 +16073,7 @@ const lp = /* @__PURE__ */ Xp(function(t) {
|
|
|
16073
16073
|
}), It = B ? or(B, N) : null, sn = oC(Ye), xn = Cc(sn), Sn = Cc(sn, [ce]), Tt = or(At, xn), lt = rt ? N3(rt, At) : null, St = P && lt ? f({
|
|
16074
16074
|
active: P,
|
|
16075
16075
|
collisionRect: lt,
|
|
16076
|
-
droppableRects:
|
|
16076
|
+
droppableRects: G,
|
|
16077
16077
|
droppableContainers: ne,
|
|
16078
16078
|
pointerCoordinates: It
|
|
16079
16079
|
}) : null, En = S3(St, "id"), [ft, _t] = Y(null), gt = it ? At : or(At, Sn), Un = R3(gt, (a = ft?.rect) != null ? a : null, ce), kn = re(null), Wn = he(
|
|
@@ -16138,7 +16138,7 @@ const lp = /* @__PURE__ */ Xp(function(t) {
|
|
|
16138
16138
|
active: {
|
|
16139
16139
|
id: He,
|
|
16140
16140
|
data: xe.data,
|
|
16141
|
-
rect:
|
|
16141
|
+
rect: j
|
|
16142
16142
|
}
|
|
16143
16143
|
};
|
|
16144
16144
|
go(() => {
|
|
@@ -16294,7 +16294,7 @@ const lp = /* @__PURE__ */ Xp(function(t) {
|
|
|
16294
16294
|
activeNode: Q,
|
|
16295
16295
|
collisionRect: lt,
|
|
16296
16296
|
collisions: St,
|
|
16297
|
-
droppableRects:
|
|
16297
|
+
droppableRects: G,
|
|
16298
16298
|
draggableNodes: R,
|
|
16299
16299
|
draggingNode: Oe,
|
|
16300
16300
|
draggingNodeRect: rt,
|
|
@@ -16302,12 +16302,12 @@ const lp = /* @__PURE__ */ Xp(function(t) {
|
|
|
16302
16302
|
over: ft,
|
|
16303
16303
|
scrollableAncestors: Ye,
|
|
16304
16304
|
scrollAdjustedTranslate: Tt
|
|
16305
|
-
},
|
|
16305
|
+
}, j.current = {
|
|
16306
16306
|
initial: rt,
|
|
16307
16307
|
translated: lt
|
|
16308
16308
|
};
|
|
16309
|
-
}, [P, Q, St, lt, R, Oe, rt,
|
|
16310
|
-
...
|
|
16309
|
+
}, [P, Q, St, lt, R, Oe, rt, G, I, ft, Ye, Tt]), K3({
|
|
16310
|
+
...V,
|
|
16311
16311
|
delta: N,
|
|
16312
16312
|
draggingRect: lt,
|
|
16313
16313
|
pointerCoordinates: It,
|
|
@@ -16324,15 +16324,15 @@ const lp = /* @__PURE__ */ Xp(function(t) {
|
|
|
16324
16324
|
dragOverlay: ae,
|
|
16325
16325
|
draggableNodes: R,
|
|
16326
16326
|
droppableContainers: I,
|
|
16327
|
-
droppableRects:
|
|
16327
|
+
droppableRects: G,
|
|
16328
16328
|
over: ft,
|
|
16329
16329
|
measureDroppableContainers: ee,
|
|
16330
16330
|
scrollableAncestors: Ye,
|
|
16331
16331
|
scrollableAncestorRects: st,
|
|
16332
16332
|
measuringConfiguration: M,
|
|
16333
|
-
measuringScheduled:
|
|
16333
|
+
measuringScheduled: K,
|
|
16334
16334
|
windowRect: an
|
|
16335
|
-
}), [P, Q, ce, A, St, be, ae, R, I,
|
|
16335
|
+
}), [P, Q, ce, A, St, be, ae, R, I, G, ft, ee, Ye, st, M, K, an]), O = ge(() => ({
|
|
16336
16336
|
activatorEvent: A,
|
|
16337
16337
|
activators: Gn,
|
|
16338
16338
|
active: P,
|
|
@@ -16345,7 +16345,7 @@ const lp = /* @__PURE__ */ Xp(function(t) {
|
|
|
16345
16345
|
over: ft,
|
|
16346
16346
|
measureDroppableContainers: ee
|
|
16347
16347
|
}), [A, Gn, P, ce, C, _, R, ft, ee]);
|
|
16348
|
-
return q.createElement(
|
|
16348
|
+
return q.createElement(Vf.Provider, {
|
|
16349
16349
|
value: w
|
|
16350
16350
|
}, q.createElement(po.Provider, {
|
|
16351
16351
|
value: O
|
|
@@ -16359,7 +16359,7 @@ const lp = /* @__PURE__ */ Xp(function(t) {
|
|
|
16359
16359
|
...s,
|
|
16360
16360
|
hiddenTextDescribedById: _
|
|
16361
16361
|
}));
|
|
16362
|
-
function
|
|
16362
|
+
function W() {
|
|
16363
16363
|
const H = L?.autoScrollEnabled === !1, X = typeof c == "object" ? c.enabled === !1 : c === !1, de = S && !H && !X;
|
|
16364
16364
|
return typeof c == "object" ? {
|
|
16365
16365
|
...c,
|
|
@@ -16938,7 +16938,7 @@ const BC = (e) => {
|
|
|
16938
16938
|
overIndex: o
|
|
16939
16939
|
} = e;
|
|
16940
16940
|
return Oa(n, r, o).indexOf(t);
|
|
16941
|
-
},
|
|
16941
|
+
}, jC = (e) => {
|
|
16942
16942
|
let {
|
|
16943
16943
|
containerId: t,
|
|
16944
16944
|
isSorting: n,
|
|
@@ -16951,7 +16951,7 @@ const BC = (e) => {
|
|
|
16951
16951
|
transition: d
|
|
16952
16952
|
} = e;
|
|
16953
16953
|
return !d || !r || s !== a && o === i ? !1 : n ? !0 : i !== o && t === c;
|
|
16954
|
-
},
|
|
16954
|
+
}, VC = {
|
|
16955
16955
|
duration: 200,
|
|
16956
16956
|
easing: "ease"
|
|
16957
16957
|
}, mp = "transform", HC = /* @__PURE__ */ nn.Transition.toString({
|
|
@@ -16991,7 +16991,7 @@ function WC(e) {
|
|
|
16991
16991
|
}
|
|
16992
16992
|
function gp(e) {
|
|
16993
16993
|
let {
|
|
16994
|
-
animateLayoutChanges: t =
|
|
16994
|
+
animateLayoutChanges: t = jC,
|
|
16995
16995
|
attributes: n,
|
|
16996
16996
|
disabled: r,
|
|
16997
16997
|
data: o,
|
|
@@ -16999,7 +16999,7 @@ function gp(e) {
|
|
|
16999
16999
|
id: i,
|
|
17000
17000
|
strategy: s,
|
|
17001
17001
|
resizeObserverConfig: c,
|
|
17002
|
-
transition: d =
|
|
17002
|
+
transition: d = VC
|
|
17003
17003
|
} = e;
|
|
17004
17004
|
const {
|
|
17005
17005
|
items: u,
|
|
@@ -17033,7 +17033,7 @@ function gp(e) {
|
|
|
17033
17033
|
}
|
|
17034
17034
|
}), {
|
|
17035
17035
|
active: F,
|
|
17036
|
-
activatorEvent:
|
|
17036
|
+
activatorEvent: j,
|
|
17037
17037
|
activeNodeRect: P,
|
|
17038
17038
|
attributes: T,
|
|
17039
17039
|
setNodeRef: L,
|
|
@@ -17050,13 +17050,13 @@ function gp(e) {
|
|
|
17050
17050
|
...n
|
|
17051
17051
|
},
|
|
17052
17052
|
disabled: w.draggable
|
|
17053
|
-
}), ne = a3(I, L), M = !!F,
|
|
17053
|
+
}), ne = a3(I, L), M = !!F, G = M && !v && To(p) && To(g), ee = !C && A, K = ee && G ? _ : null, B = G ? K ?? (s ?? k)({
|
|
17054
17054
|
rects: b,
|
|
17055
17055
|
activeNodeRect: P,
|
|
17056
17056
|
activeIndex: p,
|
|
17057
17057
|
overIndex: g,
|
|
17058
17058
|
index: y
|
|
17059
|
-
}) : null,
|
|
17059
|
+
}) : null, V = To(p) && To(g) ? a({
|
|
17060
17060
|
id: i,
|
|
17061
17061
|
items: u,
|
|
17062
17062
|
activeIndex: p,
|
|
@@ -17064,7 +17064,7 @@ function gp(e) {
|
|
|
17064
17064
|
}) : y, J = F?.id, ce = re({
|
|
17065
17065
|
activeId: J,
|
|
17066
17066
|
items: u,
|
|
17067
|
-
newIndex:
|
|
17067
|
+
newIndex: V,
|
|
17068
17068
|
containerId: f
|
|
17069
17069
|
}), be = u !== ce.current.items, ve = t({
|
|
17070
17070
|
active: F,
|
|
@@ -17086,8 +17086,8 @@ function gp(e) {
|
|
|
17086
17086
|
rect: E
|
|
17087
17087
|
});
|
|
17088
17088
|
return Z(() => {
|
|
17089
|
-
M && ce.current.newIndex !==
|
|
17090
|
-
}, [M,
|
|
17089
|
+
M && ce.current.newIndex !== V && (ce.current.newIndex = V), f !== ce.current.containerId && (ce.current.containerId = f), u !== ce.current.items && (ce.current.items = u);
|
|
17090
|
+
}, [M, V, f, u]), Z(() => {
|
|
17091
17091
|
if (J === ce.current.activeId)
|
|
17092
17092
|
return;
|
|
17093
17093
|
if (J != null && ce.current.activeId == null) {
|
|
@@ -17105,7 +17105,7 @@ function gp(e) {
|
|
|
17105
17105
|
data: x,
|
|
17106
17106
|
rect: E,
|
|
17107
17107
|
index: y,
|
|
17108
|
-
newIndex:
|
|
17108
|
+
newIndex: V,
|
|
17109
17109
|
items: u,
|
|
17110
17110
|
isOver: N,
|
|
17111
17111
|
isSorting: M,
|
|
@@ -17128,7 +17128,7 @@ function gp(e) {
|
|
|
17128
17128
|
be && ce.current.newIndex === y
|
|
17129
17129
|
)
|
|
17130
17130
|
return HC;
|
|
17131
|
-
if (!(ee && !Ia(
|
|
17131
|
+
if (!(ee && !Ia(j) || !d) && (M || ve))
|
|
17132
17132
|
return nn.Transition.toString({
|
|
17133
17133
|
...d,
|
|
17134
17134
|
property: mp
|
|
@@ -17302,8 +17302,8 @@ function ZC({ show: e }) {
|
|
|
17302
17302
|
width: x.width,
|
|
17303
17303
|
height: x.height,
|
|
17304
17304
|
ungroupable: x.ungroupable,
|
|
17305
|
-
withInInch: Wo(
|
|
17306
|
-
heightInInch: Wo(
|
|
17305
|
+
withInInch: Wo(Vo(x.width || 0, !0) * S),
|
|
17306
|
+
heightInInch: Wo(Vo(x.height || 0, !0) * S)
|
|
17307
17307
|
};
|
|
17308
17308
|
return x.type.includes("i-text") ? (E.text = x.orientation === "vertical" && x.__rawText || x.text, E.fontFamily = x.fontFamily) : (x.type === "image" || x.originSrc) && (E.scale = Math.ceil(S * 100), E.src = x.getSrc ? x.getSrc() : x.originSrc || x.src), E;
|
|
17309
17309
|
}).reverse() || [];
|
|
@@ -17384,7 +17384,7 @@ function ZC({ show: e }) {
|
|
|
17384
17384
|
/* @__PURE__ */ l(OC, { children: w ? /* @__PURE__ */ l("div", { className: "p-4 border border-gray-300 rounded mb-2 bg-white shadow-lg opacity-90", children: /* @__PURE__ */ l(bp, { element: w, showDragHandle: r.length > 1 }) }) : null })
|
|
17385
17385
|
]
|
|
17386
17386
|
}
|
|
17387
|
-
) : /* @__PURE__ */ l("div", { className: "flex flex-col items-center justify-center h-full", children: /* @__PURE__ */ l(
|
|
17387
|
+
) : /* @__PURE__ */ l("div", { className: "flex flex-col items-center justify-center h-full", children: /* @__PURE__ */ l(Be, { src: "/images/design/layer_empty.png", alt: "empty", width: 100, height: 100 }) }) });
|
|
17388
17388
|
}
|
|
17389
17389
|
function bp({
|
|
17390
17390
|
element: e,
|
|
@@ -17402,7 +17402,7 @@ function bp({
|
|
|
17402
17402
|
/* @__PURE__ */ l("div", { className: "text-gray-500 text-xs", children: e.fontFamily })
|
|
17403
17403
|
] })
|
|
17404
17404
|
] }) : /* @__PURE__ */ D("div", { className: "flex-1 flex items-center overflow-hidden", children: [
|
|
17405
|
-
/* @__PURE__ */ l("div", { className: "basis-12 h-12 rounded flex items-center justify-center transparent-bg", children: e.src && /* @__PURE__ */ l(
|
|
17405
|
+
/* @__PURE__ */ l("div", { className: "basis-12 h-12 rounded flex items-center justify-center transparent-bg", children: e.src && /* @__PURE__ */ l(Be, { src: e.src, alt: "", width: 100, height: 100, className: "h-full w-full object-contain" }) }),
|
|
17406
17406
|
/* @__PURE__ */ l("div", { className: "ml-2 flex-1 overflow-hidden", children: /* @__PURE__ */ l("div", { className: "font-bold text-sm overflow-hidden text-ellipsis whitespace-nowrap", children: e.clip ? a("Shape") : e.ungroupable ? a("Group") : "" }) })
|
|
17407
17407
|
] }),
|
|
17408
17408
|
n && /* @__PURE__ */ l(
|
|
@@ -18098,7 +18098,7 @@ function n4({ open: e, onOpenChange: t, elementConfig: n, onUpdate: r }) {
|
|
|
18098
18098
|
x && u((S) => ({ ...S, optionalFontList: x })), w(!1);
|
|
18099
18099
|
},
|
|
18100
18100
|
children: /* @__PURE__ */ l("div", { className: "h-[50vh]", children: /* @__PURE__ */ l(
|
|
18101
|
-
|
|
18101
|
+
Vs,
|
|
18102
18102
|
{
|
|
18103
18103
|
type: "CHECK",
|
|
18104
18104
|
ref: C,
|
|
@@ -18134,7 +18134,7 @@ function r4({ value: e, type: t, onDelete: n, showDragHandle: r, onUpdate: o })
|
|
|
18134
18134
|
className: "bg-white flex items-center p-4 border border-gray-300 rounded-printine-lg mt-2",
|
|
18135
18135
|
children: [
|
|
18136
18136
|
t === "image" ? /* @__PURE__ */ l("div", { className: "basis-12 h-12 rounded flex items-center justify-center transparent-bg", children: /* @__PURE__ */ l(
|
|
18137
|
-
|
|
18137
|
+
Be,
|
|
18138
18138
|
{
|
|
18139
18139
|
src: pn(e.thumbnailUrl || e.value, "w_120"),
|
|
18140
18140
|
alt: "",
|
|
@@ -18182,7 +18182,7 @@ function o4({ open: e, onOpenChange: t, elements: n, onSelect: r }) {
|
|
|
18182
18182
|
onSave: c,
|
|
18183
18183
|
children: /* @__PURE__ */ l("ul", { className: "space-y-2 max-h-[50vh] overflow-y-auto", children: n.map((d) => /* @__PURE__ */ D("li", { className: "flex items-center py-3 px-4 border border-gray-300 rounded", children: [
|
|
18184
18184
|
/* @__PURE__ */ l(Bi, { checked: a.includes(d.id), onCheckedChange: () => s(d.id) }),
|
|
18185
|
-
/* @__PURE__ */ l("div", { className: "mx-2 basis-15 h-15", children: d.type.includes("i-text") ? /* @__PURE__ */ l("div", { className: "w-full h-full rounded border border-gray-300 flex items-center justify-center", children: /* @__PURE__ */ l(as, { className: "w-5 h-5" }) }) : /* @__PURE__ */ l(
|
|
18185
|
+
/* @__PURE__ */ l("div", { className: "mx-2 basis-15 h-15", children: d.type.includes("i-text") ? /* @__PURE__ */ l("div", { className: "w-full h-full rounded border border-gray-300 flex items-center justify-center", children: /* @__PURE__ */ l(as, { className: "w-5 h-5" }) }) : /* @__PURE__ */ l(Be, { src: d.src || "", alt: "", width: 100, height: 100, className: "h-full w-full object-contain" }) }),
|
|
18186
18186
|
/* @__PURE__ */ l("div", { className: "flex-1", children: /* @__PURE__ */ l("div", { className: "text-base font-bold mb-1 overflow-hidden text-ellipsis whitespace-nowrap", children: d.text }) })
|
|
18187
18187
|
] }, d.id)) })
|
|
18188
18188
|
}
|
|
@@ -18209,8 +18209,8 @@ function a4({ show: e }) {
|
|
|
18209
18209
|
width: T.width,
|
|
18210
18210
|
height: T.height,
|
|
18211
18211
|
ungroupable: T.ungroupable,
|
|
18212
|
-
withInInch: Wo(
|
|
18213
|
-
heightInInch: Wo(
|
|
18212
|
+
withInInch: Wo(Vo(T.width || 0, !0) * L),
|
|
18213
|
+
heightInInch: Wo(Vo(T.height || 0, !0) * L)
|
|
18214
18214
|
};
|
|
18215
18215
|
return T.type.includes("i-text") ? (z.text = T.orientation === "vertical" && T.__rawText || T.text, z.fontFamily = T.fontFamily) : (T.type === "image" || T.originSrc) && (z.scale = Math.ceil(L * 100), z.src = T.getSrc ? T.getSrc() : T.originSrc || T.src), z;
|
|
18216
18216
|
}).reverse() || [];
|
|
@@ -18271,7 +18271,7 @@ function a4({ show: e }) {
|
|
|
18271
18271
|
}, F = (P) => {
|
|
18272
18272
|
const T = [...d.colors];
|
|
18273
18273
|
T.splice(T.indexOf(P), 1), u("colors", T);
|
|
18274
|
-
},
|
|
18274
|
+
}, j = ge(() => {
|
|
18275
18275
|
const P = [];
|
|
18276
18276
|
return r.forEach((T) => {
|
|
18277
18277
|
if (T.links = void 0, i[T.id]?.syncKey) {
|
|
@@ -18282,8 +18282,8 @@ function a4({ show: e }) {
|
|
|
18282
18282
|
}), P;
|
|
18283
18283
|
}, [r, i]);
|
|
18284
18284
|
return /* @__PURE__ */ D("div", { style: { display: e ? "block" : "none" }, className: "h-full overflow-auto pb-15 hidden-scrollbar", children: [
|
|
18285
|
-
|
|
18286
|
-
/* @__PURE__ */ l("ul", { children:
|
|
18285
|
+
j.length ? /* @__PURE__ */ D(Me, { children: [
|
|
18286
|
+
/* @__PURE__ */ l("ul", { children: j.map((P) => /* @__PURE__ */ l(
|
|
18287
18287
|
i4,
|
|
18288
18288
|
{
|
|
18289
18289
|
element: P,
|
|
@@ -18342,7 +18342,7 @@ function a4({ show: e }) {
|
|
|
18342
18342
|
] })
|
|
18343
18343
|
] })
|
|
18344
18344
|
] })
|
|
18345
|
-
] }) : /* @__PURE__ */ l("div", { className: "flex flex-col items-center justify-center h-full", children: /* @__PURE__ */ l(
|
|
18345
|
+
] }) : /* @__PURE__ */ l("div", { className: "flex flex-col items-center justify-center h-full", children: /* @__PURE__ */ l(Be, { src: "/images/design/layer_empty.png", alt: "empty", width: 100, height: 100 }) }),
|
|
18346
18346
|
/* @__PURE__ */ l(
|
|
18347
18347
|
n4,
|
|
18348
18348
|
{
|
|
@@ -18423,7 +18423,7 @@ function Nc({ element: e, children: t, deleteObject: n, configInfo: r, linkedEle
|
|
|
18423
18423
|
)
|
|
18424
18424
|
] })
|
|
18425
18425
|
] }) : /* @__PURE__ */ D("div", { className: "flex-1 flex items-center overflow-hidden", children: [
|
|
18426
|
-
/* @__PURE__ */ l("div", { className: "basis-12 h-12 rounded flex items-center justify-center transparent-bg", children: e.src && /* @__PURE__ */ l(
|
|
18426
|
+
/* @__PURE__ */ l("div", { className: "basis-12 h-12 rounded flex items-center justify-center transparent-bg", children: e.src && /* @__PURE__ */ l(Be, { src: e.src, alt: "", width: 100, height: 100, className: "h-full w-full object-contain" }) }),
|
|
18427
18427
|
/* @__PURE__ */ D("div", { className: "ml-2 flex-1 overflow-hidden", children: [
|
|
18428
18428
|
/* @__PURE__ */ l("div", { className: "font-bold text-sm overflow-hidden text-ellipsis whitespace-nowrap", children: r?.name }),
|
|
18429
18429
|
!!r && !o && /* @__PURE__ */ l(
|
|
@@ -18515,7 +18515,7 @@ function wp({ type: e, position: t }) {
|
|
|
18515
18515
|
),
|
|
18516
18516
|
children: [
|
|
18517
18517
|
t !== "sheet" && /* @__PURE__ */ D("div", { className: "flex items-center justify-between mb-5", children: [
|
|
18518
|
-
/* @__PURE__ */ l("h6", { className: "font-bold flex-1 text-xl ", children:
|
|
18518
|
+
/* @__PURE__ */ l("h6", { className: "font-bold flex-1 text-xl ", children: Vc[n] }),
|
|
18519
18519
|
/* @__PURE__ */ l(
|
|
18520
18520
|
Ce,
|
|
18521
18521
|
{
|
|
@@ -18566,7 +18566,7 @@ function l4({ show: e, contentType: t, setShow: n, extraData: r, ...o }) {
|
|
|
18566
18566
|
}, [n]), /* @__PURE__ */ l(rf, { open: e, onOpenChange: n, children: /* @__PURE__ */ D(of, { className: "bg-white", children: [
|
|
18567
18567
|
/* @__PURE__ */ D(af, { className: "flex flex-row items-center justify-between", children: [
|
|
18568
18568
|
["product", "layer"].includes(t || "product") || r?.hideBack ? /* @__PURE__ */ l("span", {}) : /* @__PURE__ */ l(Yc, { className: "cursor-pointer", onClick: a }),
|
|
18569
|
-
/* @__PURE__ */ l(sf, { children:
|
|
18569
|
+
/* @__PURE__ */ l(sf, { children: Vc[t || "product"] }),
|
|
18570
18570
|
/* @__PURE__ */ l(dr, { className: "cursor-pointer", onClick: () => n(!1) })
|
|
18571
18571
|
] }),
|
|
18572
18572
|
/* @__PURE__ */ l(wp, { position: "sheet", type: t, extraData: r })
|
|
@@ -18630,11 +18630,11 @@ function c4() {
|
|
|
18630
18630
|
}
|
|
18631
18631
|
),
|
|
18632
18632
|
/* @__PURE__ */ D("div", { className: "flex flex-col items-center justify-center cursor-pointer", onClick: () => d("product"), children: [
|
|
18633
|
-
/* @__PURE__ */ l(
|
|
18633
|
+
/* @__PURE__ */ l(Be, { src: "/images/design/menu/product.svg", alt: e("Product"), width: 24, height: 24 }),
|
|
18634
18634
|
/* @__PURE__ */ l("div", { className: "text-xs", children: e("Product") })
|
|
18635
18635
|
] }),
|
|
18636
18636
|
/* @__PURE__ */ D("div", { className: "flex flex-col items-center justify-center cursor-pointer", onClick: () => d("layer"), children: [
|
|
18637
|
-
/* @__PURE__ */ l(
|
|
18637
|
+
/* @__PURE__ */ l(Be, { src: "/images/design/menu/layer.svg", alt: e("Layers"), width: 24, height: 24 }),
|
|
18638
18638
|
/* @__PURE__ */ l("div", { className: "text-xs", children: e("Layers") })
|
|
18639
18639
|
] })
|
|
18640
18640
|
] }),
|
|
@@ -18729,29 +18729,29 @@ function f4({
|
|
|
18729
18729
|
}) {
|
|
18730
18730
|
const i = Pe("design"), s = Je(), c = re(null), d = re(null), u = re(null), f = re(null), p = re(null), [m, v] = Y(!1), [b, g] = Y(16), [C, k] = Y(null), w = re({ x: 0, y: 0 }), y = he((I, F) => {
|
|
18731
18731
|
if (!d.current || !u.current) return { x: I, y: F };
|
|
18732
|
-
const
|
|
18732
|
+
const j = u.current.getBoundingClientRect(), P = d.current.getBoundingClientRect(), T = Math.max(0, j.width - 16 - P.width), L = Math.max(0, j.height - 16 - P.height);
|
|
18733
18733
|
return {
|
|
18734
18734
|
x: Math.max(16, Math.min(I, T)),
|
|
18735
18735
|
y: Math.max(16, Math.min(F, L))
|
|
18736
18736
|
};
|
|
18737
18737
|
}, []), x = he((I) => {
|
|
18738
18738
|
if (!d.current || !u.current) return 0;
|
|
18739
|
-
const F = u.current.getBoundingClientRect(),
|
|
18739
|
+
const F = u.current.getBoundingClientRect(), j = d.current.getBoundingClientRect(), P = F.width - j.width - I;
|
|
18740
18740
|
return Math.max(0, P);
|
|
18741
18741
|
}, []), S = he(
|
|
18742
18742
|
(I) => {
|
|
18743
18743
|
v(!0);
|
|
18744
|
-
const F = I instanceof TouchEvent ? I.touches[0].clientX : I.clientX,
|
|
18744
|
+
const F = I instanceof TouchEvent ? I.touches[0].clientX : I.clientX, j = I instanceof TouchEvent ? I.touches[0].clientY : I.clientY, P = d.current?.getBoundingClientRect(), T = u.current?.getBoundingClientRect(), L = P && T ? P.left - T.left : P ? P.left : 0, z = P && T ? P.top - T.top : P ? P.top : 0;
|
|
18745
18745
|
C === null && (g(Math.round(z)), k(x(L))), w.current = {
|
|
18746
18746
|
x: F - L,
|
|
18747
|
-
y:
|
|
18747
|
+
y: j - b
|
|
18748
18748
|
}, I.preventDefault?.();
|
|
18749
18749
|
},
|
|
18750
18750
|
[x, C, b]
|
|
18751
18751
|
), E = he(
|
|
18752
18752
|
(I) => {
|
|
18753
18753
|
if (!m) return;
|
|
18754
|
-
const F = I instanceof TouchEvent ? I.touches[0].clientX : I.clientX,
|
|
18754
|
+
const F = I instanceof TouchEvent ? I.touches[0].clientX : I.clientX, j = I instanceof TouchEvent ? I.touches[0].clientY : I.clientY, P = F - w.current.x, T = j - w.current.y, L = y(P, T);
|
|
18755
18755
|
g(L.y), k(x(L.x));
|
|
18756
18756
|
},
|
|
18757
18757
|
[y, x, m]
|
|
@@ -18769,8 +18769,8 @@ function f4({
|
|
|
18769
18769
|
if (e.length) {
|
|
18770
18770
|
const F = f.current?.getDesignLayers();
|
|
18771
18771
|
if (!F?.some(Boolean)) return;
|
|
18772
|
-
const
|
|
18773
|
-
a(F, I,
|
|
18772
|
+
const j = f.current?.usesLayeredComposition() ? e : void 0;
|
|
18773
|
+
a(F, I, j);
|
|
18774
18774
|
} else if (t.length) {
|
|
18775
18775
|
const F = p.current?.getRenderAreas();
|
|
18776
18776
|
if (!F) return;
|
|
@@ -18908,19 +18908,19 @@ function yp(e) {
|
|
|
18908
18908
|
defaultProp: s,
|
|
18909
18909
|
onChange: c,
|
|
18910
18910
|
caller: ir
|
|
18911
|
-
}),
|
|
18911
|
+
}), j = h.useRef(null), P = h.useRef(I);
|
|
18912
18912
|
h.useEffect(() => {
|
|
18913
18913
|
const M = v ? C?.ownerDocument.getElementById(v) : C?.form;
|
|
18914
18914
|
if (M instanceof HTMLFormElement) {
|
|
18915
|
-
const
|
|
18916
|
-
return M.addEventListener("reset",
|
|
18915
|
+
const G = /* @__PURE__ */ Ne(() => F(P.current), "reset");
|
|
18916
|
+
return M.addEventListener("reset", G), () => M.removeEventListener("reset", G);
|
|
18917
18917
|
}
|
|
18918
18918
|
}, [v, C, F]);
|
|
18919
18919
|
const T = C ? !!v || !!C.closest("form") : !0, [L, z] = h.useState(/* @__PURE__ */ new Set()), A = Qe(), $ = Array.from(L).map((M) => M.props.value).join(";"), U = h.useCallback((M) => {
|
|
18920
|
-
z((
|
|
18920
|
+
z((G) => new Set(G).add(M));
|
|
18921
18921
|
}, []), _ = h.useCallback((M) => {
|
|
18922
|
-
z((
|
|
18923
|
-
const ee = new Set(
|
|
18922
|
+
z((G) => {
|
|
18923
|
+
const ee = new Set(G);
|
|
18924
18924
|
return ee.delete(M), ee;
|
|
18925
18925
|
});
|
|
18926
18926
|
}, []), ne = {
|
|
@@ -18937,7 +18937,7 @@ function yp(e) {
|
|
|
18937
18937
|
open: R,
|
|
18938
18938
|
onOpenChange: N,
|
|
18939
18939
|
dir: E,
|
|
18940
|
-
triggerPointerDownPosRef:
|
|
18940
|
+
triggerPointerDownPosRef: j,
|
|
18941
18941
|
disabled: p,
|
|
18942
18942
|
name: u,
|
|
18943
18943
|
autoComplete: f,
|
|
@@ -19058,7 +19058,7 @@ var E4 = /* @__PURE__ */ Ne((e) => {
|
|
|
19058
19058
|
/* @__PURE__ */ l(Cp, { scope: r, children: /* @__PURE__ */ l(La.Slot, { scope: r, children: /* @__PURE__ */ l("div", { ref: n, children: o }) }) }),
|
|
19059
19059
|
a
|
|
19060
19060
|
) : null;
|
|
19061
|
-
}, "SelectContentFragment")), Et = 10, [Cp,
|
|
19061
|
+
}, "SelectContentFragment")), Et = 10, [Cp, jn] = Bn(Fn), O4 = /* @__PURE__ */ kt("SelectContent.RemoveScroll"), L4 = /* @__PURE__ */ h.forwardRef(
|
|
19062
19062
|
// blank line to reduce diff noise
|
|
19063
19063
|
/* @__PURE__ */ Ne(function(t, n) {
|
|
19064
19064
|
const { __scopeSelect: r } = t, {
|
|
@@ -19080,16 +19080,16 @@ var E4 = /* @__PURE__ */ Ne((e) => {
|
|
|
19080
19080
|
avoidCollisions: C,
|
|
19081
19081
|
//
|
|
19082
19082
|
...k
|
|
19083
|
-
} = t, w = Cn(Fn, r), [y, x] = h.useState(null), [S, E] = h.useState(null), R = ye(n, x), [N, I] = h.useState(null), [F,
|
|
19083
|
+
} = t, w = Cn(Fn, r), [y, x] = h.useState(null), [S, E] = h.useState(null), R = ye(n, x), [N, I] = h.useState(null), [F, j] = h.useState(
|
|
19084
19084
|
null
|
|
19085
19085
|
), P = Fa(r), [T, L] = h.useState(!1), z = h.useRef(!1);
|
|
19086
19086
|
h.useEffect(() => {
|
|
19087
19087
|
if (y) return ua(y);
|
|
19088
19088
|
}, [y]), fr();
|
|
19089
19089
|
const A = h.useCallback(
|
|
19090
|
-
(
|
|
19090
|
+
(V) => {
|
|
19091
19091
|
const [J, ...ce] = P().map((Ee) => Ee.ref.current), [be] = ce.slice(-1), ve = document.activeElement;
|
|
19092
|
-
for (const Ee of
|
|
19092
|
+
for (const Ee of V)
|
|
19093
19093
|
if (Ee === ve || (Ee?.scrollIntoView({ block: "nearest" }), Ee === J && S && (S.scrollTop = 0), Ee === be && S && (S.scrollTop = S.scrollHeight), Ee?.focus(), document.activeElement !== ve)) return;
|
|
19094
19094
|
},
|
|
19095
19095
|
[P, S]
|
|
@@ -19103,38 +19103,38 @@ var E4 = /* @__PURE__ */ Ne((e) => {
|
|
|
19103
19103
|
const { onOpenChange: U, triggerPointerDownPosRef: _ } = w;
|
|
19104
19104
|
h.useEffect(() => {
|
|
19105
19105
|
if (y) {
|
|
19106
|
-
let
|
|
19106
|
+
let V = { x: 0, y: 0 };
|
|
19107
19107
|
const J = /* @__PURE__ */ Ne((be) => {
|
|
19108
|
-
|
|
19108
|
+
V = {
|
|
19109
19109
|
x: Math.abs(Math.round(be.pageX) - (_.current?.x ?? 0)),
|
|
19110
19110
|
y: Math.abs(Math.round(be.pageY) - (_.current?.y ?? 0))
|
|
19111
19111
|
};
|
|
19112
19112
|
}, "handlePointerMove"), ce = /* @__PURE__ */ Ne((be) => {
|
|
19113
|
-
|
|
19113
|
+
V.x <= 10 && V.y <= 10 ? be.preventDefault() : be.composedPath().includes(y) || U(!1), document.removeEventListener("pointermove", J), _.current = null;
|
|
19114
19114
|
}, "handlePointerUp");
|
|
19115
19115
|
return _.current !== null && (document.addEventListener("pointermove", J), document.addEventListener("pointerup", ce, { capture: !0, once: !0 })), () => {
|
|
19116
19116
|
document.removeEventListener("pointermove", J), document.removeEventListener("pointerup", ce, { capture: !0 });
|
|
19117
19117
|
};
|
|
19118
19118
|
}
|
|
19119
19119
|
}, [y, U, _]), h.useEffect(() => {
|
|
19120
|
-
const
|
|
19121
|
-
return window.addEventListener("blur",
|
|
19122
|
-
window.removeEventListener("blur",
|
|
19120
|
+
const V = /* @__PURE__ */ Ne(() => U(!1), "close");
|
|
19121
|
+
return window.addEventListener("blur", V), window.addEventListener("resize", V), () => {
|
|
19122
|
+
window.removeEventListener("blur", V), window.removeEventListener("resize", V);
|
|
19123
19123
|
};
|
|
19124
19124
|
}, [U]);
|
|
19125
|
-
const [ne, M] = cl((
|
|
19126
|
-
const J = P().filter((ve) => !ve.disabled), ce = J.find((ve) => ve.ref.current === document.activeElement), be = dl(J,
|
|
19125
|
+
const [ne, M] = cl((V) => {
|
|
19126
|
+
const J = P().filter((ve) => !ve.disabled), ce = J.find((ve) => ve.ref.current === document.activeElement), be = dl(J, V, ce);
|
|
19127
19127
|
be && setTimeout(() => be.ref.current?.focus());
|
|
19128
|
-
}),
|
|
19129
|
-
(
|
|
19128
|
+
}), G = h.useCallback(
|
|
19129
|
+
(V, J, ce) => {
|
|
19130
19130
|
const be = !z.current && !ce;
|
|
19131
|
-
(w.value !== void 0 && w.value === J || be) && (I(
|
|
19131
|
+
(w.value !== void 0 && w.value === J || be) && (I(V), be && (z.current = !0));
|
|
19132
19132
|
},
|
|
19133
19133
|
[w.value]
|
|
19134
|
-
), ee = h.useCallback(() => y?.focus(), [y]),
|
|
19135
|
-
(
|
|
19134
|
+
), ee = h.useCallback(() => y?.focus(), [y]), K = h.useCallback(
|
|
19135
|
+
(V, J, ce) => {
|
|
19136
19136
|
const be = !z.current && !ce;
|
|
19137
|
-
(w.value !== void 0 && w.value === J || be) && V
|
|
19137
|
+
(w.value !== void 0 && w.value === J || be) && j(V);
|
|
19138
19138
|
},
|
|
19139
19139
|
[w.value]
|
|
19140
19140
|
), Q = o === "popper" ? Ic : F4, B = Q === Ic ? {
|
|
@@ -19156,10 +19156,10 @@ var E4 = /* @__PURE__ */ Ne((e) => {
|
|
|
19156
19156
|
content: y,
|
|
19157
19157
|
viewport: S,
|
|
19158
19158
|
onViewportChange: E,
|
|
19159
|
-
itemRefCallback:
|
|
19159
|
+
itemRefCallback: G,
|
|
19160
19160
|
selectedItem: N,
|
|
19161
19161
|
onItemLeave: ee,
|
|
19162
|
-
itemTextRefCallback:
|
|
19162
|
+
itemTextRefCallback: K,
|
|
19163
19163
|
focusSelectedItem: $,
|
|
19164
19164
|
selectedItemText: F,
|
|
19165
19165
|
position: o,
|
|
@@ -19170,11 +19170,11 @@ var E4 = /* @__PURE__ */ Ne((e) => {
|
|
|
19170
19170
|
{
|
|
19171
19171
|
asChild: !0,
|
|
19172
19172
|
trapped: w.open,
|
|
19173
|
-
onMountAutoFocus: (
|
|
19174
|
-
|
|
19173
|
+
onMountAutoFocus: (V) => {
|
|
19174
|
+
V.preventDefault();
|
|
19175
19175
|
},
|
|
19176
|
-
onUnmountAutoFocus: oe(a, (
|
|
19177
|
-
w.trigger?.focus({ preventScroll: !0 }),
|
|
19176
|
+
onUnmountAutoFocus: oe(a, (V) => {
|
|
19177
|
+
w.trigger?.focus({ preventScroll: !0 }), V.preventDefault();
|
|
19178
19178
|
}),
|
|
19179
19179
|
children: /* @__PURE__ */ l(
|
|
19180
19180
|
Zr,
|
|
@@ -19183,7 +19183,7 @@ var E4 = /* @__PURE__ */ Ne((e) => {
|
|
|
19183
19183
|
disableOutsidePointerEvents: !0,
|
|
19184
19184
|
onEscapeKeyDown: i,
|
|
19185
19185
|
onPointerDownOutside: s,
|
|
19186
|
-
onFocusOutside: (
|
|
19186
|
+
onFocusOutside: (V) => V.preventDefault(),
|
|
19187
19187
|
onDismiss: () => w.onOpenChange(!1),
|
|
19188
19188
|
children: /* @__PURE__ */ l(
|
|
19189
19189
|
Q,
|
|
@@ -19192,7 +19192,7 @@ var E4 = /* @__PURE__ */ Ne((e) => {
|
|
|
19192
19192
|
id: w.contentId,
|
|
19193
19193
|
"data-state": w.open ? "open" : "closed",
|
|
19194
19194
|
dir: w.dir,
|
|
19195
|
-
onContextMenu: (
|
|
19195
|
+
onContextMenu: (V) => V.preventDefault(),
|
|
19196
19196
|
...k,
|
|
19197
19197
|
...B,
|
|
19198
19198
|
onPlaced: () => L(!0),
|
|
@@ -19205,15 +19205,15 @@ var E4 = /* @__PURE__ */ Ne((e) => {
|
|
|
19205
19205
|
outline: "none",
|
|
19206
19206
|
...k.style
|
|
19207
19207
|
},
|
|
19208
|
-
onKeyDown: oe(k.onKeyDown, (
|
|
19209
|
-
const J =
|
|
19210
|
-
if (
|
|
19208
|
+
onKeyDown: oe(k.onKeyDown, (V) => {
|
|
19209
|
+
const J = V.ctrlKey || V.altKey || V.metaKey;
|
|
19210
|
+
if (V.key === "Tab" && V.preventDefault(), !J && V.key.length === 1 && M(V.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(V.key)) {
|
|
19211
19211
|
let be = P().filter((ve) => !ve.disabled).map((ve) => ve.ref.current);
|
|
19212
|
-
if (["ArrowUp", "End"].includes(
|
|
19213
|
-
const ve =
|
|
19212
|
+
if (["ArrowUp", "End"].includes(V.key) && (be = be.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(V.key)) {
|
|
19213
|
+
const ve = V.target, Ee = be.indexOf(ve);
|
|
19214
19214
|
be = be.slice(Ee + 1);
|
|
19215
19215
|
}
|
|
19216
|
-
setTimeout(() => A(be)),
|
|
19216
|
+
setTimeout(() => A(be)), V.preventDefault();
|
|
19217
19217
|
}
|
|
19218
19218
|
})
|
|
19219
19219
|
}
|
|
@@ -19226,7 +19226,7 @@ var E4 = /* @__PURE__ */ Ne((e) => {
|
|
|
19226
19226
|
);
|
|
19227
19227
|
}, "SelectContentImpl")
|
|
19228
19228
|
), F4 = /* @__PURE__ */ h.forwardRef(/* @__PURE__ */ Ne(function(t, n) {
|
|
19229
|
-
const { __scopeSelect: r, onPlaced: o, ...a } = t, i = Cn(Fn, r), s =
|
|
19229
|
+
const { __scopeSelect: r, onPlaced: o, ...a } = t, i = Cn(Fn, r), s = jn(Fn, r), [c, d] = h.useState(null), [u, f] = h.useState(null), p = ye(n, f), m = Fa(r), v = h.useRef(!1), b = h.useRef(!0), { viewport: g, selectedItem: C, selectedItemText: k, focusSelectedItem: w } = s, y = h.useCallback(() => {
|
|
19230
19230
|
if (i.trigger && i.valueNode && c && u && g && C && k) {
|
|
19231
19231
|
const R = i.trigger.getBoundingClientRect(), N = u.getBoundingClientRect(), I = i.valueNode.getBoundingClientRect(), F = k.getBoundingClientRect();
|
|
19232
19232
|
if (i.dir !== "rtl") {
|
|
@@ -19247,9 +19247,9 @@ var E4 = /* @__PURE__ */ Ne((e) => {
|
|
|
19247
19247
|
]);
|
|
19248
19248
|
c.style.minWidth = Oe + "px", c.style.right = Dt + "px";
|
|
19249
19249
|
}
|
|
19250
|
-
const
|
|
19251
|
-
if (J <=
|
|
19252
|
-
const ve =
|
|
19250
|
+
const j = m(), P = window.innerHeight - Et * 2, T = g.scrollHeight, L = window.getComputedStyle(u), z = parseInt(L.borderTopWidth, 10), A = parseInt(L.paddingTop, 10), $ = parseInt(L.borderBottomWidth, 10), U = parseInt(L.paddingBottom, 10), _ = z + A + T + U + $, ne = Math.min(C.offsetHeight * 5, _), M = window.getComputedStyle(g), G = parseInt(M.paddingTop, 10), ee = parseInt(M.paddingBottom, 10), K = R.top + R.height / 2 - Et, Q = P - K, B = C.offsetHeight / 2, V = C.offsetTop + B, J = z + A + V, ce = _ - J;
|
|
19251
|
+
if (J <= K) {
|
|
19252
|
+
const ve = j.length > 0 && C === j[j.length - 1].ref.current;
|
|
19253
19253
|
c.style.bottom = "0px";
|
|
19254
19254
|
const Ee = u.clientHeight - g.offsetTop - g.offsetHeight, ae = Math.max(
|
|
19255
19255
|
Q,
|
|
@@ -19258,14 +19258,14 @@ var E4 = /* @__PURE__ */ Ne((e) => {
|
|
|
19258
19258
|
), Oe = J + ae;
|
|
19259
19259
|
c.style.height = Oe + "px";
|
|
19260
19260
|
} else {
|
|
19261
|
-
const ve =
|
|
19261
|
+
const ve = j.length > 0 && C === j[0].ref.current;
|
|
19262
19262
|
c.style.top = "0px";
|
|
19263
19263
|
const ae = Math.max(
|
|
19264
|
-
|
|
19264
|
+
K,
|
|
19265
19265
|
z + g.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
19266
|
-
(ve ?
|
|
19266
|
+
(ve ? G : 0) + B
|
|
19267
19267
|
) + ce;
|
|
19268
|
-
c.style.height = ae + "px", g.scrollTop = J -
|
|
19268
|
+
c.style.height = ae + "px", g.scrollTop = J - K + g.offsetTop;
|
|
19269
19269
|
}
|
|
19270
19270
|
c.style.margin = `${Et}px 0`, c.style.minHeight = ne + "px", c.style.maxHeight = P + "px", o?.(), requestAnimationFrame(() => v.current = !0);
|
|
19271
19271
|
}
|
|
@@ -19357,7 +19357,7 @@ var E4 = /* @__PURE__ */ Ne((e) => {
|
|
|
19357
19357
|
);
|
|
19358
19358
|
}, "SelectPopperPosition")), [$4, ll] = Bn(Fn, {}), Tc = "SelectViewport", z4 = /* @__PURE__ */ h.forwardRef(
|
|
19359
19359
|
/* @__PURE__ */ Ne(function(t, n) {
|
|
19360
|
-
const { __scopeSelect: r, nonce: o, ...a } = t, i =
|
|
19360
|
+
const { __scopeSelect: r, nonce: o, ...a } = t, i = jn(Tc, r), s = ll(Tc, r), c = ye(n, i.onViewportChange), d = h.useRef(0);
|
|
19361
19361
|
return /* @__PURE__ */ D(Me, { children: [
|
|
19362
19362
|
/* @__PURE__ */ l(
|
|
19363
19363
|
"style",
|
|
@@ -19406,7 +19406,7 @@ var E4 = /* @__PURE__ */ Ne((e) => {
|
|
|
19406
19406
|
) })
|
|
19407
19407
|
] });
|
|
19408
19408
|
}, "SelectViewport")
|
|
19409
|
-
), B4 = "SelectGroup", [sx, lx] = Bn(B4), Ji = "SelectItem", [
|
|
19409
|
+
), B4 = "SelectGroup", [sx, lx] = Bn(B4), Ji = "SelectItem", [j4, xp] = Bn(Ji), V4 = /* @__PURE__ */ h.forwardRef(
|
|
19410
19410
|
/* @__PURE__ */ Ne(function(t, n) {
|
|
19411
19411
|
const {
|
|
19412
19412
|
__scopeSelect: r,
|
|
@@ -19414,13 +19414,13 @@ var E4 = /* @__PURE__ */ Ne((e) => {
|
|
|
19414
19414
|
disabled: a = !1,
|
|
19415
19415
|
textValue: i,
|
|
19416
19416
|
...s
|
|
19417
|
-
} = t, c = Cn(Ji, r), d =
|
|
19417
|
+
} = t, c = Cn(Ji, r), d = jn(Ji, r), u = c.value === o, [f, p] = h.useState(i ?? ""), [m, v] = h.useState(!1), b = yt(
|
|
19418
19418
|
(y) => d.itemRefCallback?.(y, o, a)
|
|
19419
19419
|
), g = ye(n, b), C = Qe(), k = h.useRef("touch"), w = /* @__PURE__ */ Ne(() => {
|
|
19420
19420
|
a || (c.onValueChange(o), c.onOpenChange(!1));
|
|
19421
19421
|
}, "handleSelect");
|
|
19422
19422
|
return /* @__PURE__ */ l(
|
|
19423
|
-
|
|
19423
|
+
j4,
|
|
19424
19424
|
{
|
|
19425
19425
|
scope: r,
|
|
19426
19426
|
value: o,
|
|
@@ -19479,7 +19479,7 @@ var E4 = /* @__PURE__ */ Ne((e) => {
|
|
|
19479
19479
|
}, "SelectItem")
|
|
19480
19480
|
), Oo = "SelectItemText", H4 = /* @__PURE__ */ h.forwardRef(
|
|
19481
19481
|
/* @__PURE__ */ Ne(function(t, n) {
|
|
19482
|
-
const { __scopeSelect: r, className: o, style: a, ...i } = t, s = Cn(Oo, r), c =
|
|
19482
|
+
const { __scopeSelect: r, className: o, style: a, ...i } = t, s = Cn(Oo, r), c = jn(Oo, r), d = xp(Oo, r), u = S4(Oo, r), [f, p] = h.useState(null), m = yt(
|
|
19483
19483
|
(w) => c.itemTextRefCallback?.(w, d.value, d.disabled)
|
|
19484
19484
|
), v = ye(
|
|
19485
19485
|
n,
|
|
@@ -19502,7 +19502,7 @@ var E4 = /* @__PURE__ */ Ne((e) => {
|
|
|
19502
19502
|
return xp(U4, r).isSelected ? /* @__PURE__ */ l(fe.span, { "aria-hidden": !0, ...o, ref: n }) : null;
|
|
19503
19503
|
}, "SelectItemIndicator")
|
|
19504
19504
|
), _c = "SelectScrollUpButton", G4 = /* @__PURE__ */ h.forwardRef(/* @__PURE__ */ Ne(function(t, n) {
|
|
19505
|
-
const r =
|
|
19505
|
+
const r = jn(_c, t.__scopeSelect), o = ll(_c, t.__scopeSelect), [a, i] = h.useState(!1), s = ye(n, o.onScrollButtonChange);
|
|
19506
19506
|
return Fe(() => {
|
|
19507
19507
|
if (r.viewport && r.isPositioned) {
|
|
19508
19508
|
let c = function() {
|
|
@@ -19525,7 +19525,7 @@ var E4 = /* @__PURE__ */ Ne((e) => {
|
|
|
19525
19525
|
}
|
|
19526
19526
|
) : null;
|
|
19527
19527
|
}, "SelectScrollUpButton")), Mc = "SelectScrollDownButton", K4 = /* @__PURE__ */ h.forwardRef(/* @__PURE__ */ Ne(function(t, n) {
|
|
19528
|
-
const r =
|
|
19528
|
+
const r = jn(Mc, t.__scopeSelect), o = ll(Mc, t.__scopeSelect), [a, i] = h.useState(!1), s = ye(n, o.onScrollButtonChange);
|
|
19529
19529
|
return Fe(() => {
|
|
19530
19530
|
if (r.viewport && r.isPositioned) {
|
|
19531
19531
|
let c = function() {
|
|
@@ -19548,7 +19548,7 @@ var E4 = /* @__PURE__ */ Ne((e) => {
|
|
|
19548
19548
|
}
|
|
19549
19549
|
) : null;
|
|
19550
19550
|
}, "SelectScrollDownButton")), Sp = /* @__PURE__ */ h.forwardRef(/* @__PURE__ */ Ne(function(t, n) {
|
|
19551
|
-
const { __scopeSelect: r, onAutoScroll: o, ...a } = t, i =
|
|
19551
|
+
const { __scopeSelect: r, onAutoScroll: o, ...a } = t, i = jn("SelectScrollButton", r), s = h.useRef(null), c = Fa(r), d = h.useCallback(() => {
|
|
19552
19552
|
s.current !== null && (window.clearInterval(s.current), s.current = null);
|
|
19553
19553
|
}, []);
|
|
19554
19554
|
return h.useEffect(() => () => d(), [d]), Fe(() => {
|
|
@@ -19750,7 +19750,7 @@ function e5({
|
|
|
19750
19750
|
...r
|
|
19751
19751
|
}) {
|
|
19752
19752
|
return /* @__PURE__ */ D(
|
|
19753
|
-
|
|
19753
|
+
V4,
|
|
19754
19754
|
{
|
|
19755
19755
|
"data-slot": "select-item",
|
|
19756
19756
|
className: te(
|
|
@@ -20058,15 +20058,15 @@ function Dp() {
|
|
|
20058
20058
|
);
|
|
20059
20059
|
}
|
|
20060
20060
|
ul(Dp, "useIsHydratedModern");
|
|
20061
|
-
var p5 = typeof Pp == "function" ? Dp : Rp, h5 = Object.defineProperty,
|
|
20061
|
+
var p5 = typeof Pp == "function" ? Dp : Rp, h5 = Object.defineProperty, Vn = (e, t) => h5(e, "name", { value: t, configurable: !0 }), gi = "rovingFocusGroup.onEntryFocus", m5 = { bubbles: !1, cancelable: !0 }, $a = "RovingFocusGroup", [Qi, Ap, g5] = /* @__PURE__ */ gr($a), [v5, Ip] = /* @__PURE__ */ nt(
|
|
20062
20062
|
$a,
|
|
20063
20063
|
[g5]
|
|
20064
20064
|
), [b5, w5] = v5($a), y5 = /* @__PURE__ */ h.forwardRef(
|
|
20065
20065
|
// blank line to reduce diff noise
|
|
20066
|
-
/* @__PURE__ */
|
|
20066
|
+
/* @__PURE__ */ Vn(function(t, n) {
|
|
20067
20067
|
return /* @__PURE__ */ l(Qi.Provider, { scope: t.__scopeRovingFocusGroup, children: /* @__PURE__ */ l(Qi.Slot, { scope: t.__scopeRovingFocusGroup, children: /* @__PURE__ */ l(C5, { ...t, ref: n }) }) });
|
|
20068
20068
|
}, "RovingFocusGroup")
|
|
20069
|
-
), C5 = /* @__PURE__ */ h.forwardRef(/* @__PURE__ */
|
|
20069
|
+
), C5 = /* @__PURE__ */ h.forwardRef(/* @__PURE__ */ Vn(function(t, n) {
|
|
20070
20070
|
const {
|
|
20071
20071
|
__scopeRovingFocusGroup: r,
|
|
20072
20072
|
orientation: o,
|
|
@@ -20125,7 +20125,7 @@ var p5 = typeof Pp == "function" ? Dp : Rp, h5 = Object.defineProperty, jn = (e,
|
|
|
20125
20125
|
if (N.target === N.currentTarget && I && !k) {
|
|
20126
20126
|
const F = new CustomEvent(gi, m5);
|
|
20127
20127
|
if (N.currentTarget.dispatchEvent(F), !F.defaultPrevented) {
|
|
20128
|
-
const
|
|
20128
|
+
const j = x().filter((A) => A.focusable), P = j.find((A) => A.active), T = j.find((A) => A.id === g), z = [P, T, ...j].filter(
|
|
20129
20129
|
Boolean
|
|
20130
20130
|
).map((A) => A.ref.current);
|
|
20131
20131
|
fl(z, f);
|
|
@@ -20140,7 +20140,7 @@ var p5 = typeof Pp == "function" ? Dp : Rp, h5 = Object.defineProperty, jn = (e,
|
|
|
20140
20140
|
);
|
|
20141
20141
|
}, "RovingFocusGroupImpl")), x5 = "RovingFocusGroupItem", S5 = /* @__PURE__ */ h.forwardRef(
|
|
20142
20142
|
// blank line to reduce diff noise
|
|
20143
|
-
/* @__PURE__ */
|
|
20143
|
+
/* @__PURE__ */ Vn(function(t, n) {
|
|
20144
20144
|
const {
|
|
20145
20145
|
__scopeRovingFocusGroup: r,
|
|
20146
20146
|
focusable: o = !0,
|
|
@@ -20212,23 +20212,23 @@ var p5 = typeof Pp == "function" ? Dp : Rp, h5 = Object.defineProperty, jn = (e,
|
|
|
20212
20212
|
function Tp(e, t) {
|
|
20213
20213
|
return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
|
20214
20214
|
}
|
|
20215
|
-
|
|
20215
|
+
Vn(Tp, "getDirectionAwareKey");
|
|
20216
20216
|
function _p(e, t, n) {
|
|
20217
20217
|
const r = Tp(e.key, n);
|
|
20218
20218
|
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r)))
|
|
20219
20219
|
return E5[r];
|
|
20220
20220
|
}
|
|
20221
|
-
|
|
20221
|
+
Vn(_p, "getFocusIntent");
|
|
20222
20222
|
function fl(e, t = !1) {
|
|
20223
20223
|
const n = document.activeElement;
|
|
20224
20224
|
for (const r of e)
|
|
20225
20225
|
if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
|
|
20226
20226
|
}
|
|
20227
|
-
|
|
20227
|
+
Vn(fl, "focusFirst");
|
|
20228
20228
|
function Mp(e, t) {
|
|
20229
20229
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
20230
20230
|
}
|
|
20231
|
-
|
|
20231
|
+
Vn(Mp, "wrapArray");
|
|
20232
20232
|
var k5 = y5, R5 = S5, P5 = Object.defineProperty, _e = (e, t) => P5(e, "name", { value: t, configurable: !0 }), N5 = ["Enter", " "], D5 = ["ArrowDown", "PageUp", "Home"], Op = ["ArrowUp", "PageDown", "End"], A5 = [...D5, ...Op], za = "Menu", [es, I5, T5] = /* @__PURE__ */ gr(za), [Hn, Lp] = /* @__PURE__ */ nt(za, [
|
|
20233
20233
|
T5,
|
|
20234
20234
|
yn,
|
|
@@ -20278,12 +20278,12 @@ var k5 = y5, R5 = S5, P5 = Object.defineProperty, _e = (e, t) => P5(e, "name", {
|
|
|
20278
20278
|
}), z5 = /* @__PURE__ */ _e((e) => {
|
|
20279
20279
|
const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, a = mo($p, t);
|
|
20280
20280
|
return /* @__PURE__ */ l(F5, { scope: t, forceMount: n, children: /* @__PURE__ */ l(Ct, { present: n || a.open, children: /* @__PURE__ */ l(Jr, { asChild: !0, container: o, children: r }) }) });
|
|
20281
|
-
}, "MenuPortal"), un = "MenuContent", [B5, zp] = Hn(un),
|
|
20281
|
+
}, "MenuPortal"), un = "MenuContent", [B5, zp] = Hn(un), j5 = /* @__PURE__ */ h.forwardRef(
|
|
20282
20282
|
/* @__PURE__ */ _e(function(t, n) {
|
|
20283
20283
|
const r = $5(un, t.__scopeMenu), { forceMount: o = r.forceMount, ...a } = t, i = mo(un, t.__scopeMenu), s = hl(un, t.__scopeMenu);
|
|
20284
|
-
return /* @__PURE__ */ l(es.Provider, { scope: t.__scopeMenu, children: /* @__PURE__ */ l(Ct, { present: o || i.open, children: /* @__PURE__ */ l(es.Slot, { scope: t.__scopeMenu, children: s.modal ? /* @__PURE__ */ l(
|
|
20284
|
+
return /* @__PURE__ */ l(es.Provider, { scope: t.__scopeMenu, children: /* @__PURE__ */ l(Ct, { present: o || i.open, children: /* @__PURE__ */ l(es.Slot, { scope: t.__scopeMenu, children: s.modal ? /* @__PURE__ */ l(V5, { ...a, ref: n }) : /* @__PURE__ */ l(H5, { ...a, ref: n }) }) }) });
|
|
20285
20285
|
}, "MenuContent")
|
|
20286
|
-
),
|
|
20286
|
+
), V5 = /* @__PURE__ */ h.forwardRef(
|
|
20287
20287
|
// blank line to reduce diff noise
|
|
20288
20288
|
/* @__PURE__ */ _e(function(t, n) {
|
|
20289
20289
|
const r = mo(un, t.__scopeMenu), o = h.useRef(null), a = ye(n, o);
|
|
@@ -20338,10 +20338,10 @@ var k5 = y5, R5 = S5, P5 = Object.defineProperty, _e = (e, t) => P5(e, "name", {
|
|
|
20338
20338
|
onDismiss: v,
|
|
20339
20339
|
disableOutsideScroll: b,
|
|
20340
20340
|
...g
|
|
20341
|
-
} = t, C = mo(un, r), k = hl(un, r), w = pl(r), y = Fp(r), x = I5(r), [S, E] = h.useState(null), R = h.useRef(null), N = ye(n, R, C.onContentChange), I = h.useRef(0), F = h.useRef(""),
|
|
20342
|
-
const ne = F.current + _, M = x().filter((
|
|
20343
|
-
(/* @__PURE__ */ _e((function
|
|
20344
|
-
F.current = J, window.clearTimeout(I.current), J !== "" && (I.current = window.setTimeout(() =>
|
|
20341
|
+
} = t, C = mo(un, r), k = hl(un, r), w = pl(r), y = Fp(r), x = I5(r), [S, E] = h.useState(null), R = h.useRef(null), N = ye(n, R, C.onContentChange), I = h.useRef(0), F = h.useRef(""), j = h.useRef(0), P = h.useRef(null), T = h.useRef("right"), L = h.useRef(0), z = b ? Qr : h.Fragment, A = b ? { as: U5, allowPinchZoom: !0 } : void 0, $ = /* @__PURE__ */ _e((_) => {
|
|
20342
|
+
const ne = F.current + _, M = x().filter((V) => !V.disabled), G = document.activeElement, ee = M.find((V) => V.ref.current === G)?.textValue, K = M.map((V) => V.textValue), Q = Wp(K, ne, ee), B = M.find((V) => V.textValue === Q)?.ref.current;
|
|
20343
|
+
(/* @__PURE__ */ _e((function V(J) {
|
|
20344
|
+
F.current = J, window.clearTimeout(I.current), J !== "" && (I.current = window.setTimeout(() => V(""), 1e3));
|
|
20345
20345
|
}), "updateSearch"))(ne), B && setTimeout(() => B.focus());
|
|
20346
20346
|
}, "handleTypeaheadSearch");
|
|
20347
20347
|
h.useEffect(() => () => window.clearTimeout(I.current), []), fr();
|
|
@@ -20369,7 +20369,7 @@ var k5 = y5, R5 = S5, P5 = Object.defineProperty, _e = (e, t) => P5(e, "name", {
|
|
|
20369
20369
|
},
|
|
20370
20370
|
[U]
|
|
20371
20371
|
),
|
|
20372
|
-
pointerGraceTimerRef:
|
|
20372
|
+
pointerGraceTimerRef: j,
|
|
20373
20373
|
onPointerGraceIntentChange: h.useCallback((_) => {
|
|
20374
20374
|
P.current = _;
|
|
20375
20375
|
}, []),
|
|
@@ -20411,7 +20411,7 @@ var k5 = y5, R5 = S5, P5 = Object.defineProperty, _e = (e, t) => P5(e, "name", {
|
|
|
20411
20411
|
{
|
|
20412
20412
|
role: "menu",
|
|
20413
20413
|
"aria-orientation": "vertical",
|
|
20414
|
-
"data-state":
|
|
20414
|
+
"data-state": jp(C.open),
|
|
20415
20415
|
"data-radix-menu-content": "",
|
|
20416
20416
|
dir: k.dir,
|
|
20417
20417
|
...w,
|
|
@@ -20419,12 +20419,12 @@ var k5 = y5, R5 = S5, P5 = Object.defineProperty, _e = (e, t) => P5(e, "name", {
|
|
|
20419
20419
|
ref: N,
|
|
20420
20420
|
style: { outline: "none", ...g.style },
|
|
20421
20421
|
onKeyDown: oe(g.onKeyDown, (_) => {
|
|
20422
|
-
const M = _.target.closest("[data-radix-menu-content]") === _.currentTarget,
|
|
20423
|
-
M && (_.key === "Tab" && _.preventDefault(), !
|
|
20424
|
-
const
|
|
20425
|
-
if (_.target !==
|
|
20422
|
+
const M = _.target.closest("[data-radix-menu-content]") === _.currentTarget, G = _.ctrlKey || _.altKey || _.metaKey, ee = _.key.length === 1;
|
|
20423
|
+
M && (_.key === "Tab" && _.preventDefault(), !G && ee && $(_.key));
|
|
20424
|
+
const K = R.current;
|
|
20425
|
+
if (_.target !== K || !A5.includes(_.key)) return;
|
|
20426
20426
|
_.preventDefault();
|
|
20427
|
-
const B = x().filter((
|
|
20427
|
+
const B = x().filter((V) => !V.disabled).map((V) => V.ref.current);
|
|
20428
20428
|
Op.includes(_.key) && B.reverse(), Hp(B);
|
|
20429
20429
|
}),
|
|
20430
20430
|
onBlur: oe(t.onBlur, (_) => {
|
|
@@ -20435,8 +20435,8 @@ var k5 = y5, R5 = S5, P5 = Object.defineProperty, _e = (e, t) => P5(e, "name", {
|
|
|
20435
20435
|
ia((_) => {
|
|
20436
20436
|
const ne = _.target, M = L.current !== _.clientX;
|
|
20437
20437
|
if (_.currentTarget.contains(ne) && M) {
|
|
20438
|
-
const
|
|
20439
|
-
T.current =
|
|
20438
|
+
const G = _.clientX > L.current ? "right" : "left";
|
|
20439
|
+
T.current = G, L.current = _.clientX;
|
|
20440
20440
|
}
|
|
20441
20441
|
})
|
|
20442
20442
|
)
|
|
@@ -20539,16 +20539,16 @@ var k5 = y5, R5 = S5, P5 = Object.defineProperty, _e = (e, t) => P5(e, "name", {
|
|
|
20539
20539
|
);
|
|
20540
20540
|
}, "MenuSeparator")
|
|
20541
20541
|
), X5 = "MenuSub", [px, hx] = Hn(X5);
|
|
20542
|
-
function
|
|
20542
|
+
function jp(e) {
|
|
20543
20543
|
return e ? "open" : "closed";
|
|
20544
20544
|
}
|
|
20545
|
-
_e(
|
|
20546
|
-
function
|
|
20545
|
+
_e(jp, "getOpenState");
|
|
20546
|
+
function Vp(e) {
|
|
20547
20547
|
return e === "indeterminate";
|
|
20548
20548
|
}
|
|
20549
|
-
_e(
|
|
20549
|
+
_e(Vp, "isIndeterminate");
|
|
20550
20550
|
function Z5(e) {
|
|
20551
|
-
return
|
|
20551
|
+
return Vp(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
20552
20552
|
}
|
|
20553
20553
|
_e(Z5, "getCheckedState");
|
|
20554
20554
|
function Hp(e) {
|
|
@@ -20591,7 +20591,7 @@ function ia(e) {
|
|
|
20591
20591
|
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
20592
20592
|
}
|
|
20593
20593
|
_e(ia, "whenMouse");
|
|
20594
|
-
var J5 = O5, Q5 = L5, e9 = z5, t9 =
|
|
20594
|
+
var J5 = O5, Q5 = L5, e9 = z5, t9 = j5, n9 = W5, r9 = q5, o9 = Object.defineProperty, Jt = (e, t) => o9(e, "name", { value: t, configurable: !0 }), ml = "ContextMenu", [a9, mx] = /* @__PURE__ */ nt(ml, [
|
|
20595
20595
|
Lp
|
|
20596
20596
|
]), Cr = Lp(), [i9, Yp] = a9(ml), s9 = /* @__PURE__ */ Jt((e) => {
|
|
20597
20597
|
const { __scopeContextMenu: t, children: n, onOpenChange: r, open: o, dir: a, modal: i = !0 } = e, s = h.useRef(!1), [c, d] = ut({
|
|
@@ -20791,7 +20791,7 @@ function R9({ children: e, canvasIsEmpty: t }) {
|
|
|
20791
20791
|
if (I.length)
|
|
20792
20792
|
if (I[0].type === "activeSelection") {
|
|
20793
20793
|
I[0]._restoreObjectsState?.();
|
|
20794
|
-
const
|
|
20794
|
+
const j = [];
|
|
20795
20795
|
I[0].forEachObject((P) => {
|
|
20796
20796
|
const T = P.id;
|
|
20797
20797
|
P.set({ id: zr() }), P.sourceType === "svg" && I[0].forEachObject((L) => {
|
|
@@ -20800,8 +20800,8 @@ function R9({ children: e, canvasIsEmpty: t }) {
|
|
|
20800
20800
|
}), L.set({
|
|
20801
20801
|
clipPath: P
|
|
20802
20802
|
}));
|
|
20803
|
-
}), r.current?.canvas.add(P),
|
|
20804
|
-
}), r.current?.setActiveObjects(
|
|
20803
|
+
}), r.current?.canvas.add(P), j.push(P);
|
|
20804
|
+
}), r.current?.setActiveObjects(j);
|
|
20805
20805
|
} else
|
|
20806
20806
|
I[0].set({ id: zr() }), r.current?.addObject(I[0]), r.current?.canvas.requestRenderAll();
|
|
20807
20807
|
}, [s.current, r.current]), E = re(0), R = (N) => {
|
|
@@ -20949,9 +20949,9 @@ const vx = ({ semiDesignPermission: e = !1, basePlate: t }) => {
|
|
|
20949
20949
|
const O = i1(t);
|
|
20950
20950
|
return {
|
|
20951
20951
|
...O,
|
|
20952
|
-
renders: O.renders.map((
|
|
20953
|
-
...
|
|
20954
|
-
render_areas:
|
|
20952
|
+
renders: O.renders.map((W) => ({
|
|
20953
|
+
...W,
|
|
20954
|
+
render_areas: W.render_areas.filter((H) => H.name !== "main")
|
|
20955
20955
|
}))
|
|
20956
20956
|
};
|
|
20957
20957
|
}, [t]), { backgroundColor: C, setBackgroundColor: k } = ze(
|
|
@@ -20959,14 +20959,14 @@ const vx = ({ semiDesignPermission: e = !1, basePlate: t }) => {
|
|
|
20959
20959
|
backgroundColor: O.backgroundColor,
|
|
20960
20960
|
setBackgroundColor: O.setBackgroundColor
|
|
20961
20961
|
}))
|
|
20962
|
-
), [w, y] = Y({}), x = re(!0), [S, E] = Y(""), [R, N] = Y([]), [I, F] = Y(!0), [
|
|
20962
|
+
), [w, y] = Y({}), x = re(!0), [S, E] = Y(""), [R, N] = Y([]), [I, F] = Y(!0), [j, P] = Y(null), T = j === g, { setSemiCustomBackground: L, setSemiCustom: z } = ze(
|
|
20963
20963
|
tr((O) => ({
|
|
20964
20964
|
setSemiCustomBackground: O.setSemiCustomBackground,
|
|
20965
20965
|
setSemiCustom: O.setSemiCustom
|
|
20966
20966
|
}))
|
|
20967
20967
|
), A = (O) => {
|
|
20968
|
-
const
|
|
20969
|
-
|
|
20968
|
+
const W = $c(O, d);
|
|
20969
|
+
W.design_options.length && k(W.design_options.find((H) => H.design_type === "color")?.design_value || ""), b(W), r.current = !0;
|
|
20970
20970
|
};
|
|
20971
20971
|
Z(() => {
|
|
20972
20972
|
v.design_options.length && k(v.design_options.find((O) => O.design_type === "color")?.design_value || "");
|
|
@@ -20976,8 +20976,8 @@ const vx = ({ semiDesignPermission: e = !1, basePlate: t }) => {
|
|
|
20976
20976
|
if (T && i && !$.current) {
|
|
20977
20977
|
const O = o.current;
|
|
20978
20978
|
if ($.current = !0, g.areas) {
|
|
20979
|
-
const
|
|
20980
|
-
E(
|
|
20979
|
+
const W = g.areas[0];
|
|
20980
|
+
E(W.name);
|
|
20981
20981
|
const H = {}, X = v.product?.design, de = s ?? X?.design_data;
|
|
20982
20982
|
if (de) {
|
|
20983
20983
|
const se = {};
|
|
@@ -21011,8 +21011,8 @@ const vx = ({ semiDesignPermission: e = !1, basePlate: t }) => {
|
|
|
21011
21011
|
} catch {
|
|
21012
21012
|
}
|
|
21013
21013
|
if (J(), o.current !== O || !M.current) return;
|
|
21014
|
-
|
|
21015
|
-
o.current !== O || !M.current || (N(g.td_renders || []), M.current?.clearCanvas(), ce(
|
|
21014
|
+
V(H, O).finally(() => {
|
|
21015
|
+
o.current !== O || !M.current || (N(g.td_renders || []), M.current?.clearCanvas(), ce(W, H[W.name], O));
|
|
21016
21016
|
});
|
|
21017
21017
|
}
|
|
21018
21018
|
}
|
|
@@ -21021,44 +21021,44 @@ const vx = ({ semiDesignPermission: e = !1, basePlate: t }) => {
|
|
|
21021
21021
|
const O = ++o.current;
|
|
21022
21022
|
return p?.({ name: "load-start", productId: i }), (async () => {
|
|
21023
21023
|
try {
|
|
21024
|
-
const [{ default:
|
|
21024
|
+
const [{ default: W }, { default: H }] = await Promise.all([
|
|
21025
21025
|
import("./engine/editor.js"),
|
|
21026
21026
|
import("./engine/managers/event.js")
|
|
21027
21027
|
]);
|
|
21028
|
-
if (o.current !== O || (vi =
|
|
21028
|
+
if (o.current !== O || (vi = W, Fc = H, A(i), o.current !== O)) return;
|
|
21029
21029
|
ze.getState().initData(a.library?.fonts?.list, a.library?.colors?.list), P(g), p?.({ name: "load-complete", productId: i });
|
|
21030
|
-
} catch (
|
|
21030
|
+
} catch (W) {
|
|
21031
21031
|
if (o.current !== O) return;
|
|
21032
21032
|
f?.({
|
|
21033
21033
|
code: "DESIGNER_BOOTSTRAP_FAILED",
|
|
21034
|
-
message:
|
|
21035
|
-
cause:
|
|
21034
|
+
message: W instanceof Error ? W.message : "Failed to load designer data",
|
|
21035
|
+
cause: W
|
|
21036
21036
|
});
|
|
21037
21037
|
}
|
|
21038
21038
|
})(), () => {
|
|
21039
21039
|
o.current === O && (o.current += 1), $.current = !1, P(null);
|
|
21040
|
-
const
|
|
21041
|
-
M.current = null,
|
|
21040
|
+
const W = M.current, H = G.current;
|
|
21041
|
+
M.current = null, G.current = null, H?.removeAllEventListeners(), W?.destroy(), Object.keys($e).forEach((X) => {
|
|
21042
21042
|
delete $e[X];
|
|
21043
21043
|
}), ze.getState().reset();
|
|
21044
21044
|
};
|
|
21045
21045
|
}, [g, f, p, i, a.library?.fonts?.list, a.library?.colors?.list]);
|
|
21046
|
-
const U = re(null), [_, ne] = Y(!1), M = re(null),
|
|
21046
|
+
const U = re(null), [_, ne] = Y(!1), M = re(null), G = re(null), { historyManager: ee, setHistoryManager: K } = ze(
|
|
21047
21047
|
tr((O) => ({
|
|
21048
21048
|
historyManager: O.historyManager,
|
|
21049
21049
|
setHistoryManager: O.setHistoryManager
|
|
21050
21050
|
}))
|
|
21051
|
-
), [Q, B] = Y(!1),
|
|
21051
|
+
), [Q, B] = Y(!1), V = async (O, W) => {
|
|
21052
21052
|
try {
|
|
21053
21053
|
const H = M.current;
|
|
21054
|
-
if (!H || o.current !==
|
|
21054
|
+
if (!H || o.current !== W) return;
|
|
21055
21055
|
const X = Object.fromEntries(
|
|
21056
21056
|
g.areas.map((me) => [me.name, null])
|
|
21057
21057
|
), de = Object.entries($e).filter(
|
|
21058
21058
|
([me, Ae]) => Ae.state && Lo(Ae.state, O[me])
|
|
21059
21059
|
);
|
|
21060
21060
|
if (!de.length) {
|
|
21061
|
-
o.current ===
|
|
21061
|
+
o.current === W && At(X);
|
|
21062
21062
|
return;
|
|
21063
21063
|
}
|
|
21064
21064
|
const se = performance.now();
|
|
@@ -21066,9 +21066,9 @@ const vx = ({ semiDesignPermission: e = !1, basePlate: t }) => {
|
|
|
21066
21066
|
const Te = g.areas.find((Ut) => Ut.name === me);
|
|
21067
21067
|
if (!Te) continue;
|
|
21068
21068
|
const ke = performance.now(), He = O[me] || C;
|
|
21069
|
-
if (await H.switchView(Te, He, Ae?.state), o.current !==
|
|
21069
|
+
if (await H.switchView(Te, He, Ae?.state), o.current !== W || M.current !== H) return;
|
|
21070
21070
|
const xe = typeof window < "u" && window.innerWidth < 768 ? 320 : 600, ct = typeof createImageBitmap < "u" ? await H.exportPreviewBitmap(xe, O[me] || "") : await H.export(!0, O[me] || "") ?? "";
|
|
21071
|
-
if (o.current !==
|
|
21071
|
+
if (o.current !== W || M.current !== H) return;
|
|
21072
21072
|
if (!ct) continue;
|
|
21073
21073
|
if (typeof ct == "string") {
|
|
21074
21074
|
const Ut = await yl(ct);
|
|
@@ -21079,9 +21079,9 @@ const vx = ({ semiDesignPermission: e = !1, basePlate: t }) => {
|
|
|
21079
21079
|
console.log(`${me}中间图层生成时间: ${Math.floor(Rn - ke)} ms`);
|
|
21080
21080
|
}
|
|
21081
21081
|
const we = performance.now();
|
|
21082
|
-
console.log(`中间图层总生成时间: ${Math.floor(we - se)} ms`), o.current ===
|
|
21082
|
+
console.log(`中间图层总生成时间: ${Math.floor(we - se)} ms`), o.current === W && At(X);
|
|
21083
21083
|
} catch (H) {
|
|
21084
|
-
if (o.current !==
|
|
21084
|
+
if (o.current !== W) return;
|
|
21085
21085
|
f?.({
|
|
21086
21086
|
code: "DESIGN_PREVIEW_LAYER_FAILED",
|
|
21087
21087
|
message: H instanceof Error ? H.message : "Failed to generate design preview layer",
|
|
@@ -21092,20 +21092,20 @@ const vx = ({ semiDesignPermission: e = !1, basePlate: t }) => {
|
|
|
21092
21092
|
}, J = () => {
|
|
21093
21093
|
const O = document.querySelector(".canvas-box");
|
|
21094
21094
|
if (!O || !vi) return;
|
|
21095
|
-
const
|
|
21095
|
+
const W = {
|
|
21096
21096
|
width: O.clientWidth,
|
|
21097
21097
|
height: O.clientHeight
|
|
21098
|
-
}, H = window.innerWidth < 768 ? 0.9 : 0.85, X = new vi(U.current,
|
|
21098
|
+
}, H = window.innerWidth < 768 ? 0.9 : 0.85, X = new vi(U.current, W, O, H);
|
|
21099
21099
|
M.current = X, import("./engine/utils/setting.js").then(({ setDefaultControls: de }) => {
|
|
21100
21100
|
de(window.innerWidth < 768 ? 14 : 8);
|
|
21101
21101
|
});
|
|
21102
|
-
}, ce = async (O,
|
|
21102
|
+
}, ce = async (O, W, H) => {
|
|
21103
21103
|
try {
|
|
21104
21104
|
const X = M.current;
|
|
21105
21105
|
if (!X || o.current !== H) return;
|
|
21106
|
-
const de = O.name, se =
|
|
21106
|
+
const de = O.name, se = W || C;
|
|
21107
21107
|
if ($e[de] && $e[de].state ? (await X.switchView(O, se, $e[de]?.state), !$e[de].state.object && !$e[de].state.objects?.length && B(!0)) : (await X.renderOverlayImage(O), await X.setBackground(se), B(!0)), o.current !== H || M.current !== X) return;
|
|
21108
|
-
X.canvas.discardActiveObject(), X.canvas.requestRenderAll(), Oe(),
|
|
21108
|
+
X.canvas.discardActiveObject(), X.canvas.requestRenderAll(), Oe(), G.current = new Fc(X, ee), F(!1);
|
|
21109
21109
|
} catch (X) {
|
|
21110
21110
|
if (o.current !== H) return;
|
|
21111
21111
|
f?.({
|
|
@@ -21120,35 +21120,35 @@ const vx = ({ semiDesignPermission: e = !1, basePlate: t }) => {
|
|
|
21120
21120
|
}, rt = (O) => {
|
|
21121
21121
|
if (!O) return;
|
|
21122
21122
|
ve(O);
|
|
21123
|
-
const
|
|
21124
|
-
M?.current?.zoomToCenter(
|
|
21123
|
+
const W = O / (Ee || 1);
|
|
21124
|
+
M?.current?.zoomToCenter(W);
|
|
21125
21125
|
}, it = async (O) => {
|
|
21126
|
-
const
|
|
21127
|
-
w[S] && (
|
|
21126
|
+
const W = M.current?.getRenderedObjects() || {};
|
|
21127
|
+
w[S] && (W.color = w[S]), $e[S] || ($e[S] = {
|
|
21128
21128
|
state: null,
|
|
21129
21129
|
history: null
|
|
21130
|
-
}), $e[S].state =
|
|
21130
|
+
}), $e[S].state = W, $e[S].history = ee;
|
|
21131
21131
|
const H = g.areas.find((we) => we.name === O);
|
|
21132
|
-
E(O), ne(!0),
|
|
21132
|
+
E(O), ne(!0), G.current?.disableHistory();
|
|
21133
21133
|
const X = $e[O]?.state?.objects?.length || $e[O]?.state?.object;
|
|
21134
21134
|
B(!X);
|
|
21135
21135
|
const de = w[O] ? w[O] : C;
|
|
21136
21136
|
await M.current?.switchView(H, de, $e[O]?.state);
|
|
21137
21137
|
let se;
|
|
21138
|
-
$e[H.name] ? se = $e[H.name].history || new wi(H.name) : se = new wi(H.name),
|
|
21138
|
+
$e[H.name] ? se = $e[H.name].history || new wi(H.name) : se = new wi(H.name), K(se), G.current?.updateHistoryManager(se), G.current?.enableHistory(), Oe(), ue.emit("design:hideCrop"), ne(!1);
|
|
21139
21139
|
}, Dt = ze((O) => O.setRendering), an = ge(() => {
|
|
21140
|
-
let O = null,
|
|
21140
|
+
let O = null, W = [];
|
|
21141
21141
|
const X = Uc(async () => {
|
|
21142
21142
|
if (!O) return;
|
|
21143
21143
|
const { color: se, loading: we } = O;
|
|
21144
21144
|
O = null, we && Dt(!0);
|
|
21145
21145
|
const me = performance.now(), Ae = M.current, Te = typeof window < "u" && window.innerWidth < 768 ? 320 : 600, ke = Ae ? typeof createImageBitmap < "u" ? await Ae.exportPreviewBitmap(Te, se) : await Ae.export(!0, se) ?? "" : "", He = performance.now();
|
|
21146
|
-
console.log(`中间图层时间: ${Math.floor(He - me)} ms`),
|
|
21146
|
+
console.log(`中间图层时间: ${Math.floor(He - me)} ms`), W.forEach((xe) => xe(ke)), W = [];
|
|
21147
21147
|
}, typeof window < "u" && window.innerWidth < 768 ? 160 : 80, {
|
|
21148
21148
|
leading: !1,
|
|
21149
21149
|
trailing: !0
|
|
21150
21150
|
}), de = (se, we) => (O = { color: se, loading: we }, new Promise((me) => {
|
|
21151
|
-
|
|
21151
|
+
W.push(me), X();
|
|
21152
21152
|
}));
|
|
21153
21153
|
return de.cancel = X.cancel, de.flush = X.flush, de;
|
|
21154
21154
|
}, [M]);
|
|
@@ -21158,7 +21158,7 @@ const vx = ({ semiDesignPermission: e = !1, basePlate: t }) => {
|
|
|
21158
21158
|
const Ye = he(
|
|
21159
21159
|
async (O = !0) => {
|
|
21160
21160
|
if (!g.renders?.length && !R.length) return "";
|
|
21161
|
-
const
|
|
21161
|
+
const W = w[S] ? w[S] : "", H = await an(W, O);
|
|
21162
21162
|
if (typeof H == "string") {
|
|
21163
21163
|
const X = await yl(H);
|
|
21164
21164
|
return URL.createObjectURL(X);
|
|
@@ -21180,38 +21180,38 @@ const vx = ({ semiDesignPermission: e = !1, basePlate: t }) => {
|
|
|
21180
21180
|
}
|
|
21181
21181
|
}, Sn = he(
|
|
21182
21182
|
async (O) => {
|
|
21183
|
-
const
|
|
21184
|
-
if (!
|
|
21185
|
-
const H = (sn.current[
|
|
21186
|
-
sn.current[
|
|
21187
|
-
const X = M.current?.getRenderedObjects(), de = Lo(X, w[
|
|
21188
|
-
if (sn.current[
|
|
21183
|
+
const W = O || S;
|
|
21184
|
+
if (!W) return;
|
|
21185
|
+
const H = (sn.current[W] || 0) + 1;
|
|
21186
|
+
sn.current[W] = H;
|
|
21187
|
+
const X = M.current?.getRenderedObjects(), de = Lo(X, w[W]) ? await Ye() : null;
|
|
21188
|
+
if (sn.current[W] !== H) {
|
|
21189
21189
|
xn(de);
|
|
21190
21190
|
return;
|
|
21191
21191
|
}
|
|
21192
21192
|
At((se) => {
|
|
21193
|
-
const we = se[
|
|
21194
|
-
return we && we !== de && setTimeout(() => xn(we), 1500), { ...se, [
|
|
21193
|
+
const we = se[W];
|
|
21194
|
+
return we && we !== de && setTimeout(() => xn(we), 1500), { ...se, [W]: de };
|
|
21195
21195
|
});
|
|
21196
21196
|
},
|
|
21197
21197
|
[S, Ye, w]
|
|
21198
21198
|
), Tt = he(async (O) => {
|
|
21199
21199
|
if (!u) return null;
|
|
21200
|
-
const
|
|
21201
|
-
return
|
|
21200
|
+
const W = O.file ?? (O.base64Str ? Cl(O.base64Str) : null);
|
|
21201
|
+
return W ? (await u({ file: W, purpose: "design-data" })).url : null;
|
|
21202
21202
|
}, [u]), lt = he(async (O) => {
|
|
21203
21203
|
if (!u) return null;
|
|
21204
|
-
const
|
|
21205
|
-
if (!
|
|
21204
|
+
const W = O.file ?? (O.base64Str ? Cl(O.base64Str) : null);
|
|
21205
|
+
if (!W) return null;
|
|
21206
21206
|
const H = await u({
|
|
21207
|
-
file:
|
|
21207
|
+
file: W,
|
|
21208
21208
|
purpose: "asset",
|
|
21209
21209
|
metadata: {
|
|
21210
|
-
name:
|
|
21211
|
-
size:
|
|
21210
|
+
name: W.name,
|
|
21211
|
+
size: W.size,
|
|
21212
21212
|
width: O.size.width,
|
|
21213
21213
|
height: O.size.height,
|
|
21214
|
-
mimeType:
|
|
21214
|
+
mimeType: W.type
|
|
21215
21215
|
}
|
|
21216
21216
|
});
|
|
21217
21217
|
return {
|
|
@@ -21224,11 +21224,11 @@ const vx = ({ semiDesignPermission: e = !1, basePlate: t }) => {
|
|
|
21224
21224
|
}, [u]), St = he(() => {
|
|
21225
21225
|
const O = M.current?.getRenderedObjects() || {};
|
|
21226
21226
|
w[S] && (O.color = w[S]);
|
|
21227
|
-
const
|
|
21227
|
+
const W = {};
|
|
21228
21228
|
return Object.keys($e).forEach((H) => {
|
|
21229
|
-
|
|
21230
|
-
}),
|
|
21231
|
-
}, [M, S, w]), En = async (O,
|
|
21229
|
+
W[H] = $e[H].state;
|
|
21230
|
+
}), W[S] = O, W;
|
|
21231
|
+
}, [M, S, w]), En = async (O, W, H) => {
|
|
21232
21232
|
D9.previewDesign(i, g.id);
|
|
21233
21233
|
const X = St(), de = g.areas.some(
|
|
21234
21234
|
(se) => !X[se.name] || !X[se.name].objects?.length && !X[se.name].object
|
|
@@ -21272,7 +21272,7 @@ const vx = ({ semiDesignPermission: e = !1, basePlate: t }) => {
|
|
|
21272
21272
|
renderList: H,
|
|
21273
21273
|
product: v,
|
|
21274
21274
|
designData: JSON.parse(JSON.stringify(X)),
|
|
21275
|
-
index:
|
|
21275
|
+
index: W,
|
|
21276
21276
|
hasEmptyView: de,
|
|
21277
21277
|
onOssUpload: Tt,
|
|
21278
21278
|
runtime: a
|
|
@@ -21280,16 +21280,16 @@ const vx = ({ semiDesignPermission: e = !1, basePlate: t }) => {
|
|
|
21280
21280
|
}
|
|
21281
21281
|
}, ft = g1(), _t = he(
|
|
21282
21282
|
(O) => {
|
|
21283
|
-
const
|
|
21283
|
+
const W = /* @__PURE__ */ new Set();
|
|
21284
21284
|
let H = O;
|
|
21285
21285
|
H || (H = St()), Object.keys(H).forEach((X) => {
|
|
21286
21286
|
const de = H[X];
|
|
21287
21287
|
de.objects && de.objects.forEach((se) => {
|
|
21288
|
-
se.type === "image" && se.src && (se.src.startsWith("blob:") &&
|
|
21288
|
+
se.type === "image" && se.src && (se.src.startsWith("blob:") && W.add(se.src), O && (se.src = se.originSrc));
|
|
21289
21289
|
});
|
|
21290
21290
|
}), Object.keys(st).forEach((X) => {
|
|
21291
|
-
st[X] &&
|
|
21292
|
-
}),
|
|
21291
|
+
st[X] && W.add(st[X]);
|
|
21292
|
+
}), W.forEach((X) => {
|
|
21293
21293
|
typeof X == "string" && X.startsWith("blob:") ? URL.revokeObjectURL(X) : X instanceof ImageBitmap && X.close();
|
|
21294
21294
|
});
|
|
21295
21295
|
},
|
|
@@ -21300,13 +21300,13 @@ const vx = ({ semiDesignPermission: e = !1, basePlate: t }) => {
|
|
|
21300
21300
|
Sn(), B(!M.current?.canvas._objects.length);
|
|
21301
21301
|
};
|
|
21302
21302
|
ue.on("design:objectChange", O);
|
|
21303
|
-
const
|
|
21303
|
+
const W = (X) => {
|
|
21304
21304
|
ve(X), ae(X);
|
|
21305
21305
|
}, H = () => {
|
|
21306
21306
|
B(!1);
|
|
21307
21307
|
};
|
|
21308
|
-
return ue.on("design:objectLoading", H), ue.on("design:changeScale",
|
|
21309
|
-
ue.off("design:objectChange", O), ue.off("design:changeScale",
|
|
21308
|
+
return ue.on("design:objectLoading", H), ue.on("design:changeScale", W), () => {
|
|
21309
|
+
ue.off("design:objectChange", O), ue.off("design:changeScale", W), ue.off("design:objectLoading", H);
|
|
21310
21310
|
};
|
|
21311
21311
|
}, [Sn, M.current]), Z(() => {
|
|
21312
21312
|
if (x.current) {
|
|
@@ -21316,10 +21316,10 @@ const vx = ({ semiDesignPermission: e = !1, basePlate: t }) => {
|
|
|
21316
21316
|
Sn();
|
|
21317
21317
|
}, [w]), Z(() => {
|
|
21318
21318
|
const O = async () => {
|
|
21319
|
-
const
|
|
21319
|
+
const W = M.current?.getRenderedObjects();
|
|
21320
21320
|
(Object.values($e).some(
|
|
21321
21321
|
({ state: X }) => Lo(X, X?.color)
|
|
21322
|
-
) || Lo(
|
|
21322
|
+
) || Lo(W, w[S])) && !await fa({
|
|
21323
21323
|
title: n("Close and go back?"),
|
|
21324
21324
|
description: n("This will close the editor and go back to the previous page. You can restore any unsaved changes the next time you return.")
|
|
21325
21325
|
}) || (sessionStorage.removeItem("designData"), _t(), r.current = !1, m(), ft());
|
|
@@ -21329,8 +21329,8 @@ const vx = ({ semiDesignPermission: e = !1, basePlate: t }) => {
|
|
|
21329
21329
|
};
|
|
21330
21330
|
}, [M.current, ft, S, m, w]);
|
|
21331
21331
|
const Un = (O) => {
|
|
21332
|
-
const
|
|
21333
|
-
ue.emit(
|
|
21332
|
+
const W = gt ? "design:elementMenuShow" : "design:menuContent";
|
|
21333
|
+
ue.emit(W, { type: "images", extraData: O });
|
|
21334
21334
|
}, { handleDrop: kn, handleDragLeave: Wn, handleDragOver: xr, isDragOver: Gn } = bf({
|
|
21335
21335
|
onFileSelect: (O) => {
|
|
21336
21336
|
u && Un({ image: O });
|
|
@@ -21345,7 +21345,7 @@ const vx = ({ semiDesignPermission: e = !1, basePlate: t }) => {
|
|
|
21345
21345
|
productData: v,
|
|
21346
21346
|
plateData: g,
|
|
21347
21347
|
canvasEditor: M,
|
|
21348
|
-
eventManager:
|
|
21348
|
+
eventManager: G,
|
|
21349
21349
|
currentViewName: S,
|
|
21350
21350
|
viewColors: w,
|
|
21351
21351
|
setViewColors: y,
|
|
@@ -21373,7 +21373,7 @@ const vx = ({ semiDesignPermission: e = !1, basePlate: t }) => {
|
|
|
21373
21373
|
onDragLeave: u ? Wn : void 0,
|
|
21374
21374
|
onDrop: u ? kn : void 0,
|
|
21375
21375
|
children: [
|
|
21376
|
-
/* @__PURE__ */ l(R9, { canvasIsEmpty: Q, children: /* @__PURE__ */ D("div", { className: "relative w-full canvas-box h-[calc(100%-
|
|
21376
|
+
/* @__PURE__ */ l(R9, { canvasIsEmpty: Q, children: /* @__PURE__ */ D("div", { className: "relative w-full canvas-box h-[calc(100%-204px)] sm:h-[calc(100%-152px)]", children: [
|
|
21377
21377
|
/* @__PURE__ */ l("canvas", { ref: U }),
|
|
21378
21378
|
_ && /* @__PURE__ */ l(ar, { opacity: !0, className: "rounded" }),
|
|
21379
21379
|
Q && u && /* @__PURE__ */ D(
|
|
@@ -21412,11 +21412,17 @@ const vx = ({ semiDesignPermission: e = !1, basePlate: t }) => {
|
|
|
21412
21412
|
activeKey: S,
|
|
21413
21413
|
onChange: (O) => it(O),
|
|
21414
21414
|
dataKey: "name",
|
|
21415
|
-
className: "hidden-scrollbar mt-
|
|
21415
|
+
className: "hidden-scrollbar mt-8 md:mt-0 px-3 md:px-0 space-x-3 text-center",
|
|
21416
21416
|
dataLabel: "name",
|
|
21417
|
-
renderLabel: (O) =>
|
|
21417
|
+
renderLabel: (O) => {
|
|
21418
|
+
const W = O.display_name || O.name;
|
|
21419
|
+
return /* @__PURE__ */ D("span", { className: "flex flex-col items-center gap-1", children: [
|
|
21420
|
+
/* @__PURE__ */ l("span", { className: "flex size-10 items-center justify-center overflow-hidden rounded bg-white", children: O.image ? /* @__PURE__ */ l(Be, { src: O.image, alt: "", width: 60, height: 60, className: "size-full object-contain" }) : null }),
|
|
21421
|
+
/* @__PURE__ */ l("span", { className: "text-xs leading-tight", children: W })
|
|
21422
|
+
] });
|
|
21423
|
+
},
|
|
21418
21424
|
activeClass: "!bg-printine-foreground text-white",
|
|
21419
|
-
labelClass: "px-
|
|
21425
|
+
labelClass: "inline-flex flex-col items-center px-2 py-1.5 min-w-16 relative text-center bg-white rounded-printine-md",
|
|
21420
21426
|
datas: g?.areas ?? []
|
|
21421
21427
|
}
|
|
21422
21428
|
),
|