import{r as c,b as j}from"../vendor-8efd6c0a.js";var E={exports:{}},v={};/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var g=c,O=Symbol.for("react.element"),N=Symbol.for("react.fragment"),$=Object.prototype.hasOwnProperty,k=g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,D={key:!0,ref:!0,__self:!0,__source:!0};function P(e,t,n){var r,o={},s=null,i=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)$.call(t,r)&&!D.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:O,type:e,key:s,ref:i,props:o,_owner:k.current}}v.Fragment=N;v.jsx=P;v.jsxs=P;E.exports=v;var f=E.exports;function _(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function b(...e){return t=>{let n=!1;const r=e.map(o=>{const s=_(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():_(e[o],null)}}}}function I(...e){return c.useCallback(b(...e),e)}function L(e,t){const n=c.createContext(t),r=s=>{const{children:i,...u}=s,l=c.useMemo(()=>u,Object.values(u));return f.jsx(n.Provider,{value:l,children:i})};r.displayName=e+"Provider";function o(s){const i=c.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function T(e,t=[]){let n=[];function r(s,i){const u=c.createContext(i),l=n.length;n=[...n,i];const m=p=>{var S;const{scope:a,children:y,...d}=p,x=((S=a==null?void 0:a[e])==null?void 0:S[l])||u,R=c.useMemo(()=>d,Object.values(d));return f.jsx(x.Provider,{value:R,children:y})};m.displayName=s+"Provider";function C(p,a){var x;const y=((x=a==null?void 0:a[e])==null?void 0:x[l])||u,d=c.useContext(y);if(d)return d;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[m,C]}const o=()=>{const s=n.map(i=>c.createContext(i));return function(u){const l=(u==null?void 0:u[e])||s;return c.useMemo(()=>({[`__scope${e}`]:{...u,[e]:l}}),[u,l])}};return o.scopeName=e,[r,V(o,...t)]}function V(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((u,{useScope:l,scopeName:m})=>{const p=l(s)[`__scope${m}`];return{...u,...p}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var w=c.forwardRef((e,t)=>{const{children:n,...r}=e,o=c.Children.toArray(n),s=o.find(A);if(s){const i=s.props.children,u=o.map(l=>l===s?c.Children.count(i)>1?c.Children.only(null):c.isValidElement(i)?i.props.children:null:l);return f.jsx(h,{...r,ref:t,children:c.isValidElement(i)?c.cloneElement(i,void 0,u):null})}return f.jsx(h,{...r,ref:t,children:n})});w.displayName="Slot";var h=c.forwardRef((e,t)=>{const{children:n,...r}=e;if(c.isValidElement(n)){const o=B(n);return c.cloneElement(n,{...M(r,n.props),ref:t?b(t,o):o})}return c.Children.count(n)>1?c.Children.only(null):null});h.displayName="SlotClone";var W=({children:e})=>f.jsx(f.Fragment,{children:e});function A(e){return c.isValidElement(e)&&e.type===W}function M(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...u)=>{s(...u),o(...u)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function B(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var F=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],U=F.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:s,...i}=r,u=s?w:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(u,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function q(e,t){e&&j.flushSync(()=>e.dispatchEvent(t))}export{U as P,w as S,L as a,T as c,q as d,f as j,I as u};
