react-luminus-components 1.1.11 → 1.1.13
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/dist/.vite/manifest.json +86 -63
- package/dist/DataKey-C0-5Uwn-.cjs +1 -0
- package/dist/DataKey-SawjodF1.js +37 -0
- package/dist/SimpleTooltip-CLfGg88p.cjs +1 -0
- package/dist/{SimpleTooltip-DPtdCueR.mjs → SimpleTooltip-DV3SQ0iz.js} +2 -2
- package/dist/components/Buttons/ContextButton/ContextButton.d.ts +1 -1
- package/dist/components/Buttons/PrimaryButton/PrimaryButton.d.ts +1 -1
- package/dist/components/Dropdown/comps/SimpleToggle/SimpleToggle.d.ts +1 -1
- package/dist/components/HookForm/CheckInput/HookFormCheckInput.d.ts +1 -6
- package/dist/components/HookForm/DropdownPicker/HookFormDropdownPicker.d.ts +2 -5
- package/dist/components/HookForm/FileInput/HookFormFileInput.d.ts +15 -0
- package/dist/components/HookForm/FloatingSubmit/HookFormFloatingSubmit.d.ts +7 -0
- package/dist/components/HookForm/RadioInput/HookFormRadioInput.d.ts +1 -6
- package/dist/components/HookForm/SelectInput/HookFormSelectInput.d.ts +1 -6
- package/dist/components/HookForm/TextAreaInput/HookFormTextAreaInput.d.ts +1 -6
- package/dist/components/HookForm/TextInput/HookFormTextInput.d.ts +1 -6
- package/dist/components/HookForm/index.d.ts +2 -0
- package/dist/components/common/AppSearch/AppSearch.d.ts +3 -0
- package/dist/components/common/YearPicker/YearPicker.d.ts +9 -0
- package/dist/components/common/index.d.ts +2 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +45 -45
- package/dist/hasClass-C0uHVOLl.cjs +20 -0
- package/dist/{hasClass-B-cXdF16.mjs → hasClass-cZEMP5cn.js} +584 -555
- package/dist/hooks/useZodSchemaTypes/useZodSchemaTypes.d.ts +10 -0
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +357 -355
- package/dist/layout/FullScreenContainer/FullScreenContainer.d.ts +1 -1
- package/dist/layout/MainContainer/MainContainer.d.ts +1 -1
- package/dist/layout/PageTitle/PageTitle.d.ts +6 -0
- package/dist/layout/TopBar/TopBar.d.ts +3 -2
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +86 -78
- package/dist/main.cjs.js +1 -1
- package/dist/main.d.ts +3 -2
- package/dist/main.es.js +1645 -1479
- package/dist/models/prop-types/ContainerProps.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/textUtils-CDK5A52_.js +28 -0
- package/dist/textUtils-FVcup93t.cjs +1 -0
- package/dist/{SimplePicker.module-CfYkCM-_.mjs → useAxios-Co2Q-JSk.js} +683 -772
- package/dist/useAxios-DuhvBHuH.cjs +212 -0
- package/dist/useConfirm-5e6ff6zl.cjs +1 -0
- package/dist/{useConfirm-Bp6-YzrM.mjs → useConfirm-8RQF_FiV.js} +1 -1
- package/dist/utils/text/textUtils.d.ts +1 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +33 -32
- package/package.json +3 -1
- package/dist/DataKey-Cvr1Jyo1.mjs +0 -51
- package/dist/DataKey-SdbdzFMm.js +0 -1
- package/dist/SimplePicker.module-RQNGS1Wc.js +0 -212
- package/dist/SimpleTooltip-jdUmgMPW.js +0 -1
- package/dist/hasClass-DIKhTog9.js +0 -20
- package/dist/textUtils-9KFqOvA8.mjs +0 -27
- package/dist/textUtils-C0nqWp3S.js +0 -1
- package/dist/useConfirm-BhYmJh3b.js +0 -1
- /package/dist/{constants-CT2hnPeO.js → constants-CT2hnPeO.cjs} +0 -0
- /package/dist/{constants-CzNy5yO3.mjs → constants-CzNy5yO3.js} +0 -0
- /package/dist/{useClickOutside-BjJyGTec.mjs → useClickOutside-BjJyGTec.js} +0 -0
- /package/dist/{useClickOutside-DsVG12Cs.js → useClickOutside-DsVG12Cs.cjs} +0 -0
package/dist/contexts.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./SimplePicker.module-RQNGS1Wc.js"),l=require("react"),v=require("./DataKey-SdbdzFMm.js"),Fe=require("./useConfirm-BhYmJh3b.js"),a=require("./hasClass-DIKhTog9.js"),Ie=require("react-dom");function We(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,n.get?n:{enumerable:!0,get:()=>t[s]})}}return e.default=t,Object.freeze(e)}const h=We(l),$e=({children:t})=>{const[e,s]=l.useState(!1),[n,r]=l.useState(""),i=l.useCallback(g=>{s(!0),r(g)},[]),f=l.useCallback(()=>{s(!1)},[]),u=l.useMemo(()=>({show:e,text:n,showConfirm:i,hideConfirm:f}),[e,n,i,f]);return o.jsxRuntimeExports.jsxs(o.ConfirmContext.Provider,{value:u,children:[o.jsxRuntimeExports.jsx(ft,{}),t]})},Ue=({axiosInstance:t,LinkComponent:e,language:s,axiosTexts:n,confirmTexts:r,formValidationTexts:i,homeDashboardTexts:f,formSubmitTexts:u,children:g})=>{const x=l.useMemo(()=>({axiosInstance:t,LinkComponent:e,language:s,axiosTexts:n,confirmTexts:r,formValidationTexts:i,homeDashboardTexts:f,formSubmitTexts:u}),[t,e,s,n,r,i,f,u]);return o.jsxRuntimeExports.jsx(o.LuminusComponentsContext.Provider,{value:x,children:o.jsxRuntimeExports.jsxs($e,{children:[o.jsxRuntimeExports.jsx(o.Ie,{}),g]})})},Pe=({children:t})=>{const[e,s]=l.useState(!1),[n]=l.useState(new Set),r=l.useCallback(u=>{n.add(u),s(!0)},[n]),i=l.useCallback(u=>{n.delete(u),n.size===0&&s(!1)},[n]),f=l.useMemo(()=>({isLoading:e,startLoading:r,stopLoading:i}),[e,r,i]);return o.jsxRuntimeExports.jsxs(o.LoadingContext.Provider,{value:f,children:[e&&o.jsxRuntimeExports.jsx(v.Loading,{}),t]})},_e=({children:t})=>{const e=o.useAxios(),s=l.useCallback(()=>{const m=localStorage.getItem("user")??null;return m?JSON.parse(m):null},[]),[n,r]=l.useState(s()),i=l.useCallback(async()=>{let m=null;return await e.get("/user/detail").then(R=>{m=R.data}).catch(()=>{m=null}),localStorage.setItem("user",JSON.stringify(m)),m},[e]),f=l.useCallback(()=>{localStorage.removeItem("user")},[]),u=l.useCallback(async()=>{const m=await i();return m?(r(m),!0):!1},[i]),g=l.useCallback(()=>{f(),r(null)},[f]),x=l.useMemo(()=>({user:n,loginUser:u,logoutUser:g}),[n,u,g]);return l.useEffect(()=>{r(s())},[s]),o.jsxRuntimeExports.jsx(o.UserContext.Provider,{value:x,children:t})},He=t=>h.forwardRef((e,s)=>o.jsxRuntimeExports.jsx("div",{...e,ref:s,className:o.classNames(e.className,t)})),qe={"aria-label":a.PropTypes.string,onClick:a.PropTypes.func,variant:a.PropTypes.oneOf(["white"])},me=h.forwardRef(({className:t,variant:e,"aria-label":s="Close",...n},r)=>o.jsxRuntimeExports.jsx("button",{ref:r,type:"button",className:o.classNames("btn-close",e&&`btn-close-${e}`,t),"aria-label":s,...n}));me.displayName="CloseButton";me.propTypes=qe;const Ke=me;var J;function he(t){if((!J&&J!==0||t)&&a.canUseDOM){var e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e),J=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return J}function ce(t){t===void 0&&(t=a.ownerDocument());try{var e=t.activeElement;return!e||!e.nodeName?null:e}catch{return t.body}}function ze(t=document){const e=t.defaultView;return Math.abs(e.innerWidth-t.documentElement.clientWidth)}const xe=v.dataAttr("modal-open");class Ge{constructor({ownerDocument:e,handleContainerOverflow:s=!0,isRTL:n=!1}={}){this.handleContainerOverflow=s,this.isRTL=n,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return ze(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const s={overflow:"hidden"},n=this.isRTL?"paddingLeft":"paddingRight",r=this.getElement();e.style={overflow:r.style.overflow,[n]:r.style[n]},e.scrollBarWidth&&(s[n]=`${parseInt(a.style(r,n)||"0",10)+e.scrollBarWidth}px`),r.setAttribute(xe,""),a.style(r,s)}reset(){[...this.modals].forEach(e=>this.remove(e))}removeContainerStyle(e){const s=this.getElement();s.removeAttribute(xe),Object.assign(s.style,e.style)}add(e){let s=this.modals.indexOf(e);return s!==-1||(s=this.modals.length,this.modals.push(e),this.setModalAttributes(e),s!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),s}remove(e){const s=this.modals.indexOf(e);s!==-1&&(this.modals.splice(s,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}}const fe=Ge,Ve=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function Xe(t,e){if(t==null)return{};var s={},n=Object.keys(t),r,i;for(i=0;i<n.length;i++)r=n[i],!(e.indexOf(r)>=0)&&(s[r]=t[r]);return s}let de;function Ye(t){return de||(de=new fe({ownerDocument:t==null?void 0:t.document})),de}function Je(t){const e=a.useWindow(),s=t||Ye(e),n=l.useRef({dialog:null,backdrop:null});return Object.assign(n.current,{add:()=>s.add(n.current),remove:()=>s.remove(n.current),isTopModal:()=>s.isTopModal(n.current),setDialogRef:l.useCallback(r=>{n.current.dialog=r},[]),setBackdropRef:l.useCallback(r=>{n.current.backdrop=r},[])})}const Ce=l.forwardRef((t,e)=>{let{show:s=!1,role:n="dialog",className:r,style:i,children:f,backdrop:u=!0,keyboard:g=!0,onBackdropClick:x,onEscapeKeyDown:m,transition:R,runTransition:j,backdropTransition:M,runBackdropTransition:Q,autoFocus:U=!0,enforceFocus:Z=!0,restoreFocus:w=!0,restoreFocusOptions:ee,renderDialog:P,renderBackdrop:te=d=>o.jsxRuntimeExports.jsx("div",Object.assign({},d)),manager:se,container:ne,onShow:_,onHide:A=()=>{},onExit:oe,onExited:D,onExiting:H,onEnter:q,onEntering:K,onEntered:z}=t,re=Xe(t,Ve);const C=a.useWindow(),N=a.useWaitForDOMRef(ne),p=Je(se),ae=a.useMounted(),G=v.usePrevious(s),[b,T]=l.useState(!s),E=l.useRef(null);l.useImperativeHandle(e,()=>p,[p]),a.canUseDOM&&!G&&s&&(E.current=ce(C==null?void 0:C.document)),s&&b&&T(!1);const y=a.useEventCallback(()=>{if(p.add(),k.current=a.listen(document,"keydown",le),I.current=a.listen(document,"focus",()=>setTimeout(ie),!0),_&&_(),U){var d,Y;const $=ce((d=(Y=p.dialog)==null?void 0:Y.ownerDocument)!=null?d:C==null?void 0:C.document);p.dialog&&$&&!a.contains(p.dialog,$)&&(E.current=$,p.dialog.focus())}}),F=a.useEventCallback(()=>{if(p.remove(),k.current==null||k.current(),I.current==null||I.current(),w){var d;(d=E.current)==null||d.focus==null||d.focus(ee),E.current=null}});l.useEffect(()=>{!s||!N||y()},[s,N,y]),l.useEffect(()=>{b&&F()},[b,F]),a.useWillUnmount(()=>{F()});const ie=a.useEventCallback(()=>{if(!Z||!ae()||!p.isTopModal())return;const d=ce(C==null?void 0:C.document);p.dialog&&d&&!a.contains(p.dialog,d)&&p.dialog.focus()}),V=a.useEventCallback(d=>{d.target===d.currentTarget&&(x==null||x(d),u===!0&&A())}),le=a.useEventCallback(d=>{g&&a.isEscKey(d)&&p.isTopModal()&&(m==null||m(d),d.defaultPrevented||A())}),I=l.useRef(),k=l.useRef(),X=(...d)=>{T(!0),D==null||D(...d)};if(!N)return null;const S=Object.assign({role:n,ref:p.setDialogRef,"aria-modal":n==="dialog"?!0:void 0},re,{style:i,className:r,tabIndex:-1});let W=P?P(S):o.jsxRuntimeExports.jsx("div",Object.assign({},S,{children:h.cloneElement(f,{role:"document"})}));W=a.renderTransition(R,j,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!s,onExit:oe,onExiting:H,onExited:X,onEnter:q,onEntering:K,onEntered:z,children:W});let O=null;return u&&(O=te({ref:p.setBackdropRef,onClick:V}),O=a.renderTransition(M,Q,{in:!!s,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:O})),o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:Ie.createPortal(o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[O,W]}),N)})});Ce.displayName="Modal";const Qe=Object.assign(Ce,{Manager:fe});function Ze(t,e){t.classList?t.classList.add(e):a.hasClass(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function Ee(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function et(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=Ee(t.className,e):t.setAttribute("class",Ee(t.className&&t.className.baseVal||"",e))}const L={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class tt extends fe{adjustAndStore(e,s,n){const r=s.style[e];s.dataset[e]=r,a.style(s,{[e]:`${parseFloat(a.style(s,e))+n}px`})}restore(e,s){const n=s.dataset[e];n!==void 0&&(delete s.dataset[e],a.style(s,{[e]:n}))}setContainerStyle(e){super.setContainerStyle(e);const s=this.getElement();if(Ze(s,"modal-open"),!e.scrollBarWidth)return;const n=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";v.qsa(s,L.FIXED_CONTENT).forEach(i=>this.adjustAndStore(n,i,e.scrollBarWidth)),v.qsa(s,L.STICKY_CONTENT).forEach(i=>this.adjustAndStore(r,i,-e.scrollBarWidth)),v.qsa(s,L.NAVBAR_TOGGLER).forEach(i=>this.adjustAndStore(r,i,e.scrollBarWidth))}removeContainerStyle(e){super.removeContainerStyle(e);const s=this.getElement();et(s,"modal-open");const n=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";v.qsa(s,L.FIXED_CONTENT).forEach(i=>this.restore(n,i)),v.qsa(s,L.STICKY_CONTENT).forEach(i=>this.restore(r,i)),v.qsa(s,L.NAVBAR_TOGGLER).forEach(i=>this.restore(r,i))}}let ue;function st(t){return ue||(ue=new tt(t)),ue}const ye=h.forwardRef(({className:t,bsPrefix:e,as:s="div",...n},r)=>(e=a.useBootstrapPrefix(e,"modal-body"),o.jsxRuntimeExports.jsx(s,{ref:r,className:o.classNames(t,e),...n})));ye.displayName="ModalBody";const nt=ye,ot=h.createContext({onHide(){}}),Re=ot,je=h.forwardRef(({bsPrefix:t,className:e,contentClassName:s,centered:n,size:r,fullscreen:i,children:f,scrollable:u,...g},x)=>{t=a.useBootstrapPrefix(t,"modal");const m=`${t}-dialog`,R=typeof i=="string"?`${t}-fullscreen-${i}`:`${t}-fullscreen`;return o.jsxRuntimeExports.jsx("div",{...g,ref:x,className:o.classNames(m,e,r&&`${t}-${r}`,n&&`${m}-centered`,u&&`${m}-scrollable`,i&&R),children:o.jsxRuntimeExports.jsx("div",{className:o.classNames(`${t}-content`,s),children:f})})});je.displayName="ModalDialog";const be=je,Me=h.forwardRef(({className:t,bsPrefix:e,as:s="div",...n},r)=>(e=a.useBootstrapPrefix(e,"modal-footer"),o.jsxRuntimeExports.jsx(s,{ref:r,className:o.classNames(t,e),...n})));Me.displayName="ModalFooter";const rt=Me,at=h.forwardRef(({closeLabel:t="Close",closeVariant:e,closeButton:s=!1,onHide:n,children:r,...i},f)=>{const u=l.useContext(Re),g=a.useEventCallback(()=>{u==null||u.onHide(),n==null||n()});return o.jsxRuntimeExports.jsxs("div",{ref:f,...i,children:[r,s&&o.jsxRuntimeExports.jsx(Ke,{"aria-label":t,variant:e,onClick:g})]})}),it=at,we=h.forwardRef(({bsPrefix:t,className:e,closeLabel:s="Close",closeButton:n=!1,...r},i)=>(t=a.useBootstrapPrefix(t,"modal-header"),o.jsxRuntimeExports.jsx(it,{ref:i,...r,className:o.classNames(e,t),closeLabel:s,closeButton:n})));we.displayName="ModalHeader";const lt=we,ct=He("h4"),Ne=h.forwardRef(({className:t,bsPrefix:e,as:s=ct,...n},r)=>(e=a.useBootstrapPrefix(e,"modal-title"),o.jsxRuntimeExports.jsx(s,{ref:r,className:o.classNames(t,e),...n})));Ne.displayName="ModalTitle";const dt=Ne;function ut(t){return o.jsxRuntimeExports.jsx(a.Fade,{...t,timeout:null})}function mt(t){return o.jsxRuntimeExports.jsx(a.Fade,{...t,timeout:null})}const Te=h.forwardRef(({bsPrefix:t,className:e,style:s,dialogClassName:n,contentClassName:r,children:i,dialogAs:f=be,"data-bs-theme":u,"aria-labelledby":g,"aria-describedby":x,"aria-label":m,show:R=!1,animation:j=!0,backdrop:M=!0,keyboard:Q=!0,onEscapeKeyDown:U,onShow:Z,onHide:w,container:ee,autoFocus:P=!0,enforceFocus:te=!0,restoreFocus:se=!0,restoreFocusOptions:ne,onEntered:_,onExit:A,onExiting:oe,onEnter:D,onEntering:H,onExited:q,backdropClassName:K,manager:z,...re},C)=>{const[N,p]=l.useState({}),[ae,G]=l.useState(!1),b=l.useRef(!1),T=l.useRef(!1),E=l.useRef(null),[y,F]=a.useCallbackRef(),ie=a.useMergedRefs(C,F),V=a.useEventCallback(w),le=a.useIsRTL();t=a.useBootstrapPrefix(t,"modal");const I=l.useMemo(()=>({onHide:V}),[V]);function k(){return z||st({isRTL:le})}function X(c){if(!a.canUseDOM)return;const B=k().getScrollbarWidth()>0,ge=c.scrollHeight>a.ownerDocument(c).documentElement.clientHeight;p({paddingRight:B&&!ge?he():void 0,paddingLeft:!B&&ge?he():void 0})}const S=a.useEventCallback(()=>{y&&X(y.dialog)});a.useWillUnmount(()=>{a.removeEventListener(window,"resize",S),E.current==null||E.current()});const W=()=>{b.current=!0},O=c=>{b.current&&y&&c.target===y.dialog&&(T.current=!0),b.current=!1},d=()=>{G(!0),E.current=a.transitionEnd(y.dialog,()=>{G(!1)})},Y=c=>{c.target===c.currentTarget&&d()},$=c=>{if(M==="static"){Y(c);return}if(T.current||c.target!==c.currentTarget){T.current=!1;return}w==null||w()},ke=c=>{Q?U==null||U(c):(c.preventDefault(),M==="static"&&d())},Se=(c,B)=>{c&&X(c),D==null||D(c,B)},Oe=c=>{E.current==null||E.current(),A==null||A(c)},Be=(c,B)=>{H==null||H(c,B),a.addEventListener(window,"resize",S)},Le=c=>{c&&(c.style.display=""),q==null||q(c),a.removeEventListener(window,"resize",S)},Ae=l.useCallback(c=>o.jsxRuntimeExports.jsx("div",{...c,className:o.classNames(`${t}-backdrop`,K,!j&&"show")}),[j,K,t]),pe={...s,...N};pe.display="block";const De=c=>o.jsxRuntimeExports.jsx("div",{role:"dialog",...c,style:pe,className:o.classNames(e,t,ae&&`${t}-static`,!j&&"show"),onClick:M?$:void 0,onMouseUp:O,"data-bs-theme":u,"aria-label":m,"aria-labelledby":g,"aria-describedby":x,children:o.jsxRuntimeExports.jsx(f,{...re,onMouseDown:W,className:n,contentClassName:r,children:i})});return o.jsxRuntimeExports.jsx(Re.Provider,{value:I,children:o.jsxRuntimeExports.jsx(Qe,{show:R,ref:ie,backdrop:M,container:ee,keyboard:!0,autoFocus:P,enforceFocus:te,restoreFocus:se,restoreFocusOptions:ne,onEscapeKeyDown:ke,onShow:Z,onHide:w,onEnter:Se,onEntering:Be,onEntered:_,onExit:Oe,onExiting:oe,onExited:Le,manager:k(),transition:j?ut:void 0,backdropTransition:j?mt:void 0,renderBackdrop:Ae,renderDialog:De})})});Te.displayName="Modal";const ve=Object.assign(Te,{Body:nt,Header:lt,Title:dt,Footer:rt,Dialog:be,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),ft=()=>{const{confirmTexts:t}=l.useContext(o.LuminusComponentsContext),{onConfirm:e,onCancel:s,text:n,show:r}=Fe.useConfirm();return o.jsxRuntimeExports.jsx(ve,{show:r,size:"sm",centered:!0,onHide:s,children:o.jsxRuntimeExports.jsxs(ve.Body,{children:[o.jsxRuntimeExports.jsx("div",{className:"mb-5 text-center",children:o.jsxRuntimeExports.jsx(v.Typography,{variant:"h6",children:n})}),o.jsxRuntimeExports.jsxs("div",{className:"w-100 d-flex gap-5",children:[o.jsxRuntimeExports.jsx("button",{type:"button",className:"btn btn-secondary w-100",onClick:s,children:t.no}),o.jsxRuntimeExports.jsx("button",{type:"button",className:"btn btn-primary w-100 ml",onClick:e,children:t.yes})]})]})})};exports.LoadingContext=o.LoadingContext;exports.LuminusComponentsContext=o.LuminusComponentsContext;exports.UserContext=o.UserContext;exports.LoadingProvider=Pe;exports.LuminusComponentsProvider=Ue;exports.UserProvider=_e;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./useAxios-DuhvBHuH.cjs"),l=require("react"),a=require("./hasClass-C0uHVOLl.cjs"),Fe=require("./useConfirm-5e6ff6zl.cjs"),v=require("./DataKey-C0-5Uwn-.cjs"),Ie=require("react-dom");function We(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,n.get?n:{enumerable:!0,get:()=>t[s]})}}return e.default=t,Object.freeze(e)}const h=We(l),$e=({children:t})=>{const[e,s]=l.useState(!1),[n,r]=l.useState(""),i=l.useCallback(g=>{s(!0),r(g)},[]),f=l.useCallback(()=>{s(!1)},[]),u=l.useMemo(()=>({show:e,text:n,showConfirm:i,hideConfirm:f}),[e,n,i,f]);return o.jsxRuntimeExports.jsxs(o.ConfirmContext.Provider,{value:u,children:[o.jsxRuntimeExports.jsx(ft,{}),t]})},Ue=({axiosInstance:t,LinkComponent:e,language:s,axiosTexts:n,confirmTexts:r,formValidationTexts:i,homeDashboardTexts:f,formSubmitTexts:u,children:g})=>{const x=l.useMemo(()=>({axiosInstance:t,LinkComponent:e,language:s,axiosTexts:n,confirmTexts:r,formValidationTexts:i,homeDashboardTexts:f,formSubmitTexts:u}),[t,e,s,n,r,i,f,u]);return o.jsxRuntimeExports.jsx(o.LuminusComponentsContext.Provider,{value:x,children:o.jsxRuntimeExports.jsxs($e,{children:[o.jsxRuntimeExports.jsx(o.Ie,{}),g]})})},Pe=({children:t})=>{const[e,s]=l.useState(!1),[n]=l.useState(new Set),r=l.useCallback(u=>{n.add(u),s(!0)},[n]),i=l.useCallback(u=>{n.delete(u),n.size===0&&s(!1)},[n]),f=l.useMemo(()=>({isLoading:e,startLoading:r,stopLoading:i}),[e,r,i]);return o.jsxRuntimeExports.jsxs(o.LoadingContext.Provider,{value:f,children:[e&&o.jsxRuntimeExports.jsx(v.Loading,{}),t]})},He=({children:t})=>{const e=o.useAxios(),s=l.useCallback(()=>{const m=localStorage.getItem("user")??null;return m?JSON.parse(m):null},[]),[n,r]=l.useState(s()),i=l.useCallback(async()=>{let m=null;return await e.get("/user/detail").then(R=>{m=R.data}).catch(()=>{m=null}),localStorage.setItem("user",JSON.stringify(m)),m},[e]),f=l.useCallback(()=>{localStorage.removeItem("user")},[]),u=l.useCallback(async()=>{const m=await i();return m?(r(m),!0):!1},[i]),g=l.useCallback(()=>{f(),r(null)},[f]),x=l.useMemo(()=>({user:n,loginUser:u,logoutUser:g}),[n,u,g]);return l.useEffect(()=>{r(s())},[s]),o.jsxRuntimeExports.jsx(o.UserContext.Provider,{value:x,children:t})},_e=t=>h.forwardRef((e,s)=>o.jsxRuntimeExports.jsx("div",{...e,ref:s,className:o.classNames(e.className,t)})),qe={"aria-label":a.PropTypes.string,onClick:a.PropTypes.func,variant:a.PropTypes.oneOf(["white"])},me=h.forwardRef(({className:t,variant:e,"aria-label":s="Close",...n},r)=>o.jsxRuntimeExports.jsx("button",{ref:r,type:"button",className:o.classNames("btn-close",e&&`btn-close-${e}`,t),"aria-label":s,...n}));me.displayName="CloseButton";me.propTypes=qe;const Ke=me;var J;function he(t){if((!J&&J!==0||t)&&a.canUseDOM){var e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e),J=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return J}function ce(t){t===void 0&&(t=a.ownerDocument());try{var e=t.activeElement;return!e||!e.nodeName?null:e}catch{return t.body}}function ze(t=document){const e=t.defaultView;return Math.abs(e.innerWidth-t.documentElement.clientWidth)}const xe=v.dataAttr("modal-open");class Ge{constructor({ownerDocument:e,handleContainerOverflow:s=!0,isRTL:n=!1}={}){this.handleContainerOverflow=s,this.isRTL=n,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return ze(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const s={overflow:"hidden"},n=this.isRTL?"paddingLeft":"paddingRight",r=this.getElement();e.style={overflow:r.style.overflow,[n]:r.style[n]},e.scrollBarWidth&&(s[n]=`${parseInt(a.style(r,n)||"0",10)+e.scrollBarWidth}px`),r.setAttribute(xe,""),a.style(r,s)}reset(){[...this.modals].forEach(e=>this.remove(e))}removeContainerStyle(e){const s=this.getElement();s.removeAttribute(xe),Object.assign(s.style,e.style)}add(e){let s=this.modals.indexOf(e);return s!==-1||(s=this.modals.length,this.modals.push(e),this.setModalAttributes(e),s!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),s}remove(e){const s=this.modals.indexOf(e);s!==-1&&(this.modals.splice(s,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}}const fe=Ge,Ve=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function Xe(t,e){if(t==null)return{};var s={},n=Object.keys(t),r,i;for(i=0;i<n.length;i++)r=n[i],!(e.indexOf(r)>=0)&&(s[r]=t[r]);return s}let de;function Ye(t){return de||(de=new fe({ownerDocument:t==null?void 0:t.document})),de}function Je(t){const e=a.useWindow(),s=t||Ye(e),n=l.useRef({dialog:null,backdrop:null});return Object.assign(n.current,{add:()=>s.add(n.current),remove:()=>s.remove(n.current),isTopModal:()=>s.isTopModal(n.current),setDialogRef:l.useCallback(r=>{n.current.dialog=r},[]),setBackdropRef:l.useCallback(r=>{n.current.backdrop=r},[])})}const Ce=l.forwardRef((t,e)=>{let{show:s=!1,role:n="dialog",className:r,style:i,children:f,backdrop:u=!0,keyboard:g=!0,onBackdropClick:x,onEscapeKeyDown:m,transition:R,runTransition:j,backdropTransition:M,runBackdropTransition:Q,autoFocus:U=!0,enforceFocus:Z=!0,restoreFocus:w=!0,restoreFocusOptions:ee,renderDialog:P,renderBackdrop:te=d=>o.jsxRuntimeExports.jsx("div",Object.assign({},d)),manager:se,container:ne,onShow:H,onHide:A=()=>{},onExit:oe,onExited:D,onExiting:_,onEnter:q,onEntering:K,onEntered:z}=t,re=Xe(t,Ve);const C=a.useWindow(),N=a.useWaitForDOMRef(ne),p=Je(se),ae=a.useMounted(),G=v.usePrevious(s),[b,T]=l.useState(!s),E=l.useRef(null);l.useImperativeHandle(e,()=>p,[p]),a.canUseDOM&&!G&&s&&(E.current=ce(C==null?void 0:C.document)),s&&b&&T(!1);const y=a.useEventCallback(()=>{if(p.add(),k.current=a.listen(document,"keydown",le),I.current=a.listen(document,"focus",()=>setTimeout(ie),!0),H&&H(),U){var d,Y;const $=ce((d=(Y=p.dialog)==null?void 0:Y.ownerDocument)!=null?d:C==null?void 0:C.document);p.dialog&&$&&!a.contains(p.dialog,$)&&(E.current=$,p.dialog.focus())}}),F=a.useEventCallback(()=>{if(p.remove(),k.current==null||k.current(),I.current==null||I.current(),w){var d;(d=E.current)==null||d.focus==null||d.focus(ee),E.current=null}});l.useEffect(()=>{!s||!N||y()},[s,N,y]),l.useEffect(()=>{b&&F()},[b,F]),a.useWillUnmount(()=>{F()});const ie=a.useEventCallback(()=>{if(!Z||!ae()||!p.isTopModal())return;const d=ce(C==null?void 0:C.document);p.dialog&&d&&!a.contains(p.dialog,d)&&p.dialog.focus()}),V=a.useEventCallback(d=>{d.target===d.currentTarget&&(x==null||x(d),u===!0&&A())}),le=a.useEventCallback(d=>{g&&a.isEscKey(d)&&p.isTopModal()&&(m==null||m(d),d.defaultPrevented||A())}),I=l.useRef(),k=l.useRef(),X=(...d)=>{T(!0),D==null||D(...d)};if(!N)return null;const S=Object.assign({role:n,ref:p.setDialogRef,"aria-modal":n==="dialog"?!0:void 0},re,{style:i,className:r,tabIndex:-1});let W=P?P(S):o.jsxRuntimeExports.jsx("div",Object.assign({},S,{children:h.cloneElement(f,{role:"document"})}));W=a.renderTransition(R,j,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!s,onExit:oe,onExiting:_,onExited:X,onEnter:q,onEntering:K,onEntered:z,children:W});let O=null;return u&&(O=te({ref:p.setBackdropRef,onClick:V}),O=a.renderTransition(M,Q,{in:!!s,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:O})),o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:Ie.createPortal(o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[O,W]}),N)})});Ce.displayName="Modal";const Qe=Object.assign(Ce,{Manager:fe});function Ze(t,e){t.classList?t.classList.add(e):a.hasClass(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function Ee(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function et(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=Ee(t.className,e):t.setAttribute("class",Ee(t.className&&t.className.baseVal||"",e))}const L={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class tt extends fe{adjustAndStore(e,s,n){const r=s.style[e];s.dataset[e]=r,a.style(s,{[e]:`${parseFloat(a.style(s,e))+n}px`})}restore(e,s){const n=s.dataset[e];n!==void 0&&(delete s.dataset[e],a.style(s,{[e]:n}))}setContainerStyle(e){super.setContainerStyle(e);const s=this.getElement();if(Ze(s,"modal-open"),!e.scrollBarWidth)return;const n=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";v.qsa(s,L.FIXED_CONTENT).forEach(i=>this.adjustAndStore(n,i,e.scrollBarWidth)),v.qsa(s,L.STICKY_CONTENT).forEach(i=>this.adjustAndStore(r,i,-e.scrollBarWidth)),v.qsa(s,L.NAVBAR_TOGGLER).forEach(i=>this.adjustAndStore(r,i,e.scrollBarWidth))}removeContainerStyle(e){super.removeContainerStyle(e);const s=this.getElement();et(s,"modal-open");const n=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";v.qsa(s,L.FIXED_CONTENT).forEach(i=>this.restore(n,i)),v.qsa(s,L.STICKY_CONTENT).forEach(i=>this.restore(r,i)),v.qsa(s,L.NAVBAR_TOGGLER).forEach(i=>this.restore(r,i))}}let ue;function st(t){return ue||(ue=new tt(t)),ue}const ye=h.forwardRef(({className:t,bsPrefix:e,as:s="div",...n},r)=>(e=a.useBootstrapPrefix(e,"modal-body"),o.jsxRuntimeExports.jsx(s,{ref:r,className:o.classNames(t,e),...n})));ye.displayName="ModalBody";const nt=ye,ot=h.createContext({onHide(){}}),Re=ot,je=h.forwardRef(({bsPrefix:t,className:e,contentClassName:s,centered:n,size:r,fullscreen:i,children:f,scrollable:u,...g},x)=>{t=a.useBootstrapPrefix(t,"modal");const m=`${t}-dialog`,R=typeof i=="string"?`${t}-fullscreen-${i}`:`${t}-fullscreen`;return o.jsxRuntimeExports.jsx("div",{...g,ref:x,className:o.classNames(m,e,r&&`${t}-${r}`,n&&`${m}-centered`,u&&`${m}-scrollable`,i&&R),children:o.jsxRuntimeExports.jsx("div",{className:o.classNames(`${t}-content`,s),children:f})})});je.displayName="ModalDialog";const be=je,Me=h.forwardRef(({className:t,bsPrefix:e,as:s="div",...n},r)=>(e=a.useBootstrapPrefix(e,"modal-footer"),o.jsxRuntimeExports.jsx(s,{ref:r,className:o.classNames(t,e),...n})));Me.displayName="ModalFooter";const rt=Me,at=h.forwardRef(({closeLabel:t="Close",closeVariant:e,closeButton:s=!1,onHide:n,children:r,...i},f)=>{const u=l.useContext(Re),g=a.useEventCallback(()=>{u==null||u.onHide(),n==null||n()});return o.jsxRuntimeExports.jsxs("div",{ref:f,...i,children:[r,s&&o.jsxRuntimeExports.jsx(Ke,{"aria-label":t,variant:e,onClick:g})]})}),it=at,we=h.forwardRef(({bsPrefix:t,className:e,closeLabel:s="Close",closeButton:n=!1,...r},i)=>(t=a.useBootstrapPrefix(t,"modal-header"),o.jsxRuntimeExports.jsx(it,{ref:i,...r,className:o.classNames(e,t),closeLabel:s,closeButton:n})));we.displayName="ModalHeader";const lt=we,ct=_e("h4"),Ne=h.forwardRef(({className:t,bsPrefix:e,as:s=ct,...n},r)=>(e=a.useBootstrapPrefix(e,"modal-title"),o.jsxRuntimeExports.jsx(s,{ref:r,className:o.classNames(t,e),...n})));Ne.displayName="ModalTitle";const dt=Ne;function ut(t){return o.jsxRuntimeExports.jsx(a.Fade,{...t,timeout:null})}function mt(t){return o.jsxRuntimeExports.jsx(a.Fade,{...t,timeout:null})}const Te=h.forwardRef(({bsPrefix:t,className:e,style:s,dialogClassName:n,contentClassName:r,children:i,dialogAs:f=be,"data-bs-theme":u,"aria-labelledby":g,"aria-describedby":x,"aria-label":m,show:R=!1,animation:j=!0,backdrop:M=!0,keyboard:Q=!0,onEscapeKeyDown:U,onShow:Z,onHide:w,container:ee,autoFocus:P=!0,enforceFocus:te=!0,restoreFocus:se=!0,restoreFocusOptions:ne,onEntered:H,onExit:A,onExiting:oe,onEnter:D,onEntering:_,onExited:q,backdropClassName:K,manager:z,...re},C)=>{const[N,p]=l.useState({}),[ae,G]=l.useState(!1),b=l.useRef(!1),T=l.useRef(!1),E=l.useRef(null),[y,F]=a.useCallbackRef(),ie=a.useMergedRefs(C,F),V=a.useEventCallback(w),le=a.useIsRTL();t=a.useBootstrapPrefix(t,"modal");const I=l.useMemo(()=>({onHide:V}),[V]);function k(){return z||st({isRTL:le})}function X(c){if(!a.canUseDOM)return;const B=k().getScrollbarWidth()>0,ge=c.scrollHeight>a.ownerDocument(c).documentElement.clientHeight;p({paddingRight:B&&!ge?he():void 0,paddingLeft:!B&&ge?he():void 0})}const S=a.useEventCallback(()=>{y&&X(y.dialog)});a.useWillUnmount(()=>{a.removeEventListener(window,"resize",S),E.current==null||E.current()});const W=()=>{b.current=!0},O=c=>{b.current&&y&&c.target===y.dialog&&(T.current=!0),b.current=!1},d=()=>{G(!0),E.current=a.transitionEnd(y.dialog,()=>{G(!1)})},Y=c=>{c.target===c.currentTarget&&d()},$=c=>{if(M==="static"){Y(c);return}if(T.current||c.target!==c.currentTarget){T.current=!1;return}w==null||w()},ke=c=>{Q?U==null||U(c):(c.preventDefault(),M==="static"&&d())},Se=(c,B)=>{c&&X(c),D==null||D(c,B)},Oe=c=>{E.current==null||E.current(),A==null||A(c)},Be=(c,B)=>{_==null||_(c,B),a.addEventListener(window,"resize",S)},Le=c=>{c&&(c.style.display=""),q==null||q(c),a.removeEventListener(window,"resize",S)},Ae=l.useCallback(c=>o.jsxRuntimeExports.jsx("div",{...c,className:o.classNames(`${t}-backdrop`,K,!j&&"show")}),[j,K,t]),pe={...s,...N};pe.display="block";const De=c=>o.jsxRuntimeExports.jsx("div",{role:"dialog",...c,style:pe,className:o.classNames(e,t,ae&&`${t}-static`,!j&&"show"),onClick:M?$:void 0,onMouseUp:O,"data-bs-theme":u,"aria-label":m,"aria-labelledby":g,"aria-describedby":x,children:o.jsxRuntimeExports.jsx(f,{...re,onMouseDown:W,className:n,contentClassName:r,children:i})});return o.jsxRuntimeExports.jsx(Re.Provider,{value:I,children:o.jsxRuntimeExports.jsx(Qe,{show:R,ref:ie,backdrop:M,container:ee,keyboard:!0,autoFocus:P,enforceFocus:te,restoreFocus:se,restoreFocusOptions:ne,onEscapeKeyDown:ke,onShow:Z,onHide:w,onEnter:Se,onEntering:Be,onEntered:H,onExit:Oe,onExiting:oe,onExited:Le,manager:k(),transition:j?ut:void 0,backdropTransition:j?mt:void 0,renderBackdrop:Ae,renderDialog:De})})});Te.displayName="Modal";const ve=Object.assign(Te,{Body:nt,Header:lt,Title:dt,Footer:rt,Dialog:be,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),ft=()=>{const{confirmTexts:t}=l.useContext(o.LuminusComponentsContext),{onConfirm:e,onCancel:s,text:n,show:r}=Fe.useConfirm();return o.jsxRuntimeExports.jsx(ve,{show:r,size:"sm",centered:!0,onHide:s,children:o.jsxRuntimeExports.jsxs(ve.Body,{children:[o.jsxRuntimeExports.jsx("div",{className:"mb-5 text-center",children:o.jsxRuntimeExports.jsx(a.Typography,{variant:"h6",children:n})}),o.jsxRuntimeExports.jsxs("div",{className:"w-100 d-flex gap-5",children:[o.jsxRuntimeExports.jsx("button",{type:"button",className:"btn btn-secondary w-100",onClick:s,children:t.no}),o.jsxRuntimeExports.jsx("button",{type:"button",className:"btn btn-primary w-100 ml",onClick:e,children:t.yes})]})]})})};exports.LoadingContext=o.LoadingContext;exports.LuminusComponentsContext=o.LuminusComponentsContext;exports.UserContext=o.UserContext;exports.LoadingProvider=Pe;exports.LuminusComponentsProvider=Ue;exports.UserProvider=He;
|
package/dist/contexts.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { j as a, C as tt, L as Ae, I as ot,
|
|
2
|
-
import * as
|
|
3
|
-
import { useState as M, useCallback as
|
|
4
|
-
import {
|
|
5
|
-
import { u as
|
|
6
|
-
import {
|
|
1
|
+
import { j as a, C as tt, L as Ae, I as ot, e as nt, b as st, U as rt, d as y } from "./useAxios-Co2Q-JSk.js";
|
|
2
|
+
import * as g from "react";
|
|
3
|
+
import { useState as M, useCallback as m, useMemo as G, useEffect as Ce, forwardRef as at, useRef as N, useImperativeHandle as it, useContext as Le } from "react";
|
|
4
|
+
import { P as ge, c as Ee, o as De, s as z, u as Fe, a as lt, b as dt, d as w, l as Te, e as Ne, f as Ie, i as ct, r as Re, h as ut, g as I, j as ft, k as ht, m as mt, n as je, F as $e, p as gt, t as pt, T as vt } from "./hasClass-cZEMP5cn.js";
|
|
5
|
+
import { u as yt } from "./useConfirm-8RQF_FiV.js";
|
|
6
|
+
import { L as Ct, d as Et, u as wt, q as D } from "./DataKey-SawjodF1.js";
|
|
7
7
|
import Mt from "react-dom";
|
|
8
8
|
const xt = ({ children: t }) => {
|
|
9
|
-
const [e, o] = M(!1), [n, s] = M(""), r =
|
|
9
|
+
const [e, o] = M(!1), [n, s] = M(""), r = m((h) => {
|
|
10
10
|
o(!0), s(h);
|
|
11
|
-
}, []), u =
|
|
11
|
+
}, []), u = m(() => {
|
|
12
12
|
o(!1);
|
|
13
13
|
}, []), d = G(() => ({ show: e, text: n, showConfirm: r, hideConfirm: u }), [e, n, r, u]);
|
|
14
14
|
return /* @__PURE__ */ a.jsxs(tt.Provider, { value: d, children: [
|
|
@@ -40,53 +40,53 @@ const xt = ({ children: t }) => {
|
|
|
40
40
|
h
|
|
41
41
|
] }) });
|
|
42
42
|
}, oo = ({ children: t }) => {
|
|
43
|
-
const [e, o] = M(!1), [n] = M(/* @__PURE__ */ new Set()), s =
|
|
43
|
+
const [e, o] = M(!1), [n] = M(/* @__PURE__ */ new Set()), s = m((d) => {
|
|
44
44
|
n.add(d), o(!0);
|
|
45
|
-
}, [n]), r =
|
|
45
|
+
}, [n]), r = m((d) => {
|
|
46
46
|
n.delete(d), n.size === 0 && o(!1);
|
|
47
47
|
}, [n]), u = G(() => ({ isLoading: e, startLoading: s, stopLoading: r }), [e, s, r]);
|
|
48
48
|
return /* @__PURE__ */ a.jsxs(nt.Provider, { value: u, children: [
|
|
49
|
-
e && /* @__PURE__ */ a.jsx(
|
|
49
|
+
e && /* @__PURE__ */ a.jsx(Ct, {}),
|
|
50
50
|
t
|
|
51
51
|
] });
|
|
52
52
|
}, no = ({ children: t }) => {
|
|
53
|
-
const e = st(), o =
|
|
53
|
+
const e = st(), o = m(() => {
|
|
54
54
|
const c = localStorage.getItem("user") ?? null;
|
|
55
55
|
return c ? JSON.parse(c) : null;
|
|
56
|
-
}, []), [n, s] = M(o()), r =
|
|
56
|
+
}, []), [n, s] = M(o()), r = m(async () => {
|
|
57
57
|
let c = null;
|
|
58
58
|
return await e.get("/user/detail").then((x) => {
|
|
59
59
|
c = x.data;
|
|
60
60
|
}).catch(() => {
|
|
61
61
|
c = null;
|
|
62
62
|
}), localStorage.setItem("user", JSON.stringify(c)), c;
|
|
63
|
-
}, [e]), u =
|
|
63
|
+
}, [e]), u = m(() => {
|
|
64
64
|
localStorage.removeItem("user");
|
|
65
|
-
}, []), d =
|
|
65
|
+
}, []), d = m(async () => {
|
|
66
66
|
const c = await r();
|
|
67
67
|
return c ? (s(c), !0) : !1;
|
|
68
|
-
}, [r]), h =
|
|
68
|
+
}, [r]), h = m(() => {
|
|
69
69
|
u(), s(null);
|
|
70
70
|
}, [u]), p = G(() => ({ user: n, loginUser: d, logoutUser: h }), [n, d, h]);
|
|
71
71
|
return Ce(() => {
|
|
72
72
|
s(o());
|
|
73
73
|
}, [o]), /* @__PURE__ */ a.jsx(rt.Provider, { value: p, children: t });
|
|
74
|
-
}, bt = (t) => /* @__PURE__ */
|
|
74
|
+
}, bt = (t) => /* @__PURE__ */ g.forwardRef((e, o) => /* @__PURE__ */ a.jsx("div", {
|
|
75
75
|
...e,
|
|
76
76
|
ref: o,
|
|
77
77
|
className: y(e.className, t)
|
|
78
78
|
})), Tt = {
|
|
79
79
|
/** An accessible label indicating the relevant information about the Close Button. */
|
|
80
|
-
"aria-label":
|
|
80
|
+
"aria-label": ge.string,
|
|
81
81
|
/** A callback fired after the Close Button is clicked. */
|
|
82
|
-
onClick:
|
|
82
|
+
onClick: ge.func,
|
|
83
83
|
/**
|
|
84
84
|
* Render different color variant for the button.
|
|
85
85
|
*
|
|
86
86
|
* Omitting this will render the default dark color.
|
|
87
87
|
*/
|
|
88
|
-
variant:
|
|
89
|
-
}, we = /* @__PURE__ */
|
|
88
|
+
variant: ge.oneOf(["white"])
|
|
89
|
+
}, we = /* @__PURE__ */ g.forwardRef(({
|
|
90
90
|
className: t,
|
|
91
91
|
variant: e,
|
|
92
92
|
"aria-label": o = "Close",
|
|
@@ -122,7 +122,7 @@ function Rt(t = document) {
|
|
|
122
122
|
const e = t.defaultView;
|
|
123
123
|
return Math.abs(e.innerWidth - t.documentElement.clientWidth);
|
|
124
124
|
}
|
|
125
|
-
const Oe =
|
|
125
|
+
const Oe = Et("modal-open");
|
|
126
126
|
class jt {
|
|
127
127
|
constructor({
|
|
128
128
|
ownerDocument: e,
|
|
@@ -196,10 +196,10 @@ function Bt(t) {
|
|
|
196
196
|
add: () => o.add(n.current),
|
|
197
197
|
remove: () => o.remove(n.current),
|
|
198
198
|
isTopModal: () => o.isTopModal(n.current),
|
|
199
|
-
setDialogRef:
|
|
199
|
+
setDialogRef: m((s) => {
|
|
200
200
|
n.current.dialog = s;
|
|
201
201
|
}, []),
|
|
202
|
-
setBackdropRef:
|
|
202
|
+
setBackdropRef: m((s) => {
|
|
203
203
|
n.current.backdrop = s;
|
|
204
204
|
}, [])
|
|
205
205
|
});
|
|
@@ -237,10 +237,10 @@ const We = /* @__PURE__ */ at((t, e) => {
|
|
|
237
237
|
onEntering: J,
|
|
238
238
|
onEntered: Q
|
|
239
239
|
} = t, ue = Ot(t, kt);
|
|
240
|
-
const C = Fe(), k =
|
|
240
|
+
const C = Fe(), k = lt(de), f = Bt(le), fe = dt(), Z = wt(o), [T, O] = M(!o), v = N(null);
|
|
241
241
|
it(e, () => f, [f]), Ee && !Z && o && (v.current = pe(C == null ? void 0 : C.document)), o && T && O(!1);
|
|
242
242
|
const E = w(() => {
|
|
243
|
-
if (f.add(), S.current = Te(document, "keydown",
|
|
243
|
+
if (f.add(), S.current = Te(document, "keydown", me), H.current = Te(
|
|
244
244
|
document,
|
|
245
245
|
"focus",
|
|
246
246
|
// the timeout is necessary b/c this will run before the new modal is mounted
|
|
@@ -277,8 +277,8 @@ const We = /* @__PURE__ */ at((t, e) => {
|
|
|
277
277
|
f.dialog && l && !Ne(f.dialog, l) && f.dialog.focus();
|
|
278
278
|
}), ee = w((l) => {
|
|
279
279
|
l.target === l.currentTarget && (p == null || p(l), d === !0 && $());
|
|
280
|
-
}),
|
|
281
|
-
h &&
|
|
280
|
+
}), me = w((l) => {
|
|
281
|
+
h && ct(l) && f.isTopModal() && (c == null || c(l), l.defaultPrevented || $());
|
|
282
282
|
}), H = N(), S = N(), te = (...l) => {
|
|
283
283
|
O(!0), W == null || W(...l);
|
|
284
284
|
};
|
|
@@ -295,7 +295,7 @@ const We = /* @__PURE__ */ at((t, e) => {
|
|
|
295
295
|
tabIndex: -1
|
|
296
296
|
});
|
|
297
297
|
let _ = V ? V(B) : /* @__PURE__ */ a.jsx("div", Object.assign({}, B, {
|
|
298
|
-
children: /* @__PURE__ */
|
|
298
|
+
children: /* @__PURE__ */ g.cloneElement(u, {
|
|
299
299
|
role: "document"
|
|
300
300
|
})
|
|
301
301
|
}));
|
|
@@ -333,7 +333,7 @@ const At = Object.assign(We, {
|
|
|
333
333
|
Manager: Me
|
|
334
334
|
});
|
|
335
335
|
function Lt(t, e) {
|
|
336
|
-
t.classList ? t.classList.add(e) :
|
|
336
|
+
t.classList ? t.classList.add(e) : ut(t, e) || (typeof t.className == "string" ? t.className = t.className + " " + e : t.setAttribute("class", (t.className && t.className.baseVal || "") + " " + e));
|
|
337
337
|
}
|
|
338
338
|
function Se(t, e) {
|
|
339
339
|
return t.replace(new RegExp("(^|\\s)" + e + "(?:\\s|$)", "g"), "$1").replace(/\s+/g, " ").replace(/^\s*|\s*$/g, "");
|
|
@@ -379,7 +379,7 @@ let ye;
|
|
|
379
379
|
function It(t) {
|
|
380
380
|
return ye || (ye = new Ft(t)), ye;
|
|
381
381
|
}
|
|
382
|
-
const Ue = /* @__PURE__ */
|
|
382
|
+
const Ue = /* @__PURE__ */ g.forwardRef(({
|
|
383
383
|
className: t,
|
|
384
384
|
bsPrefix: e,
|
|
385
385
|
as: o = "div",
|
|
@@ -390,11 +390,11 @@ const Ue = /* @__PURE__ */ m.forwardRef(({
|
|
|
390
390
|
...n
|
|
391
391
|
})));
|
|
392
392
|
Ue.displayName = "ModalBody";
|
|
393
|
-
const $t = Ue, Wt = /* @__PURE__ */
|
|
393
|
+
const $t = Ue, Wt = /* @__PURE__ */ g.createContext({
|
|
394
394
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
395
395
|
onHide() {
|
|
396
396
|
}
|
|
397
|
-
}), He = Wt, _e = /* @__PURE__ */
|
|
397
|
+
}), He = Wt, _e = /* @__PURE__ */ g.forwardRef(({
|
|
398
398
|
bsPrefix: t,
|
|
399
399
|
className: e,
|
|
400
400
|
contentClassName: o,
|
|
@@ -418,7 +418,7 @@ const $t = Ue, Wt = /* @__PURE__ */ m.createContext({
|
|
|
418
418
|
});
|
|
419
419
|
});
|
|
420
420
|
_e.displayName = "ModalDialog";
|
|
421
|
-
const Ke = _e, ze = /* @__PURE__ */
|
|
421
|
+
const Ke = _e, ze = /* @__PURE__ */ g.forwardRef(({
|
|
422
422
|
className: t,
|
|
423
423
|
bsPrefix: e,
|
|
424
424
|
as: o = "div",
|
|
@@ -429,7 +429,7 @@ const Ke = _e, ze = /* @__PURE__ */ m.forwardRef(({
|
|
|
429
429
|
...n
|
|
430
430
|
})));
|
|
431
431
|
ze.displayName = "ModalFooter";
|
|
432
|
-
const Ut = ze, Ht = /* @__PURE__ */
|
|
432
|
+
const Ut = ze, Ht = /* @__PURE__ */ g.forwardRef(({
|
|
433
433
|
closeLabel: t = "Close",
|
|
434
434
|
closeVariant: e,
|
|
435
435
|
closeButton: o = !1,
|
|
@@ -449,7 +449,7 @@ const Ut = ze, Ht = /* @__PURE__ */ m.forwardRef(({
|
|
|
449
449
|
onClick: h
|
|
450
450
|
})]
|
|
451
451
|
});
|
|
452
|
-
}), _t = Ht, Ge = /* @__PURE__ */
|
|
452
|
+
}), _t = Ht, Ge = /* @__PURE__ */ g.forwardRef(({
|
|
453
453
|
bsPrefix: t,
|
|
454
454
|
className: e,
|
|
455
455
|
closeLabel: o = "Close",
|
|
@@ -463,7 +463,7 @@ const Ut = ze, Ht = /* @__PURE__ */ m.forwardRef(({
|
|
|
463
463
|
closeButton: n
|
|
464
464
|
})));
|
|
465
465
|
Ge.displayName = "ModalHeader";
|
|
466
|
-
const Kt = Ge, zt = bt("h4"), Pe = /* @__PURE__ */
|
|
466
|
+
const Kt = Ge, zt = bt("h4"), Pe = /* @__PURE__ */ g.forwardRef(({
|
|
467
467
|
className: t,
|
|
468
468
|
bsPrefix: e,
|
|
469
469
|
as: o = zt,
|
|
@@ -487,7 +487,7 @@ function Vt(t) {
|
|
|
487
487
|
timeout: null
|
|
488
488
|
});
|
|
489
489
|
}
|
|
490
|
-
const Ve = /* @__PURE__ */
|
|
490
|
+
const Ve = /* @__PURE__ */ g.forwardRef(({
|
|
491
491
|
bsPrefix: t,
|
|
492
492
|
className: e,
|
|
493
493
|
style: o,
|
|
@@ -522,14 +522,14 @@ const Ve = /* @__PURE__ */ m.forwardRef(({
|
|
|
522
522
|
manager: Q,
|
|
523
523
|
...ue
|
|
524
524
|
}, C) => {
|
|
525
|
-
const [k, f] = M({}), [fe, Z] = M(!1), T = N(!1), O = N(!1), v = N(null), [E, U] =
|
|
525
|
+
const [k, f] = M({}), [fe, Z] = M(!1), T = N(!1), O = N(!1), v = N(null), [E, U] = ft(), he = ht(C, U), ee = w(j), me = mt();
|
|
526
526
|
t = I(t, "modal");
|
|
527
527
|
const H = G(() => ({
|
|
528
528
|
onHide: ee
|
|
529
529
|
}), [ee]);
|
|
530
530
|
function S() {
|
|
531
531
|
return Q || It({
|
|
532
|
-
isRTL:
|
|
532
|
+
isRTL: me
|
|
533
533
|
});
|
|
534
534
|
}
|
|
535
535
|
function te(i) {
|
|
@@ -552,7 +552,7 @@ const Ve = /* @__PURE__ */ m.forwardRef(({
|
|
|
552
552
|
}, A = (i) => {
|
|
553
553
|
T.current && E && i.target === E.dialog && (O.current = !0), T.current = !1;
|
|
554
554
|
}, l = () => {
|
|
555
|
-
Z(!0), v.current =
|
|
555
|
+
Z(!0), v.current = pt(E.dialog, () => {
|
|
556
556
|
Z(!1);
|
|
557
557
|
});
|
|
558
558
|
}, oe = (i) => {
|
|
@@ -574,10 +574,10 @@ const Ve = /* @__PURE__ */ m.forwardRef(({
|
|
|
574
574
|
}, qe = (i) => {
|
|
575
575
|
v.current == null || v.current(), $ == null || $(i);
|
|
576
576
|
}, Je = (i, L) => {
|
|
577
|
-
Y == null || Y(i, L),
|
|
577
|
+
Y == null || Y(i, L), gt(window, "resize", B);
|
|
578
578
|
}, Qe = (i) => {
|
|
579
579
|
i && (i.style.display = ""), q == null || q(i), je(window, "resize", B);
|
|
580
|
-
}, Ze =
|
|
580
|
+
}, Ze = m((i) => /* @__PURE__ */ a.jsx("div", {
|
|
581
581
|
...i,
|
|
582
582
|
className: y(`${t}-backdrop`, J, !b && "show")
|
|
583
583
|
}), [b, J, t]), xe = {
|
|
@@ -643,9 +643,9 @@ const Be = Object.assign(Ve, {
|
|
|
643
643
|
TRANSITION_DURATION: 300,
|
|
644
644
|
BACKDROP_TRANSITION_DURATION: 150
|
|
645
645
|
}), Xt = () => {
|
|
646
|
-
const { confirmTexts: t } = Le(Ae), { onConfirm: e, onCancel: o, text: n, show: s } =
|
|
646
|
+
const { confirmTexts: t } = Le(Ae), { onConfirm: e, onCancel: o, text: n, show: s } = yt();
|
|
647
647
|
return /* @__PURE__ */ a.jsx(Be, { show: s, size: "sm", centered: !0, onHide: o, children: /* @__PURE__ */ a.jsxs(Be.Body, { children: [
|
|
648
|
-
/* @__PURE__ */ a.jsx("div", { className: "mb-5 text-center", children: /* @__PURE__ */ a.jsx(
|
|
648
|
+
/* @__PURE__ */ a.jsx("div", { className: "mb-5 text-center", children: /* @__PURE__ */ a.jsx(vt, { variant: "h6", children: n }) }),
|
|
649
649
|
/* @__PURE__ */ a.jsxs("div", { className: "w-100 d-flex gap-5", children: [
|
|
650
650
|
/* @__PURE__ */ a.jsx("button", { type: "button", className: "btn btn-secondary w-100", onClick: o, children: t.no }),
|
|
651
651
|
/* @__PURE__ */ a.jsx("button", { type: "button", className: "btn btn-primary w-100 ml", onClick: e, children: t.yes })
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";const M=require("./useAxios-DuhvBHuH.cjs"),p=require("react"),Z=require("react-dom");function ct(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const se=ct(p),ft="_h1_1unxw_1",lt="_h3_1unxw_8",dt="_h6_1unxw_15",pt="_subtitle_1unxw_22",vt="_body_1unxw_29",yt="_body2_1unxw_36",Et="_caption_1unxw_43",K={h1:ft,h3:lt,h6:dt,subtitle:pt,body:vt,body2:yt,caption:Et},mt=({variant:e,className:t,children:o})=>{switch(e){case"h1":return M.jsxRuntimeExports.jsx("h1",{className:M.classNames("luminus-text-primary luminus-h1",K.h1,t),children:o});case"h3":return M.jsxRuntimeExports.jsx("h3",{className:M.classNames("luminus-text luminus-h3",K.h3,t),children:o});case"h6":return M.jsxRuntimeExports.jsx("h6",{className:M.classNames("luminus-text luminus-h6",K.h6,t),children:o});case"subtitle":return M.jsxRuntimeExports.jsx("div",{className:M.classNames("luminus-text luminus-subtitle",K.subtitle,t),children:o});case"body":return M.jsxRuntimeExports.jsx("div",{className:M.classNames("luminus-text luminus-body",K.body,t),children:o});case"body2":return M.jsxRuntimeExports.jsx("div",{className:M.classNames("luminus-text luminus-body2",K.body2,t),children:o});case"caption":return M.jsxRuntimeExports.jsx("div",{className:M.classNames("luminus-text-muted luminus-caption",K.caption,t),children:o});default:return M.jsxRuntimeExports.jsx(M.jsxRuntimeExports.Fragment,{children:o})}},ht=({variant:e,className:t,children:o})=>M.jsxRuntimeExports.jsx(mt,{variant:e,className:t,children:o});function Xe(e,t){if(e==null)return{};var o={},r=Object.keys(e),i,n;for(n=0;n<r.length;n++)i=r[n],!(t.indexOf(i)>=0)&&(o[i]=e[i]);return o}function Se(e,t){return Se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Se(e,t)}function xt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Se(e,t)}const bt=["xxl","xl","lg","md","sm","xs"],Tt="xs",ue=se.createContext({prefixes:{},breakpoints:bt,minBreakpoint:Tt});function gt(e,t){const{prefixes:o}=p.useContext(ue);return e||o[t]||t}function Rt(){const{breakpoints:e}=p.useContext(ue);return e}function Ot(){const{minBreakpoint:e}=p.useContext(ue);return e}function St(){const{dir:e}=p.useContext(ue);return e==="rtl"}function je(e){return e&&e.ownerDocument||document}function _t(e){var t=je(e);return t&&t.defaultView||window}function Ct(e,t){return _t(e).getComputedStyle(e,t)}var wt=/([A-Z])/g;function Pt(e){return e.replace(wt,"-$1").toLowerCase()}var jt=/^ms-/;function oe(e){return Pt(e).replace(jt,"-ms-")}var Dt=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function Mt(e){return!!(e&&Dt.test(e))}function De(e,t){var o="",r="";if(typeof t=="string")return e.style.getPropertyValue(oe(t))||Ct(e).getPropertyValue(oe(t));Object.keys(t).forEach(function(i){var n=t[i];!n&&n!==0?e.style.removeProperty(oe(i)):Mt(i)?r+=i+"("+n+") ":o+=oe(i)+": "+n+";"}),r&&(o+="transform: "+r+";"),e.style.cssText+=";"+o}var _e={exports:{}},ie={exports:{}},C={};/** @license React v16.13.1
|
|
2
|
+
* react-is.production.min.js
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/var Ne;function kt(){if(Ne)return C;Ne=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,o=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,n=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,v=e?Symbol.for("react.concurrent_mode"):60111,y=e?Symbol.for("react.forward_ref"):60112,E=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,k=e?Symbol.for("react.memo"):60115,A=e?Symbol.for("react.lazy"):60116,j=e?Symbol.for("react.block"):60121,N=e?Symbol.for("react.fundamental"):60117,L=e?Symbol.for("react.responder"):60118,U=e?Symbol.for("react.scope"):60119;function I(c){if(typeof c=="object"&&c!==null){var $=c.$$typeof;switch($){case t:switch(c=c.type,c){case d:case v:case r:case n:case i:case E:return c;default:switch(c=c&&c.$$typeof,c){case u:case y:case A:case k:case a:return c;default:return $}}case o:return $}}}function D(c){return I(c)===v}return C.AsyncMode=d,C.ConcurrentMode=v,C.ContextConsumer=u,C.ContextProvider=a,C.Element=t,C.ForwardRef=y,C.Fragment=r,C.Lazy=A,C.Memo=k,C.Portal=o,C.Profiler=n,C.StrictMode=i,C.Suspense=E,C.isAsyncMode=function(c){return D(c)||I(c)===d},C.isConcurrentMode=D,C.isContextConsumer=function(c){return I(c)===u},C.isContextProvider=function(c){return I(c)===a},C.isElement=function(c){return typeof c=="object"&&c!==null&&c.$$typeof===t},C.isForwardRef=function(c){return I(c)===y},C.isFragment=function(c){return I(c)===r},C.isLazy=function(c){return I(c)===A},C.isMemo=function(c){return I(c)===k},C.isPortal=function(c){return I(c)===o},C.isProfiler=function(c){return I(c)===n},C.isStrictMode=function(c){return I(c)===i},C.isSuspense=function(c){return I(c)===E},C.isValidElementType=function(c){return typeof c=="string"||typeof c=="function"||c===r||c===v||c===n||c===i||c===E||c===_||typeof c=="object"&&c!==null&&(c.$$typeof===A||c.$$typeof===k||c.$$typeof===a||c.$$typeof===u||c.$$typeof===y||c.$$typeof===N||c.$$typeof===L||c.$$typeof===U||c.$$typeof===j)},C.typeOf=I,C}var w={};/** @license React v16.13.1
|
|
9
|
+
* react-is.development.js
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the MIT license found in the
|
|
14
|
+
* LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/var Le;function At(){return Le||(Le=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,o=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,n=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,v=e?Symbol.for("react.concurrent_mode"):60111,y=e?Symbol.for("react.forward_ref"):60112,E=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,k=e?Symbol.for("react.memo"):60115,A=e?Symbol.for("react.lazy"):60116,j=e?Symbol.for("react.block"):60121,N=e?Symbol.for("react.fundamental"):60117,L=e?Symbol.for("react.responder"):60118,U=e?Symbol.for("react.scope"):60119;function I(f){return typeof f=="string"||typeof f=="function"||f===r||f===v||f===n||f===i||f===E||f===_||typeof f=="object"&&f!==null&&(f.$$typeof===A||f.$$typeof===k||f.$$typeof===a||f.$$typeof===u||f.$$typeof===y||f.$$typeof===N||f.$$typeof===L||f.$$typeof===U||f.$$typeof===j)}function D(f){if(typeof f=="object"&&f!==null){var F=f.$$typeof;switch(F){case t:var re=f.type;switch(re){case d:case v:case r:case n:case i:case E:return re;default:var Ie=re&&re.$$typeof;switch(Ie){case u:case y:case A:case k:case a:return Ie;default:return F}}case o:return F}}}var c=d,$=v,V=u,fe=a,le=t,de=y,te=r,pe=A,ve=k,H=o,ye=n,q=i,X=E,ne=!1;function Ee(f){return ne||(ne=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),s(f)||D(f)===d}function s(f){return D(f)===v}function l(f){return D(f)===u}function g(f){return D(f)===a}function b(f){return typeof f=="object"&&f!==null&&f.$$typeof===t}function m(f){return D(f)===y}function R(f){return D(f)===r}function x(f){return D(f)===A}function T(f){return D(f)===k}function O(f){return D(f)===o}function P(f){return D(f)===n}function S(f){return D(f)===i}function W(f){return D(f)===E}w.AsyncMode=c,w.ConcurrentMode=$,w.ContextConsumer=V,w.ContextProvider=fe,w.Element=le,w.ForwardRef=de,w.Fragment=te,w.Lazy=pe,w.Memo=ve,w.Portal=H,w.Profiler=ye,w.StrictMode=q,w.Suspense=X,w.isAsyncMode=Ee,w.isConcurrentMode=s,w.isContextConsumer=l,w.isContextProvider=g,w.isElement=b,w.isForwardRef=m,w.isFragment=R,w.isLazy=x,w.isMemo=T,w.isPortal=O,w.isProfiler=P,w.isStrictMode=S,w.isSuspense=W,w.isValidElementType=I,w.typeOf=D}()),w}var $e;function Ke(){return $e||($e=1,process.env.NODE_ENV==="production"?ie.exports=kt():ie.exports=At()),ie.exports}/*
|
|
16
|
+
object-assign
|
|
17
|
+
(c) Sindre Sorhus
|
|
18
|
+
@license MIT
|
|
19
|
+
*/var me,We;function It(){if(We)return me;We=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function r(n){if(n==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(n)}function i(){try{if(!Object.assign)return!1;var n=new String("abc");if(n[5]="de",Object.getOwnPropertyNames(n)[0]==="5")return!1;for(var a={},u=0;u<10;u++)a["_"+String.fromCharCode(u)]=u;var d=Object.getOwnPropertyNames(a).map(function(y){return a[y]});if(d.join("")!=="0123456789")return!1;var v={};return"abcdefghijklmnopqrst".split("").forEach(function(y){v[y]=y}),Object.keys(Object.assign({},v)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return me=i()?Object.assign:function(n,a){for(var u,d=r(n),v,y=1;y<arguments.length;y++){u=Object(arguments[y]);for(var E in u)t.call(u,E)&&(d[E]=u[E]);if(e){v=e(u);for(var _=0;_<v.length;_++)o.call(u,v[_])&&(d[v[_]]=u[v[_]])}}return d},me}var he,qe;function Me(){if(qe)return he;qe=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return he=e,he}var xe,Fe;function He(){return Fe||(Fe=1,xe=Function.call.bind(Object.prototype.hasOwnProperty)),xe}var be,Ue;function Nt(){if(Ue)return be;Ue=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Me(),o={},r=He();e=function(n){var a="Warning: "+n;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(n,a,u,d,v){if(process.env.NODE_ENV!=="production"){for(var y in n)if(r(n,y)){var E;try{if(typeof n[y]!="function"){var _=Error((d||"React class")+": "+u+" type `"+y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof n[y]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw _.name="Invariant Violation",_}E=n[y](a,y,d,u,null,t)}catch(A){E=A}if(E&&!(E instanceof Error)&&e((d||"React class")+": type specification of "+u+" `"+y+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof E+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),E instanceof Error&&!(E.message in o)){o[E.message]=!0;var k=v?v():"";e("Failed "+u+" type: "+E.message+(k??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(o={})},be=i,be}var Te,Ye;function Lt(){if(Ye)return Te;Ye=1;var e=Ke(),t=It(),o=Me(),r=He(),i=Nt(),n=function(){};process.env.NODE_ENV!=="production"&&(n=function(u){var d="Warning: "+u;typeof console<"u"&&console.error(d);try{throw new Error(d)}catch{}});function a(){return null}return Te=function(u,d){var v=typeof Symbol=="function"&&Symbol.iterator,y="@@iterator";function E(s){var l=s&&(v&&s[v]||s[y]);if(typeof l=="function")return l}var _="<<anonymous>>",k={array:L("array"),bigint:L("bigint"),bool:L("boolean"),func:L("function"),number:L("number"),object:L("object"),string:L("string"),symbol:L("symbol"),any:U(),arrayOf:I,element:D(),elementType:c(),instanceOf:$,node:de(),objectOf:fe,oneOf:V,oneOfType:le,shape:pe,exact:ve};function A(s,l){return s===l?s!==0||1/s===1/l:s!==s&&l!==l}function j(s,l){this.message=s,this.data=l&&typeof l=="object"?l:{},this.stack=""}j.prototype=Error.prototype;function N(s){if(process.env.NODE_ENV!=="production")var l={},g=0;function b(R,x,T,O,P,S,W){if(O=O||_,S=S||T,W!==o){if(d){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var F=O+":"+T;!l[F]&&g<3&&(n("You are manually calling a React.PropTypes validation function for the `"+S+"` prop on `"+O+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),l[F]=!0,g++)}}return x[T]==null?R?x[T]===null?new j("The "+P+" `"+S+"` is marked as required "+("in `"+O+"`, but its value is `null`.")):new j("The "+P+" `"+S+"` is marked as required in "+("`"+O+"`, but its value is `undefined`.")):null:s(x,T,O,P,S)}var m=b.bind(null,!1);return m.isRequired=b.bind(null,!0),m}function L(s){function l(g,b,m,R,x,T){var O=g[b],P=q(O);if(P!==s){var S=X(O);return new j("Invalid "+R+" `"+x+"` of type "+("`"+S+"` supplied to `"+m+"`, expected ")+("`"+s+"`."),{expectedType:s})}return null}return N(l)}function U(){return N(a)}function I(s){function l(g,b,m,R,x){if(typeof s!="function")return new j("Property `"+x+"` of component `"+m+"` has invalid PropType notation inside arrayOf.");var T=g[b];if(!Array.isArray(T)){var O=q(T);return new j("Invalid "+R+" `"+x+"` of type "+("`"+O+"` supplied to `"+m+"`, expected an array."))}for(var P=0;P<T.length;P++){var S=s(T,P,m,R,x+"["+P+"]",o);if(S instanceof Error)return S}return null}return N(l)}function D(){function s(l,g,b,m,R){var x=l[g];if(!u(x)){var T=q(x);return new j("Invalid "+m+" `"+R+"` of type "+("`"+T+"` supplied to `"+b+"`, expected a single ReactElement."))}return null}return N(s)}function c(){function s(l,g,b,m,R){var x=l[g];if(!e.isValidElementType(x)){var T=q(x);return new j("Invalid "+m+" `"+R+"` of type "+("`"+T+"` supplied to `"+b+"`, expected a single ReactElement type."))}return null}return N(s)}function $(s){function l(g,b,m,R,x){if(!(g[b]instanceof s)){var T=s.name||_,O=Ee(g[b]);return new j("Invalid "+R+" `"+x+"` of type "+("`"+O+"` supplied to `"+m+"`, expected ")+("instance of `"+T+"`."))}return null}return N(l)}function V(s){if(!Array.isArray(s))return process.env.NODE_ENV!=="production"&&(arguments.length>1?n("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):n("Invalid argument supplied to oneOf, expected an array.")),a;function l(g,b,m,R,x){for(var T=g[b],O=0;O<s.length;O++)if(A(T,s[O]))return null;var P=JSON.stringify(s,function(W,f){var F=X(f);return F==="symbol"?String(f):f});return new j("Invalid "+R+" `"+x+"` of value `"+String(T)+"` "+("supplied to `"+m+"`, expected one of "+P+"."))}return N(l)}function fe(s){function l(g,b,m,R,x){if(typeof s!="function")return new j("Property `"+x+"` of component `"+m+"` has invalid PropType notation inside objectOf.");var T=g[b],O=q(T);if(O!=="object")return new j("Invalid "+R+" `"+x+"` of type "+("`"+O+"` supplied to `"+m+"`, expected an object."));for(var P in T)if(r(T,P)){var S=s(T,P,m,R,x+"."+P,o);if(S instanceof Error)return S}return null}return N(l)}function le(s){if(!Array.isArray(s))return process.env.NODE_ENV!=="production"&&n("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var l=0;l<s.length;l++){var g=s[l];if(typeof g!="function")return n("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ne(g)+" at index "+l+"."),a}function b(m,R,x,T,O){for(var P=[],S=0;S<s.length;S++){var W=s[S],f=W(m,R,x,T,O,o);if(f==null)return null;f.data&&r(f.data,"expectedType")&&P.push(f.data.expectedType)}var F=P.length>0?", expected one of type ["+P.join(", ")+"]":"";return new j("Invalid "+T+" `"+O+"` supplied to "+("`"+x+"`"+F+"."))}return N(b)}function de(){function s(l,g,b,m,R){return H(l[g])?null:new j("Invalid "+m+" `"+R+"` supplied to "+("`"+b+"`, expected a ReactNode."))}return N(s)}function te(s,l,g,b,m){return new j((s||"React class")+": "+l+" type `"+g+"."+b+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+m+"`.")}function pe(s){function l(g,b,m,R,x){var T=g[b],O=q(T);if(O!=="object")return new j("Invalid "+R+" `"+x+"` of type `"+O+"` "+("supplied to `"+m+"`, expected `object`."));for(var P in s){var S=s[P];if(typeof S!="function")return te(m,R,x,P,X(S));var W=S(T,P,m,R,x+"."+P,o);if(W)return W}return null}return N(l)}function ve(s){function l(g,b,m,R,x){var T=g[b],O=q(T);if(O!=="object")return new j("Invalid "+R+" `"+x+"` of type `"+O+"` "+("supplied to `"+m+"`, expected `object`."));var P=t({},g[b],s);for(var S in P){var W=s[S];if(r(s,S)&&typeof W!="function")return te(m,R,x,S,X(W));if(!W)return new j("Invalid "+R+" `"+x+"` key `"+S+"` supplied to `"+m+"`.\nBad object: "+JSON.stringify(g[b],null," ")+`
|
|
20
|
+
Valid keys: `+JSON.stringify(Object.keys(s),null," "));var f=W(T,S,m,R,x+"."+S,o);if(f)return f}return null}return N(l)}function H(s){switch(typeof s){case"number":case"string":case"undefined":return!0;case"boolean":return!s;case"object":if(Array.isArray(s))return s.every(H);if(s===null||u(s))return!0;var l=E(s);if(l){var g=l.call(s),b;if(l!==s.entries){for(;!(b=g.next()).done;)if(!H(b.value))return!1}else for(;!(b=g.next()).done;){var m=b.value;if(m&&!H(m[1]))return!1}}else return!1;return!0;default:return!1}}function ye(s,l){return s==="symbol"?!0:l?l["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&l instanceof Symbol:!1}function q(s){var l=typeof s;return Array.isArray(s)?"array":s instanceof RegExp?"object":ye(l,s)?"symbol":l}function X(s){if(typeof s>"u"||s===null)return""+s;var l=q(s);if(l==="object"){if(s instanceof Date)return"date";if(s instanceof RegExp)return"regexp"}return l}function ne(s){var l=X(s);switch(l){case"array":case"object":return"an "+l;case"boolean":case"date":case"regexp":return"a "+l;default:return l}}function Ee(s){return!s.constructor||!s.constructor.name?_:s.constructor.name}return k.checkPropTypes=i,k.resetWarningCache=i.resetWarningCache,k.PropTypes=k,k},Te}var ge,Be;function $t(){if(Be)return ge;Be=1;var e=Me();function t(){}function o(){}return o.resetWarningCache=t,ge=function(){function r(a,u,d,v,y,E){if(E!==e){var _=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw _.name="Invariant Violation",_}}r.isRequired=r;function i(){return r}var n={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:o,resetWarningCache:t};return n.PropTypes=n,n},ge}if(process.env.NODE_ENV!=="production"){var Wt=Ke(),qt=!0;_e.exports=Lt()(Wt.isElement,qt)}else _e.exports=$t()();var Ft=_e.exports;const h=M.getDefaultExportFromCjs(Ft),ze={disabled:!1};var Ut=process.env.NODE_ENV!=="production"?h.oneOfType([h.number,h.shape({enter:h.number,exit:h.number,appear:h.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&h.oneOfType([h.string,h.shape({enter:h.string,exit:h.string,active:h.string}),h.shape({enter:h.string,enterDone:h.string,enterActive:h.string,exit:h.string,exitDone:h.string,exitActive:h.string})]);const Je=p.createContext(null);var Yt=function(t){return t.scrollTop},Q="unmounted",z="exited",Y="entering",G="entered",ae="exiting",B=function(e){xt(t,e);function t(r,i){var n;n=e.call(this,r,i)||this;var a=i,u=a&&!a.isMounting?r.enter:r.appear,d;return n.appearStatus=null,r.in?u?(d=z,n.appearStatus=Y):d=G:r.unmountOnExit||r.mountOnEnter?d=Q:d=z,n.state={status:d},n.nextCallback=null,n}t.getDerivedStateFromProps=function(i,n){var a=i.in;return a&&n.status===Q?{status:z}:null};var o=t.prototype;return o.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},o.componentDidUpdate=function(i){var n=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Y&&a!==G&&(n=Y):(a===Y||a===G)&&(n=ae)}this.updateStatus(!1,n)},o.componentWillUnmount=function(){this.cancelNextCallback()},o.getTimeouts=function(){var i=this.props.timeout,n,a,u;return n=a=u=i,i!=null&&typeof i!="number"&&(n=i.exit,a=i.enter,u=i.appear!==void 0?i.appear:a),{exit:n,enter:a,appear:u}},o.updateStatus=function(i,n){if(i===void 0&&(i=!1),n!==null)if(this.cancelNextCallback(),n===Y){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Z.findDOMNode(this);a&&Yt(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===z&&this.setState({status:Q})},o.performEnter=function(i){var n=this,a=this.props.enter,u=this.context?this.context.isMounting:i,d=this.props.nodeRef?[u]:[Z.findDOMNode(this),u],v=d[0],y=d[1],E=this.getTimeouts(),_=u?E.appear:E.enter;if(!i&&!a||ze.disabled){this.safeSetState({status:G},function(){n.props.onEntered(v)});return}this.props.onEnter(v,y),this.safeSetState({status:Y},function(){n.props.onEntering(v,y),n.onTransitionEnd(_,function(){n.safeSetState({status:G},function(){n.props.onEntered(v,y)})})})},o.performExit=function(){var i=this,n=this.props.exit,a=this.getTimeouts(),u=this.props.nodeRef?void 0:Z.findDOMNode(this);if(!n||ze.disabled){this.safeSetState({status:z},function(){i.props.onExited(u)});return}this.props.onExit(u),this.safeSetState({status:ae},function(){i.props.onExiting(u),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:z},function(){i.props.onExited(u)})})})},o.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},o.safeSetState=function(i,n){n=this.setNextCallback(n),this.setState(i,n)},o.setNextCallback=function(i){var n=this,a=!0;return this.nextCallback=function(u){a&&(a=!1,n.nextCallback=null,i(u))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},o.onTransitionEnd=function(i,n){this.setNextCallback(n);var a=this.props.nodeRef?this.props.nodeRef.current:Z.findDOMNode(this),u=i==null&&!this.props.addEndListener;if(!a||u){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var d=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],v=d[0],y=d[1];this.props.addEndListener(v,y)}i!=null&&setTimeout(this.nextCallback,i)},o.render=function(){var i=this.state.status;if(i===Q)return null;var n=this.props,a=n.children;n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef;var u=Xe(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return p.createElement(Je.Provider,{value:null},typeof a=="function"?a(i,u):p.cloneElement(p.Children.only(a),u))},t}(p.Component);B.contextType=Je;B.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:h.shape({current:typeof Element>"u"?h.any:function(e,t,o,r,i,n){var a=e[t];return h.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(e,t,o,r,i,n)}}),children:h.oneOfType([h.func.isRequired,h.element.isRequired]).isRequired,in:h.bool,mountOnEnter:h.bool,unmountOnExit:h.bool,appear:h.bool,enter:h.bool,exit:h.bool,timeout:function(t){var o=Ut;t.addEndListener||(o=o.isRequired);for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return o.apply(void 0,[t].concat(i))},addEndListener:h.func,onEnter:h.func,onEntering:h.func,onEntered:h.func,onExit:h.func,onExiting:h.func,onExited:h.func}:{};function J(){}B.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:J,onEntering:J,onEntered:J,onExit:J,onExiting:J,onExited:J};B.UNMOUNTED=Q;B.EXITED=z;B.ENTERING=Y;B.ENTERED=G;B.EXITING=ae;const Bt=B,ce=!!(typeof window<"u"&&window.document&&window.document.createElement);var Ce=!1,we=!1;try{var Re={get passive(){return Ce=!0},get once(){return we=Ce=!0}};ce&&(window.addEventListener("test",Re,Re),window.removeEventListener("test",Re,!0))}catch{}function Ze(e,t,o,r){if(r&&typeof r!="boolean"&&!we){var i=r.once,n=r.capture,a=o;!we&&i&&(a=o.__once||function u(d){this.removeEventListener(t,u,n),o.call(this,d)},o.__once=a),e.addEventListener(t,a,Ce?r:n)}e.addEventListener(t,o,r)}function Qe(e,t,o,r){var i=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(t,o,i),o.__once&&e.removeEventListener(t,o.__once,i)}function ke(e,t,o,r){return Ze(e,t,o,r),function(){Qe(e,t,o,r)}}function zt(e,t,o,r){if(o===void 0&&(o=!1),r===void 0&&(r=!0),e){var i=document.createEvent("HTMLEvents");i.initEvent(t,o,r),e.dispatchEvent(i)}}function Gt(e){var t=De(e,"transitionDuration")||"",o=t.indexOf("ms")===-1?1e3:1;return parseFloat(t)*o}function Vt(e,t,o){o===void 0&&(o=5);var r=!1,i=setTimeout(function(){r||zt(e,"transitionend",!0)},t+o),n=ke(e,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(i),n()}}function et(e,t,o,r){o==null&&(o=Gt(e)||0);var i=Vt(e,o,r),n=ke(e,"transitionend",t);return function(){i(),n()}}function Ge(e,t){const o=De(e,t)||"",r=o.indexOf("ms")===-1?1e3:1;return parseFloat(o)*r}function tt(e,t){const o=Ge(e,"transitionDuration"),r=Ge(e,"transitionDelay"),i=et(e,n=>{n.target===e&&(i(),t(n))},o+r)}function nt(e){e.offsetHeight}const Ve=e=>!e||typeof e=="function"?e:t=>{e.current=t};function Xt(e,t){const o=Ve(e),r=Ve(t);return i=>{o&&o(i),r&&r(i)}}function ee(e,t){return p.useMemo(()=>Xt(e,t),[e,t])}function rt(e){return e&&"setState"in e?Z.findDOMNode(e):e??null}const Kt=p.forwardRef(({onEnter:e,onEntering:t,onEntered:o,onExit:r,onExiting:i,onExited:n,addEndListener:a,children:u,childRef:d,...v},y)=>{const E=p.useRef(null),_=ee(E,d),k=$=>{_(rt($))},A=$=>V=>{$&&E.current&&$(E.current,V)},j=p.useCallback(A(e),[e]),N=p.useCallback(A(t),[t]),L=p.useCallback(A(o),[o]),U=p.useCallback(A(r),[r]),I=p.useCallback(A(i),[i]),D=p.useCallback(A(n),[n]),c=p.useCallback(A(a),[a]);return M.jsxRuntimeExports.jsx(Bt,{ref:y,...v,onEnter:j,onEntered:L,onEntering:N,onExit:U,onExited:D,onExiting:I,addEndListener:c,nodeRef:E,children:typeof u=="function"?($,V)=>u($,{...V,ref:k}):p.cloneElement(u,{ref:k})})}),ot=Kt;function Ht(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e},[e]),t}function Ae(e){const t=Ht(e);return p.useCallback(function(...o){return t.current&&t.current(...o)},[t])}function Jt(){return p.useState(null)}function Zt(){const e=p.useRef(!0),t=p.useRef(()=>e.current);return p.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}const Qt=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",en=typeof document<"u",Pe=en||Qt?p.useLayoutEffect:p.useEffect,tn={[Y]:"show",[G]:"show"},it=se.forwardRef(({className:e,children:t,transitionClasses:o={},onEnter:r,...i},n)=>{const a={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...i},u=p.useCallback((d,v)=>{nt(d),r==null||r(d,v)},[r]);return M.jsxRuntimeExports.jsx(ot,{ref:n,addEndListener:tt,...a,onEnter:u,childRef:t.ref,children:(d,v)=>se.cloneElement(t,{...v,className:M.classNames("fade",e,t.props.className,tn[d],o[d])})})});it.displayName="Fade";const nn=it;function rn(e){const t=p.useRef(e);return t.current=e,t}function on(e){const t=rn(e);p.useEffect(()=>()=>t.current(),[])}function sn(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}const st=p.createContext(ce?window:void 0);st.Provider;function at(){return p.useContext(st)}const Oe=(e,t)=>ce?e==null?(t||je()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function an(e,t){const o=at(),[r,i]=p.useState(()=>Oe(e,o==null?void 0:o.document));if(!r){const n=Oe(e);n&&i(n)}return p.useEffect(()=>{t&&r&&t(r)},[t,r]),p.useEffect(()=>{const n=Oe(e);n!==r&&i(n)},[e,r]),r}function ut({children:e,in:t,onExited:o,mountOnEnter:r,unmountOnExit:i}){const n=p.useRef(null),a=p.useRef(t),u=Ae(o);p.useEffect(()=>{t?a.current=!0:u(n.current)},[t,u]);const d=ee(n,e.ref),v=p.cloneElement(e,{ref:d});return t?v:i||!a.current&&r?null:v}const un=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];function cn(e,t){if(e==null)return{};var o={},r=Object.keys(e),i,n;for(n=0;n<r.length;n++)i=r[n],!(t.indexOf(i)>=0)&&(o[i]=e[i]);return o}function fn(e){let{onEnter:t,onEntering:o,onEntered:r,onExit:i,onExiting:n,onExited:a,addEndListener:u,children:d}=e,v=cn(e,un);const y=p.useRef(null),E=ee(y,typeof d=="function"?null:d.ref),_=D=>c=>{D&&y.current&&D(y.current,c)},k=p.useCallback(_(t),[t]),A=p.useCallback(_(o),[o]),j=p.useCallback(_(r),[r]),N=p.useCallback(_(i),[i]),L=p.useCallback(_(n),[n]),U=p.useCallback(_(a),[a]),I=p.useCallback(_(u),[u]);return Object.assign({},v,{nodeRef:y},t&&{onEnter:k},o&&{onEntering:A},r&&{onEntered:j},i&&{onExit:N},n&&{onExiting:L},a&&{onExited:U},u&&{addEndListener:I},{children:typeof d=="function"?(D,c)=>d(D,Object.assign({},c,{ref:E})):p.cloneElement(d,{ref:E})})}const ln=["component"];function dn(e,t){if(e==null)return{};var o={},r=Object.keys(e),i,n;for(n=0;n<r.length;n++)i=r[n],!(t.indexOf(i)>=0)&&(o[i]=e[i]);return o}const pn=se.forwardRef((e,t)=>{let{component:o}=e,r=dn(e,ln);const i=fn(r);return M.jsxRuntimeExports.jsx(o,Object.assign({ref:t},i))}),vn=pn;function yn({in:e,onTransition:t}){const o=p.useRef(null),r=p.useRef(!0),i=Ae(t);return Pe(()=>{if(!o.current)return;let n=!1;return i({in:e,element:o.current,initial:r.current,isStale:()=>n}),()=>{n=!0}},[e,i]),Pe(()=>(r.current=!1,()=>{r.current=!0}),[]),o}function En({children:e,in:t,onExited:o,onEntered:r,transition:i}){const[n,a]=p.useState(!t);t&&n&&a(!1);const u=yn({in:!!t,onTransition:v=>{const y=()=>{v.isStale()||(v.in?r==null||r(v.element,v.initial):(a(!0),o==null||o(v.element)))};Promise.resolve(i(v)).then(y,E=>{throw v.in||a(!0),E})}}),d=ee(u,e.ref);return n&&!t?null:p.cloneElement(e,{ref:d})}function mn(e,t,o){return e?M.jsxRuntimeExports.jsx(vn,Object.assign({},o,{component:e})):t?M.jsxRuntimeExports.jsx(En,Object.assign({},o,{transition:t})):M.jsxRuntimeExports.jsx(ut,Object.assign({},o))}function hn(e){return e.code==="Escape"||e.keyCode===27}function xn(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}exports.ENTERED=G;exports.ENTERING=Y;exports.EXITED=z;exports.EXITING=ae;exports.Fade=nn;exports.NoopTransition=ut;exports.PropTypes=h;exports.TransitionWrapper=ot;exports.Typography=ht;exports._objectWithoutPropertiesLoose=Xe;exports.addEventListener=Ze;exports.canUseDOM=ce;exports.contains=sn;exports.hasClass=xn;exports.isEscKey=hn;exports.listen=ke;exports.ownerDocument=je;exports.removeEventListener=Qe;exports.renderTransition=mn;exports.safeFindDOMNode=rt;exports.style=De;exports.transitionEnd=et;exports.transitionEndListener=tt;exports.triggerBrowserReflow=nt;exports.useBootstrapBreakpoints=Rt;exports.useBootstrapMinBreakpoint=Ot;exports.useBootstrapPrefix=gt;exports.useCallbackRef=Jt;exports.useEventCallback=Ae;exports.useIsRTL=St;exports.useIsomorphicEffect=Pe;exports.useMergedRefs=ee;exports.useMounted=Zt;exports.useWaitForDOMRef=an;exports.useWillUnmount=on;exports.useWindow=at;
|