import "./Menu.css";
import {box as $9b405e0f8095dce0$export$827f4ee28efc37, iconStyles as $9b405e0f8095dce0$export$2c99b98b77550cb4} from "./Checkbox.mjs";
import {centerBaseline as $1f4b04be3f24aae3$export$9d7e2342a7e53afa} from "./CenterBaseline.mjs";
import $81cf3d4588736e7d$export$2e2bcd8739ae039 from "./Checkmark.mjs";
import $4b69f02ec06b9226$export$2e2bcd8739ae039 from "./Chevron.mjs";
import {divider as $bdf52657dac0f070$export$e8c9778bf415dd08} from "./Divider.mjs";
import {HeaderContext as $8e847109a6ab556d$export$e0e4026c12a8bdbb, HeadingContext as $8e847109a6ab556d$export$d688439359537581, KeyboardContext as $8e847109a6ab556d$export$744d98a3b8a94e1c, Text as $8e847109a6ab556d$export$5f1af8db9871e1d6, TextContext as $8e847109a6ab556d$export$9afb8bc826b033ea} from "./Content.mjs";
import {IconContext as $ac8c32e6775ddd1f$export$a49f528ae1a4d0ed} from "../icons/Icon.mjs";
import {ImageContext as $dbd6f0b2503b938c$export$8151eb379fcf2442} from "./Image.mjs";
import $4c8f17dac3ecefd9$export$2e2bcd8739ae039 from "../icons/InfoCircle.mjs";
import {InPopoverContext as $88b746eba92c8d0d$export$60dfb2c3202ad27d, Popover as $88b746eba92c8d0d$export$5b6b19405a83ff9d, PopoverContext as $88b746eba92c8d0d$export$9b9a0cd73afb7ca4} from "./Popover.mjs";
import $g2Qzl$intlStringsmjs from "./intlStrings.mjs";
import $d9f847a2895a93dc$export$2e2bcd8739ae039 from "./LinkOut.mjs";
import {mergeStyles as $feb886035e0d4633$export$e618dc39ac9ad607} from "../icons/runtime.mjs";
import {pressScale as $10ea7662e51a285b$export$56e8cba416805d8d} from "./pressScale.mjs";
import {useSpectrumContextProps as $5ce63c423902f47d$export$764f6146fadd77f7} from "../icons/useSpectrumContextProps.mjs";
import {jsx as $g2Qzl$jsx, jsxs as $g2Qzl$jsxs, Fragment as $g2Qzl$Fragment} from "react/jsx-runtime";
import {Provider as $g2Qzl$Provider, Menu as $g2Qzl$Menu, Separator as $g2Qzl$Separator, MenuSection as $g2Qzl$MenuSection, MenuItem as $g2Qzl$MenuItem, DEFAULT_SLOT as $g2Qzl$DEFAULT_SLOT, MenuTrigger as $g2Qzl$MenuTrigger, SubmenuTrigger as $g2Qzl$SubmenuTrigger} from "react-aria-components";
import {createContext as $g2Qzl$createContext, forwardRef as $g2Qzl$forwardRef, useContext as $g2Qzl$useContext, useRef as $g2Qzl$useRef, useState as $g2Qzl$useState} from "react";
import {useLocale as $g2Qzl$useLocale} from "react-aria";
import {PressResponder as $g2Qzl$PressResponder} from "@react-aria/interactions";
import {useId as $g2Qzl$useId, useGlobalListeners as $g2Qzl$useGlobalListeners} from "@react-aria/utils";
import {useLocalizedStringFormatter as $g2Qzl$useLocalizedStringFormatter} from "@react-aria/i18n";


function $parcel$interopDefault(a) {
  return a && a.__esModule ? a.default : a;
}
/*
 * Copyright 2024 Adobe. All rights reserved.
 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License. You may obtain a copy
 * of the License at http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
 * OF ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */ 





















const $13afb0ea5f0ed767$export$c7e742effb1c51e2 = /*#__PURE__*/ (0, $g2Qzl$createContext)(null);
const $13afb0ea5f0ed767$var$menuItemGrid = {
    size: {
        S: [
            "calc(1.5rem * 3 / 8)",
            'auto',
            'auto',
            'minmax(0, 1fr)',
            'auto',
            'auto',
            'auto',
            "calc(1.5rem * 3 / 8)"
        ],
        M: [
            "calc(2rem * 3 / 8)",
            'auto',
            'auto',
            'minmax(0, 1fr)',
            'auto',
            'auto',
            'auto',
            "calc(2rem * 3 / 8)"
        ],
        L: [
            "calc(2.5rem * 3 / 8)",
            'auto',
            'auto',
            'minmax(0, 1fr)',
            'auto',
            'auto',
            'auto',
            "calc(2.5rem * 3 / 8)"
        ],
        XL: [
            "calc(3rem * 3 / 8)",
            'auto',
            'auto',
            'minmax(0, 1fr)',
            'auto',
            'auto',
            'auto',
            "calc(3rem * 3 / 8)"
        ]
    }
};
let $13afb0ea5f0ed767$export$b1e5508a851be14d = function anonymous(props, overrides) {
    let rules = " ";
    let width = false;
    let maxWidth = false;
    let matches = String(overrides || '').matchAll(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|_6|Z|N|L)[^\s]+/g);
    for (let p of matches){
        if (p[1] === "Z") width = true;
        if (p[1] === "L") maxWidth = true;
        rules += p[0];
    }
    rules += ' _Le12';
    rules += ' se12';
    if (props.size === "XL") rules += ' Dk92HIe12';
    else if (props.size === "L") rules += ' DyaX9Fb12';
    else if (props.size === "M") rules += ' Deb5jcb12';
    else if (props.size === "S") rules += ' DGTLJAe12';
    rules += ' _oa12';
    rules += ' K40ub4c12';
    if (!width) rules += ' Za12';
    if (props.isPopover) rules += ' _Na12';
    if (props.isPopover) rules += ' Pa12';
    if (props.isPopover) {
        if (!maxWidth) rules += ' Lh12';
    }
    if (props.isPopover) rules += ' Tt12';
    if (props.isPopover) rules += ' Qt12';
    if (props.isPopover) rules += ' St12';
    if (props.isPopover) rules += ' Rt12';
    rules += ' uk12';
    rules += ' ucJ9TBTb12';
    rules += ' ud3Euai12';
    rules += ' uea12';
    rules += ' ugb12';
    rules += ' uhd12';
    rules += ' uje12';
    rules += ' u2NhKxcl12';
    rules += ' uic12';
    if (props.size === "XL") {
        rules += ' -_6BNtrc-e12';
        rules += ' vx12';
    } else if (props.size === "L") {
        rules += ' -_6BNtrc-d12';
        rules += ' vx12';
    } else if (props.size === "S") {
        rules += ' -_6BNtrc-b12';
        rules += ' vx12';
    } else if (props.size === "XS") {
        rules += ' -_6BNtrc-a12';
        rules += ' vx12';
    } else {
        rules += ' -_6BNtrc-c12';
        rules += ' vx12';
    }
    rules += ' __ya12';
    return rules;
};
let $13afb0ea5f0ed767$export$fe2e36411d703b3d = function anonymous(props) {
    let rules = " ";
    rules += ' z2mU12';
    rules += ' yzZKy12';
    rules += ' eb12';
    rules += ' se12';
    rules += ' CcAc39c12';
    if (props.size === "XL") rules += ' Dk92HIe12';
    else if (props.size === "L") rules += ' DyaX9Fb12';
    else if (props.size === "M") rules += ' Deb5jcb12';
    else if (props.size === "S") rules += ' DGTLJAe12';
    return rules;
};
let $13afb0ea5f0ed767$export$562e61a0817eb32e = function anonymous(props) {
    let rules = " ";
    rules += ' pt12';
    rules += ' z3mU12';
    rules += ' yAZKy12';
    rules += ' _oa12';
    rules += ' MAyFGYc12';
    rules += ' Tu7Fubd12';
    rules += ' Qu7Fubd12';
    if (props.size === "XL") rules += ' -M_-Mk12';
    else if (props.size === "L") rules += ' -M_-Mh12';
    else if (props.size === "S") rules += ' -M_-Mg12';
    else if (props.size === "XS") rules += ' -M_-Mf12';
    else rules += ' -M_-Mi12';
    return rules;
};
let $13afb0ea5f0ed767$export$300ac6f106ef584d = " uk12 ucJ9TBTb12 ud3Euai12 uea12 ugb12 uhd12 uje12 u2NhKxcl12 uic12 -_6BNtrc-c12 vx12 xd12 _xa12 xX0cczbc12 _xX0cczba12 _Fd12 _FnuYUweb12 pt12 Jy12 Gy12 Iy12 Hy12";
let $13afb0ea5f0ed767$export$f68e44d881264486 = function anonymous(props, overrides) {
    let rules = " ";
    let minWidth = false;
    let position = false;
    let gridColumnStart = false;
    let gridColumnEnd = false;
    let matches = String(overrides || '').matchAll(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|_6|Z|N|L)[^\s]+/g);
    for (let p of matches){
        if (p[1] === "N") minWidth = true;
        if (p[1] === "_P") position = true;
        if (p[1] === "z") gridColumnStart = true;
        if (p[1] === "y") gridColumnEnd = true;
        rules += p[0];
    }
    if (props.isFocusVisible) rules += ' _Lf12';
    else rules += ' _Le12';
    rules += ' Oh12';
    rules += ' Olc12';
    rules += ' _Mc12';
    rules += ' _Kd12';
    if (props.size === "XL") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "L") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "S") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "XS") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    }
    if (props.size === "XL") {
        rules += ' -_6BNtrc-e12';
        rules += ' vx12';
    } else if (props.size === "L") {
        rules += ' -_6BNtrc-d12';
        rules += ' vx12';
    } else if (props.size === "S") {
        rules += ' -_6BNtrc-b12';
        rules += ' vx12';
    } else if (props.size === "XS") {
        rules += ' -_6BNtrc-a12';
        rules += ' vx12';
    } else {
        rules += ' -_6BNtrc-c12';
        rules += ' vx12';
    }
    if (props.size === "XL") {
        rules += ' xb12';
        rules += ' _xa12';
    } else if (props.size === "L") {
        rules += ' xb12';
        rules += ' _xa12';
    } else if (props.size === "S") {
        rules += ' xb12';
        rules += ' _xa12';
    } else if (props.size === "XS") {
        rules += ' xb12';
        rules += ' _xa12';
    } else {
        rules += ' xb12';
        rules += ' _xa12';
    }
    if (props.size === "XL") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "L") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "S") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "XS") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    }
    if (props.isDisabled) {
        rules += ' pp12';
        rules += ' plc12';
    } else {
        if (props.isPressed) rules += ' po12';
        else if (props.isFocusVisible) rules += ' po12';
        else if (props.isHovered) rules += ' po12';
        else rules += ' pt12';
        if (props.isFocused) rules += ' ple12';
        else rules += ' plb12';
    }
    rules += ' se12';
    rules += ' ea12';
    rules += ' egLWx3bb12';
    rules += ' _oa12';
    rules += ' Sd12';
    rules += ' Rd12';
    if (props.size === "XL") {
        if (!minWidth) rules += ' Nl12';
    } else if (props.size === "L") {
        if (!minWidth) rules += ' Nj12';
    } else if (props.size === "S") {
        if (!minWidth) rules += ' Nf12';
    } else if (props.size === "XS") {
        if (!minWidth) rules += ' Ne12';
    } else if (!minWidth) rules += ' Nk12';
    if (props.size === "XL") rules += ' -SFnbic-_JaP8ec12';
    else if (props.size === "L") rules += ' -SFnbic-_J0K2hn12';
    else if (props.size === "S") rules += ' -SFnbic-_JJOW22b12';
    else if (props.size === "XS") rules += ' -SFnbic-_JICefdd12';
    else rules += ' -SFnbic-_Jb12';
    rules += ' -Bu7z1c-ob12';
    rules += ' oj12';
    rules += ' nj12';
    rules += ' kj12';
    rules += ' jj12';
    rules += ' qh12';
    rules += ' -Qg41Lb-IAxCW0c12';
    rules += ' -Qg41Lb-gLWx3bIy12';
    rules += ' MAyFGYc12';
    rules += ' Td12';
    rules += ' QAzEcG12';
    rules += ' -aRvJDd-Tu7Fubd12';
    if (props.isFocused) {
        rules += ' gF12';
        rules += ' gle12';
    } else rules += ' g912';
    if (!position) rules += ' _Pc12';
    if (!gridColumnStart) rules += ' z2mU12';
    if (!gridColumnEnd) rules += ' yzZKy12';
    rules += ' CcAc39c12';
    rules += ' DLwlgod12';
    rules += ' EpvfBwb12';
    rules += ' EDNKd2dZQmDFe12';
    rules += ' UDNKd2dai5a012';
    rules += ' FF12';
    rules += ' _Xa12';
    if (props.isLink) rules += ' ry12';
    else rules += ' ri12';
    rules += ' Yd12';
    rules += ' Xb12';
    rules += ' _2b12';
    rules += ' _yb12';
    if (props.size === "XL") rules += ' -M_-Mk12';
    else if (props.size === "L") rules += ' -M_-Mh12';
    else if (props.size === "S") rules += ' -M_-Mg12';
    else if (props.size === "XS") rules += ' -M_-Mf12';
    else rules += ' -M_-Mi12';
    return rules;
};
let $13afb0ea5f0ed767$export$292abbf31ed842a = function anonymous(props) {
    let rules = " ";
    if (props.isSelected) rules += ' _6c12';
    else rules += ' _6b12';
    rules += ' z2CW8rb12';
    rules += ' y2CW8rb12';
    rules += ' B2CW8rb12';
    rules += ' A2CW8rb12';
    if (props.isPressed) rules += ' ps12';
    else if (props.isFocusVisible) rules += ' ps12';
    else if (props.isHovered) rules += ' ps12';
    else rules += ' pu12';
    rules += ' -_8sjo0b-t5ZbAob12';
    if (props.isFocused) rules += ' -_8sjo0b-lt8pvGJ12';
    else rules += ' -_8sjo0b-lta12';
    rules += ' Hw12';
    rules += ' fa12';
    return rules;
};
let $13afb0ea5f0ed767$export$b07e517d22efa1ca = " z2CW8rb12 y2CW8rb12 B2CW8rb12 A2CW8rb12 Hw12";
let $13afb0ea5f0ed767$export$1ca1ec8b29a4ce27 = " sb12 ZuUmpre12 FuUmpre12 Ht12 Hsu12 -_8sjo0b-t5ZbAob12";
let $13afb0ea5f0ed767$export$31d1842a0fd736e6 = " sd12 z2U5Crc12 y2U5Crc12 B2U5Crc12 A2U5Crc12";
let $13afb0ea5f0ed767$var$image = function anonymous(props) {
    let rules = " ";
    rules += ' z2U5Crc12';
    rules += ' y2U5Crc12';
    rules += ' B2U5Crc12';
    rules += ' AvoofG12';
    rules += ' Ht12';
    rules += ' Hsu12';
    rules += ' Jt12';
    rules += ' _dc12';
    rules += ' oa12';
    rules += ' na12';
    rules += ' ka12';
    rules += ' ja12';
    if (props.size === "XL") rules += ' ZF12';
    else if (props.size === "L") rules += ' Zx12';
    else if (props.size === "M") rules += ' Zw12';
    else if (props.size === "S") rules += ' ZC12';
    else rules += ' Zw12';
    if (props.size === "XL") rules += ' Fz12';
    else if (props.size === "L") rules += ' Fw12';
    else if (props.size === "M") rules += ' Fv12';
    else if (props.size === "S") rules += ' Fx12';
    else rules += ' Fv12';
    rules += ' fa12';
    rules += ' _Ha12';
    return rules;
};
let $13afb0ea5f0ed767$export$1237798dc640739a = function anonymous(props) {
    let rules = " ";
    rules += ' zv6x9r12';
    rules += ' yv6x9r12';
    rules += ' Bv6x9r12';
    rules += ' Av6x9r12';
    if (props.size === "XL") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "L") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "S") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "XS") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    }
    if (props.size === "XL") {
        rules += ' -_6BNtrc-e12';
        rules += ' vx12';
    } else if (props.size === "L") {
        rules += ' -_6BNtrc-d12';
        rules += ' vx12';
    } else if (props.size === "S") {
        rules += ' -_6BNtrc-b12';
        rules += ' vx12';
    } else if (props.size === "XS") {
        rules += ' -_6BNtrc-a12';
        rules += ' vx12';
    } else {
        rules += ' -_6BNtrc-c12';
        rules += ' vx12';
    }
    rules += ' xc12';
    rules += ' _xa12';
    if (props.size === "XL") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "L") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "S") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "XS") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    }
    rules += ' p40ub4c12';
    rules += ' JAzEcG12';
    return rules;
};
let $13afb0ea5f0ed767$export$6d59db4903f20f7d = function anonymous(props) {
    let rules = " ";
    rules += ' z9u7zPc12';
    rules += ' y9u7zPc12';
    rules += ' B9u7zPc12';
    rules += ' A9u7zPc12';
    if (props.size === "XL") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "L") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "M") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "S") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    }
    if (props.size === "XL") {
        rules += ' -_6BNtrc-d12';
        rules += ' vx12';
    } else if (props.size === "L") {
        rules += ' -_6BNtrc-c12';
        rules += ' vx12';
    } else if (props.size === "M") {
        rules += ' -_6BNtrc-b12';
        rules += ' vx12';
    } else if (props.size === "S") {
        rules += ' -_6BNtrc-a12';
        rules += ' vx12';
    } else {
        rules += ' -_6BNtrc-b12';
        rules += ' vx12';
    }
    if (props.size === "XL") {
        rules += ' xb12';
        rules += ' _xa12';
    } else if (props.size === "L") {
        rules += ' xb12';
        rules += ' _xa12';
    } else if (props.size === "M") {
        rules += ' xb12';
        rules += ' _xa12';
    } else if (props.size === "S") {
        rules += ' xb12';
        rules += ' _xa12';
    } else {
        rules += ' xb12';
        rules += ' _xa12';
    }
    if (props.size === "XL") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "L") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "M") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "S") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    }
    if (props.isDisabled) rules += ' pp12';
    else if (props.isFocused) rules += ' pt12';
    else {
        if (props.isPressed) rules += ' pt12';
        else if (props.isFocusVisible) rules += ' pt12';
        else if (props.isHovered) rules += ' pt12';
        else rules += ' pv12';
    }
    rules += ' Yd12';
    rules += ' Xb12';
    rules += ' _2b12';
    return rules;
};
let $13afb0ea5f0ed767$var$value = " z8bmXs12 y8bmXs12 B8bmXs12 A8bmXs12 Iv12";
let $13afb0ea5f0ed767$var$keyboard = function anonymous(props) {
    let rules = " ";
    rules += ' z45MTAd12';
    rules += ' y45MTAd12';
    rules += ' B45MTAd12';
    rules += ' A45MTAd12';
    rules += ' Iv12';
    rules += ' uk12';
    rules += ' ucJ9TBTb12';
    rules += ' ud3Euai12';
    rules += ' uea12';
    rules += ' ugb12';
    rules += ' uhd12';
    rules += ' uje12';
    rules += ' u2NhKxcl12';
    rules += ' uic12';
    rules += ' -_6BNtrc-c12';
    rules += ' vx12';
    rules += ' xb12';
    rules += ' _xa12';
    rules += ' _Fd12';
    rules += ' _FnuYUweb12';
    if (props.isDisabled) rules += ' pp12';
    else rules += ' pn12';
    if (props.isDisabled) rules += ' plc12';
    rules += ' _Wb12';
    rules += ' _3f12';
    return rules;
};
let $13afb0ea5f0ed767$var$descriptor = " z0cdLvd12 y0cdLvd12 B0cdLvd12 A0cdLvd12 _dd12 __Ac12 Iv12 -_8sjo0b-t5ZbAob12";
let $13afb0ea5f0ed767$var$descriptorIcon = function anonymous(props) {
    let rules = " ";
    rules += ' Hy12';
    rules += ' sb12';
    if (props.size === "XL") rules += ' Zp12';
    else if (props.size === "L") rules += ' Zo12';
    else if (props.size === "M") rules += ' Zm12';
    else if (props.size === "S") rules += ' Zu12';
    if (props.size === "XL") rules += ' Fq12';
    else if (props.size === "L") rules += ' Fp12';
    else if (props.size === "M") rules += ' Fn12';
    else if (props.size === "S") rules += ' Ft12';
    return rules;
};
let $13afb0ea5f0ed767$var$InternalMenuContext = /*#__PURE__*/ (0, $g2Qzl$createContext)({
    size: 'M',
    isSubmenu: false,
    hideLinkOutIcon: false
});
let $13afb0ea5f0ed767$var$InternalMenuTriggerContext = /*#__PURE__*/ (0, $g2Qzl$createContext)(null);
let $13afb0ea5f0ed767$var$UnavailableContext = /*#__PURE__*/ (0, $g2Qzl$createContext)(false);
let $13afb0ea5f0ed767$var$wrappingDiv = " sd12 Za12 Fb12";
const $13afb0ea5f0ed767$export$d9b273488cd8ce6f = /*#__PURE__*/ (0, $g2Qzl$forwardRef)(function Menu(props, ref) {
    [props, ref] = (0, $5ce63c423902f47d$export$764f6146fadd77f7)(props, ref, $13afb0ea5f0ed767$export$c7e742effb1c51e2);
    let { isSubmenu: isSubmenu, size: ctxSize } = (0, $g2Qzl$useContext)($13afb0ea5f0ed767$var$InternalMenuContext);
    let { children: children, size: size = ctxSize, UNSAFE_style: UNSAFE_style, UNSAFE_className: UNSAFE_className, styles: styles, hideLinkOutIcon: hideLinkOutIcon = false } = props;
    let ctx = (0, $g2Qzl$useContext)($13afb0ea5f0ed767$var$InternalMenuTriggerContext);
    let inPopover = (0, $g2Qzl$useContext)((0, $88b746eba92c8d0d$export$60dfb2c3202ad27d));
    let isPopover = (ctx || isSubmenu) && !inPopover;
    let content = /*#__PURE__*/ (0, $g2Qzl$jsx)($13afb0ea5f0ed767$var$InternalMenuContext.Provider, {
        value: {
            size: size,
            isSubmenu: true,
            hideLinkOutIcon: hideLinkOutIcon
        },
        children: /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $g2Qzl$Provider), {
            values: [
                [
                    (0, $8e847109a6ab556d$export$e0e4026c12a8bdbb),
                    {
                        styles: $13afb0ea5f0ed767$export$562e61a0817eb32e({
                            size: size
                        })
                    }
                ],
                [
                    (0, $8e847109a6ab556d$export$d688439359537581),
                    {
                        // @ts-ignore
                        role: 'presentation',
                        styles: $13afb0ea5f0ed767$export$300ac6f106ef584d
                    }
                ],
                [
                    (0, $8e847109a6ab556d$export$9afb8bc826b033ea),
                    {
                        slots: {
                            'description': {
                                styles: $13afb0ea5f0ed767$export$6d59db4903f20f7d({
                                    size: size
                                })
                            }
                        }
                    }
                ],
                [
                    (0, $88b746eba92c8d0d$export$60dfb2c3202ad27d),
                    false
                ]
            ],
            children: /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $g2Qzl$Menu), {
                ...props,
                className: $13afb0ea5f0ed767$export$b1e5508a851be14d({
                    size: size,
                    isPopover: isPopover
                }, isPopover ? null : styles),
                children: children
            })
        })
    });
    if (isPopover) return /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $88b746eba92c8d0d$export$5b6b19405a83ff9d), {
        ref: ref,
        padding: "none",
        hideArrow: true,
        children: /*#__PURE__*/ (0, $g2Qzl$jsx)("div", {
            style: UNSAFE_style,
            className: (UNSAFE_className || '') + $13afb0ea5f0ed767$var$wrappingDiv,
            children: content
        })
    });
    return content;
});
function $13afb0ea5f0ed767$export$2e0a83ec2e27ecbb(props) {
    return /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $g2Qzl$Separator), {
        ...props,
        className: (0, $feb886035e0d4633$export$e618dc39ac9ad607)((0, $bdf52657dac0f070$export$e8c9778bf415dd08)({
            size: 'M',
            orientation: 'horizontal',
            isStaticColor: false
        }), " se12 skk12 z3mU12 yAZKy12 JydxGIe12 GydxGIe12")
    });
}
function $13afb0ea5f0ed767$export$4b1545b4f2016d26(props) {
    // remember, context doesn't work if it's around Section nor inside
    let { size: size } = (0, $g2Qzl$useContext)($13afb0ea5f0ed767$var$InternalMenuContext);
    return /*#__PURE__*/ (0, $g2Qzl$jsxs)((0, $g2Qzl$Fragment), {
        children: [
            /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $g2Qzl$MenuSection), {
                ...props,
                className: $13afb0ea5f0ed767$export$fe2e36411d703b3d({
                    size: size
                }),
                children: props.children
            }),
            /*#__PURE__*/ (0, $g2Qzl$jsx)($13afb0ea5f0ed767$export$2e0a83ec2e27ecbb, {})
        ]
    });
}
const $13afb0ea5f0ed767$var$checkmarkIconSize = {
    S: 'XS',
    M: 'M',
    L: 'L',
    XL: 'XL'
};
const $13afb0ea5f0ed767$var$linkIconSize = {
    S: 'M',
    M: 'L',
    L: 'XL',
    XL: 'XL'
};
function $13afb0ea5f0ed767$var$UnavailableIconWrapper(props1) {
    let { direction: direction, size: size, id: id } = props1;
    let stringFormatter = (0, $g2Qzl$useLocalizedStringFormatter)((0, ($parcel$interopDefault($g2Qzl$intlStringsmjs))), '@react-spectrum/s2');
    return /*#__PURE__*/ (0, $g2Qzl$jsx)("div", {
        slot: "descriptor",
        className: (0, $feb886035e0d4633$export$e618dc39ac9ad607)($13afb0ea5f0ed767$var$descriptor, " Gy3v5sb12"),
        id: id,
        children: /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $g2Qzl$Provider), {
            values: [
                [
                    (0, $ac8c32e6775ddd1f$export$a49f528ae1a4d0ed),
                    {
                        slots: {
                            icon: {
                                styles: $13afb0ea5f0ed767$var$descriptorIcon({
                                    size: size
                                })
                            }
                        }
                    }
                ]
            ],
            children: /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $4c8f17dac3ecefd9$export$2e2bcd8739ae039), {
                "aria-label": stringFormatter.format('menu.unavailable'),
                className: function anonymous(props) {
                    let rules = " ";
                    if (props.direction === "rtl") {
                        rules += ' -Z4Pn4c-a12';
                        rules += ' __Ha12';
                    }
                    return rules;
                }({
                    direction: direction
                })
            })
        })
    });
}
function $13afb0ea5f0ed767$export$2ce376c2cc3355c8(props1) {
    let ref = (0, $g2Qzl$useRef)(null);
    let isLink = props1.href != null;
    let isLinkOut = isLink && props1.target === '_blank';
    let { size: size, hideLinkOutIcon: hideLinkOutIcon } = (0, $g2Qzl$useContext)($13afb0ea5f0ed767$var$InternalMenuContext);
    let textValue = props1.textValue || (typeof props1.children === 'string' ? props1.children : undefined);
    let { direction: direction } = (0, $g2Qzl$useLocale)();
    let isUnavailable = (0, $g2Qzl$useContext)($13afb0ea5f0ed767$var$UnavailableContext);
    let infoIconId = (0, $g2Qzl$useId)();
    return /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $g2Qzl$MenuItem), {
        ...props1,
        "aria-describedby": isUnavailable ? infoIconId : undefined,
        textValue: textValue,
        ref: ref,
        style: (0, $10ea7662e51a285b$export$56e8cba416805d8d)(ref, props1.UNSAFE_style),
        className: (renderProps)=>(props1.UNSAFE_className || '') + $13afb0ea5f0ed767$export$f68e44d881264486({
                ...renderProps,
                isFocused: renderProps.hasSubmenu && renderProps.isOpen || renderProps.isFocused,
                size: size,
                isLink: isLink
            }, props1.styles),
        children: (renderProps)=>{
            let { children: children } = props1;
            let checkboxRenderProps = {
                ...renderProps,
                size: size,
                isFocused: false,
                isFocusVisible: false,
                isIndeterminate: false,
                isReadOnly: false,
                isInvalid: false,
                isRequired: false
            };
            return /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $g2Qzl$Fragment), {
                children: /*#__PURE__*/ (0, $g2Qzl$jsxs)((0, $g2Qzl$Provider), {
                    values: [
                        [
                            (0, $ac8c32e6775ddd1f$export$a49f528ae1a4d0ed),
                            {
                                slots: {
                                    icon: {
                                        render: (0, $1f4b04be3f24aae3$export$9d7e2342a7e53afa)({
                                            slot: 'icon',
                                            styles: $13afb0ea5f0ed767$export$31d1842a0fd736e6
                                        }),
                                        styles: $13afb0ea5f0ed767$export$1ca1ec8b29a4ce27
                                    },
                                    descriptor: {
                                        render: (0, $1f4b04be3f24aae3$export$9d7e2342a7e53afa)({
                                            slot: 'descriptor',
                                            styles: $13afb0ea5f0ed767$var$descriptor
                                        })
                                    } // TODO: remove once we have default?
                                }
                            }
                        ],
                        [
                            (0, $8e847109a6ab556d$export$9afb8bc826b033ea),
                            {
                                slots: {
                                    [(0, $g2Qzl$DEFAULT_SLOT)]: {
                                        styles: $13afb0ea5f0ed767$export$1237798dc640739a({
                                            size: size
                                        })
                                    },
                                    label: {
                                        styles: $13afb0ea5f0ed767$export$1237798dc640739a({
                                            size: size
                                        })
                                    },
                                    description: {
                                        styles: $13afb0ea5f0ed767$export$6d59db4903f20f7d({
                                            ...renderProps,
                                            size: size
                                        })
                                    },
                                    value: {
                                        styles: $13afb0ea5f0ed767$var$value
                                    }
                                }
                            }
                        ],
                        [
                            (0, $8e847109a6ab556d$export$744d98a3b8a94e1c),
                            {
                                styles: $13afb0ea5f0ed767$var$keyboard({
                                    size: size,
                                    isDisabled: renderProps.isDisabled
                                })
                            }
                        ],
                        [
                            (0, $dbd6f0b2503b938c$export$8151eb379fcf2442),
                            {
                                styles: $13afb0ea5f0ed767$var$image({
                                    size: size
                                })
                            }
                        ]
                    ],
                    children: [
                        renderProps.selectionMode === 'single' && !renderProps.hasSubmenu && /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $81cf3d4588736e7d$export$2e2bcd8739ae039), {
                            size: $13afb0ea5f0ed767$var$checkmarkIconSize[size],
                            className: $13afb0ea5f0ed767$export$292abbf31ed842a({
                                ...renderProps,
                                size: size
                            })
                        }),
                        renderProps.selectionMode === 'multiple' && !renderProps.hasSubmenu && /*#__PURE__*/ (0, $g2Qzl$jsx)("div", {
                            className: (0, $feb886035e0d4633$export$e618dc39ac9ad607)($13afb0ea5f0ed767$export$b07e517d22efa1ca, (0, $9b405e0f8095dce0$export$827f4ee28efc37)(checkboxRenderProps)),
                            children: /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $81cf3d4588736e7d$export$2e2bcd8739ae039), {
                                size: size,
                                className: (0, $9b405e0f8095dce0$export$2c99b98b77550cb4)
                            })
                        }),
                        typeof children === 'string' ? /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $8e847109a6ab556d$export$5f1af8db9871e1d6), {
                            slot: "label",
                            children: children
                        }) : children,
                        isLinkOut && !hideLinkOutIcon && /*#__PURE__*/ (0, $g2Qzl$jsx)("div", {
                            slot: "descriptor",
                            className: $13afb0ea5f0ed767$var$descriptor,
                            children: /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $d9f847a2895a93dc$export$2e2bcd8739ae039), {
                                size: $13afb0ea5f0ed767$var$linkIconSize[size],
                                className: function anonymous(props) {
                                    let rules = " ";
                                    if (props.direction === "rtl") {
                                        rules += ' -Z4Pn4c-a12';
                                        rules += ' __Ha12';
                                    }
                                    return rules;
                                }({
                                    direction: direction
                                })
                            })
                        }),
                        renderProps.hasSubmenu && (isUnavailable ? /*#__PURE__*/ (0, $g2Qzl$jsx)($13afb0ea5f0ed767$var$UnavailableIconWrapper, {
                            direction: direction,
                            size: size,
                            id: infoIconId
                        }) : /*#__PURE__*/ (0, $g2Qzl$jsx)("div", {
                            slot: "descriptor",
                            className: $13afb0ea5f0ed767$var$descriptor,
                            children: /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $4b69f02ec06b9226$export$2e2bcd8739ae039), {
                                size: size,
                                className: function anonymous(props) {
                                    let rules = " ";
                                    if (props.direction === "rtl") {
                                        rules += ' -Z4Pn4c-a12';
                                        rules += ' __Ha12';
                                    }
                                    return rules;
                                }({
                                    direction: direction
                                })
                            })
                        }))
                    ]
                })
            });
        }
    });
}
/**
 * The MenuTrigger serves as a wrapper around a Menu and its associated trigger,
 * linking the Menu's open state with the trigger's press state.
 */ function $13afb0ea5f0ed767$export$27d2ad3c5815583e(props) {
    // RAC sets isPressed via PressResponder when the menu is open.
    // We don't want press scaling to appear to get "stuck", so override this.
    // For mouse interactions, menus open on press start. When the popover underlay appears
    // it covers the trigger button, causing onPressEnd to fire immediately and no press scaling
    // to occur. We override this by listening for pointerup on the document ourselves.
    let [isPressed, setPressed] = (0, $g2Qzl$useState)(false);
    let { addGlobalListener: addGlobalListener } = (0, $g2Qzl$useGlobalListeners)();
    let onPressStart = (e)=>{
        if (e.pointerType !== 'mouse') return;
        setPressed(true);
        addGlobalListener(document, 'pointerup', ()=>{
            setPressed(false);
        }, {
            once: true,
            capture: true
        });
    };
    let { align: align = 'start', direction: direction = 'bottom', shouldFlip: shouldFlip } = props;
    let placement;
    switch(direction){
        case 'left':
        case 'right':
        case 'start':
        case 'end':
            placement = `${direction} ${align === 'end' ? 'bottom' : 'top'}`;
            break;
        case 'bottom':
        case 'top':
        default:
            placement = `${direction} ${align}`;
    }
    return /*#__PURE__*/ (0, $g2Qzl$jsx)($13afb0ea5f0ed767$var$InternalMenuTriggerContext.Provider, {
        value: {
            align: props.align,
            direction: props.direction,
            shouldFlip: props.shouldFlip
        },
        children: /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $88b746eba92c8d0d$export$9b9a0cd73afb7ca4).Provider, {
            value: {
                hideArrow: true,
                offset: 8,
                crossOffset: 0,
                placement: placement,
                shouldFlip: shouldFlip
            },
            children: /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $88b746eba92c8d0d$export$60dfb2c3202ad27d).Provider, {
                value: false,
                children: /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $g2Qzl$MenuTrigger), {
                    ...props,
                    children: /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $g2Qzl$PressResponder), {
                        onPressStart: onPressStart,
                        isPressed: isPressed,
                        children: props.children
                    })
                })
            })
        })
    });
}
function $13afb0ea5f0ed767$export$ecabc99eeffab7ca(props) {
    // For submenus, the offset from the edge of the popover should be 10px.
    // Subtract 8px for the padding around the parent menu.
    // Offset by padding + border so that the first item in a submenu lines up with the parent menu item.
    return /*#__PURE__*/ (0, $g2Qzl$jsxs)((0, $g2Qzl$SubmenuTrigger), {
        ...props,
        children: [
            props.children[0],
            /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $88b746eba92c8d0d$export$9b9a0cd73afb7ca4).Provider, {
                value: {
                    hideArrow: true,
                    offset: -2,
                    crossOffset: -8,
                    placement: 'end top'
                },
                children: props.children[1]
            })
        ]
    });
}
function $13afb0ea5f0ed767$export$7c4f7fdc3a164ef(props) {
    let { isUnavailable: isUnavailable = false, children: children } = props;
    if (isUnavailable) return /*#__PURE__*/ (0, $g2Qzl$jsx)($13afb0ea5f0ed767$var$UnavailableContext.Provider, {
        value: isUnavailable,
        children: /*#__PURE__*/ (0, $g2Qzl$jsxs)((0, $g2Qzl$SubmenuTrigger), {
            children: [
                children[0],
                /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $88b746eba92c8d0d$export$9b9a0cd73afb7ca4).Provider, {
                    value: {
                        hideArrow: true,
                        offset: -2,
                        crossOffset: -8,
                        placement: 'end top'
                    },
                    children: children[1]
                })
            ]
        })
    });
    return children[0];
}
function $13afb0ea5f0ed767$export$aebfca372ec4a7db(props) {
    return /*#__PURE__*/ (0, $g2Qzl$jsx)("div", {});
}


export {$13afb0ea5f0ed767$export$c7e742effb1c51e2 as MenuContext, $13afb0ea5f0ed767$export$b1e5508a851be14d as menu, $13afb0ea5f0ed767$export$fe2e36411d703b3d as section, $13afb0ea5f0ed767$export$562e61a0817eb32e as sectionHeader, $13afb0ea5f0ed767$export$300ac6f106ef584d as sectionHeading, $13afb0ea5f0ed767$export$f68e44d881264486 as menuitem, $13afb0ea5f0ed767$export$292abbf31ed842a as checkmark, $13afb0ea5f0ed767$export$b07e517d22efa1ca as checkbox, $13afb0ea5f0ed767$export$1ca1ec8b29a4ce27 as icon, $13afb0ea5f0ed767$export$31d1842a0fd736e6 as iconCenterWrapper, $13afb0ea5f0ed767$export$1237798dc640739a as label, $13afb0ea5f0ed767$export$6d59db4903f20f7d as description, $13afb0ea5f0ed767$export$d9b273488cd8ce6f as Menu, $13afb0ea5f0ed767$export$2e0a83ec2e27ecbb as Divider, $13afb0ea5f0ed767$export$4b1545b4f2016d26 as MenuSection, $13afb0ea5f0ed767$export$2ce376c2cc3355c8 as MenuItem, $13afb0ea5f0ed767$export$27d2ad3c5815583e as MenuTrigger, $13afb0ea5f0ed767$export$ecabc99eeffab7ca as SubmenuTrigger, $13afb0ea5f0ed767$export$7c4f7fdc3a164ef as UnavailableMenuItemTrigger, $13afb0ea5f0ed767$export$aebfca372ec4a7db as CombinedMenu};
//# sourceMappingURL=Menu.mjs.map
