@gientech/modual 1.9.3 → 1.9.5

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.
@@ -1,4 +1,4 @@
1
- import{a as Nt,g as it,m as xt,j as at,r as lt,K as P,k as j,l as K,n as ct,f as w,o as dt,p as Ot}from"./index-g-SUxfJH.js";import*as c from"react";import{useMemo as rt,useRef as U}from"react";/**
1
+ import{a as Nt,g as it,m as xt,j as at,r as lt,K as P,k as j,l as K,n as ct,f as w,o as dt,p as Ot}from"./index-antI2hFx.js";import*as c from"react";import{useMemo as rt,useRef as U}from"react";/**
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{jsx as a,jsxs as O,Fragment as he}from"react/jsx-runtime";import*as j from"react";import{isValidElement as $e,useMemo as ie,useState as h,useRef as Ce,useCallback as ue,useEffect as xe}from"react";import{u as Ve}from"./index-CpW6Dhpp.js";import{F as Pe,J as K,C as Re,T as je,U as We,m as Ue}from"./index-x8IlxRuv.js";import{a as He,g as Ge,m as Ze,$ as qe,a0 as Ye,r as Ke,a1 as Xe,a2 as Je,a3 as Qe,l as et,f as le,a4 as tt,u as ut,a5 as at,T as ce,Z as st,o as ot,M as nt,b as rt,a6 as it,i as be}from"./index-g-SUxfJH.js";import{O as we}from"./index-DwoTKC3G.js";/* empty css */import{s as Y,M as ye}from"./style-CGmZ5osp.js";import{U as ke}from"./index-BO-w4FPz.js";import{D as Ie}from"./index-D72cKELw.js";import{X as ge}from"./x-CnaaLGJF.js";import"react-dom";import{B as De,T as Te}from"./index-DdVFXD_y.js";/**
1
+ import{jsx as a,jsxs as O,Fragment as he}from"react/jsx-runtime";import*as j from"react";import{isValidElement as $e,useMemo as ie,useState as h,useRef as Ce,useCallback as ue,useEffect as xe}from"react";import{u as Ve}from"./index-CpW6Dhpp.js";import{F as Pe,J as K,C as Re,T as je,U as We,m as Ue}from"./index-DJPAws60.js";import{a as He,g as Ge,m as Ze,$ as qe,a0 as Ye,r as Ke,a1 as Xe,a2 as Je,a3 as Qe,l as et,f as le,a4 as tt,u as ut,a5 as at,T as ce,Z as st,o as ot,M as nt,b as rt,a6 as it,i as be}from"./index-antI2hFx.js";import{O as we}from"./index-DBPtDW8Y.js";/* empty css */import{s as Y,M as ye}from"./style-BeYL_E4J.js";import{I as ke}from"./index-B2rczyCX.js";import{D as Ie}from"./index-4Ac00q5P.js";import{X as ge}from"./x-DxuhxSb6.js";import"react-dom";import{B as De,T as Te}from"./index-q0nZjKAG.js";/**
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{a}from"./index-g-SUxfJH.js";/**
1
+ import{a}from"./index-antI2hFx.js";/**
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{ac as sn,A as X,H as K,ad as we,E as qe,f as I,L as _e,M as De,ap as cn,y as bt,J as F,_ as U,aq as yt,g as Ve,m as Ge,K as $e,r as ht,ar as xt,l as ne,as as Re,at as dn,au as $t,av as St,aw as Ot,ax as un,ay as Ue,az as fn,aA as mn,B as Xe,aB as Et,z as gn,p as Nt,aC as vn,aD as Je,P as Cn,aE as pn,k as H,aF as Ke,u as bn,an as Ye,aG as Pt,aH as yn,$ as hn,U as xn,aI as $n,O as Sn,Q as et,V as On,W as En,X as Nn,Y as Pn,Z as je,al as wn,aJ as jn,aK as Ze,am as In,aL as wt,aM as jt,aN as Rn,aO as Mn}from"./index-g-SUxfJH.js";import*as r from"react";import N,{useContext as fe,useRef as ie,useState as tt,useEffect as Ie,useMemo as Tn}from"react";import{createPortal as kn}from"react-dom";var Bn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},Hn=function(t,o){return r.createElement(sn,X({},t,{ref:o,icon:Bn}))},It=r.forwardRef(Hn),Rt=r.forwardRef(function(e,t){var o=e.prefixCls,n=e.style,a=e.className,s=e.duration,d=s===void 0?4.5:s,i=e.showProgress,l=e.pauseOnHover,u=l===void 0?!0:l,c=e.eventKey,f=e.content,m=e.closable,g=e.closeIcon,C=g===void 0?"x":g,p=e.props,v=e.onClick,x=e.onNoticeClose,b=e.times,y=e.hovering,S=r.useState(!1),E=K(S,2),h=E[0],T=E[1],j=r.useState(0),$=K(j,2),O=$[0],P=$[1],B=r.useState(0),L=K(B,2),w=L[0],_=L[1],k=y||h,R=d>0&&i,D=function(){x(c)},Y=function(M){(M.key==="Enter"||M.code==="Enter"||M.keyCode===De.ENTER)&&D()};r.useEffect(function(){if(!k&&d>0){var q=Date.now()-w,M=setTimeout(function(){D()},d*1e3-w);return function(){u&&clearTimeout(M),_(Date.now()-q)}}},[d,k,b]),r.useEffect(function(){if(!k&&R&&(u||w===0)){var q=performance.now(),M,A=function le(){cancelAnimationFrame(M),M=requestAnimationFrame(function(ae){var J=ae+w-q,oe=Math.min(J/(d*1e3),1);P(oe*100),oe<1&&le()})};return A(),function(){u&&cancelAnimationFrame(M)}}},[d,w,k,R,b]);var Z=r.useMemo(function(){return we(m)==="object"&&m!==null?m:m?{closeIcon:C}:{}},[m,C]),Q=qe(Z,!0),W=100-(!O||O<0?0:O>100?100:O),V="".concat(o,"-notice");return r.createElement("div",X({},p,{ref:t,className:I(V,a,_e({},"".concat(V,"-closable"),m)),style:n,onMouseEnter:function(M){var A;T(!0),p==null||(A=p.onMouseEnter)===null||A===void 0||A.call(p,M)},onMouseLeave:function(M){var A;T(!1),p==null||(A=p.onMouseLeave)===null||A===void 0||A.call(p,M)},onClick:v}),r.createElement("div",{className:"".concat(V,"-content")},f),m&&r.createElement("a",X({tabIndex:0,className:"".concat(V,"-close"),onKeyDown:Y,"aria-label":"Close"},Q,{onClick:function(M){M.preventDefault(),M.stopPropagation(),D()}}),Z.closeIcon),R&&r.createElement("progress",{className:"".concat(V,"-progress"),max:"100",value:W},W+"%"))}),Mt=N.createContext({}),zn=function(t){var o=t.children,n=t.classNames;return N.createElement(Mt.Provider,{value:{classNames:n}},o)},nt=8,ot=3,at=16,Fn=function(t){var o={offset:nt,threshold:ot,gap:at};if(t&&we(t)==="object"){var n,a,s;o.offset=(n=t.offset)!==null&&n!==void 0?n:nt,o.threshold=(a=t.threshold)!==null&&a!==void 0?a:ot,o.gap=(s=t.gap)!==null&&s!==void 0?s:at}return[!!t,o]},An=["className","style","classNames","styles"],Ln=function(t){var o=t.configList,n=t.placement,a=t.prefixCls,s=t.className,d=t.style,i=t.motion,l=t.onAllNoticeRemoved,u=t.onNoticeClose,c=t.stack,f=fe(Mt),m=f.classNames,g=ie({}),C=tt(null),p=K(C,2),v=p[0],x=p[1],b=tt([]),y=K(b,2),S=y[0],E=y[1],h=o.map(function(k){return{config:k,key:String(k.key)}}),T=Fn(c),j=K(T,2),$=j[0],O=j[1],P=O.offset,B=O.threshold,L=O.gap,w=$&&(S.length>0||h.length<=B),_=typeof i=="function"?i(n):i;return Ie(function(){$&&S.length>1&&E(function(k){return k.filter(function(R){return h.some(function(D){var Y=D.key;return R===Y})})})},[S,h,$]),Ie(function(){var k;if($&&g.current[(k=h[h.length-1])===null||k===void 0?void 0:k.key]){var R;x(g.current[(R=h[h.length-1])===null||R===void 0?void 0:R.key])}},[h,$]),N.createElement(cn,X({key:n,className:I(a,"".concat(a,"-").concat(n),m==null?void 0:m.list,s,_e(_e({},"".concat(a,"-stack"),!!$),"".concat(a,"-stack-expanded"),w)),style:d,keys:h,motionAppear:!0},_,{onAllRemoved:function(){l(n)}}),function(k,R){var D=k.config,Y=k.className,Z=k.style,Q=k.index,W=D,V=W.key,q=W.times,M=String(V),A=D,le=A.className,ae=A.style,J=A.classNames,oe=A.styles,ye=bt(A,An),ce=h.findIndex(function(Pe){return Pe.key===M}),de={};if($){var se=h.length-1-(ce>-1?ce:Q-1),z=n==="top"||n==="bottom"?"-50%":"0";if(se>0){var ee,he,G;de.height=w?(ee=g.current[M])===null||ee===void 0?void 0:ee.offsetHeight:v==null?void 0:v.offsetHeight;for(var xe=0,ue=0;ue<se;ue++){var Be;xe+=((Be=g.current[h[h.length-1-ue].key])===null||Be===void 0?void 0:Be.offsetHeight)+L}var an=(w?xe:se*P)*(n.startsWith("top")?1:-1),rn=!w&&v!==null&&v!==void 0&&v.offsetWidth&&(he=g.current[M])!==null&&he!==void 0&&he.offsetWidth?((v==null?void 0:v.offsetWidth)-P*2*(se<3?se:3))/((G=g.current[M])===null||G===void 0?void 0:G.offsetWidth):1;de.transform="translate3d(".concat(z,", ").concat(an,"px, 0) scaleX(").concat(rn,")")}else de.transform="translate3d(".concat(z,", 0, 0)")}return N.createElement("div",{ref:R,className:I("".concat(a,"-notice-wrapper"),Y,J==null?void 0:J.wrapper),style:F(F(F({},Z),de),oe==null?void 0:oe.wrapper),onMouseEnter:function(){return E(function(me){return me.includes(M)?me:[].concat(U(me),[M])})},onMouseLeave:function(){return E(function(me){return me.filter(function(ln){return ln!==M})})}},N.createElement(Rt,X({},ye,{ref:function(me){ce>-1?g.current[M]=me:delete g.current[M]},prefixCls:a,classNames:J,styles:oe,className:I(le,m==null?void 0:m.notice),style:ae,times:q,key:V,eventKey:V,onNoticeClose:u,hovering:$&&S.length>0})))})},_n=r.forwardRef(function(e,t){var o=e.prefixCls,n=o===void 0?"rc-notification":o,a=e.container,s=e.motion,d=e.maxCount,i=e.className,l=e.style,u=e.onAllRemoved,c=e.stack,f=e.renderNotifications,m=r.useState([]),g=K(m,2),C=g[0],p=g[1],v=function($){var O,P=C.find(function(B){return B.key===$});P==null||(O=P.onClose)===null||O===void 0||O.call(P),p(function(B){return B.filter(function(L){return L.key!==$})})};r.useImperativeHandle(t,function(){return{open:function($){p(function(O){var P=U(O),B=P.findIndex(function(_){return _.key===$.key}),L=F({},$);if(B>=0){var w;L.times=(((w=O[B])===null||w===void 0?void 0:w.times)||0)+1,P[B]=L}else L.times=0,P.push(L);return d>0&&P.length>d&&(P=P.slice(-d)),P})},close:function($){v($)},destroy:function(){p([])}}});var x=r.useState({}),b=K(x,2),y=b[0],S=b[1];r.useEffect(function(){var j={};C.forEach(function($){var O=$.placement,P=O===void 0?"topRight":O;P&&(j[P]=j[P]||[],j[P].push($))}),Object.keys(y).forEach(function($){j[$]=j[$]||[]}),S(j)},[C]);var E=function($){S(function(O){var P=F({},O),B=P[$]||[];return B.length||delete P[$],P})},h=r.useRef(!1);if(r.useEffect(function(){Object.keys(y).length>0?h.current=!0:h.current&&(u==null||u(),h.current=!1)},[y]),!a)return null;var T=Object.keys(y);return kn(r.createElement(r.Fragment,null,T.map(function(j){var $=y[j],O=r.createElement(Ln,{key:j,configList:$,placement:j,prefixCls:n,className:i==null?void 0:i(j),style:l==null?void 0:l(j),motion:s,onNoticeClose:v,onAllNoticeRemoved:E,stack:c});return f?f(O,{prefixCls:n,key:j}):O})),a)}),Dn=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],Wn=function(){return document.body},rt=0;function qn(){for(var e={},t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return o.forEach(function(a){a&&Object.keys(a).forEach(function(s){var d=a[s];d!==void 0&&(e[s]=d)})}),e}function Vn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.getContainer,o=t===void 0?Wn:t,n=e.motion,a=e.prefixCls,s=e.maxCount,d=e.className,i=e.style,l=e.onAllRemoved,u=e.stack,c=e.renderNotifications,f=bt(e,Dn),m=r.useState(),g=K(m,2),C=g[0],p=g[1],v=r.useRef(),x=r.createElement(_n,{container:C,ref:v,prefixCls:a,motion:n,maxCount:s,className:d,style:i,onAllRemoved:l,stack:u,renderNotifications:c}),b=r.useState([]),y=K(b,2),S=y[0],E=y[1],h=yt(function(j){var $=qn(f,j);($.key===null||$.key===void 0)&&($.key="rc-notification-".concat(rt),rt+=1),E(function(O){return[].concat(U(O),[{type:"open",config:$}])})}),T=r.useMemo(function(){return{open:h,close:function($){E(function(O){return[].concat(U(O),[{type:"close",key:$}])})},destroy:function(){E(function($){return[].concat(U($),[{type:"destroy"}])})}}},[]);return r.useEffect(function(){p(o())}),r.useEffect(function(){if(v.current&&S.length){S.forEach(function(O){switch(O.type){case"open":v.current.open(O.config);break;case"close":v.current.close(O.key);break;case"destroy":v.current.destroy();break}});var j,$;E(function(O){return(j!==O||!$)&&(j=O,$=O.filter(function(P){return!S.includes(P)})),$})}},[S]),[T,x]}const Gn=()=>{const[e,t]=r.useState([]),o=r.useCallback(n=>(t(a=>[].concat(U(a),[n])),()=>{t(a=>a.filter(s=>s!==n))}),[]);return[e,o]},Un=e=>{const{componentCls:t,iconCls:o,boxShadow:n,colorText:a,colorSuccess:s,colorError:d,colorWarning:i,colorInfo:l,fontSizeLG:u,motionEaseInOutCirc:c,motionDurationSlow:f,marginXS:m,paddingXS:g,borderRadiusLG:C,zIndexPopup:p,contentPadding:v,contentBg:x}=e,b=`${t}-notice`,y=new $e("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:g,transform:"translateY(0)",opacity:1}}),S=new $e("MessageMoveOut",{"0%":{maxHeight:e.height,padding:g,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),E={padding:g,textAlign:"center",[`${t}-custom-content`]:{display:"flex",alignItems:"center"},[`${t}-custom-content > ${o}`]:{marginInlineEnd:m,fontSize:u},[`${b}-content`]:{display:"inline-block",padding:v,background:x,borderRadius:C,boxShadow:n,pointerEvents:"all"},[`${t}-success > ${o}`]:{color:s},[`${t}-error > ${o}`]:{color:d},[`${t}-warning > ${o}`]:{color:i},[`${t}-info > ${o},
1
+ import{ac as sn,A as X,H as K,ad as we,E as qe,f as I,L as _e,M as De,ap as cn,y as bt,J as F,_ as U,aq as yt,g as Ve,m as Ge,K as $e,r as ht,ar as xt,l as ne,as as Re,at as dn,au as $t,av as St,aw as Ot,ax as un,ay as Ue,az as fn,aA as mn,B as Xe,aB as Et,z as gn,p as Nt,aC as vn,aD as Je,P as Cn,aE as pn,k as H,aF as Ke,u as bn,an as Ye,aG as Pt,aH as yn,$ as hn,U as xn,aI as $n,O as Sn,Q as et,V as On,W as En,X as Nn,Y as Pn,Z as je,al as wn,aJ as jn,aK as Ze,am as In,aL as wt,aM as jt,aN as Rn,aO as Mn}from"./index-antI2hFx.js";import*as r from"react";import N,{useContext as fe,useRef as ie,useState as tt,useEffect as Ie,useMemo as Tn}from"react";import{createPortal as kn}from"react-dom";var Bn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},Hn=function(t,o){return r.createElement(sn,X({},t,{ref:o,icon:Bn}))},It=r.forwardRef(Hn),Rt=r.forwardRef(function(e,t){var o=e.prefixCls,n=e.style,a=e.className,s=e.duration,d=s===void 0?4.5:s,i=e.showProgress,l=e.pauseOnHover,u=l===void 0?!0:l,c=e.eventKey,f=e.content,m=e.closable,g=e.closeIcon,C=g===void 0?"x":g,p=e.props,v=e.onClick,x=e.onNoticeClose,b=e.times,y=e.hovering,S=r.useState(!1),E=K(S,2),h=E[0],T=E[1],j=r.useState(0),$=K(j,2),O=$[0],P=$[1],B=r.useState(0),L=K(B,2),w=L[0],_=L[1],k=y||h,R=d>0&&i,D=function(){x(c)},Y=function(M){(M.key==="Enter"||M.code==="Enter"||M.keyCode===De.ENTER)&&D()};r.useEffect(function(){if(!k&&d>0){var q=Date.now()-w,M=setTimeout(function(){D()},d*1e3-w);return function(){u&&clearTimeout(M),_(Date.now()-q)}}},[d,k,b]),r.useEffect(function(){if(!k&&R&&(u||w===0)){var q=performance.now(),M,A=function le(){cancelAnimationFrame(M),M=requestAnimationFrame(function(ae){var J=ae+w-q,oe=Math.min(J/(d*1e3),1);P(oe*100),oe<1&&le()})};return A(),function(){u&&cancelAnimationFrame(M)}}},[d,w,k,R,b]);var Z=r.useMemo(function(){return we(m)==="object"&&m!==null?m:m?{closeIcon:C}:{}},[m,C]),Q=qe(Z,!0),W=100-(!O||O<0?0:O>100?100:O),V="".concat(o,"-notice");return r.createElement("div",X({},p,{ref:t,className:I(V,a,_e({},"".concat(V,"-closable"),m)),style:n,onMouseEnter:function(M){var A;T(!0),p==null||(A=p.onMouseEnter)===null||A===void 0||A.call(p,M)},onMouseLeave:function(M){var A;T(!1),p==null||(A=p.onMouseLeave)===null||A===void 0||A.call(p,M)},onClick:v}),r.createElement("div",{className:"".concat(V,"-content")},f),m&&r.createElement("a",X({tabIndex:0,className:"".concat(V,"-close"),onKeyDown:Y,"aria-label":"Close"},Q,{onClick:function(M){M.preventDefault(),M.stopPropagation(),D()}}),Z.closeIcon),R&&r.createElement("progress",{className:"".concat(V,"-progress"),max:"100",value:W},W+"%"))}),Mt=N.createContext({}),zn=function(t){var o=t.children,n=t.classNames;return N.createElement(Mt.Provider,{value:{classNames:n}},o)},nt=8,ot=3,at=16,Fn=function(t){var o={offset:nt,threshold:ot,gap:at};if(t&&we(t)==="object"){var n,a,s;o.offset=(n=t.offset)!==null&&n!==void 0?n:nt,o.threshold=(a=t.threshold)!==null&&a!==void 0?a:ot,o.gap=(s=t.gap)!==null&&s!==void 0?s:at}return[!!t,o]},An=["className","style","classNames","styles"],Ln=function(t){var o=t.configList,n=t.placement,a=t.prefixCls,s=t.className,d=t.style,i=t.motion,l=t.onAllNoticeRemoved,u=t.onNoticeClose,c=t.stack,f=fe(Mt),m=f.classNames,g=ie({}),C=tt(null),p=K(C,2),v=p[0],x=p[1],b=tt([]),y=K(b,2),S=y[0],E=y[1],h=o.map(function(k){return{config:k,key:String(k.key)}}),T=Fn(c),j=K(T,2),$=j[0],O=j[1],P=O.offset,B=O.threshold,L=O.gap,w=$&&(S.length>0||h.length<=B),_=typeof i=="function"?i(n):i;return Ie(function(){$&&S.length>1&&E(function(k){return k.filter(function(R){return h.some(function(D){var Y=D.key;return R===Y})})})},[S,h,$]),Ie(function(){var k;if($&&g.current[(k=h[h.length-1])===null||k===void 0?void 0:k.key]){var R;x(g.current[(R=h[h.length-1])===null||R===void 0?void 0:R.key])}},[h,$]),N.createElement(cn,X({key:n,className:I(a,"".concat(a,"-").concat(n),m==null?void 0:m.list,s,_e(_e({},"".concat(a,"-stack"),!!$),"".concat(a,"-stack-expanded"),w)),style:d,keys:h,motionAppear:!0},_,{onAllRemoved:function(){l(n)}}),function(k,R){var D=k.config,Y=k.className,Z=k.style,Q=k.index,W=D,V=W.key,q=W.times,M=String(V),A=D,le=A.className,ae=A.style,J=A.classNames,oe=A.styles,ye=bt(A,An),ce=h.findIndex(function(Pe){return Pe.key===M}),de={};if($){var se=h.length-1-(ce>-1?ce:Q-1),z=n==="top"||n==="bottom"?"-50%":"0";if(se>0){var ee,he,G;de.height=w?(ee=g.current[M])===null||ee===void 0?void 0:ee.offsetHeight:v==null?void 0:v.offsetHeight;for(var xe=0,ue=0;ue<se;ue++){var Be;xe+=((Be=g.current[h[h.length-1-ue].key])===null||Be===void 0?void 0:Be.offsetHeight)+L}var an=(w?xe:se*P)*(n.startsWith("top")?1:-1),rn=!w&&v!==null&&v!==void 0&&v.offsetWidth&&(he=g.current[M])!==null&&he!==void 0&&he.offsetWidth?((v==null?void 0:v.offsetWidth)-P*2*(se<3?se:3))/((G=g.current[M])===null||G===void 0?void 0:G.offsetWidth):1;de.transform="translate3d(".concat(z,", ").concat(an,"px, 0) scaleX(").concat(rn,")")}else de.transform="translate3d(".concat(z,", 0, 0)")}return N.createElement("div",{ref:R,className:I("".concat(a,"-notice-wrapper"),Y,J==null?void 0:J.wrapper),style:F(F(F({},Z),de),oe==null?void 0:oe.wrapper),onMouseEnter:function(){return E(function(me){return me.includes(M)?me:[].concat(U(me),[M])})},onMouseLeave:function(){return E(function(me){return me.filter(function(ln){return ln!==M})})}},N.createElement(Rt,X({},ye,{ref:function(me){ce>-1?g.current[M]=me:delete g.current[M]},prefixCls:a,classNames:J,styles:oe,className:I(le,m==null?void 0:m.notice),style:ae,times:q,key:V,eventKey:V,onNoticeClose:u,hovering:$&&S.length>0})))})},_n=r.forwardRef(function(e,t){var o=e.prefixCls,n=o===void 0?"rc-notification":o,a=e.container,s=e.motion,d=e.maxCount,i=e.className,l=e.style,u=e.onAllRemoved,c=e.stack,f=e.renderNotifications,m=r.useState([]),g=K(m,2),C=g[0],p=g[1],v=function($){var O,P=C.find(function(B){return B.key===$});P==null||(O=P.onClose)===null||O===void 0||O.call(P),p(function(B){return B.filter(function(L){return L.key!==$})})};r.useImperativeHandle(t,function(){return{open:function($){p(function(O){var P=U(O),B=P.findIndex(function(_){return _.key===$.key}),L=F({},$);if(B>=0){var w;L.times=(((w=O[B])===null||w===void 0?void 0:w.times)||0)+1,P[B]=L}else L.times=0,P.push(L);return d>0&&P.length>d&&(P=P.slice(-d)),P})},close:function($){v($)},destroy:function(){p([])}}});var x=r.useState({}),b=K(x,2),y=b[0],S=b[1];r.useEffect(function(){var j={};C.forEach(function($){var O=$.placement,P=O===void 0?"topRight":O;P&&(j[P]=j[P]||[],j[P].push($))}),Object.keys(y).forEach(function($){j[$]=j[$]||[]}),S(j)},[C]);var E=function($){S(function(O){var P=F({},O),B=P[$]||[];return B.length||delete P[$],P})},h=r.useRef(!1);if(r.useEffect(function(){Object.keys(y).length>0?h.current=!0:h.current&&(u==null||u(),h.current=!1)},[y]),!a)return null;var T=Object.keys(y);return kn(r.createElement(r.Fragment,null,T.map(function(j){var $=y[j],O=r.createElement(Ln,{key:j,configList:$,placement:j,prefixCls:n,className:i==null?void 0:i(j),style:l==null?void 0:l(j),motion:s,onNoticeClose:v,onAllNoticeRemoved:E,stack:c});return f?f(O,{prefixCls:n,key:j}):O})),a)}),Dn=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],Wn=function(){return document.body},rt=0;function qn(){for(var e={},t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return o.forEach(function(a){a&&Object.keys(a).forEach(function(s){var d=a[s];d!==void 0&&(e[s]=d)})}),e}function Vn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.getContainer,o=t===void 0?Wn:t,n=e.motion,a=e.prefixCls,s=e.maxCount,d=e.className,i=e.style,l=e.onAllRemoved,u=e.stack,c=e.renderNotifications,f=bt(e,Dn),m=r.useState(),g=K(m,2),C=g[0],p=g[1],v=r.useRef(),x=r.createElement(_n,{container:C,ref:v,prefixCls:a,motion:n,maxCount:s,className:d,style:i,onAllRemoved:l,stack:u,renderNotifications:c}),b=r.useState([]),y=K(b,2),S=y[0],E=y[1],h=yt(function(j){var $=qn(f,j);($.key===null||$.key===void 0)&&($.key="rc-notification-".concat(rt),rt+=1),E(function(O){return[].concat(U(O),[{type:"open",config:$}])})}),T=r.useMemo(function(){return{open:h,close:function($){E(function(O){return[].concat(U(O),[{type:"close",key:$}])})},destroy:function(){E(function($){return[].concat(U($),[{type:"destroy"}])})}}},[]);return r.useEffect(function(){p(o())}),r.useEffect(function(){if(v.current&&S.length){S.forEach(function(O){switch(O.type){case"open":v.current.open(O.config);break;case"close":v.current.close(O.key);break;case"destroy":v.current.destroy();break}});var j,$;E(function(O){return(j!==O||!$)&&(j=O,$=O.filter(function(P){return!S.includes(P)})),$})}},[S]),[T,x]}const Gn=()=>{const[e,t]=r.useState([]),o=r.useCallback(n=>(t(a=>[].concat(U(a),[n])),()=>{t(a=>a.filter(s=>s!==n))}),[]);return[e,o]},Un=e=>{const{componentCls:t,iconCls:o,boxShadow:n,colorText:a,colorSuccess:s,colorError:d,colorWarning:i,colorInfo:l,fontSizeLG:u,motionEaseInOutCirc:c,motionDurationSlow:f,marginXS:m,paddingXS:g,borderRadiusLG:C,zIndexPopup:p,contentPadding:v,contentBg:x}=e,b=`${t}-notice`,y=new $e("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:g,transform:"translateY(0)",opacity:1}}),S=new $e("MessageMoveOut",{"0%":{maxHeight:e.height,padding:g,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),E={padding:g,textAlign:"center",[`${t}-custom-content`]:{display:"flex",alignItems:"center"},[`${t}-custom-content > ${o}`]:{marginInlineEnd:m,fontSize:u},[`${b}-content`]:{display:"inline-block",padding:v,background:x,borderRadius:C,boxShadow:n,pointerEvents:"all"},[`${t}-success > ${o}`]:{color:s},[`${t}-error > ${o}`]:{color:d},[`${t}-warning > ${o}`]:{color:i},[`${t}-info > ${o},
2
2
  ${t}-loading > ${o}`]:{color:l}};return[{[t]:Object.assign(Object.assign({},ht(e)),{color:a,position:"fixed",top:m,width:"100%",pointerEvents:"none",zIndex:p,[`${t}-move-up`]:{animationFillMode:"forwards"},[`
3
3
  ${t}-move-up-appear,
4
4
  ${t}-move-up-enter