1import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{n as t}from"./jsx-runtime-Ciaf_P-h.js";import{X as n,_ as r,g as i}from"./pickAttrs-DIkXfajW.js";import{h as a,j as o}from"./es-DrXbpWFj.js";import{b as s,x as c}from"./styleChecker-C500I5XS.js";import{b as l,d as u,g as d,m as f,s as p,u as m}from"./reactNode-D3jpDsOK.js";import{O as h}from"./ContextIsolator-lxc5PI6T.js";import{r as g,t as _}from"./es-BBLDYnnU.js";var v=e(t()),y=e(n());s(),g(),a(),i();function b(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:`not-allowed`}}}function x(e){return{backgroundColor:e.itemSelectedBg,boxShadow:e.boxShadowTertiary}}var S=Object.assign({overflow:`hidden`},d),C=e=>{let{componentCls:t}=e,n=e.calc(e.controlHeight).sub(e.calc(e.trackPadding).mul(2)).equal(),r=e.calc(e.controlHeightLG).sub(e.calc(e.trackPadding).mul(2)).equal(),i=e.calc(e.controlHeightSM).sub(e.calc(e.trackPadding).mul(2)).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},f(e)),{display:`inline-block`,padding:e.trackPadding,color:e.itemColor,background:e.trackBg,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`}),u(e)),{[`${t}-group`]:{position:`relative`,display:`flex`,alignItems:`stretch`,justifyItems:`flex-start`,flexDirection:`row`,width:`100%`},[`&${t}-rtl`]:{direction:`rtl`},[`&${t}-vertical`]:{[`${t}-group`]:{flexDirection:`column`},[`${t}-thumb`]:{width:`100%`,height:0,padding:`0 ${o(e.paddingXXS)}`}},[`&${t}-block`]:{display:`flex`},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:`relative`,textAlign:`center`,cursor:`pointer`,transition:`color ${e.motionDurationMid} ${e.motionEaseInOut}`,borderRadius:e.borderRadiusSM,transform:`translateZ(0)`,"&-selected":Object.assign(Object.assign({},x(e)),{color:e.itemSelectedColor}),"&-focused":m(e),"&::after":{content:`""`,position:`absolute`,zIndex:-1,width:`100%`,height:`100%`,top:0,insetInlineStart:0,borderRadius:`inherit`,opacity:0,transition:`opacity ${e.motionDurationMid}`,pointerEvents:`none`},[`&:hover:not(${t}-item-selected):not(${t}-item-disabled)`]:{color:e.itemHoverColor,"&::after":{opacity:1,backgroundColor:e.itemHoverBg}},[`&:active:not(${t}-item-selected):not(${t}-item-disabled)`]:{color:e.itemHoverColor,"&::after":{opacity:1,backgroundColor:e.itemActiveBg}},"&-label":Object.assign({minHeight:n,lineHeight:o(n),padding:`0 ${o(e.segmentedPaddingHorizontal)}`},S),"&-icon + *":{marginInlineStart:e.calc(e.marginSM).div(2).equal()},"&-input":{position:`absolute`,insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:`none`}},[`${t}-thumb`]:Object.assign(Object.assign({},x(e)),{position:`absolute`,insetBlockStart:0,insetInlineStart:0,width:0,height:`100%`,padding:`${o(e.paddingXXS)} 0`,borderRadius:e.borderRadiusSM,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, height ${e.motionDurationSlow} ${e.motionEaseInOut}`,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:`transparent`}}),[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:r,lineHeight:o(r),padding:`0 ${o(e.segmentedPaddingHorizontal)}`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:i,lineHeight:o(i),padding:`0 ${o(e.segmentedPaddingHorizontalSM)}`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}}}),b(`&-disabled ${t}-item`,e)),b(`${t}-item-disabled`,e)),{[`${t}-thumb-motion-appear-active`]:{transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, width ${e.motionDurationSlow} ${e.motionEaseInOut}`,willChange:`transform, width`},[`&${t}-shape-round`]:{borderRadius:9999,[`${t}-item, ${t}-thumb`]:{borderRadius:9999}}})}},w=p(`Segmented`,e=>{let{lineWidth:t,calc:n}=e;return C(r(e,{segmentedPaddingHorizontal:n(e.controlPaddingHorizontal).sub(t).equal(),segmentedPaddingHorizontalSM:n(e.controlPaddingHorizontalSM).sub(t).equal()}))},e=>{let{colorTextLabel:t,colorText:n,colorFillSecondary:r,colorBgElevated:i,colorFill:a,lineWidthBold:o,colorBgLayout:s}=e;return{trackPadding:o,trackBg:s,itemColor:t,itemHoverColor:n,itemHoverBg:r,itemSelectedBg:i,itemActiveBg:a,itemSelectedColor:n}}),T=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function E(e){return typeof e==`object`&&!!e?.icon}var D=v.forwardRef((e,t)=>
1{let n=c(),{prefixCls:r,className:i,rootClassName:a,block:o,options:s=[],size:u=`middle`,style:d,vertical:f,shape:p=`default`,name:m=n}=e,g=T(e,[`prefixCls`,`className`,`rootClassName`,`block`,`options`,`size`,`style`,`vertical`,`shape`,`name`]),{getPrefixCls:b,direction:x,className:S,style:C}=l(`segmented`),D=b(`segmented`,r),[O,k,A]=w(D),j=h(u),M=v.useMemo(()=>s.map(e=>{if(E(e)){let{icon:t,label:n}=e,r=T(e,[`icon`,`label`]);return Object.assign(Object.assign({},r),{label:v.createElement(v.Fragment,null,v.createElement(`span`,{className:`${D}-item-icon`},t),n&&v.createElement(`span`,null,n))})}return e}),[s,D]),N=(0,y.default)(i,a,S,{[`${D}-block`]:o,[`${D}-sm`]:j===`small`,[`${D}-lg`]:j===`large`,[`${D}-vertical`]:f,[`${D}-shape-${p}`]:p===`round`},k,A),P=Object.assign(Object.assign({},C),d);return O(v.createElement(_,Object.assign({},g,{name:m,className:N,style:P,options:M,ref:t,prefixCls:D,direction:x,vertical:f})))});export{D as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.