Files
school2/public/assets/space-Dvitgohy.js
T
2026-07-13 15:23:29 +08:00

1 line
6.8 KiB
JavaScript

import{$t as e,Bt as t,D as n,J as r,K as i,Ln as a,Or as o,Q as s,Sr as c,St as l,Tr as u,_n as d,an as f,cn as p,dn as m,mn as h,sn as g,xt as _}from"./jsx-runtime-NwRKtVrk.js";import{n as v}from"./statusUtils-G17j4Ng-.js";var y=e=>{let{componentCls:t}=e;return{[t]:{display:`flex`,flexFlow:`row wrap`,minWidth:0,"&::before, &::after":{display:`flex`},"&-no-wrap":{flexWrap:`nowrap`},"&-start":{justifyContent:`flex-start`},"&-center":{justifyContent:`center`},"&-end":{justifyContent:`flex-end`},"&-space-between":{justifyContent:`space-between`},"&-space-around":{justifyContent:`space-around`},"&-space-evenly":{justifyContent:`space-evenly`},"&-top":{alignItems:`flex-start`},"&-middle":{alignItems:`center`},"&-bottom":{alignItems:`flex-end`}}}},b=e=>{let{componentCls:t}=e;return{[t]:{position:`relative`,maxWidth:`100%`,minHeight:1}}},x=(e,t)=>{let{componentCls:n,gridColumns:r,antCls:i}=e,[a,o]=_(i,`grid`),[,s]=_(i,`col`),c={};for(let e=r;e>=0;e--)e===0?(c[`${n}${t}-${e}`]={display:`none`},c[`${n}-push-${e}`]={insetInlineStart:`auto`},c[`${n}-pull-${e}`]={insetInlineEnd:`auto`},c[`${n}${t}-push-${e}`]={insetInlineStart:`auto`},c[`${n}${t}-pull-${e}`]={insetInlineEnd:`auto`},c[`${n}${t}-offset-${e}`]={marginInlineStart:0},c[`${n}${t}-order-${e}`]={order:0}):(c[`${n}${t}-${e}`]=[{[a(`display`)]:`block`,display:`block`},{display:o(`display`),flex:`0 0 ${e/r*100}%`,maxWidth:`${e/r*100}%`}],c[`${n}${t}-push-${e}`]={insetInlineStart:`${e/r*100}%`},c[`${n}${t}-pull-${e}`]={insetInlineEnd:`${e/r*100}%`},c[`${n}${t}-offset-${e}`]={marginInlineStart:`${e/r*100}%`},c[`${n}${t}-order-${e}`]={order:e});return c[`${n}${t}-flex`]={flex:s(`${t.replace(/-/,``)}-flex`)},c},S=(e,t)=>x(e,t),C=(e,t,n)=>({[`@media (min-width: ${f(t)})`]:{...S(e,n)}}),w=()=>({}),T=()=>({}),E=l(`Grid`,y,w),D=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin,xxxl:e.screenXXXLMin}),O=l(`Grid`,e=>{let n=t(e,{gridColumns:24}),r=D(n);return delete r.xs,[b(n),S(n,``),S(n,`-xs`),Object.keys(r).map(e=>C(n,r[e],`-${e}`)).reduce((e,t)=>({...e,...t}),{})]},T),k=o(u()),A=t=>{let{componentCls:n,borderRadius:r,paddingSM:i,colorBorder:a,paddingXS:o,fontSizeLG:s,fontSizeSM:c,borderRadiusLG:l,borderRadiusSM:u,colorBgContainerDisabled:d,lineWidth:f,antCls:p}=t,[m,h]=_(p,`space-addon`);return{[n]:[{...e(t),display:`inline-flex`,alignItems:`center`,gap:0,whiteSpace:`nowrap`,paddingInline:i,margin:0,borderWidth:f,borderStyle:`solid`,borderRadius:r,"&:hover":{zIndex:0},[`&${n}-disabled`]:{color:t.colorTextDisabled},"&-large":{fontSize:s,borderRadius:l},"&-small":{paddingInline:o,borderRadius:u,fontSize:c},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0},"&-compact-item:not(:first-child)":{borderInlineStartWidth:0}},{[m(`addon-border-color`)]:a,[m(`addon-background`)]:d,[m(`addon-border-color-outlined`)]:a,[m(`addon-background-filled`)]:d,borderColor:h(`addon-border-color`),background:h(`addon-background`),"&-variant-outlined":{[m(`addon-border-color`)]:h(`addon-border-color-outlined`)},"&-variant-filled":{[m(`addon-border-color`)]:`transparent`,[m(`addon-background`)]:h(`addon-background-filled`),[`&${n}-disabled`]:{[m(`addon-border-color`)]:a,[m(`addon-background`)]:d}},"&-variant-borderless":{border:`none`,background:`transparent`},"&-variant-underlined":{border:`none`,background:`transparent`}},{"&-status-error":{[m(`addon-border-color-outlined`)]:t.colorError,[m(`addon-background-filled`)]:t.colorErrorBg,color:t.colorError},"&-status-warning":{[m(`addon-border-color-outlined`)]:t.colorWarning,[m(`addon-background-filled`)]:t.colorWarningBg,color:t.colorWarning}}]}},j=l(`Addon`,e=>[A(e),n(e,{focus:!1})]),M=k.forwardRef((e,t)=>{let{className:n,children:i,style:a,prefixCls:o,variant:s=`outlined`,disabled:l,status:u,...d}=e,{getPrefixCls:f,direction:p}=k.useContext(g),m=f(`space-addon`,o),[h,_]=j(m),{compactItemClassnames:y,compactSize:b}=r(m,p),x=v(m,u),S=c(m,h,y,_,`${m}-variant-${s}`,x,{[`${m}-${b}`]:b,[`${m}-disabled`]:l},n);return k.createElement(`div`,{ref:t,className:S,style:a,...d},i)});function N(e){return[`small`,`middle`,`medium`,`large`].includes(e)}function P(e){return e?h(e):!1}var F=k.createContext({latestIndex:0}),ee=F.Provider,I=e=>{let{className:t,prefix:n,index:r,children:i,separator:a,style:o,classNames:s,styles:l}=e,{latestIndex:u}=k.useContext(F);return d(i)?k.createElement(k.Fragment,null,k.createElement(`div`,{className:t,style:o},i),r<u&&a&&k.createElement(`span`,{className:c(`${n}-item-separator`,s?.separator),style:l?.separator},a)):null},L=e=>{let{componentCls:t,antCls:n}=e;return{[t]:{display:`inline-flex`,"&-rtl":{direction:`rtl`},"&-vertical":{flexDirection:`column`},"&-align":{flexDirection:`column`,"&-center":{alignItems:`center`},"&-start":{alignItems:`flex-start`},"&-end":{alignItems:`flex-end`},"&-baseline":{alignItems:`baseline`}},[`${t}-item:empty`]:{display:`none`},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:`block`}}}},R=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-medium, &-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-medium, &-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},z=l(`Space`,e=>{let n=t(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[L(n),R(n)]},()=>({}),{resetStyle:!1}),B=k.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,size:i,className:o,style:l,classNames:u,styles:f}=p(`space`),{size:h=i??`small`,align:g,className:_,rootClassName:v,children:y,direction:b,orientation:x,prefixCls:S,split:C,separator:w,style:T,vertical:E,wrap:D=!1,classNames:O,styles:A,...j}=e,[M,F]=Array.isArray(h)?h:[h,h],L=N(F),R=N(M),B=P(F),V=P(M),H=a(y,{keepEmpty:!0}),[U,W]=s(x,E,b),G=g===void 0&&!W?`center`:g,K=w??C,q=n(`space`,S),[J,Y]=z(q),te={...e,size:h,orientation:U,align:G},[X,Z]=m([u,O],[f,A],{props:te}),ne=c(q,o,J,`${q}-${U}`,{[`${q}-rtl`]:r===`rtl`,[`${q}-align-${G}`]:G,[`${q}-gap-row-${F}`]:L,[`${q}-gap-col-${M}`]:R},_,v,Y,X.root),Q=c(`${q}-item`,X.item),re=H.map((e,t)=>{let n=e?.key||`${Q}-${t}`;return k.createElement(I,{prefix:q,classNames:X,styles:Z,className:Q,key:n,index:t,separator:K,style:Z.item},e)}),ie=k.useMemo(()=>({latestIndex:H.reduce((e,t,n)=>d(t)?n:e,0)}),[H]);if(H.length===0)return null;let $={};return D&&($.flexWrap=`wrap`),!R&&V&&($.columnGap=M),!L&&B&&($.rowGap=F),k.createElement(`div`,{ref:t,className:ne,style:{...$,...Z.root,...l,...T},...j},k.createElement(ee,{value:ie},re))});B.Compact=i,B.Addon=M;export{O as a,D as i,N as n,E as o,M as r,B as t};