@gientech/modual 2.1.38 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{GientechStreamReader-C8rYtUxB.js → GientechStreamReader-C5jijqVw.js} +57 -57
- package/assets/LeftOutlined-9XTSYGbi.js +1 -0
- package/assets/{index-Bg1CcQn9.js → index-B64Nj5uU.js} +1 -1
- package/assets/{index-B-AFa3n1.js → index-B872BsjL.js} +1 -1
- package/assets/{index-w1SriKuR.js → index-BIrUv1JE.js} +1 -1
- package/assets/index-Bk-pRt65.js +27 -0
- package/assets/{index-8h59dJlj.js → index-BvpN2hYX.js} +1 -1
- package/assets/{index-BdNcL3V6.js → index-BxR_BLxA.js} +1 -1
- package/assets/index-CkVpaVb6.js +1 -0
- package/assets/{index-DoUk2Ei_.js → index-D3Z0MZbL.js} +4 -4
- package/assets/{index-C6WKbL3A.js → index-DaM9Fbys.js} +3 -3
- package/assets/{index-CVis9Agw.js → index-SbYeytsI.js} +1 -1
- package/assets/index-hDlFWjNU.js +1969 -0
- package/assets/{index-CtPe9ln8.js → index-sWqCalkt.js} +152 -181
- package/assets/{plus-CnVxGdOo.js → plus-DDbDO7lA.js} +1 -1
- package/assets/search-BoBdGjgo.js +6 -0
- package/assets/style-DwfpZJI9.js +196 -0
- package/assets/style4.css +1 -1
- package/assets/{triangle-alert-BycMPaz2.js → triangle-alert-DF53kXdm.js} +1 -1
- package/assets/{x-CmbLQ9dc.js → x-DfdS1_QC.js} +1 -1
- package/assistantConfig.js +152 -1
- package/chat.d.ts +11 -1
- package/chat.js +1 -196
- package/chatCompare.js +1 -1
- package/database.js +1 -1
- package/databaseId.d.ts +1 -0
- package/databaseId.js +1 -1
- package/databaseTable.js +2 -2
- package/index.d.ts +301 -0
- package/index.js +1 -1
- package/modelManage.d.ts +124 -0
- package/modelManage.js +1 -1
- package/package.json +1 -1
- package/sensitive.d.ts +134 -2
- package/sensitive.js +205 -1
- package/streamFilesReader.js +1 -1
- package/assets/index-BN3yu4iN.js +0 -1
- package/assets/index-C9ax6WsW.js +0 -1995
- package/assets/index-pbEQPM5Z.js +0 -157
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as n,_ as r}from"./index-BvpN2hYX.js";import*as t from"react";var c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},o=function(e,a){return t.createElement(n,r({},e,{ref:a,icon:c}))},d=t.forwardRef(o),l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},f=function(e,a){return t.createElement(n,r({},e,{ref:a,icon:l}))},u=t.forwardRef(f);export{u as R,d as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as At,jsx as Se,Fragment as Ep}from"react/jsx-runtime";import*as _ from"react";import je,{forwardRef as da,createElement as xd,createContext as ic,version as DK,useMemo as cn,useContext as Ar,useState as vt,useRef as ot,Children as PK,useEffect as kt,useCallback as $i,useImperativeHandle as jl,useLayoutEffect as YB,cloneElement as RK,isValidElement as XB}from"react";import{T as LK,F as FK,a as BK,U as jK}from"./index-
|
|
1
|
+
import{jsxs as At,jsx as Se,Fragment as Ep}from"react/jsx-runtime";import*as _ from"react";import je,{forwardRef as da,createElement as xd,createContext as ic,version as DK,useMemo as cn,useContext as Ar,useState as vt,useRef as ot,Children as PK,useEffect as kt,useCallback as $i,useImperativeHandle as jl,useLayoutEffect as YB,cloneElement as RK,isValidElement as XB}from"react";import{T as LK,F as FK,a as BK,U as jK}from"./index-hDlFWjNU.js";import{N as di,c as KB,T as zK,d as Zc,e as UK}from"./index-sWqCalkt.js";import{c as w0,e as jf,g as QB,m as HK,n as Nk,aC as ZB,au as JB,aj as VK,aN as qK,N as Ed,aA as WK,u as GK,p as YK,A as Kr,T as zf,a7 as XK,M as Xm,F as zc,aK as Dk,bp as KK,S as e9,h as pO,i as gO}from"./index-BvpN2hYX.js";import{u as fs}from"./index-CpW6Dhpp.js";import{G as t9,C as QK}from"./GientechStreamReader-C5jijqVw.js";import{S as ZK,P as JK}from"./index-DaM9Fbys.js";import{D as n9}from"./index-CkVpaVb6.js";import{A as eQ,s as xa,M as tQ}from"./index-D3Z0MZbL.js";import{i as mO}from"./index-SbYeytsI.js";import{g as vO,a as nQ,P as r9,L as yO}from"./index-B872BsjL.js";import{X as Pk}from"./x-DfdS1_QC.js";import{B as i9}from"./index-BxR_BLxA.js";import*as rQ from"react-dom";import bO,{flushSync as HS,createPortal as a9,unstable_batchedUpdates as iQ}from"react-dom";/**
|
|
2
2
|
* @license lucide-react v0.456.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as F,
|
|
1
|
+
import{c as F,g as G,m as q,f as U,j as X,r as Y,P as Z,k as J,l as Q,n as ee,e as x,o as te,u as oe,p as ne,T as re,q as ae,s as se,K as le}from"./index-BvpN2hYX.js";import*as s from"react";import{isValidElement as ie}from"react";import"react-dom";/**
|
|
2
2
|
* @license lucide-react v0.456.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as Ee,jsx as B,Fragment as _l}from"react/jsx-runtime";import*as p from"react";import X,{forwardRef as sr,createElement as Ya,version as dm,useMemo as _t,useState as vt,useRef as Pe,useCallback as Xe,useEffect as wt,useImperativeHandle as Ki,createContext as Li,useContext as An,Children as fm,useLayoutEffect as pm,isValidElement as mm}from"react";import{l as gm,b as hm,a as vm,J as ym,i as bm}from"./index-
|
|
1
|
+
import{jsxs as Ee,jsx as B,Fragment as _l}from"react/jsx-runtime";import*as p from"react";import X,{forwardRef as sr,createElement as Ya,version as dm,useMemo as _t,useState as vt,useRef as Pe,useCallback as Xe,useEffect as wt,useImperativeHandle as Ki,createContext as Li,useContext as An,Children as fm,useLayoutEffect as pm,isValidElement as mm}from"react";import{l as gm,b as hm,a as vm,J as ym,i as bm}from"./index-sWqCalkt.js";import{d as Ht,a as xm,h as Cm,i as Js}from"./index-BvpN2hYX.js";/* empty css */import*as wm from"react-dom";import $s,{flushSync as Xa,createPortal as dd,unstable_batchedUpdates as km}from"react-dom";var Gr=(e=>(e.FLAT="files",e.NAV="nav",e))(Gr||{});const Em=()=>B("div",{className:"main relative h-full w-full flex items-center justify-center",children:B("div",{className:"text-2xl font-bold",children:"\u5E94\u7528\u52A0\u8F7D\u4E2D..."})}),Sm=()=>B("div",{className:"main relative h-full w-full flex items-center justify-center",children:B("div",{className:"text-2xl font-bold",children:"\u5E94\u7528\u9519\u8BEF"})}),Am=()=>B("div",{className:"main relative h-full w-full flex items-center justify-center",children:B("div",{className:"text-lg font-medium",children:"\u5BB9\u5668\u52A0\u8F7D\u4E2D..."})}),Om=()=>B("div",{className:"main relative h-full w-full flex items-center justify-center",children:B("div",{className:"text-lg font-medium",children:"\u5BB9\u5668\u9519\u8BEF"})}),Im=()=>B("div",{className:"main relative h-full w-full flex items-center justify-center",children:B("div",{className:"text-base font-medium",children:"\u5185\u5BB9\u52A0\u8F7D\u4E2D..."})}),Nm=()=>B("div",{className:"main relative h-full w-full flex items-center justify-center",children:B("div",{className:"text-base font-medium",children:"\u5185\u5BB9\u9519\u8BEF"})}),Mm=({viewType:e,cardType:t})=>Ee("div",{className:"main relative h-full w-full flex flex-col items-center justify-center",children:[B("div",{className:"text-6xl mb-4",style:{color:"#d1d5db"},children:"\u{1F4ED}"}),B("div",{className:"text-lg font-medium mb-2",style:{color:"#6b7280"},children:e==="card"?"\u6682\u65E0\u6570\u636E":e==="table"?"\u6682\u65E0\u8868\u683C\u6570\u636E":"\u6682\u65E0\u6570\u636E"}),B("div",{className:"text-sm",style:{color:"#9ca3af"},children:e==="card"?"\u70B9\u51FB\u4E0A\u65B9\u6309\u94AE\u6DFB\u52A0\u6570\u636E":e==="table"?"\u8BF7\u5148\u6DFB\u52A0\u6570\u636E\u5230\u8868\u683C\u4E2D":"\u8BF7\u5148\u6DFB\u52A0\u6570\u636E"})]}),xn=(e,t)=>{console.log("[findNodeById] Searching for id:",t,"in nodes:",e);for(const n of e){if(console.log("[findNodeById] Checking node:",n),n.id===t)return console.log("[findNodeById] Found node:",n),n;if(n.children){const r=Array.isArray(n.children)?n.children:Object.values(n.children);console.log("[findNodeById] Searching in children:",r);const o=xn(r,t);if(o)return console.log("[findNodeById] Found in children:",o),o}}return console.log("[findNodeById] Node not found for id:",t),null},Za=e=>{for(const t of e){if(t.type)return t.id;if(t.children){const n=Array.isArray(t.children)?t.children:Object.values(t.children),r=Za(n);if(r)return r}}},Pm=e=>{const t=n=>{let r=[];return n.children&&(r=Array.isArray(n.children)?n.children:Object.values(n.children)),{title:n.label,key:n.id,children:r.length>0?r.map(t):void 0,selectable:!0}};return e.map(t)},Fm=(e,t)=>Array.isArray(e)?t==="table"?e.filter(n=>n&&n.data&&Array.isArray(n.data)):e:e&&typeof e=="object"?[e]:[],Rm=e=>{const t=new Set;return e.forEach(n=>{n.adding&&t.add(n.id)}),t},Bm=(e,t)=>{const[n,r]=vt(()=>{const g=Array.isArray(e)?e:[];return console.log("[useAppState] \u521D\u59CB\u5316innerData:",g),g}),[o,i]=vt(new Set),[a,s]=vt(new Set),[l,c]=vt(""),[u,d]=vt([]);wt(()=>{if(console.log("[useAppState] \u6570\u636E\u6E90\u53D8\u5316:",{dataSource:e,activeNodeType:t}),t==="form"){const f=Array.isArray(e)?e:[];r(f);return}const g=Fm(e,t);console.log("[useAppState] \u9A8C\u8BC1\u540E\u7684\u6570\u636E:",g),r(g);const v=Rm(g);s(v),d([])},[e,t]);const m=Xe(()=>{d([]),c(""),i(new Set)},[]);return{innerData:n,setInnerData:r,pendingIds:o,setPendingIds:i,addingIds:a,setAddingIds:s,fuzzyValue:l,setFuzzyValue:c,selectedIds:u,setSelectedIds:d,resetStateOnNodeChange:m}},jm=(e,t,n,r,o,i,a)=>{const s=Xe((S,M)=>{const{tableId:P,...O}=M||{};M!=null&&M.animate?(r(S.id),e(N=>{if(P)return N.map(R=>{if(R.id===P){const T=[...R.children||[],{...S,adding:!0}];return{...R,children:T}}return R});const F={...S,adding:!0};if((O==null?void 0:O.position)==="start"||(O==null?void 0:O.position)===void 0)return[F,...N];if(typeof(O==null?void 0:O.position)=="number"){const R=[...N];return R.splice(O.position,0,F),R}return[F,...N]})):e(N=>{if(P)return N.map(F=>{if(F.id===P){const R=[...F.children||[],S];return{...F,children:R}}return F});if((O==null?void 0:O.position)==="start")return[S,...N];if(typeof(O==null?void 0:O.position)=="number"){const F=[...N];return F.splice(O.position,0,S),F}return[...N,S]})},[e,r]),l=Xe((S,M)=>{S&&e(P=>{if(!Array.isArray(P))return console.warn("[useAppFunctions] removeItem: prev\u4E0D\u662F\u6570\u7EC4\uFF0C\u91CD\u7F6E\u4E3A\u7A7A\u6570\u7EC4"),[];if(M)return P.map(N=>{if(N.id===M&&N.children){const F=N.children.map(R=>R.id===S?{...R,removing:!0}:R);return{...N,children:F}}return N});const O=P.map(N=>N.id===S?{...N,removing:!0}:N);return console.log("[useAppFunctions] removeItem \u8BBE\u7F6Eremoving",S,O),O})},[e]),c=Xe((S,M)=>{e(P=>Array.isArray(P)?P.map(O=>{if(O.id===M&&O.children){const N=O.children.filter(F=>F.id!==S);if(N.length===0){const{children:F,...R}=O;return R}return{...O,children:N}}return O}):[])},[e]),u=Xe((S,M)=>{!S||S.length===0||e(P=>{if(!Array.isArray(P))return console.warn("[useAppFunctions] removeItems: prev\u4E0D\u662F\u6570\u7EC4\uFF0C\u91CD\u7F6E\u4E3A\u7A7A\u6570\u7EC4"),[];if(M)return P.map(N=>{if(N.id===M&&N.children){const F=N.children.map(R=>S.includes(R.id)?{...R,removing:!0}:R);return{...N,children:F}}return N});const O=P.map(N=>S.includes(N.id)?{...N,removing:!0}:N);return console.log("[useAppFunctions] removeItems \u8BBE\u7F6Eremoving",S,O),O})},[e]),d=Xe(S=>{e(M=>{const P=M.find(O=>O.id===S);return P?P.hasOwnProperty("children")?(console.error(`[addSubTable] \u884C ${S} \u5DF2\u7ECF\u6709\u5B50table\u529F\u80FD\uFF0C\u65E0\u9700\u91CD\u590D\u6DFB\u52A0`),M):M.map(O=>O.id===S?{...O,children:[]}:O):(console.error(`[addSubTable] \u672A\u627E\u5230ID\u4E3A ${S} \u7684\u884C`),M)})},[e]),m=Xe(S=>{e(M=>{const P=M.find(N=>N.id===S);if(!P)return console.error(`[deleteSubTable] \u672A\u627E\u5230ID\u4E3A ${S} \u7684\u884C`),M;if(!P.hasOwnProperty("children"))return console.error(`[deleteSubTable] \u884C ${S} \u6CA1\u6709\u5B50table\u529F\u80FD`),M;const O=(P.children||[]).filter(N=>!N.removing).length;return O>0?(console.error(`[deleteSubTable] \u884C ${S} \u7684\u5B50table\u8FD8\u6709 ${O} \u6761\u6570\u636E\uFF0C\u65E0\u6CD5\u5220\u9664\u5B50table\u529F\u80FD\u3002\u8BF7\u5148\u5220\u9664\u6240\u6709\u5B50table\u6570\u636E\u3002`),M):M.map(N=>{if(N.id===S&&N.hasOwnProperty("children")){const{children:F,...R}=N;return R}return N})})},[e]),g=Xe((S,M,P)=>{M&&e(O=>O.map(N=>P&&N.id===P&&N.children?{...N,children:N.children.map(F=>F.id===M&&typeof F=="object"?v(F,S):F)}:N.id===M&&typeof N=="object"?v(N,S):N))},[e]),v=Xe((S,M)=>{if(Array.isArray(M)){const P=[...S.data];return M.forEach(O=>{const N=P.findIndex(F=>F.columnId===O.columnId);N>=0?P[N]={...P[N],value:O.value}:P.push(O)}),{...S,data:P}}else if(typeof M=="object")return{...S,...M};return S},[]),f=Xe(S=>{if(!S)return;const M=document.querySelector(`[data-item-id="${S}"]`);M&&M.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})},[]),h=Xe((S,M)=>{e(M?P=>P.map(O=>{if(O.id!==M)return O;if(!O.hasOwnProperty("children"))return console.warn(`[useAppFunctions] \u884C ${M} \u6CA1\u6709children\u5B57\u6BB5\uFF0C\u8DF3\u8FC7\u66F4\u65B0`),O;const N=O.children||[],F=N.findIndex(R=>R.id===S.id);if(F>=0){const R=[...N];return R[F]=S,{...O,children:R}}else return{...O,children:[...N,S]}}):Array.isArray(S)?S:[])},[e]);Xe(S=>{e(M=>Array.isArray(M)?Array.isArray(S)?[...M,...S]:M:Array.isArray(S)?S:[])},[e]);const y=Xe(S=>{t(S)},[t]),x=Xe(S=>{e(M=>M.map(P=>P.id===S?{...P,tableLoading:!0}:P))},[e]),b=Xe(S=>{e(M=>M.map(P=>P.id===S?{...P,tableLoading:!1}:P))},[e]),E=Xe(S=>{n(S)},[n]),w=Xe(S=>i.has(S),[i]),k=Xe(S=>{r(S)},[r]),A=Xe(S=>{o(S)},[o]),C=Xe(S=>a.has(S),[a]);return{addItem:s,removeItem:l,removeItems:u,updateItem:g,scrollToItem:f,syncSourceData:h,addPending:y,removePending:E,isPending:w,addAdding:k,removeAdding:A,isAdding:C,tablePending:x,removeTablePending:b,addSubTable:d,deleteSubTable:m,removeSubTableRow:c}};/**
|
|
2
2
|
* @license lucide-react v0.456.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import*as i from"react";import ce,{forwardRef as Dt,useMemo as Po,useRef as je,useCallback as Ee,useImperativeHandle as yn,createContext as Oo}from"react";import{R as Eo,a as No}from"./LeftOutlined-9XTSYGbi.js";import{b6 as Te,K as pe,a3 as In,b7 as At,b8 as Sn,O as de,W as ee,e as V,b9 as xn,_ as te,Y as K,ba as Bo,bb as wn,X as J,G as xe,bc as To,p as Ve,V as Mn,Q as Rn,aC as we,aV as Do,aW as Ao,aX as _o,aZ as zo,bd as We,t as Pn,z as ko,a9 as Ho,I as Lo,n as ct,s as ut,T as jo,be as Ko,a5 as Vo,x as T,ab as Wo,a_ as Fo,g as On,m as Mt,b1 as Xo,bf as it,f as En,aJ as rn,r as Nn,aR as an,bg as qo,a4 as Bn,aq as Rt,as as Tn,b4 as Go,bh as Uo,bi as Yo,bj as Zo,bk as Jo,j as Qo,bl as ln,a2 as sn,l as er,k as tr,ax as nr,ai as or,bm as rr,a6 as ir,bn as ar,bo as lr,N as cn}from"./index-BvpN2hYX.js";import{flushSync as sr}from"react-dom";import{S as cr}from"./index-SbYeytsI.js";var ur=pe.ESC,dr=pe.TAB;function mr(e){var n=e.visible,t=e.triggerRef,o=e.onVisibleChange,r=e.autoFocus,l=e.overlayRef,a=i.useRef(!1),s=function(){if(n){var u,m;(u=t.current)===null||u===void 0||(m=u.focus)===null||m===void 0||m.call(u),o==null||o(!1)}},c=function(){var u;return(u=l.current)!==null&&u!==void 0&&u.focus?(l.current.focus(),a.current=!0,!0):!1},d=function(u){switch(u.keyCode){case ur:s();break;case dr:{var m=!1;a.current||(m=c()),m?u.preventDefault():s();break}}};i.useEffect(function(){return n?(window.addEventListener("keydown",d),r&&Te(c,3),function(){window.removeEventListener("keydown",d),a.current=!1}):function(){a.current=!1}},[n])}var vr=Dt(function(e,n){var t=e.overlay,o=e.arrow,r=e.prefixCls,l=Po(function(){var s;return typeof t=="function"?s=t():s=t,s},[t]),a=In(n,At(l));return ce.createElement(ce.Fragment,null,o&&ce.createElement("div",{className:"".concat(r,"-arrow")}),ce.cloneElement(l,{ref:Sn(l)?a:void 0}))}),Ne={adjustX:1,adjustY:1},Be=[0,0],pr={topLeft:{points:["bl","tl"],overflow:Ne,offset:[0,-4],targetOffset:Be},top:{points:["bc","tc"],overflow:Ne,offset:[0,-4],targetOffset:Be},topRight:{points:["br","tr"],overflow:Ne,offset:[0,-4],targetOffset:Be},bottomLeft:{points:["tl","bl"],overflow:Ne,offset:[0,4],targetOffset:Be},bottom:{points:["tc","bc"],overflow:Ne,offset:[0,4],targetOffset:Be},bottomRight:{points:["tr","br"],overflow:Ne,offset:[0,4],targetOffset:Be}},fr=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function gr(e,n){var t,o=e.arrow,r=o===void 0?!1:o,l=e.prefixCls,a=l===void 0?"rc-dropdown":l,s=e.transitionName,c=e.animation,d=e.align,f=e.placement,u=f===void 0?"bottomLeft":f,m=e.placements,g=m===void 0?pr:m,v=e.getPopupContainer,p=e.showAction,b=e.hideAction,y=e.overlayClassName,w=e.overlayStyle,I=e.visible,C=e.trigger,$=C===void 0?["hover"]:C,h=e.autoFocus,N=e.overlay,S=e.children,x=e.onVisibleChange,B=de(e,fr),P=ce.useState(),M=ee(P,2),O=M[0],R=M[1],_="visible"in e?I:O,W=ce.useRef(null),E=ce.useRef(null),z=ce.useRef(null);ce.useImperativeHandle(n,function(){return W.current});var G=function(X){R(X),x==null||x(X)};mr({visible:_,triggerRef:z,onVisibleChange:G,autoFocus:h,overlayRef:E});var U=function(X){var H=e.onOverlayClick;R(!1),H&&H(X)},Z=function(){return ce.createElement(vr,{ref:E,overlay:N,prefixCls:a,arrow:r})},Y=function(){return typeof N=="function"?Z:Z()},D=function(){var X=e.minOverlayWidthMatchTrigger,H=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?X:!H},k=function(){var X=e.openClassName;return X!==void 0?X:"".concat(a,"-open")},F=ce.cloneElement(S,{className:V((t=S.props)===null||t===void 0?void 0:t.className,_&&k()),ref:Sn(S)?In(z,At(S)):void 0}),re=b;return!re&&$.indexOf("contextMenu")!==-1&&(re=["click"]),ce.createElement(xn,te({builtinPlacements:g},B,{prefixCls:a,ref:W,popupClassName:V(y,K({},"".concat(a,"-show-arrow"),r)),popupStyle:w,action:$,showAction:p,hideAction:re,popupPlacement:u,popupAlign:d,popupTransitionName:s,popupAnimation:c,popupVisible:_,stretch:D()?"minWidth":"",popup:Y(),onPopupVisibleChange:G,onPopupClick:U,getPopupContainer:v}),F)}const br=ce.forwardRef(gr),hr=e=>typeof e!="object"&&typeof e!="function"||e===null;var Dn=i.createContext(null);function An(e,n){return e===void 0?null:"".concat(e,"-").concat(n)}function _n(e){var n=i.useContext(Dn);return An(n,e)}var $r=["children","locked"],ve=i.createContext(null);function Cr(e,n){var t=J({},e);return Object.keys(n).forEach(function(o){var r=n[o];r!==void 0&&(t[o]=r)}),t}function Fe(e){var n=e.children,t=e.locked,o=de(e,$r),r=i.useContext(ve),l=Bo(function(){return Cr(r,o)},[r,o],function(a,s){return!t&&(a[0]!==s[0]||!wn(a[1],s[1],!0))});return i.createElement(ve.Provider,{value:l},n)}var yr=[],zn=i.createContext(null);function dt(){return i.useContext(zn)}var kn=i.createContext(yr);function De(e){var n=i.useContext(kn);return i.useMemo(function(){return e!==void 0?[].concat(xe(n),[e]):n},[n,e])}var Hn=i.createContext(null),_t=i.createContext({});function un(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(To(e)){var t=e.nodeName.toLowerCase(),o=["input","select","textarea","button"].includes(t)||e.isContentEditable||t==="a"&&!!e.getAttribute("href"),r=e.getAttribute("tabindex"),l=Number(r),a=null;return r&&!Number.isNaN(l)?a=l:o&&a===null&&(a=0),o&&e.disabled&&(a=null),a!==null&&(a>=0||n&&a<0)}return!1}function Ir(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=xe(e.querySelectorAll("*")).filter(function(o){return un(o,n)});return un(e,n)&&t.unshift(e),t}var Pt=pe.LEFT,Ot=pe.RIGHT,Et=pe.UP,ot=pe.DOWN,rt=pe.ENTER,Ln=pe.ESC,He=pe.HOME,Le=pe.END,dn=[Et,ot,Pt,Ot];function Sr(e,n,t,o){var r,l="prev",a="next",s="children",c="parent";if(e==="inline"&&o===rt)return{inlineTrigger:!0};var d=K(K({},Et,l),ot,a),f=K(K(K(K({},Pt,t?a:l),Ot,t?l:a),ot,s),rt,s),u=K(K(K(K(K(K({},Et,l),ot,a),rt,s),Ln,c),Pt,t?s:c),Ot,t?c:s),m={inline:d,horizontal:f,vertical:u,inlineSub:d,horizontalSub:u,verticalSub:u},g=(r=m["".concat(e).concat(n?"":"Sub")])===null||r===void 0?void 0:r[o];switch(g){case l:return{offset:-1,sibling:!0};case a:return{offset:1,sibling:!0};case c:return{offset:-1,sibling:!1};case s:return{offset:1,sibling:!1};default:return null}}function xr(e){for(var n=e;n;){if(n.getAttribute("data-menu-list"))return n;n=n.parentElement}return null}function wr(e,n){for(var t=e||document.activeElement;t;){if(n.has(t))return t;t=t.parentElement}return null}function zt(e,n){var t=Ir(e,!0);return t.filter(function(o){return n.has(o)})}function mn(e,n,t){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var r=zt(e,n),l=r.length,a=r.findIndex(function(s){return t===s});return o<0?a===-1?a=l-1:a-=1:o>0&&(a+=1),a=(a+l)%l,r[a]}var Nt=function(n,t){var o=new Set,r=new Map,l=new Map;return n.forEach(function(a){var s=document.querySelector("[data-menu-id='".concat(An(t,a),"']"));s&&(o.add(s),l.set(s,a),r.set(a,s))}),{elements:o,key2element:r,element2key:l}};function Mr(e,n,t,o,r,l,a,s,c,d){var f=i.useRef(),u=i.useRef();u.current=n;var m=function(){Te.cancel(f.current)};return i.useEffect(function(){return function(){m()}},[]),function(g){var v=g.which;if([].concat(dn,[rt,Ln,He,Le]).includes(v)){var p=l(),b=Nt(p,o),y=b,w=y.elements,I=y.key2element,C=y.element2key,$=I.get(n),h=wr($,w),N=C.get(h),S=Sr(e,a(N,!0).length===1,t,v);if(!S&&v!==He&&v!==Le)return;(dn.includes(v)||[He,Le].includes(v))&&g.preventDefault();var x=function(E){if(E){var z=E,G=E.querySelector("a");G!=null&&G.getAttribute("href")&&(z=G);var U=C.get(E);s(U),m(),f.current=Te(function(){u.current===U&&z.focus()})}};if([He,Le].includes(v)||S.sibling||!h){var B;!h||e==="inline"?B=r.current:B=xr(h);var P,M=zt(B,w);v===He?P=M[0]:v===Le?P=M[M.length-1]:P=mn(B,w,h,S.offset),x(P)}else if(S.inlineTrigger)c(N);else if(S.offset>0)c(N,!0),m(),f.current=Te(function(){b=Nt(p,o);var W=h.getAttribute("aria-controls"),E=document.getElementById(W),z=mn(E,b.elements);x(z)},5);else if(S.offset<0){var O=a(N,!0),R=O[O.length-2],_=I.get(R);c(R,!1),x(_)}}d==null||d(g)}}function Rr(e){Promise.resolve().then(e)}var kt="__RC_UTIL_PATH_SPLIT__",vn=function(n){return n.join(kt)},Pr=function(n){return n.split(kt)},Bt="rc-menu-more";function Or(){var e=i.useState({}),n=ee(e,2),t=n[1],o=je(new Map),r=je(new Map),l=i.useState([]),a=ee(l,2),s=a[0],c=a[1],d=je(0),f=je(!1),u=function(){f.current||t({})},m=Ee(function(I,C){var $=vn(C);r.current.set($,I),o.current.set(I,$),d.current+=1;var h=d.current;Rr(function(){h===d.current&&u()})},[]),g=Ee(function(I,C){var $=vn(C);r.current.delete($),o.current.delete(I)},[]),v=Ee(function(I){c(I)},[]),p=Ee(function(I,C){var $=o.current.get(I)||"",h=Pr($);return C&&s.includes(h[0])&&h.unshift(Bt),h},[s]),b=Ee(function(I,C){return I.filter(function($){return $!==void 0}).some(function($){var h=p($,!0);return h.includes(C)})},[p]),y=function(){var C=xe(o.current.keys());return s.length&&C.push(Bt),C},w=Ee(function(I){var C="".concat(o.current.get(I)).concat(kt),$=new Set;return xe(r.current.keys()).forEach(function(h){h.startsWith(C)&&$.add(r.current.get(h))}),$},[]);return i.useEffect(function(){return function(){f.current=!0}},[]),{registerPath:m,unregisterPath:g,refreshOverflowKeys:v,isSubPathKey:b,getKeyPath:p,getKeys:y,getSubPathKeys:w}}function Ke(e){var n=i.useRef(e);n.current=e;var t=i.useCallback(function(){for(var o,r=arguments.length,l=new Array(r),a=0;a<r;a++)l[a]=arguments[a];return(o=n.current)===null||o===void 0?void 0:o.call.apply(o,[n].concat(l))},[]);return e?t:void 0}var Er=Math.random().toFixed(5).toString().slice(2),pn=0;function Nr(e){var n=Ve(e,{value:e}),t=ee(n,2),o=t[0],r=t[1];return i.useEffect(function(){pn+=1;var l="".concat(Er,"-").concat(pn);r("rc-menu-uuid-".concat(l))},[]),o}function jn(e,n,t,o){var r=i.useContext(ve),l=r.activeKey,a=r.onActive,s=r.onInactive,c={active:l===e};return n||(c.onMouseEnter=function(d){t==null||t({key:e,domEvent:d}),a(e)},c.onMouseLeave=function(d){o==null||o({key:e,domEvent:d}),s(e)}),c}function Kn(e){var n=i.useContext(ve),t=n.mode,o=n.rtl,r=n.inlineIndent;if(t!=="inline")return null;var l=e;return o?{paddingRight:l*r}:{paddingLeft:l*r}}function Vn(e){var n=e.icon,t=e.props,o=e.children,r;return n===null||n===!1?null:(typeof n=="function"?r=i.createElement(n,J({},t)):typeof n!="boolean"&&(r=n),r||o||null)}var Br=["item"];function at(e){var n=e.item,t=de(e,Br);return Object.defineProperty(t,"item",{get:function(){return Mn(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),n}}),t}var Tr=["title","attribute","elementRef"],Dr=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Ar=["active"],_r=(function(e){Do(t,e);var n=Ao(t);function t(){return _o(this,t),n.apply(this,arguments)}return zo(t,[{key:"render",value:function(){var r=this.props,l=r.title,a=r.attribute,s=r.elementRef,c=de(r,Tr),d=we(c,["eventKey","popupClassName","popupOffset","onTitleClick"]);return Mn(!a,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),i.createElement(We.Item,te({},a,{title:typeof l=="string"?l:void 0},d,{ref:s}))}}]),t})(i.Component),zr=i.forwardRef(function(e,n){var t=e.style,o=e.className,r=e.eventKey;e.warnKey;var l=e.disabled,a=e.itemIcon,s=e.children,c=e.role,d=e.onMouseEnter,f=e.onMouseLeave,u=e.onClick,m=e.onKeyDown,g=e.onFocus,v=de(e,Dr),p=_n(r),b=i.useContext(ve),y=b.prefixCls,w=b.onItemClick,I=b.disabled,C=b.overflowDisabled,$=b.itemIcon,h=b.selectedKeys,N=b.onActive,S=i.useContext(_t),x=S._internalRenderMenuItem,B="".concat(y,"-item"),P=i.useRef(),M=i.useRef(),O=I||l,R=Rn(n,M),_=De(r),W=function(H){return{key:r,keyPath:xe(_).reverse(),item:P.current,domEvent:H}},E=a||$,z=jn(r,O,d,f),G=z.active,U=de(z,Ar),Z=h.includes(r),Y=Kn(_.length),D=function(H){if(!O){var oe=W(H);u==null||u(at(oe)),w(oe)}},k=function(H){if(m==null||m(H),H.which===pe.ENTER){var oe=W(H);u==null||u(at(oe)),w(oe)}},F=function(H){N(r),g==null||g(H)},re={};e.role==="option"&&(re["aria-selected"]=Z);var Q=i.createElement(_r,te({ref:P,elementRef:R,role:c===null?"none":c||"menuitem",tabIndex:l?null:-1,"data-menu-id":C&&p?null:p},we(v,["extra"]),U,re,{component:"li","aria-disabled":l,style:J(J({},Y),t),className:V(B,K(K(K({},"".concat(B,"-active"),G),"".concat(B,"-selected"),Z),"".concat(B,"-disabled"),O),o),onClick:D,onKeyDown:k,onFocus:F}),s,i.createElement(Vn,{props:J(J({},e),{},{isSelected:Z}),icon:E}));return x&&(Q=x(Q,e,{selected:Z})),Q});function kr(e,n){var t=e.eventKey,o=dt(),r=De(t);return i.useEffect(function(){if(o)return o.registerPath(t,r),function(){o.unregisterPath(t,r)}},[r]),o?null:i.createElement(zr,te({},e,{ref:n}))}const mt=i.forwardRef(kr);var Hr=["className","children"],Lr=function(n,t){var o=n.className,r=n.children,l=de(n,Hr),a=i.useContext(ve),s=a.prefixCls,c=a.mode,d=a.rtl;return i.createElement("ul",te({className:V(s,d&&"".concat(s,"-rtl"),"".concat(s,"-sub"),"".concat(s,"-").concat(c==="inline"?"inline":"vertical"),o),role:"menu"},l,{"data-menu-list":!0,ref:t}),r)},Ht=i.forwardRef(Lr);Ht.displayName="SubMenuList";function Lt(e,n){return Pn(e).map(function(t,o){if(i.isValidElement(t)){var r,l,a=t.key,s=(r=(l=t.props)===null||l===void 0?void 0:l.eventKey)!==null&&r!==void 0?r:a,c=s==null;c&&(s="tmp_key-".concat([].concat(xe(n),[o]).join("-")));var d={key:s,eventKey:s};return i.cloneElement(t,d)}return t})}var ne={adjustX:1,adjustY:1},jr={topLeft:{points:["bl","tl"],overflow:ne},topRight:{points:["br","tr"],overflow:ne},bottomLeft:{points:["tl","bl"],overflow:ne},bottomRight:{points:["tr","br"],overflow:ne},leftTop:{points:["tr","tl"],overflow:ne},leftBottom:{points:["br","bl"],overflow:ne},rightTop:{points:["tl","tr"],overflow:ne},rightBottom:{points:["bl","br"],overflow:ne}},Kr={topLeft:{points:["bl","tl"],overflow:ne},topRight:{points:["br","tr"],overflow:ne},bottomLeft:{points:["tl","bl"],overflow:ne},bottomRight:{points:["tr","br"],overflow:ne},rightTop:{points:["tr","tl"],overflow:ne},rightBottom:{points:["br","bl"],overflow:ne},leftTop:{points:["tl","tr"],overflow:ne},leftBottom:{points:["bl","br"],overflow:ne}};function Wn(e,n,t){if(n)return n;if(t)return t[e]||t.other}var Vr={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Wr(e){var n=e.prefixCls,t=e.visible,o=e.children,r=e.popup,l=e.popupStyle,a=e.popupClassName,s=e.popupOffset,c=e.disabled,d=e.mode,f=e.onVisibleChange,u=i.useContext(ve),m=u.getPopupContainer,g=u.rtl,v=u.subMenuOpenDelay,p=u.subMenuCloseDelay,b=u.builtinPlacements,y=u.triggerSubMenuAction,w=u.forceSubMenuRender,I=u.rootClassName,C=u.motion,$=u.defaultMotions,h=i.useState(!1),N=ee(h,2),S=N[0],x=N[1],B=g?J(J({},Kr),b):J(J({},jr),b),P=Vr[d],M=Wn(d,C,$),O=i.useRef(M);d!=="inline"&&(O.current=M);var R=J(J({},O.current),{},{leavedClassName:"".concat(n,"-hidden"),removeOnLeave:!1,motionAppear:!0}),_=i.useRef();return i.useEffect(function(){return _.current=Te(function(){x(t)}),function(){Te.cancel(_.current)}},[t]),i.createElement(xn,{prefixCls:n,popupClassName:V("".concat(n,"-popup"),K({},"".concat(n,"-rtl"),g),a,I),stretch:d==="horizontal"?"minWidth":null,getPopupContainer:m,builtinPlacements:B,popupPlacement:P,popupVisible:S,popup:r,popupStyle:l,popupAlign:s&&{offset:s},action:c?[]:[y],mouseEnterDelay:v,mouseLeaveDelay:p,onPopupVisibleChange:f,forceRender:w,popupMotion:R,fresh:!0},o)}function Fr(e){var n=e.id,t=e.open,o=e.keyPath,r=e.children,l="inline",a=i.useContext(ve),s=a.prefixCls,c=a.forceSubMenuRender,d=a.motion,f=a.defaultMotions,u=a.mode,m=i.useRef(!1);m.current=u===l;var g=i.useState(!m.current),v=ee(g,2),p=v[0],b=v[1],y=m.current?t:!1;i.useEffect(function(){m.current&&b(!1)},[u]);var w=J({},Wn(l,d,f));o.length>1&&(w.motionAppear=!1);var I=w.onVisibleChanged;return w.onVisibleChanged=function(C){return!m.current&&!C&&b(!0),I==null?void 0:I(C)},p?null:i.createElement(Fe,{mode:l,locked:!m.current},i.createElement(ko,te({visible:y},w,{forceRender:c,removeOnLeave:!1,leavedClassName:"".concat(s,"-hidden")}),function(C){var $=C.className,h=C.style;return i.createElement(Ht,{id:n,className:$,style:h},r)}))}var Xr=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],qr=["active"],Gr=i.forwardRef(function(e,n){var t=e.style,o=e.className,r=e.title,l=e.eventKey;e.warnKey;var a=e.disabled,s=e.internalPopupClose,c=e.children,d=e.itemIcon,f=e.expandIcon,u=e.popupClassName,m=e.popupOffset,g=e.popupStyle,v=e.onClick,p=e.onMouseEnter,b=e.onMouseLeave,y=e.onTitleClick,w=e.onTitleMouseEnter,I=e.onTitleMouseLeave,C=de(e,Xr),$=_n(l),h=i.useContext(ve),N=h.prefixCls,S=h.mode,x=h.openKeys,B=h.disabled,P=h.overflowDisabled,M=h.activeKey,O=h.selectedKeys,R=h.itemIcon,_=h.expandIcon,W=h.onItemClick,E=h.onOpenChange,z=h.onActive,G=i.useContext(_t),U=G._internalRenderSubMenuItem,Z=i.useContext(Hn),Y=Z.isSubPathKey,D=De(),k="".concat(N,"-submenu"),F=B||a,re=i.useRef(),Q=i.useRef(),X=d??R,H=f??_,oe=x.includes(l),ie=!P&&oe,Me=Y(O,l),Re=jn(l,F,w,I),fe=Re.active,$e=de(Re,qr),Ce=i.useState(!1),j=ee(Ce,2),Pe=j[0],Ge=j[1],Ue=function(ae){F||Ge(ae)},ft=function(ae){Ue(!0),p==null||p({key:l,domEvent:ae})},Ye=function(ae){Ue(!1),b==null||b({key:l,domEvent:ae})},ge=i.useMemo(function(){return fe||(S!=="inline"?Pe||Y([M],l):!1)},[S,fe,M,Pe,l,Y]),gt=Kn(D.length),bt=function(ae){F||(y==null||y({key:l,domEvent:ae}),S==="inline"&&E(l,!oe))},Ze=Ke(function(me){v==null||v(at(me)),W(me)}),Je=function(ae){S!=="inline"&&E(l,ae)},ht=function(){z(l)},be=$&&"".concat($,"-popup"),Ae=i.useMemo(function(){return i.createElement(Vn,{icon:S!=="horizontal"?H:void 0,props:J(J({},e),{},{isOpen:ie,isSubMenu:!0})},i.createElement("i",{className:"".concat(k,"-arrow")}))},[S,H,e,ie,k]),ye=i.createElement("div",te({role:"menuitem",style:gt,className:"".concat(k,"-title"),tabIndex:F?null:-1,ref:re,title:typeof r=="string"?r:null,"data-menu-id":P&&$?null:$,"aria-expanded":ie,"aria-haspopup":!0,"aria-controls":be,"aria-disabled":F,onClick:bt,onFocus:ht},$e),r,Ae),_e=i.useRef(S);if(S!=="inline"&&D.length>1?_e.current="vertical":_e.current=S,!P){var Oe=_e.current;ye=i.createElement(Wr,{mode:Oe,prefixCls:k,visible:!s&&ie&&S!=="inline",popupClassName:u,popupOffset:m,popupStyle:g,popup:i.createElement(Fe,{mode:Oe==="horizontal"?"vertical":Oe},i.createElement(Ht,{id:be,ref:Q},c)),disabled:F,onVisibleChange:Je},ye)}var ue=i.createElement(We.Item,te({ref:n,role:"none"},C,{component:"li",style:t,className:V(k,"".concat(k,"-").concat(S),o,K(K(K(K({},"".concat(k,"-open"),ie),"".concat(k,"-active"),ge),"".concat(k,"-selected"),Me),"".concat(k,"-disabled"),F)),onMouseEnter:ft,onMouseLeave:Ye}),ye,!P&&i.createElement(Fr,{id:be,open:ie,keyPath:D},c));return U&&(ue=U(ue,e,{selected:Me,active:ge,open:ie,disabled:F})),i.createElement(Fe,{onItemClick:Ze,mode:S==="horizontal"?"vertical":S,itemIcon:X,expandIcon:H},ue)}),vt=i.forwardRef(function(e,n){var t=e.eventKey,o=e.children,r=De(t),l=Lt(o,r),a=dt();i.useEffect(function(){if(a)return a.registerPath(t,r),function(){a.unregisterPath(t,r)}},[r]);var s;return a?s=l:s=i.createElement(Gr,te({ref:n},e),l),i.createElement(kn.Provider,{value:r},s)});function jt(e){var n=e.className,t=e.style,o=i.useContext(ve),r=o.prefixCls,l=dt();return l?null:i.createElement("li",{role:"separator",className:V("".concat(r,"-item-divider"),n),style:t})}var Ur=["className","title","eventKey","children"],Yr=i.forwardRef(function(e,n){var t=e.className,o=e.title;e.eventKey;var r=e.children,l=de(e,Ur),a=i.useContext(ve),s=a.prefixCls,c="".concat(s,"-item-group");return i.createElement("li",te({ref:n,role:"presentation"},l,{onClick:function(f){return f.stopPropagation()},className:V(c,t)}),i.createElement("div",{role:"presentation",className:"".concat(c,"-title"),title:typeof o=="string"?o:void 0},o),i.createElement("ul",{role:"group",className:"".concat(c,"-list")},r))}),Kt=i.forwardRef(function(e,n){var t=e.eventKey,o=e.children,r=De(t),l=Lt(o,r),a=dt();return a?l:i.createElement(Yr,te({ref:n},we(e,["warnKey"])),l)}),Zr=["label","children","key","type","extra"];function Tt(e,n,t){var o=n.item,r=n.group,l=n.submenu,a=n.divider;return(e||[]).map(function(s,c){if(s&&Ho(s)==="object"){var d=s,f=d.label,u=d.children,m=d.key,g=d.type,v=d.extra,p=de(d,Zr),b=m??"tmp-".concat(c);return u||g==="group"?g==="group"?i.createElement(r,te({key:b},p,{title:f}),Tt(u,n,t)):i.createElement(l,te({key:b},p,{title:f}),Tt(u,n,t)):g==="divider"?i.createElement(a,te({key:b},p)):i.createElement(o,te({key:b},p,{extra:v}),f,(!!v||v===0)&&i.createElement("span",{className:"".concat(t,"-item-extra")},v))}return null}).filter(function(s){return s})}function fn(e,n,t,o,r){var l=e,a=J({divider:jt,item:mt,group:Kt,submenu:vt},o);return n&&(l=Tt(n,a,r)),Lt(l,t)}var Jr=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],Se=[],Qr=i.forwardRef(function(e,n){var t,o=e,r=o.prefixCls,l=r===void 0?"rc-menu":r,a=o.rootClassName,s=o.style,c=o.className,d=o.tabIndex,f=d===void 0?0:d,u=o.items,m=o.children,g=o.direction,v=o.id,p=o.mode,b=p===void 0?"vertical":p,y=o.inlineCollapsed,w=o.disabled,I=o.disabledOverflow,C=o.subMenuOpenDelay,$=C===void 0?.1:C,h=o.subMenuCloseDelay,N=h===void 0?.1:h,S=o.forceSubMenuRender,x=o.defaultOpenKeys,B=o.openKeys,P=o.activeKey,M=o.defaultActiveFirst,O=o.selectable,R=O===void 0?!0:O,_=o.multiple,W=_===void 0?!1:_,E=o.defaultSelectedKeys,z=o.selectedKeys,G=o.onSelect,U=o.onDeselect,Z=o.inlineIndent,Y=Z===void 0?24:Z,D=o.motion,k=o.defaultMotions,F=o.triggerSubMenuAction,re=F===void 0?"hover":F,Q=o.builtinPlacements,X=o.itemIcon,H=o.expandIcon,oe=o.overflowedIndicator,ie=oe===void 0?"...":oe,Me=o.overflowedIndicatorPopupClassName,Re=o.getPopupContainer,fe=o.onClick,$e=o.onOpenChange,Ce=o.onKeyDown;o.openAnimation,o.openTransitionName;var j=o._internalRenderMenuItem,Pe=o._internalRenderSubMenuItem,Ge=o._internalComponents,Ue=de(o,Jr),ft=i.useMemo(function(){return[fn(m,u,Se,Ge,l),fn(m,u,Se,{},l)]},[m,u,Ge]),Ye=ee(ft,2),ge=Ye[0],gt=Ye[1],bt=i.useState(!1),Ze=ee(bt,2),Je=Ze[0],ht=Ze[1],be=i.useRef(),Ae=Nr(v),ye=g==="rtl",_e=Ve(x,{value:B,postState:function(A){return A||Se}}),Oe=ee(_e,2),ue=Oe[0],me=Oe[1],ae=function(A){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function le(){me(A),$e==null||$e(A)}L?sr(le):le()},Zn=i.useState(ue),Vt=ee(Zn,2),Jn=Vt[0],Qn=Vt[1],$t=i.useRef(!1),eo=i.useMemo(function(){return(b==="inline"||b==="vertical")&&y?["vertical",y]:[b,!1]},[b,y]),Wt=ee(eo,2),Qe=Wt[0],Ct=Wt[1],Ft=Qe==="inline",to=i.useState(Qe),Xt=ee(to,2),he=Xt[0],no=Xt[1],oo=i.useState(Ct),qt=ee(oo,2),ro=qt[0],io=qt[1];i.useEffect(function(){no(Qe),io(Ct),$t.current&&(Ft?me(Jn):ae(Se))},[Qe,Ct]);var ao=i.useState(0),Gt=ee(ao,2),et=Gt[0],lo=Gt[1],yt=et>=ge.length-1||he!=="horizontal"||I;i.useEffect(function(){Ft&&Qn(ue)},[ue]),i.useEffect(function(){return $t.current=!0,function(){$t.current=!1}},[]);var Ie=Or(),Ut=Ie.registerPath,Yt=Ie.unregisterPath,so=Ie.refreshOverflowKeys,Zt=Ie.isSubPathKey,co=Ie.getKeyPath,Jt=Ie.getKeys,uo=Ie.getSubPathKeys,mo=i.useMemo(function(){return{registerPath:Ut,unregisterPath:Yt}},[Ut,Yt]),vo=i.useMemo(function(){return{isSubPathKey:Zt}},[Zt]);i.useEffect(function(){so(yt?Se:ge.slice(et+1).map(function(q){return q.key}))},[et,yt]);var po=Ve(P||M&&((t=ge[0])===null||t===void 0?void 0:t.key),{value:P}),Qt=ee(po,2),ze=Qt[0],It=Qt[1],fo=Ke(function(q){It(q)}),go=Ke(function(){It(void 0)});yn(n,function(){return{list:be.current,focus:function(A){var L,le=Jt(),se=Nt(le,Ae),nt=se.elements,St=se.key2element,Mo=se.element2key,nn=zt(be.current,nt),on=ze??(nn[0]?Mo.get(nn[0]):(L=ge.find(function(Ro){return!Ro.props.disabled}))===null||L===void 0?void 0:L.key),ke=St.get(on);if(on&&ke){var xt;ke==null||(xt=ke.focus)===null||xt===void 0||xt.call(ke,A)}}}});var bo=Ve(E||[],{value:z,postState:function(A){return Array.isArray(A)?A:A==null?Se:[A]}}),en=ee(bo,2),tt=en[0],ho=en[1],$o=function(A){if(R){var L=A.key,le=tt.includes(L),se;W?le?se=tt.filter(function(St){return St!==L}):se=[].concat(xe(tt),[L]):se=[L],ho(se);var nt=J(J({},A),{},{selectedKeys:se});le?U==null||U(nt):G==null||G(nt)}!W&&ue.length&&he!=="inline"&&ae(Se)},Co=Ke(function(q){fe==null||fe(at(q)),$o(q)}),tn=Ke(function(q,A){var L=ue.filter(function(se){return se!==q});if(A)L.push(q);else if(he!=="inline"){var le=uo(q);L=L.filter(function(se){return!le.has(se)})}wn(ue,L,!0)||ae(L,!0)}),yo=function(A,L){var le=L??!ue.includes(A);tn(A,le)},Io=Mr(he,ze,ye,Ae,be,Jt,co,It,yo,Ce);i.useEffect(function(){ht(!0)},[]);var So=i.useMemo(function(){return{_internalRenderMenuItem:j,_internalRenderSubMenuItem:Pe}},[j,Pe]),xo=he!=="horizontal"||I?ge:ge.map(function(q,A){return i.createElement(Fe,{key:q.key,overflowDisabled:A>et},q)}),wo=i.createElement(We,te({id:v,ref:be,prefixCls:"".concat(l,"-overflow"),component:"ul",itemComponent:mt,className:V(l,"".concat(l,"-root"),"".concat(l,"-").concat(he),c,K(K({},"".concat(l,"-inline-collapsed"),ro),"".concat(l,"-rtl"),ye),a),dir:g,style:s,role:"menu",tabIndex:f,data:xo,renderRawItem:function(A){return A},renderRawRest:function(A){var L=A.length,le=L?ge.slice(-L):null;return i.createElement(vt,{eventKey:Bt,title:ie,disabled:yt,internalPopupClose:L===0,popupClassName:Me},le)},maxCount:he!=="horizontal"||I?We.INVALIDATE:We.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(A){lo(A)},onKeyDown:Io},Ue));return i.createElement(_t.Provider,{value:So},i.createElement(Dn.Provider,{value:Ae},i.createElement(Fe,{prefixCls:l,rootClassName:a,mode:he,openKeys:ue,rtl:ye,disabled:w,motion:Je?D:null,defaultMotions:Je?k:null,activeKey:ze,onActive:fo,onInactive:go,selectedKeys:tt,inlineIndent:Y,subMenuOpenDelay:$,subMenuCloseDelay:N,forceSubMenuRender:S,builtinPlacements:Q,triggerSubMenuAction:re,getPopupContainer:Re,itemIcon:X,expandIcon:H,onItemClick:Co,onOpenChange:tn},i.createElement(Hn.Provider,{value:vo},wo),i.createElement("div",{style:{display:"none"},"aria-hidden":!0},i.createElement(zn.Provider,{value:mo},gt)))))}),Xe=Qr;Xe.Item=mt;Xe.SubMenu=vt;Xe.ItemGroup=Kt;Xe.Divider=jt;const Fn=i.createContext({});var ei={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},ti=function(n,t){return i.createElement(Lo,te({},n,{ref:t,icon:ei}))},Xn=i.forwardRef(ti);const lt=Oo({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var ni=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]]);return t};const qn=e=>{const{prefixCls:n,className:t,dashed:o}=e,r=ni(e,["prefixCls","className","dashed"]),{getPrefixCls:l}=i.useContext(ct),a=l("menu",n),s=V({[`${a}-item-divider-dashed`]:!!o},t);return i.createElement(jt,Object.assign({className:s},r))},Gn=e=>{var n;const{className:t,children:o,icon:r,title:l,danger:a,extra:s}=e,{prefixCls:c,firstLevel:d,direction:f,disableMenuItemTitleTooltip:u,inlineCollapsed:m}=i.useContext(lt),g=I=>{const C=o==null?void 0:o[0],$=i.createElement("span",{className:V(`${c}-title-content`,{[`${c}-title-content-with-extra`]:!!s||s===0})},o);return(!r||i.isValidElement(o)&&o.type==="span")&&o&&I&&d&&typeof C=="string"?i.createElement("div",{className:`${c}-inline-collapsed-noicon`},C.charAt(0)):$},{siderCollapsed:v}=i.useContext(Fn);let p=l;typeof l>"u"?p=d?o:"":l===!1&&(p="");const b={title:p};!v&&!m&&(b.title=null,b.open=!1);const y=Pn(o).length;let w=i.createElement(mt,Object.assign({},we(e,["title","icon","danger"]),{className:V({[`${c}-item-danger`]:a,[`${c}-item-only-child`]:(r?y+1:y)===1},t),title:typeof l=="string"?l:void 0}),ut(r,{className:V(i.isValidElement(r)?(n=r.props)===null||n===void 0?void 0:n.className:void 0,`${c}-item-icon`)}),g(m));return u||(w=i.createElement(jo,Object.assign({},b,{placement:f==="rtl"?"left":"right",classNames:{root:`${c}-inline-collapsed-tooltip`}}),w)),w};var oi=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]]);return t};const st=i.createContext(null),ri=i.forwardRef((e,n)=>{const{children:t}=e,o=oi(e,["children"]),r=i.useContext(st),l=i.useMemo(()=>Object.assign(Object.assign({},r),o),[r,o.prefixCls,o.mode,o.selectable,o.rootClassName]),a=Ko(t),s=Rn(n,a?At(t):null);return i.createElement(st.Provider,{value:l},i.createElement(Vo,{space:!0},a?i.cloneElement(t,{ref:s}):t))}),ii=e=>{const{componentCls:n,motionDurationSlow:t,horizontalLineHeight:o,colorSplit:r,lineWidth:l,lineType:a,itemPaddingInline:s}=e;return{[`${n}-horizontal`]:{lineHeight:o,border:0,borderBottom:`${T(l)} ${a} ${r}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${n}-item, ${n}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:s},[`> ${n}-item:hover,
|
|
2
|
+
> ${n}-item-active,
|
|
3
|
+
> ${n}-submenu ${n}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${n}-item, ${n}-submenu-title`]:{transition:[`border-color ${t}`,`background ${t}`].join(",")},[`${n}-submenu-arrow`]:{display:"none"}}}},ai=({componentCls:e,menuArrowOffset:n,calc:t})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical,
|
|
4
|
+
${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${T(t(n).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${T(n)})`}}}}),gn=e=>Wo(e),bn=(e,n)=>{const{componentCls:t,itemColor:o,itemSelectedColor:r,subMenuItemSelectedColor:l,groupTitleColor:a,itemBg:s,subMenuItemBg:c,itemSelectedBg:d,activeBarHeight:f,activeBarWidth:u,activeBarBorderWidth:m,motionDurationSlow:g,motionEaseInOut:v,motionEaseOut:p,itemPaddingInline:b,motionDurationMid:y,itemHoverColor:w,lineType:I,colorSplit:C,itemDisabledColor:$,dangerItemColor:h,dangerItemHoverColor:N,dangerItemSelectedColor:S,dangerItemActiveBg:x,dangerItemSelectedBg:B,popupBg:P,itemHoverBg:M,itemActiveBg:O,menuSubMenuBg:R,horizontalItemSelectedColor:_,horizontalItemSelectedBg:W,horizontalItemBorderRadius:E,horizontalItemHoverBg:z}=e;return{[`${t}-${n}, ${t}-${n} > ${t}`]:{color:o,background:s,[`&${t}-root:focus-visible`]:Object.assign({},gn(e)),[`${t}-item`]:{"&-group-title, &-extra":{color:a}},[`${t}-submenu-selected > ${t}-submenu-title`]:{color:l},[`${t}-item, ${t}-submenu-title`]:{color:o,[`&:not(${t}-item-disabled):focus-visible`]:Object.assign({},gn(e))},[`${t}-item-disabled, ${t}-submenu-disabled`]:{color:`${$} !important`},[`${t}-item:not(${t}-item-selected):not(${t}-submenu-selected)`]:{[`&:hover, > ${t}-submenu-title:hover`]:{color:w}},[`&:not(${t}-horizontal)`]:{[`${t}-item:not(${t}-item-selected)`]:{"&:hover":{backgroundColor:M},"&:active":{backgroundColor:O}},[`${t}-submenu-title`]:{"&:hover":{backgroundColor:M},"&:active":{backgroundColor:O}}},[`${t}-item-danger`]:{color:h,[`&${t}-item:hover`]:{[`&:not(${t}-item-selected):not(${t}-submenu-selected)`]:{color:N}},[`&${t}-item:active`]:{background:x}},[`${t}-item a`]:{"&, &:hover":{color:"inherit"}},[`${t}-item-selected`]:{color:r,[`&${t}-item-danger`]:{color:S},"a, a:hover":{color:"inherit"}},[`& ${t}-item-selected`]:{backgroundColor:d,[`&${t}-item-danger`]:{backgroundColor:B}},[`&${t}-submenu > ${t}`]:{backgroundColor:R},[`&${t}-popup > ${t}`]:{backgroundColor:P},[`&${t}-submenu-popup > ${t}`]:{backgroundColor:P},[`&${t}-horizontal`]:Object.assign(Object.assign({},n==="dark"?{borderBottom:0}:{}),{[`> ${t}-item, > ${t}-submenu`]:{top:m,marginTop:e.calc(m).mul(-1).equal(),marginBottom:0,borderRadius:E,"&::after":{position:"absolute",insetInline:b,bottom:0,borderBottom:`${T(f)} solid transparent`,transition:`border-color ${g} ${v}`,content:'""'},"&:hover, &-active, &-open":{background:z,"&::after":{borderBottomWidth:f,borderBottomColor:_}},"&-selected":{color:_,backgroundColor:W,"&:hover":{backgroundColor:W},"&::after":{borderBottomWidth:f,borderBottomColor:_}}}}),[`&${t}-root`]:{[`&${t}-inline, &${t}-vertical`]:{borderInlineEnd:`${T(m)} ${I} ${C}`}},[`&${t}-inline`]:{[`${t}-sub${t}-inline`]:{background:c},[`${t}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${T(u)} solid ${r}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${y} ${p}`,`opacity ${y} ${p}`].join(","),content:'""'},[`&${t}-item-danger`]:{"&::after":{borderInlineEndColor:S}}},[`${t}-selected, ${t}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${y} ${v}`,`opacity ${y} ${v}`].join(",")}}}}}},hn=e=>{const{componentCls:n,itemHeight:t,itemMarginInline:o,padding:r,menuArrowSize:l,marginXS:a,itemMarginBlock:s,itemWidth:c,itemPaddingInline:d}=e,f=e.calc(l).add(r).add(a).equal();return{[`${n}-item`]:{position:"relative",overflow:"hidden"},[`${n}-item, ${n}-submenu-title`]:{height:t,lineHeight:T(t),paddingInline:d,overflow:"hidden",textOverflow:"ellipsis",marginInline:o,marginBlock:s,width:c},[`> ${n}-item,
|
|
5
|
+
> ${n}-submenu > ${n}-submenu-title`]:{height:t,lineHeight:T(t)},[`${n}-item-group-list ${n}-submenu-title,
|
|
6
|
+
${n}-submenu-title`]:{paddingInlineEnd:f}}},li=e=>{const{componentCls:n,iconCls:t,itemHeight:o,colorTextLightSolid:r,dropdownWidth:l,controlHeightLG:a,motionEaseOut:s,paddingXL:c,itemMarginInline:d,fontSizeLG:f,motionDurationFast:u,motionDurationSlow:m,paddingXS:g,boxShadowSecondary:v,collapsedWidth:p,collapsedIconSize:b}=e,y={height:o,lineHeight:T(o),listStylePosition:"inside",listStyleType:"disc"};return[{[n]:{"&-inline, &-vertical":Object.assign({[`&${n}-root`]:{boxShadow:"none"}},hn(e))},[`${n}-submenu-popup`]:{[`${n}-vertical`]:Object.assign(Object.assign({},hn(e)),{boxShadow:v})}},{[`${n}-submenu-popup ${n}-vertical${n}-sub`]:{minWidth:l,maxHeight:`calc(100vh - ${T(e.calc(a).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${n}-inline`]:{width:"100%",[`&${n}-root`]:{[`${n}-item, ${n}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${m}`,`background ${m}`,`padding ${u} ${s}`].join(","),[`> ${n}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${n}-sub${n}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${n}-submenu > ${n}-submenu-title`]:y,[`& ${n}-item-group-title`]:{paddingInlineStart:c}},[`${n}-item`]:y}},{[`${n}-inline-collapsed`]:{width:p,[`&${n}-root`]:{[`${n}-item, ${n}-submenu ${n}-submenu-title`]:{[`> ${n}-inline-collapsed-noicon`]:{fontSize:f,textAlign:"center"}}},[`> ${n}-item,
|
|
7
|
+
> ${n}-item-group > ${n}-item-group-list > ${n}-item,
|
|
8
|
+
> ${n}-item-group > ${n}-item-group-list > ${n}-submenu > ${n}-submenu-title,
|
|
9
|
+
> ${n}-submenu > ${n}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${T(e.calc(b).div(2).equal())} - ${T(d)})`,textOverflow:"clip",[`
|
|
10
|
+
${n}-submenu-arrow,
|
|
11
|
+
${n}-submenu-expand-icon
|
|
12
|
+
`]:{opacity:0},[`${n}-item-icon, ${t}`]:{margin:0,fontSize:b,lineHeight:T(o),"+ span":{display:"inline-block",opacity:0}}},[`${n}-item-icon, ${t}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${n}-item-icon, ${t}`]:{display:"none"},"a, a:hover":{color:r}},[`${n}-item-group-title`]:Object.assign(Object.assign({},Fo),{paddingInline:g})}}]},$n=e=>{const{componentCls:n,motionDurationSlow:t,motionDurationMid:o,motionEaseInOut:r,motionEaseOut:l,iconCls:a,iconSize:s,iconMarginInlineEnd:c}=e;return{[`${n}-item, ${n}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${t}`,`background ${t}`,`padding calc(${t} + 0.1s) ${r}`].join(","),[`${n}-item-icon, ${a}`]:{minWidth:s,fontSize:s,transition:[`font-size ${o} ${l}`,`margin ${t} ${r}`,`color ${t}`].join(","),"+ span":{marginInlineStart:c,opacity:1,transition:[`opacity ${t} ${r}`,`margin ${t}`,`color ${t}`].join(",")}},[`${n}-item-icon`]:Object.assign({},qo()),[`&${n}-item-only-child`]:{[`> ${a}, > ${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",cursor:"not-allowed",pointerEvents:"none"},[`> ${n}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Cn=e=>{const{componentCls:n,motionDurationSlow:t,motionEaseInOut:o,borderRadius:r,menuArrowSize:l,menuArrowOffset:a}=e;return{[`${n}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:l,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${t} ${o}, opacity ${t}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(l).mul(.6).equal(),height:e.calc(l).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:r,transition:[`background ${t} ${o}`,`transform ${t} ${o}`,`top ${t} ${o}`,`color ${t} ${o}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${T(e.calc(a).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${T(a)})`}}}}},si=e=>{const{antCls:n,componentCls:t,fontSize:o,motionDurationSlow:r,motionDurationMid:l,motionEaseInOut:a,paddingXS:s,padding:c,colorSplit:d,lineWidth:f,zIndexPopup:u,borderRadiusLG:m,subMenuItemBorderRadius:g,menuArrowSize:v,menuArrowOffset:p,lineType:b,groupTitleLineHeight:y,groupTitleFontSize:w}=e;return[{"":{[t]:Object.assign(Object.assign({},rn()),{"&-hidden":{display:"none"}})},[`${t}-submenu-hidden`]:{display:"none"}},{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Nn(e)),rn()),{marginBottom:0,paddingInlineStart:0,fontSize:o,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${r} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${t}-item`]:{flex:"none"}},[`${t}-item, ${t}-submenu, ${t}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${t}-item-group-title`]:{padding:`${T(s)} ${T(c)}`,fontSize:w,lineHeight:y,transition:`all ${r}`},[`&-horizontal ${t}-submenu`]:{transition:[`border-color ${r} ${a}`,`background ${r} ${a}`].join(",")},[`${t}-submenu, ${t}-submenu-inline`]:{transition:[`border-color ${r} ${a}`,`background ${r} ${a}`,`padding ${l} ${a}`].join(",")},[`${t}-submenu ${t}-sub`]:{cursor:"initial",transition:[`background ${r} ${a}`,`padding ${r} ${a}`].join(",")},[`${t}-title-content`]:{transition:`color ${r}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${n}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${t}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:e.padding}},[`${t}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${t}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:d,borderStyle:b,borderWidth:0,borderTopWidth:f,marginBlock:f,padding:0,"&-dashed":{borderStyle:"dashed"}}}),$n(e)),{[`${t}-item-group`]:{[`${t}-item-group-list`]:{margin:0,padding:0,[`${t}-item, ${t}-submenu-title`]:{paddingInline:`${T(e.calc(o).mul(2).equal())} ${T(c)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:u,borderRadius:m,boxShadow:"none",transformOrigin:"0 0",[`&${t}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${t}`]:Object.assign(Object.assign(Object.assign({borderRadius:m},$n(e)),Cn(e)),{[`${t}-item, ${t}-submenu > ${t}-submenu-title`]:{borderRadius:g},[`${t}-submenu-title::after`]:{transition:`transform ${r} ${a}`}})},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:e.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:e.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:e.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:e.paddingXS}}}),Cn(e)),{[`&-inline-collapsed ${t}-submenu-arrow,
|
|
13
|
+
&-inline ${t}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${T(p)})`},"&::after":{transform:`rotate(45deg) translateX(${T(e.calc(p).mul(-1).equal())})`}},[`${t}-submenu-open${t}-submenu-inline > ${t}-submenu-title > ${t}-submenu-arrow`]:{transform:`translateY(${T(e.calc(v).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${T(e.calc(p).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${T(p)})`}}})},{[`${n}-layout-header`]:{[t]:{lineHeight:"inherit"}}}]},ci=e=>{var n,t,o;const{colorPrimary:r,colorError:l,colorTextDisabled:a,colorErrorBg:s,colorText:c,colorTextDescription:d,colorBgContainer:f,colorFillAlter:u,colorFillContent:m,lineWidth:g,lineWidthBold:v,controlItemBgActive:p,colorBgTextHover:b,controlHeightLG:y,lineHeight:w,colorBgElevated:I,marginXXS:C,padding:$,fontSize:h,controlHeightSM:N,fontSizeLG:S,colorTextLightSolid:x,colorErrorHover:B}=e,P=(n=e.activeBarWidth)!==null&&n!==void 0?n:0,M=(t=e.activeBarBorderWidth)!==null&&t!==void 0?t:g,O=(o=e.itemMarginInline)!==null&&o!==void 0?o:e.marginXXS,R=new an(x).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:c,itemColor:c,colorItemTextHover:c,itemHoverColor:c,colorItemTextHoverHorizontal:r,horizontalItemHoverColor:r,colorGroupTitle:d,groupTitleColor:d,colorItemTextSelected:r,itemSelectedColor:r,subMenuItemSelectedColor:r,colorItemTextSelectedHorizontal:r,horizontalItemSelectedColor:r,colorItemBg:f,itemBg:f,colorItemBgHover:b,itemHoverBg:b,colorItemBgActive:m,itemActiveBg:p,colorSubItemBg:u,subMenuItemBg:u,colorItemBgSelected:p,itemSelectedBg:p,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:P,colorActiveBarHeight:v,activeBarHeight:v,colorActiveBarBorderSize:g,activeBarBorderWidth:M,colorItemTextDisabled:a,itemDisabledColor:a,colorDangerItemText:l,dangerItemColor:l,colorDangerItemTextHover:l,dangerItemHoverColor:l,colorDangerItemTextSelected:l,dangerItemSelectedColor:l,colorDangerItemBgActive:s,dangerItemActiveBg:s,colorDangerItemBgSelected:s,dangerItemSelectedBg:s,itemMarginInline:O,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:y,groupTitleLineHeight:w,collapsedWidth:y*2,popupBg:I,itemMarginBlock:C,itemPaddingInline:$,horizontalLineHeight:`${y*1.15}px`,iconSize:h,iconMarginInlineEnd:N-h,collapsedIconSize:S,groupTitleFontSize:h,darkItemDisabledColor:new an(x).setA(.25).toRgbString(),darkItemColor:R,darkDangerItemColor:l,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:x,darkItemSelectedBg:r,darkDangerItemSelectedBg:l,darkItemHoverBg:"transparent",darkGroupTitleColor:R,darkItemHoverColor:x,darkDangerItemHoverColor:B,darkDangerItemSelectedColor:x,darkDangerItemActiveBg:l,itemWidth:P?`calc(100% + ${M}px)`:`calc(100% - ${O*2}px)`}},ui=(e,n=e,t=!0)=>On("Menu",r=>{const{colorBgElevated:l,controlHeightLG:a,fontSize:s,darkItemColor:c,darkDangerItemColor:d,darkItemBg:f,darkSubMenuItemBg:u,darkItemSelectedColor:m,darkItemSelectedBg:g,darkDangerItemSelectedBg:v,darkItemHoverBg:p,darkGroupTitleColor:b,darkItemHoverColor:y,darkItemDisabledColor:w,darkDangerItemHoverColor:I,darkDangerItemSelectedColor:C,darkDangerItemActiveBg:$,popupBg:h,darkPopupBg:N}=r,S=r.calc(s).div(7).mul(5).equal(),x=Mt(r,{menuArrowSize:S,menuHorizontalHeight:r.calc(a).mul(1.15).equal(),menuArrowOffset:r.calc(S).mul(.25).equal(),menuSubMenuBg:l,calc:r.calc,popupBg:h}),B=Mt(x,{itemColor:c,itemHoverColor:y,groupTitleColor:b,itemSelectedColor:m,subMenuItemSelectedColor:m,itemBg:f,popupBg:N,subMenuItemBg:u,itemActiveBg:"transparent",itemSelectedBg:g,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:p,itemDisabledColor:w,dangerItemColor:d,dangerItemHoverColor:I,dangerItemSelectedColor:C,dangerItemActiveBg:$,dangerItemSelectedBg:v,menuSubMenuBg:u,horizontalItemSelectedColor:m,horizontalItemSelectedBg:g});return[si(x),ii(x),li(x),bn(x,"light"),bn(B,"dark"),ai(x),Xo(x),it(x,"slide-up"),it(x,"slide-down"),En(x,"zoom-big")]},ci,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:t,unitless:{groupTitleLineHeight:!0}})(e,n),Un=e=>{var n;const{popupClassName:t,icon:o,title:r,theme:l}=e,a=i.useContext(lt),{prefixCls:s,inlineCollapsed:c,theme:d}=a,f=De();let u;if(!o)u=c&&!f.length&&r&&typeof r=="string"?i.createElement("div",{className:`${s}-inline-collapsed-noicon`},r.charAt(0)):i.createElement("span",{className:`${s}-title-content`},r);else{const v=i.isValidElement(r)&&r.type==="span";u=i.createElement(i.Fragment,null,ut(o,{className:V(i.isValidElement(o)?(n=o.props)===null||n===void 0?void 0:n.className:void 0,`${s}-item-icon`)}),v?r:i.createElement("span",{className:`${s}-title-content`},r))}const m=i.useMemo(()=>Object.assign(Object.assign({},a),{firstLevel:!1}),[a]),[g]=Bn("Menu");return i.createElement(lt.Provider,{value:m},i.createElement(vt,Object.assign({},we(e,["icon"]),{title:u,popupClassName:V(s,t,`${s}-${l||d}`),popupStyle:Object.assign({zIndex:g},e.popupStyle)})))};var di=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]]);return t};function wt(e){return e===null||e===!1}const mi={item:Gn,submenu:Un,divider:qn},vi=Dt((e,n)=>{var t;const o=i.useContext(st),r=o||{},{getPrefixCls:l,getPopupContainer:a,direction:s,menu:c}=i.useContext(ct),d=l(),{prefixCls:f,className:u,style:m,theme:g="light",expandIcon:v,_internalDisableMenuItemTitleTooltip:p,inlineCollapsed:b,siderCollapsed:y,rootClassName:w,mode:I,selectable:C,onClick:$,overflowedIndicatorPopupClassName:h}=e,N=di(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),S=we(N,["collapsedWidth"]);(t=r.validator)===null||t===void 0||t.call(r,{mode:I});const x=Rt((...Y)=>{var D;$==null||$.apply(void 0,Y),(D=r.onClick)===null||D===void 0||D.call(r)}),B=r.mode||I,P=C??r.selectable,M=b??y,O={horizontal:{motionName:`${d}-slide-up`},inline:Go(d),other:{motionName:`${d}-zoom-big`}},R=l("menu",f||r.prefixCls),_=Tn(R),[W,E,z]=ui(R,_,!o),G=V(`${R}-${g}`,c==null?void 0:c.className,u),U=i.useMemo(()=>{var Y,D;if(typeof v=="function"||wt(v))return v||null;if(typeof r.expandIcon=="function"||wt(r.expandIcon))return r.expandIcon||null;if(typeof(c==null?void 0:c.expandIcon)=="function"||wt(c==null?void 0:c.expandIcon))return(c==null?void 0:c.expandIcon)||null;const k=(Y=v??(r==null?void 0:r.expandIcon))!==null&&Y!==void 0?Y:c==null?void 0:c.expandIcon;return ut(k,{className:V(`${R}-submenu-expand-icon`,i.isValidElement(k)?(D=k.props)===null||D===void 0?void 0:D.className:void 0)})},[v,r==null?void 0:r.expandIcon,c==null?void 0:c.expandIcon,R]),Z=i.useMemo(()=>({prefixCls:R,inlineCollapsed:M||!1,direction:s,firstLevel:!0,theme:g,mode:B,disableMenuItemTitleTooltip:p}),[R,M,s,p,g]);return W(i.createElement(st.Provider,{value:null},i.createElement(lt.Provider,{value:Z},i.createElement(Xe,Object.assign({getPopupContainer:a,overflowedIndicator:i.createElement(Xn,null),overflowedIndicatorPopupClassName:V(R,`${R}-${g}`,h),mode:B,selectable:P,onClick:x},S,{inlineCollapsed:M,style:Object.assign(Object.assign({},c==null?void 0:c.style),m),className:G,prefixCls:R,direction:s,defaultMotions:O,expandIcon:U,ref:n,rootClassName:V(w,E,r.rootClassName,z,_),_internalComponents:mi})))))}),qe=Dt((e,n)=>{const t=je(null),o=i.useContext(Fn);return yn(n,()=>({menu:t.current,focus:r=>{var l;(l=t.current)===null||l===void 0||l.focus(r)}})),i.createElement(vi,Object.assign({ref:t},e,o))});qe.Item=Gn;qe.SubMenu=Un;qe.Divider=qn;qe.ItemGroup=Kt;const pi=e=>{const{componentCls:n,menuCls:t,colorError:o,colorTextLightSolid:r}=e,l=`${t}-item`;return{[`${n}, ${n}-menu-submenu`]:{[`${t} ${l}`]:{[`&${l}-danger:not(${l}-disabled)`]:{color:o,"&:hover":{color:r,backgroundColor:o}}}}}},fi=e=>{const{componentCls:n,menuCls:t,zIndexPopup:o,dropdownArrowDistance:r,sizePopupArrow:l,antCls:a,iconCls:s,motionDurationMid:c,paddingBlock:d,fontSize:f,dropdownEdgeChildPadding:u,colorTextDisabled:m,fontSizeIcon:g,controlPaddingHorizontal:v,colorBgElevated:p}=e;return[{[n]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:o,display:"block","&::before":{position:"absolute",insetBlock:e.calc(l).div(2).sub(r).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${a}-btn`]:{[`& > ${s}-down, & > ${a}-btn-icon > ${s}-down`]:{fontSize:g}},[`${n}-wrap`]:{position:"relative",[`${a}-btn > ${s}-down`]:{fontSize:g},[`${s}-down::before`]:{transition:`transform ${c}`}},[`${n}-wrap-open`]:{[`${s}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${a}-slide-down-enter${a}-slide-down-enter-active${n}-placement-bottomLeft,
|
|
14
|
+
&${a}-slide-down-appear${a}-slide-down-appear-active${n}-placement-bottomLeft,
|
|
15
|
+
&${a}-slide-down-enter${a}-slide-down-enter-active${n}-placement-bottom,
|
|
16
|
+
&${a}-slide-down-appear${a}-slide-down-appear-active${n}-placement-bottom,
|
|
17
|
+
&${a}-slide-down-enter${a}-slide-down-enter-active${n}-placement-bottomRight,
|
|
18
|
+
&${a}-slide-down-appear${a}-slide-down-appear-active${n}-placement-bottomRight`]:{animationName:Jo},[`&${a}-slide-up-enter${a}-slide-up-enter-active${n}-placement-topLeft,
|
|
19
|
+
&${a}-slide-up-appear${a}-slide-up-appear-active${n}-placement-topLeft,
|
|
20
|
+
&${a}-slide-up-enter${a}-slide-up-enter-active${n}-placement-top,
|
|
21
|
+
&${a}-slide-up-appear${a}-slide-up-appear-active${n}-placement-top,
|
|
22
|
+
&${a}-slide-up-enter${a}-slide-up-enter-active${n}-placement-topRight,
|
|
23
|
+
&${a}-slide-up-appear${a}-slide-up-appear-active${n}-placement-topRight`]:{animationName:Zo},[`&${a}-slide-down-leave${a}-slide-down-leave-active${n}-placement-bottomLeft,
|
|
24
|
+
&${a}-slide-down-leave${a}-slide-down-leave-active${n}-placement-bottom,
|
|
25
|
+
&${a}-slide-down-leave${a}-slide-down-leave-active${n}-placement-bottomRight`]:{animationName:Yo},[`&${a}-slide-up-leave${a}-slide-up-leave-active${n}-placement-topLeft,
|
|
26
|
+
&${a}-slide-up-leave${a}-slide-up-leave-active${n}-placement-top,
|
|
27
|
+
&${a}-slide-up-leave${a}-slide-up-leave-active${n}-placement-topRight`]:{animationName:Uo}}},Qo(e,p,{arrowPlacement:{top:!0,bottom:!0}}),{[`${n} ${t}`]:{position:"relative",margin:0},[`${t}-submenu-popup`]:{position:"absolute",zIndex:o,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${n}, ${n}-menu-submenu`]:Object.assign(Object.assign({},Nn(e)),{[t]:Object.assign(Object.assign({padding:u,listStyleType:"none",backgroundColor:p,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},sn(e)),{"&:empty":{padding:0,boxShadow:"none"},[`${t}-item-group-title`]:{padding:`${T(d)} ${T(v)}`,color:e.colorTextDescription,transition:`all ${c}`},[`${t}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${t}-item-icon`]:{minWidth:f,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${t}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${c}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${t}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${t}-item, ${t}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${T(d)} ${T(v)}`,color:e.colorText,fontWeight:"normal",fontSize:f,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${c}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},sn(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:m,cursor:"not-allowed","&:hover":{color:m,backgroundColor:p,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${T(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${n}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${n}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:g,fontStyle:"normal"}}}),[`${t}-item-group-list`]:{margin:`0 ${T(e.marginXS)}`,padding:0,listStyle:"none"},[`${t}-submenu-title`]:{paddingInlineEnd:e.calc(v).add(e.fontSizeSM).equal()},[`${t}-submenu-vertical`]:{position:"relative"},[`${t}-submenu${t}-submenu-disabled ${n}-menu-submenu-title`]:{[`&, ${n}-menu-submenu-arrow-icon`]:{color:m,backgroundColor:p,cursor:"not-allowed"}},[`${t}-submenu-selected ${n}-menu-submenu-title`]:{color:e.colorPrimary}})})},[it(e,"slide-up"),it(e,"slide-down"),ln(e,"move-up"),ln(e,"move-down"),En(e,"zoom-big")]]},gi=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},er({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),tr(e)),bi=On("Dropdown",e=>{const{marginXXS:n,sizePopupArrow:t,paddingXXS:o,componentCls:r}=e,l=Mt(e,{menuCls:`${r}-menu`,dropdownArrowDistance:e.calc(t).div(2).add(n).equal(),dropdownEdgeChildPadding:o});return[fi(l),pi(l)]},gi,{resetStyle:!1}),pt=e=>{var n;const{menu:t,arrow:o,prefixCls:r,children:l,trigger:a,disabled:s,dropdownRender:c,popupRender:d,getPopupContainer:f,overlayClassName:u,rootClassName:m,overlayStyle:g,open:v,onOpenChange:p,visible:b,onVisibleChange:y,mouseEnterDelay:w=.15,mouseLeaveDelay:I=.1,autoAdjustOverflow:C=!0,placement:$="",overlay:h,transitionName:N,destroyOnHidden:S,destroyPopupOnHide:x}=e,{getPopupContainer:B,getPrefixCls:P,direction:M,dropdown:O}=i.useContext(ct),R=d||c;nr();const _=i.useMemo(()=>{const j=P();return N!==void 0?N:$.includes("top")?`${j}-slide-down`:`${j}-slide-up`},[P,$,N]),W=i.useMemo(()=>$?$.includes("Center")?$.slice(0,$.indexOf("Center")):$:M==="rtl"?"bottomRight":"bottomLeft",[$,M]),E=P("dropdown",r),z=Tn(E),[G,U,Z]=bi(E,z),[,Y]=or(),D=i.Children.only(hr(l)?i.createElement("span",null,l):l),k=ut(D,{className:V(`${E}-trigger`,{[`${E}-rtl`]:M==="rtl"},D.props.className),disabled:(n=D.props.disabled)!==null&&n!==void 0?n:s}),F=s?[]:a,re=!!(F!=null&&F.includes("contextMenu")),[Q,X]=Ve(!1,{value:v??b}),H=Rt(j=>{p==null||p(j,{source:"trigger"}),y==null||y(j),X(j)}),oe=V(u,m,U,Z,z,O==null?void 0:O.className,{[`${E}-rtl`]:M==="rtl"}),ie=rr({arrowPointAtCenter:typeof o=="object"&&o.pointAtCenter,autoAdjustOverflow:C,offset:Y.marginXXS,arrowWidth:o?Y.sizePopupArrow:0,borderRadius:Y.borderRadius}),Me=Rt(()=>{t!=null&&t.selectable&&(t!=null&&t.multiple)||(p==null||p(!1,{source:"menu"}),X(!1))}),Re=()=>{let j;return t!=null&&t.items?j=i.createElement(qe,Object.assign({},t)):typeof h=="function"?j=h():j=h,R&&(j=R(j)),j=i.Children.only(typeof j=="string"?i.createElement("span",null,j):j),i.createElement(ri,{prefixCls:`${E}-menu`,rootClassName:V(Z,z),expandIcon:i.createElement("span",{className:`${E}-menu-submenu-arrow`},M==="rtl"?i.createElement(Eo,{className:`${E}-menu-submenu-arrow-icon`}):i.createElement(No,{className:`${E}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Me,validator:({mode:Pe})=>{}},j)},[fe,$e]=Bn("Dropdown",g==null?void 0:g.zIndex);let Ce=i.createElement(br,Object.assign({alignPoint:re},we(e,["rootClassName"]),{mouseEnterDelay:w,mouseLeaveDelay:I,visible:Q,builtinPlacements:ie,arrow:!!o,overlayClassName:oe,prefixCls:E,getPopupContainer:f||B,transitionName:_,trigger:F,overlay:Re,placement:W,onVisibleChange:H,overlayStyle:Object.assign(Object.assign(Object.assign({},O==null?void 0:O.style),g),{zIndex:fe}),autoDestroy:S??x}),k);return fe&&(Ce=i.createElement(ir.Provider,{value:$e},Ce)),G(Ce)},hi=ar(pt,"align",void 0,"dropdown",e=>e),$i=e=>i.createElement(hi,Object.assign({},e),i.createElement("span",null));pt._InternalPanelDoNotUseOrYouWillBeFired=$i;var Ci=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]]);return t};const Yn=e=>{const{getPopupContainer:n,getPrefixCls:t,direction:o}=i.useContext(ct),{prefixCls:r,type:l="default",danger:a,disabled:s,loading:c,onClick:d,htmlType:f,children:u,className:m,menu:g,arrow:v,autoFocus:p,overlay:b,trigger:y,align:w,open:I,onOpenChange:C,placement:$,getPopupContainer:h,href:N,icon:S=i.createElement(Xn,null),title:x,buttonsRender:B=ie=>ie,mouseEnterDelay:P,mouseLeaveDelay:M,overlayClassName:O,overlayStyle:R,destroyOnHidden:_,destroyPopupOnHide:W,dropdownRender:E,popupRender:z}=e,G=Ci(e,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyOnHidden","destroyPopupOnHide","dropdownRender","popupRender"]),U=t("dropdown",r),Z=`${U}-button`,D={menu:g,arrow:v,autoFocus:p,align:w,disabled:s,trigger:s?[]:y,onOpenChange:C,getPopupContainer:h||n,mouseEnterDelay:P,mouseLeaveDelay:M,overlayClassName:O,overlayStyle:R,destroyOnHidden:_,popupRender:z||E},{compactSize:k,compactItemClassnames:F}=lr(U,o),re=V(Z,F,m);"destroyPopupOnHide"in e&&(D.destroyPopupOnHide=W),"overlay"in e&&(D.overlay=b),"open"in e&&(D.open=I),"placement"in e?D.placement=$:D.placement=o==="rtl"?"bottomLeft":"bottomRight";const Q=i.createElement(cn,{type:l,danger:a,disabled:s,loading:c,onClick:d,htmlType:f,href:N,title:x},u),X=i.createElement(cn,{type:l,danger:a,icon:S}),[H,oe]=B([Q,X]);return i.createElement(cr.Compact,Object.assign({className:re,size:k,block:!0},G),H,i.createElement(pt,Object.assign({},D),oe))};Yn.__ANT_BUTTON=!0;const yi=pt;yi.Button=Yn;export{yi as D,qe as M,ri as O};
|
|
@@ -282,4 +282,4 @@ html body {
|
|
|
282
282
|
`,UP=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],il={},Rr;function GP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&il[r])return il[r];var n=window.getComputedStyle(e),o=n.getPropertyValue("box-sizing")||n.getPropertyValue("-moz-box-sizing")||n.getPropertyValue("-webkit-box-sizing"),a=parseFloat(n.getPropertyValue("padding-bottom"))+parseFloat(n.getPropertyValue("padding-top")),i=parseFloat(n.getPropertyValue("border-bottom-width"))+parseFloat(n.getPropertyValue("border-top-width")),s=UP.map(function(c){return"".concat(c,":").concat(n.getPropertyValue(c))}).join(";"),l={sizingStyle:s,paddingSize:a,borderSize:i,boxSizing:o};return t&&r&&(il[r]=l),l}function KP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Rr||(Rr=document.createElement("textarea"),Rr.setAttribute("tab-index","-1"),Rr.setAttribute("aria-hidden","true"),Rr.setAttribute("name","hiddenTextarea"),document.body.appendChild(Rr)),e.getAttribute("wrap")?Rr.setAttribute("wrap",e.getAttribute("wrap")):Rr.removeAttribute("wrap");var o=GP(e,t),a=o.paddingSize,i=o.borderSize,s=o.boxSizing,l=o.sizingStyle;Rr.setAttribute("style","".concat(l,";").concat(qP)),Rr.value=e.value||e.placeholder||"";var c=void 0,d=void 0,f,v=Rr.scrollHeight;if(s==="border-box"?v+=i:s==="content-box"&&(v-=a),r!==null||n!==null){Rr.value=" ";var h=Rr.scrollHeight-a;r!==null&&(c=h*r,s==="border-box"&&(c=c+a+i),v=Math.max(c,v)),n!==null&&(d=h*n,s==="border-box"&&(d=d+a+i),f=v>d?"":"hidden",v=Math.min(d,v))}var g={height:v,overflowY:f,resize:"none"};return c&&(g.minHeight=c),d&&(g.maxHeight=d),g}var XP=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],sl=0,ll=1,cl=2,YP=u.forwardRef(function(e,t){var r=e,n=r.prefixCls,o=r.defaultValue,a=r.value,i=r.autoSize,s=r.onResize,l=r.className,c=r.style,d=r.disabled,f=r.onChange;r.onInternalAutoSize;var v=ft(r,XP),h=zr(o,{value:a,postState:function(q){return q??""}}),g=X(h,2),p=g[0],m=g[1],b=function(q){m(q.target.value),f==null||f(q)},y=u.useRef();u.useImperativeHandle(t,function(){return{textArea:y.current}});var S=u.useMemo(function(){return i&&Ue(i)==="object"?[i.minRows,i.maxRows]:[]},[i]),C=X(S,2),$=C[0],x=C[1],w=!!i,E=u.useState(cl),O=X(E,2),R=O[0],I=O[1],P=u.useState(),M=X(P,2),F=M[0],N=M[1],A=function(){I(sl)};Ct(function(){w&&A()},[a,$,x,w]),Ct(function(){if(R===sl)I(ll);else if(R===ll){var B=KP(y.current,!1,$,x);I(cl),N(B)}},[R]);var _=u.useRef(),D=function(){mt.cancel(_.current)},W=function(q){R===cl&&(s==null||s(q),i&&(D(),_.current=mt(function(){A()})))};u.useEffect(function(){return D},[]);var G=w?F:null,L=j(j({},c),G);return(R===sl||R===ll)&&(L.overflowY="hidden",L.overflowX="hidden"),u.createElement(In,{onResize:W,disabled:!(i||s)},u.createElement("textarea",Be({},v,{ref:y,style:L,className:oe(n,l,T({},"".concat(n,"-disabled"),d)),disabled:d,value:p,onChange:b})))}),QP=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],JP=ne.forwardRef(function(e,t){var r,n=e.defaultValue,o=e.value,a=e.onFocus,i=e.onBlur,s=e.onChange,l=e.allowClear,c=e.maxLength,d=e.onCompositionStart,f=e.onCompositionEnd,v=e.suffix,h=e.prefixCls,g=h===void 0?"rc-textarea":h,p=e.showCount,m=e.count,b=e.className,y=e.style,S=e.disabled,C=e.hidden,$=e.classNames,x=e.styles,w=e.onResize,E=e.onClear,O=e.onPressEnter,R=e.readOnly,I=e.autoSize,P=e.onKeyDown,M=ft(e,QP),F=zr(n,{value:o,defaultValue:n}),N=X(F,2),A=N[0],_=N[1],D=A==null?"":String(A),W=ne.useState(!1),G=X(W,2),L=G[0],B=G[1],q=ne.useRef(!1),H=ne.useState(null),z=X(H,2),V=z[0],Z=z[1],k=Fe(null),J=Fe(null),ae=function(){var Ce;return(Ce=J.current)===null||Ce===void 0?void 0:Ce.textArea},Y=function(){ae().focus()};Di(t,function(){var Oe;return{resizableTextArea:J.current,focus:Y,blur:function(){ae().blur()},nativeElement:((Oe=k.current)===null||Oe===void 0?void 0:Oe.nativeElement)||ae()}}),tr(function(){B(function(Oe){return!S&&Oe})},[S]);var U=ne.useState(null),re=X(U,2),se=re[0],K=re[1];ne.useEffect(function(){if(se){var Oe;(Oe=ae()).setSelectionRange.apply(Oe,ve(se))}},[se]);var ee=cp(m,p),fe=(r=ee.max)!==null&&r!==void 0?r:c,le=Number(fe)>0,de=ee.strategy(D),we=!!fe&&de>fe,be=function(Ce,Ve){var Ze=Ve;!q.current&&ee.exceedFormatter&&ee.max&&ee.strategy(Ve)>ee.max&&(Ze=ee.exceedFormatter(Ve,{max:ee.max}),Ve!==Ze&&K([ae().selectionStart||0,ae().selectionEnd||0])),_(Ze),Ai(Ce.currentTarget,Ce,s,Ze)},Se=function(Ce){q.current=!0,d==null||d(Ce)},me=function(Ce){q.current=!1,be(Ce,Ce.currentTarget.value),f==null||f(Ce)},te=function(Ce){be(Ce,Ce.target.value)},xe=function(Ce){Ce.key==="Enter"&&O&&O(Ce),P==null||P(Ce)},ze=function(Ce){B(!0),a==null||a(Ce)},Ae=function(Ce){B(!1),i==null||i(Ce)},Me=function(Ce){_(""),Y(),Ai(ae(),Ce,s)},Ee=v,He;ee.show&&(ee.showFormatter?He=ee.showFormatter({value:D,count:de,maxLength:fe}):He="".concat(de).concat(le?" / ".concat(fe):""),Ee=ne.createElement(ne.Fragment,null,Ee,ne.createElement("span",{className:oe("".concat(g,"-data-count"),$==null?void 0:$.count),style:x==null?void 0:x.count},He)));var Te=function(Ce){var Ve;w==null||w(Ce),(Ve=ae())!==null&&Ve!==void 0&&Ve.style.height&&Z(!0)},Le=!I&&!p&&!l;return ne.createElement(yu,{ref:k,value:D,allowClear:l,handleReset:Me,suffix:Ee,prefixCls:g,classNames:j(j({},$),{},{affixWrapper:oe($==null?void 0:$.affixWrapper,T(T({},"".concat(g,"-show-count"),p),"".concat(g,"-textarea-allow-clear"),l))}),disabled:S,focused:L,className:oe(b,we&&"".concat(g,"-out-of-range")),style:j(j({},y),V&&!Le?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof He=="string"?He:void 0}},hidden:C,readOnly:R,onClear:E},ne.createElement(YP,Be({},M,{autoSize:I,maxLength:c,onKeyDown:xe,onChange:te,onFocus:ze,onBlur:Ae,onCompositionStart:Se,onCompositionEnd:me,className:oe($==null?void 0:$.textarea),style:j(j({},x==null?void 0:x.textarea),{},{resize:y==null?void 0:y.resize}),disabled:S,prefixCls:g,onResize:Te,ref:J,readOnly:R})))});const ZP=e=>{const{componentCls:t,paddingLG:r}=e,n=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}`,resize:"vertical",[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[n]:{position:"relative","&-show-count":{[`${t}-data-count`]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
|
|
283
283
|
&-allow-clear > ${t},
|
|
284
284
|
&-affix-wrapper${n}-has-feedback ${t}
|
|
285
|
-
`]:{paddingInlineEnd:r},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${n}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},eM=sr(["Input","TextArea"],e=>{const t=Et(e,_a(e));return ZP(t)},Aa,{resetFont:!1});var tM=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const rM=dn((e,t)=>{var r;const{prefixCls:n,bordered:o=!0,size:a,disabled:i,status:s,allowClear:l,classNames:c,rootClassName:d,className:f,style:v,styles:h,variant:g,showCount:p,onMouseDown:m,onResize:b}=e,y=tM(e,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:S,direction:C,allowClear:$,autoComplete:x,className:w,style:E,classNames:O,styles:R}=Pn("textArea"),I=u.useContext(Mr),P=i??I,{status:M,hasFeedback:F,feedbackIcon:N}=u.useContext(pr),A=Na(M,s),_=u.useRef(null);u.useImperativeHandle(t,()=>{var ee;return{resizableTextArea:(ee=_.current)===null||ee===void 0?void 0:ee.resizableTextArea,focus:fe=>{var le,de;bu((de=(le=_.current)===null||le===void 0?void 0:le.resizableTextArea)===null||de===void 0?void 0:de.textArea,fe)},blur:()=>{var fe;return(fe=_.current)===null||fe===void 0?void 0:fe.blur()}}});const D=S("input",n),W=fn(D),[G,L,B]=ep(D,d),[q]=eM(D,W),{compactSize:H,compactItemClassnames:z}=zo(D,C),V=on(ee=>{var fe;return(fe=a??H)!==null&&fe!==void 0?fe:ee}),[Z,k]=vs("textArea",g,o),J=dp(l??$),[ae,Y]=u.useState(!1),[U,re]=u.useState(!1),se=ee=>{Y(!0),m==null||m(ee);const fe=()=>{Y(!1),document.removeEventListener("mouseup",fe)};document.addEventListener("mouseup",fe)},K=ee=>{var fe,le;if(b==null||b(ee),ae&&typeof getComputedStyle=="function"){const de=(le=(fe=_.current)===null||fe===void 0?void 0:fe.nativeElement)===null||le===void 0?void 0:le.querySelector("textarea");de&&getComputedStyle(de).resize==="both"&&re(!0)}};return G(q(u.createElement(JP,Object.assign({autoComplete:x},y,{style:Object.assign(Object.assign({},E),v),styles:Object.assign(Object.assign({},R),h),disabled:P,allowClear:J,className:oe(B,W,f,d,z,w,U&&`${D}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},c),O),{textarea:oe({[`${D}-sm`]:V==="small",[`${D}-lg`]:V==="large"},L,c==null?void 0:c.textarea,O.textarea,ae&&`${D}-mouse-active`),variant:oe({[`${D}-${Z}`]:k},No(D,A)),affixWrapper:oe(`${D}-textarea-affix-wrapper`,{[`${D}-affix-wrapper-rtl`]:C==="rtl",[`${D}-affix-wrapper-sm`]:V==="small",[`${D}-affix-wrapper-lg`]:V==="large",[`${D}-textarea-show-count`]:p||((r=e.count)===null||r===void 0?void 0:r.show)},L)}),prefixCls:D,suffix:F&&u.createElement("span",{className:`${D}-textarea-suffix`},N),showCount:p,ref:_,onResize:K,onMouseDown:se}))))}),ja=ps;ja.Group=IP;ja.Search=kP;ja.TextArea=rM;ja.Password=VP;ja.OTP=AP;var nM=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],yp=u.forwardRef(function(e,t){var r,n=e.prefixCls,o=n===void 0?"rc-switch":n,a=e.className,i=e.checked,s=e.defaultChecked,l=e.disabled,c=e.loadingIcon,d=e.checkedChildren,f=e.unCheckedChildren,v=e.onClick,h=e.onChange,g=e.onKeyDown,p=ft(e,nM),m=zr(!1,{value:i,defaultValue:s}),b=X(m,2),y=b[0],S=b[1];function C(E,O){var R=y;return l||(R=E,S(R),h==null||h(R,O)),R}function $(E){E.which===_e.LEFT?C(!1,E):E.which===_e.RIGHT&&C(!0,E),g==null||g(E)}function x(E){var O=C(!y,E);v==null||v(O,E)}var w=oe(o,a,(r={},T(r,"".concat(o,"-checked"),y),T(r,"".concat(o,"-disabled"),l),r));return u.createElement("button",Be({},p,{type:"button",role:"switch","aria-checked":y,disabled:l,className:w,ref:t,onKeyDown:$,onClick:x}),c,u.createElement("span",{className:"".concat(o,"-inner")},u.createElement("span",{className:"".concat(o,"-inner-checked")},d),u.createElement("span",{className:"".concat(o,"-inner-unchecked")},f)))});yp.displayName="Switch";const oM=e=>{const{componentCls:t,trackHeightSM:r,trackPadding:n,trackMinWidthSM:o,innerMinMarginSM:a,innerMaxMarginSM:i,handleSizeSM:s,calc:l}=e,c=`${t}-inner`,d=ie(l(s).add(l(n).mul(2)).equal()),f=ie(l(i).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:o,height:r,lineHeight:ie(r),[`${t}-inner`]:{paddingInlineStart:i,paddingInlineEnd:a,[`${c}-checked, ${c}-unchecked`]:{minHeight:r},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${f})`,marginInlineEnd:`calc(100% - ${d} + ${f})`},[`${c}-unchecked`]:{marginTop:l(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:s,height:s},[`${t}-loading-icon`]:{top:l(l(s).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:a,paddingInlineEnd:i,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${f})`,marginInlineEnd:`calc(-100% + ${d} - ${f})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${ie(l(s).add(n).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:l(e.marginXXS).div(2).equal(),marginInlineEnd:l(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:l(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:l(e.marginXXS).div(2).equal()}}}}}}},aM=e=>{const{componentCls:t,handleSize:r,calc:n}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:n(n(r).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},iM=e=>{const{componentCls:t,trackPadding:r,handleBg:n,handleShadow:o,handleSize:a,calc:i}=e,s=`${t}-handle`;return{[t]:{[s]:{position:"absolute",top:r,insetInlineStart:r,width:a,height:a,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:n,borderRadius:i(a).div(2).equal(),boxShadow:o,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${s}`]:{insetInlineStart:`calc(100% - ${ie(i(a).add(r).equal())})`},[`&:not(${t}-disabled):active`]:{[`${s}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${s}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},sM=e=>{const{componentCls:t,trackHeight:r,trackPadding:n,innerMinMargin:o,innerMaxMargin:a,handleSize:i,calc:s}=e,l=`${t}-inner`,c=ie(s(i).add(s(n).mul(2)).equal()),d=ie(s(a).mul(2).equal());return{[t]:{[l]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:a,paddingInlineEnd:o,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${l}-checked, ${l}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:r},[`${l}-checked`]:{marginInlineStart:`calc(-100% + ${c} - ${d})`,marginInlineEnd:`calc(100% - ${c} + ${d})`},[`${l}-unchecked`]:{marginTop:s(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${l}`]:{paddingInlineStart:o,paddingInlineEnd:a,[`${l}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${l}-unchecked`]:{marginInlineStart:`calc(100% - ${c} + ${d})`,marginInlineEnd:`calc(-100% + ${c} - ${d})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${l}`]:{[`${l}-unchecked`]:{marginInlineStart:s(n).mul(2).equal(),marginInlineEnd:s(n).mul(-1).mul(2).equal()}},[`&${t}-checked ${l}`]:{[`${l}-checked`]:{marginInlineStart:s(n).mul(-1).mul(2).equal(),marginInlineEnd:s(n).mul(2).equal()}}}}}},lM=e=>{const{componentCls:t,trackHeight:r,trackMinWidth:n}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},ar(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:n,height:r,lineHeight:ie(r),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),ts(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}},cM=e=>{const{fontSize:t,lineHeight:r,controlHeight:n,colorWhite:o}=e,a=t*r,i=n/2,s=2,l=a-s*2,c=i-s*2;return{trackHeight:a,trackHeightSM:i,trackMinWidth:l*2+s*4,trackMinWidthSM:c*2+s*2,trackPadding:s,handleBg:o,handleSize:l,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new bt("#00230b").setA(.2).toRgbString()}`,innerMinMargin:l/2,innerMaxMargin:l+s+s*2,innerMinMarginSM:c/2,innerMaxMarginSM:c+s+s*2}},uM=sr("Switch",e=>{const t=Et(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[lM(t),sM(t),iM(t),aM(t),oM(t)]},cM);var dM=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const fM=u.forwardRef((e,t)=>{const{prefixCls:r,size:n,disabled:o,loading:a,className:i,rootClassName:s,style:l,checked:c,value:d,defaultChecked:f,defaultValue:v,onChange:h}=e,g=dM(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[p,m]=zr(!1,{value:c??d,defaultValue:f??v}),{getPrefixCls:b,direction:y,switch:S}=u.useContext(wt),C=u.useContext(Mr),$=(o??C)||a,x=b("switch",r),w=u.createElement("div",{className:`${x}-handle`},a&&u.createElement(rs,{className:`${x}-loading-icon`})),[E,O,R]=uM(x),I=on(n),P=oe(S==null?void 0:S.className,{[`${x}-small`]:I==="small",[`${x}-loading`]:a,[`${x}-rtl`]:y==="rtl"},i,s,O,R),M=Object.assign(Object.assign({},S==null?void 0:S.style),l),F=(...N)=>{m(N[0]),h==null||h.apply(void 0,N)};return E(u.createElement(Zc,{component:"Switch",disabled:$},u.createElement(yp,Object.assign({},g,{checked:p,onChange:F,prefixCls:x,className:P,style:M,disabled:$,ref:t,loadingIcon:w}))))}),mM=fM;mM.__ANT_SWITCH=!0;export{GM as $,Mn as A,sp as B,XM as C,on as D,Ud as E,oy as F,tI as G,ba as H,ja as I,hR as J,_e as K,ru as L,ft as M,Do as N,Be as O,Xn as P,En as Q,kI as R,Fa as S,vu as T,or as U,X as V,j as W,T as X,Ct as Y,nu as Z,ve as _,Ut as a,Wt as a$,UM as a0,ts as a1,Hr as a2,Ag as a3,To as a4,Fg as a5,mM as a6,jM as a7,zM as a8,ap as a9,YM as aA,xr as aB,Tn as aC,VM as aD,og as aE,JM as aF,E$ as aG,PE as aH,ME as aI,YC as aJ,Jn as aK,qM as aL,Tw as aM,$n as aN,TE as aO,w$ as aP,An as aQ,sa as aR,at as aS,rb as aT,zh as aU,AM as aV,yh as aW,mt as aX,ea as aY,Qc as aZ,In as a_,eT as aa,p2 as ab,br as ac,Ue as ad,_a as ae,dg as af,Aa as ag,gs as ah,Hh as ai,gu as aj,Jh as ak,mg as al,Vr as am,Oa as an,sC as ao,R1 as ap,Bt as aq,KM as ar,fn as as,rs as at,tw as au,Xc as av,K1 as aw,Uc as ax,Tg as ay,Po as az,Nn as b,Vt as b0,Ma as b1,pr as b2,Mr as b3,xI as b4,Zc as b5,wI as b6,Jc as b7,ou as b8,Yf as b9,DM as bA,vw as bB,$a as bC,Qn as bD,Xi as bE,Ri as bF,On as bG,Rn as bH,HM as bI,ox as bJ,Ra as bK,Jd as bL,fI as bM,EE as bN,cx as bO,RP as bP,Dr as bQ,Ac as bR,bv as bS,QM as bT,d$ as bU,xh as bV,Mh as bW,AI as bX,ps as bY,Th as bZ,kM as b_,wR as ba,SR as bb,bt as bc,Vh as bd,Xh as be,Uh as bf,kh as bg,fs as bh,of as bi,nf as bj,Vg as bk,kg as bl,Hg as bm,Wg as bn,Yl as bo,sI as bp,Yh as bq,kR as br,zo as bs,vs as bt,No as bu,Na as bv,yd as bw,NE as bx,ZM as by,sw as bz,cy as c,ry as d,Ww as e,oe as f,LM as g,sr as h,qg as i,lI as j,iI as k,Ah as l,Et as m,wt as n,Fh as o,zr as p,Bg as q,ar as r,Mo as s,Gn as t,Pn as u,e1 as v,xt as w,BM as x,ie as y,pI as z};
|
|
285
|
+
`]:{paddingInlineEnd:r},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${n}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},eM=sr(["Input","TextArea"],e=>{const t=Et(e,_a(e));return ZP(t)},Aa,{resetFont:!1});var tM=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const rM=dn((e,t)=>{var r;const{prefixCls:n,bordered:o=!0,size:a,disabled:i,status:s,allowClear:l,classNames:c,rootClassName:d,className:f,style:v,styles:h,variant:g,showCount:p,onMouseDown:m,onResize:b}=e,y=tM(e,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:S,direction:C,allowClear:$,autoComplete:x,className:w,style:E,classNames:O,styles:R}=Pn("textArea"),I=u.useContext(Mr),P=i??I,{status:M,hasFeedback:F,feedbackIcon:N}=u.useContext(pr),A=Na(M,s),_=u.useRef(null);u.useImperativeHandle(t,()=>{var ee;return{resizableTextArea:(ee=_.current)===null||ee===void 0?void 0:ee.resizableTextArea,focus:fe=>{var le,de;bu((de=(le=_.current)===null||le===void 0?void 0:le.resizableTextArea)===null||de===void 0?void 0:de.textArea,fe)},blur:()=>{var fe;return(fe=_.current)===null||fe===void 0?void 0:fe.blur()}}});const D=S("input",n),W=fn(D),[G,L,B]=ep(D,d),[q]=eM(D,W),{compactSize:H,compactItemClassnames:z}=zo(D,C),V=on(ee=>{var fe;return(fe=a??H)!==null&&fe!==void 0?fe:ee}),[Z,k]=vs("textArea",g,o),J=dp(l??$),[ae,Y]=u.useState(!1),[U,re]=u.useState(!1),se=ee=>{Y(!0),m==null||m(ee);const fe=()=>{Y(!1),document.removeEventListener("mouseup",fe)};document.addEventListener("mouseup",fe)},K=ee=>{var fe,le;if(b==null||b(ee),ae&&typeof getComputedStyle=="function"){const de=(le=(fe=_.current)===null||fe===void 0?void 0:fe.nativeElement)===null||le===void 0?void 0:le.querySelector("textarea");de&&getComputedStyle(de).resize==="both"&&re(!0)}};return G(q(u.createElement(JP,Object.assign({autoComplete:x},y,{style:Object.assign(Object.assign({},E),v),styles:Object.assign(Object.assign({},R),h),disabled:P,allowClear:J,className:oe(B,W,f,d,z,w,U&&`${D}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},c),O),{textarea:oe({[`${D}-sm`]:V==="small",[`${D}-lg`]:V==="large"},L,c==null?void 0:c.textarea,O.textarea,ae&&`${D}-mouse-active`),variant:oe({[`${D}-${Z}`]:k},No(D,A)),affixWrapper:oe(`${D}-textarea-affix-wrapper`,{[`${D}-affix-wrapper-rtl`]:C==="rtl",[`${D}-affix-wrapper-sm`]:V==="small",[`${D}-affix-wrapper-lg`]:V==="large",[`${D}-textarea-show-count`]:p||((r=e.count)===null||r===void 0?void 0:r.show)},L)}),prefixCls:D,suffix:F&&u.createElement("span",{className:`${D}-textarea-suffix`},N),showCount:p,ref:_,onResize:K,onMouseDown:se}))))}),ja=ps;ja.Group=IP;ja.Search=kP;ja.TextArea=rM;ja.Password=VP;ja.OTP=AP;var nM=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],yp=u.forwardRef(function(e,t){var r,n=e.prefixCls,o=n===void 0?"rc-switch":n,a=e.className,i=e.checked,s=e.defaultChecked,l=e.disabled,c=e.loadingIcon,d=e.checkedChildren,f=e.unCheckedChildren,v=e.onClick,h=e.onChange,g=e.onKeyDown,p=ft(e,nM),m=zr(!1,{value:i,defaultValue:s}),b=X(m,2),y=b[0],S=b[1];function C(E,O){var R=y;return l||(R=E,S(R),h==null||h(R,O)),R}function $(E){E.which===_e.LEFT?C(!1,E):E.which===_e.RIGHT&&C(!0,E),g==null||g(E)}function x(E){var O=C(!y,E);v==null||v(O,E)}var w=oe(o,a,(r={},T(r,"".concat(o,"-checked"),y),T(r,"".concat(o,"-disabled"),l),r));return u.createElement("button",Be({},p,{type:"button",role:"switch","aria-checked":y,disabled:l,className:w,ref:t,onKeyDown:$,onClick:x}),c,u.createElement("span",{className:"".concat(o,"-inner")},u.createElement("span",{className:"".concat(o,"-inner-checked")},d),u.createElement("span",{className:"".concat(o,"-inner-unchecked")},f)))});yp.displayName="Switch";const oM=e=>{const{componentCls:t,trackHeightSM:r,trackPadding:n,trackMinWidthSM:o,innerMinMarginSM:a,innerMaxMarginSM:i,handleSizeSM:s,calc:l}=e,c=`${t}-inner`,d=ie(l(s).add(l(n).mul(2)).equal()),f=ie(l(i).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:o,height:r,lineHeight:ie(r),[`${t}-inner`]:{paddingInlineStart:i,paddingInlineEnd:a,[`${c}-checked, ${c}-unchecked`]:{minHeight:r},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${f})`,marginInlineEnd:`calc(100% - ${d} + ${f})`},[`${c}-unchecked`]:{marginTop:l(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:s,height:s},[`${t}-loading-icon`]:{top:l(l(s).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:a,paddingInlineEnd:i,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${f})`,marginInlineEnd:`calc(-100% + ${d} - ${f})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${ie(l(s).add(n).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:l(e.marginXXS).div(2).equal(),marginInlineEnd:l(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:l(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:l(e.marginXXS).div(2).equal()}}}}}}},aM=e=>{const{componentCls:t,handleSize:r,calc:n}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:n(n(r).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},iM=e=>{const{componentCls:t,trackPadding:r,handleBg:n,handleShadow:o,handleSize:a,calc:i}=e,s=`${t}-handle`;return{[t]:{[s]:{position:"absolute",top:r,insetInlineStart:r,width:a,height:a,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:n,borderRadius:i(a).div(2).equal(),boxShadow:o,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${s}`]:{insetInlineStart:`calc(100% - ${ie(i(a).add(r).equal())})`},[`&:not(${t}-disabled):active`]:{[`${s}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${s}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},sM=e=>{const{componentCls:t,trackHeight:r,trackPadding:n,innerMinMargin:o,innerMaxMargin:a,handleSize:i,calc:s}=e,l=`${t}-inner`,c=ie(s(i).add(s(n).mul(2)).equal()),d=ie(s(a).mul(2).equal());return{[t]:{[l]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:a,paddingInlineEnd:o,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${l}-checked, ${l}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:r},[`${l}-checked`]:{marginInlineStart:`calc(-100% + ${c} - ${d})`,marginInlineEnd:`calc(100% - ${c} + ${d})`},[`${l}-unchecked`]:{marginTop:s(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${l}`]:{paddingInlineStart:o,paddingInlineEnd:a,[`${l}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${l}-unchecked`]:{marginInlineStart:`calc(100% - ${c} + ${d})`,marginInlineEnd:`calc(-100% + ${c} - ${d})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${l}`]:{[`${l}-unchecked`]:{marginInlineStart:s(n).mul(2).equal(),marginInlineEnd:s(n).mul(-1).mul(2).equal()}},[`&${t}-checked ${l}`]:{[`${l}-checked`]:{marginInlineStart:s(n).mul(-1).mul(2).equal(),marginInlineEnd:s(n).mul(2).equal()}}}}}},lM=e=>{const{componentCls:t,trackHeight:r,trackMinWidth:n}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},ar(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:n,height:r,lineHeight:ie(r),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),ts(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}},cM=e=>{const{fontSize:t,lineHeight:r,controlHeight:n,colorWhite:o}=e,a=t*r,i=n/2,s=2,l=a-s*2,c=i-s*2;return{trackHeight:a,trackHeightSM:i,trackMinWidth:l*2+s*4,trackMinWidthSM:c*2+s*2,trackPadding:s,handleBg:o,handleSize:l,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new bt("#00230b").setA(.2).toRgbString()}`,innerMinMargin:l/2,innerMaxMargin:l+s+s*2,innerMinMarginSM:c/2,innerMaxMarginSM:c+s+s*2}},uM=sr("Switch",e=>{const t=Et(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[lM(t),sM(t),iM(t),aM(t),oM(t)]},cM);var dM=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const fM=u.forwardRef((e,t)=>{const{prefixCls:r,size:n,disabled:o,loading:a,className:i,rootClassName:s,style:l,checked:c,value:d,defaultChecked:f,defaultValue:v,onChange:h}=e,g=dM(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[p,m]=zr(!1,{value:c??d,defaultValue:f??v}),{getPrefixCls:b,direction:y,switch:S}=u.useContext(wt),C=u.useContext(Mr),$=(o??C)||a,x=b("switch",r),w=u.createElement("div",{className:`${x}-handle`},a&&u.createElement(rs,{className:`${x}-loading-icon`})),[E,O,R]=uM(x),I=on(n),P=oe(S==null?void 0:S.className,{[`${x}-small`]:I==="small",[`${x}-loading`]:a,[`${x}-rtl`]:y==="rtl"},i,s,O,R),M=Object.assign(Object.assign({},S==null?void 0:S.style),l),F=(...N)=>{m(N[0]),h==null||h.apply(void 0,N)};return E(u.createElement(Zc,{component:"Switch",disabled:$},u.createElement(yp,Object.assign({},g,{checked:p,onChange:F,prefixCls:x,className:P,style:M,disabled:$,ref:t,loadingIcon:w}))))}),mM=fM;mM.__ANT_SWITCH=!0;export{nu as $,Ut as A,sp as B,XM as C,on as D,Ud as E,Nn as F,ve as G,tI as H,br as I,ba as J,_e as K,hR as L,ja as M,ru as N,ft as O,Xn as P,Do as Q,kI as R,Fa as S,vu as T,En as U,or as V,X as W,j as X,T as Y,Ct as Z,Be as _,LM as a,cx as a$,GM as a0,UM as a1,ts as a2,Hr as a3,Ag as a4,To as a5,Fg as a6,mM as a7,jM as a8,Ue as a9,YM as aA,xr as aB,Tn as aC,VM as aD,og as aE,JM as aF,E$ as aG,PE as aH,ME as aI,YC as aJ,Jn as aK,qM as aL,Tw as aM,$n as aN,TE as aO,w$ as aP,Ds as aQ,bt as aR,LR as aS,Zn as aT,vr as aU,On as aV,Rn as aW,Vt as aX,at as aY,Wt as aZ,Yl as a_,_a as aa,dg as ab,Aa as ac,gs as ad,Hh as ae,gu as af,Jh as ag,mg as ah,Vr as ai,Oa as aj,sC as ak,zM as al,ap as am,eT as an,p2 as ao,R1 as ap,Bt as aq,KM as ar,fn as as,rs as at,tw as au,Xc as av,K1 as aw,Uc as ax,Tg as ay,Po as az,Ww as b,Mh as b$,Pi as b0,ox as b1,RP as b2,vw as b3,Jd as b4,Mr as b5,mt as b6,$a as b7,Qn as b8,yh as b9,Jc as bA,ou as bB,Yf as bC,wR as bD,SR as bE,Vh as bF,Xh as bG,Uh as bH,kh as bI,fs as bJ,sI as bK,Yh as bL,kR as bM,vs as bN,No as bO,Na as bP,yd as bQ,ZM as bR,sw as bS,DM as bT,EE as bU,Dr as bV,Ac as bW,bv as bX,QM as bY,d$ as bZ,xh as b_,Xi as ba,Ri as bb,Qc as bc,Ma as bd,HM as be,of as bf,Ra as bg,kg as bh,Vg as bi,Wg as bj,Hg as bk,nf as bl,fI as bm,NE as bn,zo as bo,An as bp,sa as bq,rb as br,zh as bs,AM as bt,ea as bu,In as bv,pr as bw,xI as bx,Zc as by,wI as bz,cy as c,AI as c0,ps as c1,Th as c2,kM as c3,ry as d,oe as e,qg as f,sr as g,BM as h,oy as i,lI as j,iI as k,Ah as l,Et as m,wt as n,Fh as o,zr as p,Bg as q,ar as r,Mo as s,Gn as t,Pn as u,e1 as v,xt as w,ie as x,pI as y,Mn as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as c from"react";import{useMemo as rt,useRef as U}from"react";import{h as it,m as Nt,v as at,r as lt,w as z,y as j,n as Y,z as ct,f as w,s as dt,A as xt}from"./index-8h59dJlj.js";const Ot=new z("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),wt=new z("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),jt=new z("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),Et=new z("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),Pt=new z("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),It=new z("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),zt=t=>{const{componentCls:e,iconCls:i,antCls:n,badgeShadowSize:o,textFontSize:d,textFontSizeSM:a,statusSize:h,dotSize:v,textFontWeight:C,indicatorHeight:l,indicatorHeightSM:r,marginXS:m,calc:g}=t,u=`${n}-scroll-number`,$=at(t,(f,{darkColor:y})=>({[`&${e} ${e}-color-${f}`]:{background:y,[`&:not(${e}-count)`]:{color:y},"a:hover &":{background:y}}}));return{[e]:Object.assign(Object.assign(Object.assign(Object.assign({},lt(t)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${e}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:t.indicatorZIndex,minWidth:l,height:l,color:t.badgeTextColor,fontWeight:C,fontSize:d,lineHeight:j(l),whiteSpace:"nowrap",textAlign:"center",background:t.badgeColor,borderRadius:g(l).div(2).equal(),boxShadow:`0 0 0 ${j(o)} ${t.badgeShadowColor}`,transition:`background ${t.motionDurationMid}`,a:{color:t.badgeTextColor},"a:hover":{color:t.badgeTextColor},"a:hover &":{background:t.badgeColorHover}},[`${e}-count-sm`]:{minWidth:r,height:r,fontSize:a,lineHeight:j(r),borderRadius:g(r).div(2).equal()},[`${e}-multiple-words`]:{padding:`0 ${j(t.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${e}-dot`]:{zIndex:t.indicatorZIndex,width:v,minWidth:v,height:v,background:t.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${j(o)} ${t.badgeShadowColor}`},[`${e}-count, ${e}-dot, ${u}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${i}-spin`]:{animationName:It,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${e}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${e}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:h,height:h,verticalAlign:"middle",borderRadius:"50%"},[`${e}-status-success`]:{backgroundColor:t.colorSuccess},[`${e}-status-processing`]:{overflow:"visible",color:t.colorInfo,backgroundColor:t.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:o,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:Ot,animationDuration:t.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${e}-status-default`]:{backgroundColor:t.colorTextPlaceholder},[`${e}-status-error`]:{backgroundColor:t.colorError},[`${e}-status-warning`]:{backgroundColor:t.colorWarning},[`${e}-status-text`]:{marginInlineStart:m,color:t.colorText,fontSize:t.fontSize}}}),$),{[`${e}-zoom-appear, ${e}-zoom-enter`]:{animationName:wt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`${e}-zoom-leave`]:{animationName:jt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`&${e}-not-a-wrapper`]:{[`${e}-zoom-appear, ${e}-zoom-enter`]:{animationName:Et,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`${e}-zoom-leave`]:{animationName:Pt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`&:not(${e}-status)`]:{verticalAlign:"middle"},[`${u}-custom-component, ${e}-count`]:{transform:"none"},[`${u}-custom-component, ${u}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[u]:{overflow:"hidden",transition:`all ${t.motionDurationMid} ${t.motionEaseOutBack}`,[`${u}-only`]:{position:"relative",display:"inline-block",height:l,transition:`all ${t.motionDurationSlow} ${t.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${u}-only-unit`]:{height:l,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${u}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${e}-count, ${e}-dot, ${u}-custom-component`]:{transform:"translate(-50%, -50%)"}}})}},ut=t=>{const{fontHeight:e,lineWidth:i,marginXS:n,colorBorderBg:o}=t,d=e,a=i,h=t.colorTextLightSolid,v=t.colorError,C=t.colorErrorHover;return Nt(t,{badgeFontHeight:d,badgeShadowSize:a,badgeTextColor:h,badgeColor:v,badgeColorHover:C,badgeShadowColor:o,badgeProcessingDuration:"1.2s",badgeRibbonOffset:n,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},mt=t=>{const{fontSize:e,lineHeight:i,fontSizeSM:n,lineWidth:o}=t;return{indicatorZIndex:"auto",indicatorHeight:Math.round(e*i)-2*o,indicatorHeightSM:e,dotSize:n/2,textFontSize:n,textFontSizeSM:n,textFontWeight:"normal",statusSize:n/2}},Tt=it("Badge",t=>{const e=ut(t);return zt(e)},mt),Bt=t=>{const{antCls:e,badgeFontHeight:i,marginXS:n,badgeRibbonOffset:o,calc:d}=t,a=`${e}-ribbon`,h=`${e}-ribbon-wrapper`,v=at(t,(C,{darkColor:l})=>({[`&${a}-color-${C}`]:{background:l,color:l}}));return{[h]:{position:"relative"},[a]:Object.assign(Object.assign(Object.assign(Object.assign({},lt(t)),{position:"absolute",top:n,padding:`0 ${j(t.paddingXS)}`,color:t.colorPrimary,lineHeight:j(i),whiteSpace:"nowrap",backgroundColor:t.colorPrimary,borderRadius:t.borderRadiusSM,[`${a}-text`]:{color:t.badgeTextColor},[`${a}-corner`]:{position:"absolute",top:"100%",width:o,height:o,color:"currentcolor",border:`${j(d(o).div(2).equal())} solid`,transform:t.badgeRibbonCornerTransform,transformOrigin:"top",filter:t.badgeRibbonCornerFilter}}),v),{[`&${a}-placement-end`]:{insetInlineEnd:d(o).mul(-1).equal(),borderEndEndRadius:0,[`${a}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${a}-placement-start`]:{insetInlineStart:d(o).mul(-1).equal(),borderEndStartRadius:0,[`${a}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},Rt=it(["Badge","Ribbon"],t=>{const e=ut(t);return Bt(e)},mt),Dt=t=>{const{className:e,prefixCls:i,style:n,color:o,children:d,text:a,placement:h="end",rootClassName:v}=t,{getPrefixCls:C,direction:l}=c.useContext(Y),r=C("ribbon",i),m=`${r}-wrapper`,[g,u,$]=Rt(r,m),f=ct(o,!1),y=w(r,`${r}-placement-${h}`,{[`${r}-rtl`]:l==="rtl",[`${r}-color-${o}`]:f},e),b={},N={};return o&&!f&&(b.background=o,N.color=o),g(c.createElement("div",{className:w(m,v,u,$)},d,c.createElement("div",{className:w(y,u),style:Object.assign(Object.assign({},b),n)},c.createElement("span",{className:`${r}-text`},a),c.createElement("div",{className:`${r}-corner`,style:N}))))},st=t=>{const{prefixCls:e,value:i,current:n,offset:o=0}=t;let d;return o&&(d={position:"absolute",top:`${o}00%`,left:0}),c.createElement("span",{style:d,className:w(`${e}-only-unit`,{current:n})},i)};function Wt(t,e,i){let n=t,o=0;for(;(n+10)%10!==e;)n+=i,o+=i;return o}const Ft=t=>{const{prefixCls:e,count:i,value:n}=t,o=Number(n),d=Math.abs(i),[a,h]=c.useState(o),[v,C]=c.useState(d),l=()=>{h(o),C(d)};c.useEffect(()=>{const g=setTimeout(l,1e3);return()=>clearTimeout(g)},[o]);let r,m;if(a===o||Number.isNaN(o)||Number.isNaN(a))r=[c.createElement(st,Object.assign({},t,{key:o,current:!0}))],m={transition:"none"};else{r=[];const g=o+10,u=[];for(let b=o;b<=g;b+=1)u.push(b);const $=v<d?1:-1,f=u.findIndex(b=>b%10===a);r=($<0?u.slice(0,f+1):u.slice(f)).map((b,N)=>{const H=b%10;return c.createElement(st,Object.assign({},t,{key:b,value:H,offset:$<0?N-f:N,current:N===f}))}),m={transform:`translateY(${-Wt(a,o,$)}00%)`}}return c.createElement("span",{className:`${e}-only`,style:m,onTransitionEnd:l},r)};var Ht=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(i[n[o]]=t[n[o]]);return i};const Mt=c.forwardRef((t,e)=>{const{prefixCls:i,count:n,className:o,motionClassName:d,style:a,title:h,show:v,component:C="sup",children:l}=t,r=Ht(t,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:m}=c.useContext(Y),g=m("scroll-number",i),u=Object.assign(Object.assign({},r),{"data-show":v,style:a,className:w(g,o,d),title:h});let $=n;if(n&&Number(n)%1===0){const f=String(n).split("");$=c.createElement("bdi",null,f.map((y,b)=>c.createElement(Ft,{prefixCls:g,count:Number(n),value:y,key:f.length-b})))}return a!=null&&a.borderColor&&(u.style=Object.assign(Object.assign({},a),{boxShadow:`0 0 0 1px ${a.borderColor} inset`})),l?dt(l,f=>({className:w(`${g}-custom-component`,f==null?void 0:f.className,d)})):c.createElement(C,Object.assign({},u,{ref:e}),$)});var Zt=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(i[n[o]]=t[n[o]]);return i};const _t=c.forwardRef((t,e)=>{var i,n,o,d,a;const{prefixCls:h,scrollNumberPrefixCls:v,children:C,status:l,text:r,color:m,count:g=null,overflowCount:u=99,dot:$=!1,size:f="default",title:y,offset:b,style:N,className:H,rootClassName:bt,classNames:O,styles:S,showZero:R=!1}=t,K=Zt(t,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:G,direction:M,badge:s}=c.useContext(Y),p=G("badge",h),[J,gt,ft]=Tt(p),Z=g>u?`${u}+`:g,T=Z==="0"||Z===0||r==="0"||r===0,Q=g===null||T&&!R,_=(l!=null||m!=null)&&Q,pt=l!=null||!T,B=$&&!T,E=B?"":Z,P=rt(()=>((E==null||E==="")&&(r==null||r==="")||T&&!R)&&!B,[E,T,R,B,r]),k=U(g);P||(k.current=g);const I=k.current,tt=U(E);P||(tt.current=E);const V=tt.current,et=U(B);P||(et.current=B);const D=rt(()=>{if(!b)return Object.assign(Object.assign({},s==null?void 0:s.style),N);const x={marginTop:b[1]};return M==="rtl"?x.left=Number.parseInt(b[0],10):x.right=-Number.parseInt(b[0],10),Object.assign(Object.assign(Object.assign({},x),s==null?void 0:s.style),N)},[M,b,N,s==null?void 0:s.style]),vt=y??(typeof I=="string"||typeof I=="number"?I:void 0),ot=!P&&(r===0?R:!!r&&r!==!0),Ct=ot?c.createElement("span",{className:`${p}-status-text`},r):null,ht=!I||typeof I!="object"?void 0:dt(I,x=>({style:Object.assign(Object.assign({},D),x.style)})),W=ct(m,!1),$t=w(O==null?void 0:O.indicator,(i=s==null?void 0:s.classNames)===null||i===void 0?void 0:i.indicator,{[`${p}-status-dot`]:_,[`${p}-status-${l}`]:!!l,[`${p}-color-${m}`]:W}),A={};m&&!W&&(A.color=m,A.background=m);const nt=w(p,{[`${p}-status`]:_,[`${p}-not-a-wrapper`]:!C,[`${p}-rtl`]:M==="rtl"},H,bt,s==null?void 0:s.className,(n=s==null?void 0:s.classNames)===null||n===void 0?void 0:n.root,O==null?void 0:O.root,gt,ft);if(!C&&_&&(r||pt||!Q)){const x=D.color;return J(c.createElement("span",Object.assign({},K,{className:nt,style:Object.assign(Object.assign(Object.assign({},S==null?void 0:S.root),(o=s==null?void 0:s.styles)===null||o===void 0?void 0:o.root),D)}),c.createElement("span",{className:$t,style:Object.assign(Object.assign(Object.assign({},S==null?void 0:S.indicator),(d=s==null?void 0:s.styles)===null||d===void 0?void 0:d.indicator),A)}),ot&&c.createElement("span",{style:{color:x},className:`${p}-status-text`},r)))}return J(c.createElement("span",Object.assign({ref:e},K,{className:nt,style:Object.assign(Object.assign({},(a=s==null?void 0:s.styles)===null||a===void 0?void 0:a.root),S==null?void 0:S.root)}),C,c.createElement(xt,{visible:!P,motionName:`${p}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:x})=>{var L,q;const yt=G("scroll-number",v),X=et.current,St=w(O==null?void 0:O.indicator,(L=s==null?void 0:s.classNames)===null||L===void 0?void 0:L.indicator,{[`${p}-dot`]:X,[`${p}-count`]:!X,[`${p}-count-sm`]:f==="small",[`${p}-multiple-words`]:!X&&V&&V.toString().length>1,[`${p}-status-${l}`]:!!l,[`${p}-color-${m}`]:W});let F=Object.assign(Object.assign(Object.assign({},S==null?void 0:S.indicator),(q=s==null?void 0:s.styles)===null||q===void 0?void 0:q.indicator),D);return m&&!W&&(F=F||{},F.background=m),c.createElement(Mt,{prefixCls:yt,show:!P,motionClassName:x,className:St,count:V,title:vt,style:F,key:"scrollNumber"},ht)}),Ct))}),Vt=_t;Vt.Ribbon=Dt;export{Vt as B};
|
|
1
|
+
import*as c from"react";import{useMemo as rt,useRef as U}from"react";import{g as it,m as Nt,v as at,r as lt,w as z,x as j,n as Y,y as ct,e as w,s as dt,z as xt}from"./index-BvpN2hYX.js";const Ot=new z("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),wt=new z("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),jt=new z("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),Et=new z("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),Pt=new z("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),It=new z("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),zt=t=>{const{componentCls:e,iconCls:i,antCls:n,badgeShadowSize:o,textFontSize:d,textFontSizeSM:a,statusSize:$,dotSize:v,textFontWeight:C,indicatorHeight:l,indicatorHeightSM:r,marginXS:m,calc:g}=t,u=`${n}-scroll-number`,h=at(t,(f,{darkColor:y})=>({[`&${e} ${e}-color-${f}`]:{background:y,[`&:not(${e}-count)`]:{color:y},"a:hover &":{background:y}}}));return{[e]:Object.assign(Object.assign(Object.assign(Object.assign({},lt(t)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${e}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:t.indicatorZIndex,minWidth:l,height:l,color:t.badgeTextColor,fontWeight:C,fontSize:d,lineHeight:j(l),whiteSpace:"nowrap",textAlign:"center",background:t.badgeColor,borderRadius:g(l).div(2).equal(),boxShadow:`0 0 0 ${j(o)} ${t.badgeShadowColor}`,transition:`background ${t.motionDurationMid}`,a:{color:t.badgeTextColor},"a:hover":{color:t.badgeTextColor},"a:hover &":{background:t.badgeColorHover}},[`${e}-count-sm`]:{minWidth:r,height:r,fontSize:a,lineHeight:j(r),borderRadius:g(r).div(2).equal()},[`${e}-multiple-words`]:{padding:`0 ${j(t.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${e}-dot`]:{zIndex:t.indicatorZIndex,width:v,minWidth:v,height:v,background:t.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${j(o)} ${t.badgeShadowColor}`},[`${e}-count, ${e}-dot, ${u}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${i}-spin`]:{animationName:It,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${e}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${e}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:$,height:$,verticalAlign:"middle",borderRadius:"50%"},[`${e}-status-success`]:{backgroundColor:t.colorSuccess},[`${e}-status-processing`]:{overflow:"visible",color:t.colorInfo,backgroundColor:t.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:o,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:Ot,animationDuration:t.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${e}-status-default`]:{backgroundColor:t.colorTextPlaceholder},[`${e}-status-error`]:{backgroundColor:t.colorError},[`${e}-status-warning`]:{backgroundColor:t.colorWarning},[`${e}-status-text`]:{marginInlineStart:m,color:t.colorText,fontSize:t.fontSize}}}),h),{[`${e}-zoom-appear, ${e}-zoom-enter`]:{animationName:wt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`${e}-zoom-leave`]:{animationName:jt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`&${e}-not-a-wrapper`]:{[`${e}-zoom-appear, ${e}-zoom-enter`]:{animationName:Et,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`${e}-zoom-leave`]:{animationName:Pt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`&:not(${e}-status)`]:{verticalAlign:"middle"},[`${u}-custom-component, ${e}-count`]:{transform:"none"},[`${u}-custom-component, ${u}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[u]:{overflow:"hidden",transition:`all ${t.motionDurationMid} ${t.motionEaseOutBack}`,[`${u}-only`]:{position:"relative",display:"inline-block",height:l,transition:`all ${t.motionDurationSlow} ${t.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${u}-only-unit`]:{height:l,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${u}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${e}-count, ${e}-dot, ${u}-custom-component`]:{transform:"translate(-50%, -50%)"}}})}},ut=t=>{const{fontHeight:e,lineWidth:i,marginXS:n,colorBorderBg:o}=t,d=e,a=i,$=t.colorTextLightSolid,v=t.colorError,C=t.colorErrorHover;return Nt(t,{badgeFontHeight:d,badgeShadowSize:a,badgeTextColor:$,badgeColor:v,badgeColorHover:C,badgeShadowColor:o,badgeProcessingDuration:"1.2s",badgeRibbonOffset:n,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},mt=t=>{const{fontSize:e,lineHeight:i,fontSizeSM:n,lineWidth:o}=t;return{indicatorZIndex:"auto",indicatorHeight:Math.round(e*i)-2*o,indicatorHeightSM:e,dotSize:n/2,textFontSize:n,textFontSizeSM:n,textFontWeight:"normal",statusSize:n/2}},Tt=it("Badge",t=>{const e=ut(t);return zt(e)},mt),Bt=t=>{const{antCls:e,badgeFontHeight:i,marginXS:n,badgeRibbonOffset:o,calc:d}=t,a=`${e}-ribbon`,$=`${e}-ribbon-wrapper`,v=at(t,(C,{darkColor:l})=>({[`&${a}-color-${C}`]:{background:l,color:l}}));return{[$]:{position:"relative"},[a]:Object.assign(Object.assign(Object.assign(Object.assign({},lt(t)),{position:"absolute",top:n,padding:`0 ${j(t.paddingXS)}`,color:t.colorPrimary,lineHeight:j(i),whiteSpace:"nowrap",backgroundColor:t.colorPrimary,borderRadius:t.borderRadiusSM,[`${a}-text`]:{color:t.badgeTextColor},[`${a}-corner`]:{position:"absolute",top:"100%",width:o,height:o,color:"currentcolor",border:`${j(d(o).div(2).equal())} solid`,transform:t.badgeRibbonCornerTransform,transformOrigin:"top",filter:t.badgeRibbonCornerFilter}}),v),{[`&${a}-placement-end`]:{insetInlineEnd:d(o).mul(-1).equal(),borderEndEndRadius:0,[`${a}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${a}-placement-start`]:{insetInlineStart:d(o).mul(-1).equal(),borderEndStartRadius:0,[`${a}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},Rt=it(["Badge","Ribbon"],t=>{const e=ut(t);return Bt(e)},mt),Dt=t=>{const{className:e,prefixCls:i,style:n,color:o,children:d,text:a,placement:$="end",rootClassName:v}=t,{getPrefixCls:C,direction:l}=c.useContext(Y),r=C("ribbon",i),m=`${r}-wrapper`,[g,u,h]=Rt(r,m),f=ct(o,!1),y=w(r,`${r}-placement-${$}`,{[`${r}-rtl`]:l==="rtl",[`${r}-color-${o}`]:f},e),b={},N={};return o&&!f&&(b.background=o,N.color=o),g(c.createElement("div",{className:w(m,v,u,h)},d,c.createElement("div",{className:w(y,u),style:Object.assign(Object.assign({},b),n)},c.createElement("span",{className:`${r}-text`},a),c.createElement("div",{className:`${r}-corner`,style:N}))))},st=t=>{const{prefixCls:e,value:i,current:n,offset:o=0}=t;let d;return o&&(d={position:"absolute",top:`${o}00%`,left:0}),c.createElement("span",{style:d,className:w(`${e}-only-unit`,{current:n})},i)};function Wt(t,e,i){let n=t,o=0;for(;(n+10)%10!==e;)n+=i,o+=i;return o}const Ft=t=>{const{prefixCls:e,count:i,value:n}=t,o=Number(n),d=Math.abs(i),[a,$]=c.useState(o),[v,C]=c.useState(d),l=()=>{$(o),C(d)};c.useEffect(()=>{const g=setTimeout(l,1e3);return()=>clearTimeout(g)},[o]);let r,m;if(a===o||Number.isNaN(o)||Number.isNaN(a))r=[c.createElement(st,Object.assign({},t,{key:o,current:!0}))],m={transition:"none"};else{r=[];const g=o+10,u=[];for(let b=o;b<=g;b+=1)u.push(b);const h=v<d?1:-1,f=u.findIndex(b=>b%10===a);r=(h<0?u.slice(0,f+1):u.slice(f)).map((b,N)=>{const H=b%10;return c.createElement(st,Object.assign({},t,{key:b,value:H,offset:h<0?N-f:N,current:N===f}))}),m={transform:`translateY(${-Wt(a,o,h)}00%)`}}return c.createElement("span",{className:`${e}-only`,style:m,onTransitionEnd:l},r)};var Ht=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(i[n[o]]=t[n[o]]);return i};const Mt=c.forwardRef((t,e)=>{const{prefixCls:i,count:n,className:o,motionClassName:d,style:a,title:$,show:v,component:C="sup",children:l}=t,r=Ht(t,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:m}=c.useContext(Y),g=m("scroll-number",i),u=Object.assign(Object.assign({},r),{"data-show":v,style:a,className:w(g,o,d),title:$});let h=n;if(n&&Number(n)%1===0){const f=String(n).split("");h=c.createElement("bdi",null,f.map((y,b)=>c.createElement(Ft,{prefixCls:g,count:Number(n),value:y,key:f.length-b})))}return a!=null&&a.borderColor&&(u.style=Object.assign(Object.assign({},a),{boxShadow:`0 0 0 1px ${a.borderColor} inset`})),l?dt(l,f=>({className:w(`${g}-custom-component`,f==null?void 0:f.className,d)})):c.createElement(C,Object.assign({},u,{ref:e}),h)});var Zt=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(i[n[o]]=t[n[o]]);return i};const _t=c.forwardRef((t,e)=>{var i,n,o,d,a;const{prefixCls:$,scrollNumberPrefixCls:v,children:C,status:l,text:r,color:m,count:g=null,overflowCount:u=99,dot:h=!1,size:f="default",title:y,offset:b,style:N,className:H,rootClassName:bt,classNames:O,styles:S,showZero:R=!1}=t,K=Zt(t,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:G,direction:M,badge:s}=c.useContext(Y),p=G("badge",$),[J,gt,ft]=Tt(p),Z=g>u?`${u}+`:g,T=Z==="0"||Z===0||r==="0"||r===0,Q=g===null||T&&!R,_=(l!=null||m!=null)&&Q,pt=l!=null||!T,B=h&&!T,E=B?"":Z,P=rt(()=>((E==null||E==="")&&(r==null||r==="")||T&&!R)&&!B,[E,T,R,B,r]),k=U(g);P||(k.current=g);const I=k.current,tt=U(E);P||(tt.current=E);const V=tt.current,et=U(B);P||(et.current=B);const D=rt(()=>{if(!b)return Object.assign(Object.assign({},s==null?void 0:s.style),N);const x={marginTop:b[1]};return M==="rtl"?x.left=Number.parseInt(b[0],10):x.right=-Number.parseInt(b[0],10),Object.assign(Object.assign(Object.assign({},x),s==null?void 0:s.style),N)},[M,b,N,s==null?void 0:s.style]),vt=y??(typeof I=="string"||typeof I=="number"?I:void 0),ot=!P&&(r===0?R:!!r&&r!==!0),Ct=ot?c.createElement("span",{className:`${p}-status-text`},r):null,$t=!I||typeof I!="object"?void 0:dt(I,x=>({style:Object.assign(Object.assign({},D),x.style)})),W=ct(m,!1),ht=w(O==null?void 0:O.indicator,(i=s==null?void 0:s.classNames)===null||i===void 0?void 0:i.indicator,{[`${p}-status-dot`]:_,[`${p}-status-${l}`]:!!l,[`${p}-color-${m}`]:W}),A={};m&&!W&&(A.color=m,A.background=m);const nt=w(p,{[`${p}-status`]:_,[`${p}-not-a-wrapper`]:!C,[`${p}-rtl`]:M==="rtl"},H,bt,s==null?void 0:s.className,(n=s==null?void 0:s.classNames)===null||n===void 0?void 0:n.root,O==null?void 0:O.root,gt,ft);if(!C&&_&&(r||pt||!Q)){const x=D.color;return J(c.createElement("span",Object.assign({},K,{className:nt,style:Object.assign(Object.assign(Object.assign({},S==null?void 0:S.root),(o=s==null?void 0:s.styles)===null||o===void 0?void 0:o.root),D)}),c.createElement("span",{className:ht,style:Object.assign(Object.assign(Object.assign({},S==null?void 0:S.indicator),(d=s==null?void 0:s.styles)===null||d===void 0?void 0:d.indicator),A)}),ot&&c.createElement("span",{style:{color:x},className:`${p}-status-text`},r)))}return J(c.createElement("span",Object.assign({ref:e},K,{className:nt,style:Object.assign(Object.assign({},(a=s==null?void 0:s.styles)===null||a===void 0?void 0:a.root),S==null?void 0:S.root)}),C,c.createElement(xt,{visible:!P,motionName:`${p}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:x})=>{var L,q;const yt=G("scroll-number",v),X=et.current,St=w(O==null?void 0:O.indicator,(L=s==null?void 0:s.classNames)===null||L===void 0?void 0:L.indicator,{[`${p}-dot`]:X,[`${p}-count`]:!X,[`${p}-count-sm`]:f==="small",[`${p}-multiple-words`]:!X&&V&&V.toString().length>1,[`${p}-status-${l}`]:!!l,[`${p}-color-${m}`]:W});let F=Object.assign(Object.assign(Object.assign({},S==null?void 0:S.indicator),(q=s==null?void 0:s.styles)===null||q===void 0?void 0:q.indicator),D);return m&&!W&&(F=F||{},F.background=m),c.createElement(Mt,{prefixCls:yt,show:!P,motionClassName:x,className:St,count:V,title:vt,style:F,key:"scrollNumber"},$t)}),Ct))}),Vt=_t;Vt.Ribbon=Dt;export{Vt as B};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as n from"react";import{O as je,Q as Ie,_ as re,e as x,U as ce,V as Me,W as de,z as me,X as j,Y as fe,K as ie,Z as ve,$ as _e,u as Ce,a0 as ze,a1 as ge,g as He,m as Ke,x as Z,a2 as Le,a3 as We,a4 as Te,a5 as Be,a6 as Ae,q as he,n as Fe}from"./index-BvpN2hYX.js";import{S as Ve,u as Ue}from"./index-D3Z0MZbL.js";var be=n.createContext(null),we=n.createContext({}),Xe=["prefixCls","className","containerRef"],Ye=function(t){var a=t.prefixCls,o=t.className,r=t.containerRef,l=je(t,Xe),i=n.useContext(we),s=i.panel,b=Ie(s,r);return n.createElement("div",re({className:x("".concat(a,"-content"),o),role:"dialog",ref:b},ce(t,{aria:!0}),{"aria-modal":"true"},l))};function ye(e){return typeof e=="string"&&String(Number(e))===e?(Me(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(e)):e}var pe={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Ge(e,t){var a,o,r,l=e.prefixCls,i=e.open,s=e.placement,b=e.inline,C=e.push,O=e.forceRender,y=e.autoFocus,E=e.keyboard,f=e.classNames,d=e.rootClassName,u=e.rootStyle,v=e.zIndex,p=e.className,I=e.id,P=e.style,S=e.motion,D=e.width,N=e.height,g=e.children,w=e.mask,M=e.maskClosable,R=e.maskMotion,Q=e.maskClassName,K=e.maskStyle,z=e.afterOpenChange,$=e.onClose,W=e.onMouseEnter,J=e.onMouseOver,ee=e.onMouseLeave,X=e.onClick,te=e.onKeyDown,ne=e.onKeyUp,h=e.styles,T=e.drawerRender,_=n.useRef(),B=n.useRef(),A=n.useRef();n.useImperativeHandle(t,function(){return _.current});var ae=function(k){var Y=k.keyCode,G=k.shiftKey;switch(Y){case ie.TAB:{if(Y===ie.TAB){if(!G&&document.activeElement===A.current){var q;(q=B.current)===null||q===void 0||q.focus({preventScroll:!0})}else if(G&&document.activeElement===B.current){var le;(le=A.current)===null||le===void 0||le.focus({preventScroll:!0})}}break}case ie.ESC:{$&&E&&(k.stopPropagation(),$(k));break}}};n.useEffect(function(){if(i&&y){var c;(c=_.current)===null||c===void 0||c.focus({preventScroll:!0})}},[i]);var oe=n.useState(!1),F=de(oe,2),H=F[0],L=F[1],m=n.useContext(be),se;typeof C=="boolean"?se=C?{}:{distance:0}:se=C||{};var V=(a=(o=(r=se)===null||r===void 0?void 0:r.distance)!==null&&o!==void 0?o:m==null?void 0:m.pushDistance)!==null&&a!==void 0?a:180,Ne=n.useMemo(function(){return{pushDistance:V,push:function(){L(!0)},pull:function(){L(!1)}}},[V]);n.useEffect(function(){if(i){var c;m==null||(c=m.push)===null||c===void 0||c.call(m)}else{var k;m==null||(k=m.pull)===null||k===void 0||k.call(m)}},[i]),n.useEffect(function(){return function(){var c;m==null||(c=m.pull)===null||c===void 0||c.call(m)}},[]);var Ee=n.createElement(me,re({key:"mask"},R,{visible:w&&i}),function(c,k){var Y=c.className,G=c.style;return n.createElement("div",{className:x("".concat(l,"-mask"),Y,f==null?void 0:f.mask,Q),style:j(j(j({},G),K),h==null?void 0:h.mask),onClick:M&&i?$:void 0,ref:k})}),Pe=typeof S=="function"?S(s):S,U={};if(H&&V)switch(s){case"top":U.transform="translateY(".concat(V,"px)");break;case"bottom":U.transform="translateY(".concat(-V,"px)");break;case"left":U.transform="translateX(".concat(V,"px)");break;default:U.transform="translateX(".concat(-V,"px)");break}s==="left"||s==="right"?U.width=ye(D):U.height=ye(N);var De={onMouseEnter:W,onMouseOver:J,onMouseLeave:ee,onClick:X,onKeyDown:te,onKeyUp:ne},Re=n.createElement(me,re({key:"panel"},Pe,{visible:i,forceRender:O,onVisibleChanged:function(k){z==null||z(k)},removeOnLeave:!1,leavedClassName:"".concat(l,"-content-wrapper-hidden")}),function(c,k){var Y=c.className,G=c.style,q=n.createElement(Ye,re({id:I,containerRef:k,prefixCls:l,className:x(p,f==null?void 0:f.content),style:j(j({},P),h==null?void 0:h.content)},ce(e,{aria:!0}),De),g);return n.createElement("div",re({className:x("".concat(l,"-content-wrapper"),f==null?void 0:f.wrapper,Y),style:j(j(j({},U),G),h==null?void 0:h.wrapper)},ce(e,{data:!0})),T?T(q):q)}),ue=j({},u);return v&&(ue.zIndex=v),n.createElement(be.Provider,{value:Ne},n.createElement("div",{className:x(l,"".concat(l,"-").concat(s),d,fe(fe({},"".concat(l,"-open"),i),"".concat(l,"-inline"),b)),style:ue,tabIndex:-1,ref:_,onKeyDown:ae},Ee,n.createElement("div",{tabIndex:0,ref:B,style:pe,"aria-hidden":"true","data-sentinel":"start"}),Re,n.createElement("div",{tabIndex:0,ref:A,style:pe,"aria-hidden":"true","data-sentinel":"end"})))}var qe=n.forwardRef(Ge),Ze=function(t){var a=t.open,o=a===void 0?!1:a,r=t.prefixCls,l=r===void 0?"rc-drawer":r,i=t.placement,s=i===void 0?"right":i,b=t.autoFocus,C=b===void 0?!0:b,O=t.keyboard,y=O===void 0?!0:O,E=t.width,f=E===void 0?378:E,d=t.mask,u=d===void 0?!0:d,v=t.maskClosable,p=v===void 0?!0:v,I=t.getContainer,P=t.forceRender,S=t.afterOpenChange,D=t.destroyOnClose,N=t.onMouseEnter,g=t.onMouseOver,w=t.onMouseLeave,M=t.onClick,R=t.onKeyDown,Q=t.onKeyUp,K=t.panelRef,z=n.useState(!1),$=de(z,2),W=$[0],J=$[1],ee=n.useState(!1),X=de(ee,2),te=X[0],ne=X[1];ve(function(){ne(!0)},[]);var h=te?o:!1,T=n.useRef(),_=n.useRef();ve(function(){h&&(_.current=document.activeElement)},[h]);var B=function(H){var L;if(J(H),S==null||S(H),!H&&_.current&&!((L=T.current)!==null&&L!==void 0&&L.contains(_.current))){var m;(m=_.current)===null||m===void 0||m.focus({preventScroll:!0})}},A=n.useMemo(function(){return{panel:K}},[K]);if(!P&&!W&&!h&&D)return null;var ae={onMouseEnter:N,onMouseOver:g,onMouseLeave:w,onClick:M,onKeyDown:R,onKeyUp:Q},oe=j(j({},t),{},{open:h,prefixCls:l,placement:s,autoFocus:C,keyboard:y,width:f,mask:u,maskClosable:p,inline:I===!1,afterOpenChange:B,ref:T},ae);return n.createElement(we.Provider,{value:A},n.createElement(_e,{open:h||P||W,autoDestroy:!1,getContainer:I,autoLock:u&&(h||W)},n.createElement(qe,oe)))};const xe=e=>{var t,a;const{prefixCls:o,title:r,footer:l,extra:i,closable:s,loading:b,onClose:C,headerStyle:O,bodyStyle:y,footerStyle:E,children:f,classNames:d,styles:u}=e,v=Ce("drawer");let p;s===!1?p=void 0:s===void 0||s===!0?p="start":p=(s==null?void 0:s.placement)==="end"?"end":"start";const I=n.useCallback(g=>n.createElement("button",{type:"button",onClick:C,className:x(`${o}-close`,{[`${o}-close-${p}`]:p==="end"})},g),[C,o,p]),[P,S]=ze(ge(e),ge(v),{closable:!0,closeIconRender:I}),D=()=>{var g,w;return!r&&!P?null:n.createElement("div",{style:Object.assign(Object.assign(Object.assign({},(g=v.styles)===null||g===void 0?void 0:g.header),O),u==null?void 0:u.header),className:x(`${o}-header`,{[`${o}-header-close-only`]:P&&!r&&!i},(w=v.classNames)===null||w===void 0?void 0:w.header,d==null?void 0:d.header)},n.createElement("div",{className:`${o}-header-title`},p==="start"&&S,r&&n.createElement("div",{className:`${o}-title`},r)),i&&n.createElement("div",{className:`${o}-extra`},i),p==="end"&&S)},N=()=>{var g,w;if(!l)return null;const M=`${o}-footer`;return n.createElement("div",{className:x(M,(g=v.classNames)===null||g===void 0?void 0:g.footer,d==null?void 0:d.footer),style:Object.assign(Object.assign(Object.assign({},(w=v.styles)===null||w===void 0?void 0:w.footer),E),u==null?void 0:u.footer)},l)};return n.createElement(n.Fragment,null,D(),n.createElement("div",{className:x(`${o}-body`,d==null?void 0:d.body,(t=v.classNames)===null||t===void 0?void 0:t.body),style:Object.assign(Object.assign(Object.assign({},(a=v.styles)===null||a===void 0?void 0:a.body),y),u==null?void 0:u.body)},b?n.createElement(Ve,{active:!0,title:!1,paragraph:{rows:5},className:`${o}-body-skeleton`}):f),N())},Qe=e=>{const t="100%";return{left:`translateX(-${t})`,right:`translateX(${t})`,top:`translateY(-${t})`,bottom:`translateY(${t})`}[e]},Se=(e,t)=>({"&-enter, &-appear":Object.assign(Object.assign({},e),{"&-active":t}),"&-leave":Object.assign(Object.assign({},t),{"&-active":e})}),ke=(e,t)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${t}`}}},Se({opacity:e},{opacity:1})),Je=(e,t)=>[ke(.7,t),Se({transform:Qe(e)},{transform:"none"})],et=e=>{const{componentCls:t,motionDurationSlow:a}=e;return{[t]:{[`${t}-mask-motion`]:ke(0,a),[`${t}-panel-motion`]:["left","right","top","bottom"].reduce((o,r)=>Object.assign(Object.assign({},o),{[`&-${r}`]:Je(r,a)}),{})}}},tt=e=>{const{borderRadiusSM:t,componentCls:a,zIndexPopup:o,colorBgMask:r,colorBgElevated:l,motionDurationSlow:i,motionDurationMid:s,paddingXS:b,padding:C,paddingLG:O,fontSizeLG:y,lineHeightLG:E,lineWidth:f,lineType:d,colorSplit:u,marginXS:v,colorIcon:p,colorIconHover:I,colorBgTextHover:P,colorBgTextActive:S,colorText:D,fontWeightStrong:N,footerPaddingBlock:g,footerPaddingInline:w,calc:M}=e,R=`${a}-content-wrapper`;return{[a]:{position:"fixed",inset:0,zIndex:o,pointerEvents:"none",color:D,"&-pure":{position:"relative",background:l,display:"flex",flexDirection:"column",[`&${a}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${a}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${a}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${a}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${a}-mask`]:{position:"absolute",inset:0,zIndex:o,background:r,pointerEvents:"auto"},[R]:{position:"absolute",zIndex:o,maxWidth:"100vw",transition:`all ${i}`,"&-hidden":{display:"none"}},[`&-left > ${R}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${R}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${R}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${R}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${a}-content`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:l,pointerEvents:"auto"},[`${a}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${Z(C)} ${Z(O)}`,fontSize:y,lineHeight:E,borderBottom:`${Z(f)} ${d} ${u}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${a}-extra`]:{flex:"none"},[`${a}-close`]:Object.assign({display:"inline-flex",width:M(y).add(b).equal(),height:M(y).add(b).equal(),borderRadius:t,justifyContent:"center",alignItems:"center",color:p,fontWeight:N,fontSize:y,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:`all ${s}`,textRendering:"auto",[`&${a}-close-end`]:{marginInlineStart:v},[`&:not(${a}-close-end)`]:{marginInlineEnd:v},"&:hover":{color:I,backgroundColor:P,textDecoration:"none"},"&:active":{backgroundColor:S}},Le(e)),[`${a}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:y,lineHeight:E},[`${a}-body`]:{flex:1,minWidth:0,minHeight:0,padding:O,overflow:"auto",[`${a}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},[`${a}-footer`]:{flexShrink:0,padding:`${Z(g)} ${Z(w)}`,borderTop:`${Z(f)} ${d} ${u}`},"&-rtl":{direction:"rtl"}}}},nt=e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding}),Oe=He("Drawer",e=>{const t=Ke(e,{});return[tt(t),et(t)]},nt);var $e=function(e,t){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(a[o[r]]=e[o[r]]);return a};const at={distance:180},ot=e=>{const{rootClassName:t,width:a,height:o,size:r="default",mask:l=!0,push:i=at,open:s,afterOpenChange:b,onClose:C,prefixCls:O,getContainer:y,panelRef:E=null,style:f,className:d,visible:u,afterVisibleChange:v,maskStyle:p,drawerStyle:I,contentWrapperStyle:P,destroyOnClose:S,destroyOnHidden:D}=e,N=$e(e,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","panelRef","style","className","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle","destroyOnClose","destroyOnHidden"]),{getPopupContainer:g,getPrefixCls:w,direction:M,className:R,style:Q,classNames:K,styles:z}=Ce("drawer"),$=w("drawer",O),[W,J,ee]=Oe($),X=y===void 0&&g?()=>g(document.body):y,te=x({"no-mask":!l,[`${$}-rtl`]:M==="rtl"},t,J,ee),ne=n.useMemo(()=>a??(r==="large"?736:378),[a,r]),h=n.useMemo(()=>o??(r==="large"?736:378),[o,r]),T={motionName:he($,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},_=L=>({motionName:he($,`panel-motion-${L}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),B=Ue(),A=We(E,B),[ae,oe]=Te("Drawer",N.zIndex),{classNames:F={},styles:H={}}=N;return W(n.createElement(Be,{form:!0,space:!0},n.createElement(Ae.Provider,{value:oe},n.createElement(Ze,Object.assign({prefixCls:$,onClose:C,maskMotion:T,motion:_},N,{classNames:{mask:x(F.mask,K.mask),content:x(F.content,K.content),wrapper:x(F.wrapper,K.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},H.mask),p),z.mask),content:Object.assign(Object.assign(Object.assign({},H.content),I),z.content),wrapper:Object.assign(Object.assign(Object.assign({},H.wrapper),P),z.wrapper)},open:s??u,mask:l,push:i,width:ne,height:h,style:Object.assign(Object.assign({},Q),f),className:x(R,d),rootClassName:te,getContainer:X,afterOpenChange:b??v,panelRef:A,zIndex:ae,destroyOnClose:D??S}),n.createElement(xe,Object.assign({prefixCls:$},N,{onClose:C}))))))},rt=e=>{const{prefixCls:t,style:a,className:o,placement:r="right"}=e,l=$e(e,["prefixCls","style","className","placement"]),{getPrefixCls:i}=n.useContext(Fe),s=i("drawer",t),[b,C,O]=Oe(s),y=x(s,`${s}-pure`,`${s}-${r}`,C,O,o);return b(n.createElement("div",{className:y,style:a},n.createElement(xe,Object.assign({prefixCls:s},l))))};ot._InternalPanelDoNotUseOrYouWillBeFired=rt;export{ot as D};
|