@hot-updater/console 0.28.0 → 0.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/.output/nitro.json +17 -0
  2. package/.output/public/apple-touch-icon.png +0 -0
  3. package/.output/public/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
  4. package/.output/public/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
  5. package/.output/public/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
  6. package/.output/public/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
  7. package/.output/public/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
  8. package/.output/public/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
  9. package/.output/public/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
  10. package/.output/public/assets/main-Dlx8-qN-.js +61 -0
  11. package/.output/public/assets/routes-DB0tWmiJ.js +10 -0
  12. package/.output/public/assets/styles-Bfxg4M1x.css +2 -0
  13. package/.output/public/favicon-16x16.png +0 -0
  14. package/.output/public/favicon-32x32.png +0 -0
  15. package/.output/public/favicon.ico +0 -0
  16. package/.output/public/logo.svg +1 -0
  17. package/.output/public/manifest.json +30 -0
  18. package/.output/public/robots.txt +3 -0
  19. package/.output/server/_chunks/ssr-renderer.mjs +15 -0
  20. package/.output/server/_libs/@floating-ui/core+[...].mjs +698 -0
  21. package/.output/server/_libs/@floating-ui/dom+[...].mjs +644 -0
  22. package/.output/server/_libs/@floating-ui/react-dom+[...].mjs +839 -0
  23. package/.output/server/_libs/@radix-ui/react-alert-dialog+[...].mjs +2093 -0
  24. package/.output/server/_libs/@radix-ui/react-popper+[...].mjs +287 -0
  25. package/.output/server/_libs/@radix-ui/react-select+[...].mjs +1003 -0
  26. package/.output/server/_libs/@tanstack/devtools-event-client+[...].mjs +196 -0
  27. package/.output/server/_libs/@tanstack/form-core+[...].mjs +2396 -0
  28. package/.output/server/_libs/@tanstack/react-form+[...].mjs +298 -0
  29. package/.output/server/_libs/@tanstack/react-router+[...].mjs +13068 -0
  30. package/.output/server/_libs/@tanstack/react-table+[...].mjs +2372 -0
  31. package/.output/server/_libs/chownr.mjs +60 -0
  32. package/.output/server/_libs/class-variance-authority+clsx.mjs +69 -0
  33. package/.output/server/_libs/core-util-is.mjs +67 -0
  34. package/.output/server/_libs/dayjs.mjs +408 -0
  35. package/.output/server/_libs/h3+rou3+srvx.mjs +1158 -0
  36. package/.output/server/_libs/hookable.mjs +41 -0
  37. package/.output/server/_libs/immediate.mjs +57 -0
  38. package/.output/server/_libs/inherits.mjs +39 -0
  39. package/.output/server/_libs/isaacs__fs-minipass+minipass.mjs +1120 -0
  40. package/.output/server/_libs/isarray.mjs +10 -0
  41. package/.output/server/_libs/jszip+[...].mjs +8311 -0
  42. package/.output/server/_libs/lucide-react.mjs +371 -0
  43. package/.output/server/_libs/minizlib.mjs +345 -0
  44. package/.output/server/_libs/next-themes.mjs +49 -0
  45. package/.output/server/_libs/radix-ui__number.mjs +6 -0
  46. package/.output/server/_libs/radix-ui__primitive.mjs +9 -0
  47. package/.output/server/_libs/radix-ui__react-arrow.mjs +23 -0
  48. package/.output/server/_libs/radix-ui__react-collection.mjs +78 -0
  49. package/.output/server/_libs/radix-ui__react-direction.mjs +11 -0
  50. package/.output/server/_libs/radix-ui__react-label.mjs +22 -0
  51. package/.output/server/_libs/radix-ui__react-separator.mjs +31 -0
  52. package/.output/server/_libs/radix-ui__react-slider.mjs +451 -0
  53. package/.output/server/_libs/radix-ui__react-switch.mjs +118 -0
  54. package/.output/server/_libs/radix-ui__react-tooltip.mjs +491 -0
  55. package/.output/server/_libs/semver.mjs +1339 -0
  56. package/.output/server/_libs/sonner.mjs +908 -0
  57. package/.output/server/_libs/tailwind-merge.mjs +1962 -0
  58. package/.output/server/_libs/tanstack__history.mjs +322 -0
  59. package/.output/server/_libs/tanstack__query-core.mjs +2073 -0
  60. package/.output/server/_libs/tanstack__react-query.mjs +146 -0
  61. package/.output/server/_libs/tanstack__router-core.mjs +6 -0
  62. package/.output/server/_libs/tar.mjs +1996 -0
  63. package/.output/server/_libs/ufo.mjs +64 -0
  64. package/.output/server/_runtime.mjs +26 -0
  65. package/.output/server/_ssr/api-rpc-D3ZehMIN.mjs +217 -0
  66. package/.output/server/_ssr/config.server-JUYQ7UbI.mjs +26 -0
  67. package/.output/server/_ssr/deleteBundle-DWUxu9-K.mjs +22 -0
  68. package/.output/server/_ssr/extract-timestamp-from-uuidv7-B90UBADU.mjs +24 -0
  69. package/.output/server/_ssr/promoteBundle-DtMHuubR.mjs +1571 -0
  70. package/.output/server/_ssr/router-pgc7NX76.mjs +250 -0
  71. package/.output/server/_ssr/routes-PqTTQSoI.mjs +1833 -0
  72. package/.output/server/_ssr/sidebar-DXng0IOP.mjs +439 -0
  73. package/.output/server/_ssr/ssr.mjs +5050 -0
  74. package/.output/server/_ssr/start-DQK0r85G.mjs +4 -0
  75. package/.output/server/_tanstack-start-manifest_v-DTbQVOpU.mjs +17 -0
  76. package/.output/server/index.mjs +417 -0
  77. package/.output/server/node_modules/tslib/modules/index.js +70 -0
  78. package/.output/server/node_modules/tslib/modules/package.json +3 -0
  79. package/.output/server/node_modules/tslib/package.json +47 -0
  80. package/.output/server/node_modules/tslib/tslib.js +484 -0
  81. package/.output/server/package.json +9 -0
  82. package/README.md +191 -2
  83. package/package.json +77 -50
  84. package/dist/.gitkeep +0 -0
  85. package/dist/assets/favicon-BkwcEHsj.ico +0 -0
  86. package/dist/assets/index-DUlKsori.css +0 -1
  87. package/dist/assets/index-ijmIcyn1.js +0 -27
  88. package/dist/assets/logo-BYNFyja1.png +0 -0
  89. package/dist/index.cjs +0 -2129
  90. package/dist/index.d.cts +0 -218
  91. package/dist/index.d.ts +0 -218
  92. package/dist/index.html +0 -14
  93. package/dist/index.js +0 -2125
@@ -0,0 +1,2093 @@
1
+ import { r as __toESM, t as __commonJSMin } from "../../_runtime.mjs";
2
+ import { l as require_react_dom, u as require_react } from "../@floating-ui/react-dom+[...].mjs";
3
+ import { t as composeEventHandlers } from "../radix-ui__primitive.mjs";
4
+ import { __assign, __rest, __spreadArray } from "tslib";
5
+ //#region ../../node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react-jsx-runtime.production.js
6
+ /**
7
+ * @license React
8
+ * react-jsx-runtime.production.js
9
+ *
10
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
11
+ *
12
+ * This source code is licensed under the MIT license found in the
13
+ * LICENSE file in the root directory of this source tree.
14
+ */
15
+ var require_react_jsx_runtime_production = /* @__PURE__ */ __commonJSMin(((exports) => {
16
+ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
17
+ function jsxProd(type, config, maybeKey) {
18
+ var key = null;
19
+ void 0 !== maybeKey && (key = "" + maybeKey);
20
+ void 0 !== config.key && (key = "" + config.key);
21
+ if ("key" in config) {
22
+ maybeKey = {};
23
+ for (var propName in config) "key" !== propName && (maybeKey[propName] = config[propName]);
24
+ } else maybeKey = config;
25
+ config = maybeKey.ref;
26
+ return {
27
+ $$typeof: REACT_ELEMENT_TYPE,
28
+ type,
29
+ key,
30
+ ref: void 0 !== config ? config : null,
31
+ props: maybeKey
32
+ };
33
+ }
34
+ exports.Fragment = REACT_FRAGMENT_TYPE;
35
+ exports.jsx = jsxProd;
36
+ exports.jsxs = jsxProd;
37
+ }));
38
+ //#endregion
39
+ //#region ../../node_modules/.pnpm/react@19.2.4/node_modules/react/jsx-runtime.js
40
+ var require_jsx_runtime = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41
+ module.exports = require_react_jsx_runtime_production();
42
+ }));
43
+ //#endregion
44
+ //#region ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.2.14_react@19.2.4/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
45
+ var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
46
+ function setRef(ref, value) {
47
+ if (typeof ref === "function") return ref(value);
48
+ else if (ref !== null && ref !== void 0) ref.current = value;
49
+ }
50
+ function composeRefs(...refs) {
51
+ return (node) => {
52
+ let hasCleanup = false;
53
+ const cleanups = refs.map((ref) => {
54
+ const cleanup = setRef(ref, node);
55
+ if (!hasCleanup && typeof cleanup == "function") hasCleanup = true;
56
+ return cleanup;
57
+ });
58
+ if (hasCleanup) return () => {
59
+ for (let i = 0; i < cleanups.length; i++) {
60
+ const cleanup = cleanups[i];
61
+ if (typeof cleanup == "function") cleanup();
62
+ else setRef(refs[i], null);
63
+ }
64
+ };
65
+ };
66
+ }
67
+ function useComposedRefs(...refs) {
68
+ return import_react.useCallback(composeRefs(...refs), refs);
69
+ }
70
+ //#endregion
71
+ //#region ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.2.14_react@19.2.4/node_modules/@radix-ui/react-slot/dist/index.mjs
72
+ var import_jsx_runtime = require_jsx_runtime();
73
+ /* @__NO_SIDE_EFFECTS__ */
74
+ function createSlot(ownerName) {
75
+ const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
76
+ const Slot2 = import_react.forwardRef((props, forwardedRef) => {
77
+ const { children, ...slotProps } = props;
78
+ const childrenArray = import_react.Children.toArray(children);
79
+ const slottable = childrenArray.find(isSlottable);
80
+ if (slottable) {
81
+ const newElement = slottable.props.children;
82
+ const newChildren = childrenArray.map((child) => {
83
+ if (child === slottable) {
84
+ if (import_react.Children.count(newElement) > 1) return import_react.Children.only(null);
85
+ return import_react.isValidElement(newElement) ? newElement.props.children : null;
86
+ } else return child;
87
+ });
88
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SlotClone, {
89
+ ...slotProps,
90
+ ref: forwardedRef,
91
+ children: import_react.isValidElement(newElement) ? import_react.cloneElement(newElement, void 0, newChildren) : null
92
+ });
93
+ }
94
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SlotClone, {
95
+ ...slotProps,
96
+ ref: forwardedRef,
97
+ children
98
+ });
99
+ });
100
+ Slot2.displayName = `${ownerName}.Slot`;
101
+ return Slot2;
102
+ }
103
+ var Slot$1 = /* @__PURE__ */ createSlot("Slot");
104
+ /* @__NO_SIDE_EFFECTS__ */
105
+ function createSlotClone(ownerName) {
106
+ const SlotClone = import_react.forwardRef((props, forwardedRef) => {
107
+ const { children, ...slotProps } = props;
108
+ if (import_react.isValidElement(children)) {
109
+ const childrenRef = getElementRef$1(children);
110
+ const props2 = mergeProps(slotProps, children.props);
111
+ if (children.type !== import_react.Fragment) props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
112
+ return import_react.cloneElement(children, props2);
113
+ }
114
+ return import_react.Children.count(children) > 1 ? import_react.Children.only(null) : null;
115
+ });
116
+ SlotClone.displayName = `${ownerName}.SlotClone`;
117
+ return SlotClone;
118
+ }
119
+ var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
120
+ /* @__NO_SIDE_EFFECTS__ */
121
+ function createSlottable(ownerName) {
122
+ const Slottable2 = ({ children }) => {
123
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
124
+ };
125
+ Slottable2.displayName = `${ownerName}.Slottable`;
126
+ Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
127
+ return Slottable2;
128
+ }
129
+ function isSlottable(child) {
130
+ return import_react.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
131
+ }
132
+ function mergeProps(slotProps, childProps) {
133
+ const overrideProps = { ...childProps };
134
+ for (const propName in childProps) {
135
+ const slotPropValue = slotProps[propName];
136
+ const childPropValue = childProps[propName];
137
+ if (/^on[A-Z]/.test(propName)) {
138
+ if (slotPropValue && childPropValue) overrideProps[propName] = (...args) => {
139
+ const result = childPropValue(...args);
140
+ slotPropValue(...args);
141
+ return result;
142
+ };
143
+ else if (slotPropValue) overrideProps[propName] = slotPropValue;
144
+ } else if (propName === "style") overrideProps[propName] = {
145
+ ...slotPropValue,
146
+ ...childPropValue
147
+ };
148
+ else if (propName === "className") overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
149
+ }
150
+ return {
151
+ ...slotProps,
152
+ ...overrideProps
153
+ };
154
+ }
155
+ function getElementRef$1(element) {
156
+ let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
157
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
158
+ if (mayWarn) return element.ref;
159
+ getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
160
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
161
+ if (mayWarn) return element.props.ref;
162
+ return element.props.ref || element.ref;
163
+ }
164
+ //#endregion
165
+ //#region ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.2.3_@types+react@19.2.14__@types+re_1181ea5061ec9212248424669240e4ec/node_modules/@radix-ui/react-primitive/dist/index.mjs
166
+ var import_react_dom = /* @__PURE__ */ __toESM(require_react_dom(), 1);
167
+ var Primitive = [
168
+ "a",
169
+ "button",
170
+ "div",
171
+ "form",
172
+ "h2",
173
+ "h3",
174
+ "img",
175
+ "input",
176
+ "label",
177
+ "li",
178
+ "nav",
179
+ "ol",
180
+ "p",
181
+ "select",
182
+ "span",
183
+ "svg",
184
+ "ul"
185
+ ].reduce((primitive, node) => {
186
+ const Slot = /* @__PURE__ */ createSlot(`Primitive.${node}`);
187
+ const Node = import_react.forwardRef((props, forwardedRef) => {
188
+ const { asChild, ...primitiveProps } = props;
189
+ const Comp = asChild ? Slot : node;
190
+ if (typeof window !== "undefined") window[Symbol.for("radix-ui")] = true;
191
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp, {
192
+ ...primitiveProps,
193
+ ref: forwardedRef
194
+ });
195
+ });
196
+ Node.displayName = `Primitive.${node}`;
197
+ return {
198
+ ...primitive,
199
+ [node]: Node
200
+ };
201
+ }, {});
202
+ function dispatchDiscreteCustomEvent(target, event) {
203
+ if (target) import_react_dom.flushSync(() => target.dispatchEvent(event));
204
+ }
205
+ //#endregion
206
+ //#region ../../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.2.14_react@19.2.4/node_modules/@radix-ui/react-context/dist/index.mjs
207
+ function createContext2(rootComponentName, defaultContext) {
208
+ const Context = import_react.createContext(defaultContext);
209
+ const Provider = (props) => {
210
+ const { children, ...context } = props;
211
+ const value = import_react.useMemo(() => context, Object.values(context));
212
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, {
213
+ value,
214
+ children
215
+ });
216
+ };
217
+ Provider.displayName = rootComponentName + "Provider";
218
+ function useContext2(consumerName) {
219
+ const context = import_react.useContext(Context);
220
+ if (context) return context;
221
+ if (defaultContext !== void 0) return defaultContext;
222
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
223
+ }
224
+ return [Provider, useContext2];
225
+ }
226
+ function createContextScope(scopeName, createContextScopeDeps = []) {
227
+ let defaultContexts = [];
228
+ function createContext3(rootComponentName, defaultContext) {
229
+ const BaseContext = import_react.createContext(defaultContext);
230
+ const index = defaultContexts.length;
231
+ defaultContexts = [...defaultContexts, defaultContext];
232
+ const Provider = (props) => {
233
+ const { scope, children, ...context } = props;
234
+ const Context = scope?.[scopeName]?.[index] || BaseContext;
235
+ const value = import_react.useMemo(() => context, Object.values(context));
236
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, {
237
+ value,
238
+ children
239
+ });
240
+ };
241
+ Provider.displayName = rootComponentName + "Provider";
242
+ function useContext2(consumerName, scope) {
243
+ const Context = scope?.[scopeName]?.[index] || BaseContext;
244
+ const context = import_react.useContext(Context);
245
+ if (context) return context;
246
+ if (defaultContext !== void 0) return defaultContext;
247
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
248
+ }
249
+ return [Provider, useContext2];
250
+ }
251
+ const createScope = () => {
252
+ const scopeContexts = defaultContexts.map((defaultContext) => {
253
+ return import_react.createContext(defaultContext);
254
+ });
255
+ return function useScope(scope) {
256
+ const contexts = scope?.[scopeName] || scopeContexts;
257
+ return import_react.useMemo(() => ({ [`__scope${scopeName}`]: {
258
+ ...scope,
259
+ [scopeName]: contexts
260
+ } }), [scope, contexts]);
261
+ };
262
+ };
263
+ createScope.scopeName = scopeName;
264
+ return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
265
+ }
266
+ function composeContextScopes(...scopes) {
267
+ const baseScope = scopes[0];
268
+ if (scopes.length === 1) return baseScope;
269
+ const createScope = () => {
270
+ const scopeHooks = scopes.map((createScope2) => ({
271
+ useScope: createScope2(),
272
+ scopeName: createScope2.scopeName
273
+ }));
274
+ return function useComposedScopes(overrideScopes) {
275
+ const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
276
+ const currentScope = useScope(overrideScopes)[`__scope${scopeName}`];
277
+ return {
278
+ ...nextScopes2,
279
+ ...currentScope
280
+ };
281
+ }, {});
282
+ return import_react.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
283
+ };
284
+ };
285
+ createScope.scopeName = baseScope.scopeName;
286
+ return createScope;
287
+ }
288
+ //#endregion
289
+ //#region ../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.2.14_react@19.2.4/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
290
+ var useLayoutEffect2 = globalThis?.document ? import_react.useLayoutEffect : () => {};
291
+ //#endregion
292
+ //#region ../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.2.14_react@19.2.4/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
293
+ var useInsertionEffect = import_react[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
294
+ function useControllableState({ prop, defaultProp, onChange = () => {}, caller }) {
295
+ const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
296
+ defaultProp,
297
+ onChange
298
+ });
299
+ const isControlled = prop !== void 0;
300
+ const value = isControlled ? prop : uncontrolledProp;
301
+ {
302
+ const isControlledRef = import_react.useRef(prop !== void 0);
303
+ import_react.useEffect(() => {
304
+ const wasControlled = isControlledRef.current;
305
+ if (wasControlled !== isControlled) {
306
+ const from = wasControlled ? "controlled" : "uncontrolled";
307
+ const to = isControlled ? "controlled" : "uncontrolled";
308
+ console.warn(`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`);
309
+ }
310
+ isControlledRef.current = isControlled;
311
+ }, [isControlled, caller]);
312
+ }
313
+ return [value, import_react.useCallback((nextValue) => {
314
+ if (isControlled) {
315
+ const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
316
+ if (value2 !== prop) onChangeRef.current?.(value2);
317
+ } else setUncontrolledProp(nextValue);
318
+ }, [
319
+ isControlled,
320
+ prop,
321
+ setUncontrolledProp,
322
+ onChangeRef
323
+ ])];
324
+ }
325
+ function useUncontrolledState({ defaultProp, onChange }) {
326
+ const [value, setValue] = import_react.useState(defaultProp);
327
+ const prevValueRef = import_react.useRef(value);
328
+ const onChangeRef = import_react.useRef(onChange);
329
+ useInsertionEffect(() => {
330
+ onChangeRef.current = onChange;
331
+ }, [onChange]);
332
+ import_react.useEffect(() => {
333
+ if (prevValueRef.current !== value) {
334
+ onChangeRef.current?.(value);
335
+ prevValueRef.current = value;
336
+ }
337
+ }, [value, prevValueRef]);
338
+ return [
339
+ value,
340
+ setValue,
341
+ onChangeRef
342
+ ];
343
+ }
344
+ function isFunction(value) {
345
+ return typeof value === "function";
346
+ }
347
+ //#endregion
348
+ //#region ../../node_modules/.pnpm/@radix-ui+react-presence@1.1.5_@types+react-dom@19.2.3_@types+react@19.2.14__@types+rea_c01c26c80b5ab5e3ecefbda6eca51ad1/node_modules/@radix-ui/react-presence/dist/index.mjs
349
+ function useStateMachine(initialState, machine) {
350
+ return import_react.useReducer((state, event) => {
351
+ return machine[state][event] ?? state;
352
+ }, initialState);
353
+ }
354
+ var Presence = (props) => {
355
+ const { present, children } = props;
356
+ const presence = usePresence(present);
357
+ const child = typeof children === "function" ? children({ present: presence.isPresent }) : import_react.Children.only(children);
358
+ const ref = useComposedRefs(presence.ref, getElementRef(child));
359
+ return typeof children === "function" || presence.isPresent ? import_react.cloneElement(child, { ref }) : null;
360
+ };
361
+ Presence.displayName = "Presence";
362
+ function usePresence(present) {
363
+ const [node, setNode] = import_react.useState();
364
+ const stylesRef = import_react.useRef(null);
365
+ const prevPresentRef = import_react.useRef(present);
366
+ const prevAnimationNameRef = import_react.useRef("none");
367
+ const [state, send] = useStateMachine(present ? "mounted" : "unmounted", {
368
+ mounted: {
369
+ UNMOUNT: "unmounted",
370
+ ANIMATION_OUT: "unmountSuspended"
371
+ },
372
+ unmountSuspended: {
373
+ MOUNT: "mounted",
374
+ ANIMATION_END: "unmounted"
375
+ },
376
+ unmounted: { MOUNT: "mounted" }
377
+ });
378
+ import_react.useEffect(() => {
379
+ const currentAnimationName = getAnimationName(stylesRef.current);
380
+ prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
381
+ }, [state]);
382
+ useLayoutEffect2(() => {
383
+ const styles = stylesRef.current;
384
+ const wasPresent = prevPresentRef.current;
385
+ if (wasPresent !== present) {
386
+ const prevAnimationName = prevAnimationNameRef.current;
387
+ const currentAnimationName = getAnimationName(styles);
388
+ if (present) send("MOUNT");
389
+ else if (currentAnimationName === "none" || styles?.display === "none") send("UNMOUNT");
390
+ else if (wasPresent && prevAnimationName !== currentAnimationName) send("ANIMATION_OUT");
391
+ else send("UNMOUNT");
392
+ prevPresentRef.current = present;
393
+ }
394
+ }, [present, send]);
395
+ useLayoutEffect2(() => {
396
+ if (node) {
397
+ let timeoutId;
398
+ const ownerWindow = node.ownerDocument.defaultView ?? window;
399
+ const handleAnimationEnd = (event) => {
400
+ const isCurrentAnimation = getAnimationName(stylesRef.current).includes(CSS.escape(event.animationName));
401
+ if (event.target === node && isCurrentAnimation) {
402
+ send("ANIMATION_END");
403
+ if (!prevPresentRef.current) {
404
+ const currentFillMode = node.style.animationFillMode;
405
+ node.style.animationFillMode = "forwards";
406
+ timeoutId = ownerWindow.setTimeout(() => {
407
+ if (node.style.animationFillMode === "forwards") node.style.animationFillMode = currentFillMode;
408
+ });
409
+ }
410
+ }
411
+ };
412
+ const handleAnimationStart = (event) => {
413
+ if (event.target === node) prevAnimationNameRef.current = getAnimationName(stylesRef.current);
414
+ };
415
+ node.addEventListener("animationstart", handleAnimationStart);
416
+ node.addEventListener("animationcancel", handleAnimationEnd);
417
+ node.addEventListener("animationend", handleAnimationEnd);
418
+ return () => {
419
+ ownerWindow.clearTimeout(timeoutId);
420
+ node.removeEventListener("animationstart", handleAnimationStart);
421
+ node.removeEventListener("animationcancel", handleAnimationEnd);
422
+ node.removeEventListener("animationend", handleAnimationEnd);
423
+ };
424
+ } else send("ANIMATION_END");
425
+ }, [node, send]);
426
+ return {
427
+ isPresent: ["mounted", "unmountSuspended"].includes(state),
428
+ ref: import_react.useCallback((node2) => {
429
+ stylesRef.current = node2 ? getComputedStyle(node2) : null;
430
+ setNode(node2);
431
+ }, [])
432
+ };
433
+ }
434
+ function getAnimationName(styles) {
435
+ return styles?.animationName || "none";
436
+ }
437
+ function getElementRef(element) {
438
+ let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
439
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
440
+ if (mayWarn) return element.ref;
441
+ getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
442
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
443
+ if (mayWarn) return element.props.ref;
444
+ return element.props.ref || element.ref;
445
+ }
446
+ //#endregion
447
+ //#region ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.2.14_react@19.2.4/node_modules/@radix-ui/react-id/dist/index.mjs
448
+ var useReactId = import_react[" useId ".trim().toString()] || (() => void 0);
449
+ var count$1 = 0;
450
+ function useId(deterministicId) {
451
+ const [id, setId] = import_react.useState(useReactId());
452
+ useLayoutEffect2(() => {
453
+ if (!deterministicId) setId((reactId) => reactId ?? String(count$1++));
454
+ }, [deterministicId]);
455
+ return deterministicId || (id ? `radix-${id}` : "");
456
+ }
457
+ //#endregion
458
+ //#region ../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.2.14_react@19.2.4/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
459
+ function useCallbackRef$1(callback) {
460
+ const callbackRef = import_react.useRef(callback);
461
+ import_react.useEffect(() => {
462
+ callbackRef.current = callback;
463
+ });
464
+ return import_react.useMemo(() => (...args) => callbackRef.current?.(...args), []);
465
+ }
466
+ //#endregion
467
+ //#region ../../node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.2.14_react@19.2.4/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
468
+ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
469
+ const onEscapeKeyDown = useCallbackRef$1(onEscapeKeyDownProp);
470
+ import_react.useEffect(() => {
471
+ const handleKeyDown = (event) => {
472
+ if (event.key === "Escape") onEscapeKeyDown(event);
473
+ };
474
+ ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
475
+ return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true });
476
+ }, [onEscapeKeyDown, ownerDocument]);
477
+ }
478
+ //#endregion
479
+ //#region ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.2.3_@types+react@19.2.14___3d3960154a4c07d09bb90cb341135fc5/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
480
+ var DISMISSABLE_LAYER_NAME = "DismissableLayer";
481
+ var CONTEXT_UPDATE = "dismissableLayer.update";
482
+ var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
483
+ var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
484
+ var originalBodyPointerEvents;
485
+ var DismissableLayerContext = import_react.createContext({
486
+ layers: /* @__PURE__ */ new Set(),
487
+ layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
488
+ branches: /* @__PURE__ */ new Set()
489
+ });
490
+ var DismissableLayer = import_react.forwardRef((props, forwardedRef) => {
491
+ const { disableOutsidePointerEvents = false, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, onDismiss, ...layerProps } = props;
492
+ const context = import_react.useContext(DismissableLayerContext);
493
+ const [node, setNode] = import_react.useState(null);
494
+ const ownerDocument = node?.ownerDocument ?? globalThis?.document;
495
+ const [, force] = import_react.useState({});
496
+ const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
497
+ const layers = Array.from(context.layers);
498
+ const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
499
+ const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
500
+ const index = node ? layers.indexOf(node) : -1;
501
+ const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
502
+ const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
503
+ const pointerDownOutside = usePointerDownOutside((event) => {
504
+ const target = event.target;
505
+ const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
506
+ if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
507
+ onPointerDownOutside?.(event);
508
+ onInteractOutside?.(event);
509
+ if (!event.defaultPrevented) onDismiss?.();
510
+ }, ownerDocument);
511
+ const focusOutside = useFocusOutside((event) => {
512
+ const target = event.target;
513
+ if ([...context.branches].some((branch) => branch.contains(target))) return;
514
+ onFocusOutside?.(event);
515
+ onInteractOutside?.(event);
516
+ if (!event.defaultPrevented) onDismiss?.();
517
+ }, ownerDocument);
518
+ useEscapeKeydown((event) => {
519
+ if (!(index === context.layers.size - 1)) return;
520
+ onEscapeKeyDown?.(event);
521
+ if (!event.defaultPrevented && onDismiss) {
522
+ event.preventDefault();
523
+ onDismiss();
524
+ }
525
+ }, ownerDocument);
526
+ import_react.useEffect(() => {
527
+ if (!node) return;
528
+ if (disableOutsidePointerEvents) {
529
+ if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
530
+ originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
531
+ ownerDocument.body.style.pointerEvents = "none";
532
+ }
533
+ context.layersWithOutsidePointerEventsDisabled.add(node);
534
+ }
535
+ context.layers.add(node);
536
+ dispatchUpdate();
537
+ return () => {
538
+ if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
539
+ };
540
+ }, [
541
+ node,
542
+ ownerDocument,
543
+ disableOutsidePointerEvents,
544
+ context
545
+ ]);
546
+ import_react.useEffect(() => {
547
+ return () => {
548
+ if (!node) return;
549
+ context.layers.delete(node);
550
+ context.layersWithOutsidePointerEventsDisabled.delete(node);
551
+ dispatchUpdate();
552
+ };
553
+ }, [node, context]);
554
+ import_react.useEffect(() => {
555
+ const handleUpdate = () => force({});
556
+ document.addEventListener(CONTEXT_UPDATE, handleUpdate);
557
+ return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
558
+ }, []);
559
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Primitive.div, {
560
+ ...layerProps,
561
+ ref: composedRefs,
562
+ style: {
563
+ pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
564
+ ...props.style
565
+ },
566
+ onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
567
+ onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
568
+ onPointerDownCapture: composeEventHandlers(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
569
+ });
570
+ });
571
+ DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
572
+ var BRANCH_NAME = "DismissableLayerBranch";
573
+ var DismissableLayerBranch = import_react.forwardRef((props, forwardedRef) => {
574
+ const context = import_react.useContext(DismissableLayerContext);
575
+ const ref = import_react.useRef(null);
576
+ const composedRefs = useComposedRefs(forwardedRef, ref);
577
+ import_react.useEffect(() => {
578
+ const node = ref.current;
579
+ if (node) {
580
+ context.branches.add(node);
581
+ return () => {
582
+ context.branches.delete(node);
583
+ };
584
+ }
585
+ }, [context.branches]);
586
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Primitive.div, {
587
+ ...props,
588
+ ref: composedRefs
589
+ });
590
+ });
591
+ DismissableLayerBranch.displayName = BRANCH_NAME;
592
+ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
593
+ const handlePointerDownOutside = useCallbackRef$1(onPointerDownOutside);
594
+ const isPointerInsideReactTreeRef = import_react.useRef(false);
595
+ const handleClickRef = import_react.useRef(() => {});
596
+ import_react.useEffect(() => {
597
+ const handlePointerDown = (event) => {
598
+ if (event.target && !isPointerInsideReactTreeRef.current) {
599
+ let handleAndDispatchPointerDownOutsideEvent2 = function() {
600
+ handleAndDispatchCustomEvent(POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, { discrete: true });
601
+ };
602
+ const eventDetail = { originalEvent: event };
603
+ if (event.pointerType === "touch") {
604
+ ownerDocument.removeEventListener("click", handleClickRef.current);
605
+ handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
606
+ ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
607
+ } else handleAndDispatchPointerDownOutsideEvent2();
608
+ } else ownerDocument.removeEventListener("click", handleClickRef.current);
609
+ isPointerInsideReactTreeRef.current = false;
610
+ };
611
+ const timerId = window.setTimeout(() => {
612
+ ownerDocument.addEventListener("pointerdown", handlePointerDown);
613
+ }, 0);
614
+ return () => {
615
+ window.clearTimeout(timerId);
616
+ ownerDocument.removeEventListener("pointerdown", handlePointerDown);
617
+ ownerDocument.removeEventListener("click", handleClickRef.current);
618
+ };
619
+ }, [ownerDocument, handlePointerDownOutside]);
620
+ return { onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true };
621
+ }
622
+ function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
623
+ const handleFocusOutside = useCallbackRef$1(onFocusOutside);
624
+ const isFocusInsideReactTreeRef = import_react.useRef(false);
625
+ import_react.useEffect(() => {
626
+ const handleFocus = (event) => {
627
+ if (event.target && !isFocusInsideReactTreeRef.current) handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, { originalEvent: event }, { discrete: false });
628
+ };
629
+ ownerDocument.addEventListener("focusin", handleFocus);
630
+ return () => ownerDocument.removeEventListener("focusin", handleFocus);
631
+ }, [ownerDocument, handleFocusOutside]);
632
+ return {
633
+ onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
634
+ onBlurCapture: () => isFocusInsideReactTreeRef.current = false
635
+ };
636
+ }
637
+ function dispatchUpdate() {
638
+ const event = new CustomEvent(CONTEXT_UPDATE);
639
+ document.dispatchEvent(event);
640
+ }
641
+ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
642
+ const target = detail.originalEvent.target;
643
+ const event = new CustomEvent(name, {
644
+ bubbles: false,
645
+ cancelable: true,
646
+ detail
647
+ });
648
+ if (handler) target.addEventListener(name, handler, { once: true });
649
+ if (discrete) dispatchDiscreteCustomEvent(target, event);
650
+ else target.dispatchEvent(event);
651
+ }
652
+ //#endregion
653
+ //#region ../../node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.2.3_@types+react@19.2.14__@types+_f62f3af4ca2ba305a7aecf04c8534604/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
654
+ var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
655
+ var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
656
+ var EVENT_OPTIONS = {
657
+ bubbles: false,
658
+ cancelable: true
659
+ };
660
+ var FOCUS_SCOPE_NAME = "FocusScope";
661
+ var FocusScope = import_react.forwardRef((props, forwardedRef) => {
662
+ const { loop = false, trapped = false, onMountAutoFocus: onMountAutoFocusProp, onUnmountAutoFocus: onUnmountAutoFocusProp, ...scopeProps } = props;
663
+ const [container, setContainer] = import_react.useState(null);
664
+ const onMountAutoFocus = useCallbackRef$1(onMountAutoFocusProp);
665
+ const onUnmountAutoFocus = useCallbackRef$1(onUnmountAutoFocusProp);
666
+ const lastFocusedElementRef = import_react.useRef(null);
667
+ const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
668
+ const focusScope = import_react.useRef({
669
+ paused: false,
670
+ pause() {
671
+ this.paused = true;
672
+ },
673
+ resume() {
674
+ this.paused = false;
675
+ }
676
+ }).current;
677
+ import_react.useEffect(() => {
678
+ if (trapped) {
679
+ let handleFocusIn2 = function(event) {
680
+ if (focusScope.paused || !container) return;
681
+ const target = event.target;
682
+ if (container.contains(target)) lastFocusedElementRef.current = target;
683
+ else focus(lastFocusedElementRef.current, { select: true });
684
+ }, handleFocusOut2 = function(event) {
685
+ if (focusScope.paused || !container) return;
686
+ const relatedTarget = event.relatedTarget;
687
+ if (relatedTarget === null) return;
688
+ if (!container.contains(relatedTarget)) focus(lastFocusedElementRef.current, { select: true });
689
+ }, handleMutations2 = function(mutations) {
690
+ if (document.activeElement !== document.body) return;
691
+ for (const mutation of mutations) if (mutation.removedNodes.length > 0) focus(container);
692
+ };
693
+ document.addEventListener("focusin", handleFocusIn2);
694
+ document.addEventListener("focusout", handleFocusOut2);
695
+ const mutationObserver = new MutationObserver(handleMutations2);
696
+ if (container) mutationObserver.observe(container, {
697
+ childList: true,
698
+ subtree: true
699
+ });
700
+ return () => {
701
+ document.removeEventListener("focusin", handleFocusIn2);
702
+ document.removeEventListener("focusout", handleFocusOut2);
703
+ mutationObserver.disconnect();
704
+ };
705
+ }
706
+ }, [
707
+ trapped,
708
+ container,
709
+ focusScope.paused
710
+ ]);
711
+ import_react.useEffect(() => {
712
+ if (container) {
713
+ focusScopesStack.add(focusScope);
714
+ const previouslyFocusedElement = document.activeElement;
715
+ if (!container.contains(previouslyFocusedElement)) {
716
+ const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
717
+ container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
718
+ container.dispatchEvent(mountEvent);
719
+ if (!mountEvent.defaultPrevented) {
720
+ focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
721
+ if (document.activeElement === previouslyFocusedElement) focus(container);
722
+ }
723
+ }
724
+ return () => {
725
+ container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
726
+ setTimeout(() => {
727
+ const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
728
+ container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
729
+ container.dispatchEvent(unmountEvent);
730
+ if (!unmountEvent.defaultPrevented) focus(previouslyFocusedElement ?? document.body, { select: true });
731
+ container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
732
+ focusScopesStack.remove(focusScope);
733
+ }, 0);
734
+ };
735
+ }
736
+ }, [
737
+ container,
738
+ onMountAutoFocus,
739
+ onUnmountAutoFocus,
740
+ focusScope
741
+ ]);
742
+ const handleKeyDown = import_react.useCallback((event) => {
743
+ if (!loop && !trapped) return;
744
+ if (focusScope.paused) return;
745
+ const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
746
+ const focusedElement = document.activeElement;
747
+ if (isTabKey && focusedElement) {
748
+ const container2 = event.currentTarget;
749
+ const [first, last] = getTabbableEdges(container2);
750
+ if (!(first && last)) {
751
+ if (focusedElement === container2) event.preventDefault();
752
+ } else if (!event.shiftKey && focusedElement === last) {
753
+ event.preventDefault();
754
+ if (loop) focus(first, { select: true });
755
+ } else if (event.shiftKey && focusedElement === first) {
756
+ event.preventDefault();
757
+ if (loop) focus(last, { select: true });
758
+ }
759
+ }
760
+ }, [
761
+ loop,
762
+ trapped,
763
+ focusScope.paused
764
+ ]);
765
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Primitive.div, {
766
+ tabIndex: -1,
767
+ ...scopeProps,
768
+ ref: composedRefs,
769
+ onKeyDown: handleKeyDown
770
+ });
771
+ });
772
+ FocusScope.displayName = FOCUS_SCOPE_NAME;
773
+ function focusFirst(candidates, { select = false } = {}) {
774
+ const previouslyFocusedElement = document.activeElement;
775
+ for (const candidate of candidates) {
776
+ focus(candidate, { select });
777
+ if (document.activeElement !== previouslyFocusedElement) return;
778
+ }
779
+ }
780
+ function getTabbableEdges(container) {
781
+ const candidates = getTabbableCandidates(container);
782
+ return [findVisible(candidates, container), findVisible(candidates.reverse(), container)];
783
+ }
784
+ function getTabbableCandidates(container) {
785
+ const nodes = [];
786
+ const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, { acceptNode: (node) => {
787
+ const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
788
+ if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
789
+ return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
790
+ } });
791
+ while (walker.nextNode()) nodes.push(walker.currentNode);
792
+ return nodes;
793
+ }
794
+ function findVisible(elements, container) {
795
+ for (const element of elements) if (!isHidden(element, { upTo: container })) return element;
796
+ }
797
+ function isHidden(node, { upTo }) {
798
+ if (getComputedStyle(node).visibility === "hidden") return true;
799
+ while (node) {
800
+ if (upTo !== void 0 && node === upTo) return false;
801
+ if (getComputedStyle(node).display === "none") return true;
802
+ node = node.parentElement;
803
+ }
804
+ return false;
805
+ }
806
+ function isSelectableInput(element) {
807
+ return element instanceof HTMLInputElement && "select" in element;
808
+ }
809
+ function focus(element, { select = false } = {}) {
810
+ if (element && element.focus) {
811
+ const previouslyFocusedElement = document.activeElement;
812
+ element.focus({ preventScroll: true });
813
+ if (element !== previouslyFocusedElement && isSelectableInput(element) && select) element.select();
814
+ }
815
+ }
816
+ var focusScopesStack = createFocusScopesStack();
817
+ function createFocusScopesStack() {
818
+ let stack = [];
819
+ return {
820
+ add(focusScope) {
821
+ const activeFocusScope = stack[0];
822
+ if (focusScope !== activeFocusScope) activeFocusScope?.pause();
823
+ stack = arrayRemove(stack, focusScope);
824
+ stack.unshift(focusScope);
825
+ },
826
+ remove(focusScope) {
827
+ stack = arrayRemove(stack, focusScope);
828
+ stack[0]?.resume();
829
+ }
830
+ };
831
+ }
832
+ function arrayRemove(array, item) {
833
+ const updatedArray = [...array];
834
+ const index = updatedArray.indexOf(item);
835
+ if (index !== -1) updatedArray.splice(index, 1);
836
+ return updatedArray;
837
+ }
838
+ function removeLinks(items) {
839
+ return items.filter((item) => item.tagName !== "A");
840
+ }
841
+ //#endregion
842
+ //#region ../../node_modules/.pnpm/@radix-ui+react-portal@1.1.9_@types+react-dom@19.2.3_@types+react@19.2.14__@types+react_7668895bec2444446faa4e0f4eb5244b/node_modules/@radix-ui/react-portal/dist/index.mjs
843
+ var PORTAL_NAME$2 = "Portal";
844
+ var Portal$1 = import_react.forwardRef((props, forwardedRef) => {
845
+ const { container: containerProp, ...portalProps } = props;
846
+ const [mounted, setMounted] = import_react.useState(false);
847
+ useLayoutEffect2(() => setMounted(true), []);
848
+ const container = containerProp || mounted && globalThis?.document?.body;
849
+ return container ? import_react_dom.createPortal(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Primitive.div, {
850
+ ...portalProps,
851
+ ref: forwardedRef
852
+ }), container) : null;
853
+ });
854
+ Portal$1.displayName = PORTAL_NAME$2;
855
+ //#endregion
856
+ //#region ../../node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.2.14_react@19.2.4/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
857
+ var count = 0;
858
+ function useFocusGuards() {
859
+ import_react.useEffect(() => {
860
+ const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
861
+ document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
862
+ document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
863
+ count++;
864
+ return () => {
865
+ if (count === 1) document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
866
+ count--;
867
+ };
868
+ }, []);
869
+ }
870
+ function createFocusGuard() {
871
+ const element = document.createElement("span");
872
+ element.setAttribute("data-radix-focus-guard", "");
873
+ element.tabIndex = 0;
874
+ element.style.outline = "none";
875
+ element.style.opacity = "0";
876
+ element.style.position = "fixed";
877
+ element.style.pointerEvents = "none";
878
+ return element;
879
+ }
880
+ //#endregion
881
+ //#region ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.14_react@19.2.4/node_modules/react-remove-scroll-bar/dist/es2015/constants.js
882
+ var zeroRightClassName = "right-scroll-bar-position";
883
+ var fullWidthClassName = "width-before-scroll-bar";
884
+ var noScrollbarsClassName = "with-scroll-bars-hidden";
885
+ /**
886
+ * Name of a CSS variable containing the amount of "hidden" scrollbar
887
+ * ! might be undefined ! use will fallback!
888
+ */
889
+ var removedBarSizeVariable = "--removed-body-scroll-bar-size";
890
+ //#endregion
891
+ //#region ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.14_react@19.2.4/node_modules/use-callback-ref/dist/es2015/assignRef.js
892
+ /**
893
+ * Assigns a value for a given ref, no matter of the ref format
894
+ * @param {RefObject} ref - a callback function or ref object
895
+ * @param value - a new value
896
+ *
897
+ * @see https://github.com/theKashey/use-callback-ref#assignref
898
+ * @example
899
+ * const refObject = useRef();
900
+ * const refFn = (ref) => {....}
901
+ *
902
+ * assignRef(refObject, "refValue");
903
+ * assignRef(refFn, "refValue");
904
+ */
905
+ function assignRef(ref, value) {
906
+ if (typeof ref === "function") ref(value);
907
+ else if (ref) ref.current = value;
908
+ return ref;
909
+ }
910
+ //#endregion
911
+ //#region ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.14_react@19.2.4/node_modules/use-callback-ref/dist/es2015/useRef.js
912
+ /**
913
+ * creates a MutableRef with ref change callback
914
+ * @param initialValue - initial ref value
915
+ * @param {Function} callback - a callback to run when value changes
916
+ *
917
+ * @example
918
+ * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);
919
+ * ref.current = 1;
920
+ * // prints 0 -> 1
921
+ *
922
+ * @see https://reactjs.org/docs/hooks-reference.html#useref
923
+ * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref
924
+ * @returns {MutableRefObject}
925
+ */
926
+ function useCallbackRef(initialValue, callback) {
927
+ var ref = (0, import_react.useState)(function() {
928
+ return {
929
+ value: initialValue,
930
+ callback,
931
+ facade: {
932
+ get current() {
933
+ return ref.value;
934
+ },
935
+ set current(value) {
936
+ var last = ref.value;
937
+ if (last !== value) {
938
+ ref.value = value;
939
+ ref.callback(value, last);
940
+ }
941
+ }
942
+ }
943
+ };
944
+ })[0];
945
+ ref.callback = callback;
946
+ return ref.facade;
947
+ }
948
+ //#endregion
949
+ //#region ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.14_react@19.2.4/node_modules/use-callback-ref/dist/es2015/useMergeRef.js
950
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? import_react.useLayoutEffect : import_react.useEffect;
951
+ var currentValues = /* @__PURE__ */ new WeakMap();
952
+ /**
953
+ * Merges two or more refs together providing a single interface to set their value
954
+ * @param {RefObject|Ref} refs
955
+ * @returns {MutableRefObject} - a new ref, which translates all changes to {refs}
956
+ *
957
+ * @see {@link mergeRefs} a version without buit-in memoization
958
+ * @see https://github.com/theKashey/use-callback-ref#usemergerefs
959
+ * @example
960
+ * const Component = React.forwardRef((props, ref) => {
961
+ * const ownRef = useRef();
962
+ * const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together
963
+ * return <div ref={domRef}>...</div>
964
+ * }
965
+ */
966
+ function useMergeRefs(refs, defaultValue) {
967
+ var callbackRef = useCallbackRef(defaultValue || null, function(newValue) {
968
+ return refs.forEach(function(ref) {
969
+ return assignRef(ref, newValue);
970
+ });
971
+ });
972
+ useIsomorphicLayoutEffect(function() {
973
+ var oldValue = currentValues.get(callbackRef);
974
+ if (oldValue) {
975
+ var prevRefs_1 = new Set(oldValue);
976
+ var nextRefs_1 = new Set(refs);
977
+ var current_1 = callbackRef.current;
978
+ prevRefs_1.forEach(function(ref) {
979
+ if (!nextRefs_1.has(ref)) assignRef(ref, null);
980
+ });
981
+ nextRefs_1.forEach(function(ref) {
982
+ if (!prevRefs_1.has(ref)) assignRef(ref, current_1);
983
+ });
984
+ }
985
+ currentValues.set(callbackRef, refs);
986
+ }, [refs]);
987
+ return callbackRef;
988
+ }
989
+ //#endregion
990
+ //#region ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.14_react@19.2.4/node_modules/use-sidecar/dist/es2015/medium.js
991
+ function ItoI(a) {
992
+ return a;
993
+ }
994
+ function innerCreateMedium(defaults, middleware) {
995
+ if (middleware === void 0) middleware = ItoI;
996
+ var buffer = [];
997
+ var assigned = false;
998
+ return {
999
+ read: function() {
1000
+ if (assigned) throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
1001
+ if (buffer.length) return buffer[buffer.length - 1];
1002
+ return defaults;
1003
+ },
1004
+ useMedium: function(data) {
1005
+ var item = middleware(data, assigned);
1006
+ buffer.push(item);
1007
+ return function() {
1008
+ buffer = buffer.filter(function(x) {
1009
+ return x !== item;
1010
+ });
1011
+ };
1012
+ },
1013
+ assignSyncMedium: function(cb) {
1014
+ assigned = true;
1015
+ while (buffer.length) {
1016
+ var cbs = buffer;
1017
+ buffer = [];
1018
+ cbs.forEach(cb);
1019
+ }
1020
+ buffer = {
1021
+ push: function(x) {
1022
+ return cb(x);
1023
+ },
1024
+ filter: function() {
1025
+ return buffer;
1026
+ }
1027
+ };
1028
+ },
1029
+ assignMedium: function(cb) {
1030
+ assigned = true;
1031
+ var pendingQueue = [];
1032
+ if (buffer.length) {
1033
+ var cbs = buffer;
1034
+ buffer = [];
1035
+ cbs.forEach(cb);
1036
+ pendingQueue = buffer;
1037
+ }
1038
+ var executeQueue = function() {
1039
+ var cbs = pendingQueue;
1040
+ pendingQueue = [];
1041
+ cbs.forEach(cb);
1042
+ };
1043
+ var cycle = function() {
1044
+ return Promise.resolve().then(executeQueue);
1045
+ };
1046
+ cycle();
1047
+ buffer = {
1048
+ push: function(x) {
1049
+ pendingQueue.push(x);
1050
+ cycle();
1051
+ },
1052
+ filter: function(filter) {
1053
+ pendingQueue = pendingQueue.filter(filter);
1054
+ return buffer;
1055
+ }
1056
+ };
1057
+ }
1058
+ };
1059
+ }
1060
+ function createSidecarMedium(options) {
1061
+ if (options === void 0) options = {};
1062
+ var medium = innerCreateMedium(null);
1063
+ medium.options = __assign({
1064
+ async: true,
1065
+ ssr: false
1066
+ }, options);
1067
+ return medium;
1068
+ }
1069
+ //#endregion
1070
+ //#region ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.14_react@19.2.4/node_modules/use-sidecar/dist/es2015/exports.js
1071
+ var SideCar = function(_a) {
1072
+ var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
1073
+ if (!sideCar) throw new Error("Sidecar: please provide `sideCar` property to import the right car");
1074
+ var Target = sideCar.read();
1075
+ if (!Target) throw new Error("Sidecar medium not found");
1076
+ return import_react.createElement(Target, __assign({}, rest));
1077
+ };
1078
+ SideCar.isSideCarExport = true;
1079
+ function exportSidecar(medium, exported) {
1080
+ medium.useMedium(exported);
1081
+ return SideCar;
1082
+ }
1083
+ //#endregion
1084
+ //#region ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.2.14_react@19.2.4/node_modules/react-remove-scroll/dist/es2015/medium.js
1085
+ var effectCar = createSidecarMedium();
1086
+ //#endregion
1087
+ //#region ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.2.14_react@19.2.4/node_modules/react-remove-scroll/dist/es2015/UI.js
1088
+ var nothing = function() {};
1089
+ /**
1090
+ * Removes scrollbar from the page and contain the scroll within the Lock
1091
+ */
1092
+ var RemoveScroll = import_react.forwardRef(function(props, parentRef) {
1093
+ var ref = import_react.useRef(null);
1094
+ var _a = import_react.useState({
1095
+ onScrollCapture: nothing,
1096
+ onWheelCapture: nothing,
1097
+ onTouchMoveCapture: nothing
1098
+ }), callbacks = _a[0], setCallbacks = _a[1];
1099
+ var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = __rest(props, [
1100
+ "forwardProps",
1101
+ "children",
1102
+ "className",
1103
+ "removeScrollBar",
1104
+ "enabled",
1105
+ "shards",
1106
+ "sideCar",
1107
+ "noRelative",
1108
+ "noIsolation",
1109
+ "inert",
1110
+ "allowPinchZoom",
1111
+ "as",
1112
+ "gapMode"
1113
+ ]);
1114
+ var SideCar = sideCar;
1115
+ var containerRef = useMergeRefs([ref, parentRef]);
1116
+ var containerProps = __assign(__assign({}, rest), callbacks);
1117
+ return import_react.createElement(import_react.Fragment, null, enabled && import_react.createElement(SideCar, {
1118
+ sideCar: effectCar,
1119
+ removeScrollBar,
1120
+ shards,
1121
+ noRelative,
1122
+ noIsolation,
1123
+ inert,
1124
+ setCallbacks,
1125
+ allowPinchZoom: !!allowPinchZoom,
1126
+ lockRef: ref,
1127
+ gapMode
1128
+ }), forwardProps ? import_react.cloneElement(import_react.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : import_react.createElement(Container, __assign({}, containerProps, {
1129
+ className,
1130
+ ref: containerRef
1131
+ }), children));
1132
+ });
1133
+ RemoveScroll.defaultProps = {
1134
+ enabled: true,
1135
+ removeScrollBar: true,
1136
+ inert: false
1137
+ };
1138
+ RemoveScroll.classNames = {
1139
+ fullWidth: fullWidthClassName,
1140
+ zeroRight: zeroRightClassName
1141
+ };
1142
+ //#endregion
1143
+ //#region ../../node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js
1144
+ var currentNonce;
1145
+ var getNonce = function() {
1146
+ if (currentNonce) return currentNonce;
1147
+ if (typeof __webpack_nonce__ !== "undefined") return __webpack_nonce__;
1148
+ };
1149
+ //#endregion
1150
+ //#region ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.14_react@19.2.4/node_modules/react-style-singleton/dist/es2015/singleton.js
1151
+ function makeStyleTag() {
1152
+ if (!document) return null;
1153
+ var tag = document.createElement("style");
1154
+ tag.type = "text/css";
1155
+ var nonce = getNonce();
1156
+ if (nonce) tag.setAttribute("nonce", nonce);
1157
+ return tag;
1158
+ }
1159
+ function injectStyles(tag, css) {
1160
+ if (tag.styleSheet) tag.styleSheet.cssText = css;
1161
+ else tag.appendChild(document.createTextNode(css));
1162
+ }
1163
+ function insertStyleTag(tag) {
1164
+ (document.head || document.getElementsByTagName("head")[0]).appendChild(tag);
1165
+ }
1166
+ var stylesheetSingleton = function() {
1167
+ var counter = 0;
1168
+ var stylesheet = null;
1169
+ return {
1170
+ add: function(style) {
1171
+ if (counter == 0) {
1172
+ if (stylesheet = makeStyleTag()) {
1173
+ injectStyles(stylesheet, style);
1174
+ insertStyleTag(stylesheet);
1175
+ }
1176
+ }
1177
+ counter++;
1178
+ },
1179
+ remove: function() {
1180
+ counter--;
1181
+ if (!counter && stylesheet) {
1182
+ stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);
1183
+ stylesheet = null;
1184
+ }
1185
+ }
1186
+ };
1187
+ };
1188
+ //#endregion
1189
+ //#region ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.14_react@19.2.4/node_modules/react-style-singleton/dist/es2015/hook.js
1190
+ /**
1191
+ * creates a hook to control style singleton
1192
+ * @see {@link styleSingleton} for a safer component version
1193
+ * @example
1194
+ * ```tsx
1195
+ * const useStyle = styleHookSingleton();
1196
+ * ///
1197
+ * useStyle('body { overflow: hidden}');
1198
+ */
1199
+ var styleHookSingleton = function() {
1200
+ var sheet = stylesheetSingleton();
1201
+ return function(styles, isDynamic) {
1202
+ import_react.useEffect(function() {
1203
+ sheet.add(styles);
1204
+ return function() {
1205
+ sheet.remove();
1206
+ };
1207
+ }, [styles && isDynamic]);
1208
+ };
1209
+ };
1210
+ //#endregion
1211
+ //#region ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.14_react@19.2.4/node_modules/react-style-singleton/dist/es2015/component.js
1212
+ /**
1213
+ * create a Component to add styles on demand
1214
+ * - styles are added when first instance is mounted
1215
+ * - styles are removed when the last instance is unmounted
1216
+ * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior
1217
+ */
1218
+ var styleSingleton = function() {
1219
+ var useStyle = styleHookSingleton();
1220
+ var Sheet = function(_a) {
1221
+ var styles = _a.styles, dynamic = _a.dynamic;
1222
+ useStyle(styles, dynamic);
1223
+ return null;
1224
+ };
1225
+ return Sheet;
1226
+ };
1227
+ //#endregion
1228
+ //#region ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.14_react@19.2.4/node_modules/react-remove-scroll-bar/dist/es2015/utils.js
1229
+ var zeroGap = {
1230
+ left: 0,
1231
+ top: 0,
1232
+ right: 0,
1233
+ gap: 0
1234
+ };
1235
+ var parse = function(x) {
1236
+ return parseInt(x || "", 10) || 0;
1237
+ };
1238
+ var getOffset = function(gapMode) {
1239
+ var cs = window.getComputedStyle(document.body);
1240
+ var left = cs[gapMode === "padding" ? "paddingLeft" : "marginLeft"];
1241
+ var top = cs[gapMode === "padding" ? "paddingTop" : "marginTop"];
1242
+ var right = cs[gapMode === "padding" ? "paddingRight" : "marginRight"];
1243
+ return [
1244
+ parse(left),
1245
+ parse(top),
1246
+ parse(right)
1247
+ ];
1248
+ };
1249
+ var getGapWidth = function(gapMode) {
1250
+ if (gapMode === void 0) gapMode = "margin";
1251
+ if (typeof window === "undefined") return zeroGap;
1252
+ var offsets = getOffset(gapMode);
1253
+ var documentWidth = document.documentElement.clientWidth;
1254
+ var windowWidth = window.innerWidth;
1255
+ return {
1256
+ left: offsets[0],
1257
+ top: offsets[1],
1258
+ right: offsets[2],
1259
+ gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0])
1260
+ };
1261
+ };
1262
+ //#endregion
1263
+ //#region ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.14_react@19.2.4/node_modules/react-remove-scroll-bar/dist/es2015/component.js
1264
+ var Style = styleSingleton();
1265
+ var lockAttribute = "data-scroll-locked";
1266
+ var getStyles = function(_a, allowRelative, gapMode, important) {
1267
+ var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;
1268
+ if (gapMode === void 0) gapMode = "margin";
1269
+ return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body[").concat(lockAttribute, "] {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([
1270
+ allowRelative && "position: relative ".concat(important, ";"),
1271
+ gapMode === "margin" && "\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "),
1272
+ gapMode === "padding" && "padding-right: ".concat(gap, "px ").concat(important, ";")
1273
+ ].filter(Boolean).join(""), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body[").concat(lockAttribute, "] {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n");
1274
+ };
1275
+ var getCurrentUseCounter = function() {
1276
+ var counter = parseInt(document.body.getAttribute("data-scroll-locked") || "0", 10);
1277
+ return isFinite(counter) ? counter : 0;
1278
+ };
1279
+ var useLockAttribute = function() {
1280
+ import_react.useEffect(function() {
1281
+ document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
1282
+ return function() {
1283
+ var newCounter = getCurrentUseCounter() - 1;
1284
+ if (newCounter <= 0) document.body.removeAttribute(lockAttribute);
1285
+ else document.body.setAttribute(lockAttribute, newCounter.toString());
1286
+ };
1287
+ }, []);
1288
+ };
1289
+ /**
1290
+ * Removes page scrollbar and blocks page scroll when mounted
1291
+ */
1292
+ var RemoveScrollBar = function(_a) {
1293
+ var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
1294
+ useLockAttribute();
1295
+ var gap = import_react.useMemo(function() {
1296
+ return getGapWidth(gapMode);
1297
+ }, [gapMode]);
1298
+ return import_react.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
1299
+ };
1300
+ //#endregion
1301
+ //#region ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.2.14_react@19.2.4/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
1302
+ var passiveSupported = false;
1303
+ if (typeof window !== "undefined") try {
1304
+ var options = Object.defineProperty({}, "passive", { get: function() {
1305
+ passiveSupported = true;
1306
+ return true;
1307
+ } });
1308
+ window.addEventListener("test", options, options);
1309
+ window.removeEventListener("test", options, options);
1310
+ } catch (err) {
1311
+ passiveSupported = false;
1312
+ }
1313
+ var nonPassive = passiveSupported ? { passive: false } : false;
1314
+ //#endregion
1315
+ //#region ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.2.14_react@19.2.4/node_modules/react-remove-scroll/dist/es2015/handleScroll.js
1316
+ var alwaysContainsScroll = function(node) {
1317
+ return node.tagName === "TEXTAREA";
1318
+ };
1319
+ var elementCanBeScrolled = function(node, overflow) {
1320
+ if (!(node instanceof Element)) return false;
1321
+ var styles = window.getComputedStyle(node);
1322
+ return styles[overflow] !== "hidden" && !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === "visible");
1323
+ };
1324
+ var elementCouldBeVScrolled = function(node) {
1325
+ return elementCanBeScrolled(node, "overflowY");
1326
+ };
1327
+ var elementCouldBeHScrolled = function(node) {
1328
+ return elementCanBeScrolled(node, "overflowX");
1329
+ };
1330
+ var locationCouldBeScrolled = function(axis, node) {
1331
+ var ownerDocument = node.ownerDocument;
1332
+ var current = node;
1333
+ do {
1334
+ if (typeof ShadowRoot !== "undefined" && current instanceof ShadowRoot) current = current.host;
1335
+ if (elementCouldBeScrolled(axis, current)) {
1336
+ var _a = getScrollVariables(axis, current);
1337
+ if (_a[1] > _a[2]) return true;
1338
+ }
1339
+ current = current.parentNode;
1340
+ } while (current && current !== ownerDocument.body);
1341
+ return false;
1342
+ };
1343
+ var getVScrollVariables = function(_a) {
1344
+ return [
1345
+ _a.scrollTop,
1346
+ _a.scrollHeight,
1347
+ _a.clientHeight
1348
+ ];
1349
+ };
1350
+ var getHScrollVariables = function(_a) {
1351
+ return [
1352
+ _a.scrollLeft,
1353
+ _a.scrollWidth,
1354
+ _a.clientWidth
1355
+ ];
1356
+ };
1357
+ var elementCouldBeScrolled = function(axis, node) {
1358
+ return axis === "v" ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
1359
+ };
1360
+ var getScrollVariables = function(axis, node) {
1361
+ return axis === "v" ? getVScrollVariables(node) : getHScrollVariables(node);
1362
+ };
1363
+ var getDirectionFactor = function(axis, direction) {
1364
+ /**
1365
+ * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,
1366
+ * and then increasingly negative as you scroll towards the end of the content.
1367
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft
1368
+ */
1369
+ return axis === "h" && direction === "rtl" ? -1 : 1;
1370
+ };
1371
+ var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
1372
+ var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
1373
+ var delta = directionFactor * sourceDelta;
1374
+ var target = event.target;
1375
+ var targetInLock = endTarget.contains(target);
1376
+ var shouldCancelScroll = false;
1377
+ var isDeltaPositive = delta > 0;
1378
+ var availableScroll = 0;
1379
+ var availableScrollTop = 0;
1380
+ do {
1381
+ if (!target) break;
1382
+ var _a = getScrollVariables(axis, target), position = _a[0];
1383
+ var elementScroll = _a[1] - _a[2] - directionFactor * position;
1384
+ if (position || elementScroll) {
1385
+ if (elementCouldBeScrolled(axis, target)) {
1386
+ availableScroll += elementScroll;
1387
+ availableScrollTop += position;
1388
+ }
1389
+ }
1390
+ var parent_1 = target.parentNode;
1391
+ target = parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1;
1392
+ } while (!targetInLock && target !== document.body || targetInLock && (endTarget.contains(target) || endTarget === target));
1393
+ if (isDeltaPositive && (noOverscroll && Math.abs(availableScroll) < 1 || !noOverscroll && delta > availableScroll)) shouldCancelScroll = true;
1394
+ else if (!isDeltaPositive && (noOverscroll && Math.abs(availableScrollTop) < 1 || !noOverscroll && -delta > availableScrollTop)) shouldCancelScroll = true;
1395
+ return shouldCancelScroll;
1396
+ };
1397
+ //#endregion
1398
+ //#region ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.2.14_react@19.2.4/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
1399
+ var getTouchXY = function(event) {
1400
+ return "changedTouches" in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
1401
+ };
1402
+ var getDeltaXY = function(event) {
1403
+ return [event.deltaX, event.deltaY];
1404
+ };
1405
+ var extractRef = function(ref) {
1406
+ return ref && "current" in ref ? ref.current : ref;
1407
+ };
1408
+ var deltaCompare = function(x, y) {
1409
+ return x[0] === y[0] && x[1] === y[1];
1410
+ };
1411
+ var generateStyle = function(id) {
1412
+ return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n");
1413
+ };
1414
+ var idCounter = 0;
1415
+ var lockStack = [];
1416
+ function RemoveScrollSideCar(props) {
1417
+ var shouldPreventQueue = import_react.useRef([]);
1418
+ var touchStartRef = import_react.useRef([0, 0]);
1419
+ var activeAxis = import_react.useRef();
1420
+ var id = import_react.useState(idCounter++)[0];
1421
+ var Style = import_react.useState(styleSingleton)[0];
1422
+ var lastProps = import_react.useRef(props);
1423
+ import_react.useEffect(function() {
1424
+ lastProps.current = props;
1425
+ }, [props]);
1426
+ import_react.useEffect(function() {
1427
+ if (props.inert) {
1428
+ document.body.classList.add("block-interactivity-".concat(id));
1429
+ var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
1430
+ allow_1.forEach(function(el) {
1431
+ return el.classList.add("allow-interactivity-".concat(id));
1432
+ });
1433
+ return function() {
1434
+ document.body.classList.remove("block-interactivity-".concat(id));
1435
+ allow_1.forEach(function(el) {
1436
+ return el.classList.remove("allow-interactivity-".concat(id));
1437
+ });
1438
+ };
1439
+ }
1440
+ }, [
1441
+ props.inert,
1442
+ props.lockRef.current,
1443
+ props.shards
1444
+ ]);
1445
+ var shouldCancelEvent = import_react.useCallback(function(event, parent) {
1446
+ if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) return !lastProps.current.allowPinchZoom;
1447
+ var touch = getTouchXY(event);
1448
+ var touchStart = touchStartRef.current;
1449
+ var deltaX = "deltaX" in event ? event.deltaX : touchStart[0] - touch[0];
1450
+ var deltaY = "deltaY" in event ? event.deltaY : touchStart[1] - touch[1];
1451
+ var currentAxis;
1452
+ var target = event.target;
1453
+ var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? "h" : "v";
1454
+ if ("touches" in event && moveDirection === "h" && target.type === "range") return false;
1455
+ var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
1456
+ if (!canBeScrolledInMainDirection) return true;
1457
+ if (canBeScrolledInMainDirection) currentAxis = moveDirection;
1458
+ else {
1459
+ currentAxis = moveDirection === "v" ? "h" : "v";
1460
+ canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
1461
+ }
1462
+ if (!canBeScrolledInMainDirection) return false;
1463
+ if (!activeAxis.current && "changedTouches" in event && (deltaX || deltaY)) activeAxis.current = currentAxis;
1464
+ if (!currentAxis) return true;
1465
+ var cancelingAxis = activeAxis.current || currentAxis;
1466
+ return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
1467
+ }, []);
1468
+ var shouldPrevent = import_react.useCallback(function(_event) {
1469
+ var event = _event;
1470
+ if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) return;
1471
+ var delta = "deltaY" in event ? getDeltaXY(event) : getTouchXY(event);
1472
+ var sourceEvent = shouldPreventQueue.current.filter(function(e) {
1473
+ return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta);
1474
+ })[0];
1475
+ if (sourceEvent && sourceEvent.should) {
1476
+ if (event.cancelable) event.preventDefault();
1477
+ return;
1478
+ }
1479
+ if (!sourceEvent) {
1480
+ var shardNodes = (lastProps.current.shards || []).map(extractRef).filter(Boolean).filter(function(node) {
1481
+ return node.contains(event.target);
1482
+ });
1483
+ if (shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation) {
1484
+ if (event.cancelable) event.preventDefault();
1485
+ }
1486
+ }
1487
+ }, []);
1488
+ var shouldCancel = import_react.useCallback(function(name, delta, target, should) {
1489
+ var event = {
1490
+ name,
1491
+ delta,
1492
+ target,
1493
+ should,
1494
+ shadowParent: getOutermostShadowParent(target)
1495
+ };
1496
+ shouldPreventQueue.current.push(event);
1497
+ setTimeout(function() {
1498
+ shouldPreventQueue.current = shouldPreventQueue.current.filter(function(e) {
1499
+ return e !== event;
1500
+ });
1501
+ }, 1);
1502
+ }, []);
1503
+ var scrollTouchStart = import_react.useCallback(function(event) {
1504
+ touchStartRef.current = getTouchXY(event);
1505
+ activeAxis.current = void 0;
1506
+ }, []);
1507
+ var scrollWheel = import_react.useCallback(function(event) {
1508
+ shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
1509
+ }, []);
1510
+ var scrollTouchMove = import_react.useCallback(function(event) {
1511
+ shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
1512
+ }, []);
1513
+ import_react.useEffect(function() {
1514
+ lockStack.push(Style);
1515
+ props.setCallbacks({
1516
+ onScrollCapture: scrollWheel,
1517
+ onWheelCapture: scrollWheel,
1518
+ onTouchMoveCapture: scrollTouchMove
1519
+ });
1520
+ document.addEventListener("wheel", shouldPrevent, nonPassive);
1521
+ document.addEventListener("touchmove", shouldPrevent, nonPassive);
1522
+ document.addEventListener("touchstart", scrollTouchStart, nonPassive);
1523
+ return function() {
1524
+ lockStack = lockStack.filter(function(inst) {
1525
+ return inst !== Style;
1526
+ });
1527
+ document.removeEventListener("wheel", shouldPrevent, nonPassive);
1528
+ document.removeEventListener("touchmove", shouldPrevent, nonPassive);
1529
+ document.removeEventListener("touchstart", scrollTouchStart, nonPassive);
1530
+ };
1531
+ }, []);
1532
+ var removeScrollBar = props.removeScrollBar, inert = props.inert;
1533
+ return import_react.createElement(import_react.Fragment, null, inert ? import_react.createElement(Style, { styles: generateStyle(id) }) : null, removeScrollBar ? import_react.createElement(RemoveScrollBar, {
1534
+ noRelative: props.noRelative,
1535
+ gapMode: props.gapMode
1536
+ }) : null);
1537
+ }
1538
+ function getOutermostShadowParent(node) {
1539
+ var shadowParent = null;
1540
+ while (node !== null) {
1541
+ if (node instanceof ShadowRoot) {
1542
+ shadowParent = node.host;
1543
+ node = node.host;
1544
+ }
1545
+ node = node.parentNode;
1546
+ }
1547
+ return shadowParent;
1548
+ }
1549
+ //#endregion
1550
+ //#region ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.2.14_react@19.2.4/node_modules/react-remove-scroll/dist/es2015/sidecar.js
1551
+ var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
1552
+ //#endregion
1553
+ //#region ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.2.14_react@19.2.4/node_modules/react-remove-scroll/dist/es2015/Combination.js
1554
+ var ReactRemoveScroll = import_react.forwardRef(function(props, ref) {
1555
+ return import_react.createElement(RemoveScroll, __assign({}, props, {
1556
+ ref,
1557
+ sideCar: sidecar_default
1558
+ }));
1559
+ });
1560
+ ReactRemoveScroll.classNames = RemoveScroll.classNames;
1561
+ //#endregion
1562
+ //#region ../../node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js
1563
+ var getDefaultParent = function(originalTarget) {
1564
+ if (typeof document === "undefined") return null;
1565
+ return (Array.isArray(originalTarget) ? originalTarget[0] : originalTarget).ownerDocument.body;
1566
+ };
1567
+ var counterMap = /* @__PURE__ */ new WeakMap();
1568
+ var uncontrolledNodes = /* @__PURE__ */ new WeakMap();
1569
+ var markerMap = {};
1570
+ var lockCount = 0;
1571
+ var unwrapHost = function(node) {
1572
+ return node && (node.host || unwrapHost(node.parentNode));
1573
+ };
1574
+ var correctTargets = function(parent, targets) {
1575
+ return targets.map(function(target) {
1576
+ if (parent.contains(target)) return target;
1577
+ var correctedTarget = unwrapHost(target);
1578
+ if (correctedTarget && parent.contains(correctedTarget)) return correctedTarget;
1579
+ console.error("aria-hidden", target, "in not contained inside", parent, ". Doing nothing");
1580
+ return null;
1581
+ }).filter(function(x) {
1582
+ return Boolean(x);
1583
+ });
1584
+ };
1585
+ /**
1586
+ * Marks everything except given node(or nodes) as aria-hidden
1587
+ * @param {Element | Element[]} originalTarget - elements to keep on the page
1588
+ * @param [parentNode] - top element, defaults to document.body
1589
+ * @param {String} [markerName] - a special attribute to mark every node
1590
+ * @param {String} [controlAttribute] - html Attribute to control
1591
+ * @return {Undo} undo command
1592
+ */
1593
+ var applyAttributeToOthers = function(originalTarget, parentNode, markerName, controlAttribute) {
1594
+ var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
1595
+ if (!markerMap[markerName]) markerMap[markerName] = /* @__PURE__ */ new WeakMap();
1596
+ var markerCounter = markerMap[markerName];
1597
+ var hiddenNodes = [];
1598
+ var elementsToKeep = /* @__PURE__ */ new Set();
1599
+ var elementsToStop = new Set(targets);
1600
+ var keep = function(el) {
1601
+ if (!el || elementsToKeep.has(el)) return;
1602
+ elementsToKeep.add(el);
1603
+ keep(el.parentNode);
1604
+ };
1605
+ targets.forEach(keep);
1606
+ var deep = function(parent) {
1607
+ if (!parent || elementsToStop.has(parent)) return;
1608
+ Array.prototype.forEach.call(parent.children, function(node) {
1609
+ if (elementsToKeep.has(node)) deep(node);
1610
+ else try {
1611
+ var attr = node.getAttribute(controlAttribute);
1612
+ var alreadyHidden = attr !== null && attr !== "false";
1613
+ var counterValue = (counterMap.get(node) || 0) + 1;
1614
+ var markerValue = (markerCounter.get(node) || 0) + 1;
1615
+ counterMap.set(node, counterValue);
1616
+ markerCounter.set(node, markerValue);
1617
+ hiddenNodes.push(node);
1618
+ if (counterValue === 1 && alreadyHidden) uncontrolledNodes.set(node, true);
1619
+ if (markerValue === 1) node.setAttribute(markerName, "true");
1620
+ if (!alreadyHidden) node.setAttribute(controlAttribute, "true");
1621
+ } catch (e) {
1622
+ console.error("aria-hidden: cannot operate on ", node, e);
1623
+ }
1624
+ });
1625
+ };
1626
+ deep(parentNode);
1627
+ elementsToKeep.clear();
1628
+ lockCount++;
1629
+ return function() {
1630
+ hiddenNodes.forEach(function(node) {
1631
+ var counterValue = counterMap.get(node) - 1;
1632
+ var markerValue = markerCounter.get(node) - 1;
1633
+ counterMap.set(node, counterValue);
1634
+ markerCounter.set(node, markerValue);
1635
+ if (!counterValue) {
1636
+ if (!uncontrolledNodes.has(node)) node.removeAttribute(controlAttribute);
1637
+ uncontrolledNodes.delete(node);
1638
+ }
1639
+ if (!markerValue) node.removeAttribute(markerName);
1640
+ });
1641
+ lockCount--;
1642
+ if (!lockCount) {
1643
+ counterMap = /* @__PURE__ */ new WeakMap();
1644
+ counterMap = /* @__PURE__ */ new WeakMap();
1645
+ uncontrolledNodes = /* @__PURE__ */ new WeakMap();
1646
+ markerMap = {};
1647
+ }
1648
+ };
1649
+ };
1650
+ /**
1651
+ * Marks everything except given node(or nodes) as aria-hidden
1652
+ * @param {Element | Element[]} originalTarget - elements to keep on the page
1653
+ * @param [parentNode] - top element, defaults to document.body
1654
+ * @param {String} [markerName] - a special attribute to mark every node
1655
+ * @return {Undo} undo command
1656
+ */
1657
+ var hideOthers = function(originalTarget, parentNode, markerName) {
1658
+ if (markerName === void 0) markerName = "data-aria-hidden";
1659
+ var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
1660
+ var activeParentNode = parentNode || getDefaultParent(originalTarget);
1661
+ if (!activeParentNode) return function() {
1662
+ return null;
1663
+ };
1664
+ targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll("[aria-live], script")));
1665
+ return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
1666
+ };
1667
+ //#endregion
1668
+ //#region ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.2.3_@types+react@19.2.14__@types+reac_779045218dc2799d336e7197abef9d38/node_modules/@radix-ui/react-dialog/dist/index.mjs
1669
+ var DIALOG_NAME = "Dialog";
1670
+ var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
1671
+ var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
1672
+ var Dialog = (props) => {
1673
+ const { __scopeDialog, children, open: openProp, defaultOpen, onOpenChange, modal = true } = props;
1674
+ const triggerRef = import_react.useRef(null);
1675
+ const contentRef = import_react.useRef(null);
1676
+ const [open, setOpen] = useControllableState({
1677
+ prop: openProp,
1678
+ defaultProp: defaultOpen ?? false,
1679
+ onChange: onOpenChange,
1680
+ caller: DIALOG_NAME
1681
+ });
1682
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogProvider, {
1683
+ scope: __scopeDialog,
1684
+ triggerRef,
1685
+ contentRef,
1686
+ contentId: useId(),
1687
+ titleId: useId(),
1688
+ descriptionId: useId(),
1689
+ open,
1690
+ onOpenChange: setOpen,
1691
+ onOpenToggle: import_react.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
1692
+ modal,
1693
+ children
1694
+ });
1695
+ };
1696
+ Dialog.displayName = DIALOG_NAME;
1697
+ var TRIGGER_NAME$1 = "DialogTrigger";
1698
+ var DialogTrigger = import_react.forwardRef((props, forwardedRef) => {
1699
+ const { __scopeDialog, ...triggerProps } = props;
1700
+ const context = useDialogContext(TRIGGER_NAME$1, __scopeDialog);
1701
+ const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
1702
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Primitive.button, {
1703
+ type: "button",
1704
+ "aria-haspopup": "dialog",
1705
+ "aria-expanded": context.open,
1706
+ "aria-controls": context.contentId,
1707
+ "data-state": getState(context.open),
1708
+ ...triggerProps,
1709
+ ref: composedTriggerRef,
1710
+ onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
1711
+ });
1712
+ });
1713
+ DialogTrigger.displayName = TRIGGER_NAME$1;
1714
+ var PORTAL_NAME$1 = "DialogPortal";
1715
+ var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME$1, { forceMount: void 0 });
1716
+ var DialogPortal = (props) => {
1717
+ const { __scopeDialog, forceMount, children, container } = props;
1718
+ const context = useDialogContext(PORTAL_NAME$1, __scopeDialog);
1719
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PortalProvider, {
1720
+ scope: __scopeDialog,
1721
+ forceMount,
1722
+ children: import_react.Children.map(children, (child) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Presence, {
1723
+ present: forceMount || context.open,
1724
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Portal$1, {
1725
+ asChild: true,
1726
+ container,
1727
+ children: child
1728
+ })
1729
+ }))
1730
+ });
1731
+ };
1732
+ DialogPortal.displayName = PORTAL_NAME$1;
1733
+ var OVERLAY_NAME$1 = "DialogOverlay";
1734
+ var DialogOverlay = import_react.forwardRef((props, forwardedRef) => {
1735
+ const portalContext = usePortalContext(OVERLAY_NAME$1, props.__scopeDialog);
1736
+ const { forceMount = portalContext.forceMount, ...overlayProps } = props;
1737
+ const context = useDialogContext(OVERLAY_NAME$1, props.__scopeDialog);
1738
+ return context.modal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Presence, {
1739
+ present: forceMount || context.open,
1740
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogOverlayImpl, {
1741
+ ...overlayProps,
1742
+ ref: forwardedRef
1743
+ })
1744
+ }) : null;
1745
+ });
1746
+ DialogOverlay.displayName = OVERLAY_NAME$1;
1747
+ var Slot = /* @__PURE__ */ createSlot("DialogOverlay.RemoveScroll");
1748
+ var DialogOverlayImpl = import_react.forwardRef((props, forwardedRef) => {
1749
+ const { __scopeDialog, ...overlayProps } = props;
1750
+ const context = useDialogContext(OVERLAY_NAME$1, __scopeDialog);
1751
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ReactRemoveScroll, {
1752
+ as: Slot,
1753
+ allowPinchZoom: true,
1754
+ shards: [context.contentRef],
1755
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Primitive.div, {
1756
+ "data-state": getState(context.open),
1757
+ ...overlayProps,
1758
+ ref: forwardedRef,
1759
+ style: {
1760
+ pointerEvents: "auto",
1761
+ ...overlayProps.style
1762
+ }
1763
+ })
1764
+ });
1765
+ });
1766
+ var CONTENT_NAME$1 = "DialogContent";
1767
+ var DialogContent = import_react.forwardRef((props, forwardedRef) => {
1768
+ const portalContext = usePortalContext(CONTENT_NAME$1, props.__scopeDialog);
1769
+ const { forceMount = portalContext.forceMount, ...contentProps } = props;
1770
+ const context = useDialogContext(CONTENT_NAME$1, props.__scopeDialog);
1771
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Presence, {
1772
+ present: forceMount || context.open,
1773
+ children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentModal, {
1774
+ ...contentProps,
1775
+ ref: forwardedRef
1776
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentNonModal, {
1777
+ ...contentProps,
1778
+ ref: forwardedRef
1779
+ })
1780
+ });
1781
+ });
1782
+ DialogContent.displayName = CONTENT_NAME$1;
1783
+ var DialogContentModal = import_react.forwardRef((props, forwardedRef) => {
1784
+ const context = useDialogContext(CONTENT_NAME$1, props.__scopeDialog);
1785
+ const contentRef = import_react.useRef(null);
1786
+ const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
1787
+ import_react.useEffect(() => {
1788
+ const content = contentRef.current;
1789
+ if (content) return hideOthers(content);
1790
+ }, []);
1791
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentImpl, {
1792
+ ...props,
1793
+ ref: composedRefs,
1794
+ trapFocus: context.open,
1795
+ disableOutsidePointerEvents: true,
1796
+ onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
1797
+ event.preventDefault();
1798
+ context.triggerRef.current?.focus();
1799
+ }),
1800
+ onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
1801
+ const originalEvent = event.detail.originalEvent;
1802
+ const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
1803
+ if (originalEvent.button === 2 || ctrlLeftClick) event.preventDefault();
1804
+ }),
1805
+ onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => event.preventDefault())
1806
+ });
1807
+ });
1808
+ var DialogContentNonModal = import_react.forwardRef((props, forwardedRef) => {
1809
+ const context = useDialogContext(CONTENT_NAME$1, props.__scopeDialog);
1810
+ const hasInteractedOutsideRef = import_react.useRef(false);
1811
+ const hasPointerDownOutsideRef = import_react.useRef(false);
1812
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentImpl, {
1813
+ ...props,
1814
+ ref: forwardedRef,
1815
+ trapFocus: false,
1816
+ disableOutsidePointerEvents: false,
1817
+ onCloseAutoFocus: (event) => {
1818
+ props.onCloseAutoFocus?.(event);
1819
+ if (!event.defaultPrevented) {
1820
+ if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
1821
+ event.preventDefault();
1822
+ }
1823
+ hasInteractedOutsideRef.current = false;
1824
+ hasPointerDownOutsideRef.current = false;
1825
+ },
1826
+ onInteractOutside: (event) => {
1827
+ props.onInteractOutside?.(event);
1828
+ if (!event.defaultPrevented) {
1829
+ hasInteractedOutsideRef.current = true;
1830
+ if (event.detail.originalEvent.type === "pointerdown") hasPointerDownOutsideRef.current = true;
1831
+ }
1832
+ const target = event.target;
1833
+ if (context.triggerRef.current?.contains(target)) event.preventDefault();
1834
+ if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) event.preventDefault();
1835
+ }
1836
+ });
1837
+ });
1838
+ var DialogContentImpl = import_react.forwardRef((props, forwardedRef) => {
1839
+ const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
1840
+ const context = useDialogContext(CONTENT_NAME$1, __scopeDialog);
1841
+ const contentRef = import_react.useRef(null);
1842
+ const composedRefs = useComposedRefs(forwardedRef, contentRef);
1843
+ useFocusGuards();
1844
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(FocusScope, {
1845
+ asChild: true,
1846
+ loop: true,
1847
+ trapped: trapFocus,
1848
+ onMountAutoFocus: onOpenAutoFocus,
1849
+ onUnmountAutoFocus: onCloseAutoFocus,
1850
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DismissableLayer, {
1851
+ role: "dialog",
1852
+ id: context.contentId,
1853
+ "aria-describedby": context.descriptionId,
1854
+ "aria-labelledby": context.titleId,
1855
+ "data-state": getState(context.open),
1856
+ ...contentProps,
1857
+ ref: composedRefs,
1858
+ onDismiss: () => context.onOpenChange(false)
1859
+ })
1860
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TitleWarning, { titleId: context.titleId }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DescriptionWarning$1, {
1861
+ contentRef,
1862
+ descriptionId: context.descriptionId
1863
+ })] })] });
1864
+ });
1865
+ var TITLE_NAME$1 = "DialogTitle";
1866
+ var DialogTitle = import_react.forwardRef((props, forwardedRef) => {
1867
+ const { __scopeDialog, ...titleProps } = props;
1868
+ const context = useDialogContext(TITLE_NAME$1, __scopeDialog);
1869
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Primitive.h2, {
1870
+ id: context.titleId,
1871
+ ...titleProps,
1872
+ ref: forwardedRef
1873
+ });
1874
+ });
1875
+ DialogTitle.displayName = TITLE_NAME$1;
1876
+ var DESCRIPTION_NAME$1 = "DialogDescription";
1877
+ var DialogDescription = import_react.forwardRef((props, forwardedRef) => {
1878
+ const { __scopeDialog, ...descriptionProps } = props;
1879
+ const context = useDialogContext(DESCRIPTION_NAME$1, __scopeDialog);
1880
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Primitive.p, {
1881
+ id: context.descriptionId,
1882
+ ...descriptionProps,
1883
+ ref: forwardedRef
1884
+ });
1885
+ });
1886
+ DialogDescription.displayName = DESCRIPTION_NAME$1;
1887
+ var CLOSE_NAME = "DialogClose";
1888
+ var DialogClose = import_react.forwardRef((props, forwardedRef) => {
1889
+ const { __scopeDialog, ...closeProps } = props;
1890
+ const context = useDialogContext(CLOSE_NAME, __scopeDialog);
1891
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Primitive.button, {
1892
+ type: "button",
1893
+ ...closeProps,
1894
+ ref: forwardedRef,
1895
+ onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
1896
+ });
1897
+ });
1898
+ DialogClose.displayName = CLOSE_NAME;
1899
+ function getState(open) {
1900
+ return open ? "open" : "closed";
1901
+ }
1902
+ var TITLE_WARNING_NAME = "DialogTitleWarning";
1903
+ var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
1904
+ contentName: CONTENT_NAME$1,
1905
+ titleName: TITLE_NAME$1,
1906
+ docsSlug: "dialog"
1907
+ });
1908
+ var TitleWarning = ({ titleId }) => {
1909
+ const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
1910
+ const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
1911
+
1912
+ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
1913
+
1914
+ For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
1915
+ import_react.useEffect(() => {
1916
+ if (titleId) {
1917
+ if (!document.getElementById(titleId)) console.error(MESSAGE);
1918
+ }
1919
+ }, [MESSAGE, titleId]);
1920
+ return null;
1921
+ };
1922
+ var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
1923
+ var DescriptionWarning$1 = ({ contentRef, descriptionId }) => {
1924
+ const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${useWarningContext(DESCRIPTION_WARNING_NAME).contentName}}.`;
1925
+ import_react.useEffect(() => {
1926
+ const describedById = contentRef.current?.getAttribute("aria-describedby");
1927
+ if (descriptionId && describedById) {
1928
+ if (!document.getElementById(descriptionId)) console.warn(MESSAGE);
1929
+ }
1930
+ }, [
1931
+ MESSAGE,
1932
+ contentRef,
1933
+ descriptionId
1934
+ ]);
1935
+ return null;
1936
+ };
1937
+ var Root = Dialog;
1938
+ var Trigger = DialogTrigger;
1939
+ var Portal = DialogPortal;
1940
+ var Overlay = DialogOverlay;
1941
+ var Content = DialogContent;
1942
+ var Title = DialogTitle;
1943
+ var Description = DialogDescription;
1944
+ var Close = DialogClose;
1945
+ //#endregion
1946
+ //#region ../../node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.2.3_@types+react@19.2.14__@type_d492cfbed6c88f7a3980b921a627d48d/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs
1947
+ var ROOT_NAME = "AlertDialog";
1948
+ var [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [createDialogScope]);
1949
+ var useDialogScope = createDialogScope();
1950
+ var AlertDialog = (props) => {
1951
+ const { __scopeAlertDialog, ...alertDialogProps } = props;
1952
+ const dialogScope = useDialogScope(__scopeAlertDialog);
1953
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Root, {
1954
+ ...dialogScope,
1955
+ ...alertDialogProps,
1956
+ modal: true
1957
+ });
1958
+ };
1959
+ AlertDialog.displayName = ROOT_NAME;
1960
+ var TRIGGER_NAME = "AlertDialogTrigger";
1961
+ var AlertDialogTrigger = import_react.forwardRef((props, forwardedRef) => {
1962
+ const { __scopeAlertDialog, ...triggerProps } = props;
1963
+ const dialogScope = useDialogScope(__scopeAlertDialog);
1964
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trigger, {
1965
+ ...dialogScope,
1966
+ ...triggerProps,
1967
+ ref: forwardedRef
1968
+ });
1969
+ });
1970
+ AlertDialogTrigger.displayName = TRIGGER_NAME;
1971
+ var PORTAL_NAME = "AlertDialogPortal";
1972
+ var AlertDialogPortal = (props) => {
1973
+ const { __scopeAlertDialog, ...portalProps } = props;
1974
+ const dialogScope = useDialogScope(__scopeAlertDialog);
1975
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Portal, {
1976
+ ...dialogScope,
1977
+ ...portalProps
1978
+ });
1979
+ };
1980
+ AlertDialogPortal.displayName = PORTAL_NAME;
1981
+ var OVERLAY_NAME = "AlertDialogOverlay";
1982
+ var AlertDialogOverlay = import_react.forwardRef((props, forwardedRef) => {
1983
+ const { __scopeAlertDialog, ...overlayProps } = props;
1984
+ const dialogScope = useDialogScope(__scopeAlertDialog);
1985
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Overlay, {
1986
+ ...dialogScope,
1987
+ ...overlayProps,
1988
+ ref: forwardedRef
1989
+ });
1990
+ });
1991
+ AlertDialogOverlay.displayName = OVERLAY_NAME;
1992
+ var CONTENT_NAME = "AlertDialogContent";
1993
+ var [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME);
1994
+ var Slottable = /* @__PURE__ */ createSlottable("AlertDialogContent");
1995
+ var AlertDialogContent = import_react.forwardRef((props, forwardedRef) => {
1996
+ const { __scopeAlertDialog, children, ...contentProps } = props;
1997
+ const dialogScope = useDialogScope(__scopeAlertDialog);
1998
+ const contentRef = import_react.useRef(null);
1999
+ const composedRefs = useComposedRefs(forwardedRef, contentRef);
2000
+ const cancelRef = import_react.useRef(null);
2001
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(WarningProvider, {
2002
+ contentName: CONTENT_NAME,
2003
+ titleName: TITLE_NAME,
2004
+ docsSlug: "alert-dialog",
2005
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDialogContentProvider, {
2006
+ scope: __scopeAlertDialog,
2007
+ cancelRef,
2008
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Content, {
2009
+ role: "alertdialog",
2010
+ ...dialogScope,
2011
+ ...contentProps,
2012
+ ref: composedRefs,
2013
+ onOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {
2014
+ event.preventDefault();
2015
+ cancelRef.current?.focus({ preventScroll: true });
2016
+ }),
2017
+ onPointerDownOutside: (event) => event.preventDefault(),
2018
+ onInteractOutside: (event) => event.preventDefault(),
2019
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Slottable, { children }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DescriptionWarning, { contentRef })]
2020
+ })
2021
+ })
2022
+ });
2023
+ });
2024
+ AlertDialogContent.displayName = CONTENT_NAME;
2025
+ var TITLE_NAME = "AlertDialogTitle";
2026
+ var AlertDialogTitle = import_react.forwardRef((props, forwardedRef) => {
2027
+ const { __scopeAlertDialog, ...titleProps } = props;
2028
+ const dialogScope = useDialogScope(__scopeAlertDialog);
2029
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Title, {
2030
+ ...dialogScope,
2031
+ ...titleProps,
2032
+ ref: forwardedRef
2033
+ });
2034
+ });
2035
+ AlertDialogTitle.displayName = TITLE_NAME;
2036
+ var DESCRIPTION_NAME = "AlertDialogDescription";
2037
+ var AlertDialogDescription = import_react.forwardRef((props, forwardedRef) => {
2038
+ const { __scopeAlertDialog, ...descriptionProps } = props;
2039
+ const dialogScope = useDialogScope(__scopeAlertDialog);
2040
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Description, {
2041
+ ...dialogScope,
2042
+ ...descriptionProps,
2043
+ ref: forwardedRef
2044
+ });
2045
+ });
2046
+ AlertDialogDescription.displayName = DESCRIPTION_NAME;
2047
+ var ACTION_NAME = "AlertDialogAction";
2048
+ var AlertDialogAction = import_react.forwardRef((props, forwardedRef) => {
2049
+ const { __scopeAlertDialog, ...actionProps } = props;
2050
+ const dialogScope = useDialogScope(__scopeAlertDialog);
2051
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Close, {
2052
+ ...dialogScope,
2053
+ ...actionProps,
2054
+ ref: forwardedRef
2055
+ });
2056
+ });
2057
+ AlertDialogAction.displayName = ACTION_NAME;
2058
+ var CANCEL_NAME = "AlertDialogCancel";
2059
+ var AlertDialogCancel = import_react.forwardRef((props, forwardedRef) => {
2060
+ const { __scopeAlertDialog, ...cancelProps } = props;
2061
+ const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);
2062
+ const dialogScope = useDialogScope(__scopeAlertDialog);
2063
+ const ref = useComposedRefs(forwardedRef, cancelRef);
2064
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Close, {
2065
+ ...dialogScope,
2066
+ ...cancelProps,
2067
+ ref
2068
+ });
2069
+ });
2070
+ AlertDialogCancel.displayName = CANCEL_NAME;
2071
+ var DescriptionWarning = ({ contentRef }) => {
2072
+ const MESSAGE = `\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users.
2073
+
2074
+ You can add a description to the \`${CONTENT_NAME}\` by passing a \`${DESCRIPTION_NAME}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
2075
+
2076
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${CONTENT_NAME}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
2077
+
2078
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
2079
+ import_react.useEffect(() => {
2080
+ if (!document.getElementById(contentRef.current?.getAttribute("aria-describedby"))) console.warn(MESSAGE);
2081
+ }, [MESSAGE, contentRef]);
2082
+ return null;
2083
+ };
2084
+ var Root2 = AlertDialog;
2085
+ var Portal2 = AlertDialogPortal;
2086
+ var Overlay2 = AlertDialogOverlay;
2087
+ var Content2 = AlertDialogContent;
2088
+ var Action = AlertDialogAction;
2089
+ var Cancel = AlertDialogCancel;
2090
+ var Title2 = AlertDialogTitle;
2091
+ var Description2 = AlertDialogDescription;
2092
+ //#endregion
2093
+ export { Slot$1 as A, useCallbackRef$1 as C, useLayoutEffect2 as D, useControllableState as E, createSlottable as M, useComposedRefs as N, createContextScope as O, require_jsx_runtime as P, DismissableLayer as S, Presence as T, hideOthers as _, Overlay2 as a, Portal$1 as b, Title2 as c, Description as d, Overlay as f, Trigger as g, Title as h, Description2 as i, createSlot as j, Primitive as k, Close as l, Root as m, Cancel as n, Portal2 as o, Portal as p, Content2 as r, Root2 as s, Action as t, Content as u, ReactRemoveScroll as v, useId as w, FocusScope as x, useFocusGuards as y };