Loading
function(e,t,n){"use strict";n.d(t,{kS:()=>b,EN:()=>D});var r=n(650682),i=n(825913),a=n(340287),o=n(64700),u=n(985620),s=n(248215),l=n(3388),d=n(341221),c=n(498430),f=n(492313),h=n(290424),p=n(318473),m=n(561514);let v=(0,o.createContext)(null),_=(0,o.createContext)(null),g=(0,o.createContext)(null),y=(0,o.createContext)(null),D=(0,o.forwardRef)(function(e,t){[e,t]=(0,i.JT)(e,t,_);let n=(0,o.useContext)(v),{id:m,...D}=e,b=(0,u.Bi)();m||(m=b);let C=n?n.expandedKeys.has(m):e.isExpanded,E=function(e){let[t,n]=(0,f.P)(e.isExpanded,e.defaultExpanded||!1,e.onExpandedChange),r=(0,o.useCallback)(()=>{n(!0)},[n]),i=(0,o.useCallback)(()=>{n(!1)},[n]),a=(0,o.useCallback)(()=>{n(!t)},[n,t]);return{isExpanded:t,setExpanded:n,expand:r,collapse:i,toggle:a}}({...e,isExpanded:C,onExpandedChange(t){var r;n&&n.toggleKey(m),null==(r=e.onExpandedChange)||r.call(e,t)}}),w=o.useRef(null),A=e.isDisabled||(null==n?void 0:n.isDisabled)||!1,{buttonProps:B,panelProps:F}=function(e,t,n){let{isDisabled:r}=e,i=(0,u.Bi)(),c=(0,u.Bi)(),f=(0,d.wR)(),h=(0,o.useRef)(null),p=(0,o.useCallback)(()=>{h.current=requestAnimationFrame(()=>{n.current&&n.current.setAttribute("hidden","until-found")}),(0,a.flushSync)(()=>{t.toggle()})},[n,t]);(0,s._)(n,"beforematch",p);let m=(0,o.useRef)(null);return(0,l.N)(()=>{if(h.current&&cancelAnimationFrame(h.current),n.current&&!r&&!f){let e=n.current;null==m.current||"function"!=typeof e.getAnimations?t.isExpanded?(e.removeAttribute("hidden"),e.style.setProperty("--disclosure-panel-width","auto"),e.style.setProperty("--disclosure-panel-height","auto")):(e.setAttribute("hidden","until-found"),e.style.setProperty("--disclosure-panel-width","0px"),e.style.setProperty("--disclosure-panel-height","0px")):t.isExpanded!==m.current&&(t.isExpanded?(e.removeAttribute("hidden"),e.style.setProperty("--disclosure-panel-width",e.scrollWidth+"px"),e.style.setProperty("--disclosure-panel-height",e.scrollHeight+"px"),Promise.all(e.getAnimations().map(e=>e.finished)).then(()=>{e.style.setProperty("--disclosure-panel-width","auto"),e.style.setProperty("--disclosure-panel-height","auto")}).catch(()=>{})):(e.style.setProperty("--disclosure-panel-width",e.scrollWidth+"px"),e.style.setProperty("--disclosure-panel-height",e.scrollHeight+"px"),window.getComputedStyle(e).height,e.style.setProperty("--disclosure-panel-width","0px"),e.style.setProperty("--disclosure-panel-height","0px"),Promise.all(e.getAnimations().map(e=>e.finished)).then(()=>e.setAttribute("hidden","until-found")).catch(()=>{}))),m.current=t.isExpanded}},[r,n,t.isExpanded,f]),(0,o.useEffect)(()=>()=>{h.current&&cancelAnimationFrame(h.current)},[]),{buttonProps:{id:i,"aria-expanded":t.isExpanded,"aria-controls":c,onPress:e=>{r||"keyboard"===e.pointerType||t.toggle()},isDisabled:r,onPressStart(e){"keyboard"!==e.pointerType||r||t.toggle()}},panelProps:{id:c,role:"group","aria-labelledby":i,"aria-hidden":!t.isExpanded,hidden:f||r?r||!t.isExpanded:void 0}}}({...e,isExpanded:C,isDisabled:A},E,w),{isFocusVisible:V,focusProps:T}=(0,c.o)({within:!0}),k=(0,i.Sl)({...e,id:void 0,defaultClassName:"react-aria-Disclosure",values:{isExpanded:E.isExpanded,isDisabled:A,isFocusVisibleWithin:V,state:E}}),x=(0,h.$)(D,{global:!0});return o.createElement(i.Kq,{values:[[r.k,{slots:{[i.P_]:{},trigger:B}}],[y,{panelProps:F,panelRef:w}],[g,E]]},o.createElement("div",{...(0,p.v)(x,k,T),ref:t,"data-expanded":E.isExpanded||void 0,"data-disabled":A||void 0,"data-focus-visible-within":V||void 0},k.children))}),b=(0,o.forwardRef)(function(e,t){let{role:n="group"}=e,{panelProps:a,panelRef:u}=(0,o.useContext)(y),{isFocusVisible:s,focusProps:l}=(0,c.o)({within:!0}),d=(0,i.Sl)({...e,defaultClassName:"react-aria-DisclosurePanel",values:{isFocusVisibleWithin:s}}),f=(0,h.$)(e,{global:!0});return o.createElement("div",{...(0,p.v)(f,d,a,l),ref:(0,m.P)(t,u),role:n,"data-focus-visible-within":s||void 0},o.createElement(i.Kq,{values:[[r.k,null]]},e.children))})}