PageSourceSearch

https://walavibes.wtf/assets/AccordionItem-CI9JB0-k.js

js walavibes.wtf collected 2026-10-06 20:03:10 UTC 2,938 bytes, 1 lines download raw bytes

1import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,r as n}from"./framework-DJH1pfSr.js";import{p as r,t as i}from"./useRenderElement-0hVZVV5C.js";import{i as a}from"./collapsibleOpenStateMapping-CpIENIVs.js";import{t as o}from"./stateAttributesMapping-B0t-Y1Vc.js";import{n as s,t as c}from"./useIsoLayoutEffect-dNZ8Wf1g.js";import{t as l}from"./useBaseUiId-DWm14Bg-.js";import{t as u}from"./useControlled-rG2aaNoD.js";import{h as d,t as f}from"./createBaseUIEventDetails-BixunOJI.js";import{t as p}from"./useAnimationsFinished-C9PWKlJG.js";import{t as m}from"./useTransitionStatus-DLxiaw3e.js";import{t as h}from"./CollapsibleRootContext-k8n0mEFu.js";import{n as g}from"./useCompositeListItem-DCtuny_P.js";import{n as _}from"./AccordionRootContext-Djvtr85e.js";var v=e(t());function y(e){let{open:t,defaultOpen:n,onOpenChange:r,disabled:i}=e,a=t!==void 0,[o,h]=u({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:g,setMounted:_,transitionStatus:y}=m(o,!0,!0),[b,x]=v.useState(o),[{height:S,width:C},w]=v.useState({height:void 0,width:void 0}),T=l(),[E,D]=v.useState(),O=E??T,[k,A]=v.useState(!1),[j,M]=v.useState(!1),N=v.useRef(null),P=v.useRef(null),F=v.useRef(null),I=v.useRef(null),L=p(I,!1),R=s(e=>{let t=!o,n=f(d,e.nativeEvent);if(r(t,n),n.isCanceled)return;let i=I.current;P.current===`css-animation`&&i!=null&&i.style.removeProperty(`animation-name`),!k&&!j&&(P.current!=null&&P.current!==`css-animation`&&!g&&t&&_(!0),P.current===`css-animation`&&(!b&&t&&x(!0),!g&&t&&_(!0))),h(t),P.current===`none`&&g&&!t&&_(!1)});return c(()=>{a&&P.current===`none`&&!j&&!o&&_(!1)},[a,j,o,t,_]),v.useMemo(()=>({abortControllerRef:N,animationTypeRef:P,disabled:i,handleTrigger:R,height:S,mounted:g,open:o,panelId:O,panelRef:I,runOnceAnimationsFinish:L,setDimensions:w,setHiddenUntilFound:A,setKeepMounted:M,setMounted:_,setOpen:h,setPanelIdState:D,setVisible:x,transitionDimensionRef:F,transitionStatus:y,visible:b,width:C}),[N,P,i,R,S,g,o,O,I,L,w,A,M,_,h,x,F,y,b,C])}var b=n(),x=v.forwardRef(function(e,t){let{className:n,disabled:c=!1,onOpenChange:u,render:d,value:f,...p}=e,{ref:m,index:x}=g(),S=r(t,m),{disabled:C,handleValueChange:w,state:T,value:E}=_(),D=l(),O=f??D,k=c||C,A=v.useMemo(()=>{if(!E)return!1;for(let e=0;e<E.length;e+=1)if(E[e]===O)return!0;return!1},[E,O]),j=s((e,t)=>{u?.(e,t),!t.isCanceled&&w(O,e)}),M=y({open:A,onOpenChange:j,disabled:k}),N=v.useMemo(()=>({open:M.open,disabled:M.disabled,hidden:!M.mounted,transitionStatus:M.transitionStatus}),[M.open,M.disabled,M.mounted,M.transitionStatus]),P=v.useMemo(()=>({...M,onOpenChange:j,state:N}),[M,N,j]),F=v.useMemo(()=>({...T,index:x,disabled:k,open:A}),[k,x,A,T]),[I,L]=v.useState(l()),R=v.useMemo(()=>({open:A,state:F,setTriggerId:L,triggerId:I}),[A,F,L,I]),z=i(`div`,e,{state:F,ref:S,props:p,stateAttributesMapping:o});return(0,b.jsx)(h.Provider,{value:P,children:(0,b.jsx)(a.Provider,{value:R,children:z})})});export{x as AccordionItem};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.