1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[t]=`d74d1823-c0e4-49a2-a068-9012c3223508`)}catch{}})();import{r as e}from"./rolldown-runtime-Dp6oDxSW.js";import{n as t,t as n}from"./jsx-runtime-BN_2YB3D.js";import{r,t as i}from"./utils-Czoftbae.js";import{A as a,_ as o,g as s,n as c,s as l,v as u}from"./button-rXysb33J.js";import{i as d}from"./shadowDom-DIcOM6Al.js";import{t as f}from"./Separator-CeuvQxWv.js";import{n as p}from"./useRegisterFieldControl-CWcPG9vq.js";var m=r(),h=n();function g(e){let t=(0,m.c)(10),n,r,a;t[0]===e?(n=t[1],r=t[2],a=t[3]):({className:n,orientation:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a);let o=a===void 0?`horizontal`:a,s;t[4]===n?s=t[5]:(s=i(`shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch`,n),t[4]=n,t[5]=s);let c;return t[6]!==o||t[7]!==r||t[8]!==s?(c=(0,h.jsx)(f,{"data-slot":`separator`,orientation:o,className:s,...r}),t[6]=o,t[7]=r,t[8]=s,t[9]=c):c=t[9],c}function _(e){let t=(0,m.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,h.jsx)(`label`,{"data-slot":`label`,className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}function v(e){let t=(0,m.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,h.jsx)(`fieldset`,{"data-slot":`field-set`,className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}function y(e){let t=(0,m.c)(10),n,r,a;t[0]===e?(n=t[1],r=t[2],a=t[3]):({className:n,variant:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a);let o=a===void 0?`legend`:a,s;t[4]===n?s=t[5]:(s=i(`mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base`,n),t[4]=n,t[5]=s);let c;return t[6]!==r||t[7]!==s||t[8]!==o?(c=(0,h.jsx)(`legend`,{"data-slot":`field-legend`,"data-variant":o,className:s,...r}),t[6]=r,t[7]=s,t[8]=o,t[9]=c):c=t[9],c}function b(e){let t=(0,m.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,h.jsx)(`div`,{"data-slot":`field-group`,className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}var x=c(`group/field flex w-full gap-3 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:`flex-col *:w-full [&>.sr-only]:w-auto`,horizontal:`flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`,responsive:`flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`}},defaultVariants:{orientation:`vertical`}});function S(e){let t=(0,m.c)(11),n,r,a;t[0]===e?(n=t[1],r=t[2],a=t[3]):({className:n,orientation:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a);let o=a===void 0?`vertical`:a,s;t[4]!==n||t[5]!==o?(s=i(x({orientation:o}),n),t[4]=n,t[5]=o,t[6]=s):s=t[6];let c;return t[7]!==o||t[8]!==r||t[9]!==s?(c=(0,h.jsx)(`div`,{role:`group`,"data-slot":`field`,"data-orientation":o,className:s,...r}),t[7]=o,t[8]=r,t[9]=s,t[10]=c):c=t[10],c}function C(e){let t=(0,m.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`group/field-content flex flex-1 flex-col gap-1 leading-snug`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,h.jsx)(`div`,{"data-slot":`field-content`,className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}function w(e){let t=(0,m.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-xl has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-input/40 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-[3px] has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-4 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,h.jsx)(_,{"data-slot":`field-label`,className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}function T(e){let t=(0,m.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,h.jsx)(`div`,{"data-slot":`field-label`,className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}function E(e){let t=(0,m.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5`,`last:mt-0 nth-last-2:-mt-1`,`[&>a]:underline [&>a]:underline-offset-4 [&>
1a:hover]:text-primary`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,h.jsx)(`p`,{"data-slot":`field-description`,className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}function D(e){let t=(0,m.c)(15),n,r,a,o;t[0]===e?(n=t[1],r=t[2],a=t[3],o=t[4]):({className:r,children:n,errors:a,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=o);let s;bb0:{if(n){s=n;break bb0}if(!a?.length){s=null;break bb0}let e;t[5]===a?e=t[6]:(e=[...new Map(a.map(k)).values()],t[5]=a,t[6]=e);let r=e;if(r?.length==1){s=r[0]?.message;break bb0}let i;t[7]===r?i=t[8]:(i=(0,h.jsx)(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:r.map(O)}),t[7]=r,t[8]=i),s=i}let c=s;if(!c)return null;let l;t[9]===r?l=t[10]:(l=i(`text-sm font-normal text-destructive`,r),t[9]=r,t[10]=l);let u;return t[11]!==c||t[12]!==o||t[13]!==l?(u=(0,h.jsx)(`div`,{role:`alert`,"data-slot":`field-error`,className:l,...o,children:c}),t[11]=c,t[12]=o,t[13]=l,t[14]=u):u=t[14],u}function O(e,t){return e?.message&&(0,h.jsx)(`li`,{children:e.message},t)}function k(e){return[e?.message,e]}var A=e(t(),1);function j(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:c}=p(),f=d(t),m=n?i:void 0,h=u(()=>Symbol()),g=A.useRef(!1),_=A.useRef(t!=null),v=o(()=>{!g.current||c===l||(g.current=!1,c(h.current,void 0))});return s(()=>{if(c===l)return;let e;if(n){let n=r?.current;e=a(n)&&n.closest(`label`)!=null?t??null:m??f}else if(t!=null)_.current=!0,e=t;else if(_.current)e=f;else{v();return}if(e===void 0){v();return}g.current=!0,c(h.current,e)},[t,r,m,c,n,f,h,v]),A.useEffect(()=>v,[v]),i??f}export{D as a,y as c,_ as d,g as f,E as i,v as l,S as n,b as o,C as r,w as s,j as t,T as u}; 2//# chunkId=d74d1823-c0e4-49a2-a068-9012c3223508
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.