PageSourceSearch

https://motoring.today/assets/popover-DyHBkLVG.js

js motoring.today collected 2026-10-09 16:57:50 UTC 6,635 bytes, 1 lines download raw bytes

vendor: 4,573 bytes, line 1
1import{r as a,j as l,aa as $,at as V,au as L,ak as A,ah as O,ai as h,af as E,ag as W,ad as H,al as z,an as G,am as B,ao as K,ap as Z,$ as U}from"./index-DWGp9uR9.js";import{R as q,A as y,c as _,C as J,a as Q}from"./index-Cx1PKlSt.js";function X(e){const t=Y(e),r=a.forwardRef((n,o)=>{const{children:s,...i}=n,c=a.Children.toArray(s),p=c.find(oe);if(p){const u=p.props.children,g=c.map(f=>f===p?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:f);return l.jsx(t,{...i,ref:o,children:a.isValidElement(u)?a.cloneElement(u,void 0,g):null})}return l.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function Y(e){const t=a.forwardRef((r,n)=>{const{children:o,...s}=r;if(a.isValidElement(o)){const i=re(o),c=te(s,o.props);return o.type!==a.Fragment&&(c.ref=n?$(n,i):i),a.cloneElement(o,c)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ee=Symbol("radix.slottable");function oe(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ee}function te(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...c)=>{const p=s(...c);return o(...c),p}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function re(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var C="Popover",[b]=H(C,[_]),m=_(),[ne,d]=b(C),j=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,c=m(t),p=a.useRef(null),[u,g]=a.useState(!1),[f,v]=V({prop:n,defaultProp:o??!1,onChange:s,caller:C});return l.jsx(q,{...c,children:l.jsx(ne,{scope:t,contentId:L(),triggerRef:p,open:f,onOpenChange:v,onOpenToggle:a.useCallback(()=>v(x=>!x),[v]),hasCustomAnchor:u,onCustomAnchorAdd:a.useCallback(()=>g(!0),[]),onCustomAnchorRemove:a.useCallback(()=>g(!1),[]),modal:i,children:r})})};j.displayName=C;var w="PopoverAnchor",se=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(w,r),s=m(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:c}=o;return a.useEffect(()=>(i(),()=>c()),[i,c]),l.jsx(y,{...s,...n,ref:t})});se.displayName=w;var S="PopoverTrigger",N=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(S,r),s=m(r),i=A(t,o.triggerRef),c=l.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":M(o.open),...n,ref:i,onClick:h(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?c:l.jsx(y,{asChild:!0,...s,children:c})});N.displayName=S;var R="PopoverPortal",[ae,ie]=b(R,{forceMount:void 0}),F=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,s=d(R,t);return l.jsx(ae,{scope:t,forceMount:r,children:l.jsx(E,{present:r||s.open,children:l.jsx(W,{asChild:!0,container:o,children:n})})})};F.displayName=R;var P="PopoverContent",D=a.forwardRef((e,t)=>{const r=ie(P,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,s=d(P,e.__scopePopover);return l.jsx(E,{present:n||s.open,children:s.modal?l.jsx(le,{...o,ref:t}):l.jsx(pe,{...o,ref:t})})});D.displayName=P;var ce=X("PopoverContent.RemoveScroll"),le=a.forwardRef((e,t)=>{const r=d(P,e.__scopePopover),n=a.useRef(null),o=A(t,n),s=a.useRef(!1);return a.useEffect(()=>{const i=n.current;if(i)return z(i)},[]),l.jsx(G,{as:ce,allowPinchZoom:!0,children:l.jsx(I,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:h(e.onCloseAutoFocus,i=>{i.preventDefault(),s.current||r.triggerRef.current?.focus()}),onPointerDownOutside:h(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,p=c.button===0&&c.ctrlKey===!0,u=c.button===2||p;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:h(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),pe=a.forwardRef((e,t)=>{const r=d(P,e.__scopePopover),n=a.useRef(!1),o=a.useRef(!1);return l.jsx(I,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(n.current||r.triggerRef.current?.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;r.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),I=a.forwardRef((e,t)=>
1{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:p,onFocusOutside:u,onInteractOutside:g,...f}=e,v=d(P,r),x=m(r);return B(),l.jsx(K,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:l.jsx(Z,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:g,onEscapeKeyDown:c,onPointerDownOutside:p,onFocusOutside:u,onDismiss:()=>v.onOpenChange(!1),children:l.jsx(J,{"data-state":M(v.open),role:"dialog",id:v.contentId,...x,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),T="PopoverClose",ue=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(T,r);return l.jsx(O.button,{type:"button",...n,ref:t,onClick:h(e.onClick,()=>o.onOpenChange(!1))})});ue.displayName=T;var de="PopoverArrow",fe=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=m(r);return l.jsx(Q,{...o,...n,ref:t})});fe.displayName=de;function M(e){return e?"open":"closed"}var ve=j,ge=N,Pe=F,k=D;const xe=ve,Re=ge,he=a.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},o)=>l.jsx(Pe,{children:l.jsx(k,{ref:o,align:t,sideOffset:r,className:U("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-popover-content-transform-origin)",e),...n})}));he.displayName=k.displayName;export{xe as P,Re as a,he as b};

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.