@nicorp/nui 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +10 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +43 -4
- package/dist/index.es.js +4760 -4652
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),j=require("react"),Gr=require("@radix-ui/react-slot"),fi=require("@radix-ui/react-label"),mi=require("@radix-ui/react-separator"),gi=require("@radix-ui/react-avatar"),pi=require("@radix-ui/react-checkbox"),A=require("lucide-react"),hi=require("@radix-ui/react-switch"),xi=require("@radix-ui/react-select"),vi=require("@radix-ui/react-radio-group"),wi=require("@radix-ui/react-slider"),bi=require("@radix-ui/react-toggle"),yi=require("@radix-ui/react-toggle-group"),ve=require("date-fns"),Ci=require("@radix-ui/react-popover"),Ni=require("@radix-ui/react-aspect-ratio"),ji=require("@radix-ui/react-collapsible"),Si=require("@radix-ui/react-scroll-area"),ki=require("@radix-ui/react-tabs"),Ri=require("@radix-ui/react-accordion"),_i=require("@radix-ui/react-dialog"),Mi=require("@radix-ui/react-dropdown-menu"),Ii=require("@radix-ui/react-tooltip"),Me=require("cmdk"),Pi=require("@radix-ui/react-alert-dialog"),Li=require("@radix-ui/react-progress"),Di=require("react-dom"),Ti=require("@radix-ui/react-navigation-menu"),Fi=require("@radix-ui/react-context-menu"),Ai=require("@radix-ui/react-hover-card"),Vn=require("recharts");function re(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 w=re(j),qr=re(fi),Wr=re(mi),mt=re(gi),kn=re(pi),Rn=re(hi),ie=re(xi),Mt=re(vi),Nt=re(wi),Ur=re(bi),on=re(yi),It=re(Ci),Ei=re(Ni),$n=re(ji),ot=re(Si),it=re(ki),st=re(Ri),ee=re(_i),te=re(Mi),Ft=re(Ii),ke=re(Pi),_n=re(Li),Ie=re(Ti),ne=re(Fi),sn=re(Ai);function Yr(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=Yr(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Xr(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Yr(e))&&(r&&(r+=" "),r+=t);return r}const Vi=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},$i=(e,t)=>({classGroupId:e,validator:t}),Kr=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),en="-",jr=[],zi="arbitrary..",Bi=e=>{const t=Hi(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Oi(i);const l=i.split(en),c=l[0]===""&&l.length>1?1:0;return Zr(l,c,t)},getConflictingClassGroupIds:(i,l)=>{if(l){const c=r[i],d=n[i];return c?d?Vi(d,c):c:d||jr}return n[i]||jr}}},Zr=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const s=e[t],a=n.nextPart.get(s);if(a){const d=Zr(e,t+1,a);if(d)return d}const i=n.validators;if(i===null)return;const l=t===0?e.join(en):e.slice(t).join(en),c=i.length;for(let d=0;d<c;d++){const g=i[d];if(g.validator(l))return g.classGroupId}},Oi=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?zi+r:void 0})(),Hi=e=>{const{theme:t,classGroups:n}=e;return Gi(n,t)},Gi=(e,t)=>{const n=Kr();for(const r in e){const s=e[r];zn(s,n,r,t)}return n},zn=(e,t,n,r)=>{const s=e.length;for(let a=0;a<s;a++){const i=e[a];qi(i,t,n,r)}},qi=(e,t,n,r)=>{if(typeof e=="string"){Wi(e,t,n);return}if(typeof e=="function"){Ui(e,t,n,r);return}Yi(e,t,n,r)},Wi=(e,t,n)=>{const r=e===""?t:Jr(t,e);r.classGroupId=n},Ui=(e,t,n,r)=>{if(Xi(e)){zn(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push($i(n,e))},Yi=(e,t,n,r)=>{const s=Object.entries(e),a=s.length;for(let i=0;i<a;i++){const[l,c]=s[i];zn(c,Jr(t,l),n,r)}},Jr=(e,t)=>{let n=e;const r=t.split(en),s=r.length;for(let a=0;a<s;a++){const i=r[a];let l=n.nextPart.get(i);l||(l=Kr(),n.nextPart.set(i,l)),n=l}return n},Xi=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Ki=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const s=(a,i)=>{n[a]=i,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(a){let i=n[a];if(i!==void 0)return i;if((i=r[a])!==void 0)return s(a,i),i},set(a,i){a in n?n[a]=i:s(a,i)}}},Mn="!",Sr=":",Zi=[],kr=(e,t,n,r,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:s}),Ji=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=s=>{const a=[];let i=0,l=0,c=0,d;const g=s.length;for(let v=0;v<g;v++){const b=s[v];if(i===0&&l===0){if(b===Sr){a.push(s.slice(c,v)),c=v+1;continue}if(b==="/"){d=v;continue}}b==="["?i++:b==="]"?i--:b==="("?l++:b===")"&&l--}const u=a.length===0?s:s.slice(c);let f=u,m=!1;u.endsWith(Mn)?(f=u.slice(0,-1),m=!0):u.startsWith(Mn)&&(f=u.slice(1),m=!0);const p=d&&d>c?d-c:void 0;return kr(a,m,f,p)};if(t){const s=t+Sr,a=r;r=i=>i.startsWith(s)?a(i.slice(s.length)):kr(Zi,!1,i,void 0,!0)}if(n){const s=r;r=a=>n({className:a,parseClassName:s})}return r},Qi=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let s=[];for(let a=0;a<n.length;a++){const i=n[a],l=i[0]==="[",c=t.has(i);l||c?(s.length>0&&(s.sort(),r.push(...s),s=[]),r.push(i)):s.push(i)}return s.length>0&&(s.sort(),r.push(...s)),r}},el=e=>({cache:Ki(e.cacheSize),parseClassName:Ji(e),sortModifiers:Qi(e),...Bi(e)}),tl=/\s+/,nl=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:a}=t,i=[],l=e.trim().split(tl);let c="";for(let d=l.length-1;d>=0;d-=1){const g=l[d],{isExternal:u,modifiers:f,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:v}=n(g);if(u){c=g+(c.length>0?" "+c:c);continue}let b=!!v,h=r(b?p.substring(0,v):p);if(!h){if(!b){c=g+(c.length>0?" "+c:c);continue}if(h=r(p),!h){c=g+(c.length>0?" "+c:c);continue}b=!1}const y=f.length===0?"":f.length===1?f[0]:a(f).join(":"),C=m?y+Mn:y,S=C+h;if(i.indexOf(S)>-1)continue;i.push(S);const L=s(h,b);for(let D=0;D<L.length;++D){const k=L[D];i.push(C+k)}c=g+(c.length>0?" "+c:c)}return c},rl=(...e)=>{let t=0,n,r,s="";for(;t<e.length;)(n=e[t++])&&(r=Qr(n))&&(s&&(s+=" "),s+=r);return s},Qr=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Qr(e[r]))&&(n&&(n+=" "),n+=t);return n},ol=(e,...t)=>{let n,r,s,a;const i=c=>{const d=t.reduce((g,u)=>u(g),e());return n=el(d),r=n.cache.get,s=n.cache.set,a=l,l(c)},l=c=>{const d=r(c);if(d)return d;const g=nl(c,n);return s(c,g),g};return a=i,(...c)=>a(rl(...c))},sl=[],he=e=>{const t=n=>n[e]||sl;return t.isThemeGetter=!0,t},eo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,to=/^\((?:(\w[\w-]*):)?(.+)\)$/i,al=/^\d+\/\d+$/,il=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ll=/\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$/,dl=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,cl=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ul=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ft=e=>al.test(e),W=e=>!!e&&!Number.isNaN(Number(e)),Ye=e=>!!e&&Number.isInteger(Number(e)),hn=e=>e.endsWith("%")&&W(e.slice(0,-1)),We=e=>il.test(e),fl=()=>!0,ml=e=>ll.test(e)&&!dl.test(e),no=()=>!1,gl=e=>cl.test(e),pl=e=>ul.test(e),hl=e=>!I(e)&&!P(e),xl=e=>gt(e,so,no),I=e=>eo.test(e),nt=e=>gt(e,ao,ml),xn=e=>gt(e,Cl,W),Rr=e=>gt(e,ro,no),vl=e=>gt(e,oo,pl),Ut=e=>gt(e,io,gl),P=e=>to.test(e),yt=e=>pt(e,ao),wl=e=>pt(e,Nl),_r=e=>pt(e,ro),bl=e=>pt(e,so),yl=e=>pt(e,oo),Yt=e=>pt(e,io,!0),gt=(e,t,n)=>{const r=eo.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},pt=(e,t,n=!1)=>{const r=to.exec(e);return r?r[1]?t(r[1]):n:!1},ro=e=>e==="position"||e==="percentage",oo=e=>e==="image"||e==="url",so=e=>e==="length"||e==="size"||e==="bg-size",ao=e=>e==="length",Cl=e=>e==="number",Nl=e=>e==="family-name",io=e=>e==="shadow",jl=()=>{const e=he("color"),t=he("font"),n=he("text"),r=he("font-weight"),s=he("tracking"),a=he("leading"),i=he("breakpoint"),l=he("container"),c=he("spacing"),d=he("radius"),g=he("shadow"),u=he("inset-shadow"),f=he("text-shadow"),m=he("drop-shadow"),p=he("blur"),v=he("perspective"),b=he("aspect"),h=he("ease"),y=he("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...S(),P,I],D=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],N=()=>[P,I,c],T=()=>[ft,"full","auto",...N()],G=()=>[Ye,"none","subgrid",P,I],E=()=>["auto",{span:["full",Ye,P,I]},Ye,P,I],Z=()=>[Ye,"auto",P,I],J=()=>["auto","min","max","fr",P,I],R=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],X=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...N()],U=()=>[ft,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],_=()=>[e,P,I],fe=()=>[...S(),_r,Rr,{position:[P,I]}],me=()=>["no-repeat",{repeat:["","x","y","space","round"]}],le=()=>["auto","cover","contain",bl,xl,{size:[P,I]}],Ne=()=>[hn,yt,nt],F=()=>["","none","full",d,P,I],B=()=>["",W,yt,nt],Y=()=>["solid","dashed","dotted","double"],de=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[W,hn,_r,Rr],O=()=>["","none",p,P,I],ce=()=>["none",W,P,I],ae=()=>["none",W,P,I],K=()=>[W,P,I],M=()=>[ft,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[We],breakpoint:[We],color:[fl],container:[We],"drop-shadow":[We],ease:["in","out","in-out"],font:[hl],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[We],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[We],shadow:[We],spacing:["px",W],text:[We],"text-shadow":[We],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ft,I,P,b]}],container:["container"],columns:[{columns:[W,I,P,l]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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:L()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[Ye,"auto",P,I]}],basis:[{basis:[ft,"full","auto",l,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[W,ft,"auto","initial","none",I]}],grow:[{grow:["",W,P,I]}],shrink:[{shrink:["",W,P,I]}],order:[{order:[Ye,"first","last","none",P,I]}],"grid-cols":[{"grid-cols":G()}],"col-start-end":[{col:E()}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":G()}],"row-start-end":[{row:E()}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":J()}],"auto-rows":[{"auto-rows":J()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...R(),"normal"]}],"justify-items":[{"justify-items":[...X(),"normal"]}],"justify-self":[{"justify-self":["auto",...X()]}],"align-content":[{content:["normal",...R()]}],"align-items":[{items:[...X(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...X(),{baseline:["","last"]}]}],"place-content":[{"place-content":R()}],"place-items":[{"place-items":[...X(),"baseline"]}],"place-self":[{"place-self":["auto",...X()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],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":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],w:[{w:[l,"screen",...U()]}],"min-w":[{"min-w":[l,"screen","none",...U()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",n,yt,nt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,P,xn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",hn,I]}],"font-family":[{font:[wl,I,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:[s,P,I]}],"line-clamp":[{"line-clamp":[W,"none",P,xn]}],leading:[{leading:[a,...N()]}],"list-image":[{"list-image":["none",P,I]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",P,I]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:_()}],"text-color":[{text:_()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:[W,"from-font","auto",P,nt]}],"text-decoration-color":[{decoration:_()}],"underline-offset":[{"underline-offset":[W,"auto",P,I]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",P,I]}],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",P,I]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:fe()}],"bg-repeat":[{bg:me()}],"bg-size":[{bg:le()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ye,P,I],radial:["",P,I],conic:[Ye,P,I]},yl,vl]}],"bg-color":[{bg:_()}],"gradient-from-pos":[{from:Ne()}],"gradient-via-pos":[{via:Ne()}],"gradient-to-pos":[{to:Ne()}],"gradient-from":[{from:_()}],"gradient-via":[{via:_()}],"gradient-to":[{to:_()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":B()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Y(),"hidden","none"]}],"divide-style":[{divide:[...Y(),"hidden","none"]}],"border-color":[{border:_()}],"border-color-x":[{"border-x":_()}],"border-color-y":[{"border-y":_()}],"border-color-s":[{"border-s":_()}],"border-color-e":[{"border-e":_()}],"border-color-t":[{"border-t":_()}],"border-color-r":[{"border-r":_()}],"border-color-b":[{"border-b":_()}],"border-color-l":[{"border-l":_()}],"divide-color":[{divide:_()}],"outline-style":[{outline:[...Y(),"none","hidden"]}],"outline-offset":[{"outline-offset":[W,P,I]}],"outline-w":[{outline:["",W,yt,nt]}],"outline-color":[{outline:_()}],shadow:[{shadow:["","none",g,Yt,Ut]}],"shadow-color":[{shadow:_()}],"inset-shadow":[{"inset-shadow":["none",u,Yt,Ut]}],"inset-shadow-color":[{"inset-shadow":_()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:_()}],"ring-offset-w":[{"ring-offset":[W,nt]}],"ring-offset-color":[{"ring-offset":_()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":_()}],"text-shadow":[{"text-shadow":["none",f,Yt,Ut]}],"text-shadow-color":[{"text-shadow":_()}],opacity:[{opacity:[W,P,I]}],"mix-blend":[{"mix-blend":[...de(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":de()}],"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":[W]}],"mask-image-linear-from-pos":[{"mask-linear-from":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":_()}],"mask-image-linear-to-color":[{"mask-linear-to":_()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":_()}],"mask-image-t-to-color":[{"mask-t-to":_()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":_()}],"mask-image-r-to-color":[{"mask-r-to":_()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":_()}],"mask-image-b-to-color":[{"mask-b-to":_()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":_()}],"mask-image-l-to-color":[{"mask-l-to":_()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":_()}],"mask-image-x-to-color":[{"mask-x-to":_()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":_()}],"mask-image-y-to-color":[{"mask-y-to":_()}],"mask-image-radial":[{"mask-radial":[P,I]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":_()}],"mask-image-radial-to-color":[{"mask-radial-to":_()}],"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":S()}],"mask-image-conic-pos":[{"mask-conic":[W]}],"mask-image-conic-from-pos":[{"mask-conic-from":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":_()}],"mask-image-conic-to-color":[{"mask-conic-to":_()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:fe()}],"mask-repeat":[{mask:me()}],"mask-size":[{mask:le()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",P,I]}],filter:[{filter:["","none",P,I]}],blur:[{blur:O()}],brightness:[{brightness:[W,P,I]}],contrast:[{contrast:[W,P,I]}],"drop-shadow":[{"drop-shadow":["","none",m,Yt,Ut]}],"drop-shadow-color":[{"drop-shadow":_()}],grayscale:[{grayscale:["",W,P,I]}],"hue-rotate":[{"hue-rotate":[W,P,I]}],invert:[{invert:["",W,P,I]}],saturate:[{saturate:[W,P,I]}],sepia:[{sepia:["",W,P,I]}],"backdrop-filter":[{"backdrop-filter":["","none",P,I]}],"backdrop-blur":[{"backdrop-blur":O()}],"backdrop-brightness":[{"backdrop-brightness":[W,P,I]}],"backdrop-contrast":[{"backdrop-contrast":[W,P,I]}],"backdrop-grayscale":[{"backdrop-grayscale":["",W,P,I]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[W,P,I]}],"backdrop-invert":[{"backdrop-invert":["",W,P,I]}],"backdrop-opacity":[{"backdrop-opacity":[W,P,I]}],"backdrop-saturate":[{"backdrop-saturate":[W,P,I]}],"backdrop-sepia":[{"backdrop-sepia":["",W,P,I]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",P,I]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[W,"initial",P,I]}],ease:[{ease:["linear","initial",h,P,I]}],delay:[{delay:[W,P,I]}],animate:[{animate:["none",y,P,I]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,P,I]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:ce()}],"rotate-x":[{"rotate-x":ce()}],"rotate-y":[{"rotate-y":ce()}],"rotate-z":[{"rotate-z":ce()}],scale:[{scale:ae()}],"scale-x":[{"scale-x":ae()}],"scale-y":[{"scale-y":ae()}],"scale-z":[{"scale-z":ae()}],"scale-3d":["scale-3d"],skew:[{skew:K()}],"skew-x":[{"skew-x":K()}],"skew-y":[{"skew-y":K()}],transform:[{transform:[P,I,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:M()}],"translate-x":[{"translate-x":M()}],"translate-y":[{"translate-y":M()}],"translate-z":[{"translate-z":M()}],"translate-none":["translate-none"],accent:[{accent:_()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:_()}],"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",P,I]}],"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":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",P,I]}],fill:[{fill:["none",..._()]}],"stroke-w":[{stroke:[W,yt,nt,xn]}],stroke:[{stroke:["none",..._()]}],"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"]}},Sl=ol(jl);function x(...e){return Sl(Xr(e))}const Mr=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ir=Xr,Fe=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ir(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:a}=t,i=Object.keys(s).map(d=>{const g=n==null?void 0:n[d],u=a==null?void 0:a[d];if(g===null)return null;const f=Mr(g)||Mr(u);return s[d][f]}),l=n&&Object.entries(n).reduce((d,g)=>{let[u,f]=g;return f===void 0||(d[u]=f),d},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,g)=>{let{class:u,className:f,...m}=g;return Object.entries(m).every(p=>{let[v,b]=p;return Array.isArray(b)?b.includes({...a,...l}[v]):{...a,...l}[v]===b})?[...d,u,f]:d},[]);return Ir(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},At=Fe("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",brand:"bg-gradient-to-r from-violet-600 to-indigo-600 text-white hover:from-violet-500 hover:to-indigo-500 shadow-lg shadow-violet-500/25 hover:shadow-violet-500/40 hover:scale-[1.02] active:scale-[0.98]",glow:"bg-primary text-primary-foreground shadow-[0_0_20px_rgba(139,92,246,0.5)] hover:shadow-[0_0_30px_rgba(139,92,246,0.7)] hover:scale-[1.02] active:scale-[0.98]"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",xl:"h-12 rounded-lg px-10 text-base",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),ge=w.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},a)=>{const i=r?Gr.Slot:"button";return o.jsx(i,{className:x(At({variant:t,size:n,className:e})),ref:a,...s})});ge.displayName="Button";const lo=Fe("flex w-full rounded-lg text-sm transition-all duration-200 file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"h-10 border border-input bg-background px-3 py-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",filled:"h-10 border-0 bg-muted/50 px-3 py-2 focus-visible:outline-none focus-visible:bg-muted focus-visible:ring-2 focus-visible:ring-ring",glow:"h-10 border border-input bg-background px-3 py-2 ring-offset-background focus-visible:outline-none focus-visible:border-violet-500/50 focus-visible:ring-2 focus-visible:ring-violet-500/30 focus-visible:shadow-[0_0_15px_rgba(139,92,246,0.3)]",ghost:"h-10 border-0 bg-transparent px-3 py-2 focus-visible:outline-none focus-visible:bg-muted/30"},inputSize:{default:"h-10",sm:"h-9 text-xs",lg:"h-12 text-base"}},defaultVariants:{variant:"default",inputSize:"default"}}),Je=w.forwardRef(({className:e,type:t,variant:n,inputSize:r,...s},a)=>o.jsx("input",{type:t,className:x(lo({variant:n,inputSize:r}),e),ref:a,...s}));Je.displayName="Input";const co=w.forwardRef(({className:e,...t},n)=>o.jsx("textarea",{className:x("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));co.displayName="Textarea";const kl=Fe("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),an=w.forwardRef(({className:e,...t},n)=>o.jsx(qr.Root,{ref:n,className:x(kl(),e),...t}));an.displayName=qr.Root.displayName;const uo=Fe("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Bn({className:e,variant:t,...n}){return o.jsx("div",{className:x(uo({variant:t}),e),...n})}const fo=w.forwardRef(({className:e,orientation:t="horizontal",...n},r)=>o.jsx(Wr.Root,{ref:r,decorative:!0,orientation:t,className:x("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));fo.displayName=Wr.Root.displayName;const mo=w.forwardRef(({className:e,...t},n)=>o.jsx(mt.Root,{ref:n,className:x("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));mo.displayName=mt.Root.displayName;const go=w.forwardRef(({className:e,...t},n)=>o.jsx(mt.Image,{ref:n,className:x("aspect-square h-full w-full",e),...t}));go.displayName=mt.Image.displayName;const po=w.forwardRef(({className:e,...t},n)=>o.jsx(mt.Fallback,{ref:n,className:x("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));po.displayName=mt.Fallback.displayName;const ho=w.forwardRef(({className:e,...t},n)=>o.jsx(kn.Root,{ref:n,className:x("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:o.jsx(kn.Indicator,{className:x("flex items-center justify-center text-current"),children:o.jsx(A.Check,{className:"h-4 w-4"})})}));ho.displayName=kn.Root.displayName;const xo=w.forwardRef(({className:e,...t},n)=>o.jsx(Rn.Root,{className:x("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:o.jsx(Rn.Thumb,{className:x("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));xo.displayName=Rn.Root.displayName;const Rl=ie.Root,_l=ie.Group,Ml=ie.Value,vo=w.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(ie.Trigger,{ref:r,className:x("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,o.jsx(ie.Icon,{asChild:!0,children:o.jsx(A.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));vo.displayName=ie.Trigger.displayName;const On=w.forwardRef(({className:e,...t},n)=>o.jsx(ie.ScrollUpButton,{ref:n,className:x("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(A.ChevronUp,{className:"h-4 w-4"})}));On.displayName=ie.ScrollUpButton.displayName;const Hn=w.forwardRef(({className:e,...t},n)=>o.jsx(ie.ScrollDownButton,{ref:n,className:x("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(A.ChevronDown,{className:"h-4 w-4"})}));Hn.displayName=ie.ScrollDownButton.displayName;const wo=w.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>o.jsx(ie.Portal,{children:o.jsxs(ie.Content,{ref:s,className:x("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[o.jsx(On,{}),o.jsx(ie.Viewport,{className:x("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),o.jsx(Hn,{})]})}));wo.displayName=ie.Content.displayName;const bo=w.forwardRef(({className:e,...t},n)=>o.jsx(ie.Label,{ref:n,className:x("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));bo.displayName=ie.Label.displayName;const yo=w.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(ie.Item,{ref:r,className:x("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(ie.ItemIndicator,{children:o.jsx(A.Check,{className:"h-4 w-4"})})}),o.jsx(ie.ItemText,{children:t})]}));yo.displayName=ie.Item.displayName;const Co=w.forwardRef(({className:e,...t},n)=>o.jsx(ie.Separator,{ref:n,className:x("-mx-1 my-1 h-px bg-muted",e),...t}));Co.displayName=ie.Separator.displayName;const No=w.forwardRef(({className:e,...t},n)=>o.jsx(Mt.Root,{className:x("grid gap-2",e),...t,ref:n}));No.displayName=Mt.Root.displayName;const jo=w.forwardRef(({className:e,...t},n)=>o.jsx(Mt.Item,{ref:n,className:x("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:o.jsx(Mt.Indicator,{className:"flex items-center justify-center",children:o.jsx(A.Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})}));jo.displayName=Mt.Item.displayName;const So=w.forwardRef(({className:e,...t},n)=>o.jsxs(Nt.Root,{ref:n,className:x("relative flex w-full touch-none select-none items-center",e),...t,children:[o.jsx(Nt.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:o.jsx(Nt.Range,{className:"absolute h-full bg-primary"})}),o.jsx(Nt.Thumb,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));So.displayName=Nt.Root.displayName;const Gn=Fe("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),ko=w.forwardRef(({className:e,variant:t,size:n,...r},s)=>o.jsx(Ur.Root,{ref:s,className:x(Gn({variant:t,size:n,className:e})),...r}));ko.displayName=Ur.Root.displayName;const Ro=w.forwardRef(({className:e,variant:t,size:n,children:r,...s},a)=>o.jsx(on.Root,{ref:a,className:x("flex items-center justify-center gap-1",e),...s,children:o.jsx(_o.Provider,{value:{variant:t,size:n},children:r})}));Ro.displayName=on.Root.displayName;const _o=w.createContext({size:"default",variant:"default"}),Mo=w.forwardRef(({className:e,children:t,variant:n,size:r,...s},a)=>{const i=w.useContext(_o);return o.jsx(on.Item,{ref:a,className:x(Gn({variant:i.variant||n,size:i.size||r}),e),...s,children:t})});Mo.displayName=on.Item.displayName;function qn({selected:e,onSelect:t,className:n,disabled:r}){const[s,a]=w.useState(()=>e?ve.startOfMonth(e):ve.startOfMonth(new Date)),i=ve.startOfMonth(s),l=ve.endOfMonth(s),c=ve.startOfWeek(i,{weekStartsOn:1}),d=ve.endOfWeek(l,{weekStartsOn:1}),g=ve.eachDayOfInterval({start:c,end:d}),u=["Mo","Tu","We","Th","Fr","Sa","Su"],f=()=>{a(ve.subMonths(s,1))},m=()=>{a(ve.addMonths(s,1))},p=v=>{r!=null&&r(v)||t==null||t(ve.isSameDay(v,e||new Date(0))?void 0:v)};return o.jsxs("div",{className:x("p-4 bg-card rounded-xl border shadow-sm w-[320px]",n),children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsx(ge,{variant:"ghost",size:"icon",onClick:f,className:"h-8 w-8 rounded-full hover:bg-accent",children:o.jsx(A.ChevronLeft,{className:"h-4 w-4"})}),o.jsx("h2",{className:"text-base font-semibold",children:ve.format(s,"MMMM yyyy")}),o.jsx(ge,{variant:"ghost",size:"icon",onClick:m,className:"h-8 w-8 rounded-full hover:bg-accent",children:o.jsx(A.ChevronRight,{className:"h-4 w-4"})})]}),o.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:u.map(v=>o.jsx("div",{className:"h-8 flex items-center justify-center text-xs font-medium text-muted-foreground",children:v},v))}),o.jsx("div",{className:"grid grid-cols-7 gap-1",children:g.map((v,b)=>{const h=ve.isSameMonth(v,s),y=e&&ve.isSameDay(v,e),C=ve.isToday(v),S=r==null?void 0:r(v);return o.jsx("button",{onClick:()=>p(v),disabled:S,className:x("h-10 w-10 rounded-lg text-sm font-medium transition-all duration-150","flex items-center justify-center","hover:bg-accent focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-1",!h&&"text-muted-foreground/40",h&&!y&&"text-foreground hover:text-foreground",y&&"bg-primary text-primary-foreground hover:bg-primary/90 shadow-md",C&&!y&&"bg-accent text-accent-foreground font-bold",S&&"opacity-30 cursor-not-allowed hover:bg-transparent"),children:ve.format(v,"d")},b)})}),o.jsxs("div",{className:"mt-4 pt-3 border-t flex justify-between items-center",children:[o.jsx(ge,{variant:"ghost",size:"sm",onClick:()=>{const v=new Date;a(ve.startOfMonth(v)),t==null||t(v)},className:"text-xs",children:"Today"}),e&&o.jsx("span",{className:"text-xs text-muted-foreground",children:ve.format(e,"MMM d, yyyy")})]})]})}qn.displayName="Calendar";const ht=It.Root,xt=It.Trigger,lt=w.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},s)=>o.jsx(It.Portal,{children:o.jsx(It.Content,{ref:s,align:t,sideOffset:n,className:x("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));lt.displayName=It.Content.displayName;function Il({value:e,onChange:t,placeholder:n="Pick a date",disabled:r,className:s}){const[a,i]=w.useState(!1);return o.jsxs(ht,{open:a,onOpenChange:i,children:[o.jsx(xt,{asChild:!0,children:o.jsxs(ge,{variant:"outline",disabled:r,className:x("w-full justify-start text-left font-normal",!e&&"text-muted-foreground",s),children:[o.jsx(A.CalendarIcon,{className:"mr-2 h-4 w-4"}),e?ve.format(e,"PPP"):o.jsx("span",{children:n})]})}),o.jsx(lt,{className:"w-auto p-0",align:"start",children:o.jsx(qn,{selected:e,onSelect:l=>{t==null||t(l),i(!1)}})})]})}function Pl({value:e={hours:12,minutes:0},onChange:t,is24Hour:n=!1,disabled:r,className:s}){const[a,i]=w.useState(!1),[l,c]=w.useState(e.hours>=12?"PM":"AM"),d=n?e.hours:e.hours===0?12:e.hours>12?e.hours-12:e.hours,g=()=>{const b=d.toString().padStart(2,"0"),h=e.minutes.toString().padStart(2,"0");return n?`${b}:${h}`:`${b}:${h} ${l}`},u=b=>{let h=b;n||(l==="PM"&&b!==12&&(h+=12),l==="AM"&&b===12&&(h=0)),t==null||t({...e,hours:h})},f=b=>{t==null||t({...e,minutes:b})},m=b=>{c(b);let h=e.hours;b==="PM"&&e.hours<12&&(h+=12),b==="AM"&&e.hours>=12&&(h-=12),t==null||t({...e,hours:h})},p=n?Array.from({length:24},(b,h)=>h):Array.from({length:12},(b,h)=>h+1),v=Array.from({length:12},(b,h)=>h*5);return o.jsxs(ht,{open:a,onOpenChange:i,children:[o.jsx(xt,{asChild:!0,children:o.jsxs(ge,{variant:"outline",disabled:r,className:x("w-full justify-start font-normal",s),children:[o.jsx(A.Clock,{className:"mr-2 h-4 w-4"}),g()]})}),o.jsx(lt,{className:"w-auto p-2",align:"start",children:o.jsxs("div",{className:"flex gap-1",children:[o.jsx("div",{className:"h-32 w-12 overflow-y-auto rounded border bg-muted/30",children:p.map(b=>o.jsx("button",{onClick:()=>u(b),className:x("w-full py-1 text-sm font-medium transition-colors","hover:bg-accent",d===b&&"bg-primary text-primary-foreground hover:bg-primary/90"),children:b.toString().padStart(2,"0")},b))}),o.jsx("div",{className:"flex items-center text-muted-foreground font-bold",children:":"}),o.jsx("div",{className:"h-32 w-12 overflow-y-auto rounded border bg-muted/30",children:v.map(b=>o.jsx("button",{onClick:()=>f(b),className:x("w-full py-1 text-sm font-medium transition-colors","hover:bg-accent",e.minutes===b&&"bg-primary text-primary-foreground hover:bg-primary/90"),children:b.toString().padStart(2,"0")},b))}),!n&&o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx("button",{onClick:()=>m("AM"),className:x("px-2 py-1 text-xs font-medium rounded border transition-colors flex-1","hover:bg-accent",l==="AM"&&"bg-primary text-primary-foreground border-primary"),children:"AM"}),o.jsx("button",{onClick:()=>m("PM"),className:x("px-2 py-1 text-xs font-medium rounded border transition-colors flex-1","hover:bg-accent",l==="PM"&&"bg-primary text-primary-foreground border-primary"),children:"PM"})]})]})})]})}function Ll({value:e=0,onChange:t,min:n=-1/0,max:r=1/0,step:s=1,disabled:a,className:i}){const l=()=>{const g=Math.min(e+s,r);t==null||t(g)},c=()=>{const g=Math.max(e-s,n);t==null||t(g)},d=g=>{const u=parseFloat(g.target.value);if(!isNaN(u)){const f=Math.min(Math.max(u,n),r);t==null||t(f)}};return o.jsxs("div",{className:x("flex items-center gap-2",i),children:[o.jsx(ge,{type:"button",variant:"outline",size:"icon",onClick:c,disabled:a||e<=n,className:"h-9 w-9",children:o.jsx(A.Minus,{className:"h-4 w-4"})}),o.jsx(Je,{type:"number",value:e,onChange:d,disabled:a,className:"w-20 text-center [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",min:n,max:r,step:s}),o.jsx(ge,{type:"button",variant:"outline",size:"icon",onClick:l,disabled:a||e>=r,className:"h-9 w-9",children:o.jsx(A.Plus,{className:"h-4 w-4"})})]})}function Dl({values:e=[],onChange:t,placeholder:n="Add tag...",disabled:r,className:s,maxTags:a}){const[i,l]=w.useState(""),c=w.useRef(null),d=u=>{if(u.key==="Enter"&&i.trim()){if(u.preventDefault(),a&&e.length>=a)return;e.includes(i.trim())||t==null||t([...e,i.trim()]),l("")}else u.key==="Backspace"&&!i&&e.length>0&&(t==null||t(e.slice(0,-1)))},g=u=>{t==null||t(e.filter(f=>f!==u))};return o.jsxs("div",{className:x("flex flex-wrap gap-2 rounded-md border border-input bg-background px-3 py-2 focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",r&&"opacity-50 cursor-not-allowed",s),onClick:()=>{var u;return(u=c.current)==null?void 0:u.focus()},children:[e.map(u=>o.jsxs(Bn,{variant:"secondary",className:"gap-1",children:[u,!r&&o.jsx("button",{type:"button",onClick:f=>{f.stopPropagation(),g(u)},className:"ml-1 rounded-full outline-none hover:bg-muted",children:o.jsx(A.X,{className:"h-3 w-3"})})]},u)),o.jsx("input",{ref:c,type:"text",value:i,onChange:u=>l(u.target.value),onKeyDown:d,placeholder:e.length===0?n:"",disabled:r||(a?e.length>=a:!1),className:"flex-1 min-w-[120px] bg-transparent outline-none placeholder:text-muted-foreground text-sm"})]})}function Tl({options:e,value:t,onChange:n,placeholder:r="Select option...",searchPlaceholder:s="Search...",emptyText:a="No results found.",disabled:i,className:l}){const[c,d]=w.useState(!1),[g,u]=w.useState(""),f=e.filter(p=>p.label.toLowerCase().includes(g.toLowerCase())),m=e.find(p=>p.value===t);return o.jsxs(ht,{open:c,onOpenChange:d,children:[o.jsx(xt,{asChild:!0,children:o.jsxs(ge,{variant:"outline",role:"combobox","aria-expanded":c,disabled:i,className:x("w-full justify-between font-normal",!t&&"text-muted-foreground",l),children:[m?m.label:r,o.jsx(A.ChevronsUpDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),o.jsxs(lt,{className:"w-full p-0",align:"start",children:[o.jsx("div",{className:"p-2 border-b",children:o.jsx(Je,{placeholder:s,value:g,onChange:p=>u(p.target.value),className:"h-8"})}),o.jsx("div",{className:"max-h-60 overflow-auto p-1",children:f.length===0?o.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:a}):f.map(p=>o.jsxs("button",{onClick:()=>{n==null||n(p.value===t?"":p.value),d(!1),u("")},className:x("relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground",t===p.value&&"bg-accent"),children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:t===p.value&&o.jsx(A.Check,{className:"h-4 w-4"})}),p.label]},p.value))})]})]})}function Fl({options:e,value:t=[],onChange:n,placeholder:r="Select options...",searchPlaceholder:s="Search...",emptyText:a="No results found.",disabled:i,className:l,maxDisplay:c=3}){const[d,g]=w.useState(!1),[u,f]=w.useState(""),m=e.filter(y=>y.label.toLowerCase().includes(u.toLowerCase())),p=e.filter(y=>t.includes(y.value)),v=y=>{const C=t.includes(y)?t.filter(S=>S!==y):[...t,y];n==null||n(C)},b=(y,C)=>{C.stopPropagation(),n==null||n(t.filter(S=>S!==y))},h=()=>t.length===0?r:t.length<=c?p.map(y=>y.label).join(", "):`${t.length} selected`;return o.jsxs(ht,{open:d,onOpenChange:g,children:[o.jsx(xt,{asChild:!0,children:o.jsxs(ge,{variant:"outline",role:"combobox","aria-expanded":d,disabled:i,className:x("w-full justify-between font-normal",t.length===0&&"text-muted-foreground",l),children:[o.jsx("span",{className:"truncate",children:h()}),o.jsx(A.ChevronsUpDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),o.jsxs(lt,{className:"w-full p-0",align:"start",children:[o.jsx("div",{className:"p-2 border-b",children:o.jsx(Je,{placeholder:s,value:u,onChange:y=>f(y.target.value),className:"h-8"})}),t.length>0&&o.jsx("div",{className:"flex flex-wrap gap-1 p-2 border-b",children:p.map(y=>o.jsxs(Bn,{variant:"secondary",className:"pr-1",children:[y.label,o.jsx("button",{onClick:C=>b(y.value,C),className:"ml-1 rounded-full hover:bg-muted",children:o.jsx(A.X,{className:"h-3 w-3"})})]},y.value))}),o.jsx("div",{className:"max-h-60 overflow-auto p-1",children:m.length===0?o.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:a}):m.map(y=>{const C=t.includes(y.value);return o.jsxs("button",{onClick:()=>v(y.value),className:x("relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground",C&&"bg-accent"),children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:C&&o.jsx(A.Check,{className:"h-4 w-4"})}),y.label]},y.value)})})]})]})}function Al({length:e=6,value:t="",onChange:n,onComplete:r,disabled:s,className:a}){const i=w.useRef([]),l=(g,u)=>{var p;if(!/^\d*$/.test(u))return;const f=t.split("");f[g]=u;const m=f.join("").slice(0,e);n==null||n(m),u&&g<e-1&&((p=i.current[g+1])==null||p.focus()),m.length===e&&(r==null||r(m))},c=(g,u)=>{var f;u.key==="Backspace"&&!t[g]&&g>0&&((f=i.current[g-1])==null||f.focus())},d=g=>{var f;g.preventDefault();const u=g.clipboardData.getData("text").replace(/\D/g,"").slice(0,e);n==null||n(u),u.length===e&&(r==null||r(u)),(f=i.current[Math.min(u.length,e-1)])==null||f.focus()};return o.jsx("div",{className:x("flex gap-2",a),children:Array.from({length:e}).map((g,u)=>o.jsx("input",{ref:f=>{i.current[u]=f},type:"text",inputMode:"numeric",maxLength:1,value:t[u]||"",onChange:f=>l(u,f.target.value),onKeyDown:f=>c(u,f),onPaste:d,disabled:s,className:x("h-12 w-12 rounded-lg border border-input bg-background text-center text-lg font-semibold","focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2","disabled:opacity-50 disabled:cursor-not-allowed")},u))})}function El({accept:e,maxSize:t,multiple:n=!1,onUpload:r,disabled:s,className:a}){const[i,l]=w.useState([]),[c,d]=w.useState(!1),g=w.useRef(null),u=h=>{if(!h)return;const y=Array.from(h).filter(S=>!(t&&S.size>t)),C=n?[...i,...y]:y.slice(0,1);l(C),r==null||r(C)},f=h=>{h.preventDefault(),d(!1),s||u(h.dataTransfer.files)},m=h=>{h.preventDefault(),s||d(!0)},p=()=>{d(!1)},v=h=>{const y=i.filter((C,S)=>S!==h);l(y),r==null||r(y)},b=h=>h<1024?h+" B":h<1024*1024?(h/1024).toFixed(1)+" KB":(h/(1024*1024)).toFixed(1)+" MB";return o.jsxs("div",{className:x("space-y-4",a),children:[o.jsxs("div",{onClick:()=>{var h;return!s&&((h=g.current)==null?void 0:h.click())},onDrop:f,onDragOver:m,onDragLeave:p,className:x("border-2 border-dashed rounded-lg p-8 text-center transition-colors cursor-pointer",c?"border-primary bg-primary/5":"border-muted-foreground/25",s&&"opacity-50 cursor-not-allowed","hover:border-primary/50"),children:[o.jsx(A.Upload,{className:"h-10 w-10 mx-auto mb-4 text-muted-foreground"}),o.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Drag & drop files here, or click to select"}),t&&o.jsxs("p",{className:"text-xs text-muted-foreground",children:["Max file size: ",b(t)]}),o.jsx("input",{ref:g,type:"file",accept:e,multiple:n,onChange:h=>u(h.target.files),disabled:s,className:"hidden"})]}),i.length>0&&o.jsx("div",{className:"space-y-2",children:i.map((h,y)=>o.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border bg-muted/50",children:[o.jsx(A.FileIcon,{className:"h-8 w-8 text-muted-foreground"}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-sm font-medium truncate",children:h.name}),o.jsx("p",{className:"text-xs text-muted-foreground",children:b(h.size)})]}),o.jsx(ge,{type:"button",variant:"ghost",size:"icon",onClick:()=>v(y),className:"h-8 w-8",children:o.jsx(A.X,{className:"h-4 w-4"})})]},y))})]})}const Vl=["#ef4444","#f97316","#eab308","#22c55e","#14b8a6","#3b82f6","#8b5cf6","#ec4899","#000000","#ffffff"];function Xt(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(!t)return{h:0,s:100,l:50};let n=parseInt(t[1],16)/255,r=parseInt(t[2],16)/255,s=parseInt(t[3],16)/255;const a=Math.max(n,r,s),i=Math.min(n,r,s);let l=0,c=0;const d=(a+i)/2;if(a!==i){const g=a-i;switch(c=d>.5?g/(2-a-i):g/(a+i),a){case n:l=((r-s)/g+(r<s?6:0))/6;break;case r:l=((s-n)/g+2)/6;break;case s:l=((n-r)/g+4)/6;break}}return{h:Math.round(l*360),s:Math.round(c*100),l:Math.round(d*100)}}function $l(e,t,n){t/=100,n/=100;const r=t*Math.min(n,1-n),s=a=>{const i=(a+e/30)%12,l=n-r*Math.max(Math.min(i-3,9-i,1),-1);return Math.round(255*l).toString(16).padStart(2,"0")};return`#${s(0)}${s(8)}${s(4)}`}function zl({value:e="#3b82f6",onChange:t,disabled:n,className:r}){const[s,a]=w.useState(!1),[i,l]=w.useState(()=>Xt(e)),[c,d]=w.useState(e),g=w.useRef(null);w.useEffect(()=>{l(Xt(e)),d(e)},[e]);const u=p=>{l(p);const v=$l(p.h,p.s,p.l);d(v),t==null||t(v)},f=p=>{if(!g.current)return;const v=g.current.getBoundingClientRect(),b=Math.max(0,Math.min(1,(p.clientX-v.left)/v.width)),h=Math.max(0,Math.min(1,(p.clientY-v.top)/v.height));u({...i,s:Math.round(b*100),l:Math.round((1-h)*100)})},m=p=>{if(d(p),/^#[0-9A-Fa-f]{6}$/.test(p)){const v=Xt(p);l(v),t==null||t(p)}};return o.jsxs(ht,{open:s,onOpenChange:a,children:[o.jsx(xt,{asChild:!0,children:o.jsxs(ge,{variant:"outline",disabled:n,className:x("w-full justify-start gap-2",r),children:[o.jsx("div",{className:"h-5 w-5 rounded border shadow-sm",style:{backgroundColor:e}}),o.jsx("span",{className:"font-mono text-sm",children:e})]})}),o.jsx(lt,{className:"w-72 p-3",align:"start",children:o.jsxs("div",{className:"space-y-3",children:[o.jsx("div",{ref:g,onClick:f,className:"relative h-40 rounded-lg cursor-crosshair overflow-hidden border",style:{background:`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),j=require("react"),qo=require("@radix-ui/react-slot"),mi=require("@radix-ui/react-label"),fi=require("@radix-ui/react-separator"),gi=require("@radix-ui/react-avatar"),pi=require("@radix-ui/react-checkbox"),A=require("lucide-react"),hi=require("@radix-ui/react-switch"),xi=require("@radix-ui/react-select"),vi=require("@radix-ui/react-radio-group"),bi=require("@radix-ui/react-slider"),wi=require("@radix-ui/react-toggle"),yi=require("@radix-ui/react-toggle-group"),be=require("date-fns"),Ni=require("@radix-ui/react-popover"),Ci=require("@radix-ui/react-aspect-ratio"),ji=require("@radix-ui/react-collapsible"),Si=require("@radix-ui/react-scroll-area"),ki=require("@radix-ui/react-tabs"),Ri=require("@radix-ui/react-accordion"),_i=require("@radix-ui/react-dialog"),Mi=require("@radix-ui/react-dropdown-menu"),Pi=require("@radix-ui/react-tooltip"),Me=require("cmdk"),Ii=require("@radix-ui/react-alert-dialog"),Ti=require("@radix-ui/react-progress"),Li=require("react-dom"),Di=require("@radix-ui/react-navigation-menu"),Fi=require("@radix-ui/react-context-menu"),Ai=require("@radix-ui/react-hover-card"),Vn=require("recharts");function re(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const v=re(j),Wo=re(mi),Uo=re(fi),ft=re(gi),kn=re(pi),Rn=re(hi),le=re(xi),Mt=re(vi),Ct=re(bi),Yo=re(wi),rn=re(yi),Pt=re(Ni),Ei=re(Ci),$n=re(ji),rt=re(Si),it=re(ki),st=re(Ri),te=re(_i),ne=re(Mi),Ft=re(Pi),Re=re(Ii),_n=re(Ti),Pe=re(Di),oe=re(Fi),sn=re(Ai);function Xo(e){var n,t,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(n=0;n<s;n++)e[n]&&(t=Xo(e[n]))&&(o&&(o+=" "),o+=t)}else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function Ko(){for(var e,n,t=0,o="",s=arguments.length;t<s;t++)(e=arguments[t])&&(n=Xo(e))&&(o&&(o+=" "),o+=n);return o}const Vi=(e,n)=>{const t=new Array(e.length+n.length);for(let o=0;o<e.length;o++)t[o]=e[o];for(let o=0;o<n.length;o++)t[e.length+o]=n[o];return t},$i=(e,n)=>({classGroupId:e,validator:n}),Zo=(e=new Map,n=null,t)=>({nextPart:e,validators:n,classGroupId:t}),en="-",So=[],zi="arbitrary..",Bi=e=>{const n=Hi(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Oi(i);const l=i.split(en),c=l[0]===""&&l.length>1?1:0;return Jo(l,c,n)},getConflictingClassGroupIds:(i,l)=>{if(l){const c=o[i],d=t[i];return c?d?Vi(d,c):c:d||So}return t[i]||So}}},Jo=(e,n,t)=>{if(e.length-n===0)return t.classGroupId;const s=e[n],a=t.nextPart.get(s);if(a){const d=Jo(e,n+1,a);if(d)return d}const i=t.validators;if(i===null)return;const l=n===0?e.join(en):e.slice(n).join(en),c=i.length;for(let d=0;d<c;d++){const g=i[d];if(g.validator(l))return g.classGroupId}},Oi=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),t=n.indexOf(":"),o=n.slice(0,t);return o?zi+o:void 0})(),Hi=e=>{const{theme:n,classGroups:t}=e;return Gi(t,n)},Gi=(e,n)=>{const t=Zo();for(const o in e){const s=e[o];zn(s,t,o,n)}return t},zn=(e,n,t,o)=>{const s=e.length;for(let a=0;a<s;a++){const i=e[a];qi(i,n,t,o)}},qi=(e,n,t,o)=>{if(typeof e=="string"){Wi(e,n,t);return}if(typeof e=="function"){Ui(e,n,t,o);return}Yi(e,n,t,o)},Wi=(e,n,t)=>{const o=e===""?n:Qo(n,e);o.classGroupId=t},Ui=(e,n,t,o)=>{if(Xi(e)){zn(e(o),n,t,o);return}n.validators===null&&(n.validators=[]),n.validators.push($i(t,e))},Yi=(e,n,t,o)=>{const s=Object.entries(e),a=s.length;for(let i=0;i<a;i++){const[l,c]=s[i];zn(c,Qo(n,l),t,o)}},Qo=(e,n)=>{let t=e;const o=n.split(en),s=o.length;for(let a=0;a<s;a++){const i=o[a];let l=t.nextPart.get(i);l||(l=Zo(),t.nextPart.set(i,l)),t=l}return t},Xi=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Ki=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,t=Object.create(null),o=Object.create(null);const s=(a,i)=>{t[a]=i,n++,n>e&&(n=0,o=t,t=Object.create(null))};return{get(a){let i=t[a];if(i!==void 0)return i;if((i=o[a])!==void 0)return s(a,i),i},set(a,i){a in t?t[a]=i:s(a,i)}}},Mn="!",ko=":",Zi=[],Ro=(e,n,t,o,s)=>({modifiers:e,hasImportantModifier:n,baseClassName:t,maybePostfixModifierPosition:o,isExternal:s}),Ji=e=>{const{prefix:n,experimentalParseClassName:t}=e;let o=s=>{const a=[];let i=0,l=0,c=0,d;const g=s.length;for(let h=0;h<g;h++){const w=s[h];if(i===0&&l===0){if(w===ko){a.push(s.slice(c,h)),c=h+1;continue}if(w==="/"){d=h;continue}}w==="["?i++:w==="]"?i--:w==="("?l++:w===")"&&l--}const u=a.length===0?s:s.slice(c);let f=u,m=!1;u.endsWith(Mn)?(f=u.slice(0,-1),m=!0):u.startsWith(Mn)&&(f=u.slice(1),m=!0);const p=d&&d>c?d-c:void 0;return Ro(a,m,f,p)};if(n){const s=n+ko,a=o;o=i=>i.startsWith(s)?a(i.slice(s.length)):Ro(Zi,!1,i,void 0,!0)}if(t){const s=o;o=a=>t({className:a,parseClassName:s})}return o},Qi=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((t,o)=>{n.set(t,1e6+o)}),t=>{const o=[];let s=[];for(let a=0;a<t.length;a++){const i=t[a],l=i[0]==="[",c=n.has(i);l||c?(s.length>0&&(s.sort(),o.push(...s),s=[]),o.push(i)):s.push(i)}return s.length>0&&(s.sort(),o.push(...s)),o}},el=e=>({cache:Ki(e.cacheSize),parseClassName:Ji(e),sortModifiers:Qi(e),...Bi(e)}),tl=/\s+/,nl=(e,n)=>{const{parseClassName:t,getClassGroupId:o,getConflictingClassGroupIds:s,sortModifiers:a}=n,i=[],l=e.trim().split(tl);let c="";for(let d=l.length-1;d>=0;d-=1){const g=l[d],{isExternal:u,modifiers:f,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:h}=t(g);if(u){c=g+(c.length>0?" "+c:c);continue}let w=!!h,b=o(w?p.substring(0,h):p);if(!b){if(!w){c=g+(c.length>0?" "+c:c);continue}if(b=o(p),!b){c=g+(c.length>0?" "+c:c);continue}w=!1}const y=f.length===0?"":f.length===1?f[0]:a(f).join(":"),N=m?y+Mn:y,R=N+b;if(i.indexOf(R)>-1)continue;i.push(R);const _=s(b,w);for(let S=0;S<_.length;++S){const k=_[S];i.push(N+k)}c=g+(c.length>0?" "+c:c)}return c},ol=(...e)=>{let n=0,t,o,s="";for(;n<e.length;)(t=e[n++])&&(o=er(t))&&(s&&(s+=" "),s+=o);return s},er=e=>{if(typeof e=="string")return e;let n,t="";for(let o=0;o<e.length;o++)e[o]&&(n=er(e[o]))&&(t&&(t+=" "),t+=n);return t},rl=(e,...n)=>{let t,o,s,a;const i=c=>{const d=n.reduce((g,u)=>u(g),e());return t=el(d),o=t.cache.get,s=t.cache.set,a=l,l(c)},l=c=>{const d=o(c);if(d)return d;const g=nl(c,t);return s(c,g),g};return a=i,(...c)=>a(ol(...c))},sl=[],xe=e=>{const n=t=>t[e]||sl;return n.isThemeGetter=!0,n},tr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,nr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,al=/^\d+\/\d+$/,il=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ll=/\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$/,dl=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,cl=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ul=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,mt=e=>al.test(e),W=e=>!!e&&!Number.isNaN(Number(e)),Xe=e=>!!e&&Number.isInteger(Number(e)),hn=e=>e.endsWith("%")&&W(e.slice(0,-1)),Ue=e=>il.test(e),ml=()=>!0,fl=e=>ll.test(e)&&!dl.test(e),or=()=>!1,gl=e=>cl.test(e),pl=e=>ul.test(e),hl=e=>!T(e)&&!L(e),xl=e=>gt(e,ar,or),T=e=>tr.test(e),nt=e=>gt(e,ir,fl),xn=e=>gt(e,Nl,W),_o=e=>gt(e,rr,or),vl=e=>gt(e,sr,pl),Ut=e=>gt(e,lr,gl),L=e=>nr.test(e),yt=e=>pt(e,ir),bl=e=>pt(e,Cl),Mo=e=>pt(e,rr),wl=e=>pt(e,ar),yl=e=>pt(e,sr),Yt=e=>pt(e,lr,!0),gt=(e,n,t)=>{const o=tr.exec(e);return o?o[1]?n(o[1]):t(o[2]):!1},pt=(e,n,t=!1)=>{const o=nr.exec(e);return o?o[1]?n(o[1]):t:!1},rr=e=>e==="position"||e==="percentage",sr=e=>e==="image"||e==="url",ar=e=>e==="length"||e==="size"||e==="bg-size",ir=e=>e==="length",Nl=e=>e==="number",Cl=e=>e==="family-name",lr=e=>e==="shadow",jl=()=>{const e=xe("color"),n=xe("font"),t=xe("text"),o=xe("font-weight"),s=xe("tracking"),a=xe("leading"),i=xe("breakpoint"),l=xe("container"),c=xe("spacing"),d=xe("radius"),g=xe("shadow"),u=xe("inset-shadow"),f=xe("text-shadow"),m=xe("drop-shadow"),p=xe("blur"),h=xe("perspective"),w=xe("aspect"),b=xe("ease"),y=xe("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...R(),L,T],S=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],C=()=>[L,T,c],D=()=>[mt,"full","auto",...C()],G=()=>[Xe,"none","subgrid",L,T],E=()=>["auto",{span:["full",Xe,L,T]},Xe,L,T],J=()=>[Xe,"auto",L,T],Q=()=>["auto","min","max","fr",L,T],M=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],X=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...C()],U=()=>[mt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],P=()=>[e,L,T],fe=()=>[...R(),Mo,_o,{position:[L,T]}],ge=()=>["no-repeat",{repeat:["","x","y","space","round"]}],de=()=>["auto","cover","contain",wl,xl,{size:[L,T]}],je=()=>[hn,yt,nt],F=()=>["","none","full",d,L,T],B=()=>["",W,yt,nt],Y=()=>["solid","dashed","dotted","double"],ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[W,hn,Mo,_o],O=()=>["","none",p,L,T],ue=()=>["none",W,L,T],ie=()=>["none",W,L,T],K=()=>[W,L,T],I=()=>[mt,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ue],breakpoint:[Ue],color:[ml],container:[Ue],"drop-shadow":[Ue],ease:["in","out","in-out"],font:[hl],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ue],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ue],shadow:[Ue],spacing:["px",W],text:[Ue],"text-shadow":[Ue],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",mt,T,L,w]}],container:["container"],columns:[{columns:[W,T,L,l]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"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:_()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{start:D()}],end:[{end:D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[Xe,"auto",L,T]}],basis:[{basis:[mt,"full","auto",l,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[W,mt,"auto","initial","none",T]}],grow:[{grow:["",W,L,T]}],shrink:[{shrink:["",W,L,T]}],order:[{order:[Xe,"first","last","none",L,T]}],"grid-cols":[{"grid-cols":G()}],"col-start-end":[{col:E()}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":G()}],"row-start-end":[{row:E()}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...M(),"normal"]}],"justify-items":[{"justify-items":[...X(),"normal"]}],"justify-self":[{"justify-self":["auto",...X()]}],"align-content":[{content:["normal",...M()]}],"align-items":[{items:[...X(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...X(),{baseline:["","last"]}]}],"place-content":[{"place-content":M()}],"place-items":[{"place-items":[...X(),"baseline"]}],"place-self":[{"place-self":["auto",...X()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],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":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],w:[{w:[l,"screen",...U()]}],"min-w":[{"min-w":[l,"screen","none",...U()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",t,yt,nt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,L,xn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",hn,T]}],"font-family":[{font:[bl,T,n]}],"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:[s,L,T]}],"line-clamp":[{"line-clamp":[W,"none",L,xn]}],leading:[{leading:[a,...C()]}],"list-image":[{"list-image":["none",L,T]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",L,T]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:[W,"from-font","auto",L,nt]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[W,"auto",L,T]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",L,T]}],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",L,T]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:fe()}],"bg-repeat":[{bg:ge()}],"bg-size":[{bg:de()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Xe,L,T],radial:["",L,T],conic:[Xe,L,T]},yl,vl]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:je()}],"gradient-via-pos":[{via:je()}],"gradient-to-pos":[{to:je()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":B()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Y(),"hidden","none"]}],"divide-style":[{divide:[...Y(),"hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...Y(),"none","hidden"]}],"outline-offset":[{"outline-offset":[W,L,T]}],"outline-w":[{outline:["",W,yt,nt]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",g,Yt,Ut]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",u,Yt,Ut]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[W,nt]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",f,Yt,Ut]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[W,L,T]}],"mix-blend":[{"mix-blend":[...ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ce()}],"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":[W]}],"mask-image-linear-from-pos":[{"mask-linear-from":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[L,T]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"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":R()}],"mask-image-conic-pos":[{"mask-conic":[W]}],"mask-image-conic-from-pos":[{"mask-conic-from":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:fe()}],"mask-repeat":[{mask:ge()}],"mask-size":[{mask:de()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",L,T]}],filter:[{filter:["","none",L,T]}],blur:[{blur:O()}],brightness:[{brightness:[W,L,T]}],contrast:[{contrast:[W,L,T]}],"drop-shadow":[{"drop-shadow":["","none",m,Yt,Ut]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",W,L,T]}],"hue-rotate":[{"hue-rotate":[W,L,T]}],invert:[{invert:["",W,L,T]}],saturate:[{saturate:[W,L,T]}],sepia:[{sepia:["",W,L,T]}],"backdrop-filter":[{"backdrop-filter":["","none",L,T]}],"backdrop-blur":[{"backdrop-blur":O()}],"backdrop-brightness":[{"backdrop-brightness":[W,L,T]}],"backdrop-contrast":[{"backdrop-contrast":[W,L,T]}],"backdrop-grayscale":[{"backdrop-grayscale":["",W,L,T]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[W,L,T]}],"backdrop-invert":[{"backdrop-invert":["",W,L,T]}],"backdrop-opacity":[{"backdrop-opacity":[W,L,T]}],"backdrop-saturate":[{"backdrop-saturate":[W,L,T]}],"backdrop-sepia":[{"backdrop-sepia":["",W,L,T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",L,T]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[W,"initial",L,T]}],ease:[{ease:["linear","initial",b,L,T]}],delay:[{delay:[W,L,T]}],animate:[{animate:["none",y,L,T]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,L,T]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:ue()}],"rotate-x":[{"rotate-x":ue()}],"rotate-y":[{"rotate-y":ue()}],"rotate-z":[{"rotate-z":ue()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":["scale-3d"],skew:[{skew:K()}],"skew-x":[{"skew-x":K()}],"skew-y":[{"skew-y":K()}],transform:[{transform:[L,T,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:I()}],"translate-x":[{"translate-x":I()}],"translate-y":[{"translate-y":I()}],"translate-z":[{"translate-z":I()}],"translate-none":["translate-none"],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"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",L,T]}],"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":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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",L,T]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[W,yt,nt,xn]}],stroke:[{stroke:["none",...P()]}],"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"]}},Sl=rl(jl);function x(...e){return Sl(Ko(e))}const Po=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Io=Ko,Fe=(e,n)=>t=>{var o;if((n==null?void 0:n.variants)==null)return Io(e,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:s,defaultVariants:a}=n,i=Object.keys(s).map(d=>{const g=t==null?void 0:t[d],u=a==null?void 0:a[d];if(g===null)return null;const f=Po(g)||Po(u);return s[d][f]}),l=t&&Object.entries(t).reduce((d,g)=>{let[u,f]=g;return f===void 0||(d[u]=f),d},{}),c=n==null||(o=n.compoundVariants)===null||o===void 0?void 0:o.reduce((d,g)=>{let{class:u,className:f,...m}=g;return Object.entries(m).every(p=>{let[h,w]=p;return Array.isArray(w)?w.includes({...a,...l}[h]):{...a,...l}[h]===w})?[...d,u,f]:d},[]);return Io(e,i,c,t==null?void 0:t.class,t==null?void 0:t.className)},At=Fe("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",brand:"bg-gradient-to-r from-violet-600 to-indigo-600 text-white hover:from-violet-500 hover:to-indigo-500 shadow-lg shadow-violet-500/25 hover:shadow-violet-500/40 hover:scale-[1.02] active:scale-[0.98]",glow:"bg-primary text-primary-foreground shadow-[0_0_20px_rgba(139,92,246,0.5)] hover:shadow-[0_0_30px_rgba(139,92,246,0.7)] hover:scale-[1.02] active:scale-[0.98]"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",xl:"h-12 rounded-lg px-10 text-base",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),pe=v.forwardRef(({className:e,variant:n,size:t,asChild:o=!1,...s},a)=>{const i=o?qo.Slot:"button";return r.jsx(i,{className:x(At({variant:n,size:t,className:e})),ref:a,...s})});pe.displayName="Button";const dr=Fe("flex w-full rounded-lg text-sm transition-all duration-200 file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"h-10 border border-input bg-background px-3 py-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",filled:"h-10 border-0 bg-muted/50 px-3 py-2 focus-visible:outline-none focus-visible:bg-muted focus-visible:ring-2 focus-visible:ring-ring",glow:"h-10 border border-input bg-background px-3 py-2 ring-offset-background focus-visible:outline-none focus-visible:border-violet-500/50 focus-visible:ring-2 focus-visible:ring-violet-500/30 focus-visible:shadow-[0_0_15px_rgba(139,92,246,0.3)]",ghost:"h-10 border-0 bg-transparent px-3 py-2 focus-visible:outline-none focus-visible:bg-muted/30"},inputSize:{default:"h-10",sm:"h-9 text-xs",lg:"h-12 text-base"}},defaultVariants:{variant:"default",inputSize:"default"}}),Je=v.forwardRef(({className:e,type:n,variant:t,inputSize:o,...s},a)=>r.jsx("input",{type:n,className:x(dr({variant:t,inputSize:o}),e),ref:a,...s}));Je.displayName="Input";const cr=v.forwardRef(({className:e,...n},t)=>r.jsx("textarea",{className:x("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:t,...n}));cr.displayName="Textarea";const kl=Fe("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),an=v.forwardRef(({className:e,...n},t)=>r.jsx(Wo.Root,{ref:t,className:x(kl(),e),...n}));an.displayName=Wo.Root.displayName;const ur=Fe("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Bn({className:e,variant:n,...t}){return r.jsx("div",{className:x(ur({variant:n}),e),...t})}const mr=v.forwardRef(({className:e,orientation:n="horizontal",...t},o)=>r.jsx(Uo.Root,{ref:o,decorative:!0,orientation:n,className:x("shrink-0 bg-border",n==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...t}));mr.displayName=Uo.Root.displayName;const fr=v.forwardRef(({className:e,...n},t)=>r.jsx(ft.Root,{ref:t,className:x("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...n}));fr.displayName=ft.Root.displayName;const gr=v.forwardRef(({className:e,...n},t)=>r.jsx(ft.Image,{ref:t,className:x("aspect-square h-full w-full",e),...n}));gr.displayName=ft.Image.displayName;const pr=v.forwardRef(({className:e,...n},t)=>r.jsx(ft.Fallback,{ref:t,className:x("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...n}));pr.displayName=ft.Fallback.displayName;const hr=v.forwardRef(({className:e,...n},t)=>r.jsx(kn.Root,{ref:t,className:x("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...n,children:r.jsx(kn.Indicator,{className:x("flex items-center justify-center text-current"),children:r.jsx(A.Check,{className:"h-4 w-4"})})}));hr.displayName=kn.Root.displayName;const xr=v.forwardRef(({className:e,...n},t)=>r.jsx(Rn.Root,{className:x("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...n,ref:t,children:r.jsx(Rn.Thumb,{className:x("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));xr.displayName=Rn.Root.displayName;const Rl=le.Root,_l=le.Group,Ml=le.Value,vr=v.forwardRef(({className:e,children:n,...t},o)=>r.jsxs(le.Trigger,{ref:o,className:x("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...t,children:[n,r.jsx(le.Icon,{asChild:!0,children:r.jsx(A.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));vr.displayName=le.Trigger.displayName;const On=v.forwardRef(({className:e,...n},t)=>r.jsx(le.ScrollUpButton,{ref:t,className:x("flex cursor-default items-center justify-center py-1",e),...n,children:r.jsx(A.ChevronUp,{className:"h-4 w-4"})}));On.displayName=le.ScrollUpButton.displayName;const Hn=v.forwardRef(({className:e,...n},t)=>r.jsx(le.ScrollDownButton,{ref:t,className:x("flex cursor-default items-center justify-center py-1",e),...n,children:r.jsx(A.ChevronDown,{className:"h-4 w-4"})}));Hn.displayName=le.ScrollDownButton.displayName;const br=v.forwardRef(({className:e,children:n,position:t="popper",...o},s)=>r.jsx(le.Portal,{children:r.jsxs(le.Content,{ref:s,className:x("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:t,...o,children:[r.jsx(On,{}),r.jsx(le.Viewport,{className:x("p-1",t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),r.jsx(Hn,{})]})}));br.displayName=le.Content.displayName;const wr=v.forwardRef(({className:e,...n},t)=>r.jsx(le.Label,{ref:t,className:x("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...n}));wr.displayName=le.Label.displayName;const yr=v.forwardRef(({className:e,children:n,...t},o)=>r.jsxs(le.Item,{ref:o,className:x("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t,children:[r.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(le.ItemIndicator,{children:r.jsx(A.Check,{className:"h-4 w-4"})})}),r.jsx(le.ItemText,{children:n})]}));yr.displayName=le.Item.displayName;const Nr=v.forwardRef(({className:e,...n},t)=>r.jsx(le.Separator,{ref:t,className:x("-mx-1 my-1 h-px bg-muted",e),...n}));Nr.displayName=le.Separator.displayName;const Cr=v.forwardRef(({className:e,...n},t)=>r.jsx(Mt.Root,{className:x("grid gap-2",e),...n,ref:t}));Cr.displayName=Mt.Root.displayName;const jr=v.forwardRef(({className:e,...n},t)=>r.jsx(Mt.Item,{ref:t,className:x("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...n,children:r.jsx(Mt.Indicator,{className:"flex items-center justify-center",children:r.jsx(A.Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})}));jr.displayName=Mt.Item.displayName;const Sr=v.forwardRef(({className:e,...n},t)=>r.jsxs(Ct.Root,{ref:t,className:x("relative flex w-full touch-none select-none items-center",e),...n,children:[r.jsx(Ct.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:r.jsx(Ct.Range,{className:"absolute h-full bg-primary"})}),r.jsx(Ct.Thumb,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));Sr.displayName=Ct.Root.displayName;const Gn=Fe("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),kr=v.forwardRef(({className:e,variant:n,size:t,...o},s)=>r.jsx(Yo.Root,{ref:s,className:x(Gn({variant:n,size:t,className:e})),...o}));kr.displayName=Yo.Root.displayName;const Rr=v.forwardRef(({className:e,variant:n,size:t,children:o,...s},a)=>r.jsx(rn.Root,{ref:a,className:x("flex items-center justify-center gap-1",e),...s,children:r.jsx(_r.Provider,{value:{variant:n,size:t},children:o})}));Rr.displayName=rn.Root.displayName;const _r=v.createContext({size:"default",variant:"default"}),Mr=v.forwardRef(({className:e,children:n,variant:t,size:o,...s},a)=>{const i=v.useContext(_r);return r.jsx(rn.Item,{ref:a,className:x(Gn({variant:i.variant||t,size:i.size||o}),e),...s,children:n})});Mr.displayName=rn.Item.displayName;function qn({selected:e,onSelect:n,className:t,disabled:o}){const[s,a]=v.useState(()=>e?be.startOfMonth(e):be.startOfMonth(new Date)),i=be.startOfMonth(s),l=be.endOfMonth(s),c=be.startOfWeek(i,{weekStartsOn:1}),d=be.endOfWeek(l,{weekStartsOn:1}),g=be.eachDayOfInterval({start:c,end:d}),u=["Mo","Tu","We","Th","Fr","Sa","Su"],f=()=>{a(be.subMonths(s,1))},m=()=>{a(be.addMonths(s,1))},p=h=>{o!=null&&o(h)||n==null||n(be.isSameDay(h,e||new Date(0))?void 0:h)};return r.jsxs("div",{className:x("p-4 bg-card rounded-xl border shadow-sm w-[320px]",t),children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx(pe,{variant:"ghost",size:"icon",onClick:f,className:"h-8 w-8 rounded-full hover:bg-accent",children:r.jsx(A.ChevronLeft,{className:"h-4 w-4"})}),r.jsx("h2",{className:"text-base font-semibold",children:be.format(s,"MMMM yyyy")}),r.jsx(pe,{variant:"ghost",size:"icon",onClick:m,className:"h-8 w-8 rounded-full hover:bg-accent",children:r.jsx(A.ChevronRight,{className:"h-4 w-4"})})]}),r.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:u.map(h=>r.jsx("div",{className:"h-8 flex items-center justify-center text-xs font-medium text-muted-foreground",children:h},h))}),r.jsx("div",{className:"grid grid-cols-7 gap-1",children:g.map((h,w)=>{const b=be.isSameMonth(h,s),y=e&&be.isSameDay(h,e),N=be.isToday(h),R=o==null?void 0:o(h);return r.jsx("button",{onClick:()=>p(h),disabled:R,className:x("h-10 w-10 rounded-lg text-sm font-medium transition-all duration-150","flex items-center justify-center","hover:bg-accent focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-1",!b&&"text-muted-foreground/40",b&&!y&&"text-foreground hover:text-foreground",y&&"bg-primary text-primary-foreground hover:bg-primary/90 shadow-md",N&&!y&&"bg-accent text-accent-foreground font-bold",R&&"opacity-30 cursor-not-allowed hover:bg-transparent"),children:be.format(h,"d")},w)})}),r.jsxs("div",{className:"mt-4 pt-3 border-t flex justify-between items-center",children:[r.jsx(pe,{variant:"ghost",size:"sm",onClick:()=>{const h=new Date;a(be.startOfMonth(h)),n==null||n(h)},className:"text-xs",children:"Today"}),e&&r.jsx("span",{className:"text-xs text-muted-foreground",children:be.format(e,"MMM d, yyyy")})]})]})}qn.displayName="Calendar";const ht=Pt.Root,xt=Pt.Trigger,lt=v.forwardRef(({className:e,align:n="center",sideOffset:t=4,...o},s)=>r.jsx(Pt.Portal,{children:r.jsx(Pt.Content,{ref:s,align:n,sideOffset:t,className:x("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));lt.displayName=Pt.Content.displayName;const It={chatInput_placeholder:"Type a message...",chatInput_attachFile:"Attach file",chatInput_stopGenerating:"Stop generating",chatInput_sendMessage:"Send message",conversationList_newChat:"New Chat",conversationList_searchPlaceholder:"Search conversations...",conversationList_noResults:"No conversations found",conversationList_empty:"No conversations yet",conversationList_today:"Today",conversationList_yesterday:"Yesterday",conversationList_previous7Days:"Previous 7 days",conversationList_older:"Older",conversationList_rename:"Rename",conversationList_delete:"Delete",chatHeader_online:"Online",chatHeader_offline:"Offline",chatHeader_typing:"Typing...",chatHeader_back:"Back",chatHeader_clearConversation:"Clear conversation",chatHeader_settings:"Settings",reasoning_title:"Reasoning",reasoning_thinking:"Thinking",reasoning_thoughtFor:"Thought for {duration}",toolCall_calling:"Calling {name}...",toolCall_failed:"{name} — failed",toolCall_arguments:"Arguments",toolCall_result:"Result",toolCall_error:"Error",messageActions_copy:"Copy",messageActions_retry:"Retry",messageActions_edit:"Edit",messageActions_like:"Like",messageActions_dislike:"Dislike",messageActions_share:"Share",messageActions_copied:"Copied!",followUp_freeTextPlaceholder:"Or type your answer...",followUp_send:"Send",sourceCitation_sources:"Sources",aiLoading_thinking:"Thinking",filePreview_remove:"Remove {name}",modelSelector_placeholder:"Select model",modelSelector_searchPlaceholder:"Search models...",modelSelector_noResults:"No models found",common_close:"Close",common_search:"Search",common_noResults:"No results found.",common_previous:"Previous",common_next:"Next",common_more:"More",common_copyCode:"Copy code",combobox_placeholder:"Select option...",combobox_searchPlaceholder:"Search...",combobox_empty:"No results found.",multiselect_placeholder:"Select options...",multiselect_searchPlaceholder:"Search...",multiselect_empty:"No results found.",multiselect_selected:"{count} selected",datePicker_placeholder:"Pick a date",dataTable_searchPlaceholder:"Search...",dataTable_noResults:"No results.",dataTable_pageOf:"Page {page} of {total}",dataTable_previous:"Previous",dataTable_next:"Next",fileUpload_dragDrop:"Drag & drop files here, or click to select",fileUpload_maxSize:"Max file size: {size}",tagInput_placeholder:"Add tag...",pagination_previous:"Previous",pagination_next:"Next",pagination_morePages:"More pages",pagination_goToPrevious:"Go to previous page",pagination_goToNext:"Go to next page",modeToggle_toggleTheme:"Toggle theme",modeToggle_light:"Light",modeToggle_dark:"Dark",modeToggle_system:"System",modeToggle_colorTheme:"Color theme",carousel_previousSlide:"Previous slide",carousel_nextSlide:"Next slide",breadcrumb_more:"More"},Pr={chatInput_placeholder:"Введите сообщение...",chatInput_attachFile:"Прикрепить файл",chatInput_stopGenerating:"Остановить генерацию",chatInput_sendMessage:"Отправить сообщение",conversationList_newChat:"Новый чат",conversationList_searchPlaceholder:"Поиск диалогов...",conversationList_noResults:"Диалоги не найдены",conversationList_empty:"Нет диалогов",conversationList_today:"Сегодня",conversationList_yesterday:"Вчера",conversationList_previous7Days:"Последние 7 дней",conversationList_older:"Ранее",conversationList_rename:"Переименовать",conversationList_delete:"Удалить",chatHeader_online:"Онлайн",chatHeader_offline:"Не в сети",chatHeader_typing:"Печатает...",chatHeader_back:"Назад",chatHeader_clearConversation:"Очистить диалог",chatHeader_settings:"Настройки",reasoning_title:"Рассуждение",reasoning_thinking:"Думаю",reasoning_thoughtFor:"Думал {duration}",toolCall_calling:"Вызываю {name}...",toolCall_failed:"{name} — ошибка",toolCall_arguments:"Аргументы",toolCall_result:"Результат",toolCall_error:"Ошибка",messageActions_copy:"Копировать",messageActions_retry:"Повторить",messageActions_edit:"Редактировать",messageActions_like:"Нравится",messageActions_dislike:"Не нравится",messageActions_share:"Поделиться",messageActions_copied:"Скопировано!",followUp_freeTextPlaceholder:"Или введите свой ответ...",followUp_send:"Отправить",sourceCitation_sources:"Источники",aiLoading_thinking:"Думаю",filePreview_remove:"Удалить {name}",modelSelector_placeholder:"Выберите модель",modelSelector_searchPlaceholder:"Поиск моделей...",modelSelector_noResults:"Модели не найдены",common_close:"Закрыть",common_search:"Поиск",common_noResults:"Ничего не найдено.",common_previous:"Назад",common_next:"Далее",common_more:"Ещё",common_copyCode:"Копировать код",combobox_placeholder:"Выберите...",combobox_searchPlaceholder:"Поиск...",combobox_empty:"Ничего не найдено.",multiselect_placeholder:"Выберите...",multiselect_searchPlaceholder:"Поиск...",multiselect_empty:"Ничего не найдено.",multiselect_selected:"{count} выбрано",datePicker_placeholder:"Выберите дату",dataTable_searchPlaceholder:"Поиск...",dataTable_noResults:"Нет результатов.",dataTable_pageOf:"Страница {page} из {total}",dataTable_previous:"Назад",dataTable_next:"Далее",fileUpload_dragDrop:"Перетащите файлы сюда или нажмите для выбора",fileUpload_maxSize:"Макс. размер файла: {size}",tagInput_placeholder:"Добавить тег...",pagination_previous:"Назад",pagination_next:"Далее",pagination_morePages:"Ещё страницы",pagination_goToPrevious:"Предыдущая страница",pagination_goToNext:"Следующая страница",modeToggle_toggleTheme:"Сменить тему",modeToggle_light:"Светлая",modeToggle_dark:"Тёмная",modeToggle_system:"Системная",modeToggle_colorTheme:"Цветовая тема",carousel_previousSlide:"Предыдущий слайд",carousel_nextSlide:"Следующий слайд",breadcrumb_more:"Ещё"},Pl={en:It,ru:Pr},Ir=v.createContext(It);function Il({locale:e="en",children:n}){const t=v.useMemo(()=>typeof e=="string"?Pl[e]??It:{...It,...e},[e]);return r.jsx(Ir.Provider,{value:t,children:n})}function Z(){return v.useContext(Ir)}function Be(e,n){let t=e;for(const[o,s]of Object.entries(n))t=t.replace(`{${o}}`,String(s));return t}function Tl({value:e,onChange:n,placeholder:t,disabled:o,className:s}){const a=Z(),i=t??a.datePicker_placeholder,[l,c]=v.useState(!1);return r.jsxs(ht,{open:l,onOpenChange:c,children:[r.jsx(xt,{asChild:!0,children:r.jsxs(pe,{variant:"outline",disabled:o,className:x("w-full justify-start text-left font-normal",!e&&"text-muted-foreground",s),children:[r.jsx(A.CalendarIcon,{className:"mr-2 h-4 w-4"}),e?be.format(e,"PPP"):r.jsx("span",{children:i})]})}),r.jsx(lt,{className:"w-auto p-0",align:"start",children:r.jsx(qn,{selected:e,onSelect:d=>{n==null||n(d),c(!1)}})})]})}function Ll({value:e={hours:12,minutes:0},onChange:n,is24Hour:t=!1,disabled:o,className:s}){const[a,i]=v.useState(!1),[l,c]=v.useState(e.hours>=12?"PM":"AM"),d=t?e.hours:e.hours===0?12:e.hours>12?e.hours-12:e.hours,g=()=>{const w=d.toString().padStart(2,"0"),b=e.minutes.toString().padStart(2,"0");return t?`${w}:${b}`:`${w}:${b} ${l}`},u=w=>{let b=w;t||(l==="PM"&&w!==12&&(b+=12),l==="AM"&&w===12&&(b=0)),n==null||n({...e,hours:b})},f=w=>{n==null||n({...e,minutes:w})},m=w=>{c(w);let b=e.hours;w==="PM"&&e.hours<12&&(b+=12),w==="AM"&&e.hours>=12&&(b-=12),n==null||n({...e,hours:b})},p=t?Array.from({length:24},(w,b)=>b):Array.from({length:12},(w,b)=>b+1),h=Array.from({length:12},(w,b)=>b*5);return r.jsxs(ht,{open:a,onOpenChange:i,children:[r.jsx(xt,{asChild:!0,children:r.jsxs(pe,{variant:"outline",disabled:o,className:x("w-full justify-start font-normal",s),children:[r.jsx(A.Clock,{className:"mr-2 h-4 w-4"}),g()]})}),r.jsx(lt,{className:"w-auto p-2",align:"start",children:r.jsxs("div",{className:"flex gap-1",children:[r.jsx("div",{className:"h-32 w-12 overflow-y-auto rounded border bg-muted/30",children:p.map(w=>r.jsx("button",{onClick:()=>u(w),className:x("w-full py-1 text-sm font-medium transition-colors","hover:bg-accent",d===w&&"bg-primary text-primary-foreground hover:bg-primary/90"),children:w.toString().padStart(2,"0")},w))}),r.jsx("div",{className:"flex items-center text-muted-foreground font-bold",children:":"}),r.jsx("div",{className:"h-32 w-12 overflow-y-auto rounded border bg-muted/30",children:h.map(w=>r.jsx("button",{onClick:()=>f(w),className:x("w-full py-1 text-sm font-medium transition-colors","hover:bg-accent",e.minutes===w&&"bg-primary text-primary-foreground hover:bg-primary/90"),children:w.toString().padStart(2,"0")},w))}),!t&&r.jsxs("div",{className:"flex flex-col gap-1",children:[r.jsx("button",{onClick:()=>m("AM"),className:x("px-2 py-1 text-xs font-medium rounded border transition-colors flex-1","hover:bg-accent",l==="AM"&&"bg-primary text-primary-foreground border-primary"),children:"AM"}),r.jsx("button",{onClick:()=>m("PM"),className:x("px-2 py-1 text-xs font-medium rounded border transition-colors flex-1","hover:bg-accent",l==="PM"&&"bg-primary text-primary-foreground border-primary"),children:"PM"})]})]})})]})}function Dl({value:e=0,onChange:n,min:t=-1/0,max:o=1/0,step:s=1,disabled:a,className:i}){const l=()=>{const g=Math.min(e+s,o);n==null||n(g)},c=()=>{const g=Math.max(e-s,t);n==null||n(g)},d=g=>{const u=parseFloat(g.target.value);if(!isNaN(u)){const f=Math.min(Math.max(u,t),o);n==null||n(f)}};return r.jsxs("div",{className:x("flex items-center gap-2",i),children:[r.jsx(pe,{type:"button",variant:"outline",size:"icon",onClick:c,disabled:a||e<=t,className:"h-9 w-9",children:r.jsx(A.Minus,{className:"h-4 w-4"})}),r.jsx(Je,{type:"number",value:e,onChange:d,disabled:a,className:"w-20 text-center [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",min:t,max:o,step:s}),r.jsx(pe,{type:"button",variant:"outline",size:"icon",onClick:l,disabled:a||e>=o,className:"h-9 w-9",children:r.jsx(A.Plus,{className:"h-4 w-4"})})]})}function Fl({values:e=[],onChange:n,placeholder:t,disabled:o,className:s,maxTags:a}){const i=Z(),l=t??i.tagInput_placeholder,[c,d]=v.useState(""),g=v.useRef(null),u=m=>{if(m.key==="Enter"&&c.trim()){if(m.preventDefault(),a&&e.length>=a)return;e.includes(c.trim())||n==null||n([...e,c.trim()]),d("")}else m.key==="Backspace"&&!c&&e.length>0&&(n==null||n(e.slice(0,-1)))},f=m=>{n==null||n(e.filter(p=>p!==m))};return r.jsxs("div",{className:x("flex flex-wrap gap-2 rounded-md border border-input bg-background px-3 py-2 focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",o&&"opacity-50 cursor-not-allowed",s),onClick:()=>{var m;return(m=g.current)==null?void 0:m.focus()},children:[e.map(m=>r.jsxs(Bn,{variant:"secondary",className:"gap-1",children:[m,!o&&r.jsx("button",{type:"button",onClick:p=>{p.stopPropagation(),f(m)},className:"ml-1 rounded-full outline-none hover:bg-muted",children:r.jsx(A.X,{className:"h-3 w-3"})})]},m)),r.jsx("input",{ref:g,type:"text",value:c,onChange:m=>d(m.target.value),onKeyDown:u,placeholder:e.length===0?l:"",disabled:o||(a?e.length>=a:!1),className:"flex-1 min-w-[120px] bg-transparent outline-none placeholder:text-muted-foreground text-sm"})]})}function Al({options:e,value:n,onChange:t,placeholder:o,searchPlaceholder:s,emptyText:a,disabled:i,className:l}){const c=Z(),d=o??c.combobox_placeholder,g=s??c.combobox_searchPlaceholder,u=a??c.combobox_empty,[f,m]=v.useState(!1),[p,h]=v.useState(""),w=e.filter(y=>y.label.toLowerCase().includes(p.toLowerCase())),b=e.find(y=>y.value===n);return r.jsxs(ht,{open:f,onOpenChange:m,children:[r.jsx(xt,{asChild:!0,children:r.jsxs(pe,{variant:"outline",role:"combobox","aria-expanded":f,disabled:i,className:x("w-full justify-between font-normal",!n&&"text-muted-foreground",l),children:[b?b.label:d,r.jsx(A.ChevronsUpDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),r.jsxs(lt,{className:"w-full p-0",align:"start",children:[r.jsx("div",{className:"p-2 border-b",children:r.jsx(Je,{placeholder:g,value:p,onChange:y=>h(y.target.value),className:"h-8"})}),r.jsx("div",{className:"max-h-60 overflow-auto p-1",children:w.length===0?r.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:u}):w.map(y=>r.jsxs("button",{onClick:()=>{t==null||t(y.value===n?"":y.value),m(!1),h("")},className:x("relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground",n===y.value&&"bg-accent"),children:[r.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n===y.value&&r.jsx(A.Check,{className:"h-4 w-4"})}),y.label]},y.value))})]})]})}function El({options:e,value:n=[],onChange:t,placeholder:o,searchPlaceholder:s,emptyText:a,disabled:i,className:l,maxDisplay:c=3}){const d=Z(),g=o??d.multiselect_placeholder,u=s??d.multiselect_searchPlaceholder,f=a??d.multiselect_empty,[m,p]=v.useState(!1),[h,w]=v.useState(""),b=e.filter(S=>S.label.toLowerCase().includes(h.toLowerCase())),y=e.filter(S=>n.includes(S.value)),N=S=>{const k=n.includes(S)?n.filter(C=>C!==S):[...n,S];t==null||t(k)},R=(S,k)=>{k.stopPropagation(),t==null||t(n.filter(C=>C!==S))},_=()=>n.length===0?g:n.length<=c?y.map(S=>S.label).join(", "):Be(d.multiselect_selected,{count:n.length});return r.jsxs(ht,{open:m,onOpenChange:p,children:[r.jsx(xt,{asChild:!0,children:r.jsxs(pe,{variant:"outline",role:"combobox","aria-expanded":m,disabled:i,className:x("w-full justify-between font-normal",n.length===0&&"text-muted-foreground",l),children:[r.jsx("span",{className:"truncate",children:_()}),r.jsx(A.ChevronsUpDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),r.jsxs(lt,{className:"w-full p-0",align:"start",children:[r.jsx("div",{className:"p-2 border-b",children:r.jsx(Je,{placeholder:u,value:h,onChange:S=>w(S.target.value),className:"h-8"})}),n.length>0&&r.jsx("div",{className:"flex flex-wrap gap-1 p-2 border-b",children:y.map(S=>r.jsxs(Bn,{variant:"secondary",className:"pr-1",children:[S.label,r.jsx("button",{onClick:k=>R(S.value,k),className:"ml-1 rounded-full hover:bg-muted",children:r.jsx(A.X,{className:"h-3 w-3"})})]},S.value))}),r.jsx("div",{className:"max-h-60 overflow-auto p-1",children:b.length===0?r.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:f}):b.map(S=>{const k=n.includes(S.value);return r.jsxs("button",{onClick:()=>N(S.value),className:x("relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground",k&&"bg-accent"),children:[r.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:k&&r.jsx(A.Check,{className:"h-4 w-4"})}),S.label]},S.value)})})]})]})}function Vl({length:e=6,value:n="",onChange:t,onComplete:o,disabled:s,className:a}){const i=v.useRef([]),l=(g,u)=>{var p;if(!/^\d*$/.test(u))return;const f=n.split("");f[g]=u;const m=f.join("").slice(0,e);t==null||t(m),u&&g<e-1&&((p=i.current[g+1])==null||p.focus()),m.length===e&&(o==null||o(m))},c=(g,u)=>{var f;u.key==="Backspace"&&!n[g]&&g>0&&((f=i.current[g-1])==null||f.focus())},d=g=>{var f;g.preventDefault();const u=g.clipboardData.getData("text").replace(/\D/g,"").slice(0,e);t==null||t(u),u.length===e&&(o==null||o(u)),(f=i.current[Math.min(u.length,e-1)])==null||f.focus()};return r.jsx("div",{className:x("flex gap-2",a),children:Array.from({length:e}).map((g,u)=>r.jsx("input",{ref:f=>{i.current[u]=f},type:"text",inputMode:"numeric",maxLength:1,value:n[u]||"",onChange:f=>l(u,f.target.value),onKeyDown:f=>c(u,f),onPaste:d,disabled:s,className:x("h-12 w-12 rounded-lg border border-input bg-background text-center text-lg font-semibold","focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2","disabled:opacity-50 disabled:cursor-not-allowed")},u))})}function $l({accept:e,maxSize:n,multiple:t=!1,onUpload:o,disabled:s,className:a}){const[i,l]=v.useState([]),[c,d]=v.useState(!1),g=v.useRef(null),u=Z(),f=y=>{if(!y)return;const N=Array.from(y).filter(_=>!(n&&_.size>n)),R=t?[...i,...N]:N.slice(0,1);l(R),o==null||o(R)},m=y=>{y.preventDefault(),d(!1),s||f(y.dataTransfer.files)},p=y=>{y.preventDefault(),s||d(!0)},h=()=>{d(!1)},w=y=>{const N=i.filter((R,_)=>_!==y);l(N),o==null||o(N)},b=y=>y<1024?y+" B":y<1024*1024?(y/1024).toFixed(1)+" KB":(y/(1024*1024)).toFixed(1)+" MB";return r.jsxs("div",{className:x("space-y-4",a),children:[r.jsxs("div",{onClick:()=>{var y;return!s&&((y=g.current)==null?void 0:y.click())},onDrop:m,onDragOver:p,onDragLeave:h,className:x("border-2 border-dashed rounded-lg p-8 text-center transition-colors cursor-pointer",c?"border-primary bg-primary/5":"border-muted-foreground/25",s&&"opacity-50 cursor-not-allowed","hover:border-primary/50"),children:[r.jsx(A.Upload,{className:"h-10 w-10 mx-auto mb-4 text-muted-foreground"}),r.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:u.fileUpload_dragDrop}),n&&r.jsx("p",{className:"text-xs text-muted-foreground",children:Be(u.fileUpload_maxSize,{size:b(n)})}),r.jsx("input",{ref:g,type:"file",accept:e,multiple:t,onChange:y=>f(y.target.files),disabled:s,className:"hidden"})]}),i.length>0&&r.jsx("div",{className:"space-y-2",children:i.map((y,N)=>r.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border bg-muted/50",children:[r.jsx(A.FileIcon,{className:"h-8 w-8 text-muted-foreground"}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("p",{className:"text-sm font-medium truncate",children:y.name}),r.jsx("p",{className:"text-xs text-muted-foreground",children:b(y.size)})]}),r.jsx(pe,{type:"button",variant:"ghost",size:"icon",onClick:()=>w(N),className:"h-8 w-8",children:r.jsx(A.X,{className:"h-4 w-4"})})]},N))})]})}const zl=["#ef4444","#f97316","#eab308","#22c55e","#14b8a6","#3b82f6","#8b5cf6","#ec4899","#000000","#ffffff"];function Xt(e){const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(!n)return{h:0,s:100,l:50};let t=parseInt(n[1],16)/255,o=parseInt(n[2],16)/255,s=parseInt(n[3],16)/255;const a=Math.max(t,o,s),i=Math.min(t,o,s);let l=0,c=0;const d=(a+i)/2;if(a!==i){const g=a-i;switch(c=d>.5?g/(2-a-i):g/(a+i),a){case t:l=((o-s)/g+(o<s?6:0))/6;break;case o:l=((s-t)/g+2)/6;break;case s:l=((t-o)/g+4)/6;break}}return{h:Math.round(l*360),s:Math.round(c*100),l:Math.round(d*100)}}function Bl(e,n,t){n/=100,t/=100;const o=n*Math.min(t,1-t),s=a=>{const i=(a+e/30)%12,l=t-o*Math.max(Math.min(i-3,9-i,1),-1);return Math.round(255*l).toString(16).padStart(2,"0")};return`#${s(0)}${s(8)}${s(4)}`}function Ol({value:e="#3b82f6",onChange:n,disabled:t,className:o}){const[s,a]=v.useState(!1),[i,l]=v.useState(()=>Xt(e)),[c,d]=v.useState(e),g=v.useRef(null);v.useEffect(()=>{l(Xt(e)),d(e)},[e]);const u=p=>{l(p);const h=Bl(p.h,p.s,p.l);d(h),n==null||n(h)},f=p=>{if(!g.current)return;const h=g.current.getBoundingClientRect(),w=Math.max(0,Math.min(1,(p.clientX-h.left)/h.width)),b=Math.max(0,Math.min(1,(p.clientY-h.top)/h.height));u({...i,s:Math.round(w*100),l:Math.round((1-b)*100)})},m=p=>{if(d(p),/^#[0-9A-Fa-f]{6}$/.test(p)){const h=Xt(p);l(h),n==null||n(p)}};return r.jsxs(ht,{open:s,onOpenChange:a,children:[r.jsx(xt,{asChild:!0,children:r.jsxs(pe,{variant:"outline",disabled:t,className:x("w-full justify-start gap-2",o),children:[r.jsx("div",{className:"h-5 w-5 rounded border shadow-sm",style:{backgroundColor:e}}),r.jsx("span",{className:"font-mono text-sm",children:e})]})}),r.jsx(lt,{className:"w-72 p-3",align:"start",children:r.jsxs("div",{className:"space-y-3",children:[r.jsx("div",{ref:g,onClick:f,className:"relative h-40 rounded-lg cursor-crosshair overflow-hidden border",style:{background:`
|
|
2
2
|
linear-gradient(to top, #000 0%, transparent 100%),
|
|
3
3
|
linear-gradient(to right, #fff 0%, hsl(${i.h}, 100%, 50%) 100%)
|
|
4
|
-
`},children:
|
|
4
|
+
`},children:r.jsx("div",{className:"absolute w-4 h-4 rounded-full border-2 border-white shadow-md transform -translate-x-1/2 -translate-y-1/2 pointer-events-none",style:{left:`${i.s}%`,top:`${100-i.l}%`,backgroundColor:e}})}),r.jsxs("div",{className:"space-y-1",children:[r.jsx(an,{className:"text-xs",children:"Hue"}),r.jsx("input",{type:"range",min:0,max:360,value:i.h,onChange:p=>u({...i,h:parseInt(p.target.value)}),className:"w-full h-3 rounded-lg appearance-none cursor-pointer",style:{background:`linear-gradient(to right,
|
|
5
5
|
hsl(0, 100%, 50%),
|
|
6
6
|
hsl(60, 100%, 50%),
|
|
7
7
|
hsl(120, 100%, 50%),
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
hsl(240, 100%, 50%),
|
|
10
10
|
hsl(300, 100%, 50%),
|
|
11
11
|
hsl(360, 100%, 50%)
|
|
12
|
-
)`}})]}),o.jsxs("div",{className:"flex gap-2 items-center",children:[o.jsx("div",{className:"h-9 w-9 rounded-md border flex-shrink-0 shadow-inner",style:{backgroundColor:e}}),o.jsx(Je,{value:c,onChange:p=>m(p.target.value),placeholder:"#000000",className:"font-mono text-sm"})]}),o.jsx("div",{className:"grid grid-cols-5 gap-1.5",children:Vl.map(p=>o.jsx("button",{onClick:()=>{t==null||t(p),l(Xt(p)),d(p)},className:x("h-7 w-7 rounded-md border-2 transition-transform hover:scale-110",e===p?"border-primary ring-2 ring-ring":"border-transparent"),style:{backgroundColor:p}},p))})]})})]})}const Io=w.forwardRef(({className:e,as:t="div",...n},r)=>o.jsx(t,{ref:r,className:x(e),...n}));Io.displayName="Box";const Po=w.forwardRef(({className:e,direction:t,wrap:n,justify:r,align:s,gap:a,style:i,...l},c)=>o.jsx("div",{ref:c,className:x("flex",t&&`flex-${t}`,n&&`flex-${n}`,r&&`justify-${r}`,s&&`items-${s}`,typeof a=="number"&&`gap-${a}`,e),style:{...typeof a=="string"?{gap:a}:{},...i},...l}));Po.displayName="Flex";const Lo=w.forwardRef(({className:e,spacing:t=4,align:n,style:r,...s},a)=>o.jsx("div",{ref:a,className:x("flex flex-col",typeof t=="number"&&`gap-${t}`,n&&`items-${n}`,e),style:{...typeof t=="string"?{gap:t}:{},...r},...s}));Lo.displayName="VStack";const Do=w.forwardRef(({className:e,spacing:t=4,align:n="center",style:r,...s},a)=>o.jsx("div",{ref:a,className:x("flex flex-row",typeof t=="number"&&`gap-${t}`,n&&`items-${n}`,e),style:{...typeof t=="string"?{gap:t}:{},...r},...s}));Do.displayName="HStack";const To=w.forwardRef(({className:e,cols:t=1,gap:n=4,style:r,...s},a)=>{const i=typeof t=="number"?`grid-cols-${t}`:[t.sm&&`sm:grid-cols-${t.sm}`,t.md&&`md:grid-cols-${t.md}`,t.lg&&`lg:grid-cols-${t.lg}`,t.xl&&`xl:grid-cols-${t.xl}`].filter(Boolean).join(" ");return o.jsx("div",{ref:a,className:x("grid",i,typeof n=="number"&&`gap-${n}`,e),style:{...typeof n=="string"?{gap:n}:{},...r},...s})});To.displayName="Grid";const Bl={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-full"},Fo=w.forwardRef(({className:e,maxWidth:t="lg",centered:n=!0,...r},s)=>o.jsx("div",{ref:s,className:x("w-full px-4",Bl[t],n&&"mx-auto",e),...r}));Fo.displayName="Container";const Ol=Ei.Root,Hl=$n.Root,Gl=$n.CollapsibleTrigger,Ao=w.forwardRef(({className:e,children:t,...n},r)=>o.jsx($n.CollapsibleContent,{ref:r,className:x("overflow-hidden transition-all duration-300 ease-in-out","data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",e),...n,children:o.jsx("div",{className:"pb-2",children:t})}));Ao.displayName="CollapsibleContent";const Eo=Fe("rounded-xl text-card-foreground transition-all duration-300",{variants:{variant:{default:"border bg-card shadow-sm",elevated:"border border-white/10 bg-gradient-to-br from-card/80 to-card/40 backdrop-blur-xl shadow-2xl shadow-black/20",glass:"border border-white/10 bg-white/5 backdrop-blur-xl shadow-xl",ghost:"bg-transparent"}},defaultVariants:{variant:"default"}}),Wn=w.forwardRef(({className:e,variant:t,...n},r)=>o.jsx("div",{ref:r,className:x(Eo({variant:t}),e),...n}));Wn.displayName="Card";const Un=w.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("flex flex-col space-y-1.5 p-6",e),...t}));Un.displayName="CardHeader";const Yn=w.forwardRef(({className:e,...t},n)=>o.jsx("h3",{ref:n,className:x("text-2xl font-semibold leading-none tracking-tight",e),...t}));Yn.displayName="CardTitle";const Vo=w.forwardRef(({className:e,...t},n)=>o.jsx("p",{ref:n,className:x("text-sm text-muted-foreground",e),...t}));Vo.displayName="CardDescription";const Xn=w.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("p-6 pt-0",e),...t}));Xn.displayName="CardContent";const $o=w.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("flex items-center p-6 pt-0",e),...t}));$o.displayName="CardFooter";const Kn=w.forwardRef(({className:e,...t},n)=>o.jsx("div",{className:"relative w-full overflow-auto",children:o.jsx("table",{ref:n,className:x("w-full caption-bottom text-sm",e),...t})}));Kn.displayName="Table";const Zn=w.forwardRef(({className:e,...t},n)=>o.jsx("thead",{ref:n,className:x("[&_tr]:border-b",e),...t}));Zn.displayName="TableHeader";const Jn=w.forwardRef(({className:e,...t},n)=>o.jsx("tbody",{ref:n,className:x("[&_tr:last-child]:border-0",e),...t}));Jn.displayName="TableBody";const zo=w.forwardRef(({className:e,...t},n)=>o.jsx("tfoot",{ref:n,className:x("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));zo.displayName="TableFooter";const St=w.forwardRef(({className:e,...t},n)=>o.jsx("tr",{ref:n,className:x("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));St.displayName="TableRow";const Qn=w.forwardRef(({className:e,...t},n)=>o.jsx("th",{ref:n,className:x("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Qn.displayName="TableHead";const tn=w.forwardRef(({className:e,...t},n)=>o.jsx("td",{ref:n,className:x("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));tn.displayName="TableCell";const Bo=w.forwardRef(({className:e,...t},n)=>o.jsx("caption",{ref:n,className:x("mt-4 text-sm text-muted-foreground",e),...t}));Bo.displayName="TableCaption";const er=w.forwardRef(({className:e,children:t,orientation:n="vertical",...r},s)=>o.jsxs(ot.Root,{ref:s,className:x("relative overflow-hidden",e),...r,children:[o.jsx(ot.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(n==="vertical"||n==="both")&&o.jsx(nn,{orientation:"vertical"}),(n==="horizontal"||n==="both")&&o.jsx(nn,{orientation:"horizontal"}),o.jsx(ot.Corner,{})]}));er.displayName=ot.Root.displayName;const nn=w.forwardRef(({className:e,orientation:t="vertical",...n},r)=>o.jsx(ot.ScrollAreaScrollbar,{ref:r,orientation:t,className:x("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:o.jsx(ot.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));nn.displayName=ot.ScrollAreaScrollbar.displayName;const ql=it.Root,Oo=w.forwardRef(({className:e,...t},n)=>o.jsx(it.List,{ref:n,className:x("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Oo.displayName=it.List.displayName;const Ho=w.forwardRef(({className:e,...t},n)=>o.jsx(it.Trigger,{ref:n,className:x("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));Ho.displayName=it.Trigger.displayName;const Go=w.forwardRef(({className:e,...t},n)=>o.jsx(it.Content,{ref:n,className:x("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Go.displayName=it.Content.displayName;const Wl=st.Root,qo=w.forwardRef(({className:e,...t},n)=>o.jsx(st.Item,{ref:n,className:x("border-b",e),...t}));qo.displayName="AccordionItem";const Wo=w.forwardRef(({className:e,children:t,...n},r)=>o.jsx(st.Header,{className:"flex",children:o.jsxs(st.Trigger,{ref:r,className:x("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,o.jsx(A.ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Wo.displayName=st.Trigger.displayName;const Uo=w.forwardRef(({className:e,children:t,...n},r)=>o.jsx(st.Content,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:o.jsx("div",{className:x("pb-4 pt-0",e),children:t})}));Uo.displayName=st.Content.displayName;const Yo=ee.Root,Ul=ee.Trigger,Xo=ee.Portal,Yl=ee.Close,tr=w.forwardRef(({className:e,...t},n)=>o.jsx(ee.Overlay,{ref:n,className:x("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));tr.displayName=ee.Overlay.displayName;const nr=w.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(Xo,{children:[o.jsx(tr,{}),o.jsxs(ee.Content,{ref:r,className:x("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,o.jsxs(ee.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[o.jsx(A.X,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));nr.displayName=ee.Content.displayName;const Ko=({className:e,...t})=>o.jsx("div",{className:x("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ko.displayName="DialogHeader";const Zo=({className:e,...t})=>o.jsx("div",{className:x("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Zo.displayName="DialogFooter";const Jo=w.forwardRef(({className:e,...t},n)=>o.jsx(ee.Title,{ref:n,className:x("text-lg font-semibold leading-none tracking-tight",e),...t}));Jo.displayName=ee.Title.displayName;const Qo=w.forwardRef(({className:e,...t},n)=>o.jsx(ee.Description,{ref:n,className:x("text-sm text-muted-foreground",e),...t}));Qo.displayName=ee.Description.displayName;const es=ee.Root,ts=ee.Trigger,ns=ee.Close,rs=ee.Portal,rr=w.forwardRef(({className:e,...t},n)=>o.jsx(ee.Overlay,{className:x("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));rr.displayName=ee.Overlay.displayName;const Xl=Fe("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),or=w.forwardRef(({side:e="right",className:t,children:n,...r},s)=>o.jsxs(rs,{children:[o.jsx(rr,{}),o.jsxs(ee.Content,{ref:s,className:x(Xl({side:e}),t),...r,children:[n,o.jsxs(ee.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[o.jsx(A.X,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));or.displayName=ee.Content.displayName;const sr=({className:e,...t})=>o.jsx("div",{className:x("flex flex-col space-y-2 text-center sm:text-left",e),...t});sr.displayName="SheetHeader";const ar=({className:e,...t})=>o.jsx("div",{className:x("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ar.displayName="SheetFooter";const ir=w.forwardRef(({className:e,...t},n)=>o.jsx(ee.Title,{ref:n,className:x("text-lg font-semibold text-foreground",e),...t}));ir.displayName=ee.Title.displayName;const lr=w.forwardRef(({className:e,...t},n)=>o.jsx(ee.Description,{ref:n,className:x("text-sm text-muted-foreground",e),...t}));lr.displayName=ee.Description.displayName;const os=te.Root,ss=te.Trigger,Kl=te.Group,Zl=te.Portal,Jl=te.Sub,Ql=te.RadioGroup,as=w.forwardRef(({className:e,inset:t,children:n,...r},s)=>o.jsxs(te.SubTrigger,{ref:s,className:x("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,o.jsx(A.ChevronRight,{className:"ml-auto h-4 w-4"})]}));as.displayName=te.SubTrigger.displayName;const is=w.forwardRef(({className:e,...t},n)=>o.jsx(te.SubContent,{ref:n,className:x("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));is.displayName=te.SubContent.displayName;const dr=w.forwardRef(({className:e,sideOffset:t=4,...n},r)=>o.jsx(te.Portal,{children:o.jsx(te.Content,{ref:r,sideOffset:t,className:x("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));dr.displayName=te.Content.displayName;const kt=w.forwardRef(({className:e,inset:t,...n},r)=>o.jsx(te.Item,{ref:r,className:x("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));kt.displayName=te.Item.displayName;const ls=w.forwardRef(({className:e,children:t,checked:n,...r},s)=>o.jsxs(te.CheckboxItem,{ref:s,className:x("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(te.ItemIndicator,{children:o.jsx(A.Check,{className:"h-4 w-4"})})}),t]}));ls.displayName=te.CheckboxItem.displayName;const ds=w.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(te.RadioItem,{ref:r,className:x("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(te.ItemIndicator,{children:o.jsx(A.Circle,{className:"h-2 w-2 fill-current"})})}),t]}));ds.displayName=te.RadioItem.displayName;const cs=w.forwardRef(({className:e,inset:t,...n},r)=>o.jsx(te.Label,{ref:r,className:x("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));cs.displayName=te.Label.displayName;const us=w.forwardRef(({className:e,...t},n)=>o.jsx(te.Separator,{ref:n,className:x("-mx-1 my-1 h-px bg-muted",e),...t}));us.displayName=te.Separator.displayName;const fs=({className:e,...t})=>o.jsx("span",{className:x("ml-auto text-xs tracking-widest opacity-60",e),...t});fs.displayName="DropdownMenuShortcut";const ed=Ft.Provider,td=Ft.Root,nd=Ft.Trigger,ms=w.forwardRef(({className:e,sideOffset:t=4,...n},r)=>o.jsx(Ft.Content,{ref:r,sideOffset:t,className:x("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));ms.displayName=Ft.Content.displayName;const cr=w.forwardRef(({className:e,...t},n)=>o.jsx(Me.Command,{ref:n,className:x("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));cr.displayName=Me.Command.displayName;const rd=({children:e,...t})=>o.jsx(Yo,{...t,children:o.jsx(nr,{className:"overflow-hidden p-0 shadow-lg",children:o.jsx(cr,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),gs=w.forwardRef(({className:e,...t},n)=>o.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[o.jsx(A.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),o.jsx(Me.Command.Input,{ref:n,className:x("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));gs.displayName=Me.Command.Input.displayName;const ps=w.forwardRef(({className:e,...t},n)=>o.jsx(Me.Command.List,{ref:n,className:x("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));ps.displayName=Me.Command.List.displayName;const hs=w.forwardRef((e,t)=>o.jsx(Me.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));hs.displayName=Me.Command.Empty.displayName;const xs=w.forwardRef(({className:e,...t},n)=>o.jsx(Me.Command.Group,{ref:n,className:x("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));xs.displayName=Me.Command.Group.displayName;const vs=w.forwardRef(({className:e,...t},n)=>o.jsx(Me.Command.Separator,{ref:n,className:x("-mx-1 h-px bg-border",e),...t}));vs.displayName=Me.Command.Separator.displayName;const ws=w.forwardRef(({className:e,...t},n)=>o.jsx(Me.Command.Item,{ref:n,className:x("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected='true']:text-accent-foreground data-[disabled=true]:opacity-50",e),...t}));ws.displayName=Me.Command.Item.displayName;const bs=({className:e,...t})=>o.jsx("span",{className:x("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});bs.displayName="CommandShortcut";const od=Fe("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),ys=w.forwardRef(({className:e,variant:t,...n},r)=>o.jsx("div",{ref:r,role:"alert",className:x(od({variant:t}),e),...n}));ys.displayName="Alert";const Cs=w.forwardRef(({className:e,...t},n)=>o.jsx("h5",{ref:n,className:x("mb-1 font-medium leading-none tracking-tight",e),...t}));Cs.displayName="AlertTitle";const Ns=w.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("text-sm [&_p]:leading-relaxed",e),...t}));Ns.displayName="AlertDescription";const sd=ke.Root,ad=ke.Trigger,js=ke.Portal,ur=w.forwardRef(({className:e,...t},n)=>o.jsx(ke.Overlay,{className:x("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));ur.displayName=ke.Overlay.displayName;const Ss=w.forwardRef(({className:e,...t},n)=>o.jsxs(js,{children:[o.jsx(ur,{}),o.jsx(ke.Content,{ref:n,className:x("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));Ss.displayName=ke.Content.displayName;const ks=({className:e,...t})=>o.jsx("div",{className:x("flex flex-col space-y-2 text-center sm:text-left",e),...t});ks.displayName="AlertDialogHeader";const Rs=({className:e,...t})=>o.jsx("div",{className:x("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Rs.displayName="AlertDialogFooter";const _s=w.forwardRef(({className:e,...t},n)=>o.jsx(ke.Title,{ref:n,className:x("text-lg font-semibold",e),...t}));_s.displayName=ke.Title.displayName;const Ms=w.forwardRef(({className:e,...t},n)=>o.jsx(ke.Description,{ref:n,className:x("text-sm text-muted-foreground",e),...t}));Ms.displayName=ke.Description.displayName;const Is=w.forwardRef(({className:e,...t},n)=>o.jsx(ke.Action,{ref:n,className:x(At(),e),...t}));Is.displayName=ke.Action.displayName;const Ps=w.forwardRef(({className:e,...t},n)=>o.jsx(ke.Cancel,{ref:n,className:x(At({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Ps.displayName=ke.Cancel.displayName;const Ls=w.forwardRef(({className:e,value:t,...n},r)=>o.jsx(_n.Root,{ref:r,className:x("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:o.jsx(_n.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Ls.displayName=_n.Root.displayName;function id({className:e,...t}){return o.jsx("div",{className:x("animate-pulse rounded-md bg-muted",e),...t})}function ld(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const dd=e=>{switch(e){case"success":return fd;case"info":return gd;case"warning":return md;case"error":return pd;default:return null}},cd=Array(12).fill(0),ud=({visible:e,className:t})=>j.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},j.createElement("div",{className:"sonner-spinner"},cd.map((n,r)=>j.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),fd=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),md=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),gd=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),pd=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),hd=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},j.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),j.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),xd=()=>{const[e,t]=j.useState(document.hidden);return j.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let In=1;class vd{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...s}=t,a=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:In++,i=this.toasts.find(c=>c.id===a),l=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),i?this.toasts=this.toasts.map(c=>c.id===a?(this.publish({...c,...t,id:a,title:r}),{...c,...t,id:a,dismissible:l,title:r}):c):this.addToast({title:r,...s,dismissible:l,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const s=Promise.resolve(t instanceof Function?t():t);let a=r!==void 0,i;const l=s.then(async d=>{if(i=["resolve",d],j.isValidElement(d))a=!1,this.create({id:r,type:"default",message:d});else if(bd(d)&&!d.ok){a=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${d.status}`):n.error,f=typeof n.description=="function"?await n.description(`HTTP error! status: ${d.status}`):n.description,p=typeof u=="object"&&!j.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:f,...p})}else if(d instanceof Error){a=!1;const u=typeof n.error=="function"?await n.error(d):n.error,f=typeof n.description=="function"?await n.description(d):n.description,p=typeof u=="object"&&!j.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:f,...p})}else if(n.success!==void 0){a=!1;const u=typeof n.success=="function"?await n.success(d):n.success,f=typeof n.description=="function"?await n.description(d):n.description,p=typeof u=="object"&&!j.isValidElement(u)?u:{message:u};this.create({id:r,type:"success",description:f,...p})}}).catch(async d=>{if(i=["reject",d],n.error!==void 0){a=!1;const g=typeof n.error=="function"?await n.error(d):n.error,u=typeof n.description=="function"?await n.description(d):n.description,m=typeof g=="object"&&!j.isValidElement(g)?g:{message:g};this.create({id:r,type:"error",description:u,...m})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((d,g)=>l.then(()=>i[0]==="reject"?g(i[1]):d(i[1])).catch(g));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||In++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const _e=new vd,wd=(e,t)=>{const n=(t==null?void 0:t.id)||In++;return _e.addToast({title:e,...t,id:n}),n},bd=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",yd=wd,Cd=()=>_e.toasts,Nd=()=>_e.getActiveToasts(),jd=Object.assign(yd,{success:_e.success,info:_e.info,warning:_e.warning,error:_e.error,custom:_e.custom,message:_e.message,promise:_e.promise,dismiss:_e.dismiss,loading:_e.loading},{getHistory:Cd,getToasts:Nd});ld("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Kt(e){return e.label!==void 0}const Sd=3,kd="24px",Rd="16px",Pr=4e3,_d=356,Md=14,Id=45,Pd=200;function Ge(...e){return e.filter(Boolean).join(" ")}function Ld(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const Dd=e=>{var t,n,r,s,a,i,l,c,d;const{invert:g,toast:u,unstyled:f,interacting:m,setHeights:p,visibleToasts:v,heights:b,index:h,toasts:y,expanded:C,removeToast:S,defaultRichColors:L,closeButton:D,style:k,cancelButtonStyle:N,actionButtonStyle:T,className:G="",descriptionClassName:E="",duration:Z,position:J,gap:R,expandByDefault:X,classNames:V,icons:U,closeButtonAriaLabel:_="Close toast"}=e,[fe,me]=j.useState(null),[le,Ne]=j.useState(null),[F,B]=j.useState(!1),[Y,de]=j.useState(!1),[q,O]=j.useState(!1),[ce,ae]=j.useState(!1),[K,M]=j.useState(!1),[Q,oe]=j.useState(0),[we,Pe]=j.useState(0),je=j.useRef(u.duration||Z||Pr),Be=j.useRef(null),xe=j.useRef(null),qe=h===0,Qe=h+1<=v,be=u.type,Oe=u.dismissible!==!1,Vt=u.className||"",$t=u.descriptionClassName||"",dt=j.useMemo(()=>b.findIndex(H=>H.toastId===u.id)||0,[b,u.id]),zt=j.useMemo(()=>{var H;return(H=u.closeButton)!=null?H:D},[u.closeButton,D]),Bt=j.useMemo(()=>u.duration||Z||Pr,[u.duration,Z]),et=j.useRef(0),Le=j.useRef(0),ct=j.useRef(0),He=j.useRef(null),[ut,mn]=J.split("-"),Ot=j.useMemo(()=>b.reduce((H,ue,pe)=>pe>=dt?H:H+ue.height,0),[b,dt]),Ht=xd(),gn=u.invert||g,vt=be==="loading";Le.current=j.useMemo(()=>dt*R+Ot,[dt,Ot]),j.useEffect(()=>{je.current=Bt},[Bt]),j.useEffect(()=>{B(!0)},[]),j.useEffect(()=>{const H=xe.current;if(H){const ue=H.getBoundingClientRect().height;return Pe(ue),p(pe=>[{toastId:u.id,height:ue,position:u.position},...pe]),()=>p(pe=>pe.filter(Se=>Se.toastId!==u.id))}},[p,u.id]),j.useLayoutEffect(()=>{if(!F)return;const H=xe.current,ue=H.style.height;H.style.height="auto";const pe=H.getBoundingClientRect().height;H.style.height=ue,Pe(pe),p(Se=>Se.find(ye=>ye.toastId===u.id)?Se.map(ye=>ye.toastId===u.id?{...ye,height:pe}:ye):[{toastId:u.id,height:pe,position:u.position},...Se])},[F,u.title,u.description,p,u.id,u.jsx,u.action,u.cancel]);const Ae=j.useCallback(()=>{de(!0),oe(Le.current),p(H=>H.filter(ue=>ue.toastId!==u.id)),setTimeout(()=>{S(u)},Pd)},[u,S,p,Le]);j.useEffect(()=>{if(u.promise&&be==="loading"||u.duration===1/0||u.type==="loading")return;let H;return C||m||Ht?(()=>{if(ct.current<et.current){const Se=new Date().getTime()-et.current;je.current=je.current-Se}ct.current=new Date().getTime()})():(()=>{je.current!==1/0&&(et.current=new Date().getTime(),H=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),Ae()},je.current))})(),()=>clearTimeout(H)},[C,m,u,be,Ht,Ae]),j.useEffect(()=>{u.delete&&(Ae(),u.onDismiss==null||u.onDismiss.call(u,u))},[Ae,u.delete]);function pn(){var H;if(U!=null&&U.loading){var ue;return j.createElement("div",{className:Ge(V==null?void 0:V.loader,u==null||(ue=u.classNames)==null?void 0:ue.loader,"sonner-loader"),"data-visible":be==="loading"},U.loading)}return j.createElement(ud,{className:Ge(V==null?void 0:V.loader,u==null||(H=u.classNames)==null?void 0:H.loader),visible:be==="loading"})}const Gt=u.icon||(U==null?void 0:U[be])||dd(be);var wt,bt;return j.createElement("li",{tabIndex:0,ref:xe,className:Ge(G,Vt,V==null?void 0:V.toast,u==null||(t=u.classNames)==null?void 0:t.toast,V==null?void 0:V.default,V==null?void 0:V[be],u==null||(n=u.classNames)==null?void 0:n[be]),"data-sonner-toast":"","data-rich-colors":(wt=u.richColors)!=null?wt:L,"data-styled":!(u.jsx||u.unstyled||f),"data-mounted":F,"data-promise":!!u.promise,"data-swiped":K,"data-removed":Y,"data-visible":Qe,"data-y-position":ut,"data-x-position":mn,"data-index":h,"data-front":qe,"data-swiping":q,"data-dismissible":Oe,"data-type":be,"data-invert":gn,"data-swipe-out":ce,"data-swipe-direction":le,"data-expanded":!!(C||X&&F),"data-testid":u.testId,style:{"--index":h,"--toasts-before":h,"--z-index":y.length-h,"--offset":`${Y?Q:Le.current}px`,"--initial-height":X?"auto":`${we}px`,...k,...u.style},onDragEnd:()=>{O(!1),me(null),He.current=null},onPointerDown:H=>{H.button!==2&&(vt||!Oe||(Be.current=new Date,oe(Le.current),H.target.setPointerCapture(H.pointerId),H.target.tagName!=="BUTTON"&&(O(!0),He.current={x:H.clientX,y:H.clientY})))},onPointerUp:()=>{var H,ue,pe;if(ce||!Oe)return;He.current=null;const Se=Number(((H=xe.current)==null?void 0:H.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),qt=Number(((ue=xe.current)==null?void 0:ue.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ye=new Date().getTime()-((pe=Be.current)==null?void 0:pe.getTime()),Te=fe==="x"?Se:qt,Wt=Math.abs(Te)/ye;if(Math.abs(Te)>=Id||Wt>.11){oe(Le.current),u.onDismiss==null||u.onDismiss.call(u,u),Ne(fe==="x"?Se>0?"right":"left":qt>0?"down":"up"),Ae(),ae(!0);return}else{var Ee,Ve;(Ee=xe.current)==null||Ee.style.setProperty("--swipe-amount-x","0px"),(Ve=xe.current)==null||Ve.style.setProperty("--swipe-amount-y","0px")}M(!1),O(!1),me(null)},onPointerMove:H=>{var ue,pe,Se;if(!He.current||!Oe||((ue=window.getSelection())==null?void 0:ue.toString().length)>0)return;const ye=H.clientY-He.current.y,Te=H.clientX-He.current.x;var Wt;const Ee=(Wt=e.swipeDirections)!=null?Wt:Ld(J);!fe&&(Math.abs(Te)>1||Math.abs(ye)>1)&&me(Math.abs(Te)>Math.abs(ye)?"x":"y");let Ve={x:0,y:0};const Nr=tt=>1/(1.5+Math.abs(tt)/20);if(fe==="y"){if(Ee.includes("top")||Ee.includes("bottom"))if(Ee.includes("top")&&ye<0||Ee.includes("bottom")&&ye>0)Ve.y=ye;else{const tt=ye*Nr(ye);Ve.y=Math.abs(tt)<Math.abs(ye)?tt:ye}}else if(fe==="x"&&(Ee.includes("left")||Ee.includes("right")))if(Ee.includes("left")&&Te<0||Ee.includes("right")&&Te>0)Ve.x=Te;else{const tt=Te*Nr(Te);Ve.x=Math.abs(tt)<Math.abs(Te)?tt:Te}(Math.abs(Ve.x)>0||Math.abs(Ve.y)>0)&&M(!0),(pe=xe.current)==null||pe.style.setProperty("--swipe-amount-x",`${Ve.x}px`),(Se=xe.current)==null||Se.style.setProperty("--swipe-amount-y",`${Ve.y}px`)}},zt&&!u.jsx&&be!=="loading"?j.createElement("button",{"aria-label":_,"data-disabled":vt,"data-close-button":!0,onClick:vt||!Oe?()=>{}:()=>{Ae(),u.onDismiss==null||u.onDismiss.call(u,u)},className:Ge(V==null?void 0:V.closeButton,u==null||(r=u.classNames)==null?void 0:r.closeButton)},(bt=U==null?void 0:U.close)!=null?bt:hd):null,(be||u.icon||u.promise)&&u.icon!==null&&((U==null?void 0:U[be])!==null||u.icon)?j.createElement("div",{"data-icon":"",className:Ge(V==null?void 0:V.icon,u==null||(s=u.classNames)==null?void 0:s.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||pn():null,u.type!=="loading"?Gt:null):null,j.createElement("div",{"data-content":"",className:Ge(V==null?void 0:V.content,u==null||(a=u.classNames)==null?void 0:a.content)},j.createElement("div",{"data-title":"",className:Ge(V==null?void 0:V.title,u==null||(i=u.classNames)==null?void 0:i.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?j.createElement("div",{"data-description":"",className:Ge(E,$t,V==null?void 0:V.description,u==null||(l=u.classNames)==null?void 0:l.description)},typeof u.description=="function"?u.description():u.description):null),j.isValidElement(u.cancel)?u.cancel:u.cancel&&Kt(u.cancel)?j.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||N,onClick:H=>{Kt(u.cancel)&&Oe&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,H),Ae())},className:Ge(V==null?void 0:V.cancelButton,u==null||(c=u.classNames)==null?void 0:c.cancelButton)},u.cancel.label):null,j.isValidElement(u.action)?u.action:u.action&&Kt(u.action)?j.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||T,onClick:H=>{Kt(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,H),!H.defaultPrevented&&Ae())},className:Ge(V==null?void 0:V.actionButton,u==null||(d=u.classNames)==null?void 0:d.actionButton)},u.action.label):null)};function Lr(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Td(e,t){const n={};return[e,t].forEach((r,s)=>{const a=s===1,i=a?"--mobile-offset":"--offset",l=a?Rd:kd;function c(d){["top","right","bottom","left"].forEach(g=>{n[`${i}-${g}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${i}-${d}`]=l:n[`${i}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):c(l)}),n}const Fd=j.forwardRef(function(t,n){const{id:r,invert:s,position:a="bottom-right",hotkey:i=["altKey","KeyT"],expand:l,closeButton:c,className:d,offset:g,mobileOffset:u,theme:f="light",richColors:m,duration:p,style:v,visibleToasts:b=Sd,toastOptions:h,dir:y=Lr(),gap:C=Md,icons:S,containerAriaLabel:L="Notifications"}=t,[D,k]=j.useState([]),N=j.useMemo(()=>r?D.filter(F=>F.toasterId===r):D.filter(F=>!F.toasterId),[D,r]),T=j.useMemo(()=>Array.from(new Set([a].concat(N.filter(F=>F.position).map(F=>F.position)))),[N,a]),[G,E]=j.useState([]),[Z,J]=j.useState(!1),[R,X]=j.useState(!1),[V,U]=j.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),_=j.useRef(null),fe=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),me=j.useRef(null),le=j.useRef(!1),Ne=j.useCallback(F=>{k(B=>{var Y;return(Y=B.find(de=>de.id===F.id))!=null&&Y.delete||_e.dismiss(F.id),B.filter(({id:de})=>de!==F.id)})},[]);return j.useEffect(()=>_e.subscribe(F=>{if(F.dismiss){requestAnimationFrame(()=>{k(B=>B.map(Y=>Y.id===F.id?{...Y,delete:!0}:Y))});return}setTimeout(()=>{Di.flushSync(()=>{k(B=>{const Y=B.findIndex(de=>de.id===F.id);return Y!==-1?[...B.slice(0,Y),{...B[Y],...F},...B.slice(Y+1)]:[F,...B]})})})}),[D]),j.useEffect(()=>{if(f!=="system"){U(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?U("dark"):U("light")),typeof window>"u")return;const F=window.matchMedia("(prefers-color-scheme: dark)");try{F.addEventListener("change",({matches:B})=>{U(B?"dark":"light")})}catch{F.addListener(({matches:Y})=>{try{U(Y?"dark":"light")}catch(de){console.error(de)}})}},[f]),j.useEffect(()=>{D.length<=1&&J(!1)},[D]),j.useEffect(()=>{const F=B=>{var Y;if(i.every(O=>B[O]||B.code===O)){var q;J(!0),(q=_.current)==null||q.focus()}B.code==="Escape"&&(document.activeElement===_.current||(Y=_.current)!=null&&Y.contains(document.activeElement))&&J(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[i]),j.useEffect(()=>{if(_.current)return()=>{me.current&&(me.current.focus({preventScroll:!0}),me.current=null,le.current=!1)}},[_.current]),j.createElement("section",{ref:n,"aria-label":`${L} ${fe}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((F,B)=>{var Y;const[de,q]=F.split("-");return N.length?j.createElement("ol",{key:F,dir:y==="auto"?Lr():y,tabIndex:-1,ref:_,className:d,"data-sonner-toaster":!0,"data-sonner-theme":V,"data-y-position":de,"data-x-position":q,style:{"--front-toast-height":`${((Y=G[0])==null?void 0:Y.height)||0}px`,"--width":`${_d}px`,"--gap":`${C}px`,...v,...Td(g,u)},onBlur:O=>{le.current&&!O.currentTarget.contains(O.relatedTarget)&&(le.current=!1,me.current&&(me.current.focus({preventScroll:!0}),me.current=null))},onFocus:O=>{O.target instanceof HTMLElement&&O.target.dataset.dismissible==="false"||le.current||(le.current=!0,me.current=O.relatedTarget)},onMouseEnter:()=>J(!0),onMouseMove:()=>J(!0),onMouseLeave:()=>{R||J(!1)},onDragEnd:()=>J(!1),onPointerDown:O=>{O.target instanceof HTMLElement&&O.target.dataset.dismissible==="false"||X(!0)},onPointerUp:()=>X(!1)},N.filter(O=>!O.position&&B===0||O.position===F).map((O,ce)=>{var ae,K;return j.createElement(Dd,{key:O.id,icons:S,index:ce,toast:O,defaultRichColors:m,duration:(ae=h==null?void 0:h.duration)!=null?ae:p,className:h==null?void 0:h.className,descriptionClassName:h==null?void 0:h.descriptionClassName,invert:s,visibleToasts:b,closeButton:(K=h==null?void 0:h.closeButton)!=null?K:c,interacting:R,position:F,style:h==null?void 0:h.style,unstyled:h==null?void 0:h.unstyled,classNames:h==null?void 0:h.classNames,cancelButtonStyle:h==null?void 0:h.cancelButtonStyle,actionButtonStyle:h==null?void 0:h.actionButtonStyle,closeButtonAriaLabel:h==null?void 0:h.closeButtonAriaLabel,removeToast:Ne,toasts:N.filter(M=>M.position==O.position),heights:G.filter(M=>M.position==O.position),setHeights:E,expandByDefault:l,gap:C,expanded:Z,swipeDirections:t.swipeDirections})})):null}))}),vn=["light","dark","system"];function Ad(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Dr(e){return e==="system"?Ad():e}function Ed(e){if(typeof document>"u")return()=>{};const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*, *::before, *::after { transition: none !important; animation: none !important; }")),document.head.appendChild(t),window.getComputedStyle(document.body),()=>{window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{document.head.removeChild(t)})})}}function Vd(e,t){const n=document.documentElement;t==="class"?(n.classList.remove("light","dark"),n.classList.add(e)):n.setAttribute("data-theme",e)}const Ds=j.createContext(void 0);function $d({children:e,defaultTheme:t="system",storageKey:n="nui-theme",attribute:r="class",enableSystem:s=!0,disableTransitionOnChange:a=!1,forcedTheme:i,nonce:l}){const[c,d]=j.useState(()=>{if(typeof window>"u")return t;const h=localStorage.getItem(n);return h&&vn.includes(h)?h:t}),[g,u]=j.useState(()=>Dr(i??c)),f=j.useRef(c);f.current=c;const m=j.useCallback(()=>{const h=i??f.current,y=Dr(h);u(y);let C;a&&(C=Ed(l)),Vd(y,r),C==null||C()},[i,r,a,l]);j.useEffect(()=>{m()},[c,i,m]),j.useEffect(()=>{if(!s)return;const h=window.matchMedia("(prefers-color-scheme: dark)"),y=()=>{(i??f.current)==="system"&&m()};return h.addEventListener("change",y),()=>h.removeEventListener("change",y)},[s,i,m]),j.useEffect(()=>{const h=y=>{if(y.key===n&&y.newValue){const C=y.newValue;vn.includes(C)&&d(C)}};return window.addEventListener("storage",h),()=>window.removeEventListener("storage",h)},[n]);const p=j.useCallback(h=>{!s&&h==="system"||(localStorage.setItem(n,h),d(h))},[n,s]),v=j.useMemo(()=>s?vn:["light","dark"],[s]),b=j.useMemo(()=>({theme:i??c,resolvedTheme:g,setTheme:p,themes:v}),[i,c,g,p,v]);return o.jsx(Ds.Provider,{value:b,children:e})}function ln(){const e=j.useContext(Ds);if(e===void 0)throw new Error("useTheme must be used within a <ThemeProvider>");return e}const zd=({theme:e,...t})=>{let n=e;try{const{resolvedTheme:r}=ln();e||(n=r)}catch{n||(n="system")}return o.jsx(Fd,{theme:n,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t})};function Bd({icon:e,title:t,description:n,action:r,className:s}){return o.jsxs("div",{className:x("flex flex-col items-center justify-center py-12 px-4 text-center",s),children:[e&&o.jsx("div",{className:"mb-4 text-muted-foreground",children:e}),o.jsx("h3",{className:"text-lg font-semibold",children:t}),n&&o.jsx("p",{className:"mt-1 text-sm text-muted-foreground max-w-sm",children:n}),r&&o.jsx("div",{className:"mt-4",children:r})]})}const Ts=w.forwardRef(({...e},t)=>o.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));Ts.displayName="Breadcrumb";const Fs=w.forwardRef(({className:e,...t},n)=>o.jsx("ol",{ref:n,className:x("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));Fs.displayName="BreadcrumbList";const As=w.forwardRef(({className:e,...t},n)=>o.jsx("li",{ref:n,className:x("inline-flex items-center gap-1.5",e),...t}));As.displayName="BreadcrumbItem";const Es=w.forwardRef(({asChild:e,className:t,...n},r)=>{const s=e?Gr.Slot:"a";return o.jsx(s,{ref:r,className:x("transition-colors hover:text-foreground",t),...n})});Es.displayName="BreadcrumbLink";const Vs=w.forwardRef(({className:e,...t},n)=>o.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:x("font-normal text-foreground",e),...t}));Vs.displayName="BreadcrumbPage";const $s=({children:e,className:t,...n})=>o.jsx("li",{role:"presentation","aria-hidden":"true",className:x("[&>svg]:w-3.5 [&>svg]:h-3.5",t),...n,children:e??o.jsx(A.ChevronRight,{})});$s.displayName="BreadcrumbSeparator";const zs=({className:e,...t})=>o.jsxs("span",{role:"presentation","aria-hidden":"true",className:x("flex h-9 w-9 items-center justify-center",e),...t,children:[o.jsx("span",{className:"h-4 w-4",children:"..."}),o.jsx("span",{className:"sr-only",children:"More"})]});zs.displayName="BreadcrumbEllipsis";const Bs=({className:e,...t})=>o.jsx("nav",{role:"navigation","aria-label":"pagination",className:x("mx-auto flex w-full justify-center",e),...t});Bs.displayName="Pagination";const Os=w.forwardRef(({className:e,...t},n)=>o.jsx("ul",{ref:n,className:x("flex flex-row items-center gap-1",e),...t}));Os.displayName="PaginationContent";const Hs=w.forwardRef(({className:e,...t},n)=>o.jsx("li",{ref:n,className:x("",e),...t}));Hs.displayName="PaginationItem";const dn=({className:e,isActive:t,size:n="icon",...r})=>o.jsx("a",{"aria-current":t?"page":void 0,className:x(At({variant:t?"outline":"ghost",size:n}),e),...r});dn.displayName="PaginationLink";const Gs=({className:e,...t})=>o.jsxs(dn,{"aria-label":"Go to previous page",size:"default",className:x("gap-1 pl-2.5",e),...t,children:[o.jsx(A.ChevronLeft,{className:"h-4 w-4"}),o.jsx("span",{children:"Previous"})]});Gs.displayName="PaginationPrevious";const qs=({className:e,...t})=>o.jsxs(dn,{"aria-label":"Go to next page",size:"default",className:x("gap-1 pr-2.5",e),...t,children:[o.jsx("span",{children:"Next"}),o.jsx(A.ChevronRight,{className:"h-4 w-4"})]});qs.displayName="PaginationNext";const Ws=({className:e,...t})=>o.jsxs("span",{"aria-hidden":!0,className:x("flex h-9 w-9 items-center justify-center",e),...t,children:[o.jsx(A.MoreHorizontal,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"More pages"})]});Ws.displayName="PaginationEllipsis";function Od({steps:e,activeStep:t,orientation:n="horizontal",className:r}){return o.jsx("div",{className:x("flex",n==="vertical"?"flex-col":"flex-row items-center",r),children:e.map((s,a)=>{const i=a<t,l=a===t,c=a===e.length-1;return o.jsxs(w.Fragment,{children:[o.jsxs("div",{className:x("flex items-center",n==="vertical"&&"flex-row"),children:[o.jsx("div",{className:x("flex h-10 w-10 items-center justify-center rounded-full border-2 font-semibold transition-colors",i&&"border-primary bg-primary text-primary-foreground",l&&"border-primary text-primary",!i&&!l&&"border-muted-foreground/30 text-muted-foreground"),children:i?o.jsx(A.Check,{className:"h-5 w-5"}):a+1}),o.jsxs("div",{className:x("ml-3",n==="horizontal"&&"hidden sm:block"),children:[o.jsx("p",{className:x("text-sm font-medium",l&&"text-foreground",!l&&"text-muted-foreground"),children:s.title}),s.description&&o.jsx("p",{className:"text-xs text-muted-foreground",children:s.description})]})]}),!c&&o.jsx("div",{className:x("flex-1",n==="horizontal"?"mx-4 h-0.5 min-w-[3rem]":"ml-5 my-2 w-0.5 min-h-[2rem]",i?"bg-primary":"bg-muted-foreground/30")})]},a)})})}const Us=w.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(Ie.Root,{ref:r,className:x("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...n,children:[t,o.jsx(fr,{})]}));Us.displayName=Ie.Root.displayName;const Ys=w.forwardRef(({className:e,...t},n)=>o.jsx(Ie.List,{ref:n,className:x("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));Ys.displayName=Ie.List.displayName;const Hd=Ie.Item,Xs=Fe("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),Ks=w.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(Ie.Trigger,{ref:r,className:x(Xs(),"group",e),...n,children:[t," ",o.jsx(A.ChevronDown,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));Ks.displayName=Ie.Trigger.displayName;const Zs=w.forwardRef(({className:e,...t},n)=>o.jsx(Ie.Content,{ref:n,className:x("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto",e),...t}));Zs.displayName=Ie.Content.displayName;const Gd=Ie.Link,fr=w.forwardRef(({className:e,...t},n)=>o.jsx("div",{className:x("absolute left-0 top-full flex justify-center"),children:o.jsx(Ie.Viewport,{className:x("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",e),ref:n,...t})}));fr.displayName=Ie.Viewport.displayName;const Js=w.forwardRef(({className:e,...t},n)=>o.jsx(Ie.Indicator,{ref:n,className:x("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t,children:o.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));Js.displayName=Ie.Indicator.displayName;const qd=ne.Root,Wd=ne.Trigger,Ud=ne.Group,Yd=ne.Portal,Xd=ne.Sub,Kd=ne.RadioGroup,Qs=w.forwardRef(({className:e,inset:t,children:n,...r},s)=>o.jsxs(ne.SubTrigger,{ref:s,className:x("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...r,children:[n,o.jsx(A.ChevronRight,{className:"ml-auto h-4 w-4"})]}));Qs.displayName=ne.SubTrigger.displayName;const ea=w.forwardRef(({className:e,...t},n)=>o.jsx(ne.SubContent,{ref:n,className:x("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));ea.displayName=ne.SubContent.displayName;const ta=w.forwardRef(({className:e,...t},n)=>o.jsx(ne.Portal,{children:o.jsx(ne.Content,{ref:n,className:x("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})}));ta.displayName=ne.Content.displayName;const na=w.forwardRef(({className:e,inset:t,...n},r)=>o.jsx(ne.Item,{ref:r,className:x("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));na.displayName=ne.Item.displayName;const ra=w.forwardRef(({className:e,children:t,checked:n,...r},s)=>o.jsxs(ne.CheckboxItem,{ref:s,className:x("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(ne.ItemIndicator,{children:o.jsx(A.Check,{className:"h-4 w-4"})})}),t]}));ra.displayName=ne.CheckboxItem.displayName;const oa=w.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(ne.RadioItem,{ref:r,className:x("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(ne.ItemIndicator,{children:o.jsx(A.Circle,{className:"h-2 w-2 fill-current"})})}),t]}));oa.displayName=ne.RadioItem.displayName;const sa=w.forwardRef(({className:e,inset:t,...n},r)=>o.jsx(ne.Label,{ref:r,className:x("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...n}));sa.displayName=ne.Label.displayName;const aa=w.forwardRef(({className:e,...t},n)=>o.jsx(ne.Separator,{ref:n,className:x("-mx-1 my-1 h-px bg-border",e),...t}));aa.displayName=ne.Separator.displayName;const ia=({className:e,...t})=>o.jsx("span",{className:x("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});ia.displayName="ContextMenuShortcut";const Zd=sn.Root,Jd=sn.Trigger,la=w.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},s)=>o.jsx(sn.Content,{ref:s,align:t,sideOffset:n,className:x("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));la.displayName=sn.Content.displayName;function Qd(e){return Object.prototype.toString.call(e)==="[object Object]"}function Tr(e){return Qd(e)||Array.isArray(e)}function ec(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function mr(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const s=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return s!==a?!1:n.every(i=>{const l=e[i],c=t[i];return typeof l=="function"?`${l}`==`${c}`:!Tr(l)||!Tr(c)?l===c:mr(l,c)})}function Fr(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function tc(e,t){if(e.length!==t.length)return!1;const n=Fr(e),r=Fr(t);return n.every((s,a)=>{const i=r[a];return mr(s,i)})}function gr(e){return typeof e=="number"}function Pn(e){return typeof e=="string"}function cn(e){return typeof e=="boolean"}function Ar(e){return Object.prototype.toString.call(e)==="[object Object]"}function se(e){return Math.abs(e)}function pr(e){return Math.sign(e)}function Rt(e,t){return se(e-t)}function nc(e,t){if(e===0||t===0||se(e)<=se(t))return 0;const n=Rt(se(e),se(t));return se(n/e)}function rc(e){return Math.round(e*100)/100}function Pt(e){return Lt(e).map(Number)}function $e(e){return e[Et(e)]}function Et(e){return Math.max(0,e.length-1)}function hr(e,t){return t===Et(e)}function Er(e,t=0){return Array.from(Array(e),(n,r)=>t+r)}function Lt(e){return Object.keys(e)}function da(e,t){return[e,t].reduce((n,r)=>(Lt(r).forEach(s=>{const a=n[s],i=r[s],l=Ar(a)&&Ar(i);n[s]=l?da(a,i):i}),n),{})}function Ln(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function oc(e,t){const n={start:r,center:s,end:a};function r(){return 0}function s(c){return a(c)/2}function a(c){return t-c}function i(c,d){return Pn(e)?n[e](c):e(t,c,d)}return{measure:i}}function Dt(){let e=[];function t(s,a,i,l={passive:!0}){let c;if("addEventListener"in s)s.addEventListener(a,i,l),c=()=>s.removeEventListener(a,i,l);else{const d=s;d.addListener(i),c=()=>d.removeListener(i)}return e.push(c),r}function n(){e=e.filter(s=>s())}const r={add:t,clear:n};return r}function sc(e,t,n,r){const s=Dt(),a=1e3/60;let i=null,l=0,c=0;function d(){s.add(e,"visibilitychange",()=>{e.hidden&&p()})}function g(){m(),s.clear()}function u(b){if(!c)return;i||(i=b,n(),n());const h=b-i;for(i=b,l+=h;l>=a;)n(),l-=a;const y=l/a;r(y),c&&(c=t.requestAnimationFrame(u))}function f(){c||(c=t.requestAnimationFrame(u))}function m(){t.cancelAnimationFrame(c),i=null,l=0,c=0}function p(){i=null,l=0}return{init:d,destroy:g,start:f,stop:m,update:n,render:r}}function ac(e,t){const n=t==="rtl",r=e==="y",s=r?"y":"x",a=r?"x":"y",i=!r&&n?-1:1,l=g(),c=u();function d(p){const{height:v,width:b}=p;return r?v:b}function g(){return r?"top":n?"right":"left"}function u(){return r?"bottom":n?"left":"right"}function f(p){return p*i}return{scroll:s,cross:a,startEdge:l,endEdge:c,measureSize:d,direction:f}}function at(e=0,t=0){const n=se(e-t);function r(d){return d<e}function s(d){return d>t}function a(d){return r(d)||s(d)}function i(d){return a(d)?r(d)?e:t:d}function l(d){return n?d-n*Math.ceil((d-t)/n):d}return{length:n,max:t,min:e,constrain:i,reachedAny:a,reachedMax:s,reachedMin:r,removeOffset:l}}function ca(e,t,n){const{constrain:r}=at(0,e),s=e+1;let a=i(t);function i(f){return n?se((s+f)%s):r(f)}function l(){return a}function c(f){return a=i(f),u}function d(f){return g().set(l()+f)}function g(){return ca(e,l(),n)}const u={get:l,set:c,add:d,clone:g};return u}function ic(e,t,n,r,s,a,i,l,c,d,g,u,f,m,p,v,b,h,y){const{cross:C,direction:S}=e,L=["INPUT","SELECT","TEXTAREA"],D={passive:!1},k=Dt(),N=Dt(),T=at(50,225).constrain(m.measure(20)),G={mouse:300,touch:400},E={mouse:500,touch:600},Z=p?43:25;let J=!1,R=0,X=0,V=!1,U=!1,_=!1,fe=!1;function me(M){if(!y)return;function Q(we){(cn(y)||y(M,we))&&de(we)}const oe=t;k.add(oe,"dragstart",we=>we.preventDefault(),D).add(oe,"touchmove",()=>{},D).add(oe,"touchend",()=>{}).add(oe,"touchstart",Q).add(oe,"mousedown",Q).add(oe,"touchcancel",O).add(oe,"contextmenu",O).add(oe,"click",ce,!0)}function le(){k.clear(),N.clear()}function Ne(){const M=fe?n:t;N.add(M,"touchmove",q,D).add(M,"touchend",O).add(M,"mousemove",q,D).add(M,"mouseup",O)}function F(M){const Q=M.nodeName||"";return L.includes(Q)}function B(){return(p?E:G)[fe?"mouse":"touch"]}function Y(M,Q){const oe=u.add(pr(M)*-1),we=g.byDistance(M,!p).distance;return p||se(M)<T?we:b&&Q?we*.5:g.byIndex(oe.get(),0).distance}function de(M){const Q=Ln(M,r);fe=Q,_=p&&Q&&!M.buttons&&J,J=Rt(s.get(),i.get())>=2,!(Q&&M.button!==0)&&(F(M.target)||(V=!0,a.pointerDown(M),d.useFriction(0).useDuration(0),s.set(i),Ne(),R=a.readPoint(M),X=a.readPoint(M,C),f.emit("pointerDown")))}function q(M){if(!Ln(M,r)&&M.touches.length>=2)return O(M);const oe=a.readPoint(M),we=a.readPoint(M,C),Pe=Rt(oe,R),je=Rt(we,X);if(!U&&!fe&&(!M.cancelable||(U=Pe>je,!U)))return O(M);const Be=a.pointerMove(M);Pe>v&&(_=!0),d.useFriction(.3).useDuration(.75),l.start(),s.add(S(Be)),M.preventDefault()}function O(M){const oe=g.byDistance(0,!1).index!==u.get(),we=a.pointerUp(M)*B(),Pe=Y(S(we),oe),je=nc(we,Pe),Be=Z-10*je,xe=h+je/50;U=!1,V=!1,N.clear(),d.useDuration(Be).useFriction(xe),c.distance(Pe,!p),fe=!1,f.emit("pointerUp")}function ce(M){_&&(M.stopPropagation(),M.preventDefault(),_=!1)}function ae(){return V}return{init:me,destroy:le,pointerDown:ae}}function lc(e,t){let r,s;function a(u){return u.timeStamp}function i(u,f){const p=`client${(f||e.scroll)==="x"?"X":"Y"}`;return(Ln(u,t)?u:u.touches[0])[p]}function l(u){return r=u,s=u,i(u)}function c(u){const f=i(u)-i(s),m=a(u)-a(r)>170;return s=u,m&&(r=u),f}function d(u){if(!r||!s)return 0;const f=i(s)-i(r),m=a(u)-a(r),p=a(u)-a(s)>170,v=f/m;return m&&!p&&se(v)>.1?v:0}return{pointerDown:l,pointerMove:c,pointerUp:d,readPoint:i}}function dc(){function e(n){const{offsetTop:r,offsetLeft:s,offsetWidth:a,offsetHeight:i}=n;return{top:r,right:s+a,bottom:r+i,left:s,width:a,height:i}}return{measure:e}}function cc(e){function t(r){return e*(r/100)}return{measure:t}}function uc(e,t,n,r,s,a,i){const l=[e].concat(r);let c,d,g=[],u=!1;function f(b){return s.measureSize(i.measure(b))}function m(b){if(!a)return;d=f(e),g=r.map(f);function h(y){for(const C of y){if(u)return;const S=C.target===e,L=r.indexOf(C.target),D=S?d:g[L],k=f(S?e:r[L]);if(se(k-D)>=.5){b.reInit(),t.emit("resize");break}}}c=new ResizeObserver(y=>{(cn(a)||a(b,y))&&h(y)}),n.requestAnimationFrame(()=>{l.forEach(y=>c.observe(y))})}function p(){u=!0,c&&c.disconnect()}return{init:m,destroy:p}}function fc(e,t,n,r,s,a){let i=0,l=0,c=s,d=a,g=e.get(),u=0;function f(){const D=r.get()-e.get(),k=!c;let N=0;return k?(i=0,n.set(r),e.set(r),N=D):(n.set(e),i+=D/c,i*=d,g+=i,e.add(i),N=g-u),l=pr(N),u=g,L}function m(){const D=r.get()-t.get();return se(D)<.001}function p(){return c}function v(){return l}function b(){return i}function h(){return C(s)}function y(){return S(a)}function C(D){return c=D,L}function S(D){return d=D,L}const L={direction:v,duration:p,velocity:b,seek:f,settled:m,useBaseFriction:y,useBaseDuration:h,useFriction:S,useDuration:C};return L}function mc(e,t,n,r,s){const a=s.measure(10),i=s.measure(50),l=at(.1,.99);let c=!1;function d(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function g(m){if(!d())return;const p=e.reachedMin(t.get())?"min":"max",v=se(e[p]-t.get()),b=n.get()-t.get(),h=l.constrain(v/i);n.subtract(b*h),!m&&se(b)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function u(m){c=!m}return{shouldConstrain:d,constrain:g,toggleActive:u}}function gc(e,t,n,r,s){const a=at(-t+e,0),i=u(),l=g(),c=f();function d(p,v){return Rt(p,v)<=1}function g(){const p=i[0],v=$e(i),b=i.lastIndexOf(p),h=i.indexOf(v)+1;return at(b,h)}function u(){return n.map((p,v)=>{const{min:b,max:h}=a,y=a.constrain(p),C=!v,S=hr(n,v);return C?h:S||d(b,y)?b:d(h,y)?h:y}).map(p=>parseFloat(p.toFixed(3)))}function f(){if(t<=e+s)return[a.max];if(r==="keepSnaps")return i;const{min:p,max:v}=l;return i.slice(p,v)}return{snapsContained:c,scrollContainLimit:l}}function pc(e,t,n){const r=t[0],s=n?r-e:$e(t);return{limit:at(s,r)}}function hc(e,t,n,r){const a=t.min+.1,i=t.max+.1,{reachedMin:l,reachedMax:c}=at(a,i);function d(f){return f===1?c(n.get()):f===-1?l(n.get()):!1}function g(f){if(!d(f))return;const m=e*(f*-1);r.forEach(p=>p.add(m))}return{loop:g}}function xc(e){const{max:t,length:n}=e;function r(a){const i=a-t;return n?i/-n:0}return{get:r}}function vc(e,t,n,r,s){const{startEdge:a,endEdge:i}=e,{groupSlides:l}=s,c=u().map(t.measure),d=f(),g=m();function u(){return l(r).map(v=>$e(v)[i]-v[0][a]).map(se)}function f(){return r.map(v=>n[a]-v[a]).map(v=>-se(v))}function m(){return l(d).map(v=>v[0]).map((v,b)=>v+c[b])}return{snaps:d,snapsAligned:g}}function wc(e,t,n,r,s,a){const{groupSlides:i}=s,{min:l,max:c}=r,d=g();function g(){const f=i(a),m=!e||t==="keepSnaps";return n.length===1?[a]:m?f:f.slice(l,c).map((p,v,b)=>{const h=!v,y=hr(b,v);if(h){const C=$e(b[0])+1;return Er(C)}if(y){const C=Et(a)-$e(b)[0]+1;return Er(C,$e(b)[0])}return p})}return{slideRegistry:d}}function bc(e,t,n,r,s){const{reachedAny:a,removeOffset:i,constrain:l}=r;function c(p){return p.concat().sort((v,b)=>se(v)-se(b))[0]}function d(p){const v=e?i(p):l(p),b=t.map((y,C)=>({diff:g(y-v,0),index:C})).sort((y,C)=>se(y.diff)-se(C.diff)),{index:h}=b[0];return{index:h,distance:v}}function g(p,v){const b=[p,p+n,p-n];if(!e)return p;if(!v)return c(b);const h=b.filter(y=>pr(y)===v);return h.length?c(h):$e(b)-n}function u(p,v){const b=t[p]-s.get(),h=g(b,v);return{index:p,distance:h}}function f(p,v){const b=s.get()+p,{index:h,distance:y}=d(b),C=!e&&a(b);if(!v||C)return{index:h,distance:p};const S=t[h]-y,L=p+g(S,0);return{index:h,distance:L}}return{byDistance:f,byIndex:u,shortcut:g}}function yc(e,t,n,r,s,a,i){function l(u){const f=u.distance,m=u.index!==t.get();a.add(f),f&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),m&&(n.set(t.get()),t.set(u.index),i.emit("select"))}function c(u,f){const m=s.byDistance(u,f);l(m)}function d(u,f){const m=t.clone().set(u),p=s.byIndex(m.get(),f);l(p)}return{distance:c,index:d}}function Cc(e,t,n,r,s,a,i,l){const c={passive:!0,capture:!0};let d=0;function g(m){if(!l)return;function p(v){if(new Date().getTime()-d>10)return;i.emit("slideFocusStart"),e.scrollLeft=0;const y=n.findIndex(C=>C.includes(v));gr(y)&&(s.useDuration(0),r.index(y,0),i.emit("slideFocus"))}a.add(document,"keydown",u,!1),t.forEach((v,b)=>{a.add(v,"focus",h=>{(cn(l)||l(m,h))&&p(b)},c)})}function u(m){m.code==="Tab"&&(d=new Date().getTime())}return{init:g}}function jt(e){let t=e;function n(){return t}function r(c){t=i(c)}function s(c){t+=i(c)}function a(c){t-=i(c)}function i(c){return gr(c)?c:c.get()}return{get:n,set:r,add:s,subtract:a}}function ua(e,t){const n=e.scroll==="x"?i:l,r=t.style;let s=null,a=!1;function i(f){return`translate3d(${f}px,0px,0px)`}function l(f){return`translate3d(0px,${f}px,0px)`}function c(f){if(a)return;const m=rc(e.direction(f));m!==s&&(r.transform=n(m),s=m)}function d(f){a=!f}function g(){a||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:g,to:c,toggleActive:d}}function Nc(e,t,n,r,s,a,i,l,c){const g=Pt(s),u=Pt(s).reverse(),f=h().concat(y());function m(k,N){return k.reduce((T,G)=>T-s[G],N)}function p(k,N){return k.reduce((T,G)=>m(T,N)>0?T.concat([G]):T,[])}function v(k){return a.map((N,T)=>({start:N-r[T]+.5+k,end:N+t-.5+k}))}function b(k,N,T){const G=v(N);return k.map(E=>{const Z=T?0:-n,J=T?n:0,R=T?"end":"start",X=G[E][R];return{index:E,loopPoint:X,slideLocation:jt(-1),translate:ua(e,c[E]),target:()=>l.get()>X?Z:J}})}function h(){const k=i[0],N=p(u,k);return b(N,n,!1)}function y(){const k=t-i[0]-1,N=p(g,k);return b(N,-n,!0)}function C(){return f.every(({index:k})=>{const N=g.filter(T=>T!==k);return m(N,t)<=.1})}function S(){f.forEach(k=>{const{target:N,translate:T,slideLocation:G}=k,E=N();E!==G.get()&&(T.to(E),G.set(E))})}function L(){f.forEach(k=>k.translate.clear())}return{canLoop:C,clear:L,loop:S,loopPoints:f}}function jc(e,t,n){let r,s=!1;function a(c){if(!n)return;function d(g){for(const u of g)if(u.type==="childList"){c.reInit(),t.emit("slidesChanged");break}}r=new MutationObserver(g=>{s||(cn(n)||n(c,g))&&d(g)}),r.observe(e,{childList:!0})}function i(){r&&r.disconnect(),s=!0}return{init:a,destroy:i}}function Sc(e,t,n,r){const s={};let a=null,i=null,l,c=!1;function d(){l=new IntersectionObserver(p=>{c||(p.forEach(v=>{const b=t.indexOf(v.target);s[b]=v}),a=null,i=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:r}),t.forEach(p=>l.observe(p))}function g(){l&&l.disconnect(),c=!0}function u(p){return Lt(s).reduce((v,b)=>{const h=parseInt(b),{isIntersecting:y}=s[h];return(p&&y||!p&&!y)&&v.push(h),v},[])}function f(p=!0){if(p&&a)return a;if(!p&&i)return i;const v=u(p);return p&&(a=v),p||(i=v),v}return{init:d,destroy:g,get:f}}function kc(e,t,n,r,s,a){const{measureSize:i,startEdge:l,endEdge:c}=e,d=n[0]&&s,g=p(),u=v(),f=n.map(i),m=b();function p(){if(!d)return 0;const y=n[0];return se(t[l]-y[l])}function v(){if(!d)return 0;const y=a.getComputedStyle($e(r));return parseFloat(y.getPropertyValue(`margin-${c}`))}function b(){return n.map((y,C,S)=>{const L=!C,D=hr(S,C);return L?f[C]+g:D?f[C]+u:S[C+1][l]-y[l]}).map(se)}return{slideSizes:f,slideSizesWithGaps:m,startGap:g,endGap:u}}function Rc(e,t,n,r,s,a,i,l,c){const{startEdge:d,endEdge:g,direction:u}=e,f=gr(n);function m(h,y){return Pt(h).filter(C=>C%y===0).map(C=>h.slice(C,C+y))}function p(h){return h.length?Pt(h).reduce((y,C,S)=>{const L=$e(y)||0,D=L===0,k=C===Et(h),N=s[d]-a[L][d],T=s[d]-a[C][g],G=!r&&D?u(i):0,E=!r&&k?u(l):0,Z=se(T-E-(N+G));return S&&Z>t+c&&y.push(C),k&&y.push(h.length),y},[]).map((y,C,S)=>{const L=Math.max(S[C-1]||0);return h.slice(L,y)}):[]}function v(h){return f?m(h,n):p(h)}return{groupSlides:v}}function _c(e,t,n,r,s,a,i){const{align:l,axis:c,direction:d,startIndex:g,loop:u,duration:f,dragFree:m,dragThreshold:p,inViewThreshold:v,slidesToScroll:b,skipSnaps:h,containScroll:y,watchResize:C,watchSlides:S,watchDrag:L,watchFocus:D}=a,k=2,N=dc(),T=N.measure(t),G=n.map(N.measure),E=ac(c,d),Z=E.measureSize(T),J=cc(Z),R=oc(l,Z),X=!u&&!!y,V=u||!!y,{slideSizes:U,slideSizesWithGaps:_,startGap:fe,endGap:me}=kc(E,T,G,n,V,s),le=Rc(E,Z,b,u,T,G,fe,me,k),{snaps:Ne,snapsAligned:F}=vc(E,R,T,G,le),B=-$e(Ne)+$e(_),{snapsContained:Y,scrollContainLimit:de}=gc(Z,B,F,y,k),q=X?Y:F,{limit:O}=pc(B,q,u),ce=ca(Et(q),g,u),ae=ce.clone(),K=Pt(n),M=({dragHandler:Le,scrollBody:ct,scrollBounds:He,options:{loop:ut}})=>{ut||He.constrain(Le.pointerDown()),ct.seek()},Q=({scrollBody:Le,translate:ct,location:He,offsetLocation:ut,previousLocation:mn,scrollLooper:Ot,slideLooper:Ht,dragHandler:gn,animation:vt,eventHandler:Ae,scrollBounds:pn,options:{loop:Gt}},wt)=>{const bt=Le.settled(),H=!pn.shouldConstrain(),ue=Gt?bt:bt&&H,pe=ue&&!gn.pointerDown();pe&&vt.stop();const Se=He.get()*wt+mn.get()*(1-wt);ut.set(Se),Gt&&(Ot.loop(Le.direction()),Ht.loop()),ct.to(ut.get()),pe&&Ae.emit("settle"),ue||Ae.emit("scroll")},oe=sc(r,s,()=>M(et),Le=>Q(et,Le)),we=.68,Pe=q[ce.get()],je=jt(Pe),Be=jt(Pe),xe=jt(Pe),qe=jt(Pe),Qe=fc(je,xe,Be,qe,f,we),be=bc(u,q,B,O,qe),Oe=yc(oe,ce,ae,Qe,be,qe,i),Vt=xc(O),$t=Dt(),dt=Sc(t,n,i,v),{slideRegistry:zt}=wc(X,y,q,de,le,K),Bt=Cc(e,n,zt,Oe,Qe,$t,i,D),et={ownerDocument:r,ownerWindow:s,eventHandler:i,containerRect:T,slideRects:G,animation:oe,axis:E,dragHandler:ic(E,e,r,s,qe,lc(E,s),je,oe,Oe,Qe,be,ce,i,J,m,p,h,we,L),eventStore:$t,percentOfView:J,index:ce,indexPrevious:ae,limit:O,location:je,offsetLocation:xe,previousLocation:Be,options:a,resizeHandler:uc(t,i,s,n,E,C,N),scrollBody:Qe,scrollBounds:mc(O,xe,qe,Qe,J),scrollLooper:hc(B,O,xe,[je,xe,Be,qe]),scrollProgress:Vt,scrollSnapList:q.map(Vt.get),scrollSnaps:q,scrollTarget:be,scrollTo:Oe,slideLooper:Nc(E,Z,B,U,_,Ne,q,xe,n),slideFocus:Bt,slidesHandler:jc(t,i,S),slidesInView:dt,slideIndexes:K,slideRegistry:zt,slidesToScroll:le,target:qe,translate:ua(E,t)};return et}function Mc(){let e={},t;function n(d){t=d}function r(d){return e[d]||[]}function s(d){return r(d).forEach(g=>g(t,d)),c}function a(d,g){return e[d]=r(d).concat([g]),c}function i(d,g){return e[d]=r(d).filter(u=>u!==g),c}function l(){e={}}const c={init:n,emit:s,off:i,on:a,clear:l};return c}const Ic={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function Pc(e){function t(a,i){return da(a,i||{})}function n(a){const i=a.breakpoints||{},l=Lt(i).filter(c=>e.matchMedia(c).matches).map(c=>i[c]).reduce((c,d)=>t(c,d),{});return t(a,l)}function r(a){return a.map(i=>Lt(i.breakpoints||{})).reduce((i,l)=>i.concat(l),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function Lc(e){let t=[];function n(a,i){return t=i.filter(({options:l})=>e.optionsAtMedia(l).active!==!1),t.forEach(l=>l.init(a,e)),i.reduce((l,c)=>Object.assign(l,{[c.name]:c}),{})}function r(){t=t.filter(a=>a.destroy())}return{init:n,destroy:r}}function rn(e,t,n){const r=e.ownerDocument,s=r.defaultView,a=Pc(s),i=Lc(a),l=Dt(),c=Mc(),{mergeOptions:d,optionsAtMedia:g,optionsMediaQueries:u}=a,{on:f,off:m,emit:p}=c,v=E;let b=!1,h,y=d(Ic,rn.globalOptions),C=d(y),S=[],L,D,k;function N(){const{container:K,slides:M}=C;D=(Pn(K)?e.querySelector(K):K)||e.children[0];const oe=Pn(M)?D.querySelectorAll(M):M;k=[].slice.call(oe||D.children)}function T(K){const M=_c(e,D,k,r,s,K,c);if(K.loop&&!M.slideLooper.canLoop()){const Q=Object.assign({},K,{loop:!1});return T(Q)}return M}function G(K,M){b||(y=d(y,K),C=g(y),S=M||S,N(),h=T(C),u([y,...S.map(({options:Q})=>Q)]).forEach(Q=>l.add(Q,"change",E)),C.active&&(h.translate.to(h.location.get()),h.animation.init(),h.slidesInView.init(),h.slideFocus.init(ae),h.eventHandler.init(ae),h.resizeHandler.init(ae),h.slidesHandler.init(ae),h.options.loop&&h.slideLooper.loop(),D.offsetParent&&k.length&&h.dragHandler.init(ae),L=i.init(ae,S)))}function E(K,M){const Q=le();Z(),G(d({startIndex:Q},K),M),c.emit("reInit")}function Z(){h.dragHandler.destroy(),h.eventStore.clear(),h.translate.clear(),h.slideLooper.clear(),h.resizeHandler.destroy(),h.slidesHandler.destroy(),h.slidesInView.destroy(),h.animation.destroy(),i.destroy(),l.clear()}function J(){b||(b=!0,l.clear(),Z(),c.emit("destroy"),c.clear())}function R(K,M,Q){!C.active||b||(h.scrollBody.useBaseFriction().useDuration(M===!0?0:C.duration),h.scrollTo.index(K,Q||0))}function X(K){const M=h.index.add(1).get();R(M,K,-1)}function V(K){const M=h.index.add(-1).get();R(M,K,1)}function U(){return h.index.add(1).get()!==le()}function _(){return h.index.add(-1).get()!==le()}function fe(){return h.scrollSnapList}function me(){return h.scrollProgress.get(h.offsetLocation.get())}function le(){return h.index.get()}function Ne(){return h.indexPrevious.get()}function F(){return h.slidesInView.get()}function B(){return h.slidesInView.get(!1)}function Y(){return L}function de(){return h}function q(){return e}function O(){return D}function ce(){return k}const ae={canScrollNext:U,canScrollPrev:_,containerNode:O,internalEngine:de,destroy:J,off:m,on:f,emit:p,plugins:Y,previousScrollSnap:Ne,reInit:v,rootNode:q,scrollNext:X,scrollPrev:V,scrollProgress:me,scrollSnapList:fe,scrollTo:R,selectedScrollSnap:le,slideNodes:ce,slidesInView:F,slidesNotInView:B};return G(t,n),setTimeout(()=>c.emit("init"),0),ae}rn.globalOptions=void 0;function xr(e={},t=[]){const n=j.useRef(e),r=j.useRef(t),[s,a]=j.useState(),[i,l]=j.useState(),c=j.useCallback(()=>{s&&s.reInit(n.current,r.current)},[s]);return j.useEffect(()=>{mr(n.current,e)||(n.current=e,c())},[e,c]),j.useEffect(()=>{tc(r.current,t)||(r.current=t,c())},[t,c]),j.useEffect(()=>{if(ec()&&i){rn.globalOptions=xr.globalOptions;const d=rn(i,n.current,r.current);return a(d),()=>d.destroy()}else a(void 0)},[i,a]),[l,s]}xr.globalOptions=void 0;const fa=w.createContext(null);function un(){const e=w.useContext(fa);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}const ma=w.forwardRef(({orientation:e="horizontal",opts:t,setApi:n,plugins:r,className:s,children:a,...i},l)=>{const[c,d]=xr({...t,axis:e==="horizontal"?"x":"y"},r),[g,u]=w.useState(!1),[f,m]=w.useState(!1),p=w.useCallback(y=>{y&&(u(y.canScrollPrev()),m(y.canScrollNext()))},[]),v=w.useCallback(()=>{d==null||d.scrollPrev()},[d]),b=w.useCallback(()=>{d==null||d.scrollNext()},[d]),h=w.useCallback(y=>{y.key==="ArrowLeft"?(y.preventDefault(),v()):y.key==="ArrowRight"&&(y.preventDefault(),b())},[v,b]);return w.useEffect(()=>{!d||!n||n(d)},[d,n]),w.useEffect(()=>{if(d)return p(d),d.on("reInit",p),d.on("select",p),()=>{d==null||d.off("select",p)}},[d,p]),o.jsx(fa.Provider,{value:{carouselRef:c,api:d,opts:t,orientation:e,scrollPrev:v,scrollNext:b,canScrollPrev:g,canScrollNext:f},children:o.jsx("div",{ref:l,onKeyDownCapture:h,className:x("relative",s),role:"region","aria-roledescription":"carousel",...i,children:a})})});ma.displayName="Carousel";const ga=w.forwardRef(({className:e,...t},n)=>{const{carouselRef:r,orientation:s}=un();return o.jsx("div",{ref:r,className:"overflow-hidden",children:o.jsx("div",{ref:n,className:x("flex",s==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});ga.displayName="CarouselContent";const pa=w.forwardRef(({className:e,...t},n)=>{const{orientation:r}=un();return o.jsx("div",{ref:n,role:"group","aria-roledescription":"slide",className:x("min-w-0 shrink-0 grow-0 basis-full",r==="horizontal"?"pl-4":"pt-4",e),...t})});pa.displayName="CarouselItem";const ha=w.forwardRef(({className:e,variant:t="outline",size:n="icon",...r},s)=>{const{orientation:a,scrollPrev:i,canScrollPrev:l}=un();return o.jsxs(ge,{ref:s,variant:t,size:n,className:x("absolute h-8 w-8 rounded-full",a==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:i,...r,children:[o.jsx(A.ChevronLeft,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Previous slide"})]})});ha.displayName="CarouselPrevious";const xa=w.forwardRef(({className:e,variant:t="outline",size:n="icon",...r},s)=>{const{orientation:a,scrollNext:i,canScrollNext:l}=un();return o.jsxs(ge,{ref:s,variant:t,size:n,className:x("absolute h-8 w-8 rounded-full",a==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:i,...r,children:[o.jsx(A.ChevronRight,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Next slide"})]})});xa.displayName="CarouselNext";/**
|
|
12
|
+
)`}})]}),r.jsxs("div",{className:"flex gap-2 items-center",children:[r.jsx("div",{className:"h-9 w-9 rounded-md border flex-shrink-0 shadow-inner",style:{backgroundColor:e}}),r.jsx(Je,{value:c,onChange:p=>m(p.target.value),placeholder:"#000000",className:"font-mono text-sm"})]}),r.jsx("div",{className:"grid grid-cols-5 gap-1.5",children:zl.map(p=>r.jsx("button",{onClick:()=>{n==null||n(p),l(Xt(p)),d(p)},className:x("h-7 w-7 rounded-md border-2 transition-transform hover:scale-110",e===p?"border-primary ring-2 ring-ring":"border-transparent"),style:{backgroundColor:p}},p))})]})})]})}const Tr=v.forwardRef(({className:e,as:n="div",...t},o)=>r.jsx(n,{ref:o,className:x(e),...t}));Tr.displayName="Box";const Lr=v.forwardRef(({className:e,direction:n,wrap:t,justify:o,align:s,gap:a,style:i,...l},c)=>r.jsx("div",{ref:c,className:x("flex",n&&`flex-${n}`,t&&`flex-${t}`,o&&`justify-${o}`,s&&`items-${s}`,typeof a=="number"&&`gap-${a}`,e),style:{...typeof a=="string"?{gap:a}:{},...i},...l}));Lr.displayName="Flex";const Dr=v.forwardRef(({className:e,spacing:n=4,align:t,style:o,...s},a)=>r.jsx("div",{ref:a,className:x("flex flex-col",typeof n=="number"&&`gap-${n}`,t&&`items-${t}`,e),style:{...typeof n=="string"?{gap:n}:{},...o},...s}));Dr.displayName="VStack";const Fr=v.forwardRef(({className:e,spacing:n=4,align:t="center",style:o,...s},a)=>r.jsx("div",{ref:a,className:x("flex flex-row",typeof n=="number"&&`gap-${n}`,t&&`items-${t}`,e),style:{...typeof n=="string"?{gap:n}:{},...o},...s}));Fr.displayName="HStack";const Ar=v.forwardRef(({className:e,cols:n=1,gap:t=4,style:o,...s},a)=>{const i=typeof n=="number"?`grid-cols-${n}`:[n.sm&&`sm:grid-cols-${n.sm}`,n.md&&`md:grid-cols-${n.md}`,n.lg&&`lg:grid-cols-${n.lg}`,n.xl&&`xl:grid-cols-${n.xl}`].filter(Boolean).join(" ");return r.jsx("div",{ref:a,className:x("grid",i,typeof t=="number"&&`gap-${t}`,e),style:{...typeof t=="string"?{gap:t}:{},...o},...s})});Ar.displayName="Grid";const Hl={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-full"},Er=v.forwardRef(({className:e,maxWidth:n="lg",centered:t=!0,...o},s)=>r.jsx("div",{ref:s,className:x("w-full px-4",Hl[n],t&&"mx-auto",e),...o}));Er.displayName="Container";const Gl=Ei.Root,ql=$n.Root,Wl=$n.CollapsibleTrigger,Vr=v.forwardRef(({className:e,children:n,...t},o)=>r.jsx($n.CollapsibleContent,{ref:o,className:x("overflow-hidden transition-all duration-300 ease-in-out","data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",e),...t,children:r.jsx("div",{className:"pb-2",children:n})}));Vr.displayName="CollapsibleContent";const $r=Fe("rounded-xl text-card-foreground transition-all duration-300",{variants:{variant:{default:"border bg-card shadow-sm",elevated:"border border-white/10 bg-gradient-to-br from-card/80 to-card/40 backdrop-blur-xl shadow-2xl shadow-black/20",glass:"border border-white/10 bg-white/5 backdrop-blur-xl shadow-xl",ghost:"bg-transparent"}},defaultVariants:{variant:"default"}}),Wn=v.forwardRef(({className:e,variant:n,...t},o)=>r.jsx("div",{ref:o,className:x($r({variant:n}),e),...t}));Wn.displayName="Card";const Un=v.forwardRef(({className:e,...n},t)=>r.jsx("div",{ref:t,className:x("flex flex-col space-y-1.5 p-6",e),...n}));Un.displayName="CardHeader";const Yn=v.forwardRef(({className:e,...n},t)=>r.jsx("h3",{ref:t,className:x("text-2xl font-semibold leading-none tracking-tight",e),...n}));Yn.displayName="CardTitle";const zr=v.forwardRef(({className:e,...n},t)=>r.jsx("p",{ref:t,className:x("text-sm text-muted-foreground",e),...n}));zr.displayName="CardDescription";const Xn=v.forwardRef(({className:e,...n},t)=>r.jsx("div",{ref:t,className:x("p-6 pt-0",e),...n}));Xn.displayName="CardContent";const Br=v.forwardRef(({className:e,...n},t)=>r.jsx("div",{ref:t,className:x("flex items-center p-6 pt-0",e),...n}));Br.displayName="CardFooter";const Kn=v.forwardRef(({className:e,...n},t)=>r.jsx("div",{className:"relative w-full overflow-auto",children:r.jsx("table",{ref:t,className:x("w-full caption-bottom text-sm",e),...n})}));Kn.displayName="Table";const Zn=v.forwardRef(({className:e,...n},t)=>r.jsx("thead",{ref:t,className:x("[&_tr]:border-b",e),...n}));Zn.displayName="TableHeader";const Jn=v.forwardRef(({className:e,...n},t)=>r.jsx("tbody",{ref:t,className:x("[&_tr:last-child]:border-0",e),...n}));Jn.displayName="TableBody";const Or=v.forwardRef(({className:e,...n},t)=>r.jsx("tfoot",{ref:t,className:x("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...n}));Or.displayName="TableFooter";const St=v.forwardRef(({className:e,...n},t)=>r.jsx("tr",{ref:t,className:x("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...n}));St.displayName="TableRow";const Qn=v.forwardRef(({className:e,...n},t)=>r.jsx("th",{ref:t,className:x("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...n}));Qn.displayName="TableHead";const tn=v.forwardRef(({className:e,...n},t)=>r.jsx("td",{ref:t,className:x("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...n}));tn.displayName="TableCell";const Hr=v.forwardRef(({className:e,...n},t)=>r.jsx("caption",{ref:t,className:x("mt-4 text-sm text-muted-foreground",e),...n}));Hr.displayName="TableCaption";const eo=v.forwardRef(({className:e,children:n,orientation:t="vertical",...o},s)=>r.jsxs(rt.Root,{ref:s,className:x("relative overflow-hidden",e),...o,children:[r.jsx(rt.Viewport,{className:"h-full w-full rounded-[inherit]",children:n}),(t==="vertical"||t==="both")&&r.jsx(nn,{orientation:"vertical"}),(t==="horizontal"||t==="both")&&r.jsx(nn,{orientation:"horizontal"}),r.jsx(rt.Corner,{})]}));eo.displayName=rt.Root.displayName;const nn=v.forwardRef(({className:e,orientation:n="vertical",...t},o)=>r.jsx(rt.ScrollAreaScrollbar,{ref:o,orientation:n,className:x("flex touch-none select-none transition-colors",n==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",n==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...t,children:r.jsx(rt.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));nn.displayName=rt.ScrollAreaScrollbar.displayName;const Ul=it.Root,Gr=v.forwardRef(({className:e,...n},t)=>r.jsx(it.List,{ref:t,className:x("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...n}));Gr.displayName=it.List.displayName;const qr=v.forwardRef(({className:e,...n},t)=>r.jsx(it.Trigger,{ref:t,className:x("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...n}));qr.displayName=it.Trigger.displayName;const Wr=v.forwardRef(({className:e,...n},t)=>r.jsx(it.Content,{ref:t,className:x("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...n}));Wr.displayName=it.Content.displayName;const Yl=st.Root,Ur=v.forwardRef(({className:e,...n},t)=>r.jsx(st.Item,{ref:t,className:x("border-b",e),...n}));Ur.displayName="AccordionItem";const Yr=v.forwardRef(({className:e,children:n,...t},o)=>r.jsx(st.Header,{className:"flex",children:r.jsxs(st.Trigger,{ref:o,className:x("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...t,children:[n,r.jsx(A.ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Yr.displayName=st.Trigger.displayName;const Xr=v.forwardRef(({className:e,children:n,...t},o)=>r.jsx(st.Content,{ref:o,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...t,children:r.jsx("div",{className:x("pb-4 pt-0",e),children:n})}));Xr.displayName=st.Content.displayName;const Kr=te.Root,Xl=te.Trigger,Zr=te.Portal,Kl=te.Close,to=v.forwardRef(({className:e,...n},t)=>r.jsx(te.Overlay,{ref:t,className:x("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n}));to.displayName=te.Overlay.displayName;const no=v.forwardRef(({className:e,children:n,...t},o)=>{const s=Z();return r.jsxs(Zr,{children:[r.jsx(to,{}),r.jsxs(te.Content,{ref:o,className:x("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t,children:[n,r.jsxs(te.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[r.jsx(A.X,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:s.common_close})]})]})]})});no.displayName=te.Content.displayName;const Jr=({className:e,...n})=>r.jsx("div",{className:x("flex flex-col space-y-1.5 text-center sm:text-left",e),...n});Jr.displayName="DialogHeader";const Qr=({className:e,...n})=>r.jsx("div",{className:x("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n});Qr.displayName="DialogFooter";const es=v.forwardRef(({className:e,...n},t)=>r.jsx(te.Title,{ref:t,className:x("text-lg font-semibold leading-none tracking-tight",e),...n}));es.displayName=te.Title.displayName;const ts=v.forwardRef(({className:e,...n},t)=>r.jsx(te.Description,{ref:t,className:x("text-sm text-muted-foreground",e),...n}));ts.displayName=te.Description.displayName;const ns=te.Root,os=te.Trigger,rs=te.Close,ss=te.Portal,oo=v.forwardRef(({className:e,...n},t)=>r.jsx(te.Overlay,{className:x("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n,ref:t}));oo.displayName=te.Overlay.displayName;const Zl=Fe("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),ro=v.forwardRef(({side:e="right",className:n,children:t,...o},s)=>{const a=Z();return r.jsxs(ss,{children:[r.jsx(oo,{}),r.jsxs(te.Content,{ref:s,className:x(Zl({side:e}),n),...o,children:[t,r.jsxs(te.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[r.jsx(A.X,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:a.common_close})]})]})]})});ro.displayName=te.Content.displayName;const so=({className:e,...n})=>r.jsx("div",{className:x("flex flex-col space-y-2 text-center sm:text-left",e),...n});so.displayName="SheetHeader";const ao=({className:e,...n})=>r.jsx("div",{className:x("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n});ao.displayName="SheetFooter";const io=v.forwardRef(({className:e,...n},t)=>r.jsx(te.Title,{ref:t,className:x("text-lg font-semibold text-foreground",e),...n}));io.displayName=te.Title.displayName;const lo=v.forwardRef(({className:e,...n},t)=>r.jsx(te.Description,{ref:t,className:x("text-sm text-muted-foreground",e),...n}));lo.displayName=te.Description.displayName;const as=ne.Root,is=ne.Trigger,Jl=ne.Group,Ql=ne.Portal,ed=ne.Sub,td=ne.RadioGroup,ls=v.forwardRef(({className:e,inset:n,children:t,...o},s)=>r.jsxs(ne.SubTrigger,{ref:s,className:x("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",n&&"pl-8",e),...o,children:[t,r.jsx(A.ChevronRight,{className:"ml-auto h-4 w-4"})]}));ls.displayName=ne.SubTrigger.displayName;const ds=v.forwardRef(({className:e,...n},t)=>r.jsx(ne.SubContent,{ref:t,className:x("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));ds.displayName=ne.SubContent.displayName;const co=v.forwardRef(({className:e,sideOffset:n=4,...t},o)=>r.jsx(ne.Portal,{children:r.jsx(ne.Content,{ref:o,sideOffset:n,className:x("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})}));co.displayName=ne.Content.displayName;const kt=v.forwardRef(({className:e,inset:n,...t},o)=>r.jsx(ne.Item,{ref:o,className:x("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n&&"pl-8",e),...t}));kt.displayName=ne.Item.displayName;const cs=v.forwardRef(({className:e,children:n,checked:t,...o},s)=>r.jsxs(ne.CheckboxItem,{ref:s,className:x("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:t,...o,children:[r.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(ne.ItemIndicator,{children:r.jsx(A.Check,{className:"h-4 w-4"})})}),n]}));cs.displayName=ne.CheckboxItem.displayName;const us=v.forwardRef(({className:e,children:n,...t},o)=>r.jsxs(ne.RadioItem,{ref:o,className:x("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t,children:[r.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(ne.ItemIndicator,{children:r.jsx(A.Circle,{className:"h-2 w-2 fill-current"})})}),n]}));us.displayName=ne.RadioItem.displayName;const ms=v.forwardRef(({className:e,inset:n,...t},o)=>r.jsx(ne.Label,{ref:o,className:x("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",e),...t}));ms.displayName=ne.Label.displayName;const fs=v.forwardRef(({className:e,...n},t)=>r.jsx(ne.Separator,{ref:t,className:x("-mx-1 my-1 h-px bg-muted",e),...n}));fs.displayName=ne.Separator.displayName;const gs=({className:e,...n})=>r.jsx("span",{className:x("ml-auto text-xs tracking-widest opacity-60",e),...n});gs.displayName="DropdownMenuShortcut";const nd=Ft.Provider,od=Ft.Root,rd=Ft.Trigger,ps=v.forwardRef(({className:e,sideOffset:n=4,...t},o)=>r.jsx(Ft.Content,{ref:o,sideOffset:n,className:x("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));ps.displayName=Ft.Content.displayName;const uo=v.forwardRef(({className:e,...n},t)=>r.jsx(Me.Command,{ref:t,className:x("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...n}));uo.displayName=Me.Command.displayName;const sd=({children:e,...n})=>r.jsx(Kr,{...n,children:r.jsx(no,{className:"overflow-hidden p-0 shadow-lg",children:r.jsx(uo,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),hs=v.forwardRef(({className:e,...n},t)=>r.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[r.jsx(A.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),r.jsx(Me.Command.Input,{ref:t,className:x("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...n})]}));hs.displayName=Me.Command.Input.displayName;const xs=v.forwardRef(({className:e,...n},t)=>r.jsx(Me.Command.List,{ref:t,className:x("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...n}));xs.displayName=Me.Command.List.displayName;const vs=v.forwardRef((e,n)=>r.jsx(Me.Command.Empty,{ref:n,className:"py-6 text-center text-sm",...e}));vs.displayName=Me.Command.Empty.displayName;const bs=v.forwardRef(({className:e,...n},t)=>r.jsx(Me.Command.Group,{ref:t,className:x("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...n}));bs.displayName=Me.Command.Group.displayName;const ws=v.forwardRef(({className:e,...n},t)=>r.jsx(Me.Command.Separator,{ref:t,className:x("-mx-1 h-px bg-border",e),...n}));ws.displayName=Me.Command.Separator.displayName;const ys=v.forwardRef(({className:e,...n},t)=>r.jsx(Me.Command.Item,{ref:t,className:x("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected='true']:text-accent-foreground data-[disabled=true]:opacity-50",e),...n}));ys.displayName=Me.Command.Item.displayName;const Ns=({className:e,...n})=>r.jsx("span",{className:x("ml-auto text-xs tracking-widest text-muted-foreground",e),...n});Ns.displayName="CommandShortcut";const ad=Fe("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Cs=v.forwardRef(({className:e,variant:n,...t},o)=>r.jsx("div",{ref:o,role:"alert",className:x(ad({variant:n}),e),...t}));Cs.displayName="Alert";const js=v.forwardRef(({className:e,...n},t)=>r.jsx("h5",{ref:t,className:x("mb-1 font-medium leading-none tracking-tight",e),...n}));js.displayName="AlertTitle";const Ss=v.forwardRef(({className:e,...n},t)=>r.jsx("div",{ref:t,className:x("text-sm [&_p]:leading-relaxed",e),...n}));Ss.displayName="AlertDescription";const id=Re.Root,ld=Re.Trigger,ks=Re.Portal,mo=v.forwardRef(({className:e,...n},t)=>r.jsx(Re.Overlay,{className:x("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n,ref:t}));mo.displayName=Re.Overlay.displayName;const Rs=v.forwardRef(({className:e,...n},t)=>r.jsxs(ks,{children:[r.jsx(mo,{}),r.jsx(Re.Content,{ref:t,className:x("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n})]}));Rs.displayName=Re.Content.displayName;const _s=({className:e,...n})=>r.jsx("div",{className:x("flex flex-col space-y-2 text-center sm:text-left",e),...n});_s.displayName="AlertDialogHeader";const Ms=({className:e,...n})=>r.jsx("div",{className:x("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n});Ms.displayName="AlertDialogFooter";const Ps=v.forwardRef(({className:e,...n},t)=>r.jsx(Re.Title,{ref:t,className:x("text-lg font-semibold",e),...n}));Ps.displayName=Re.Title.displayName;const Is=v.forwardRef(({className:e,...n},t)=>r.jsx(Re.Description,{ref:t,className:x("text-sm text-muted-foreground",e),...n}));Is.displayName=Re.Description.displayName;const Ts=v.forwardRef(({className:e,...n},t)=>r.jsx(Re.Action,{ref:t,className:x(At(),e),...n}));Ts.displayName=Re.Action.displayName;const Ls=v.forwardRef(({className:e,...n},t)=>r.jsx(Re.Cancel,{ref:t,className:x(At({variant:"outline"}),"mt-2 sm:mt-0",e),...n}));Ls.displayName=Re.Cancel.displayName;const Ds=v.forwardRef(({className:e,value:n,...t},o)=>r.jsx(_n.Root,{ref:o,className:x("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...t,children:r.jsx(_n.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(n||0)}%)`}})}));Ds.displayName=_n.Root.displayName;function dd({className:e,...n}){return r.jsx("div",{className:x("animate-pulse rounded-md bg-muted",e),...n})}function cd(e){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css",n.appendChild(t),t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}const ud=e=>{switch(e){case"success":return gd;case"info":return hd;case"warning":return pd;case"error":return xd;default:return null}},md=Array(12).fill(0),fd=({visible:e,className:n})=>j.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},j.createElement("div",{className:"sonner-spinner"},md.map((t,o)=>j.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),gd=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),pd=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),hd=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),xd=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),vd=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},j.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),j.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),bd=()=>{const[e,n]=j.useState(document.hidden);return j.useEffect(()=>{const t=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)},[]),e};let Pn=1;class wd{constructor(){this.subscribe=n=>(this.subscribers.push(n),()=>{const t=this.subscribers.indexOf(n);this.subscribers.splice(t,1)}),this.publish=n=>{this.subscribers.forEach(t=>t(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n]},this.create=n=>{var t;const{message:o,...s}=n,a=typeof(n==null?void 0:n.id)=="number"||((t=n.id)==null?void 0:t.length)>0?n.id:Pn++,i=this.toasts.find(c=>c.id===a),l=n.dismissible===void 0?!0:n.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),i?this.toasts=this.toasts.map(c=>c.id===a?(this.publish({...c,...n,id:a,title:o}),{...c,...n,id:a,dismissible:l,title:o}):c):this.addToast({title:o,...s,dismissible:l,id:a}),a},this.dismiss=n=>(n?(this.dismissedToasts.add(n),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:n,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(o=>o({id:t.id,dismiss:!0}))}),n),this.message=(n,t)=>this.create({...t,message:n}),this.error=(n,t)=>this.create({...t,message:n,type:"error"}),this.success=(n,t)=>this.create({...t,type:"success",message:n}),this.info=(n,t)=>this.create({...t,type:"info",message:n}),this.warning=(n,t)=>this.create({...t,type:"warning",message:n}),this.loading=(n,t)=>this.create({...t,type:"loading",message:n}),this.promise=(n,t)=>{if(!t)return;let o;t.loading!==void 0&&(o=this.create({...t,promise:n,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const s=Promise.resolve(n instanceof Function?n():n);let a=o!==void 0,i;const l=s.then(async d=>{if(i=["resolve",d],j.isValidElement(d))a=!1,this.create({id:o,type:"default",message:d});else if(Nd(d)&&!d.ok){a=!1;const u=typeof t.error=="function"?await t.error(`HTTP error! status: ${d.status}`):t.error,f=typeof t.description=="function"?await t.description(`HTTP error! status: ${d.status}`):t.description,p=typeof u=="object"&&!j.isValidElement(u)?u:{message:u};this.create({id:o,type:"error",description:f,...p})}else if(d instanceof Error){a=!1;const u=typeof t.error=="function"?await t.error(d):t.error,f=typeof t.description=="function"?await t.description(d):t.description,p=typeof u=="object"&&!j.isValidElement(u)?u:{message:u};this.create({id:o,type:"error",description:f,...p})}else if(t.success!==void 0){a=!1;const u=typeof t.success=="function"?await t.success(d):t.success,f=typeof t.description=="function"?await t.description(d):t.description,p=typeof u=="object"&&!j.isValidElement(u)?u:{message:u};this.create({id:o,type:"success",description:f,...p})}}).catch(async d=>{if(i=["reject",d],t.error!==void 0){a=!1;const g=typeof t.error=="function"?await t.error(d):t.error,u=typeof t.description=="function"?await t.description(d):t.description,m=typeof g=="object"&&!j.isValidElement(g)?g:{message:g};this.create({id:o,type:"error",description:u,...m})}}).finally(()=>{a&&(this.dismiss(o),o=void 0),t.finally==null||t.finally.call(t)}),c=()=>new Promise((d,g)=>l.then(()=>i[0]==="reject"?g(i[1]):d(i[1])).catch(g));return typeof o!="string"&&typeof o!="number"?{unwrap:c}:Object.assign(o,{unwrap:c})},this.custom=(n,t)=>{const o=(t==null?void 0:t.id)||Pn++;return this.create({jsx:n(o),id:o,...t}),o},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const _e=new wd,yd=(e,n)=>{const t=(n==null?void 0:n.id)||Pn++;return _e.addToast({title:e,...n,id:t}),t},Nd=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Cd=yd,jd=()=>_e.toasts,Sd=()=>_e.getActiveToasts(),kd=Object.assign(Cd,{success:_e.success,info:_e.info,warning:_e.warning,error:_e.error,custom:_e.custom,message:_e.message,promise:_e.promise,dismiss:_e.dismiss,loading:_e.loading},{getHistory:jd,getToasts:Sd});cd("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Kt(e){return e.label!==void 0}const Rd=3,_d="24px",Md="16px",To=4e3,Pd=356,Id=14,Td=45,Ld=200;function qe(...e){return e.filter(Boolean).join(" ")}function Dd(e){const[n,t]=e.split("-"),o=[];return n&&o.push(n),t&&o.push(t),o}const Fd=e=>{var n,t,o,s,a,i,l,c,d;const{invert:g,toast:u,unstyled:f,interacting:m,setHeights:p,visibleToasts:h,heights:w,index:b,toasts:y,expanded:N,removeToast:R,defaultRichColors:_,closeButton:S,style:k,cancelButtonStyle:C,actionButtonStyle:D,className:G="",descriptionClassName:E="",duration:J,position:Q,gap:M,expandByDefault:X,classNames:V,icons:U,closeButtonAriaLabel:P="Close toast"}=e,[fe,ge]=j.useState(null),[de,je]=j.useState(null),[F,B]=j.useState(!1),[Y,ce]=j.useState(!1),[q,O]=j.useState(!1),[ue,ie]=j.useState(!1),[K,I]=j.useState(!1),[ee,se]=j.useState(0),[we,Ie]=j.useState(0),Se=j.useRef(u.duration||J||To),Oe=j.useRef(null),ve=j.useRef(null),We=b===0,Qe=b+1<=h,ye=u.type,He=u.dismissible!==!1,Vt=u.className||"",$t=u.descriptionClassName||"",dt=j.useMemo(()=>w.findIndex(H=>H.toastId===u.id)||0,[w,u.id]),zt=j.useMemo(()=>{var H;return(H=u.closeButton)!=null?H:S},[u.closeButton,S]),Bt=j.useMemo(()=>u.duration||J||To,[u.duration,J]),et=j.useRef(0),Te=j.useRef(0),ct=j.useRef(0),Ge=j.useRef(null),[ut,fn]=Q.split("-"),Ot=j.useMemo(()=>w.reduce((H,me,he)=>he>=dt?H:H+me.height,0),[w,dt]),Ht=bd(),gn=u.invert||g,vt=ye==="loading";Te.current=j.useMemo(()=>dt*M+Ot,[dt,Ot]),j.useEffect(()=>{Se.current=Bt},[Bt]),j.useEffect(()=>{B(!0)},[]),j.useEffect(()=>{const H=ve.current;if(H){const me=H.getBoundingClientRect().height;return Ie(me),p(he=>[{toastId:u.id,height:me,position:u.position},...he]),()=>p(he=>he.filter(ke=>ke.toastId!==u.id))}},[p,u.id]),j.useLayoutEffect(()=>{if(!F)return;const H=ve.current,me=H.style.height;H.style.height="auto";const he=H.getBoundingClientRect().height;H.style.height=me,Ie(he),p(ke=>ke.find(Ne=>Ne.toastId===u.id)?ke.map(Ne=>Ne.toastId===u.id?{...Ne,height:he}:Ne):[{toastId:u.id,height:he,position:u.position},...ke])},[F,u.title,u.description,p,u.id,u.jsx,u.action,u.cancel]);const Ae=j.useCallback(()=>{ce(!0),se(Te.current),p(H=>H.filter(me=>me.toastId!==u.id)),setTimeout(()=>{R(u)},Ld)},[u,R,p,Te]);j.useEffect(()=>{if(u.promise&&ye==="loading"||u.duration===1/0||u.type==="loading")return;let H;return N||m||Ht?(()=>{if(ct.current<et.current){const ke=new Date().getTime()-et.current;Se.current=Se.current-ke}ct.current=new Date().getTime()})():(()=>{Se.current!==1/0&&(et.current=new Date().getTime(),H=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),Ae()},Se.current))})(),()=>clearTimeout(H)},[N,m,u,ye,Ht,Ae]),j.useEffect(()=>{u.delete&&(Ae(),u.onDismiss==null||u.onDismiss.call(u,u))},[Ae,u.delete]);function pn(){var H;if(U!=null&&U.loading){var me;return j.createElement("div",{className:qe(V==null?void 0:V.loader,u==null||(me=u.classNames)==null?void 0:me.loader,"sonner-loader"),"data-visible":ye==="loading"},U.loading)}return j.createElement(fd,{className:qe(V==null?void 0:V.loader,u==null||(H=u.classNames)==null?void 0:H.loader),visible:ye==="loading"})}const Gt=u.icon||(U==null?void 0:U[ye])||ud(ye);var bt,wt;return j.createElement("li",{tabIndex:0,ref:ve,className:qe(G,Vt,V==null?void 0:V.toast,u==null||(n=u.classNames)==null?void 0:n.toast,V==null?void 0:V.default,V==null?void 0:V[ye],u==null||(t=u.classNames)==null?void 0:t[ye]),"data-sonner-toast":"","data-rich-colors":(bt=u.richColors)!=null?bt:_,"data-styled":!(u.jsx||u.unstyled||f),"data-mounted":F,"data-promise":!!u.promise,"data-swiped":K,"data-removed":Y,"data-visible":Qe,"data-y-position":ut,"data-x-position":fn,"data-index":b,"data-front":We,"data-swiping":q,"data-dismissible":He,"data-type":ye,"data-invert":gn,"data-swipe-out":ue,"data-swipe-direction":de,"data-expanded":!!(N||X&&F),"data-testid":u.testId,style:{"--index":b,"--toasts-before":b,"--z-index":y.length-b,"--offset":`${Y?ee:Te.current}px`,"--initial-height":X?"auto":`${we}px`,...k,...u.style},onDragEnd:()=>{O(!1),ge(null),Ge.current=null},onPointerDown:H=>{H.button!==2&&(vt||!He||(Oe.current=new Date,se(Te.current),H.target.setPointerCapture(H.pointerId),H.target.tagName!=="BUTTON"&&(O(!0),Ge.current={x:H.clientX,y:H.clientY})))},onPointerUp:()=>{var H,me,he;if(ue||!He)return;Ge.current=null;const ke=Number(((H=ve.current)==null?void 0:H.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),qt=Number(((me=ve.current)==null?void 0:me.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ne=new Date().getTime()-((he=Oe.current)==null?void 0:he.getTime()),De=fe==="x"?ke:qt,Wt=Math.abs(De)/Ne;if(Math.abs(De)>=Td||Wt>.11){se(Te.current),u.onDismiss==null||u.onDismiss.call(u,u),je(fe==="x"?ke>0?"right":"left":qt>0?"down":"up"),Ae(),ie(!0);return}else{var Ee,Ve;(Ee=ve.current)==null||Ee.style.setProperty("--swipe-amount-x","0px"),(Ve=ve.current)==null||Ve.style.setProperty("--swipe-amount-y","0px")}I(!1),O(!1),ge(null)},onPointerMove:H=>{var me,he,ke;if(!Ge.current||!He||((me=window.getSelection())==null?void 0:me.toString().length)>0)return;const Ne=H.clientY-Ge.current.y,De=H.clientX-Ge.current.x;var Wt;const Ee=(Wt=e.swipeDirections)!=null?Wt:Dd(Q);!fe&&(Math.abs(De)>1||Math.abs(Ne)>1)&&ge(Math.abs(De)>Math.abs(Ne)?"x":"y");let Ve={x:0,y:0};const jo=tt=>1/(1.5+Math.abs(tt)/20);if(fe==="y"){if(Ee.includes("top")||Ee.includes("bottom"))if(Ee.includes("top")&&Ne<0||Ee.includes("bottom")&&Ne>0)Ve.y=Ne;else{const tt=Ne*jo(Ne);Ve.y=Math.abs(tt)<Math.abs(Ne)?tt:Ne}}else if(fe==="x"&&(Ee.includes("left")||Ee.includes("right")))if(Ee.includes("left")&&De<0||Ee.includes("right")&&De>0)Ve.x=De;else{const tt=De*jo(De);Ve.x=Math.abs(tt)<Math.abs(De)?tt:De}(Math.abs(Ve.x)>0||Math.abs(Ve.y)>0)&&I(!0),(he=ve.current)==null||he.style.setProperty("--swipe-amount-x",`${Ve.x}px`),(ke=ve.current)==null||ke.style.setProperty("--swipe-amount-y",`${Ve.y}px`)}},zt&&!u.jsx&&ye!=="loading"?j.createElement("button",{"aria-label":P,"data-disabled":vt,"data-close-button":!0,onClick:vt||!He?()=>{}:()=>{Ae(),u.onDismiss==null||u.onDismiss.call(u,u)},className:qe(V==null?void 0:V.closeButton,u==null||(o=u.classNames)==null?void 0:o.closeButton)},(wt=U==null?void 0:U.close)!=null?wt:vd):null,(ye||u.icon||u.promise)&&u.icon!==null&&((U==null?void 0:U[ye])!==null||u.icon)?j.createElement("div",{"data-icon":"",className:qe(V==null?void 0:V.icon,u==null||(s=u.classNames)==null?void 0:s.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||pn():null,u.type!=="loading"?Gt:null):null,j.createElement("div",{"data-content":"",className:qe(V==null?void 0:V.content,u==null||(a=u.classNames)==null?void 0:a.content)},j.createElement("div",{"data-title":"",className:qe(V==null?void 0:V.title,u==null||(i=u.classNames)==null?void 0:i.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?j.createElement("div",{"data-description":"",className:qe(E,$t,V==null?void 0:V.description,u==null||(l=u.classNames)==null?void 0:l.description)},typeof u.description=="function"?u.description():u.description):null),j.isValidElement(u.cancel)?u.cancel:u.cancel&&Kt(u.cancel)?j.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||C,onClick:H=>{Kt(u.cancel)&&He&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,H),Ae())},className:qe(V==null?void 0:V.cancelButton,u==null||(c=u.classNames)==null?void 0:c.cancelButton)},u.cancel.label):null,j.isValidElement(u.action)?u.action:u.action&&Kt(u.action)?j.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||D,onClick:H=>{Kt(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,H),!H.defaultPrevented&&Ae())},className:qe(V==null?void 0:V.actionButton,u==null||(d=u.classNames)==null?void 0:d.actionButton)},u.action.label):null)};function Lo(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Ad(e,n){const t={};return[e,n].forEach((o,s)=>{const a=s===1,i=a?"--mobile-offset":"--offset",l=a?Md:_d;function c(d){["top","right","bottom","left"].forEach(g=>{t[`${i}-${g}`]=typeof d=="number"?`${d}px`:d})}typeof o=="number"||typeof o=="string"?c(o):typeof o=="object"?["top","right","bottom","left"].forEach(d=>{o[d]===void 0?t[`${i}-${d}`]=l:t[`${i}-${d}`]=typeof o[d]=="number"?`${o[d]}px`:o[d]}):c(l)}),t}const Ed=j.forwardRef(function(n,t){const{id:o,invert:s,position:a="bottom-right",hotkey:i=["altKey","KeyT"],expand:l,closeButton:c,className:d,offset:g,mobileOffset:u,theme:f="light",richColors:m,duration:p,style:h,visibleToasts:w=Rd,toastOptions:b,dir:y=Lo(),gap:N=Id,icons:R,containerAriaLabel:_="Notifications"}=n,[S,k]=j.useState([]),C=j.useMemo(()=>o?S.filter(F=>F.toasterId===o):S.filter(F=>!F.toasterId),[S,o]),D=j.useMemo(()=>Array.from(new Set([a].concat(C.filter(F=>F.position).map(F=>F.position)))),[C,a]),[G,E]=j.useState([]),[J,Q]=j.useState(!1),[M,X]=j.useState(!1),[V,U]=j.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),P=j.useRef(null),fe=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),ge=j.useRef(null),de=j.useRef(!1),je=j.useCallback(F=>{k(B=>{var Y;return(Y=B.find(ce=>ce.id===F.id))!=null&&Y.delete||_e.dismiss(F.id),B.filter(({id:ce})=>ce!==F.id)})},[]);return j.useEffect(()=>_e.subscribe(F=>{if(F.dismiss){requestAnimationFrame(()=>{k(B=>B.map(Y=>Y.id===F.id?{...Y,delete:!0}:Y))});return}setTimeout(()=>{Li.flushSync(()=>{k(B=>{const Y=B.findIndex(ce=>ce.id===F.id);return Y!==-1?[...B.slice(0,Y),{...B[Y],...F},...B.slice(Y+1)]:[F,...B]})})})}),[S]),j.useEffect(()=>{if(f!=="system"){U(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?U("dark"):U("light")),typeof window>"u")return;const F=window.matchMedia("(prefers-color-scheme: dark)");try{F.addEventListener("change",({matches:B})=>{U(B?"dark":"light")})}catch{F.addListener(({matches:Y})=>{try{U(Y?"dark":"light")}catch(ce){console.error(ce)}})}},[f]),j.useEffect(()=>{S.length<=1&&Q(!1)},[S]),j.useEffect(()=>{const F=B=>{var Y;if(i.every(O=>B[O]||B.code===O)){var q;Q(!0),(q=P.current)==null||q.focus()}B.code==="Escape"&&(document.activeElement===P.current||(Y=P.current)!=null&&Y.contains(document.activeElement))&&Q(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[i]),j.useEffect(()=>{if(P.current)return()=>{ge.current&&(ge.current.focus({preventScroll:!0}),ge.current=null,de.current=!1)}},[P.current]),j.createElement("section",{ref:t,"aria-label":`${_} ${fe}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},D.map((F,B)=>{var Y;const[ce,q]=F.split("-");return C.length?j.createElement("ol",{key:F,dir:y==="auto"?Lo():y,tabIndex:-1,ref:P,className:d,"data-sonner-toaster":!0,"data-sonner-theme":V,"data-y-position":ce,"data-x-position":q,style:{"--front-toast-height":`${((Y=G[0])==null?void 0:Y.height)||0}px`,"--width":`${Pd}px`,"--gap":`${N}px`,...h,...Ad(g,u)},onBlur:O=>{de.current&&!O.currentTarget.contains(O.relatedTarget)&&(de.current=!1,ge.current&&(ge.current.focus({preventScroll:!0}),ge.current=null))},onFocus:O=>{O.target instanceof HTMLElement&&O.target.dataset.dismissible==="false"||de.current||(de.current=!0,ge.current=O.relatedTarget)},onMouseEnter:()=>Q(!0),onMouseMove:()=>Q(!0),onMouseLeave:()=>{M||Q(!1)},onDragEnd:()=>Q(!1),onPointerDown:O=>{O.target instanceof HTMLElement&&O.target.dataset.dismissible==="false"||X(!0)},onPointerUp:()=>X(!1)},C.filter(O=>!O.position&&B===0||O.position===F).map((O,ue)=>{var ie,K;return j.createElement(Fd,{key:O.id,icons:R,index:ue,toast:O,defaultRichColors:m,duration:(ie=b==null?void 0:b.duration)!=null?ie:p,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:s,visibleToasts:w,closeButton:(K=b==null?void 0:b.closeButton)!=null?K:c,interacting:M,position:F,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:je,toasts:C.filter(I=>I.position==O.position),heights:G.filter(I=>I.position==O.position),setHeights:E,expandByDefault:l,gap:N,expanded:J,swipeDirections:n.swipeDirections})})):null}))}),vn=["light","dark","system"];function Vd(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Do(e){return e==="system"?Vd():e}function $d(e){if(typeof document>"u")return()=>{};const n=document.createElement("style");return e&&n.setAttribute("nonce",e),n.appendChild(document.createTextNode("*, *::before, *::after { transition: none !important; animation: none !important; }")),document.head.appendChild(n),window.getComputedStyle(document.body),()=>{window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{document.head.removeChild(n)})})}}function zd(e,n){const t=document.documentElement;n==="class"?(t.classList.remove("light","dark"),t.classList.add(e)):t.setAttribute("data-theme",e)}const Fs=j.createContext(void 0);function Bd({children:e,defaultTheme:n="system",storageKey:t="nui-theme",attribute:o="class",enableSystem:s=!0,disableTransitionOnChange:a=!1,forcedTheme:i,nonce:l}){const[c,d]=j.useState(()=>{if(typeof window>"u")return n;const b=localStorage.getItem(t);return b&&vn.includes(b)?b:n}),[g,u]=j.useState(()=>Do(i??c)),f=j.useRef(c);f.current=c;const m=j.useCallback(()=>{const b=i??f.current,y=Do(b);u(y);let N;a&&(N=$d(l)),zd(y,o),N==null||N()},[i,o,a,l]);j.useEffect(()=>{m()},[c,i,m]),j.useEffect(()=>{if(!s)return;const b=window.matchMedia("(prefers-color-scheme: dark)"),y=()=>{(i??f.current)==="system"&&m()};return b.addEventListener("change",y),()=>b.removeEventListener("change",y)},[s,i,m]),j.useEffect(()=>{const b=y=>{if(y.key===t&&y.newValue){const N=y.newValue;vn.includes(N)&&d(N)}};return window.addEventListener("storage",b),()=>window.removeEventListener("storage",b)},[t]);const p=j.useCallback(b=>{!s&&b==="system"||(localStorage.setItem(t,b),d(b))},[t,s]),h=j.useMemo(()=>s?vn:["light","dark"],[s]),w=j.useMemo(()=>({theme:i??c,resolvedTheme:g,setTheme:p,themes:h}),[i,c,g,p,h]);return r.jsx(Fs.Provider,{value:w,children:e})}function ln(){const e=j.useContext(Fs);if(e===void 0)throw new Error("useTheme must be used within a <ThemeProvider>");return e}const Od=({theme:e,...n})=>{let t=e;try{const{resolvedTheme:o}=ln();e||(t=o)}catch{t||(t="system")}return r.jsx(Ed,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...n})};function Hd({icon:e,title:n,description:t,action:o,className:s}){return r.jsxs("div",{className:x("flex flex-col items-center justify-center py-12 px-4 text-center",s),children:[e&&r.jsx("div",{className:"mb-4 text-muted-foreground",children:e}),r.jsx("h3",{className:"text-lg font-semibold",children:n}),t&&r.jsx("p",{className:"mt-1 text-sm text-muted-foreground max-w-sm",children:t}),o&&r.jsx("div",{className:"mt-4",children:o})]})}const As=v.forwardRef(({...e},n)=>r.jsx("nav",{ref:n,"aria-label":"breadcrumb",...e}));As.displayName="Breadcrumb";const Es=v.forwardRef(({className:e,...n},t)=>r.jsx("ol",{ref:t,className:x("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...n}));Es.displayName="BreadcrumbList";const Vs=v.forwardRef(({className:e,...n},t)=>r.jsx("li",{ref:t,className:x("inline-flex items-center gap-1.5",e),...n}));Vs.displayName="BreadcrumbItem";const $s=v.forwardRef(({asChild:e,className:n,...t},o)=>{const s=e?qo.Slot:"a";return r.jsx(s,{ref:o,className:x("transition-colors hover:text-foreground",n),...t})});$s.displayName="BreadcrumbLink";const zs=v.forwardRef(({className:e,...n},t)=>r.jsx("span",{ref:t,role:"link","aria-disabled":"true","aria-current":"page",className:x("font-normal text-foreground",e),...n}));zs.displayName="BreadcrumbPage";const Bs=({children:e,className:n,...t})=>r.jsx("li",{role:"presentation","aria-hidden":"true",className:x("[&>svg]:w-3.5 [&>svg]:h-3.5",n),...t,children:e??r.jsx(A.ChevronRight,{})});Bs.displayName="BreadcrumbSeparator";const Os=({className:e,...n})=>{const t=Z();return r.jsxs("span",{role:"presentation","aria-hidden":"true",className:x("flex h-9 w-9 items-center justify-center",e),...n,children:[r.jsx("span",{className:"h-4 w-4",children:"..."}),r.jsx("span",{className:"sr-only",children:t.breadcrumb_more})]})};Os.displayName="BreadcrumbEllipsis";const Hs=({className:e,...n})=>r.jsx("nav",{role:"navigation","aria-label":"pagination",className:x("mx-auto flex w-full justify-center",e),...n});Hs.displayName="Pagination";const Gs=v.forwardRef(({className:e,...n},t)=>r.jsx("ul",{ref:t,className:x("flex flex-row items-center gap-1",e),...n}));Gs.displayName="PaginationContent";const qs=v.forwardRef(({className:e,...n},t)=>r.jsx("li",{ref:t,className:x("",e),...n}));qs.displayName="PaginationItem";const dn=({className:e,isActive:n,size:t="icon",...o})=>r.jsx("a",{"aria-current":n?"page":void 0,className:x(At({variant:n?"outline":"ghost",size:t}),e),...o});dn.displayName="PaginationLink";const Ws=({className:e,...n})=>{const t=Z();return r.jsxs(dn,{"aria-label":t.pagination_goToPrevious,size:"default",className:x("gap-1 pl-2.5",e),...n,children:[r.jsx(A.ChevronLeft,{className:"h-4 w-4"}),r.jsx("span",{children:t.pagination_previous})]})};Ws.displayName="PaginationPrevious";const Us=({className:e,...n})=>{const t=Z();return r.jsxs(dn,{"aria-label":t.pagination_goToNext,size:"default",className:x("gap-1 pr-2.5",e),...n,children:[r.jsx("span",{children:t.pagination_next}),r.jsx(A.ChevronRight,{className:"h-4 w-4"})]})};Us.displayName="PaginationNext";const Ys=({className:e,...n})=>{const t=Z();return r.jsxs("span",{"aria-hidden":!0,className:x("flex h-9 w-9 items-center justify-center",e),...n,children:[r.jsx(A.MoreHorizontal,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:t.pagination_morePages})]})};Ys.displayName="PaginationEllipsis";function Gd({steps:e,activeStep:n,orientation:t="horizontal",className:o}){return r.jsx("div",{className:x("flex",t==="vertical"?"flex-col":"flex-row items-center",o),children:e.map((s,a)=>{const i=a<n,l=a===n,c=a===e.length-1;return r.jsxs(v.Fragment,{children:[r.jsxs("div",{className:x("flex items-center",t==="vertical"&&"flex-row"),children:[r.jsx("div",{className:x("flex h-10 w-10 items-center justify-center rounded-full border-2 font-semibold transition-colors",i&&"border-primary bg-primary text-primary-foreground",l&&"border-primary text-primary",!i&&!l&&"border-muted-foreground/30 text-muted-foreground"),children:i?r.jsx(A.Check,{className:"h-5 w-5"}):a+1}),r.jsxs("div",{className:x("ml-3",t==="horizontal"&&"hidden sm:block"),children:[r.jsx("p",{className:x("text-sm font-medium",l&&"text-foreground",!l&&"text-muted-foreground"),children:s.title}),s.description&&r.jsx("p",{className:"text-xs text-muted-foreground",children:s.description})]})]}),!c&&r.jsx("div",{className:x("flex-1",t==="horizontal"?"mx-4 h-0.5 min-w-[3rem]":"ml-5 my-2 w-0.5 min-h-[2rem]",i?"bg-primary":"bg-muted-foreground/30")})]},a)})})}const Xs=v.forwardRef(({className:e,children:n,...t},o)=>r.jsxs(Pe.Root,{ref:o,className:x("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...t,children:[n,r.jsx(fo,{})]}));Xs.displayName=Pe.Root.displayName;const Ks=v.forwardRef(({className:e,...n},t)=>r.jsx(Pe.List,{ref:t,className:x("group flex flex-1 list-none items-center justify-center space-x-1",e),...n}));Ks.displayName=Pe.List.displayName;const qd=Pe.Item,Zs=Fe("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),Js=v.forwardRef(({className:e,children:n,...t},o)=>r.jsxs(Pe.Trigger,{ref:o,className:x(Zs(),"group",e),...t,children:[n," ",r.jsx(A.ChevronDown,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));Js.displayName=Pe.Trigger.displayName;const Qs=v.forwardRef(({className:e,...n},t)=>r.jsx(Pe.Content,{ref:t,className:x("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto",e),...n}));Qs.displayName=Pe.Content.displayName;const Wd=Pe.Link,fo=v.forwardRef(({className:e,...n},t)=>r.jsx("div",{className:x("absolute left-0 top-full flex justify-center"),children:r.jsx(Pe.Viewport,{className:x("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",e),ref:t,...n})}));fo.displayName=Pe.Viewport.displayName;const ea=v.forwardRef(({className:e,...n},t)=>r.jsx(Pe.Indicator,{ref:t,className:x("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...n,children:r.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));ea.displayName=Pe.Indicator.displayName;const Ud=oe.Root,Yd=oe.Trigger,Xd=oe.Group,Kd=oe.Portal,Zd=oe.Sub,Jd=oe.RadioGroup,ta=v.forwardRef(({className:e,inset:n,children:t,...o},s)=>r.jsxs(oe.SubTrigger,{ref:s,className:x("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",n&&"pl-8",e),...o,children:[t,r.jsx(A.ChevronRight,{className:"ml-auto h-4 w-4"})]}));ta.displayName=oe.SubTrigger.displayName;const na=v.forwardRef(({className:e,...n},t)=>r.jsx(oe.SubContent,{ref:t,className:x("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));na.displayName=oe.SubContent.displayName;const oa=v.forwardRef(({className:e,...n},t)=>r.jsx(oe.Portal,{children:r.jsx(oe.Content,{ref:t,className:x("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));oa.displayName=oe.Content.displayName;const ra=v.forwardRef(({className:e,inset:n,...t},o)=>r.jsx(oe.Item,{ref:o,className:x("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n&&"pl-8",e),...t}));ra.displayName=oe.Item.displayName;const sa=v.forwardRef(({className:e,children:n,checked:t,...o},s)=>r.jsxs(oe.CheckboxItem,{ref:s,className:x("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:t,...o,children:[r.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(oe.ItemIndicator,{children:r.jsx(A.Check,{className:"h-4 w-4"})})}),n]}));sa.displayName=oe.CheckboxItem.displayName;const aa=v.forwardRef(({className:e,children:n,...t},o)=>r.jsxs(oe.RadioItem,{ref:o,className:x("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t,children:[r.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(oe.ItemIndicator,{children:r.jsx(A.Circle,{className:"h-2 w-2 fill-current"})})}),n]}));aa.displayName=oe.RadioItem.displayName;const ia=v.forwardRef(({className:e,inset:n,...t},o)=>r.jsx(oe.Label,{ref:o,className:x("px-2 py-1.5 text-sm font-semibold text-foreground",n&&"pl-8",e),...t}));ia.displayName=oe.Label.displayName;const la=v.forwardRef(({className:e,...n},t)=>r.jsx(oe.Separator,{ref:t,className:x("-mx-1 my-1 h-px bg-border",e),...n}));la.displayName=oe.Separator.displayName;const da=({className:e,...n})=>r.jsx("span",{className:x("ml-auto text-xs tracking-widest text-muted-foreground",e),...n});da.displayName="ContextMenuShortcut";const Qd=sn.Root,ec=sn.Trigger,ca=v.forwardRef(({className:e,align:n="center",sideOffset:t=4,...o},s)=>r.jsx(sn.Content,{ref:s,align:n,sideOffset:t,className:x("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o}));ca.displayName=sn.Content.displayName;function tc(e){return Object.prototype.toString.call(e)==="[object Object]"}function Fo(e){return tc(e)||Array.isArray(e)}function nc(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function go(e,n){const t=Object.keys(e),o=Object.keys(n);if(t.length!==o.length)return!1;const s=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(n.breakpoints||{}));return s!==a?!1:t.every(i=>{const l=e[i],c=n[i];return typeof l=="function"?`${l}`==`${c}`:!Fo(l)||!Fo(c)?l===c:go(l,c)})}function Ao(e){return e.concat().sort((n,t)=>n.name>t.name?1:-1).map(n=>n.options)}function oc(e,n){if(e.length!==n.length)return!1;const t=Ao(e),o=Ao(n);return t.every((s,a)=>{const i=o[a];return go(s,i)})}function po(e){return typeof e=="number"}function In(e){return typeof e=="string"}function cn(e){return typeof e=="boolean"}function Eo(e){return Object.prototype.toString.call(e)==="[object Object]"}function ae(e){return Math.abs(e)}function ho(e){return Math.sign(e)}function Rt(e,n){return ae(e-n)}function rc(e,n){if(e===0||n===0||ae(e)<=ae(n))return 0;const t=Rt(ae(e),ae(n));return ae(t/e)}function sc(e){return Math.round(e*100)/100}function Tt(e){return Lt(e).map(Number)}function $e(e){return e[Et(e)]}function Et(e){return Math.max(0,e.length-1)}function xo(e,n){return n===Et(e)}function Vo(e,n=0){return Array.from(Array(e),(t,o)=>n+o)}function Lt(e){return Object.keys(e)}function ua(e,n){return[e,n].reduce((t,o)=>(Lt(o).forEach(s=>{const a=t[s],i=o[s],l=Eo(a)&&Eo(i);t[s]=l?ua(a,i):i}),t),{})}function Tn(e,n){return typeof n.MouseEvent<"u"&&e instanceof n.MouseEvent}function ac(e,n){const t={start:o,center:s,end:a};function o(){return 0}function s(c){return a(c)/2}function a(c){return n-c}function i(c,d){return In(e)?t[e](c):e(n,c,d)}return{measure:i}}function Dt(){let e=[];function n(s,a,i,l={passive:!0}){let c;if("addEventListener"in s)s.addEventListener(a,i,l),c=()=>s.removeEventListener(a,i,l);else{const d=s;d.addListener(i),c=()=>d.removeListener(i)}return e.push(c),o}function t(){e=e.filter(s=>s())}const o={add:n,clear:t};return o}function ic(e,n,t,o){const s=Dt(),a=1e3/60;let i=null,l=0,c=0;function d(){s.add(e,"visibilitychange",()=>{e.hidden&&p()})}function g(){m(),s.clear()}function u(w){if(!c)return;i||(i=w,t(),t());const b=w-i;for(i=w,l+=b;l>=a;)t(),l-=a;const y=l/a;o(y),c&&(c=n.requestAnimationFrame(u))}function f(){c||(c=n.requestAnimationFrame(u))}function m(){n.cancelAnimationFrame(c),i=null,l=0,c=0}function p(){i=null,l=0}return{init:d,destroy:g,start:f,stop:m,update:t,render:o}}function lc(e,n){const t=n==="rtl",o=e==="y",s=o?"y":"x",a=o?"x":"y",i=!o&&t?-1:1,l=g(),c=u();function d(p){const{height:h,width:w}=p;return o?h:w}function g(){return o?"top":t?"right":"left"}function u(){return o?"bottom":t?"left":"right"}function f(p){return p*i}return{scroll:s,cross:a,startEdge:l,endEdge:c,measureSize:d,direction:f}}function at(e=0,n=0){const t=ae(e-n);function o(d){return d<e}function s(d){return d>n}function a(d){return o(d)||s(d)}function i(d){return a(d)?o(d)?e:n:d}function l(d){return t?d-t*Math.ceil((d-n)/t):d}return{length:t,max:n,min:e,constrain:i,reachedAny:a,reachedMax:s,reachedMin:o,removeOffset:l}}function ma(e,n,t){const{constrain:o}=at(0,e),s=e+1;let a=i(n);function i(f){return t?ae((s+f)%s):o(f)}function l(){return a}function c(f){return a=i(f),u}function d(f){return g().set(l()+f)}function g(){return ma(e,l(),t)}const u={get:l,set:c,add:d,clone:g};return u}function dc(e,n,t,o,s,a,i,l,c,d,g,u,f,m,p,h,w,b,y){const{cross:N,direction:R}=e,_=["INPUT","SELECT","TEXTAREA"],S={passive:!1},k=Dt(),C=Dt(),D=at(50,225).constrain(m.measure(20)),G={mouse:300,touch:400},E={mouse:500,touch:600},J=p?43:25;let Q=!1,M=0,X=0,V=!1,U=!1,P=!1,fe=!1;function ge(I){if(!y)return;function ee(we){(cn(y)||y(I,we))&&ce(we)}const se=n;k.add(se,"dragstart",we=>we.preventDefault(),S).add(se,"touchmove",()=>{},S).add(se,"touchend",()=>{}).add(se,"touchstart",ee).add(se,"mousedown",ee).add(se,"touchcancel",O).add(se,"contextmenu",O).add(se,"click",ue,!0)}function de(){k.clear(),C.clear()}function je(){const I=fe?t:n;C.add(I,"touchmove",q,S).add(I,"touchend",O).add(I,"mousemove",q,S).add(I,"mouseup",O)}function F(I){const ee=I.nodeName||"";return _.includes(ee)}function B(){return(p?E:G)[fe?"mouse":"touch"]}function Y(I,ee){const se=u.add(ho(I)*-1),we=g.byDistance(I,!p).distance;return p||ae(I)<D?we:w&&ee?we*.5:g.byIndex(se.get(),0).distance}function ce(I){const ee=Tn(I,o);fe=ee,P=p&&ee&&!I.buttons&&Q,Q=Rt(s.get(),i.get())>=2,!(ee&&I.button!==0)&&(F(I.target)||(V=!0,a.pointerDown(I),d.useFriction(0).useDuration(0),s.set(i),je(),M=a.readPoint(I),X=a.readPoint(I,N),f.emit("pointerDown")))}function q(I){if(!Tn(I,o)&&I.touches.length>=2)return O(I);const se=a.readPoint(I),we=a.readPoint(I,N),Ie=Rt(se,M),Se=Rt(we,X);if(!U&&!fe&&(!I.cancelable||(U=Ie>Se,!U)))return O(I);const Oe=a.pointerMove(I);Ie>h&&(P=!0),d.useFriction(.3).useDuration(.75),l.start(),s.add(R(Oe)),I.preventDefault()}function O(I){const se=g.byDistance(0,!1).index!==u.get(),we=a.pointerUp(I)*B(),Ie=Y(R(we),se),Se=rc(we,Ie),Oe=J-10*Se,ve=b+Se/50;U=!1,V=!1,C.clear(),d.useDuration(Oe).useFriction(ve),c.distance(Ie,!p),fe=!1,f.emit("pointerUp")}function ue(I){P&&(I.stopPropagation(),I.preventDefault(),P=!1)}function ie(){return V}return{init:ge,destroy:de,pointerDown:ie}}function cc(e,n){let o,s;function a(u){return u.timeStamp}function i(u,f){const p=`client${(f||e.scroll)==="x"?"X":"Y"}`;return(Tn(u,n)?u:u.touches[0])[p]}function l(u){return o=u,s=u,i(u)}function c(u){const f=i(u)-i(s),m=a(u)-a(o)>170;return s=u,m&&(o=u),f}function d(u){if(!o||!s)return 0;const f=i(s)-i(o),m=a(u)-a(o),p=a(u)-a(s)>170,h=f/m;return m&&!p&&ae(h)>.1?h:0}return{pointerDown:l,pointerMove:c,pointerUp:d,readPoint:i}}function uc(){function e(t){const{offsetTop:o,offsetLeft:s,offsetWidth:a,offsetHeight:i}=t;return{top:o,right:s+a,bottom:o+i,left:s,width:a,height:i}}return{measure:e}}function mc(e){function n(o){return e*(o/100)}return{measure:n}}function fc(e,n,t,o,s,a,i){const l=[e].concat(o);let c,d,g=[],u=!1;function f(w){return s.measureSize(i.measure(w))}function m(w){if(!a)return;d=f(e),g=o.map(f);function b(y){for(const N of y){if(u)return;const R=N.target===e,_=o.indexOf(N.target),S=R?d:g[_],k=f(R?e:o[_]);if(ae(k-S)>=.5){w.reInit(),n.emit("resize");break}}}c=new ResizeObserver(y=>{(cn(a)||a(w,y))&&b(y)}),t.requestAnimationFrame(()=>{l.forEach(y=>c.observe(y))})}function p(){u=!0,c&&c.disconnect()}return{init:m,destroy:p}}function gc(e,n,t,o,s,a){let i=0,l=0,c=s,d=a,g=e.get(),u=0;function f(){const S=o.get()-e.get(),k=!c;let C=0;return k?(i=0,t.set(o),e.set(o),C=S):(t.set(e),i+=S/c,i*=d,g+=i,e.add(i),C=g-u),l=ho(C),u=g,_}function m(){const S=o.get()-n.get();return ae(S)<.001}function p(){return c}function h(){return l}function w(){return i}function b(){return N(s)}function y(){return R(a)}function N(S){return c=S,_}function R(S){return d=S,_}const _={direction:h,duration:p,velocity:w,seek:f,settled:m,useBaseFriction:y,useBaseDuration:b,useFriction:R,useDuration:N};return _}function pc(e,n,t,o,s){const a=s.measure(10),i=s.measure(50),l=at(.1,.99);let c=!1;function d(){return!(c||!e.reachedAny(t.get())||!e.reachedAny(n.get()))}function g(m){if(!d())return;const p=e.reachedMin(n.get())?"min":"max",h=ae(e[p]-n.get()),w=t.get()-n.get(),b=l.constrain(h/i);t.subtract(w*b),!m&&ae(w)<a&&(t.set(e.constrain(t.get())),o.useDuration(25).useBaseFriction())}function u(m){c=!m}return{shouldConstrain:d,constrain:g,toggleActive:u}}function hc(e,n,t,o,s){const a=at(-n+e,0),i=u(),l=g(),c=f();function d(p,h){return Rt(p,h)<=1}function g(){const p=i[0],h=$e(i),w=i.lastIndexOf(p),b=i.indexOf(h)+1;return at(w,b)}function u(){return t.map((p,h)=>{const{min:w,max:b}=a,y=a.constrain(p),N=!h,R=xo(t,h);return N?b:R||d(w,y)?w:d(b,y)?b:y}).map(p=>parseFloat(p.toFixed(3)))}function f(){if(n<=e+s)return[a.max];if(o==="keepSnaps")return i;const{min:p,max:h}=l;return i.slice(p,h)}return{snapsContained:c,scrollContainLimit:l}}function xc(e,n,t){const o=n[0],s=t?o-e:$e(n);return{limit:at(s,o)}}function vc(e,n,t,o){const a=n.min+.1,i=n.max+.1,{reachedMin:l,reachedMax:c}=at(a,i);function d(f){return f===1?c(t.get()):f===-1?l(t.get()):!1}function g(f){if(!d(f))return;const m=e*(f*-1);o.forEach(p=>p.add(m))}return{loop:g}}function bc(e){const{max:n,length:t}=e;function o(a){const i=a-n;return t?i/-t:0}return{get:o}}function wc(e,n,t,o,s){const{startEdge:a,endEdge:i}=e,{groupSlides:l}=s,c=u().map(n.measure),d=f(),g=m();function u(){return l(o).map(h=>$e(h)[i]-h[0][a]).map(ae)}function f(){return o.map(h=>t[a]-h[a]).map(h=>-ae(h))}function m(){return l(d).map(h=>h[0]).map((h,w)=>h+c[w])}return{snaps:d,snapsAligned:g}}function yc(e,n,t,o,s,a){const{groupSlides:i}=s,{min:l,max:c}=o,d=g();function g(){const f=i(a),m=!e||n==="keepSnaps";return t.length===1?[a]:m?f:f.slice(l,c).map((p,h,w)=>{const b=!h,y=xo(w,h);if(b){const N=$e(w[0])+1;return Vo(N)}if(y){const N=Et(a)-$e(w)[0]+1;return Vo(N,$e(w)[0])}return p})}return{slideRegistry:d}}function Nc(e,n,t,o,s){const{reachedAny:a,removeOffset:i,constrain:l}=o;function c(p){return p.concat().sort((h,w)=>ae(h)-ae(w))[0]}function d(p){const h=e?i(p):l(p),w=n.map((y,N)=>({diff:g(y-h,0),index:N})).sort((y,N)=>ae(y.diff)-ae(N.diff)),{index:b}=w[0];return{index:b,distance:h}}function g(p,h){const w=[p,p+t,p-t];if(!e)return p;if(!h)return c(w);const b=w.filter(y=>ho(y)===h);return b.length?c(b):$e(w)-t}function u(p,h){const w=n[p]-s.get(),b=g(w,h);return{index:p,distance:b}}function f(p,h){const w=s.get()+p,{index:b,distance:y}=d(w),N=!e&&a(w);if(!h||N)return{index:b,distance:p};const R=n[b]-y,_=p+g(R,0);return{index:b,distance:_}}return{byDistance:f,byIndex:u,shortcut:g}}function Cc(e,n,t,o,s,a,i){function l(u){const f=u.distance,m=u.index!==n.get();a.add(f),f&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),m&&(t.set(n.get()),n.set(u.index),i.emit("select"))}function c(u,f){const m=s.byDistance(u,f);l(m)}function d(u,f){const m=n.clone().set(u),p=s.byIndex(m.get(),f);l(p)}return{distance:c,index:d}}function jc(e,n,t,o,s,a,i,l){const c={passive:!0,capture:!0};let d=0;function g(m){if(!l)return;function p(h){if(new Date().getTime()-d>10)return;i.emit("slideFocusStart"),e.scrollLeft=0;const y=t.findIndex(N=>N.includes(h));po(y)&&(s.useDuration(0),o.index(y,0),i.emit("slideFocus"))}a.add(document,"keydown",u,!1),n.forEach((h,w)=>{a.add(h,"focus",b=>{(cn(l)||l(m,b))&&p(w)},c)})}function u(m){m.code==="Tab"&&(d=new Date().getTime())}return{init:g}}function jt(e){let n=e;function t(){return n}function o(c){n=i(c)}function s(c){n+=i(c)}function a(c){n-=i(c)}function i(c){return po(c)?c:c.get()}return{get:t,set:o,add:s,subtract:a}}function fa(e,n){const t=e.scroll==="x"?i:l,o=n.style;let s=null,a=!1;function i(f){return`translate3d(${f}px,0px,0px)`}function l(f){return`translate3d(0px,${f}px,0px)`}function c(f){if(a)return;const m=sc(e.direction(f));m!==s&&(o.transform=t(m),s=m)}function d(f){a=!f}function g(){a||(o.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:g,to:c,toggleActive:d}}function Sc(e,n,t,o,s,a,i,l,c){const g=Tt(s),u=Tt(s).reverse(),f=b().concat(y());function m(k,C){return k.reduce((D,G)=>D-s[G],C)}function p(k,C){return k.reduce((D,G)=>m(D,C)>0?D.concat([G]):D,[])}function h(k){return a.map((C,D)=>({start:C-o[D]+.5+k,end:C+n-.5+k}))}function w(k,C,D){const G=h(C);return k.map(E=>{const J=D?0:-t,Q=D?t:0,M=D?"end":"start",X=G[E][M];return{index:E,loopPoint:X,slideLocation:jt(-1),translate:fa(e,c[E]),target:()=>l.get()>X?J:Q}})}function b(){const k=i[0],C=p(u,k);return w(C,t,!1)}function y(){const k=n-i[0]-1,C=p(g,k);return w(C,-t,!0)}function N(){return f.every(({index:k})=>{const C=g.filter(D=>D!==k);return m(C,n)<=.1})}function R(){f.forEach(k=>{const{target:C,translate:D,slideLocation:G}=k,E=C();E!==G.get()&&(D.to(E),G.set(E))})}function _(){f.forEach(k=>k.translate.clear())}return{canLoop:N,clear:_,loop:R,loopPoints:f}}function kc(e,n,t){let o,s=!1;function a(c){if(!t)return;function d(g){for(const u of g)if(u.type==="childList"){c.reInit(),n.emit("slidesChanged");break}}o=new MutationObserver(g=>{s||(cn(t)||t(c,g))&&d(g)}),o.observe(e,{childList:!0})}function i(){o&&o.disconnect(),s=!0}return{init:a,destroy:i}}function Rc(e,n,t,o){const s={};let a=null,i=null,l,c=!1;function d(){l=new IntersectionObserver(p=>{c||(p.forEach(h=>{const w=n.indexOf(h.target);s[w]=h}),a=null,i=null,t.emit("slidesInView"))},{root:e.parentElement,threshold:o}),n.forEach(p=>l.observe(p))}function g(){l&&l.disconnect(),c=!0}function u(p){return Lt(s).reduce((h,w)=>{const b=parseInt(w),{isIntersecting:y}=s[b];return(p&&y||!p&&!y)&&h.push(b),h},[])}function f(p=!0){if(p&&a)return a;if(!p&&i)return i;const h=u(p);return p&&(a=h),p||(i=h),h}return{init:d,destroy:g,get:f}}function _c(e,n,t,o,s,a){const{measureSize:i,startEdge:l,endEdge:c}=e,d=t[0]&&s,g=p(),u=h(),f=t.map(i),m=w();function p(){if(!d)return 0;const y=t[0];return ae(n[l]-y[l])}function h(){if(!d)return 0;const y=a.getComputedStyle($e(o));return parseFloat(y.getPropertyValue(`margin-${c}`))}function w(){return t.map((y,N,R)=>{const _=!N,S=xo(R,N);return _?f[N]+g:S?f[N]+u:R[N+1][l]-y[l]}).map(ae)}return{slideSizes:f,slideSizesWithGaps:m,startGap:g,endGap:u}}function Mc(e,n,t,o,s,a,i,l,c){const{startEdge:d,endEdge:g,direction:u}=e,f=po(t);function m(b,y){return Tt(b).filter(N=>N%y===0).map(N=>b.slice(N,N+y))}function p(b){return b.length?Tt(b).reduce((y,N,R)=>{const _=$e(y)||0,S=_===0,k=N===Et(b),C=s[d]-a[_][d],D=s[d]-a[N][g],G=!o&&S?u(i):0,E=!o&&k?u(l):0,J=ae(D-E-(C+G));return R&&J>n+c&&y.push(N),k&&y.push(b.length),y},[]).map((y,N,R)=>{const _=Math.max(R[N-1]||0);return b.slice(_,y)}):[]}function h(b){return f?m(b,t):p(b)}return{groupSlides:h}}function Pc(e,n,t,o,s,a,i){const{align:l,axis:c,direction:d,startIndex:g,loop:u,duration:f,dragFree:m,dragThreshold:p,inViewThreshold:h,slidesToScroll:w,skipSnaps:b,containScroll:y,watchResize:N,watchSlides:R,watchDrag:_,watchFocus:S}=a,k=2,C=uc(),D=C.measure(n),G=t.map(C.measure),E=lc(c,d),J=E.measureSize(D),Q=mc(J),M=ac(l,J),X=!u&&!!y,V=u||!!y,{slideSizes:U,slideSizesWithGaps:P,startGap:fe,endGap:ge}=_c(E,D,G,t,V,s),de=Mc(E,J,w,u,D,G,fe,ge,k),{snaps:je,snapsAligned:F}=wc(E,M,D,G,de),B=-$e(je)+$e(P),{snapsContained:Y,scrollContainLimit:ce}=hc(J,B,F,y,k),q=X?Y:F,{limit:O}=xc(B,q,u),ue=ma(Et(q),g,u),ie=ue.clone(),K=Tt(t),I=({dragHandler:Te,scrollBody:ct,scrollBounds:Ge,options:{loop:ut}})=>{ut||Ge.constrain(Te.pointerDown()),ct.seek()},ee=({scrollBody:Te,translate:ct,location:Ge,offsetLocation:ut,previousLocation:fn,scrollLooper:Ot,slideLooper:Ht,dragHandler:gn,animation:vt,eventHandler:Ae,scrollBounds:pn,options:{loop:Gt}},bt)=>{const wt=Te.settled(),H=!pn.shouldConstrain(),me=Gt?wt:wt&&H,he=me&&!gn.pointerDown();he&&vt.stop();const ke=Ge.get()*bt+fn.get()*(1-bt);ut.set(ke),Gt&&(Ot.loop(Te.direction()),Ht.loop()),ct.to(ut.get()),he&&Ae.emit("settle"),me||Ae.emit("scroll")},se=ic(o,s,()=>I(et),Te=>ee(et,Te)),we=.68,Ie=q[ue.get()],Se=jt(Ie),Oe=jt(Ie),ve=jt(Ie),We=jt(Ie),Qe=gc(Se,ve,Oe,We,f,we),ye=Nc(u,q,B,O,We),He=Cc(se,ue,ie,Qe,ye,We,i),Vt=bc(O),$t=Dt(),dt=Rc(n,t,i,h),{slideRegistry:zt}=yc(X,y,q,ce,de,K),Bt=jc(e,t,zt,He,Qe,$t,i,S),et={ownerDocument:o,ownerWindow:s,eventHandler:i,containerRect:D,slideRects:G,animation:se,axis:E,dragHandler:dc(E,e,o,s,We,cc(E,s),Se,se,He,Qe,ye,ue,i,Q,m,p,b,we,_),eventStore:$t,percentOfView:Q,index:ue,indexPrevious:ie,limit:O,location:Se,offsetLocation:ve,previousLocation:Oe,options:a,resizeHandler:fc(n,i,s,t,E,N,C),scrollBody:Qe,scrollBounds:pc(O,ve,We,Qe,Q),scrollLooper:vc(B,O,ve,[Se,ve,Oe,We]),scrollProgress:Vt,scrollSnapList:q.map(Vt.get),scrollSnaps:q,scrollTarget:ye,scrollTo:He,slideLooper:Sc(E,J,B,U,P,je,q,ve,t),slideFocus:Bt,slidesHandler:kc(n,i,R),slidesInView:dt,slideIndexes:K,slideRegistry:zt,slidesToScroll:de,target:We,translate:fa(E,n)};return et}function Ic(){let e={},n;function t(d){n=d}function o(d){return e[d]||[]}function s(d){return o(d).forEach(g=>g(n,d)),c}function a(d,g){return e[d]=o(d).concat([g]),c}function i(d,g){return e[d]=o(d).filter(u=>u!==g),c}function l(){e={}}const c={init:t,emit:s,off:i,on:a,clear:l};return c}const Tc={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function Lc(e){function n(a,i){return ua(a,i||{})}function t(a){const i=a.breakpoints||{},l=Lt(i).filter(c=>e.matchMedia(c).matches).map(c=>i[c]).reduce((c,d)=>n(c,d),{});return n(a,l)}function o(a){return a.map(i=>Lt(i.breakpoints||{})).reduce((i,l)=>i.concat(l),[]).map(e.matchMedia)}return{mergeOptions:n,optionsAtMedia:t,optionsMediaQueries:o}}function Dc(e){let n=[];function t(a,i){return n=i.filter(({options:l})=>e.optionsAtMedia(l).active!==!1),n.forEach(l=>l.init(a,e)),i.reduce((l,c)=>Object.assign(l,{[c.name]:c}),{})}function o(){n=n.filter(a=>a.destroy())}return{init:t,destroy:o}}function on(e,n,t){const o=e.ownerDocument,s=o.defaultView,a=Lc(s),i=Dc(a),l=Dt(),c=Ic(),{mergeOptions:d,optionsAtMedia:g,optionsMediaQueries:u}=a,{on:f,off:m,emit:p}=c,h=E;let w=!1,b,y=d(Tc,on.globalOptions),N=d(y),R=[],_,S,k;function C(){const{container:K,slides:I}=N;S=(In(K)?e.querySelector(K):K)||e.children[0];const se=In(I)?S.querySelectorAll(I):I;k=[].slice.call(se||S.children)}function D(K){const I=Pc(e,S,k,o,s,K,c);if(K.loop&&!I.slideLooper.canLoop()){const ee=Object.assign({},K,{loop:!1});return D(ee)}return I}function G(K,I){w||(y=d(y,K),N=g(y),R=I||R,C(),b=D(N),u([y,...R.map(({options:ee})=>ee)]).forEach(ee=>l.add(ee,"change",E)),N.active&&(b.translate.to(b.location.get()),b.animation.init(),b.slidesInView.init(),b.slideFocus.init(ie),b.eventHandler.init(ie),b.resizeHandler.init(ie),b.slidesHandler.init(ie),b.options.loop&&b.slideLooper.loop(),S.offsetParent&&k.length&&b.dragHandler.init(ie),_=i.init(ie,R)))}function E(K,I){const ee=de();J(),G(d({startIndex:ee},K),I),c.emit("reInit")}function J(){b.dragHandler.destroy(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),b.slidesInView.destroy(),b.animation.destroy(),i.destroy(),l.clear()}function Q(){w||(w=!0,l.clear(),J(),c.emit("destroy"),c.clear())}function M(K,I,ee){!N.active||w||(b.scrollBody.useBaseFriction().useDuration(I===!0?0:N.duration),b.scrollTo.index(K,ee||0))}function X(K){const I=b.index.add(1).get();M(I,K,-1)}function V(K){const I=b.index.add(-1).get();M(I,K,1)}function U(){return b.index.add(1).get()!==de()}function P(){return b.index.add(-1).get()!==de()}function fe(){return b.scrollSnapList}function ge(){return b.scrollProgress.get(b.offsetLocation.get())}function de(){return b.index.get()}function je(){return b.indexPrevious.get()}function F(){return b.slidesInView.get()}function B(){return b.slidesInView.get(!1)}function Y(){return _}function ce(){return b}function q(){return e}function O(){return S}function ue(){return k}const ie={canScrollNext:U,canScrollPrev:P,containerNode:O,internalEngine:ce,destroy:Q,off:m,on:f,emit:p,plugins:Y,previousScrollSnap:je,reInit:h,rootNode:q,scrollNext:X,scrollPrev:V,scrollProgress:ge,scrollSnapList:fe,scrollTo:M,selectedScrollSnap:de,slideNodes:ue,slidesInView:F,slidesNotInView:B};return G(n,t),setTimeout(()=>c.emit("init"),0),ie}on.globalOptions=void 0;function vo(e={},n=[]){const t=j.useRef(e),o=j.useRef(n),[s,a]=j.useState(),[i,l]=j.useState(),c=j.useCallback(()=>{s&&s.reInit(t.current,o.current)},[s]);return j.useEffect(()=>{go(t.current,e)||(t.current=e,c())},[e,c]),j.useEffect(()=>{oc(o.current,n)||(o.current=n,c())},[n,c]),j.useEffect(()=>{if(nc()&&i){on.globalOptions=vo.globalOptions;const d=on(i,t.current,o.current);return a(d),()=>d.destroy()}else a(void 0)},[i,a]),[l,s]}vo.globalOptions=void 0;const ga=v.createContext(null);function un(){const e=v.useContext(ga);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}const pa=v.forwardRef(({orientation:e="horizontal",opts:n,setApi:t,plugins:o,className:s,children:a,...i},l)=>{const[c,d]=vo({...n,axis:e==="horizontal"?"x":"y"},o),[g,u]=v.useState(!1),[f,m]=v.useState(!1),p=v.useCallback(y=>{y&&(u(y.canScrollPrev()),m(y.canScrollNext()))},[]),h=v.useCallback(()=>{d==null||d.scrollPrev()},[d]),w=v.useCallback(()=>{d==null||d.scrollNext()},[d]),b=v.useCallback(y=>{y.key==="ArrowLeft"?(y.preventDefault(),h()):y.key==="ArrowRight"&&(y.preventDefault(),w())},[h,w]);return v.useEffect(()=>{!d||!t||t(d)},[d,t]),v.useEffect(()=>{if(d)return p(d),d.on("reInit",p),d.on("select",p),()=>{d==null||d.off("select",p)}},[d,p]),r.jsx(ga.Provider,{value:{carouselRef:c,api:d,opts:n,orientation:e,scrollPrev:h,scrollNext:w,canScrollPrev:g,canScrollNext:f},children:r.jsx("div",{ref:l,onKeyDownCapture:b,className:x("relative",s),role:"region","aria-roledescription":"carousel",...i,children:a})})});pa.displayName="Carousel";const ha=v.forwardRef(({className:e,...n},t)=>{const{carouselRef:o,orientation:s}=un();return r.jsx("div",{ref:o,className:"overflow-hidden",children:r.jsx("div",{ref:t,className:x("flex",s==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...n})})});ha.displayName="CarouselContent";const xa=v.forwardRef(({className:e,...n},t)=>{const{orientation:o}=un();return r.jsx("div",{ref:t,role:"group","aria-roledescription":"slide",className:x("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",e),...n})});xa.displayName="CarouselItem";const va=v.forwardRef(({className:e,variant:n="outline",size:t="icon",...o},s)=>{const{orientation:a,scrollPrev:i,canScrollPrev:l}=un(),c=Z();return r.jsxs(pe,{ref:s,variant:n,size:t,className:x("absolute h-8 w-8 rounded-full",a==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:i,...o,children:[r.jsx(A.ChevronLeft,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:c.carousel_previousSlide})]})});va.displayName="CarouselPrevious";const ba=v.forwardRef(({className:e,variant:n="outline",size:t="icon",...o},s)=>{const{orientation:a,scrollNext:i,canScrollNext:l}=un(),c=Z();return r.jsxs(pe,{ref:s,variant:n,size:t,className:x("absolute h-8 w-8 rounded-full",a==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:i,...o,children:[r.jsx(A.ChevronRight,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:c.carousel_nextSlide})]})});ba.displayName="CarouselNext";/**
|
|
13
13
|
* table-core
|
|
14
14
|
*
|
|
15
15
|
* Copyright (c) TanStack
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
* LICENSE.md file in the root directory of this source tree.
|
|
19
19
|
*
|
|
20
20
|
* @license MIT
|
|
21
|
-
*/function
|
|
21
|
+
*/function Ke(e,n){return typeof e=="function"?e(n):e}function Le(e,n){return t=>{n.setState(o=>({...o,[e]:Ke(t,o[e])}))}}function mn(e){return e instanceof Function}function Fc(e){return Array.isArray(e)&&e.every(n=>typeof n=="number")}function Ac(e,n){const t=[],o=s=>{s.forEach(a=>{t.push(a);const i=n(a);i!=null&&i.length&&o(i)})};return o(e),t}function $(e,n,t){let o=[],s;return a=>{let i;t.key&&t.debug&&(i=Date.now());const l=e(a);if(!(l.length!==o.length||l.some((g,u)=>o[u]!==g)))return s;o=l;let d;if(t.key&&t.debug&&(d=Date.now()),s=n(...l),t==null||t.onChange==null||t.onChange(s),t.key&&t.debug&&t!=null&&t.debug()){const g=Math.round((Date.now()-i)*100)/100,u=Math.round((Date.now()-d)*100)/100,f=u/16,m=(p,h)=>{for(p=String(p);p.length<h;)p=" "+p;return p};console.info(`%c⏱ ${m(u,5)} /${m(g,5)} ms`,`
|
|
22
22
|
font-size: .6rem;
|
|
23
23
|
font-weight: bold;
|
|
24
|
-
color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,n==null?void 0:n.key)}return s}}function z(e,t,n,r){return{debug:()=>{var s;return(s=e==null?void 0:e.debugAll)!=null?s:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:r}}function Fc(e,t,n,r){const s=()=>{var i;return(i=a.getValue())!=null?i:e.options.renderFallbackValue},a={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:s,getContext:$(()=>[e,n,t,a],(i,l,c,d)=>({table:i,column:l,row:c,cell:d,getValue:d.getValue,renderValue:d.renderValue}),z(e.options,"debugCells","cell.getContext"))};return e._features.forEach(i=>{i.createCell==null||i.createCell(a,n,t,e)},{}),a}function Ac(e,t,n,r){var s,a;const l={...e._getDefaultColumnDef(),...t},c=l.accessorKey;let d=(s=(a=l.id)!=null?a:c?typeof String.prototype.replaceAll=="function"?c.replaceAll(".","_"):c.replace(/\./g,"_"):void 0)!=null?s:typeof l.header=="string"?l.header:void 0,g;if(l.accessorFn?g=l.accessorFn:c&&(c.includes(".")?g=f=>{let m=f;for(const v of c.split(".")){var p;m=(p=m)==null?void 0:p[v],process.env.NODE_ENV!=="production"&&m===void 0&&console.warn(`"${v}" in deeply nested key "${c}" returned undefined.`)}return m}:g=f=>f[l.accessorKey]),!d)throw process.env.NODE_ENV!=="production"?new Error(l.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let u={id:`${String(d)}`,accessorFn:g,parent:r,depth:n,columnDef:l,columns:[],getFlatColumns:$(()=>[!0],()=>{var f;return[u,...(f=u.columns)==null?void 0:f.flatMap(m=>m.getFlatColumns())]},z(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:$(()=>[e._getOrderColumnsFn()],f=>{var m;if((m=u.columns)!=null&&m.length){let p=u.columns.flatMap(v=>v.getLeafColumns());return f(p)}return[u]},z(e.options,"debugColumns","column.getLeafColumns"))};for(const f of e._features)f.createColumn==null||f.createColumn(u,e);return u}const Ce="debugHeaders";function Vr(e,t,n){var r;let a={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const i=[],l=c=>{c.subHeaders&&c.subHeaders.length&&c.subHeaders.map(l),i.push(c)};return l(a),i},getContext:()=>({table:e,header:a,column:t})};return e._features.forEach(i=>{i.createHeader==null||i.createHeader(a,e)}),a}const Ec={createTable:e=>{e.getHeaderGroups=$(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,s)=>{var a,i;const l=(a=r==null?void 0:r.map(u=>n.find(f=>f.id===u)).filter(Boolean))!=null?a:[],c=(i=s==null?void 0:s.map(u=>n.find(f=>f.id===u)).filter(Boolean))!=null?i:[],d=n.filter(u=>!(r!=null&&r.includes(u.id))&&!(s!=null&&s.includes(u.id)));return Zt(t,[...l,...d,...c],e)},z(e.options,Ce,"getHeaderGroups")),e.getCenterHeaderGroups=$(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,s)=>(n=n.filter(a=>!(r!=null&&r.includes(a.id))&&!(s!=null&&s.includes(a.id))),Zt(t,n,e,"center")),z(e.options,Ce,"getCenterHeaderGroups")),e.getLeftHeaderGroups=$(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var s;const a=(s=r==null?void 0:r.map(i=>n.find(l=>l.id===i)).filter(Boolean))!=null?s:[];return Zt(t,a,e,"left")},z(e.options,Ce,"getLeftHeaderGroups")),e.getRightHeaderGroups=$(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var s;const a=(s=r==null?void 0:r.map(i=>n.find(l=>l.id===i)).filter(Boolean))!=null?s:[];return Zt(t,a,e,"right")},z(e.options,Ce,"getRightHeaderGroups")),e.getFooterGroups=$(()=>[e.getHeaderGroups()],t=>[...t].reverse(),z(e.options,Ce,"getFooterGroups")),e.getLeftFooterGroups=$(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),z(e.options,Ce,"getLeftFooterGroups")),e.getCenterFooterGroups=$(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),z(e.options,Ce,"getCenterFooterGroups")),e.getRightFooterGroups=$(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),z(e.options,Ce,"getRightFooterGroups")),e.getFlatHeaders=$(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),z(e.options,Ce,"getFlatHeaders")),e.getLeftFlatHeaders=$(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),z(e.options,Ce,"getLeftFlatHeaders")),e.getCenterFlatHeaders=$(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),z(e.options,Ce,"getCenterFlatHeaders")),e.getRightFlatHeaders=$(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),z(e.options,Ce,"getRightFlatHeaders")),e.getCenterLeafHeaders=$(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),z(e.options,Ce,"getCenterLeafHeaders")),e.getLeftLeafHeaders=$(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),z(e.options,Ce,"getLeftLeafHeaders")),e.getRightLeafHeaders=$(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),z(e.options,Ce,"getRightLeafHeaders")),e.getLeafHeaders=$(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var s,a,i,l,c,d;return[...(s=(a=t[0])==null?void 0:a.headers)!=null?s:[],...(i=(l=n[0])==null?void 0:l.headers)!=null?i:[],...(c=(d=r[0])==null?void 0:d.headers)!=null?c:[]].map(g=>g.getLeafHeaders()).flat()},z(e.options,Ce,"getLeafHeaders"))}};function Zt(e,t,n,r){var s,a;let i=0;const l=function(f,m){m===void 0&&(m=1),i=Math.max(i,m),f.filter(p=>p.getIsVisible()).forEach(p=>{var v;(v=p.columns)!=null&&v.length&&l(p.columns,m+1)},0)};l(e);let c=[];const d=(f,m)=>{const p={depth:m,id:[r,`${m}`].filter(Boolean).join("_"),headers:[]},v=[];f.forEach(b=>{const h=[...v].reverse()[0],y=b.column.depth===p.depth;let C,S=!1;if(y&&b.column.parent?C=b.column.parent:(C=b.column,S=!0),h&&(h==null?void 0:h.column)===C)h.subHeaders.push(b);else{const L=Vr(n,C,{id:[r,m,C.id,b==null?void 0:b.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${v.filter(D=>D.column===C).length}`:void 0,depth:m,index:v.length});L.subHeaders.push(b),v.push(L)}p.headers.push(b),b.headerGroup=p}),c.push(p),m>0&&d(v,m-1)},g=t.map((f,m)=>Vr(n,f,{depth:i,index:m}));d(g,i-1),c.reverse();const u=f=>f.filter(p=>p.column.getIsVisible()).map(p=>{let v=0,b=0,h=[0];p.subHeaders&&p.subHeaders.length?(h=[],u(p.subHeaders).forEach(C=>{let{colSpan:S,rowSpan:L}=C;v+=S,h.push(L)})):v=1;const y=Math.min(...h);return b=b+y,p.colSpan=v,p.rowSpan=b,{colSpan:v,rowSpan:b}});return u((s=(a=c[0])==null?void 0:a.headers)!=null?s:[]),c}const vr=(e,t,n,r,s,a,i)=>{let l={id:t,index:r,original:n,depth:s,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:c=>{if(l._valuesCache.hasOwnProperty(c))return l._valuesCache[c];const d=e.getColumn(c);if(d!=null&&d.accessorFn)return l._valuesCache[c]=d.accessorFn(l.original,r),l._valuesCache[c]},getUniqueValues:c=>{if(l._uniqueValuesCache.hasOwnProperty(c))return l._uniqueValuesCache[c];const d=e.getColumn(c);if(d!=null&&d.accessorFn)return d.columnDef.getUniqueValues?(l._uniqueValuesCache[c]=d.columnDef.getUniqueValues(l.original,r),l._uniqueValuesCache[c]):(l._uniqueValuesCache[c]=[l.getValue(c)],l._uniqueValuesCache[c])},renderValue:c=>{var d;return(d=l.getValue(c))!=null?d:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>Tc(l.subRows,c=>c.subRows),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let c=[],d=l;for(;;){const g=d.getParentRow();if(!g)break;c.push(g),d=g}return c.reverse()},getAllCells:$(()=>[e.getAllLeafColumns()],c=>c.map(d=>Fc(e,l,d,d.id)),z(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:$(()=>[l.getAllCells()],c=>c.reduce((d,g)=>(d[g.column.id]=g,d),{}),z(e.options,"debugRows","getAllCellsByColumnId"))};for(let c=0;c<e._features.length;c++){const d=e._features[c];d==null||d.createRow==null||d.createRow(l,e)}return l},Vc={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},va=(e,t,n)=>{var r,s;const a=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((s=e.getValue(t))==null||(s=s.toString())==null||(s=s.toLowerCase())==null)&&s.includes(a))};va.autoRemove=e=>ze(e);const wa=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};wa.autoRemove=e=>ze(e);const ba=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};ba.autoRemove=e=>ze(e);const ya=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};ya.autoRemove=e=>ze(e);const Ca=(e,t,n)=>!n.some(r=>{var s;return!((s=e.getValue(t))!=null&&s.includes(r))});Ca.autoRemove=e=>ze(e)||!(e!=null&&e.length);const Na=(e,t,n)=>n.some(r=>{var s;return(s=e.getValue(t))==null?void 0:s.includes(r)});Na.autoRemove=e=>ze(e)||!(e!=null&&e.length);const ja=(e,t,n)=>e.getValue(t)===n;ja.autoRemove=e=>ze(e);const Sa=(e,t,n)=>e.getValue(t)==n;Sa.autoRemove=e=>ze(e);const wr=(e,t,n)=>{let[r,s]=n;const a=e.getValue(t);return a>=r&&a<=s};wr.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,s=typeof n!="number"?parseFloat(n):n,a=t===null||Number.isNaN(r)?-1/0:r,i=n===null||Number.isNaN(s)?1/0:s;if(a>i){const l=a;a=i,i=l}return[a,i]};wr.autoRemove=e=>ze(e)||ze(e[0])&&ze(e[1]);const Ue={includesString:va,includesStringSensitive:wa,equalsString:ba,arrIncludes:ya,arrIncludesAll:Ca,arrIncludesSome:Na,equals:ja,weakEquals:Sa,inNumberRange:wr};function ze(e){return e==null||e===""}const $c={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:De("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?Ue.includesString:typeof r=="number"?Ue.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Ue.equals:Array.isArray(r)?Ue.arrIncludes:Ue.weakEquals},e.getFilterFn=()=>{var n,r;return fn(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Ue[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,s;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(s=>s.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const s=e.getFilterFn(),a=r==null?void 0:r.find(g=>g.id===e.id),i=Xe(n,a?a.value:void 0);if($r(s,i,e)){var l;return(l=r==null?void 0:r.filter(g=>g.id!==e.id))!=null?l:[]}const c={id:e.id,value:i};if(a){var d;return(d=r==null?void 0:r.map(g=>g.id===e.id?c:g))!=null?d:[]}return r!=null&&r.length?[...r,c]:[c]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=s=>{var a;return(a=Xe(t,s))==null?void 0:a.filter(i=>{const l=n.find(c=>c.id===i.id);if(l){const c=l.getFilterFn();if($r(c,i.value,l))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function $r(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const zc=(e,t,n)=>n.reduce((r,s)=>{const a=s.getValue(e);return r+(typeof a=="number"?a:0)},0),Bc=(e,t,n)=>{let r;return n.forEach(s=>{const a=s.getValue(e);a!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}),r},Oc=(e,t,n)=>{let r;return n.forEach(s=>{const a=s.getValue(e);a!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}),r},Hc=(e,t,n)=>{let r,s;return n.forEach(a=>{const i=a.getValue(e);i!=null&&(r===void 0?i>=i&&(r=s=i):(r>i&&(r=i),s<i&&(s=i)))}),[r,s]},Gc=(e,t)=>{let n=0,r=0;if(t.forEach(s=>{let a=s.getValue(e);a!=null&&(a=+a)>=a&&(++n,r+=a)}),n)return r/n},qc=(e,t)=>{if(!t.length)return;const n=t.map(a=>a.getValue(e));if(!Dc(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),s=n.sort((a,i)=>a-i);return n.length%2!==0?s[r]:(s[r-1]+s[r])/2},Wc=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),Uc=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,Yc=(e,t)=>t.length,wn={sum:zc,min:Bc,max:Oc,extent:Hc,mean:Gc,median:qc,unique:Wc,uniqueCount:Uc,count:Yc},Xc={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:De("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return wn.sum;if(Object.prototype.toString.call(r)==="[object Date]")return wn.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return fn(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:wn[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var s;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((s=n.subRows)!=null&&s.length)}}};function Kc(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(a=>!t.includes(a.id));return n==="remove"?r:[...t.map(a=>e.find(i=>i.id===a)).filter(Boolean),...r]}const Zc={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:De("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=$(n=>[_t(t,n)],n=>n.findIndex(r=>r.id===e.id),z(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return((r=_t(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const s=_t(t,n);return((r=s[s.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=$(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>s=>{let a=[];if(!(t!=null&&t.length))a=s;else{const i=[...t],l=[...s];for(;l.length&&i.length;){const c=i.shift(),d=l.findIndex(g=>g.id===c);d>-1&&a.push(l.splice(d,1)[0])}a=[...a,...l]}return Kc(a,n,r)},z(e.options,"debugTable","_getOrderColumnsFn"))}},bn=()=>({left:[],right:[]}),Jc={getInitialState:e=>({columnPinning:bn(),...e}),getDefaultOptions:e=>({onColumnPinningChange:De("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(s=>s.id).filter(Boolean);t.setColumnPinning(s=>{var a,i;if(n==="right"){var l,c;return{left:((l=s==null?void 0:s.left)!=null?l:[]).filter(u=>!(r!=null&&r.includes(u))),right:[...((c=s==null?void 0:s.right)!=null?c:[]).filter(u=>!(r!=null&&r.includes(u))),...r]}}if(n==="left"){var d,g;return{left:[...((d=s==null?void 0:s.left)!=null?d:[]).filter(u=>!(r!=null&&r.includes(u))),...r],right:((g=s==null?void 0:s.right)!=null?g:[]).filter(u=>!(r!=null&&r.includes(u)))}}return{left:((a=s==null?void 0:s.left)!=null?a:[]).filter(u=>!(r!=null&&r.includes(u))),right:((i=s==null?void 0:s.right)!=null?i:[]).filter(u=>!(r!=null&&r.includes(u)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var s,a,i;return((s=r.columnDef.enablePinning)!=null?s:!0)&&((a=(i=t.options.enableColumnPinning)!=null?i:t.options.enablePinning)!=null?a:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(l=>l.id),{left:r,right:s}=t.getState().columnPinning,a=n.some(l=>r==null?void 0:r.includes(l)),i=n.some(l=>s==null?void 0:s.includes(l));return a?"left":i?"right":!1},e.getPinnedIndex=()=>{var n,r;const s=e.getIsPinned();return s?(n=(r=t.getState().columnPinning)==null||(r=r[s])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=$(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,s)=>{const a=[...r??[],...s??[]];return n.filter(i=>!a.includes(i.column.id))},z(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=$(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(a=>n.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"left"})),z(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=$(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(a=>n.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"right"})),z(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?bn():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:bn())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var s,a;return!!((s=r.left)!=null&&s.length||(a=r.right)!=null&&a.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=$(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(s=>s.id===r)).filter(Boolean),z(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=$(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(s=>s.id===r)).filter(Boolean),z(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=$(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const s=[...n??[],...r??[]];return t.filter(a=>!s.includes(a.id))},z(e.options,"debugColumns","getCenterLeafColumns"))}};function Qc(e){return e||(typeof document<"u"?document:null)}const Jt={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},yn=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),eu={getDefaultColumnDef:()=>Jt,getInitialState:e=>({columnSizing:{},columnSizingInfo:yn(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:De("columnSizing",e),onColumnSizingInfoChange:De("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,s;const a=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Jt.minSize,(r=a??e.columnDef.size)!=null?r:Jt.size),(s=e.columnDef.maxSize)!=null?s:Jt.maxSize)},e.getStart=$(n=>[n,_t(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((s,a)=>s+a.getSize(),0),z(t.options,"debugColumns","getStart")),e.getAfter=$(n=>[n,_t(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((s,a)=>s+a.getSize(),0),z(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...s}=n;return s})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=s=>{if(s.subHeaders.length)s.subHeaders.forEach(r);else{var a;n+=(a=s.column.getSize())!=null?a:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),s=r==null?void 0:r.getCanResize();return a=>{if(!r||!s||(a.persist==null||a.persist(),Cn(a)&&a.touches&&a.touches.length>1))return;const i=e.getSize(),l=e?e.getLeafHeaders().map(h=>[h.column.id,h.column.getSize()]):[[r.id,r.getSize()]],c=Cn(a)?Math.round(a.touches[0].clientX):a.clientX,d={},g=(h,y)=>{typeof y=="number"&&(t.setColumnSizingInfo(C=>{var S,L;const D=t.options.columnResizeDirection==="rtl"?-1:1,k=(y-((S=C==null?void 0:C.startOffset)!=null?S:0))*D,N=Math.max(k/((L=C==null?void 0:C.startSize)!=null?L:0),-.999999);return C.columnSizingStart.forEach(T=>{let[G,E]=T;d[G]=Math.round(Math.max(E+E*N,0)*100)/100}),{...C,deltaOffset:k,deltaPercentage:N}}),(t.options.columnResizeMode==="onChange"||h==="end")&&t.setColumnSizing(C=>({...C,...d})))},u=h=>g("move",h),f=h=>{g("end",h),t.setColumnSizingInfo(y=>({...y,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},m=Qc(n),p={moveHandler:h=>u(h.clientX),upHandler:h=>{m==null||m.removeEventListener("mousemove",p.moveHandler),m==null||m.removeEventListener("mouseup",p.upHandler),f(h.clientX)}},v={moveHandler:h=>(h.cancelable&&(h.preventDefault(),h.stopPropagation()),u(h.touches[0].clientX),!1),upHandler:h=>{var y;m==null||m.removeEventListener("touchmove",v.moveHandler),m==null||m.removeEventListener("touchend",v.upHandler),h.cancelable&&(h.preventDefault(),h.stopPropagation()),f((y=h.touches[0])==null?void 0:y.clientX)}},b=tu()?{passive:!1}:!1;Cn(a)?(m==null||m.addEventListener("touchmove",v.moveHandler,b),m==null||m.addEventListener("touchend",v.upHandler,b)):(m==null||m.addEventListener("mousemove",p.moveHandler,b),m==null||m.addEventListener("mouseup",p.upHandler,b)),t.setColumnSizingInfo(h=>({...h,startOffset:c,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?yn():(n=e.initialState.columnSizingInfo)!=null?n:yn())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,s)=>r+s.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,s)=>r+s.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,s)=>r+s.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,s)=>r+s.getSize(),0))!=null?t:0}}};let Qt=null;function tu(){if(typeof Qt=="boolean")return Qt;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return Qt=e,Qt}function Cn(e){return e.type==="touchstart"}const nu={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:De("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const s=e.columns;return(n=s.length?s.some(a=>a.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=$(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),z(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=$(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,s)=>[...n,...r,...s],z(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,r)=>$(()=>[r(),r().filter(s=>s.getIsVisible()).map(s=>s.id).join("_")],s=>s.filter(a=>a.getIsVisible==null?void 0:a.getIsVisible()),z(e.options,"debugColumns",n));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((s,a)=>({...s,[a.id]:n||!(a.getCanHide!=null&&a.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function _t(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const ru={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},ou={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:De("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,s,a;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&((a=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?a:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Ue.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return fn(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Ue[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},su={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:De("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,s;if(!t){e._queue(()=>{t=!0});return}if((r=(s=e.options.autoResetAll)!=null?s:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var s,a;e.setExpanded(r?{}:(s=(a=e.initialState)==null?void 0:a.expanded)!=null?s:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(s=>!s.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(a=>{const i=a.split(".");r=Math.max(r,i.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var s;const a=r===!0?!0:!!(r!=null&&r[e.id]);let i={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(l=>{i[l]=!0}):i=r,n=(s=n)!=null?s:!a,!a&&n)return{...i,[e.id]:!0};if(a&&!n){const{[e.id]:l,...c}=i;return c}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,s;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((s=e.subRows)!=null&&s.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},Dn=0,Tn=10,Nn=()=>({pageIndex:Dn,pageSize:Tn}),au={getInitialState:e=>({...e,pagination:{...Nn(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:De("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,s;if(!t){e._queue(()=>{t=!0});return}if((r=(s=e.options.autoResetAll)!=null?s:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const s=a=>Xe(r,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(s)},e.resetPagination=r=>{var s;e.setPagination(r?Nn():(s=e.initialState.pagination)!=null?s:Nn())},e.setPageIndex=r=>{e.setPagination(s=>{let a=Xe(r,s.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return a=Math.max(0,Math.min(a,i)),{...s,pageIndex:a}})},e.resetPageIndex=r=>{var s,a;e.setPageIndex(r?Dn:(s=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?s:Dn)},e.resetPageSize=r=>{var s,a;e.setPageSize(r?Tn:(s=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?s:Tn)},e.setPageSize=r=>{e.setPagination(s=>{const a=Math.max(1,Xe(r,s.pageSize)),i=s.pageSize*s.pageIndex,l=Math.floor(i/a);return{...s,pageIndex:l,pageSize:a}})},e.setPageCount=r=>e.setPagination(s=>{var a;let i=Xe(r,(a=e.options.pageCount)!=null?a:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...s,pageCount:i}}),e.getPageOptions=$(()=>[e.getPageCount()],r=>{let s=[];return r&&r>0&&(s=[...new Array(r)].fill(null).map((a,i)=>i)),s},z(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,s=e.getPageCount();return s===-1?!0:s===0?!1:r<s-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},jn=()=>({top:[],bottom:[]}),iu={getInitialState:e=>({rowPinning:jn(),...e}),getDefaultOptions:e=>({onRowPinningChange:De("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,s)=>{const a=r?e.getLeafRows().map(c=>{let{id:d}=c;return d}):[],i=s?e.getParentRows().map(c=>{let{id:d}=c;return d}):[],l=new Set([...i,e.id,...a]);t.setRowPinning(c=>{var d,g;if(n==="bottom"){var u,f;return{top:((u=c==null?void 0:c.top)!=null?u:[]).filter(v=>!(l!=null&&l.has(v))),bottom:[...((f=c==null?void 0:c.bottom)!=null?f:[]).filter(v=>!(l!=null&&l.has(v))),...Array.from(l)]}}if(n==="top"){var m,p;return{top:[...((m=c==null?void 0:c.top)!=null?m:[]).filter(v=>!(l!=null&&l.has(v))),...Array.from(l)],bottom:((p=c==null?void 0:c.bottom)!=null?p:[]).filter(v=>!(l!=null&&l.has(v)))}}return{top:((d=c==null?void 0:c.top)!=null?d:[]).filter(v=>!(l!=null&&l.has(v))),bottom:((g=c==null?void 0:c.bottom)!=null?g:[]).filter(v=>!(l!=null&&l.has(v)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:s}=t.options;return typeof r=="function"?r(e):(n=r??s)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:s}=t.getState().rowPinning,a=n.some(l=>r==null?void 0:r.includes(l)),i=n.some(l=>s==null?void 0:s.includes(l));return a?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const s=e.getIsPinned();if(!s)return-1;const a=(n=s==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(i=>{let{id:l}=i;return l});return(r=a==null?void 0:a.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?jn():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:jn())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var s,a;return!!((s=r.top)!=null&&s.length||(a=r.bottom)!=null&&a.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var s;return((s=e.options.keepPinnedRows)==null||s?(n??[]).map(i=>{const l=e.getRow(i,!0);return l.getIsAllParentsExpanded()?l:null}):(n??[]).map(i=>t.find(l=>l.id===i))).filter(Boolean).map(i=>({...i,position:r}))},e.getTopRows=$(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),z(e.options,"debugRows","getTopRows")),e.getBottomRows=$(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),z(e.options,"debugRows","getBottomRows")),e.getCenterRows=$(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const s=new Set([...n??[],...r??[]]);return t.filter(a=>!s.has(a.id))},z(e.options,"debugRows","getCenterRows"))}},lu={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:De("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},s=e.getPreGroupedRowModel().flatRows;return t?s.forEach(a=>{a.getCanSelect()&&(r[a.id]=!0)}):s.forEach(a=>{delete r[a.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),s={...n};return e.getRowModel().rows.forEach(a=>{Fn(s,a.id,r,!0,e)}),s}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=$(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Sn(e,n):{rows:[],flatRows:[],rowsById:{}},z(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=$(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Sn(e,n):{rows:[],flatRows:[],rowsById:{}},z(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=$(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Sn(e,n):{rows:[],flatRows:[],rowsById:{}},z(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(s=>s.getCanSelect()&&!n[s.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(s=>s.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(s=>!n[s.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const s=e.getIsSelected();t.setRowSelection(a=>{var i;if(n=typeof n<"u"?n:!s,e.getCanSelect()&&s===n)return a;const l={...a};return Fn(l,e.id,n,(i=r==null?void 0:r.selectChildren)!=null?i:!0,t),l})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return br(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return An(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return An(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var s;n&&e.toggleSelected((s=r.target)==null?void 0:s.checked)}}}},Fn=(e,t,n,r,s)=>{var a;const i=s.getRow(t,!0);n?(i.getCanMultiSelect()||Object.keys(e).forEach(l=>delete e[l]),i.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(a=i.subRows)!=null&&a.length&&i.getCanSelectSubRows()&&i.subRows.forEach(l=>Fn(e,l.id,n,r,s))};function Sn(e,t){const n=e.getState().rowSelection,r=[],s={},a=function(i,l){return i.map(c=>{var d;const g=br(c,n);if(g&&(r.push(c),s[c.id]=c),(d=c.subRows)!=null&&d.length&&(c={...c,subRows:a(c.subRows)}),g)return c}).filter(Boolean)};return{rows:a(t.rows),flatRows:r,rowsById:s}}function br(e,t){var n;return(n=t[e.id])!=null?n:!1}function An(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let s=!0,a=!1;return e.subRows.forEach(i=>{if(!(a&&!s)&&(i.getCanSelect()&&(br(i,t)?a=!0:s=!1),i.subRows&&i.subRows.length)){const l=An(i,t);l==="all"?a=!0:(l==="some"&&(a=!0),s=!1)}}),s?"all":a?"some":!1}const En=/([0-9]+)/gm,du=(e,t,n)=>ka(Ke(e.getValue(n)).toLowerCase(),Ke(t.getValue(n)).toLowerCase()),cu=(e,t,n)=>ka(Ke(e.getValue(n)),Ke(t.getValue(n))),uu=(e,t,n)=>yr(Ke(e.getValue(n)).toLowerCase(),Ke(t.getValue(n)).toLowerCase()),fu=(e,t,n)=>yr(Ke(e.getValue(n)),Ke(t.getValue(n))),mu=(e,t,n)=>{const r=e.getValue(n),s=t.getValue(n);return r>s?1:r<s?-1:0},gu=(e,t,n)=>yr(e.getValue(n),t.getValue(n));function yr(e,t){return e===t?0:e>t?1:-1}function Ke(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function ka(e,t){const n=e.split(En).filter(Boolean),r=t.split(En).filter(Boolean);for(;n.length&&r.length;){const s=n.shift(),a=r.shift(),i=parseInt(s,10),l=parseInt(a,10),c=[i,l].sort();if(isNaN(c[0])){if(s>a)return 1;if(a>s)return-1;continue}if(isNaN(c[1]))return isNaN(i)?-1:1;if(i>l)return 1;if(l>i)return-1}return n.length-r.length}const Ct={alphanumeric:du,alphanumericCaseSensitive:cu,text:uu,textCaseSensitive:fu,datetime:mu,basic:gu},pu={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:De("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const s of n){const a=s==null?void 0:s.getValue(e.id);if(Object.prototype.toString.call(a)==="[object Date]")return Ct.datetime;if(typeof a=="string"&&(r=!0,a.split(En).length>1))return Ct.alphanumeric}return r?Ct.text:Ct.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return fn(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:Ct[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const s=e.getNextSortingOrder(),a=typeof n<"u"&&n!==null;t.setSorting(i=>{const l=i==null?void 0:i.find(m=>m.id===e.id),c=i==null?void 0:i.findIndex(m=>m.id===e.id);let d=[],g,u=a?n:s==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&r?l?g="toggle":g="add":i!=null&&i.length&&c!==i.length-1?g="replace":l?g="toggle":g="replace",g==="toggle"&&(a||s||(g="remove")),g==="add"){var f;d=[...i,{id:e.id,desc:u}],d.splice(0,d.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else g==="toggle"?d=i.map(m=>m.id===e.id?{...m,desc:u}:m):g==="remove"?d=i.filter(m=>m.id!==e.id):d=[{id:e.id,desc:u}];return d})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,s;const a=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==a&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(s=t.options.enableMultiRemove)!=null)||s)?!1:i==="desc"?"asc":"desc":a},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(s=>s.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(s=>s.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},hu=[Ec,nu,Zc,Jc,Vc,$c,ru,ou,pu,Xc,su,au,iu,lu,eu];function xu(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...hu,...(t=e._features)!=null?t:[]];let s={_features:r};const a=s._features.reduce((f,m)=>Object.assign(f,m.getDefaultOptions==null?void 0:m.getDefaultOptions(s)),{}),i=f=>s.options.mergeOptions?s.options.mergeOptions(a,f):{...a,...f};let c={...{},...(n=e.initialState)!=null?n:{}};s._features.forEach(f=>{var m;c=(m=f.getInitialState==null?void 0:f.getInitialState(c))!=null?m:c});const d=[];let g=!1;const u={_features:r,options:{...a,...e},initialState:c,_queue:f=>{d.push(f),g||(g=!0,Promise.resolve().then(()=>{for(;d.length;)d.shift()();g=!1}).catch(m=>setTimeout(()=>{throw m})))},reset:()=>{s.setState(s.initialState)},setOptions:f=>{const m=Xe(f,s.options);s.options=i(m)},getState:()=>s.options.state,setState:f=>{s.options.onStateChange==null||s.options.onStateChange(f)},_getRowId:(f,m,p)=>{var v;return(v=s.options.getRowId==null?void 0:s.options.getRowId(f,m,p))!=null?v:`${p?[p.id,m].join("."):m}`},getCoreRowModel:()=>(s._getCoreRowModel||(s._getCoreRowModel=s.options.getCoreRowModel(s)),s._getCoreRowModel()),getRowModel:()=>s.getPaginationRowModel(),getRow:(f,m)=>{let p=(m?s.getPrePaginationRowModel():s.getRowModel()).rowsById[f];if(!p&&(p=s.getCoreRowModel().rowsById[f],!p))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${f}`):new Error;return p},_getDefaultColumnDef:$(()=>[s.options.defaultColumn],f=>{var m;return f=(m=f)!=null?m:{},{header:p=>{const v=p.header.column.columnDef;return v.accessorKey?v.accessorKey:v.accessorFn?v.id:null},cell:p=>{var v,b;return(v=(b=p.renderValue())==null||b.toString==null?void 0:b.toString())!=null?v:null},...s._features.reduce((p,v)=>Object.assign(p,v.getDefaultColumnDef==null?void 0:v.getDefaultColumnDef()),{}),...f}},z(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>s.options.columns,getAllColumns:$(()=>[s._getColumnDefs()],f=>{const m=function(p,v,b){return b===void 0&&(b=0),p.map(h=>{const y=Ac(s,h,b,v),C=h;return y.columns=C.columns?m(C.columns,y,b+1):[],y})};return m(f)},z(e,"debugColumns","getAllColumns")),getAllFlatColumns:$(()=>[s.getAllColumns()],f=>f.flatMap(m=>m.getFlatColumns()),z(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:$(()=>[s.getAllFlatColumns()],f=>f.reduce((m,p)=>(m[p.id]=p,m),{}),z(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:$(()=>[s.getAllColumns(),s._getOrderColumnsFn()],(f,m)=>{let p=f.flatMap(v=>v.getLeafColumns());return m(p)},z(e,"debugColumns","getAllLeafColumns")),getColumn:f=>{const m=s._getAllFlatColumnsById()[f];return process.env.NODE_ENV!=="production"&&!m&&console.error(`[Table] Column with id '${f}' does not exist.`),m}};Object.assign(s,u);for(let f=0;f<s._features.length;f++){const m=s._features[f];m==null||m.createTable==null||m.createTable(s)}return s}function vu(){return e=>$(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(s,a,i){a===void 0&&(a=0);const l=[];for(let d=0;d<s.length;d++){const g=vr(e,e._getRowId(s[d],d,i),s[d],d,a,void 0,i==null?void 0:i.id);if(n.flatRows.push(g),n.rowsById[g.id]=g,l.push(g),e.options.getSubRows){var c;g.originalSubRows=e.options.getSubRows(s[d],d),(c=g.originalSubRows)!=null&&c.length&&(g.subRows=r(g.originalSubRows,a+1,g))}}return l};return n.rows=r(t),n},z(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function wu(e){const t=[],n=r=>{var s;t.push(r),(s=r.subRows)!=null&&s.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function bu(e,t,n){return n.options.filterFromLeafRows?yu(e,t,n):Cu(e,t,n)}function yu(e,t,n){var r;const s=[],a={},i=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,l=function(c,d){d===void 0&&(d=0);const g=[];for(let f=0;f<c.length;f++){var u;let m=c[f];const p=vr(n,m.id,m.original,m.index,m.depth,void 0,m.parentId);if(p.columnFilters=m.columnFilters,(u=m.subRows)!=null&&u.length&&d<i){if(p.subRows=l(m.subRows,d+1),m=p,t(m)&&!p.subRows.length){g.push(m),a[m.id]=m,s.push(m);continue}if(t(m)||p.subRows.length){g.push(m),a[m.id]=m,s.push(m);continue}}else m=p,t(m)&&(g.push(m),a[m.id]=m,s.push(m))}return g};return{rows:l(e),flatRows:s,rowsById:a}}function Cu(e,t,n){var r;const s=[],a={},i=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,l=function(c,d){d===void 0&&(d=0);const g=[];for(let f=0;f<c.length;f++){let m=c[f];if(t(m)){var u;if((u=m.subRows)!=null&&u.length&&d<i){const v=vr(n,m.id,m.original,m.index,m.depth,void 0,m.parentId);v.subRows=l(m.subRows,d+1),m=v}g.push(m),s.push(m),a[m.id]=m}}return g};return{rows:l(e),flatRows:s,rowsById:a}}function Nu(){return e=>$(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let f=0;f<t.flatRows.length;f++)t.flatRows[f].columnFilters={},t.flatRows[f].columnFiltersMeta={};return t}const s=[],a=[];(n??[]).forEach(f=>{var m;const p=e.getColumn(f.id);if(!p)return;const v=p.getFilterFn();if(!v){process.env.NODE_ENV!=="production"&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${p.id}.`);return}s.push({id:f.id,filterFn:v,resolvedValue:(m=v.resolveFilterValue==null?void 0:v.resolveFilterValue(f.value))!=null?m:f.value})});const i=(n??[]).map(f=>f.id),l=e.getGlobalFilterFn(),c=e.getAllLeafColumns().filter(f=>f.getCanGlobalFilter());r&&l&&c.length&&(i.push("__global__"),c.forEach(f=>{var m;a.push({id:f.id,filterFn:l,resolvedValue:(m=l.resolveFilterValue==null?void 0:l.resolveFilterValue(r))!=null?m:r})}));let d,g;for(let f=0;f<t.flatRows.length;f++){const m=t.flatRows[f];if(m.columnFilters={},s.length)for(let p=0;p<s.length;p++){d=s[p];const v=d.id;m.columnFilters[v]=d.filterFn(m,v,d.resolvedValue,b=>{m.columnFiltersMeta[v]=b})}if(a.length){for(let p=0;p<a.length;p++){g=a[p];const v=g.id;if(g.filterFn(m,v,g.resolvedValue,b=>{m.columnFiltersMeta[v]=b})){m.columnFilters.__global__=!0;break}}m.columnFilters.__global__!==!0&&(m.columnFilters.__global__=!1)}}const u=f=>{for(let m=0;m<i.length;m++)if(f.columnFilters[i[m]]===!1)return!1;return!0};return bu(t.rows,u,e)},z(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function ju(e){return t=>$(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:s,pageIndex:a}=n;let{rows:i,flatRows:l,rowsById:c}=r;const d=s*a,g=d+s;i=i.slice(d,g);let u;t.options.paginateExpandedRows?u={rows:i,flatRows:l,rowsById:c}:u=wu({rows:i,flatRows:l,rowsById:c}),u.flatRows=[];const f=m=>{u.flatRows.push(m),m.subRows.length&&m.subRows.forEach(f)};return u.rows.forEach(f),u},z(t.options,"debugTable","getPaginationRowModel"))}function Su(){return e=>$(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,s=[],a=r.filter(c=>{var d;return(d=e.getColumn(c.id))==null?void 0:d.getCanSort()}),i={};a.forEach(c=>{const d=e.getColumn(c.id);d&&(i[c.id]={sortUndefined:d.columnDef.sortUndefined,invertSorting:d.columnDef.invertSorting,sortingFn:d.getSortingFn()})});const l=c=>{const d=c.map(g=>({...g}));return d.sort((g,u)=>{for(let m=0;m<a.length;m+=1){var f;const p=a[m],v=i[p.id],b=v.sortUndefined,h=(f=p==null?void 0:p.desc)!=null?f:!1;let y=0;if(b){const C=g.getValue(p.id),S=u.getValue(p.id),L=C===void 0,D=S===void 0;if(L||D){if(b==="first")return L?-1:1;if(b==="last")return L?1:-1;y=L&&D?0:L?b:-b}}if(y===0&&(y=v.sortingFn(g,u,p.id)),y!==0)return h&&(y*=-1),v.invertSorting&&(y*=-1),y}return g.index-u.index}),d.forEach(g=>{var u;s.push(g),(u=g.subRows)!=null&&u.length&&(g.subRows=l(g.subRows))}),d};return{rows:l(n.rows),flatRows:s,rowsById:n.rowsById}},z(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
|
|
24
|
+
color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,t==null?void 0:t.key)}return s}}function z(e,n,t,o){return{debug:()=>{var s;return(s=e==null?void 0:e.debugAll)!=null?s:e[n]},key:process.env.NODE_ENV==="development"&&t,onChange:o}}function Ec(e,n,t,o){const s=()=>{var i;return(i=a.getValue())!=null?i:e.options.renderFallbackValue},a={id:`${n.id}_${t.id}`,row:n,column:t,getValue:()=>n.getValue(o),renderValue:s,getContext:$(()=>[e,t,n,a],(i,l,c,d)=>({table:i,column:l,row:c,cell:d,getValue:d.getValue,renderValue:d.renderValue}),z(e.options,"debugCells","cell.getContext"))};return e._features.forEach(i=>{i.createCell==null||i.createCell(a,t,n,e)},{}),a}function Vc(e,n,t,o){var s,a;const l={...e._getDefaultColumnDef(),...n},c=l.accessorKey;let d=(s=(a=l.id)!=null?a:c?typeof String.prototype.replaceAll=="function"?c.replaceAll(".","_"):c.replace(/\./g,"_"):void 0)!=null?s:typeof l.header=="string"?l.header:void 0,g;if(l.accessorFn?g=l.accessorFn:c&&(c.includes(".")?g=f=>{let m=f;for(const h of c.split(".")){var p;m=(p=m)==null?void 0:p[h],process.env.NODE_ENV!=="production"&&m===void 0&&console.warn(`"${h}" in deeply nested key "${c}" returned undefined.`)}return m}:g=f=>f[l.accessorKey]),!d)throw process.env.NODE_ENV!=="production"?new Error(l.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let u={id:`${String(d)}`,accessorFn:g,parent:o,depth:t,columnDef:l,columns:[],getFlatColumns:$(()=>[!0],()=>{var f;return[u,...(f=u.columns)==null?void 0:f.flatMap(m=>m.getFlatColumns())]},z(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:$(()=>[e._getOrderColumnsFn()],f=>{var m;if((m=u.columns)!=null&&m.length){let p=u.columns.flatMap(h=>h.getLeafColumns());return f(p)}return[u]},z(e.options,"debugColumns","column.getLeafColumns"))};for(const f of e._features)f.createColumn==null||f.createColumn(u,e);return u}const Ce="debugHeaders";function $o(e,n,t){var o;let a={id:(o=t.id)!=null?o:n.id,column:n,index:t.index,isPlaceholder:!!t.isPlaceholder,placeholderId:t.placeholderId,depth:t.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const i=[],l=c=>{c.subHeaders&&c.subHeaders.length&&c.subHeaders.map(l),i.push(c)};return l(a),i},getContext:()=>({table:e,header:a,column:n})};return e._features.forEach(i=>{i.createHeader==null||i.createHeader(a,e)}),a}const $c={createTable:e=>{e.getHeaderGroups=$(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,o,s)=>{var a,i;const l=(a=o==null?void 0:o.map(u=>t.find(f=>f.id===u)).filter(Boolean))!=null?a:[],c=(i=s==null?void 0:s.map(u=>t.find(f=>f.id===u)).filter(Boolean))!=null?i:[],d=t.filter(u=>!(o!=null&&o.includes(u.id))&&!(s!=null&&s.includes(u.id)));return Zt(n,[...l,...d,...c],e)},z(e.options,Ce,"getHeaderGroups")),e.getCenterHeaderGroups=$(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,o,s)=>(t=t.filter(a=>!(o!=null&&o.includes(a.id))&&!(s!=null&&s.includes(a.id))),Zt(n,t,e,"center")),z(e.options,Ce,"getCenterHeaderGroups")),e.getLeftHeaderGroups=$(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(n,t,o)=>{var s;const a=(s=o==null?void 0:o.map(i=>t.find(l=>l.id===i)).filter(Boolean))!=null?s:[];return Zt(n,a,e,"left")},z(e.options,Ce,"getLeftHeaderGroups")),e.getRightHeaderGroups=$(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(n,t,o)=>{var s;const a=(s=o==null?void 0:o.map(i=>t.find(l=>l.id===i)).filter(Boolean))!=null?s:[];return Zt(n,a,e,"right")},z(e.options,Ce,"getRightHeaderGroups")),e.getFooterGroups=$(()=>[e.getHeaderGroups()],n=>[...n].reverse(),z(e.options,Ce,"getFooterGroups")),e.getLeftFooterGroups=$(()=>[e.getLeftHeaderGroups()],n=>[...n].reverse(),z(e.options,Ce,"getLeftFooterGroups")),e.getCenterFooterGroups=$(()=>[e.getCenterHeaderGroups()],n=>[...n].reverse(),z(e.options,Ce,"getCenterFooterGroups")),e.getRightFooterGroups=$(()=>[e.getRightHeaderGroups()],n=>[...n].reverse(),z(e.options,Ce,"getRightFooterGroups")),e.getFlatHeaders=$(()=>[e.getHeaderGroups()],n=>n.map(t=>t.headers).flat(),z(e.options,Ce,"getFlatHeaders")),e.getLeftFlatHeaders=$(()=>[e.getLeftHeaderGroups()],n=>n.map(t=>t.headers).flat(),z(e.options,Ce,"getLeftFlatHeaders")),e.getCenterFlatHeaders=$(()=>[e.getCenterHeaderGroups()],n=>n.map(t=>t.headers).flat(),z(e.options,Ce,"getCenterFlatHeaders")),e.getRightFlatHeaders=$(()=>[e.getRightHeaderGroups()],n=>n.map(t=>t.headers).flat(),z(e.options,Ce,"getRightFlatHeaders")),e.getCenterLeafHeaders=$(()=>[e.getCenterFlatHeaders()],n=>n.filter(t=>{var o;return!((o=t.subHeaders)!=null&&o.length)}),z(e.options,Ce,"getCenterLeafHeaders")),e.getLeftLeafHeaders=$(()=>[e.getLeftFlatHeaders()],n=>n.filter(t=>{var o;return!((o=t.subHeaders)!=null&&o.length)}),z(e.options,Ce,"getLeftLeafHeaders")),e.getRightLeafHeaders=$(()=>[e.getRightFlatHeaders()],n=>n.filter(t=>{var o;return!((o=t.subHeaders)!=null&&o.length)}),z(e.options,Ce,"getRightLeafHeaders")),e.getLeafHeaders=$(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(n,t,o)=>{var s,a,i,l,c,d;return[...(s=(a=n[0])==null?void 0:a.headers)!=null?s:[],...(i=(l=t[0])==null?void 0:l.headers)!=null?i:[],...(c=(d=o[0])==null?void 0:d.headers)!=null?c:[]].map(g=>g.getLeafHeaders()).flat()},z(e.options,Ce,"getLeafHeaders"))}};function Zt(e,n,t,o){var s,a;let i=0;const l=function(f,m){m===void 0&&(m=1),i=Math.max(i,m),f.filter(p=>p.getIsVisible()).forEach(p=>{var h;(h=p.columns)!=null&&h.length&&l(p.columns,m+1)},0)};l(e);let c=[];const d=(f,m)=>{const p={depth:m,id:[o,`${m}`].filter(Boolean).join("_"),headers:[]},h=[];f.forEach(w=>{const b=[...h].reverse()[0],y=w.column.depth===p.depth;let N,R=!1;if(y&&w.column.parent?N=w.column.parent:(N=w.column,R=!0),b&&(b==null?void 0:b.column)===N)b.subHeaders.push(w);else{const _=$o(t,N,{id:[o,m,N.id,w==null?void 0:w.id].filter(Boolean).join("_"),isPlaceholder:R,placeholderId:R?`${h.filter(S=>S.column===N).length}`:void 0,depth:m,index:h.length});_.subHeaders.push(w),h.push(_)}p.headers.push(w),w.headerGroup=p}),c.push(p),m>0&&d(h,m-1)},g=n.map((f,m)=>$o(t,f,{depth:i,index:m}));d(g,i-1),c.reverse();const u=f=>f.filter(p=>p.column.getIsVisible()).map(p=>{let h=0,w=0,b=[0];p.subHeaders&&p.subHeaders.length?(b=[],u(p.subHeaders).forEach(N=>{let{colSpan:R,rowSpan:_}=N;h+=R,b.push(_)})):h=1;const y=Math.min(...b);return w=w+y,p.colSpan=h,p.rowSpan=w,{colSpan:h,rowSpan:w}});return u((s=(a=c[0])==null?void 0:a.headers)!=null?s:[]),c}const bo=(e,n,t,o,s,a,i)=>{let l={id:n,index:o,original:t,depth:s,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:c=>{if(l._valuesCache.hasOwnProperty(c))return l._valuesCache[c];const d=e.getColumn(c);if(d!=null&&d.accessorFn)return l._valuesCache[c]=d.accessorFn(l.original,o),l._valuesCache[c]},getUniqueValues:c=>{if(l._uniqueValuesCache.hasOwnProperty(c))return l._uniqueValuesCache[c];const d=e.getColumn(c);if(d!=null&&d.accessorFn)return d.columnDef.getUniqueValues?(l._uniqueValuesCache[c]=d.columnDef.getUniqueValues(l.original,o),l._uniqueValuesCache[c]):(l._uniqueValuesCache[c]=[l.getValue(c)],l._uniqueValuesCache[c])},renderValue:c=>{var d;return(d=l.getValue(c))!=null?d:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>Ac(l.subRows,c=>c.subRows),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let c=[],d=l;for(;;){const g=d.getParentRow();if(!g)break;c.push(g),d=g}return c.reverse()},getAllCells:$(()=>[e.getAllLeafColumns()],c=>c.map(d=>Ec(e,l,d,d.id)),z(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:$(()=>[l.getAllCells()],c=>c.reduce((d,g)=>(d[g.column.id]=g,d),{}),z(e.options,"debugRows","getAllCellsByColumnId"))};for(let c=0;c<e._features.length;c++){const d=e._features[c];d==null||d.createRow==null||d.createRow(l,e)}return l},zc={createColumn:(e,n)=>{e._getFacetedRowModel=n.options.getFacetedRowModel&&n.options.getFacetedRowModel(n,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():n.getPreFilteredRowModel(),e._getFacetedUniqueValues=n.options.getFacetedUniqueValues&&n.options.getFacetedUniqueValues(n,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=n.options.getFacetedMinMaxValues&&n.options.getFacetedMinMaxValues(n,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},wa=(e,n,t)=>{var o,s;const a=t==null||(o=t.toString())==null?void 0:o.toLowerCase();return!!(!((s=e.getValue(n))==null||(s=s.toString())==null||(s=s.toLowerCase())==null)&&s.includes(a))};wa.autoRemove=e=>ze(e);const ya=(e,n,t)=>{var o;return!!(!((o=e.getValue(n))==null||(o=o.toString())==null)&&o.includes(t))};ya.autoRemove=e=>ze(e);const Na=(e,n,t)=>{var o;return((o=e.getValue(n))==null||(o=o.toString())==null?void 0:o.toLowerCase())===(t==null?void 0:t.toLowerCase())};Na.autoRemove=e=>ze(e);const Ca=(e,n,t)=>{var o;return(o=e.getValue(n))==null?void 0:o.includes(t)};Ca.autoRemove=e=>ze(e);const ja=(e,n,t)=>!t.some(o=>{var s;return!((s=e.getValue(n))!=null&&s.includes(o))});ja.autoRemove=e=>ze(e)||!(e!=null&&e.length);const Sa=(e,n,t)=>t.some(o=>{var s;return(s=e.getValue(n))==null?void 0:s.includes(o)});Sa.autoRemove=e=>ze(e)||!(e!=null&&e.length);const ka=(e,n,t)=>e.getValue(n)===t;ka.autoRemove=e=>ze(e);const Ra=(e,n,t)=>e.getValue(n)==t;Ra.autoRemove=e=>ze(e);const wo=(e,n,t)=>{let[o,s]=t;const a=e.getValue(n);return a>=o&&a<=s};wo.resolveFilterValue=e=>{let[n,t]=e,o=typeof n!="number"?parseFloat(n):n,s=typeof t!="number"?parseFloat(t):t,a=n===null||Number.isNaN(o)?-1/0:o,i=t===null||Number.isNaN(s)?1/0:s;if(a>i){const l=a;a=i,i=l}return[a,i]};wo.autoRemove=e=>ze(e)||ze(e[0])&&ze(e[1]);const Ye={includesString:wa,includesStringSensitive:ya,equalsString:Na,arrIncludes:Ca,arrIncludesAll:ja,arrIncludesSome:Sa,equals:ka,weakEquals:Ra,inNumberRange:wo};function ze(e){return e==null||e===""}const Bc={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Le("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,n)=>{e.getAutoFilterFn=()=>{const t=n.getCoreRowModel().flatRows[0],o=t==null?void 0:t.getValue(e.id);return typeof o=="string"?Ye.includesString:typeof o=="number"?Ye.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?Ye.equals:Array.isArray(o)?Ye.arrIncludes:Ye.weakEquals},e.getFilterFn=()=>{var t,o;return mn(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(t=(o=n.options.filterFns)==null?void 0:o[e.columnDef.filterFn])!=null?t:Ye[e.columnDef.filterFn]},e.getCanFilter=()=>{var t,o,s;return((t=e.columnDef.enableColumnFilter)!=null?t:!0)&&((o=n.options.enableColumnFilters)!=null?o:!0)&&((s=n.options.enableFilters)!=null?s:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var t;return(t=n.getState().columnFilters)==null||(t=t.find(o=>o.id===e.id))==null?void 0:t.value},e.getFilterIndex=()=>{var t,o;return(t=(o=n.getState().columnFilters)==null?void 0:o.findIndex(s=>s.id===e.id))!=null?t:-1},e.setFilterValue=t=>{n.setColumnFilters(o=>{const s=e.getFilterFn(),a=o==null?void 0:o.find(g=>g.id===e.id),i=Ke(t,a?a.value:void 0);if(zo(s,i,e)){var l;return(l=o==null?void 0:o.filter(g=>g.id!==e.id))!=null?l:[]}const c={id:e.id,value:i};if(a){var d;return(d=o==null?void 0:o.map(g=>g.id===e.id?c:g))!=null?d:[]}return o!=null&&o.length?[...o,c]:[c]})}},createRow:(e,n)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=n=>{const t=e.getAllLeafColumns(),o=s=>{var a;return(a=Ke(n,s))==null?void 0:a.filter(i=>{const l=t.find(c=>c.id===i.id);if(l){const c=l.getFilterFn();if(zo(c,i.value,l))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(o)},e.resetColumnFilters=n=>{var t,o;e.setColumnFilters(n?[]:(t=(o=e.initialState)==null?void 0:o.columnFilters)!=null?t:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function zo(e,n,t){return(e&&e.autoRemove?e.autoRemove(n,t):!1)||typeof n>"u"||typeof n=="string"&&!n}const Oc=(e,n,t)=>t.reduce((o,s)=>{const a=s.getValue(e);return o+(typeof a=="number"?a:0)},0),Hc=(e,n,t)=>{let o;return t.forEach(s=>{const a=s.getValue(e);a!=null&&(o>a||o===void 0&&a>=a)&&(o=a)}),o},Gc=(e,n,t)=>{let o;return t.forEach(s=>{const a=s.getValue(e);a!=null&&(o<a||o===void 0&&a>=a)&&(o=a)}),o},qc=(e,n,t)=>{let o,s;return t.forEach(a=>{const i=a.getValue(e);i!=null&&(o===void 0?i>=i&&(o=s=i):(o>i&&(o=i),s<i&&(s=i)))}),[o,s]},Wc=(e,n)=>{let t=0,o=0;if(n.forEach(s=>{let a=s.getValue(e);a!=null&&(a=+a)>=a&&(++t,o+=a)}),t)return o/t},Uc=(e,n)=>{if(!n.length)return;const t=n.map(a=>a.getValue(e));if(!Fc(t))return;if(t.length===1)return t[0];const o=Math.floor(t.length/2),s=t.sort((a,i)=>a-i);return t.length%2!==0?s[o]:(s[o-1]+s[o])/2},Yc=(e,n)=>Array.from(new Set(n.map(t=>t.getValue(e))).values()),Xc=(e,n)=>new Set(n.map(t=>t.getValue(e))).size,Kc=(e,n)=>n.length,bn={sum:Oc,min:Hc,max:Gc,extent:qc,mean:Wc,median:Uc,unique:Yc,uniqueCount:Xc,count:Kc},Zc={getDefaultColumnDef:()=>({aggregatedCell:e=>{var n,t;return(n=(t=e.getValue())==null||t.toString==null?void 0:t.toString())!=null?n:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Le("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,n)=>{e.toggleGrouping=()=>{n.setGrouping(t=>t!=null&&t.includes(e.id)?t.filter(o=>o!==e.id):[...t??[],e.id])},e.getCanGroup=()=>{var t,o;return((t=e.columnDef.enableGrouping)!=null?t:!0)&&((o=n.options.enableGrouping)!=null?o:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var t;return(t=n.getState().grouping)==null?void 0:t.includes(e.id)},e.getGroupedIndex=()=>{var t;return(t=n.getState().grouping)==null?void 0:t.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const t=n.getCoreRowModel().flatRows[0],o=t==null?void 0:t.getValue(e.id);if(typeof o=="number")return bn.sum;if(Object.prototype.toString.call(o)==="[object Date]")return bn.extent},e.getAggregationFn=()=>{var t,o;if(!e)throw new Error;return mn(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(t=(o=n.options.aggregationFns)==null?void 0:o[e.columnDef.aggregationFn])!=null?t:bn[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=n=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(n),e.resetGrouping=n=>{var t,o;e.setGrouping(n?[]:(t=(o=e.initialState)==null?void 0:o.grouping)!=null?t:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,n)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=t=>{if(e._groupingValuesCache.hasOwnProperty(t))return e._groupingValuesCache[t];const o=n.getColumn(t);return o!=null&&o.columnDef.getGroupingValue?(e._groupingValuesCache[t]=o.columnDef.getGroupingValue(e.original),e._groupingValuesCache[t]):e.getValue(t)},e._groupingValuesCache={}},createCell:(e,n,t,o)=>{e.getIsGrouped=()=>n.getIsGrouped()&&n.id===t.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&n.getIsGrouped(),e.getIsAggregated=()=>{var s;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((s=t.subRows)!=null&&s.length)}}};function Jc(e,n,t){if(!(n!=null&&n.length)||!t)return e;const o=e.filter(a=>!n.includes(a.id));return t==="remove"?o:[...n.map(a=>e.find(i=>i.id===a)).filter(Boolean),...o]}const Qc={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Le("columnOrder",e)}),createColumn:(e,n)=>{e.getIndex=$(t=>[_t(n,t)],t=>t.findIndex(o=>o.id===e.id),z(n.options,"debugColumns","getIndex")),e.getIsFirstColumn=t=>{var o;return((o=_t(n,t)[0])==null?void 0:o.id)===e.id},e.getIsLastColumn=t=>{var o;const s=_t(n,t);return((o=s[s.length-1])==null?void 0:o.id)===e.id}},createTable:e=>{e.setColumnOrder=n=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(n),e.resetColumnOrder=n=>{var t;e.setColumnOrder(n?[]:(t=e.initialState.columnOrder)!=null?t:[])},e._getOrderColumnsFn=$(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(n,t,o)=>s=>{let a=[];if(!(n!=null&&n.length))a=s;else{const i=[...n],l=[...s];for(;l.length&&i.length;){const c=i.shift(),d=l.findIndex(g=>g.id===c);d>-1&&a.push(l.splice(d,1)[0])}a=[...a,...l]}return Jc(a,t,o)},z(e.options,"debugTable","_getOrderColumnsFn"))}},wn=()=>({left:[],right:[]}),eu={getInitialState:e=>({columnPinning:wn(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Le("columnPinning",e)}),createColumn:(e,n)=>{e.pin=t=>{const o=e.getLeafColumns().map(s=>s.id).filter(Boolean);n.setColumnPinning(s=>{var a,i;if(t==="right"){var l,c;return{left:((l=s==null?void 0:s.left)!=null?l:[]).filter(u=>!(o!=null&&o.includes(u))),right:[...((c=s==null?void 0:s.right)!=null?c:[]).filter(u=>!(o!=null&&o.includes(u))),...o]}}if(t==="left"){var d,g;return{left:[...((d=s==null?void 0:s.left)!=null?d:[]).filter(u=>!(o!=null&&o.includes(u))),...o],right:((g=s==null?void 0:s.right)!=null?g:[]).filter(u=>!(o!=null&&o.includes(u)))}}return{left:((a=s==null?void 0:s.left)!=null?a:[]).filter(u=>!(o!=null&&o.includes(u))),right:((i=s==null?void 0:s.right)!=null?i:[]).filter(u=>!(o!=null&&o.includes(u)))}})},e.getCanPin=()=>e.getLeafColumns().some(o=>{var s,a,i;return((s=o.columnDef.enablePinning)!=null?s:!0)&&((a=(i=n.options.enableColumnPinning)!=null?i:n.options.enablePinning)!=null?a:!0)}),e.getIsPinned=()=>{const t=e.getLeafColumns().map(l=>l.id),{left:o,right:s}=n.getState().columnPinning,a=t.some(l=>o==null?void 0:o.includes(l)),i=t.some(l=>s==null?void 0:s.includes(l));return a?"left":i?"right":!1},e.getPinnedIndex=()=>{var t,o;const s=e.getIsPinned();return s?(t=(o=n.getState().columnPinning)==null||(o=o[s])==null?void 0:o.indexOf(e.id))!=null?t:-1:0}},createRow:(e,n)=>{e.getCenterVisibleCells=$(()=>[e._getAllVisibleCells(),n.getState().columnPinning.left,n.getState().columnPinning.right],(t,o,s)=>{const a=[...o??[],...s??[]];return t.filter(i=>!a.includes(i.column.id))},z(n.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=$(()=>[e._getAllVisibleCells(),n.getState().columnPinning.left],(t,o)=>(o??[]).map(a=>t.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"left"})),z(n.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=$(()=>[e._getAllVisibleCells(),n.getState().columnPinning.right],(t,o)=>(o??[]).map(a=>t.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"right"})),z(n.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=n=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(n),e.resetColumnPinning=n=>{var t,o;return e.setColumnPinning(n?wn():(t=(o=e.initialState)==null?void 0:o.columnPinning)!=null?t:wn())},e.getIsSomeColumnsPinned=n=>{var t;const o=e.getState().columnPinning;if(!n){var s,a;return!!((s=o.left)!=null&&s.length||(a=o.right)!=null&&a.length)}return!!((t=o[n])!=null&&t.length)},e.getLeftLeafColumns=$(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(n,t)=>(t??[]).map(o=>n.find(s=>s.id===o)).filter(Boolean),z(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=$(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(n,t)=>(t??[]).map(o=>n.find(s=>s.id===o)).filter(Boolean),z(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=$(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,o)=>{const s=[...t??[],...o??[]];return n.filter(a=>!s.includes(a.id))},z(e.options,"debugColumns","getCenterLeafColumns"))}};function tu(e){return e||(typeof document<"u"?document:null)}const Jt={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},yn=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),nu={getDefaultColumnDef:()=>Jt,getInitialState:e=>({columnSizing:{},columnSizingInfo:yn(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Le("columnSizing",e),onColumnSizingInfoChange:Le("columnSizingInfo",e)}),createColumn:(e,n)=>{e.getSize=()=>{var t,o,s;const a=n.getState().columnSizing[e.id];return Math.min(Math.max((t=e.columnDef.minSize)!=null?t:Jt.minSize,(o=a??e.columnDef.size)!=null?o:Jt.size),(s=e.columnDef.maxSize)!=null?s:Jt.maxSize)},e.getStart=$(t=>[t,_t(n,t),n.getState().columnSizing],(t,o)=>o.slice(0,e.getIndex(t)).reduce((s,a)=>s+a.getSize(),0),z(n.options,"debugColumns","getStart")),e.getAfter=$(t=>[t,_t(n,t),n.getState().columnSizing],(t,o)=>o.slice(e.getIndex(t)+1).reduce((s,a)=>s+a.getSize(),0),z(n.options,"debugColumns","getAfter")),e.resetSize=()=>{n.setColumnSizing(t=>{let{[e.id]:o,...s}=t;return s})},e.getCanResize=()=>{var t,o;return((t=e.columnDef.enableResizing)!=null?t:!0)&&((o=n.options.enableColumnResizing)!=null?o:!0)},e.getIsResizing=()=>n.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,n)=>{e.getSize=()=>{let t=0;const o=s=>{if(s.subHeaders.length)s.subHeaders.forEach(o);else{var a;t+=(a=s.column.getSize())!=null?a:0}};return o(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=t=>{const o=n.getColumn(e.column.id),s=o==null?void 0:o.getCanResize();return a=>{if(!o||!s||(a.persist==null||a.persist(),Nn(a)&&a.touches&&a.touches.length>1))return;const i=e.getSize(),l=e?e.getLeafHeaders().map(b=>[b.column.id,b.column.getSize()]):[[o.id,o.getSize()]],c=Nn(a)?Math.round(a.touches[0].clientX):a.clientX,d={},g=(b,y)=>{typeof y=="number"&&(n.setColumnSizingInfo(N=>{var R,_;const S=n.options.columnResizeDirection==="rtl"?-1:1,k=(y-((R=N==null?void 0:N.startOffset)!=null?R:0))*S,C=Math.max(k/((_=N==null?void 0:N.startSize)!=null?_:0),-.999999);return N.columnSizingStart.forEach(D=>{let[G,E]=D;d[G]=Math.round(Math.max(E+E*C,0)*100)/100}),{...N,deltaOffset:k,deltaPercentage:C}}),(n.options.columnResizeMode==="onChange"||b==="end")&&n.setColumnSizing(N=>({...N,...d})))},u=b=>g("move",b),f=b=>{g("end",b),n.setColumnSizingInfo(y=>({...y,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},m=tu(t),p={moveHandler:b=>u(b.clientX),upHandler:b=>{m==null||m.removeEventListener("mousemove",p.moveHandler),m==null||m.removeEventListener("mouseup",p.upHandler),f(b.clientX)}},h={moveHandler:b=>(b.cancelable&&(b.preventDefault(),b.stopPropagation()),u(b.touches[0].clientX),!1),upHandler:b=>{var y;m==null||m.removeEventListener("touchmove",h.moveHandler),m==null||m.removeEventListener("touchend",h.upHandler),b.cancelable&&(b.preventDefault(),b.stopPropagation()),f((y=b.touches[0])==null?void 0:y.clientX)}},w=ou()?{passive:!1}:!1;Nn(a)?(m==null||m.addEventListener("touchmove",h.moveHandler,w),m==null||m.addEventListener("touchend",h.upHandler,w)):(m==null||m.addEventListener("mousemove",p.moveHandler,w),m==null||m.addEventListener("mouseup",p.upHandler,w)),n.setColumnSizingInfo(b=>({...b,startOffset:c,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:o.id}))}}},createTable:e=>{e.setColumnSizing=n=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(n),e.setColumnSizingInfo=n=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(n),e.resetColumnSizing=n=>{var t;e.setColumnSizing(n?{}:(t=e.initialState.columnSizing)!=null?t:{})},e.resetHeaderSizeInfo=n=>{var t;e.setColumnSizingInfo(n?yn():(t=e.initialState.columnSizingInfo)!=null?t:yn())},e.getTotalSize=()=>{var n,t;return(n=(t=e.getHeaderGroups()[0])==null?void 0:t.headers.reduce((o,s)=>o+s.getSize(),0))!=null?n:0},e.getLeftTotalSize=()=>{var n,t;return(n=(t=e.getLeftHeaderGroups()[0])==null?void 0:t.headers.reduce((o,s)=>o+s.getSize(),0))!=null?n:0},e.getCenterTotalSize=()=>{var n,t;return(n=(t=e.getCenterHeaderGroups()[0])==null?void 0:t.headers.reduce((o,s)=>o+s.getSize(),0))!=null?n:0},e.getRightTotalSize=()=>{var n,t;return(n=(t=e.getRightHeaderGroups()[0])==null?void 0:t.headers.reduce((o,s)=>o+s.getSize(),0))!=null?n:0}}};let Qt=null;function ou(){if(typeof Qt=="boolean")return Qt;let e=!1;try{const n={get passive(){return e=!0,!1}},t=()=>{};window.addEventListener("test",t,n),window.removeEventListener("test",t)}catch{e=!1}return Qt=e,Qt}function Nn(e){return e.type==="touchstart"}const ru={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Le("columnVisibility",e)}),createColumn:(e,n)=>{e.toggleVisibility=t=>{e.getCanHide()&&n.setColumnVisibility(o=>({...o,[e.id]:t??!e.getIsVisible()}))},e.getIsVisible=()=>{var t,o;const s=e.columns;return(t=s.length?s.some(a=>a.getIsVisible()):(o=n.getState().columnVisibility)==null?void 0:o[e.id])!=null?t:!0},e.getCanHide=()=>{var t,o;return((t=e.columnDef.enableHiding)!=null?t:!0)&&((o=n.options.enableHiding)!=null?o:!0)},e.getToggleVisibilityHandler=()=>t=>{e.toggleVisibility==null||e.toggleVisibility(t.target.checked)}},createRow:(e,n)=>{e._getAllVisibleCells=$(()=>[e.getAllCells(),n.getState().columnVisibility],t=>t.filter(o=>o.column.getIsVisible()),z(n.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=$(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(t,o,s)=>[...t,...o,...s],z(n.options,"debugRows","getVisibleCells"))},createTable:e=>{const n=(t,o)=>$(()=>[o(),o().filter(s=>s.getIsVisible()).map(s=>s.id).join("_")],s=>s.filter(a=>a.getIsVisible==null?void 0:a.getIsVisible()),z(e.options,"debugColumns",t));e.getVisibleFlatColumns=n("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=n("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=n("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=n("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=n("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var o;e.setColumnVisibility(t?{}:(o=e.initialState.columnVisibility)!=null?o:{})},e.toggleAllColumnsVisible=t=>{var o;t=(o=t)!=null?o:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((s,a)=>({...s,[a.id]:t||!(a.getCanHide!=null&&a.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(t=>!(t.getIsVisible!=null&&t.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(t=>t.getIsVisible==null?void 0:t.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var o;e.toggleAllColumnsVisible((o=t.target)==null?void 0:o.checked)}}};function _t(e,n){return n?n==="center"?e.getCenterVisibleLeafColumns():n==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const su={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},au={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Le("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:n=>{var t;const o=(t=e.getCoreRowModel().flatRows[0])==null||(t=t._getAllCellsByColumnId()[n.id])==null?void 0:t.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(e,n)=>{e.getCanGlobalFilter=()=>{var t,o,s,a;return((t=e.columnDef.enableGlobalFilter)!=null?t:!0)&&((o=n.options.enableGlobalFilter)!=null?o:!0)&&((s=n.options.enableFilters)!=null?s:!0)&&((a=n.options.getColumnCanGlobalFilter==null?void 0:n.options.getColumnCanGlobalFilter(e))!=null?a:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Ye.includesString,e.getGlobalFilterFn=()=>{var n,t;const{globalFilterFn:o}=e.options;return mn(o)?o:o==="auto"?e.getGlobalAutoFilterFn():(n=(t=e.options.filterFns)==null?void 0:t[o])!=null?n:Ye[o]},e.setGlobalFilter=n=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(n)},e.resetGlobalFilter=n=>{e.setGlobalFilter(n?void 0:e.initialState.globalFilter)}}},iu={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Le("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let n=!1,t=!1;e._autoResetExpanded=()=>{var o,s;if(!n){e._queue(()=>{n=!0});return}if((o=(s=e.options.autoResetAll)!=null?s:e.options.autoResetExpanded)!=null?o:!e.options.manualExpanding){if(t)return;t=!0,e._queue(()=>{e.resetExpanded(),t=!1})}},e.setExpanded=o=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(o),e.toggleAllRowsExpanded=o=>{o??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=o=>{var s,a;e.setExpanded(o?{}:(s=(a=e.initialState)==null?void 0:a.expanded)!=null?s:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(o=>o.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>o=>{o.persist==null||o.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const o=e.getState().expanded;return o===!0||Object.values(o).some(Boolean)},e.getIsAllRowsExpanded=()=>{const o=e.getState().expanded;return typeof o=="boolean"?o===!0:!(!Object.keys(o).length||e.getRowModel().flatRows.some(s=>!s.getIsExpanded()))},e.getExpandedDepth=()=>{let o=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(a=>{const i=a.split(".");o=Math.max(o,i.length)}),o},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,n)=>{e.toggleExpanded=t=>{n.setExpanded(o=>{var s;const a=o===!0?!0:!!(o!=null&&o[e.id]);let i={};if(o===!0?Object.keys(n.getRowModel().rowsById).forEach(l=>{i[l]=!0}):i=o,t=(s=t)!=null?s:!a,!a&&t)return{...i,[e.id]:!0};if(a&&!t){const{[e.id]:l,...c}=i;return c}return o})},e.getIsExpanded=()=>{var t;const o=n.getState().expanded;return!!((t=n.options.getIsRowExpanded==null?void 0:n.options.getIsRowExpanded(e))!=null?t:o===!0||o!=null&&o[e.id])},e.getCanExpand=()=>{var t,o,s;return(t=n.options.getRowCanExpand==null?void 0:n.options.getRowCanExpand(e))!=null?t:((o=n.options.enableExpanding)!=null?o:!0)&&!!((s=e.subRows)!=null&&s.length)},e.getIsAllParentsExpanded=()=>{let t=!0,o=e;for(;t&&o.parentId;)o=n.getRow(o.parentId,!0),t=o.getIsExpanded();return t},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},Ln=0,Dn=10,Cn=()=>({pageIndex:Ln,pageSize:Dn}),lu={getInitialState:e=>({...e,pagination:{...Cn(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Le("pagination",e)}),createTable:e=>{let n=!1,t=!1;e._autoResetPageIndex=()=>{var o,s;if(!n){e._queue(()=>{n=!0});return}if((o=(s=e.options.autoResetAll)!=null?s:e.options.autoResetPageIndex)!=null?o:!e.options.manualPagination){if(t)return;t=!0,e._queue(()=>{e.resetPageIndex(),t=!1})}},e.setPagination=o=>{const s=a=>Ke(o,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(s)},e.resetPagination=o=>{var s;e.setPagination(o?Cn():(s=e.initialState.pagination)!=null?s:Cn())},e.setPageIndex=o=>{e.setPagination(s=>{let a=Ke(o,s.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return a=Math.max(0,Math.min(a,i)),{...s,pageIndex:a}})},e.resetPageIndex=o=>{var s,a;e.setPageIndex(o?Ln:(s=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?s:Ln)},e.resetPageSize=o=>{var s,a;e.setPageSize(o?Dn:(s=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?s:Dn)},e.setPageSize=o=>{e.setPagination(s=>{const a=Math.max(1,Ke(o,s.pageSize)),i=s.pageSize*s.pageIndex,l=Math.floor(i/a);return{...s,pageIndex:l,pageSize:a}})},e.setPageCount=o=>e.setPagination(s=>{var a;let i=Ke(o,(a=e.options.pageCount)!=null?a:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...s,pageCount:i}}),e.getPageOptions=$(()=>[e.getPageCount()],o=>{let s=[];return o&&o>0&&(s=[...new Array(o)].fill(null).map((a,i)=>i)),s},z(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:o}=e.getState().pagination,s=e.getPageCount();return s===-1?!0:s===0?!1:o<s-1},e.previousPage=()=>e.setPageIndex(o=>o-1),e.nextPage=()=>e.setPageIndex(o=>o+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var o;return(o=e.options.pageCount)!=null?o:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var o;return(o=e.options.rowCount)!=null?o:e.getPrePaginationRowModel().rows.length}}},jn=()=>({top:[],bottom:[]}),du={getInitialState:e=>({rowPinning:jn(),...e}),getDefaultOptions:e=>({onRowPinningChange:Le("rowPinning",e)}),createRow:(e,n)=>{e.pin=(t,o,s)=>{const a=o?e.getLeafRows().map(c=>{let{id:d}=c;return d}):[],i=s?e.getParentRows().map(c=>{let{id:d}=c;return d}):[],l=new Set([...i,e.id,...a]);n.setRowPinning(c=>{var d,g;if(t==="bottom"){var u,f;return{top:((u=c==null?void 0:c.top)!=null?u:[]).filter(h=>!(l!=null&&l.has(h))),bottom:[...((f=c==null?void 0:c.bottom)!=null?f:[]).filter(h=>!(l!=null&&l.has(h))),...Array.from(l)]}}if(t==="top"){var m,p;return{top:[...((m=c==null?void 0:c.top)!=null?m:[]).filter(h=>!(l!=null&&l.has(h))),...Array.from(l)],bottom:((p=c==null?void 0:c.bottom)!=null?p:[]).filter(h=>!(l!=null&&l.has(h)))}}return{top:((d=c==null?void 0:c.top)!=null?d:[]).filter(h=>!(l!=null&&l.has(h))),bottom:((g=c==null?void 0:c.bottom)!=null?g:[]).filter(h=>!(l!=null&&l.has(h)))}})},e.getCanPin=()=>{var t;const{enableRowPinning:o,enablePinning:s}=n.options;return typeof o=="function"?o(e):(t=o??s)!=null?t:!0},e.getIsPinned=()=>{const t=[e.id],{top:o,bottom:s}=n.getState().rowPinning,a=t.some(l=>o==null?void 0:o.includes(l)),i=t.some(l=>s==null?void 0:s.includes(l));return a?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var t,o;const s=e.getIsPinned();if(!s)return-1;const a=(t=s==="top"?n.getTopRows():n.getBottomRows())==null?void 0:t.map(i=>{let{id:l}=i;return l});return(o=a==null?void 0:a.indexOf(e.id))!=null?o:-1}},createTable:e=>{e.setRowPinning=n=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(n),e.resetRowPinning=n=>{var t,o;return e.setRowPinning(n?jn():(t=(o=e.initialState)==null?void 0:o.rowPinning)!=null?t:jn())},e.getIsSomeRowsPinned=n=>{var t;const o=e.getState().rowPinning;if(!n){var s,a;return!!((s=o.top)!=null&&s.length||(a=o.bottom)!=null&&a.length)}return!!((t=o[n])!=null&&t.length)},e._getPinnedRows=(n,t,o)=>{var s;return((s=e.options.keepPinnedRows)==null||s?(t??[]).map(i=>{const l=e.getRow(i,!0);return l.getIsAllParentsExpanded()?l:null}):(t??[]).map(i=>n.find(l=>l.id===i))).filter(Boolean).map(i=>({...i,position:o}))},e.getTopRows=$(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(n,t)=>e._getPinnedRows(n,t,"top"),z(e.options,"debugRows","getTopRows")),e.getBottomRows=$(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(n,t)=>e._getPinnedRows(n,t,"bottom"),z(e.options,"debugRows","getBottomRows")),e.getCenterRows=$(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(n,t,o)=>{const s=new Set([...t??[],...o??[]]);return n.filter(a=>!s.has(a.id))},z(e.options,"debugRows","getCenterRows"))}},cu={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Le("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=n=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(n),e.resetRowSelection=n=>{var t;return e.setRowSelection(n?{}:(t=e.initialState.rowSelection)!=null?t:{})},e.toggleAllRowsSelected=n=>{e.setRowSelection(t=>{n=typeof n<"u"?n:!e.getIsAllRowsSelected();const o={...t},s=e.getPreGroupedRowModel().flatRows;return n?s.forEach(a=>{a.getCanSelect()&&(o[a.id]=!0)}):s.forEach(a=>{delete o[a.id]}),o})},e.toggleAllPageRowsSelected=n=>e.setRowSelection(t=>{const o=typeof n<"u"?n:!e.getIsAllPageRowsSelected(),s={...t};return e.getRowModel().rows.forEach(a=>{Fn(s,a.id,o,!0,e)}),s}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=$(()=>[e.getState().rowSelection,e.getCoreRowModel()],(n,t)=>Object.keys(n).length?Sn(e,t):{rows:[],flatRows:[],rowsById:{}},z(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=$(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(n,t)=>Object.keys(n).length?Sn(e,t):{rows:[],flatRows:[],rowsById:{}},z(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=$(()=>[e.getState().rowSelection,e.getSortedRowModel()],(n,t)=>Object.keys(n).length?Sn(e,t):{rows:[],flatRows:[],rowsById:{}},z(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const n=e.getFilteredRowModel().flatRows,{rowSelection:t}=e.getState();let o=!!(n.length&&Object.keys(t).length);return o&&n.some(s=>s.getCanSelect()&&!t[s.id])&&(o=!1),o},e.getIsAllPageRowsSelected=()=>{const n=e.getPaginationRowModel().flatRows.filter(s=>s.getCanSelect()),{rowSelection:t}=e.getState();let o=!!n.length;return o&&n.some(s=>!t[s.id])&&(o=!1),o},e.getIsSomeRowsSelected=()=>{var n;const t=Object.keys((n=e.getState().rowSelection)!=null?n:{}).length;return t>0&&t<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const n=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:n.filter(t=>t.getCanSelect()).some(t=>t.getIsSelected()||t.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>n=>{e.toggleAllRowsSelected(n.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>n=>{e.toggleAllPageRowsSelected(n.target.checked)}},createRow:(e,n)=>{e.toggleSelected=(t,o)=>{const s=e.getIsSelected();n.setRowSelection(a=>{var i;if(t=typeof t<"u"?t:!s,e.getCanSelect()&&s===t)return a;const l={...a};return Fn(l,e.id,t,(i=o==null?void 0:o.selectChildren)!=null?i:!0,n),l})},e.getIsSelected=()=>{const{rowSelection:t}=n.getState();return yo(e,t)},e.getIsSomeSelected=()=>{const{rowSelection:t}=n.getState();return An(e,t)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:t}=n.getState();return An(e,t)==="all"},e.getCanSelect=()=>{var t;return typeof n.options.enableRowSelection=="function"?n.options.enableRowSelection(e):(t=n.options.enableRowSelection)!=null?t:!0},e.getCanSelectSubRows=()=>{var t;return typeof n.options.enableSubRowSelection=="function"?n.options.enableSubRowSelection(e):(t=n.options.enableSubRowSelection)!=null?t:!0},e.getCanMultiSelect=()=>{var t;return typeof n.options.enableMultiRowSelection=="function"?n.options.enableMultiRowSelection(e):(t=n.options.enableMultiRowSelection)!=null?t:!0},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return o=>{var s;t&&e.toggleSelected((s=o.target)==null?void 0:s.checked)}}}},Fn=(e,n,t,o,s)=>{var a;const i=s.getRow(n,!0);t?(i.getCanMultiSelect()||Object.keys(e).forEach(l=>delete e[l]),i.getCanSelect()&&(e[n]=!0)):delete e[n],o&&(a=i.subRows)!=null&&a.length&&i.getCanSelectSubRows()&&i.subRows.forEach(l=>Fn(e,l.id,t,o,s))};function Sn(e,n){const t=e.getState().rowSelection,o=[],s={},a=function(i,l){return i.map(c=>{var d;const g=yo(c,t);if(g&&(o.push(c),s[c.id]=c),(d=c.subRows)!=null&&d.length&&(c={...c,subRows:a(c.subRows)}),g)return c}).filter(Boolean)};return{rows:a(n.rows),flatRows:o,rowsById:s}}function yo(e,n){var t;return(t=n[e.id])!=null?t:!1}function An(e,n,t){var o;if(!((o=e.subRows)!=null&&o.length))return!1;let s=!0,a=!1;return e.subRows.forEach(i=>{if(!(a&&!s)&&(i.getCanSelect()&&(yo(i,n)?a=!0:s=!1),i.subRows&&i.subRows.length)){const l=An(i,n);l==="all"?a=!0:(l==="some"&&(a=!0),s=!1)}}),s?"all":a?"some":!1}const En=/([0-9]+)/gm,uu=(e,n,t)=>_a(Ze(e.getValue(t)).toLowerCase(),Ze(n.getValue(t)).toLowerCase()),mu=(e,n,t)=>_a(Ze(e.getValue(t)),Ze(n.getValue(t))),fu=(e,n,t)=>No(Ze(e.getValue(t)).toLowerCase(),Ze(n.getValue(t)).toLowerCase()),gu=(e,n,t)=>No(Ze(e.getValue(t)),Ze(n.getValue(t))),pu=(e,n,t)=>{const o=e.getValue(t),s=n.getValue(t);return o>s?1:o<s?-1:0},hu=(e,n,t)=>No(e.getValue(t),n.getValue(t));function No(e,n){return e===n?0:e>n?1:-1}function Ze(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function _a(e,n){const t=e.split(En).filter(Boolean),o=n.split(En).filter(Boolean);for(;t.length&&o.length;){const s=t.shift(),a=o.shift(),i=parseInt(s,10),l=parseInt(a,10),c=[i,l].sort();if(isNaN(c[0])){if(s>a)return 1;if(a>s)return-1;continue}if(isNaN(c[1]))return isNaN(i)?-1:1;if(i>l)return 1;if(l>i)return-1}return t.length-o.length}const Nt={alphanumeric:uu,alphanumericCaseSensitive:mu,text:fu,textCaseSensitive:gu,datetime:pu,basic:hu},xu={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Le("sorting",e),isMultiSortEvent:n=>n.shiftKey}),createColumn:(e,n)=>{e.getAutoSortingFn=()=>{const t=n.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const s of t){const a=s==null?void 0:s.getValue(e.id);if(Object.prototype.toString.call(a)==="[object Date]")return Nt.datetime;if(typeof a=="string"&&(o=!0,a.split(En).length>1))return Nt.alphanumeric}return o?Nt.text:Nt.basic},e.getAutoSortDir=()=>{const t=n.getFilteredRowModel().flatRows[0];return typeof(t==null?void 0:t.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var t,o;if(!e)throw new Error;return mn(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(t=(o=n.options.sortingFns)==null?void 0:o[e.columnDef.sortingFn])!=null?t:Nt[e.columnDef.sortingFn]},e.toggleSorting=(t,o)=>{const s=e.getNextSortingOrder(),a=typeof t<"u"&&t!==null;n.setSorting(i=>{const l=i==null?void 0:i.find(m=>m.id===e.id),c=i==null?void 0:i.findIndex(m=>m.id===e.id);let d=[],g,u=a?t:s==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&o?l?g="toggle":g="add":i!=null&&i.length&&c!==i.length-1?g="replace":l?g="toggle":g="replace",g==="toggle"&&(a||s||(g="remove")),g==="add"){var f;d=[...i,{id:e.id,desc:u}],d.splice(0,d.length-((f=n.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else g==="toggle"?d=i.map(m=>m.id===e.id?{...m,desc:u}:m):g==="remove"?d=i.filter(m=>m.id!==e.id):d=[{id:e.id,desc:u}];return d})},e.getFirstSortDir=()=>{var t,o;return((t=(o=e.columnDef.sortDescFirst)!=null?o:n.options.sortDescFirst)!=null?t:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=t=>{var o,s;const a=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==a&&((o=n.options.enableSortingRemoval)==null||o)&&(!(t&&(s=n.options.enableMultiRemove)!=null)||s)?!1:i==="desc"?"asc":"desc":a},e.getCanSort=()=>{var t,o;return((t=e.columnDef.enableSorting)!=null?t:!0)&&((o=n.options.enableSorting)!=null?o:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var t,o;return(t=(o=e.columnDef.enableMultiSort)!=null?o:n.options.enableMultiSort)!=null?t:!!e.accessorFn},e.getIsSorted=()=>{var t;const o=(t=n.getState().sorting)==null?void 0:t.find(s=>s.id===e.id);return o?o.desc?"desc":"asc":!1},e.getSortIndex=()=>{var t,o;return(t=(o=n.getState().sorting)==null?void 0:o.findIndex(s=>s.id===e.id))!=null?t:-1},e.clearSorting=()=>{n.setSorting(t=>t!=null&&t.length?t.filter(o=>o.id!==e.id):[])},e.getToggleSortingHandler=()=>{const t=e.getCanSort();return o=>{t&&(o.persist==null||o.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?n.options.isMultiSortEvent==null?void 0:n.options.isMultiSortEvent(o):!1))}}},createTable:e=>{e.setSorting=n=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(n),e.resetSorting=n=>{var t,o;e.setSorting(n?[]:(t=(o=e.initialState)==null?void 0:o.sorting)!=null?t:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},vu=[$c,ru,Qc,eu,zc,Bc,su,au,xu,Zc,iu,lu,du,cu,nu];function bu(e){var n,t;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const o=[...vu,...(n=e._features)!=null?n:[]];let s={_features:o};const a=s._features.reduce((f,m)=>Object.assign(f,m.getDefaultOptions==null?void 0:m.getDefaultOptions(s)),{}),i=f=>s.options.mergeOptions?s.options.mergeOptions(a,f):{...a,...f};let c={...{},...(t=e.initialState)!=null?t:{}};s._features.forEach(f=>{var m;c=(m=f.getInitialState==null?void 0:f.getInitialState(c))!=null?m:c});const d=[];let g=!1;const u={_features:o,options:{...a,...e},initialState:c,_queue:f=>{d.push(f),g||(g=!0,Promise.resolve().then(()=>{for(;d.length;)d.shift()();g=!1}).catch(m=>setTimeout(()=>{throw m})))},reset:()=>{s.setState(s.initialState)},setOptions:f=>{const m=Ke(f,s.options);s.options=i(m)},getState:()=>s.options.state,setState:f=>{s.options.onStateChange==null||s.options.onStateChange(f)},_getRowId:(f,m,p)=>{var h;return(h=s.options.getRowId==null?void 0:s.options.getRowId(f,m,p))!=null?h:`${p?[p.id,m].join("."):m}`},getCoreRowModel:()=>(s._getCoreRowModel||(s._getCoreRowModel=s.options.getCoreRowModel(s)),s._getCoreRowModel()),getRowModel:()=>s.getPaginationRowModel(),getRow:(f,m)=>{let p=(m?s.getPrePaginationRowModel():s.getRowModel()).rowsById[f];if(!p&&(p=s.getCoreRowModel().rowsById[f],!p))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${f}`):new Error;return p},_getDefaultColumnDef:$(()=>[s.options.defaultColumn],f=>{var m;return f=(m=f)!=null?m:{},{header:p=>{const h=p.header.column.columnDef;return h.accessorKey?h.accessorKey:h.accessorFn?h.id:null},cell:p=>{var h,w;return(h=(w=p.renderValue())==null||w.toString==null?void 0:w.toString())!=null?h:null},...s._features.reduce((p,h)=>Object.assign(p,h.getDefaultColumnDef==null?void 0:h.getDefaultColumnDef()),{}),...f}},z(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>s.options.columns,getAllColumns:$(()=>[s._getColumnDefs()],f=>{const m=function(p,h,w){return w===void 0&&(w=0),p.map(b=>{const y=Vc(s,b,w,h),N=b;return y.columns=N.columns?m(N.columns,y,w+1):[],y})};return m(f)},z(e,"debugColumns","getAllColumns")),getAllFlatColumns:$(()=>[s.getAllColumns()],f=>f.flatMap(m=>m.getFlatColumns()),z(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:$(()=>[s.getAllFlatColumns()],f=>f.reduce((m,p)=>(m[p.id]=p,m),{}),z(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:$(()=>[s.getAllColumns(),s._getOrderColumnsFn()],(f,m)=>{let p=f.flatMap(h=>h.getLeafColumns());return m(p)},z(e,"debugColumns","getAllLeafColumns")),getColumn:f=>{const m=s._getAllFlatColumnsById()[f];return process.env.NODE_ENV!=="production"&&!m&&console.error(`[Table] Column with id '${f}' does not exist.`),m}};Object.assign(s,u);for(let f=0;f<s._features.length;f++){const m=s._features[f];m==null||m.createTable==null||m.createTable(s)}return s}function wu(){return e=>$(()=>[e.options.data],n=>{const t={rows:[],flatRows:[],rowsById:{}},o=function(s,a,i){a===void 0&&(a=0);const l=[];for(let d=0;d<s.length;d++){const g=bo(e,e._getRowId(s[d],d,i),s[d],d,a,void 0,i==null?void 0:i.id);if(t.flatRows.push(g),t.rowsById[g.id]=g,l.push(g),e.options.getSubRows){var c;g.originalSubRows=e.options.getSubRows(s[d],d),(c=g.originalSubRows)!=null&&c.length&&(g.subRows=o(g.originalSubRows,a+1,g))}}return l};return t.rows=o(n),t},z(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function yu(e){const n=[],t=o=>{var s;n.push(o),(s=o.subRows)!=null&&s.length&&o.getIsExpanded()&&o.subRows.forEach(t)};return e.rows.forEach(t),{rows:n,flatRows:e.flatRows,rowsById:e.rowsById}}function Nu(e,n,t){return t.options.filterFromLeafRows?Cu(e,n,t):ju(e,n,t)}function Cu(e,n,t){var o;const s=[],a={},i=(o=t.options.maxLeafRowFilterDepth)!=null?o:100,l=function(c,d){d===void 0&&(d=0);const g=[];for(let f=0;f<c.length;f++){var u;let m=c[f];const p=bo(t,m.id,m.original,m.index,m.depth,void 0,m.parentId);if(p.columnFilters=m.columnFilters,(u=m.subRows)!=null&&u.length&&d<i){if(p.subRows=l(m.subRows,d+1),m=p,n(m)&&!p.subRows.length){g.push(m),a[m.id]=m,s.push(m);continue}if(n(m)||p.subRows.length){g.push(m),a[m.id]=m,s.push(m);continue}}else m=p,n(m)&&(g.push(m),a[m.id]=m,s.push(m))}return g};return{rows:l(e),flatRows:s,rowsById:a}}function ju(e,n,t){var o;const s=[],a={},i=(o=t.options.maxLeafRowFilterDepth)!=null?o:100,l=function(c,d){d===void 0&&(d=0);const g=[];for(let f=0;f<c.length;f++){let m=c[f];if(n(m)){var u;if((u=m.subRows)!=null&&u.length&&d<i){const h=bo(t,m.id,m.original,m.index,m.depth,void 0,m.parentId);h.subRows=l(m.subRows,d+1),m=h}g.push(m),s.push(m),a[m.id]=m}}return g};return{rows:l(e),flatRows:s,rowsById:a}}function Su(){return e=>$(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(n,t,o)=>{if(!n.rows.length||!(t!=null&&t.length)&&!o){for(let f=0;f<n.flatRows.length;f++)n.flatRows[f].columnFilters={},n.flatRows[f].columnFiltersMeta={};return n}const s=[],a=[];(t??[]).forEach(f=>{var m;const p=e.getColumn(f.id);if(!p)return;const h=p.getFilterFn();if(!h){process.env.NODE_ENV!=="production"&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${p.id}.`);return}s.push({id:f.id,filterFn:h,resolvedValue:(m=h.resolveFilterValue==null?void 0:h.resolveFilterValue(f.value))!=null?m:f.value})});const i=(t??[]).map(f=>f.id),l=e.getGlobalFilterFn(),c=e.getAllLeafColumns().filter(f=>f.getCanGlobalFilter());o&&l&&c.length&&(i.push("__global__"),c.forEach(f=>{var m;a.push({id:f.id,filterFn:l,resolvedValue:(m=l.resolveFilterValue==null?void 0:l.resolveFilterValue(o))!=null?m:o})}));let d,g;for(let f=0;f<n.flatRows.length;f++){const m=n.flatRows[f];if(m.columnFilters={},s.length)for(let p=0;p<s.length;p++){d=s[p];const h=d.id;m.columnFilters[h]=d.filterFn(m,h,d.resolvedValue,w=>{m.columnFiltersMeta[h]=w})}if(a.length){for(let p=0;p<a.length;p++){g=a[p];const h=g.id;if(g.filterFn(m,h,g.resolvedValue,w=>{m.columnFiltersMeta[h]=w})){m.columnFilters.__global__=!0;break}}m.columnFilters.__global__!==!0&&(m.columnFilters.__global__=!1)}}const u=f=>{for(let m=0;m<i.length;m++)if(f.columnFilters[i[m]]===!1)return!1;return!0};return Nu(n.rows,u,e)},z(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function ku(e){return n=>$(()=>[n.getState().pagination,n.getPrePaginationRowModel(),n.options.paginateExpandedRows?void 0:n.getState().expanded],(t,o)=>{if(!o.rows.length)return o;const{pageSize:s,pageIndex:a}=t;let{rows:i,flatRows:l,rowsById:c}=o;const d=s*a,g=d+s;i=i.slice(d,g);let u;n.options.paginateExpandedRows?u={rows:i,flatRows:l,rowsById:c}:u=yu({rows:i,flatRows:l,rowsById:c}),u.flatRows=[];const f=m=>{u.flatRows.push(m),m.subRows.length&&m.subRows.forEach(f)};return u.rows.forEach(f),u},z(n.options,"debugTable","getPaginationRowModel"))}function Ru(){return e=>$(()=>[e.getState().sorting,e.getPreSortedRowModel()],(n,t)=>{if(!t.rows.length||!(n!=null&&n.length))return t;const o=e.getState().sorting,s=[],a=o.filter(c=>{var d;return(d=e.getColumn(c.id))==null?void 0:d.getCanSort()}),i={};a.forEach(c=>{const d=e.getColumn(c.id);d&&(i[c.id]={sortUndefined:d.columnDef.sortUndefined,invertSorting:d.columnDef.invertSorting,sortingFn:d.getSortingFn()})});const l=c=>{const d=c.map(g=>({...g}));return d.sort((g,u)=>{for(let m=0;m<a.length;m+=1){var f;const p=a[m],h=i[p.id],w=h.sortUndefined,b=(f=p==null?void 0:p.desc)!=null?f:!1;let y=0;if(w){const N=g.getValue(p.id),R=u.getValue(p.id),_=N===void 0,S=R===void 0;if(_||S){if(w==="first")return _?-1:1;if(w==="last")return _?1:-1;y=_&&S?0:_?w:-w}}if(y===0&&(y=h.sortingFn(g,u,p.id)),y!==0)return b&&(y*=-1),h.invertSorting&&(y*=-1),y}return g.index-u.index}),d.forEach(g=>{var u;s.push(g),(u=g.subRows)!=null&&u.length&&(g.subRows=l(g.subRows))}),d};return{rows:l(t.rows),flatRows:s,rowsById:t.rowsById}},z(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
|
|
25
25
|
* react-table
|
|
26
26
|
*
|
|
27
27
|
* Copyright (c) TanStack
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
* LICENSE.md file in the root directory of this source tree.
|
|
31
31
|
*
|
|
32
32
|
* @license MIT
|
|
33
|
-
*/function
|
|
34
|
-
`),
|
|
35
|
-
`).map(g=>[{type:"plain",value:g}])}},[l,t]),d=async()=>{try{await navigator.clipboard.writeText(l),i(!0),setTimeout(()=>i(!1),2e3)}catch{}};return o.jsxs("div",{className:x("relative group",s),children:[r&&o.jsx("button",{type:"button",onClick:d,className:"absolute top-3 right-3 z-10 p-1.5 rounded-md bg-white/10 backdrop-blur text-white/60 hover:text-white opacity-0 group-hover:opacity-100 transition-opacity text-xs","aria-label":"Copy code",children:a?o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("polyline",{points:"20 6 9 17 4 12"})}):o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2"}),o.jsx("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})]})}),o.jsx("pre",{className:"overflow-x-auto rounded-lg p-4 text-[13px] leading-relaxed font-mono",style:{background:"var(--cb-bg, #1e1e2e)",color:"var(--cb-plain, #d4d4d4)"},children:c.map((g,u)=>o.jsxs("div",{children:[n&&o.jsx("span",{className:"inline-block w-8 select-none text-right mr-4 opacity-40",style:{color:"var(--cb-plain, #d4d4d4)"},children:u+1}),g.map((f,m)=>o.jsx("span",{style:{color:Fu[f.type]},children:f.value},m))]},u))})]})}const Ra=Fe("font-bold tracking-tight",{variants:{level:{1:"text-2xl lg:text-3xl",2:"text-xl lg:text-2xl",3:"text-lg lg:text-xl",4:"text-base lg:text-lg",5:"text-sm lg:text-base",6:"text-xs lg:text-sm"}},defaultVariants:{level:2}});function Eu({className:e,level:t=2,as:n,children:r,...s}){const a=n||`h${t}`;return o.jsx(a,{className:x(Ra({level:t}),e),...s,children:r})}const _a=Fe("",{variants:{size:{xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},variant:{default:"text-foreground",muted:"text-muted-foreground",primary:"text-primary",destructive:"text-destructive",success:"text-green-600 dark:text-green-400"},leading:{tight:"leading-tight",normal:"leading-normal",relaxed:"leading-relaxed"}},defaultVariants:{size:"base",weight:"normal",variant:"default",leading:"normal"}});function Vu({className:e,size:t,weight:n,variant:r,leading:s,as:a="p",children:i,...l}){return o.jsx(a,{className:x(_a({size:t,weight:n,variant:r,leading:s}),e),...l,children:i})}function $u({className:e,...t}){return o.jsx("code",{className:x("relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm",e),...t})}function zu({className:e,...t}){return o.jsx("blockquote",{className:x("border-l-4 border-primary pl-4 italic text-muted-foreground",e),...t})}function Bu({className:e,...t}){return o.jsx("p",{className:x("text-xl text-muted-foreground",e),...t})}function Ou({className:e,...t}){return o.jsx("p",{className:x("text-sm text-muted-foreground",e),...t})}const Ma=w.forwardRef(({className:e,children:t,...n},r)=>o.jsx("div",{ref:r,className:x("w-full h-full min-h-[300px]",e),...n,children:o.jsx(Vn.ResponsiveContainer,{width:"100%",height:"100%",children:t})}));Ma.displayName="ChartContainer";const Hu=Vn.Tooltip,Gu=Vn.Legend,Ia=w.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("flex flex-col space-y-4",e),...t}));Ia.displayName="Timeline";const Pa=w.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("relative flex gap-4 pb-4 last:pb-0",e),...t}));Pa.displayName="TimelineItem";const La=w.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("relative z-10 flex h-8 w-8 shrink-0 items-center justify-center rounded-full border bg-background text-primary shadow-sm",e),...t}));La.displayName="TimelineIcon";const Da=w.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("absolute left-4 top-8 -bottom-4 w-px bg-border",e),...t}));Da.displayName="TimelineConnector";const Ta=w.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("flex-1 space-y-1 pt-1",e),...t}));Ta.displayName="TimelineContent";const Fa=w.forwardRef(({className:e,children:t,...n},r)=>o.jsx("div",{ref:r,className:x("grid min-h-screen w-full lg:grid-cols-[280px_1fr]",e),...n,children:t}));Fa.displayName="AppShell";const Aa=w.forwardRef(({className:e,children:t,...n},r)=>o.jsx("div",{ref:r,className:x("hidden border-r bg-muted/40 lg:block dark:bg-muted/10",e),...n,children:o.jsx("div",{className:"flex h-full max-h-screen flex-col gap-2",children:t})}));Aa.displayName="Sidebar";const Ea=w.forwardRef(({className:e,children:t,...n},r)=>o.jsx("header",{ref:r,className:x("flex h-14 items-center gap-4 border-b bg-background px-6 lg:h-[60px]",e),...n,children:t}));Ea.displayName="Header";const Va=w.forwardRef(({className:e,children:t,...n},r)=>o.jsx("main",{ref:r,className:x("flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6",e),...n,children:t}));Va.displayName="Main";function qu({title:e,value:t,description:n,trend:r,trendLabel:s,icon:a,className:i,...l}){return o.jsxs(Wn,{className:x("overflow-hidden",i),...l,children:[o.jsxs(Un,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[o.jsx(Yn,{className:"text-sm font-medium text-muted-foreground",children:e}),a&&o.jsx("div",{className:"text-muted-foreground",children:a})]}),o.jsxs(Xn,{children:[o.jsx("div",{className:"text-2xl font-bold",children:t}),(n||r!==void 0)&&o.jsxs("div",{className:"text-xs flex items-center gap-1 mt-1 text-muted-foreground",children:[r!==void 0&&o.jsxs("span",{className:x("flex items-center font-medium",r>0?"text-green-500":r<0?"text-red-500":"text-muted-foreground"),children:[r>0?o.jsx(A.TrendingUp,{className:"mr-1 h-3 w-3"}):r<0?o.jsx(A.TrendingDown,{className:"mr-1 h-3 w-3"}):o.jsx(A.Minus,{className:"mr-1 h-3 w-3"}),r>0?"+":"",r,"%"]}),s&&o.jsx("span",{children:s}),n&&!r&&o.jsx("span",{children:n})]})]})]})}const $a=w.forwardRef(({className:e,label:t,value:n,...r},s)=>{const[a,i]=w.useState(!1),l=()=>{navigator.clipboard.writeText(n),i(!0),setTimeout(()=>i(!1),2e3)};return o.jsxs("div",{className:"space-y-2",children:[t&&o.jsx(an,{children:t}),o.jsxs("div",{className:"flex gap-2 relative",children:[o.jsx(Je,{ref:s,value:n,readOnly:!0,className:x("pr-10 font-mono text-sm",e),...r}),o.jsx(ge,{size:"icon",variant:"outline",className:"shrink-0",onClick:l,children:a?o.jsx(A.Check,{className:"h-4 w-4 text-green-500"}):o.jsx(A.Copy,{className:"h-4 w-4"})})]})]})});$a.displayName="CopyInput";const za=w.forwardRef(({className:e,data:t,...n},r)=>o.jsx("pre",{ref:r,className:x("rounded-lg border bg-muted p-4 overflow-auto text-xs font-mono text-muted-foreground",e),...n,children:JSON.stringify(t,null,2)}));za.displayName="JsonViewer";const Wu=Fe("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{status:{neutral:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",success:"border-transparent bg-green-500/15 text-green-700 dark:text-green-400 hover:bg-green-500/25",warning:"border-transparent bg-yellow-500/15 text-yellow-700 dark:text-yellow-400 hover:bg-yellow-500/25",error:"border-transparent bg-red-500/15 text-red-700 dark:text-red-400 hover:bg-red-500/25",info:"border-transparent bg-blue-500/15 text-blue-700 dark:text-blue-400 hover:bg-blue-500/25"}},defaultVariants:{status:"neutral"}});function Uu({className:e,status:t,dot:n=!0,children:r,...s}){return o.jsxs("div",{className:x(Wu({status:t}),e),...s,children:[n&&o.jsx("span",{className:x("mr-1.5 h-2 w-2 rounded-full",{"bg-current":!0})}),r]})}function Yu({className:e}){const{setTheme:t}=ln();return o.jsxs(os,{children:[o.jsx(ss,{asChild:!0,children:o.jsxs(ge,{variant:"outline",size:"icon",className:e,children:[o.jsx(A.Sun,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),o.jsx(A.Moon,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),o.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),o.jsxs(dr,{align:"end",children:[o.jsxs(kt,{onClick:()=>t("light"),children:[o.jsx(A.Sun,{className:"mr-2 h-4 w-4"}),"Light"]}),o.jsxs(kt,{onClick:()=>t("dark"),children:[o.jsx(A.Moon,{className:"mr-2 h-4 w-4"}),"Dark"]}),o.jsxs(kt,{onClick:()=>t("system"),children:[o.jsx(A.Monitor,{className:"mr-2 h-4 w-4"}),"System"]})]})]})}const Xu=[{value:"light",icon:A.Sun,label:"Light"},{value:"dark",icon:A.Moon,label:"Dark"},{value:"system",icon:A.Monitor,label:"System"}];function Ku({className:e}){const{theme:t,setTheme:n,themes:r}=ln();return o.jsx("div",{className:x("inline-flex items-center rounded-lg border border-border bg-muted/50 p-0.5 gap-0.5",e),role:"radiogroup","aria-label":"Color theme",children:Xu.filter(s=>r.includes(s.value)).map(({value:s,icon:a,label:i})=>o.jsxs("button",{role:"radio","aria-checked":t===s,"aria-label":i,onClick:()=>n(s),className:x("inline-flex items-center justify-center rounded-md px-2.5 py-1.5 text-sm font-medium transition-all","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t===s?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-background/50"),children:[o.jsx(a,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:i})]},s))})}const Tt={chatInput_placeholder:"Type a message...",chatInput_attachFile:"Attach file",chatInput_stopGenerating:"Stop generating",chatInput_sendMessage:"Send message",conversationList_newChat:"New Chat",conversationList_searchPlaceholder:"Search conversations...",conversationList_noResults:"No conversations found",conversationList_empty:"No conversations yet",conversationList_today:"Today",conversationList_yesterday:"Yesterday",conversationList_previous7Days:"Previous 7 days",conversationList_older:"Older",conversationList_rename:"Rename",conversationList_delete:"Delete",chatHeader_online:"Online",chatHeader_offline:"Offline",chatHeader_typing:"Typing...",chatHeader_back:"Back",chatHeader_clearConversation:"Clear conversation",chatHeader_settings:"Settings",reasoning_title:"Reasoning",reasoning_thinking:"Thinking",reasoning_thoughtFor:"Thought for {duration}",toolCall_calling:"Calling {name}...",toolCall_failed:"{name} — failed",toolCall_arguments:"Arguments",toolCall_result:"Result",toolCall_error:"Error",messageActions_copy:"Copy",messageActions_retry:"Retry",messageActions_edit:"Edit",messageActions_like:"Like",messageActions_dislike:"Dislike",messageActions_share:"Share",messageActions_copied:"Copied!",followUp_freeTextPlaceholder:"Or type your answer...",followUp_send:"Send",sourceCitation_sources:"Sources",aiLoading_thinking:"Thinking",filePreview_remove:"Remove {name}",modelSelector_placeholder:"Select model",modelSelector_searchPlaceholder:"Search models...",modelSelector_noResults:"No models found"},Ba={chatInput_placeholder:"Введите сообщение...",chatInput_attachFile:"Прикрепить файл",chatInput_stopGenerating:"Остановить генерацию",chatInput_sendMessage:"Отправить сообщение",conversationList_newChat:"Новый чат",conversationList_searchPlaceholder:"Поиск диалогов...",conversationList_noResults:"Диалоги не найдены",conversationList_empty:"Нет диалогов",conversationList_today:"Сегодня",conversationList_yesterday:"Вчера",conversationList_previous7Days:"Последние 7 дней",conversationList_older:"Ранее",conversationList_rename:"Переименовать",conversationList_delete:"Удалить",chatHeader_online:"Онлайн",chatHeader_offline:"Не в сети",chatHeader_typing:"Печатает...",chatHeader_back:"Назад",chatHeader_clearConversation:"Очистить диалог",chatHeader_settings:"Настройки",reasoning_title:"Рассуждение",reasoning_thinking:"Думаю",reasoning_thoughtFor:"Думал {duration}",toolCall_calling:"Вызываю {name}...",toolCall_failed:"{name} — ошибка",toolCall_arguments:"Аргументы",toolCall_result:"Результат",toolCall_error:"Ошибка",messageActions_copy:"Копировать",messageActions_retry:"Повторить",messageActions_edit:"Редактировать",messageActions_like:"Нравится",messageActions_dislike:"Не нравится",messageActions_share:"Поделиться",messageActions_copied:"Скопировано!",followUp_freeTextPlaceholder:"Или введите свой ответ...",followUp_send:"Отправить",sourceCitation_sources:"Источники",aiLoading_thinking:"Думаю",filePreview_remove:"Удалить {name}",modelSelector_placeholder:"Выберите модель",modelSelector_searchPlaceholder:"Поиск моделей...",modelSelector_noResults:"Модели не найдены"},Zu={en:Tt,ru:Ba},Oa=w.createContext(Tt);function Ju({locale:e="en",children:t}){const n=w.useMemo(()=>typeof e=="string"?Zu[e]??Tt:{...Tt,...e},[e]);return o.jsx(Oa.Provider,{value:n,children:t})}function Re(){return w.useContext(Oa)}function Ze(e,t){let n=e;for(const[r,s]of Object.entries(t))n=n.replace(`{${r}}`,String(s));return n}const Ha=w.forwardRef(({className:e,variant:t="received",children:n,...r},s)=>o.jsx("div",{ref:s,className:x("group flex gap-2 max-w-[85%]",t==="sent"?"ml-auto flex-row-reverse":"mr-auto",e),"data-variant":t,...r,children:n}));Ha.displayName="ChatBubble";const Ga=w.forwardRef(({className:e,src:t,fallback:n,...r},s)=>o.jsx("div",{ref:s,className:x("flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-medium text-muted-foreground overflow-hidden",e),...r,children:t?o.jsx("img",{src:t,alt:n??"avatar",className:"h-full w-full object-cover"}):o.jsx("span",{children:n??"?"})}));Ga.displayName="ChatBubbleAvatar";const Qu={sending:o.jsxs("svg",{className:"h-3 w-3 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("circle",{cx:"12",cy:"12",r:"10"}),o.jsx("path",{d:"M12 6v6l4 2"})]}),sent:o.jsx("svg",{className:"h-3 w-3 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M20 6 9 17l-5-5"})}),delivered:o.jsxs("svg",{className:"h-3 w-3 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M18 6 7 17l-5-5"}),o.jsx("path",{d:"m22 10-9.5 9.5-2-2"})]}),read:o.jsxs("svg",{className:"h-3 w-3 text-primary",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M18 6 7 17l-5-5"}),o.jsx("path",{d:"m22 10-9.5 9.5-2-2"})]}),error:o.jsxs("svg",{className:"h-3 w-3 text-destructive",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("circle",{cx:"12",cy:"12",r:"10"}),o.jsx("path",{d:"m15 9-6 6"}),o.jsx("path",{d:"m9 9 6 6"})]})},qa=w.forwardRef(({className:e,variant:t="received",isLoading:n,status:r,children:s,...a},i)=>o.jsx("div",{ref:i,className:x("rounded-2xl px-4 py-2.5 text-sm leading-relaxed",t==="sent"?"bg-primary text-primary-foreground rounded-br-md":"bg-muted text-foreground rounded-bl-md",e),...a,children:n?o.jsxs("div",{className:"flex items-center gap-1 py-1",children:[o.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:0ms]"}),o.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:150ms]"}),o.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:300ms]"})]}):o.jsxs(o.Fragment,{children:[s,r&&o.jsx("div",{className:"flex justify-end mt-1",children:Qu[r]})]})}));qa.displayName="ChatBubbleMessage";const Wa=w.forwardRef(({className:e,...t},n)=>o.jsx("span",{ref:n,className:x("text-[10px] text-muted-foreground mt-1 px-1",e),...t}));Wa.displayName="ChatBubbleTimestamp";const Ua=w.forwardRef(({visibility:e="hover",className:t,children:n,...r},s)=>o.jsx("div",{ref:s,className:x("flex items-center gap-0.5 mt-0.5",e==="hover"&&"opacity-0 group-hover:opacity-100 transition-opacity",t),...r,children:n}));Ua.displayName="ChatBubbleActions";const Ya=w.forwardRef(({onSend:e,placeholder:t,disabled:n,isLoading:r,showAttach:s,onAttach:a,acceptFiles:i="*",onStop:l,value:c,onChange:d,headerSlot:g,footerSlot:u,maxLength:f,className:m},p)=>{const v=Re(),b=w.useRef(null),h=w.useRef(null),[y,C]=w.useState(""),S=c!==void 0,L=S?c:y,D=R=>{S?d==null||d(R):C(R)},k=()=>{const R=b.current;R&&(R.style.height="auto",R.style.height=Math.min(R.scrollHeight,160)+"px")},N=()=>{const R=L.trim();!R||n||r||(e==null||e(R),D(""),b.current&&(b.current.style.height="auto"))},T=R=>{R.key==="Enter"&&!R.shiftKey&&(R.preventDefault(),N())},G=()=>{var R;(R=h.current)==null||R.click()},E=R=>{R.target.files&&R.target.files.length>0&&(a==null||a(R.target.files)),R.target.value=""},Z=L.length,J=f?Z>f:!1;return o.jsxs("div",{ref:p,className:x("rounded-xl border border-border bg-background",m),children:[g&&o.jsx("div",{className:"px-3 pt-2 pb-1 border-b border-border/40",children:g}),o.jsxs("div",{className:"flex items-end gap-2 p-2",children:[s&&o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button",onClick:G,className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted transition-colors","aria-label":v.chatInput_attachFile,disabled:n,children:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"})})}),o.jsx("input",{ref:h,type:"file",multiple:!0,accept:i,onChange:E,className:"hidden","aria-hidden":"true"})]}),o.jsx("textarea",{ref:b,value:L,onChange:R=>{D(R.target.value),k()},onKeyDown:T,placeholder:t??v.chatInput_placeholder,disabled:n||r,rows:1,className:"flex-1 resize-none bg-transparent text-sm outline-none placeholder:text-muted-foreground min-h-[36px] py-2 px-2 max-h-40"}),r&&l?o.jsx("button",{type:"button",onClick:l,className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-destructive/10 text-destructive hover:bg-destructive/20 transition-colors","aria-label":v.chatInput_stopGenerating,children:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:o.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})})}):o.jsx("button",{type:"button",onClick:N,disabled:n||r||!L.trim()||J,className:x("flex h-9 w-9 shrink-0 items-center justify-center rounded-lg transition-colors",L.trim()&&!n&&!r&&!J?"bg-primary text-primary-foreground hover:bg-primary/90":"bg-muted text-muted-foreground cursor-not-allowed"),"aria-label":v.chatInput_sendMessage,children:r?o.jsx("svg",{className:"animate-spin",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:o.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}):o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"m5 12 7-7 7 7"}),o.jsx("path",{d:"M12 19V5"})]})})]}),(u||f)&&o.jsxs("div",{className:"px-3 pb-2 pt-0.5 flex items-center gap-2",children:[o.jsx("div",{className:"flex-1",children:u}),f&&o.jsxs("span",{className:x("text-[10px] tabular-nums shrink-0",J?"text-destructive font-medium":"text-muted-foreground"),children:[Z,"/",f]})]})]})});Ya.displayName="ChatInput";const Xa=w.forwardRef(({className:e,children:t,...n},r)=>o.jsx("div",{ref:r,className:x("flex flex-col h-full",e),...n,children:t}));Xa.displayName="ChatContainer";const Ka=w.forwardRef(({className:e,children:t,autoScroll:n=!0,...r},s)=>{const a=w.useRef(null),i=w.Children.count(t);return w.useEffect(()=>{n&&a.current&&a.current.scrollIntoView({behavior:"smooth"})},[i,n]),o.jsx(er,{className:"flex-1",orientation:"vertical",children:o.jsxs("div",{ref:s,className:x("flex flex-col gap-4 p-4",e),...r,children:[t,o.jsx("div",{ref:a})]})})});Ka.displayName="ChatList";const Za=w.forwardRef(({className:e,variant:t="dots",text:n,...r},s)=>{const a=Re(),i=n??a.aiLoading_thinking;return t==="text"?o.jsxs("div",{ref:s,className:x("flex items-center gap-1.5 text-sm text-muted-foreground",e),...r,children:[o.jsx("svg",{className:"animate-spin h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:o.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),o.jsxs("span",{className:"animate-pulse",children:[i,"…"]})]}):o.jsxs("div",{ref:s,className:x("flex items-center gap-1",e),...r,children:[o.jsx("span",{className:"h-2 w-2 rounded-full bg-muted-foreground/60 animate-bounce [animation-delay:0ms]"}),o.jsx("span",{className:"h-2 w-2 rounded-full bg-muted-foreground/60 animate-bounce [animation-delay:150ms]"}),o.jsx("span",{className:"h-2 w-2 rounded-full bg-muted-foreground/60 animate-bounce [animation-delay:300ms]"})]})});Za.displayName="AILoading";function rt(e){const t=[],n=/(`[^`]+`)|(\~\~[^~]+\~\~)|(\*\*[^*]+\*\*)|(\*[^*]+\*)|(!\[[^\]]*\]\([^)]+\))|(\[[^\]]+\]\([^)]+\))/g;let r=0,s;for(;(s=n.exec(e))!==null;){s.index>r&&t.push(e.slice(r,s.index));const a=s[0];if(a.startsWith("`"))t.push(o.jsx("code",{className:"px-1 py-0.5 rounded bg-muted text-sm font-mono",children:a.slice(1,-1)},s.index));else if(a.startsWith("~~"))t.push(o.jsx("del",{className:"text-muted-foreground",children:a.slice(2,-2)},s.index));else if(a.startsWith("**"))t.push(o.jsx("strong",{children:a.slice(2,-2)},s.index));else if(a.startsWith("*"))t.push(o.jsx("em",{children:a.slice(1,-1)},s.index));else if(a.startsWith("![")){const i=a.indexOf("]"),l=a.slice(2,i),c=a.slice(i+2,-1);t.push(o.jsx("img",{src:c,alt:l,className:"max-w-full rounded-lg my-2 inline-block",loading:"lazy"},s.index))}else if(a.startsWith("[")){const i=a.indexOf("]"),l=a.slice(1,i),c=a.slice(i+2,-1);t.push(o.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline underline-offset-2 hover:text-primary/80",children:l},s.index))}r=s.index+a.length}return r<e.length&&t.push(e.slice(r)),t}function ef(e){const t=e.split(`
|
|
36
|
-
`),
|
|
37
|
-
`)})},s++));continue}const i=a.match(/^(#{1,6})\s+(.*)/);if(i){const l=i[1].length,c=i[2],d=`h${l}`,g={1:"text-2xl font-bold mt-6 mb-3",2:"text-xl font-semibold mt-5 mb-2",3:"text-lg font-semibold mt-4 mb-2",4:"text-base font-semibold mt-3 mb-1",5:"text-sm font-semibold mt-2 mb-1",6:"text-sm font-medium mt-2 mb-1"};n.push(o.jsx(d,{className:g[l],children:rt(c)},s++)),r++;continue}if(/^[\s]*[-*]\s/.test(a)){const l=[];for(;r<t.length&&/^[\s]*[-*]\s/.test(t[r]);)l.push(o.jsx("li",{children:rt(t[r].replace(/^[\s]*[-*]\s/,""))},s++)),r++;n.push(o.jsx("ul",{className:"list-disc pl-5 space-y-1 my-2 text-sm",children:l},s++));continue}if(/^\s*\d+\.\s/.test(a)){const l=[];for(;r<t.length&&/^\s*\d+\.\s/.test(t[r]);)l.push(o.jsx("li",{children:rt(t[r].replace(/^\s*\d+\.\s/,""))},s++)),r++;n.push(o.jsx("ol",{className:"list-decimal pl-5 space-y-1 my-2 text-sm",children:l},s++));continue}if(a.startsWith(">")){const l=[];for(;r<t.length&&t[r].startsWith(">");)l.push(t[r].replace(/^>\s?/,"")),r++;n.push(o.jsx("blockquote",{className:"border-l-4 border-primary/40 pl-4 italic text-muted-foreground my-3 text-sm",children:rt(l.join(" "))},s++));continue}if(a.includes("|")&&r+1<t.length&&/^\s*\|?[\s\-:|]+\|/.test(t[r+1])){const l=[];for(;r<t.length&&t[r].includes("|");)l.push(t[r]),r++;if(l.length>=2){const c=u=>u.split("|").map(f=>f.trim()).filter((f,m,p)=>m>0&&m<p.length),d=c(l[0]),g=l.slice(2).map(c);n.push(o.jsx("div",{className:"overflow-x-auto my-3",children:o.jsxs("table",{className:"w-full text-sm border-collapse",children:[o.jsx("thead",{children:o.jsx("tr",{className:"border-b border-border",children:d.map((u,f)=>o.jsx("th",{className:"px-3 py-2 text-left font-semibold text-foreground",children:rt(u)},f))})}),o.jsx("tbody",{children:g.map((u,f)=>o.jsx("tr",{className:"border-b border-border/50",children:u.map((m,p)=>o.jsx("td",{className:"px-3 py-2 text-muted-foreground",children:rt(m)},p))},f))})]})},s++));continue}}if(/^[-*_]{3,}\s*$/.test(a)){n.push(o.jsx("hr",{className:"my-4 border-border"},s++)),r++;continue}if(a.trim()===""){r++;continue}n.push(o.jsx("p",{className:"text-sm leading-relaxed my-2",children:rt(a)},s++)),r++}return n}const Ja=w.forwardRef(({content:e,streaming:t,className:n,...r},s)=>{const a=t?e:e.trim(),i=w.useMemo(()=>{try{return ef(a)}catch{return[w.createElement("p",{className:"text-sm"},a)]}},[a]);return o.jsx("div",{ref:s,className:x("markdown-renderer",n),...r,children:i})});Ja.displayName="MarkdownRenderer";const Qa=w.forwardRef(({suggestions:e,onSelect:t,columns:n=2,className:r,...s},a)=>{const i={1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"};return o.jsx("div",{ref:a,className:x("grid gap-3",i[n],r),...s,children:e.map((l,c)=>o.jsxs("button",{type:"button",onClick:()=>t==null?void 0:t(l.prompt),className:x("flex flex-col items-start gap-1 rounded-xl border border-border p-4","bg-card text-left transition-colors hover:bg-muted/60 hover:border-primary/30","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"),children:[o.jsx("span",{className:"text-sm font-medium text-foreground",children:l.title}),l.description&&o.jsx("span",{className:"text-xs text-muted-foreground line-clamp-2",children:l.description})]},c))})});Qa.displayName="PromptSuggestions";const ei=w.forwardRef(({models:e,value:t,onChange:n,placeholder:r,compact:s,className:a,...i},l)=>{const c=Re(),[d,g]=w.useState(!1),[u,f]=w.useState(""),m=w.useRef(null),p=w.useRef(null),v=e.find(y=>y.id===t),b=w.useMemo(()=>{if(!u)return e;const y=u.toLowerCase();return e.filter(C=>{var S;return C.name.toLowerCase().includes(y)||((S=C.provider)==null?void 0:S.toLowerCase().includes(y))||C.id.toLowerCase().includes(y)})},[e,u]);w.useEffect(()=>{d&&(f(""),setTimeout(()=>{var y;return(y=p.current)==null?void 0:y.focus()},0))},[d]),w.useEffect(()=>{if(!d)return;const y=C=>{m.current&&!m.current.contains(C.target)&&g(!1)};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[d]);const h=y=>{y.key==="Escape"&&g(!1)};return o.jsxs("div",{ref:m,className:x("relative",a),...i,children:[o.jsxs("button",{ref:l,type:"button",onClick:()=>g(y=>!y),className:x("flex items-center gap-2 rounded-lg border border-border bg-background px-3 py-1.5 text-sm transition-colors hover:bg-muted","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",!v&&"text-muted-foreground"),children:[v?o.jsxs(o.Fragment,{children:[v.icon&&o.jsx("span",{className:"text-base shrink-0",children:v.icon}),o.jsx("span",{className:"font-medium truncate",children:v.name}),!s&&v.provider&&o.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",v.provider,")"]})]}):o.jsx("span",{children:r??c.modelSelector_placeholder}),o.jsx("svg",{className:x("h-3.5 w-3.5 ml-auto shrink-0 text-muted-foreground transition-transform",d&&"rotate-180"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"m6 9 6 6 6-6"})})]}),d&&o.jsxs("div",{className:"absolute z-50 mt-1 w-full min-w-[260px] rounded-xl border border-border bg-popover shadow-lg animate-in fade-in-0 zoom-in-95",onKeyDown:h,children:[o.jsx("div",{className:"p-2 border-b border-border",children:o.jsx("input",{ref:p,value:u,onChange:y=>f(y.target.value),placeholder:c.modelSelector_searchPlaceholder,className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground px-2 py-1"})}),o.jsxs("div",{className:"max-h-[280px] overflow-auto p-1",children:[b.length===0&&o.jsx("div",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:c.modelSelector_noResults}),b.map(y=>o.jsxs("button",{type:"button",disabled:y.disabled,onClick:()=>{n==null||n(y.id),g(!1)},className:x("flex w-full items-start gap-3 rounded-lg px-3 py-2.5 text-left text-sm transition-colors","hover:bg-muted focus-visible:outline-none focus-visible:bg-muted",y.id===t&&"bg-primary/10",y.disabled&&"opacity-50 cursor-not-allowed"),children:[y.icon&&o.jsx("span",{className:"text-lg shrink-0 mt-0.5",children:y.icon}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"font-medium truncate",children:y.name}),y.id===t&&o.jsx("svg",{className:"h-4 w-4 text-primary shrink-0",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M20 6 9 17l-5-5"})})]}),y.provider&&o.jsx("span",{className:"text-xs text-muted-foreground",children:y.provider}),y.description&&o.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 line-clamp-2",children:y.description}),y.badges&&y.badges.length>0&&o.jsx("div",{className:"flex flex-wrap gap-1 mt-1.5",children:y.badges.map(C=>o.jsx("span",{className:"inline-flex items-center rounded-full border border-border px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",children:C},C))})]})]},y.id))]})]})]})});ei.displayName="ModelSelector";const ti=w.forwardRef(({modes:e,value:t,onChange:n,size:r="default",className:s,...a},i)=>o.jsx("div",{ref:i,className:x("inline-flex items-center gap-1 rounded-lg bg-muted/50 p-1",s),role:"radiogroup",...a,children:e.map(l=>{const c=l.id===t;return o.jsxs("button",{type:"button",role:"radio","aria-checked":c,onClick:()=>n==null?void 0:n(l.id),title:l.description,className:x("rounded-md transition-all text-sm font-medium whitespace-nowrap","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",r==="sm"?"px-2.5 py-1 text-xs":"px-3 py-1.5",c?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[l.icon&&o.jsx("span",{className:"mr-1",children:l.icon}),l.label]},l.id)})}));ti.displayName="ChatModeSelector";const ni=w.forwardRef(({question:e,options:t,onSelect:n,selected:r,allowFreeText:s,onFreeTextSubmit:a,columns:i=1,className:l,...c},d)=>{const g=Re(),[u,f]=w.useState(""),m=!!r,p=()=>{const v=u.trim();v&&(a==null||a(v),f(""))};return o.jsxs("div",{ref:d,className:x("rounded-2xl bg-muted text-foreground rounded-bl-md px-4 py-3 max-w-[85%]",l),...c,children:[o.jsx("p",{className:"text-sm leading-relaxed mb-3",children:e}),o.jsx("div",{className:x("grid gap-2",i===2?"grid-cols-1 sm:grid-cols-2":"grid-cols-1"),children:t.map(v=>{const b=v.id===r;return o.jsxs("button",{type:"button",disabled:m,onClick:()=>n==null?void 0:n(v.id,v.label),className:x("flex items-center gap-2 rounded-xl border px-3 py-2 text-left text-sm transition-all","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",b?"border-primary bg-primary/10 text-primary font-medium":m?"border-border/50 text-muted-foreground opacity-50 cursor-default":"border-border bg-background hover:border-primary/40 hover:bg-primary/5 cursor-pointer"),children:[b&&o.jsx("svg",{className:"h-4 w-4 shrink-0 text-primary",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M20 6 9 17l-5-5"})}),!b&&o.jsx("span",{className:x("h-4 w-4 shrink-0 rounded-full border-2",m?"border-border/50":"border-border")}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("span",{className:"block truncate",children:v.label}),v.description&&o.jsx("span",{className:"block text-xs text-muted-foreground mt-0.5 line-clamp-1",children:v.description})]})]},v.id)})}),s&&!m&&o.jsxs("div",{className:"flex gap-2 mt-2",children:[o.jsx("input",{type:"text",value:u,onChange:v=>f(v.target.value),onKeyDown:v=>{v.key==="Enter"&&p()},placeholder:g.followUp_freeTextPlaceholder,className:"flex-1 bg-background rounded-lg border border-border px-3 py-1.5 text-sm outline-none placeholder:text-muted-foreground focus:border-primary/40"}),o.jsx("button",{type:"button",onClick:p,disabled:!u.trim(),className:x("rounded-lg px-3 py-1.5 text-sm font-medium transition-colors",u.trim()?"bg-primary text-primary-foreground hover:bg-primary/90":"bg-muted text-muted-foreground cursor-not-allowed"),children:g.followUp_send})]})]})});ni.displayName="ChatFollowUp";const tf={copy:{path:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2 M9 2h6a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z"},retry:{path:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8 M3 3v5h5"},edit:{path:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"},like:{path:"M7 10v12 M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2h0a3.13 3.13 0 0 1 3 3.88Z"},dislike:{path:"M17 14V2 M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22h0a3.13 3.13 0 0 1-3-3.88Z"},share:{path:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8 M16 6l-4-4-4 4 M12 2v13"}},ri=w.forwardRef(({actions:e=["copy"],content:t,likeState:n,onCopy:r,onRetry:s,onEdit:a,onLike:i,onDislike:l,onShare:c,visibility:d="hover",className:g,...u},f)=>{const m=Re(),[p,v]=w.useState(!1),b={copy:m.messageActions_copy,retry:m.messageActions_retry,edit:m.messageActions_edit,like:m.messageActions_like,dislike:m.messageActions_dislike,share:m.messageActions_share},y={copy:async()=>{if(t)try{await navigator.clipboard.writeText(t),v(!0),setTimeout(()=>v(!1),2e3)}catch{}r==null||r()},retry:s,edit:a,like:i,dislike:l,share:c};return o.jsx("div",{ref:f,className:x("flex items-center gap-0.5",d==="hover"&&"opacity-0 group-hover:opacity-100 transition-opacity",g),...u,children:e.map(C=>{const S=C==="copy"&&p,k=C==="like"&&n==="liked"||C==="dislike"&&n==="disliked";return o.jsx("button",{type:"button",onClick:y[C],"aria-label":b[C],title:S?m.messageActions_copied:b[C],className:x("inline-flex items-center justify-center h-7 w-7 rounded-md transition-colors","text-muted-foreground hover:text-foreground hover:bg-muted","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",k&&"text-primary",S&&"text-green-500"),children:S?o.jsx("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M20 6 9 17l-5-5"})}):o.jsx("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:k?"currentColor":"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:tf[C].path})})},C)})})});ri.displayName="MessageActions";const oi=w.forwardRef(({text:e,speed:t=2,onComplete:n,cursor:r=!0,immediate:s=!1,className:a,...i},l)=>{const[c,d]=w.useState(s?e:""),[g,u]=w.useState(s),f=w.useRef(e),m=w.useRef(),p=w.useRef(s?e.length:0);return w.useEffect(()=>{if(e!==f.current){if(f.current=e,s){d(e),u(!0),p.current=e.length;return}e.startsWith(c)||(p.current=0,d("")),u(!1)}},[e,s,c]),w.useEffect(()=>{if(s||g)return;const v=()=>{const b=Math.min(p.current+t,e.length);p.current=b,d(e.slice(0,b)),b>=e.length?(u(!0),n==null||n()):m.current=requestAnimationFrame(v)};return m.current=requestAnimationFrame(v),()=>{m.current&&cancelAnimationFrame(m.current)}},[e,t,s,g,n]),o.jsxs("span",{ref:l,className:x("whitespace-pre-wrap",a),...i,children:[c,r&&!g&&o.jsx("span",{className:"inline-block w-[2px] h-[1em] bg-foreground ml-px align-text-bottom animate-pulse"})]})});oi.displayName="StreamingText";const si=w.forwardRef(({content:e,isThinking:t,duration:n,defaultOpen:r=!1,title:s,className:a,...i},l)=>{const c=Re(),[d,g]=w.useState(r||t===!0),[u,f]=w.useState(n??0),m=w.useRef(Date.now());w.useEffect(()=>{t&&g(!0)},[t]),w.useEffect(()=>{if(!t)return;m.current=Date.now();const b=setInterval(()=>{f(Math.floor((Date.now()-m.current)/1e3))},1e3);return()=>clearInterval(b)},[t]);const p=t?u:n??u,v=b=>b<60?`${b}s`:`${Math.floor(b/60)}m ${b%60}s`;return o.jsxs("div",{ref:l,className:x("rounded-xl border border-border/60 overflow-hidden my-2",t&&"border-primary/30",a),...i,children:[o.jsxs("button",{type:"button",onClick:()=>g(b=>!b),className:x("flex items-center gap-2 w-full px-3 py-2 text-sm transition-colors","hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",t&&"bg-primary/5"),children:[o.jsxs("svg",{className:x("h-4 w-4 shrink-0 text-muted-foreground",t&&"text-primary animate-pulse"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z"}),o.jsx("path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z"}),o.jsx("path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4"}),o.jsx("path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375"}),o.jsx("path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5"}),o.jsx("path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396"}),o.jsx("path",{d:"M19.938 10.5a4 4 0 0 1 .585.396"}),o.jsx("path",{d:"M6 18a4 4 0 0 1-1.967-.516"}),o.jsx("path",{d:"M19.967 17.484A4 4 0 0 1 18 18"})]}),o.jsx("span",{className:x("font-medium",t&&"text-primary animate-pulse"),children:t?c.reasoning_thinking:s??c.reasoning_title}),p>0&&o.jsx("span",{className:"text-xs text-muted-foreground",children:t?`${v(p)}...`:Ze(c.reasoning_thoughtFor,{duration:v(p)})}),o.jsx("svg",{className:x("h-3.5 w-3.5 ml-auto shrink-0 text-muted-foreground transition-transform duration-200",d&&"rotate-180"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"m6 9 6 6 6-6"})})]}),d&&o.jsx("div",{className:"border-t border-border/40 px-4 py-3 bg-muted/20",children:o.jsx("div",{className:"border-l-2 border-primary/20 pl-3",children:o.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed whitespace-pre-wrap",children:[e,t&&o.jsx("span",{className:"inline-block w-[2px] h-[1em] bg-muted-foreground ml-px align-text-bottom animate-pulse"})]})})})]})});si.displayName="ReasoningBlock";const ai=w.forwardRef(({name:e,args:t,result:n,status:r,error:s,defaultOpen:a=!1,className:i,...l},c)=>{const d=Re(),[g,u]=w.useState(a),f={running:o.jsx("svg",{className:"h-3.5 w-3.5 animate-spin text-primary",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:o.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),success:o.jsx("svg",{className:"h-3.5 w-3.5 text-green-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M20 6 9 17l-5-5"})}),error:o.jsxs("svg",{className:"h-3.5 w-3.5 text-destructive",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M18 6 6 18"}),o.jsx("path",{d:"m6 6 12 12"})]})},m={running:Ze(d.toolCall_calling,{name:e}),success:e,error:Ze(d.toolCall_failed,{name:e})};return o.jsxs("div",{ref:c,className:x("rounded-xl border overflow-hidden my-1",r==="error"?"border-destructive/30":"border-border/60",i),...l,children:[o.jsxs("button",{type:"button",onClick:()=>u(p=>!p),className:x("flex items-center gap-2 w-full px-3 py-2 text-sm transition-colors","hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:[o.jsx("svg",{className:"h-4 w-4 shrink-0 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})}),f[r],o.jsx("span",{className:x("font-medium font-mono text-xs",r==="running"&&"text-primary",r==="error"&&"text-destructive"),children:m[r]}),o.jsx("svg",{className:x("h-3.5 w-3.5 ml-auto shrink-0 text-muted-foreground transition-transform duration-200",g&&"rotate-180"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"m6 9 6 6 6-6"})})]}),g&&o.jsxs("div",{className:"border-t border-border/40 text-xs",children:[t&&Object.keys(t).length>0&&o.jsxs("div",{className:"px-3 py-2 bg-muted/20",children:[o.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1 font-semibold",children:d.toolCall_arguments}),o.jsx("pre",{className:"overflow-x-auto font-mono text-foreground/80 whitespace-pre-wrap",children:JSON.stringify(t,null,2)})]}),n&&o.jsxs("div",{className:x("px-3 py-2",t&&"border-t border-border/30"),children:[o.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1 font-semibold",children:d.toolCall_result}),o.jsx("pre",{className:"overflow-x-auto font-mono text-foreground/80 whitespace-pre-wrap",children:n})]}),s&&o.jsxs("div",{className:x("px-3 py-2 bg-destructive/5",t&&"border-t border-border/30"),children:[o.jsx("div",{className:"text-[10px] uppercase tracking-wider text-destructive mb-1 font-semibold",children:d.toolCall_error}),o.jsx("pre",{className:"overflow-x-auto font-mono text-destructive whitespace-pre-wrap",children:s})]})]})]})});ai.displayName="ChatToolCall";function nf(e,t){const n=new Date,r=new Date(n.getFullYear(),n.getMonth(),n.getDate()),s=new Date(r.getTime()-864e5),a=new Date(r.getTime()-7*864e5),i=[{label:t[0],items:[]},{label:t[1],items:[]},{label:t[2],items:[]},{label:t[3],items:[]}],l=[...e].sort((c,d)=>d.updatedAt.getTime()-c.updatedAt.getTime());for(const c of l){const d=c.updatedAt;d>=r?i[0].items.push(c):d>=s?i[1].items.push(c):d>=a?i[2].items.push(c):i[3].items.push(c)}return i.filter(c=>c.items.length>0)}const ii=w.forwardRef(({conversations:e,activeId:t,onSelect:n,onNew:r,onDelete:s,onRename:a,showSearch:i=!0,className:l,...c},d)=>{const g=Re(),[u,f]=w.useState(""),[m,p]=w.useState(null),[v,b]=w.useState(""),h=w.useRef(null),y=w.useMemo(()=>{if(!u)return e;const k=u.toLowerCase();return e.filter(N=>{var T;return N.title.toLowerCase().includes(k)||((T=N.lastMessage)==null?void 0:T.toLowerCase().includes(k))})},[e,u]),C=[g.conversationList_today,g.conversationList_yesterday,g.conversationList_previous7Days,g.conversationList_older],S=w.useMemo(()=>nf(y,C),[y,C]),L=k=>{p(k.id),b(k.title),setTimeout(()=>{var N;return(N=h.current)==null?void 0:N.focus()},0)},D=()=>{m&&v.trim()&&(a==null||a(m,v.trim())),p(null)};return o.jsxs("div",{ref:d,className:x("flex flex-col h-full",l),...c,children:[r&&o.jsx("div",{className:"p-3 border-b border-border shrink-0",children:o.jsxs("button",{type:"button",onClick:r,className:x("flex items-center justify-center gap-2 w-full rounded-lg border border-border px-3 py-2 text-sm font-medium","transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:[o.jsxs("svg",{className:"h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M5 12h14"}),o.jsx("path",{d:"M12 5v14"})]}),g.conversationList_newChat]})}),i&&o.jsx("div",{className:"px-3 pt-3 pb-2 shrink-0",children:o.jsxs("div",{className:"relative",children:[o.jsxs("svg",{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("circle",{cx:"11",cy:"11",r:"8"}),o.jsx("path",{d:"m21 21-4.3-4.3"})]}),o.jsx("input",{value:u,onChange:k=>f(k.target.value),placeholder:g.conversationList_searchPlaceholder,className:"w-full bg-muted/50 rounded-lg pl-8 pr-3 py-1.5 text-sm outline-none placeholder:text-muted-foreground focus:bg-muted"})]})}),o.jsxs("div",{className:"flex-1 overflow-auto px-2 py-1",children:[S.length===0&&o.jsx("div",{className:"px-3 py-8 text-center text-sm text-muted-foreground",children:u?g.conversationList_noResults:g.conversationList_empty}),S.map(k=>o.jsxs("div",{className:"mb-3",children:[o.jsx("div",{className:"px-2 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:k.label}),k.items.map(N=>{const T=N.id===t,G=N.id===m;return o.jsxs("div",{className:x("group flex items-center gap-2 rounded-lg px-2 py-2 cursor-pointer transition-colors",T?"bg-primary/10":"hover:bg-muted"),onClick:()=>!G&&(n==null?void 0:n(N.id)),children:[o.jsx("svg",{className:"h-4 w-4 shrink-0 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z"})}),o.jsx("div",{className:"flex-1 min-w-0",children:G?o.jsx("input",{ref:h,value:v,onChange:E=>b(E.target.value),onBlur:D,onKeyDown:E=>{E.key==="Enter"&&D(),E.key==="Escape"&&p(null)},className:"w-full bg-background border border-border rounded px-1 py-0.5 text-sm outline-none",onClick:E=>E.stopPropagation()}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"text-sm truncate font-medium",children:N.title}),N.lastMessage&&o.jsx("div",{className:"text-xs text-muted-foreground truncate",children:N.lastMessage})]})}),!G&&o.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[a&&o.jsx("button",{type:"button",onClick:E=>{E.stopPropagation(),L(N)},className:"h-6 w-6 flex items-center justify-center rounded text-muted-foreground hover:text-foreground hover:bg-muted","aria-label":g.conversationList_rename,children:o.jsx("svg",{className:"h-3 w-3",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"})})}),s&&o.jsx("button",{type:"button",onClick:E=>{E.stopPropagation(),s(N.id)},className:"h-6 w-6 flex items-center justify-center rounded text-muted-foreground hover:text-destructive hover:bg-destructive/10","aria-label":g.conversationList_delete,children:o.jsxs("svg",{className:"h-3 w-3",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M3 6h18"}),o.jsx("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),o.jsx("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"})]})})]})]},N.id)})]},k.label))]})]})});ii.displayName="ConversationList";const rf={online:"bg-green-500",offline:"bg-muted-foreground/40",typing:"bg-primary animate-pulse"},li=w.forwardRef(({title:e,model:t,modelIcon:n,status:r,onClear:s,onSettings:a,onBack:i,children:l,className:c,...d},g)=>{const u=Re(),f={online:u.chatHeader_online,offline:u.chatHeader_offline,typing:u.chatHeader_typing};return o.jsxs("div",{ref:g,className:x("flex items-center gap-3 px-4 h-14 border-b border-border shrink-0 bg-background",c),...d,children:[i&&o.jsx("button",{type:"button",onClick:i,className:"h-8 w-8 flex items-center justify-center rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted transition-colors -ml-1 shrink-0","aria-label":u.chatHeader_back,children:o.jsx("svg",{className:"h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"m15 18-6-6 6-6"})})}),n&&o.jsx("span",{className:"text-xl shrink-0",children:n}),o.jsxs("div",{className:"flex-1 min-w-0",children:[e&&o.jsx("div",{className:"text-sm font-semibold truncate",children:e}),o.jsxs("div",{className:"flex items-center gap-1.5",children:[t&&o.jsx("span",{className:"text-xs text-muted-foreground truncate",children:t}),r&&o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx("span",{className:x("h-1.5 w-1.5 rounded-full shrink-0",rf[r])}),o.jsx("span",{className:"text-[10px] text-muted-foreground",children:f[r]})]})]})]}),l,o.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[s&&o.jsx("button",{type:"button",onClick:s,className:"h-8 w-8 flex items-center justify-center rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted transition-colors","aria-label":u.chatHeader_clearConversation,title:u.chatHeader_clearConversation,children:o.jsxs("svg",{className:"h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M3 6h18"}),o.jsx("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),o.jsx("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"})]})}),a&&o.jsx("button",{type:"button",onClick:a,className:"h-8 w-8 flex items-center justify-center rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted transition-colors","aria-label":u.chatHeader_settings,title:u.chatHeader_settings,children:o.jsxs("svg",{className:"h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),o.jsx("circle",{cx:"12",cy:"12",r:"3"})]})})]})]})});li.displayName="ChatHeader";const Cr=w.forwardRef(({citation:e,className:t,...n},r)=>{const[s,a]=w.useState(!1);return o.jsxs("span",{className:"relative inline-block",children:[o.jsx("button",{ref:r,type:"button",onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onFocus:()=>a(!0),onBlur:()=>a(!1),onClick:()=>window.open(e.url,"_blank","noopener"),className:x("inline-flex items-center justify-center h-4 min-w-[16px] px-1 rounded text-[10px] font-medium","bg-primary/15 text-primary hover:bg-primary/25 transition-colors cursor-pointer","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","align-super",t),"aria-label":`Source ${e.index}: ${e.title}`,...n,children:e.index}),s&&o.jsxs("div",{className:"absolute z-50 bottom-full left-1/2 -translate-x-1/2 mb-2 w-64 rounded-lg border border-border bg-popover shadow-lg p-3 text-left animate-in fade-in-0 zoom-in-95",children:[o.jsxs("div",{className:"flex items-start gap-2",children:[e.favicon&&o.jsx("img",{src:e.favicon,alt:"",className:"h-4 w-4 mt-0.5 shrink-0 rounded"}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:e.title}),o.jsx("div",{className:"text-[10px] text-muted-foreground truncate",children:e.url}),e.snippet&&o.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.snippet})]})]}),o.jsx("div",{className:"absolute top-full left-1/2 -translate-x-1/2 border-4 border-transparent border-t-border"})]})]})});Cr.displayName="CitationBadge";const di=w.forwardRef(({citations:e,variant:t="footer",className:n,...r},s)=>{const a=Re();return t==="inline"?o.jsx("span",{ref:s,className:x("inline",n),...r,children:e.map(i=>o.jsx(Cr,{citation:i},i.index))}):o.jsxs("div",{ref:s,className:x("border-t border-border/50 pt-3 mt-3 space-y-2",n),...r,children:[o.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground font-semibold mb-2",children:a.sourceCitation_sources}),e.map(i=>o.jsxs("a",{href:i.url,target:"_blank",rel:"noopener noreferrer",className:x("flex items-start gap-2.5 rounded-lg border border-border/60 p-2.5 transition-colors","hover:bg-muted/50 hover:border-primary/30"),children:[o.jsx("span",{className:"flex items-center justify-center h-5 w-5 rounded bg-primary/15 text-primary text-[10px] font-semibold shrink-0 mt-0.5",children:i.index}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsxs("div",{className:"flex items-center gap-1.5",children:[i.favicon&&o.jsx("img",{src:i.favicon,alt:"",className:"h-3.5 w-3.5 rounded shrink-0"}),o.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:i.title})]}),o.jsx("span",{className:"text-[10px] text-muted-foreground truncate block",children:i.url}),i.snippet&&o.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:i.snippet})]})]},i.index))]})});di.displayName="SourceCitation";function Br(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Or(e){return e.startsWith("image/")}function Hr(e){return e.startsWith("image/")?"🖼️":e.startsWith("video/")?"🎬":e.startsWith("audio/")?"🎵":e.includes("pdf")?"📄":e.includes("zip")||e.includes("rar")||e.includes("tar")?"📦":e.includes("json")||e.includes("xml")||e.includes("csv")?"📊":e.includes("text")||e.includes("javascript")||e.includes("typescript")?"📝":"📎"}const ci=w.forwardRef(({files:e,onRemove:t,variant:n="compact",className:r,...s},a)=>{const i=Re();return e.length===0?null:n==="grid"?o.jsx("div",{ref:a,className:x("grid grid-cols-2 gap-2",r),...s,children:e.map((l,c)=>o.jsxs("div",{className:"group relative rounded-xl border border-border overflow-hidden bg-muted/30",children:[Or(l.type)&&(l.thumbnail||l.url)?o.jsx("div",{className:"aspect-square",children:o.jsx("img",{src:l.thumbnail||l.url,alt:l.name,className:"h-full w-full object-cover"})}):o.jsx("div",{className:"aspect-square flex items-center justify-center text-3xl bg-muted/50",children:Hr(l.type)}),o.jsxs("div",{className:"px-2 py-1.5 border-t border-border/40",children:[o.jsx("div",{className:"text-xs font-medium truncate",children:l.name}),o.jsx("div",{className:"text-[10px] text-muted-foreground",children:Br(l.size)})]}),t&&o.jsx("button",{type:"button",onClick:()=>t(c),className:"absolute top-1.5 right-1.5 h-5 w-5 rounded-full bg-background/80 backdrop-blur flex items-center justify-center text-muted-foreground hover:text-destructive transition-colors opacity-0 group-hover:opacity-100","aria-label":Ze(i.filePreview_remove,{name:l.name}),children:o.jsxs("svg",{className:"h-3 w-3",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M18 6 6 18"}),o.jsx("path",{d:"m6 6 12 12"})]})})]},l.id??c))}):o.jsx("div",{ref:a,className:x("flex gap-2 overflow-x-auto pb-1",r),...s,children:e.map((l,c)=>o.jsxs("div",{className:"group relative flex items-center gap-2 rounded-lg border border-border bg-muted/30 px-2.5 py-1.5 shrink-0 max-w-[200px]",children:[Or(l.type)&&(l.thumbnail||l.url)?o.jsx("img",{src:l.thumbnail||l.url,alt:l.name,className:"h-8 w-8 rounded object-cover shrink-0"}):o.jsx("span",{className:"text-lg shrink-0",children:Hr(l.type)}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("div",{className:"text-xs font-medium truncate",children:l.name}),o.jsx("div",{className:"text-[10px] text-muted-foreground",children:Br(l.size)})]}),t&&o.jsx("button",{type:"button",onClick:()=>t(c),className:"h-5 w-5 rounded-full flex items-center justify-center text-muted-foreground hover:text-destructive transition-colors shrink-0 opacity-0 group-hover:opacity-100","aria-label":Ze(i.filePreview_remove,{name:l.name}),children:o.jsxs("svg",{className:"h-3 w-3",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M18 6 6 18"}),o.jsx("path",{d:"m6 6 12 12"})]})})]},l.id??c))})});ci.displayName="FilePreview";const of={sending:o.jsxs("svg",{className:"h-3 w-3 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("circle",{cx:"12",cy:"12",r:"10"}),o.jsx("path",{d:"M12 6v6l4 2"})]}),sent:o.jsx("svg",{className:"h-3 w-3 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M20 6 9 17l-5-5"})}),delivered:o.jsxs("svg",{className:"h-3 w-3 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M18 6 7 17l-5-5"}),o.jsx("path",{d:"m22 10-9.5 9.5-2-2"})]}),read:o.jsxs("svg",{className:"h-3 w-3 text-primary",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M18 6 7 17l-5-5"}),o.jsx("path",{d:"m22 10-9.5 9.5-2-2"})]}),error:o.jsxs("svg",{className:"h-3 w-3 text-destructive",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("circle",{cx:"12",cy:"12",r:"10"}),o.jsx("path",{d:"m15 9-6 6"}),o.jsx("path",{d:"m9 9 6 6"})]})},ui=w.forwardRef(({variant:e="received",avatar:t,avatarFallback:n,content:r,timestamp:s,isLoading:a,status:i,actions:l,textContent:c,likeState:d,onCopy:g,onRetry:u,onEdit:f,onLike:m,onDislike:p,onShare:v,followUp:b,onFollowUpSelect:h,onFollowUpFreeText:y,reasoning:C,toolCalls:S,citations:L,className:D,...k},N)=>{const T=Re(),G=e==="sent",[E,Z]=w.useState(!1),J=async()=>{if(c)try{await navigator.clipboard.writeText(c),Z(!0),setTimeout(()=>Z(!1),2e3)}catch{}g==null||g()};return o.jsxs("div",{ref:N,className:x("group flex gap-2 max-w-[85%]",G?"ml-auto flex-row-reverse":"mr-auto",D),...k,children:[(t||n)&&o.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-medium text-muted-foreground overflow-hidden",children:t?o.jsx("img",{src:t,alt:n??"avatar",className:"h-full w-full object-cover"}):o.jsx("span",{children:n??"?"})}),o.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[C&&o.jsx("div",{className:x("rounded-xl border border-border/60 overflow-hidden",C.isThinking&&"border-primary/30"),children:o.jsx(sf,{...C})}),S==null?void 0:S.map((R,X)=>o.jsx(af,{...R},X)),o.jsxs("div",{className:x("rounded-2xl px-4 py-2.5 text-sm leading-relaxed",G?"bg-primary text-primary-foreground rounded-br-md":"bg-muted text-foreground rounded-bl-md"),children:[a?o.jsxs("div",{className:"flex items-center gap-1 py-1",children:[o.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:0ms]"}),o.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:150ms]"}),o.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:300ms]"})]}):r,L&&L.length>0&&o.jsxs("div",{className:"border-t border-border/30 pt-2 mt-2 space-y-1.5",children:[o.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground font-semibold",children:T.sourceCitation_sources}),L.map(R=>o.jsxs("a",{href:R.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[o.jsx("span",{className:"h-4 min-w-[16px] px-0.5 rounded bg-primary/15 text-primary text-[10px] font-semibold flex items-center justify-center",children:R.index}),o.jsx("span",{className:"truncate",children:R.title})]},R.index))]})]}),b&&o.jsxs("div",{className:"rounded-2xl bg-muted text-foreground rounded-bl-md px-4 py-3",children:[o.jsx("p",{className:"text-sm leading-relaxed mb-2.5",children:b.question}),o.jsx("div",{className:"grid gap-1.5",children:b.options.map(R=>{const X=R.id===b.selected,V=!!b.selected;return o.jsxs("button",{type:"button",disabled:V,onClick:()=>h==null?void 0:h(R.id,R.label),className:x("flex items-center gap-2 rounded-xl border px-3 py-2 text-left text-sm transition-all",X?"border-primary bg-primary/10 text-primary font-medium":V?"border-border/50 text-muted-foreground opacity-50 cursor-default":"border-border bg-background hover:border-primary/40 hover:bg-primary/5 cursor-pointer"),children:[X?o.jsx("svg",{className:"h-4 w-4 shrink-0 text-primary",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M20 6 9 17l-5-5"})}):o.jsx("span",{className:x("h-4 w-4 shrink-0 rounded-full border-2",V?"border-border/50":"border-border")}),o.jsx("span",{className:"truncate",children:R.label})]},R.id)})})]}),(s||i)&&o.jsxs("div",{className:x("flex items-center gap-1 px-1",G&&"flex-row-reverse"),children:[s&&o.jsx("span",{className:"text-[10px] text-muted-foreground",children:s}),i&&of[i]]}),l&&l.length>0&&!a&&o.jsx("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity",children:l.map(R=>{const X=R==="copy"&&E,V={copy:J,retry:u,edit:f,like:m,dislike:p,share:v},U=R==="like"&&d==="liked"||R==="dislike"&&d==="disliked",_={copy:T.messageActions_copy,retry:T.messageActions_retry,edit:T.messageActions_edit,like:T.messageActions_like,dislike:T.messageActions_dislike,share:T.messageActions_share};return o.jsx("button",{type:"button",onClick:V[R],title:X?T.messageActions_copied:_[R],className:x("h-7 w-7 rounded-md flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",U&&"text-primary",X&&"text-green-500"),children:X?o.jsx("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M20 6 9 17l-5-5"})}):R==="copy"?o.jsxs("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"}),o.jsx("path",{d:"M9 2h6a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z"})]}):R==="retry"?o.jsxs("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),o.jsx("path",{d:"M3 3v5h5"})]}):R==="like"?o.jsx("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:U?"currentColor":"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M7 10v12 M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2h0a3.13 3.13 0 0 1 3 3.88Z"})}):R==="dislike"?o.jsx("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:U?"currentColor":"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M17 14V2 M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22h0a3.13 3.13 0 0 1-3-3.88Z"})}):R==="edit"?o.jsx("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"})}):o.jsxs("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}),o.jsx("path",{d:"M16 6l-4-4-4 4"}),o.jsx("path",{d:"M12 2v13"})]})},R)})})]})]})});ui.displayName="ChatMessage";function sf({content:e,isThinking:t,duration:n}){const r=Re(),[s,a]=w.useState(t===!0),[i,l]=w.useState(n??0);w.useEffect(()=>{t&&a(!0)},[t]),w.useEffect(()=>{if(!t)return;const d=Date.now(),g=setInterval(()=>l(Math.floor((Date.now()-d)/1e3)),1e3);return()=>clearInterval(g)},[t]);const c=t?i:n??i;return o.jsxs(o.Fragment,{children:[o.jsxs("button",{type:"button",onClick:()=>a(d=>!d),className:"flex items-center gap-2 w-full px-3 py-2 text-sm hover:bg-muted/50",children:[o.jsxs("svg",{className:x("h-4 w-4 shrink-0 text-muted-foreground",t&&"text-primary animate-pulse"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z"}),o.jsx("path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z"})]}),o.jsx("span",{className:x("font-medium",t&&"text-primary animate-pulse"),children:t?r.reasoning_thinking:r.reasoning_title}),c>0&&o.jsx("span",{className:"text-xs text-muted-foreground",children:t?`${c}s...`:Ze(r.reasoning_thoughtFor,{duration:`${c}s`})}),o.jsx("svg",{className:x("h-3.5 w-3.5 ml-auto text-muted-foreground transition-transform",s&&"rotate-180"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"m6 9 6 6 6-6"})})]}),s&&o.jsx("div",{className:"border-t border-border/40 px-4 py-3 bg-muted/20",children:o.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed whitespace-pre-wrap border-l-2 border-primary/20 pl-3",children:e})})]})}function af({name:e,args:t,result:n,status:r,error:s}){const a=Re(),[i,l]=w.useState(!1);return o.jsxs("div",{className:x("rounded-xl border overflow-hidden",r==="error"?"border-destructive/30":"border-border/60"),children:[o.jsxs("button",{type:"button",onClick:()=>l(c=>!c),className:"flex items-center gap-2 w-full px-3 py-2 text-sm hover:bg-muted/50",children:[o.jsx("svg",{className:"h-4 w-4 shrink-0 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})}),r==="running"?o.jsx("svg",{className:"h-3.5 w-3.5 animate-spin text-primary",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:o.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}):r==="success"?o.jsx("svg",{className:"h-3.5 w-3.5 text-green-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M20 6 9 17l-5-5"})}):o.jsxs("svg",{className:"h-3.5 w-3.5 text-destructive",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M18 6 6 18"}),o.jsx("path",{d:"m6 6 12 12"})]}),o.jsx("span",{className:"font-medium font-mono text-xs",children:r==="running"?Ze(a.toolCall_calling,{name:e}):e}),o.jsx("svg",{className:x("h-3.5 w-3.5 ml-auto text-muted-foreground transition-transform",i&&"rotate-180"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"m6 9 6 6 6-6"})})]}),i&&o.jsxs("div",{className:"border-t border-border/40 text-xs",children:[t&&Object.keys(t).length>0&&o.jsxs("div",{className:"px-3 py-2 bg-muted/20",children:[o.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1 font-semibold",children:a.toolCall_arguments}),o.jsx("pre",{className:"overflow-x-auto font-mono whitespace-pre-wrap",children:JSON.stringify(t,null,2)})]}),n&&o.jsxs("div",{className:"px-3 py-2 border-t border-border/30",children:[o.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1 font-semibold",children:a.toolCall_result}),o.jsx("pre",{className:"overflow-x-auto font-mono whitespace-pre-wrap",children:n})]}),s&&o.jsxs("div",{className:"px-3 py-2 bg-destructive/5 border-t border-border/30",children:[o.jsx("div",{className:"text-[10px] uppercase tracking-wider text-destructive mb-1 font-semibold",children:a.toolCall_error}),o.jsx("pre",{className:"overflow-x-auto font-mono text-destructive whitespace-pre-wrap",children:s})]})]})]})}exports.AILoading=Za;exports.Accordion=Wl;exports.AccordionContent=Uo;exports.AccordionItem=qo;exports.AccordionTrigger=Wo;exports.Alert=ys;exports.AlertDescription=Ns;exports.AlertDialog=sd;exports.AlertDialogAction=Is;exports.AlertDialogCancel=Ps;exports.AlertDialogContent=Ss;exports.AlertDialogDescription=Ms;exports.AlertDialogFooter=Rs;exports.AlertDialogHeader=ks;exports.AlertDialogOverlay=ur;exports.AlertDialogPortal=js;exports.AlertDialogTitle=_s;exports.AlertDialogTrigger=ad;exports.AlertTitle=Cs;exports.AppShell=Fa;exports.AspectRatio=Ol;exports.Avatar=mo;exports.AvatarFallback=po;exports.AvatarImage=go;exports.Badge=Bn;exports.Blockquote=zu;exports.Box=Io;exports.Breadcrumb=Ts;exports.BreadcrumbEllipsis=zs;exports.BreadcrumbItem=As;exports.BreadcrumbLink=Es;exports.BreadcrumbList=Fs;exports.BreadcrumbPage=Vs;exports.BreadcrumbSeparator=$s;exports.Button=ge;exports.Calendar=qn;exports.Card=Wn;exports.CardContent=Xn;exports.CardDescription=Vo;exports.CardFooter=$o;exports.CardHeader=Un;exports.CardTitle=Yn;exports.Carousel=ma;exports.CarouselContent=ga;exports.CarouselItem=pa;exports.CarouselNext=xa;exports.CarouselPrevious=ha;exports.ChartContainer=Ma;exports.ChartLegend=Gu;exports.ChartTooltip=Hu;exports.ChatBubble=Ha;exports.ChatBubbleActions=Ua;exports.ChatBubbleAvatar=Ga;exports.ChatBubbleMessage=qa;exports.ChatBubbleTimestamp=Wa;exports.ChatContainer=Xa;exports.ChatFollowUp=ni;exports.ChatHeader=li;exports.ChatInput=Ya;exports.ChatList=Ka;exports.ChatMessage=ui;exports.ChatModeSelector=ti;exports.ChatToolCall=ai;exports.Checkbox=ho;exports.CitationBadge=Cr;exports.Code=$u;exports.CodeBlock=Au;exports.Collapsible=Hl;exports.CollapsibleContent=Ao;exports.CollapsibleTrigger=Gl;exports.ColorPicker=zl;exports.Combobox=Tl;exports.Command=cr;exports.CommandDialog=rd;exports.CommandEmpty=hs;exports.CommandGroup=xs;exports.CommandInput=gs;exports.CommandItem=ws;exports.CommandList=ps;exports.CommandSeparator=vs;exports.CommandShortcut=bs;exports.Container=Fo;exports.ContextMenu=qd;exports.ContextMenuCheckboxItem=ra;exports.ContextMenuContent=ta;exports.ContextMenuGroup=Ud;exports.ContextMenuItem=na;exports.ContextMenuLabel=sa;exports.ContextMenuPortal=Yd;exports.ContextMenuRadioGroup=Kd;exports.ContextMenuRadioItem=oa;exports.ContextMenuSeparator=aa;exports.ContextMenuShortcut=ia;exports.ContextMenuSub=Xd;exports.ContextMenuSubContent=ea;exports.ContextMenuSubTrigger=Qs;exports.ContextMenuTrigger=Wd;exports.ConversationList=ii;exports.CopyInput=$a;exports.DataTable=Iu;exports.DataTableColumnHeader=Pu;exports.DatePicker=Il;exports.Dialog=Yo;exports.DialogClose=Yl;exports.DialogContent=nr;exports.DialogDescription=Qo;exports.DialogFooter=Zo;exports.DialogHeader=Ko;exports.DialogOverlay=tr;exports.DialogPortal=Xo;exports.DialogTitle=Jo;exports.DialogTrigger=Ul;exports.Drawer=es;exports.DrawerClose=ns;exports.DrawerContent=or;exports.DrawerDescription=lr;exports.DrawerFooter=ar;exports.DrawerHeader=sr;exports.DrawerTitle=ir;exports.DrawerTrigger=ts;exports.DropdownMenu=os;exports.DropdownMenuCheckboxItem=ls;exports.DropdownMenuContent=dr;exports.DropdownMenuGroup=Kl;exports.DropdownMenuItem=kt;exports.DropdownMenuLabel=cs;exports.DropdownMenuPortal=Zl;exports.DropdownMenuRadioGroup=Ql;exports.DropdownMenuRadioItem=ds;exports.DropdownMenuSeparator=us;exports.DropdownMenuShortcut=fs;exports.DropdownMenuSub=Jl;exports.DropdownMenuSubContent=is;exports.DropdownMenuSubTrigger=as;exports.DropdownMenuTrigger=ss;exports.EmptyState=Bd;exports.FilePreview=ci;exports.FileUpload=El;exports.Flex=Po;exports.Grid=To;exports.HStack=Do;exports.Header=Ea;exports.Heading=Eu;exports.HoverCard=Zd;exports.HoverCardContent=la;exports.HoverCardTrigger=Jd;exports.Input=Je;exports.JsonViewer=za;exports.Label=an;exports.Lead=Bu;exports.Main=Va;exports.MarkdownRenderer=Ja;exports.MessageActions=ri;exports.MetricCard=qu;exports.ModeToggle=Yu;exports.ModeToggleGroup=Ku;exports.ModelSelector=ei;exports.MultiSelect=Fl;exports.Muted=Ou;exports.NUIProvider=Ju;exports.NavigationMenu=Us;exports.NavigationMenuContent=Zs;exports.NavigationMenuIndicator=Js;exports.NavigationMenuItem=Hd;exports.NavigationMenuLink=Gd;exports.NavigationMenuList=Ys;exports.NavigationMenuTrigger=Ks;exports.NavigationMenuViewport=fr;exports.NumberInput=Ll;exports.OTPInput=Al;exports.Pagination=Bs;exports.PaginationContent=Os;exports.PaginationEllipsis=Ws;exports.PaginationItem=Hs;exports.PaginationLink=dn;exports.PaginationNext=qs;exports.PaginationPrevious=Gs;exports.Popover=ht;exports.PopoverContent=lt;exports.PopoverTrigger=xt;exports.Progress=Ls;exports.PromptSuggestions=Qa;exports.RadioGroup=No;exports.RadioGroupItem=jo;exports.ReasoningBlock=si;exports.ScrollArea=er;exports.ScrollBar=nn;exports.Select=Rl;exports.SelectContent=wo;exports.SelectGroup=_l;exports.SelectItem=yo;exports.SelectLabel=bo;exports.SelectScrollDownButton=Hn;exports.SelectScrollUpButton=On;exports.SelectSeparator=Co;exports.SelectTrigger=vo;exports.SelectValue=Ml;exports.Separator=fo;exports.Sheet=es;exports.SheetClose=ns;exports.SheetContent=or;exports.SheetDescription=lr;exports.SheetFooter=ar;exports.SheetHeader=sr;exports.SheetOverlay=rr;exports.SheetPortal=rs;exports.SheetTitle=ir;exports.SheetTrigger=ts;exports.Sidebar=Aa;exports.Skeleton=id;exports.Slider=So;exports.SourceCitation=di;exports.StatusBadge=Uu;exports.Stepper=Od;exports.StreamingText=oi;exports.Switch=xo;exports.Table=Kn;exports.TableBody=Jn;exports.TableCaption=Bo;exports.TableCell=tn;exports.TableFooter=zo;exports.TableHead=Qn;exports.TableHeader=Zn;exports.TableRow=St;exports.Tabs=ql;exports.TabsContent=Go;exports.TabsList=Oo;exports.TabsTrigger=Ho;exports.TagInput=Dl;exports.Text=Vu;exports.Textarea=co;exports.ThemeProvider=$d;exports.TimePicker=Pl;exports.Timeline=Ia;exports.TimelineConnector=Da;exports.TimelineContent=Ta;exports.TimelineIcon=La;exports.TimelineItem=Pa;exports.Toaster=zd;exports.Toggle=ko;exports.ToggleGroup=Ro;exports.ToggleGroupItem=Mo;exports.Tooltip=td;exports.TooltipContent=ms;exports.TooltipProvider=ed;exports.TooltipTrigger=nd;exports.VStack=Lo;exports.badgeVariants=uo;exports.buttonVariants=At;exports.cardVariants=Eo;exports.cn=x;exports.en=Tt;exports.headingVariants=Ra;exports.inputVariants=lo;exports.navigationMenuTriggerStyle=Xs;exports.ru=Ba;exports.textVariants=_a;exports.toast=jd;exports.toggleVariants=Gn;exports.tpl=Ze;exports.useNUILocale=Re;exports.useTheme=ln;
|
|
33
|
+
*/function Bo(e,n){return e?_u(e)?v.createElement(e,n):e:null}function _u(e){return Mu(e)||typeof e=="function"||Pu(e)}function Mu(e){return typeof e=="function"&&(()=>{const n=Object.getPrototypeOf(e);return n.prototype&&n.prototype.isReactComponent})()}function Pu(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Iu(e){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[t]=v.useState(()=>({current:bu(n)})),[o,s]=v.useState(()=>t.current.initialState);return t.current.setOptions(a=>({...a,...e,state:{...o,...e.state},onStateChange:i=>{s(i),e.onStateChange==null||e.onStateChange(i)}})),t.current}function Tu({columns:e,data:n,searchKey:t,searchPlaceholder:o,pageSize:s=10}){var w,b;const a=Z(),i=o??a.dataTable_searchPlaceholder,[l,c]=v.useState([]),[d,g]=v.useState([]),[u,f]=v.useState({}),[m,p]=v.useState({}),h=Iu({data:n,columns:e,onSortingChange:c,onColumnFiltersChange:g,getCoreRowModel:wu(),getPaginationRowModel:ku(),getSortedRowModel:Ru(),getFilteredRowModel:Su(),onColumnVisibilityChange:f,onRowSelectionChange:p,state:{sorting:l,columnFilters:d,columnVisibility:u,rowSelection:m},initialState:{pagination:{pageSize:s}}});return r.jsxs("div",{className:"space-y-4",children:[t&&r.jsx("div",{className:"flex items-center gap-2",children:r.jsx(Je,{placeholder:i,value:((w=h.getColumn(t))==null?void 0:w.getFilterValue())??"",onChange:y=>{var N;return(N=h.getColumn(t))==null?void 0:N.setFilterValue(y.target.value)},className:"max-w-sm"})}),r.jsx("div",{className:"rounded-md border",children:r.jsxs(Kn,{children:[r.jsx(Zn,{children:h.getHeaderGroups().map(y=>r.jsx(St,{children:y.headers.map(N=>r.jsx(Qn,{children:N.isPlaceholder?null:Bo(N.column.columnDef.header,N.getContext())},N.id))},y.id))}),r.jsx(Jn,{children:(b=h.getRowModel().rows)!=null&&b.length?h.getRowModel().rows.map(y=>r.jsx(St,{"data-state":y.getIsSelected()&&"selected",children:y.getVisibleCells().map(N=>r.jsx(tn,{children:Bo(N.column.columnDef.cell,N.getContext())},N.id))},y.id)):r.jsx(St,{children:r.jsx(tn,{colSpan:e.length,className:"h-24 text-center",children:a.dataTable_noResults})})})]})}),r.jsxs("div",{className:"flex items-center justify-between px-2",children:[r.jsx("div",{className:"text-sm text-muted-foreground",children:Be(a.dataTable_pageOf,{page:h.getState().pagination.pageIndex+1,total:h.getPageCount()})}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsxs(pe,{variant:"outline",size:"sm",onClick:()=>h.previousPage(),disabled:!h.getCanPreviousPage(),children:[r.jsx(A.ChevronLeft,{className:"h-4 w-4"}),a.dataTable_previous]}),r.jsxs(pe,{variant:"outline",size:"sm",onClick:()=>h.nextPage(),disabled:!h.getCanNextPage(),children:[a.dataTable_next,r.jsx(A.ChevronRight,{className:"h-4 w-4"})]})]})]})]})}function Lu({column:e,title:n,className:t}){return e.getCanSort()?r.jsxs(pe,{variant:"ghost",size:"sm",className:x("-ml-3 h-8",t),onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:[n,r.jsx(A.ArrowUpDown,{className:"ml-2 h-4 w-4"})]}):r.jsx("div",{className:x(t),children:n})}const Du=new Set(["abstract","as","async","await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","instanceof","interface","let","new","null","of","package","private","protected","public","return","set","static","super","switch","this","throw","true","try","type","typeof","undefined","var","void","while","with","yield"]),Fu=new Set(["display","flex","grid","none","block","inline","relative","absolute","fixed","sticky","hidden","visible","auto","inherit","initial","unset","important","solid","dashed","dotted","transparent","center","left","right","top","bottom","normal","bold","italic","nowrap","wrap"]);function Au(e,n){const t=e.split(`
|
|
34
|
+
`),o=n==="css"||n==="scss"||n==="less",s=n==="html"||n==="xml"||n==="svg",a=n==="json",i=n==="bash"||n==="sh"||n==="shell"||n==="zsh";return t.map(l=>{const c=[];let d=0;const g=l.length*4;let u=0;for(;d<l.length&&u++<g;){if(!o&&!a&&l[d]==="/"&&l[d+1]==="/"){c.push({type:"comment",value:l.slice(d)}),d=l.length;continue}if(i&&l[d]==="#"){c.push({type:"comment",value:l.slice(d)}),d=l.length;continue}if(l[d]==="/"&&l[d+1]==="*"){const f=l.indexOf("*/",d+2);f!==-1?(c.push({type:"comment",value:l.slice(d,f+2)}),d=f+2):(c.push({type:"comment",value:l.slice(d)}),d=l.length);continue}if(l[d]==="`"){let f=d+1;for(;f<l.length&&l[f]!=="`";)l[f]==="\\"&&f++,f++;c.push({type:"string",value:l.slice(d,f+1)}),d=f+1;continue}if(l[d]==='"'||l[d]==="'"){const f=l[d];let m=d+1;for(;m<l.length&&l[m]!==f;)l[m]==="\\"&&m++,m++;c.push({type:"string",value:l.slice(d,m+1)}),d=m+1;continue}if(/[0-9]/.test(l[d])&&(d===0||/[\s,\(\[:=+\-*/<>!&|^~?{]/.test(l[d-1]))){let f=d;for(;f<l.length&&/[0-9a-fA-FxXoObB._eE+\-n]/.test(l[f]);)f++;c.push({type:"number",value:l.slice(d,f)}),d=f;continue}if(l[d]==="<"&&/[a-zA-Z\/!]/.test(l[d+1]||"")||l[d]==="/"&&l[d+1]===">"){if(l[d]==="/"&&l[d+1]===">"){c.push({type:"punctuation",value:"/>"}),d+=2;continue}const f=l[d+1]==="/";let m=f?d+2:d+1;for(;m<l.length&&/[a-zA-Z0-9.\-_]/.test(l[m]);)m++;c.push({type:"punctuation",value:l[d]+(f?"/":"")});const p=l.slice(f?d+2:d+1,m);p&&c.push({type:"tag",value:p}),d=m;continue}if(l[d]===">"){c.push({type:"punctuation",value:">"}),d++;continue}if(/[a-zA-Z_$@]/.test(l[d])){let f=d;for(;f<l.length&&/[a-zA-Z0-9_$@\-]/.test(l[f]);)f++;f===d&&f++;const m=l.slice(d,f);if(o&&Fu.has(m))c.push({type:"keyword",value:m});else if(s||o){const p=l.slice(f).trimStart();p[0]==="="||p[0]===":"?c.push({type:"attr",value:m}):c.push({type:"plain",value:m})}else Du.has(m)?c.push({type:"keyword",value:m}):!a&&l[f]==="("?c.push({type:"function",value:m}):!a&&/^[A-Z]/.test(m)?c.push({type:"tag",value:m}):c.push({type:"plain",value:m});d=f;continue}if(/[=+\-*/%<>!&|^~?:]/.test(l[d])){let f=d;for(;f<l.length&&/[=+\-*/%<>!&|^~?:]/.test(l[f]);)f++;c.push({type:"operator",value:l.slice(d,f)}),d=f;continue}if(/[{}()\[\],;.]/.test(l[d])){c.push({type:"punctuation",value:l[d]}),d++;continue}if(/\s/.test(l[d])){let f=d;for(;f<l.length&&/\s/.test(l[f]);)f++;c.push({type:"plain",value:l.slice(d,f)}),d=f;continue}c.push({type:"plain",value:l[d]}),d++}return c})}const Eu={comment:"var(--cb-comment, #6a9955)",string:"var(--cb-string, #ce9178)",keyword:"var(--cb-keyword, #569cd6)",number:"var(--cb-number, #b5cea8)",function:"var(--cb-function, #dcdcaa)",tag:"var(--cb-tag, #4ec9b0)",attr:"var(--cb-attr, #9cdcfe)",punctuation:"var(--cb-punctuation, #d4d4d4)",operator:"var(--cb-operator, #d4d4d4)",plain:"var(--cb-plain, #d4d4d4)"};function Vu({code:e,language:n="tsx",showLineNumbers:t=!1,showCopy:o=!0,className:s}){const a=Z(),[i,l]=v.useState(!1),c=e.trim(),d=v.useMemo(()=>{try{return Au(c,n)}catch{return c.split(`
|
|
35
|
+
`).map(u=>[{type:"plain",value:u}])}},[c,n]),g=async()=>{try{await navigator.clipboard.writeText(c),l(!0),setTimeout(()=>l(!1),2e3)}catch{}};return r.jsxs("div",{className:x("relative group",s),children:[o&&r.jsx("button",{type:"button",onClick:g,className:"absolute top-3 right-3 z-10 p-1.5 rounded-md bg-white/10 backdrop-blur text-white/60 hover:text-white opacity-0 group-hover:opacity-100 transition-opacity text-xs","aria-label":a.common_copyCode,children:i?r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("polyline",{points:"20 6 9 17 4 12"})}):r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2"}),r.jsx("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})]})}),r.jsx("pre",{className:"overflow-x-auto rounded-lg p-4 text-[13px] leading-relaxed font-mono",style:{background:"var(--cb-bg, #1e1e2e)",color:"var(--cb-plain, #d4d4d4)"},children:d.map((u,f)=>r.jsxs("div",{children:[t&&r.jsx("span",{className:"inline-block w-8 select-none text-right mr-4 opacity-40",style:{color:"var(--cb-plain, #d4d4d4)"},children:f+1}),u.map((m,p)=>r.jsx("span",{style:{color:Eu[m.type]},children:m.value},p))]},f))})]})}const Ma=Fe("font-bold tracking-tight",{variants:{level:{1:"text-2xl lg:text-3xl",2:"text-xl lg:text-2xl",3:"text-lg lg:text-xl",4:"text-base lg:text-lg",5:"text-sm lg:text-base",6:"text-xs lg:text-sm"}},defaultVariants:{level:2}});function $u({className:e,level:n=2,as:t,children:o,...s}){const a=t||`h${n}`;return r.jsx(a,{className:x(Ma({level:n}),e),...s,children:o})}const Pa=Fe("",{variants:{size:{xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},variant:{default:"text-foreground",muted:"text-muted-foreground",primary:"text-primary",destructive:"text-destructive",success:"text-green-600 dark:text-green-400"},leading:{tight:"leading-tight",normal:"leading-normal",relaxed:"leading-relaxed"}},defaultVariants:{size:"base",weight:"normal",variant:"default",leading:"normal"}});function zu({className:e,size:n,weight:t,variant:o,leading:s,as:a="p",children:i,...l}){return r.jsx(a,{className:x(Pa({size:n,weight:t,variant:o,leading:s}),e),...l,children:i})}function Bu({className:e,...n}){return r.jsx("code",{className:x("relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm",e),...n})}function Ou({className:e,...n}){return r.jsx("blockquote",{className:x("border-l-4 border-primary pl-4 italic text-muted-foreground",e),...n})}function Hu({className:e,...n}){return r.jsx("p",{className:x("text-xl text-muted-foreground",e),...n})}function Gu({className:e,...n}){return r.jsx("p",{className:x("text-sm text-muted-foreground",e),...n})}const Ia=v.forwardRef(({className:e,children:n,...t},o)=>r.jsx("div",{ref:o,className:x("w-full h-full min-h-[300px]",e),...t,children:r.jsx(Vn.ResponsiveContainer,{width:"100%",height:"100%",children:n})}));Ia.displayName="ChartContainer";const qu=Vn.Tooltip,Wu=Vn.Legend,Ta=v.forwardRef(({className:e,...n},t)=>r.jsx("div",{ref:t,className:x("flex flex-col space-y-4",e),...n}));Ta.displayName="Timeline";const La=v.forwardRef(({className:e,...n},t)=>r.jsx("div",{ref:t,className:x("relative flex gap-4 pb-4 last:pb-0",e),...n}));La.displayName="TimelineItem";const Da=v.forwardRef(({className:e,...n},t)=>r.jsx("div",{ref:t,className:x("relative z-10 flex h-8 w-8 shrink-0 items-center justify-center rounded-full border bg-background text-primary shadow-sm",e),...n}));Da.displayName="TimelineIcon";const Fa=v.forwardRef(({className:e,...n},t)=>r.jsx("div",{ref:t,className:x("absolute left-4 top-8 -bottom-4 w-px bg-border",e),...n}));Fa.displayName="TimelineConnector";const Aa=v.forwardRef(({className:e,...n},t)=>r.jsx("div",{ref:t,className:x("flex-1 space-y-1 pt-1",e),...n}));Aa.displayName="TimelineContent";const Ea=v.forwardRef(({className:e,children:n,...t},o)=>r.jsx("div",{ref:o,className:x("grid min-h-screen w-full lg:grid-cols-[280px_1fr]",e),...t,children:n}));Ea.displayName="AppShell";const Va=v.forwardRef(({className:e,children:n,...t},o)=>r.jsx("div",{ref:o,className:x("hidden border-r bg-muted/40 lg:block dark:bg-muted/10",e),...t,children:r.jsx("div",{className:"flex h-full max-h-screen flex-col gap-2",children:n})}));Va.displayName="Sidebar";const $a=v.forwardRef(({className:e,children:n,...t},o)=>r.jsx("header",{ref:o,className:x("flex h-14 items-center gap-4 border-b bg-background px-6 lg:h-[60px]",e),...t,children:n}));$a.displayName="Header";const za=v.forwardRef(({className:e,children:n,...t},o)=>r.jsx("main",{ref:o,className:x("flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6",e),...t,children:n}));za.displayName="Main";function Uu({title:e,value:n,description:t,trend:o,trendLabel:s,icon:a,className:i,...l}){return r.jsxs(Wn,{className:x("overflow-hidden",i),...l,children:[r.jsxs(Un,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[r.jsx(Yn,{className:"text-sm font-medium text-muted-foreground",children:e}),a&&r.jsx("div",{className:"text-muted-foreground",children:a})]}),r.jsxs(Xn,{children:[r.jsx("div",{className:"text-2xl font-bold",children:n}),(t||o!==void 0)&&r.jsxs("div",{className:"text-xs flex items-center gap-1 mt-1 text-muted-foreground",children:[o!==void 0&&r.jsxs("span",{className:x("flex items-center font-medium",o>0?"text-green-500":o<0?"text-red-500":"text-muted-foreground"),children:[o>0?r.jsx(A.TrendingUp,{className:"mr-1 h-3 w-3"}):o<0?r.jsx(A.TrendingDown,{className:"mr-1 h-3 w-3"}):r.jsx(A.Minus,{className:"mr-1 h-3 w-3"}),o>0?"+":"",o,"%"]}),s&&r.jsx("span",{children:s}),t&&!o&&r.jsx("span",{children:t})]})]})]})}const Ba=v.forwardRef(({className:e,label:n,value:t,...o},s)=>{const[a,i]=v.useState(!1),l=()=>{navigator.clipboard.writeText(t),i(!0),setTimeout(()=>i(!1),2e3)};return r.jsxs("div",{className:"space-y-2",children:[n&&r.jsx(an,{children:n}),r.jsxs("div",{className:"flex gap-2 relative",children:[r.jsx(Je,{ref:s,value:t,readOnly:!0,className:x("pr-10 font-mono text-sm",e),...o}),r.jsx(pe,{size:"icon",variant:"outline",className:"shrink-0",onClick:l,children:a?r.jsx(A.Check,{className:"h-4 w-4 text-green-500"}):r.jsx(A.Copy,{className:"h-4 w-4"})})]})]})});Ba.displayName="CopyInput";const Oa=v.forwardRef(({className:e,data:n,...t},o)=>r.jsx("pre",{ref:o,className:x("rounded-lg border bg-muted p-4 overflow-auto text-xs font-mono text-muted-foreground",e),...t,children:JSON.stringify(n,null,2)}));Oa.displayName="JsonViewer";const Yu=Fe("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{status:{neutral:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",success:"border-transparent bg-green-500/15 text-green-700 dark:text-green-400 hover:bg-green-500/25",warning:"border-transparent bg-yellow-500/15 text-yellow-700 dark:text-yellow-400 hover:bg-yellow-500/25",error:"border-transparent bg-red-500/15 text-red-700 dark:text-red-400 hover:bg-red-500/25",info:"border-transparent bg-blue-500/15 text-blue-700 dark:text-blue-400 hover:bg-blue-500/25"}},defaultVariants:{status:"neutral"}});function Xu({className:e,status:n,dot:t=!0,children:o,...s}){return r.jsxs("div",{className:x(Yu({status:n}),e),...s,children:[t&&r.jsx("span",{className:x("mr-1.5 h-2 w-2 rounded-full",{"bg-current":!0})}),o]})}function Ku({className:e}){const{setTheme:n}=ln(),t=Z();return r.jsxs(as,{children:[r.jsx(is,{asChild:!0,children:r.jsxs(pe,{variant:"outline",size:"icon",className:e,children:[r.jsx(A.Sun,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),r.jsx(A.Moon,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),r.jsx("span",{className:"sr-only",children:t.modeToggle_toggleTheme})]})}),r.jsxs(co,{align:"end",children:[r.jsxs(kt,{onClick:()=>n("light"),children:[r.jsx(A.Sun,{className:"mr-2 h-4 w-4"}),t.modeToggle_light]}),r.jsxs(kt,{onClick:()=>n("dark"),children:[r.jsx(A.Moon,{className:"mr-2 h-4 w-4"}),t.modeToggle_dark]}),r.jsxs(kt,{onClick:()=>n("system"),children:[r.jsx(A.Monitor,{className:"mr-2 h-4 w-4"}),t.modeToggle_system]})]})]})}const Zu=[{value:"light",icon:A.Sun,key:"modeToggle_light"},{value:"dark",icon:A.Moon,key:"modeToggle_dark"},{value:"system",icon:A.Monitor,key:"modeToggle_system"}];function Ju({className:e}){const{theme:n,setTheme:t,themes:o}=ln(),s=Z();return r.jsx("div",{className:x("inline-flex items-center rounded-lg border border-border bg-muted/50 p-0.5 gap-0.5",e),role:"radiogroup","aria-label":s.modeToggle_colorTheme,children:Zu.filter(a=>o.includes(a.value)).map(({value:a,icon:i,key:l})=>{const c=s[l];return r.jsxs("button",{role:"radio","aria-checked":n===a,"aria-label":c,onClick:()=>t(a),className:x("inline-flex items-center justify-center rounded-md px-2.5 py-1.5 text-sm font-medium transition-all","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n===a?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-background/50"),children:[r.jsx(i,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:c})]},a)})})}const Ha=v.forwardRef(({className:e,variant:n="received",children:t,...o},s)=>r.jsx("div",{ref:s,className:x("group flex gap-2 max-w-[85%]",n==="sent"?"ml-auto flex-row-reverse":"mr-auto",e),"data-variant":n,...o,children:t}));Ha.displayName="ChatBubble";const Ga=v.forwardRef(({className:e,src:n,fallback:t,...o},s)=>r.jsx("div",{ref:s,className:x("flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-medium text-muted-foreground overflow-hidden",e),...o,children:n?r.jsx("img",{src:n,alt:t??"avatar",className:"h-full w-full object-cover"}):r.jsx("span",{children:t??"?"})}));Ga.displayName="ChatBubbleAvatar";const Qu={sending:r.jsxs("svg",{className:"h-3 w-3 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"12",r:"10"}),r.jsx("path",{d:"M12 6v6l4 2"})]}),sent:r.jsx("svg",{className:"h-3 w-3 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M20 6 9 17l-5-5"})}),delivered:r.jsxs("svg",{className:"h-3 w-3 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M18 6 7 17l-5-5"}),r.jsx("path",{d:"m22 10-9.5 9.5-2-2"})]}),read:r.jsxs("svg",{className:"h-3 w-3 text-primary",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M18 6 7 17l-5-5"}),r.jsx("path",{d:"m22 10-9.5 9.5-2-2"})]}),error:r.jsxs("svg",{className:"h-3 w-3 text-destructive",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"12",r:"10"}),r.jsx("path",{d:"m15 9-6 6"}),r.jsx("path",{d:"m9 9 6 6"})]})},qa=v.forwardRef(({className:e,variant:n="received",isLoading:t,status:o,children:s,...a},i)=>r.jsx("div",{ref:i,className:x("rounded-2xl px-4 py-2.5 text-sm leading-relaxed",n==="sent"?"bg-primary text-primary-foreground rounded-br-md":"bg-muted text-foreground rounded-bl-md",e),...a,children:t?r.jsxs("div",{className:"flex items-center gap-1 py-1",children:[r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:0ms]"}),r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:150ms]"}),r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:300ms]"})]}):r.jsxs(r.Fragment,{children:[s,o&&r.jsx("div",{className:"flex justify-end mt-1",children:Qu[o]})]})}));qa.displayName="ChatBubbleMessage";const Wa=v.forwardRef(({className:e,...n},t)=>r.jsx("span",{ref:t,className:x("text-[10px] text-muted-foreground mt-1 px-1",e),...n}));Wa.displayName="ChatBubbleTimestamp";const Ua=v.forwardRef(({visibility:e="hover",className:n,children:t,...o},s)=>r.jsx("div",{ref:s,className:x("flex items-center gap-0.5 mt-0.5",e==="hover"&&"opacity-0 group-hover:opacity-100 transition-opacity",n),...o,children:t}));Ua.displayName="ChatBubbleActions";const Ya=v.forwardRef(({onSend:e,placeholder:n,disabled:t,isLoading:o,showAttach:s,onAttach:a,acceptFiles:i="*",onStop:l,value:c,onChange:d,headerSlot:g,footerSlot:u,maxLength:f,className:m},p)=>{const h=Z(),w=v.useRef(null),b=v.useRef(null),[y,N]=v.useState(""),R=c!==void 0,_=R?c:y,S=M=>{R?d==null||d(M):N(M)},k=()=>{const M=w.current;M&&(M.style.height="auto",M.style.height=Math.min(M.scrollHeight,160)+"px")},C=()=>{const M=_.trim();!M||t||o||(e==null||e(M),S(""),w.current&&(w.current.style.height="auto"))},D=M=>{M.key==="Enter"&&!M.shiftKey&&(M.preventDefault(),C())},G=()=>{var M;(M=b.current)==null||M.click()},E=M=>{M.target.files&&M.target.files.length>0&&(a==null||a(M.target.files)),M.target.value=""},J=_.length,Q=f?J>f:!1;return r.jsxs("div",{ref:p,className:x("rounded-xl border border-border bg-background",m),children:[g&&r.jsx("div",{className:"px-3 pt-2 pb-1 border-b border-border/40",children:g}),r.jsxs("div",{className:"flex items-end gap-2 p-2",children:[s&&r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",onClick:G,className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted transition-colors","aria-label":h.chatInput_attachFile,disabled:t,children:r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"})})}),r.jsx("input",{ref:b,type:"file",multiple:!0,accept:i,onChange:E,className:"hidden","aria-hidden":"true"})]}),r.jsx("textarea",{ref:w,value:_,onChange:M=>{S(M.target.value),k()},onKeyDown:D,placeholder:n??h.chatInput_placeholder,disabled:t||o,rows:1,className:"flex-1 resize-none bg-transparent text-sm outline-none placeholder:text-muted-foreground min-h-[36px] py-2 px-2 max-h-40"}),o&&l?r.jsx("button",{type:"button",onClick:l,className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-destructive/10 text-destructive hover:bg-destructive/20 transition-colors","aria-label":h.chatInput_stopGenerating,children:r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})})}):r.jsx("button",{type:"button",onClick:C,disabled:t||o||!_.trim()||Q,className:x("flex h-9 w-9 shrink-0 items-center justify-center rounded-lg transition-colors",_.trim()&&!t&&!o&&!Q?"bg-primary text-primary-foreground hover:bg-primary/90":"bg-muted text-muted-foreground cursor-not-allowed"),"aria-label":h.chatInput_sendMessage,children:o?r.jsx("svg",{className:"animate-spin",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}):r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"m5 12 7-7 7 7"}),r.jsx("path",{d:"M12 19V5"})]})})]}),(u||f)&&r.jsxs("div",{className:"px-3 pb-2 pt-0.5 flex items-center gap-2",children:[r.jsx("div",{className:"flex-1",children:u}),f&&r.jsxs("span",{className:x("text-[10px] tabular-nums shrink-0",Q?"text-destructive font-medium":"text-muted-foreground"),children:[J,"/",f]})]})]})});Ya.displayName="ChatInput";const Xa=v.forwardRef(({className:e,children:n,...t},o)=>r.jsx("div",{ref:o,className:x("flex flex-col h-full",e),...t,children:n}));Xa.displayName="ChatContainer";const Ka=v.forwardRef(({className:e,children:n,autoScroll:t=!0,...o},s)=>{const a=v.useRef(null),i=v.Children.count(n);return v.useEffect(()=>{t&&a.current&&a.current.scrollIntoView({behavior:"smooth"})},[i,t]),r.jsx(eo,{className:"flex-1",orientation:"vertical",children:r.jsxs("div",{ref:s,className:x("flex flex-col gap-4 p-4",e),...o,children:[n,r.jsx("div",{ref:a})]})})});Ka.displayName="ChatList";const Za=v.forwardRef(({className:e,variant:n="dots",text:t,...o},s)=>{const a=Z(),i=t??a.aiLoading_thinking;return n==="text"?r.jsxs("div",{ref:s,className:x("flex items-center gap-1.5 text-sm text-muted-foreground",e),...o,children:[r.jsx("svg",{className:"animate-spin h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),r.jsxs("span",{className:"animate-pulse",children:[i,"…"]})]}):r.jsxs("div",{ref:s,className:x("flex items-center gap-1",e),...o,children:[r.jsx("span",{className:"h-2 w-2 rounded-full bg-muted-foreground/60 animate-bounce [animation-delay:0ms]"}),r.jsx("span",{className:"h-2 w-2 rounded-full bg-muted-foreground/60 animate-bounce [animation-delay:150ms]"}),r.jsx("span",{className:"h-2 w-2 rounded-full bg-muted-foreground/60 animate-bounce [animation-delay:300ms]"})]})});Za.displayName="AILoading";function ot(e){const n=[],t=/(`[^`]+`)|(\~\~[^~]+\~\~)|(\*\*[^*]+\*\*)|(\*[^*]+\*)|(!\[[^\]]*\]\([^)]+\))|(\[[^\]]+\]\([^)]+\))/g;let o=0,s;for(;(s=t.exec(e))!==null;){s.index>o&&n.push(e.slice(o,s.index));const a=s[0];if(a.startsWith("`"))n.push(r.jsx("code",{className:"px-1 py-0.5 rounded bg-muted text-sm font-mono",children:a.slice(1,-1)},s.index));else if(a.startsWith("~~"))n.push(r.jsx("del",{className:"text-muted-foreground",children:a.slice(2,-2)},s.index));else if(a.startsWith("**"))n.push(r.jsx("strong",{children:a.slice(2,-2)},s.index));else if(a.startsWith("*"))n.push(r.jsx("em",{children:a.slice(1,-1)},s.index));else if(a.startsWith("![")){const i=a.indexOf("]"),l=a.slice(2,i),c=a.slice(i+2,-1);n.push(r.jsx("img",{src:c,alt:l,className:"max-w-full rounded-lg my-2 inline-block",loading:"lazy"},s.index))}else if(a.startsWith("[")){const i=a.indexOf("]"),l=a.slice(1,i),c=a.slice(i+2,-1);n.push(r.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline underline-offset-2 hover:text-primary/80",children:l},s.index))}o=s.index+a.length}return o<e.length&&n.push(e.slice(o)),n}function em(e){const n=e.split(`
|
|
36
|
+
`),t=[];let o=0,s=0;for(;o<n.length;){const a=n[o];if(a.trimStart().startsWith("```")){const l=a.trimStart().slice(3).trim(),c=[];for(o++;o<n.length&&!n[o].trimStart().startsWith("```");)c.push(n[o]),o++;o++,t.push(r.jsx("pre",{className:"overflow-x-auto rounded-lg p-4 text-[13px] leading-relaxed font-mono my-3",style:{background:"var(--cb-bg, #1e1e2e)",color:"var(--cb-plain, #d4d4d4)"},children:r.jsx("code",{"data-language":l||void 0,children:c.join(`
|
|
37
|
+
`)})},s++));continue}const i=a.match(/^(#{1,6})\s+(.*)/);if(i){const l=i[1].length,c=i[2],d=`h${l}`,g={1:"text-2xl font-bold mt-6 mb-3",2:"text-xl font-semibold mt-5 mb-2",3:"text-lg font-semibold mt-4 mb-2",4:"text-base font-semibold mt-3 mb-1",5:"text-sm font-semibold mt-2 mb-1",6:"text-sm font-medium mt-2 mb-1"};t.push(r.jsx(d,{className:g[l],children:ot(c)},s++)),o++;continue}if(/^[\s]*[-*]\s/.test(a)){const l=[];for(;o<n.length&&/^[\s]*[-*]\s/.test(n[o]);)l.push(r.jsx("li",{children:ot(n[o].replace(/^[\s]*[-*]\s/,""))},s++)),o++;t.push(r.jsx("ul",{className:"list-disc pl-5 space-y-1 my-2 text-sm",children:l},s++));continue}if(/^\s*\d+\.\s/.test(a)){const l=[];for(;o<n.length&&/^\s*\d+\.\s/.test(n[o]);)l.push(r.jsx("li",{children:ot(n[o].replace(/^\s*\d+\.\s/,""))},s++)),o++;t.push(r.jsx("ol",{className:"list-decimal pl-5 space-y-1 my-2 text-sm",children:l},s++));continue}if(a.startsWith(">")){const l=[];for(;o<n.length&&n[o].startsWith(">");)l.push(n[o].replace(/^>\s?/,"")),o++;t.push(r.jsx("blockquote",{className:"border-l-4 border-primary/40 pl-4 italic text-muted-foreground my-3 text-sm",children:ot(l.join(" "))},s++));continue}if(a.includes("|")&&o+1<n.length&&/^\s*\|?[\s\-:|]+\|/.test(n[o+1])){const l=[];for(;o<n.length&&n[o].includes("|");)l.push(n[o]),o++;if(l.length>=2){const c=u=>u.split("|").map(f=>f.trim()).filter((f,m,p)=>m>0&&m<p.length),d=c(l[0]),g=l.slice(2).map(c);t.push(r.jsx("div",{className:"overflow-x-auto my-3",children:r.jsxs("table",{className:"w-full text-sm border-collapse",children:[r.jsx("thead",{children:r.jsx("tr",{className:"border-b border-border",children:d.map((u,f)=>r.jsx("th",{className:"px-3 py-2 text-left font-semibold text-foreground",children:ot(u)},f))})}),r.jsx("tbody",{children:g.map((u,f)=>r.jsx("tr",{className:"border-b border-border/50",children:u.map((m,p)=>r.jsx("td",{className:"px-3 py-2 text-muted-foreground",children:ot(m)},p))},f))})]})},s++));continue}}if(/^[-*_]{3,}\s*$/.test(a)){t.push(r.jsx("hr",{className:"my-4 border-border"},s++)),o++;continue}if(a.trim()===""){o++;continue}t.push(r.jsx("p",{className:"text-sm leading-relaxed my-2",children:ot(a)},s++)),o++}return t}const Ja=v.forwardRef(({content:e,streaming:n,className:t,...o},s)=>{const a=n?e:e.trim(),i=v.useMemo(()=>{try{return em(a)}catch{return[v.createElement("p",{className:"text-sm"},a)]}},[a]);return r.jsx("div",{ref:s,className:x("markdown-renderer",t),...o,children:i})});Ja.displayName="MarkdownRenderer";const Qa=v.forwardRef(({suggestions:e,onSelect:n,columns:t=2,className:o,...s},a)=>{const i={1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"};return r.jsx("div",{ref:a,className:x("grid gap-3",i[t],o),...s,children:e.map((l,c)=>r.jsxs("button",{type:"button",onClick:()=>n==null?void 0:n(l.prompt),className:x("flex flex-col items-start gap-1 rounded-xl border border-border p-4","bg-card text-left transition-colors hover:bg-muted/60 hover:border-primary/30","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"),children:[r.jsx("span",{className:"text-sm font-medium text-foreground",children:l.title}),l.description&&r.jsx("span",{className:"text-xs text-muted-foreground line-clamp-2",children:l.description})]},c))})});Qa.displayName="PromptSuggestions";const ei=v.forwardRef(({models:e,value:n,onChange:t,placeholder:o,compact:s,className:a,...i},l)=>{const c=Z(),[d,g]=v.useState(!1),[u,f]=v.useState(""),m=v.useRef(null),p=v.useRef(null),h=e.find(y=>y.id===n),w=v.useMemo(()=>{if(!u)return e;const y=u.toLowerCase();return e.filter(N=>{var R;return N.name.toLowerCase().includes(y)||((R=N.provider)==null?void 0:R.toLowerCase().includes(y))||N.id.toLowerCase().includes(y)})},[e,u]);v.useEffect(()=>{d&&(f(""),setTimeout(()=>{var y;return(y=p.current)==null?void 0:y.focus()},0))},[d]),v.useEffect(()=>{if(!d)return;const y=N=>{m.current&&!m.current.contains(N.target)&&g(!1)};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[d]);const b=y=>{y.key==="Escape"&&g(!1)};return r.jsxs("div",{ref:m,className:x("relative",a),...i,children:[r.jsxs("button",{ref:l,type:"button",onClick:()=>g(y=>!y),className:x("flex items-center gap-2 rounded-lg border border-border bg-background px-3 py-1.5 text-sm transition-colors hover:bg-muted","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",!h&&"text-muted-foreground"),children:[h?r.jsxs(r.Fragment,{children:[h.icon&&r.jsx("span",{className:"text-base shrink-0",children:h.icon}),r.jsx("span",{className:"font-medium truncate",children:h.name}),!s&&h.provider&&r.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",h.provider,")"]})]}):r.jsx("span",{children:o??c.modelSelector_placeholder}),r.jsx("svg",{className:x("h-3.5 w-3.5 ml-auto shrink-0 text-muted-foreground transition-transform",d&&"rotate-180"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"m6 9 6 6 6-6"})})]}),d&&r.jsxs("div",{className:"absolute z-50 mt-1 w-full min-w-[260px] rounded-xl border border-border bg-popover shadow-lg animate-in fade-in-0 zoom-in-95",onKeyDown:b,children:[r.jsx("div",{className:"p-2 border-b border-border",children:r.jsx("input",{ref:p,value:u,onChange:y=>f(y.target.value),placeholder:c.modelSelector_searchPlaceholder,className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground px-2 py-1"})}),r.jsxs("div",{className:"max-h-[280px] overflow-auto p-1",children:[w.length===0&&r.jsx("div",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:c.modelSelector_noResults}),w.map(y=>r.jsxs("button",{type:"button",disabled:y.disabled,onClick:()=>{t==null||t(y.id),g(!1)},className:x("flex w-full items-start gap-3 rounded-lg px-3 py-2.5 text-left text-sm transition-colors","hover:bg-muted focus-visible:outline-none focus-visible:bg-muted",y.id===n&&"bg-primary/10",y.disabled&&"opacity-50 cursor-not-allowed"),children:[y.icon&&r.jsx("span",{className:"text-lg shrink-0 mt-0.5",children:y.icon}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"font-medium truncate",children:y.name}),y.id===n&&r.jsx("svg",{className:"h-4 w-4 text-primary shrink-0",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M20 6 9 17l-5-5"})})]}),y.provider&&r.jsx("span",{className:"text-xs text-muted-foreground",children:y.provider}),y.description&&r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 line-clamp-2",children:y.description}),y.badges&&y.badges.length>0&&r.jsx("div",{className:"flex flex-wrap gap-1 mt-1.5",children:y.badges.map(N=>r.jsx("span",{className:"inline-flex items-center rounded-full border border-border px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",children:N},N))})]})]},y.id))]})]})]})});ei.displayName="ModelSelector";const ti=v.forwardRef(({modes:e,value:n,onChange:t,size:o="default",className:s,...a},i)=>r.jsx("div",{ref:i,className:x("inline-flex items-center gap-1 rounded-lg bg-muted/50 p-1",s),role:"radiogroup",...a,children:e.map(l=>{const c=l.id===n;return r.jsxs("button",{type:"button",role:"radio","aria-checked":c,onClick:()=>t==null?void 0:t(l.id),title:l.description,className:x("rounded-md transition-all text-sm font-medium whitespace-nowrap","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",o==="sm"?"px-2.5 py-1 text-xs":"px-3 py-1.5",c?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[l.icon&&r.jsx("span",{className:"mr-1",children:l.icon}),l.label]},l.id)})}));ti.displayName="ChatModeSelector";const ni=v.forwardRef(({question:e,options:n,onSelect:t,selected:o,allowFreeText:s,onFreeTextSubmit:a,columns:i=1,className:l,...c},d)=>{const g=Z(),[u,f]=v.useState(""),m=!!o,p=()=>{const h=u.trim();h&&(a==null||a(h),f(""))};return r.jsxs("div",{ref:d,className:x("rounded-2xl bg-muted text-foreground rounded-bl-md px-4 py-3 max-w-[85%]",l),...c,children:[r.jsx("p",{className:"text-sm leading-relaxed mb-3",children:e}),r.jsx("div",{className:x("grid gap-2",i===2?"grid-cols-1 sm:grid-cols-2":"grid-cols-1"),children:n.map(h=>{const w=h.id===o;return r.jsxs("button",{type:"button",disabled:m,onClick:()=>t==null?void 0:t(h.id,h.label),className:x("flex items-center gap-2 rounded-xl border px-3 py-2 text-left text-sm transition-all","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",w?"border-primary bg-primary/10 text-primary font-medium":m?"border-border/50 text-muted-foreground opacity-50 cursor-default":"border-border bg-background hover:border-primary/40 hover:bg-primary/5 cursor-pointer"),children:[w&&r.jsx("svg",{className:"h-4 w-4 shrink-0 text-primary",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M20 6 9 17l-5-5"})}),!w&&r.jsx("span",{className:x("h-4 w-4 shrink-0 rounded-full border-2",m?"border-border/50":"border-border")}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("span",{className:"block truncate",children:h.label}),h.description&&r.jsx("span",{className:"block text-xs text-muted-foreground mt-0.5 line-clamp-1",children:h.description})]})]},h.id)})}),s&&!m&&r.jsxs("div",{className:"flex gap-2 mt-2",children:[r.jsx("input",{type:"text",value:u,onChange:h=>f(h.target.value),onKeyDown:h=>{h.key==="Enter"&&p()},placeholder:g.followUp_freeTextPlaceholder,className:"flex-1 bg-background rounded-lg border border-border px-3 py-1.5 text-sm outline-none placeholder:text-muted-foreground focus:border-primary/40"}),r.jsx("button",{type:"button",onClick:p,disabled:!u.trim(),className:x("rounded-lg px-3 py-1.5 text-sm font-medium transition-colors",u.trim()?"bg-primary text-primary-foreground hover:bg-primary/90":"bg-muted text-muted-foreground cursor-not-allowed"),children:g.followUp_send})]})]})});ni.displayName="ChatFollowUp";const tm={copy:{path:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2 M9 2h6a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z"},retry:{path:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8 M3 3v5h5"},edit:{path:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"},like:{path:"M7 10v12 M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2h0a3.13 3.13 0 0 1 3 3.88Z"},dislike:{path:"M17 14V2 M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22h0a3.13 3.13 0 0 1-3-3.88Z"},share:{path:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8 M16 6l-4-4-4 4 M12 2v13"}},oi=v.forwardRef(({actions:e=["copy"],content:n,likeState:t,onCopy:o,onRetry:s,onEdit:a,onLike:i,onDislike:l,onShare:c,visibility:d="hover",className:g,...u},f)=>{const m=Z(),[p,h]=v.useState(!1),w={copy:m.messageActions_copy,retry:m.messageActions_retry,edit:m.messageActions_edit,like:m.messageActions_like,dislike:m.messageActions_dislike,share:m.messageActions_share},y={copy:async()=>{if(n)try{await navigator.clipboard.writeText(n),h(!0),setTimeout(()=>h(!1),2e3)}catch{}o==null||o()},retry:s,edit:a,like:i,dislike:l,share:c};return r.jsx("div",{ref:f,className:x("flex items-center gap-0.5",d==="hover"&&"opacity-0 group-hover:opacity-100 transition-opacity",g),...u,children:e.map(N=>{const R=N==="copy"&&p,k=N==="like"&&t==="liked"||N==="dislike"&&t==="disliked";return r.jsx("button",{type:"button",onClick:y[N],"aria-label":w[N],title:R?m.messageActions_copied:w[N],className:x("inline-flex items-center justify-center h-7 w-7 rounded-md transition-colors","text-muted-foreground hover:text-foreground hover:bg-muted","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",k&&"text-primary",R&&"text-green-500"),children:R?r.jsx("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M20 6 9 17l-5-5"})}):r.jsx("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:k?"currentColor":"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:tm[N].path})})},N)})})});oi.displayName="MessageActions";const ri=v.forwardRef(({text:e,speed:n=2,onComplete:t,cursor:o=!0,immediate:s=!1,className:a,...i},l)=>{const[c,d]=v.useState(s?e:""),[g,u]=v.useState(s),f=v.useRef(e),m=v.useRef(),p=v.useRef(s?e.length:0);return v.useEffect(()=>{if(e!==f.current){if(f.current=e,s){d(e),u(!0),p.current=e.length;return}e.startsWith(c)||(p.current=0,d("")),u(!1)}},[e,s,c]),v.useEffect(()=>{if(s||g)return;const h=()=>{const w=Math.min(p.current+n,e.length);p.current=w,d(e.slice(0,w)),w>=e.length?(u(!0),t==null||t()):m.current=requestAnimationFrame(h)};return m.current=requestAnimationFrame(h),()=>{m.current&&cancelAnimationFrame(m.current)}},[e,n,s,g,t]),r.jsxs("span",{ref:l,className:x("whitespace-pre-wrap",a),...i,children:[c,o&&!g&&r.jsx("span",{className:"inline-block w-[2px] h-[1em] bg-foreground ml-px align-text-bottom animate-pulse"})]})});ri.displayName="StreamingText";const si=v.forwardRef(({content:e,isThinking:n,duration:t,defaultOpen:o=!1,title:s,className:a,...i},l)=>{const c=Z(),[d,g]=v.useState(o||n===!0),[u,f]=v.useState(t??0),m=v.useRef(Date.now());v.useEffect(()=>{n&&g(!0)},[n]),v.useEffect(()=>{if(!n)return;m.current=Date.now();const w=setInterval(()=>{f(Math.floor((Date.now()-m.current)/1e3))},1e3);return()=>clearInterval(w)},[n]);const p=n?u:t??u,h=w=>w<60?`${w}s`:`${Math.floor(w/60)}m ${w%60}s`;return r.jsxs("div",{ref:l,className:x("rounded-xl border border-border/60 overflow-hidden my-2",n&&"border-primary/30",a),...i,children:[r.jsxs("button",{type:"button",onClick:()=>g(w=>!w),className:x("flex items-center gap-2 w-full px-3 py-2 text-sm transition-colors","hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",n&&"bg-primary/5"),children:[r.jsxs("svg",{className:x("h-4 w-4 shrink-0 text-muted-foreground",n&&"text-primary animate-pulse"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z"}),r.jsx("path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z"}),r.jsx("path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4"}),r.jsx("path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375"}),r.jsx("path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5"}),r.jsx("path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396"}),r.jsx("path",{d:"M19.938 10.5a4 4 0 0 1 .585.396"}),r.jsx("path",{d:"M6 18a4 4 0 0 1-1.967-.516"}),r.jsx("path",{d:"M19.967 17.484A4 4 0 0 1 18 18"})]}),r.jsx("span",{className:x("font-medium",n&&"text-primary animate-pulse"),children:n?c.reasoning_thinking:s??c.reasoning_title}),p>0&&r.jsx("span",{className:"text-xs text-muted-foreground",children:n?`${h(p)}...`:Be(c.reasoning_thoughtFor,{duration:h(p)})}),r.jsx("svg",{className:x("h-3.5 w-3.5 ml-auto shrink-0 text-muted-foreground transition-transform duration-200",d&&"rotate-180"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"m6 9 6 6 6-6"})})]}),d&&r.jsx("div",{className:"border-t border-border/40 px-4 py-3 bg-muted/20",children:r.jsx("div",{className:"border-l-2 border-primary/20 pl-3",children:r.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed whitespace-pre-wrap",children:[e,n&&r.jsx("span",{className:"inline-block w-[2px] h-[1em] bg-muted-foreground ml-px align-text-bottom animate-pulse"})]})})})]})});si.displayName="ReasoningBlock";const ai=v.forwardRef(({name:e,args:n,result:t,status:o,error:s,defaultOpen:a=!1,className:i,...l},c)=>{const d=Z(),[g,u]=v.useState(a),f={running:r.jsx("svg",{className:"h-3.5 w-3.5 animate-spin text-primary",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),success:r.jsx("svg",{className:"h-3.5 w-3.5 text-green-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M20 6 9 17l-5-5"})}),error:r.jsxs("svg",{className:"h-3.5 w-3.5 text-destructive",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M18 6 6 18"}),r.jsx("path",{d:"m6 6 12 12"})]})},m={running:Be(d.toolCall_calling,{name:e}),success:e,error:Be(d.toolCall_failed,{name:e})};return r.jsxs("div",{ref:c,className:x("rounded-xl border overflow-hidden my-1",o==="error"?"border-destructive/30":"border-border/60",i),...l,children:[r.jsxs("button",{type:"button",onClick:()=>u(p=>!p),className:x("flex items-center gap-2 w-full px-3 py-2 text-sm transition-colors","hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:[r.jsx("svg",{className:"h-4 w-4 shrink-0 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})}),f[o],r.jsx("span",{className:x("font-medium font-mono text-xs",o==="running"&&"text-primary",o==="error"&&"text-destructive"),children:m[o]}),r.jsx("svg",{className:x("h-3.5 w-3.5 ml-auto shrink-0 text-muted-foreground transition-transform duration-200",g&&"rotate-180"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"m6 9 6 6 6-6"})})]}),g&&r.jsxs("div",{className:"border-t border-border/40 text-xs",children:[n&&Object.keys(n).length>0&&r.jsxs("div",{className:"px-3 py-2 bg-muted/20",children:[r.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1 font-semibold",children:d.toolCall_arguments}),r.jsx("pre",{className:"overflow-x-auto font-mono text-foreground/80 whitespace-pre-wrap",children:JSON.stringify(n,null,2)})]}),t&&r.jsxs("div",{className:x("px-3 py-2",n&&"border-t border-border/30"),children:[r.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1 font-semibold",children:d.toolCall_result}),r.jsx("pre",{className:"overflow-x-auto font-mono text-foreground/80 whitespace-pre-wrap",children:t})]}),s&&r.jsxs("div",{className:x("px-3 py-2 bg-destructive/5",n&&"border-t border-border/30"),children:[r.jsx("div",{className:"text-[10px] uppercase tracking-wider text-destructive mb-1 font-semibold",children:d.toolCall_error}),r.jsx("pre",{className:"overflow-x-auto font-mono text-destructive whitespace-pre-wrap",children:s})]})]})]})});ai.displayName="ChatToolCall";function nm(e,n){const t=new Date,o=new Date(t.getFullYear(),t.getMonth(),t.getDate()),s=new Date(o.getTime()-864e5),a=new Date(o.getTime()-7*864e5),i=[{label:n[0],items:[]},{label:n[1],items:[]},{label:n[2],items:[]},{label:n[3],items:[]}],l=[...e].sort((c,d)=>d.updatedAt.getTime()-c.updatedAt.getTime());for(const c of l){const d=c.updatedAt;d>=o?i[0].items.push(c):d>=s?i[1].items.push(c):d>=a?i[2].items.push(c):i[3].items.push(c)}return i.filter(c=>c.items.length>0)}const ii=v.forwardRef(({conversations:e,activeId:n,onSelect:t,onNew:o,onDelete:s,onRename:a,showSearch:i=!0,className:l,...c},d)=>{const g=Z(),[u,f]=v.useState(""),[m,p]=v.useState(null),[h,w]=v.useState(""),b=v.useRef(null),y=v.useMemo(()=>{if(!u)return e;const k=u.toLowerCase();return e.filter(C=>{var D;return C.title.toLowerCase().includes(k)||((D=C.lastMessage)==null?void 0:D.toLowerCase().includes(k))})},[e,u]),N=[g.conversationList_today,g.conversationList_yesterday,g.conversationList_previous7Days,g.conversationList_older],R=v.useMemo(()=>nm(y,N),[y,N]),_=k=>{p(k.id),w(k.title),setTimeout(()=>{var C;return(C=b.current)==null?void 0:C.focus()},0)},S=()=>{m&&h.trim()&&(a==null||a(m,h.trim())),p(null)};return r.jsxs("div",{ref:d,className:x("flex flex-col h-full",l),...c,children:[o&&r.jsx("div",{className:"p-3 border-b border-border shrink-0",children:r.jsxs("button",{type:"button",onClick:o,className:x("flex items-center justify-center gap-2 w-full rounded-lg border border-border px-3 py-2 text-sm font-medium","transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:[r.jsxs("svg",{className:"h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M5 12h14"}),r.jsx("path",{d:"M12 5v14"})]}),g.conversationList_newChat]})}),i&&r.jsx("div",{className:"px-3 pt-3 pb-2 shrink-0",children:r.jsxs("div",{className:"relative",children:[r.jsxs("svg",{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"11",cy:"11",r:"8"}),r.jsx("path",{d:"m21 21-4.3-4.3"})]}),r.jsx("input",{value:u,onChange:k=>f(k.target.value),placeholder:g.conversationList_searchPlaceholder,className:"w-full bg-muted/50 rounded-lg pl-8 pr-3 py-1.5 text-sm outline-none placeholder:text-muted-foreground focus:bg-muted"})]})}),r.jsxs("div",{className:"flex-1 overflow-auto px-2 py-1",children:[R.length===0&&r.jsx("div",{className:"px-3 py-8 text-center text-sm text-muted-foreground",children:u?g.conversationList_noResults:g.conversationList_empty}),R.map(k=>r.jsxs("div",{className:"mb-3",children:[r.jsx("div",{className:"px-2 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:k.label}),k.items.map(C=>{const D=C.id===n,G=C.id===m;return r.jsxs("div",{className:x("group flex items-center gap-2 rounded-lg px-2 py-2 cursor-pointer transition-colors",D?"bg-primary/10":"hover:bg-muted"),onClick:()=>!G&&(t==null?void 0:t(C.id)),children:[r.jsx("svg",{className:"h-4 w-4 shrink-0 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z"})}),r.jsx("div",{className:"flex-1 min-w-0",children:G?r.jsx("input",{ref:b,value:h,onChange:E=>w(E.target.value),onBlur:S,onKeyDown:E=>{E.key==="Enter"&&S(),E.key==="Escape"&&p(null)},className:"w-full bg-background border border-border rounded px-1 py-0.5 text-sm outline-none",onClick:E=>E.stopPropagation()}):r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"text-sm truncate font-medium",children:C.title}),C.lastMessage&&r.jsx("div",{className:"text-xs text-muted-foreground truncate",children:C.lastMessage})]})}),!G&&r.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[a&&r.jsx("button",{type:"button",onClick:E=>{E.stopPropagation(),_(C)},className:"h-6 w-6 flex items-center justify-center rounded text-muted-foreground hover:text-foreground hover:bg-muted","aria-label":g.conversationList_rename,children:r.jsx("svg",{className:"h-3 w-3",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"})})}),s&&r.jsx("button",{type:"button",onClick:E=>{E.stopPropagation(),s(C.id)},className:"h-6 w-6 flex items-center justify-center rounded text-muted-foreground hover:text-destructive hover:bg-destructive/10","aria-label":g.conversationList_delete,children:r.jsxs("svg",{className:"h-3 w-3",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M3 6h18"}),r.jsx("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),r.jsx("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"})]})})]})]},C.id)})]},k.label))]})]})});ii.displayName="ConversationList";const om={online:"bg-green-500",offline:"bg-muted-foreground/40",typing:"bg-primary animate-pulse"},li=v.forwardRef(({title:e,model:n,modelIcon:t,status:o,onClear:s,onSettings:a,onBack:i,children:l,className:c,...d},g)=>{const u=Z(),f={online:u.chatHeader_online,offline:u.chatHeader_offline,typing:u.chatHeader_typing};return r.jsxs("div",{ref:g,className:x("flex items-center gap-3 px-4 h-14 border-b border-border shrink-0 bg-background",c),...d,children:[i&&r.jsx("button",{type:"button",onClick:i,className:"h-8 w-8 flex items-center justify-center rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted transition-colors -ml-1 shrink-0","aria-label":u.chatHeader_back,children:r.jsx("svg",{className:"h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"m15 18-6-6 6-6"})})}),t&&r.jsx("span",{className:"text-xl shrink-0",children:t}),r.jsxs("div",{className:"flex-1 min-w-0",children:[e&&r.jsx("div",{className:"text-sm font-semibold truncate",children:e}),r.jsxs("div",{className:"flex items-center gap-1.5",children:[n&&r.jsx("span",{className:"text-xs text-muted-foreground truncate",children:n}),o&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx("span",{className:x("h-1.5 w-1.5 rounded-full shrink-0",om[o])}),r.jsx("span",{className:"text-[10px] text-muted-foreground",children:f[o]})]})]})]}),l,r.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[s&&r.jsx("button",{type:"button",onClick:s,className:"h-8 w-8 flex items-center justify-center rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted transition-colors","aria-label":u.chatHeader_clearConversation,title:u.chatHeader_clearConversation,children:r.jsxs("svg",{className:"h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M3 6h18"}),r.jsx("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),r.jsx("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"})]})}),a&&r.jsx("button",{type:"button",onClick:a,className:"h-8 w-8 flex items-center justify-center rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted transition-colors","aria-label":u.chatHeader_settings,title:u.chatHeader_settings,children:r.jsxs("svg",{className:"h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),r.jsx("circle",{cx:"12",cy:"12",r:"3"})]})})]})]})});li.displayName="ChatHeader";const Co=v.forwardRef(({citation:e,className:n,...t},o)=>{const[s,a]=v.useState(!1);return r.jsxs("span",{className:"relative inline-block",children:[r.jsx("button",{ref:o,type:"button",onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onFocus:()=>a(!0),onBlur:()=>a(!1),onClick:()=>window.open(e.url,"_blank","noopener"),className:x("inline-flex items-center justify-center h-4 min-w-[16px] px-1 rounded text-[10px] font-medium","bg-primary/15 text-primary hover:bg-primary/25 transition-colors cursor-pointer","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","align-super",n),"aria-label":`Source ${e.index}: ${e.title}`,...t,children:e.index}),s&&r.jsxs("div",{className:"absolute z-50 bottom-full left-1/2 -translate-x-1/2 mb-2 w-64 rounded-lg border border-border bg-popover shadow-lg p-3 text-left animate-in fade-in-0 zoom-in-95",children:[r.jsxs("div",{className:"flex items-start gap-2",children:[e.favicon&&r.jsx("img",{src:e.favicon,alt:"",className:"h-4 w-4 mt-0.5 shrink-0 rounded"}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:e.title}),r.jsx("div",{className:"text-[10px] text-muted-foreground truncate",children:e.url}),e.snippet&&r.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.snippet})]})]}),r.jsx("div",{className:"absolute top-full left-1/2 -translate-x-1/2 border-4 border-transparent border-t-border"})]})]})});Co.displayName="CitationBadge";const di=v.forwardRef(({citations:e,variant:n="footer",className:t,...o},s)=>{const a=Z();return n==="inline"?r.jsx("span",{ref:s,className:x("inline",t),...o,children:e.map(i=>r.jsx(Co,{citation:i},i.index))}):r.jsxs("div",{ref:s,className:x("border-t border-border/50 pt-3 mt-3 space-y-2",t),...o,children:[r.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground font-semibold mb-2",children:a.sourceCitation_sources}),e.map(i=>r.jsxs("a",{href:i.url,target:"_blank",rel:"noopener noreferrer",className:x("flex items-start gap-2.5 rounded-lg border border-border/60 p-2.5 transition-colors","hover:bg-muted/50 hover:border-primary/30"),children:[r.jsx("span",{className:"flex items-center justify-center h-5 w-5 rounded bg-primary/15 text-primary text-[10px] font-semibold shrink-0 mt-0.5",children:i.index}),r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[i.favicon&&r.jsx("img",{src:i.favicon,alt:"",className:"h-3.5 w-3.5 rounded shrink-0"}),r.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:i.title})]}),r.jsx("span",{className:"text-[10px] text-muted-foreground truncate block",children:i.url}),i.snippet&&r.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:i.snippet})]})]},i.index))]})});di.displayName="SourceCitation";function Oo(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Ho(e){return e.startsWith("image/")}function Go(e){return e.startsWith("image/")?"🖼️":e.startsWith("video/")?"🎬":e.startsWith("audio/")?"🎵":e.includes("pdf")?"📄":e.includes("zip")||e.includes("rar")||e.includes("tar")?"📦":e.includes("json")||e.includes("xml")||e.includes("csv")?"📊":e.includes("text")||e.includes("javascript")||e.includes("typescript")?"📝":"📎"}const ci=v.forwardRef(({files:e,onRemove:n,variant:t="compact",className:o,...s},a)=>{const i=Z();return e.length===0?null:t==="grid"?r.jsx("div",{ref:a,className:x("grid grid-cols-2 gap-2",o),...s,children:e.map((l,c)=>r.jsxs("div",{className:"group relative rounded-xl border border-border overflow-hidden bg-muted/30",children:[Ho(l.type)&&(l.thumbnail||l.url)?r.jsx("div",{className:"aspect-square",children:r.jsx("img",{src:l.thumbnail||l.url,alt:l.name,className:"h-full w-full object-cover"})}):r.jsx("div",{className:"aspect-square flex items-center justify-center text-3xl bg-muted/50",children:Go(l.type)}),r.jsxs("div",{className:"px-2 py-1.5 border-t border-border/40",children:[r.jsx("div",{className:"text-xs font-medium truncate",children:l.name}),r.jsx("div",{className:"text-[10px] text-muted-foreground",children:Oo(l.size)})]}),n&&r.jsx("button",{type:"button",onClick:()=>n(c),className:"absolute top-1.5 right-1.5 h-5 w-5 rounded-full bg-background/80 backdrop-blur flex items-center justify-center text-muted-foreground hover:text-destructive transition-colors opacity-0 group-hover:opacity-100","aria-label":Be(i.filePreview_remove,{name:l.name}),children:r.jsxs("svg",{className:"h-3 w-3",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M18 6 6 18"}),r.jsx("path",{d:"m6 6 12 12"})]})})]},l.id??c))}):r.jsx("div",{ref:a,className:x("flex gap-2 overflow-x-auto pb-1",o),...s,children:e.map((l,c)=>r.jsxs("div",{className:"group relative flex items-center gap-2 rounded-lg border border-border bg-muted/30 px-2.5 py-1.5 shrink-0 max-w-[200px]",children:[Ho(l.type)&&(l.thumbnail||l.url)?r.jsx("img",{src:l.thumbnail||l.url,alt:l.name,className:"h-8 w-8 rounded object-cover shrink-0"}):r.jsx("span",{className:"text-lg shrink-0",children:Go(l.type)}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"text-xs font-medium truncate",children:l.name}),r.jsx("div",{className:"text-[10px] text-muted-foreground",children:Oo(l.size)})]}),n&&r.jsx("button",{type:"button",onClick:()=>n(c),className:"h-5 w-5 rounded-full flex items-center justify-center text-muted-foreground hover:text-destructive transition-colors shrink-0 opacity-0 group-hover:opacity-100","aria-label":Be(i.filePreview_remove,{name:l.name}),children:r.jsxs("svg",{className:"h-3 w-3",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M18 6 6 18"}),r.jsx("path",{d:"m6 6 12 12"})]})})]},l.id??c))})});ci.displayName="FilePreview";const rm={sending:r.jsxs("svg",{className:"h-3 w-3 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"12",r:"10"}),r.jsx("path",{d:"M12 6v6l4 2"})]}),sent:r.jsx("svg",{className:"h-3 w-3 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M20 6 9 17l-5-5"})}),delivered:r.jsxs("svg",{className:"h-3 w-3 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M18 6 7 17l-5-5"}),r.jsx("path",{d:"m22 10-9.5 9.5-2-2"})]}),read:r.jsxs("svg",{className:"h-3 w-3 text-primary",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M18 6 7 17l-5-5"}),r.jsx("path",{d:"m22 10-9.5 9.5-2-2"})]}),error:r.jsxs("svg",{className:"h-3 w-3 text-destructive",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"12",r:"10"}),r.jsx("path",{d:"m15 9-6 6"}),r.jsx("path",{d:"m9 9 6 6"})]})},ui=v.forwardRef(({variant:e="received",avatar:n,avatarFallback:t,content:o,timestamp:s,isLoading:a,status:i,actions:l,textContent:c,likeState:d,onCopy:g,onRetry:u,onEdit:f,onLike:m,onDislike:p,onShare:h,followUp:w,onFollowUpSelect:b,onFollowUpFreeText:y,reasoning:N,toolCalls:R,citations:_,className:S,...k},C)=>{const D=Z(),G=e==="sent",[E,J]=v.useState(!1),Q=async()=>{if(c)try{await navigator.clipboard.writeText(c),J(!0),setTimeout(()=>J(!1),2e3)}catch{}g==null||g()};return r.jsxs("div",{ref:C,className:x("group flex gap-2 max-w-[85%]",G?"ml-auto flex-row-reverse":"mr-auto",S),...k,children:[(n||t)&&r.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-medium text-muted-foreground overflow-hidden",children:n?r.jsx("img",{src:n,alt:t??"avatar",className:"h-full w-full object-cover"}):r.jsx("span",{children:t??"?"})}),r.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[N&&r.jsx("div",{className:x("rounded-xl border border-border/60 overflow-hidden",N.isThinking&&"border-primary/30"),children:r.jsx(sm,{...N})}),R==null?void 0:R.map((M,X)=>r.jsx(am,{...M},X)),r.jsxs("div",{className:x("rounded-2xl px-4 py-2.5 text-sm leading-relaxed",G?"bg-primary text-primary-foreground rounded-br-md":"bg-muted text-foreground rounded-bl-md"),children:[a?r.jsxs("div",{className:"flex items-center gap-1 py-1",children:[r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:0ms]"}),r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:150ms]"}),r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:300ms]"})]}):o,_&&_.length>0&&r.jsxs("div",{className:"border-t border-border/30 pt-2 mt-2 space-y-1.5",children:[r.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground font-semibold",children:D.sourceCitation_sources}),_.map(M=>r.jsxs("a",{href:M.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[r.jsx("span",{className:"h-4 min-w-[16px] px-0.5 rounded bg-primary/15 text-primary text-[10px] font-semibold flex items-center justify-center",children:M.index}),r.jsx("span",{className:"truncate",children:M.title})]},M.index))]})]}),w&&r.jsxs("div",{className:"rounded-2xl bg-muted text-foreground rounded-bl-md px-4 py-3",children:[r.jsx("p",{className:"text-sm leading-relaxed mb-2.5",children:w.question}),r.jsx("div",{className:"grid gap-1.5",children:w.options.map(M=>{const X=M.id===w.selected,V=!!w.selected;return r.jsxs("button",{type:"button",disabled:V,onClick:()=>b==null?void 0:b(M.id,M.label),className:x("flex items-center gap-2 rounded-xl border px-3 py-2 text-left text-sm transition-all",X?"border-primary bg-primary/10 text-primary font-medium":V?"border-border/50 text-muted-foreground opacity-50 cursor-default":"border-border bg-background hover:border-primary/40 hover:bg-primary/5 cursor-pointer"),children:[X?r.jsx("svg",{className:"h-4 w-4 shrink-0 text-primary",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M20 6 9 17l-5-5"})}):r.jsx("span",{className:x("h-4 w-4 shrink-0 rounded-full border-2",V?"border-border/50":"border-border")}),r.jsx("span",{className:"truncate",children:M.label})]},M.id)})})]}),(s||i)&&r.jsxs("div",{className:x("flex items-center gap-1 px-1",G&&"flex-row-reverse"),children:[s&&r.jsx("span",{className:"text-[10px] text-muted-foreground",children:s}),i&&rm[i]]}),l&&l.length>0&&!a&&r.jsx("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity",children:l.map(M=>{const X=M==="copy"&&E,V={copy:Q,retry:u,edit:f,like:m,dislike:p,share:h},U=M==="like"&&d==="liked"||M==="dislike"&&d==="disliked",P={copy:D.messageActions_copy,retry:D.messageActions_retry,edit:D.messageActions_edit,like:D.messageActions_like,dislike:D.messageActions_dislike,share:D.messageActions_share};return r.jsx("button",{type:"button",onClick:V[M],title:X?D.messageActions_copied:P[M],className:x("h-7 w-7 rounded-md flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",U&&"text-primary",X&&"text-green-500"),children:X?r.jsx("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M20 6 9 17l-5-5"})}):M==="copy"?r.jsxs("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"}),r.jsx("path",{d:"M9 2h6a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z"})]}):M==="retry"?r.jsxs("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),r.jsx("path",{d:"M3 3v5h5"})]}):M==="like"?r.jsx("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:U?"currentColor":"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M7 10v12 M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2h0a3.13 3.13 0 0 1 3 3.88Z"})}):M==="dislike"?r.jsx("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:U?"currentColor":"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M17 14V2 M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22h0a3.13 3.13 0 0 1-3-3.88Z"})}):M==="edit"?r.jsx("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"})}):r.jsxs("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}),r.jsx("path",{d:"M16 6l-4-4-4 4"}),r.jsx("path",{d:"M12 2v13"})]})},M)})})]})]})});ui.displayName="ChatMessage";function sm({content:e,isThinking:n,duration:t}){const o=Z(),[s,a]=v.useState(n===!0),[i,l]=v.useState(t??0);v.useEffect(()=>{n&&a(!0)},[n]),v.useEffect(()=>{if(!n)return;const d=Date.now(),g=setInterval(()=>l(Math.floor((Date.now()-d)/1e3)),1e3);return()=>clearInterval(g)},[n]);const c=n?i:t??i;return r.jsxs(r.Fragment,{children:[r.jsxs("button",{type:"button",onClick:()=>a(d=>!d),className:"flex items-center gap-2 w-full px-3 py-2 text-sm hover:bg-muted/50",children:[r.jsxs("svg",{className:x("h-4 w-4 shrink-0 text-muted-foreground",n&&"text-primary animate-pulse"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z"}),r.jsx("path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z"})]}),r.jsx("span",{className:x("font-medium",n&&"text-primary animate-pulse"),children:n?o.reasoning_thinking:o.reasoning_title}),c>0&&r.jsx("span",{className:"text-xs text-muted-foreground",children:n?`${c}s...`:Be(o.reasoning_thoughtFor,{duration:`${c}s`})}),r.jsx("svg",{className:x("h-3.5 w-3.5 ml-auto text-muted-foreground transition-transform",s&&"rotate-180"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"m6 9 6 6 6-6"})})]}),s&&r.jsx("div",{className:"border-t border-border/40 px-4 py-3 bg-muted/20",children:r.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed whitespace-pre-wrap border-l-2 border-primary/20 pl-3",children:e})})]})}function am({name:e,args:n,result:t,status:o,error:s}){const a=Z(),[i,l]=v.useState(!1);return r.jsxs("div",{className:x("rounded-xl border overflow-hidden",o==="error"?"border-destructive/30":"border-border/60"),children:[r.jsxs("button",{type:"button",onClick:()=>l(c=>!c),className:"flex items-center gap-2 w-full px-3 py-2 text-sm hover:bg-muted/50",children:[r.jsx("svg",{className:"h-4 w-4 shrink-0 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})}),o==="running"?r.jsx("svg",{className:"h-3.5 w-3.5 animate-spin text-primary",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}):o==="success"?r.jsx("svg",{className:"h-3.5 w-3.5 text-green-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M20 6 9 17l-5-5"})}):r.jsxs("svg",{className:"h-3.5 w-3.5 text-destructive",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M18 6 6 18"}),r.jsx("path",{d:"m6 6 12 12"})]}),r.jsx("span",{className:"font-medium font-mono text-xs",children:o==="running"?Be(a.toolCall_calling,{name:e}):e}),r.jsx("svg",{className:x("h-3.5 w-3.5 ml-auto text-muted-foreground transition-transform",i&&"rotate-180"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"m6 9 6 6 6-6"})})]}),i&&r.jsxs("div",{className:"border-t border-border/40 text-xs",children:[n&&Object.keys(n).length>0&&r.jsxs("div",{className:"px-3 py-2 bg-muted/20",children:[r.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1 font-semibold",children:a.toolCall_arguments}),r.jsx("pre",{className:"overflow-x-auto font-mono whitespace-pre-wrap",children:JSON.stringify(n,null,2)})]}),t&&r.jsxs("div",{className:"px-3 py-2 border-t border-border/30",children:[r.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1 font-semibold",children:a.toolCall_result}),r.jsx("pre",{className:"overflow-x-auto font-mono whitespace-pre-wrap",children:t})]}),s&&r.jsxs("div",{className:"px-3 py-2 bg-destructive/5 border-t border-border/30",children:[r.jsx("div",{className:"text-[10px] uppercase tracking-wider text-destructive mb-1 font-semibold",children:a.toolCall_error}),r.jsx("pre",{className:"overflow-x-auto font-mono text-destructive whitespace-pre-wrap",children:s})]})]})]})}exports.AILoading=Za;exports.Accordion=Yl;exports.AccordionContent=Xr;exports.AccordionItem=Ur;exports.AccordionTrigger=Yr;exports.Alert=Cs;exports.AlertDescription=Ss;exports.AlertDialog=id;exports.AlertDialogAction=Ts;exports.AlertDialogCancel=Ls;exports.AlertDialogContent=Rs;exports.AlertDialogDescription=Is;exports.AlertDialogFooter=Ms;exports.AlertDialogHeader=_s;exports.AlertDialogOverlay=mo;exports.AlertDialogPortal=ks;exports.AlertDialogTitle=Ps;exports.AlertDialogTrigger=ld;exports.AlertTitle=js;exports.AppShell=Ea;exports.AspectRatio=Gl;exports.Avatar=fr;exports.AvatarFallback=pr;exports.AvatarImage=gr;exports.Badge=Bn;exports.Blockquote=Ou;exports.Box=Tr;exports.Breadcrumb=As;exports.BreadcrumbEllipsis=Os;exports.BreadcrumbItem=Vs;exports.BreadcrumbLink=$s;exports.BreadcrumbList=Es;exports.BreadcrumbPage=zs;exports.BreadcrumbSeparator=Bs;exports.Button=pe;exports.Calendar=qn;exports.Card=Wn;exports.CardContent=Xn;exports.CardDescription=zr;exports.CardFooter=Br;exports.CardHeader=Un;exports.CardTitle=Yn;exports.Carousel=pa;exports.CarouselContent=ha;exports.CarouselItem=xa;exports.CarouselNext=ba;exports.CarouselPrevious=va;exports.ChartContainer=Ia;exports.ChartLegend=Wu;exports.ChartTooltip=qu;exports.ChatBubble=Ha;exports.ChatBubbleActions=Ua;exports.ChatBubbleAvatar=Ga;exports.ChatBubbleMessage=qa;exports.ChatBubbleTimestamp=Wa;exports.ChatContainer=Xa;exports.ChatFollowUp=ni;exports.ChatHeader=li;exports.ChatInput=Ya;exports.ChatList=Ka;exports.ChatMessage=ui;exports.ChatModeSelector=ti;exports.ChatToolCall=ai;exports.Checkbox=hr;exports.CitationBadge=Co;exports.Code=Bu;exports.CodeBlock=Vu;exports.Collapsible=ql;exports.CollapsibleContent=Vr;exports.CollapsibleTrigger=Wl;exports.ColorPicker=Ol;exports.Combobox=Al;exports.Command=uo;exports.CommandDialog=sd;exports.CommandEmpty=vs;exports.CommandGroup=bs;exports.CommandInput=hs;exports.CommandItem=ys;exports.CommandList=xs;exports.CommandSeparator=ws;exports.CommandShortcut=Ns;exports.Container=Er;exports.ContextMenu=Ud;exports.ContextMenuCheckboxItem=sa;exports.ContextMenuContent=oa;exports.ContextMenuGroup=Xd;exports.ContextMenuItem=ra;exports.ContextMenuLabel=ia;exports.ContextMenuPortal=Kd;exports.ContextMenuRadioGroup=Jd;exports.ContextMenuRadioItem=aa;exports.ContextMenuSeparator=la;exports.ContextMenuShortcut=da;exports.ContextMenuSub=Zd;exports.ContextMenuSubContent=na;exports.ContextMenuSubTrigger=ta;exports.ContextMenuTrigger=Yd;exports.ConversationList=ii;exports.CopyInput=Ba;exports.DataTable=Tu;exports.DataTableColumnHeader=Lu;exports.DatePicker=Tl;exports.Dialog=Kr;exports.DialogClose=Kl;exports.DialogContent=no;exports.DialogDescription=ts;exports.DialogFooter=Qr;exports.DialogHeader=Jr;exports.DialogOverlay=to;exports.DialogPortal=Zr;exports.DialogTitle=es;exports.DialogTrigger=Xl;exports.Drawer=ns;exports.DrawerClose=rs;exports.DrawerContent=ro;exports.DrawerDescription=lo;exports.DrawerFooter=ao;exports.DrawerHeader=so;exports.DrawerTitle=io;exports.DrawerTrigger=os;exports.DropdownMenu=as;exports.DropdownMenuCheckboxItem=cs;exports.DropdownMenuContent=co;exports.DropdownMenuGroup=Jl;exports.DropdownMenuItem=kt;exports.DropdownMenuLabel=ms;exports.DropdownMenuPortal=Ql;exports.DropdownMenuRadioGroup=td;exports.DropdownMenuRadioItem=us;exports.DropdownMenuSeparator=fs;exports.DropdownMenuShortcut=gs;exports.DropdownMenuSub=ed;exports.DropdownMenuSubContent=ds;exports.DropdownMenuSubTrigger=ls;exports.DropdownMenuTrigger=is;exports.EmptyState=Hd;exports.FilePreview=ci;exports.FileUpload=$l;exports.Flex=Lr;exports.Grid=Ar;exports.HStack=Fr;exports.Header=$a;exports.Heading=$u;exports.HoverCard=Qd;exports.HoverCardContent=ca;exports.HoverCardTrigger=ec;exports.Input=Je;exports.JsonViewer=Oa;exports.Label=an;exports.Lead=Hu;exports.Main=za;exports.MarkdownRenderer=Ja;exports.MessageActions=oi;exports.MetricCard=Uu;exports.ModeToggle=Ku;exports.ModeToggleGroup=Ju;exports.ModelSelector=ei;exports.MultiSelect=El;exports.Muted=Gu;exports.NUIProvider=Il;exports.NavigationMenu=Xs;exports.NavigationMenuContent=Qs;exports.NavigationMenuIndicator=ea;exports.NavigationMenuItem=qd;exports.NavigationMenuLink=Wd;exports.NavigationMenuList=Ks;exports.NavigationMenuTrigger=Js;exports.NavigationMenuViewport=fo;exports.NumberInput=Dl;exports.OTPInput=Vl;exports.Pagination=Hs;exports.PaginationContent=Gs;exports.PaginationEllipsis=Ys;exports.PaginationItem=qs;exports.PaginationLink=dn;exports.PaginationNext=Us;exports.PaginationPrevious=Ws;exports.Popover=ht;exports.PopoverContent=lt;exports.PopoverTrigger=xt;exports.Progress=Ds;exports.PromptSuggestions=Qa;exports.RadioGroup=Cr;exports.RadioGroupItem=jr;exports.ReasoningBlock=si;exports.ScrollArea=eo;exports.ScrollBar=nn;exports.Select=Rl;exports.SelectContent=br;exports.SelectGroup=_l;exports.SelectItem=yr;exports.SelectLabel=wr;exports.SelectScrollDownButton=Hn;exports.SelectScrollUpButton=On;exports.SelectSeparator=Nr;exports.SelectTrigger=vr;exports.SelectValue=Ml;exports.Separator=mr;exports.Sheet=ns;exports.SheetClose=rs;exports.SheetContent=ro;exports.SheetDescription=lo;exports.SheetFooter=ao;exports.SheetHeader=so;exports.SheetOverlay=oo;exports.SheetPortal=ss;exports.SheetTitle=io;exports.SheetTrigger=os;exports.Sidebar=Va;exports.Skeleton=dd;exports.Slider=Sr;exports.SourceCitation=di;exports.StatusBadge=Xu;exports.Stepper=Gd;exports.StreamingText=ri;exports.Switch=xr;exports.Table=Kn;exports.TableBody=Jn;exports.TableCaption=Hr;exports.TableCell=tn;exports.TableFooter=Or;exports.TableHead=Qn;exports.TableHeader=Zn;exports.TableRow=St;exports.Tabs=Ul;exports.TabsContent=Wr;exports.TabsList=Gr;exports.TabsTrigger=qr;exports.TagInput=Fl;exports.Text=zu;exports.Textarea=cr;exports.ThemeProvider=Bd;exports.TimePicker=Ll;exports.Timeline=Ta;exports.TimelineConnector=Fa;exports.TimelineContent=Aa;exports.TimelineIcon=Da;exports.TimelineItem=La;exports.Toaster=Od;exports.Toggle=kr;exports.ToggleGroup=Rr;exports.ToggleGroupItem=Mr;exports.Tooltip=od;exports.TooltipContent=ps;exports.TooltipProvider=nd;exports.TooltipTrigger=rd;exports.VStack=Dr;exports.badgeVariants=ur;exports.buttonVariants=At;exports.cardVariants=$r;exports.cn=x;exports.en=It;exports.headingVariants=Ma;exports.inputVariants=dr;exports.navigationMenuTriggerStyle=Zs;exports.ru=Pr;exports.textVariants=Pa;exports.toast=kd;exports.toggleVariants=Gn;exports.tpl=Be;exports.useNUILocale=Z;exports.useTheme=ln;
|
|
38
38
|
//# sourceMappingURL=index.cjs.js.map
|