var ae=Object.defineProperty;var X=e=>{throw TypeError(e)};var ce=(e,t,n)=>t in e?ae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var T=(e,t,n)=>ce(e,typeof t!="symbol"?t+"":t,n),Y=(e,t,n)=>t.has(e)||X("Cannot "+n);var y=(e,t,n)=>(Y(e,t,"read from private field"),n?n.call(e):t.get(e)),x=(e,t,n)=>t.has(e)?X("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),j=(e,t,n,r)=>(Y(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);import{b6 as ue,bi as q,h as Q,i as J,aG as _,az as le,u as W,bj as fe,p as E,P as I,aZ as de,aN as pe,aO as ee,bk as me,Q as te,N as M,O as V,a as O,R as ne,c as he,aF as be,r as ve,f as ye}from"./nEbfNkJh.js";import"./Bzak7iHL.js";import{c as ge}from"./BpNSSBPP.js";import{p as B,i as Ee,r as re,s as _e}from"./zcqfpVBB.js";import{f as P,b as D,a as Se,c as we}from"./Xjya7ye4.js";function Ae(){return Symbol(ue)}function vt(e,t,n=t){var r=new WeakSet;q(e,"input",async o=>{var s=o?e.defaultValue:e.value;if(s=L(e)?N(s):s,n(s),_!==null&&r.add(_),await le(),s!==(s=t())){var a=e.selectionStart,u=e.selectionEnd,f=e.value.length;if(e.value=s??"",u!==null){var l=e.value.length;a===u&&u===f&&l>f?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=a,e.selectionEnd=Math.min(u,l))}}}),(Q&&e.defaultValue!==e.value||W(t)==null&&e.value)&&(n(L(e)?N(e.value):e.value),_!==null&&r.add(_)),J(()=>{var o=t();if(e===document.activeElement){var s=fe??_;if(r.has(s))return}L(e)&&o===N(e.value)||e.type==="date"&&!o&&!e.value||o!==e.value&&(e.value=o??"")})}function L(e){var t=e.type;return t==="number"||t==="range"}function N(e){return e===""?null:+e}function yt(e,t,n=t){q(e,"change",()=>{n(e.files)}),Q&&e.files&&n(e.files),J(()=>{e.files=t()})}function Te(e){return typeof e=="function"}function xe(e){return e!==null&&typeof e=="object"}const ke=["string","number","bigint","boolean"];function C(e){return e==null||ke.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>C(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}const S=Symbol("box"),U=Symbol("is-writable");function F(e,t){const n=I(e);return t?{[S]:!0,[U]:!0,get current(){return E(n)},set current(r){t(r)}}:{[S]:!0,get current(){return e()}}}function R(e){return xe(e)&&S in e}function oe(e){return R(e)&&U in e}function gt(e){return R(e)?e:Te(e)?F(e):Oe(e)}function Et(e){return Object.entries(e).reduce((t,[n,r])=>R(r)?(oe(r)?Object.defineProperty(t,n,{get(){return r.current},set(o){r.current=o}}):Object.defineProperty(t,n,{get(){return r.current}}),t):Object.assign(t,{[n]:r}),{})}function _t(e){return oe(e)?{[S]:!0,get current(){return e.current}}:e}function Oe(e){let t=de(pe(e));return{[S]:!0,[U]:!0,get current(){return E(t)},set current(n){ee(t,n,!0)}}}function Ie(...e){return function(t){var n;for(const r of e)if(r){if(t.defaultPrevented)return;typeof r=="function"?r.call(this,t):(n=r.current)==null||n.call(this,t)}}}var z=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Re=/\n/g,je=/^\s*/,Pe=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Le=/^:\s*/,Ne=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,We=/^[;\s]*/,Me=/^\s+|\s+$/g,Ve=` `,K="/",$="*",v="",Be="comment",Ce="declaration";function Fe(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(c){var i=c.match(Re);i&&(n+=i.length);var h=c.lastIndexOf(Ve);r=~h?c.length-h:r+c.length}function s(){var c={line:n,column:r};return function(i){return i.position=new a(c),l(),i}}function a(c){this.start=c,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function u(c){var i=new Error(t.source+":"+n+":"+r+": "+c);if(i.reason=c,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i}function f(c){var i=c.exec(e);if(i){var h=i[0];return o(h),e=e.slice(h.length),i}}function l(){f(je)}function m(c){var i;for(c=c||[];i=b();)i!==!1&&c.push(i);return c}function b(){var c=s();if(!(K!=e.charAt(0)||$!=e.charAt(1))){for(var i=2;v!=e.charAt(i)&&($!=e.charAt(i)||K!=e.charAt(i+1));)++i;if(i+=2,v===e.charAt(i-1))return u("End of comment missing");var h=e.slice(2,i-2);return r+=2,o(h),e=e.slice(i),r+=2,c({type:Be,comment:h})}}function p(){var c=s(),i=f(Pe);if(i){if(b(),!f(Le))return u("property missing ':'");var h=f(Ne),ie=c({type:Ce,property:Z(i[0].replace(z,v)),value:h?Z(h[0].replace(z,v)):v});return f(We),ie}}function d(){var c=[];m(c);for(var i;i=p();)i!==!1&&(c.push(i),m(c));return c}return l(),d()}function Z(e){return e?e.replace(Me,v):v}function Ge(e,t){let n=null;if(!e||typeof e!="string")return n;const r=Fe(e),o=typeof t=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:a,value:u}=s;o?t(a,u,s):u&&(n=n||{},n[a]=u)}),n}const Ue=/\d/,He=["-","_","/","."];function Xe(e=""){if(!Ue.test(e))return e!==e.toLowerCase()}function Ye(e){const t=[];let n="",r,o;for(const s of e){const a=He.includes(s);if(a===!0){t.push(n),n="",r=void 0;continue}const u=Xe(s);if(o===!1){if(r===!1&&u===!0){t.push(n),n=s,r=u;continue}if(r===!0&&u===!1&&n.length>1){const f=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=f+s,r=u;continue}}n+=s,r=u,o=a}return t.push(n),t}function se(e){return e?Ye(e).map(t=>ze(t)).join(""):""}function De(e){return Ke(se(e||""))}function ze(e){return e?e[0].toUpperCase()+e.slice(1):""}function Ke(e){return e?e[0].toLowerCase()+e.slice(1):""}function k(e){if(!e)return{};const t={};function n(r,o){if(r.startsWith("-moz-")||r.startsWith("-webkit-")||r.startsWith("-ms-")||r.startsWith("-o-")){t[se(r)]=o;return}if(r.startsWith("--")){t[r]=o;return}t[De(r)]=o}return Ge(e,n),t}function $e(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}function Ze(e,t){const n=RegExp(e,"g");return r=>{if(typeof r!="string")throw new TypeError(`expected an argument of type string, but got ${typeof r}`);return r.match(n)?r.replace(n,t):r}}const qe=Ze(/[A-Z]/,e=>`-${e.toLowerCase()}`);function Qe(e){if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${qe(t)}: ${e[t]};`).join(` `)}function Je(e={}){return Qe(e).replace(` `," ")}const et=["onabort","onanimationcancel","onanimationend","onanimationiteration","onanimationstart","onauxclick","onbeforeinput","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncompositionend","oncompositionstart","oncompositionupdate","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onfocusin","onfocusout","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onselectionchange","onselectstart","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitioncancel","ontransitionend","ontransitionrun","ontransitionstart","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel"],tt=new Set(et);function nt(e){return tt.has(e)}function rt(...e){const t={...e[0]};for(let n=1;nR(e)?(e.current=n,W(()=>t==null?void 0:t(n)),()=>{"isConnected"in n&&n.isConnected||(e.current=null,t==null||t(null))}):(e(n),W(()=>t==null?void 0:t(n)),()=>{"isConnected"in n&&n.isConnected||(e(null),t==null||t(null))})}}function St(e){return e?"true":"false"}function wt(e){return e?"":void 0}function At(e){return e?!0:void 0}function Tt(e){return e?"open":"closed"}function xt(e){return e?"checked":"unchecked"}function kt(e,t){return e?"true":"false"}var g,w;class st{constructor(t){x(this,g);x(this,w);T(this,"attrs");j(this,g,t.getVariant?t.getVariant():null),j(this,w,y(this,g)?`data-${y(this,g)}-`:`data-${t.component}-`),this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(t.parts.map(n=>[n,this.getAttr(n)]))}getAttr(t,n){return n?`data-${n}-${t}`:`${y(this,w)}${t}`}selector(t,n){return`[${this.getAttr(t,n)}]`}}g=new WeakMap,w=new WeakMap;function it(e){const t=new st(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}function at(e,t){return`bits-${e}`}const ct=it({component:"label",parts:["root"]});var A;const H=class H{constructor(t){T(this,"opts");T(this,"attachment");x(this,A,I(()=>({id:this.opts.id.current,[ct.root]:"",onmousedown:this.onmousedown,...this.attachment})));this.opts=t,this.attachment=ot(this.opts.ref),this.onmousedown=this.onmousedown.bind(this)}static create(t){return new H(t)}onmousedown(t){t.detail>1&&t.preventDefault()}get props(){return E(y(this,A))}set props(t){ee(y(this,A),t)}};A=new WeakMap;let G=H;var ut=ye("");function lt(e,t){const n=me();te(t,!0);let r=B(t,"id",19,()=>at(n)),o=B(t,"ref",15,null),s=re(t,["$$slots","$$events","$$legacy","children","child","id","ref","for"]);const a=G.create({id:F(()=>r()),ref:F(()=>o(),p=>o(p))}),u=I(()=>rt(s,a.props,{for:t.for}));var f=M(),l=V(f);{var m=p=>{var d=M(),c=V(d);D(c,()=>t.child,()=>({props:E(u)})),O(p,d)},b=p=>{var d=ut();Se(d,()=>({...E(u),for:t.for}));var c=he(d);D(c,()=>t.children??be),ve(d),O(p,d)};Ee(l,p=>{t.child?p(m):p(b,!1)})}O(e,f),ne()}function Ot(e,t){te(t,!0);let n=B(t,"ref",15,null),r=re(t,["$$slots","$$events","$$legacy","ref","class"]);var o=M(),s=V(o);{let a=I(()=>we("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",t.class));ge(s,()=>lt,(u,f)=>{f(u,_e({"data-slot":"label",get class(){return E(a)}},()=>r,{get ref(){return n()},set ref(l){n(l)}}))})}O(e,o),ne()}export{S as B,Ot as L,vt as a,yt as b,gt as c,F as d,Et as e,R as f,oe as g,xe as h,U as i,$e as j,ot as k,Tt as l,wt as m,St as n,it as o,Oe as p,Ie as q,at as r,Je as s,_t as t,rt as u,k as v,xt as w,kt as x,At as y};