@enonic/ui 0.35.2 → 0.35.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/enonic-ui.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import{options as e,Fragment as t}from"preact";import{createContext as n,useContext as r,useId as o,useCallback as a,forwardRef as i,useState as s,useMemo as l,useEffect as c,createElement as d,useRef as u,useLayoutEffect as m,isValidElement as f,Children as g,createPortal as p,cloneElement as v}from"react";import{createPortal as b}from"react-dom";import{Slot as h,Root as y}from"@radix-ui/react-slot";import{FocusTrap as w}from"focus-trap-react";var x=0;function I(t,n,r,o,a,i){n||(n={});var s,l,c=n;if("ref"in c)for(l in c={},n)"ref"==l?s=n[l]:c[l]=n[l];var d={type:t,props:c,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--x,__i:-1,__u:0,__source:a,__self:i};if("function"==typeof t&&(s=t.defaultProps))for(l in s)void 0===c[l]&&(c[l]=s[l]);return e.vnode&&e.vnode(d),d}function N(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=N(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function k(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=N(e))&&(r&&(r+=" "),r+=t);return r}const C=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,D=k,M=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return D(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(e=>{const t=null==n?void 0:n[e],r=null==a?void 0:a[e];if(null===t)return null;const i=C(t)||C(r);return o[e][i]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...s}[t]):{...a,...s}[t]===n})?[...e,n,r]:e},[]);return D(e,i,l,null==n?void 0:n.class,null==n?void 0:n.className)},S=n(void 0),A=({value:e,children:t})=>/* @__PURE__ */I(S.Provider,{value:e,children:t});A.displayName="AvatarProvider";const z=()=>{const e=r(S);if(!e)throw new Error("useAvatar must be used within an Avatar");return e},R=n(void 0),P=({value:e,children:t})=>/* @__PURE__ */I(R.Provider,{value:e,children:t});P.displayName="ComboboxProvider";const O=()=>{const e=r(R);if(!e)throw new Error("useCombobox must be used within a ComboboxProvider");return e},E=n(void 0),T=({value:e,children:t})=>/* @__PURE__ */I(E.Provider,{value:e,children:t}),L=()=>{const e=r(E);if(!e)throw new Error("useContextMenu must be used within a ContextMenuProvider");return e},V=n(void 0),$=({value:e,children:t})=>/* @__PURE__ */I(V.Provider,{value:e,children:t});$.displayName="DatePickerProvider";const F=()=>{const e=r(V);if(!e)throw new Error("useDatePicker must be used within DatePickerProvider");return e},K=n(void 0),j=({value:e,children:t})=>/* @__PURE__ */I(K.Provider,{value:e,children:t});j.displayName="DialogProvider";const q=()=>{const e=r(K);if(!e)throw new Error("useDialog must be used within a DialogProvider");return e},B=n(null),G=()=>r(B),Y=n(void 0),W=({children:e,prefix:t})=>/* @__PURE__ */I(Y.Provider,{value:{prefix:t},children:e});W.displayName="IdProvider";const H=(e,t)=>{const n=o(),a=e??n,i=r(Y);return[i?.prefix,t,a].filter(Boolean).join("-")},_=n(void 0),U=({value:e,children:t})=>/* @__PURE__ */I(_.Provider,{value:e,children:t});U.displayName="ListboxProvider";const Z=()=>{const e=r(_);if(!e)throw new Error("useListbox must be used within a Listbox");return e},X=n(void 0),J=({value:e,children:t})=>/* @__PURE__ */I(X.Provider,{value:e,children:t}),Q=()=>{const e=r(X);if(!e)throw new Error("useMenu must be used within a MenuProvider");return e},ee=n(void 0),te=ee.Provider;function ne(){const e=r(ee);if(!e)throw new Error("useMenubarMenu must be used within a Menubar.Menu component");return e}function re(){return r(ee)}const oe=n(void 0),ae=({value:e,children:t})=>/* @__PURE__ */I(oe.Provider,{value:e,children:t});ae.displayName="MenubarProvider";const ie=()=>{const e=r(oe);if(!e)throw new Error("useMenubar must be used within a MenubarProvider");return e},se=()=>r(oe),le=n(void 0),ce=({value:e,children:t})=>/* @__PURE__ */I(le.Provider,{value:e,children:t});ce.displayName="RadioGroupProvider";const de=()=>{const e=r(le);if(!e)throw new Error("useRadioGroup must be used within a RadioGroupProvider");return e},ue=n(void 0),me=({value:e,children:t})=>/* @__PURE__ */I(ue.Provider,{value:e,children:t});me.displayName="SearchFieldProvider";const fe=()=>{const e=r(ue);if(!e)throw new Error("useSearchField must be used within a SearchFieldProvider");return e},ge=n(void 0),pe=({value:e,children:t})=>/* @__PURE__ */I(ge.Provider,{value:e,children:t});pe.displayName="SelectorProvider";const ve=()=>{const e=r(ge);if(!e)throw new Error("useSelector must be used within a SelectorProvider");return e},be=n(void 0),he=({value:e,children:t})=>/* @__PURE__ */I(be.Provider,{value:e,children:t});he.displayName="StepperProvider";const ye=()=>{const e=r(be);if(!e)throw new Error("useStepper must be used within a StepperProvider");return e},we=n(void 0),xe=({value:e,children:t})=>/* @__PURE__ */I(we.Provider,{value:e,children:t});xe.displayName="TabProvider";const Ie=()=>{const e=r(we);if(!e)throw new Error("useTab must be used within a TabProvider");return e},Ne=n(void 0),ke=({value:e,children:t})=>/* @__PURE__ */I(Ne.Provider,{value:e,children:t});ke.displayName="ToastProvider";const Ce=()=>{const e=r(Ne);if(!e)throw new Error("useToast must be used within a ToastProvider");return e},De=n(void 0),Me=({value:e,children:t})=>/* @__PURE__ */I(De.Provider,{value:e,children:t}),Se=()=>{const e=r(De);if(!e)throw new Error("useToggleGroup must be used within a ToggleGroupProvider");return e},Ae=n(void 0),ze=({value:e,children:t})=>/* @__PURE__ */I(Ae.Provider,{value:e,children:t}),Re=()=>{const e=r(Ae);if(!e)throw new Error("useTreeList must be used within a TreeListProvider");return e},Pe=n(void 0),Oe=({value:e,children:t})=>/* @__PURE__ */I(Pe.Provider,{value:e,children:t}),Ee=()=>{const e=r(Pe);if(!e)throw new Error("useVirtualizedTreeList must be used within a VirtualizedTreeListProvider");return e};function Te(e,t){return`${e}-${t}`}function Le(e,t){return t.reduce((t,n)=>(t[n]=Te(e,n),t),{})}function Ve(e,t,n){return`${e}-${t}-item-${n}`}function $e(e,t,n){if(n)return Ve(e,t,n)}const Fe=(e=/* @__PURE__ */new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ke="-",je=[],qe=e=>{const t=Ye(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return Ge(e);const n=e.split(Ke),r=""===n[0]&&n.length>1?1:0;return Be(n,r,t)},getConflictingClassGroupIds:(e,t)=>{if(t){const t=r[e],o=n[e];return t?o?((e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n})(o,t):t:o||je}return n[e]||je}}},Be=(e,t,n)=>{if(0===e.length-t)return n.classGroupId;const r=e[t],o=n.nextPart.get(r);if(o){const n=Be(e,t+1,o);if(n)return n}const a=n.validators;if(null===a)return;const i=0===t?e.join(Ke):e.slice(t).join(Ke),s=a.length;for(let l=0;l<s;l++){const e=a[l];if(e.validator(i))return e.classGroupId}},Ge=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?"arbitrary.."+r:void 0})(),Ye=e=>{const{theme:t,classGroups:n}=e;return We(n,t)},We=(e,t)=>{const n=Fe();for(const r in e){const o=e[r];He(o,n,r,t)}return n},He=(e,t,n,r)=>{const o=e.length;for(let a=0;a<o;a++){const o=e[a];_e(o,t,n,r)}},_e=(e,t,n,r)=>{"string"!=typeof e?"function"!=typeof e?Xe(e,t,n,r):Ze(e,t,n,r):Ue(e,t,n)},Ue=(e,t,n)=>{(""===e?t:Je(t,e)).classGroupId=n},Ze=(e,t,n,r)=>{Qe(e)?He(e(r),t,n,r):(null===t.validators&&(t.validators=[]),t.validators.push(((e,t)=>({classGroupId:e,validator:t}))(n,e)))},Xe=(e,t,n,r)=>{const o=Object.entries(e),a=o.length;for(let i=0;i<a;i++){const[e,a]=o[i];He(a,Je(t,e),n,r)}},Je=(e,t)=>{let n=e;const r=t.split(Ke),o=r.length;for(let a=0;a<o;a++){const e=r[a];let t=n.nextPart.get(e);t||(t=Fe(),n.nextPart.set(e,t)),n=t}return n},Qe=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,et=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=/* @__PURE__ */Object.create(null),r=/* @__PURE__ */Object.create(null);const o=(o,a)=>{n[o]=a,t++,t>e&&(t=0,r=n,n=/* @__PURE__ */Object.create(null))};return{get(e){let t=n[e];return void 0!==t?t:void 0!==(t=r[e])?(o(e,t),t):void 0},set(e,t){e in n?n[e]=t:o(e,t)}}},tt=[],nt=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),rt=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=e=>{const t=[];let n,r=0,o=0,a=0;const i=e.length;for(let d=0;d<i;d++){const i=e[d];if(0===r&&0===o){if(":"===i){t.push(e.slice(a,d)),a=d+1;continue}if("/"===i){n=d;continue}}"["===i?r++:"]"===i?r--:"("===i?o++:")"===i&&o--}const s=0===t.length?e:e.slice(a);let l=s,c=!1;s.endsWith("!")?(l=s.slice(0,-1),c=!0):s.startsWith("!")&&(l=s.slice(1),c=!0);return nt(t,c,l,n&&n>a?n-a:void 0)};if(t){const e=t+":",n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):nt(tt,!1,t,void 0,!0)}if(n){const e=r;r=t=>n({className:t,parseClassName:e})}return r},ot=e=>{const t=/* @__PURE__ */new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{const n=[];let r=[];for(let o=0;o<e.length;o++){const a=e[o],i="["===a[0],s=t.has(a);i||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},at=/\s+/,it=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=it(e[r]))&&(n&&(n+=" "),n+=t);return n},st=[],lt=e=>{const t=t=>t[e]||st;return t.isThemeGetter=!0,t},ct=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,dt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ut=/^\d+\/\d+$/,mt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ft=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,gt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,pt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,bt=e=>ut.test(e),ht=e=>!!e&&!Number.isNaN(Number(e)),yt=e=>!!e&&Number.isInteger(Number(e)),wt=e=>e.endsWith("%")&&ht(e.slice(0,-1)),xt=e=>mt.test(e),It=()=>!0,Nt=e=>ft.test(e)&&!gt.test(e),kt=()=>!1,Ct=e=>pt.test(e),Dt=e=>vt.test(e),Mt=e=>!At(e)&&!Tt(e),St=e=>qt(e,Wt,kt),At=e=>ct.test(e),zt=e=>qt(e,Ht,Nt),Rt=e=>qt(e,_t,ht),Pt=e=>qt(e,Gt,kt),Ot=e=>qt(e,Yt,Dt),Et=e=>qt(e,Zt,Ct),Tt=e=>dt.test(e),Lt=e=>Bt(e,Ht),Vt=e=>Bt(e,Ut),$t=e=>Bt(e,Gt),Ft=e=>Bt(e,Wt),Kt=e=>Bt(e,Yt),jt=e=>Bt(e,Zt,!0),qt=(e,t,n)=>{const r=ct.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},Bt=(e,t,n=!1)=>{const r=dt.exec(e);return!!r&&(r[1]?t(r[1]):n)},Gt=e=>"position"===e||"percentage"===e,Yt=e=>"image"===e||"url"===e,Wt=e=>"length"===e||"size"===e||"bg-size"===e,Ht=e=>"length"===e,_t=e=>"number"===e,Ut=e=>"family-name"===e,Zt=e=>"shadow"===e,Xt=/* @__PURE__ */((e,...t)=>{let n,r,o,a;const i=e=>{const t=r(e);if(t)return t;const a=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=t,i=[],s=e.trim().split(at);let l="";for(let c=s.length-1;c>=0;c-=1){const e=s[c],{isExternal:t,modifiers:d,hasImportantModifier:u,baseClassName:m,maybePostfixModifierPosition:f}=n(e);if(t){l=e+(l.length>0?" "+l:l);continue}let g=!!f,p=r(g?m.substring(0,f):m);if(!p){if(!g){l=e+(l.length>0?" "+l:l);continue}if(p=r(m),!p){l=e+(l.length>0?" "+l:l);continue}g=!1}const v=0===d.length?"":1===d.length?d[0]:a(d).join(":"),b=u?v+"!":v,h=b+p;if(i.indexOf(h)>-1)continue;i.push(h);const y=o(p,g);for(let n=0;n<y.length;++n){const e=y[n];i.push(b+e)}l=e+(l.length>0?" "+l:l)}return l})(e,n);return o(e,a),a};return a=s=>{const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:et(e.cacheSize),parseClassName:rt(e),sortModifiers:ot(e),...qe(e)}))(l),r=n.cache.get,o=n.cache.set,a=i,i(s)},(...e)=>a(((...e)=>{let t,n,r=0,o="";for(;r<e.length;)(t=e[r++])&&(n=it(t))&&(o&&(o+=" "),o+=n);return o})(...e))})(()=>{const e=lt("color"),t=lt("font"),n=lt("text"),r=lt("font-weight"),o=lt("tracking"),a=lt("leading"),i=lt("breakpoint"),s=lt("container"),l=lt("spacing"),c=lt("radius"),d=lt("shadow"),u=lt("inset-shadow"),m=lt("text-shadow"),f=lt("drop-shadow"),g=lt("blur"),p=lt("perspective"),v=lt("aspect"),b=lt("ease"),h=lt("animate"),y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Tt,At],w=()=>[Tt,At,l],x=()=>[bt,"full","auto",...w()],I=()=>[yt,"none","subgrid",Tt,At],N=()=>["auto",{span:["full",yt,Tt,At]},yt,Tt,At],k=()=>[yt,"auto",Tt,At],C=()=>["auto","min","max","fr",Tt,At],D=()=>["auto",...w()],M=()=>[bt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],S=()=>[e,Tt,At],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",$t,Pt,{position:[Tt,At]}],z=()=>["auto","cover","contain",Ft,St,{size:[Tt,At]}],R=()=>[wt,Lt,zt],P=()=>["","none","full",c,Tt,At],O=()=>["",ht,Lt,zt],E=()=>[ht,wt,$t,Pt],T=()=>["","none",g,Tt,At],L=()=>["none",ht,Tt,At],V=()=>["none",ht,Tt,At],$=()=>[ht,Tt,At],F=()=>[bt,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[xt],breakpoint:[xt],color:[It],container:[xt],"drop-shadow":[xt],ease:["in","out","in-out"],font:[Mt],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[xt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[xt],shadow:[xt],spacing:["px",ht],text:[xt],"text-shadow":[xt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",bt,At,Tt,v]}],container:["container"],columns:[{columns:[ht,At,Tt,s]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:y()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:x()}],"inset-x":[{"inset-x":x()}],"inset-y":[{"inset-y":x()}],start:[{start:x()}],end:[{end:x()}],top:[{top:x()}],right:[{right:x()}],bottom:[{bottom:x()}],left:[{left:x()}],visibility:["visible","invisible","collapse"],z:[{z:[yt,"auto",Tt,At]}],basis:[{basis:[bt,"full","auto",s,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ht,bt,"auto","initial","none",At]}],grow:[{grow:["",ht,Tt,At]}],shrink:[{shrink:["",ht,Tt,At]}],order:[{order:[yt,"first","last","none",Tt,At]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":C()}],"auto-rows":[{"auto-rows":C()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[s,"screen",...M()]}],"min-w":[{"min-w":[s,"screen","none",...M()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...M()]}],h:[{h:["screen","lh",...M()]}],"min-h":[{"min-h":["screen","lh","none",...M()]}],"max-h":[{"max-h":["screen","lh",...M()]}],"font-size":[{text:["base",n,Lt,zt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Tt,Rt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",wt,At]}],"font-family":[{font:[Vt,At,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Tt,At]}],"line-clamp":[{"line-clamp":[ht,"none",Tt,Rt]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":["none",Tt,At]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Tt,At]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:S()}],"text-color":[{text:S()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[ht,"from-font","auto",Tt,zt]}],"text-decoration-color":[{decoration:S()}],"underline-offset":[{"underline-offset":[ht,"auto",Tt,At]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Tt,At]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Tt,At]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:A()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},yt,Tt,At],radial:["",Tt,At],conic:[yt,Tt,At]},Kt,Ot]}],"bg-color":[{bg:S()}],"gradient-from-pos":[{from:R()}],"gradient-via-pos":[{via:R()}],"gradient-to-pos":[{to:R()}],"gradient-from":[{from:S()}],"gradient-via":[{via:S()}],"gradient-to":[{to:S()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:O()}],"border-w-x":[{"border-x":O()}],"border-w-y":[{"border-y":O()}],"border-w-s":[{"border-s":O()}],"border-w-e":[{"border-e":O()}],"border-w-t":[{"border-t":O()}],"border-w-r":[{"border-r":O()}],"border-w-b":[{"border-b":O()}],"border-w-l":[{"border-l":O()}],"divide-x":[{"divide-x":O()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":O()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:S()}],"border-color-x":[{"border-x":S()}],"border-color-y":[{"border-y":S()}],"border-color-s":[{"border-s":S()}],"border-color-e":[{"border-e":S()}],"border-color-t":[{"border-t":S()}],"border-color-r":[{"border-r":S()}],"border-color-b":[{"border-b":S()}],"border-color-l":[{"border-l":S()}],"divide-color":[{divide:S()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[ht,Tt,At]}],"outline-w":[{outline:["",ht,Lt,zt]}],"outline-color":[{outline:S()}],shadow:[{shadow:["","none",d,jt,Et]}],"shadow-color":[{shadow:S()}],"inset-shadow":[{"inset-shadow":["none",u,jt,Et]}],"inset-shadow-color":[{"inset-shadow":S()}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:S()}],"ring-offset-w":[{"ring-offset":[ht,zt]}],"ring-offset-color":[{"ring-offset":S()}],"inset-ring-w":[{"inset-ring":O()}],"inset-ring-color":[{"inset-ring":S()}],"text-shadow":[{"text-shadow":["none",m,jt,Et]}],"text-shadow-color":[{"text-shadow":S()}],opacity:[{opacity:[ht,Tt,At]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ht]}],"mask-image-linear-from-pos":[{"mask-linear-from":E()}],"mask-image-linear-to-pos":[{"mask-linear-to":E()}],"mask-image-linear-from-color":[{"mask-linear-from":S()}],"mask-image-linear-to-color":[{"mask-linear-to":S()}],"mask-image-t-from-pos":[{"mask-t-from":E()}],"mask-image-t-to-pos":[{"mask-t-to":E()}],"mask-image-t-from-color":[{"mask-t-from":S()}],"mask-image-t-to-color":[{"mask-t-to":S()}],"mask-image-r-from-pos":[{"mask-r-from":E()}],"mask-image-r-to-pos":[{"mask-r-to":E()}],"mask-image-r-from-color":[{"mask-r-from":S()}],"mask-image-r-to-color":[{"mask-r-to":S()}],"mask-image-b-from-pos":[{"mask-b-from":E()}],"mask-image-b-to-pos":[{"mask-b-to":E()}],"mask-image-b-from-color":[{"mask-b-from":S()}],"mask-image-b-to-color":[{"mask-b-to":S()}],"mask-image-l-from-pos":[{"mask-l-from":E()}],"mask-image-l-to-pos":[{"mask-l-to":E()}],"mask-image-l-from-color":[{"mask-l-from":S()}],"mask-image-l-to-color":[{"mask-l-to":S()}],"mask-image-x-from-pos":[{"mask-x-from":E()}],"mask-image-x-to-pos":[{"mask-x-to":E()}],"mask-image-x-from-color":[{"mask-x-from":S()}],"mask-image-x-to-color":[{"mask-x-to":S()}],"mask-image-y-from-pos":[{"mask-y-from":E()}],"mask-image-y-to-pos":[{"mask-y-to":E()}],"mask-image-y-from-color":[{"mask-y-from":S()}],"mask-image-y-to-color":[{"mask-y-to":S()}],"mask-image-radial":[{"mask-radial":[Tt,At]}],"mask-image-radial-from-pos":[{"mask-radial-from":E()}],"mask-image-radial-to-pos":[{"mask-radial-to":E()}],"mask-image-radial-from-color":[{"mask-radial-from":S()}],"mask-image-radial-to-color":[{"mask-radial-to":S()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[ht]}],"mask-image-conic-from-pos":[{"mask-conic-from":E()}],"mask-image-conic-to-pos":[{"mask-conic-to":E()}],"mask-image-conic-from-color":[{"mask-conic-from":S()}],"mask-image-conic-to-color":[{"mask-conic-to":S()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:A()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Tt,At]}],filter:[{filter:["","none",Tt,At]}],blur:[{blur:T()}],brightness:[{brightness:[ht,Tt,At]}],contrast:[{contrast:[ht,Tt,At]}],"drop-shadow":[{"drop-shadow":["","none",f,jt,Et]}],"drop-shadow-color":[{"drop-shadow":S()}],grayscale:[{grayscale:["",ht,Tt,At]}],"hue-rotate":[{"hue-rotate":[ht,Tt,At]}],invert:[{invert:["",ht,Tt,At]}],saturate:[{saturate:[ht,Tt,At]}],sepia:[{sepia:["",ht,Tt,At]}],"backdrop-filter":[{"backdrop-filter":["","none",Tt,At]}],"backdrop-blur":[{"backdrop-blur":T()}],"backdrop-brightness":[{"backdrop-brightness":[ht,Tt,At]}],"backdrop-contrast":[{"backdrop-contrast":[ht,Tt,At]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ht,Tt,At]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ht,Tt,At]}],"backdrop-invert":[{"backdrop-invert":["",ht,Tt,At]}],"backdrop-opacity":[{"backdrop-opacity":[ht,Tt,At]}],"backdrop-saturate":[{"backdrop-saturate":[ht,Tt,At]}],"backdrop-sepia":[{"backdrop-sepia":["",ht,Tt,At]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Tt,At]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ht,"initial",Tt,At]}],ease:[{ease:["linear","initial",b,Tt,At]}],delay:[{delay:[ht,Tt,At]}],animate:[{animate:["none",h,Tt,At]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,Tt,At]}],"perspective-origin":[{"perspective-origin":y()}],rotate:[{rotate:L()}],"rotate-x":[{"rotate-x":L()}],"rotate-y":[{"rotate-y":L()}],"rotate-z":[{"rotate-z":L()}],scale:[{scale:V()}],"scale-x":[{"scale-x":V()}],"scale-y":[{"scale-y":V()}],"scale-z":[{"scale-z":V()}],"scale-3d":["scale-3d"],skew:[{skew:$()}],"skew-x":[{"skew-x":$()}],"skew-y":[{"skew-y":$()}],transform:[{transform:[Tt,At,"","none","gpu","cpu"]}],"transform-origin":[{origin:y()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:F()}],"translate-x":[{"translate-x":F()}],"translate-y":[{"translate-y":F()}],"translate-z":[{"translate-z":F()}],"translate-none":["translate-none"],accent:[{accent:S()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:S()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Tt,At]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Tt,At]}],fill:[{fill:["none",...S()]}],"stroke-w":[{stroke:[ht,Lt,zt,Rt]}],stroke:[{stroke:["none",...S()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Jt(...e){return Xt(k(e))}function Qt(e,t){if(e)if("function"==typeof e)e(t);else if(function(e){return null!==e&&"object"==typeof e&&"current"in e}(e))try{e.current=t}catch{}}function en(...e){return a(t=>{e.forEach(e=>{Qt(e,t)})},e)}function tn(e){return function(e){return!!(e&&"object"==typeof e&&"value"in e&&"peek"in e&&"function"==typeof e.peek&&"subscribe"in e&&"function"==typeof e.subscribe)}(e)?e.value:e}const nn=M("relative flex shrink-0 overflow-hidden",{variants:{size:{sm:"size-6 text-xs",md:"size-8 text-sm",lg:"size-12 text-base"},shape:{circle:"rounded-full",square:"rounded-md"}},defaultVariants:{size:"md",shape:"circle"}}),rn=i(({children:e,className:t,size:n,shape:r,...o},i)=>{const[c,d]=s("idle"),u=a(e=>{d(e)},[]),m=l(()=>({imageLoadingStatus:c,onImageLoadingStatusChange:u}),[c,u]);/* @__PURE__ */
|
|
2
2
|
return I(A,{value:m,children:/* @__PURE__ */I("span",{ref:i,className:Jt(nn({size:n,shape:r}),t),...o,children:e})})});rn.displayName="AvatarRoot";const on=i(({src:e,alt:t,className:n,onLoadingStatusChange:r,...o},a)=>{const{imageLoadingStatus:i,onImageLoadingStatusChange:l}=z(),[d,u]=s(!1);return c(()=>{if(u(!1),!e)return;l("loading"),r?.("loading");const t=new Image,n=()=>{l("loaded"),r?.("loaded")},o=()=>{u(!0),l("error"),r?.("error")};return t.addEventListener("load",n),t.addEventListener("error",o),t.src=e,()=>{t.removeEventListener("load",n),t.removeEventListener("error",o)}},[e,l,r]),!e||d||"error"===i?null:/* @__PURE__ */I("img",{ref:a,src:e,alt:t,className:Jt("aspect-square h-full w-full object-cover",n),...o})});on.displayName="AvatarImage";const an=i(({children:e,className:t,delayMs:n=0,...r},o)=>{const{imageLoadingStatus:a}=z(),[i,l]=s(0===n);c(()=>{if(0===n)return;const e=setTimeout(()=>{l(!0)},n);return()=>{clearTimeout(e)}},[n]);return i&&("idle"===a||"error"===a)?/* @__PURE__ */I("span",{ref:o,className:Jt("flex h-full w-full items-center justify-center","cursor-default bg-surface-secondary font-medium text-alt uppercase",t),...r,children:e}):null});an.displayName="AvatarFallback";const sn=Object.assign(rn,{Root:rn,Image:on,Fallback:an}),ln=M(["inline-flex items-center justify-center","font-semibold text-main","box-border rounded-sm transition-highlight","focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring focus-visible:ring-offset-3 focus-visible:ring-offset-ring-offset","group-data-[tone=inverse]:[--color-ring-offset:var(--color-surface-selected)] group-data-[tone=inverse]:[--color-ring:var(--color-ring-alt)]","active:bg-btn-active active:text-alt data-[active=true]:bg-btn-active data-[active=true]:text-alt","disabled:pointer-events-none disabled:select-none disabled:opacity-30","cursor-pointer overflow-hidden text-ellipsis whitespace-nowrap"],{variants:{variant:{text:"bg-btn-primary hover:bg-btn-primary-hover hover:text-main",filled:"bg-btn-secondary hover:bg-btn-secondary-hover hover:text-main",solid:"bg-btn-tertiary text-alt hover:bg-btn-tertiary-hover",outline:"border border-bdr-strong bg-btn-primary hover:bg-btn-primary-hover"},size:{sm:"h-9 gap-2 px-3.5 text-sm",md:"h-10 gap-2.5 px-3.5 text-base",lg:"h-11.5 gap-3 px-4 text-lg"}},defaultVariants:{variant:"text",size:"md"}}),cn=i(({className:e,variant:t="text",size:n="md",iconSize:r,iconStrokeWidth:o=1.5,startIcon:a,label:i,endIcon:s,title:l,children:c,disabled:d,...u},m)=>{const f=a,g=s,p=(e=>{if("number"==typeof e)return e;switch(e){case"sm":return 14;case"md":return 20;case"lg":return 24}})(r??n??"md");/* @__PURE__ */
|
|
3
|
-
return I("button",{ref:m,type:"button",className:Jt(ln({variant:t,size:n}),e),title:l,"aria-label":l??i,"aria-disabled":d,"data-disabled":d??void 0,disabled:d,...u,children:[f&&/* @__PURE__ */I(f,{size:p,strokeWidth:o}),c,i,g&&/* @__PURE__ */I(g,{size:p,strokeWidth:o})]})});cn.displayName="Button";const dn=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},un=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),mn=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};var fn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const gn=i(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...s},l)=>d("svg",{ref:l,...fn,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:un("lucide",o),...!a&&!mn(s)&&{"aria-hidden":"true"},...s},[...i.map(([e,t])=>d(e,t)),...Array.isArray(a)?a:[a]])),pn=(e,t)=>{const n=i(({className:n,...r},o)=>{return d(gn,{ref:o,iconNode:t,className:un(`lucide-${a=dn(e),a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r});var a});return n.displayName=dn(e),n},vn=pn("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),bn=pn("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),hn=pn("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),yn=pn("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),wn=pn("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),xn=pn("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),In=pn("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),Nn=pn("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),kn=pn("circle-dot",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]),Cn=pn("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),Dn=pn("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),Mn=pn("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),Sn=pn("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),An=pn("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),zn=pn("lock-keyhole",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]),Rn=pn("octagon-alert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]),Pn=pn("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),On=pn("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]),En=pn("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Tn({ref:e,isActive:t,disabled:n,focusMode:r="roving-tabindex",checkFocusWithin:o}){c(()=>{if(e?.current&&"activedescendant"!==r&&!n&&t&&document.activeElement!==e.current){if(o?.enabled){const t=e.current.closest(`[role="${o.containerRole}"]`),n=t?.contains(document.activeElement);if(!n)return}"function"==typeof e.current.focus&&e.current.focus()}},[t,n,r,o,e])}function Ln({enabled:e,contentRef:t,excludeRefs:n=[],onPointerDownOutside:r,onInteractOutside:o,onClose:i}){const s=a(e=>{const a=e.target;if(a instanceof Node&&!t.current?.contains(a)){for(const e of n)if(e?.current?.contains(a))return;r?.(e),o?.(e),e.defaultPrevented||i?.()}},[t,n,r,o,i]);c(()=>{if(e)return document.addEventListener("pointerdown",s),()=>{document.removeEventListener("pointerdown",s)}},[e,s])}function Vn(e,t,n){const[r,o]=s(t),i=void 0!==e,l=i?e:r,d=u(e),m=u(i);c(()=>{i&&e!==d.current&&o(e),m.current&&!i&&o(t),d.current=e,m.current=i},[i,e,t]);const f=u(l),g=u(i),p=u(n);f.current=l,g.current=i,p.current=n;return[l,a(e=>{const t=f.current,n=function(e){return"function"==typeof e}(e)?e(t):e;f.current=n,g.current||o(n),p.current?.(n)},[])]}function $n(e,t,n){const r=null===e?void 0:e,o=u(n);o.current=n;const i=a(e=>{o.current?.(e??null)},[]),[s,l]=Vn(r,t,i);return[s,a(e=>{l("function"==typeof e?t=>e(t)??void 0:e??void 0)},[l])]}function Fn({enabled:e,triggerRef:t,contentRef:n,align:r="start"}){const[o,a]=s(null);return c(()=>{if(!e||!t?.current||!n?.current)return;const o=()=>{if(!t.current||!n.current)return;const e=t.current.getBoundingClientRect(),o=n.current.getBoundingClientRect(),i=window.innerWidth,s=window.innerHeight;let l,c,d=e.bottom;if(d+o.height>s-10){const t=e.top-o.height;t>=10&&(d=t)}"start"===r?(l=e.left,l+o.width>i-10&&(l=void 0,c=i-e.right)):(c=i-e.right,e.right-o.width<10&&(c=void 0,l=e.left)),a({top:d,left:l,right:c})};return o(),window.addEventListener("resize",o),window.addEventListener("scroll",o,!0),()=>{window.removeEventListener("resize",o),window.removeEventListener("scroll",o,!0)}},[e,r,t,n]),o}function Kn(){const e=u(/* @__PURE__ */new Map),[t,n]=s(0),r=a(()=>{n(e=>e+1)},[]);return{registerItem:a((t,n=!1)=>{e.current.set(t,{disabled:n}),r()},[r]),unregisterItem:a(t=>{e.current.delete(t)&&r()},[r]),getItems:a(()=>Array.from(e.current.keys()).sort((e,t)=>{let n=document.querySelector(`[data-registry-id="${e}"]`),r=document.querySelector(`[data-registry-id="${t}"]`);if(n||(n=document.getElementById(e)),r||(r=document.getElementById(t)),!n||!r)return 0;const o=n.compareDocumentPosition(r);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0}),[]),isItemDisabled:a(t=>e.current.get(t)?.disabled??!1,[]),registryVersion:t}}function jn(){const e=u(/* @__PURE__ */new Map);return{registerItemText:a((t,n)=>{e.current.set(t,n)},[]),unregisterItemText:a(t=>{e.current.delete(t)},[]),getItemText:a(t=>e.current.get(t),[])}}function qn(e){const{getItems:t,isItemDisabled:n,active:r,setActive:o,loop:i=!1,orientation:s="vertical",onSelect:l,onEscape:c}=e,d=a(e=>{const a=t();if(!a.length)return;const s=r?a.indexOf(r):-1;let l,c=0;const d=a.length;for(l=-1===s?e>0?0:a.length-1:s+e;c<d;){if(i)l<0?l=a.length-1:l>=a.length&&(l=0);else if(l<0||l>=a.length)return;const t=a[l];if(t&&!n(t))return void o(t);l+=e,c++}},[t,r,o,i,n]),u=a(e=>{const a=t();if(!a.length)return;const i="vertical"===s,u=i?"ArrowDown":"ArrowRight",m=i?"ArrowUp":"ArrowLeft";switch(e.key){case u:e.preventDefault(),d(1);break;case m:e.preventDefault(),d(-1);break;case"Home":e.preventDefault();{const e=a.find(e=>!n(e));e&&o(e)}break;case"End":e.preventDefault();{const e=[...a].reverse().find(e=>!n(e));e&&o(e)}break;case"Enter":case" ":e.preventDefault(),r&&!n(r)&&l?.(r);break;case"Escape":e.preventDefault(),c?.()}},[t,r,d,o,n,s,l,c]);return{moveActive:d,handleKeyDown:u}}const Bn=10;function Gn({enabled:e,mousePosition:t,contentRef:n}){const[r,o]=s(null);return c(()=>{if(!e||!t||!n?.current)return;const r=()=>{if(!n.current)return;const e=n.current.getBoundingClientRect(),r=window.innerWidth,a=window.innerHeight;let i=t.y,s=t.x;if(i+e.height>a-Bn){const n=t.y-e.height;i=n>=Bn?n:Math.max(Bn,a-e.height-Bn)}if(s+e.width>r-Bn){const n=t.x-e.width;s=n>=Bn?n:Math.max(Bn,r-e.width-Bn)}o({top:i,left:s})};return r(),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}},[e,t,n]),c(()=>{e||o(null)},[e]),r}const Yn=(e,t)=>{const n=G();c(()=>{const r=e.current;if(r&&t&&n)return n.register(r),()=>n.unregister(r)},[e,t,n])};function Wn(e){const{baseId:t,getItems:n,getItemId:r,value:o,onValueChange:i,isItemDisabled:s,loop:l=!1,orientation:c="vertical"}=e,d=a(e=>{e&&(i(e),r&&requestAnimationFrame(()=>{document.getElementById(r(t,e))?.focus()}))},[t,i,r]),{handleKeyDown:u}=qn({getItems:n,isItemDisabled:s,active:o,setActive:d,loop:l,orientation:c});return{handleKeyDown:u}}function Hn({id:e,active:t,disabled:n,getItems:r,isItemDisabled:o,focusMode:a="roving-tabindex"}){return l(()=>{if("activedescendant"===a)return{isFocusable:!1,tabIndex:-1};if(n)return{isFocusable:!1,tabIndex:-1};const i=r(),s=i.length>0?i[0]:void 0,l=(t??i.find(e=>!o(e))??s??e)===e;return{isFocusable:l,tabIndex:l?0:-1}},[e,t,n,r,o,a])}function _n({containerRef:e,activeId:t,orientation:n="vertical",buildElementId:r}){c(()=>{if(!t||!e?.current)return;const o=r?r(t):t,a=e.current.querySelector(`#${o}`);a&&a.scrollIntoView({block:"nearest",inline:"horizontal"===n?"nearest":void 0,behavior:"auto"})},[t,e,n,r])}const Un=(e,t)=>{c(()=>{if(!e)return;const n=t??document.body,r=n.style.overflow;return n.style.overflow="hidden",()=>{n.style.overflow=r}},[e,t])};function Zn(e){const{getItems:t,isItemDisabled:n,getItemText:r,active:o,setActive:i,onMatch:s,timeout:l=500}=e,c=u(""),d=u(null),m=a(()=>{c.current="",d.current&&(clearTimeout(d.current),d.current=null)},[]);return{handleTypeAhead:a(e=>{d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{c.current="",d.current=null},l);const a=t();if(!a.length)return;const u=e.toLowerCase(),m=c.current+u;c.current=m;if(m.length>1&&m.split("").every(e=>e===u)){const e=a.filter(e=>{if(n(e))return!1;const t=r(e);return t?.toLowerCase().startsWith(u)});if(0===e.length)return;const t=o?e.indexOf(o):-1,l=e[(t+1)%e.length];l&&(i(l),s?.(l))}else{const e=o?a.indexOf(o):-1,t=e>=0?[...a.slice(e+1),...a.slice(0,e+1)]:a;for(const o of t){if(n(o))continue;const e=r(o);if(e?.toLowerCase().startsWith(m))return i(o),void s?.(o)}if(m.length>1)for(const o of a){if(n(o))continue;const e=r(o);if(e?.toLowerCase().startsWith(u))return c.current=u,i(o),void s?.(o)}}},[t,n,r,o,i,s,l]),resetSearch:m}}function Xn(e){const{getItems:t,isItemDisabled:n,getItemText:r,active:o,setActive:i,value:s,open:l,setOpenInternal:c,setOpen:d,disabled:u,onSelect:m}=e,{handleKeyDown:f}=qn({getItems:t,isItemDisabled:n,active:o,setActive:i,loop:!1,orientation:"vertical",onSelect:m,onEscape:()=>d(!1)}),{handleTypeAhead:g}=Zn({getItems:t,isItemDisabled:n,getItemText:r,active:o,setActive:i});return{keyHandler:a(e=>{if(!u){if(!l&&["ArrowDown","ArrowUp","Enter"," ","Home","End"].includes(e.key)){e.preventDefault(),c(!0);const r="End"===e.key,o=10;let a=0;const l=()=>{const e=t();if(e.length>0)if(r){const t=[...e].reverse().find(e=>!n(e));t&&i(t)}else{const t=(s&&e.includes(s)&&!n(s)?s:null)||e.find(e=>!n(e));t&&i(t)}else a<o&&(a++,requestAnimationFrame(l))};return void requestAnimationFrame(l)}if(l&&"Tab"===e.key)o?m(o):d(!1);else{if(l&&("PageUp"===e.key||"PageDown"===e.key)){e.preventDefault();const r=t();if(0===r.length)return;const a=o?r.indexOf(o):-1,s="PageDown"===e.key?10:-10;let l=a+s;l<0&&(l=0),l>=r.length&&(l=r.length-1);const c=s>0?1:-1;let d=r[l];for(;l>=0&&l<r.length&&d&&n(d);)l+=c,d=r[l];return void(l>=0&&l<r.length&&d&&!n(d)&&i(d))}if(1!==e.key.length||" "===e.key||e.ctrlKey||e.metaKey||e.altKey)f(e);else if(e.preventDefault(),l)g(e.key);else{c(!0);const n=10;let r=0;const o=()=>{t().length>0?g(e.key):r<n&&(r++,requestAnimationFrame(o))};requestAnimationFrame(o)}}}},[u,l,o,s,t,n,c,d,i,m,g,f])}}function Jn(e){const{baseId:t,getItems:n,getButtonId:r,value:o,onValueChange:i,isItemDisabled:s,registryVersion:c}=e,d=l(()=>n(),[n,c]),u=a(e=>{i(e),r&&requestAnimationFrame(()=>{const n=document.getElementById(r(t,e));n?.focus()})},[t,i,r]),m=null!=o?d.indexOf(o):-1,f=0===m,g=m===d.length-1,p=l(()=>{if(-1===m||g)return!1;const e=d[m+1];return null!=e&&!s(e)},[m,g,d,s]),v=l(()=>{if(m<=0)return!1;const e=d[m-1];return null!=e&&!s(e)},[m,d,s]),b=a(e=>{-1!==d.indexOf(e)&&(s(e)||u(e))},[d,s,u]),h=a(()=>{if(-1===m||g)return;const e=d[m+1];null==e||s(e)||u(e)},[m,g,d,s,u]),y=a(()=>{if(m<=0)return;const e=d[m-1];null==e||s(e)||u(e)},[m,d,s,u]),w=a(()=>{const e=d.find(e=>!s(e));null!=e&&u(e)},[d,s,u]),x=a(()=>{const e=[...d].reverse().find(e=>!s(e));null!=e&&u(e)},[d,s,u]),I=a(e=>{switch(e.key){case"ArrowLeft":e.preventDefault(),y();break;case"ArrowRight":e.preventDefault(),h();break;case"Home":e.preventDefault(),w();break;case"End":e.preventDefault(),x()}},[h,y,w,x]);return{goToNext:h,goToPrevious:y,goToFirst:w,goToLast:x,goTo:b,handleKeyDown:I,isFirst:f,isLast:g,canGoNext:p,canGoPrevious:v,currentIndex:m,items:d}}const Qn=(e,t)=>{c(()=>{const n=tn(e);n&&t(n)},[e,t])};function er(e){const{items:t,activeIndex:n,setActiveIndex:r,scrollToIndex:o,onExpand:i,onCollapse:s,onSelect:l,onEscape:c,loop:d=!1,isItemDisabled:u=()=>!1,getPageSize:m}=e,f=a(e=>{if(!t.length)return;const a=n??-1;let i,s=0;const l=t.length;for(i=-1===a?e>0?0:t.length-1:a+e;s<l;){if(d)i<0?i=t.length-1:i>=t.length&&(i=0);else if(i<0||i>=t.length)return;const n=t[i];if(n&&!u(n))return r(i),void o(i);i+=e,s++}},[t,n,r,o,d,u]),g=a(e=>e.parentId?t.findIndex(t=>t.id===e.parentId):null,[t]),p=a((e,n)=>{const r=t[n+1];return r?.parentId===e?n+1:null},[t]),v=a(e=>{if(!t.length)return;const a=null!==n?t[n]:null;switch(e.key){case"ArrowDown":e.preventDefault(),f(1);break;case"ArrowUp":e.preventDefault(),f(-1);break;case"ArrowRight":if(e.preventDefault(),a&&null!==n)if(a.hasChildren&&!a.isExpanded)i?.(a.id);else if(a.isExpanded){const e=p(a.id,n),i=null!==e?t[e]:void 0;null!==e&&i&&!u(i)&&(r(e),o(e))}break;case"ArrowLeft":if(e.preventDefault(),a)if(a.isExpanded)s?.(a.id);else{const e=g(a),n=null!==e?t[e]:void 0;null!==e&&n&&!u(n)&&(r(e),o(e))}break;case"Home":e.preventDefault();{const e=t.findIndex(e=>!u(e));-1!==e&&(r(e),o(e))}break;case"End":e.preventDefault();for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&!u(n)){r(e),o(e);break}}break;case"PageUp":e.preventDefault();{const e=m?.()??10;f(-e)}break;case"PageDown":e.preventDefault();{const e=m?.()??10;f(e)}break;case"Enter":case" ":e.preventDefault(),a&&null!==n&&!u(a)&&l?.(a.id,n);break;case"Escape":e.preventDefault(),c?.()}},[t,n,f,r,o,i,s,l,c,u,g,p,m]);return{moveActive:f,handleKeyDown:v}}const tr=i(({size:e=24,className:t,...n},r)=>/* @__PURE__ */I("svg",{ref:r,xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:Jt("lucide lucide-circle-disc",tn(t)),"aria-hidden":"true",...n,children:[
|
|
3
|
+
return I("button",{ref:m,type:"button",className:Jt(ln({variant:t,size:n}),e),title:l,"aria-label":l??i,"aria-disabled":d,"data-disabled":d??void 0,disabled:d,...u,children:[f&&/* @__PURE__ */I(f,{size:p,strokeWidth:o}),c,i,g&&/* @__PURE__ */I(g,{size:p,strokeWidth:o})]})});cn.displayName="Button";const dn=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},un=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),mn=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};var fn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const gn=i(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...s},l)=>d("svg",{ref:l,...fn,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:un("lucide",o),...!a&&!mn(s)&&{"aria-hidden":"true"},...s},[...i.map(([e,t])=>d(e,t)),...Array.isArray(a)?a:[a]])),pn=(e,t)=>{const n=i(({className:n,...r},o)=>{return d(gn,{ref:o,iconNode:t,className:un(`lucide-${a=dn(e),a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r});var a});return n.displayName=dn(e),n},vn=pn("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),bn=pn("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),hn=pn("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),yn=pn("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),wn=pn("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),xn=pn("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),In=pn("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),Nn=pn("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),kn=pn("circle-dot",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]),Cn=pn("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),Dn=pn("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),Mn=pn("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),Sn=pn("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),An=pn("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),zn=pn("lock-keyhole",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]),Rn=pn("octagon-alert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]),Pn=pn("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),On=pn("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]),En=pn("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Tn({ref:e,isActive:t,disabled:n,focusMode:r="roving-tabindex",checkFocusWithin:o}){c(()=>{if(e?.current&&"activedescendant"!==r&&!n&&t&&document.activeElement!==e.current){if(o?.enabled){const t=e.current.closest(`[role="${o.containerRole}"]`),n=t?.contains(document.activeElement);if(!n)return}"function"==typeof e.current.focus&&e.current.focus()}},[t,n,r,o,e])}function Ln({enabled:e,contentRef:t,excludeRefs:n=[],onPointerDownOutside:r,onInteractOutside:o,onClose:i}){const s=a(e=>{const a=e.target;if(a instanceof Node&&!t.current?.contains(a)){for(const e of n)if(e?.current?.contains(a))return;r?.(e),o?.(e),e.defaultPrevented||i?.()}},[t,n,r,o,i]);c(()=>{if(e)return document.addEventListener("pointerdown",s),()=>{document.removeEventListener("pointerdown",s)}},[e,s])}function Vn(e,t,n){const[r,o]=s(t),i=void 0!==e,l=i?e:r,d=u(e),m=u(i);c(()=>{i&&e!==d.current&&o(e),m.current&&!i&&o(t),d.current=e,m.current=i},[i,e,t]);const f=u(l),g=u(i),p=u(n);f.current=l,g.current=i,p.current=n;return[l,a(e=>{const t=f.current,n=function(e){return"function"==typeof e}(e)?e(t):e;f.current=n,g.current||o(n),p.current?.(n)},[])]}function $n(e,t,n){const r=null===e?void 0:e,o=u(n);o.current=n;const i=a(e=>{o.current?.(e??null)},[]),[s,l]=Vn(r,t,i);return[s,a(e=>{l("function"==typeof e?t=>e(t)??void 0:e??void 0)},[l])]}function Fn({enabled:e,triggerRef:t,contentRef:n,align:r="start"}){const[o,a]=s(null);return c(()=>{if(!e||!t?.current||!n?.current)return;const o=()=>{if(!t.current||!n.current)return;const e=t.current.getBoundingClientRect(),o=n.current.getBoundingClientRect(),i=window.innerWidth,s=window.innerHeight;let l,c,d=e.bottom,u="bottom";if(d+o.height>s-10){const t=e.top-o.height;t>=10&&(d=t,u="top")}"start"===r?(l=e.left,l+o.width>i-10&&(l=void 0,c=i-e.right)):(c=i-e.right,e.right-o.width<10&&(c=void 0,l=e.left)),a({top:d,left:l,right:c,side:u})};return o(),window.addEventListener("resize",o),window.addEventListener("scroll",o,!0),()=>{window.removeEventListener("resize",o),window.removeEventListener("scroll",o,!0)}},[e,r,t,n]),o}function Kn(){const e=u(/* @__PURE__ */new Map),[t,n]=s(0),r=a(()=>{n(e=>e+1)},[]);return{registerItem:a((t,n=!1)=>{e.current.set(t,{disabled:n}),r()},[r]),unregisterItem:a(t=>{e.current.delete(t)&&r()},[r]),getItems:a(()=>Array.from(e.current.keys()).sort((e,t)=>{let n=document.querySelector(`[data-registry-id="${e}"]`),r=document.querySelector(`[data-registry-id="${t}"]`);if(n||(n=document.getElementById(e)),r||(r=document.getElementById(t)),!n||!r)return 0;const o=n.compareDocumentPosition(r);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0}),[]),isItemDisabled:a(t=>e.current.get(t)?.disabled??!1,[]),registryVersion:t}}function jn(){const e=u(/* @__PURE__ */new Map);return{registerItemText:a((t,n)=>{e.current.set(t,n)},[]),unregisterItemText:a(t=>{e.current.delete(t)},[]),getItemText:a(t=>e.current.get(t),[])}}function qn(e){const{getItems:t,isItemDisabled:n,active:r,setActive:o,loop:i=!1,orientation:s="vertical",onSelect:l,onEscape:c}=e,d=a(e=>{const a=t();if(!a.length)return;const s=r?a.indexOf(r):-1;let l,c=0;const d=a.length;for(l=-1===s?e>0?0:a.length-1:s+e;c<d;){if(i)l<0?l=a.length-1:l>=a.length&&(l=0);else if(l<0||l>=a.length)return;const t=a[l];if(t&&!n(t))return void o(t);l+=e,c++}},[t,r,o,i,n]),u=a(e=>{const a=t();if(!a.length)return;const i="vertical"===s,u=i?"ArrowDown":"ArrowRight",m=i?"ArrowUp":"ArrowLeft";switch(e.key){case u:e.preventDefault(),d(1);break;case m:e.preventDefault(),d(-1);break;case"Home":e.preventDefault();{const e=a.find(e=>!n(e));e&&o(e)}break;case"End":e.preventDefault();{const e=[...a].reverse().find(e=>!n(e));e&&o(e)}break;case"Enter":case" ":e.preventDefault(),r&&!n(r)&&l?.(r);break;case"Escape":e.preventDefault(),c?.()}},[t,r,d,o,n,s,l,c]);return{moveActive:d,handleKeyDown:u}}const Bn=10;function Gn({enabled:e,mousePosition:t,contentRef:n}){const[r,o]=s(null);return c(()=>{if(!e||!t||!n?.current)return;const r=()=>{if(!n.current)return;const e=n.current.getBoundingClientRect(),r=window.innerWidth,a=window.innerHeight;let i=t.y,s=t.x;if(i+e.height>a-Bn){const n=t.y-e.height;i=n>=Bn?n:Math.max(Bn,a-e.height-Bn)}if(s+e.width>r-Bn){const n=t.x-e.width;s=n>=Bn?n:Math.max(Bn,r-e.width-Bn)}o({top:i,left:s})};return r(),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}},[e,t,n]),c(()=>{e||o(null)},[e]),r}const Yn=(e,t)=>{const n=G();c(()=>{const r=e.current;if(r&&t&&n)return n.register(r),()=>n.unregister(r)},[e,t,n])};function Wn(e){const{baseId:t,getItems:n,getItemId:r,value:o,onValueChange:i,isItemDisabled:s,loop:l=!1,orientation:c="vertical"}=e,d=a(e=>{e&&(i(e),r&&requestAnimationFrame(()=>{document.getElementById(r(t,e))?.focus()}))},[t,i,r]),{handleKeyDown:u}=qn({getItems:n,isItemDisabled:s,active:o,setActive:d,loop:l,orientation:c});return{handleKeyDown:u}}function Hn({id:e,active:t,disabled:n,getItems:r,isItemDisabled:o,focusMode:a="roving-tabindex"}){return l(()=>{if("activedescendant"===a)return{isFocusable:!1,tabIndex:-1};if(n)return{isFocusable:!1,tabIndex:-1};const i=r(),s=i.length>0?i[0]:void 0,l=(t??i.find(e=>!o(e))??s??e)===e;return{isFocusable:l,tabIndex:l?0:-1}},[e,t,n,r,o,a])}function _n({containerRef:e,activeId:t,orientation:n="vertical",buildElementId:r}){c(()=>{if(!t||!e?.current)return;const o=r?r(t):t,a=e.current.querySelector(`#${o}`);a&&a.scrollIntoView({block:"nearest",inline:"horizontal"===n?"nearest":void 0,behavior:"auto"})},[t,e,n,r])}const Un=(e,t)=>{c(()=>{if(!e)return;const n=t??document.body,r=n.style.overflow;return n.style.overflow="hidden",()=>{n.style.overflow=r}},[e,t])};function Zn(e){const{getItems:t,isItemDisabled:n,getItemText:r,active:o,setActive:i,onMatch:s,timeout:l=500}=e,c=u(""),d=u(null),m=a(()=>{c.current="",d.current&&(clearTimeout(d.current),d.current=null)},[]);return{handleTypeAhead:a(e=>{d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{c.current="",d.current=null},l);const a=t();if(!a.length)return;const u=e.toLowerCase(),m=c.current+u;c.current=m;if(m.length>1&&m.split("").every(e=>e===u)){const e=a.filter(e=>{if(n(e))return!1;const t=r(e);return t?.toLowerCase().startsWith(u)});if(0===e.length)return;const t=o?e.indexOf(o):-1,l=e[(t+1)%e.length];l&&(i(l),s?.(l))}else{const e=o?a.indexOf(o):-1,t=e>=0?[...a.slice(e+1),...a.slice(0,e+1)]:a;for(const o of t){if(n(o))continue;const e=r(o);if(e?.toLowerCase().startsWith(m))return i(o),void s?.(o)}if(m.length>1)for(const o of a){if(n(o))continue;const e=r(o);if(e?.toLowerCase().startsWith(u))return c.current=u,i(o),void s?.(o)}}},[t,n,r,o,i,s,l]),resetSearch:m}}function Xn(e){const{getItems:t,isItemDisabled:n,getItemText:r,active:o,setActive:i,value:s,open:l,setOpenInternal:c,setOpen:d,disabled:u,onSelect:m}=e,{handleKeyDown:f}=qn({getItems:t,isItemDisabled:n,active:o,setActive:i,loop:!1,orientation:"vertical",onSelect:m,onEscape:()=>d(!1)}),{handleTypeAhead:g}=Zn({getItems:t,isItemDisabled:n,getItemText:r,active:o,setActive:i});return{keyHandler:a(e=>{if(!u){if(!l&&["ArrowDown","ArrowUp","Enter"," ","Home","End"].includes(e.key)){e.preventDefault(),c(!0);const r="End"===e.key,o=10;let a=0;const l=()=>{const e=t();if(e.length>0)if(r){const t=[...e].reverse().find(e=>!n(e));t&&i(t)}else{const t=(s&&e.includes(s)&&!n(s)?s:null)||e.find(e=>!n(e));t&&i(t)}else a<o&&(a++,requestAnimationFrame(l))};return void requestAnimationFrame(l)}if(l&&"Tab"===e.key)o?m(o):d(!1);else{if(l&&("PageUp"===e.key||"PageDown"===e.key)){e.preventDefault();const r=t();if(0===r.length)return;const a=o?r.indexOf(o):-1,s="PageDown"===e.key?10:-10;let l=a+s;l<0&&(l=0),l>=r.length&&(l=r.length-1);const c=s>0?1:-1;let d=r[l];for(;l>=0&&l<r.length&&d&&n(d);)l+=c,d=r[l];return void(l>=0&&l<r.length&&d&&!n(d)&&i(d))}if(1!==e.key.length||" "===e.key||e.ctrlKey||e.metaKey||e.altKey)f(e);else if(e.preventDefault(),l)g(e.key);else{c(!0);const n=10;let r=0;const o=()=>{t().length>0?g(e.key):r<n&&(r++,requestAnimationFrame(o))};requestAnimationFrame(o)}}}},[u,l,o,s,t,n,c,d,i,m,g,f])}}function Jn(e){const{baseId:t,getItems:n,getButtonId:r,value:o,onValueChange:i,isItemDisabled:s,registryVersion:c}=e,d=l(()=>n(),[n,c]),u=a(e=>{i(e),r&&requestAnimationFrame(()=>{const n=document.getElementById(r(t,e));n?.focus()})},[t,i,r]),m=null!=o?d.indexOf(o):-1,f=0===m,g=m===d.length-1,p=l(()=>{if(-1===m||g)return!1;const e=d[m+1];return null!=e&&!s(e)},[m,g,d,s]),v=l(()=>{if(m<=0)return!1;const e=d[m-1];return null!=e&&!s(e)},[m,d,s]),b=a(e=>{-1!==d.indexOf(e)&&(s(e)||u(e))},[d,s,u]),h=a(()=>{if(-1===m||g)return;const e=d[m+1];null==e||s(e)||u(e)},[m,g,d,s,u]),y=a(()=>{if(m<=0)return;const e=d[m-1];null==e||s(e)||u(e)},[m,d,s,u]),w=a(()=>{const e=d.find(e=>!s(e));null!=e&&u(e)},[d,s,u]),x=a(()=>{const e=[...d].reverse().find(e=>!s(e));null!=e&&u(e)},[d,s,u]),I=a(e=>{switch(e.key){case"ArrowLeft":e.preventDefault(),y();break;case"ArrowRight":e.preventDefault(),h();break;case"Home":e.preventDefault(),w();break;case"End":e.preventDefault(),x()}},[h,y,w,x]);return{goToNext:h,goToPrevious:y,goToFirst:w,goToLast:x,goTo:b,handleKeyDown:I,isFirst:f,isLast:g,canGoNext:p,canGoPrevious:v,currentIndex:m,items:d}}const Qn=(e,t)=>{c(()=>{const n=tn(e);n&&t(n)},[e,t])};function er(e){const{items:t,activeIndex:n,setActiveIndex:r,scrollToIndex:o,onExpand:i,onCollapse:s,onSelect:l,onEscape:c,loop:d=!1,isItemDisabled:u=()=>!1,getPageSize:m}=e,f=a(e=>{if(!t.length)return;const a=n??-1;let i,s=0;const l=t.length;for(i=-1===a?e>0?0:t.length-1:a+e;s<l;){if(d)i<0?i=t.length-1:i>=t.length&&(i=0);else if(i<0||i>=t.length)return;const n=t[i];if(n&&!u(n))return r(i),void o(i);i+=e,s++}},[t,n,r,o,d,u]),g=a(e=>e.parentId?t.findIndex(t=>t.id===e.parentId):null,[t]),p=a((e,n)=>{const r=t[n+1];return r?.parentId===e?n+1:null},[t]),v=a(e=>{if(!t.length)return;const a=null!==n?t[n]:null;switch(e.key){case"ArrowDown":e.preventDefault(),f(1);break;case"ArrowUp":e.preventDefault(),f(-1);break;case"ArrowRight":if(e.preventDefault(),a&&null!==n)if(a.hasChildren&&!a.isExpanded)i?.(a.id);else if(a.isExpanded){const e=p(a.id,n),i=null!==e?t[e]:void 0;null!==e&&i&&!u(i)&&(r(e),o(e))}break;case"ArrowLeft":if(e.preventDefault(),a)if(a.isExpanded)s?.(a.id);else{const e=g(a),n=null!==e?t[e]:void 0;null!==e&&n&&!u(n)&&(r(e),o(e))}break;case"Home":e.preventDefault();{const e=t.findIndex(e=>!u(e));-1!==e&&(r(e),o(e))}break;case"End":e.preventDefault();for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&!u(n)){r(e),o(e);break}}break;case"PageUp":e.preventDefault();{const e=m?.()??10;f(-e)}break;case"PageDown":e.preventDefault();{const e=m?.()??10;f(e)}break;case"Enter":case" ":e.preventDefault(),a&&null!==n&&!u(a)&&l?.(a.id,n);break;case"Escape":e.preventDefault(),c?.()}},[t,n,f,r,o,i,s,l,c,u,g,p,m]);return{moveActive:f,handleKeyDown:v}}const tr=i(({size:e=24,className:t,...n},r)=>/* @__PURE__ */I("svg",{ref:r,xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:Jt("lucide lucide-circle-disc",tn(t)),"aria-hidden":"true",...n,children:[
|
|
4
4
|
/* @__PURE__ */I("circle",{cx:"12",cy:"12",r:"10"}),
|
|
5
5
|
/* @__PURE__ */I("circle",{cx:"12",cy:"12",r:"5",fill:"currentColor"})]}));tr.displayName="CircleDisc";const nr=tr,rr=i(({size:e=24,className:t,...n},r)=>/* @__PURE__ */I("svg",{ref:r,xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",className:Jt("lucide lucide-filled-circle-alert",tn(t)),"aria-hidden":"true",...n,children:/* @__PURE__ */I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM12 6.46429C12.5917 6.46429 13.0714 6.94398 13.0714 7.53571V12.1786C13.0714 12.7703 12.5917 13.25 12 13.25C11.4083 13.25 10.9286 12.7703 10.9286 12.1786V7.53571C10.9286 6.94398 11.4083 6.46429 12 6.46429ZM13.4286 16.1071C13.4286 16.8962 12.7889 17.5357 12 17.5357C11.2111 17.5357 10.5714 16.8962 10.5714 16.1071C10.5714 15.3181 11.2111 14.6786 12 14.6786C12.7889 14.6786 13.4286 15.3181 13.4286 16.1071Z",fill:"currentColor"})}));rr.displayName="FilledCircleAlert";const or=rr,ar=i(({size:e=24,className:t,...n},r)=>/* @__PURE__ */I("svg",{ref:r,xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",className:Jt("lucide lucide-filled-circle-check",tn(t)),"aria-hidden":"true",...n,children:/* @__PURE__ */I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM17.004 9.45502C17.3736 8.99296 17.2988 8.31872 16.8366 7.94907C16.3746 7.57942 15.7003 7.65433 15.3307 8.1164L10.2651 14.4483L8.23872 12.9286C7.76534 12.5735 7.09378 12.6695 6.73872 13.1428C6.3837 13.6162 6.47962 14.2878 6.95302 14.6428L9.81016 16.7857C10.2731 17.133 10.9282 17.0497 11.2897 16.5978L17.004 9.45502Z",fill:"currentColor"})}));ar.displayName="FilledCircleCheck";const ir=ar,sr=i(({size:e=24,className:t,...n},r)=>/* @__PURE__ */I("svg",{ref:r,xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",className:Jt("lucide lucide-filled-circle-info",tn(t)),"aria-hidden":"true",...n,children:/* @__PURE__ */I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM9.85714 15.3929C9.36402 15.3929 8.96429 15.7926 8.96429 16.2857C8.96429 16.7788 9.36402 17.1786 9.85714 17.1786H14.1429C14.636 17.1786 15.0357 16.7788 15.0357 16.2857C15.0357 15.7926 14.636 15.3929 14.1429 15.3929H12.8929V11.2857C12.8929 10.7926 12.4931 10.3929 12 10.3929H10.5714C10.0783 10.3929 9.67857 10.7926 9.67857 11.2857C9.67857 11.7788 10.0783 12.1786 10.5714 12.1786H11.1071V15.3929H9.85714ZM13.4286 7.71429C13.4286 8.50325 12.7889 9.14286 12 9.14286C11.2111 9.14286 10.5714 8.50325 10.5714 7.71429C10.5714 6.92532 11.2111 6.28571 12 6.28571C12.7889 6.28571 13.4286 6.92532 13.4286 7.71429Z",fill:"currentColor"})}));sr.displayName="FilledCircleInfo";const lr=sr,cr=i(({size:e=24,className:t,...n},r)=>/* @__PURE__ */I("svg",{ref:r,xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",className:Jt("lucide lucide-filled-circle-x",tn(t)),"aria-hidden":"true",...n,children:/* @__PURE__ */I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM7.67101 7.67101C8.08942 7.2526 8.76782 7.2526 9.18624 7.67101L12 10.4848L14.8138 7.67101C15.2322 7.2526 15.9106 7.2526 16.329 7.67101C16.7474 8.08942 16.7474 8.76782 16.329 9.18624L13.5152 12L16.329 14.8138C16.7474 15.2322 16.7474 15.9106 16.329 16.329C15.9106 16.7474 15.2322 16.7474 14.8138 16.329L12 13.5152L9.18624 16.329C8.76782 16.7474 8.08942 16.7474 7.67101 16.329C7.2526 15.9106 7.2526 15.2322 7.67101 14.8138L10.4848 12L7.67101 9.18624C7.2526 8.76782 7.2526 8.08942 7.67101 7.67101Z",fill:"currentColor"})}));cr.displayName="FilledCircleX";const dr=cr,ur=i(({size:e=24,className:t,...n},r)=>/* @__PURE__ */I("svg",{ref:r,xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",className:Jt("lucide lucide-filled-square-check",tn(t)),"aria-hidden":"true",...n,children:/* @__PURE__ */I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.3 2H19.7C20.9703 2 22 3.02974 22 4.3V19.7C22 20.9703 20.9703 22 19.7 22H4.3C3.02974 22 2 20.9703 2 19.7V4.3C2 3.02974 3.02974 2 4.3 2ZM17.3886 8.25926C17.7868 7.76164 17.7061 7.03555 17.2085 6.63746C16.711 6.23937 15.9848 6.32005 15.5867 6.81766L10.1315 13.6367L7.94921 12C7.43942 11.6176 6.71618 11.721 6.33383 12.2308C5.95148 12.7406 6.0548 13.4638 6.56459 13.8462L9.64152 16.1538C10.1401 16.5278 10.8455 16.4382 11.2348 15.9515L17.3886 8.25926Z",fill:"currentColor"})}));ur.displayName="FilledSquareCheck";const mr=ur,fr=i(({size:e=24,className:t,...n},r)=>/* @__PURE__ */I("svg",{ref:r,xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",className:Jt("lucide lucide-filled-square-minus",tn(t)),"aria-hidden":"true",...n,children:/* @__PURE__ */I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 2h16a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2ZM7 10.75h10a1 1 0 0 1 1 1v0.5a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1v-0.5a1 1 0 0 1 1-1Z",fill:"currentColor"})}));fr.displayName="FilledSquareMinus";const gr=fr,pr=M(["inline-flex shrink-0"],{variants:{labeled:{true:"",false:'after:-inset-1 after:-z-10 relative z-0 after:pointer-events-auto after:absolute after:rounded-sm after:content-[""]'}},defaultVariants:{labeled:!1}}),vr=i(({id:e,className:t,name:n,label:r,defaultChecked:o=!1,checked:a,align:i="left",error:s,disabled:l,readOnly:c,required:d,value:u="on",onCheckedChange:m,errorMessage:f,onClick:g,onClickCapture:p,onMouseDown:v,...b},h)=>{const y=H(tn(e)),w=s?"error":"default",x=!l&&!c,N=!!r,[k,C]=Vn(a,o,m),D="indeterminate"===k,M=!0===k;/* @__PURE__ */
|
|
6
6
|
return I("div",{className:"flex w-fit flex-col gap-1",children:[
|
|
@@ -21,7 +21,7 @@ return I("div",{ref:en(r,o),className:e,onBlur:l,...n,children:t})});Er.displayN
|
|
|
21
21
|
return I("div",{ref:i,className:Jt(Tr({error:a,open:r,disabled:o}),e),"data-open":r?"true":void 0,...n,children:t})};Lr.displayName="Combobox.Control";const Vr=i((e,t)=>{const n=u(null),{open:r,keyHandler:o,baseId:a,active:i,disabled:s,error:l,contentType:d}=O();return c(()=>{r&&!s&&n.current?.focus()},[r,s]),/* @__PURE__ */I(Ar.Input,{ref:en(t,n),id:`${a}-input`,onKeyDown:o,"aria-disabled":s,"aria-invalid":l??void 0,role:"combobox","aria-autocomplete":"list","aria-expanded":r,"aria-haspopup":"tree"===d?"tree":"listbox","aria-controls":`${a}-${"tree"===d?"tree":"listbox"}`,"aria-activedescendant":"tree"===d?void 0:i?`${a}-listbox-option-${i}`:void 0,...e})});Vr.displayName="Combobox.Input";const $r=({children:e,className:t,...n})=>{const{inputValue:r,setInputValue:o}=O();/* @__PURE__ */
|
|
22
22
|
return I(Ar.Root,{value:r,onChange:o,className:Jt("w-full pr-0","border-0 focus-within:border-0 focus-within:ring-0 focus-within:ring-offset-0",t),...n,children:e})};$r.displayName="Combobox.Search";const Fr=({className:e,...t})=>/* @__PURE__ */I(Ar.Icon,{className:e,...t});Fr.displayName="Combobox.SearchIcon";const Kr=({className:e,...t})=>{const{open:n,setOpen:r,disabled:o}=O();/* @__PURE__ */
|
|
23
23
|
return I(hr,{type:"button",variant:"text",size:"sm",iconSize:"lg",icon:yn,"aria-label":"Toggle",onClick:()=>{o||r(!n)},disabled:o,tabIndex:-1,className:Jt("mr-1.25 shrink-0 rounded-[0.1875rem] text-subtle hover:bg-surface-neutral-hover",'after:-inset-1 after:-z-10 relative z-0 overflow-visible after:pointer-events-auto after:absolute after:rounded-sm after:content-[""]',"[&>svg]:transition-transform [&>svg]:duration-150",n&&"[&>svg]:rotate-180",e),...t})};Kr.displayName="Combobox.Toggle";const jr=({className:e,label:t="Apply",...n})=>{const{stagingEnabled:r,hasStagedChanges:o,applyStagedSelection:a}=O();return r&&o?/* @__PURE__ */I(cn,{className:Jt("h-7 min-w-14 gap-2 px-2.5 text-xs",e),type:"button",label:t,variant:"outline",onClick:a,...n}):null};jr.displayName="Combobox.Apply";const qr=({container:e,forceMount:t,children:n})=>{const{open:r}=O(),[o,a]=s(!1);return c(()=>{a(!0)},[]),o&&(t||r)?b(n,e??document.body):null};qr.displayName="Combobox.Portal";const Br=i(({children:e,className:t,style:n,...r},o)=>{const{open:a,setOpen:i,controlRef:l,closeOnBlur:c}=O(),d=u(null),f=en(o,d),[g,p]=s(!1);m(()=>{if(!a||!d.current)return;const e=d.current.parentElement;p(e===document.body)},[a]),Yn(d,g);const v=Fn({enabled:a&&g,triggerRef:l,contentRef:d,align:"start"});if(Ln({enabled:a&&g&&c,contentRef:d,excludeRefs:l?[l]:void 0,onClose:()=>i(!1)}),!a)return null;const b=g&&l?.current?l.current.offsetWidth:void 0,h=g&&!v,y=g?{position:"fixed",top:v?`${v.top}px`:"0",left:void 0!==v?.left?`${v.left}px`:void 0,right:void 0!==v?.right?`${v.right}px`:void 0,width:b,...n??{}}:n??{};/* @__PURE__ */
|
|
24
|
-
return I("div",{ref:f,"data-combobox-popup":"",className:Jt("z-50
|
|
24
|
+
return I("div",{ref:f,"data-combobox-popup":"","data-side":g?v?.side:"bottom",className:Jt("z-50 overflow-hidden rounded-sm bg-surface-neutral shadow-lg ring-1 ring-bdr-subtle","data-[side=top]:-mt-2 data-[side=bottom]:mt-2",!g&&"absolute right-0 left-0",h&&"pointer-events-none opacity-0",t),style:y,...r,children:e})});Br.displayName="Combobox.Popup";const Gr=({children:e,className:t,...n})=>{const{selection:r,onSelectionChange:o,disabled:a,active:i,setActive:s,baseId:c,keyHandler:d,registerItem:u,unregisterItem:m,getItems:f,isItemDisabled:g,selectionMode:p}=O(),v=l(()=>Array.from(r),[r]);/* @__PURE__ */
|
|
25
25
|
return I(kr.Root,{selectionMode:p,selection:v,onSelectionChange:o,disabled:a,active:i,focusMode:"activedescendant",baseId:c,setActive:s,keyHandler:d,registerItem:u,unregisterItem:m,getItems:f,isItemDisabled:g,children:/* @__PURE__ */I(kr.Content,{className:t,...n,children:e})})};Gr.displayName="Combobox.ListContent";const Yr=({children:e,className:t,...n})=>{const{baseId:r,setOpen:o,stagingEnabled:i,applyStagedSelection:s}=O(),l=a(e=>{if((e.metaKey||e.ctrlKey)&&"Enter"===e.key){e.preventDefault(),i?s():o(!1);const t=document.getElementById(`${r}-input`);return void t?.focus()}if("Escape"===e.key){e.preventDefault(),e.stopPropagation(),o(!1);const t=document.getElementById(`${r}-input`);return void t?.focus()}if(1===e.key.length&&" "!==e.key&&!e.metaKey&&!e.ctrlKey&&!e.altKey){const e=document.getElementById(`${r}-input`);e&&e.focus()}},[o,r,i,s]);
|
|
26
26
|
/* @__PURE__ */
|
|
27
27
|
return I("div",{id:`${r}-tree`,className:Jt("outline-none",t),onKeyDown:l,...n,children:e})};Yr.displayName="Combobox.TreeContent";const Wr=Object.assign(Or,{Root:Or,Content:Er,Control:Lr,Search:$r,Input:Vr,SearchIcon:Fr,Toggle:Kr,Apply:jr,Portal:qr,Popup:Br,ListContent:Gr,TreeContent:Yr}),Hr=M(["relative z-0 flex w-full cursor-pointer items-center gap-x-1.25 px-4.5 py-2.5 text-sm outline-none transition-highlight"],{variants:{active:{true:"bg-surface-neutral-hover",false:"hover:bg-surface-neutral-hover"},disabled:{true:"pointer-events-none select-none opacity-30 hover:bg-transparent",false:""}},compoundVariants:[{active:!0,disabled:!1,class:["focus-visible:ring-3 focus-visible:ring-ring-offset focus-visible:ring-inset","focus-visible:ring-offset-3 focus-visible:ring-offset-ring"]}],defaultVariants:{active:!1,disabled:!1}}),_r=i(({id:e,asChild:t=!1,disabled:n=!1,onSelect:r,className:o,children:i,active:s,setActive:l,setOpen:d,registerItem:m,unregisterItem:f,getItems:g,isItemDisabled:p,onClick:v,onPointerMove:b,onPointerLeave:y,onFocus:w,...x},N)=>{const k=H(e,e?void 0:"menu-item"),C=s===k,D=u(null),M=en(N,D);c(()=>(m(k,n),()=>f(k)),[k,n,m,f]);const S=a(e=>{if(v?.(e),n)return;const t=new Event("select",{bubbles:!0,cancelable:!0});r?.(t),t.defaultPrevented||d(!1)},[n,r,d,v]),A=a(e=>{b?.(e),C||n||l(k)},[C,l,k,n,b]),z=a(e=>{y?.(e),document.activeElement!==D.current&&l(void 0)},[l,y]),R=a(e=>{w?.(e),n||l(k)},[w,n,l,k]),{tabIndex:P}=Hn({id:k,active:s,disabled:n,getItems:g,isItemDisabled:p});Tn({ref:D,isActive:C,disabled:n});/* @__PURE__ */
|
|
@@ -35,8 +35,8 @@ return I(e?h:"div",{ref:s,"data-disabled":t||void 0,onContextMenu:d,className:r,
|
|
|
35
35
|
return I(_r,{ref:n,active:r,setActive:o,setOpen:a,registerItem:i,unregisterItem:s,getItems:l,isItemDisabled:c,className:Jt(!d&&"focus-visible:ring-0 focus-visible:ring-offset-0",e),...t})});io.displayName="ContextMenu.Item";const so=i((e,t)=>/* @__PURE__ */I(Ur,{ref:t,...e}));so.displayName="ContextMenu.Label";const lo=i((e,t)=>/* @__PURE__ */I(Zr,{ref:t,...e}));lo.displayName="ContextMenu.Separator";const co=i((e,t)=>{const{setOpen:n}=L();/* @__PURE__ */
|
|
36
36
|
return I(Jr,{ref:t,setOpen:n,...e})});co.displayName="ContextMenu.RadioGroup";const uo=i(({className:e,...t},n)=>{const{active:r,setActive:o,registerItem:a,unregisterItem:i,getItems:s,isItemDisabled:l,isUsingKeyboard:c}=L();/* @__PURE__ */
|
|
37
37
|
return I(eo,{ref:n,active:r,setActive:o,registerItem:a,unregisterItem:i,getItems:s,isItemDisabled:l,className:Jt(!c&&"focus-visible:ring-0 focus-visible:ring-offset-0",e),...t})});uo.displayName="ContextMenu.RadioItem";const mo=i((e,t)=>/* @__PURE__ */I(to,{ref:t,...e}));mo.displayName="ContextMenu.ItemIndicator";const fo=Object.assign(no,{Root:no,Trigger:ro,Portal:oo,Content:ao,Item:io,Label:so,Separator:lo,RadioGroup:co,RadioItem:uo,ItemIndicator:mo}),go=({open:e,defaultOpen:t=!1,onOpenChange:n,children:r})=>{const o=u(null),a=H(),[i,d]=Vn(e,t,n),[m,f]=s(void 0),{registerItem:g,unregisterItem:p,getItems:v,isItemDisabled:b}=Kn(),h=l(()=>({baseId:a,open:i,setOpen:d,active:m,setActive:f,registerItem:g,unregisterItem:p,getItems:v,isItemDisabled:b,triggerRef:o}),[a,i,m,g,p,v,b,d]),[y,w]=s(!1);return c(()=>{i?w(!0):y&&o.current&&o.current.focus()},[i,y]),/* @__PURE__ */I(J,{value:h,children:r})};go.displayName="Menu.Root";const po=i(({asChild:e,onClick:t,onKeyDown:n,className:r,children:o,...a},i)=>{const{baseId:s,open:l,setOpen:c,triggerRef:d}=Q(),u=`${s}-trigger`,m=`${s}-content`;/* @__PURE__ */
|
|
38
|
-
return I(e?h:"button",{ref:en(i,d),id:u,"aria-haspopup":"menu","aria-expanded":l,"data-active":l,"aria-controls":l?m:void 0,onClick:e=>{t?.(e),c(!l)},onKeyDown:e=>{n?.(e),"ArrowDown"!==e.key||l||(e.preventDefault(),c(!0))},className:Jt("data-[active=true]:bg-btn-active data-[active=true]:text-alt",r),...!e&&{type:"button"},...a,children:o})});po.displayName="Menu.Trigger";const vo=({container:e,forceMount:t,children:n})=>{const{open:r}=Q(),[o,a]=s(!1);return c(()=>{a(!0)},[]),o&&(t||r)?b(n,e??document.body):null};vo.displayName="Menu.Portal";const bo=i(({forceMount:e,align:t="start",loop:n=!0,onEscapeKeyDown:r,onPointerDownOutside:o,onInteractOutside:i,className:l,style:d,children:f,...g},p)=>{const{baseId:v,open:b,setOpen:h,active:y,setActive:w,getItems:x,isItemDisabled:N,triggerRef:k}=Q(),C=`${v}-content`,D=u(null),M=en(p,D),[S,A]=s(!1),z=Fn({enabled:b,triggerRef:k,contentRef:D,align:t});m(()=>{b&&D.current&&A(D.current.parentElement===document.body)},[b]),Yn(D,S),c(()=>{if(b&&D.current){D.current.focus();const e=x().find(e=>!N(e));e&&w(e)}},[b,x,N,w]);const{handleKeyDown:R}=qn({getItems:x,isItemDisabled:N,active:y,setActive:w,loop:n,orientation:"vertical",onSelect:e=>{const t=document.getElementById(e);t&&t.click()}}),P=a(e=>{if("Tab"!==e.key)return"Escape"===e.key?(e.preventDefault(),r?.(e),void h(!1)):void R(e);h(!1)},[R,h,r]);if(Ln({enabled:b,contentRef:D,excludeRefs:k?[k]:void 0,onPointerDownOutside:o,onInteractOutside:i,onClose:()=>h(!1)}),_n({containerRef:D,activeId:y,orientation:"vertical"}),!e&&!b)return null;const
|
|
39
|
-
return I("div",{ref:M,id:C,role:"menu","aria-orientation":"vertical","aria-activedescendant":y,tabIndex:-1,"data-state":b?"open":"closed",className:Jt("fixed z-40
|
|
38
|
+
return I(e?h:"button",{ref:en(i,d),id:u,"aria-haspopup":"menu","aria-expanded":l,"data-active":l,"aria-controls":l?m:void 0,onClick:e=>{t?.(e),c(!l)},onKeyDown:e=>{n?.(e),"ArrowDown"!==e.key||l||(e.preventDefault(),c(!0))},className:Jt("data-[active=true]:bg-btn-active data-[active=true]:text-alt",r),...!e&&{type:"button"},...a,children:o})});po.displayName="Menu.Trigger";const vo=({container:e,forceMount:t,children:n})=>{const{open:r}=Q(),[o,a]=s(!1);return c(()=>{a(!0)},[]),o&&(t||r)?b(n,e??document.body):null};vo.displayName="Menu.Portal";const bo=i(({forceMount:e,align:t="start",loop:n=!0,onEscapeKeyDown:r,onPointerDownOutside:o,onInteractOutside:i,className:l,style:d,children:f,...g},p)=>{const{baseId:v,open:b,setOpen:h,active:y,setActive:w,getItems:x,isItemDisabled:N,triggerRef:k}=Q(),C=`${v}-content`,D=u(null),M=en(p,D),[S,A]=s(!1),z=Fn({enabled:b,triggerRef:k,contentRef:D,align:t});m(()=>{b&&D.current&&A(D.current.parentElement===document.body)},[b]),Yn(D,S),c(()=>{if(b&&D.current){D.current.focus();const e=x().find(e=>!N(e));e&&w(e)}},[b,x,N,w]);const{handleKeyDown:R}=qn({getItems:x,isItemDisabled:N,active:y,setActive:w,loop:n,orientation:"vertical",onSelect:e=>{const t=document.getElementById(e);t&&t.click()}}),P=a(e=>{if("Tab"!==e.key)return"Escape"===e.key?(e.preventDefault(),r?.(e),void h(!1)):void R(e);h(!1)},[R,h,r]);if(Ln({enabled:b,contentRef:D,excludeRefs:k?[k]:void 0,onPointerDownOutside:o,onInteractOutside:i,onClose:()=>h(!1)}),_n({containerRef:D,activeId:y,orientation:"vertical"}),!e&&!b)return null;const{side:O,...E}=z??{side:"bottom"},T={...E,...d??{}};/* @__PURE__ */
|
|
39
|
+
return I("div",{ref:M,id:C,role:"menu","aria-orientation":"vertical","aria-activedescendant":y,tabIndex:-1,"data-state":b?"open":"closed","data-side":z?.side,className:Jt("fixed z-40 flex w-fit flex-col items-start gap-y-1 overflow-hidden p-1","data-[side=top]:-mt-2 data-[side=bottom]:mt-2","rounded-sm border border-bdr-subtle bg-surface-neutral shadow-lg outline-none","data-[state=closed]:animate-out data-[state=open]:animate-in","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",!z&&"pointer-events-none opacity-0",l),style:T,onKeyDown:P,...g,children:f})});bo.displayName="Menu.Content";const ho=i((e,t)=>{const{active:n,setActive:r,setOpen:o,registerItem:a,unregisterItem:i,getItems:s,isItemDisabled:l}=Q();/* @__PURE__ */
|
|
40
40
|
return I(_r,{ref:t,active:n,setActive:r,setOpen:o,registerItem:a,unregisterItem:i,getItems:s,isItemDisabled:l,...e})});ho.displayName="Menu.Item";const yo=i((e,t)=>/* @__PURE__ */I(Ur,{ref:t,...e}));yo.displayName="Menu.Label";const wo=i((e,t)=>/* @__PURE__ */I(Zr,{ref:t,...e}));wo.displayName="Menu.Separator";const xo=i((e,t)=>{const{setOpen:n}=Q();/* @__PURE__ */
|
|
41
41
|
return I(Jr,{ref:t,setOpen:n,...e})});xo.displayName="Menu.RadioGroup";const Io=i((e,t)=>{const{active:n,setActive:r,registerItem:o,unregisterItem:a,getItems:i,isItemDisabled:s}=Q();/* @__PURE__ */
|
|
42
42
|
return I(eo,{ref:t,active:n,setActive:r,registerItem:o,unregisterItem:a,getItems:i,isItemDisabled:s,...e})});Io.displayName="Menu.RadioItem";const No=i((e,t)=>/* @__PURE__ */I(to,{ref:t,...e}));No.displayName="Menu.ItemIndicator";const ko=Object.assign(go,{Root:go,Trigger:po,Portal:vo,Content:bo,Item:ho,Label:yo,Separator:wo,RadioGroup:xo,RadioItem:Io,ItemIndicator:No}),Co=e=>`${e.getFullYear()}-${e.getMonth()}-${e.getDate()}`,Do=(e,t)=>`${e}-day-${Co(t)}`,Mo=e=>new Date(e.getFullYear(),e.getMonth(),1),So=(e,t)=>new Date(e.getFullYear(),e.getMonth()+t,1),Ao=(e,t)=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth(),zo=(e,t)=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),Ro=e=>new Date(e.getFullYear(),e.getMonth()+1,0),Po=e=>(e%7+7)%7,Oo=(e,t)=>"locale"===e?(e=>{if(!e)return;if("undefined"==typeof Intl||!("Locale"in Intl))return;const t=Array.isArray(e)?e[0]:e;try{const e=new Intl.Locale(t);if("function"!=typeof e.getWeekInfo)return;const n=e.getWeekInfo().firstDay;if("number"==typeof n)return Po(n)}catch{return}})(t)??1:Po(e??1),Eo=(e,t,n)=>new Intl.DateTimeFormat(e,{month:n}).format(new Date(2023,t,1)),To=(e,t,n)=>{const r=e.getMonth();return e.getFullYear()<t?new Date(t,r,1):e.getFullYear()>n?new Date(n,r,1):Mo(e)},Lo=(e,t,n)=>{const r=Mo(e),o=Ro(e),a=(r.getDay()-t+7)%7,i=new Date(r.getFullYear(),r.getMonth(),r.getDate()-a),s=((t+7-1)%7-o.getDay()+7)%7,l=new Date(o.getFullYear(),o.getMonth(),o.getDate()+s),c=((e,t)=>{const n=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),r=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate());return Math.round((r-n)/864e5)})(i,l)+1;return Array.from({length:c},(t,r)=>{const o=new Date(i.getFullYear(),i.getMonth(),i.getDate()+r),a=o.getMonth()!==e.getMonth();return{date:o,outside:a,disabled:n(o)}})},Vo=(e,t)=>{const n=Ro(e).getDate(),r=Math.min(t.getDate(),n);return new Date(e.getFullYear(),e.getMonth(),r)},$o=e=>{if(!e)return"";return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`},Fo=()=>{if("undefined"==typeof window)return!1;const e=navigator;return"boolean"==typeof e.userAgentData?.mobile?e.userAgentData.mobile:window.matchMedia("(pointer: coarse)").matches||window.matchMedia("(max-width: 640px)").matches},Ko=(e,t)=>(e.addEventListener("change",t),()=>e.removeEventListener("change",t)),jo=({open:e,activeId:t})=>{const{setActive:n}=Q();return c(()=>{if(!e)return;let r=!1;return requestAnimationFrame(()=>{requestAnimationFrame(()=>{r||n(t)})}),()=>{r=!0}},[e,t,n]),null},qo=i(({date:e,outside:t=!1,disabled:n=!1,active:r=!1,selected:o,className:a,onClick:i,onMouseDown:s,role:l,tabIndex:c,...d},u)=>{const{value:m,selectDate:f,locale:g}=F(),p=o??(null!==m&&zo(m,e)),v=zo(e,/* @__PURE__ */new Date),b=e.toLocaleDateString(g,{weekday:"long",month:"long",day:"numeric",year:"numeric"});/* @__PURE__ */
|
|
@@ -112,8 +112,8 @@ return I(o?tr:Dn,{ref:n,size:14,className:Jt("group-data-[state=error]:text-erro
|
|
|
112
112
|
return I(pe,{value:V,children:e})};ci.displayName="Selector.Root";const di=M(["flex w-full items-center justify-between gap-2.5","h-12 rounded-sm border bg-surface-neutral px-4","cursor-pointer select-none text-left","focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring","focus-visible:ring-offset-3 focus-visible:ring-offset-ring-offset","transition-highlight"],{variants:{error:{true:"border-error focus-visible:border-error focus-visible:ring-error",false:"border-bdr-subtle focus-visible:border-bdr-strong"},open:{true:"border-bdr-strong",false:null},disabled:{true:"pointer-events-none cursor-not-allowed select-none opacity-30",false:null}},defaultVariants:{error:!1,open:!1,disabled:!1}}),ui=i(({className:e,children:t,onClick:n,...r},o)=>{const{baseId:i,open:s,setOpen:l,active:c,disabled:d,error:u,keyHandler:m,triggerRef:f}=ve(),g=`${i}-content`,p=a(e=>{n?.(e),d||l(!s)},[n,d,l,s]);/* @__PURE__ */
|
|
113
113
|
return I("button",{ref:en(o,f),type:"button",id:`${i}-trigger`,role:"combobox","aria-controls":g,"aria-expanded":s,"aria-haspopup":"listbox","aria-activedescendant":s&&c?`${i}-option-${c}`:void 0,"aria-disabled":d||void 0,"aria-invalid":u||void 0,disabled:d,"data-state":s?"open":"closed",className:Jt(di({error:u,open:s,disabled:d}),e),onClick:p,onKeyDown:m,...r,children:t})});ui.displayName="Selector.Trigger";const mi=i(({className:e,placeholder:t,children:n,...r},o)=>{const{value:a}=ve();let i=null;a&&(i=function(e){return"function"==typeof e}(n)?n(a):n??a);const s=!i&&t;/* @__PURE__ */
|
|
114
114
|
return I("span",{ref:o,className:Jt("flex-1 truncate",s&&"text-subtle",e),"data-placeholder":s||void 0,...r,children:i??t})});mi.displayName="Selector.Value";const fi=i(({className:e,children:t,...n},r)=>{const{open:o}=ve();/* @__PURE__ */
|
|
115
|
-
return I("span",{ref:r,"aria-hidden":"true",className:Jt("shrink-0 text-subtle transition-transform",o&&"rotate-180",e),...n,children:t??/* @__PURE__ */I(yn,{className:"size-5"})})});fi.displayName="Selector.Icon";const gi=i(({className:e,children:t,align:n="start",onEscapeKeyDown:r,onPointerDownOutside:o,onInteractOutside:a,...i},l)=>{const{baseId:d,open:f,setOpen:g,active:p,triggerRef:v}=ve(),h=u(null),y=en(l,h),[w,x]=s(!1),[N,k]=s(!1),C=Fn({enabled:f,triggerRef:v,contentRef:h,align:n});
|
|
116
|
-
/* @__PURE__ */I("div",{ref:y,id:`${d}-content`,role:"listbox","aria-labelledby":`${d}-trigger`,tabIndex:-1,"data-state":"open",className:Jt("fixed z-50
|
|
115
|
+
return I("span",{ref:r,"aria-hidden":"true",className:Jt("shrink-0 text-subtle transition-transform",o&&"rotate-180",e),...n,children:t??/* @__PURE__ */I(yn,{className:"size-5"})})});fi.displayName="Selector.Icon";const gi=i(({className:e,children:t,align:n="start",onEscapeKeyDown:r,onPointerDownOutside:o,onInteractOutside:a,...i},l)=>{const{baseId:d,open:f,setOpen:g,active:p,triggerRef:v}=ve(),h=u(null),y=en(l,h),[w,x]=s(!1),[N,k]=s(!1),C=Fn({enabled:f,triggerRef:v,contentRef:h,align:n});if(c(()=>{x(!0)},[]),m(()=>{f&&h.current&&k(h.current.parentElement===document.body)},[f]),Yn(h,N),Ln({enabled:f,contentRef:h,excludeRefs:[v],onPointerDownOutside:o,onInteractOutside:a,onClose:()=>g(!1)}),_n({containerRef:h,activeId:p,orientation:"vertical",buildElementId:e=>`${d}-option-${e}`}),!w||!f)return null;const{side:D,...M}=C??{side:"bottom"};return b(
|
|
116
|
+
/* @__PURE__ */I("div",{ref:y,id:`${d}-content`,role:"listbox","aria-labelledby":`${d}-trigger`,tabIndex:-1,"data-state":"open","data-side":C?.side,className:Jt("fixed z-50 flex w-fit min-w-(--trigger-width) flex-col overflow-hidden","data-[side=top]:-mt-2 data-[side=bottom]:mt-2","rounded-sm border border-bdr-subtle bg-surface-neutral shadow-lg outline-none","data-[state=closed]:animate-out data-[state=open]:animate-in","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",!C&&"pointer-events-none opacity-0",e),style:{...M,"--trigger-width":v.current?`${v.current.offsetWidth}px`:void 0},...i,children:t}),document.body)});gi.displayName="Selector.Content";const pi=i(({className:e,children:t,...n},r)=>/* @__PURE__ */I("div",{ref:r,className:Jt("flex max-h-80 flex-col gap-y-1 overflow-y-auto p-1",e),...n,children:t}));pi.displayName="Selector.Viewport";const vi=M(["group relative z-0 flex w-full cursor-pointer items-center gap-x-2.5 px-4.5 py-2 outline-none transition-highlight",'after:-inset-y-0.5 after:-z-10 after:pointer-events-auto after:absolute after:inset-x-0 after:rounded-sm after:content-[""]'],{variants:{selected:{true:"bg-surface-selected text-alt",false:"hover:bg-surface-neutral-hover"},active:{true:null,false:null},disabled:{true:"pointer-events-none cursor-not-allowed opacity-30",false:""}},compoundVariants:[{active:!0,selected:!1,disabled:!1,class:"bg-surface-neutral-hover"},{active:!0,selected:!0,disabled:!1,class:"bg-surface-selected-hover"}],defaultVariants:{selected:!1,active:!1,disabled:!1}}),bi=i(({value:e,disabled:t=!1,textValue:n,className:r,children:o,onClick:i,onPointerMove:s,...l},d)=>{const{baseId:m,value:f,setValue:g,setOpen:p,active:v,setActive:b,disabled:h,registerItem:y,registerItemText:w}=ve(),x=f===e,N=v===e,k=t||h,C=en(d,u(null));c(()=>{y(e,k);const t=n??("string"==typeof o?o:void 0);t&&w(e,t)},[e,k,n,o,y,w]);const D=a(t=>{i?.(t),k||(g(e),p(!1))},[i,k,g,e,p]),M=a(t=>{s?.(t),N||k||b(e)},[s,N,k,b,e]);
|
|
117
117
|
/* @__PURE__ */
|
|
118
118
|
return I("div",{ref:C,id:`${m}-option-${e}`,role:"option","aria-selected":x,"aria-disabled":k||void 0,"data-value":e,"data-active":N||void 0,"data-disabled":k||void 0,"data-state":x?"selected":void 0,"data-tone":x?"inverse":void 0,className:Jt(vi({selected:x,active:N,disabled:k}),r),onClick:D,onPointerMove:M,...l,children:o})});bi.displayName="Selector.Item";const hi=i(({className:e,children:t,...n},r)=>/* @__PURE__ */I("span",{ref:r,className:Jt("flex-1",e),...n,children:t}));hi.displayName="Selector.ItemText";const yi=i(({className:e,children:t,...n},r)=>/* @__PURE__ */I("span",{ref:r,className:Jt("inline-flex shrink-0 items-center justify-center","opacity-0 [[data-state=selected]>&]:opacity-100",e),...n,children:t??/* @__PURE__ */I(hn,{className:"size-4"})}));yi.displayName="Selector.ItemIndicator";const wi=i(({className:e,children:t,...n},r)=>/* @__PURE__ */I("div",{ref:r,role:"group","aria-labelledby":`${H(void 0,"selector-group")}-label`,className:Jt("w-full",e),...n,children:t}));wi.displayName="Selector.Group";const xi=i(({className:e,children:t,...n},r)=>/* @__PURE__ */I("div",{ref:r,className:Jt("px-4.5 py-1.5 font-semibold text-subtle text-xs",e),...n,children:t}));xi.displayName="Selector.Label";const Ii=i(({className:e,...t},n)=>/* @__PURE__ */I("div",{ref:n,role:"separator","aria-orientation":"horizontal",className:Jt("my-1 h-px bg-bdr-subtle",e),...t}));Ii.displayName="Selector.Separator";const Ni=i(({className:e,...t},n)=>{const{value:r,disabled:o,required:a,name:i,form:s,getItems:l,getItemText:c}=ve(),d=l();/* @__PURE__ */
|
|
119
119
|
return I("select",{ref:n,name:i,form:s,disabled:o,required:a,value:r??"",onChange:()=>{},tabIndex:-1,"aria-hidden":"true",className:Jt("absolute h-px w-px overflow-hidden whitespace-nowrap border-0 p-0","[clip:rect(0,0,0,0)]",e),style:{margin:"-1px"},...t,children:[
|