"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const I=require("../../style/index.js"),H=require("../../style/motion/collapse.js");require("../../_util/cssinjs/StyleContext.js");require("vue");require("../../_util/cssinjs/transformers/legacyLogicalProperties.js");const f=require("../../style/motion/slide.js"),y=require("../../style/motion/zoom.js");require("../../theme/internal.js");const z=require("./horizontal.js"),A=require("./rtl.js"),h=require("./theme.js"),D=require("./vertical.js"),M=require("../../theme/util/genComponentStyleHook.js"),x=require("../../theme/util/statistic.js"),B=require("../../node_modules/.pnpm/@ctrl_tinycolor@3.6.1/node_modules/@ctrl/tinycolor/dist/module/index.js"),T=l=>{const{componentCls:n,fontSize:e,motionDurationSlow:o,motionDurationMid:t,motionEaseInOut:i,motionEaseOut:r,iconCls:s,controlHeightSM:c}=l;return{[`${n}-item, ${n}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${o}`,`background ${o}`,`padding ${o} ${i}`].join(","),[`${n}-item-icon, ${s}`]:{minWidth:e,fontSize:e,transition:[`font-size ${t} ${r}`,`margin ${o} ${i}`,`color ${o}`].join(","),"+ span":{marginInlineStart:c-e,opacity:1,transition:[`opacity ${o} ${i}`,`margin ${o}`,`color ${o}`].join(",")}},[`${n}-item-icon`]:{...I.resetIcon()},[`&${n}-item-only-child`]:{[`> ${s}, > ${n}-item-icon`]:{marginInlineEnd:0}}},[`${n}-item-disabled, ${n}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${n}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},w=l=>{const{componentCls:n,motionDurationSlow:e,motionEaseInOut:o,borderRadius:t,menuArrowSize:i,menuArrowOffset:r}=l;return{[`${n}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:l.margin,width:i,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${e} ${o}, opacity ${e}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:i*.6,height:i*.15,backgroundColor:"currentcolor",borderRadius:t,transition:[`background ${e} ${o}`,`transform ${e} ${o}`,`top ${e} ${o}`,`color ${e} ${o}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${r})`},"&::after":{transform:`rotate(-45deg) translateY(${r})`}}}}},q=l=>{const{antCls:n,componentCls:e,fontSize:o,motionDurationSlow:t,motionDurationMid:i,motionEaseInOut:r,lineHeight:s,paddingXS:c,padding:$,colorSplit:u,lineWidth:m,zIndexPopup:p,borderRadiusLG:g,radiusSubMenuItem:a,menuArrowSize:b,menuArrowOffset:d,lineType:v,menuPanelMaskInset:S}=l;return[{"":{[`${e}`]:{...I.clearFix(),"&-hidden":{display:"none"}}},[`${e}-submenu-hidden`]:{display:"none"}},{[e]:{...I.resetComponent(l),...I.clearFix(),marginBottom:0,paddingInlineStart:0,fontSize:o,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${t} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${e}-item`]:{flex:"none"}},[`${e}-item, ${e}-submenu, ${e}-submenu-title`]:{borderRadius:l.radiusItem},[`${e}-item-group-title`]:{padding:`${c}px ${$}px`,fontSize:o,lineHeight:s,transition:`all ${t}`},[`&-horizontal ${e}-submenu`]:{transition:[`border-color ${t} ${r}`,`background ${t} ${r}`].join(",")},[`${e}-submenu, ${e}-submenu-inline`]:{transition:[`border-color ${t} ${r}`,`background ${t} ${r}`,`padding ${i} ${r}`].join(",")},[`${e}-submenu ${e}-sub`]:{cursor:"initial",transition:[`background ${t} ${r}`,`padding ${t} ${r}`].join(",")},[`${e}-title-content`]:{transition:`color ${t}`},[`${e}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${e}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:u,borderStyle:v,borderWidth:0,borderTopWidth:m,marginBlock:m,padding:0,"&-dashed":{borderStyle:"dashed"}},...T(l),[`${e}-item-group`]:{[`${e}-item-group-list`]:{margin:0,padding:0,[`${e}-item, ${e}-submenu-title`]:{paddingInline:`${o*2}px ${$}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:p,background:"transparent",borderRadius:g,boxShadow:"none",transformOrigin:"0 0","&::before":{position:"absolute",inset:`${S}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:S},[`> ${e}`]:{borderRadius:g,...T(l),...w(l),[`${e}-item, ${e}-submenu > ${e}-submenu-title`]:{borderRadius:a},[`${e}-submenu-title::after`]:{transition:`transform ${t} ${r}`}}},...w(l),[`&-inline-collapsed ${e}-submenu-arrow,
        &-inline ${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${d})`},"&::after":{transform:`rotate(45deg) translateX(-${d})`}},[`${e}-submenu-open${e}-submenu-inline > ${e}-submenu-title > ${e}-submenu-arrow`]:{transform:`translateY(-${b*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${d})`},"&::before":{transform:`rotate(45deg) translateX(${d})`}}}},{[`${n}-layout-header`]:{[e]:{lineHeight:"inherit"}}}]},C=(l,n)=>M.default("Menu",(o,{overrideComponentToken:t})=>{if(n?.value===!1)return[];const{colorBgElevated:i,colorPrimary:r,colorBgSub:s,colorError:c,colorErrorHover:$,colorTextLightSolid:u}=o,{controlHeightLG:m,fontSize:p}=o,g=p/7*5,a=x.merge(o,{menuItemHeight:m,menuItemPaddingInline:o.margin,menuArrowSize:g,menuHorizontalHeight:m*1.15,menuArrowOffset:`${g*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:i}),b=new B.TinyColor(u).setAlpha(.65).toRgbString(),d=x.merge(a,{colorItemText:b,colorItemTextHover:u,colorGroupTitle:b,colorItemTextSelected:u,colorItemBg:"#001529",colorSubItemBg:"#000c17",colorItemBgActive:"transparent",colorItemBgSelected:s,colorActiveBarWidth:0,colorActiveBarHeight:0,colorActiveBarBorderSize:0,colorItemTextDisabled:new B.TinyColor(u).setAlpha(.25).toRgbString(),colorDangerItemText:c,colorDangerItemTextHover:$,colorDangerItemTextSelected:u,colorDangerItemBgActive:c,colorDangerItemBgSelected:c,menuSubMenuBg:"#001529",colorItemTextSelectedHorizontal:u,colorItemBgSelectedHorizontal:s},{...t});return[q(a),z.default(a),D.default(a),h.default(a,"light"),h.default(d,"dark"),A.default(a),H.default(a),f.initSlideMotion(a,"slide-up"),f.initSlideMotion(a,"slide-down"),y.initZoomMotion(a,"zoom-big")]},o=>{const{colorPrimary:t,colorError:i,colorTextDisabled:r,colorErrorBg:s,colorText:c,colorTextDescription:$,colorBgContainer:u,colorFillAlter:m,colorFillContent:p,lineWidth:g,lineWidthBold:a,controlItemBgActive:b,colorBgTextHover:d}=o;return{dropdownWidth:160,zIndexPopup:o.zIndexPopupBase+50,radiusItem:o.borderRadiusLG,radiusSubMenuItem:o.borderRadiusSM,colorItemText:c,colorItemTextHover:c,colorItemTextHoverHorizontal:t,colorGroupTitle:$,colorItemTextSelected:t,colorItemTextSelectedHorizontal:t,colorItemBg:u,colorItemBgHover:d,colorItemBgActive:p,colorSubItemBg:m,colorItemBgSelected:b,colorItemBgSelectedHorizontal:"transparent",colorActiveBarWidth:0,colorActiveBarHeight:a,colorActiveBarBorderSize:g,colorItemTextDisabled:r,colorDangerItemText:i,colorDangerItemTextHover:i,colorDangerItemTextSelected:i,colorDangerItemBgActive:s,colorDangerItemBgSelected:s,itemMarginInline:o.marginXXS}})(l);exports.default=C;
