UNPKG

vite-plugin-inspect

Version:

Inspect the intermediate state of Vite plugins

1,533 lines 91.1 kB
import { Fragment, computed, createBaseVNode, createBlock, createCommentVNode, createElementBlock, createTextVNode, createVNode, defineComponent, guardReactiveProps, h, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, openBlock, popScopeId, pushScopeId, ref, renderList, renderSlot, resolveComponent, toDisplayString, toRef, unref, withCtx, withDirectives, withScopeId } from "./runtime-core.esm-bundler-BYdEh_Lp.js"; import { createApp, useRoute, withKeys } from "./vue-router-DP5m7_x8.js"; import { isDark, usePayloadStore, useVirtualList } from "./payload-BKj06nBe.js"; import { Badge_default, PluginName_default, getPluginColor } from "./QuerySelector-CM_pgBDK.js"; import { DurationDisplay_default, NumberWithUnit_default, useOptionsStore } from "./options-C60pcttb.js"; var ByteSizeDisplay_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({ __name: "ByteSizeDisplay", props: { bytes: {} }, setup(__props) { const props = __props; function byteToHumanReadable(byte) { if (byte < 1024) return [byte, "B"]; if (byte < 1024 * 1024) return [(byte / 1024).toFixed(2), "KB"]; if (byte < 1024 * 1024 * 1024) return [(byte / 1024 / 1024).toFixed(2), "MB"]; return [(byte / 1024 / 1024 / 1024).toFixed(2), "GB"]; } const readable = computed(() => byteToHumanReadable(props.bytes)); return (_ctx, _cache) => { const _component_NumberWithUnit = NumberWithUnit_default; return openBlock(), createBlock(_component_NumberWithUnit, { number: unref(readable)[0], unit: unref(readable)[1] }, null, 8, ["number", "unit"]); }; } }); var ByteSizeDisplay_default = ByteSizeDisplay_vue_vue_type_script_setup_true_lang_default; var FileIcon_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({ __name: "FileIcon", props: { filename: {} }, setup(__props) { const props = __props; const map = { angular: "i-catppuccin-angular", vue: "i-catppuccin-vue", js: "i-catppuccin-javascript", mjs: "i-catppuccin-javascript", cjs: "i-catppuccin-javascript", ts: "i-catppuccin-typescript", mts: "i-catppuccin-typescript", cts: "i-catppuccin-typescript", md: "i-catppuccin-markdown", markdown: "i-catppuccin-markdown", mdx: "i-catppuccin-mdx", jsx: "i-catppuccin-javascript-react", tsx: "i-catppuccin-typescript-react", svelte: "i-catppuccin-svelte", html: "i-catppuccin-html", css: "i-catppuccin-css", scss: "i-catppuccin-css", less: "i-catppuccin-less", json: "i-catppuccin-json", yaml: "i-catppuccin-yaml", toml: "i-catppuccin-toml", svg: "i-catppuccin-svg" }; const icon = computed(() => { let file = props.filename; file = file.replace(/(\?|&)v=[^&]*/, "$1").replace(/\?$/, ""); if (file.match(/[\\/]node_modules[\\/]/)) return "i-catppuccin-folder-node-open"; let ext = (file.split(".").pop() || "").toLowerCase(); let icon$1 = map[ext]; if (icon$1) return icon$1; ext = ext.split("?")[0]; icon$1 = map[ext]; if (icon$1) return icon$1; return "i-catppuccin-file"; }); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { "flex-none": "", class: normalizeClass([unref(icon), unref(isDark) ? "" : "brightness-60 hue-rotate-180 invert-100 saturate-200"]) }, null, 2); }; } }); var FileIcon_default = FileIcon_vue_vue_type_script_setup_true_lang_default; /** * Custom positioning reference element. * @see https://floating-ui.com/docs/virtual-elements */ const sides = [ "top", "right", "bottom", "left" ]; const alignments = ["start", "end"]; const placements = /* @__PURE__ */ sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []); const min = Math.min; const max = Math.max; const oppositeSideMap = { left: "right", right: "left", bottom: "top", top: "bottom" }; const oppositeAlignmentMap = { start: "end", end: "start" }; function clamp(start, value, end) { return max(start, min(value, end)); } function evaluate(value, param) { return typeof value === "function" ? value(param) : value; } function getSide(placement) { return placement.split("-")[0]; } function getAlignment(placement) { return placement.split("-")[1]; } function getOppositeAxis(axis) { return axis === "x" ? "y" : "x"; } function getAxisLength(axis) { return axis === "y" ? "height" : "width"; } function getSideAxis(placement) { return ["top", "bottom"].includes(getSide(placement)) ? "y" : "x"; } function getAlignmentAxis(placement) { return getOppositeAxis(getSideAxis(placement)); } function getAlignmentSides(placement, rects, rtl) { if (rtl === void 0) rtl = false; const alignment = getAlignment(placement); const alignmentAxis = getAlignmentAxis(placement); const length = getAxisLength(alignmentAxis); let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top"; if (rects.reference[length] > rects.floating[length]) mainAlignmentSide = getOppositePlacement(mainAlignmentSide); return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)]; } function getExpandedPlacements(placement) { const oppositePlacement = getOppositePlacement(placement); return [ getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement) ]; } function getOppositeAlignmentPlacement(placement) { return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]); } function getSideList(side, isStart, rtl) { const lr = ["left", "right"]; const rl = ["right", "left"]; const tb = ["top", "bottom"]; const bt$1 = ["bottom", "top"]; switch (side) { case "top": case "bottom": if (rtl) return isStart ? rl : lr; return isStart ? lr : rl; case "left": case "right": return isStart ? tb : bt$1; default: return []; } } function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) { const alignment = getAlignment(placement); let list = getSideList(getSide(placement), direction === "start", rtl); if (alignment) { list = list.map((side) => side + "-" + alignment); if (flipAlignment) list = list.concat(list.map(getOppositeAlignmentPlacement)); } return list; } function getOppositePlacement(placement) { return placement.replace(/left|right|bottom|top/g, (side) => oppositeSideMap[side]); } function expandPaddingObject(padding) { return { top: 0, right: 0, bottom: 0, left: 0, ...padding }; } function getPaddingObject(padding) { return typeof padding !== "number" ? expandPaddingObject(padding) : { top: padding, right: padding, bottom: padding, left: padding }; } function rectToClientRect(rect) { const { x: x$2, y: y$2, width, height } = rect; return { width, height, top: y$2, left: x$2, right: x$2 + width, bottom: y$2 + height, x: x$2, y: y$2 }; } function computeCoordsFromPlacement(_ref, placement, rtl) { let { reference, floating } = _ref; const sideAxis = getSideAxis(placement); const alignmentAxis = getAlignmentAxis(placement); const alignLength = getAxisLength(alignmentAxis); const side = getSide(placement); const isVertical = sideAxis === "y"; const commonX = reference.x + reference.width / 2 - floating.width / 2; const commonY = reference.y + reference.height / 2 - floating.height / 2; const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2; let coords; switch (side) { case "top": coords = { x: commonX, y: reference.y - floating.height }; break; case "bottom": coords = { x: commonX, y: reference.y + reference.height }; break; case "right": coords = { x: reference.x + reference.width, y: commonY }; break; case "left": coords = { x: reference.x - floating.width, y: commonY }; break; default: coords = { x: reference.x, y: reference.y }; } switch (getAlignment(placement)) { case "start": coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1); break; case "end": coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1); break; } return coords; } /** * Computes the `x` and `y` coordinates that will place the floating element * next to a given reference element. * * This export does not have any `platform` interface logic. You will need to * write one for the platform you are using Floating UI with. */ const computePosition = async (reference, floating, config) => { const { placement = "bottom", strategy = "absolute", middleware = [], platform } = config; const validMiddleware = middleware.filter(Boolean); const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating)); let rects = await platform.getElementRects({ reference, floating, strategy }); let { x: x$2, y: y$2 } = computeCoordsFromPlacement(rects, placement, rtl); let statefulPlacement = placement; let middlewareData = {}; let resetCount = 0; for (let i$1 = 0; i$1 < validMiddleware.length; i$1++) { const { name, fn } = validMiddleware[i$1]; const { x: nextX, y: nextY, data, reset } = await fn({ x: x$2, y: y$2, initialPlacement: placement, placement: statefulPlacement, strategy, middlewareData, rects, platform, elements: { reference, floating } }); x$2 = nextX != null ? nextX : x$2; y$2 = nextY != null ? nextY : y$2; middlewareData = { ...middlewareData, [name]: { ...middlewareData[name], ...data } }; if (reset && resetCount <= 50) { resetCount++; if (typeof reset === "object") { if (reset.placement) statefulPlacement = reset.placement; if (reset.rects) rects = reset.rects === true ? await platform.getElementRects({ reference, floating, strategy }) : reset.rects; ({x: x$2, y: y$2} = computeCoordsFromPlacement(rects, statefulPlacement, rtl)); } i$1 = -1; } } return { x: x$2, y: y$2, placement: statefulPlacement, strategy, middlewareData }; }; /** * Resolves with an object of overflow side offsets that determine how much the * element is overflowing a given clipping boundary on each side. * - positive = overflowing the boundary by that number of pixels * - negative = how many pixels left before it will overflow * - 0 = lies flush with the boundary * @see https://floating-ui.com/docs/detectOverflow */ async function detectOverflow(state, options) { var _await$platform$isEle; if (options === void 0) options = {}; const { x: x$2, y: y$2, platform, rects, elements, strategy } = state; const { boundary = "clippingAncestors", rootBoundary = "viewport", elementContext = "floating", altBoundary = false, padding = 0 } = evaluate(options, state); const paddingObject = getPaddingObject(padding); const altContext = elementContext === "floating" ? "reference" : "floating"; const element = elements[altBoundary ? altContext : elementContext]; const clippingClientRect = rectToClientRect(await platform.getClippingRect({ 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)), boundary, rootBoundary, strategy })); const rect = elementContext === "floating" ? { x: x$2, y: y$2, width: rects.floating.width, height: rects.floating.height } : rects.reference; const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating)); const offsetScale = await (platform.isElement == null ? void 0 : platform.isElement(offsetParent)) ? await (platform.getScale == null ? void 0 : platform.getScale(offsetParent)) || { x: 1, y: 1 } : { x: 1, y: 1 }; const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({ elements, rect, offsetParent, strategy }) : rect); return { top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y, bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y, left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x, right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x }; } /** * Provides data to position an inner element of the floating element so that it * appears centered to the reference element. * @see https://floating-ui.com/docs/arrow */ const arrow = (options) => ({ name: "arrow", options, async fn(state) { const { x: x$2, y: y$2, placement, rects, platform, elements, middlewareData } = state; const { element, padding = 0 } = evaluate(options, state) || {}; if (element == null) return {}; const paddingObject = getPaddingObject(padding); const coords = { x: x$2, y: y$2 }; const axis = getAlignmentAxis(placement); const length = getAxisLength(axis); const arrowDimensions = await platform.getDimensions(element); const isYAxis = axis === "y"; const minProp = isYAxis ? "top" : "left"; const maxProp = isYAxis ? "bottom" : "right"; const clientProp = isYAxis ? "clientHeight" : "clientWidth"; const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length]; const startDiff = coords[axis] - rects.reference[axis]; const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element)); let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0; if (!clientSize || !await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent))) clientSize = elements.floating[clientProp] || rects.floating[length]; const centerToReference = endDiff / 2 - startDiff / 2; const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1; const minPadding = min(paddingObject[minProp], largestPossiblePadding); const maxPadding = min(paddingObject[maxProp], largestPossiblePadding); const min$1 = minPadding; const max$1 = clientSize - arrowDimensions[length] - maxPadding; const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference; const offset$1 = clamp(min$1, center, max$1); const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset$1 && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0; const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max$1 : 0; return { [axis]: coords[axis] + alignmentOffset, data: { [axis]: offset$1, centerOffset: center - offset$1 - alignmentOffset, ...shouldAddOffset && { alignmentOffset } }, reset: shouldAddOffset }; } }); function getPlacementList(alignment, autoAlignment, allowedPlacements) { const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter((placement) => getAlignment(placement) === alignment), ...allowedPlacements.filter((placement) => getAlignment(placement) !== alignment)] : allowedPlacements.filter((placement) => getSide(placement) === placement); return allowedPlacementsSortedByAlignment.filter((placement) => { if (alignment) return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false); return true; }); } /** * Optimizes the visibility of the floating element by choosing the placement * that has the most space available automatically, without needing to specify a * preferred placement. Alternative to `flip`. * @see https://floating-ui.com/docs/autoPlacement */ const autoPlacement = function(options) { if (options === void 0) options = {}; return { name: "autoPlacement", options, async fn(state) { var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE; const { rects, middlewareData, placement, platform, elements } = state; const { crossAxis = false, alignment, allowedPlacements = placements, autoAlignment = true,...detectOverflowOptions } = evaluate(options, state); const placements$1 = alignment !== void 0 || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements; const overflow = await detectOverflow(state, detectOverflowOptions); const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0; const currentPlacement = placements$1[currentIndex]; if (currentPlacement == null) return {}; const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))); if (placement !== currentPlacement) return { reset: { placement: placements$1[0] } }; const currentOverflows = [ overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]] ]; const allOverflows = [...((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || [], { placement: currentPlacement, overflows: currentOverflows }]; const nextPlacement = placements$1[currentIndex + 1]; if (nextPlacement) return { data: { index: currentIndex + 1, overflows: allOverflows }, reset: { placement: nextPlacement } }; const placementsSortedByMostSpace = allOverflows.map((d$2) => { const alignment$1 = getAlignment(d$2.placement); return [ d$2.placement, alignment$1 && crossAxis ? d$2.overflows.slice(0, 2).reduce((acc, v$1) => acc + v$1, 0) : d$2.overflows[0], d$2.overflows ]; }).sort((a$1, b$2) => a$1[1] - b$2[1]); const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter((d$2) => d$2[2].slice( 0, // Aligned placements should not check their opposite crossAxis // side. getAlignment(d$2[0]) ? 2 : 3 ).every((v$1) => v$1 <= 0)); const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0]; if (resetPlacement !== placement) return { data: { index: currentIndex + 1, overflows: allOverflows }, reset: { placement: resetPlacement } }; return {}; } }; }; /** * Optimizes the visibility of the floating element by flipping the `placement` * in order to keep it in view when the preferred placement(s) will overflow the * clipping boundary. Alternative to `autoPlacement`. * @see https://floating-ui.com/docs/flip */ const flip = function(options) { if (options === void 0) options = {}; return { name: "flip", options, async fn(state) { var _middlewareData$arrow, _middlewareData$flip; const { placement, middlewareData, rects, initialPlacement, platform, elements } = state; const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = true, fallbackPlacements: specifiedFallbackPlacements, fallbackStrategy = "bestFit", fallbackAxisSideDirection = "none", flipAlignment = true,...detectOverflowOptions } = evaluate(options, state); if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) return {}; const side = getSide(placement); const initialSideAxis = getSideAxis(initialPlacement); const isBasePlacement = getSide(initialPlacement) === initialPlacement; const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)); const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement)); const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none"; if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl)); const placements$1 = [initialPlacement, ...fallbackPlacements]; const overflow = await detectOverflow(state, detectOverflowOptions); const overflows = []; let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || []; if (checkMainAxis) overflows.push(overflow[side]); if (checkCrossAxis) { const sides$1 = getAlignmentSides(placement, rects, rtl); overflows.push(overflow[sides$1[0]], overflow[sides$1[1]]); } overflowsData = [...overflowsData, { placement, overflows }]; if (!overflows.every((side$1) => side$1 <= 0)) { var _middlewareData$flip2, _overflowsData$filter; const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1; const nextPlacement = placements$1[nextIndex]; if (nextPlacement) return { data: { index: nextIndex, overflows: overflowsData }, reset: { placement: nextPlacement } }; let resetPlacement = (_overflowsData$filter = overflowsData.filter((d$2) => d$2.overflows[0] <= 0).sort((a$1, b$2) => a$1.overflows[1] - b$2.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement; if (!resetPlacement) switch (fallbackStrategy) { case "bestFit": { var _overflowsData$filter2; const placement$1 = (_overflowsData$filter2 = overflowsData.filter((d$2) => { if (hasFallbackAxisSideDirection) { const currentSideAxis = getSideAxis(d$2.placement); return currentSideAxis === initialSideAxis || currentSideAxis === "y"; } return true; }).map((d$2) => [d$2.placement, d$2.overflows.filter((overflow$1) => overflow$1 > 0).reduce((acc, overflow$1) => acc + overflow$1, 0)]).sort((a$1, b$2) => a$1[1] - b$2[1])[0]) == null ? void 0 : _overflowsData$filter2[0]; if (placement$1) resetPlacement = placement$1; break; } case "initialPlacement": resetPlacement = initialPlacement; break; } if (placement !== resetPlacement) return { reset: { placement: resetPlacement } }; } return {}; } }; }; async function convertValueToCoords(state, options) { const { placement, platform, elements } = state; const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)); const side = getSide(placement); const alignment = getAlignment(placement); const isVertical = getSideAxis(placement) === "y"; const mainAxisMulti = ["left", "top"].includes(side) ? -1 : 1; const crossAxisMulti = rtl && isVertical ? -1 : 1; const rawValue = evaluate(options, state); let { mainAxis, crossAxis, alignmentAxis } = typeof rawValue === "number" ? { mainAxis: rawValue, crossAxis: 0, alignmentAxis: null } : { mainAxis: rawValue.mainAxis || 0, crossAxis: rawValue.crossAxis || 0, alignmentAxis: rawValue.alignmentAxis }; if (alignment && typeof alignmentAxis === "number") crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis; return isVertical ? { x: crossAxis * crossAxisMulti, y: mainAxis * mainAxisMulti } : { x: mainAxis * mainAxisMulti, y: crossAxis * crossAxisMulti }; } /** * Modifies the placement by translating the floating element along the * specified axes. * A number (shorthand for `mainAxis` or distance), or an axes configuration * object may be passed. * @see https://floating-ui.com/docs/offset */ const offset = function(options) { if (options === void 0) options = 0; return { name: "offset", options, async fn(state) { var _middlewareData$offse, _middlewareData$arrow; const { x: x$2, y: y$2, placement, middlewareData } = state; const diffCoords = await convertValueToCoords(state, options); if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) return {}; return { x: x$2 + diffCoords.x, y: y$2 + diffCoords.y, data: { ...diffCoords, placement } }; } }; }; /** * Optimizes the visibility of the floating element by shifting it in order to * keep it in view when it will overflow the clipping boundary. * @see https://floating-ui.com/docs/shift */ const shift = function(options) { if (options === void 0) options = {}; return { name: "shift", options, async fn(state) { const { x: x$2, y: y$2, placement } = state; const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = false, limiter = { fn: (_ref) => { let { x: x$3, y: y$3 } = _ref; return { x: x$3, y: y$3 }; } },...detectOverflowOptions } = evaluate(options, state); const coords = { x: x$2, y: y$2 }; const overflow = await detectOverflow(state, detectOverflowOptions); const crossAxis = getSideAxis(getSide(placement)); const mainAxis = getOppositeAxis(crossAxis); let mainAxisCoord = coords[mainAxis]; let crossAxisCoord = coords[crossAxis]; if (checkMainAxis) { const minSide = mainAxis === "y" ? "top" : "left"; const maxSide = mainAxis === "y" ? "bottom" : "right"; const min$1 = mainAxisCoord + overflow[minSide]; const max$1 = mainAxisCoord - overflow[maxSide]; mainAxisCoord = clamp(min$1, mainAxisCoord, max$1); } if (checkCrossAxis) { const minSide = crossAxis === "y" ? "top" : "left"; const maxSide = crossAxis === "y" ? "bottom" : "right"; const min$1 = crossAxisCoord + overflow[minSide]; const max$1 = crossAxisCoord - overflow[maxSide]; crossAxisCoord = clamp(min$1, crossAxisCoord, max$1); } const limitedCoords = limiter.fn({ ...state, [mainAxis]: mainAxisCoord, [crossAxis]: crossAxisCoord }); return { ...limitedCoords, data: { x: limitedCoords.x - x$2, y: limitedCoords.y - y$2, enabled: { [mainAxis]: checkMainAxis, [crossAxis]: checkCrossAxis } } }; } }; }; /** * Provides data that allows you to change the size of the floating element — * for instance, prevent it from overflowing the clipping boundary or match the * width of the reference element. * @see https://floating-ui.com/docs/size */ const size = function(options) { if (options === void 0) options = {}; return { name: "size", options, async fn(state) { var _state$middlewareData, _state$middlewareData2; const { placement, rects, platform, elements } = state; const { apply = () => {},...detectOverflowOptions } = evaluate(options, state); const overflow = await detectOverflow(state, detectOverflowOptions); const side = getSide(placement); const alignment = getAlignment(placement); const isYAxis = getSideAxis(placement) === "y"; const { width, height } = rects.floating; let heightSide; let widthSide; if (side === "top" || side === "bottom") { heightSide = side; widthSide = alignment === (await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right"; } else { widthSide = side; heightSide = alignment === "end" ? "top" : "bottom"; } const maximumClippingHeight = height - overflow.top - overflow.bottom; const maximumClippingWidth = width - overflow.left - overflow.right; const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight); const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth); const noShift = !state.middlewareData.shift; let availableHeight = overflowAvailableHeight; let availableWidth = overflowAvailableWidth; if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) availableWidth = maximumClippingWidth; if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) availableHeight = maximumClippingHeight; if (noShift && !alignment) { const xMin = max(overflow.left, 0); const xMax = max(overflow.right, 0); const yMin = max(overflow.top, 0); const yMax = max(overflow.bottom, 0); if (isYAxis) availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right)); else availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom)); } await apply({ ...state, availableWidth, availableHeight }); const nextDimensions = await platform.getDimensions(elements.floating); if (width !== nextDimensions.width || height !== nextDimensions.height) return { reset: { rects: true } }; return {}; } }; }; function n$1(t) { var e; return (null == (e = t.ownerDocument) ? void 0 : e.defaultView) || window; } function o(t) { return n$1(t).getComputedStyle(t); } const i = Math.min, r = Math.max, l = Math.round; function c$1(t) { const e = o(t); let n$2 = parseFloat(e.width), i$1 = parseFloat(e.height); const r$1 = t.offsetWidth, c$2 = t.offsetHeight, s$1 = l(n$2) !== r$1 || l(i$1) !== c$2; return s$1 && (n$2 = r$1, i$1 = c$2), { width: n$2, height: i$1, fallback: s$1 }; } function s(t) { return h$2(t) ? (t.nodeName || "").toLowerCase() : ""; } let f; function u() { if (f) return f; const t = navigator.userAgentData; return t && Array.isArray(t.brands) ? (f = t.brands.map((t$1) => t$1.brand + "/" + t$1.version).join(" "), f) : navigator.userAgent; } function a(t) { return t instanceof n$1(t).HTMLElement; } function d$1(t) { return t instanceof n$1(t).Element; } function h$2(t) { return t instanceof n$1(t).Node; } function p(t) { if ("undefined" == typeof ShadowRoot) return !1; return t instanceof n$1(t).ShadowRoot || t instanceof ShadowRoot; } function g$1(t) { const { overflow: e, overflowX: n$2, overflowY: i$1, display: r$1 } = o(t); return /auto|scroll|overlay|hidden|clip/.test(e + i$1 + n$2) && !["inline", "contents"].includes(r$1); } function m$1(t) { return [ "table", "td", "th" ].includes(s(t)); } function y$1(t) { const e = /firefox/i.test(u()), n$2 = o(t), i$1 = n$2.backdropFilter || n$2.WebkitBackdropFilter; return "none" !== n$2.transform || "none" !== n$2.perspective || !!i$1 && "none" !== i$1 || e && "filter" === n$2.willChange || e && !!n$2.filter && "none" !== n$2.filter || ["transform", "perspective"].some((t$1) => n$2.willChange.includes(t$1)) || [ "paint", "layout", "strict", "content" ].some((t$1) => { const e$1 = n$2.contain; return null != e$1 && e$1.includes(t$1); }); } function x$1() { return !/^((?!chrome|android).)*safari/i.test(u()); } function w(t) { return [ "html", "body", "#document" ].includes(s(t)); } function v(t) { return d$1(t) ? t : t.contextElement; } const b$1 = { x: 1, y: 1 }; function L(t) { const e = v(t); if (!a(e)) return b$1; const n$2 = e.getBoundingClientRect(), { width: o$1, height: i$1, fallback: r$1 } = c$1(e); let s$1 = (r$1 ? l(n$2.width) : n$2.width) / o$1, f$1 = (r$1 ? l(n$2.height) : n$2.height) / i$1; return s$1 && Number.isFinite(s$1) || (s$1 = 1), f$1 && Number.isFinite(f$1) || (f$1 = 1), { x: s$1, y: f$1 }; } function E$1(t, e, o$1, i$1) { var r$1, l$1; void 0 === e && (e = !1), void 0 === o$1 && (o$1 = !1); const c$2 = t.getBoundingClientRect(), s$1 = v(t); let f$1 = b$1; e && (i$1 ? d$1(i$1) && (f$1 = L(i$1)) : f$1 = L(t)); const u$1 = s$1 ? n$1(s$1) : window, a$1 = !x$1() && o$1; let h$3 = (c$2.left + (a$1 && (null == (r$1 = u$1.visualViewport) ? void 0 : r$1.offsetLeft) || 0)) / f$1.x, p$1 = (c$2.top + (a$1 && (null == (l$1 = u$1.visualViewport) ? void 0 : l$1.offsetTop) || 0)) / f$1.y, g$2 = c$2.width / f$1.x, m$2 = c$2.height / f$1.y; if (s$1) { const t$1 = n$1(s$1), e$1 = i$1 && d$1(i$1) ? n$1(i$1) : i$1; let o$2 = t$1.frameElement; for (; o$2 && i$1 && e$1 !== t$1;) { const t$2 = L(o$2), e$2 = o$2.getBoundingClientRect(), i$2 = getComputedStyle(o$2); e$2.x += (o$2.clientLeft + parseFloat(i$2.paddingLeft)) * t$2.x, e$2.y += (o$2.clientTop + parseFloat(i$2.paddingTop)) * t$2.y, h$3 *= t$2.x, p$1 *= t$2.y, g$2 *= t$2.x, m$2 *= t$2.y, h$3 += e$2.x, p$1 += e$2.y, o$2 = n$1(o$2).frameElement; } } return { width: g$2, height: m$2, top: p$1, right: h$3 + g$2, bottom: p$1 + m$2, left: h$3, x: h$3, y: p$1 }; } function R(t) { return ((h$2(t) ? t.ownerDocument : t.document) || window.document).documentElement; } function T(t) { return d$1(t) ? { scrollLeft: t.scrollLeft, scrollTop: t.scrollTop } : { scrollLeft: t.pageXOffset, scrollTop: t.pageYOffset }; } function C$1(t) { return E$1(R(t)).left + T(t).scrollLeft; } function F(t) { if ("html" === s(t)) return t; const e = t.assignedSlot || t.parentNode || p(t) && t.host || R(t); return p(e) ? e.host : e; } function W(t) { const e = F(t); return w(e) ? e.ownerDocument.body : a(e) && g$1(e) ? e : W(e); } function D(t, e) { var o$1; void 0 === e && (e = []); const i$1 = W(t), r$1 = i$1 === (null == (o$1 = t.ownerDocument) ? void 0 : o$1.body), l$1 = n$1(i$1); return r$1 ? e.concat(l$1, l$1.visualViewport || [], g$1(i$1) ? i$1 : []) : e.concat(i$1, D(i$1)); } function S$1(e, i$1, l$1) { return "viewport" === i$1 ? rectToClientRect(function(t, e$1) { const o$1 = n$1(t), i$2 = R(t), r$1 = o$1.visualViewport; let l$2 = i$2.clientWidth, c$2 = i$2.clientHeight, s$1 = 0, f$1 = 0; if (r$1) { l$2 = r$1.width, c$2 = r$1.height; const t$1 = x$1(); (t$1 || !t$1 && "fixed" === e$1) && (s$1 = r$1.offsetLeft, f$1 = r$1.offsetTop); } return { width: l$2, height: c$2, x: s$1, y: f$1 }; }(e, l$1)) : d$1(i$1) ? rectToClientRect(function(t, e$1) { const n$2 = E$1(t, !0, "fixed" === e$1), o$1 = n$2.top + t.clientTop, i$2 = n$2.left + t.clientLeft, r$1 = a(t) ? L(t) : { x: 1, y: 1 }; return { width: t.clientWidth * r$1.x, height: t.clientHeight * r$1.y, x: i$2 * r$1.x, y: o$1 * r$1.y }; }(i$1, l$1)) : rectToClientRect(function(t) { const e$1 = R(t), n$2 = T(t), i$2 = t.ownerDocument.body, l$2 = r(e$1.scrollWidth, e$1.clientWidth, i$2.scrollWidth, i$2.clientWidth), c$2 = r(e$1.scrollHeight, e$1.clientHeight, i$2.scrollHeight, i$2.clientHeight); let s$1 = -n$2.scrollLeft + C$1(t); const f$1 = -n$2.scrollTop; return "rtl" === o(i$2).direction && (s$1 += r(e$1.clientWidth, i$2.clientWidth) - l$2), { width: l$2, height: c$2, x: s$1, y: f$1 }; }(R(e))); } function A(t) { return a(t) && "fixed" !== o(t).position ? t.offsetParent : null; } function H$1(t) { const e = n$1(t); let i$1 = A(t); for (; i$1 && m$1(i$1) && "static" === o(i$1).position;) i$1 = A(i$1); return i$1 && ("html" === s(i$1) || "body" === s(i$1) && "static" === o(i$1).position && !y$1(i$1)) ? e : i$1 || function(t$1) { let e$1 = F(t$1); for (; a(e$1) && !w(e$1);) { if (y$1(e$1)) return e$1; e$1 = F(e$1); } return null; }(t) || e; } function O(t, e, n$2) { const o$1 = a(e), i$1 = R(e), r$1 = E$1(t, !0, "fixed" === n$2, e); let l$1 = { scrollLeft: 0, scrollTop: 0 }; const c$2 = { x: 0, y: 0 }; if (o$1 || !o$1 && "fixed" !== n$2) if (("body" !== s(e) || g$1(i$1)) && (l$1 = T(e)), a(e)) { const t$1 = E$1(e, !0); c$2.x = t$1.x + e.clientLeft, c$2.y = t$1.y + e.clientTop; } else i$1 && (c$2.x = C$1(i$1)); return { x: r$1.left + l$1.scrollLeft - c$2.x, y: r$1.top + l$1.scrollTop - c$2.y, width: r$1.width, height: r$1.height }; } const P = { getClippingRect: function(t) { let { element: e, boundary: n$2, rootBoundary: l$1, strategy: c$2 } = t; const f$1 = "clippingAncestors" === n$2 ? function(t$1, e$1) { const n$3 = e$1.get(t$1); if (n$3) return n$3; let i$1 = D(t$1).filter((t$2) => d$1(t$2) && "body" !== s(t$2)), r$1 = null; const l$2 = "fixed" === o(t$1).position; let c$3 = l$2 ? F(t$1) : t$1; for (; d$1(c$3) && !w(c$3);) { const t$2 = o(c$3), e$2 = y$1(c$3); (l$2 ? e$2 || r$1 : e$2 || "static" !== t$2.position || !r$1 || !["absolute", "fixed"].includes(r$1.position)) ? r$1 = t$2 : i$1 = i$1.filter((t$3) => t$3 !== c$3), c$3 = F(c$3); } return e$1.set(t$1, i$1), i$1; }(e, this._c) : [].concat(n$2), u$1 = [...f$1, l$1], a$1 = u$1[0], h$3 = u$1.reduce((t$1, n$3) => { const o$1 = S$1(e, n$3, c$2); return t$1.top = r(o$1.top, t$1.top), t$1.right = i(o$1.right, t$1.right), t$1.bottom = i(o$1.bottom, t$1.bottom), t$1.left = r(o$1.left, t$1.left), t$1; }, S$1(e, a$1, c$2)); return { width: h$3.right - h$3.left, height: h$3.bottom - h$3.top, x: h$3.left, y: h$3.top }; }, convertOffsetParentRelativeRectToViewportRelativeRect: function(t) { let { rect: e, offsetParent: n$2, strategy: o$1 } = t; const i$1 = a(n$2), r$1 = R(n$2); if (n$2 === r$1) return e; let l$1 = { scrollLeft: 0, scrollTop: 0 }, c$2 = { x: 1, y: 1 }; const f$1 = { x: 0, y: 0 }; if ((i$1 || !i$1 && "fixed" !== o$1) && (("body" !== s(n$2) || g$1(r$1)) && (l$1 = T(n$2)), a(n$2))) { const t$1 = E$1(n$2); c$2 = L(n$2), f$1.x = t$1.x + n$2.clientLeft, f$1.y = t$1.y + n$2.clientTop; } return { width: e.width * c$2.x, height: e.height * c$2.y, x: e.x * c$2.x - l$1.scrollLeft * c$2.x + f$1.x, y: e.y * c$2.y - l$1.scrollTop * c$2.y + f$1.y }; }, isElement: d$1, getDimensions: function(t) { return a(t) ? c$1(t) : t.getBoundingClientRect(); }, getOffsetParent: H$1, getDocumentElement: R, getScale: L, async getElementRects(t) { let { reference: e, floating: n$2, strategy: o$1 } = t; const i$1 = this.getOffsetParent || H$1, r$1 = this.getDimensions; return { reference: O(e, await i$1(n$2), o$1), floating: { x: 0, y: 0, ...await r$1(n$2) } }; }, getClientRects: (t) => Array.from(t.getClientRects()), isRTL: (t) => "rtl" === o(t).direction }; const B$1 = (t, n$2, o$1) => { const i$1 = new Map(), r$1 = { platform: P, ...o$1 }, l$1 = { ...r$1.platform, _c: i$1 }; return computePosition(t, n$2, { ...r$1, platform: l$1 }); }; const h$1 = { disabled: !1, distance: 5, skidding: 0, container: "body", boundary: void 0, instantMove: !1, disposeTimeout: 150, popperTriggers: [], strategy: "absolute", preventOverflow: !0, flip: !0, shift: !0, overflowPadding: 0, arrowPadding: 0, arrowOverflow: !0, autoHideOnMousedown: !1, themes: { tooltip: { placement: "top", triggers: [ "hover", "focus", "touch" ], hideTriggers: (e) => [...e, "click"], delay: { show: 200, hide: 0 }, handleResize: !1, html: !1, loadingContent: "..." }, dropdown: { placement: "bottom", triggers: ["click"], delay: 0, handleResize: !0, autoHide: !0 }, menu: { $extend: "dropdown", triggers: ["hover", "focus"], popperTriggers: ["hover"], delay: { show: 0, hide: 400 } } } }; function S(e, t) { let o$1 = h$1.themes[e] || {}, i$1; do i$1 = o$1[t], typeof i$1 > "u" ? o$1.$extend ? o$1 = h$1.themes[o$1.$extend] || {} : (o$1 = null, i$1 = h$1[t]) : o$1 = null; while (o$1); return i$1; } function Ze(e) { const t = [e]; let o$1 = h$1.themes[e] || {}; do o$1.$extend && !o$1.$resetCss ? (t.push(o$1.$extend), o$1 = h$1.themes[o$1.$extend] || {}) : o$1 = null; while (o$1); return t.map((i$1) => `v-popper--theme-${i$1}`); } function re(e) { const t = [e]; let o$1 = h$1.themes[e] || {}; do o$1.$extend ? (t.push(o$1.$extend), o$1 = h$1.themes[o$1.$extend] || {}) : o$1 = null; while (o$1); return t; } let $ = !1; if (typeof window < "u") { $ = !1; try { const e = Object.defineProperty({}, "passive", { get() { $ = !0; } }); window.addEventListener("test", null, e); } catch {} } let _e = !1; typeof window < "u" && typeof navigator < "u" && (_e = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream); const Te = [ "auto", "top", "bottom", "left", "right" ].reduce((e, t) => e.concat([ t, `${t}-start`, `${t}-end` ]), []), pe = { hover: "mouseenter", focus: "focus", click: "click", touch: "touchstart", pointer: "pointerdown" }, ae = { hover: "mouseleave", focus: "blur", click: "click", touch: "touchend", pointer: "pointerup" }; function de(e, t) { const o$1 = e.indexOf(t); o$1 !== -1 && e.splice(o$1, 1); } function G() { return new Promise((e) => requestAnimationFrame(() => { requestAnimationFrame(e); })); } const d = []; let g = null; const le = {}; function he(e) { let t = le[e]; return t || (t = le[e] = []), t; } let Y = function() {}; typeof window < "u" && (Y = window.Element); function n(e) { return function(t) { return S(t.theme, e); }; } const q = "__floating-vue__popper", Q = () => defineComponent({ name: "VPopper", provide() { return { [q]: { parentPopper: this } }; }, inject: { [q]: { default: null } }, props: { theme: { type: String, required: !0 }, targetNodes: { type: Function, required: !0 }, referenceNode: { type: Function, default: null }, popperNode: { type: Function, required: !0 }, shown: { type: Boolean, default: !1 }, showGroup: { type: String, default: null }, ariaId: { default: null }, disabled: { type: Boolean, default: n("disabled") }, positioningDisabled: { type: Boolean, default: n("positioningDisabled") }, placement: { type: String, default: n("placement"), validator: (e) => Te.includes(e) }, delay: { type: [ String, Number, Object ], default: n("delay") }, distance: { type: [Number, String], default: n("distance") }, skidding: { type: [Number, String], default: n("skidding") }, triggers: { type: Array, default: n("triggers") }, showTriggers: { type: [Array, Function], default: n("showTriggers") }, hideTriggers: { type: [Array, Function], default: n("hideTriggers") }, popperTriggers: { type: Array, default: n("popperTriggers") }, popperShowTriggers: { type: [Array, Function], default: n("popperShowTriggers") }, popperHideTriggers: { type: [Array, Function], default: n("popperHideTriggers") }, container: { type: [ String, Object, Y, Boolean ], default: n("container") }, boundary: { type: [String, Y], default: n("boundary") }, strategy: { type: String, validator: (e) => ["absolute", "fixed"].includes(e), default: n("strategy") }, autoHide: { type: [Boolean, Function], default: n("autoHide") }, handleResize: { type: Boolean, default: n("handleResize") }, instantMove: { type: Boolean, default: n("instantMove") }, eagerMount: { type: Boolean, default: n("eagerMount") }, popperClass: { type: [ String, Array, Object ], default: n("popperClass") }, computeTransformOrigin: { type: Boolean, default: n("computeTransformOrigin") }, autoMinSize: { type: Boolean, default: n("autoMinSize") }, autoSize: { type: [Boolean, String], default: n("autoSize") }, autoMaxSize: { type: Boolean, default: n("autoMaxSize") }, autoBoundaryMaxSize: { type: Boolean, default: n("autoBoundaryMaxSize") }, preventOverflow: { type: Boolean, default: n("preventOverflow") }, overflowPadding: { type: [Number, String], default: n("overflowPadding") }, arrowPadding: { type: [Number, String], default: n("arrowPadding") }, arrowOverflow: { type: Boolean, default: n("arrowOverflow") }, flip: { type: Boolean, default: n("flip") }, shift: { type: Boolean, default: n("shift") }, shiftCrossAxis: { type: Boolean, default: n("shiftCrossAxis") }, noAutoFocus: { type: Boolean, default: n("noAutoFocus") }, disposeTimeout: { type: Number, default: n("disposeTimeout") } }, emits: { show: () => !0, hide: () => !0, "update:shown": (e) => !0, "apply-show": () => !0, "apply-hide": () => !0, "close-group": () => !0, "close-directive": () => !0, "auto-hide": () => !0, resize: () => !0 }, data() { return { isShown: !1, isMounted: !1, skipTransition: !1, classes: { showFrom: !1, showTo: !1, hideFrom: !1, hideTo: !0 }, result: { x: 0, y: 0, placement: "", strategy: this.strategy, arrow: { x: 0, y: 0, centerOffset: 0 }, transformOrigin: null }, randomId: `popper_${[Math.random(), Date.now()].map((e) => e.toString(36).substring(2, 10)).join("_")}`, shownChildren: /* @__PURE__ */ new Set(), lastAutoHide: !0, pendingHide: !1, containsGlobalTarget: !1, isDisposed: !0, mouseDownContains: !1 }; }, computed: { popperId() { return this.ariaId != null ? this.ariaId : this.randomId; }, shouldMountContent() { return this.eagerMount || this.isMounted; }, slotData() { return { popperId: this.popperId, isShown: this.isShown, shouldMountContent: this.shouldMountContent, skipTransition: this.skipTransition, autoHide: typeof this.autoHide == "function" ? this.lastAutoHide : this.autoHide, show: this.show, hide: this.hide, handleResize: this.handleResize, onResize: this.onResize, classes: { ...this.classes, popperClass: this.popperClass }, result: this.positioningDisabled ? null : this.result, attrs: this.$attrs }; }, parentPopper() { var e; return (e = this[q]) == null ? void 0 : e.parentPopper; }, hasPopperShowTriggerHover() { var e, t; return ((e = this.popperTriggers) == null ? void 0 : e.includes("hover")) || ((t = this.popperShowTriggers) == null ? void 0 : t.includes("hover")); } }, watch: { shown: "$_autoShowHide", disabled(e) { e ? this.dispose() : this.init(); }, async container() { this.isShown && (this.$_ensureTeleport(), await this.$_computePosition()); }, triggers: { handler: "$_refreshListeners", deep: !0 }, positioningDisabled: "$_refreshListeners", ...[ "placement", "distance", "skidding", "boundary", "strategy", "overflowPadding", "arrowPadding", "preventOverflow", "shift", "shiftCrossAxis", "flip" ].reduce((e, t) => (e[t] = "$_computePosition", e), {}) }, created() { this.autoMinSize && console.warn("[floating-vue] `autoMinSize` option is deprecated. Use `autoSize=\"min\"` instead."), this.autoMaxSize && console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead."); }, mounted() { this.init(), this.$_detachPopperNode(); }, activated() { this.$_autoShowHide(); }, deactivated() { this.hide(); }, beforeUnmount() { this.dispose(); }, methods: { show({ event: e = null, skipDelay: t = !1, force: o$1 = !1 } = {}) { var i$1, s$1; (i$1 = this.parentPopper) != null && i$1.lockedChild && this.parentPopper.lockedChild !== this || (this.pendingHide = !1, (o$1 || !this.disabled) && (((s$1 = this.parentPopper) == null ? void 0 : s$1.lockedChild) === this && (this.parentPopper.lockedChild = null), this.$_scheduleShow(e, t), this.$emit("show"), this.$_showFrameLocked = !0, requestAnimationFrame(() => { this.$_showFrameLocked = !1; })), this.$emit("update:shown", !0)); }, hide({ event: e = null, skipDelay: t = !1 } = {}) { var o$1; if (!this.$_hideInProgress) { if (this.shownChildren.size > 0) { this.pendingHide = !0; return; } if (this.hasPopperShowTriggerHover && this.$_isAimingPopper()) { this.parentPopper && (this.parentPopper.lockedChild = this, clearTimeout(this.parentPopper.lockedChildTimer), this.parentPopper.lockedChildTimer = setTimeout(() => { this.parentPopper.lockedChild === this && (this.parentPopper.lockedChild.hide({ skipDelay: t }), this.parentPopper.lockedChild = null); }, 1e3)); return; } ((o$1 = this.parentPopper) == null ? void 0 : o$1.lockedChild) === this && (this.parentPopper.lockedChild = null), this.pendingHide = !1, this.$_scheduleHide(e, t), this.$emit("hide"), this.$emit("update:shown", !1); } }, init() { var e; this.isDisposed && (this.isDisposed = !1, this.isMounted = !1, this.$_events = [], this.$_preventShow = !1, this.$_referenceNode = ((e = this.referenceNode) == null ? void 0 : e.call(this)) ?? this.$el, this.$_targetNodes = this.targetNodes().filter((t) => t.nodeType === t.ELEMENT_NODE), this.$_popperNode = this.popperNode(), this.$_innerNode = this.$_popperNode.querySelector(".v-popper__inner"), this.$_arrowNode = this.$_popperNode.querySelector(".v-popper__arrow-container"), this.$_swapTargetAttrs("title", "data-original-title"), this.$_detachPopperNode(), this.triggers.length && this.$_addEventListeners(), this.shown && this.show()); }, dispose() { this.isDisposed || (this.isDisposed = !0, this.$_removeEventListeners(), this.hide({ skipDelay: !0 }), this.$_detachPopperNode(), this.isMounted = !1, this.isShown = !1, this.$_updateParentShownChildren(!1), this.$_swapTargetAttrs("data-original-title", "title")); }, async onResize() { this.isShown && (await this.$_computePosition(), this.$emit("resize")); }, async $_computePosition() { if (this.isDisposed || this.positioningDisabled) return; const e = { strategy: this.strategy, middleware: [] }; (this.distance || this.skidding) && e.middleware.push(offset({ mainAxis: this.distance, crossAxis: this.skidding })); const t = this.placement.startsWith("auto"); if (t ? e.middleware.push(autoPlacement({ alignment: this.placement.split("-")[1] ?? "" })) : e.placement = this.placement, this.preventOverflow && (this.shift && e.middleware.push(shift({ padding: this.overflowPadding, boundary: this.boundary, crossAxis: this.shiftCrossAxis })), !t && this.flip && e.middleware.push(flip({ padding: this.overflowPadding, boundary: this.boundary }))), e.middleware.push(arrow({ element: th