@cryptlex/web-components 3.7.1 → 3.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/data-table/data-table.es.js +107 -144
- package/dist/components/data-table/data-table.es.js.map +1 -1
- package/dist/components/data-table/table-commons.es.js +1 -1
- package/dist/components/data-table/table-commons.es.js.map +1 -1
- package/dist/components/data-table/table-content.es.js +29 -26
- package/dist/components/data-table/table-content.es.js.map +1 -1
- package/dist/index.es.d.ts +16 -12
- package/dist/node_modules/.pnpm/{@floating-ui_core@1.7.1 → @floating-ui_core@1.7.2}/node_modules/@floating-ui/core/dist/floating-ui.core.es.js +36 -36
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.2/node_modules/@floating-ui/core/dist/floating-ui.core.es.js.map +1 -0
- package/dist/node_modules/.pnpm/{@floating-ui_dom@1.7.1 → @floating-ui_dom@1.7.2}/node_modules/@floating-ui/dom/dist/floating-ui.dom.es.js +57 -56
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.es.js.map +1 -0
- package/dist/node_modules/.pnpm/{@floating-ui_react-dom@2.1.3_react-dom@19.1.0_react@19.1.0 → @floating-ui_react-dom@2.1.4_react-dom@19.1.0_react@19.1.0}/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.es.js +2 -2
- package/dist/node_modules/.pnpm/{@floating-ui_react-dom@2.1.3_react-dom@19.1.0_react@19.1.0 → @floating-ui_react-dom@2.1.4_react-dom@19.1.0_react@19.1.0}/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.es.js +137 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.es.js.map +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.es.js +131 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.es.js.map +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.2.7_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-popper/dist/index.es.js +2 -2
- package/lib/theme.css +0 -1
- package/package.json +1 -1
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.1/node_modules/@floating-ui/core/dist/floating-ui.core.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.1/node_modules/@floating-ui/dom/dist/floating-ui.dom.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.es.js +0 -132
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.es.js +0 -130
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.es.js.map +0 -1
package/dist/index.es.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ import { components } from '@cryptlex/web-api-types';
|
|
|
9
9
|
import { ComponentType } from 'react';
|
|
10
10
|
import { Context } from 'react';
|
|
11
11
|
import { DayPicker } from 'react-day-picker';
|
|
12
|
-
import { default as default_2 } from '
|
|
13
|
-
import { default as default_3 } from '
|
|
12
|
+
import { default as default_2 } from 'react';
|
|
13
|
+
import { default as default_3 } from 'openapi-fetch';
|
|
14
14
|
import { DialogCloseProps } from '@radix-ui/react-dialog';
|
|
15
15
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
16
16
|
import { DialogTriggerProps } from '@radix-ui/react-dialog';
|
|
@@ -39,6 +39,7 @@ import { RefAttributes } from 'react';
|
|
|
39
39
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
40
40
|
import { SortingState } from '@tanstack/react-table';
|
|
41
41
|
import { TableOptions } from '@tanstack/react-table';
|
|
42
|
+
import { TableState } from '@tanstack/react-table';
|
|
42
43
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
43
44
|
import { Toaster as Toaster_2 } from 'sonner';
|
|
44
45
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
@@ -131,7 +132,7 @@ export declare interface CheckboxProps extends Omit<React_2.ComponentProps<"inpu
|
|
|
131
132
|
indeterminate?: boolean;
|
|
132
133
|
}
|
|
133
134
|
|
|
134
|
-
declare type Client = ReturnType<typeof
|
|
135
|
+
declare type Client = ReturnType<typeof default_3<paths>>;
|
|
135
136
|
|
|
136
137
|
/** Classnames */
|
|
137
138
|
export declare function cn(...inputs: ClassValue[]): string;
|
|
@@ -176,16 +177,19 @@ export declare type CtxPortals = "customer-portal" | "system-portal" | "reseller
|
|
|
176
177
|
/** Application Names */
|
|
177
178
|
export declare type CtxProjectName = "admin-portal" | "customer-portal" | "internal-portal" | "reseller-portal";
|
|
178
179
|
|
|
179
|
-
export declare function DataTable<TData extends object>({ columns, fetchFn,
|
|
180
|
+
export declare function DataTable<TData extends object>({ columns, fetchFn, tableActions, columnsToHideByDefault, allowSelection, className, ...props }: DataTableProps<TData>): JSX.Element;
|
|
180
181
|
|
|
181
|
-
export declare interface DataTableProps<TData> extends Pick<TableOptions<TData>, 'columns'>,
|
|
182
|
-
tableName: string;
|
|
182
|
+
export declare interface DataTableProps<TData> extends Pick<TableOptions<TData>, 'columns'>, default_2.ComponentProps<'section'> {
|
|
183
183
|
fetchFn: TableFetchFn<TData>;
|
|
184
184
|
tableActions: TableActions;
|
|
185
185
|
allowSelection: boolean;
|
|
186
|
-
columnsToHideByDefault
|
|
186
|
+
columnsToHideByDefault?: VisibilityState_2;
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
+
export declare type DataTableState = Pick<TableState, 'sorting' | 'columnFilters' | 'columnVisibility' | 'rowSelection' | 'pagination'> & {
|
|
190
|
+
search: string;
|
|
191
|
+
};
|
|
192
|
+
|
|
189
193
|
export declare const DEFAULT_FILTERABLE_FIELDS: FilterableProperties<any>;
|
|
190
194
|
|
|
191
195
|
/*** Type for hide some of the columns based on the dto of the particular page
|
|
@@ -312,7 +316,7 @@ export declare function FormField({ field, label, caption, children, className,
|
|
|
312
316
|
|
|
313
317
|
declare interface FormFieldProps extends BaseFormFieldProps {
|
|
314
318
|
field?: FieldApi<any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any>;
|
|
315
|
-
children:
|
|
319
|
+
children: default_2.ReactNode;
|
|
316
320
|
className?: string;
|
|
317
321
|
}
|
|
318
322
|
|
|
@@ -355,7 +359,7 @@ export declare function InputOTPSlot({ index, className, ...props }: React_2.Com
|
|
|
355
359
|
index: number;
|
|
356
360
|
}): JSX.Element;
|
|
357
361
|
|
|
358
|
-
export declare type InputProps =
|
|
362
|
+
export declare type InputProps = default_2.ComponentProps<"input"> & {
|
|
359
363
|
icon?: LucideIcon;
|
|
360
364
|
buttonProps?: ButtonProps;
|
|
361
365
|
};
|
|
@@ -460,13 +464,13 @@ declare interface SearchInputProps extends Omit<InputProps, "onChange"> {
|
|
|
460
464
|
|
|
461
465
|
export declare function secondsToDuration(seconds: number): string;
|
|
462
466
|
|
|
463
|
-
export declare interface SelectionProps<V extends number | string | string[]> extends Omit<
|
|
467
|
+
export declare interface SelectionProps<V extends number | string | string[]> extends Omit<default_2.ComponentProps<"button">, "value" | "values" | "defaultValue"> {
|
|
464
468
|
value: V;
|
|
465
469
|
setValue: (v: V) => void;
|
|
466
|
-
buttonLabel?:
|
|
470
|
+
buttonLabel?: default_2.ReactNode;
|
|
467
471
|
options: {
|
|
468
472
|
value: string;
|
|
469
|
-
label:
|
|
473
|
+
label: default_2.ReactElement;
|
|
470
474
|
disabled?: boolean;
|
|
471
475
|
}[];
|
|
472
476
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { evaluate as L, getSideAxis as T, getSide as j, clamp as X, getOppositePlacement as
|
|
1
|
+
import { evaluate as L, getSideAxis as T, getSide as j, clamp as X, getOppositePlacement as ee, getExpandedPlacements as te, getOppositeAxisPlacements as ne, getAlignmentSides as ie, getAlignment as z, min as $, max as W, getPaddingObject as J, rectToClientRect as _, getOppositeAxis as K, getAlignmentAxis as N, sides as se, getAxisLength as Q } from "../../../../../@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.es.js";
|
|
2
2
|
function I(t, e, d) {
|
|
3
3
|
let {
|
|
4
4
|
reference: a,
|
|
@@ -47,7 +47,7 @@ function I(t, e, d) {
|
|
|
47
47
|
}
|
|
48
48
|
return i;
|
|
49
49
|
}
|
|
50
|
-
const
|
|
50
|
+
const ce = async (t, e, d) => {
|
|
51
51
|
const {
|
|
52
52
|
placement: a = "bottom",
|
|
53
53
|
strategy: r = "absolute",
|
|
@@ -153,7 +153,7 @@ async function Y(t, e) {
|
|
|
153
153
|
right: (w.right - y.right + l.right) / v.x
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
|
-
const
|
|
156
|
+
const le = (t) => ({
|
|
157
157
|
name: "arrow",
|
|
158
158
|
options: t,
|
|
159
159
|
async fn(e) {
|
|
@@ -177,20 +177,20 @@ const ce = (t) => ({
|
|
|
177
177
|
}, i = N(r), l = Q(i), g = await o.getDimensions(h), x = i === "y", y = x ? "top" : "left", A = x ? "bottom" : "right", p = x ? "clientHeight" : "clientWidth", v = n.reference[l] + n.reference[i] - f[i] - n.floating[l], w = f[i] - n.reference[i], P = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(h));
|
|
178
178
|
let C = P ? P[p] : 0;
|
|
179
179
|
(!C || !await (o.isElement == null ? void 0 : o.isElement(P))) && (C = m.floating[p] || n.floating[l]);
|
|
180
|
-
const M = v / 2 - w / 2, k = C / 2 - g[l] / 2 - 1, O = $(s[y], k), H = $(s[A], k), D = O, F = C - g[l] - H, b = C / 2 - g[l] / 2 + M, B = X(D, b, F), E = !u.arrow && z(r) != null && b !== B && n.reference[l] / 2 - (b < D ? O : H) - g[l] / 2 < 0,
|
|
180
|
+
const M = v / 2 - w / 2, k = C / 2 - g[l] / 2 - 1, O = $(s[y], k), H = $(s[A], k), D = O, F = C - g[l] - H, b = C / 2 - g[l] / 2 + M, B = X(D, b, F), E = !u.arrow && z(r) != null && b !== B && n.reference[l] / 2 - (b < D ? O : H) - g[l] / 2 < 0, S = E ? b < D ? b - D : b - F : 0;
|
|
181
181
|
return {
|
|
182
|
-
[i]: f[i] +
|
|
182
|
+
[i]: f[i] + S,
|
|
183
183
|
data: {
|
|
184
184
|
[i]: B,
|
|
185
|
-
centerOffset: b - B -
|
|
185
|
+
centerOffset: b - B - S,
|
|
186
186
|
...E && {
|
|
187
|
-
alignmentOffset:
|
|
187
|
+
alignmentOffset: S
|
|
188
188
|
}
|
|
189
189
|
},
|
|
190
190
|
reset: E
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
|
-
}),
|
|
193
|
+
}), re = function(t) {
|
|
194
194
|
return t === void 0 && (t = {}), {
|
|
195
195
|
name: "flip",
|
|
196
196
|
options: t,
|
|
@@ -214,12 +214,12 @@ const ce = (t) => ({
|
|
|
214
214
|
} = L(t, e);
|
|
215
215
|
if ((d = n.arrow) != null && d.alignmentOffset)
|
|
216
216
|
return {};
|
|
217
|
-
const y = j(r), A = T(m), p = j(m) === m, v = await (u.isRTL == null ? void 0 : u.isRTL(h.floating)), w = f || (p || !g ? [
|
|
218
|
-
!f && P && w.push(...
|
|
217
|
+
const y = j(r), A = T(m), p = j(m) === m, v = await (u.isRTL == null ? void 0 : u.isRTL(h.floating)), w = f || (p || !g ? [ee(m)] : te(m)), P = l !== "none";
|
|
218
|
+
!f && P && w.push(...ne(m, g, l, v));
|
|
219
219
|
const C = [m, ...w], M = await Y(e, x), k = [];
|
|
220
220
|
let O = ((a = n.flip) == null ? void 0 : a.overflows) || [];
|
|
221
221
|
if (c && k.push(M[y]), s) {
|
|
222
|
-
const b =
|
|
222
|
+
const b = ie(r, o, v);
|
|
223
223
|
k.push(M[b[0]], M[b[1]]);
|
|
224
224
|
}
|
|
225
225
|
if (O = [...O, {
|
|
@@ -230,7 +230,7 @@ const ce = (t) => ({
|
|
|
230
230
|
const b = (((H = n.flip) == null ? void 0 : H.index) || 0) + 1, B = C[b];
|
|
231
231
|
if (B && (!(s === "alignment" ? A !== T(B) : !1) || // We leave the current main axis only if every placement on that axis
|
|
232
232
|
// overflows the main axis.
|
|
233
|
-
O.every((
|
|
233
|
+
O.every((R) => R.overflows[0] > 0 && T(R.placement) === A)))
|
|
234
234
|
return {
|
|
235
235
|
data: {
|
|
236
236
|
index: b,
|
|
@@ -240,21 +240,21 @@ const ce = (t) => ({
|
|
|
240
240
|
placement: B
|
|
241
241
|
}
|
|
242
242
|
};
|
|
243
|
-
let E = (D = O.filter((
|
|
243
|
+
let E = (D = O.filter((S) => S.overflows[0] <= 0).sort((S, R) => S.overflows[1] - R.overflows[1])[0]) == null ? void 0 : D.placement;
|
|
244
244
|
if (!E)
|
|
245
245
|
switch (i) {
|
|
246
246
|
case "bestFit": {
|
|
247
247
|
var F;
|
|
248
|
-
const
|
|
248
|
+
const S = (F = O.filter((R) => {
|
|
249
249
|
if (P) {
|
|
250
|
-
const V = T(
|
|
250
|
+
const V = T(R.placement);
|
|
251
251
|
return V === A || // Create a bias to the `y` side axis due to horizontal
|
|
252
252
|
// reading directions favoring greater width.
|
|
253
253
|
V === "y";
|
|
254
254
|
}
|
|
255
255
|
return !0;
|
|
256
|
-
}).map((
|
|
257
|
-
|
|
256
|
+
}).map((R) => [R.placement, R.overflows.filter((V) => V > 0).reduce((V, Z) => V + Z, 0)]).sort((R, V) => R[1] - V[1])[0]) == null ? void 0 : F[0];
|
|
257
|
+
S && (E = S);
|
|
258
258
|
break;
|
|
259
259
|
}
|
|
260
260
|
case "initialPlacement":
|
|
@@ -281,9 +281,9 @@ function q(t, e) {
|
|
|
281
281
|
};
|
|
282
282
|
}
|
|
283
283
|
function G(t) {
|
|
284
|
-
return
|
|
284
|
+
return se.some((e) => t[e] >= 0);
|
|
285
285
|
}
|
|
286
|
-
const
|
|
286
|
+
const fe = function(t) {
|
|
287
287
|
return t === void 0 && (t = {}), {
|
|
288
288
|
name: "hide",
|
|
289
289
|
options: t,
|
|
@@ -324,13 +324,13 @@ const re = function(t) {
|
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
326
|
};
|
|
327
|
-
};
|
|
328
|
-
async function
|
|
327
|
+
}, U = /* @__PURE__ */ new Set(["left", "top"]);
|
|
328
|
+
async function oe(t, e) {
|
|
329
329
|
const {
|
|
330
330
|
placement: d,
|
|
331
331
|
platform: a,
|
|
332
332
|
elements: r
|
|
333
|
-
} = t, n = await (a.isRTL == null ? void 0 : a.isRTL(r.floating)), o = j(d), m = z(d), u = T(d) === "y", h =
|
|
333
|
+
} = t, n = await (a.isRTL == null ? void 0 : a.isRTL(r.floating)), o = j(d), m = z(d), u = T(d) === "y", h = U.has(o) ? -1 : 1, c = n && u ? -1 : 1, s = L(e, t);
|
|
334
334
|
let {
|
|
335
335
|
mainAxis: f,
|
|
336
336
|
crossAxis: i,
|
|
@@ -352,7 +352,7 @@ async function se(t, e) {
|
|
|
352
352
|
y: i * c
|
|
353
353
|
};
|
|
354
354
|
}
|
|
355
|
-
const
|
|
355
|
+
const me = function(t) {
|
|
356
356
|
return t === void 0 && (t = 0), {
|
|
357
357
|
name: "offset",
|
|
358
358
|
options: t,
|
|
@@ -363,7 +363,7 @@ const fe = function(t) {
|
|
|
363
363
|
y: n,
|
|
364
364
|
placement: o,
|
|
365
365
|
middlewareData: m
|
|
366
|
-
} = e, u = await
|
|
366
|
+
} = e, u = await oe(e, t);
|
|
367
367
|
return o === ((d = m.offset) == null ? void 0 : d.placement) && (a = m.arrow) != null && a.alignmentOffset ? {} : {
|
|
368
368
|
x: r + u.x,
|
|
369
369
|
y: n + u.y,
|
|
@@ -374,7 +374,7 @@ const fe = function(t) {
|
|
|
374
374
|
};
|
|
375
375
|
}
|
|
376
376
|
};
|
|
377
|
-
},
|
|
377
|
+
}, de = function(t) {
|
|
378
378
|
return t === void 0 && (t = {}), {
|
|
379
379
|
name: "shift",
|
|
380
380
|
options: t,
|
|
@@ -430,7 +430,7 @@ const fe = function(t) {
|
|
|
430
430
|
};
|
|
431
431
|
}
|
|
432
432
|
};
|
|
433
|
-
},
|
|
433
|
+
}, xe = function(t) {
|
|
434
434
|
return t === void 0 && (t = {}), {
|
|
435
435
|
options: t,
|
|
436
436
|
fn(e) {
|
|
@@ -463,7 +463,7 @@ const fe = function(t) {
|
|
|
463
463
|
}
|
|
464
464
|
if (h) {
|
|
465
465
|
var y, A;
|
|
466
|
-
const p = f === "y" ? "width" : "height", v =
|
|
466
|
+
const p = f === "y" ? "width" : "height", v = U.has(j(r)), w = n.reference[s] - n.floating[p] + (v && ((y = o.offset) == null ? void 0 : y[s]) || 0) + (v ? 0 : x.crossAxis), P = n.reference[s] + n.reference[p] + (v ? 0 : ((A = o.offset) == null ? void 0 : A[s]) || 0) - (v ? x.crossAxis : 0);
|
|
467
467
|
l < w ? l = w : l > P && (l = P);
|
|
468
468
|
}
|
|
469
469
|
return {
|
|
@@ -472,7 +472,7 @@ const fe = function(t) {
|
|
|
472
472
|
};
|
|
473
473
|
}
|
|
474
474
|
};
|
|
475
|
-
},
|
|
475
|
+
}, ge = function(t) {
|
|
476
476
|
return t === void 0 && (t = {}), {
|
|
477
477
|
name: "size",
|
|
478
478
|
options: t,
|
|
@@ -514,15 +514,15 @@ const fe = function(t) {
|
|
|
514
514
|
};
|
|
515
515
|
};
|
|
516
516
|
export {
|
|
517
|
-
|
|
518
|
-
|
|
517
|
+
le as arrow,
|
|
518
|
+
ce as computePosition,
|
|
519
519
|
Y as detectOverflow,
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
520
|
+
re as flip,
|
|
521
|
+
fe as hide,
|
|
522
|
+
xe as limitShift,
|
|
523
|
+
me as offset,
|
|
524
524
|
_ as rectToClientRect,
|
|
525
|
-
|
|
526
|
-
|
|
525
|
+
de as shift,
|
|
526
|
+
ge as size
|
|
527
527
|
};
|
|
528
528
|
//# sourceMappingURL=floating-ui.core.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"floating-ui.core.es.js","sources":["../../../../../../../../node_modules/.pnpm/@floating-ui+core@1.7.2/node_modules/@floating-ui/core/dist/floating-ui.core.mjs"],"sourcesContent":["import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const validMiddleware = middleware.filter(Boolean);\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let middlewareData = {};\n let resetCount = 0;\n for (let i = 0; i < validMiddleware.length; i++) {\n const {\n name,\n fn\n } = validMiddleware[i];\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = {\n ...middlewareData,\n [name]: {\n ...middlewareData[name],\n ...data\n }\n };\n if (reset && resetCount <= 50) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n x,\n y,\n width: rects.floating.width,\n height: rects.floating.height\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const initialSideAxis = getSideAxis(initialPlacement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;\n if (!ignoreCrossAxisOverflow ||\n // We leave the current main axis only if every placement on that axis\n // overflows the main axis.\n overflowsData.every(d => d.overflows[0] > 0 && getSideAxis(d.placement) === initialSideAxis)) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$filter2;\n const placement = (_overflowsData$filter2 = overflowsData.filter(d => {\n if (hasFallbackAxisSideDirection) {\n const currentSideAxis = getSideAxis(d.placement);\n return currentSideAxis === initialSideAxis ||\n // Create a bias to the `y` side axis due to horizontal\n // reading directions favoring greater width.\n currentSideAxis === 'y';\n }\n return true;\n }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\nconst originSides = /*#__PURE__*/new Set(['left', 'top']);\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = originSides.has(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n\n // eslint-disable-next-line prefer-const\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: rawValue.mainAxis || 0,\n crossAxis: rawValue.crossAxis || 0,\n alignmentAxis: rawValue.alignmentAxis\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y,\n enabled: {\n [mainAxis]: checkMainAxis,\n [crossAxis]: checkCrossAxis\n }\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = originSides.has(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n var _state$middlewareData, _state$middlewareData2;\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n const maximumClippingWidth = width - overflow.left - overflow.right;\n const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {\n availableWidth = maximumClippingWidth;\n }\n if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {\n availableHeight = maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n"],"names":["computeCoordsFromPlacement","_ref","placement","rtl","reference","floating","sideAxis","getSideAxis","alignmentAxis","getAlignmentAxis","alignLength","getAxisLength","side","getSide","isVertical","commonX","commonY","commonAlign","coords","getAlignment","computePosition","config","strategy","middleware","platform","validMiddleware","rects","x","y","statefulPlacement","middlewareData","resetCount","i","name","fn","nextX","nextY","data","reset","detectOverflow","state","options","_await$platform$isEle","elements","boundary","rootBoundary","elementContext","altBoundary","padding","evaluate","paddingObject","getPaddingObject","element","clippingClientRect","rectToClientRect","rect","offsetParent","offsetScale","elementClientRect","arrow","axis","length","arrowDimensions","isYAxis","minProp","maxProp","clientProp","endDiff","startDiff","arrowOffsetParent","clientSize","centerToReference","largestPossiblePadding","minPadding","min","maxPadding","min$1","max","center","offset","clamp","shouldAddOffset","alignmentOffset","flip","_middlewareData$arrow","_middlewareData$flip","initialPlacement","checkMainAxis","checkCrossAxis","specifiedFallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment","detectOverflowOptions","initialSideAxis","isBasePlacement","fallbackPlacements","getOppositePlacement","getExpandedPlacements","hasFallbackAxisSideDirection","getOppositeAxisPlacements","placements","overflow","overflows","overflowsData","sides","getAlignmentSides","_middlewareData$flip2","_overflowsData$filter","nextIndex","nextPlacement","d","resetPlacement","a","b","_overflowsData$filter2","currentSideAxis","acc","getSideOffsets","isAnySideFullyClipped","hide","offsets","originSides","convertValueToCoords","alignment","mainAxisMulti","crossAxisMulti","rawValue","mainAxis","crossAxis","_middlewareData$offse","diffCoords","shift","limiter","getOppositeAxis","mainAxisCoord","crossAxisCoord","minSide","maxSide","limitedCoords","limitShift","rawOffset","computedOffset","len","limitMin","limitMax","_middlewareData$offse2","isOriginSide","size","_state$middlewareData","_state$middlewareData2","apply","width","height","heightSide","widthSide","maximumClippingHeight","maximumClippingWidth","overflowAvailableHeight","overflowAvailableWidth","noShift","availableHeight","availableWidth","xMin","xMax","yMin","yMax","nextDimensions"],"mappings":";AAGA,SAASA,EAA2BC,GAAMC,GAAWC,GAAK;AACxD,MAAI;AAAA,IACF,WAAAC;AAAA,IACA,UAAAC;AAAA,EACJ,IAAMJ;AACJ,QAAMK,IAAWC,EAAYL,CAAS,GAChCM,IAAgBC,EAAiBP,CAAS,GAC1CQ,IAAcC,EAAcH,CAAa,GACzCI,IAAOC,EAAQX,CAAS,GACxBY,IAAaR,MAAa,KAC1BS,IAAUX,EAAU,IAAIA,EAAU,QAAQ,IAAIC,EAAS,QAAQ,GAC/DW,IAAUZ,EAAU,IAAIA,EAAU,SAAS,IAAIC,EAAS,SAAS,GACjEY,IAAcb,EAAUM,CAAW,IAAI,IAAIL,EAASK,CAAW,IAAI;AACzE,MAAIQ;AACJ,UAAQN,GAAI;AAAA,IACV,KAAK;AACH,MAAAM,IAAS;AAAA,QACP,GAAGH;AAAA,QACH,GAAGX,EAAU,IAAIC,EAAS;AAAA,MAClC;AACM;AAAA,IACF,KAAK;AACH,MAAAa,IAAS;AAAA,QACP,GAAGH;AAAA,QACH,GAAGX,EAAU,IAAIA,EAAU;AAAA,MACnC;AACM;AAAA,IACF,KAAK;AACH,MAAAc,IAAS;AAAA,QACP,GAAGd,EAAU,IAAIA,EAAU;AAAA,QAC3B,GAAGY;AAAA,MACX;AACM;AAAA,IACF,KAAK;AACH,MAAAE,IAAS;AAAA,QACP,GAAGd,EAAU,IAAIC,EAAS;AAAA,QAC1B,GAAGW;AAAA,MACX;AACM;AAAA,IACF;AACE,MAAAE,IAAS;AAAA,QACP,GAAGd,EAAU;AAAA,QACb,GAAGA,EAAU;AAAA,MACrB;AAAA,EACA;AACE,UAAQe,EAAajB,CAAS,GAAC;AAAA,IAC7B,KAAK;AACH,MAAAgB,EAAOV,CAAa,KAAKS,KAAed,KAAOW,IAAa,KAAK;AACjE;AAAA,IACF,KAAK;AACH,MAAAI,EAAOV,CAAa,KA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