PageSourceSearch

https://western-wnc-dominate.lovable.app/assets/accordion-BdKAaNNz.js

js western-wnc-dominate.lovable.app collected 2026-10-03 03:46:27 UTC 7,020 bytes, 1 lines download raw bytes

1import{r as l,j as a,o as f}from"./react-vendor-DNsy_oCe.js";import{U as z,V as T,W as R,X as B,Y as me,Z as Y,_ as ve,$ as xe,c as k}from"./Skeletons-zQo3NBAg.js";import{u as q,a as Ce}from"./HeroImage-D1UOAuxM.js";import{y as be}from"./icons-vendor-C2eoPtgt.js";var _="Collapsible",[ge,W]=z(_),[Ae,M]=ge(_),X=l.forwardRef((e,c)=>{const{__scopeCollapsible:o,open:t,defaultOpen:n,disabled:r,onOpenChange:i,...d}=e,[p,u]=T({prop:t,defaultProp:n??!1,onChange:i,caller:_});return a.jsx(Ae,{scope:o,disabled:r,contentId:q(),open:p,onOpenToggle:l.useCallback(()=>u(m=>!m),[u]),children:a.jsx(R.div,{"data-state":V(p),"data-disabled":r?"":void 0,...d,ref:c})})});X.displayName=_;var Z="CollapsibleTrigger",J=l.forwardRef((e,c)=>{const{__scopeCollapsible:o,...t}=e,n=M(Z,o);return a.jsx(R.button,{type:"button","aria-controls":n.contentId,"aria-expanded":n.open||!1,"data-state":V(n.open),"data-disabled":n.disabled?"":void 0,disabled:n.disabled,...t,ref:c,onClick:B(e.onClick,n.onOpenToggle)})});J.displayName=Z;var $="CollapsibleContent",Q=l.forwardRef((e,c)=>{const{forceMount:o,...t}=e,n=M($,e.__scopeCollapsible);return a.jsx(me,{present:o||n.open,children:({present:r})=>a.jsx(he,{...t,ref:c,present:r})})});Q.displayName=$;var he=l.forwardRef((e,c)=>{const{__scopeCollapsible:o,present:t,children:n,...r}=e,i=M($,o),[d,p]=l.useState(t),u=l.useRef(null),m=Y(c,u),v=l.useRef(0),h=v.current,C=l.useRef(0),w=C.current,b=i.open||d,g=l.useRef(b),A=l.useRef(void 0);return l.useEffect(()=>{const s=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(s)},[]),ve(()=>{const s=u.current;if(s){A.current=A.current||{transitionDuration:s.style.transitionDuration,animationName:s.style.animationName},s.style.transitionDuration="0s",s.style.animationName="none";const I=s.getBoundingClientRect();v.current=I.height,C.current=I.width,g.current||(s.style.transitionDuration=A.current.transitionDuration,s.style.animationName=A.current.animationName),p(t)}},[i.open,t]),a.jsx(R.div,{"data-state":V(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!b,...r,ref:m,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style},children:b&&n})});function V(e){return e?"open":"closed"}var Ie=X,Re=J,we=Q,x="Accordion",Ne=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[H,_e,ye]=xe(x),[y,Ue]=z(x,[ye,W]),L=W(),ee=f.forwardRef((e,c)=>{const{type:o,...t}=e,n=t,r=t;return a.jsx(H.Provider,{scope:e.__scopeAccordion,children:o==="multiple"?a.jsx(Se,{...r,ref:c}):a.jsx(Ee,{...n,ref:c})})});ee.displayName=x;var[oe,je]=y(x),[te,Pe]=y(x,{collapsible:!1}),Ee=f.forwardRef((e,c)=>{const{value:o,defaultValue:t,onValueChange:n=()=>{},collapsible:r=!1,...i}=e,[d,p]=T({prop:o,defaultProp:t??"",onChange:n,caller:x});return a.jsx(oe,{scope:e.__scopeAccordion,value:f.useMemo(()=>d?[d]:[],[d]),onItemOpen:p,onItemClose:f.useCallback(()=>r&&p(""),[r,p]),children:a.jsx(te,{scope:e.__scopeAccordion,collapsible:r,children:a.jsx(ne,{...i,ref:c})})})}),Se=f.forwardRef((e,c)=>{const{value:o,defaultValue:t,onValueChange:n=()=>{},...r}=e,[i,d]=T({prop:o,defaultProp:t??[],onChange:n,caller:x}),p=f.useCallback(m=>d((v=[])=>[...v,m]),[d]),u=f.useCallback(m=>d((v=[])=>v.filter(h=>h!==m)),[d]);return a.jsx(oe,{scope:e.__scopeAccordion,value:i,onItemOpen:p,onItemClose:u,children:a.jsx(te,{scope:e.__scopeAccordion,collapsible:!0,children:a.jsx(ne,{...r,ref:c})})})}),[Oe,j]=y(x),ne=f.forwardRef((e,c)=>{const{__scopeAccordion:o,disabled:t,dir:n,orientation:r="vertical",...i}=e,d=f.useRef(null),p=Y(d,c),u=_e(o),v=Ce(n)==="ltr",h=B(e.onKeyDown,C=>{var F;if(!Ne.includes(C.key))return;const w=C.target,b=u().filter(O=>{var U;return!((U=O.ref.current)!=null&&U.disabled)}),g=b.findIndex(O=>O.ref.current===w),A=b.length;if(g===-1)return;C.preventDefault();let s=g;const I=0,P=A-1,E=()=>{s=g+1,s>P&&(s=I)},S=()=>{s=g-1,s<I&&(s=P)};switch(C.key){case"Home":s=I;break;case"End":s=P;break;case"ArrowRight":r==="horizontal"&&(v?E():S());break;case"ArrowDown":r==="vertical"&&E();break;case"ArrowLeft":r==="horizontal"&&(v?S():E());break;case"ArrowUp":r==="vertical"&&S();break}const fe=s%A;(F=b[fe].ref.current)==null||F.focus()});return a.jsx(Oe,{scope:o,disabled:t,direction:n,orientation:r,children:a.jsx(H.Slot,{scope:o,children:a.jsx(R.div,{...i,"data-orientation":r,ref:p,onKeyDown:t?void 0:h})})})}),N="AccordionItem",[De,G]=y(N),re=f.forwardRef((e,c)=>{const{__scopeAccordion:o,value:t,...n}=e,r=j(N,o),i=je(N,o),d=L(o),p=q(),u=t&&i.value.includes(t)||!1,m=r.disabled||e.disabled;return a.jsx(De,{scope:o,open:u,disabled:m,triggerId:p,children:a.jsx(Ie,{"data-orientation":r.orientation,"data-state":de(u),...d,...n,ref:c,disabled:m,open:u,onOpenChange:v=>{v?i.onItemOpen(t):i.onItemClose(t)}})})});re.displayName=N;var ae="AccordionHeader",ce=f.forwardRef((e,c)=>{const{__scopeAccordion:o,...t}=e,n=j(x,o),r=G(ae,o);return a.jsx(R.h3,{"data-orientation":n.orientation,"data-state":de(r.open),"data-disabled":r.disabled?"":void 0,...t,ref:c})});ce.displayName=ae;var D="AccordionTrigger",ie=f.forwardRef((e,c)=>{const{__scopeAccordion:o,...t}=e,n=j(x,o),r=G(D,o),i=Pe(D,o),d=L(o);return a.jsx(H.ItemSlot,{scope:o,children:a.jsx(Re,{"aria-disabled":r.open&&!i.collapsible||void 0,"data-orientation":n.orientation,id:r.triggerId,...d,...t,ref:c})})});
1ie.displayName=D;var se="AccordionContent",le=f.forwardRef((e,c)=>{const{__scopeAccordion:o,...t}=e,n=j(x,o),r=G(se,o),i=L(o);return a.jsx(we,{role:"region","aria-labelledby":r.triggerId,"data-orientation":n.orientation,...i,...t,ref:c,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});le.displayName=se;function de(e){return e?"open":"closed"}var Te=ee,ke=re,Me=ce,pe=ie,ue=le;const ze=Te,K=l.createContext(null),$e=l.forwardRef(({className:e,children:c,...o},t)=>{const n=l.useId().replace(/:/g,"");return a.jsx(K.Provider,{value:n,children:a.jsx(ke,{ref:t,className:k("border-b accordion-premium",e),...o,children:c})})});$e.displayName="AccordionItem";const Ve=l.forwardRef(({className:e,children:c,...o},t)=>{const n=l.useContext(K);return a.jsx(Me,{className:"flex",children:a.jsxs(pe,{ref:t,"aria-controls":n??void 0,className:k("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:no-underline",e),...o,children:[c,a.jsx(be,{className:"h-4 w-4 shrink-0 text-muted-foreground/60 accordion-chevron","aria-hidden":"true"})]})})});Ve.displayName=pe.displayName;const He=l.forwardRef(({className:e,children:c,...o},t)=>{const n=l.useContext(K);return a.jsx(ue,{ref:t,forceMount:!0,id:n??void 0,role:"group",className:"overflow-hidden text-sm transition-all data-[state=closed]:h-0 data-[state=closed]:invisible data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...o,children:a.jsx("div",{className:k("pb-4 pt-0",e),children:c})})});He.displayName=ue.displayName;export{ze as A,$e as a,Ve as b,He as c};

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.