aravint-ui-navigation 1.0.17 → 1.0.19

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.
@@ -1,4 +1,4 @@
1
- "use strict";var Mo=Object.defineProperty;var Do=(e,t,n)=>t in e?Mo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ce=(e,t,n)=>Do(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("react/jsx-runtime"),de=require("react"),tn=require("react-dom");function ar(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const d=ar(de),nn=ar(tn);function cr(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=cr(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function lr(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=cr(e))&&(r&&(r+=" "),r+=t);return r}const kn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Pn=lr,ur=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Pn(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(l=>{const u=n==null?void 0:n[l],f=s==null?void 0:s[l];if(u===null)return null;const h=kn(u)||kn(f);return o[l][h]}),a=n&&Object.entries(n).reduce((l,u)=>{let[f,h]=u;return h===void 0||(l[f]=h),l},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,u)=>{let{class:f,className:h,...m}=u;return Object.entries(m).every(p=>{let[g,x]=p;return Array.isArray(x)?x.includes({...s,...a}[g]):{...s,...a}[g]===x})?[...l,f,h]:l},[]);return Pn(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},rn="-",Lo=e=>{const t=jo(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(rn);return a[0]===""&&a.length!==1&&a.shift(),dr(a,t)||_o(i)},getConflictingClassGroupIds:(i,a)=>{const c=n[i]||[];return a&&r[i]?[...c,...r[i]]:c}}},dr=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?dr(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(rn);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},Sn=/^\[(.+)\]$/,_o=e=>{if(Sn.test(e)){const t=Sn.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},jo=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)$t(n[o],r,o,t);return r},$t=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Nn(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(zo(o)){$t(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{$t(i,Nn(t,s),n,r)})})},Nn=(e,t)=>{let n=e;return t.split(rn).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},zo=e=>e.isThemeGetter,$o=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},Bt="!",Ft=":",Bo=Ft.length,Fo=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,a=0,c=0,l;for(let p=0;p<o.length;p++){let g=o[p];if(i===0&&a===0){if(g===Ft){s.push(o.slice(c,p)),c=p+Bo;continue}if(g==="/"){l=p;continue}}g==="["?i++:g==="]"?i--:g==="("?a++:g===")"&&a--}const u=s.length===0?o:o.substring(c),f=Vo(u),h=f!==u,m=l&&l>c?l-c:void 0;return{modifiers:s,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:m}};if(t){const o=t+Ft,s=r;r=i=>i.startsWith(o)?s(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},Vo=e=>e.endsWith(Bt)?e.substring(0,e.length-1):e.startsWith(Bt)?e.substring(1):e,Wo=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let s=[];return r.forEach(i=>{i[0]==="["||t[i]?(o.push(...s.sort(),i),s=[]):s.push(i)}),o.push(...s.sort()),o}},Ho=e=>({cache:$o(e.cacheSize),parseClassName:Fo(e),sortModifiers:Wo(e),...Lo(e)}),Uo=/\s+/,Go=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(Uo);let c="";for(let l=a.length-1;l>=0;l-=1){const u=a[l],{isExternal:f,modifiers:h,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:g}=n(u);if(f){c=u+(c.length>0?" "+c:c);continue}let x=!!g,v=r(x?p.substring(0,g):p);if(!v){if(!x){c=u+(c.length>0?" "+c:c);continue}if(v=r(p),!v){c=u+(c.length>0?" "+c:c);continue}x=!1}const y=s(h).join(":"),w=m?y+Bt:y,b=w+v;if(i.includes(b))continue;i.push(b);const T=o(v,x);for(let P=0;P<T.length;++P){const k=T[P];i.push(w+k)}c=u+(c.length>0?" "+c:c)}return c};function Ko(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=fr(t))&&(r&&(r+=" "),r+=n);return r}const fr=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=fr(e[r]))&&(n&&(n+=" "),n+=t);return n};function Yo(e,...t){let n,r,o,s=i;function i(c){const l=t.reduce((u,f)=>f(u),e());return n=Ho(l),r=n.cache.get,o=n.cache.set,s=a,a(c)}function a(c){const l=r(c);if(l)return l;const u=Go(c,n);return o(c,u),u}return function(){return s(Ko.apply(null,arguments))}}const q=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},pr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,mr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,qo=/^\d+\/\d+$/,Xo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Zo=/\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$/,Jo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Qo=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,es=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Me=e=>qo.test(e),$=e=>!!e&&!Number.isNaN(Number(e)),we=e=>!!e&&Number.isInteger(Number(e)),It=e=>e.endsWith("%")&&$(e.slice(0,-1)),me=e=>Xo.test(e),ts=()=>!0,ns=e=>Zo.test(e)&&!Jo.test(e),gr=()=>!1,rs=e=>Qo.test(e),os=e=>es.test(e),ss=e=>!N(e)&&!O(e),is=e=>ze(e,xr,gr),N=e=>pr.test(e),Pe=e=>ze(e,vr,ns),Mt=e=>ze(e,ds,$),On=e=>ze(e,hr,gr),as=e=>ze(e,br,os),Qe=e=>ze(e,yr,rs),O=e=>mr.test(e),We=e=>$e(e,vr),cs=e=>$e(e,fs),In=e=>$e(e,hr),ls=e=>$e(e,xr),us=e=>$e(e,br),et=e=>$e(e,yr,!0),ze=(e,t,n)=>{const r=pr.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},$e=(e,t,n=!1)=>{const r=mr.exec(e);return r?r[1]?t(r[1]):n:!1},hr=e=>e==="position"||e==="percentage",br=e=>e==="image"||e==="url",xr=e=>e==="length"||e==="size"||e==="bg-size",vr=e=>e==="length",ds=e=>e==="number",fs=e=>e==="family-name",yr=e=>e==="shadow",ps=()=>{const e=q("color"),t=q("font"),n=q("text"),r=q("font-weight"),o=q("tracking"),s=q("leading"),i=q("breakpoint"),a=q("container"),c=q("spacing"),l=q("radius"),u=q("shadow"),f=q("inset-shadow"),h=q("text-shadow"),m=q("drop-shadow"),p=q("blur"),g=q("perspective"),x=q("aspect"),v=q("ease"),y=q("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],T=()=>[...b(),O,N],P=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],R=()=>[O,N,c],M=()=>[Me,"full","auto",...R()],C=()=>[we,"none","subgrid",O,N],S=()=>["auto",{span:["full",we,O,N]},we,O,N],I=()=>[we,"auto",O,N],j=()=>["auto","min","max","fr",O,N],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...R()],F=()=>[Me,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],E=()=>[e,O,N],_=()=>[...b(),In,On,{position:[O,N]}],K=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Y=()=>["auto","cover","contain",ls,is,{size:[O,N]}],re=()=>[It,We,Pe],z=()=>["","none","full",l,O,N],H=()=>["",$,We,Pe],X=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>[$,It,In,On],Ae=()=>["","none",p,O,N],B=()=>["none",$,O,N],V=()=>["none",$,O,N],G=()=>[$,O,N],ee=()=>[Me,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[me],breakpoint:[me],color:[ts],container:[me],"drop-shadow":[me],ease:["in","out","in-out"],font:[ss],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[me],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[me],shadow:[me],spacing:["px",$],text:[me],"text-shadow":[me],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Me,N,O,x]}],container:["container"],columns:[{columns:[$,N,O,a]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"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:T()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[we,"auto",O,N]}],basis:[{basis:[Me,"full","auto",a,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[$,Me,"auto","initial","none",N]}],grow:[{grow:["",$,O,N]}],shrink:[{shrink:["",$,O,N]}],order:[{order:[we,"first","last","none",O,N]}],"grid-cols":[{"grid-cols":C()}],"col-start-end":[{col:S()}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":C()}],"row-start-end":[{row:S()}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],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":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[a,"screen",...F()]}],"min-w":[{"min-w":[a,"screen","none",...F()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...F()]}],h:[{h:["screen",...F()]}],"min-h":[{"min-h":["screen","none",...F()]}],"max-h":[{"max-h":["screen",...F()]}],"font-size":[{text:["base",n,We,Pe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,O,Mt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",It,N]}],"font-family":[{font:[cs,N,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,O,N]}],"line-clamp":[{"line-clamp":[$,"none",O,Mt]}],leading:[{leading:[s,...R()]}],"list-image":[{"list-image":["none",O,N]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",O,N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:[$,"from-font","auto",O,Pe]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[$,"auto",O,N]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",O,N]}],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",O,N]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_()}],"bg-repeat":[{bg:K()}],"bg-size":[{bg:Y()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},we,O,N],radial:["",O,N],conic:[we,O,N]},us,as]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...X(),"hidden","none"]}],"divide-style":[{divide:[...X(),"hidden","none"]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:[...X(),"none","hidden"]}],"outline-offset":[{"outline-offset":[$,O,N]}],"outline-w":[{outline:["",$,We,Pe]}],"outline-color":[{outline:E()}],shadow:[{shadow:["","none",u,et,Qe]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":["none",f,et,Qe]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[$,Pe]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":["none",h,et,Qe]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[$,O,N]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"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":[$]}],"mask-image-linear-from-pos":[{"mask-linear-from":U()}],"mask-image-linear-to-pos":[{"mask-linear-to":U()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":U()}],"mask-image-t-to-pos":[{"mask-t-to":U()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":U()}],"mask-image-r-to-pos":[{"mask-r-to":U()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":U()}],"mask-image-b-to-pos":[{"mask-b-to":U()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":U()}],"mask-image-l-to-pos":[{"mask-l-to":U()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":U()}],"mask-image-x-to-pos":[{"mask-x-to":U()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":U()}],"mask-image-y-to-pos":[{"mask-y-to":U()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[O,N]}],"mask-image-radial-from-pos":[{"mask-radial-from":U()}],"mask-image-radial-to-pos":[{"mask-radial-to":U()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"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":b()}],"mask-image-conic-pos":[{"mask-conic":[$]}],"mask-image-conic-from-pos":[{"mask-conic-from":U()}],"mask-image-conic-to-pos":[{"mask-conic-to":U()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_()}],"mask-repeat":[{mask:K()}],"mask-size":[{mask:Y()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",O,N]}],filter:[{filter:["","none",O,N]}],blur:[{blur:Ae()}],brightness:[{brightness:[$,O,N]}],contrast:[{contrast:[$,O,N]}],"drop-shadow":[{"drop-shadow":["","none",m,et,Qe]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:["",$,O,N]}],"hue-rotate":[{"hue-rotate":[$,O,N]}],invert:[{invert:["",$,O,N]}],saturate:[{saturate:[$,O,N]}],sepia:[{sepia:["",$,O,N]}],"backdrop-filter":[{"backdrop-filter":["","none",O,N]}],"backdrop-blur":[{"backdrop-blur":Ae()}],"backdrop-brightness":[{"backdrop-brightness":[$,O,N]}],"backdrop-contrast":[{"backdrop-contrast":[$,O,N]}],"backdrop-grayscale":[{"backdrop-grayscale":["",$,O,N]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[$,O,N]}],"backdrop-invert":[{"backdrop-invert":["",$,O,N]}],"backdrop-opacity":[{"backdrop-opacity":[$,O,N]}],"backdrop-saturate":[{"backdrop-saturate":[$,O,N]}],"backdrop-sepia":[{"backdrop-sepia":["",$,O,N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",O,N]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[$,"initial",O,N]}],ease:[{ease:["linear","initial",v,O,N]}],delay:[{delay:[$,O,N]}],animate:[{animate:["none",y,O,N]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,O,N]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:B()}],"rotate-x":[{"rotate-x":B()}],"rotate-y":[{"rotate-y":B()}],"rotate-z":[{"rotate-z":B()}],scale:[{scale:V()}],"scale-x":[{"scale-x":V()}],"scale-y":[{"scale-y":V()}],"scale-z":[{"scale-z":V()}],"scale-3d":["scale-3d"],skew:[{skew:G()}],"skew-x":[{"skew-x":G()}],"skew-y":[{"skew-y":G()}],transform:[{transform:[O,N,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ee()}],"translate-x":[{"translate-x":ee()}],"translate-y":[{"translate-y":ee()}],"translate-z":[{"translate-z":ee()}],"translate-none":["translate-none"],accent:[{accent:E()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:E()}],"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",O,N]}],"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":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",O,N]}],fill:[{fill:["none",...E()]}],"stroke-w":[{stroke:[$,We,Pe,Mt]}],stroke:[{stroke:["none",...E()]}],"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"]}},ms=Yo(ps);function Z(...e){return ms(lr(e))}function ge(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Mn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wr(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Mn(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Mn(e[o],null)}}}}function Ie(...e){return d.useCallback(wr(...e),e)}function Er(e,t=[]){let n=[];function r(s,i){const a=d.createContext(i),c=n.length;n=[...n,i];const l=f=>{var v;const{scope:h,children:m,...p}=f,g=((v=h==null?void 0:h[e])==null?void 0:v[c])||a,x=d.useMemo(()=>p,Object.values(p));return A.jsx(g.Provider,{value:x,children:m})};l.displayName=s+"Provider";function u(f,h){var g;const m=((g=h==null?void 0:h[e])==null?void 0:g[c])||a,p=d.useContext(m);if(p)return p;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[l,u]}const o=()=>{const s=n.map(i=>d.createContext(i));return function(a){const c=(a==null?void 0:a[e])||s;return d.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,gs(o,...t)]}function gs(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:c,scopeName:l})=>{const f=c(s)[`__scope${l}`];return{...a,...f}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function hs(e){const t=bs(e),n=d.forwardRef((r,o)=>{const{children:s,...i}=r,a=d.Children.toArray(s),c=a.find(vs);if(c){const l=c.props.children,u=a.map(f=>f===c?d.Children.count(l)>1?d.Children.only(null):d.isValidElement(l)?l.props.children:null:f);return A.jsx(t,{...i,ref:o,children:d.isValidElement(l)?d.cloneElement(l,void 0,u):null})}return A.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function bs(e){const t=d.forwardRef((n,r)=>{const{children:o,...s}=n;if(d.isValidElement(o)){const i=ws(o),a=ys(s,o.props);return o.type!==d.Fragment&&(a.ref=r?wr(r,i):i),d.cloneElement(o,a)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Cr=Symbol("radix.slottable");function xs(e){const t=({children:n})=>A.jsx(A.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Cr,t}function vs(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Cr}function ys(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function ws(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Es=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Te=Es.reduce((e,t)=>{const n=hs(`Primitive.${t}`),r=d.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),A.jsx(c,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Cs(e,t){e&&nn.flushSync(()=>e.dispatchEvent(t))}function vt(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Rs(e,t=globalThis==null?void 0:globalThis.document){const n=vt(e);d.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Ts="DismissableLayer",Vt="dismissableLayer.update",As="dismissableLayer.pointerDownOutside",ks="dismissableLayer.focusOutside",Dn,Rr=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Tr=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...c}=e,l=d.useContext(Rr),[u,f]=d.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=d.useState({}),p=Ie(t,k=>f(k)),g=Array.from(l.layers),[x]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(x),y=u?g.indexOf(u):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,b=y>=v,T=Ns(k=>{const R=k.target,M=[...l.branches].some(C=>C.contains(R));!b||M||(o==null||o(k),i==null||i(k),k.defaultPrevented||a==null||a())},h),P=Os(k=>{const R=k.target;[...l.branches].some(C=>C.contains(R))||(s==null||s(k),i==null||i(k),k.defaultPrevented||a==null||a())},h);return Rs(k=>{y===l.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},h),d.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Dn=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Ln(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Dn)}},[u,h,n,l]),d.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Ln())},[u,l]),d.useEffect(()=>{const k=()=>m({});return document.addEventListener(Vt,k),()=>document.removeEventListener(Vt,k)},[]),A.jsx(Te.div,{...c,ref:p,style:{pointerEvents:w?b?"auto":"none":void 0,...e.style},onFocusCapture:ge(e.onFocusCapture,P.onFocusCapture),onBlurCapture:ge(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:ge(e.onPointerDownCapture,T.onPointerDownCapture)})});Tr.displayName=Ts;var Ps="DismissableLayerBranch",Ss=d.forwardRef((e,t)=>{const n=d.useContext(Rr),r=d.useRef(null),o=Ie(t,r);return d.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),A.jsx(Te.div,{...e,ref:o})});Ss.displayName=Ps;function Ns(e,t=globalThis==null?void 0:globalThis.document){const n=vt(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let c=function(){Ar(As,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Os(e,t=globalThis==null?void 0:globalThis.document){const n=vt(e),r=d.useRef(!1);return d.useEffect(()=>{const o=s=>{s.target&&!r.current&&Ar(ks,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ln(){const e=new CustomEvent(Vt);document.dispatchEvent(e)}function Ar(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Cs(o,s):o.dispatchEvent(s)}var Ee=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},Is=d[" useId ".trim().toString()]||(()=>{}),Ms=0;function Ds(e){const[t,n]=d.useState(Is());return Ee(()=>{n(r=>r??String(Ms++))},[e]),t?`radix-${t}`:""}const Ls=["top","right","bottom","left"],Ce=Math.min,te=Math.max,lt=Math.round,tt=Math.floor,ue=e=>({x:e,y:e}),_s={left:"right",right:"left",bottom:"top",top:"bottom"};function Wt(e,t,n){return te(e,Ce(t,n))}function xe(e,t){return typeof e=="function"?e(t):e}function ve(e){return e.split("-")[0]}function Be(e){return e.split("-")[1]}function on(e){return e==="x"?"y":"x"}function sn(e){return e==="y"?"height":"width"}function le(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function an(e){return on(le(e))}function js(e,t,n){n===void 0&&(n=!1);const r=Be(e),o=an(e),s=sn(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=ut(i)),[i,ut(i)]}function zs(e){const t=ut(e);return[Ht(e),t,Ht(t)]}function Ht(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const _n=["left","right"],jn=["right","left"],$s=["top","bottom"],Bs=["bottom","top"];function Fs(e,t,n){switch(e){case"top":case"bottom":return n?t?jn:_n:t?_n:jn;case"left":case"right":return t?$s:Bs;default:return[]}}function Vs(e,t,n,r){const o=Be(e);let s=Fs(ve(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Ht)))),s}function ut(e){const t=ve(e);return _s[t]+e.slice(t.length)}function Ws(e){return{top:0,right:0,bottom:0,left:0,...e}}function kr(e){return typeof e!="number"?Ws(e):{top:e,right:e,bottom:e,left:e}}function dt(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function zn(e,t,n){let{reference:r,floating:o}=e;const s=le(t),i=an(t),a=sn(i),c=ve(t),l=s==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let m;switch(c){case"top":m={x:u,y:r.y-o.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-o.width,y:f};break;default:m={x:r.x,y:r.y}}switch(Be(t)){case"start":m[i]-=h*(n&&l?-1:1);break;case"end":m[i]+=h*(n&&l?-1:1);break}return m}async function Hs(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:m=0}=xe(t,e),p=kr(m),x=a[h?f==="floating"?"reference":"floating":f],v=dt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:u,strategy:c})),y=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),b=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},T=dt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:w,strategy:c}):y);return{top:(v.top-T.top+p.top)/b.y,bottom:(T.bottom-v.bottom+p.bottom)/b.y,left:(v.left-T.left+p.left)/b.x,right:(T.right-v.right+p.right)/b.x}}const Us=50,Gs=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=i.detectOverflow?i:{...i,detectOverflow:Hs},c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=zn(l,r,c),h=r,m=0;const p={};for(let g=0;g<s.length;g++){const x=s[g];if(!x)continue;const{name:v,fn:y}=x,{x:w,y:b,data:T,reset:P}=await y({x:u,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:p,rects:l,platform:a,elements:{reference:e,floating:t}});u=w??u,f=b??f,p[v]={...p[v],...T},P&&m<Us&&(m++,typeof P=="object"&&(P.placement&&(h=P.placement),P.rects&&(l=P.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):P.rects),{x:u,y:f}=zn(l,h,c)),g=-1)}return{x:u,y:f,placement:h,strategy:o,middlewareData:p}},Ks=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:l,padding:u=0}=xe(e,t)||{};if(l==null)return{};const f=kr(u),h={x:n,y:r},m=an(o),p=sn(m),g=await i.getDimensions(l),x=m==="y",v=x?"top":"left",y=x?"bottom":"right",w=x?"clientHeight":"clientWidth",b=s.reference[p]+s.reference[m]-h[m]-s.floating[p],T=h[m]-s.reference[m],P=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let k=P?P[w]:0;(!k||!await(i.isElement==null?void 0:i.isElement(P)))&&(k=a.floating[w]||s.floating[p]);const R=b/2-T/2,M=k/2-g[p]/2-1,C=Ce(f[v],M),S=Ce(f[y],M),I=C,j=k-g[p]-S,L=k/2-g[p]/2+R,W=Wt(I,L,j),D=!c.arrow&&Be(o)!=null&&L!==W&&s.reference[p]/2-(L<I?C:S)-g[p]/2<0,F=D?L<I?L-I:L-j:0;return{[m]:h[m]+F,data:{[m]:W,centerOffset:L-W-F,...D&&{alignmentOffset:F}},reset:D}}}),Ys=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...x}=xe(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=ve(o),y=le(a),w=ve(a)===a,b=await(c.isRTL==null?void 0:c.isRTL(l.floating)),T=h||(w||!g?[ut(a)]:zs(a)),P=p!=="none";!h&&P&&T.push(...Vs(a,g,p,b));const k=[a,...T],R=await c.detectOverflow(t,x),M=[];let C=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&M.push(R[v]),f){const L=js(o,i,b);M.push(R[L[0]],R[L[1]])}if(C=[...C,{placement:o,overflows:M}],!M.every(L=>L<=0)){var S,I;const L=(((S=s.flip)==null?void 0:S.index)||0)+1,W=k[L];if(W&&(!(f==="alignment"?y!==le(W):!1)||C.every(E=>le(E.placement)===y?E.overflows[0]>0:!0)))return{data:{index:L,overflows:C},reset:{placement:W}};let D=(I=C.filter(F=>F.overflows[0]<=0).sort((F,E)=>F.overflows[1]-E.overflows[1])[0])==null?void 0:I.placement;if(!D)switch(m){case"bestFit":{var j;const F=(j=C.filter(E=>{if(P){const _=le(E.placement);return _===y||_==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(_=>_>0).reduce((_,K)=>_+K,0)]).sort((E,_)=>E[1]-_[1])[0])==null?void 0:j[0];F&&(D=F);break}case"initialPlacement":D=a;break}if(o!==D)return{reset:{placement:D}}}return{}}}};function $n(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Bn(e){return Ls.some(t=>e[t]>=0)}const qs=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=xe(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=$n(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Bn(a)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),a=$n(i,n.floating);return{data:{escapedOffsets:a,escaped:Bn(a)}}}default:return{}}}}},Pr=new Set(["left","top"]);async function Xs(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=ve(n),a=Be(n),c=le(n)==="y",l=Pr.has(i)?-1:1,u=s&&c?-1:1,f=xe(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof p=="number"&&(m=a==="end"?p*-1:p),c?{x:m*u,y:h*l}:{x:h*l,y:m*u}}const Zs=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,c=await Xs(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},Js=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:v=>{let{x:y,y:w}=v;return{x:y,y:w}}},...l}=xe(e,t),u={x:n,y:r},f=await s.detectOverflow(t,l),h=le(ve(o)),m=on(h);let p=u[m],g=u[h];if(i){const v=m==="y"?"top":"left",y=m==="y"?"bottom":"right",w=p+f[v],b=p-f[y];p=Wt(w,p,b)}if(a){const v=h==="y"?"top":"left",y=h==="y"?"bottom":"right",w=g+f[v],b=g-f[y];g=Wt(w,g,b)}const x=c.fn({...t,[m]:p,[h]:g});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[m]:i,[h]:a}}}}}},Qs=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=xe(e,t),u={x:n,y:r},f=le(o),h=on(f);let m=u[h],p=u[f];const g=xe(a,t),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const w=h==="y"?"height":"width",b=s.reference[h]-s.floating[w]+x.mainAxis,T=s.reference[h]+s.reference[w]-x.mainAxis;m<b?m=b:m>T&&(m=T)}if(l){var v,y;const w=h==="y"?"width":"height",b=Pr.has(ve(o)),T=s.reference[f]-s.floating[w]+(b&&((v=i.offset)==null?void 0:v[f])||0)+(b?0:x.crossAxis),P=s.reference[f]+s.reference[w]+(b?0:((y=i.offset)==null?void 0:y[f])||0)-(b?x.crossAxis:0);p<T?p=T:p>P&&(p=P)}return{[h]:m,[f]:p}}}},ei=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:c=()=>{},...l}=xe(e,t),u=await i.detectOverflow(t,l),f=ve(o),h=Be(o),m=le(o)==="y",{width:p,height:g}=s.floating;let x,v;f==="top"||f==="bottom"?(x=f,v=h===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(v=f,x=h==="end"?"top":"bottom");const y=g-u.top-u.bottom,w=p-u.left-u.right,b=Ce(g-u[x],y),T=Ce(p-u[v],w),P=!t.middlewareData.shift;let k=b,R=T;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=y),P&&!h){const C=te(u.left,0),S=te(u.right,0),I=te(u.top,0),j=te(u.bottom,0);m?R=p-2*(C!==0||S!==0?C+S:te(u.left,u.right)):k=g-2*(I!==0||j!==0?I+j:te(u.top,u.bottom))}await c({...t,availableWidth:R,availableHeight:k});const M=await i.getDimensions(a.floating);return p!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}};function yt(){return typeof window<"u"}function Fe(e){return Sr(e)?(e.nodeName||"").toLowerCase():"#document"}function ne(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function fe(e){var t;return(t=(Sr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Sr(e){return yt()?e instanceof Node||e instanceof ne(e).Node:!1}function ie(e){return yt()?e instanceof Element||e instanceof ne(e).Element:!1}function se(e){return yt()?e instanceof HTMLElement||e instanceof ne(e).HTMLElement:!1}function Ut(e){return!yt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ne(e).ShadowRoot}function Xe(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=oe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function ti(e){return/^(table|td|th)$/.test(Fe(e))}function wt(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const ni=/transform|translate|scale|rotate|perspective|filter/,ri=/paint|layout|strict|content/,Se=e=>!!e&&e!=="none";let Dt;function cn(e){const t=ie(e)?oe(e):e;return Se(t.transform)||Se(t.translate)||Se(t.scale)||Se(t.rotate)||Se(t.perspective)||!ln()&&(Se(t.backdropFilter)||Se(t.filter))||ni.test(t.willChange||"")||ri.test(t.contain||"")}function oi(e){let t=Re(e);for(;se(t)&&!Le(t);){if(cn(t))return t;if(wt(t))return null;t=Re(t)}return null}function ln(){return Dt==null&&(Dt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Dt}function Le(e){return/^(html|body|#document)$/.test(Fe(e))}function oe(e){return ne(e).getComputedStyle(e)}function Et(e){return ie(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Re(e){if(Fe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ut(e)&&e.host||fe(e);return Ut(t)?t.host:t}function Nr(e){const t=Re(e);return Le(t)?e.ownerDocument?e.ownerDocument.body:e.body:se(t)&&Xe(t)?t:Nr(t)}function Ke(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Nr(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=ne(o);if(s){const a=Gt(i);return t.concat(i,i.visualViewport||[],Xe(o)?o:[],a&&n?Ke(a):[])}else return t.concat(o,Ke(o,[],n))}function Gt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Or(e){const t=oe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=se(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=lt(n)!==s||lt(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function un(e){return ie(e)?e:e.contextElement}function De(e){const t=un(e);if(!se(t))return ue(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Or(t);let i=(s?lt(n.width):n.width)/r,a=(s?lt(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const si=ue(0);function Ir(e){const t=ne(e);return!ln()||!t.visualViewport?si:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ii(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ne(e)?!1:t}function Oe(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=un(e);let i=ue(1);t&&(r?ie(r)&&(i=De(r)):i=De(e));const a=ii(s,n,r)?Ir(s):ue(0);let c=(o.left+a.x)/i.x,l=(o.top+a.y)/i.y,u=o.width/i.x,f=o.height/i.y;if(s){const h=ne(s),m=r&&ie(r)?ne(r):r;let p=h,g=Gt(p);for(;g&&r&&m!==p;){const x=De(g),v=g.getBoundingClientRect(),y=oe(g),w=v.left+(g.clientLeft+parseFloat(y.paddingLeft))*x.x,b=v.top+(g.clientTop+parseFloat(y.paddingTop))*x.y;c*=x.x,l*=x.y,u*=x.x,f*=x.y,c+=w,l+=b,p=ne(g),g=Gt(p)}}return dt({width:u,height:f,x:c,y:l})}function Ct(e,t){const n=Et(e).scrollLeft;return t?t.left+n:Oe(fe(e)).left+n}function Mr(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ct(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function ai(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=fe(r),a=t?wt(t.floating):!1;if(r===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},l=ue(1);const u=ue(0),f=se(r);if((f||!f&&!s)&&((Fe(r)!=="body"||Xe(i))&&(c=Et(r)),f)){const m=Oe(r);l=De(r),u.x=m.x+r.clientLeft,u.y=m.y+r.clientTop}const h=i&&!f&&!s?Mr(i,c):ue(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+h.x,y:n.y*l.y-c.scrollTop*l.y+u.y+h.y}}function ci(e){return Array.from(e.getClientRects())}function li(e){const t=fe(e),n=Et(e),r=e.ownerDocument.body,o=te(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=te(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Ct(e);const a=-n.scrollTop;return oe(r).direction==="rtl"&&(i+=te(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const Fn=25;function ui(e,t){const n=ne(e),r=fe(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const u=ln();(!u||u&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}const l=Ct(r);if(l<=0){const u=r.ownerDocument,f=u.body,h=getComputedStyle(f),m=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,p=Math.abs(r.clientWidth-f.clientWidth-m);p<=Fn&&(s-=p)}else l<=Fn&&(s+=l);return{width:s,height:i,x:a,y:c}}function di(e,t){const n=Oe(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=se(e)?De(e):ue(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,l=r*s.y;return{width:i,height:a,x:c,y:l}}function Vn(e,t,n){let r;if(t==="viewport")r=ui(e,n);else if(t==="document")r=li(fe(e));else if(ie(t))r=di(t,n);else{const o=Ir(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return dt(r)}function Dr(e,t){const n=Re(e);return n===t||!ie(n)||Le(n)?!1:oe(n).position==="fixed"||Dr(n,t)}function fi(e,t){const n=t.get(e);if(n)return n;let r=Ke(e,[],!1).filter(a=>ie(a)&&Fe(a)!=="body"),o=null;const s=oe(e).position==="fixed";let i=s?Re(e):e;for(;ie(i)&&!Le(i);){const a=oe(i),c=cn(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Xe(i)&&!c&&Dr(e,i))?r=r.filter(u=>u!==i):o=a,i=Re(i)}return t.set(e,r),r}function pi(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?wt(t)?[]:fi(t,this._c):[].concat(n),r],a=Vn(t,i[0],o);let c=a.top,l=a.right,u=a.bottom,f=a.left;for(let h=1;h<i.length;h++){const m=Vn(t,i[h],o);c=te(m.top,c),l=Ce(m.right,l),u=Ce(m.bottom,u),f=te(m.left,f)}return{width:l-f,height:u-c,x:f,y:c}}function mi(e){const{width:t,height:n}=Or(e);return{width:t,height:n}}function gi(e,t,n){const r=se(t),o=fe(t),s=n==="fixed",i=Oe(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=ue(0);function l(){c.x=Ct(o)}if(r||!r&&!s)if((Fe(t)!=="body"||Xe(o))&&(a=Et(t)),r){const m=Oe(t,!0,s,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else o&&l();s&&!r&&o&&l();const u=o&&!r&&!s?Mr(o,a):ue(0),f=i.left+a.scrollLeft-c.x-u.x,h=i.top+a.scrollTop-c.y-u.y;return{x:f,y:h,width:i.width,height:i.height}}function Lt(e){return oe(e).position==="static"}function Wn(e,t){if(!se(e)||oe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return fe(e)===n&&(n=n.ownerDocument.body),n}function Lr(e,t){const n=ne(e);if(wt(e))return n;if(!se(e)){let o=Re(e);for(;o&&!Le(o);){if(ie(o)&&!Lt(o))return o;o=Re(o)}return n}let r=Wn(e,t);for(;r&&ti(r)&&Lt(r);)r=Wn(r,t);return r&&Le(r)&&Lt(r)&&!cn(r)?n:r||oi(e)||n}const hi=async function(e){const t=this.getOffsetParent||Lr,n=this.getDimensions,r=await n(e.floating);return{reference:gi(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function bi(e){return oe(e).direction==="rtl"}const xi={convertOffsetParentRelativeRectToViewportRelativeRect:ai,getDocumentElement:fe,getClippingRect:pi,getOffsetParent:Lr,getElementRects:hi,getClientRects:ci,getDimensions:mi,getScale:De,isElement:ie,isRTL:bi};function _r(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function vi(e,t){let n=null,r;const o=fe(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:u,top:f,width:h,height:m}=l;if(a||t(),!h||!m)return;const p=tt(f),g=tt(o.clientWidth-(u+h)),x=tt(o.clientHeight-(f+m)),v=tt(u),w={rootMargin:-p+"px "+-g+"px "+-x+"px "+-v+"px",threshold:te(0,Ce(1,c))||1};let b=!0;function T(P){const k=P[0].intersectionRatio;if(k!==c){if(!b)return i();k?i(!1,k):r=setTimeout(()=>{i(!1,1e-7)},1e3)}k===1&&!_r(l,e.getBoundingClientRect())&&i(),b=!1}try{n=new IntersectionObserver(T,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,w)}n.observe(e)}return i(!0),s}function yi(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=un(e),u=o||s?[...l?Ke(l):[],...t?Ke(t):[]]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const f=l&&a?vi(l,n):null;let h=-1,m=null;i&&(m=new ResizeObserver(v=>{let[y]=v;y&&y.target===l&&m&&t&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=m)==null||w.observe(t)})),n()}),l&&!c&&m.observe(l),t&&m.observe(t));let p,g=c?Oe(e):null;c&&x();function x(){const v=Oe(e);g&&!_r(g,v)&&n(),g=v,p=requestAnimationFrame(x)}return n(),()=>{var v;u.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),f==null||f(),(v=m)==null||v.disconnect(),m=null,c&&cancelAnimationFrame(p)}}const wi=Zs,Ei=Js,Ci=Ys,Ri=ei,Ti=qs,Hn=Ks,Ai=Qs,ki=(e,t,n)=>{const r=new Map,o={platform:xi,...n},s={...o.platform,_c:r};return Gs(e,t,{...o,platform:s})};var Pi=typeof document<"u",Si=function(){},at=Pi?de.useLayoutEffect:Si;function ft(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ft(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!ft(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function jr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Un(e,t){const n=jr(e);return Math.round(t*n)/n}function _t(e){const t=d.useRef(e);return at(()=>{t.current=e}),t}function Ni(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[u,f]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=d.useState(r);ft(h,r)||m(r);const[p,g]=d.useState(null),[x,v]=d.useState(null),y=d.useCallback(E=>{E!==P.current&&(P.current=E,g(E))},[]),w=d.useCallback(E=>{E!==k.current&&(k.current=E,v(E))},[]),b=s||p,T=i||x,P=d.useRef(null),k=d.useRef(null),R=d.useRef(u),M=c!=null,C=_t(c),S=_t(o),I=_t(l),j=d.useCallback(()=>{if(!P.current||!k.current)return;const E={placement:t,strategy:n,middleware:h};S.current&&(E.platform=S.current),ki(P.current,k.current,E).then(_=>{const K={..._,isPositioned:I.current!==!1};L.current&&!ft(R.current,K)&&(R.current=K,nn.flushSync(()=>{f(K)}))})},[h,t,n,S,I]);at(()=>{l===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(E=>({...E,isPositioned:!1})))},[l]);const L=d.useRef(!1);at(()=>(L.current=!0,()=>{L.current=!1}),[]),at(()=>{if(b&&(P.current=b),T&&(k.current=T),b&&T){if(C.current)return C.current(b,T,j);j()}},[b,T,j,C,M]);const W=d.useMemo(()=>({reference:P,floating:k,setReference:y,setFloating:w}),[y,w]),D=d.useMemo(()=>({reference:b,floating:T}),[b,T]),F=d.useMemo(()=>{const E={position:n,left:0,top:0};if(!D.floating)return E;const _=Un(D.floating,u.x),K=Un(D.floating,u.y);return a?{...E,transform:"translate("+_+"px, "+K+"px)",...jr(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:K}},[n,a,D.floating,u.x,u.y]);return d.useMemo(()=>({...u,update:j,refs:W,elements:D,floatingStyles:F}),[u,j,W,D,F])}const Oi=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Hn({element:r.current,padding:o}).fn(n):{}:r?Hn({element:r,padding:o}).fn(n):{}}}},Ii=(e,t)=>{const n=wi(e);return{name:n.name,fn:n.fn,options:[e,t]}},Mi=(e,t)=>{const n=Ei(e);return{name:n.name,fn:n.fn,options:[e,t]}},Di=(e,t)=>({fn:Ai(e).fn,options:[e,t]}),Li=(e,t)=>{const n=Ci(e);return{name:n.name,fn:n.fn,options:[e,t]}},_i=(e,t)=>{const n=Ri(e);return{name:n.name,fn:n.fn,options:[e,t]}},ji=(e,t)=>{const n=Ti(e);return{name:n.name,fn:n.fn,options:[e,t]}},zi=(e,t)=>{const n=Oi(e);return{name:n.name,fn:n.fn,options:[e,t]}};var $i="Arrow",zr=d.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return A.jsx(Te.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:A.jsx("polygon",{points:"0,0 30,0 15,10"})})});zr.displayName=$i;var Bi=zr;function Fi(e){const[t,n]=d.useState(void 0);return Ee(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,l=Array.isArray(c)?c[0]:c;i=l.inlineSize,a=l.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var dn="Popper",[$r,Br]=Er(dn),[Vi,Fr]=$r(dn),Vr=e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null);return A.jsx(Vi,{scope:t,anchor:r,onAnchorChange:o,children:n})};Vr.displayName=dn;var Wr="PopperAnchor",Hr=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Fr(Wr,n),i=d.useRef(null),a=Ie(t,i),c=d.useRef(null);return d.useEffect(()=>{const l=c.current;c.current=(r==null?void 0:r.current)||i.current,l!==c.current&&s.onAnchorChange(c.current)}),r?null:A.jsx(Te.div,{...o,ref:a})});Hr.displayName=Wr;var fn="PopperContent",[Wi,Hi]=$r(fn),Ur=d.forwardRef((e,t)=>{var U,Ae,B,V,G,ee;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:p,...g}=e,x=Fr(fn,n),[v,y]=d.useState(null),w=Ie(t,ye=>y(ye)),[b,T]=d.useState(null),P=Fi(b),k=(P==null?void 0:P.width)??0,R=(P==null?void 0:P.height)??0,M=r+(s!=="center"?"-"+s:""),C=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},S=Array.isArray(l)?l:[l],I=S.length>0,j={padding:C,boundary:S.filter(Gi),altBoundary:I},{refs:L,floatingStyles:W,placement:D,isPositioned:F,middlewareData:E}=Ni({strategy:"fixed",placement:M,whileElementsMounted:(...ye)=>yi(...ye,{animationFrame:m==="always"}),elements:{reference:x.anchor},middleware:[Ii({mainAxis:o+R,alignmentAxis:i}),c&&Mi({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Di():void 0,...j}),c&&Li({...j}),_i({...j,apply:({elements:ye,rects:ae,availableWidth:ke,availableHeight:Ve})=>{const{width:Oo,height:Io}=ae.reference,Je=ye.floating.style;Je.setProperty("--radix-popper-available-width",`${ke}px`),Je.setProperty("--radix-popper-available-height",`${Ve}px`),Je.setProperty("--radix-popper-anchor-width",`${Oo}px`),Je.setProperty("--radix-popper-anchor-height",`${Io}px`)}}),b&&zi({element:b,padding:a}),Ki({arrowWidth:k,arrowHeight:R}),h&&ji({strategy:"referenceHidden",...j})]}),[_,K]=Yr(D),Y=vt(p);Ee(()=>{F&&(Y==null||Y())},[F,Y]);const re=(U=E.arrow)==null?void 0:U.x,z=(Ae=E.arrow)==null?void 0:Ae.y,H=((B=E.arrow)==null?void 0:B.centerOffset)!==0,[X,pe]=d.useState();return Ee(()=>{v&&pe(window.getComputedStyle(v).zIndex)},[v]),A.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:F?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[(V=E.transformOrigin)==null?void 0:V.x,(G=E.transformOrigin)==null?void 0:G.y].join(" "),...((ee=E.hide)==null?void 0:ee.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:A.jsx(Wi,{scope:n,placedSide:_,onArrowChange:T,arrowX:re,arrowY:z,shouldHideArrow:H,children:A.jsx(Te.div,{"data-side":_,"data-align":K,...g,ref:w,style:{...g.style,animation:F?void 0:"none"}})})})});Ur.displayName=fn;var Gr="PopperArrow",Ui={top:"bottom",right:"left",bottom:"top",left:"right"},Kr=d.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Hi(Gr,r),i=Ui[s.placedSide];return A.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:A.jsx(Bi,{...o,ref:n,style:{...o.style,display:"block"}})})});Kr.displayName=Gr;function Gi(e){return e!==null}var Ki=e=>({name:"transformOrigin",options:e,fn(t){var x,v,y;const{placement:n,rects:r,middlewareData:o}=t,i=((x=o.arrow)==null?void 0:x.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[l,u]=Yr(n),f={start:"0%",center:"50%",end:"100%"}[u],h=(((v=o.arrow)==null?void 0:v.x)??0)+a/2,m=(((y=o.arrow)==null?void 0:y.y)??0)+c/2;let p="",g="";return l==="bottom"?(p=i?f:`${h}px`,g=`${-c}px`):l==="top"?(p=i?f:`${h}px`,g=`${r.floating.height+c}px`):l==="right"?(p=`${-c}px`,g=i?f:`${m}px`):l==="left"&&(p=`${r.floating.width+c}px`,g=i?f:`${m}px`),{data:{x:p,y:g}}}});function Yr(e){const[t,n="center"]=e.split("-");return[t,n]}var Yi=Vr,qi=Hr,Xi=Ur,Zi=Kr,Ji="Portal",qr=d.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=d.useState(!1);Ee(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?tn.createPortal(A.jsx(Te.div,{...r,ref:t}),i):null});qr.displayName=Ji;function Qi(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}var pn=e=>{const{present:t,children:n}=e,r=ea(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),s=Ie(r.ref,ta(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:s}):null};pn.displayName="Presence";function ea(e){const[t,n]=d.useState(),r=d.useRef(null),o=d.useRef(e),s=d.useRef("none"),i=e?"mounted":"unmounted",[a,c]=Qi(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const l=nt(r.current);s.current=a==="mounted"?l:"none"},[a]),Ee(()=>{const l=r.current,u=o.current;if(u!==e){const h=s.current,m=nt(l);e?c("MOUNT"):m==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&h!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Ee(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,f=m=>{const g=nt(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&g&&(c("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},h=m=>{m.target===t&&(s.current=nt(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:d.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function nt(e){return(e==null?void 0:e.animationName)||"none"}function ta(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var na=d[" useInsertionEffect ".trim().toString()]||Ee;function ra({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=oa({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:o;{const u=d.useRef(e!==void 0);d.useEffect(()=>{const f=u.current;f!==a&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,r])}const l=d.useCallback(u=>{var f;if(a){const h=sa(u)?u(e):u;h!==e&&((f=i.current)==null||f.call(i,h))}else s(u)},[a,e,s,i]);return[c,l]}function oa({defaultProp:e,onChange:t}){const[n,r]=d.useState(e),o=d.useRef(n),s=d.useRef(t);return na(()=>{s.current=t},[t]),d.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}function sa(e){return typeof e=="function"}var ia=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),aa="VisuallyHidden",Xr=d.forwardRef((e,t)=>A.jsx(Te.span,{...e,ref:t,style:{...ia,...e.style}}));Xr.displayName=aa;var ca=Xr,[Rt]=Er("Tooltip",[Br]),Tt=Br(),Zr="TooltipProvider",la=700,Kt="tooltip.open",[ua,mn]=Rt(Zr),Jr=e=>{const{__scopeTooltip:t,delayDuration:n=la,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=d.useRef(!0),a=d.useRef(!1),c=d.useRef(0);return d.useEffect(()=>{const l=c.current;return()=>window.clearTimeout(l)},[]),A.jsx(ua,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:d.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:d.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:d.useCallback(l=>{a.current=l},[]),disableHoverableContent:o,children:s})};Jr.displayName=Zr;var Ye="Tooltip",[da,Ze]=Rt(Ye),Qr=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,c=mn(Ye,e.__scopeTooltip),l=Tt(t),[u,f]=d.useState(null),h=Ds(),m=d.useRef(0),p=i??c.disableHoverableContent,g=a??c.delayDuration,x=d.useRef(!1),[v,y]=ra({prop:r,defaultProp:o??!1,onChange:k=>{k?(c.onOpen(),document.dispatchEvent(new CustomEvent(Kt))):c.onClose(),s==null||s(k)},caller:Ye}),w=d.useMemo(()=>v?x.current?"delayed-open":"instant-open":"closed",[v]),b=d.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x.current=!1,y(!0)},[y]),T=d.useCallback(()=>{window.clearTimeout(m.current),m.current=0,y(!1)},[y]),P=d.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{x.current=!0,y(!0),m.current=0},g)},[g,y]);return d.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),A.jsx(Yi,{...l,children:A.jsx(da,{scope:t,contentId:h,open:v,stateAttribute:w,trigger:u,onTriggerChange:f,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayedRef.current?P():b()},[c.isOpenDelayedRef,P,b]),onTriggerLeave:d.useCallback(()=>{p?T():(window.clearTimeout(m.current),m.current=0)},[T,p]),onOpen:b,onClose:T,disableHoverableContent:p,children:n})})};Qr.displayName=Ye;var Yt="TooltipTrigger",eo=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ze(Yt,n),s=mn(Yt,n),i=Tt(n),a=d.useRef(null),c=Ie(t,a,o.onTriggerChange),l=d.useRef(!1),u=d.useRef(!1),f=d.useCallback(()=>l.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),A.jsx(qi,{asChild:!0,...i,children:A.jsx(Te.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:ge(e.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:ge(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:ge(e.onPointerDown,()=>{o.open&&o.onClose(),l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ge(e.onFocus,()=>{l.current||o.onOpen()}),onBlur:ge(e.onBlur,o.onClose),onClick:ge(e.onClick,o.onClose)})})});eo.displayName=Yt;var gn="TooltipPortal",[fa,pa]=Rt(gn,{forceMount:void 0}),to=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Ze(gn,t);return A.jsx(fa,{scope:t,forceMount:n,children:A.jsx(pn,{present:n||s.open,children:A.jsx(qr,{asChild:!0,container:o,children:r})})})};to.displayName=gn;var _e="TooltipContent",no=d.forwardRef((e,t)=>{const n=pa(_e,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=Ze(_e,e.__scopeTooltip);return A.jsx(pn,{present:r||i.open,children:i.disableHoverableContent?A.jsx(ro,{side:o,...s,ref:t}):A.jsx(ma,{side:o,...s,ref:t})})}),ma=d.forwardRef((e,t)=>{const n=Ze(_e,e.__scopeTooltip),r=mn(_e,e.__scopeTooltip),o=d.useRef(null),s=Ie(t,o),[i,a]=d.useState(null),{trigger:c,onClose:l}=n,u=o.current,{onPointerInTransitChange:f}=r,h=d.useCallback(()=>{a(null),f(!1)},[f]),m=d.useCallback((p,g)=>{const x=p.currentTarget,v={x:p.clientX,y:p.clientY},y=xa(v,x.getBoundingClientRect()),w=va(v,y),b=ya(g.getBoundingClientRect()),T=Ea([...w,...b]);a(T),f(!0)},[f]);return d.useEffect(()=>()=>h(),[h]),d.useEffect(()=>{if(c&&u){const p=x=>m(x,u),g=x=>m(x,c);return c.addEventListener("pointerleave",p),u.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",p),u.removeEventListener("pointerleave",g)}}},[c,u,m,h]),d.useEffect(()=>{if(i){const p=g=>{const x=g.target,v={x:g.clientX,y:g.clientY},y=(c==null?void 0:c.contains(x))||(u==null?void 0:u.contains(x)),w=!wa(v,i);y?h():w&&(h(),l())};return document.addEventListener("pointermove",p),()=>document.removeEventListener("pointermove",p)}},[c,u,i,l,h]),A.jsx(ro,{...e,ref:s})}),[ga,ha]=Rt(Ye,{isInside:!1}),ba=xs("TooltipContent"),ro=d.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,c=Ze(_e,n),l=Tt(n),{onClose:u}=c;return d.useEffect(()=>(document.addEventListener(Kt,u),()=>document.removeEventListener(Kt,u)),[u]),d.useEffect(()=>{if(c.trigger){const f=h=>{const m=h.target;m!=null&&m.contains(c.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,u]),A.jsx(Tr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:A.jsxs(Xi,{"data-state":c.stateAttribute,...l,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[A.jsx(ba,{children:r}),A.jsx(ga,{scope:n,isInside:!0,children:A.jsx(ca,{id:c.contentId,role:"tooltip",children:o||r})})]})})});no.displayName=_e;var oo="TooltipArrow",so=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Tt(n);return ha(oo,n).isInside?null:A.jsx(Zi,{...o,...r,ref:t})});so.displayName=oo;function xa(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function va(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function ya(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function wa(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],c=t[i],l=a.x,u=a.y,f=c.x,h=c.y;u>r!=h>r&&n<(f-l)*(r-u)/(h-u)+l&&(o=!o)}return o}function Ea(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Ca(t)}function Ca(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Ra=Jr,Ta=Qr,Aa=eo,ka=to,io=no,Pa=so;const hn=Ra,bn=Ta,xn=Aa,At=d.forwardRef(({className:e,sideOffset:t=6,style:n,...r},o)=>{const s={backgroundColor:"#000000",color:"#ffffff",zIndex:99999,...n};return A.jsx(ka,{children:A.jsxs(io,{ref:o,sideOffset:t,className:`overflow-hidden rounded-lg border border-slate-950 px-3 py-1 text-xs text-white ${e??""}`,style:s,...r,children:[r.children,A.jsx(Pa,{style:{fill:"#000000"}})]})})});At.displayName=io.displayName;const ao=ur("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-blue-500 text-white",save:"text-white",delete:"text-white",update:"text-white",cancel:"text-[#414651] border border-[#D5D7DA]",outline:"text-[#003B71]"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3 text-xs",lg:"h-11 rounded-md px-8",icon:"h-10 w-10",xs:"h-5 px-1 text-xs rounded"}},defaultVariants:{variant:"default",size:"default"}}),co=de.forwardRef(({className:e,variant:t,size:n,loading:r=!1,disabled:o,children:s,leftIcon:i,datatestid:a,rightIcon:c,style:l,iconButton:u=!1,tooltipLabel:f,saveColor:h="#003B71",deleteColor:m="#FF6070",updateColor:p="#003B71",cancelColor:g="#ffffff",outlineColor:x="#003B71",...v},y)=>{const b={...t&&{save:{backgroundColor:h},delete:{backgroundColor:m},update:{backgroundColor:p},cancel:{backgroundColor:g},outline:{backgroundColor:x}}[t],...l},T=A.jsx("button",{ref:y,"data-testid":a,className:Z(ao({variant:t,size:n}),e),style:b,disabled:o||r,...v,children:A.jsxs(A.Fragment,{children:[r&&A.jsx("div",{className:"w-4 h-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),!r&&i&&i,s,!r&&c&&c]})});return u?A.jsx(hn,{children:A.jsxs(bn,{children:[A.jsx(xn,{asChild:!0,children:T}),f&&A.jsx(At,{children:f})]})}):T});co.displayName="Button";const Sa=({items:e,onExport:t,onClose:n,style:r})=>A.jsx("div",{style:r,onMouseDown:o=>o.stopPropagation(),className:"w-36 bg-white border border-gray-300 rounded shadow-lg",children:e.map(o=>A.jsxs("button",{onClick:()=>{t(o.type),n()},className:"flex items-center gap-2 w-full px-3 py-2 text-xs hover:bg-[#f0f4fa]",children:[A.jsx("span",{className:o.iconClassName,children:de.isValidElement(o.icon)?de.cloneElement(o.icon,{className:`${o.iconWidth||"w-4"} ${o.iconHeight||"h-4"}`}):o.icon}),A.jsx("span",{className:o.textClassName,children:o.label})]},o.type))}),Na=({items:e,onExport:t,open:n,setOpen:r,buttonIcon:o,className:s="",buttonClassName:i=""})=>{const a=de.useRef(null),[c,l]=de.useState({top:0,left:0,width:0}),u=()=>{if(!n&&a.current){const f=a.current.getBoundingClientRect();l({top:f.bottom+4,left:f.left,width:f.width})}r(!n)};return A.jsxs("div",{className:`relative inline-block ${s}`,children:[A.jsx("button",{ref:a,type:"button",onClick:u,className:i,children:o}),n&&tn.createPortal(A.jsx(Sa,{items:e,onExport:t,onClose:()=>r(!1),style:{position:"fixed",top:c.top,left:c.left,minWidth:c.width,zIndex:9999}}),document.body)]})},Oa=({text:e="",maxLength:t=20,className:n=""})=>{const r=String(e??""),o=r.length>t,s=o?`${r.slice(0,t)}..`:r;return o?A.jsx(hn,{children:A.jsxs(bn,{children:[A.jsx(xn,{asChild:!0,children:A.jsx("div",{className:`flex items-center cursor-pointer ${n}`,children:s})}),r&&A.jsx(At,{children:r})]})}):A.jsx("div",{className:`flex items-center ${n}`,children:s})};let qt;process.env.NODE_ENV!=="production"&&(qt=new Set);function pt(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");qt.has(t)||(qt.add(t),console.error(`Base UI: ${t}`))}}function Ia({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=d.useRef(e!==void 0),[s,i]=d.useState(t),a=o?e:s;if(process.env.NODE_ENV!=="production"){d.useEffect(()=>{o!==(e!==void 0)&&pt([`A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
2
- `))},[r,n,e]);const{current:l}=d.useRef(t);d.useEffect(()=>{!o&&Gn(l)!==Gn(t)&&pt([`A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
3
- `))},[t])}const c=d.useCallback(l=>{o||i(l)},[]);return[a,c]}function Gn(e){let t=0;const n=new WeakMap;try{return JSON.stringify(e,function(s,i){if(!(s==="_owner"&&this!=null&&typeof this=="object"&&"$$typeof"in this)){if(typeof i=="bigint")return`__bigint__:${i}`;if(i!==null&&typeof i=="object"){const a=n.get(i);if(a!==void 0)return`__object__:${a}`;n.set(i,t),t+=1}return i}})??`__top__:${typeof e}`}catch{return"__unserializable__"}}const Ma=()=>{},J=typeof document<"u"?d.useLayoutEffect:Ma,he={...d},Kn={};function je(e,t){const n=d.useRef(Kn);return n.current===Kn&&(n.current=e(t)),n}const jt=he.useInsertionEffect,Da=jt&&jt!==he.useLayoutEffect?jt:e=>e();function Q(e){const t=je(La).current;return t.next=e,Da(t.effect),t.trampoline}function La(){const e={next:void 0,callback:_a,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function _a(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}function ja(e,t){return function(r,...o){const s=new URL(e);return s.searchParams.set("code",r.toString()),o.forEach(i=>s.searchParams.append("args[]",i)),`${t} error #${r}; visit ${s} for the full message.`}}const kt=ja("https://base-ui.com/production-error","Base UI");function mt(e,t,n,r){const o=je(lo).current;return $a(o,e,t,n,r)&&uo(o,[e,t,n,r]),o.callback}function za(e){const t=je(lo).current;return Ba(t,e)&&uo(t,e),t.callback}function lo(){return{callback:null,cleanup:null,refs:[]}}function $a(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function Ba(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function uo(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const i=s(n);typeof i=="function"&&(r[o]=i);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const i=r[o];typeof i=="function"?i():s(null);break}case"object":{s.current=null;break}}}}}}}const Fa=parseInt(d.version,10);function fo(e){return Fa>=e}function Yn(e){if(!d.isValidElement(e))return null;const t=e,n=t.props;return(fo(19)?n==null?void 0:n.ref:t.ref)??null}function Xt(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}let Zt;process.env.NODE_ENV!=="production"&&(Zt=new Set);function Va(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");Zt.has(t)||(Zt.add(t),console.warn(`Base UI: ${t}`))}}const Jt=Object.freeze([]),Ne=Object.freeze({});function Wa(e,t){const n={};for(const r in e){const o=e[r];if(t!=null&&t.hasOwnProperty(r)){const s=t[r](o);s!=null&&Object.assign(n,s);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function Ha(e,t){return typeof e=="function"?e(t):e}function Ua(e,t){return typeof e=="function"?e(t):e}const vn={};function yn(e,t,n,r,o){if(!n&&!r&&!e)return gt(t);let s=gt(e);return t&&(s=ct(s,t)),n&&(s=ct(s,n)),r&&(s=ct(s,r)),s}function Ga(e){if(e.length===0)return vn;if(e.length===1)return gt(e[0]);let t=gt(e[0]);for(let n=1;n<e.length;n+=1)t=ct(t,e[n]);return t}function gt(e){return wn(e)?{...mo(e,vn)}:Ka(e)}function ct(e,t){return wn(t)?mo(t,e):Ya(e,t)}function Ka(e){const t={...e};for(const n in t){const r=t[n];po(n,r)&&(t[n]=go(r))}return t}function Ya(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Xt(e.style,r);break}case"className":{e[n]=ho(e.className,r);break}default:po(n,r)?e[n]=qa(e[n],r):e[n]=r}}return e}function po(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function wn(e){return typeof e=="function"}function mo(e,t){return wn(e)?e(t):e??vn}function qa(e,t){return t?e?(...n)=>{const r=n[0];if(bo(r)){const s=r;ht(s);const i=t(...n);return s.baseUIHandlerPrevented||e==null||e(...n),i}const o=t(...n);return e==null||e(...n),o}:go(t):e}function go(e){return e&&((...t)=>{const n=t[0];return bo(n)&&ht(n),e(...t)})}function ht(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function ho(e,t){return t?e?t+" "+e:t:e}function bo(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Pt(e,t,n={}){const r=t.render,o=Xa(t,n);if(n.enabled===!1)return null;const s=n.state??Ne;return tc(e,r,o,s)}function Xa(e,t={}){const{className:n,style:r,render:o}=e,{state:s=Ne,ref:i,props:a,stateAttributesMapping:c,enabled:l=!0}=t,u=l?Ha(n,s):void 0,f=l?Ua(r,s):void 0,h=l?Wa(s,c):Ne,m=l&&a?Za(a):void 0,p=l?Xt(h,m)??{}:Ne;return typeof document<"u"&&(l?Array.isArray(i)?p.ref=za([p.ref,Yn(o),...i]):p.ref=mt(p.ref,Yn(o),i):mt(null,null)),l?(u!==void 0&&(p.className=ho(p.className,u)),f!==void 0&&(p.style=Xt(p.style,f)),p):Ne}function Za(e){return Array.isArray(e)?Ga(e):yn(void 0,e)}const Ja=Symbol.for("react.lazy"),Qa=/^[A-Z][A-Za-z0-9$]*$/,ec=/[a-z]/;function tc(e,t,n,r){if(t){if(typeof t=="function")return process.env.NODE_ENV!=="production"&&nc(t),t(n,r);const o=yn(n,t.props);o.ref=n.ref;let s=t;if((s==null?void 0:s.$$typeof)===Ja&&(s=d.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!d.isValidElement(s))throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.","https://base-ui.com/r/invalid-render-prop"].join(`
4
- `));return d.cloneElement(s,o)}if(e&&typeof e=="string")return rc(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":kt(8))}function nc(e){const t=e.name;t.length!==0&&Qa.test(t)&&ec.test(t)&&Va(`The \`render\` prop received a function named \`${t}\` that starts with an uppercase letter.`,"This usually means a React component was passed directly as `render={Component}`.","Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.","If this is an intentional render callback, rename it to start with a lowercase letter.","Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.","https://base-ui.com/r/invalid-render-prop")}function rc(e,t){return e==="button"?de.createElement("button",{type:"button",...t,key:t.key}):e==="img"?de.createElement("img",{alt:"",...t,key:t.key}):d.createElement(e,t)}const En=d.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(En.displayName="CompositeListContext");function oc(){return d.useContext(En)}function xo(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,s=Q(o),i=d.useRef(0),a=je(ic).current,c=je(sc).current,[l,u]=d.useState(0),f=d.useRef(l),h=Q((v,y)=>{c.set(v,y??null),f.current+=1,u(f.current)}),m=Q(v=>{c.delete(v),f.current+=1,u(f.current)}),p=d.useMemo(()=>{const v=new Map;return Array.from(c.keys()).filter(w=>w.isConnected).sort(ac).forEach((w,b)=>{const T=c.get(w)??{};v.set(w,{...T,index:b})}),v},[c,l]);J(()=>{if(typeof MutationObserver!="function"||p.size===0)return;const v=new MutationObserver(y=>{const w=new Set,b=T=>w.has(T)?w.delete(T):w.add(T);y.forEach(T=>{T.removedNodes.forEach(b),T.addedNodes.forEach(b)}),w.size===0&&(f.current+=1,u(f.current))});return p.forEach((y,w)=>{w.parentElement&&v.observe(w.parentElement,{childList:!0})}),()=>{v.disconnect()}},[p]),J(()=>{f.current===l&&(n.current.length!==p.size&&(n.current.length=p.size),r&&r.current.length!==p.size&&(r.current.length=p.size),i.current=p.size),s(p)},[s,p,n,r,l]),J(()=>()=>{n.current=[]},[n]),J(()=>()=>{r&&(r.current=[])},[r]);const g=Q(v=>(a.add(v),()=>{a.delete(v)}));J(()=>{a.forEach(v=>v(p))},[a,p]);const x=d.useMemo(()=>({register:h,unregister:m,subscribeMapChange:g,elementsRef:n,labelsRef:r,nextIndexRef:i}),[h,m,g,n,r,i]);return A.jsx(En.Provider,{value:x,children:t})}function sc(){return new Map}function ic(){return new Set}function ac(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Cn=d.createContext(void 0);process.env.NODE_ENV!=="production"&&(Cn.displayName="TabsRootContext");function Rn(){const e=d.useContext(Cn);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: TabsRootContext is missing. Tabs parts must be placed within <Tabs.Root>.":kt(64));return e}let cc=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const St={tabActivationDirection:e=>({[cc.activationDirection]:e})},qn="none",lc="disabled",Xn="missing",Zn="initial";function Qt(e,t,n,r){let o=!1,s=!1;const i=r??Ne;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){s=!0},get isCanceled(){return o},get isPropagationAllowed(){return s},trigger:n,...i}}const vo=d.forwardRef(function(t,n){const{className:r,defaultValue:o=0,onValueChange:s,orientation:i="horizontal",render:a,value:c,style:l,...u}=t,f=t.defaultValue!==void 0,h=d.useRef([]),[m,p]=d.useState(()=>new Map),[g,x]=Ia({controlled:c,default:o,name:"Tabs",state:"value"}),v=c!==void 0,[y,w]=d.useState(()=>new Map),b=d.useRef(void 0),T=d.useCallback(B=>{if(B===void 0)return null;for(const[V,G]of y.entries())if(G!=null&&B===(G.value??G.index))return V;return null},[y]),[P,k]=d.useState(()=>({previousValue:g,tabActivationDirection:"none"})),{previousValue:R,tabActivationDirection:M}=P;let C=M,S=!1;R!==g&&(C=Jn(R,g,i,y),S=R!=null&&g!=null&&T(g)==null);const I=S?R:g,j=R!==I||M!==C;J(()=>{j&&k({previousValue:I,tabActivationDirection:C})},[I,j,C]);const L=Q((B,V)=>{const G=Jn(g,B,i,y);V.activationDirection=G,s==null||s(B,V),!V.isCanceled&&x(B)}),W=Q((B,V)=>{s==null||s(B,Qt(V,void 0,void 0,{activationDirection:"none"}))}),D=Q((B,V)=>{p(G=>{if(G.get(B)===V)return G;const ee=new Map(G);return ee.set(B,V),ee})}),F=Q((B,V)=>{p(G=>{if(!G.has(B)||G.get(B)!==V)return G;const ee=new Map(G);return ee.delete(B),ee})}),E=d.useCallback(B=>m.get(B),[m]),_=d.useCallback(B=>{for(const V of y.values())if(B===(V==null?void 0:V.value))return V==null?void 0:V.id},[y]),K=d.useMemo(()=>({getTabElementBySelectedValue:T,getTabIdByPanelValue:_,getTabPanelIdByValue:E,onValueChange:L,orientation:i,registerMountedTabPanel:D,setTabMap:w,unregisterMountedTabPanel:F,tabActivationDirection:C,value:g}),[T,_,E,L,i,D,w,F,C,g]),Y=d.useMemo(()=>{for(const B of y.values())if(B!=null&&B.value===g)return B},[y,g]),re=d.useMemo(()=>{for(const B of y.values())if(B!=null&&!B.disabled)return B.value},[y]),z=d.useRef(!f),H=d.useRef(o),X=d.useRef(f),pe=d.useRef(!1);J(()=>{var ye;if(v)return;function B(ae,ke){x(ae),k(Ve=>Ve.previousValue===ae&&Ve.tabActivationDirection==="none"?Ve:{previousValue:ae,tabActivationDirection:"none"}),W(ae,ke),z.current=!1}if(y.size===0){pe.current&&g!==null&&!((ye=b.current)!=null&&ye.isConnected)&&B(null,Xn);return}pe.current=!0,b.current=y.keys().next().value;const V=Y==null?void 0:Y.disabled,G=Y==null&&g!==null;if(!V&&g===H.current&&(X.current=!1),X.current&&V&&g===H.current)return;const ee=z.current;if(V||G){const ae=re??null;if(g===ae){z.current=!1;return}let ke=Xn;ee?ke=Zn:V&&(ke=lc),B(ae,ke);return}ee&&Y!=null&&(W(g,Zn),z.current=!1)},[re,v,W,Y,x,y,g]);const Ae=Pt("div",t,{state:{orientation:i,tabActivationDirection:C},ref:n,props:u,stateAttributesMapping:St});return A.jsx(Cn.Provider,{value:K,children:A.jsx(xo,{elementsRef:h,children:Ae})})});process.env.NODE_ENV!=="production"&&(vo.displayName="TabsRoot");function Jn(e,t,n,r){if(e==null||t==null)return"none";let o=null,s=null;for(const[c,l]of r.entries()){if(l==null)continue;const u=l.value??l.index;if(e===u&&(o=c),t===u&&(s=c),o!=null&&s!=null)break}if(o==null||s==null)return o!==s&&(typeof e=="number"||typeof e=="string")&&typeof e==typeof t?n==="horizontal"?t>e?"right":"left":t>e?"down":"up":"none";const i=o.getBoundingClientRect(),a=s.getBoundingClientRect();if(n==="horizontal"){if(a.left<i.left)return"left";if(a.left>i.left)return"right"}else{if(a.top<i.top)return"up";if(a.top>i.top)return"down"}return"none"}function Qn(e){return(e==null?void 0:e.ownerDocument)||document}let er=0;function uc(e,t="mui"){const[n,r]=d.useState(e),o=e||n;return d.useEffect(()=>{n==null&&(er+=1,r(`${t}-${er}`))},[n,t]),o}const tr=he.useId;function dc(e,t){if(tr!==void 0){const n=tr();return e??`${t}-${n}`}return uc(e,t)}function yo(e){return dc(e,"base-ui")}const Tn=d.createContext(void 0);process.env.NODE_ENV!=="production"&&(Tn.displayName="CompositeRootContext");function wo(e=!1){const t=d.useContext(Tn);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":kt(16));return t}function fc(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:s}=e,i=r&&t!==!1,a=r&&t===!1;return{props:d.useMemo(()=>{const l={onKeyDown(u){n&&t&&u.key!=="Tab"&&u.preventDefault()}};return r||(l.tabIndex=o,!s&&n&&(l.tabIndex=t?o:-1)),(s&&(t||i)||!s&&n)&&(l["aria-disabled"]=n),s&&(!t||a)&&(l.disabled=n),l},[r,n,t,i,a,s,o])}}function pc(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0,composite:s}=e,i=d.useRef(null),a=wo(!0),c=s??a!==void 0,{props:l}=fc({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&d.useEffect(()=>{var p,g;if(!i.current)return;const m=rt(i.current);if(o){if(!m){const x=((p=he.captureOwnerStack)==null?void 0:p.call(he))||"";pt(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${x}`)}}else if(m){const x=((g=he.captureOwnerStack)==null?void 0:g.call(he))||"";pt(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${x}`)}},[o]);const u=d.useCallback(()=>{const m=i.current;rt(m)&&c&&t&&l.disabled===void 0&&m.disabled&&(m.disabled=!1)},[t,l.disabled,c]);J(u,[u]);const f=d.useCallback((m={})=>{const{onClick:p,onMouseDown:g,onKeyUp:x,onKeyDown:v,onPointerDown:y,...w}=m;return yn({onClick(b){if(t){b.preventDefault();return}p==null||p(b)},onMouseDown(b){t||g==null||g(b)},onKeyDown(b){if(t||(ht(b),v==null||v(b),b.baseUIHandlerPrevented))return;const T=b.target===b.currentTarget,P=b.currentTarget,k=rt(P),R=!o&&mc(P),M=T&&(o?k:!R),C=b.key==="Enter",S=b.key===" ",I=P.getAttribute("role"),j=(I==null?void 0:I.startsWith("menuitem"))||I==="option"||I==="gridcell";if(T&&c&&S){if(b.defaultPrevented&&j)return;b.preventDefault(),R||o&&k?(P.click(),b.preventBaseUIHandler()):M&&(p==null||p(b),b.preventBaseUIHandler());return}M&&(!o&&(S||C)&&b.preventDefault(),!o&&C&&(p==null||p(b)))},onKeyUp(b){if(!t){if(ht(b),x==null||x(b),b.target===b.currentTarget&&o&&c&&rt(b.currentTarget)&&b.key===" "){b.preventDefault();return}b.baseUIHandlerPrevented||b.target===b.currentTarget&&!o&&!c&&b.key===" "&&(p==null||p(b))}},onPointerDown(b){if(t){b.preventDefault();return}y==null||y(b)}},o?{type:"button"}:{role:"button"},l,w)},[t,l,c,o]),h=Q(m=>{i.current=m,u()});return{getButtonProps:f,buttonRef:h}}function rt(e){return se(e)&&e.tagName==="BUTTON"}function mc(e){return!!((e==null?void 0:e.tagName)==="A"&&(e!=null&&e.href))}const Eo="data-composite-item-active";let gc=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function Co(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:s}=e,{register:i,unregister:a,subscribeMapChange:c,elementsRef:l,labelsRef:u,nextIndexRef:f}=oc(),h=d.useRef(-1),[m,p]=d.useState(s??(o===gc.GuessFromOrder?()=>{if(h.current===-1){const v=f.current;f.current+=1,h.current=v}return h.current}:-1)),g=d.useRef(null),x=d.useCallback(v=>{var y;if(g.current=v,m!==-1&&v!==null&&(l.current[m]=v,u)){const w=t!==void 0;u.current[m]=w?t:((y=r==null?void 0:r.current)==null?void 0:y.textContent)??v.textContent}},[m,l,u,t,r]);return J(()=>{if(s!=null)return;const v=g.current;if(v)return i(v,n),()=>{a(v)}},[s,i,a,n]),J(()=>{if(s==null)return c(v=>{var w;const y=g.current?(w=v.get(g.current))==null?void 0:w.index:null;y!=null&&p(y)})},[s,c,p]),{ref:x,index:m}}function hc(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=wo(),{ref:o,index:s}=Co(e),i=n===s,a=d.useRef(null),c=mt(o,a);return{compositeProps:{tabIndex:i?0:-1,onFocus(){r(s)},onMouseMove(){const u=a.current;if(!t||!u)return;const f=u.hasAttribute("disabled")||u.ariaDisabled==="true";!i&&!f&&u.focus()}},compositeRef:c,index:s}}const An=d.createContext(void 0);process.env.NODE_ENV!=="production"&&(An.displayName="TabsListContext");function bc(){const e=d.useContext(An);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: TabsListContext is missing. TabsList parts must be placed within <Tabs.List>.":kt(65));return e}function xc(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function vc(e,t){var r;if(!e||!t)return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e.contains(t))return!0;if(n&&Ut(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function nr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function zt(e,t){return t<0||t>=e.length}function yc(e,t){return He(e.current,{disabledIndices:t})}function wc(e,t){return He(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function He(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:o=1}={}){let s=t;do s+=n?-o:o;while(s>=0&&s<=e.length-1&&en(e,s,r));return s}function en(e,t,n){if(typeof n=="function"?n(t):(n==null?void 0:n.includes(t))??!1)return!0;const o=e[t];return o?Cc(o)?!n&&(o.hasAttribute("disabled")||o.getAttribute("aria-disabled")==="true"):!0:!1}function Ec(e){return e.visibility==="hidden"||e.visibility==="collapse"}function Cc(e,t=e?oe(e):null){return!e||!e.isConnected||!t||Ec(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}const Ro=d.forwardRef(function(t,n){const{className:r,disabled:o=!1,render:s,value:i,id:a,nativeButton:c=!0,style:l,...u}=t,{value:f,getTabPanelIdByValue:h,orientation:m,tabActivationDirection:p}=Rn(),{activateOnFocus:g,highlightedTabIndex:x,onTabActivation:v,registerTabResizeObserverElement:y,setHighlightedTabIndex:w,tabsListElement:b}=bc(),T=yo(a),P=d.useMemo(()=>({disabled:o,id:T,value:i}),[o,T,i]),{compositeProps:k,compositeRef:R,index:M}=hc({metadata:P}),C=i===f,S=d.useRef(!1),I=d.useRef(null);J(()=>{const z=I.current;if(z)return y(z)},[y]),J(()=>{if(S.current){S.current=!1;return}if(!(C&&M>-1&&x!==M))return;const z=b;if(z!=null){const H=xc(Qn(z));if(H&&vc(z,H))return}o||w(M)},[C,M,x,w,o,b]);const{getButtonProps:j,buttonRef:L}=pc({disabled:o,native:c,focusableWhenDisabled:!0}),W=h(i),D=d.useRef(!1),F=d.useRef(!1);function E(z){C||o||v(i,Qt(qn,z.nativeEvent,void 0,{activationDirection:"none"}))}function _(z){C||(M>-1&&!o&&w(M),!o&&g&&(!D.current||D.current&&F.current)&&v(i,Qt(qn,z.nativeEvent,void 0,{activationDirection:"none"})))}function K(z){if(C||o)return;D.current=!0;function H(){D.current=!1,F.current=!1}(!z.button||z.button===0)&&(F.current=!0,Qn(z.currentTarget).addEventListener("pointerup",H,{once:!0}))}return Pt("button",t,{state:{disabled:o,active:C,orientation:m,tabActivationDirection:p},ref:[n,L,R,I],props:[k,{role:"tab","aria-controls":W,"aria-selected":C,id:T,onClick:E,onFocus:_,onPointerDown:K,[Eo]:C?"":void 0,onKeyDownCapture(){S.current=!0}},u,j],stateAttributesMapping:St})});process.env.NODE_ENV!=="production"&&(Ro.displayName="TabsTab");function Rc(e){return fo(19)?e:e?"true":void 0}let qe=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Tc={[qe.startingStyle]:""},Ac={[qe.endingStyle]:""},kc={transitionStatus(e){return e==="starting"?Tc:e==="ending"?Ac:null}},Pc=[];function Sc(e){d.useEffect(e,Pc)}const ot=null;let rr=globalThis.requestAnimationFrame;class Nc{constructor(){ce(this,"callbacks",[]);ce(this,"callbacksCount",0);ce(this,"nextId",1);ce(this,"startId",1);ce(this,"isScheduled",!1);ce(this,"tick",t=>{var o;this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let s=0;s<n.length;s+=1)(o=n[s])==null||o.call(n,t)})}request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV!=="production"&&rr!==requestAnimationFrame&&(rr=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const st=new Nc;class be{constructor(){ce(this,"currentId",ot);ce(this,"cancel",()=>{this.currentId!==ot&&(st.cancel(this.currentId),this.currentId=ot)});ce(this,"disposeEffect",()=>this.cancel)}static create(){return new be}static request(t){return st.request(t)}static cancel(t){return st.cancel(t)}request(t){this.cancel(),this.currentId=st.request(()=>{this.currentId=ot,t()})}}function Oc(){const e=je(be.create).current;return Sc(e.disposeEffect),e}function Ic(e){return e==null?e:"current"in e?e.current:e}function Mc(e,t=!1,n=!0){const r=Oc();return Q((o,s=null)=>{r.cancel();const i=Ic(e);if(i==null)return;const a=i,c=()=>{nn.flushSync(o)};if(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){o();return}function l(){Promise.all(a.getAnimations().map(u=>u.finished)).then(()=>{s!=null&&s.aborted||c()}).catch(()=>{if(n){s!=null&&s.aborted||c();return}const u=a.getAnimations();!(s!=null&&s.aborted)&&u.length>0&&u.some(f=>f.pending||f.playState!=="finished")&&l()})}if(t){const u=qe.startingStyle;if(!a.hasAttribute(u)){r.request(l);return}const f=new MutationObserver(()=>{a.hasAttribute(u)||(f.disconnect(),l())});f.observe(a,{attributes:!0,attributeFilter:[u]}),s==null||s.addEventListener("abort",()=>f.disconnect(),{once:!0});return}r.request(l)})}function Dc(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,s=Q(o),i=Mc(r,n,!1);d.useEffect(()=>{if(!t)return;const a=new AbortController;return i(s,a.signal),()=>{a.abort()}},[t,n,s,i])}function Lc(e,t=!1,n=!1){const[r,o]=d.useState(e&&t?"idle":void 0),[s,i]=d.useState(e);return e&&!s&&(i(!0),o("starting")),!e&&s&&r!=="ending"&&!n&&o("ending"),!e&&!s&&r==="ending"&&o(void 0),J(()=>{if(!e&&s&&r!=="ending"&&n){const a=be.request(()=>{o("ending")});return()=>{be.cancel(a)}}},[e,s,r,n]),J(()=>{if(!e||t)return;const a=be.request(()=>{o(void 0)});return()=>{be.cancel(a)}},[t,e]),J(()=>{if(!e||!t)return;e&&s&&r!=="idle"&&o("starting");const a=be.request(()=>{o("idle")});return()=>{be.cancel(a)}},[t,e,s,r]),{mounted:s,setMounted:i,transitionStatus:r}}let _c=(function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e[e.startingStyle=qe.startingStyle]="startingStyle",e[e.endingStyle=qe.endingStyle]="endingStyle",e})({});const jc={...St,...kc},To=d.forwardRef(function(t,n){const{className:r,value:o,render:s,keepMounted:i=!1,style:a,...c}=t,{value:l,getTabIdByPanelValue:u,orientation:f,tabActivationDirection:h,registerMountedTabPanel:m,unregisterMountedTabPanel:p}=Rn(),g=yo(),x=d.useMemo(()=>({id:g,value:o}),[g,o]),{ref:v,index:y}=Co({metadata:x}),w=o===l,{mounted:b,transitionStatus:T,setMounted:P}=Lc(w),k=!b,R=u(o),M={hidden:k,orientation:f,tabActivationDirection:h,transitionStatus:T},C=d.useRef(null),S=Pt("div",t,{state:M,ref:[n,v,C],props:[{"aria-labelledby":R,hidden:k,id:g,role:"tabpanel",tabIndex:w?0:-1,inert:Rc(!w),[_c.index]:y},c],stateAttributesMapping:jc});return Dc({open:w,ref:C,onComplete(){w||P(!1)}}),J(()=>{if(!(k&&!i)&&g!=null)return m(o,g),()=>{p(o,g)}},[k,i,o,g,m,p]),i||b?S:null});process.env.NODE_ENV!=="production"&&(To.displayName="TabsPanel");function zc(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const Ue="ArrowUp",Ge="ArrowDown",bt="ArrowLeft",xt="ArrowRight",Nt="Home",Ot="End",Ao=new Set([bt,xt]),$c=new Set([bt,xt,Nt,Ot]),ko=new Set([Ue,Ge]),Bc=new Set([Ue,Ge,Nt,Ot]),Po=new Set([...Ao,...ko]),Fc=new Set([...Po,Nt,Ot]),Vc="Shift",Wc="Control",Hc="Alt",Uc="Meta",Gc=new Set([Vc,Wc,Hc,Uc]);function Kc(e){return se(e)&&e.tagName==="INPUT"}function or(e){return!!(Kc(e)&&e.selectionStart!=null||se(e)&&e.tagName==="TEXTAREA")}function sr(e,t,n,r){if(!e||!t||!t.scrollTo)return;let o=e.scrollLeft,s=e.scrollTop;const i=e.clientWidth<e.scrollWidth,a=e.clientHeight<e.scrollHeight;if(i&&r!=="vertical"){const c=ir(e,t,"left"),l=it(e),u=it(t);n==="ltr"&&(c+t.offsetWidth+u.scrollMarginRight>e.scrollLeft+e.clientWidth-l.scrollPaddingRight?o=c+t.offsetWidth+u.scrollMarginRight-e.clientWidth+l.scrollPaddingRight:c-u.scrollMarginLeft<e.scrollLeft+l.scrollPaddingLeft&&(o=c-u.scrollMarginLeft-l.scrollPaddingLeft)),n==="rtl"&&(c-u.scrollMarginRight<e.scrollLeft+l.scrollPaddingLeft?o=c-u.scrollMarginLeft-l.scrollPaddingLeft:c+t.offsetWidth+u.scrollMarginRight>e.scrollLeft+e.clientWidth-l.scrollPaddingRight&&(o=c+t.offsetWidth+u.scrollMarginRight-e.clientWidth+l.scrollPaddingRight))}if(a&&r!=="horizontal"){const c=ir(e,t,"top"),l=it(e),u=it(t);c-u.scrollMarginTop<e.scrollTop+l.scrollPaddingTop?s=c-u.scrollMarginTop-l.scrollPaddingTop:c+t.offsetHeight+u.scrollMarginBottom>e.scrollTop+e.clientHeight-l.scrollPaddingBottom&&(s=c+t.offsetHeight+u.scrollMarginBottom-e.clientHeight+l.scrollPaddingBottom)}e.scrollTo({left:o,top:s,behavior:"auto"})}function ir(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);)t=t.offsetParent;return o}function it(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}const Yc=[];function qc(e){const{loopFocus:t=!0,orientation:n="both",grid:r,onLoop:o,direction:s,highlightedIndex:i,onHighlightedIndexChange:a,rootRef:c,enableHomeAndEndKeys:l=!1,stopEventPropagation:u=!1,disabledIndices:f,modifierKeys:h=Yc}=e,[m,p]=d.useState(0),g=r!=null,x=d.useRef(null),v=mt(x,c),y=d.useRef([]),w=d.useRef(!1),b=i??m,T=Q((C,S=!1)=>{if((a??p)(C),S){const I=y.current[C];sr(x.current,I,s,n)}}),P=Q(C=>{if(C.size===0||w.current)return;w.current=!0;const S=Array.from(C.keys()),I=S.find(L=>L==null?void 0:L.hasAttribute(Eo))??null,j=I?S.indexOf(I):-1;if(j!==-1)T(j);else if(en(S,b,f)){const L=He(S,{disabledIndices:f});zt(S,L)||T(L)}sr(x.current,I,s,n)});J(()=>{if(f==null||i!=null||!w.current)return;const C=y.current;if(en(C,b,f)){const S=He(C,{disabledIndices:f});zt(C,S)||T(S)}},[f,i,b,y,T]);const k=Q((C,S,I)=>o?o(C,S,I,y):I),R=Q(C=>{const S=l?Fc:Po;if(!S.has(C.key)||Xc(C,h)||!x.current)return;const j=s==="rtl",L=j?bt:xt,W={horizontal:L,vertical:Ge,both:L}[n],D=j?xt:bt,F={horizontal:D,vertical:Ue,both:D}[n],E=nr(C.nativeEvent);if(E!=null&&or(E)&&!zc(E)){const X=E.selectionStart,pe=E.selectionEnd,U=E.value??"";if(X==null||C.shiftKey||X!==pe||C.key!==F&&X<U.length||C.key!==W&&X>0)return}let _=b;const K=yc(y,f),Y=wc(y,f);r!=null&&(_=r({disabledIndices:f,elementsRef:y,event:C,highlightedIndex:b,loopFocus:t,maxIndex:Y,minIndex:K,onLoop:k,orientation:n,rtl:j}));const re={horizontal:[L],vertical:[Ge],both:[L,Ge]}[n],z={horizontal:[D],vertical:[Ue],both:[D,Ue]}[n],H=g?S:{horizontal:l?$c:Ao,vertical:l?Bc:ko,both:S}[n];l&&(C.key===Nt?_=K:C.key===Ot&&(_=Y)),_===b&&(re.includes(C.key)||z.includes(C.key))&&(t&&_===Y&&re.includes(C.key)?(_=K,o&&(_=o(C,b,_,y))):t&&_===K&&z.includes(C.key)?(_=Y,o&&(_=o(C,b,_,y))):_=He(y.current,{startingIndex:_,decrement:z.includes(C.key),disabledIndices:f})),_!==b&&!zt(y.current,_)&&(u&&C.stopPropagation(),H.has(C.key)&&C.preventDefault(),T(_,!0),queueMicrotask(()=>{var X;(X=y.current[_])==null||X.focus()}))});return{props:{ref:v,onFocus(C){const S=x.current,I=nr(C.nativeEvent);!S||I==null||!or(I)||I.setSelectionRange(0,I.value.length??0)},onKeyDown:R},highlightedIndex:b,onHighlightedIndexChange:T,elementsRef:y,disabledIndices:f,onMapChange:P,relayKeyboardEvent:R}}function Xc(e,t){for(const n of Gc.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}const So=d.createContext(void 0);process.env.NODE_ENV!=="production"&&(So.displayName="DirectionContext");function Zc(){const e=d.useContext(So);return(e==null?void 0:e.direction)??"ltr"}function Jc(e){const{render:t,className:n,style:r,refs:o=Jt,props:s=Jt,state:i=Ne,stateAttributesMapping:a,highlightedIndex:c,onHighlightedIndexChange:l,orientation:u,grid:f,loopFocus:h,onLoop:m,enableHomeAndEndKeys:p,onMapChange:g,stopEventPropagation:x=!0,rootRef:v,disabledIndices:y,modifierKeys:w,highlightItemOnHover:b=!1,tag:T="div",...P}=e,k=Zc(),{props:R,highlightedIndex:M,onHighlightedIndexChange:C,elementsRef:S,onMapChange:I,relayKeyboardEvent:j}=qc({grid:f,loopFocus:h,onLoop:m,orientation:u,highlightedIndex:c,onHighlightedIndexChange:l,rootRef:v,stopEventPropagation:x,enableHomeAndEndKeys:p,direction:k,disabledIndices:y,modifierKeys:w}),L=Pt(T,e,{state:i,ref:o,props:[R,...s,P],stateAttributesMapping:a}),W=d.useMemo(()=>({highlightedIndex:M,onHighlightedIndexChange:C,highlightItemOnHover:b,relayKeyboardEvent:j}),[M,C,b,j]);return A.jsx(Tn.Provider,{value:W,children:A.jsx(xo,{elementsRef:S,onMapChange:D=>{g==null||g(D),I(D)},children:L})})}const No=d.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:o,loopFocus:s=!0,render:i,style:a,...c}=t,{onValueChange:l,orientation:u,value:f,setTabMap:h,tabActivationDirection:m}=Rn(),[p,g]=d.useState(0),[x,v]=d.useState(null),y=d.useRef(new Set),w=d.useRef(new Set),b=d.useRef(null);J(()=>{if(typeof ResizeObserver>"u")return;const S=new ResizeObserver(()=>{y.current.forEach(I=>{I()})});return b.current=S,x&&S.observe(x),w.current.forEach(I=>{S.observe(I)}),()=>{S.disconnect(),b.current=null}},[x]);const T=Q(S=>(y.current.add(S),()=>{y.current.delete(S)})),P=Q(S=>{var I;return w.current.add(S),(I=b.current)==null||I.observe(S),()=>{var j;w.current.delete(S),(j=b.current)==null||j.unobserve(S)}}),k=Q((S,I)=>{S!==f&&l(S,I)}),R={orientation:u,tabActivationDirection:m},M={"aria-orientation":u==="vertical"?"vertical":void 0,role:"tablist"},C=d.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:p,registerIndicatorUpdateListener:T,registerTabResizeObserverElement:P,onTabActivation:k,setHighlightedTabIndex:g,tabsListElement:x}),[r,p,T,P,k,g,x]);return A.jsx(An.Provider,{value:C,children:A.jsx(Jc,{render:i,className:o,style:a,state:R,refs:[n,v],props:[M,c],stateAttributesMapping:St,highlightedIndex:p,enableHomeAndEndKeys:!0,loopFocus:s,orientation:u,onHighlightedIndexChange:g,onMapChange:h,disabledIndices:Jt})})});process.env.NODE_ENV!=="production"&&(No.displayName="TabsList");function Qc({className:e,orientation:t="horizontal",...n}){return A.jsx(vo,{orientation:t,"data-slot":"tabs",className:Z("group/tabs flex h-full min-h-0 flex-col gap-2",e),...n})}const el=ur("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function tl({className:e,variant:t="default",...n}){return A.jsx(No,{"data-slot":"tabs-list","data-variant":t,className:Z(el({variant:t}),e),...n})}function nl({className:e,...t}){return A.jsx(Ro,{"data-slot":"tabs-trigger",className:Z("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}function rl({className:e,...t}){return A.jsx(To,{"data-slot":"tabs-content",className:Z("flex-1 text-sm outline-none",e),...t})}const ol=({tabs:e,defaultValue:t,value:n,onValueChange:r,className:o,showTabNumbers:s=!0,variant:i="default"})=>{var g;const a=n||t||((g=e[0])==null?void 0:g.id),[c,l]=de.useState(a),u=n??c,f=x=>{n||l(x),r==null||r(x)},h={default:Z("group relative px-6 py-3 text-sm font-medium transition-all duration-300 ease-out","text-muted-foreground hover:text-foreground","data-[state=active]:text-foreground data-[state=active]:font-semibold","after:absolute after:bottom-0 after:left-0 after:right-0 after:h-0.5 after:bg-gradient-to-r after:from-blue-500 after:via-purple-500 after:to-pink-500","after:scale-x-0 after:transition-transform after:duration-300 data-[state=active]:after:scale-x-100","disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:text-muted-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-blue-500"),gradient:Z("group relative px-6 py-3 text-sm font-medium transition-all duration-300 ease-out","text-muted-foreground/80 hover:text-muted-foreground","data-[state=active]:text-white data-[state=active]:font-semibold","data-[state=active]:bg-gradient-to-r data-[state=active]:from-blue-600 data-[state=active]:via-purple-600 data-[state=active]:to-pink-600","data-[state=active]:shadow-lg data-[state=active]:shadow-purple-500/30","rounded-lg mx-1 data-[state=active]:rounded-lg","disabled:opacity-50 disabled:cursor-not-allowed","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-blue-500"),minimal:Z("group relative px-4 py-2 text-sm font-medium transition-all duration-300","text-muted-foreground hover:text-foreground hover:bg-secondary/50 rounded-md","data-[state=active]:text-foreground data-[state=active]:bg-secondary","data-[state=active]:font-semibold","disabled:opacity-50 disabled:cursor-not-allowed","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-blue-500"),outline:Z("group relative px-4 py-3 text-sm font-semibold transition-colors duration-200 ease-out","text-foreground/70 hover:text-foreground","disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:text-foreground/70","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-emerald-500")},m={default:Z("bg-blue-100/60 text-blue-600","group-data-[state=active]:bg-blue-500 group-data-[state=active]:text-white"),gradient:Z("text-white/60","group-data-[state=active]:bg-white/20 group-data-[state=active]:text-white"),minimal:"bg-secondary/60 text-secondary-foreground",outline:Z("border border-border text-muted-foreground bg-transparent rounded-[6px]","group-data-[state=active]:border-[#059669] group-data-[state=active]:text-[#059669]")},p={borderTopWidth:3,borderRightWidth:1,borderBottomWidth:0,borderLeftWidth:1,borderStyle:"solid",borderColor:"#059669",color:"#059669",fontWeight:700};return A.jsxs(Qc,{value:u,onValueChange:f,defaultValue:t,className:Z("w-full h-full min-h-0 flex flex-col",o),children:[A.jsx(tl,{className:Z("inline-flex gap-1 rounded-none bg-transparent h-auto p-0 w-full border-b shrink-0",i==="default"&&"border-b border-border",i==="gradient"&&"border-b border-border/30 gap-2 bg-background/50 px-2 py-2 rounded-lg",i==="minimal"&&"border-b border-border/50 gap-0",i==="outline"&&"border-b border-red-400 gap-0 justify-start"),children:e.map((x,v)=>A.jsx(nl,{value:x.id,disabled:x.disabled,className:Z(h[i],i==="outline"&&"flex-none"),style:i==="outline"&&u===x.id?p:void 0,children:A.jsxs("div",{className:"flex items-center gap-2",children:[s&&A.jsx("div",{className:Z("inline-flex items-center justify-center w-5 h-5 text-xs font-bold transition-all duration-200",i!=="outline"&&"rounded-full",m[i]),children:v+1}),x.icon&&A.jsx("span",{className:"inline-flex",children:x.icon}),A.jsx("div",{children:x.label})]})},x.id))}),A.jsx("div",{className:"relative flex-1 min-h-0 overflow-hidden",children:e.map(x=>A.jsx(rl,{value:x.id,className:Z("mt-0 h-full min-h-0 overflow-y-auto animate-in fade-in-50 duration-300 data-[state=inactive]:hidden"),children:x.content},x.id))})]})};exports.Button=co;exports.CustomTabs=ol;exports.ExportButton=Na;exports.Tooltip=bn;exports.TooltipContent=At;exports.TooltipProvider=hn;exports.TooltipTrigger=xn;exports.TruncatedText=Oa;exports.buttonVariants=ao;exports.cn=Z;
1
+ "use strict";var bn=Object.defineProperty;var hn=(e,t,n)=>t in e?bn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ne=(e,t,n)=>hn(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("react/jsx-runtime"),Se=require("react"),vn=require("react-dom");function _t(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const d=_t(Se),xn=_t(vn);function Lt(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Lt(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function zt(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Lt(e))&&(r&&(r+=" "),r+=t);return r}const tt="-",yn=e=>{const t=kn(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const c=i.split(tt);return c[0]===""&&c.length!==1&&c.shift(),Dt(c,t)||wn(i)},getConflictingClassGroupIds:(i,c)=>{const a=n[i]||[];return c&&r[i]?[...a,...r[i]]:a}}},Dt=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Dt(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(tt);return(i=t.validators.find(({validator:c})=>c(s)))==null?void 0:i.classGroupId},pt=/^\[(.+)\]$/,wn=e=>{if(pt.test(e)){const t=pt.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},kn=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)He(n[o],r,o,t);return r},He=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:mt(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(En(o)){He(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{He(i,mt(t,s),n,r)})})},mt=(e,t)=>{let n=e;return t.split(tt).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},En=e=>e.isThemeGetter,Rn=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},Ke="!",Ye=":",In=Ye.length,Tn=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,c=0,a=0,l;for(let p=0;p<o.length;p++){let m=o[p];if(i===0&&c===0){if(m===Ye){s.push(o.slice(a,p)),a=p+In;continue}if(m==="/"){l=p;continue}}m==="["?i++:m==="]"?i--:m==="("?c++:m===")"&&c--}const u=s.length===0?o:o.substring(a),g=Cn(u),A=g!==u,T=l&&l>a?l-a:void 0;return{modifiers:s,hasImportantModifier:A,baseClassName:g,maybePostfixModifierPosition:T}};if(t){const o=t+Ye,s=r;r=i=>i.startsWith(o)?s(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},Cn=e=>e.endsWith(Ke)?e.substring(0,e.length-1):e.startsWith(Ke)?e.substring(1):e,Nn=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let s=[];return r.forEach(i=>{i[0]==="["||t[i]?(o.push(...s.sort(),i),s=[]):s.push(i)}),o.push(...s.sort()),o}},Sn=e=>({cache:Rn(e.cacheSize),parseClassName:Tn(e),sortModifiers:Nn(e),...yn(e)}),Mn=/\s+/,An=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],c=e.trim().split(Mn);let a="";for(let l=c.length-1;l>=0;l-=1){const u=c[l],{isExternal:g,modifiers:A,hasImportantModifier:T,baseClassName:p,maybePostfixModifierPosition:m}=n(u);if(g){a=u+(a.length>0?" "+a:a);continue}let y=!!m,E=r(y?p.substring(0,m):p);if(!E){if(!y){a=u+(a.length>0?" "+a:a);continue}if(E=r(p),!E){a=u+(a.length>0?" "+a:a);continue}y=!1}const w=s(A).join(":"),I=T?w+Ke:w,f=I+E;if(i.includes(f))continue;i.push(f);const N=o(E,y);for(let z=0;z<N.length;++z){const D=N[z];i.push(I+D)}a=u+(a.length>0?" "+a:a)}return a};function Pn(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Vt(t))&&(r&&(r+=" "),r+=n);return r}const Vt=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Vt(e[r]))&&(n&&(n+=" "),n+=t);return n};function On(e,...t){let n,r,o,s=i;function i(a){const l=t.reduce((u,g)=>g(u),e());return n=Sn(l),r=n.cache.get,o=n.cache.set,s=c,c(a)}function c(a){const l=r(a);if(l)return l;const u=An(a,n);return o(a,u),u}return function(){return s(Pn.apply(null,arguments))}}const G=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},jt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Bt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_n=/^\d+\/\d+$/,Ln=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zn=/\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$/,Dn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Vn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,jn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,de=e=>_n.test(e),M=e=>!!e&&!Number.isNaN(Number(e)),ie=e=>!!e&&Number.isInteger(Number(e)),Ue=e=>e.endsWith("%")&&M(e.slice(0,-1)),re=e=>Ln.test(e),Bn=()=>!0,Fn=e=>zn.test(e)&&!Dn.test(e),Ft=()=>!1,Un=e=>Vn.test(e),$n=e=>jn.test(e),Wn=e=>!h(e)&&!v(e),Gn=e=>pe(e,Wt,Ft),h=e=>jt.test(e),ce=e=>pe(e,Gt,Fn),$e=e=>pe(e,Xn,M),gt=e=>pe(e,Ut,Ft),Hn=e=>pe(e,$t,$n),ke=e=>pe(e,Ht,Un),v=e=>Bt.test(e),be=e=>me(e,Gt),Kn=e=>me(e,Zn),bt=e=>me(e,Ut),Yn=e=>me(e,Wt),qn=e=>me(e,$t),Ee=e=>me(e,Ht,!0),pe=(e,t,n)=>{const r=jt.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},me=(e,t,n=!1)=>{const r=Bt.exec(e);return r?r[1]?t(r[1]):n:!1},Ut=e=>e==="position"||e==="percentage",$t=e=>e==="image"||e==="url",Wt=e=>e==="length"||e==="size"||e==="bg-size",Gt=e=>e==="length",Xn=e=>e==="number",Zn=e=>e==="family-name",Ht=e=>e==="shadow",Jn=()=>{const e=G("color"),t=G("font"),n=G("text"),r=G("font-weight"),o=G("tracking"),s=G("leading"),i=G("breakpoint"),c=G("container"),a=G("spacing"),l=G("radius"),u=G("shadow"),g=G("inset-shadow"),A=G("text-shadow"),T=G("drop-shadow"),p=G("blur"),m=G("perspective"),y=G("aspect"),E=G("ease"),w=G("animate"),I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],f=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...f(),v,h],z=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],x=()=>[v,h,a],O=()=>[de,"full","auto",...x()],b=()=>[ie,"none","subgrid",v,h],R=()=>["auto",{span:["full",ie,v,h]},ie,v,h],C=()=>[ie,"auto",v,h],B=()=>["auto","min","max","fr",v,h],F=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],q=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...x()],X=()=>[de,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],k=()=>[e,v,h],L=()=>[...f(),bt,gt,{position:[v,h]}],ee=()=>["no-repeat",{repeat:["","x","y","space","round"]}],J=()=>["auto","cover","contain",Yn,Gn,{size:[v,h]}],te=()=>[Ue,be,ce],S=()=>["","none","full",l,v,h],j=()=>["",M,be,ce],Z=()=>["solid","dashed","dotted","double"],ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>[M,Ue,bt,gt],we=()=>["","none",p,v,h],P=()=>["none",M,v,h],_=()=>["none",M,v,h],$=()=>[M,v,h],Q=()=>[de,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[re],breakpoint:[re],color:[Bn],container:[re],"drop-shadow":[re],ease:["in","out","in-out"],font:[Wn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[re],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[re],shadow:[re],spacing:["px",M],text:[re],"text-shadow":[re],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",de,h,v,y]}],container:["container"],columns:[{columns:[M,h,v,c]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"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:N()}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:O()}],"inset-x":[{"inset-x":O()}],"inset-y":[{"inset-y":O()}],start:[{start:O()}],end:[{end:O()}],top:[{top:O()}],right:[{right:O()}],bottom:[{bottom:O()}],left:[{left:O()}],visibility:["visible","invisible","collapse"],z:[{z:[ie,"auto",v,h]}],basis:[{basis:[de,"full","auto",c,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[M,de,"auto","initial","none",h]}],grow:[{grow:["",M,v,h]}],shrink:[{shrink:["",M,v,h]}],order:[{order:[ie,"first","last","none",v,h]}],"grid-cols":[{"grid-cols":b()}],"col-start-end":[{col:R()}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":b()}],"row-start-end":[{row:R()}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:[...F(),"normal"]}],"justify-items":[{"justify-items":[...q(),"normal"]}],"justify-self":[{"justify-self":["auto",...q()]}],"align-content":[{content:["normal",...F()]}],"align-items":[{items:[...q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...q(),{baseline:["","last"]}]}],"place-content":[{"place-content":F()}],"place-items":[{"place-items":[...q(),"baseline"]}],"place-self":[{"place-self":["auto",...q()]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],w:[{w:[c,"screen",...X()]}],"min-w":[{"min-w":[c,"screen","none",...X()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...X()]}],h:[{h:["screen",...X()]}],"min-h":[{"min-h":["screen","none",...X()]}],"max-h":[{"max-h":["screen",...X()]}],"font-size":[{text:["base",n,be,ce]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,v,$e]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ue,h]}],"font-family":[{font:[Kn,h,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,v,h]}],"line-clamp":[{"line-clamp":[M,"none",v,$e]}],leading:[{leading:[s,...x()]}],"list-image":[{"list-image":["none",v,h]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",v,h]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:[M,"from-font","auto",v,ce]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[M,"auto",v,h]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",v,h]}],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",v,h]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:ee()}],"bg-size":[{bg:J()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ie,v,h],radial:["",v,h],conic:[ie,v,h]},qn,Hn]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:te()}],"gradient-via-pos":[{via:te()}],"gradient-to-pos":[{to:te()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:S()}],"rounded-s":[{"rounded-s":S()}],"rounded-e":[{"rounded-e":S()}],"rounded-t":[{"rounded-t":S()}],"rounded-r":[{"rounded-r":S()}],"rounded-b":[{"rounded-b":S()}],"rounded-l":[{"rounded-l":S()}],"rounded-ss":[{"rounded-ss":S()}],"rounded-se":[{"rounded-se":S()}],"rounded-ee":[{"rounded-ee":S()}],"rounded-es":[{"rounded-es":S()}],"rounded-tl":[{"rounded-tl":S()}],"rounded-tr":[{"rounded-tr":S()}],"rounded-br":[{"rounded-br":S()}],"rounded-bl":[{"rounded-bl":S()}],"border-w":[{border:j()}],"border-w-x":[{"border-x":j()}],"border-w-y":[{"border-y":j()}],"border-w-s":[{"border-s":j()}],"border-w-e":[{"border-e":j()}],"border-w-t":[{"border-t":j()}],"border-w-r":[{"border-r":j()}],"border-w-b":[{"border-b":j()}],"border-w-l":[{"border-l":j()}],"divide-x":[{"divide-x":j()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":j()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Z(),"hidden","none"]}],"divide-style":[{divide:[...Z(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...Z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[M,v,h]}],"outline-w":[{outline:["",M,be,ce]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",u,Ee,ke]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",g,Ee,ke]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[M,ce]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":j()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",A,Ee,ke]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[M,v,h]}],"mix-blend":[{"mix-blend":[...ae(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ae()}],"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":[M]}],"mask-image-linear-from-pos":[{"mask-linear-from":U()}],"mask-image-linear-to-pos":[{"mask-linear-to":U()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":U()}],"mask-image-t-to-pos":[{"mask-t-to":U()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":U()}],"mask-image-r-to-pos":[{"mask-r-to":U()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":U()}],"mask-image-b-to-pos":[{"mask-b-to":U()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":U()}],"mask-image-l-to-pos":[{"mask-l-to":U()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":U()}],"mask-image-x-to-pos":[{"mask-x-to":U()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":U()}],"mask-image-y-to-pos":[{"mask-y-to":U()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[v,h]}],"mask-image-radial-from-pos":[{"mask-radial-from":U()}],"mask-image-radial-to-pos":[{"mask-radial-to":U()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"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":f()}],"mask-image-conic-pos":[{"mask-conic":[M]}],"mask-image-conic-from-pos":[{"mask-conic-from":U()}],"mask-image-conic-to-pos":[{"mask-conic-to":U()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:ee()}],"mask-size":[{mask:J()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",v,h]}],filter:[{filter:["","none",v,h]}],blur:[{blur:we()}],brightness:[{brightness:[M,v,h]}],contrast:[{contrast:[M,v,h]}],"drop-shadow":[{"drop-shadow":["","none",T,Ee,ke]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",M,v,h]}],"hue-rotate":[{"hue-rotate":[M,v,h]}],invert:[{invert:["",M,v,h]}],saturate:[{saturate:[M,v,h]}],sepia:[{sepia:["",M,v,h]}],"backdrop-filter":[{"backdrop-filter":["","none",v,h]}],"backdrop-blur":[{"backdrop-blur":we()}],"backdrop-brightness":[{"backdrop-brightness":[M,v,h]}],"backdrop-contrast":[{"backdrop-contrast":[M,v,h]}],"backdrop-grayscale":[{"backdrop-grayscale":["",M,v,h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[M,v,h]}],"backdrop-invert":[{"backdrop-invert":["",M,v,h]}],"backdrop-opacity":[{"backdrop-opacity":[M,v,h]}],"backdrop-saturate":[{"backdrop-saturate":[M,v,h]}],"backdrop-sepia":[{"backdrop-sepia":["",M,v,h]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",v,h]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[M,"initial",v,h]}],ease:[{ease:["linear","initial",E,v,h]}],delay:[{delay:[M,v,h]}],animate:[{animate:["none",w,v,h]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,v,h]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:P()}],"rotate-x":[{"rotate-x":P()}],"rotate-y":[{"rotate-y":P()}],"rotate-z":[{"rotate-z":P()}],scale:[{scale:_()}],"scale-x":[{"scale-x":_()}],"scale-y":[{"scale-y":_()}],"scale-z":[{"scale-z":_()}],"scale-3d":["scale-3d"],skew:[{skew:$()}],"skew-x":[{"skew-x":$()}],"skew-y":[{"skew-y":$()}],transform:[{transform:[v,h,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Q()}],"translate-x":[{"translate-x":Q()}],"translate-y":[{"translate-y":Q()}],"translate-z":[{"translate-z":Q()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"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",v,h]}],"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":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"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",v,h]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[M,be,ce,$e]}],stroke:[{stroke:["none",...k()]}],"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"]}},Qn=On(Jn);function Y(...e){return Qn(zt(e))}let qe;process.env.NODE_ENV!=="production"&&(qe=new Set);function Me(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");qe.has(t)||(qe.add(t),console.error(`Base UI: ${t}`))}}function er({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=d.useRef(e!==void 0),[s,i]=d.useState(t),c=o?e:s;if(process.env.NODE_ENV!=="production"){d.useEffect(()=>{o!==(e!==void 0)&&Me([`A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
2
+ `))},[r,n,e]);const{current:l}=d.useRef(t);d.useEffect(()=>{!o&&ht(l)!==ht(t)&&Me([`A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
3
+ `))},[t])}const a=d.useCallback(l=>{o||i(l)},[]);return[c,a]}function ht(e){let t=0;const n=new WeakMap;try{return JSON.stringify(e,function(s,i){if(!(s==="_owner"&&this!=null&&typeof this=="object"&&"$$typeof"in this)){if(typeof i=="bigint")return`__bigint__:${i}`;if(i!==null&&typeof i=="object"){const c=n.get(i);if(c!==void 0)return`__object__:${c}`;n.set(i,t),t+=1}return i}})??`__top__:${typeof e}`}catch{return"__unserializable__"}}const tr=()=>{},H=typeof document<"u"?d.useLayoutEffect:tr,oe={...d},vt={};function fe(e,t){const n=d.useRef(vt);return n.current===vt&&(n.current=e(t)),n}const We=oe.useInsertionEffect,nr=We&&We!==oe.useLayoutEffect?We:e=>e();function K(e){const t=fe(rr).current;return t.next=e,nr(t.effect),t.trampoline}function rr(){const e={next:void 0,callback:or,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function or(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}function sr(e,t){return function(r,...o){const s=new URL(e);return s.searchParams.set("code",r.toString()),o.forEach(i=>s.searchParams.append("args[]",i)),`${t} error #${r}; visit ${s} for the full message.`}}const ze=sr("https://base-ui.com/production-error","Base UI");function Ae(e,t,n,r){const o=fe(Kt).current;return ar(o,e,t,n,r)&&Yt(o,[e,t,n,r]),o.callback}function ir(e){const t=fe(Kt).current;return lr(t,e)&&Yt(t,e),t.callback}function Kt(){return{callback:null,cleanup:null,refs:[]}}function ar(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function lr(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function Yt(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const i=s(n);typeof i=="function"&&(r[o]=i);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const i=r[o];typeof i=="function"?i():s(null);break}case"object":{s.current=null;break}}}}}}}const cr=parseInt(d.version,10);function qt(e){return cr>=e}function xt(e){if(!d.isValidElement(e))return null;const t=e,n=t.props;return(qt(19)?n==null?void 0:n.ref:t.ref)??null}function Xe(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}let Ze;process.env.NODE_ENV!=="production"&&(Ze=new Set);function ur(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");Ze.has(t)||(Ze.add(t),console.warn(`Base UI: ${t}`))}}const Je=Object.freeze([]),ue=Object.freeze({});function dr(e,t){const n={};for(const r in e){const o=e[r];if(t!=null&&t.hasOwnProperty(r)){const s=t[r](o);s!=null&&Object.assign(n,s);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function fr(e,t){return typeof e=="function"?e(t):e}function pr(e,t){return typeof e=="function"?e(t):e}const nt={};function rt(e,t,n,r,o){if(!n&&!r&&!e)return Pe(t);let s=Pe(e);return t&&(s=Ne(s,t)),n&&(s=Ne(s,n)),r&&(s=Ne(s,r)),s}function mr(e){if(e.length===0)return nt;if(e.length===1)return Pe(e[0]);let t=Pe(e[0]);for(let n=1;n<e.length;n+=1)t=Ne(t,e[n]);return t}function Pe(e){return ot(e)?{...Zt(e,nt)}:gr(e)}function Ne(e,t){return ot(t)?Zt(t,e):br(e,t)}function gr(e){const t={...e};for(const n in t){const r=t[n];Xt(n,r)&&(t[n]=Jt(r))}return t}function br(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Xe(e.style,r);break}case"className":{e[n]=Qt(e.className,r);break}default:Xt(n,r)?e[n]=hr(e[n],r):e[n]=r}}return e}function Xt(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function ot(e){return typeof e=="function"}function Zt(e,t){return ot(e)?e(t):e??nt}function hr(e,t){return t?e?(...n)=>{const r=n[0];if(en(r)){const s=r;Oe(s);const i=t(...n);return s.baseUIHandlerPrevented||e==null||e(...n),i}const o=t(...n);return e==null||e(...n),o}:Jt(t):e}function Jt(e){return e&&((...t)=>{const n=t[0];return en(n)&&Oe(n),e(...t)})}function Oe(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Qt(e,t){return t?e?t+" "+e:t:e}function en(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function De(e,t,n={}){const r=t.render,o=vr(t,n);if(n.enabled===!1)return null;const s=n.state??ue;return Er(e,r,o,s)}function vr(e,t={}){const{className:n,style:r,render:o}=e,{state:s=ue,ref:i,props:c,stateAttributesMapping:a,enabled:l=!0}=t,u=l?fr(n,s):void 0,g=l?pr(r,s):void 0,A=l?dr(s,a):ue,T=l&&c?xr(c):void 0,p=l?Xe(A,T)??{}:ue;return typeof document<"u"&&(l?Array.isArray(i)?p.ref=ir([p.ref,xt(o),...i]):p.ref=Ae(p.ref,xt(o),i):Ae(null,null)),l?(u!==void 0&&(p.className=Qt(p.className,u)),g!==void 0&&(p.style=Xe(p.style,g)),p):ue}function xr(e){return Array.isArray(e)?mr(e):rt(void 0,e)}const yr=Symbol.for("react.lazy"),wr=/^[A-Z][A-Za-z0-9$]*$/,kr=/[a-z]/;function Er(e,t,n,r){if(t){if(typeof t=="function")return process.env.NODE_ENV!=="production"&&Rr(t),t(n,r);const o=rt(n,t.props);o.ref=n.ref;let s=t;if((s==null?void 0:s.$$typeof)===yr&&(s=d.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!d.isValidElement(s))throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.","https://base-ui.com/r/invalid-render-prop"].join(`
4
+ `));return d.cloneElement(s,o)}if(e&&typeof e=="string")return Ir(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":ze(8))}function Rr(e){const t=e.name;t.length!==0&&wr.test(t)&&kr.test(t)&&ur(`The \`render\` prop received a function named \`${t}\` that starts with an uppercase letter.`,"This usually means a React component was passed directly as `render={Component}`.","Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.","If this is an intentional render callback, rename it to start with a lowercase letter.","Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.","https://base-ui.com/r/invalid-render-prop")}function Ir(e,t){return e==="button"?Se.createElement("button",{type:"button",...t,key:t.key}):e==="img"?Se.createElement("img",{alt:"",...t,key:t.key}):d.createElement(e,t)}const st=d.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(st.displayName="CompositeListContext");function Tr(){return d.useContext(st)}function tn(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,s=K(o),i=d.useRef(0),c=fe(Nr).current,a=fe(Cr).current,[l,u]=d.useState(0),g=d.useRef(l),A=K((E,w)=>{a.set(E,w??null),g.current+=1,u(g.current)}),T=K(E=>{a.delete(E),g.current+=1,u(g.current)}),p=d.useMemo(()=>{const E=new Map;return Array.from(a.keys()).filter(I=>I.isConnected).sort(Sr).forEach((I,f)=>{const N=a.get(I)??{};E.set(I,{...N,index:f})}),E},[a,l]);H(()=>{if(typeof MutationObserver!="function"||p.size===0)return;const E=new MutationObserver(w=>{const I=new Set,f=N=>I.has(N)?I.delete(N):I.add(N);w.forEach(N=>{N.removedNodes.forEach(f),N.addedNodes.forEach(f)}),I.size===0&&(g.current+=1,u(g.current))});return p.forEach((w,I)=>{I.parentElement&&E.observe(I.parentElement,{childList:!0})}),()=>{E.disconnect()}},[p]),H(()=>{g.current===l&&(n.current.length!==p.size&&(n.current.length=p.size),r&&r.current.length!==p.size&&(r.current.length=p.size),i.current=p.size),s(p)},[s,p,n,r,l]),H(()=>()=>{n.current=[]},[n]),H(()=>()=>{r&&(r.current=[])},[r]);const m=K(E=>(c.add(E),()=>{c.delete(E)}));H(()=>{c.forEach(E=>E(p))},[c,p]);const y=d.useMemo(()=>({register:A,unregister:T,subscribeMapChange:m,elementsRef:n,labelsRef:r,nextIndexRef:i}),[A,T,m,n,r,i]);return W.jsx(st.Provider,{value:y,children:t})}function Cr(){return new Map}function Nr(){return new Set}function Sr(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const it=d.createContext(void 0);process.env.NODE_ENV!=="production"&&(it.displayName="TabsRootContext");function at(){const e=d.useContext(it);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: TabsRootContext is missing. Tabs parts must be placed within <Tabs.Root>.":ze(64));return e}let Mr=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const Ve={tabActivationDirection:e=>({[Mr.activationDirection]:e})},yt="none",Ar="disabled",wt="missing",kt="initial";function Qe(e,t,n,r){let o=!1,s=!1;const i=r??ue;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){s=!0},get isCanceled(){return o},get isPropagationAllowed(){return s},trigger:n,...i}}const nn=d.forwardRef(function(t,n){const{className:r,defaultValue:o=0,onValueChange:s,orientation:i="horizontal",render:c,value:a,style:l,...u}=t,g=t.defaultValue!==void 0,A=d.useRef([]),[T,p]=d.useState(()=>new Map),[m,y]=er({controlled:a,default:o,name:"Tabs",state:"value"}),E=a!==void 0,[w,I]=d.useState(()=>new Map),f=d.useRef(void 0),N=d.useCallback(P=>{if(P===void 0)return null;for(const[_,$]of w.entries())if($!=null&&P===($.value??$.index))return _;return null},[w]),[z,D]=d.useState(()=>({previousValue:m,tabActivationDirection:"none"})),{previousValue:x,tabActivationDirection:O}=z;let b=O,R=!1;x!==m&&(b=Et(x,m,i,w),R=x!=null&&m!=null&&N(m)==null);const C=R?x:m,B=x!==C||O!==b;H(()=>{B&&D({previousValue:C,tabActivationDirection:b})},[C,B,b]);const F=K((P,_)=>{const $=Et(m,P,i,w);_.activationDirection=$,s==null||s(P,_),!_.isCanceled&&y(P)}),q=K((P,_)=>{s==null||s(P,Qe(_,void 0,void 0,{activationDirection:"none"}))}),V=K((P,_)=>{p($=>{if($.get(P)===_)return $;const Q=new Map($);return Q.set(P,_),Q})}),X=K((P,_)=>{p($=>{if(!$.has(P)||$.get(P)!==_)return $;const Q=new Map($);return Q.delete(P),Q})}),k=d.useCallback(P=>T.get(P),[T]),L=d.useCallback(P=>{for(const _ of w.values())if(P===(_==null?void 0:_.value))return _==null?void 0:_.id},[w]),ee=d.useMemo(()=>({getTabElementBySelectedValue:N,getTabIdByPanelValue:L,getTabPanelIdByValue:k,onValueChange:F,orientation:i,registerMountedTabPanel:V,setTabMap:I,unregisterMountedTabPanel:X,tabActivationDirection:b,value:m}),[N,L,k,F,i,V,I,X,b,m]),J=d.useMemo(()=>{for(const P of w.values())if(P!=null&&P.value===m)return P},[w,m]),te=d.useMemo(()=>{for(const P of w.values())if(P!=null&&!P.disabled)return P.value},[w]),S=d.useRef(!g),j=d.useRef(o),Z=d.useRef(g),ae=d.useRef(!1);H(()=>{var ft;if(E)return;function P(le,ge){y(le),D(Fe=>Fe.previousValue===le&&Fe.tabActivationDirection==="none"?Fe:{previousValue:le,tabActivationDirection:"none"}),q(le,ge),S.current=!1}if(w.size===0){ae.current&&m!==null&&!((ft=f.current)!=null&&ft.isConnected)&&P(null,wt);return}ae.current=!0,f.current=w.keys().next().value;const _=J==null?void 0:J.disabled,$=J==null&&m!==null;if(!_&&m===j.current&&(Z.current=!1),Z.current&&_&&m===j.current)return;const Q=S.current;if(_||$){const le=te??null;if(m===le){S.current=!1;return}let ge=wt;Q?ge=kt:_&&(ge=Ar),P(le,ge);return}Q&&J!=null&&(q(m,kt),S.current=!1)},[te,E,q,J,y,w,m]);const we=De("div",t,{state:{orientation:i,tabActivationDirection:b},ref:n,props:u,stateAttributesMapping:Ve});return W.jsx(it.Provider,{value:ee,children:W.jsx(tn,{elementsRef:A,children:we})})});process.env.NODE_ENV!=="production"&&(nn.displayName="TabsRoot");function Et(e,t,n,r){if(e==null||t==null)return"none";let o=null,s=null;for(const[a,l]of r.entries()){if(l==null)continue;const u=l.value??l.index;if(e===u&&(o=a),t===u&&(s=a),o!=null&&s!=null)break}if(o==null||s==null)return o!==s&&(typeof e=="number"||typeof e=="string")&&typeof e==typeof t?n==="horizontal"?t>e?"right":"left":t>e?"down":"up":"none";const i=o.getBoundingClientRect(),c=s.getBoundingClientRect();if(n==="horizontal"){if(c.left<i.left)return"left";if(c.left>i.left)return"right"}else{if(c.top<i.top)return"up";if(c.top>i.top)return"down"}return"none"}function rn(){return typeof window<"u"}function lt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ct(e){return rn()?e instanceof HTMLElement||e instanceof lt(e).HTMLElement:!1}function Pr(e){return!rn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof lt(e).ShadowRoot}function Or(e){return lt(e).getComputedStyle(e)}function Rt(e){return(e==null?void 0:e.ownerDocument)||document}let It=0;function _r(e,t="mui"){const[n,r]=d.useState(e),o=e||n;return d.useEffect(()=>{n==null&&(It+=1,r(`${t}-${It}`))},[n,t]),o}const Tt=oe.useId;function Lr(e,t){if(Tt!==void 0){const n=Tt();return e??`${t}-${n}`}return _r(e,t)}function on(e){return Lr(e,"base-ui")}const ut=d.createContext(void 0);process.env.NODE_ENV!=="production"&&(ut.displayName="CompositeRootContext");function sn(e=!1){const t=d.useContext(ut);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":ze(16));return t}function zr(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:s}=e,i=r&&t!==!1,c=r&&t===!1;return{props:d.useMemo(()=>{const l={onKeyDown(u){n&&t&&u.key!=="Tab"&&u.preventDefault()}};return r||(l.tabIndex=o,!s&&n&&(l.tabIndex=t?o:-1)),(s&&(t||i)||!s&&n)&&(l["aria-disabled"]=n),s&&(!t||c)&&(l.disabled=n),l},[r,n,t,i,c,s,o])}}function Dr(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0,composite:s}=e,i=d.useRef(null),c=sn(!0),a=s??c!==void 0,{props:l}=zr({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&d.useEffect(()=>{var p,m;if(!i.current)return;const T=Re(i.current);if(o){if(!T){const y=((p=oe.captureOwnerStack)==null?void 0:p.call(oe))||"";Me(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${y}`)}}else if(T){const y=((m=oe.captureOwnerStack)==null?void 0:m.call(oe))||"";Me(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${y}`)}},[o]);const u=d.useCallback(()=>{const T=i.current;Re(T)&&a&&t&&l.disabled===void 0&&T.disabled&&(T.disabled=!1)},[t,l.disabled,a]);H(u,[u]);const g=d.useCallback((T={})=>{const{onClick:p,onMouseDown:m,onKeyUp:y,onKeyDown:E,onPointerDown:w,...I}=T;return rt({onClick(f){if(t){f.preventDefault();return}p==null||p(f)},onMouseDown(f){t||m==null||m(f)},onKeyDown(f){if(t||(Oe(f),E==null||E(f),f.baseUIHandlerPrevented))return;const N=f.target===f.currentTarget,z=f.currentTarget,D=Re(z),x=!o&&Vr(z),O=N&&(o?D:!x),b=f.key==="Enter",R=f.key===" ",C=z.getAttribute("role"),B=(C==null?void 0:C.startsWith("menuitem"))||C==="option"||C==="gridcell";if(N&&a&&R){if(f.defaultPrevented&&B)return;f.preventDefault(),x||o&&D?(z.click(),f.preventBaseUIHandler()):O&&(p==null||p(f),f.preventBaseUIHandler());return}O&&(!o&&(R||b)&&f.preventDefault(),!o&&b&&(p==null||p(f)))},onKeyUp(f){if(!t){if(Oe(f),y==null||y(f),f.target===f.currentTarget&&o&&a&&Re(f.currentTarget)&&f.key===" "){f.preventDefault();return}f.baseUIHandlerPrevented||f.target===f.currentTarget&&!o&&!a&&f.key===" "&&(p==null||p(f))}},onPointerDown(f){if(t){f.preventDefault();return}w==null||w(f)}},o?{type:"button"}:{role:"button"},l,I)},[t,l,a,o]),A=K(T=>{i.current=T,u()});return{getButtonProps:g,buttonRef:A}}function Re(e){return ct(e)&&e.tagName==="BUTTON"}function Vr(e){return!!((e==null?void 0:e.tagName)==="A"&&(e!=null&&e.href))}const an="data-composite-item-active";let jr=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function ln(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:s}=e,{register:i,unregister:c,subscribeMapChange:a,elementsRef:l,labelsRef:u,nextIndexRef:g}=Tr(),A=d.useRef(-1),[T,p]=d.useState(s??(o===jr.GuessFromOrder?()=>{if(A.current===-1){const E=g.current;g.current+=1,A.current=E}return A.current}:-1)),m=d.useRef(null),y=d.useCallback(E=>{var w;if(m.current=E,T!==-1&&E!==null&&(l.current[T]=E,u)){const I=t!==void 0;u.current[T]=I?t:((w=r==null?void 0:r.current)==null?void 0:w.textContent)??E.textContent}},[T,l,u,t,r]);return H(()=>{if(s!=null)return;const E=m.current;if(E)return i(E,n),()=>{c(E)}},[s,i,c,n]),H(()=>{if(s==null)return a(E=>{var I;const w=m.current?(I=E.get(m.current))==null?void 0:I.index:null;w!=null&&p(w)})},[s,a,p]),{ref:y,index:T}}function Br(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=sn(),{ref:o,index:s}=ln(e),i=n===s,c=d.useRef(null),a=Ae(o,c);return{compositeProps:{tabIndex:i?0:-1,onFocus(){r(s)},onMouseMove(){const u=c.current;if(!t||!u)return;const g=u.hasAttribute("disabled")||u.ariaDisabled==="true";!i&&!g&&u.focus()}},compositeRef:a,index:s}}const dt=d.createContext(void 0);process.env.NODE_ENV!=="production"&&(dt.displayName="TabsListContext");function Fr(){const e=d.useContext(dt);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: TabsListContext is missing. TabsList parts must be placed within <Tabs.List>.":ze(65));return e}function Ur(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function $r(e,t){var r;if(!e||!t)return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e.contains(t))return!0;if(n&&Pr(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Ct(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Ge(e,t){return t<0||t>=e.length}function Wr(e,t){return he(e.current,{disabledIndices:t})}function Gr(e,t){return he(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function he(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:o=1}={}){let s=t;do s+=n?-o:o;while(s>=0&&s<=e.length-1&&et(e,s,r));return s}function et(e,t,n){if(typeof n=="function"?n(t):(n==null?void 0:n.includes(t))??!1)return!0;const o=e[t];return o?Kr(o)?!n&&(o.hasAttribute("disabled")||o.getAttribute("aria-disabled")==="true"):!0:!1}function Hr(e){return e.visibility==="hidden"||e.visibility==="collapse"}function Kr(e,t=e?Or(e):null){return!e||!e.isConnected||!t||Hr(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}const cn=d.forwardRef(function(t,n){const{className:r,disabled:o=!1,render:s,value:i,id:c,nativeButton:a=!0,style:l,...u}=t,{value:g,getTabPanelIdByValue:A,orientation:T,tabActivationDirection:p}=at(),{activateOnFocus:m,highlightedTabIndex:y,onTabActivation:E,registerTabResizeObserverElement:w,setHighlightedTabIndex:I,tabsListElement:f}=Fr(),N=on(c),z=d.useMemo(()=>({disabled:o,id:N,value:i}),[o,N,i]),{compositeProps:D,compositeRef:x,index:O}=Br({metadata:z}),b=i===g,R=d.useRef(!1),C=d.useRef(null);H(()=>{const S=C.current;if(S)return w(S)},[w]),H(()=>{if(R.current){R.current=!1;return}if(!(b&&O>-1&&y!==O))return;const S=f;if(S!=null){const j=Ur(Rt(S));if(j&&$r(S,j))return}o||I(O)},[b,O,y,I,o,f]);const{getButtonProps:B,buttonRef:F}=Dr({disabled:o,native:a,focusableWhenDisabled:!0}),q=A(i),V=d.useRef(!1),X=d.useRef(!1);function k(S){b||o||E(i,Qe(yt,S.nativeEvent,void 0,{activationDirection:"none"}))}function L(S){b||(O>-1&&!o&&I(O),!o&&m&&(!V.current||V.current&&X.current)&&E(i,Qe(yt,S.nativeEvent,void 0,{activationDirection:"none"})))}function ee(S){if(b||o)return;V.current=!0;function j(){V.current=!1,X.current=!1}(!S.button||S.button===0)&&(X.current=!0,Rt(S.currentTarget).addEventListener("pointerup",j,{once:!0}))}return De("button",t,{state:{disabled:o,active:b,orientation:T,tabActivationDirection:p},ref:[n,F,x,C],props:[D,{role:"tab","aria-controls":q,"aria-selected":b,id:N,onClick:k,onFocus:L,onPointerDown:ee,[an]:b?"":void 0,onKeyDownCapture(){R.current=!0}},u,B],stateAttributesMapping:Ve})});process.env.NODE_ENV!=="production"&&(cn.displayName="TabsTab");function Yr(e){return qt(19)?e:e?"true":void 0}let ye=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const qr={[ye.startingStyle]:""},Xr={[ye.endingStyle]:""},Zr={transitionStatus(e){return e==="starting"?qr:e==="ending"?Xr:null}},Jr=[];function Qr(e){d.useEffect(e,Jr)}const Ie=null;let Nt=globalThis.requestAnimationFrame;class eo{constructor(){ne(this,"callbacks",[]);ne(this,"callbacksCount",0);ne(this,"nextId",1);ne(this,"startId",1);ne(this,"isScheduled",!1);ne(this,"tick",t=>{var o;this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let s=0;s<n.length;s+=1)(o=n[s])==null||o.call(n,t)})}request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV!=="production"&&Nt!==requestAnimationFrame&&(Nt=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Te=new eo;class se{constructor(){ne(this,"currentId",Ie);ne(this,"cancel",()=>{this.currentId!==Ie&&(Te.cancel(this.currentId),this.currentId=Ie)});ne(this,"disposeEffect",()=>this.cancel)}static create(){return new se}static request(t){return Te.request(t)}static cancel(t){return Te.cancel(t)}request(t){this.cancel(),this.currentId=Te.request(()=>{this.currentId=Ie,t()})}}function to(){const e=fe(se.create).current;return Qr(e.disposeEffect),e}function no(e){return e==null?e:"current"in e?e.current:e}function ro(e,t=!1,n=!0){const r=to();return K((o,s=null)=>{r.cancel();const i=no(e);if(i==null)return;const c=i,a=()=>{xn.flushSync(o)};if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){o();return}function l(){Promise.all(c.getAnimations().map(u=>u.finished)).then(()=>{s!=null&&s.aborted||a()}).catch(()=>{if(n){s!=null&&s.aborted||a();return}const u=c.getAnimations();!(s!=null&&s.aborted)&&u.length>0&&u.some(g=>g.pending||g.playState!=="finished")&&l()})}if(t){const u=ye.startingStyle;if(!c.hasAttribute(u)){r.request(l);return}const g=new MutationObserver(()=>{c.hasAttribute(u)||(g.disconnect(),l())});g.observe(c,{attributes:!0,attributeFilter:[u]}),s==null||s.addEventListener("abort",()=>g.disconnect(),{once:!0});return}r.request(l)})}function oo(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,s=K(o),i=ro(r,n,!1);d.useEffect(()=>{if(!t)return;const c=new AbortController;return i(s,c.signal),()=>{c.abort()}},[t,n,s,i])}function so(e,t=!1,n=!1){const[r,o]=d.useState(e&&t?"idle":void 0),[s,i]=d.useState(e);return e&&!s&&(i(!0),o("starting")),!e&&s&&r!=="ending"&&!n&&o("ending"),!e&&!s&&r==="ending"&&o(void 0),H(()=>{if(!e&&s&&r!=="ending"&&n){const c=se.request(()=>{o("ending")});return()=>{se.cancel(c)}}},[e,s,r,n]),H(()=>{if(!e||t)return;const c=se.request(()=>{o(void 0)});return()=>{se.cancel(c)}},[t,e]),H(()=>{if(!e||!t)return;e&&s&&r!=="idle"&&o("starting");const c=se.request(()=>{o("idle")});return()=>{se.cancel(c)}},[t,e,s,r]),{mounted:s,setMounted:i,transitionStatus:r}}let io=(function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e[e.startingStyle=ye.startingStyle]="startingStyle",e[e.endingStyle=ye.endingStyle]="endingStyle",e})({});const ao={...Ve,...Zr},un=d.forwardRef(function(t,n){const{className:r,value:o,render:s,keepMounted:i=!1,style:c,...a}=t,{value:l,getTabIdByPanelValue:u,orientation:g,tabActivationDirection:A,registerMountedTabPanel:T,unregisterMountedTabPanel:p}=at(),m=on(),y=d.useMemo(()=>({id:m,value:o}),[m,o]),{ref:E,index:w}=ln({metadata:y}),I=o===l,{mounted:f,transitionStatus:N,setMounted:z}=so(I),D=!f,x=u(o),O={hidden:D,orientation:g,tabActivationDirection:A,transitionStatus:N},b=d.useRef(null),R=De("div",t,{state:O,ref:[n,E,b],props:[{"aria-labelledby":x,hidden:D,id:m,role:"tabpanel",tabIndex:I?0:-1,inert:Yr(!I),[io.index]:w},a],stateAttributesMapping:ao});return oo({open:I,ref:b,onComplete(){I||z(!1)}}),H(()=>{if(!(D&&!i)&&m!=null)return T(o,m),()=>{p(o,m)}},[D,i,o,m,T,p]),i||f?R:null});process.env.NODE_ENV!=="production"&&(un.displayName="TabsPanel");function lo(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const ve="ArrowUp",xe="ArrowDown",_e="ArrowLeft",Le="ArrowRight",je="Home",Be="End",dn=new Set([_e,Le]),co=new Set([_e,Le,je,Be]),fn=new Set([ve,xe]),uo=new Set([ve,xe,je,Be]),pn=new Set([...dn,...fn]),fo=new Set([...pn,je,Be]),po="Shift",mo="Control",go="Alt",bo="Meta",ho=new Set([po,mo,go,bo]);function vo(e){return ct(e)&&e.tagName==="INPUT"}function St(e){return!!(vo(e)&&e.selectionStart!=null||ct(e)&&e.tagName==="TEXTAREA")}function Mt(e,t,n,r){if(!e||!t||!t.scrollTo)return;let o=e.scrollLeft,s=e.scrollTop;const i=e.clientWidth<e.scrollWidth,c=e.clientHeight<e.scrollHeight;if(i&&r!=="vertical"){const a=At(e,t,"left"),l=Ce(e),u=Ce(t);n==="ltr"&&(a+t.offsetWidth+u.scrollMarginRight>e.scrollLeft+e.clientWidth-l.scrollPaddingRight?o=a+t.offsetWidth+u.scrollMarginRight-e.clientWidth+l.scrollPaddingRight:a-u.scrollMarginLeft<e.scrollLeft+l.scrollPaddingLeft&&(o=a-u.scrollMarginLeft-l.scrollPaddingLeft)),n==="rtl"&&(a-u.scrollMarginRight<e.scrollLeft+l.scrollPaddingLeft?o=a-u.scrollMarginLeft-l.scrollPaddingLeft:a+t.offsetWidth+u.scrollMarginRight>e.scrollLeft+e.clientWidth-l.scrollPaddingRight&&(o=a+t.offsetWidth+u.scrollMarginRight-e.clientWidth+l.scrollPaddingRight))}if(c&&r!=="horizontal"){const a=At(e,t,"top"),l=Ce(e),u=Ce(t);a-u.scrollMarginTop<e.scrollTop+l.scrollPaddingTop?s=a-u.scrollMarginTop-l.scrollPaddingTop:a+t.offsetHeight+u.scrollMarginBottom>e.scrollTop+e.clientHeight-l.scrollPaddingBottom&&(s=a+t.offsetHeight+u.scrollMarginBottom-e.clientHeight+l.scrollPaddingBottom)}e.scrollTo({left:o,top:s,behavior:"auto"})}function At(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);)t=t.offsetParent;return o}function Ce(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}const xo=[];function yo(e){const{loopFocus:t=!0,orientation:n="both",grid:r,onLoop:o,direction:s,highlightedIndex:i,onHighlightedIndexChange:c,rootRef:a,enableHomeAndEndKeys:l=!1,stopEventPropagation:u=!1,disabledIndices:g,modifierKeys:A=xo}=e,[T,p]=d.useState(0),m=r!=null,y=d.useRef(null),E=Ae(y,a),w=d.useRef([]),I=d.useRef(!1),f=i??T,N=K((b,R=!1)=>{if((c??p)(b),R){const C=w.current[b];Mt(y.current,C,s,n)}}),z=K(b=>{if(b.size===0||I.current)return;I.current=!0;const R=Array.from(b.keys()),C=R.find(F=>F==null?void 0:F.hasAttribute(an))??null,B=C?R.indexOf(C):-1;if(B!==-1)N(B);else if(et(R,f,g)){const F=he(R,{disabledIndices:g});Ge(R,F)||N(F)}Mt(y.current,C,s,n)});H(()=>{if(g==null||i!=null||!I.current)return;const b=w.current;if(et(b,f,g)){const R=he(b,{disabledIndices:g});Ge(b,R)||N(R)}},[g,i,f,w,N]);const D=K((b,R,C)=>o?o(b,R,C,w):C),x=K(b=>{const R=l?fo:pn;if(!R.has(b.key)||wo(b,A)||!y.current)return;const B=s==="rtl",F=B?_e:Le,q={horizontal:F,vertical:xe,both:F}[n],V=B?Le:_e,X={horizontal:V,vertical:ve,both:V}[n],k=Ct(b.nativeEvent);if(k!=null&&St(k)&&!lo(k)){const Z=k.selectionStart,ae=k.selectionEnd,U=k.value??"";if(Z==null||b.shiftKey||Z!==ae||b.key!==X&&Z<U.length||b.key!==q&&Z>0)return}let L=f;const ee=Wr(w,g),J=Gr(w,g);r!=null&&(L=r({disabledIndices:g,elementsRef:w,event:b,highlightedIndex:f,loopFocus:t,maxIndex:J,minIndex:ee,onLoop:D,orientation:n,rtl:B}));const te={horizontal:[F],vertical:[xe],both:[F,xe]}[n],S={horizontal:[V],vertical:[ve],both:[V,ve]}[n],j=m?R:{horizontal:l?co:dn,vertical:l?uo:fn,both:R}[n];l&&(b.key===je?L=ee:b.key===Be&&(L=J)),L===f&&(te.includes(b.key)||S.includes(b.key))&&(t&&L===J&&te.includes(b.key)?(L=ee,o&&(L=o(b,f,L,w))):t&&L===ee&&S.includes(b.key)?(L=J,o&&(L=o(b,f,L,w))):L=he(w.current,{startingIndex:L,decrement:S.includes(b.key),disabledIndices:g})),L!==f&&!Ge(w.current,L)&&(u&&b.stopPropagation(),j.has(b.key)&&b.preventDefault(),N(L,!0),queueMicrotask(()=>{var Z;(Z=w.current[L])==null||Z.focus()}))});return{props:{ref:E,onFocus(b){const R=y.current,C=Ct(b.nativeEvent);!R||C==null||!St(C)||C.setSelectionRange(0,C.value.length??0)},onKeyDown:x},highlightedIndex:f,onHighlightedIndexChange:N,elementsRef:w,disabledIndices:g,onMapChange:z,relayKeyboardEvent:x}}function wo(e,t){for(const n of ho.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}const mn=d.createContext(void 0);process.env.NODE_ENV!=="production"&&(mn.displayName="DirectionContext");function ko(){const e=d.useContext(mn);return(e==null?void 0:e.direction)??"ltr"}function Eo(e){const{render:t,className:n,style:r,refs:o=Je,props:s=Je,state:i=ue,stateAttributesMapping:c,highlightedIndex:a,onHighlightedIndexChange:l,orientation:u,grid:g,loopFocus:A,onLoop:T,enableHomeAndEndKeys:p,onMapChange:m,stopEventPropagation:y=!0,rootRef:E,disabledIndices:w,modifierKeys:I,highlightItemOnHover:f=!1,tag:N="div",...z}=e,D=ko(),{props:x,highlightedIndex:O,onHighlightedIndexChange:b,elementsRef:R,onMapChange:C,relayKeyboardEvent:B}=yo({grid:g,loopFocus:A,onLoop:T,orientation:u,highlightedIndex:a,onHighlightedIndexChange:l,rootRef:E,stopEventPropagation:y,enableHomeAndEndKeys:p,direction:D,disabledIndices:w,modifierKeys:I}),F=De(N,e,{state:i,ref:o,props:[x,...s,z],stateAttributesMapping:c}),q=d.useMemo(()=>({highlightedIndex:O,onHighlightedIndexChange:b,highlightItemOnHover:f,relayKeyboardEvent:B}),[O,b,f,B]);return W.jsx(ut.Provider,{value:q,children:W.jsx(tn,{elementsRef:R,onMapChange:V=>{m==null||m(V),C(V)},children:F})})}const gn=d.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:o,loopFocus:s=!0,render:i,style:c,...a}=t,{onValueChange:l,orientation:u,value:g,setTabMap:A,tabActivationDirection:T}=at(),[p,m]=d.useState(0),[y,E]=d.useState(null),w=d.useRef(new Set),I=d.useRef(new Set),f=d.useRef(null);H(()=>{if(typeof ResizeObserver>"u")return;const R=new ResizeObserver(()=>{w.current.forEach(C=>{C()})});return f.current=R,y&&R.observe(y),I.current.forEach(C=>{R.observe(C)}),()=>{R.disconnect(),f.current=null}},[y]);const N=K(R=>(w.current.add(R),()=>{w.current.delete(R)})),z=K(R=>{var C;return I.current.add(R),(C=f.current)==null||C.observe(R),()=>{var B;I.current.delete(R),(B=f.current)==null||B.unobserve(R)}}),D=K((R,C)=>{R!==g&&l(R,C)}),x={orientation:u,tabActivationDirection:T},O={"aria-orientation":u==="vertical"?"vertical":void 0,role:"tablist"},b=d.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:p,registerIndicatorUpdateListener:N,registerTabResizeObserverElement:z,onTabActivation:D,setHighlightedTabIndex:m,tabsListElement:y}),[r,p,N,z,D,m,y]);return W.jsx(dt.Provider,{value:b,children:W.jsx(Eo,{render:i,className:o,style:c,state:x,refs:[n,E],props:[O,a],stateAttributesMapping:Ve,highlightedIndex:p,enableHomeAndEndKeys:!0,loopFocus:s,orientation:u,onHighlightedIndexChange:m,onMapChange:A,disabledIndices:Je})})});process.env.NODE_ENV!=="production"&&(gn.displayName="TabsList");const Pt=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ot=zt,Ro=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ot(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(l=>{const u=n==null?void 0:n[l],g=s==null?void 0:s[l];if(u===null)return null;const A=Pt(u)||Pt(g);return o[l][A]}),c=n&&Object.entries(n).reduce((l,u)=>{let[g,A]=u;return A===void 0||(l[g]=A),l},{}),a=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,u)=>{let{class:g,className:A,...T}=u;return Object.entries(T).every(p=>{let[m,y]=p;return Array.isArray(y)?y.includes({...s,...c}[m]):{...s,...c}[m]===y})?[...l,g,A]:l},[]);return Ot(e,i,a,n==null?void 0:n.class,n==null?void 0:n.className)};function Io({className:e,orientation:t="horizontal",...n}){return W.jsx(nn,{orientation:t,"data-slot":"tabs",className:Y("group/tabs flex h-full min-h-0 flex-col gap-2",e),...n})}const To=Ro("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function Co({className:e,variant:t="default",...n}){return W.jsx(gn,{"data-slot":"tabs-list","data-variant":t,className:Y(To({variant:t}),e),...n})}function No({className:e,style:t,activeStyle:n,...r}){return W.jsx(cn,{"data-slot":"tabs-trigger",className:Y("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all bg-transparent group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),style:n??t,...r})}function So({className:e,...t}){return W.jsx(un,{"data-slot":"tabs-content",className:Y("flex-1 text-sm outline-none",e),...t})}const Mo=({tabs:e,defaultValue:t,value:n,onValueChange:r,className:o,showTabNumbers:s=!0,variant:i="default"})=>{var m;const c=n||t||((m=e[0])==null?void 0:m.id),[a,l]=Se.useState(c),u=n??a,g=y=>{n||l(y),r==null||r(y)},A={default:Y("group relative px-6 py-3 text-sm font-medium transition-all duration-300 ease-out","text-muted-foreground hover:text-foreground","data-[state=active]:text-foreground data-[state=active]:font-semibold","after:absolute after:bottom-0 after:left-0 after:right-0 after:h-0.5 after:bg-gradient-to-r after:from-blue-500 after:via-purple-500 after:to-pink-500","after:scale-x-0 after:transition-transform after:duration-300 data-[state=active]:after:scale-x-100","disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:text-muted-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-blue-500"),gradient:Y("group relative px-6 py-3 text-sm font-medium transition-all duration-300 ease-out","text-muted-foreground/80 hover:text-muted-foreground","data-[state=active]:text-white data-[state=active]:font-semibold","data-[state=active]:bg-gradient-to-r data-[state=active]:from-blue-600 data-[state=active]:via-purple-600 data-[state=active]:to-pink-600","data-[state=active]:shadow-lg data-[state=active]:shadow-purple-500/30","rounded-lg mx-1 data-[state=active]:rounded-lg","disabled:opacity-50 disabled:cursor-not-allowed","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-blue-500"),minimal:Y("group relative px-4 py-2 text-sm font-medium transition-all duration-300","text-muted-foreground hover:text-foreground hover:bg-secondary/50 rounded-md","data-[state=active]:text-foreground data-[state=active]:bg-secondary","data-[state=active]:font-semibold","disabled:opacity-50 disabled:cursor-not-allowed","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-blue-500"),outline:Y("group relative px-4 py-3 text-sm font-semibold transition-colors duration-200 ease-out","text-foreground/70 hover:text-foreground","disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:text-foreground/70","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-emerald-500")},T={default:Y("bg-blue-100/60 text-blue-600","group-data-[state=active]:bg-blue-500 group-data-[state=active]:text-white"),gradient:Y("text-white/60","group-data-[state=active]:bg-white/20 group-data-[state=active]:text-white"),minimal:"bg-secondary/60 text-secondary-foreground",outline:Y("border border-border text-muted-foreground bg-transparent rounded-[6px]","group-data-[state=active]:border-[#059669] group-data-[state=active]:text-[#059669]")},p={borderTopWidth:3,borderRightWidth:1,borderBottomWidth:0,borderLeftWidth:1,borderStyle:"solid",borderColor:"#059669",color:"#059669",fontWeight:700};return W.jsxs(Io,{value:u,onValueChange:g,defaultValue:t,className:Y("w-full h-full min-h-0 flex flex-col",o),children:[W.jsx(Co,{className:Y("inline-flex gap-1 rounded-none bg-transparent h-auto p-0 w-full border-b shrink-0",i==="default"&&"border-b border-border",i==="gradient"&&"border-b border-border/30 gap-2 bg-background/50 px-2 py-2 rounded-lg",i==="minimal"&&"border-b border-border/50 gap-0",i==="outline"&&"border-b border-border/50 gap-0 justify-start"),children:e.map((y,E)=>W.jsx(No,{value:y.id,disabled:y.disabled,className:Y(A[i],i==="outline"&&"flex-none"),activeStyle:i==="outline"&&u===y.id?p:void 0,children:W.jsxs("div",{className:"flex items-center gap-2",children:[s&&W.jsx("div",{className:Y("inline-flex items-center justify-center w-6 h-6 text-xs font-medium leading-1.5 transition-all duration-200",i!=="outline"&&"rounded-full",T[i]),children:E+1}),y.icon&&W.jsx("span",{className:"inline-flex",children:y.icon}),W.jsx("div",{children:y.label})]})},y.id))}),W.jsx("div",{className:"relative flex-1 min-h-0 overflow-hidden",children:e.map(y=>W.jsx(So,{value:y.id,className:Y("mt-0 h-full min-h-0 overflow-y-auto animate-in fade-in-50 duration-300 data-[state=inactive]:hidden"),children:y.content},y.id))})]})};exports.CustomTabs=Mo;exports.cn=Y;