@nicorp/nui 0.9.0 → 0.10.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 +8 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +49 -30
- package/dist/index.es.js +2383 -2224
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),j=require("react"),Wr=require("@radix-ui/react-slot"),bi=require("@radix-ui/react-label"),wi=require("@radix-ui/react-separator"),yi=require("@radix-ui/react-avatar"),Ni=require("@radix-ui/react-checkbox"),T=require("lucide-react"),Ci=require("@radix-ui/react-switch"),ji=require("@radix-ui/react-select"),Si=require("@radix-ui/react-radio-group"),ki=require("@radix-ui/react-slider"),Ri=require("@radix-ui/react-toggle"),_i=require("@radix-ui/react-toggle-group"),be=require("date-fns"),Mi=require("@radix-ui/react-popover"),Pi=require("@radix-ui/react-aspect-ratio"),Ii=require("@radix-ui/react-collapsible"),Ti=require("@radix-ui/react-scroll-area"),Li=require("@radix-ui/react-tabs"),Di=require("@radix-ui/react-accordion"),Fi=require("@radix-ui/react-dialog"),Ai=require("@radix-ui/react-dropdown-menu"),Ei=require("@radix-ui/react-tooltip"),Me=require("cmdk"),Vi=require("@radix-ui/react-alert-dialog"),$i=require("@radix-ui/react-progress"),zi=require("react-dom"),Bi=require("@radix-ui/react-navigation-menu"),Oi=require("@radix-ui/react-context-menu"),Hi=require("@radix-ui/react-hover-card"),$n=require("recharts");function oe(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 v=oe(j),Ur=oe(bi),Yr=oe(wi),ft=oe(yi),Rn=oe(Ni),_n=oe(Ci),le=oe(ji),Mt=oe(Si),Ct=oe(ki),Xr=oe(Ri),sn=oe(_i),Pt=oe(Mi),Gi=oe(Pi),zn=oe(Ii),ot=oe(Ti),it=oe(Li),st=oe(Di),te=oe(Fi),ne=oe(Ai),Ft=oe(Ei),Re=oe(Vi),Mn=oe($i),Pe=oe(Bi),re=oe(Oi),an=oe(Hi);function Kr(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=Kr(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Zr(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Kr(e))&&(r&&(r+=" "),r+=t);return r}const qi=(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},Wi=(e,t)=>({classGroupId:e,validator:t}),Jr=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),tn="-",Sr=[],Ui="arbitrary..",Yi=e=>{const t=Ki(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Xi(i);const l=i.split(tn),c=l[0]===""&&l.length>1?1:0;return Qr(l,c,t)},getConflictingClassGroupIds:(i,l)=>{if(l){const c=r[i],d=n[i];return c?d?qi(d,c):c:d||Sr}return n[i]||Sr}}},Qr=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const s=e[t],a=n.nextPart.get(s);if(a){const d=Qr(e,t+1,a);if(d)return d}const i=n.validators;if(i===null)return;const l=t===0?e.join(tn):e.slice(t).join(tn),c=i.length;for(let d=0;d<c;d++){const g=i[d];if(g.validator(l))return g.classGroupId}},Xi=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?Ui+r:void 0})(),Ki=e=>{const{theme:t,classGroups:n}=e;return Zi(n,t)},Zi=(e,t)=>{const n=Jr();for(const r in e){const s=e[r];Bn(s,n,r,t)}return n},Bn=(e,t,n,r)=>{const s=e.length;for(let a=0;a<s;a++){const i=e[a];Ji(i,t,n,r)}},Ji=(e,t,n,r)=>{if(typeof e=="string"){Qi(e,t,n);return}if(typeof e=="function"){el(e,t,n,r);return}tl(e,t,n,r)},Qi=(e,t,n)=>{const r=e===""?t:eo(t,e);r.classGroupId=n},el=(e,t,n,r)=>{if(nl(e)){Bn(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Wi(n,e))},tl=(e,t,n,r)=>{const s=Object.entries(e),a=s.length;for(let i=0;i<a;i++){const[l,c]=s[i];Bn(c,eo(t,l),n,r)}},eo=(e,t)=>{let n=e;const r=t.split(tn),s=r.length;for(let a=0;a<s;a++){const i=r[a];let l=n.nextPart.get(i);l||(l=Jr(),n.nextPart.set(i,l)),n=l}return n},nl=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,rl=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)}}},Pn="!",kr=":",ol=[],Rr=(e,t,n,r,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:s}),sl=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 h=0;h<g;h++){const y=s[h];if(i===0&&l===0){if(y===kr){a.push(s.slice(c,h)),c=h+1;continue}if(y==="/"){d=h;continue}}y==="["?i++:y==="]"?i--:y==="("?l++:y===")"&&l--}const u=a.length===0?s:s.slice(c);let f=u,m=!1;u.endsWith(Pn)?(f=u.slice(0,-1),m=!0):u.startsWith(Pn)&&(f=u.slice(1),m=!0);const p=d&&d>c?d-c:void 0;return Rr(a,m,f,p)};if(t){const s=t+kr,a=r;r=i=>i.startsWith(s)?a(i.slice(s.length)):Rr(ol,!1,i,void 0,!0)}if(n){const s=r;r=a=>n({className:a,parseClassName:s})}return r},al=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}},il=e=>({cache:rl(e.cacheSize),parseClassName:sl(e),sortModifiers:al(e),...Yi(e)}),ll=/\s+/,dl=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:a}=t,i=[],l=e.trim().split(ll);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}=n(g);if(u){c=g+(c.length>0?" "+c:c);continue}let y=!!h,b=r(y?p.substring(0,h):p);if(!b){if(!y){c=g+(c.length>0?" "+c:c);continue}if(b=r(p),!b){c=g+(c.length>0?" "+c:c);continue}y=!1}const w=f.length===0?"":f.length===1?f[0]:a(f).join(":"),N=m?w+Pn:w,R=N+b;if(i.indexOf(R)>-1)continue;i.push(R);const _=s(b,y);for(let S=0;S<_.length;++S){const k=_[S];i.push(N+k)}c=g+(c.length>0?" "+c:c)}return c},cl=(...e)=>{let t=0,n,r,s="";for(;t<e.length;)(n=e[t++])&&(r=to(n))&&(s&&(s+=" "),s+=r);return s},to=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=to(e[r]))&&(n&&(n+=" "),n+=t);return n},ul=(e,...t)=>{let n,r,s,a;const i=c=>{const d=t.reduce((g,u)=>u(g),e());return n=il(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=dl(c,n);return s(c,g),g};return a=i,(...c)=>a(cl(...c))},ml=[],xe=e=>{const t=n=>n[e]||ml;return t.isThemeGetter=!0,t},no=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ro=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fl=/^\d+\/\d+$/,gl=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pl=/\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$/,hl=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,xl=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vl=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,mt=e=>fl.test(e),W=e=>!!e&&!Number.isNaN(Number(e)),Xe=e=>!!e&&Number.isInteger(Number(e)),xn=e=>e.endsWith("%")&&W(e.slice(0,-1)),Ue=e=>gl.test(e),bl=()=>!0,wl=e=>pl.test(e)&&!hl.test(e),oo=()=>!1,yl=e=>xl.test(e),Nl=e=>vl.test(e),Cl=e=>!L(e)&&!D(e),jl=e=>gt(e,io,oo),L=e=>no.test(e),nt=e=>gt(e,lo,wl),vn=e=>gt(e,Ml,W),_r=e=>gt(e,so,oo),Sl=e=>gt(e,ao,Nl),Ut=e=>gt(e,co,yl),D=e=>ro.test(e),yt=e=>pt(e,lo),kl=e=>pt(e,Pl),Mr=e=>pt(e,so),Rl=e=>pt(e,io),_l=e=>pt(e,ao),Yt=e=>pt(e,co,!0),gt=(e,t,n)=>{const r=no.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},pt=(e,t,n=!1)=>{const r=ro.exec(e);return r?r[1]?t(r[1]):n:!1},so=e=>e==="position"||e==="percentage",ao=e=>e==="image"||e==="url",io=e=>e==="length"||e==="size"||e==="bg-size",lo=e=>e==="length",Ml=e=>e==="number",Pl=e=>e==="family-name",co=e=>e==="shadow",Il=()=>{const e=xe("color"),t=xe("font"),n=xe("text"),r=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"),y=xe("aspect"),b=xe("ease"),w=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(),D,L],S=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],C=()=>[D,L,c],F=()=>[mt,"full","auto",...C()],G=()=>[Xe,"none","subgrid",D,L],E=()=>["auto",{span:["full",Xe,D,L]},Xe,D,L],J=()=>[Xe,"auto",D,L],Q=()=>["auto","min","max","fr",D,L],M=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["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,D,L],fe=()=>[...R(),Mr,_r,{position:[D,L]}],ge=()=>["no-repeat",{repeat:["","x","y","space","round"]}],de=()=>["auto","cover","contain",Rl,jl,{size:[D,L]}],je=()=>[xn,yt,nt],A=()=>["","none","full",d,D,L],B=()=>["",W,yt,nt],X=()=>["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,xn,Mr,_r],O=()=>["","none",p,D,L],ue=()=>["none",W,D,L],ie=()=>["none",W,D,L],Z=()=>[W,D,L],I=()=>[mt,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ue],breakpoint:[Ue],color:[bl],container:[Ue],"drop-shadow":[Ue],ease:["in","out","in-out"],font:[Cl],"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,L,D,y]}],container:["container"],columns:[{columns:[W,L,D,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:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{start:F()}],end:[{end:F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[Xe,"auto",D,L]}],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",L]}],grow:[{grow:["",W,D,L]}],shrink:[{shrink:["",W,D,L]}],order:[{order:[Xe,"first","last","none",D,L]}],"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":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...M()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":M()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],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",n,yt,nt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,D,vn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",xn,L]}],"font-family":[{font:[kl,L,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,D,L]}],"line-clamp":[{"line-clamp":[W,"none",D,vn]}],leading:[{leading:[a,...C()]}],"list-image":[{"list-image":["none",D,L]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",D,L]}],"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:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:[W,"from-font","auto",D,nt]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[W,"auto",D,L]}],"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",D,L]}],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",D,L]}],"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,D,L],radial:["",D,L],conic:[Xe,D,L]},_l,Sl]}],"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:A()}],"rounded-s":[{"rounded-s":A()}],"rounded-e":[{"rounded-e":A()}],"rounded-t":[{"rounded-t":A()}],"rounded-r":[{"rounded-r":A()}],"rounded-b":[{"rounded-b":A()}],"rounded-l":[{"rounded-l":A()}],"rounded-ss":[{"rounded-ss":A()}],"rounded-se":[{"rounded-se":A()}],"rounded-ee":[{"rounded-ee":A()}],"rounded-es":[{"rounded-es":A()}],"rounded-tl":[{"rounded-tl":A()}],"rounded-tr":[{"rounded-tr":A()}],"rounded-br":[{"rounded-br":A()}],"rounded-bl":[{"rounded-bl":A()}],"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:[...X(),"hidden","none"]}],"divide-style":[{divide:[...X(),"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:[...X(),"none","hidden"]}],"outline-offset":[{"outline-offset":[W,D,L]}],"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,D,L]}],"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":[D,L]}],"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",D,L]}],filter:[{filter:["","none",D,L]}],blur:[{blur:O()}],brightness:[{brightness:[W,D,L]}],contrast:[{contrast:[W,D,L]}],"drop-shadow":[{"drop-shadow":["","none",m,Yt,Ut]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",W,D,L]}],"hue-rotate":[{"hue-rotate":[W,D,L]}],invert:[{invert:["",W,D,L]}],saturate:[{saturate:[W,D,L]}],sepia:[{sepia:["",W,D,L]}],"backdrop-filter":[{"backdrop-filter":["","none",D,L]}],"backdrop-blur":[{"backdrop-blur":O()}],"backdrop-brightness":[{"backdrop-brightness":[W,D,L]}],"backdrop-contrast":[{"backdrop-contrast":[W,D,L]}],"backdrop-grayscale":[{"backdrop-grayscale":["",W,D,L]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[W,D,L]}],"backdrop-invert":[{"backdrop-invert":["",W,D,L]}],"backdrop-opacity":[{"backdrop-opacity":[W,D,L]}],"backdrop-saturate":[{"backdrop-saturate":[W,D,L]}],"backdrop-sepia":[{"backdrop-sepia":["",W,D,L]}],"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",D,L]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[W,"initial",D,L]}],ease:[{ease:["linear","initial",b,D,L]}],delay:[{delay:[W,D,L]}],animate:[{animate:["none",w,D,L]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,D,L]}],"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:Z()}],"skew-x":[{"skew-x":Z()}],"skew-y":[{"skew-y":Z()}],transform:[{transform:[D,L,"","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",D,L]}],"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",D,L]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[W,yt,nt,vn]}],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"]}},Tl=ul(Il);function x(...e){return Tl(Zr(e))}const Pr=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ir=Zr,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=Pr(g)||Pr(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[h,y]=p;return Array.isArray(y)?y.includes({...a,...l}[h]):{...a,...l}[h]===y})?[...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"}}),pe=v.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},a)=>{const i=r?Wr.Slot:"button";return o.jsx(i,{className:x(At({variant:t,size:n,className:e})),ref:a,...s})});pe.displayName="Button";const uo=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:t,variant:n,inputSize:r,...s},a)=>o.jsx("input",{type:t,className:x(uo({variant:n,inputSize:r}),e),ref:a,...s}));Je.displayName="Input";const mo=v.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}));mo.displayName="Textarea";const Ll=Fe("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ln=v.forwardRef(({className:e,...t},n)=>o.jsx(Ur.Root,{ref:n,className:x(Ll(),e),...t}));ln.displayName=Ur.Root.displayName;const fo=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 On({className:e,variant:t,...n}){return o.jsx("div",{className:x(fo({variant:t}),e),...n})}const go=v.forwardRef(({className:e,orientation:t="horizontal",...n},r)=>o.jsx(Yr.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}));go.displayName=Yr.Root.displayName;const po=v.forwardRef(({className:e,...t},n)=>o.jsx(ft.Root,{ref:n,className:x("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));po.displayName=ft.Root.displayName;const ho=v.forwardRef(({className:e,...t},n)=>o.jsx(ft.Image,{ref:n,className:x("aspect-square h-full w-full",e),...t}));ho.displayName=ft.Image.displayName;const xo=v.forwardRef(({className:e,...t},n)=>o.jsx(ft.Fallback,{ref:n,className:x("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));xo.displayName=ft.Fallback.displayName;const vo=v.forwardRef(({className:e,...t},n)=>o.jsx(Rn.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(Rn.Indicator,{className:x("flex items-center justify-center text-current"),children:o.jsx(T.Check,{className:"h-4 w-4"})})}));vo.displayName=Rn.Root.displayName;const bo=v.forwardRef(({className:e,...t},n)=>o.jsx(_n.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(_n.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")})}));bo.displayName=_n.Root.displayName;const Dl=le.Root,Fl=le.Group,Al=le.Value,wo=v.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(le.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(le.Icon,{asChild:!0,children:o.jsx(T.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));wo.displayName=le.Trigger.displayName;const Hn=v.forwardRef(({className:e,...t},n)=>o.jsx(le.ScrollUpButton,{ref:n,className:x("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(T.ChevronUp,{className:"h-4 w-4"})}));Hn.displayName=le.ScrollUpButton.displayName;const Gn=v.forwardRef(({className:e,...t},n)=>o.jsx(le.ScrollDownButton,{ref:n,className:x("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(T.ChevronDown,{className:"h-4 w-4"})}));Gn.displayName=le.ScrollDownButton.displayName;const yo=v.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>o.jsx(le.Portal,{children:o.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",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(Hn,{}),o.jsx(le.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(Gn,{})]})}));yo.displayName=le.Content.displayName;const No=v.forwardRef(({className:e,...t},n)=>o.jsx(le.Label,{ref:n,className:x("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));No.displayName=le.Label.displayName;const Co=v.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(le.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(le.ItemIndicator,{children:o.jsx(T.Check,{className:"h-4 w-4"})})}),o.jsx(le.ItemText,{children:t})]}));Co.displayName=le.Item.displayName;const jo=v.forwardRef(({className:e,...t},n)=>o.jsx(le.Separator,{ref:n,className:x("-mx-1 my-1 h-px bg-muted",e),...t}));jo.displayName=le.Separator.displayName;const So=v.forwardRef(({className:e,...t},n)=>o.jsx(Mt.Root,{className:x("grid gap-2",e),...t,ref:n}));So.displayName=Mt.Root.displayName;const ko=v.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(T.Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})}));ko.displayName=Mt.Item.displayName;const Ro=v.forwardRef(({className:e,...t},n)=>o.jsxs(Ct.Root,{ref:n,className:x("relative flex w-full touch-none select-none items-center",e),...t,children:[o.jsx(Ct.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:o.jsx(Ct.Range,{className:"absolute h-full bg-primary"})}),o.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"})]}));Ro.displayName=Ct.Root.displayName;const qn=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"}}),_o=v.forwardRef(({className:e,variant:t,size:n,...r},s)=>o.jsx(Xr.Root,{ref:s,className:x(qn({variant:t,size:n,className:e})),...r}));_o.displayName=Xr.Root.displayName;const Mo=v.forwardRef(({className:e,variant:t,size:n,children:r,...s},a)=>o.jsx(sn.Root,{ref:a,className:x("flex items-center justify-center gap-1",e),...s,children:o.jsx(Po.Provider,{value:{variant:t,size:n},children:r})}));Mo.displayName=sn.Root.displayName;const Po=v.createContext({size:"default",variant:"default"}),Io=v.forwardRef(({className:e,children:t,variant:n,size:r,...s},a)=>{const i=v.useContext(Po);return o.jsx(sn.Item,{ref:a,className:x(qn({variant:i.variant||n,size:i.size||r}),e),...s,children:t})});Io.displayName=sn.Item.displayName;function Wn({selected:e,onSelect:t,className:n,disabled:r}){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=>{r!=null&&r(h)||t==null||t(be.isSameDay(h,e||new Date(0))?void 0:h)};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(pe,{variant:"ghost",size:"icon",onClick:f,className:"h-8 w-8 rounded-full hover:bg-accent",children:o.jsx(T.ChevronLeft,{className:"h-4 w-4"})}),o.jsx("h2",{className:"text-base font-semibold",children:be.format(s,"MMMM yyyy")}),o.jsx(pe,{variant:"ghost",size:"icon",onClick:m,className:"h-8 w-8 rounded-full hover:bg-accent",children:o.jsx(T.ChevronRight,{className:"h-4 w-4"})})]}),o.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:u.map(h=>o.jsx("div",{className:"h-8 flex items-center justify-center text-xs font-medium text-muted-foreground",children:h},h))}),o.jsx("div",{className:"grid grid-cols-7 gap-1",children:g.map((h,y)=>{const b=be.isSameMonth(h,s),w=e&&be.isSameDay(h,e),N=be.isToday(h),R=r==null?void 0:r(h);return o.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&&!w&&"text-foreground hover:text-foreground",w&&"bg-primary text-primary-foreground hover:bg-primary/90 shadow-md",N&&!w&&"bg-accent text-accent-foreground font-bold",R&&"opacity-30 cursor-not-allowed hover:bg-transparent"),children:be.format(h,"d")},y)})}),o.jsxs("div",{className:"mt-4 pt-3 border-t flex justify-between items-center",children:[o.jsx(pe,{variant:"ghost",size:"sm",onClick:()=>{const h=new Date;a(be.startOfMonth(h)),t==null||t(h)},className:"text-xs",children:"Today"}),e&&o.jsx("span",{className:"text-xs text-muted-foreground",children:be.format(e,"MMM d, yyyy")})]})]})}Wn.displayName="Calendar";const ht=Pt.Root,xt=Pt.Trigger,lt=v.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},s)=>o.jsx(Pt.Portal,{children:o.jsx(Pt.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=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"},To={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:"Ещё"};function Tr(e,t){if(!e)return;const n=t.split(".");let r=e;for(const s of n){if(r===void 0||typeof r=="string")return;r=r[s]}return typeof r=="string"?r:void 0}function en(e,t){if(!t)return e;let n=e;for(const[r,s]of Object.entries(t))n=n.replaceAll(`{${r}}`,String(s));return n}const El={en:It,ru:To},Lo=v.createContext(It),Do=v.createContext({lang:"en",messages:{}});function Fo({locale:e="en",messages:t,children:n}){const r=typeof e=="string"?e:"en",s=v.useMemo(()=>typeof e=="string"?El[e]??It:{...It,...e},[e]),a=v.useMemo(()=>({lang:r,messages:t??{}}),[r,t]);return o.jsx(Do.Provider,{value:a,children:o.jsx(Lo.Provider,{value:s,children:n})})}function Y(){return v.useContext(Lo)}function Vl(){const{lang:e,messages:t}=v.useContext(Do);return{t:v.useCallback((r,s)=>{const a=Tr(t[e],r);if(a!==void 0)return en(a,s);if(e!=="en"){const i=Tr(t.en,r);if(i!==void 0)return en(i,s)}return en(r,s)},[e,t]),lang:e}}function Be(e,t){return en(e,t)}function $l({value:e,onChange:t,placeholder:n,disabled:r,className:s}){const a=Y(),i=n??a.datePicker_placeholder,[l,c]=v.useState(!1);return o.jsxs(ht,{open:l,onOpenChange:c,children:[o.jsx(xt,{asChild:!0,children:o.jsxs(pe,{variant:"outline",disabled:r,className:x("w-full justify-start text-left font-normal",!e&&"text-muted-foreground",s),children:[o.jsx(T.CalendarIcon,{className:"mr-2 h-4 w-4"}),e?be.format(e,"PPP"):o.jsx("span",{children:i})]})}),o.jsx(lt,{className:"w-auto p-0",align:"start",children:o.jsx(Wn,{selected:e,onSelect:d=>{t==null||t(d),c(!1)}})})]})}function zl({value:e={hours:12,minutes:0},onChange:t,is24Hour:n=!1,disabled:r,className:s}){const[a,i]=v.useState(!1),[l,c]=v.useState(e.hours>=12?"PM":"AM"),d=n?e.hours:e.hours===0?12:e.hours>12?e.hours-12:e.hours,g=()=>{const y=d.toString().padStart(2,"0"),b=e.minutes.toString().padStart(2,"0");return n?`${y}:${b}`:`${y}:${b} ${l}`},u=y=>{let b=y;n||(l==="PM"&&y!==12&&(b+=12),l==="AM"&&y===12&&(b=0)),t==null||t({...e,hours:b})},f=y=>{t==null||t({...e,minutes:y})},m=y=>{c(y);let b=e.hours;y==="PM"&&e.hours<12&&(b+=12),y==="AM"&&e.hours>=12&&(b-=12),t==null||t({...e,hours:b})},p=n?Array.from({length:24},(y,b)=>b):Array.from({length:12},(y,b)=>b+1),h=Array.from({length:12},(y,b)=>b*5);return o.jsxs(ht,{open:a,onOpenChange:i,children:[o.jsx(xt,{asChild:!0,children:o.jsxs(pe,{variant:"outline",disabled:r,className:x("w-full justify-start font-normal",s),children:[o.jsx(T.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(y=>o.jsx("button",{onClick:()=>u(y),className:x("w-full py-1 text-sm font-medium transition-colors","hover:bg-accent",d===y&&"bg-primary text-primary-foreground hover:bg-primary/90"),children:y.toString().padStart(2,"0")},y))}),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:h.map(y=>o.jsx("button",{onClick:()=>f(y),className:x("w-full py-1 text-sm font-medium transition-colors","hover:bg-accent",e.minutes===y&&"bg-primary text-primary-foreground hover:bg-primary/90"),children:y.toString().padStart(2,"0")},y))}),!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 Bl({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(pe,{type:"button",variant:"outline",size:"icon",onClick:c,disabled:a||e<=n,className:"h-9 w-9",children:o.jsx(T.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(pe,{type:"button",variant:"outline",size:"icon",onClick:l,disabled:a||e>=r,className:"h-9 w-9",children:o.jsx(T.Plus,{className:"h-4 w-4"})})]})}function Ol({values:e=[],onChange:t,placeholder:n,disabled:r,className:s,maxTags:a}){const i=Y(),l=n??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())||t==null||t([...e,c.trim()]),d("")}else m.key==="Backspace"&&!c&&e.length>0&&(t==null||t(e.slice(0,-1)))},f=m=>{t==null||t(e.filter(p=>p!==m))};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 m;return(m=g.current)==null?void 0:m.focus()},children:[e.map(m=>o.jsxs(On,{variant:"secondary",className:"gap-1",children:[m,!r&&o.jsx("button",{type:"button",onClick:p=>{p.stopPropagation(),f(m)},className:"ml-1 rounded-full outline-none hover:bg-muted",children:o.jsx(T.X,{className:"h-3 w-3"})})]},m)),o.jsx("input",{ref:g,type:"text",value:c,onChange:m=>d(m.target.value),onKeyDown:u,placeholder:e.length===0?l:"",disabled:r||(a?e.length>=a:!1),className:"flex-1 min-w-[120px] bg-transparent outline-none placeholder:text-muted-foreground text-sm"})]})}function Hl({options:e,value:t,onChange:n,placeholder:r,searchPlaceholder:s,emptyText:a,disabled:i,className:l}){const c=Y(),d=r??c.combobox_placeholder,g=s??c.combobox_searchPlaceholder,u=a??c.combobox_empty,[f,m]=v.useState(!1),[p,h]=v.useState(""),y=e.filter(w=>w.label.toLowerCase().includes(p.toLowerCase())),b=e.find(w=>w.value===t);return o.jsxs(ht,{open:f,onOpenChange:m,children:[o.jsx(xt,{asChild:!0,children:o.jsxs(pe,{variant:"outline",role:"combobox","aria-expanded":f,disabled:i,className:x("w-full justify-between font-normal",!t&&"text-muted-foreground",l),children:[b?b.label:d,o.jsx(T.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:g,value:p,onChange:w=>h(w.target.value),className:"h-8"})}),o.jsx("div",{className:"max-h-60 overflow-auto p-1",children:y.length===0?o.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:u}):y.map(w=>o.jsxs("button",{onClick:()=>{n==null||n(w.value===t?"":w.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",t===w.value&&"bg-accent"),children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:t===w.value&&o.jsx(T.Check,{className:"h-4 w-4"})}),w.label]},w.value))})]})]})}function Gl({options:e,value:t=[],onChange:n,placeholder:r,searchPlaceholder:s,emptyText:a,disabled:i,className:l,maxDisplay:c=3}){const d=Y(),g=r??d.multiselect_placeholder,u=s??d.multiselect_searchPlaceholder,f=a??d.multiselect_empty,[m,p]=v.useState(!1),[h,y]=v.useState(""),b=e.filter(S=>S.label.toLowerCase().includes(h.toLowerCase())),w=e.filter(S=>t.includes(S.value)),N=S=>{const k=t.includes(S)?t.filter(C=>C!==S):[...t,S];n==null||n(k)},R=(S,k)=>{k.stopPropagation(),n==null||n(t.filter(C=>C!==S))},_=()=>t.length===0?g:t.length<=c?w.map(S=>S.label).join(", "):Be(d.multiselect_selected,{count:t.length});return o.jsxs(ht,{open:m,onOpenChange:p,children:[o.jsx(xt,{asChild:!0,children:o.jsxs(pe,{variant:"outline",role:"combobox","aria-expanded":m,disabled:i,className:x("w-full justify-between font-normal",t.length===0&&"text-muted-foreground",l),children:[o.jsx("span",{className:"truncate",children:_()}),o.jsx(T.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:u,value:h,onChange:S=>y(S.target.value),className:"h-8"})}),t.length>0&&o.jsx("div",{className:"flex flex-wrap gap-1 p-2 border-b",children:w.map(S=>o.jsxs(On,{variant:"secondary",className:"pr-1",children:[S.label,o.jsx("button",{onClick:k=>R(S.value,k),className:"ml-1 rounded-full hover:bg-muted",children:o.jsx(T.X,{className:"h-3 w-3"})})]},S.value))}),o.jsx("div",{className:"max-h-60 overflow-auto p-1",children:b.length===0?o.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:f}):b.map(S=>{const k=t.includes(S.value);return o.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:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:k&&o.jsx(T.Check,{className:"h-4 w-4"})}),S.label]},S.value)})})]})]})}function ql({length:e=6,value:t="",onChange:n,onComplete:r,disabled:s,className:a}){const i=v.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 Wl({accept:e,maxSize:t,multiple:n=!1,onUpload:r,disabled:s,className:a}){const[i,l]=v.useState([]),[c,d]=v.useState(!1),g=v.useRef(null),u=Y(),f=w=>{if(!w)return;const N=Array.from(w).filter(_=>!(t&&_.size>t)),R=n?[...i,...N]:N.slice(0,1);l(R),r==null||r(R)},m=w=>{w.preventDefault(),d(!1),s||f(w.dataTransfer.files)},p=w=>{w.preventDefault(),s||d(!0)},h=()=>{d(!1)},y=w=>{const N=i.filter((R,_)=>_!==w);l(N),r==null||r(N)},b=w=>w<1024?w+" B":w<1024*1024?(w/1024).toFixed(1)+" KB":(w/(1024*1024)).toFixed(1)+" MB";return o.jsxs("div",{className:x("space-y-4",a),children:[o.jsxs("div",{onClick:()=>{var w;return!s&&((w=g.current)==null?void 0:w.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:[o.jsx(T.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:u.fileUpload_dragDrop}),t&&o.jsx("p",{className:"text-xs text-muted-foreground",children:Be(u.fileUpload_maxSize,{size:b(t)})}),o.jsx("input",{ref:g,type:"file",accept:e,multiple:n,onChange:w=>f(w.target.files),disabled:s,className:"hidden"})]}),i.length>0&&o.jsx("div",{className:"space-y-2",children:i.map((w,N)=>o.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border bg-muted/50",children:[o.jsx(T.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:w.name}),o.jsx("p",{className:"text-xs text-muted-foreground",children:b(w.size)})]}),o.jsx(pe,{type:"button",variant:"ghost",size:"icon",onClick:()=>y(N),className:"h-8 w-8",children:o.jsx(T.X,{className:"h-4 w-4"})})]},N))})]})}const Ul=["#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 Yl(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 Xl({value:e="#3b82f6",onChange:t,disabled:n,className:r}){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=Yl(p.h,p.s,p.l);d(h),t==null||t(h)},f=p=>{if(!g.current)return;const h=g.current.getBoundingClientRect(),y=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(y*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),t==null||t(p)}};return o.jsxs(ht,{open:s,onOpenChange:a,children:[o.jsx(xt,{asChild:!0,children:o.jsxs(pe,{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 o=require("react/jsx-runtime"),j=require("react"),Yr=require("@radix-ui/react-slot"),Ci=require("@radix-ui/react-label"),Ni=require("@radix-ui/react-separator"),ji=require("@radix-ui/react-avatar"),Si=require("@radix-ui/react-checkbox"),_=require("lucide-react"),ki=require("@radix-ui/react-switch"),Ri=require("@radix-ui/react-select"),_i=require("@radix-ui/react-radio-group"),Mi=require("@radix-ui/react-slider"),Pi=require("@radix-ui/react-toggle"),Ii=require("@radix-ui/react-toggle-group"),ve=require("date-fns"),Ti=require("@radix-ui/react-popover"),Li=require("@radix-ui/react-aspect-ratio"),Di=require("@radix-ui/react-collapsible"),Fi=require("@radix-ui/react-scroll-area"),Ai=require("@radix-ui/react-tabs"),Ei=require("@radix-ui/react-accordion"),Vi=require("@radix-ui/react-dialog"),$i=require("@radix-ui/react-dropdown-menu"),zi=require("@radix-ui/react-tooltip"),Me=require("cmdk"),Bi=require("@radix-ui/react-alert-dialog"),Oi=require("@radix-ui/react-progress"),Hi=require("react-dom"),Gi=require("@radix-ui/react-navigation-menu"),qi=require("@radix-ui/react-context-menu"),Wi=require("@radix-ui/react-hover-card"),$n=require("recharts");function oe(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 b=oe(j),Xr=oe(Ci),Kr=oe(Ni),ft=oe(ji),Rn=oe(Si),_n=oe(ki),le=oe(Ri),Mt=oe(_i),Nt=oe(Mi),Zr=oe(Pi),sn=oe(Ii),Pt=oe(Ti),Ui=oe(Li),zn=oe(Di),ot=oe(Fi),it=oe(Ai),st=oe(Ei),te=oe(Vi),ne=oe($i),Ft=oe(zi),Re=oe(Bi),Mn=oe(Oi),Pe=oe(Gi),re=oe(qi),an=oe(Wi);function Jr(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=Jr(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Qr(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Jr(e))&&(r&&(r+=" "),r+=t);return r}const Yi=(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},Xi=(e,t)=>({classGroupId:e,validator:t}),eo=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),tn="-",Sr=[],Ki="arbitrary..",Zi=e=>{const t=Qi(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Ji(i);const l=i.split(tn),c=l[0]===""&&l.length>1?1:0;return to(l,c,t)},getConflictingClassGroupIds:(i,l)=>{if(l){const c=r[i],d=n[i];return c?d?Yi(d,c):c:d||Sr}return n[i]||Sr}}},to=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const s=e[t],a=n.nextPart.get(s);if(a){const d=to(e,t+1,a);if(d)return d}const i=n.validators;if(i===null)return;const l=t===0?e.join(tn):e.slice(t).join(tn),c=i.length;for(let d=0;d<c;d++){const g=i[d];if(g.validator(l))return g.classGroupId}},Ji=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?Ki+r:void 0})(),Qi=e=>{const{theme:t,classGroups:n}=e;return el(n,t)},el=(e,t)=>{const n=eo();for(const r in e){const s=e[r];Bn(s,n,r,t)}return n},Bn=(e,t,n,r)=>{const s=e.length;for(let a=0;a<s;a++){const i=e[a];tl(i,t,n,r)}},tl=(e,t,n,r)=>{if(typeof e=="string"){nl(e,t,n);return}if(typeof e=="function"){rl(e,t,n,r);return}ol(e,t,n,r)},nl=(e,t,n)=>{const r=e===""?t:no(t,e);r.classGroupId=n},rl=(e,t,n,r)=>{if(sl(e)){Bn(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Xi(n,e))},ol=(e,t,n,r)=>{const s=Object.entries(e),a=s.length;for(let i=0;i<a;i++){const[l,c]=s[i];Bn(c,no(t,l),n,r)}},no=(e,t)=>{let n=e;const r=t.split(tn),s=r.length;for(let a=0;a<s;a++){const i=r[a];let l=n.nextPart.get(i);l||(l=eo(),n.nextPart.set(i,l)),n=l}return n},sl=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,al=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)}}},Pn="!",kr=":",il=[],Rr=(e,t,n,r,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:s}),ll=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 h=0;h<g;h++){const w=s[h];if(i===0&&l===0){if(w===kr){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 m=u,f=!1;u.endsWith(Pn)?(m=u.slice(0,-1),f=!0):u.startsWith(Pn)&&(m=u.slice(1),f=!0);const p=d&&d>c?d-c:void 0;return Rr(a,f,m,p)};if(t){const s=t+kr,a=r;r=i=>i.startsWith(s)?a(i.slice(s.length)):Rr(il,!1,i,void 0,!0)}if(n){const s=r;r=a=>n({className:a,parseClassName:s})}return r},dl=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}},cl=e=>({cache:al(e.cacheSize),parseClassName:ll(e),sortModifiers:dl(e),...Zi(e)}),ul=/\s+/,ml=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:a}=t,i=[],l=e.trim().split(ul);let c="";for(let d=l.length-1;d>=0;d-=1){const g=l[d],{isExternal:u,modifiers:m,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:h}=n(g);if(u){c=g+(c.length>0?" "+c:c);continue}let w=!!h,v=r(w?p.substring(0,h):p);if(!v){if(!w){c=g+(c.length>0?" "+c:c);continue}if(v=r(p),!v){c=g+(c.length>0?" "+c:c);continue}w=!1}const y=m.length===0?"":m.length===1?m[0]:a(m).join(":"),C=f?y+Pn:y,k=C+v;if(i.indexOf(k)>-1)continue;i.push(k);const M=s(v,w);for(let S=0;S<M.length;++S){const R=M[S];i.push(C+R)}c=g+(c.length>0?" "+c:c)}return c},fl=(...e)=>{let t=0,n,r,s="";for(;t<e.length;)(n=e[t++])&&(r=ro(n))&&(s&&(s+=" "),s+=r);return s},ro=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ro(e[r]))&&(n&&(n+=" "),n+=t);return n},gl=(e,...t)=>{let n,r,s,a;const i=c=>{const d=t.reduce((g,u)=>u(g),e());return n=cl(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=ml(c,n);return s(c,g),g};return a=i,(...c)=>a(fl(...c))},pl=[],xe=e=>{const t=n=>n[e]||pl;return t.isThemeGetter=!0,t},oo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,so=/^\((?:(\w[\w-]*):)?(.+)\)$/i,hl=/^\d+\/\d+$/,xl=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,bl=/\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$/,vl=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,wl=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yl=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,mt=e=>hl.test(e),W=e=>!!e&&!Number.isNaN(Number(e)),Xe=e=>!!e&&Number.isInteger(Number(e)),xn=e=>e.endsWith("%")&&W(e.slice(0,-1)),Ue=e=>xl.test(e),Cl=()=>!0,Nl=e=>bl.test(e)&&!vl.test(e),ao=()=>!1,jl=e=>wl.test(e),Sl=e=>yl.test(e),kl=e=>!L(e)&&!D(e),Rl=e=>gt(e,co,ao),L=e=>oo.test(e),nt=e=>gt(e,uo,Nl),bn=e=>gt(e,Tl,W),_r=e=>gt(e,io,ao),_l=e=>gt(e,lo,Sl),Ut=e=>gt(e,mo,jl),D=e=>so.test(e),yt=e=>pt(e,uo),Ml=e=>pt(e,Ll),Mr=e=>pt(e,io),Pl=e=>pt(e,co),Il=e=>pt(e,lo),Yt=e=>pt(e,mo,!0),gt=(e,t,n)=>{const r=oo.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},pt=(e,t,n=!1)=>{const r=so.exec(e);return r?r[1]?t(r[1]):n:!1},io=e=>e==="position"||e==="percentage",lo=e=>e==="image"||e==="url",co=e=>e==="length"||e==="size"||e==="bg-size",uo=e=>e==="length",Tl=e=>e==="number",Ll=e=>e==="family-name",mo=e=>e==="shadow",Dl=()=>{const e=xe("color"),t=xe("font"),n=xe("text"),r=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"),m=xe("text-shadow"),f=xe("drop-shadow"),p=xe("blur"),h=xe("perspective"),w=xe("aspect"),v=xe("ease"),y=xe("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...k(),D,L],S=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],N=()=>[D,L,c],F=()=>[mt,"full","auto",...N()],G=()=>[Xe,"none","subgrid",D,L],E=()=>["auto",{span:["full",Xe,D,L]},Xe,D,L],J=()=>[Xe,"auto",D,L],Q=()=>["auto","min","max","fr",D,L],P=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...N()],U=()=>[mt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],I=()=>[e,D,L],fe=()=>[...k(),Mr,_r,{position:[D,L]}],ge=()=>["no-repeat",{repeat:["","x","y","space","round"]}],de=()=>["auto","cover","contain",Pl,Rl,{size:[D,L]}],je=()=>[xn,yt,nt],A=()=>["","none","full",d,D,L],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,xn,Mr,_r],O=()=>["","none",p,D,L],ue=()=>["none",W,D,L],ie=()=>["none",W,D,L],Z=()=>[W,D,L],T=()=>[mt,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ue],breakpoint:[Ue],color:[Cl],container:[Ue],"drop-shadow":[Ue],ease:["in","out","in-out"],font:[kl],"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,L,D,w]}],container:["container"],columns:[{columns:[W,L,D,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:M()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{start:F()}],end:[{end:F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[Xe,"auto",D,L]}],basis:[{basis:[mt,"full","auto",l,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[W,mt,"auto","initial","none",L]}],grow:[{grow:["",W,D,L]}],shrink:[{shrink:["",W,D,L]}],order:[{order:[Xe,"first","last","none",D,L]}],"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:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...P(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...P()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":P()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],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,D,bn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",xn,L]}],"font-family":[{font:[Ml,L,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,D,L]}],"line-clamp":[{"line-clamp":[W,"none",D,bn]}],leading:[{leading:[a,...N()]}],"list-image":[{"list-image":["none",D,L]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",D,L]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:[W,"from-font","auto",D,nt]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[W,"auto",D,L]}],"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",D,L]}],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",D,L]}],"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,D,L],radial:["",D,L],conic:[Xe,D,L]},Il,_l]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:je()}],"gradient-via-pos":[{via:je()}],"gradient-to-pos":[{to:je()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:A()}],"rounded-s":[{"rounded-s":A()}],"rounded-e":[{"rounded-e":A()}],"rounded-t":[{"rounded-t":A()}],"rounded-r":[{"rounded-r":A()}],"rounded-b":[{"rounded-b":A()}],"rounded-l":[{"rounded-l":A()}],"rounded-ss":[{"rounded-ss":A()}],"rounded-se":[{"rounded-se":A()}],"rounded-ee":[{"rounded-ee":A()}],"rounded-es":[{"rounded-es":A()}],"rounded-tl":[{"rounded-tl":A()}],"rounded-tr":[{"rounded-tr":A()}],"rounded-br":[{"rounded-br":A()}],"rounded-bl":[{"rounded-bl":A()}],"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:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...Y(),"none","hidden"]}],"outline-offset":[{"outline-offset":[W,D,L]}],"outline-w":[{outline:["",W,yt,nt]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",g,Yt,Ut]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",u,Yt,Ut]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[W,nt]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",m,Yt,Ut]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[W,D,L]}],"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":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"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":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"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":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"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":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"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":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"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":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"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":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[D,L]}],"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":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"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":k()}],"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":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"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",D,L]}],filter:[{filter:["","none",D,L]}],blur:[{blur:O()}],brightness:[{brightness:[W,D,L]}],contrast:[{contrast:[W,D,L]}],"drop-shadow":[{"drop-shadow":["","none",f,Yt,Ut]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",W,D,L]}],"hue-rotate":[{"hue-rotate":[W,D,L]}],invert:[{invert:["",W,D,L]}],saturate:[{saturate:[W,D,L]}],sepia:[{sepia:["",W,D,L]}],"backdrop-filter":[{"backdrop-filter":["","none",D,L]}],"backdrop-blur":[{"backdrop-blur":O()}],"backdrop-brightness":[{"backdrop-brightness":[W,D,L]}],"backdrop-contrast":[{"backdrop-contrast":[W,D,L]}],"backdrop-grayscale":[{"backdrop-grayscale":["",W,D,L]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[W,D,L]}],"backdrop-invert":[{"backdrop-invert":["",W,D,L]}],"backdrop-opacity":[{"backdrop-opacity":[W,D,L]}],"backdrop-saturate":[{"backdrop-saturate":[W,D,L]}],"backdrop-sepia":[{"backdrop-sepia":["",W,D,L]}],"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",D,L]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[W,"initial",D,L]}],ease:[{ease:["linear","initial",v,D,L]}],delay:[{delay:[W,D,L]}],animate:[{animate:["none",y,D,L]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,D,L]}],"perspective-origin":[{"perspective-origin":M()}],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:Z()}],"skew-x":[{"skew-x":Z()}],"skew-y":[{"skew-y":Z()}],transform:[{transform:[D,L,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:T()}],"translate-x":[{"translate-x":T()}],"translate-y":[{"translate-y":T()}],"translate-z":[{"translate-z":T()}],"translate-none":["translate-none"],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"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",D,L]}],"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",D,L]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[W,yt,nt,bn]}],stroke:[{stroke:["none",...I()]}],"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"]}},Fl=gl(Dl);function x(...e){return Fl(Qr(e))}const Pr=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ir=Qr,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 m=Pr(g)||Pr(u);return s[d][m]}),l=n&&Object.entries(n).reduce((d,g)=>{let[u,m]=g;return m===void 0||(d[u]=m),d},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,g)=>{let{class:u,className:m,...f}=g;return Object.entries(f).every(p=>{let[h,w]=p;return Array.isArray(w)?w.includes({...a,...l}[h]):{...a,...l}[h]===w})?[...d,u,m]: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"}}),pe=b.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},a)=>{const i=r?Yr.Slot:"button";return o.jsx(i,{className:x(At({variant:t,size:n,className:e})),ref:a,...s})});pe.displayName="Button";const fo=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=b.forwardRef(({className:e,type:t,variant:n,inputSize:r,...s},a)=>o.jsx("input",{type:t,className:x(fo({variant:n,inputSize:r}),e),ref:a,...s}));Je.displayName="Input";const go=b.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}));go.displayName="Textarea";const Al=Fe("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ln=b.forwardRef(({className:e,...t},n)=>o.jsx(Xr.Root,{ref:n,className:x(Al(),e),...t}));ln.displayName=Xr.Root.displayName;const po=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 On({className:e,variant:t,...n}){return o.jsx("div",{className:x(po({variant:t}),e),...n})}const ho=b.forwardRef(({className:e,orientation:t="horizontal",...n},r)=>o.jsx(Kr.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}));ho.displayName=Kr.Root.displayName;const xo=b.forwardRef(({className:e,...t},n)=>o.jsx(ft.Root,{ref:n,className:x("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));xo.displayName=ft.Root.displayName;const bo=b.forwardRef(({className:e,...t},n)=>o.jsx(ft.Image,{ref:n,className:x("aspect-square h-full w-full",e),...t}));bo.displayName=ft.Image.displayName;const vo=b.forwardRef(({className:e,...t},n)=>o.jsx(ft.Fallback,{ref:n,className:x("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));vo.displayName=ft.Fallback.displayName;const wo=b.forwardRef(({className:e,...t},n)=>o.jsx(Rn.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(Rn.Indicator,{className:x("flex items-center justify-center text-current"),children:o.jsx(_.Check,{className:"h-4 w-4"})})}));wo.displayName=Rn.Root.displayName;const yo=b.forwardRef(({className:e,...t},n)=>o.jsx(_n.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(_n.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")})}));yo.displayName=_n.Root.displayName;const El=le.Root,Vl=le.Group,$l=le.Value,Co=b.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(le.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(le.Icon,{asChild:!0,children:o.jsx(_.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Co.displayName=le.Trigger.displayName;const Hn=b.forwardRef(({className:e,...t},n)=>o.jsx(le.ScrollUpButton,{ref:n,className:x("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(_.ChevronUp,{className:"h-4 w-4"})}));Hn.displayName=le.ScrollUpButton.displayName;const Gn=b.forwardRef(({className:e,...t},n)=>o.jsx(le.ScrollDownButton,{ref:n,className:x("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(_.ChevronDown,{className:"h-4 w-4"})}));Gn.displayName=le.ScrollDownButton.displayName;const No=b.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>o.jsx(le.Portal,{children:o.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",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(Hn,{}),o.jsx(le.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(Gn,{})]})}));No.displayName=le.Content.displayName;const jo=b.forwardRef(({className:e,...t},n)=>o.jsx(le.Label,{ref:n,className:x("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));jo.displayName=le.Label.displayName;const So=b.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(le.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(le.ItemIndicator,{children:o.jsx(_.Check,{className:"h-4 w-4"})})}),o.jsx(le.ItemText,{children:t})]}));So.displayName=le.Item.displayName;const ko=b.forwardRef(({className:e,...t},n)=>o.jsx(le.Separator,{ref:n,className:x("-mx-1 my-1 h-px bg-muted",e),...t}));ko.displayName=le.Separator.displayName;const Ro=b.forwardRef(({className:e,...t},n)=>o.jsx(Mt.Root,{className:x("grid gap-2",e),...t,ref:n}));Ro.displayName=Mt.Root.displayName;const _o=b.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(_.Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})}));_o.displayName=Mt.Item.displayName;const Mo=b.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"})]}));Mo.displayName=Nt.Root.displayName;const qn=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"}}),Po=b.forwardRef(({className:e,variant:t,size:n,...r},s)=>o.jsx(Zr.Root,{ref:s,className:x(qn({variant:t,size:n,className:e})),...r}));Po.displayName=Zr.Root.displayName;const Io=b.forwardRef(({className:e,variant:t,size:n,children:r,...s},a)=>o.jsx(sn.Root,{ref:a,className:x("flex items-center justify-center gap-1",e),...s,children:o.jsx(To.Provider,{value:{variant:t,size:n},children:r})}));Io.displayName=sn.Root.displayName;const To=b.createContext({size:"default",variant:"default"}),Lo=b.forwardRef(({className:e,children:t,variant:n,size:r,...s},a)=>{const i=b.useContext(To);return o.jsx(sn.Item,{ref:a,className:x(qn({variant:i.variant||n,size:i.size||r}),e),...s,children:t})});Lo.displayName=sn.Item.displayName;function Wn({selected:e,onSelect:t,className:n,disabled:r}){const[s,a]=b.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"],m=()=>{a(ve.subMonths(s,1))},f=()=>{a(ve.addMonths(s,1))},p=h=>{r!=null&&r(h)||t==null||t(ve.isSameDay(h,e||new Date(0))?void 0:h)};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(pe,{variant:"ghost",size:"icon",onClick:m,className:"h-8 w-8 rounded-full hover:bg-accent",children:o.jsx(_.ChevronLeft,{className:"h-4 w-4"})}),o.jsx("h2",{className:"text-base font-semibold",children:ve.format(s,"MMMM yyyy")}),o.jsx(pe,{variant:"ghost",size:"icon",onClick:f,className:"h-8 w-8 rounded-full hover:bg-accent",children:o.jsx(_.ChevronRight,{className:"h-4 w-4"})})]}),o.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:u.map(h=>o.jsx("div",{className:"h-8 flex items-center justify-center text-xs font-medium text-muted-foreground",children:h},h))}),o.jsx("div",{className:"grid grid-cols-7 gap-1",children:g.map((h,w)=>{const v=ve.isSameMonth(h,s),y=e&&ve.isSameDay(h,e),C=ve.isToday(h),k=r==null?void 0:r(h);return o.jsx("button",{onClick:()=>p(h),disabled:k,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",!v&&"text-muted-foreground/40",v&&!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",k&&"opacity-30 cursor-not-allowed hover:bg-transparent"),children:ve.format(h,"d")},w)})}),o.jsxs("div",{className:"mt-4 pt-3 border-t flex justify-between items-center",children:[o.jsx(pe,{variant:"ghost",size:"sm",onClick:()=>{const h=new Date;a(ve.startOfMonth(h)),t==null||t(h)},className:"text-xs",children:"Today"}),e&&o.jsx("span",{className:"text-xs text-muted-foreground",children:ve.format(e,"MMM d, yyyy")})]})]})}Wn.displayName="Calendar";const ht=Pt.Root,xt=Pt.Trigger,lt=b.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},s)=>o.jsx(Pt.Portal,{children:o.jsx(Pt.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=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"},Do={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:"Ещё"};function Tr(e,t){if(!e)return;const n=t.split(".");let r=e;for(const s of n){if(r===void 0||typeof r=="string")return;r=r[s]}return typeof r=="string"?r:void 0}function en(e,t){if(!t)return e;let n=e;for(const[r,s]of Object.entries(t))n=n.replaceAll(`{${r}}`,String(s));return n}const zl={en:It,ru:Do},Fo=b.createContext(It),Ao=b.createContext({lang:"en",messages:{}});function Eo({locale:e="en",messages:t,children:n}){const r=typeof e=="string"?e:"en",s=b.useMemo(()=>typeof e=="string"?zl[e]??It:{...It,...e},[e]),a=b.useMemo(()=>({lang:r,messages:t??{}}),[r,t]);return o.jsx(Ao.Provider,{value:a,children:o.jsx(Fo.Provider,{value:s,children:n})})}function X(){return b.useContext(Fo)}function Bl(){const{lang:e,messages:t}=b.useContext(Ao);return{t:b.useCallback((r,s)=>{const a=Tr(t[e],r);if(a!==void 0)return en(a,s);if(e!=="en"){const i=Tr(t.en,r);if(i!==void 0)return en(i,s)}return en(r,s)},[e,t]),lang:e}}function Be(e,t){return en(e,t)}function Ol({value:e,onChange:t,placeholder:n,disabled:r,className:s}){const a=X(),i=n??a.datePicker_placeholder,[l,c]=b.useState(!1);return o.jsxs(ht,{open:l,onOpenChange:c,children:[o.jsx(xt,{asChild:!0,children:o.jsxs(pe,{variant:"outline",disabled:r,className:x("w-full justify-start text-left font-normal",!e&&"text-muted-foreground",s),children:[o.jsx(_.CalendarIcon,{className:"mr-2 h-4 w-4"}),e?ve.format(e,"PPP"):o.jsx("span",{children:i})]})}),o.jsx(lt,{className:"w-auto p-0",align:"start",children:o.jsx(Wn,{selected:e,onSelect:d=>{t==null||t(d),c(!1)}})})]})}function Hl({value:e={hours:12,minutes:0},onChange:t,is24Hour:n=!1,disabled:r,className:s}){const[a,i]=b.useState(!1),[l,c]=b.useState(e.hours>=12?"PM":"AM"),d=n?e.hours:e.hours===0?12:e.hours>12?e.hours-12:e.hours,g=()=>{const w=d.toString().padStart(2,"0"),v=e.minutes.toString().padStart(2,"0");return n?`${w}:${v}`:`${w}:${v} ${l}`},u=w=>{let v=w;n||(l==="PM"&&w!==12&&(v+=12),l==="AM"&&w===12&&(v=0)),t==null||t({...e,hours:v})},m=w=>{t==null||t({...e,minutes:w})},f=w=>{c(w);let v=e.hours;w==="PM"&&e.hours<12&&(v+=12),w==="AM"&&e.hours>=12&&(v-=12),t==null||t({...e,hours:v})},p=n?Array.from({length:24},(w,v)=>v):Array.from({length:12},(w,v)=>v+1),h=Array.from({length:12},(w,v)=>v*5);return o.jsxs(ht,{open:a,onOpenChange:i,children:[o.jsx(xt,{asChild:!0,children:o.jsxs(pe,{variant:"outline",disabled:r,className:x("w-full justify-start font-normal",s),children:[o.jsx(_.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(w=>o.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))}),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:h.map(w=>o.jsx("button",{onClick:()=>m(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))}),!n&&o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx("button",{onClick:()=>f("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:()=>f("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 Gl({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 m=Math.min(Math.max(u,n),r);t==null||t(m)}};return o.jsxs("div",{className:x("flex items-center gap-2",i),children:[o.jsx(pe,{type:"button",variant:"outline",size:"icon",onClick:c,disabled:a||e<=n,className:"h-9 w-9",children:o.jsx(_.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(pe,{type:"button",variant:"outline",size:"icon",onClick:l,disabled:a||e>=r,className:"h-9 w-9",children:o.jsx(_.Plus,{className:"h-4 w-4"})})]})}function ql({values:e=[],onChange:t,placeholder:n,disabled:r,className:s,maxTags:a}){const i=X(),l=n??i.tagInput_placeholder,[c,d]=b.useState(""),g=b.useRef(null),u=f=>{if(f.key==="Enter"&&c.trim()){if(f.preventDefault(),a&&e.length>=a)return;e.includes(c.trim())||t==null||t([...e,c.trim()]),d("")}else f.key==="Backspace"&&!c&&e.length>0&&(t==null||t(e.slice(0,-1)))},m=f=>{t==null||t(e.filter(p=>p!==f))};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 f;return(f=g.current)==null?void 0:f.focus()},children:[e.map(f=>o.jsxs(On,{variant:"secondary",className:"gap-1",children:[f,!r&&o.jsx("button",{type:"button",onClick:p=>{p.stopPropagation(),m(f)},className:"ml-1 rounded-full outline-none hover:bg-muted",children:o.jsx(_.X,{className:"h-3 w-3"})})]},f)),o.jsx("input",{ref:g,type:"text",value:c,onChange:f=>d(f.target.value),onKeyDown:u,placeholder:e.length===0?l:"",disabled:r||(a?e.length>=a:!1),className:"flex-1 min-w-[120px] bg-transparent outline-none placeholder:text-muted-foreground text-sm"})]})}function Wl({options:e,value:t,onChange:n,placeholder:r,searchPlaceholder:s,emptyText:a,disabled:i,className:l}){const c=X(),d=r??c.combobox_placeholder,g=s??c.combobox_searchPlaceholder,u=a??c.combobox_empty,[m,f]=b.useState(!1),[p,h]=b.useState(""),w=e.filter(y=>y.label.toLowerCase().includes(p.toLowerCase())),v=e.find(y=>y.value===t);return o.jsxs(ht,{open:m,onOpenChange:f,children:[o.jsx(xt,{asChild:!0,children:o.jsxs(pe,{variant:"outline",role:"combobox","aria-expanded":m,disabled:i,className:x("w-full justify-between font-normal",!t&&"text-muted-foreground",l),children:[v?v.label:d,o.jsx(_.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:g,value:p,onChange:y=>h(y.target.value),className:"h-8"})}),o.jsx("div",{className:"max-h-60 overflow-auto p-1",children:w.length===0?o.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:u}):w.map(y=>o.jsxs("button",{onClick:()=>{n==null||n(y.value===t?"":y.value),f(!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",t===y.value&&"bg-accent"),children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:t===y.value&&o.jsx(_.Check,{className:"h-4 w-4"})}),y.label]},y.value))})]})]})}function Ul({options:e,value:t=[],onChange:n,placeholder:r,searchPlaceholder:s,emptyText:a,disabled:i,className:l,maxDisplay:c=3}){const d=X(),g=r??d.multiselect_placeholder,u=s??d.multiselect_searchPlaceholder,m=a??d.multiselect_empty,[f,p]=b.useState(!1),[h,w]=b.useState(""),v=e.filter(S=>S.label.toLowerCase().includes(h.toLowerCase())),y=e.filter(S=>t.includes(S.value)),C=S=>{const R=t.includes(S)?t.filter(N=>N!==S):[...t,S];n==null||n(R)},k=(S,R)=>{R.stopPropagation(),n==null||n(t.filter(N=>N!==S))},M=()=>t.length===0?g:t.length<=c?y.map(S=>S.label).join(", "):Be(d.multiselect_selected,{count:t.length});return o.jsxs(ht,{open:f,onOpenChange:p,children:[o.jsx(xt,{asChild:!0,children:o.jsxs(pe,{variant:"outline",role:"combobox","aria-expanded":f,disabled:i,className:x("w-full justify-between font-normal",t.length===0&&"text-muted-foreground",l),children:[o.jsx("span",{className:"truncate",children:M()}),o.jsx(_.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:u,value:h,onChange:S=>w(S.target.value),className:"h-8"})}),t.length>0&&o.jsx("div",{className:"flex flex-wrap gap-1 p-2 border-b",children:y.map(S=>o.jsxs(On,{variant:"secondary",className:"pr-1",children:[S.label,o.jsx("button",{onClick:R=>k(S.value,R),className:"ml-1 rounded-full hover:bg-muted",children:o.jsx(_.X,{className:"h-3 w-3"})})]},S.value))}),o.jsx("div",{className:"max-h-60 overflow-auto p-1",children:v.length===0?o.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:m}):v.map(S=>{const R=t.includes(S.value);return o.jsxs("button",{onClick:()=>C(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",R&&"bg-accent"),children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:R&&o.jsx(_.Check,{className:"h-4 w-4"})}),S.label]},S.value)})})]})]})}function Yl({length:e=6,value:t="",onChange:n,onComplete:r,disabled:s,className:a}){const i=b.useRef([]),l=(g,u)=>{var p;if(!/^\d*$/.test(u))return;const m=t.split("");m[g]=u;const f=m.join("").slice(0,e);n==null||n(f),u&&g<e-1&&((p=i.current[g+1])==null||p.focus()),f.length===e&&(r==null||r(f))},c=(g,u)=>{var m;u.key==="Backspace"&&!t[g]&&g>0&&((m=i.current[g-1])==null||m.focus())},d=g=>{var m;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)),(m=i.current[Math.min(u.length,e-1)])==null||m.focus()};return o.jsx("div",{className:x("flex gap-2",a),children:Array.from({length:e}).map((g,u)=>o.jsx("input",{ref:m=>{i.current[u]=m},type:"text",inputMode:"numeric",maxLength:1,value:t[u]||"",onChange:m=>l(u,m.target.value),onKeyDown:m=>c(u,m),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 Xl({accept:e,maxSize:t,multiple:n=!1,onUpload:r,disabled:s,className:a}){const[i,l]=b.useState([]),[c,d]=b.useState(!1),g=b.useRef(null),u=X(),m=y=>{if(!y)return;const C=Array.from(y).filter(M=>!(t&&M.size>t)),k=n?[...i,...C]:C.slice(0,1);l(k),r==null||r(k)},f=y=>{y.preventDefault(),d(!1),s||m(y.dataTransfer.files)},p=y=>{y.preventDefault(),s||d(!0)},h=()=>{d(!1)},w=y=>{const C=i.filter((k,M)=>M!==y);l(C),r==null||r(C)},v=y=>y<1024?y+" B":y<1024*1024?(y/1024).toFixed(1)+" KB":(y/(1024*1024)).toFixed(1)+" MB";return o.jsxs("div",{className:x("space-y-4",a),children:[o.jsxs("div",{onClick:()=>{var y;return!s&&((y=g.current)==null?void 0:y.click())},onDrop:f,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:[o.jsx(_.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:u.fileUpload_dragDrop}),t&&o.jsx("p",{className:"text-xs text-muted-foreground",children:Be(u.fileUpload_maxSize,{size:v(t)})}),o.jsx("input",{ref:g,type:"file",accept:e,multiple:n,onChange:y=>m(y.target.files),disabled:s,className:"hidden"})]}),i.length>0&&o.jsx("div",{className:"space-y-2",children:i.map((y,C)=>o.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border bg-muted/50",children:[o.jsx(_.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:y.name}),o.jsx("p",{className:"text-xs text-muted-foreground",children:v(y.size)})]}),o.jsx(pe,{type:"button",variant:"ghost",size:"icon",onClick:()=>w(C),className:"h-8 w-8",children:o.jsx(_.X,{className:"h-4 w-4"})})]},C))})]})}const Kl=["#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 Zl(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 Jl({value:e="#3b82f6",onChange:t,disabled:n,className:r}){const[s,a]=b.useState(!1),[i,l]=b.useState(()=>Xt(e)),[c,d]=b.useState(e),g=b.useRef(null);b.useEffect(()=>{l(Xt(e)),d(e)},[e]);const u=p=>{l(p);const h=Zl(p.h,p.s,p.l);d(h),t==null||t(h)},m=p=>{if(!g.current)return;const h=g.current.getBoundingClientRect(),w=Math.max(0,Math.min(1,(p.clientX-h.left)/h.width)),v=Math.max(0,Math.min(1,(p.clientY-h.top)/h.height));u({...i,s:Math.round(w*100),l:Math.round((1-v)*100)})},f=p=>{if(d(p),/^#[0-9A-Fa-f]{6}$/.test(p)){const h=Xt(p);l(h),t==null||t(p)}};return o.jsxs(ht,{open:s,onOpenChange:a,children:[o.jsx(xt,{asChild:!0,children:o.jsxs(pe,{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:m,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
4
|
`},children:o.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}})}),o.jsxs("div",{className:"space-y-1",children:[o.jsx(ln,{className:"text-xs",children:"Hue"}),o.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,
|
|
@@ -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:Ul.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 Ao=v.forwardRef(({className:e,as:t="div",...n},r)=>o.jsx(t,{ref:r,className:x(e),...n}));Ao.displayName="Box";const Eo=v.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}));Eo.displayName="Flex";const Vo=v.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}));Vo.displayName="VStack";const $o=v.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}));$o.displayName="HStack";const zo=v.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})});zo.displayName="Grid";const Kl={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"},Bo=v.forwardRef(({className:e,maxWidth:t="lg",centered:n=!0,...r},s)=>o.jsx("div",{ref:s,className:x("w-full px-4",Kl[t],n&&"mx-auto",e),...r}));Bo.displayName="Container";const Zl=Gi.Root,Jl=zn.Root,Ql=zn.CollapsibleTrigger,Oo=v.forwardRef(({className:e,children:t,...n},r)=>o.jsx(zn.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})}));Oo.displayName="CollapsibleContent";const Ho=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"}}),Un=v.forwardRef(({className:e,variant:t,...n},r)=>o.jsx("div",{ref:r,className:x(Ho({variant:t}),e),...n}));Un.displayName="Card";const Yn=v.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("flex flex-col space-y-1.5 p-6",e),...t}));Yn.displayName="CardHeader";const Xn=v.forwardRef(({className:e,...t},n)=>o.jsx("h3",{ref:n,className:x("text-2xl font-semibold leading-none tracking-tight",e),...t}));Xn.displayName="CardTitle";const Go=v.forwardRef(({className:e,...t},n)=>o.jsx("p",{ref:n,className:x("text-sm text-muted-foreground",e),...t}));Go.displayName="CardDescription";const Kn=v.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("p-6 pt-0",e),...t}));Kn.displayName="CardContent";const qo=v.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("flex items-center p-6 pt-0",e),...t}));qo.displayName="CardFooter";const Zn=v.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})}));Zn.displayName="Table";const Jn=v.forwardRef(({className:e,...t},n)=>o.jsx("thead",{ref:n,className:x("[&_tr]:border-b",e),...t}));Jn.displayName="TableHeader";const Qn=v.forwardRef(({className:e,...t},n)=>o.jsx("tbody",{ref:n,className:x("[&_tr:last-child]:border-0",e),...t}));Qn.displayName="TableBody";const Wo=v.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}));Wo.displayName="TableFooter";const St=v.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 er=v.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}));er.displayName="TableHead";const nn=v.forwardRef(({className:e,...t},n)=>o.jsx("td",{ref:n,className:x("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));nn.displayName="TableCell";const Uo=v.forwardRef(({className:e,...t},n)=>o.jsx("caption",{ref:n,className:x("mt-4 text-sm text-muted-foreground",e),...t}));Uo.displayName="TableCaption";const tr=v.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(rn,{orientation:"vertical"}),(n==="horizontal"||n==="both")&&o.jsx(rn,{orientation:"horizontal"}),o.jsx(ot.Corner,{})]}));tr.displayName=ot.Root.displayName;const rn=v.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"})}));rn.displayName=ot.ScrollAreaScrollbar.displayName;const ed=it.Root,Yo=v.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}));Yo.displayName=it.List.displayName;const Xo=v.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}));Xo.displayName=it.Trigger.displayName;const Ko=v.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}));Ko.displayName=it.Content.displayName;const td=st.Root,Zo=v.forwardRef(({className:e,...t},n)=>o.jsx(st.Item,{ref:n,className:x("border-b",e),...t}));Zo.displayName="AccordionItem";const Jo=v.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(T.ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Jo.displayName=st.Trigger.displayName;const Qo=v.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})}));Qo.displayName=st.Content.displayName;const es=te.Root,nd=te.Trigger,ts=te.Portal,rd=te.Close,nr=v.forwardRef(({className:e,...t},n)=>o.jsx(te.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}));nr.displayName=te.Overlay.displayName;const rr=v.forwardRef(({className:e,children:t,...n},r)=>{const s=Y();return o.jsxs(ts,{children:[o.jsx(nr,{}),o.jsxs(te.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(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:[o.jsx(T.X,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:s.common_close})]})]})]})});rr.displayName=te.Content.displayName;const ns=({className:e,...t})=>o.jsx("div",{className:x("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ns.displayName="DialogHeader";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="DialogFooter";const os=v.forwardRef(({className:e,...t},n)=>o.jsx(te.Title,{ref:n,className:x("text-lg font-semibold leading-none tracking-tight",e),...t}));os.displayName=te.Title.displayName;const ss=v.forwardRef(({className:e,...t},n)=>o.jsx(te.Description,{ref:n,className:x("text-sm text-muted-foreground",e),...t}));ss.displayName=te.Description.displayName;const as=te.Root,is=te.Trigger,ls=te.Close,ds=te.Portal,or=v.forwardRef(({className:e,...t},n)=>o.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),...t,ref:n}));or.displayName=te.Overlay.displayName;const od=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"}}),sr=v.forwardRef(({side:e="right",className:t,children:n,...r},s)=>{const a=Y();return o.jsxs(ds,{children:[o.jsx(or,{}),o.jsxs(te.Content,{ref:s,className:x(od({side:e}),t),...r,children:[n,o.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:[o.jsx(T.X,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:a.common_close})]})]})]})});sr.displayName=te.Content.displayName;const ar=({className:e,...t})=>o.jsx("div",{className:x("flex flex-col space-y-2 text-center sm:text-left",e),...t});ar.displayName="SheetHeader";const ir=({className:e,...t})=>o.jsx("div",{className:x("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ir.displayName="SheetFooter";const lr=v.forwardRef(({className:e,...t},n)=>o.jsx(te.Title,{ref:n,className:x("text-lg font-semibold text-foreground",e),...t}));lr.displayName=te.Title.displayName;const dr=v.forwardRef(({className:e,...t},n)=>o.jsx(te.Description,{ref:n,className:x("text-sm text-muted-foreground",e),...t}));dr.displayName=te.Description.displayName;const cs=ne.Root,us=ne.Trigger,sd=ne.Group,ad=ne.Portal,id=ne.Sub,ld=ne.RadioGroup,ms=v.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 data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,o.jsx(T.ChevronRight,{className:"ml-auto h-4 w-4"})]}));ms.displayName=ne.SubTrigger.displayName;const fs=v.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}));fs.displayName=ne.SubContent.displayName;const cr=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>o.jsx(ne.Portal,{children:o.jsx(ne.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})}));cr.displayName=ne.Content.displayName;const kt=v.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 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=ne.Item.displayName;const gs=v.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 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(ne.ItemIndicator,{children:o.jsx(T.Check,{className:"h-4 w-4"})})}),t]}));gs.displayName=ne.CheckboxItem.displayName;const ps=v.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 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(ne.ItemIndicator,{children:o.jsx(T.Circle,{className:"h-2 w-2 fill-current"})})}),t]}));ps.displayName=ne.RadioItem.displayName;const hs=v.forwardRef(({className:e,inset:t,...n},r)=>o.jsx(ne.Label,{ref:r,className:x("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));hs.displayName=ne.Label.displayName;const xs=v.forwardRef(({className:e,...t},n)=>o.jsx(ne.Separator,{ref:n,className:x("-mx-1 my-1 h-px bg-muted",e),...t}));xs.displayName=ne.Separator.displayName;const vs=({className:e,...t})=>o.jsx("span",{className:x("ml-auto text-xs tracking-widest opacity-60",e),...t});vs.displayName="DropdownMenuShortcut";const dd=Ft.Provider,cd=Ft.Root,ud=Ft.Trigger,bs=v.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}));bs.displayName=Ft.Content.displayName;const ur=v.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}));ur.displayName=Me.Command.displayName;const md=({children:e,...t})=>o.jsx(es,{...t,children:o.jsx(rr,{className:"overflow-hidden p-0 shadow-lg",children:o.jsx(ur,{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})})}),ws=v.forwardRef(({className:e,...t},n)=>o.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[o.jsx(T.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})]}));ws.displayName=Me.Command.Input.displayName;const ys=v.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}));ys.displayName=Me.Command.List.displayName;const Ns=v.forwardRef((e,t)=>o.jsx(Me.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Ns.displayName=Me.Command.Empty.displayName;const Cs=v.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}));Cs.displayName=Me.Command.Group.displayName;const js=v.forwardRef(({className:e,...t},n)=>o.jsx(Me.Command.Separator,{ref:n,className:x("-mx-1 h-px bg-border",e),...t}));js.displayName=Me.Command.Separator.displayName;const Ss=v.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}));Ss.displayName=Me.Command.Item.displayName;const ks=({className:e,...t})=>o.jsx("span",{className:x("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});ks.displayName="CommandShortcut";const fd=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"}}),Rs=v.forwardRef(({className:e,variant:t,...n},r)=>o.jsx("div",{ref:r,role:"alert",className:x(fd({variant:t}),e),...n}));Rs.displayName="Alert";const _s=v.forwardRef(({className:e,...t},n)=>o.jsx("h5",{ref:n,className:x("mb-1 font-medium leading-none tracking-tight",e),...t}));_s.displayName="AlertTitle";const Ms=v.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("text-sm [&_p]:leading-relaxed",e),...t}));Ms.displayName="AlertDescription";const gd=Re.Root,pd=Re.Trigger,Ps=Re.Portal,mr=v.forwardRef(({className:e,...t},n)=>o.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),...t,ref:n}));mr.displayName=Re.Overlay.displayName;const Is=v.forwardRef(({className:e,...t},n)=>o.jsxs(Ps,{children:[o.jsx(mr,{}),o.jsx(Re.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})]}));Is.displayName=Re.Content.displayName;const Ts=({className:e,...t})=>o.jsx("div",{className:x("flex flex-col space-y-2 text-center sm:text-left",e),...t});Ts.displayName="AlertDialogHeader";const Ls=({className:e,...t})=>o.jsx("div",{className:x("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ls.displayName="AlertDialogFooter";const Ds=v.forwardRef(({className:e,...t},n)=>o.jsx(Re.Title,{ref:n,className:x("text-lg font-semibold",e),...t}));Ds.displayName=Re.Title.displayName;const Fs=v.forwardRef(({className:e,...t},n)=>o.jsx(Re.Description,{ref:n,className:x("text-sm text-muted-foreground",e),...t}));Fs.displayName=Re.Description.displayName;const As=v.forwardRef(({className:e,...t},n)=>o.jsx(Re.Action,{ref:n,className:x(At(),e),...t}));As.displayName=Re.Action.displayName;const Es=v.forwardRef(({className:e,...t},n)=>o.jsx(Re.Cancel,{ref:n,className:x(At({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Es.displayName=Re.Cancel.displayName;const Vs=v.forwardRef(({className:e,value:t,...n},r)=>o.jsx(Mn.Root,{ref:r,className:x("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:o.jsx(Mn.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Vs.displayName=Mn.Root.displayName;function hd({className:e,...t}){return o.jsx("div",{className:x("animate-pulse rounded-md bg-muted",e),...t})}function xd(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 vd=e=>{switch(e){case"success":return yd;case"info":return Cd;case"warning":return Nd;case"error":return jd;default:return null}},bd=Array(12).fill(0),wd=({visible:e,className:t})=>j.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},j.createElement("div",{className:"sonner-spinner"},bd.map((n,r)=>j.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),yd=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"})),Nd=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"})),Cd=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"})),jd=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"})),Sd=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"})),kd=()=>{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 Rd{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(Md(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 Rd,_d=(e,t)=>{const n=(t==null?void 0:t.id)||In++;return _e.addToast({title:e,...t,id:n}),n},Md=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Pd=_d,Id=()=>_e.toasts,Td=()=>_e.getActiveToasts(),Ld=Object.assign(Pd,{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:Id,getToasts:Td});xd("[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 Dd=3,Fd="24px",Ad="16px",Lr=4e3,Ed=356,Vd=14,$d=45,zd=200;function qe(...e){return e.filter(Boolean).join(" ")}function Bd(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const Od=e=>{var t,n,r,s,a,i,l,c,d;const{invert:g,toast:u,unstyled:f,interacting:m,setHeights:p,visibleToasts:h,heights:y,index:b,toasts:w,expanded:N,removeToast:R,defaultRichColors:_,closeButton:S,style:k,cancelButtonStyle:C,actionButtonStyle:F,className:G="",descriptionClassName:E="",duration:J,position:Q,gap:M,expandByDefault:K,classNames:V,icons:U,closeButtonAriaLabel:P="Close toast"}=e,[fe,ge]=j.useState(null),[de,je]=j.useState(null),[A,B]=j.useState(!1),[X,ce]=j.useState(!1),[q,O]=j.useState(!1),[ue,ie]=j.useState(!1),[Z,I]=j.useState(!1),[ee,se]=j.useState(0),[we,Ie]=j.useState(0),Se=j.useRef(u.duration||J||Lr),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(()=>y.findIndex(H=>H.toastId===u.id)||0,[y,u.id]),zt=j.useMemo(()=>{var H;return(H=u.closeButton)!=null?H:S},[u.closeButton,S]),Bt=j.useMemo(()=>u.duration||J||Lr,[u.duration,J]),et=j.useRef(0),Te=j.useRef(0),ct=j.useRef(0),Ge=j.useRef(null),[ut,gn]=Q.split("-"),Ot=j.useMemo(()=>y.reduce((H,me,he)=>he>=dt?H:H+me.height,0),[y,dt]),Ht=kd(),pn=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(!A)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])},[A,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)},zd)},[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 hn(){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(wd,{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])||vd(ye);var bt,wt;return j.createElement("li",{tabIndex:0,ref:ve,className:qe(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[ye],u==null||(n=u.classNames)==null?void 0:n[ye]),"data-sonner-toast":"","data-rich-colors":(bt=u.richColors)!=null?bt:_,"data-styled":!(u.jsx||u.unstyled||f),"data-mounted":A,"data-promise":!!u.promise,"data-swiped":Z,"data-removed":X,"data-visible":Qe,"data-y-position":ut,"data-x-position":gn,"data-index":b,"data-front":We,"data-swiping":q,"data-dismissible":He,"data-type":ye,"data-invert":pn,"data-swipe-out":ue,"data-swipe-direction":de,"data-expanded":!!(N||K&&A),"data-testid":u.testId,style:{"--index":b,"--toasts-before":b,"--z-index":w.length-b,"--offset":`${X?ee:Te.current}px`,"--initial-height":K?"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)>=$d||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:Bd(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 jr=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*jr(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*jr(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||(r=u.classNames)==null?void 0:r.closeButton)},(wt=U==null?void 0:U.close)!=null?wt:Sd):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||hn():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||F,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 Dr(){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 Hd(e,t){const n={};return[e,t].forEach((r,s)=>{const a=s===1,i=a?"--mobile-offset":"--offset",l=a?Ad:Fd;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 Gd=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:h,visibleToasts:y=Dd,toastOptions:b,dir:w=Dr(),gap:N=Vd,icons:R,containerAriaLabel:_="Notifications"}=t,[S,k]=j.useState([]),C=j.useMemo(()=>r?S.filter(A=>A.toasterId===r):S.filter(A=>!A.toasterId),[S,r]),F=j.useMemo(()=>Array.from(new Set([a].concat(C.filter(A=>A.position).map(A=>A.position)))),[C,a]),[G,E]=j.useState([]),[J,Q]=j.useState(!1),[M,K]=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(A=>{k(B=>{var X;return(X=B.find(ce=>ce.id===A.id))!=null&&X.delete||_e.dismiss(A.id),B.filter(({id:ce})=>ce!==A.id)})},[]);return j.useEffect(()=>_e.subscribe(A=>{if(A.dismiss){requestAnimationFrame(()=>{k(B=>B.map(X=>X.id===A.id?{...X,delete:!0}:X))});return}setTimeout(()=>{zi.flushSync(()=>{k(B=>{const X=B.findIndex(ce=>ce.id===A.id);return X!==-1?[...B.slice(0,X),{...B[X],...A},...B.slice(X+1)]:[A,...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 A=window.matchMedia("(prefers-color-scheme: dark)");try{A.addEventListener("change",({matches:B})=>{U(B?"dark":"light")})}catch{A.addListener(({matches:X})=>{try{U(X?"dark":"light")}catch(ce){console.error(ce)}})}},[f]),j.useEffect(()=>{S.length<=1&&Q(!1)},[S]),j.useEffect(()=>{const A=B=>{var X;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||(X=P.current)!=null&&X.contains(document.activeElement))&&Q(!1)};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[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:n,"aria-label":`${_} ${fe}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},F.map((A,B)=>{var X;const[ce,q]=A.split("-");return C.length?j.createElement("ol",{key:A,dir:w==="auto"?Dr():w,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":`${((X=G[0])==null?void 0:X.height)||0}px`,"--width":`${Ed}px`,"--gap":`${N}px`,...h,...Hd(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"||K(!0)},onPointerUp:()=>K(!1)},C.filter(O=>!O.position&&B===0||O.position===A).map((O,ue)=>{var ie,Z;return j.createElement(Od,{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:y,closeButton:(Z=b==null?void 0:b.closeButton)!=null?Z:c,interacting:M,position:A,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:t.swipeDirections})})):null}))}),bn=["light","dark","system"];function qd(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Fr(e){return e==="system"?qd():e}function Wd(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 Ud(e,t){const n=document.documentElement;t==="class"?(n.classList.remove("light","dark"),n.classList.add(e)):n.setAttribute("data-theme",e)}const $s=j.createContext(void 0);function Yd({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 b=localStorage.getItem(n);return b&&bn.includes(b)?b:t}),[g,u]=j.useState(()=>Fr(i??c)),f=j.useRef(c);f.current=c;const m=j.useCallback(()=>{const b=i??f.current,w=Fr(b);u(w);let N;a&&(N=Wd(l)),Ud(w,r),N==null||N()},[i,r,a,l]);j.useEffect(()=>{m()},[c,i,m]),j.useEffect(()=>{if(!s)return;const b=window.matchMedia("(prefers-color-scheme: dark)"),w=()=>{(i??f.current)==="system"&&m()};return b.addEventListener("change",w),()=>b.removeEventListener("change",w)},[s,i,m]),j.useEffect(()=>{const b=w=>{if(w.key===n&&w.newValue){const N=w.newValue;bn.includes(N)&&d(N)}};return window.addEventListener("storage",b),()=>window.removeEventListener("storage",b)},[n]);const p=j.useCallback(b=>{!s&&b==="system"||(localStorage.setItem(n,b),d(b))},[n,s]),h=j.useMemo(()=>s?bn:["light","dark"],[s]),y=j.useMemo(()=>({theme:i??c,resolvedTheme:g,setTheme:p,themes:h}),[i,c,g,p,h]);return o.jsx($s.Provider,{value:y,children:e})}function dn(){const e=j.useContext($s);if(e===void 0)throw new Error("useTheme must be used within a <ThemeProvider>");return e}const Xd=({theme:e,...t})=>{let n=e;try{const{resolvedTheme:r}=dn();e||(n=r)}catch{n||(n="system")}return o.jsx(Gd,{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 Kd({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 zs=v.forwardRef(({...e},t)=>o.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));zs.displayName="Breadcrumb";const Bs=v.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}));Bs.displayName="BreadcrumbList";const Os=v.forwardRef(({className:e,...t},n)=>o.jsx("li",{ref:n,className:x("inline-flex items-center gap-1.5",e),...t}));Os.displayName="BreadcrumbItem";const Hs=v.forwardRef(({asChild:e,className:t,...n},r)=>{const s=e?Wr.Slot:"a";return o.jsx(s,{ref:r,className:x("transition-colors hover:text-foreground",t),...n})});Hs.displayName="BreadcrumbLink";const Gs=v.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}));Gs.displayName="BreadcrumbPage";const qs=({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(T.ChevronRight,{})});qs.displayName="BreadcrumbSeparator";const Ws=({className:e,...t})=>{const n=Y();return 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:n.breadcrumb_more})]})};Ws.displayName="BreadcrumbEllipsis";const Us=({className:e,...t})=>o.jsx("nav",{role:"navigation","aria-label":"pagination",className:x("mx-auto flex w-full justify-center",e),...t});Us.displayName="Pagination";const Ys=v.forwardRef(({className:e,...t},n)=>o.jsx("ul",{ref:n,className:x("flex flex-row items-center gap-1",e),...t}));Ys.displayName="PaginationContent";const Xs=v.forwardRef(({className:e,...t},n)=>o.jsx("li",{ref:n,className:x("",e),...t}));Xs.displayName="PaginationItem";const cn=({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});cn.displayName="PaginationLink";const Ks=({className:e,...t})=>{const n=Y();return o.jsxs(cn,{"aria-label":n.pagination_goToPrevious,size:"default",className:x("gap-1 pl-2.5",e),...t,children:[o.jsx(T.ChevronLeft,{className:"h-4 w-4"}),o.jsx("span",{children:n.pagination_previous})]})};Ks.displayName="PaginationPrevious";const Zs=({className:e,...t})=>{const n=Y();return o.jsxs(cn,{"aria-label":n.pagination_goToNext,size:"default",className:x("gap-1 pr-2.5",e),...t,children:[o.jsx("span",{children:n.pagination_next}),o.jsx(T.ChevronRight,{className:"h-4 w-4"})]})};Zs.displayName="PaginationNext";const Js=({className:e,...t})=>{const n=Y();return o.jsxs("span",{"aria-hidden":!0,className:x("flex h-9 w-9 items-center justify-center",e),...t,children:[o.jsx(T.MoreHorizontal,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:n.pagination_morePages})]})};Js.displayName="PaginationEllipsis";function Zd({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(v.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(T.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 Qs=v.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(Pe.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,{})]}));Qs.displayName=Pe.Root.displayName;const ea=v.forwardRef(({className:e,...t},n)=>o.jsx(Pe.List,{ref:n,className:x("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));ea.displayName=Pe.List.displayName;const Jd=Pe.Item,ta=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"),na=v.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(Pe.Trigger,{ref:r,className:x(ta(),"group",e),...n,children:[t," ",o.jsx(T.ChevronDown,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));na.displayName=Pe.Trigger.displayName;const ra=v.forwardRef(({className:e,...t},n)=>o.jsx(Pe.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}));ra.displayName=Pe.Content.displayName;const Qd=Pe.Link,fr=v.forwardRef(({className:e,...t},n)=>o.jsx("div",{className:x("absolute left-0 top-full flex justify-center"),children:o.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:n,...t})}));fr.displayName=Pe.Viewport.displayName;const oa=v.forwardRef(({className:e,...t},n)=>o.jsx(Pe.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"})}));oa.displayName=Pe.Indicator.displayName;const ec=re.Root,tc=re.Trigger,nc=re.Group,rc=re.Portal,oc=re.Sub,sc=re.RadioGroup,sa=v.forwardRef(({className:e,inset:t,children:n,...r},s)=>o.jsxs(re.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(T.ChevronRight,{className:"ml-auto h-4 w-4"})]}));sa.displayName=re.SubTrigger.displayName;const aa=v.forwardRef(({className:e,...t},n)=>o.jsx(re.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}));aa.displayName=re.SubContent.displayName;const ia=v.forwardRef(({className:e,...t},n)=>o.jsx(re.Portal,{children:o.jsx(re.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})}));ia.displayName=re.Content.displayName;const la=v.forwardRef(({className:e,inset:t,...n},r)=>o.jsx(re.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}));la.displayName=re.Item.displayName;const da=v.forwardRef(({className:e,children:t,checked:n,...r},s)=>o.jsxs(re.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(re.ItemIndicator,{children:o.jsx(T.Check,{className:"h-4 w-4"})})}),t]}));da.displayName=re.CheckboxItem.displayName;const ca=v.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(re.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(re.ItemIndicator,{children:o.jsx(T.Circle,{className:"h-2 w-2 fill-current"})})}),t]}));ca.displayName=re.RadioItem.displayName;const ua=v.forwardRef(({className:e,inset:t,...n},r)=>o.jsx(re.Label,{ref:r,className:x("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...n}));ua.displayName=re.Label.displayName;const ma=v.forwardRef(({className:e,...t},n)=>o.jsx(re.Separator,{ref:n,className:x("-mx-1 my-1 h-px bg-border",e),...t}));ma.displayName=re.Separator.displayName;const fa=({className:e,...t})=>o.jsx("span",{className:x("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});fa.displayName="ContextMenuShortcut";const ac=an.Root,ic=an.Trigger,ga=v.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},s)=>o.jsx(an.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}));ga.displayName=an.Content.displayName;function lc(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ar(e){return lc(e)||Array.isArray(e)}function dc(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function gr(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}`:!Ar(l)||!Ar(c)?l===c:gr(l,c)})}function Er(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function cc(e,t){if(e.length!==t.length)return!1;const n=Er(e),r=Er(t);return n.every((s,a)=>{const i=r[a];return gr(s,i)})}function pr(e){return typeof e=="number"}function Tn(e){return typeof e=="string"}function un(e){return typeof e=="boolean"}function Vr(e){return Object.prototype.toString.call(e)==="[object Object]"}function ae(e){return Math.abs(e)}function hr(e){return Math.sign(e)}function Rt(e,t){return ae(e-t)}function uc(e,t){if(e===0||t===0||ae(e)<=ae(t))return 0;const n=Rt(ae(e),ae(t));return ae(n/e)}function mc(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 xr(e,t){return t===Et(e)}function $r(e,t=0){return Array.from(Array(e),(n,r)=>t+r)}function Lt(e){return Object.keys(e)}function pa(e,t){return[e,t].reduce((n,r)=>(Lt(r).forEach(s=>{const a=n[s],i=r[s],l=Vr(a)&&Vr(i);n[s]=l?pa(a,i):i}),n),{})}function Ln(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function fc(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 Tn(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 gc(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(y){if(!c)return;i||(i=y,n(),n());const b=y-i;for(i=y,l+=b;l>=a;)n(),l-=a;const w=l/a;r(w),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 pc(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:h,width:y}=p;return r?h:y}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=ae(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 ha(e,t,n){const{constrain:r}=at(0,e),s=e+1;let a=i(t);function i(f){return n?ae((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 ha(e,l(),n)}const u={get:l,set:c,add:d,clone:g};return u}function hc(e,t,n,r,s,a,i,l,c,d,g,u,f,m,p,h,y,b,w){const{cross:N,direction:R}=e,_=["INPUT","SELECT","TEXTAREA"],S={passive:!1},k=Dt(),C=Dt(),F=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,K=0,V=!1,U=!1,P=!1,fe=!1;function ge(I){if(!w)return;function ee(we){(un(w)||w(I,we))&&ce(we)}const se=t;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?n:t;C.add(I,"touchmove",q,S).add(I,"touchend",O).add(I,"mousemove",q,S).add(I,"mouseup",O)}function A(I){const ee=I.nodeName||"";return _.includes(ee)}function B(){return(p?E:G)[fe?"mouse":"touch"]}function X(I,ee){const se=u.add(hr(I)*-1),we=g.byDistance(I,!p).distance;return p||ae(I)<F?we:y&&ee?we*.5:g.byIndex(se.get(),0).distance}function ce(I){const ee=Ln(I,r);fe=ee,P=p&&ee&&!I.buttons&&Q,Q=Rt(s.get(),i.get())>=2,!(ee&&I.button!==0)&&(A(I.target)||(V=!0,a.pointerDown(I),d.useFriction(0).useDuration(0),s.set(i),je(),M=a.readPoint(I),K=a.readPoint(I,N),f.emit("pointerDown")))}function q(I){if(!Ln(I,r)&&I.touches.length>=2)return O(I);const se=a.readPoint(I),we=a.readPoint(I,N),Ie=Rt(se,M),Se=Rt(we,K);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=X(R(we),se),Se=uc(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 xc(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,h=f/m;return m&&!p&&ae(h)>.1?h:0}return{pointerDown:l,pointerMove:c,pointerUp:d,readPoint:i}}function vc(){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 bc(e){function t(r){return e*(r/100)}return{measure:t}}function wc(e,t,n,r,s,a,i){const l=[e].concat(r);let c,d,g=[],u=!1;function f(y){return s.measureSize(i.measure(y))}function m(y){if(!a)return;d=f(e),g=r.map(f);function b(w){for(const N of w){if(u)return;const R=N.target===e,_=r.indexOf(N.target),S=R?d:g[_],k=f(R?e:r[_]);if(ae(k-S)>=.5){y.reInit(),t.emit("resize");break}}}c=new ResizeObserver(w=>{(un(a)||a(y,w))&&b(w)}),n.requestAnimationFrame(()=>{l.forEach(w=>c.observe(w))})}function p(){u=!0,c&&c.disconnect()}return{init:m,destroy:p}}function yc(e,t,n,r,s,a){let i=0,l=0,c=s,d=a,g=e.get(),u=0;function f(){const S=r.get()-e.get(),k=!c;let C=0;return k?(i=0,n.set(r),e.set(r),C=S):(n.set(e),i+=S/c,i*=d,g+=i,e.add(i),C=g-u),l=hr(C),u=g,_}function m(){const S=r.get()-t.get();return ae(S)<.001}function p(){return c}function h(){return l}function y(){return i}function b(){return N(s)}function w(){return R(a)}function N(S){return c=S,_}function R(S){return d=S,_}const _={direction:h,duration:p,velocity:y,seek:f,settled:m,useBaseFriction:w,useBaseDuration:b,useFriction:R,useDuration:N};return _}function Nc(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",h=ae(e[p]-t.get()),y=n.get()-t.get(),b=l.constrain(h/i);n.subtract(y*b),!m&&ae(y)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function u(m){c=!m}return{shouldConstrain:d,constrain:g,toggleActive:u}}function Cc(e,t,n,r,s){const a=at(-t+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),y=i.lastIndexOf(p),b=i.indexOf(h)+1;return at(y,b)}function u(){return n.map((p,h)=>{const{min:y,max:b}=a,w=a.constrain(p),N=!h,R=xr(n,h);return N?b:R||d(y,w)?y:d(b,w)?b:w}).map(p=>parseFloat(p.toFixed(3)))}function f(){if(t<=e+s)return[a.max];if(r==="keepSnaps")return i;const{min:p,max:h}=l;return i.slice(p,h)}return{snapsContained:c,scrollContainLimit:l}}function jc(e,t,n){const r=t[0],s=n?r-e:$e(t);return{limit:at(s,r)}}function Sc(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 kc(e){const{max:t,length:n}=e;function r(a){const i=a-t;return n?i/-n:0}return{get:r}}function Rc(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(h=>$e(h)[i]-h[0][a]).map(ae)}function f(){return r.map(h=>n[a]-h[a]).map(h=>-ae(h))}function m(){return l(d).map(h=>h[0]).map((h,y)=>h+c[y])}return{snaps:d,snapsAligned:g}}function _c(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,h,y)=>{const b=!h,w=xr(y,h);if(b){const N=$e(y[0])+1;return $r(N)}if(w){const N=Et(a)-$e(y)[0]+1;return $r(N,$e(y)[0])}return p})}return{slideRegistry:d}}function Mc(e,t,n,r,s){const{reachedAny:a,removeOffset:i,constrain:l}=r;function c(p){return p.concat().sort((h,y)=>ae(h)-ae(y))[0]}function d(p){const h=e?i(p):l(p),y=t.map((w,N)=>({diff:g(w-h,0),index:N})).sort((w,N)=>ae(w.diff)-ae(N.diff)),{index:b}=y[0];return{index:b,distance:h}}function g(p,h){const y=[p,p+n,p-n];if(!e)return p;if(!h)return c(y);const b=y.filter(w=>hr(w)===h);return b.length?c(b):$e(y)-n}function u(p,h){const y=t[p]-s.get(),b=g(y,h);return{index:p,distance:b}}function f(p,h){const y=s.get()+p,{index:b,distance:w}=d(y),N=!e&&a(y);if(!h||N)return{index:b,distance:p};const R=t[b]-w,_=p+g(R,0);return{index:b,distance:_}}return{byDistance:f,byIndex:u,shortcut:g}}function Pc(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 Ic(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(h){if(new Date().getTime()-d>10)return;i.emit("slideFocusStart"),e.scrollLeft=0;const w=n.findIndex(N=>N.includes(h));pr(w)&&(s.useDuration(0),r.index(w,0),i.emit("slideFocus"))}a.add(document,"keydown",u,!1),t.forEach((h,y)=>{a.add(h,"focus",b=>{(un(l)||l(m,b))&&p(y)},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 pr(c)?c:c.get()}return{get:n,set:r,add:s,subtract:a}}function xa(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=mc(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 Tc(e,t,n,r,s,a,i,l,c){const g=Tt(s),u=Tt(s).reverse(),f=b().concat(w());function m(k,C){return k.reduce((F,G)=>F-s[G],C)}function p(k,C){return k.reduce((F,G)=>m(F,C)>0?F.concat([G]):F,[])}function h(k){return a.map((C,F)=>({start:C-r[F]+.5+k,end:C+t-.5+k}))}function y(k,C,F){const G=h(C);return k.map(E=>{const J=F?0:-n,Q=F?n:0,M=F?"end":"start",K=G[E][M];return{index:E,loopPoint:K,slideLocation:jt(-1),translate:xa(e,c[E]),target:()=>l.get()>K?J:Q}})}function b(){const k=i[0],C=p(u,k);return y(C,n,!1)}function w(){const k=t-i[0]-1,C=p(g,k);return y(C,-n,!0)}function N(){return f.every(({index:k})=>{const C=g.filter(F=>F!==k);return m(C,t)<=.1})}function R(){f.forEach(k=>{const{target:C,translate:F,slideLocation:G}=k,E=C();E!==G.get()&&(F.to(E),G.set(E))})}function _(){f.forEach(k=>k.translate.clear())}return{canLoop:N,clear:_,loop:R,loopPoints:f}}function Lc(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||(un(n)||n(c,g))&&d(g)}),r.observe(e,{childList:!0})}function i(){r&&r.disconnect(),s=!0}return{init:a,destroy:i}}function Dc(e,t,n,r){const s={};let a=null,i=null,l,c=!1;function d(){l=new IntersectionObserver(p=>{c||(p.forEach(h=>{const y=t.indexOf(h.target);s[y]=h}),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((h,y)=>{const b=parseInt(y),{isIntersecting:w}=s[b];return(p&&w||!p&&!w)&&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 Fc(e,t,n,r,s,a){const{measureSize:i,startEdge:l,endEdge:c}=e,d=n[0]&&s,g=p(),u=h(),f=n.map(i),m=y();function p(){if(!d)return 0;const w=n[0];return ae(t[l]-w[l])}function h(){if(!d)return 0;const w=a.getComputedStyle($e(r));return parseFloat(w.getPropertyValue(`margin-${c}`))}function y(){return n.map((w,N,R)=>{const _=!N,S=xr(R,N);return _?f[N]+g:S?f[N]+u:R[N+1][l]-w[l]}).map(ae)}return{slideSizes:f,slideSizesWithGaps:m,startGap:g,endGap:u}}function Ac(e,t,n,r,s,a,i,l,c){const{startEdge:d,endEdge:g,direction:u}=e,f=pr(n);function m(b,w){return Tt(b).filter(N=>N%w===0).map(N=>b.slice(N,N+w))}function p(b){return b.length?Tt(b).reduce((w,N,R)=>{const _=$e(w)||0,S=_===0,k=N===Et(b),C=s[d]-a[_][d],F=s[d]-a[N][g],G=!r&&S?u(i):0,E=!r&&k?u(l):0,J=ae(F-E-(C+G));return R&&J>t+c&&w.push(N),k&&w.push(b.length),w},[]).map((w,N,R)=>{const _=Math.max(R[N-1]||0);return b.slice(_,w)}):[]}function h(b){return f?m(b,n):p(b)}return{groupSlides:h}}function Ec(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:h,slidesToScroll:y,skipSnaps:b,containScroll:w,watchResize:N,watchSlides:R,watchDrag:_,watchFocus:S}=a,k=2,C=vc(),F=C.measure(t),G=n.map(C.measure),E=pc(c,d),J=E.measureSize(F),Q=bc(J),M=fc(l,J),K=!u&&!!w,V=u||!!w,{slideSizes:U,slideSizesWithGaps:P,startGap:fe,endGap:ge}=Fc(E,F,G,n,V,s),de=Ac(E,J,y,u,F,G,fe,ge,k),{snaps:je,snapsAligned:A}=Rc(E,M,F,G,de),B=-$e(je)+$e(P),{snapsContained:X,scrollContainLimit:ce}=Cc(J,B,A,w,k),q=K?X:A,{limit:O}=jc(B,q,u),ue=ha(Et(q),g,u),ie=ue.clone(),Z=Tt(n),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:gn,scrollLooper:Ot,slideLooper:Ht,dragHandler:pn,animation:vt,eventHandler:Ae,scrollBounds:hn,options:{loop:Gt}},bt)=>{const wt=Te.settled(),H=!hn.shouldConstrain(),me=Gt?wt:wt&&H,he=me&&!pn.pointerDown();he&&vt.stop();const ke=Ge.get()*bt+gn.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=gc(r,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=yc(Se,ve,Oe,We,f,we),ye=Mc(u,q,B,O,We),He=Pc(se,ue,ie,Qe,ye,We,i),Vt=kc(O),$t=Dt(),dt=Dc(t,n,i,h),{slideRegistry:zt}=_c(K,w,q,ce,de,Z),Bt=Ic(e,n,zt,He,Qe,$t,i,S),et={ownerDocument:r,ownerWindow:s,eventHandler:i,containerRect:F,slideRects:G,animation:se,axis:E,dragHandler:hc(E,e,r,s,We,xc(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:wc(t,i,s,n,E,N,C),scrollBody:Qe,scrollBounds:Nc(O,ve,We,Qe,Q),scrollLooper:Sc(B,O,ve,[Se,ve,Oe,We]),scrollProgress:Vt,scrollSnapList:q.map(Vt.get),scrollSnaps:q,scrollTarget:ye,scrollTo:He,slideLooper:Tc(E,J,B,U,P,je,q,ve,n),slideFocus:Bt,slidesHandler:Lc(t,i,R),slidesInView:dt,slideIndexes:Z,slideRegistry:zt,slidesToScroll:de,target:We,translate:xa(E,t)};return et}function Vc(){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 $c={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 zc(e){function t(a,i){return pa(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 Bc(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 on(e,t,n){const r=e.ownerDocument,s=r.defaultView,a=zc(s),i=Bc(a),l=Dt(),c=Vc(),{mergeOptions:d,optionsAtMedia:g,optionsMediaQueries:u}=a,{on:f,off:m,emit:p}=c,h=E;let y=!1,b,w=d($c,on.globalOptions),N=d(w),R=[],_,S,k;function C(){const{container:Z,slides:I}=N;S=(Tn(Z)?e.querySelector(Z):Z)||e.children[0];const se=Tn(I)?S.querySelectorAll(I):I;k=[].slice.call(se||S.children)}function F(Z){const I=Ec(e,S,k,r,s,Z,c);if(Z.loop&&!I.slideLooper.canLoop()){const ee=Object.assign({},Z,{loop:!1});return F(ee)}return I}function G(Z,I){y||(w=d(w,Z),N=g(w),R=I||R,C(),b=F(N),u([w,...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(Z,I){const ee=de();J(),G(d({startIndex:ee},Z),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(){y||(y=!0,l.clear(),J(),c.emit("destroy"),c.clear())}function M(Z,I,ee){!N.active||y||(b.scrollBody.useBaseFriction().useDuration(I===!0?0:N.duration),b.scrollTo.index(Z,ee||0))}function K(Z){const I=b.index.add(1).get();M(I,Z,-1)}function V(Z){const I=b.index.add(-1).get();M(I,Z,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 A(){return b.slidesInView.get()}function B(){return b.slidesInView.get(!1)}function X(){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:X,previousScrollSnap:je,reInit:h,rootNode:q,scrollNext:K,scrollPrev:V,scrollProgress:ge,scrollSnapList:fe,scrollTo:M,selectedScrollSnap:de,slideNodes:ue,slidesInView:A,slidesNotInView:B};return G(t,n),setTimeout(()=>c.emit("init"),0),ie}on.globalOptions=void 0;function vr(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(()=>{gr(n.current,e)||(n.current=e,c())},[e,c]),j.useEffect(()=>{cc(r.current,t)||(r.current=t,c())},[t,c]),j.useEffect(()=>{if(dc()&&i){on.globalOptions=vr.globalOptions;const d=on(i,n.current,r.current);return a(d),()=>d.destroy()}else a(void 0)},[i,a]),[l,s]}vr.globalOptions=void 0;const va=v.createContext(null);function mn(){const e=v.useContext(va);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}const ba=v.forwardRef(({orientation:e="horizontal",opts:t,setApi:n,plugins:r,className:s,children:a,...i},l)=>{const[c,d]=vr({...t,axis:e==="horizontal"?"x":"y"},r),[g,u]=v.useState(!1),[f,m]=v.useState(!1),p=v.useCallback(w=>{w&&(u(w.canScrollPrev()),m(w.canScrollNext()))},[]),h=v.useCallback(()=>{d==null||d.scrollPrev()},[d]),y=v.useCallback(()=>{d==null||d.scrollNext()},[d]),b=v.useCallback(w=>{w.key==="ArrowLeft"?(w.preventDefault(),h()):w.key==="ArrowRight"&&(w.preventDefault(),y())},[h,y]);return v.useEffect(()=>{!d||!n||n(d)},[d,n]),v.useEffect(()=>{if(d)return p(d),d.on("reInit",p),d.on("select",p),()=>{d==null||d.off("select",p)}},[d,p]),o.jsx(va.Provider,{value:{carouselRef:c,api:d,opts:t,orientation:e,scrollPrev:h,scrollNext:y,canScrollPrev:g,canScrollNext:f},children:o.jsx("div",{ref:l,onKeyDownCapture:b,className:x("relative",s),role:"region","aria-roledescription":"carousel",...i,children:a})})});ba.displayName="Carousel";const wa=v.forwardRef(({className:e,...t},n)=>{const{carouselRef:r,orientation:s}=mn();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})})});wa.displayName="CarouselContent";const ya=v.forwardRef(({className:e,...t},n)=>{const{orientation:r}=mn();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})});ya.displayName="CarouselItem";const Na=v.forwardRef(({className:e,variant:t="outline",size:n="icon",...r},s)=>{const{orientation:a,scrollPrev:i,canScrollPrev:l}=mn(),c=Y();return o.jsxs(pe,{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(T.ChevronLeft,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:c.carousel_previousSlide})]})});Na.displayName="CarouselPrevious";const Ca=v.forwardRef(({className:e,variant:t="outline",size:n="icon",...r},s)=>{const{orientation:a,scrollNext:i,canScrollNext:l}=mn(),c=Y();return o.jsxs(pe,{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(T.ChevronRight,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:c.carousel_nextSlide})]})});Ca.displayName="CarouselNext";/**
|
|
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=>f(p.target.value),placeholder:"#000000",className:"font-mono text-sm"})]}),o.jsx("div",{className:"grid grid-cols-5 gap-1.5",children:Kl.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 Vo=b.forwardRef(({className:e,as:t="div",...n},r)=>o.jsx(t,{ref:r,className:x(e),...n}));Vo.displayName="Box";const $o=b.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}));$o.displayName="Flex";const zo=b.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}));zo.displayName="VStack";const Bo=b.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}));Bo.displayName="HStack";const Oo=b.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})});Oo.displayName="Grid";const Ql={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"},Ho=b.forwardRef(({className:e,maxWidth:t="lg",centered:n=!0,...r},s)=>o.jsx("div",{ref:s,className:x("w-full px-4",Ql[t],n&&"mx-auto",e),...r}));Ho.displayName="Container";const ed=Ui.Root,td=zn.Root,nd=zn.CollapsibleTrigger,Go=b.forwardRef(({className:e,children:t,...n},r)=>o.jsx(zn.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})}));Go.displayName="CollapsibleContent";const qo=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"}}),Un=b.forwardRef(({className:e,variant:t,...n},r)=>o.jsx("div",{ref:r,className:x(qo({variant:t}),e),...n}));Un.displayName="Card";const Yn=b.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("flex flex-col space-y-1.5 p-6",e),...t}));Yn.displayName="CardHeader";const Xn=b.forwardRef(({className:e,...t},n)=>o.jsx("h3",{ref:n,className:x("text-2xl font-semibold leading-none tracking-tight",e),...t}));Xn.displayName="CardTitle";const Wo=b.forwardRef(({className:e,...t},n)=>o.jsx("p",{ref:n,className:x("text-sm text-muted-foreground",e),...t}));Wo.displayName="CardDescription";const Kn=b.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("p-6 pt-0",e),...t}));Kn.displayName="CardContent";const Uo=b.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("flex items-center p-6 pt-0",e),...t}));Uo.displayName="CardFooter";const Zn=b.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})}));Zn.displayName="Table";const Jn=b.forwardRef(({className:e,...t},n)=>o.jsx("thead",{ref:n,className:x("[&_tr]:border-b",e),...t}));Jn.displayName="TableHeader";const Qn=b.forwardRef(({className:e,...t},n)=>o.jsx("tbody",{ref:n,className:x("[&_tr:last-child]:border-0",e),...t}));Qn.displayName="TableBody";const Yo=b.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}));Yo.displayName="TableFooter";const St=b.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 er=b.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}));er.displayName="TableHead";const nn=b.forwardRef(({className:e,...t},n)=>o.jsx("td",{ref:n,className:x("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));nn.displayName="TableCell";const Xo=b.forwardRef(({className:e,...t},n)=>o.jsx("caption",{ref:n,className:x("mt-4 text-sm text-muted-foreground",e),...t}));Xo.displayName="TableCaption";const tr=b.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(rn,{orientation:"vertical"}),(n==="horizontal"||n==="both")&&o.jsx(rn,{orientation:"horizontal"}),o.jsx(ot.Corner,{})]}));tr.displayName=ot.Root.displayName;const rn=b.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"})}));rn.displayName=ot.ScrollAreaScrollbar.displayName;const rd=it.Root,Ko=b.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}));Ko.displayName=it.List.displayName;const Zo=b.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}));Zo.displayName=it.Trigger.displayName;const Jo=b.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}));Jo.displayName=it.Content.displayName;const od=st.Root,Qo=b.forwardRef(({className:e,...t},n)=>o.jsx(st.Item,{ref:n,className:x("border-b",e),...t}));Qo.displayName="AccordionItem";const es=b.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(_.ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));es.displayName=st.Trigger.displayName;const ts=b.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})}));ts.displayName=st.Content.displayName;const ns=te.Root,sd=te.Trigger,rs=te.Portal,ad=te.Close,nr=b.forwardRef(({className:e,...t},n)=>o.jsx(te.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}));nr.displayName=te.Overlay.displayName;const rr=b.forwardRef(({className:e,children:t,...n},r)=>{const s=X();return o.jsxs(rs,{children:[o.jsx(nr,{}),o.jsxs(te.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(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:[o.jsx(_.X,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:s.common_close})]})]})]})});rr.displayName=te.Content.displayName;const os=({className:e,...t})=>o.jsx("div",{className:x("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});os.displayName="DialogHeader";const ss=({className:e,...t})=>o.jsx("div",{className:x("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ss.displayName="DialogFooter";const as=b.forwardRef(({className:e,...t},n)=>o.jsx(te.Title,{ref:n,className:x("text-lg font-semibold leading-none tracking-tight",e),...t}));as.displayName=te.Title.displayName;const is=b.forwardRef(({className:e,...t},n)=>o.jsx(te.Description,{ref:n,className:x("text-sm text-muted-foreground",e),...t}));is.displayName=te.Description.displayName;const ls=te.Root,ds=te.Trigger,cs=te.Close,us=te.Portal,or=b.forwardRef(({className:e,...t},n)=>o.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),...t,ref:n}));or.displayName=te.Overlay.displayName;const id=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"}}),sr=b.forwardRef(({side:e="right",className:t,children:n,...r},s)=>{const a=X();return o.jsxs(us,{children:[o.jsx(or,{}),o.jsxs(te.Content,{ref:s,className:x(id({side:e}),t),...r,children:[n,o.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:[o.jsx(_.X,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:a.common_close})]})]})]})});sr.displayName=te.Content.displayName;const ar=({className:e,...t})=>o.jsx("div",{className:x("flex flex-col space-y-2 text-center sm:text-left",e),...t});ar.displayName="SheetHeader";const ir=({className:e,...t})=>o.jsx("div",{className:x("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ir.displayName="SheetFooter";const lr=b.forwardRef(({className:e,...t},n)=>o.jsx(te.Title,{ref:n,className:x("text-lg font-semibold text-foreground",e),...t}));lr.displayName=te.Title.displayName;const dr=b.forwardRef(({className:e,...t},n)=>o.jsx(te.Description,{ref:n,className:x("text-sm text-muted-foreground",e),...t}));dr.displayName=te.Description.displayName;const ms=ne.Root,fs=ne.Trigger,ld=ne.Group,dd=ne.Portal,cd=ne.Sub,ud=ne.RadioGroup,gs=b.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 data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,o.jsx(_.ChevronRight,{className:"ml-auto h-4 w-4"})]}));gs.displayName=ne.SubTrigger.displayName;const ps=b.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}));ps.displayName=ne.SubContent.displayName;const cr=b.forwardRef(({className:e,sideOffset:t=4,...n},r)=>o.jsx(ne.Portal,{children:o.jsx(ne.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})}));cr.displayName=ne.Content.displayName;const kt=b.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 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=ne.Item.displayName;const hs=b.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 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(ne.ItemIndicator,{children:o.jsx(_.Check,{className:"h-4 w-4"})})}),t]}));hs.displayName=ne.CheckboxItem.displayName;const xs=b.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 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(ne.ItemIndicator,{children:o.jsx(_.Circle,{className:"h-2 w-2 fill-current"})})}),t]}));xs.displayName=ne.RadioItem.displayName;const bs=b.forwardRef(({className:e,inset:t,...n},r)=>o.jsx(ne.Label,{ref:r,className:x("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));bs.displayName=ne.Label.displayName;const vs=b.forwardRef(({className:e,...t},n)=>o.jsx(ne.Separator,{ref:n,className:x("-mx-1 my-1 h-px bg-muted",e),...t}));vs.displayName=ne.Separator.displayName;const ws=({className:e,...t})=>o.jsx("span",{className:x("ml-auto text-xs tracking-widest opacity-60",e),...t});ws.displayName="DropdownMenuShortcut";const md=Ft.Provider,fd=Ft.Root,gd=Ft.Trigger,ys=b.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}));ys.displayName=Ft.Content.displayName;const ur=b.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}));ur.displayName=Me.Command.displayName;const pd=({children:e,...t})=>o.jsx(ns,{...t,children:o.jsx(rr,{className:"overflow-hidden p-0 shadow-lg",children:o.jsx(ur,{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})})}),Cs=b.forwardRef(({className:e,...t},n)=>o.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[o.jsx(_.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})]}));Cs.displayName=Me.Command.Input.displayName;const Ns=b.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}));Ns.displayName=Me.Command.List.displayName;const js=b.forwardRef((e,t)=>o.jsx(Me.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));js.displayName=Me.Command.Empty.displayName;const Ss=b.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}));Ss.displayName=Me.Command.Group.displayName;const ks=b.forwardRef(({className:e,...t},n)=>o.jsx(Me.Command.Separator,{ref:n,className:x("-mx-1 h-px bg-border",e),...t}));ks.displayName=Me.Command.Separator.displayName;const Rs=b.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}));Rs.displayName=Me.Command.Item.displayName;const _s=({className:e,...t})=>o.jsx("span",{className:x("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});_s.displayName="CommandShortcut";const hd=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"}}),Ms=b.forwardRef(({className:e,variant:t,...n},r)=>o.jsx("div",{ref:r,role:"alert",className:x(hd({variant:t}),e),...n}));Ms.displayName="Alert";const Ps=b.forwardRef(({className:e,...t},n)=>o.jsx("h5",{ref:n,className:x("mb-1 font-medium leading-none tracking-tight",e),...t}));Ps.displayName="AlertTitle";const Is=b.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("text-sm [&_p]:leading-relaxed",e),...t}));Is.displayName="AlertDescription";const xd=Re.Root,bd=Re.Trigger,Ts=Re.Portal,mr=b.forwardRef(({className:e,...t},n)=>o.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),...t,ref:n}));mr.displayName=Re.Overlay.displayName;const Ls=b.forwardRef(({className:e,...t},n)=>o.jsxs(Ts,{children:[o.jsx(mr,{}),o.jsx(Re.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})]}));Ls.displayName=Re.Content.displayName;const Ds=({className:e,...t})=>o.jsx("div",{className:x("flex flex-col space-y-2 text-center sm:text-left",e),...t});Ds.displayName="AlertDialogHeader";const Fs=({className:e,...t})=>o.jsx("div",{className:x("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Fs.displayName="AlertDialogFooter";const As=b.forwardRef(({className:e,...t},n)=>o.jsx(Re.Title,{ref:n,className:x("text-lg font-semibold",e),...t}));As.displayName=Re.Title.displayName;const Es=b.forwardRef(({className:e,...t},n)=>o.jsx(Re.Description,{ref:n,className:x("text-sm text-muted-foreground",e),...t}));Es.displayName=Re.Description.displayName;const Vs=b.forwardRef(({className:e,...t},n)=>o.jsx(Re.Action,{ref:n,className:x(At(),e),...t}));Vs.displayName=Re.Action.displayName;const $s=b.forwardRef(({className:e,...t},n)=>o.jsx(Re.Cancel,{ref:n,className:x(At({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));$s.displayName=Re.Cancel.displayName;const zs=b.forwardRef(({className:e,value:t,...n},r)=>o.jsx(Mn.Root,{ref:r,className:x("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:o.jsx(Mn.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));zs.displayName=Mn.Root.displayName;function vd({className:e,...t}){return o.jsx("div",{className:x("animate-pulse rounded-md bg-muted",e),...t})}function wd(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 yd=e=>{switch(e){case"success":return jd;case"info":return kd;case"warning":return Sd;case"error":return Rd;default:return null}},Cd=Array(12).fill(0),Nd=({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}`})))),jd=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"})),Sd=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"})),kd=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"})),Rd=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"})),_d=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"})),Md=()=>{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 Pd{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(Td(d)&&!d.ok){a=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${d.status}`):n.error,m=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:m,...p})}else if(d instanceof Error){a=!1;const u=typeof n.error=="function"?await n.error(d):n.error,m=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:m,...p})}else if(n.success!==void 0){a=!1;const u=typeof n.success=="function"?await n.success(d):n.success,m=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:m,...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,f=typeof g=="object"&&!j.isValidElement(g)?g:{message:g};this.create({id:r,type:"error",description:u,...f})}}).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 Pd,Id=(e,t)=>{const n=(t==null?void 0:t.id)||In++;return _e.addToast({title:e,...t,id:n}),n},Td=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Ld=Id,Dd=()=>_e.toasts,Fd=()=>_e.getActiveToasts(),Ad=Object.assign(Ld,{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:Dd,getToasts:Fd});wd("[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 Ed=3,Vd="24px",$d="16px",Lr=4e3,zd=356,Bd=14,Od=45,Hd=200;function qe(...e){return e.filter(Boolean).join(" ")}function Gd(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const qd=e=>{var t,n,r,s,a,i,l,c,d;const{invert:g,toast:u,unstyled:m,interacting:f,setHeights:p,visibleToasts:h,heights:w,index:v,toasts:y,expanded:C,removeToast:k,defaultRichColors:M,closeButton:S,style:R,cancelButtonStyle:N,actionButtonStyle:F,className:G="",descriptionClassName:E="",duration:J,position:Q,gap:P,expandByDefault:K,classNames:V,icons:U,closeButtonAriaLabel:I="Close toast"}=e,[fe,ge]=j.useState(null),[de,je]=j.useState(null),[A,B]=j.useState(!1),[Y,ce]=j.useState(!1),[q,O]=j.useState(!1),[ue,ie]=j.useState(!1),[Z,T]=j.useState(!1),[ee,se]=j.useState(0),[we,Ie]=j.useState(0),Se=j.useRef(u.duration||J||Lr),Oe=j.useRef(null),be=j.useRef(null),We=v===0,Qe=v+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||Lr,[u.duration,J]),et=j.useRef(0),Te=j.useRef(0),ct=j.useRef(0),Ge=j.useRef(null),[ut,gn]=Q.split("-"),Ot=j.useMemo(()=>w.reduce((H,me,he)=>he>=dt?H:H+me.height,0),[w,dt]),Ht=Md(),pn=u.invert||g,bt=ye==="loading";Te.current=j.useMemo(()=>dt*P+Ot,[dt,Ot]),j.useEffect(()=>{Se.current=Bt},[Bt]),j.useEffect(()=>{B(!0)},[]),j.useEffect(()=>{const H=be.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(!A)return;const H=be.current,me=H.style.height;H.style.height="auto";const he=H.getBoundingClientRect().height;H.style.height=me,Ie(he),p(ke=>ke.find(Ce=>Ce.toastId===u.id)?ke.map(Ce=>Ce.toastId===u.id?{...Ce,height:he}:Ce):[{toastId:u.id,height:he,position:u.position},...ke])},[A,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(()=>{k(u)},Hd)},[u,k,p,Te]);j.useEffect(()=>{if(u.promise&&ye==="loading"||u.duration===1/0||u.type==="loading")return;let H;return C||f||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)},[C,f,u,ye,Ht,Ae]),j.useEffect(()=>{u.delete&&(Ae(),u.onDismiss==null||u.onDismiss.call(u,u))},[Ae,u.delete]);function hn(){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(Nd,{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])||yd(ye);var vt,wt;return j.createElement("li",{tabIndex:0,ref:be,className:qe(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[ye],u==null||(n=u.classNames)==null?void 0:n[ye]),"data-sonner-toast":"","data-rich-colors":(vt=u.richColors)!=null?vt:M,"data-styled":!(u.jsx||u.unstyled||m),"data-mounted":A,"data-promise":!!u.promise,"data-swiped":Z,"data-removed":Y,"data-visible":Qe,"data-y-position":ut,"data-x-position":gn,"data-index":v,"data-front":We,"data-swiping":q,"data-dismissible":He,"data-type":ye,"data-invert":pn,"data-swipe-out":ue,"data-swipe-direction":de,"data-expanded":!!(C||K&&A),"data-testid":u.testId,style:{"--index":v,"--toasts-before":v,"--z-index":y.length-v,"--offset":`${Y?ee:Te.current}px`,"--initial-height":K?"auto":`${we}px`,...R,...u.style},onDragEnd:()=>{O(!1),ge(null),Ge.current=null},onPointerDown:H=>{H.button!==2&&(bt||!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=be.current)==null?void 0:H.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),qt=Number(((me=be.current)==null?void 0:me.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ce=new Date().getTime()-((he=Oe.current)==null?void 0:he.getTime()),De=fe==="x"?ke:qt,Wt=Math.abs(De)/Ce;if(Math.abs(De)>=Od||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=be.current)==null||Ee.style.setProperty("--swipe-amount-x","0px"),(Ve=be.current)==null||Ve.style.setProperty("--swipe-amount-y","0px")}T(!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 Ce=H.clientY-Ge.current.y,De=H.clientX-Ge.current.x;var Wt;const Ee=(Wt=e.swipeDirections)!=null?Wt:Gd(Q);!fe&&(Math.abs(De)>1||Math.abs(Ce)>1)&&ge(Math.abs(De)>Math.abs(Ce)?"x":"y");let Ve={x:0,y:0};const jr=tt=>1/(1.5+Math.abs(tt)/20);if(fe==="y"){if(Ee.includes("top")||Ee.includes("bottom"))if(Ee.includes("top")&&Ce<0||Ee.includes("bottom")&&Ce>0)Ve.y=Ce;else{const tt=Ce*jr(Ce);Ve.y=Math.abs(tt)<Math.abs(Ce)?tt:Ce}}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*jr(De);Ve.x=Math.abs(tt)<Math.abs(De)?tt:De}(Math.abs(Ve.x)>0||Math.abs(Ve.y)>0)&&T(!0),(he=be.current)==null||he.style.setProperty("--swipe-amount-x",`${Ve.x}px`),(ke=be.current)==null||ke.style.setProperty("--swipe-amount-y",`${Ve.y}px`)}},zt&&!u.jsx&&ye!=="loading"?j.createElement("button",{"aria-label":I,"data-disabled":bt,"data-close-button":!0,onClick:bt||!He?()=>{}:()=>{Ae(),u.onDismiss==null||u.onDismiss.call(u,u)},className:qe(V==null?void 0:V.closeButton,u==null||(r=u.classNames)==null?void 0:r.closeButton)},(wt=U==null?void 0:U.close)!=null?wt:_d):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||hn():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||N,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||F,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 Dr(){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 Wd(e,t){const n={};return[e,t].forEach((r,s)=>{const a=s===1,i=a?"--mobile-offset":"--offset",l=a?$d:Vd;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 Ud=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:m="light",richColors:f,duration:p,style:h,visibleToasts:w=Ed,toastOptions:v,dir:y=Dr(),gap:C=Bd,icons:k,containerAriaLabel:M="Notifications"}=t,[S,R]=j.useState([]),N=j.useMemo(()=>r?S.filter(A=>A.toasterId===r):S.filter(A=>!A.toasterId),[S,r]),F=j.useMemo(()=>Array.from(new Set([a].concat(N.filter(A=>A.position).map(A=>A.position)))),[N,a]),[G,E]=j.useState([]),[J,Q]=j.useState(!1),[P,K]=j.useState(!1),[V,U]=j.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),I=j.useRef(null),fe=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),ge=j.useRef(null),de=j.useRef(!1),je=j.useCallback(A=>{R(B=>{var Y;return(Y=B.find(ce=>ce.id===A.id))!=null&&Y.delete||_e.dismiss(A.id),B.filter(({id:ce})=>ce!==A.id)})},[]);return j.useEffect(()=>_e.subscribe(A=>{if(A.dismiss){requestAnimationFrame(()=>{R(B=>B.map(Y=>Y.id===A.id?{...Y,delete:!0}:Y))});return}setTimeout(()=>{Hi.flushSync(()=>{R(B=>{const Y=B.findIndex(ce=>ce.id===A.id);return Y!==-1?[...B.slice(0,Y),{...B[Y],...A},...B.slice(Y+1)]:[A,...B]})})})}),[S]),j.useEffect(()=>{if(m!=="system"){U(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?U("dark"):U("light")),typeof window>"u")return;const A=window.matchMedia("(prefers-color-scheme: dark)");try{A.addEventListener("change",({matches:B})=>{U(B?"dark":"light")})}catch{A.addListener(({matches:Y})=>{try{U(Y?"dark":"light")}catch(ce){console.error(ce)}})}},[m]),j.useEffect(()=>{S.length<=1&&Q(!1)},[S]),j.useEffect(()=>{const A=B=>{var Y;if(i.every(O=>B[O]||B.code===O)){var q;Q(!0),(q=I.current)==null||q.focus()}B.code==="Escape"&&(document.activeElement===I.current||(Y=I.current)!=null&&Y.contains(document.activeElement))&&Q(!1)};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[i]),j.useEffect(()=>{if(I.current)return()=>{ge.current&&(ge.current.focus({preventScroll:!0}),ge.current=null,de.current=!1)}},[I.current]),j.createElement("section",{ref:n,"aria-label":`${M} ${fe}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},F.map((A,B)=>{var Y;const[ce,q]=A.split("-");return N.length?j.createElement("ol",{key:A,dir:y==="auto"?Dr():y,tabIndex:-1,ref:I,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":`${zd}px`,"--gap":`${C}px`,...h,...Wd(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:()=>{P||Q(!1)},onDragEnd:()=>Q(!1),onPointerDown:O=>{O.target instanceof HTMLElement&&O.target.dataset.dismissible==="false"||K(!0)},onPointerUp:()=>K(!1)},N.filter(O=>!O.position&&B===0||O.position===A).map((O,ue)=>{var ie,Z;return j.createElement(qd,{key:O.id,icons:k,index:ue,toast:O,defaultRichColors:f,duration:(ie=v==null?void 0:v.duration)!=null?ie:p,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:s,visibleToasts:w,closeButton:(Z=v==null?void 0:v.closeButton)!=null?Z:c,interacting:P,position:A,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,closeButtonAriaLabel:v==null?void 0:v.closeButtonAriaLabel,removeToast:je,toasts:N.filter(T=>T.position==O.position),heights:G.filter(T=>T.position==O.position),setHeights:E,expandByDefault:l,gap:C,expanded:J,swipeDirections:t.swipeDirections})})):null}))}),vn=["light","dark","system"];function Yd(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Fr(e){return e==="system"?Yd():e}function Xd(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 Kd(e,t){const n=document.documentElement;t==="class"?(n.classList.remove("light","dark"),n.classList.add(e)):n.setAttribute("data-theme",e)}const Bs=j.createContext(void 0);function Zd({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 v=localStorage.getItem(n);return v&&vn.includes(v)?v:t}),[g,u]=j.useState(()=>Fr(i??c)),m=j.useRef(c);m.current=c;const f=j.useCallback(()=>{const v=i??m.current,y=Fr(v);u(y);let C;a&&(C=Xd(l)),Kd(y,r),C==null||C()},[i,r,a,l]);j.useEffect(()=>{f()},[c,i,f]),j.useEffect(()=>{if(!s)return;const v=window.matchMedia("(prefers-color-scheme: dark)"),y=()=>{(i??m.current)==="system"&&f()};return v.addEventListener("change",y),()=>v.removeEventListener("change",y)},[s,i,f]),j.useEffect(()=>{const v=y=>{if(y.key===n&&y.newValue){const C=y.newValue;vn.includes(C)&&d(C)}};return window.addEventListener("storage",v),()=>window.removeEventListener("storage",v)},[n]);const p=j.useCallback(v=>{!s&&v==="system"||(localStorage.setItem(n,v),d(v))},[n,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 o.jsx(Bs.Provider,{value:w,children:e})}function dn(){const e=j.useContext(Bs);if(e===void 0)throw new Error("useTheme must be used within a <ThemeProvider>");return e}const Jd=({theme:e,...t})=>{let n=e;try{const{resolvedTheme:r}=dn();e||(n=r)}catch{n||(n="system")}return o.jsx(Ud,{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 Qd({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 Os=b.forwardRef(({...e},t)=>o.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));Os.displayName="Breadcrumb";const Hs=b.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}));Hs.displayName="BreadcrumbList";const Gs=b.forwardRef(({className:e,...t},n)=>o.jsx("li",{ref:n,className:x("inline-flex items-center gap-1.5",e),...t}));Gs.displayName="BreadcrumbItem";const qs=b.forwardRef(({asChild:e,className:t,...n},r)=>{const s=e?Yr.Slot:"a";return o.jsx(s,{ref:r,className:x("transition-colors hover:text-foreground",t),...n})});qs.displayName="BreadcrumbLink";const Ws=b.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}));Ws.displayName="BreadcrumbPage";const Us=({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(_.ChevronRight,{})});Us.displayName="BreadcrumbSeparator";const Ys=({className:e,...t})=>{const n=X();return 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:n.breadcrumb_more})]})};Ys.displayName="BreadcrumbEllipsis";const Xs=({className:e,...t})=>o.jsx("nav",{role:"navigation","aria-label":"pagination",className:x("mx-auto flex w-full justify-center",e),...t});Xs.displayName="Pagination";const Ks=b.forwardRef(({className:e,...t},n)=>o.jsx("ul",{ref:n,className:x("flex flex-row items-center gap-1",e),...t}));Ks.displayName="PaginationContent";const Zs=b.forwardRef(({className:e,...t},n)=>o.jsx("li",{ref:n,className:x("",e),...t}));Zs.displayName="PaginationItem";const cn=({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});cn.displayName="PaginationLink";const Js=({className:e,...t})=>{const n=X();return o.jsxs(cn,{"aria-label":n.pagination_goToPrevious,size:"default",className:x("gap-1 pl-2.5",e),...t,children:[o.jsx(_.ChevronLeft,{className:"h-4 w-4"}),o.jsx("span",{children:n.pagination_previous})]})};Js.displayName="PaginationPrevious";const Qs=({className:e,...t})=>{const n=X();return o.jsxs(cn,{"aria-label":n.pagination_goToNext,size:"default",className:x("gap-1 pr-2.5",e),...t,children:[o.jsx("span",{children:n.pagination_next}),o.jsx(_.ChevronRight,{className:"h-4 w-4"})]})};Qs.displayName="PaginationNext";const ea=({className:e,...t})=>{const n=X();return o.jsxs("span",{"aria-hidden":!0,className:x("flex h-9 w-9 items-center justify-center",e),...t,children:[o.jsx(_.MoreHorizontal,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:n.pagination_morePages})]})};ea.displayName="PaginationEllipsis";function ec({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(b.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(_.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 ta=b.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(Pe.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,{})]}));ta.displayName=Pe.Root.displayName;const na=b.forwardRef(({className:e,...t},n)=>o.jsx(Pe.List,{ref:n,className:x("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));na.displayName=Pe.List.displayName;const tc=Pe.Item,ra=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"),oa=b.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(Pe.Trigger,{ref:r,className:x(ra(),"group",e),...n,children:[t," ",o.jsx(_.ChevronDown,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));oa.displayName=Pe.Trigger.displayName;const sa=b.forwardRef(({className:e,...t},n)=>o.jsx(Pe.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}));sa.displayName=Pe.Content.displayName;const nc=Pe.Link,fr=b.forwardRef(({className:e,...t},n)=>o.jsx("div",{className:x("absolute left-0 top-full flex justify-center"),children:o.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:n,...t})}));fr.displayName=Pe.Viewport.displayName;const aa=b.forwardRef(({className:e,...t},n)=>o.jsx(Pe.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"})}));aa.displayName=Pe.Indicator.displayName;const rc=re.Root,oc=re.Trigger,sc=re.Group,ac=re.Portal,ic=re.Sub,lc=re.RadioGroup,ia=b.forwardRef(({className:e,inset:t,children:n,...r},s)=>o.jsxs(re.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(_.ChevronRight,{className:"ml-auto h-4 w-4"})]}));ia.displayName=re.SubTrigger.displayName;const la=b.forwardRef(({className:e,...t},n)=>o.jsx(re.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}));la.displayName=re.SubContent.displayName;const da=b.forwardRef(({className:e,...t},n)=>o.jsx(re.Portal,{children:o.jsx(re.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})}));da.displayName=re.Content.displayName;const ca=b.forwardRef(({className:e,inset:t,...n},r)=>o.jsx(re.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}));ca.displayName=re.Item.displayName;const ua=b.forwardRef(({className:e,children:t,checked:n,...r},s)=>o.jsxs(re.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(re.ItemIndicator,{children:o.jsx(_.Check,{className:"h-4 w-4"})})}),t]}));ua.displayName=re.CheckboxItem.displayName;const ma=b.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(re.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(re.ItemIndicator,{children:o.jsx(_.Circle,{className:"h-2 w-2 fill-current"})})}),t]}));ma.displayName=re.RadioItem.displayName;const fa=b.forwardRef(({className:e,inset:t,...n},r)=>o.jsx(re.Label,{ref:r,className:x("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...n}));fa.displayName=re.Label.displayName;const ga=b.forwardRef(({className:e,...t},n)=>o.jsx(re.Separator,{ref:n,className:x("-mx-1 my-1 h-px bg-border",e),...t}));ga.displayName=re.Separator.displayName;const pa=({className:e,...t})=>o.jsx("span",{className:x("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});pa.displayName="ContextMenuShortcut";const dc=an.Root,cc=an.Trigger,ha=b.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},s)=>o.jsx(an.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}));ha.displayName=an.Content.displayName;function uc(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ar(e){return uc(e)||Array.isArray(e)}function mc(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function gr(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}`:!Ar(l)||!Ar(c)?l===c:gr(l,c)})}function Er(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function fc(e,t){if(e.length!==t.length)return!1;const n=Er(e),r=Er(t);return n.every((s,a)=>{const i=r[a];return gr(s,i)})}function pr(e){return typeof e=="number"}function Tn(e){return typeof e=="string"}function un(e){return typeof e=="boolean"}function Vr(e){return Object.prototype.toString.call(e)==="[object Object]"}function ae(e){return Math.abs(e)}function hr(e){return Math.sign(e)}function Rt(e,t){return ae(e-t)}function gc(e,t){if(e===0||t===0||ae(e)<=ae(t))return 0;const n=Rt(ae(e),ae(t));return ae(n/e)}function pc(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 xr(e,t){return t===Et(e)}function $r(e,t=0){return Array.from(Array(e),(n,r)=>t+r)}function Lt(e){return Object.keys(e)}function xa(e,t){return[e,t].reduce((n,r)=>(Lt(r).forEach(s=>{const a=n[s],i=r[s],l=Vr(a)&&Vr(i);n[s]=l?xa(a,i):i}),n),{})}function Ln(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function hc(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 Tn(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 xc(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(){f(),s.clear()}function u(w){if(!c)return;i||(i=w,n(),n());const v=w-i;for(i=w,l+=v;l>=a;)n(),l-=a;const y=l/a;r(y),c&&(c=t.requestAnimationFrame(u))}function m(){c||(c=t.requestAnimationFrame(u))}function f(){t.cancelAnimationFrame(c),i=null,l=0,c=0}function p(){i=null,l=0}return{init:d,destroy:g,start:m,stop:f,update:n,render:r}}function bc(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:h,width:w}=p;return r?h:w}function g(){return r?"top":n?"right":"left"}function u(){return r?"bottom":n?"left":"right"}function m(p){return p*i}return{scroll:s,cross:a,startEdge:l,endEdge:c,measureSize:d,direction:m}}function at(e=0,t=0){const n=ae(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 ba(e,t,n){const{constrain:r}=at(0,e),s=e+1;let a=i(t);function i(m){return n?ae((s+m)%s):r(m)}function l(){return a}function c(m){return a=i(m),u}function d(m){return g().set(l()+m)}function g(){return ba(e,l(),n)}const u={get:l,set:c,add:d,clone:g};return u}function vc(e,t,n,r,s,a,i,l,c,d,g,u,m,f,p,h,w,v,y){const{cross:C,direction:k}=e,M=["INPUT","SELECT","TEXTAREA"],S={passive:!1},R=Dt(),N=Dt(),F=at(50,225).constrain(f.measure(20)),G={mouse:300,touch:400},E={mouse:500,touch:600},J=p?43:25;let Q=!1,P=0,K=0,V=!1,U=!1,I=!1,fe=!1;function ge(T){if(!y)return;function ee(we){(un(y)||y(T,we))&&ce(we)}const se=t;R.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(){R.clear(),N.clear()}function je(){const T=fe?n:t;N.add(T,"touchmove",q,S).add(T,"touchend",O).add(T,"mousemove",q,S).add(T,"mouseup",O)}function A(T){const ee=T.nodeName||"";return M.includes(ee)}function B(){return(p?E:G)[fe?"mouse":"touch"]}function Y(T,ee){const se=u.add(hr(T)*-1),we=g.byDistance(T,!p).distance;return p||ae(T)<F?we:w&&ee?we*.5:g.byIndex(se.get(),0).distance}function ce(T){const ee=Ln(T,r);fe=ee,I=p&&ee&&!T.buttons&&Q,Q=Rt(s.get(),i.get())>=2,!(ee&&T.button!==0)&&(A(T.target)||(V=!0,a.pointerDown(T),d.useFriction(0).useDuration(0),s.set(i),je(),P=a.readPoint(T),K=a.readPoint(T,C),m.emit("pointerDown")))}function q(T){if(!Ln(T,r)&&T.touches.length>=2)return O(T);const se=a.readPoint(T),we=a.readPoint(T,C),Ie=Rt(se,P),Se=Rt(we,K);if(!U&&!fe&&(!T.cancelable||(U=Ie>Se,!U)))return O(T);const Oe=a.pointerMove(T);Ie>h&&(I=!0),d.useFriction(.3).useDuration(.75),l.start(),s.add(k(Oe)),T.preventDefault()}function O(T){const se=g.byDistance(0,!1).index!==u.get(),we=a.pointerUp(T)*B(),Ie=Y(k(we),se),Se=gc(we,Ie),Oe=J-10*Se,be=v+Se/50;U=!1,V=!1,N.clear(),d.useDuration(Oe).useFriction(be),c.distance(Ie,!p),fe=!1,m.emit("pointerUp")}function ue(T){I&&(T.stopPropagation(),T.preventDefault(),I=!1)}function ie(){return V}return{init:ge,destroy:de,pointerDown:ie}}function wc(e,t){let r,s;function a(u){return u.timeStamp}function i(u,m){const p=`client${(m||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 m=i(u)-i(s),f=a(u)-a(r)>170;return s=u,f&&(r=u),m}function d(u){if(!r||!s)return 0;const m=i(s)-i(r),f=a(u)-a(r),p=a(u)-a(s)>170,h=m/f;return f&&!p&&ae(h)>.1?h:0}return{pointerDown:l,pointerMove:c,pointerUp:d,readPoint:i}}function yc(){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 Nc(e,t,n,r,s,a,i){const l=[e].concat(r);let c,d,g=[],u=!1;function m(w){return s.measureSize(i.measure(w))}function f(w){if(!a)return;d=m(e),g=r.map(m);function v(y){for(const C of y){if(u)return;const k=C.target===e,M=r.indexOf(C.target),S=k?d:g[M],R=m(k?e:r[M]);if(ae(R-S)>=.5){w.reInit(),t.emit("resize");break}}}c=new ResizeObserver(y=>{(un(a)||a(w,y))&&v(y)}),n.requestAnimationFrame(()=>{l.forEach(y=>c.observe(y))})}function p(){u=!0,c&&c.disconnect()}return{init:f,destroy:p}}function jc(e,t,n,r,s,a){let i=0,l=0,c=s,d=a,g=e.get(),u=0;function m(){const S=r.get()-e.get(),R=!c;let N=0;return R?(i=0,n.set(r),e.set(r),N=S):(n.set(e),i+=S/c,i*=d,g+=i,e.add(i),N=g-u),l=hr(N),u=g,M}function f(){const S=r.get()-t.get();return ae(S)<.001}function p(){return c}function h(){return l}function w(){return i}function v(){return C(s)}function y(){return k(a)}function C(S){return c=S,M}function k(S){return d=S,M}const M={direction:h,duration:p,velocity:w,seek:m,settled:f,useBaseFriction:y,useBaseDuration:v,useFriction:k,useDuration:C};return M}function Sc(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(f){if(!d())return;const p=e.reachedMin(t.get())?"min":"max",h=ae(e[p]-t.get()),w=n.get()-t.get(),v=l.constrain(h/i);n.subtract(w*v),!f&&ae(w)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function u(f){c=!f}return{shouldConstrain:d,constrain:g,toggleActive:u}}function kc(e,t,n,r,s){const a=at(-t+e,0),i=u(),l=g(),c=m();function d(p,h){return Rt(p,h)<=1}function g(){const p=i[0],h=$e(i),w=i.lastIndexOf(p),v=i.indexOf(h)+1;return at(w,v)}function u(){return n.map((p,h)=>{const{min:w,max:v}=a,y=a.constrain(p),C=!h,k=xr(n,h);return C?v:k||d(w,y)?w:d(v,y)?v:y}).map(p=>parseFloat(p.toFixed(3)))}function m(){if(t<=e+s)return[a.max];if(r==="keepSnaps")return i;const{min:p,max:h}=l;return i.slice(p,h)}return{snapsContained:c,scrollContainLimit:l}}function Rc(e,t,n){const r=t[0],s=n?r-e:$e(t);return{limit:at(s,r)}}function _c(e,t,n,r){const a=t.min+.1,i=t.max+.1,{reachedMin:l,reachedMax:c}=at(a,i);function d(m){return m===1?c(n.get()):m===-1?l(n.get()):!1}function g(m){if(!d(m))return;const f=e*(m*-1);r.forEach(p=>p.add(f))}return{loop:g}}function Mc(e){const{max:t,length:n}=e;function r(a){const i=a-t;return n?i/-n:0}return{get:r}}function Pc(e,t,n,r,s){const{startEdge:a,endEdge:i}=e,{groupSlides:l}=s,c=u().map(t.measure),d=m(),g=f();function u(){return l(r).map(h=>$e(h)[i]-h[0][a]).map(ae)}function m(){return r.map(h=>n[a]-h[a]).map(h=>-ae(h))}function f(){return l(d).map(h=>h[0]).map((h,w)=>h+c[w])}return{snaps:d,snapsAligned:g}}function Ic(e,t,n,r,s,a){const{groupSlides:i}=s,{min:l,max:c}=r,d=g();function g(){const m=i(a),f=!e||t==="keepSnaps";return n.length===1?[a]:f?m:m.slice(l,c).map((p,h,w)=>{const v=!h,y=xr(w,h);if(v){const C=$e(w[0])+1;return $r(C)}if(y){const C=Et(a)-$e(w)[0]+1;return $r(C,$e(w)[0])}return p})}return{slideRegistry:d}}function Tc(e,t,n,r,s){const{reachedAny:a,removeOffset:i,constrain:l}=r;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=t.map((y,C)=>({diff:g(y-h,0),index:C})).sort((y,C)=>ae(y.diff)-ae(C.diff)),{index:v}=w[0];return{index:v,distance:h}}function g(p,h){const w=[p,p+n,p-n];if(!e)return p;if(!h)return c(w);const v=w.filter(y=>hr(y)===h);return v.length?c(v):$e(w)-n}function u(p,h){const w=t[p]-s.get(),v=g(w,h);return{index:p,distance:v}}function m(p,h){const w=s.get()+p,{index:v,distance:y}=d(w),C=!e&&a(w);if(!h||C)return{index:v,distance:p};const k=t[v]-y,M=p+g(k,0);return{index:v,distance:M}}return{byDistance:m,byIndex:u,shortcut:g}}function Lc(e,t,n,r,s,a,i){function l(u){const m=u.distance,f=u.index!==t.get();a.add(m),m&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),f&&(n.set(t.get()),t.set(u.index),i.emit("select"))}function c(u,m){const f=s.byDistance(u,m);l(f)}function d(u,m){const f=t.clone().set(u),p=s.byIndex(f.get(),m);l(p)}return{distance:c,index:d}}function Dc(e,t,n,r,s,a,i,l){const c={passive:!0,capture:!0};let d=0;function g(f){if(!l)return;function p(h){if(new Date().getTime()-d>10)return;i.emit("slideFocusStart"),e.scrollLeft=0;const y=n.findIndex(C=>C.includes(h));pr(y)&&(s.useDuration(0),r.index(y,0),i.emit("slideFocus"))}a.add(document,"keydown",u,!1),t.forEach((h,w)=>{a.add(h,"focus",v=>{(un(l)||l(f,v))&&p(w)},c)})}function u(f){f.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 pr(c)?c:c.get()}return{get:n,set:r,add:s,subtract:a}}function va(e,t){const n=e.scroll==="x"?i:l,r=t.style;let s=null,a=!1;function i(m){return`translate3d(${m}px,0px,0px)`}function l(m){return`translate3d(0px,${m}px,0px)`}function c(m){if(a)return;const f=pc(e.direction(m));f!==s&&(r.transform=n(f),s=f)}function d(m){a=!m}function g(){a||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:g,to:c,toggleActive:d}}function Fc(e,t,n,r,s,a,i,l,c){const g=Tt(s),u=Tt(s).reverse(),m=v().concat(y());function f(R,N){return R.reduce((F,G)=>F-s[G],N)}function p(R,N){return R.reduce((F,G)=>f(F,N)>0?F.concat([G]):F,[])}function h(R){return a.map((N,F)=>({start:N-r[F]+.5+R,end:N+t-.5+R}))}function w(R,N,F){const G=h(N);return R.map(E=>{const J=F?0:-n,Q=F?n:0,P=F?"end":"start",K=G[E][P];return{index:E,loopPoint:K,slideLocation:jt(-1),translate:va(e,c[E]),target:()=>l.get()>K?J:Q}})}function v(){const R=i[0],N=p(u,R);return w(N,n,!1)}function y(){const R=t-i[0]-1,N=p(g,R);return w(N,-n,!0)}function C(){return m.every(({index:R})=>{const N=g.filter(F=>F!==R);return f(N,t)<=.1})}function k(){m.forEach(R=>{const{target:N,translate:F,slideLocation:G}=R,E=N();E!==G.get()&&(F.to(E),G.set(E))})}function M(){m.forEach(R=>R.translate.clear())}return{canLoop:C,clear:M,loop:k,loopPoints:m}}function Ac(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||(un(n)||n(c,g))&&d(g)}),r.observe(e,{childList:!0})}function i(){r&&r.disconnect(),s=!0}return{init:a,destroy:i}}function Ec(e,t,n,r){const s={};let a=null,i=null,l,c=!1;function d(){l=new IntersectionObserver(p=>{c||(p.forEach(h=>{const w=t.indexOf(h.target);s[w]=h}),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((h,w)=>{const v=parseInt(w),{isIntersecting:y}=s[v];return(p&&y||!p&&!y)&&h.push(v),h},[])}function m(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:m}}function Vc(e,t,n,r,s,a){const{measureSize:i,startEdge:l,endEdge:c}=e,d=n[0]&&s,g=p(),u=h(),m=n.map(i),f=w();function p(){if(!d)return 0;const y=n[0];return ae(t[l]-y[l])}function h(){if(!d)return 0;const y=a.getComputedStyle($e(r));return parseFloat(y.getPropertyValue(`margin-${c}`))}function w(){return n.map((y,C,k)=>{const M=!C,S=xr(k,C);return M?m[C]+g:S?m[C]+u:k[C+1][l]-y[l]}).map(ae)}return{slideSizes:m,slideSizesWithGaps:f,startGap:g,endGap:u}}function $c(e,t,n,r,s,a,i,l,c){const{startEdge:d,endEdge:g,direction:u}=e,m=pr(n);function f(v,y){return Tt(v).filter(C=>C%y===0).map(C=>v.slice(C,C+y))}function p(v){return v.length?Tt(v).reduce((y,C,k)=>{const M=$e(y)||0,S=M===0,R=C===Et(v),N=s[d]-a[M][d],F=s[d]-a[C][g],G=!r&&S?u(i):0,E=!r&&R?u(l):0,J=ae(F-E-(N+G));return k&&J>t+c&&y.push(C),R&&y.push(v.length),y},[]).map((y,C,k)=>{const M=Math.max(k[C-1]||0);return v.slice(M,y)}):[]}function h(v){return m?f(v,n):p(v)}return{groupSlides:h}}function zc(e,t,n,r,s,a,i){const{align:l,axis:c,direction:d,startIndex:g,loop:u,duration:m,dragFree:f,dragThreshold:p,inViewThreshold:h,slidesToScroll:w,skipSnaps:v,containScroll:y,watchResize:C,watchSlides:k,watchDrag:M,watchFocus:S}=a,R=2,N=yc(),F=N.measure(t),G=n.map(N.measure),E=bc(c,d),J=E.measureSize(F),Q=Cc(J),P=hc(l,J),K=!u&&!!y,V=u||!!y,{slideSizes:U,slideSizesWithGaps:I,startGap:fe,endGap:ge}=Vc(E,F,G,n,V,s),de=$c(E,J,w,u,F,G,fe,ge,R),{snaps:je,snapsAligned:A}=Pc(E,P,F,G,de),B=-$e(je)+$e(I),{snapsContained:Y,scrollContainLimit:ce}=kc(J,B,A,y,R),q=K?Y:A,{limit:O}=Rc(B,q,u),ue=ba(Et(q),g,u),ie=ue.clone(),Z=Tt(n),T=({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:gn,scrollLooper:Ot,slideLooper:Ht,dragHandler:pn,animation:bt,eventHandler:Ae,scrollBounds:hn,options:{loop:Gt}},vt)=>{const wt=Te.settled(),H=!hn.shouldConstrain(),me=Gt?wt:wt&&H,he=me&&!pn.pointerDown();he&&bt.stop();const ke=Ge.get()*vt+gn.get()*(1-vt);ut.set(ke),Gt&&(Ot.loop(Te.direction()),Ht.loop()),ct.to(ut.get()),he&&Ae.emit("settle"),me||Ae.emit("scroll")},se=xc(r,s,()=>T(et),Te=>ee(et,Te)),we=.68,Ie=q[ue.get()],Se=jt(Ie),Oe=jt(Ie),be=jt(Ie),We=jt(Ie),Qe=jc(Se,be,Oe,We,m,we),ye=Tc(u,q,B,O,We),He=Lc(se,ue,ie,Qe,ye,We,i),Vt=Mc(O),$t=Dt(),dt=Ec(t,n,i,h),{slideRegistry:zt}=Ic(K,y,q,ce,de,Z),Bt=Dc(e,n,zt,He,Qe,$t,i,S),et={ownerDocument:r,ownerWindow:s,eventHandler:i,containerRect:F,slideRects:G,animation:se,axis:E,dragHandler:vc(E,e,r,s,We,wc(E,s),Se,se,He,Qe,ye,ue,i,Q,f,p,v,we,M),eventStore:$t,percentOfView:Q,index:ue,indexPrevious:ie,limit:O,location:Se,offsetLocation:be,previousLocation:Oe,options:a,resizeHandler:Nc(t,i,s,n,E,C,N),scrollBody:Qe,scrollBounds:Sc(O,be,We,Qe,Q),scrollLooper:_c(B,O,be,[Se,be,Oe,We]),scrollProgress:Vt,scrollSnapList:q.map(Vt.get),scrollSnaps:q,scrollTarget:ye,scrollTo:He,slideLooper:Fc(E,J,B,U,I,je,q,be,n),slideFocus:Bt,slidesHandler:Ac(t,i,k),slidesInView:dt,slideIndexes:Z,slideRegistry:zt,slidesToScroll:de,target:We,translate:va(E,t)};return et}function Bc(){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 Oc={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 Hc(e){function t(a,i){return xa(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 Gc(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 on(e,t,n){const r=e.ownerDocument,s=r.defaultView,a=Hc(s),i=Gc(a),l=Dt(),c=Bc(),{mergeOptions:d,optionsAtMedia:g,optionsMediaQueries:u}=a,{on:m,off:f,emit:p}=c,h=E;let w=!1,v,y=d(Oc,on.globalOptions),C=d(y),k=[],M,S,R;function N(){const{container:Z,slides:T}=C;S=(Tn(Z)?e.querySelector(Z):Z)||e.children[0];const se=Tn(T)?S.querySelectorAll(T):T;R=[].slice.call(se||S.children)}function F(Z){const T=zc(e,S,R,r,s,Z,c);if(Z.loop&&!T.slideLooper.canLoop()){const ee=Object.assign({},Z,{loop:!1});return F(ee)}return T}function G(Z,T){w||(y=d(y,Z),C=g(y),k=T||k,N(),v=F(C),u([y,...k.map(({options:ee})=>ee)]).forEach(ee=>l.add(ee,"change",E)),C.active&&(v.translate.to(v.location.get()),v.animation.init(),v.slidesInView.init(),v.slideFocus.init(ie),v.eventHandler.init(ie),v.resizeHandler.init(ie),v.slidesHandler.init(ie),v.options.loop&&v.slideLooper.loop(),S.offsetParent&&R.length&&v.dragHandler.init(ie),M=i.init(ie,k)))}function E(Z,T){const ee=de();J(),G(d({startIndex:ee},Z),T),c.emit("reInit")}function J(){v.dragHandler.destroy(),v.eventStore.clear(),v.translate.clear(),v.slideLooper.clear(),v.resizeHandler.destroy(),v.slidesHandler.destroy(),v.slidesInView.destroy(),v.animation.destroy(),i.destroy(),l.clear()}function Q(){w||(w=!0,l.clear(),J(),c.emit("destroy"),c.clear())}function P(Z,T,ee){!C.active||w||(v.scrollBody.useBaseFriction().useDuration(T===!0?0:C.duration),v.scrollTo.index(Z,ee||0))}function K(Z){const T=v.index.add(1).get();P(T,Z,-1)}function V(Z){const T=v.index.add(-1).get();P(T,Z,1)}function U(){return v.index.add(1).get()!==de()}function I(){return v.index.add(-1).get()!==de()}function fe(){return v.scrollSnapList}function ge(){return v.scrollProgress.get(v.offsetLocation.get())}function de(){return v.index.get()}function je(){return v.indexPrevious.get()}function A(){return v.slidesInView.get()}function B(){return v.slidesInView.get(!1)}function Y(){return M}function ce(){return v}function q(){return e}function O(){return S}function ue(){return R}const ie={canScrollNext:U,canScrollPrev:I,containerNode:O,internalEngine:ce,destroy:Q,off:f,on:m,emit:p,plugins:Y,previousScrollSnap:je,reInit:h,rootNode:q,scrollNext:K,scrollPrev:V,scrollProgress:ge,scrollSnapList:fe,scrollTo:P,selectedScrollSnap:de,slideNodes:ue,slidesInView:A,slidesNotInView:B};return G(t,n),setTimeout(()=>c.emit("init"),0),ie}on.globalOptions=void 0;function br(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(()=>{gr(n.current,e)||(n.current=e,c())},[e,c]),j.useEffect(()=>{fc(r.current,t)||(r.current=t,c())},[t,c]),j.useEffect(()=>{if(mc()&&i){on.globalOptions=br.globalOptions;const d=on(i,n.current,r.current);return a(d),()=>d.destroy()}else a(void 0)},[i,a]),[l,s]}br.globalOptions=void 0;const wa=b.createContext(null);function mn(){const e=b.useContext(wa);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}const ya=b.forwardRef(({orientation:e="horizontal",opts:t,setApi:n,plugins:r,className:s,children:a,...i},l)=>{const[c,d]=br({...t,axis:e==="horizontal"?"x":"y"},r),[g,u]=b.useState(!1),[m,f]=b.useState(!1),p=b.useCallback(y=>{y&&(u(y.canScrollPrev()),f(y.canScrollNext()))},[]),h=b.useCallback(()=>{d==null||d.scrollPrev()},[d]),w=b.useCallback(()=>{d==null||d.scrollNext()},[d]),v=b.useCallback(y=>{y.key==="ArrowLeft"?(y.preventDefault(),h()):y.key==="ArrowRight"&&(y.preventDefault(),w())},[h,w]);return b.useEffect(()=>{!d||!n||n(d)},[d,n]),b.useEffect(()=>{if(d)return p(d),d.on("reInit",p),d.on("select",p),()=>{d==null||d.off("select",p)}},[d,p]),o.jsx(wa.Provider,{value:{carouselRef:c,api:d,opts:t,orientation:e,scrollPrev:h,scrollNext:w,canScrollPrev:g,canScrollNext:m},children:o.jsx("div",{ref:l,onKeyDownCapture:v,className:x("relative",s),role:"region","aria-roledescription":"carousel",...i,children:a})})});ya.displayName="Carousel";const Ca=b.forwardRef(({className:e,...t},n)=>{const{carouselRef:r,orientation:s}=mn();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})})});Ca.displayName="CarouselContent";const Na=b.forwardRef(({className:e,...t},n)=>{const{orientation:r}=mn();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})});Na.displayName="CarouselItem";const ja=b.forwardRef(({className:e,variant:t="outline",size:n="icon",...r},s)=>{const{orientation:a,scrollPrev:i,canScrollPrev:l}=mn(),c=X();return o.jsxs(pe,{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(_.ChevronLeft,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:c.carousel_previousSlide})]})});ja.displayName="CarouselPrevious";const Sa=b.forwardRef(({className:e,variant:t="outline",size:n="icon",...r},s)=>{const{orientation:a,scrollNext:i,canScrollNext:l}=mn(),c=X();return o.jsxs(pe,{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(_.ChevronRight,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:c.carousel_nextSlide})]})});Sa.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 Ke(e,t){return typeof e=="function"?e(t):e}function Le(e,t){return n=>{t.setState(r=>({...r,[e]:Ke(n,r[e])}))}}function fn(e){return e instanceof Function}function
|
|
21
|
+
*/function Ke(e,t){return typeof e=="function"?e(t):e}function Le(e,t){return n=>{t.setState(r=>({...r,[e]:Ke(n,r[e])}))}}function fn(e){return e instanceof Function}function qc(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function Wc(e,t){const n=[],r=s=>{s.forEach(a=>{n.push(a);const i=t(a);i!=null&&i.length&&r(i)})};return r(e),n}function $(e,t,n){let r=[],s;return a=>{let i;n.key&&n.debug&&(i=Date.now());const l=e(a);if(!(l.length!==r.length||l.some((g,u)=>r[u]!==g)))return s;r=l;let d;if(n.key&&n.debug&&(d=Date.now()),s=t(...l),n==null||n.onChange==null||n.onChange(s),n.key&&n.debug&&n!=null&&n.debug()){const g=Math.round((Date.now()-i)*100)/100,u=Math.round((Date.now()-d)*100)/100,m=u/16,f=(p,h)=>{for(p=String(p);p.length<h;)p=" "+p;return p};console.info(`%c⏱ ${f(u,5)} /${f(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 Gc(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 qc(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 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: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(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 zr(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 Wc={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 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:[r,`${m}`].filter(Boolean).join("_"),headers:[]},h=[];f.forEach(y=>{const b=[...h].reverse()[0],w=y.column.depth===p.depth;let N,R=!1;if(w&&y.column.parent?N=y.column.parent:(N=y.column,R=!0),b&&(b==null?void 0:b.column)===N)b.subHeaders.push(y);else{const _=zr(n,N,{id:[r,m,N.id,y==null?void 0:y.id].filter(Boolean).join("_"),isPlaceholder:R,placeholderId:R?`${h.filter(S=>S.column===N).length}`:void 0,depth:m,index:h.length});_.subHeaders.push(y),h.push(_)}p.headers.push(y),y.headerGroup=p}),c.push(p),m>0&&d(h,m-1)},g=t.map((f,m)=>zr(n,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,y=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 w=Math.min(...b);return y=y+w,p.colSpan=h,p.rowSpan=y,{colSpan:h,rowSpan:y}});return u((s=(a=c[0])==null?void 0:a.headers)!=null?s:[]),c}const br=(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:()=>Hc(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=>Gc(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},Uc={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()}}},ja=(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))};ja.autoRemove=e=>ze(e);const Sa=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};Sa.autoRemove=e=>ze(e);const ka=(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())};ka.autoRemove=e=>ze(e);const Ra=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};Ra.autoRemove=e=>ze(e);const _a=(e,t,n)=>!n.some(r=>{var s;return!((s=e.getValue(t))!=null&&s.includes(r))});_a.autoRemove=e=>ze(e)||!(e!=null&&e.length);const Ma=(e,t,n)=>n.some(r=>{var s;return(s=e.getValue(t))==null?void 0:s.includes(r)});Ma.autoRemove=e=>ze(e)||!(e!=null&&e.length);const Pa=(e,t,n)=>e.getValue(t)===n;Pa.autoRemove=e=>ze(e);const Ia=(e,t,n)=>e.getValue(t)==n;Ia.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 Ye={includesString:ja,includesStringSensitive:Sa,equalsString:ka,arrIncludes:Ra,arrIncludesAll:_a,arrIncludesSome:Ma,equals:Pa,weakEquals:Ia,inNumberRange:wr};function ze(e){return e==null||e===""}const Yc={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Le("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"?Ye.includesString:typeof r=="number"?Ye.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Ye.equals:Array.isArray(r)?Ye.arrIncludes:Ye.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:Ye[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=Ke(n,a?a.value:void 0);if(Br(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=Ke(t,s))==null?void 0:a.filter(i=>{const l=n.find(c=>c.id===i.id);if(l){const c=l.getFilterFn();if(Br(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 Br(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Xc=(e,t,n)=>n.reduce((r,s)=>{const a=s.getValue(e);return r+(typeof a=="number"?a:0)},0),Kc=(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},Zc=(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},Jc=(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]},Qc=(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},eu=(e,t)=>{if(!t.length)return;const n=t.map(a=>a.getValue(e));if(!Oc(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},tu=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),nu=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,ru=(e,t)=>t.length,wn={sum:Xc,min:Kc,max:Zc,extent:Jc,mean:Qc,median:eu,unique:tu,uniqueCount:nu,count:ru},ou={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:Le("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 su(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 au={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Le("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 su(a,n,r)},z(e.options,"debugTable","_getOrderColumnsFn"))}},yn=()=>({left:[],right:[]}),iu={getInitialState:e=>({columnPinning:yn(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Le("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?yn():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:yn())},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 lu(e){return e||(typeof document<"u"?document:null)}const Jt={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Nn=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),du={getDefaultColumnDef:()=>Jt,getInitialState:e=>({columnSizing:{},columnSizingInfo:Nn(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Le("columnSizing",e),onColumnSizingInfoChange:Le("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(b=>[b.column.id,b.column.getSize()]):[[r.id,r.getSize()]],c=Cn(a)?Math.round(a.touches[0].clientX):a.clientX,d={},g=(b,w)=>{typeof w=="number"&&(t.setColumnSizingInfo(N=>{var R,_;const S=t.options.columnResizeDirection==="rtl"?-1:1,k=(w-((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(F=>{let[G,E]=F;d[G]=Math.round(Math.max(E+E*C,0)*100)/100}),{...N,deltaOffset:k,deltaPercentage:C}}),(t.options.columnResizeMode==="onChange"||b==="end")&&t.setColumnSizing(N=>({...N,...d})))},u=b=>g("move",b),f=b=>{g("end",b),t.setColumnSizingInfo(w=>({...w,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},m=lu(n),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 w;m==null||m.removeEventListener("touchmove",h.moveHandler),m==null||m.removeEventListener("touchend",h.upHandler),b.cancelable&&(b.preventDefault(),b.stopPropagation()),f((w=b.touches[0])==null?void 0:w.clientX)}},y=cu()?{passive:!1}:!1;Cn(a)?(m==null||m.addEventListener("touchmove",h.moveHandler,y),m==null||m.addEventListener("touchend",h.upHandler,y)):(m==null||m.addEventListener("mousemove",p.moveHandler,y),m==null||m.addEventListener("mouseup",p.upHandler,y)),t.setColumnSizingInfo(b=>({...b,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?Nn():(n=e.initialState.columnSizingInfo)!=null?n:Nn())},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 cu(){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 uu={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Le("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 mu={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()}}},fu={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Le("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=()=>Ye.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:Ye[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},gu={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Le("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,Fn=10,jn=()=>({pageIndex:Dn,pageSize:Fn}),pu={getInitialState:e=>({...e,pagination:{...jn(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Le("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=>Ke(r,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(s)},e.resetPagination=r=>{var s;e.setPagination(r?jn():(s=e.initialState.pagination)!=null?s:jn())},e.setPageIndex=r=>{e.setPagination(s=>{let a=Ke(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?Fn:(s=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?s:Fn)},e.setPageSize=r=>{e.setPagination(s=>{const a=Math.max(1,Ke(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=Ke(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}}},Sn=()=>({top:[],bottom:[]}),hu={getInitialState:e=>({rowPinning:Sn(),...e}),getDefaultOptions:e=>({onRowPinningChange:Le("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(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(n==="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 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?Sn():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:Sn())},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"))}},xu={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Le("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=>{An(s,a.id,r,!0,e)}),s}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=$(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?kn(e,n):{rows:[],flatRows:[],rowsById:{}},z(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=$(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?kn(e,n):{rows:[],flatRows:[],rowsById:{}},z(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=$(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?kn(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 An(l,e.id,n,(i=r==null?void 0:r.selectChildren)!=null?i:!0,t),l})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return yr(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return En(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return En(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)}}}},An=(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=>An(e,l.id,n,r,s))};function kn(e,t){const n=e.getState().rowSelection,r=[],s={},a=function(i,l){return i.map(c=>{var d;const g=yr(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 yr(e,t){var n;return(n=t[e.id])!=null?n:!1}function En(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()&&(yr(i,t)?a=!0:s=!1),i.subRows&&i.subRows.length)){const l=En(i,t);l==="all"?a=!0:(l==="some"&&(a=!0),s=!1)}}),s?"all":a?"some":!1}const Vn=/([0-9]+)/gm,vu=(e,t,n)=>Ta(Ze(e.getValue(n)).toLowerCase(),Ze(t.getValue(n)).toLowerCase()),bu=(e,t,n)=>Ta(Ze(e.getValue(n)),Ze(t.getValue(n))),wu=(e,t,n)=>Nr(Ze(e.getValue(n)).toLowerCase(),Ze(t.getValue(n)).toLowerCase()),yu=(e,t,n)=>Nr(Ze(e.getValue(n)),Ze(t.getValue(n))),Nu=(e,t,n)=>{const r=e.getValue(n),s=t.getValue(n);return r>s?1:r<s?-1:0},Cu=(e,t,n)=>Nr(e.getValue(n),t.getValue(n));function Nr(e,t){return e===t?0:e>t?1:-1}function Ze(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Ta(e,t){const n=e.split(Vn).filter(Boolean),r=t.split(Vn).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 Nt={alphanumeric:vu,alphanumericCaseSensitive:bu,text:wu,textCaseSensitive:yu,datetime:Nu,basic:Cu},ju={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Le("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 Nt.datetime;if(typeof a=="string"&&(r=!0,a.split(Vn).length>1))return Nt.alphanumeric}return r?Nt.text:Nt.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:Nt[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())}},Su=[Wc,uu,au,iu,Uc,Yc,mu,fu,ju,ou,gu,pu,hu,xu,du];function ku(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...Su,...(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=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,y;return(h=(y=p.renderValue())==null||y.toString==null?void 0:y.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,y){return y===void 0&&(y=0),p.map(b=>{const w=qc(s,b,y,h),N=b;return w.columns=N.columns?m(N.columns,w,y+1):[],w})};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 Ru(){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=br(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 _u(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 Mu(e,t,n){return n.options.filterFromLeafRows?Pu(e,t,n):Iu(e,t,n)}function Pu(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=br(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 Iu(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 h=br(n,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 Tu(){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 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=(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 h=d.id;m.columnFilters[h]=d.filterFn(m,h,d.resolvedValue,y=>{m.columnFiltersMeta[h]=y})}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,y=>{m.columnFiltersMeta[h]=y})){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 Mu(t.rows,u,e)},z(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function Lu(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=_u({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 Du(){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],h=i[p.id],y=h.sortUndefined,b=(f=p==null?void 0:p.desc)!=null?f:!1;let w=0;if(y){const N=g.getValue(p.id),R=u.getValue(p.id),_=N===void 0,S=R===void 0;if(_||S){if(y==="first")return _?-1:1;if(y==="last")return _?1:-1;w=_&&S?0:_?y:-y}}if(w===0&&(w=h.sortingFn(g,u,p.id)),w!==0)return b&&(w*=-1),h.invertSorting&&(w*=-1),w}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*m,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 Uc(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 Yc(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=m=>{let f=m;for(const h of c.split(".")){var p;f=(p=f)==null?void 0:p[h],process.env.NODE_ENV!=="production"&&f===void 0&&console.warn(`"${h}" in deeply nested key "${c}" returned undefined.`)}return f}:g=m=>m[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 m;return[u,...(m=u.columns)==null?void 0:m.flatMap(f=>f.getFlatColumns())]},z(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:$(()=>[e._getOrderColumnsFn()],m=>{var f;if((f=u.columns)!=null&&f.length){let p=u.columns.flatMap(h=>h.getLeafColumns());return m(p)}return[u]},z(e.options,"debugColumns","column.getLeafColumns"))};for(const m of e._features)m.createColumn==null||m.createColumn(u,e);return u}const Ne="debugHeaders";function zr(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 Xc={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(m=>m.id===u)).filter(Boolean))!=null?a:[],c=(i=s==null?void 0:s.map(u=>n.find(m=>m.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,Ne,"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,Ne,"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,Ne,"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,Ne,"getRightHeaderGroups")),e.getFooterGroups=$(()=>[e.getHeaderGroups()],t=>[...t].reverse(),z(e.options,Ne,"getFooterGroups")),e.getLeftFooterGroups=$(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),z(e.options,Ne,"getLeftFooterGroups")),e.getCenterFooterGroups=$(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),z(e.options,Ne,"getCenterFooterGroups")),e.getRightFooterGroups=$(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),z(e.options,Ne,"getRightFooterGroups")),e.getFlatHeaders=$(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),z(e.options,Ne,"getFlatHeaders")),e.getLeftFlatHeaders=$(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),z(e.options,Ne,"getLeftFlatHeaders")),e.getCenterFlatHeaders=$(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),z(e.options,Ne,"getCenterFlatHeaders")),e.getRightFlatHeaders=$(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),z(e.options,Ne,"getRightFlatHeaders")),e.getCenterLeafHeaders=$(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),z(e.options,Ne,"getCenterLeafHeaders")),e.getLeftLeafHeaders=$(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),z(e.options,Ne,"getLeftLeafHeaders")),e.getRightLeafHeaders=$(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),z(e.options,Ne,"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,Ne,"getLeafHeaders"))}};function Zt(e,t,n,r){var s,a;let i=0;const l=function(m,f){f===void 0&&(f=1),i=Math.max(i,f),m.filter(p=>p.getIsVisible()).forEach(p=>{var h;(h=p.columns)!=null&&h.length&&l(p.columns,f+1)},0)};l(e);let c=[];const d=(m,f)=>{const p={depth:f,id:[r,`${f}`].filter(Boolean).join("_"),headers:[]},h=[];m.forEach(w=>{const v=[...h].reverse()[0],y=w.column.depth===p.depth;let C,k=!1;if(y&&w.column.parent?C=w.column.parent:(C=w.column,k=!0),v&&(v==null?void 0:v.column)===C)v.subHeaders.push(w);else{const M=zr(n,C,{id:[r,f,C.id,w==null?void 0:w.id].filter(Boolean).join("_"),isPlaceholder:k,placeholderId:k?`${h.filter(S=>S.column===C).length}`:void 0,depth:f,index:h.length});M.subHeaders.push(w),h.push(M)}p.headers.push(w),w.headerGroup=p}),c.push(p),f>0&&d(h,f-1)},g=t.map((m,f)=>zr(n,m,{depth:i,index:f}));d(g,i-1),c.reverse();const u=m=>m.filter(p=>p.column.getIsVisible()).map(p=>{let h=0,w=0,v=[0];p.subHeaders&&p.subHeaders.length?(v=[],u(p.subHeaders).forEach(C=>{let{colSpan:k,rowSpan:M}=C;h+=k,v.push(M)})):h=1;const y=Math.min(...v);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 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:()=>Wc(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=>Uc(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},Kc={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()}}},ka=(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))};ka.autoRemove=e=>ze(e);const Ra=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};Ra.autoRemove=e=>ze(e);const _a=(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())};_a.autoRemove=e=>ze(e);const Ma=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};Ma.autoRemove=e=>ze(e);const Pa=(e,t,n)=>!n.some(r=>{var s;return!((s=e.getValue(t))!=null&&s.includes(r))});Pa.autoRemove=e=>ze(e)||!(e!=null&&e.length);const Ia=(e,t,n)=>n.some(r=>{var s;return(s=e.getValue(t))==null?void 0:s.includes(r)});Ia.autoRemove=e=>ze(e)||!(e!=null&&e.length);const Ta=(e,t,n)=>e.getValue(t)===n;Ta.autoRemove=e=>ze(e);const La=(e,t,n)=>e.getValue(t)==n;La.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 Ye={includesString:ka,includesStringSensitive:Ra,equalsString:_a,arrIncludes:Ma,arrIncludesAll:Pa,arrIncludesSome:Ia,equals:Ta,weakEquals:La,inNumberRange:wr};function ze(e){return e==null||e===""}const Zc={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Le("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"?Ye.includesString:typeof r=="number"?Ye.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Ye.equals:Array.isArray(r)?Ye.arrIncludes:Ye.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:Ye[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=Ke(n,a?a.value:void 0);if(Br(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=Ke(t,s))==null?void 0:a.filter(i=>{const l=n.find(c=>c.id===i.id);if(l){const c=l.getFilterFn();if(Br(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 Br(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Jc=(e,t,n)=>n.reduce((r,s)=>{const a=s.getValue(e);return r+(typeof a=="number"?a:0)},0),Qc=(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},eu=(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},tu=(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]},nu=(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},ru=(e,t)=>{if(!t.length)return;const n=t.map(a=>a.getValue(e));if(!qc(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},ou=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),su=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,au=(e,t)=>t.length,wn={sum:Jc,min:Qc,max:eu,extent:tu,mean:nu,median:ru,unique:ou,uniqueCount:su,count:au},iu={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:Le("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 lu(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 du={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Le("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 lu(a,n,r)},z(e.options,"debugTable","_getOrderColumnsFn"))}},yn=()=>({left:[],right:[]}),cu={getInitialState:e=>({columnPinning:yn(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Le("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?yn():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:yn())},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 uu(e){return e||(typeof document<"u"?document:null)}const Jt={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Cn=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),mu={getDefaultColumnDef:()=>Jt,getInitialState:e=>({columnSizing:{},columnSizingInfo:Cn(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Le("columnSizing",e),onColumnSizingInfoChange:Le("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(),Nn(a)&&a.touches&&a.touches.length>1))return;const i=e.getSize(),l=e?e.getLeafHeaders().map(v=>[v.column.id,v.column.getSize()]):[[r.id,r.getSize()]],c=Nn(a)?Math.round(a.touches[0].clientX):a.clientX,d={},g=(v,y)=>{typeof y=="number"&&(t.setColumnSizingInfo(C=>{var k,M;const S=t.options.columnResizeDirection==="rtl"?-1:1,R=(y-((k=C==null?void 0:C.startOffset)!=null?k:0))*S,N=Math.max(R/((M=C==null?void 0:C.startSize)!=null?M:0),-.999999);return C.columnSizingStart.forEach(F=>{let[G,E]=F;d[G]=Math.round(Math.max(E+E*N,0)*100)/100}),{...C,deltaOffset:R,deltaPercentage:N}}),(t.options.columnResizeMode==="onChange"||v==="end")&&t.setColumnSizing(C=>({...C,...d})))},u=v=>g("move",v),m=v=>{g("end",v),t.setColumnSizingInfo(y=>({...y,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},f=uu(n),p={moveHandler:v=>u(v.clientX),upHandler:v=>{f==null||f.removeEventListener("mousemove",p.moveHandler),f==null||f.removeEventListener("mouseup",p.upHandler),m(v.clientX)}},h={moveHandler:v=>(v.cancelable&&(v.preventDefault(),v.stopPropagation()),u(v.touches[0].clientX),!1),upHandler:v=>{var y;f==null||f.removeEventListener("touchmove",h.moveHandler),f==null||f.removeEventListener("touchend",h.upHandler),v.cancelable&&(v.preventDefault(),v.stopPropagation()),m((y=v.touches[0])==null?void 0:y.clientX)}},w=fu()?{passive:!1}:!1;Nn(a)?(f==null||f.addEventListener("touchmove",h.moveHandler,w),f==null||f.addEventListener("touchend",h.upHandler,w)):(f==null||f.addEventListener("mousemove",p.moveHandler,w),f==null||f.addEventListener("mouseup",p.upHandler,w)),t.setColumnSizingInfo(v=>({...v,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?Cn():(n=e.initialState.columnSizingInfo)!=null?n:Cn())},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 fu(){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 Nn(e){return e.type==="touchstart"}const gu={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Le("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 pu={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()}}},hu={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Le("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=()=>Ye.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:Ye[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},xu={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Le("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,Fn=10,jn=()=>({pageIndex:Dn,pageSize:Fn}),bu={getInitialState:e=>({...e,pagination:{...jn(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Le("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=>Ke(r,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(s)},e.resetPagination=r=>{var s;e.setPagination(r?jn():(s=e.initialState.pagination)!=null?s:jn())},e.setPageIndex=r=>{e.setPagination(s=>{let a=Ke(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?Fn:(s=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?s:Fn)},e.setPageSize=r=>{e.setPagination(s=>{const a=Math.max(1,Ke(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=Ke(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}}},Sn=()=>({top:[],bottom:[]}),vu={getInitialState:e=>({rowPinning:Sn(),...e}),getDefaultOptions:e=>({onRowPinningChange:Le("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,m;return{top:((u=c==null?void 0:c.top)!=null?u:[]).filter(h=>!(l!=null&&l.has(h))),bottom:[...((m=c==null?void 0:c.bottom)!=null?m:[]).filter(h=>!(l!=null&&l.has(h))),...Array.from(l)]}}if(n==="top"){var f,p;return{top:[...((f=c==null?void 0:c.top)!=null?f:[]).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 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?Sn():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:Sn())},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"))}},wu={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Le("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=>{An(s,a.id,r,!0,e)}),s}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=$(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?kn(e,n):{rows:[],flatRows:[],rowsById:{}},z(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=$(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?kn(e,n):{rows:[],flatRows:[],rowsById:{}},z(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=$(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?kn(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 An(l,e.id,n,(i=r==null?void 0:r.selectChildren)!=null?i:!0,t),l})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return yr(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return En(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return En(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)}}}},An=(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=>An(e,l.id,n,r,s))};function kn(e,t){const n=e.getState().rowSelection,r=[],s={},a=function(i,l){return i.map(c=>{var d;const g=yr(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 yr(e,t){var n;return(n=t[e.id])!=null?n:!1}function En(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()&&(yr(i,t)?a=!0:s=!1),i.subRows&&i.subRows.length)){const l=En(i,t);l==="all"?a=!0:(l==="some"&&(a=!0),s=!1)}}),s?"all":a?"some":!1}const Vn=/([0-9]+)/gm,yu=(e,t,n)=>Da(Ze(e.getValue(n)).toLowerCase(),Ze(t.getValue(n)).toLowerCase()),Cu=(e,t,n)=>Da(Ze(e.getValue(n)),Ze(t.getValue(n))),Nu=(e,t,n)=>Cr(Ze(e.getValue(n)).toLowerCase(),Ze(t.getValue(n)).toLowerCase()),ju=(e,t,n)=>Cr(Ze(e.getValue(n)),Ze(t.getValue(n))),Su=(e,t,n)=>{const r=e.getValue(n),s=t.getValue(n);return r>s?1:r<s?-1:0},ku=(e,t,n)=>Cr(e.getValue(n),t.getValue(n));function Cr(e,t){return e===t?0:e>t?1:-1}function Ze(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Da(e,t){const n=e.split(Vn).filter(Boolean),r=t.split(Vn).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:yu,alphanumericCaseSensitive:Cu,text:Nu,textCaseSensitive:ju,datetime:Su,basic:ku},Ru={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Le("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(Vn).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(f=>f.id===e.id),c=i==null?void 0:i.findIndex(f=>f.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 m;d=[...i,{id:e.id,desc:u}],d.splice(0,d.length-((m=t.options.maxMultiSortColCount)!=null?m:Number.MAX_SAFE_INTEGER))}else g==="toggle"?d=i.map(f=>f.id===e.id?{...f,desc:u}:f):g==="remove"?d=i.filter(f=>f.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())}},_u=[Xc,gu,du,cu,Kc,Zc,pu,hu,Ru,iu,xu,bu,vu,wu,mu];function Mu(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[..._u,...(t=e._features)!=null?t:[]];let s={_features:r};const a=s._features.reduce((m,f)=>Object.assign(m,f.getDefaultOptions==null?void 0:f.getDefaultOptions(s)),{}),i=m=>s.options.mergeOptions?s.options.mergeOptions(a,m):{...a,...m};let c={...{},...(n=e.initialState)!=null?n:{}};s._features.forEach(m=>{var f;c=(f=m.getInitialState==null?void 0:m.getInitialState(c))!=null?f:c});const d=[];let g=!1;const u={_features:r,options:{...a,...e},initialState:c,_queue:m=>{d.push(m),g||(g=!0,Promise.resolve().then(()=>{for(;d.length;)d.shift()();g=!1}).catch(f=>setTimeout(()=>{throw f})))},reset:()=>{s.setState(s.initialState)},setOptions:m=>{const f=Ke(m,s.options);s.options=i(f)},getState:()=>s.options.state,setState:m=>{s.options.onStateChange==null||s.options.onStateChange(m)},_getRowId:(m,f,p)=>{var h;return(h=s.options.getRowId==null?void 0:s.options.getRowId(m,f,p))!=null?h:`${p?[p.id,f].join("."):f}`},getCoreRowModel:()=>(s._getCoreRowModel||(s._getCoreRowModel=s.options.getCoreRowModel(s)),s._getCoreRowModel()),getRowModel:()=>s.getPaginationRowModel(),getRow:(m,f)=>{let p=(f?s.getPrePaginationRowModel():s.getRowModel()).rowsById[m];if(!p&&(p=s.getCoreRowModel().rowsById[m],!p))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${m}`):new Error;return p},_getDefaultColumnDef:$(()=>[s.options.defaultColumn],m=>{var f;return m=(f=m)!=null?f:{},{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()),{}),...m}},z(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>s.options.columns,getAllColumns:$(()=>[s._getColumnDefs()],m=>{const f=function(p,h,w){return w===void 0&&(w=0),p.map(v=>{const y=Yc(s,v,w,h),C=v;return y.columns=C.columns?f(C.columns,y,w+1):[],y})};return f(m)},z(e,"debugColumns","getAllColumns")),getAllFlatColumns:$(()=>[s.getAllColumns()],m=>m.flatMap(f=>f.getFlatColumns()),z(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:$(()=>[s.getAllFlatColumns()],m=>m.reduce((f,p)=>(f[p.id]=p,f),{}),z(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:$(()=>[s.getAllColumns(),s._getOrderColumnsFn()],(m,f)=>{let p=m.flatMap(h=>h.getLeafColumns());return f(p)},z(e,"debugColumns","getAllLeafColumns")),getColumn:m=>{const f=s._getAllFlatColumnsById()[m];return process.env.NODE_ENV!=="production"&&!f&&console.error(`[Table] Column with id '${m}' does not exist.`),f}};Object.assign(s,u);for(let m=0;m<s._features.length;m++){const f=s._features[m];f==null||f.createTable==null||f.createTable(s)}return s}function Pu(){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 Iu(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 Tu(e,t,n){return n.options.filterFromLeafRows?Lu(e,t,n):Du(e,t,n)}function Lu(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 m=0;m<c.length;m++){var u;let f=c[m];const p=vr(n,f.id,f.original,f.index,f.depth,void 0,f.parentId);if(p.columnFilters=f.columnFilters,(u=f.subRows)!=null&&u.length&&d<i){if(p.subRows=l(f.subRows,d+1),f=p,t(f)&&!p.subRows.length){g.push(f),a[f.id]=f,s.push(f);continue}if(t(f)||p.subRows.length){g.push(f),a[f.id]=f,s.push(f);continue}}else f=p,t(f)&&(g.push(f),a[f.id]=f,s.push(f))}return g};return{rows:l(e),flatRows:s,rowsById:a}}function Du(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 m=0;m<c.length;m++){let f=c[m];if(t(f)){var u;if((u=f.subRows)!=null&&u.length&&d<i){const h=vr(n,f.id,f.original,f.index,f.depth,void 0,f.parentId);h.subRows=l(f.subRows,d+1),f=h}g.push(f),s.push(f),a[f.id]=f}}return g};return{rows:l(e),flatRows:s,rowsById:a}}function Fu(){return e=>$(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let m=0;m<t.flatRows.length;m++)t.flatRows[m].columnFilters={},t.flatRows[m].columnFiltersMeta={};return t}const s=[],a=[];(n??[]).forEach(m=>{var f;const p=e.getColumn(m.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:m.id,filterFn:h,resolvedValue:(f=h.resolveFilterValue==null?void 0:h.resolveFilterValue(m.value))!=null?f:m.value})});const i=(n??[]).map(m=>m.id),l=e.getGlobalFilterFn(),c=e.getAllLeafColumns().filter(m=>m.getCanGlobalFilter());r&&l&&c.length&&(i.push("__global__"),c.forEach(m=>{var f;a.push({id:m.id,filterFn:l,resolvedValue:(f=l.resolveFilterValue==null?void 0:l.resolveFilterValue(r))!=null?f:r})}));let d,g;for(let m=0;m<t.flatRows.length;m++){const f=t.flatRows[m];if(f.columnFilters={},s.length)for(let p=0;p<s.length;p++){d=s[p];const h=d.id;f.columnFilters[h]=d.filterFn(f,h,d.resolvedValue,w=>{f.columnFiltersMeta[h]=w})}if(a.length){for(let p=0;p<a.length;p++){g=a[p];const h=g.id;if(g.filterFn(f,h,g.resolvedValue,w=>{f.columnFiltersMeta[h]=w})){f.columnFilters.__global__=!0;break}}f.columnFilters.__global__!==!0&&(f.columnFilters.__global__=!1)}}const u=m=>{for(let f=0;f<i.length;f++)if(m.columnFilters[i[f]]===!1)return!1;return!0};return Tu(t.rows,u,e)},z(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function Au(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=Iu({rows:i,flatRows:l,rowsById:c}),u.flatRows=[];const m=f=>{u.flatRows.push(f),f.subRows.length&&f.subRows.forEach(m)};return u.rows.forEach(m),u},z(t.options,"debugTable","getPaginationRowModel"))}function Eu(){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 f=0;f<a.length;f+=1){var m;const p=a[f],h=i[p.id],w=h.sortUndefined,v=(m=p==null?void 0:p.desc)!=null?m:!1;let y=0;if(w){const C=g.getValue(p.id),k=u.getValue(p.id),M=C===void 0,S=k===void 0;if(M||S){if(w==="first")return M?-1:1;if(w==="last")return M?1:-1;y=M&&S?0:M?w:-w}}if(y===0&&(y=h.sortingFn(g,u,p.id)),y!==0)return v&&(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(n.rows),flatRows:s,rowsById:n.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 Or(e,t){return e?
|
|
34
|
-
`),r=t==="css"||t==="scss"||t==="less",s=t==="html"||t==="xml"||t==="svg",a=t==="json",i=t==="bash"||t==="sh"||t==="shell"||t==="zsh";return n.map(l=>{const c=[];let d=0;const g=l.length*4;let u=0;for(;d<l.length&&u++<g;){if(!r&&!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
|
|
35
|
-
`).map(u=>[{type:"plain",value:u}])}},[c,t]),g=async()=>{try{await navigator.clipboard.writeText(c),l(!0),setTimeout(()=>l(!1),2e3)}catch{}};return o.jsxs("div",{className:x("relative group",s),children:[r&&o.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?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:d.map((u,f)=>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:f+1}),u.map((m,p)=>o.jsx("span",{style:{color:Gu[m.type]},children:m.value},p))]},f))})]})}const La=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 Wu({className:e,level:t=2,as:n,children:r,...s}){const a=n||`h${t}`;return o.jsx(a,{className:x(La({level:t}),e),...s,children:r})}const Da=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 Uu({className:e,size:t,weight:n,variant:r,leading:s,as:a="p",children:i,...l}){return o.jsx(a,{className:x(Da({size:t,weight:n,variant:r,leading:s}),e),...l,children:i})}function Yu({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 Xu({className:e,...t}){return o.jsx("blockquote",{className:x("border-l-4 border-primary pl-4 italic text-muted-foreground",e),...t})}function Ku({className:e,...t}){return o.jsx("p",{className:x("text-xl text-muted-foreground",e),...t})}function Zu({className:e,...t}){return o.jsx("p",{className:x("text-sm text-muted-foreground",e),...t})}const Fa=v.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($n.ResponsiveContainer,{width:"100%",height:"100%",children:t})}));Fa.displayName="ChartContainer";const Ju=$n.Tooltip,Qu=$n.Legend,Aa=v.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("flex flex-col space-y-4",e),...t}));Aa.displayName="Timeline";const Ea=v.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("relative flex gap-4 pb-4 last:pb-0",e),...t}));Ea.displayName="TimelineItem";const Va=v.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}));Va.displayName="TimelineIcon";const $a=v.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}));$a.displayName="TimelineConnector";const za=v.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("flex-1 space-y-1 pt-1",e),...t}));za.displayName="TimelineContent";const Ba=v.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}));Ba.displayName="AppShell";const Oa=v.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})}));Oa.displayName="Sidebar";const Ha=v.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}));Ha.displayName="Header";const Ga=v.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}));Ga.displayName="Main";function em({title:e,value:t,description:n,trend:r,trendLabel:s,icon:a,className:i,...l}){return o.jsxs(Un,{className:x("overflow-hidden",i),...l,children:[o.jsxs(Yn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[o.jsx(Xn,{className:"text-sm font-medium text-muted-foreground",children:e}),a&&o.jsx("div",{className:"text-muted-foreground",children:a})]}),o.jsxs(Kn,{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(T.TrendingUp,{className:"mr-1 h-3 w-3"}):r<0?o.jsx(T.TrendingDown,{className:"mr-1 h-3 w-3"}):o.jsx(T.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 qa=v.forwardRef(({className:e,label:t,value:n,...r},s)=>{const[a,i]=v.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(ln,{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(pe,{size:"icon",variant:"outline",className:"shrink-0",onClick:l,children:a?o.jsx(T.Check,{className:"h-4 w-4 text-green-500"}):o.jsx(T.Copy,{className:"h-4 w-4"})})]})]})});qa.displayName="CopyInput";const Wa=v.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)}));Wa.displayName="JsonViewer";const tm=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 nm({className:e,status:t,dot:n=!0,children:r,...s}){return o.jsxs("div",{className:x(tm({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 rm({className:e}){const{setTheme:t}=dn(),n=Y();return o.jsxs(cs,{children:[o.jsx(us,{asChild:!0,children:o.jsxs(pe,{variant:"outline",size:"icon",className:e,children:[o.jsx(T.Sun,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),o.jsx(T.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:n.modeToggle_toggleTheme})]})}),o.jsxs(cr,{align:"end",children:[o.jsxs(kt,{onClick:()=>t("light"),children:[o.jsx(T.Sun,{className:"mr-2 h-4 w-4"}),n.modeToggle_light]}),o.jsxs(kt,{onClick:()=>t("dark"),children:[o.jsx(T.Moon,{className:"mr-2 h-4 w-4"}),n.modeToggle_dark]}),o.jsxs(kt,{onClick:()=>t("system"),children:[o.jsx(T.Monitor,{className:"mr-2 h-4 w-4"}),n.modeToggle_system]})]})]})}const om=[{value:"light",icon:T.Sun,key:"modeToggle_light"},{value:"dark",icon:T.Moon,key:"modeToggle_dark"},{value:"system",icon:T.Monitor,key:"modeToggle_system"}];function sm({className:e}){const{theme:t,setTheme:n,themes:r}=dn(),s=Y();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":s.modeToggle_colorTheme,children:om.filter(a=>r.includes(a.value)).map(({value:a,icon:i,key:l})=>{const c=s[l];return o.jsxs("button",{role:"radio","aria-checked":t===a,"aria-label":c,onClick:()=>n(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",t===a?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-background/50"),children:[o.jsx(i,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:c})]},a)})})}const Ua=v.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}));Ua.displayName="ChatBubble";const Ya=v.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??"?"})}));Ya.displayName="ChatBubbleAvatar";const am={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"})]})},Xa=v.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:am[r]})]})}));Xa.displayName="ChatBubbleMessage";const Ka=v.forwardRef(({className:e,...t},n)=>o.jsx("span",{ref:n,className:x("text-[10px] text-muted-foreground mt-1 px-1",e),...t}));Ka.displayName="ChatBubbleTimestamp";const Za=v.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}));Za.displayName="ChatBubbleActions";const Ja=v.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 h=Y(),y=v.useRef(null),b=v.useRef(null),[w,N]=v.useState(""),R=c!==void 0,_=R?c:w,S=M=>{R?d==null||d(M):N(M)},k=()=>{const M=y.current;M&&(M.style.height="auto",M.style.height=Math.min(M.scrollHeight,160)+"px")},C=()=>{const M=_.trim();!M||n||r||(e==null||e(M),S(""),y.current&&(y.current.style.height="auto"))},F=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 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":h.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:b,type:"file",multiple:!0,accept:i,onChange:E,className:"hidden","aria-hidden":"true"})]}),o.jsx("textarea",{ref:y,value:_,onChange:M=>{S(M.target.value),k()},onKeyDown:F,placeholder:t??h.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":h.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:C,disabled:n||r||!_.trim()||Q,className:x("flex h-9 w-9 shrink-0 items-center justify-center rounded-lg transition-colors",_.trim()&&!n&&!r&&!Q?"bg-primary text-primary-foreground hover:bg-primary/90":"bg-muted text-muted-foreground cursor-not-allowed"),"aria-label":h.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",Q?"text-destructive font-medium":"text-muted-foreground"),children:[J,"/",f]})]})]})});Ja.displayName="ChatInput";const Qa=v.forwardRef(({className:e,children:t,...n},r)=>o.jsx("div",{ref:r,className:x("flex flex-col h-full",e),...n,children:t}));Qa.displayName="ChatContainer";const ei=v.forwardRef(({className:e,children:t,autoScroll:n=!0,...r},s)=>{const a=v.useRef(null),i=v.Children.count(t);return v.useEffect(()=>{n&&a.current&&a.current.scrollIntoView({behavior:"smooth"})},[i,n]),o.jsx(tr,{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})]})})});ei.displayName="ChatList";const ti=v.forwardRef(({className:e,variant:t="dots",text:n,...r},s)=>{const a=Y(),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]"})]})});ti.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 im(e){const t=e.split(`
|
|
33
|
+
*/function Or(e,t){return e?Vu(e)?b.createElement(e,t):e:null}function Vu(e){return $u(e)||typeof e=="function"||zu(e)}function $u(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function zu(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Bu(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=b.useState(()=>({current:Mu(t)})),[r,s]=b.useState(()=>n.current.initialState);return n.current.setOptions(a=>({...a,...e,state:{...r,...e.state},onStateChange:i=>{s(i),e.onStateChange==null||e.onStateChange(i)}})),n.current}function Ou({columns:e,data:t,searchKey:n,searchPlaceholder:r,pageSize:s=10}){var w,v;const a=X(),i=r??a.dataTable_searchPlaceholder,[l,c]=b.useState([]),[d,g]=b.useState([]),[u,m]=b.useState({}),[f,p]=b.useState({}),h=Bu({data:t,columns:e,onSortingChange:c,onColumnFiltersChange:g,getCoreRowModel:Pu(),getPaginationRowModel:Au(),getSortedRowModel:Eu(),getFilteredRowModel:Fu(),onColumnVisibilityChange:m,onRowSelectionChange:p,state:{sorting:l,columnFilters:d,columnVisibility:u,rowSelection:f},initialState:{pagination:{pageSize:s}}});return o.jsxs("div",{className:"space-y-4",children:[n&&o.jsx("div",{className:"flex items-center gap-2",children:o.jsx(Je,{placeholder:i,value:((w=h.getColumn(n))==null?void 0:w.getFilterValue())??"",onChange:y=>{var C;return(C=h.getColumn(n))==null?void 0:C.setFilterValue(y.target.value)},className:"max-w-sm"})}),o.jsx("div",{className:"rounded-md border",children:o.jsxs(Zn,{children:[o.jsx(Jn,{children:h.getHeaderGroups().map(y=>o.jsx(St,{children:y.headers.map(C=>o.jsx(er,{children:C.isPlaceholder?null:Or(C.column.columnDef.header,C.getContext())},C.id))},y.id))}),o.jsx(Qn,{children:(v=h.getRowModel().rows)!=null&&v.length?h.getRowModel().rows.map(y=>o.jsx(St,{"data-state":y.getIsSelected()&&"selected",children:y.getVisibleCells().map(C=>o.jsx(nn,{children:Or(C.column.columnDef.cell,C.getContext())},C.id))},y.id)):o.jsx(St,{children:o.jsx(nn,{colSpan:e.length,className:"h-24 text-center",children:a.dataTable_noResults})})})]})}),o.jsxs("div",{className:"flex items-center justify-between px-2",children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:Be(a.dataTable_pageOf,{page:h.getState().pagination.pageIndex+1,total:h.getPageCount()})}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsxs(pe,{variant:"outline",size:"sm",onClick:()=>h.previousPage(),disabled:!h.getCanPreviousPage(),children:[o.jsx(_.ChevronLeft,{className:"h-4 w-4"}),a.dataTable_previous]}),o.jsxs(pe,{variant:"outline",size:"sm",onClick:()=>h.nextPage(),disabled:!h.getCanNextPage(),children:[a.dataTable_next,o.jsx(_.ChevronRight,{className:"h-4 w-4"})]})]})]})]})}function Hu({column:e,title:t,className:n}){return e.getCanSort()?o.jsxs(pe,{variant:"ghost",size:"sm",className:x("-ml-3 h-8",n),onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:[t,o.jsx(_.ArrowUpDown,{className:"ml-2 h-4 w-4"})]}):o.jsx("div",{className:x(n),children:t})}const Gu=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"]),qu=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 Wu(e,t){const n=e.split(`
|
|
34
|
+
`),r=t==="css"||t==="scss"||t==="less",s=t==="html"||t==="xml"||t==="svg",a=t==="json",i=t==="bash"||t==="sh"||t==="shell"||t==="zsh";return n.map(l=>{const c=[];let d=0;const g=l.length*4;let u=0;for(;d<l.length&&u++<g;){if(!r&&!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 m=l.indexOf("*/",d+2);m!==-1?(c.push({type:"comment",value:l.slice(d,m+2)}),d=m+2):(c.push({type:"comment",value:l.slice(d)}),d=l.length);continue}if(l[d]==="`"){let m=d+1;for(;m<l.length&&l[m]!=="`";)l[m]==="\\"&&m++,m++;c.push({type:"string",value:l.slice(d,m+1)}),d=m+1;continue}if(l[d]==='"'||l[d]==="'"){const m=l[d];let f=d+1;for(;f<l.length&&l[f]!==m;)l[f]==="\\"&&f++,f++;c.push({type:"string",value:l.slice(d,f+1)}),d=f+1;continue}if(/[0-9]/.test(l[d])&&(d===0||/[\s,\(\[:=+\-*/<>!&|^~?{]/.test(l[d-1]))){let m=d;for(;m<l.length&&/[0-9a-fA-FxXoObB._eE+\-n]/.test(l[m]);)m++;c.push({type:"number",value:l.slice(d,m)}),d=m;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 m=l[d+1]==="/";let f=m?d+2:d+1;for(;f<l.length&&/[a-zA-Z0-9.\-_]/.test(l[f]);)f++;c.push({type:"punctuation",value:l[d]+(m?"/":"")});const p=l.slice(m?d+2:d+1,f);p&&c.push({type:"tag",value:p}),d=f;continue}if(l[d]===">"){c.push({type:"punctuation",value:">"}),d++;continue}if(/[a-zA-Z_$@]/.test(l[d])){let m=d;for(;m<l.length&&/[a-zA-Z0-9_$@\-]/.test(l[m]);)m++;m===d&&m++;const f=l.slice(d,m);if(r&&qu.has(f))c.push({type:"keyword",value:f});else if(s||r){const p=l.slice(m).trimStart();p[0]==="="||p[0]===":"?c.push({type:"attr",value:f}):c.push({type:"plain",value:f})}else Gu.has(f)?c.push({type:"keyword",value:f}):!a&&l[m]==="("?c.push({type:"function",value:f}):!a&&/^[A-Z]/.test(f)?c.push({type:"tag",value:f}):c.push({type:"plain",value:f});d=m;continue}if(/[=+\-*/%<>!&|^~?:]/.test(l[d])){let m=d;for(;m<l.length&&/[=+\-*/%<>!&|^~?:]/.test(l[m]);)m++;c.push({type:"operator",value:l.slice(d,m)}),d=m;continue}if(/[{}()\[\],;.]/.test(l[d])){c.push({type:"punctuation",value:l[d]}),d++;continue}if(/\s/.test(l[d])){let m=d;for(;m<l.length&&/\s/.test(l[m]);)m++;c.push({type:"plain",value:l.slice(d,m)}),d=m;continue}c.push({type:"plain",value:l[d]}),d++}return c})}const Uu={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 Yu({code:e,language:t="tsx",showLineNumbers:n=!1,showCopy:r=!0,className:s}){const a=X(),[i,l]=b.useState(!1),c=e.trim(),d=b.useMemo(()=>{try{return Wu(c,t)}catch{return c.split(`
|
|
35
|
+
`).map(u=>[{type:"plain",value:u}])}},[c,t]),g=async()=>{try{await navigator.clipboard.writeText(c),l(!0),setTimeout(()=>l(!1),2e3)}catch{}};return o.jsxs("div",{className:x("relative group",s),children:[r&&o.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?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:d.map((u,m)=>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:m+1}),u.map((f,p)=>o.jsx("span",{style:{color:Uu[f.type]},children:f.value},p))]},m))})]})}const Fa=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 Xu({className:e,level:t=2,as:n,children:r,...s}){const a=n||`h${t}`;return o.jsx(a,{className:x(Fa({level:t}),e),...s,children:r})}const Aa=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 Ku({className:e,size:t,weight:n,variant:r,leading:s,as:a="p",children:i,...l}){return o.jsx(a,{className:x(Aa({size:t,weight:n,variant:r,leading:s}),e),...l,children:i})}function Zu({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 Ju({className:e,...t}){return o.jsx("blockquote",{className:x("border-l-4 border-primary pl-4 italic text-muted-foreground",e),...t})}function Qu({className:e,...t}){return o.jsx("p",{className:x("text-xl text-muted-foreground",e),...t})}function em({className:e,...t}){return o.jsx("p",{className:x("text-sm text-muted-foreground",e),...t})}const Ea=b.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($n.ResponsiveContainer,{width:"100%",height:"100%",children:t})}));Ea.displayName="ChartContainer";const tm=$n.Tooltip,nm=$n.Legend,Va=b.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("flex flex-col space-y-4",e),...t}));Va.displayName="Timeline";const $a=b.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("relative flex gap-4 pb-4 last:pb-0",e),...t}));$a.displayName="TimelineItem";const za=b.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}));za.displayName="TimelineIcon";const Ba=b.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}));Ba.displayName="TimelineConnector";const Oa=b.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("flex-1 space-y-1 pt-1",e),...t}));Oa.displayName="TimelineContent";const Ha=b.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}));Ha.displayName="AppShell";const Ga=b.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})}));Ga.displayName="Sidebar";const qa=b.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}));qa.displayName="Header";const Wa=b.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}));Wa.displayName="Main";function rm({title:e,value:t,description:n,trend:r,trendLabel:s,icon:a,className:i,...l}){return o.jsxs(Un,{className:x("overflow-hidden",i),...l,children:[o.jsxs(Yn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[o.jsx(Xn,{className:"text-sm font-medium text-muted-foreground",children:e}),a&&o.jsx("div",{className:"text-muted-foreground",children:a})]}),o.jsxs(Kn,{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(_.TrendingUp,{className:"mr-1 h-3 w-3"}):r<0?o.jsx(_.TrendingDown,{className:"mr-1 h-3 w-3"}):o.jsx(_.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 Ua=b.forwardRef(({className:e,label:t,value:n,...r},s)=>{const[a,i]=b.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(ln,{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(pe,{size:"icon",variant:"outline",className:"shrink-0",onClick:l,children:a?o.jsx(_.Check,{className:"h-4 w-4 text-green-500"}):o.jsx(_.Copy,{className:"h-4 w-4"})})]})]})});Ua.displayName="CopyInput";const Ya=b.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)}));Ya.displayName="JsonViewer";const om=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 sm({className:e,status:t,dot:n=!0,children:r,...s}){return o.jsxs("div",{className:x(om({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 am({className:e}){const{setTheme:t}=dn(),n=X();return o.jsxs(ms,{children:[o.jsx(fs,{asChild:!0,children:o.jsxs(pe,{variant:"outline",size:"icon",className:e,children:[o.jsx(_.Sun,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),o.jsx(_.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:n.modeToggle_toggleTheme})]})}),o.jsxs(cr,{align:"end",children:[o.jsxs(kt,{onClick:()=>t("light"),children:[o.jsx(_.Sun,{className:"mr-2 h-4 w-4"}),n.modeToggle_light]}),o.jsxs(kt,{onClick:()=>t("dark"),children:[o.jsx(_.Moon,{className:"mr-2 h-4 w-4"}),n.modeToggle_dark]}),o.jsxs(kt,{onClick:()=>t("system"),children:[o.jsx(_.Monitor,{className:"mr-2 h-4 w-4"}),n.modeToggle_system]})]})]})}const im=[{value:"light",icon:_.Sun,key:"modeToggle_light"},{value:"dark",icon:_.Moon,key:"modeToggle_dark"},{value:"system",icon:_.Monitor,key:"modeToggle_system"}];function lm({className:e}){const{theme:t,setTheme:n,themes:r}=dn(),s=X();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":s.modeToggle_colorTheme,children:im.filter(a=>r.includes(a.value)).map(({value:a,icon:i,key:l})=>{const c=s[l];return o.jsxs("button",{role:"radio","aria-checked":t===a,"aria-label":c,onClick:()=>n(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",t===a?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-background/50"),children:[o.jsx(i,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:c})]},a)})})}const Xa=b.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}));Xa.displayName="ChatBubble";const Ka=b.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??"?"})}));Ka.displayName="ChatBubbleAvatar";const dm={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"})]})},Za=b.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:dm[r]})]})}));Za.displayName="ChatBubbleMessage";const Ja=b.forwardRef(({className:e,...t},n)=>o.jsx("span",{ref:n,className:x("text-[10px] text-muted-foreground mt-1 px-1",e),...t}));Ja.displayName="ChatBubbleTimestamp";const Qa=b.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}));Qa.displayName="ChatBubbleActions";const ei=b.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:m,className:f},p)=>{const h=X(),w=b.useRef(null),v=b.useRef(null),[y,C]=b.useState(""),k=c!==void 0,M=k?c:y,S=P=>{k?d==null||d(P):C(P)},R=()=>{const P=w.current;P&&(P.style.height="auto",P.style.height=Math.min(P.scrollHeight,160)+"px")},N=()=>{const P=M.trim();!P||n||r||(e==null||e(P),S(""),w.current&&(w.current.style.height="auto"))},F=P=>{P.key==="Enter"&&!P.shiftKey&&(P.preventDefault(),N())},G=()=>{var P;(P=v.current)==null||P.click()},E=P=>{P.target.files&&P.target.files.length>0&&(a==null||a(P.target.files)),P.target.value=""},J=M.length,Q=m?J>m:!1;return o.jsxs("div",{ref:p,className:x("rounded-xl border border-border bg-background",f),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":h.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:v,type:"file",multiple:!0,accept:i,onChange:E,className:"hidden","aria-hidden":"true"})]}),o.jsx("textarea",{ref:w,value:M,onChange:P=>{S(P.target.value),R()},onKeyDown:F,placeholder:t??h.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":h.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||!M.trim()||Q,className:x("flex h-9 w-9 shrink-0 items-center justify-center rounded-lg transition-colors",M.trim()&&!n&&!r&&!Q?"bg-primary text-primary-foreground hover:bg-primary/90":"bg-muted text-muted-foreground cursor-not-allowed"),"aria-label":h.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||m)&&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}),m&&o.jsxs("span",{className:x("text-[10px] tabular-nums shrink-0",Q?"text-destructive font-medium":"text-muted-foreground"),children:[J,"/",m]})]})]})});ei.displayName="ChatInput";const ti=b.forwardRef(({className:e,children:t,...n},r)=>o.jsx("div",{ref:r,className:x("flex flex-col h-full",e),...n,children:t}));ti.displayName="ChatContainer";const ni=b.forwardRef(({className:e,children:t,autoScroll:n=!0,...r},s)=>{const a=b.useRef(null),i=b.Children.count(t);return b.useEffect(()=>{n&&a.current&&a.current.scrollIntoView({behavior:"smooth"})},[i,n]),o.jsx(tr,{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})]})})});ni.displayName="ChatList";const ri=b.forwardRef(({className:e,variant:t="dots",text:n,...r},s)=>{const a=X(),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]"})]})});ri.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 cm(e){const t=e.split(`
|
|
36
36
|
`),n=[];let r=0,s=0;for(;r<t.length;){const a=t[r];if(a.trimStart().startsWith("```")){const l=a.trimStart().slice(3).trim(),c=[];for(r++;r<t.length&&!t[r].trimStart().startsWith("```");)c.push(t[r]),r++;r++,n.push(o.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:o.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"};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 ni=v.forwardRef(({content:e,streaming:t,className:n,...r},s)=>{const a=t?e:e.trim(),i=v.useMemo(()=>{try{return im(a)}catch{return[v.createElement("p",{className:"text-sm"},a)]}},[a]);return o.jsx("div",{ref:s,className:x("markdown-renderer",n),...r,children:i})});ni.displayName="MarkdownRenderer";const ri=v.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))})});ri.displayName="PromptSuggestions";const oi=v.forwardRef(({models:e,value:t,onChange:n,placeholder:r,compact:s,className:a,...i},l)=>{const c=Y(),[d,g]=v.useState(!1),[u,f]=v.useState(""),m=v.useRef(null),p=v.useRef(null),h=e.find(w=>w.id===t),y=v.useMemo(()=>{if(!u)return e;const w=u.toLowerCase();return e.filter(N=>{var R;return N.name.toLowerCase().includes(w)||((R=N.provider)==null?void 0:R.toLowerCase().includes(w))||N.id.toLowerCase().includes(w)})},[e,u]);v.useEffect(()=>{d&&(f(""),setTimeout(()=>{var w;return(w=p.current)==null?void 0:w.focus()},0))},[d]),v.useEffect(()=>{if(!d)return;const w=N=>{m.current&&!m.current.contains(N.target)&&g(!1)};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[d]);const b=w=>{w.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(w=>!w),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?o.jsxs(o.Fragment,{children:[h.icon&&o.jsx("span",{className:"text-base shrink-0",children:h.icon}),o.jsx("span",{className:"font-medium truncate",children:h.name}),!s&&h.provider&&o.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",h.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:b,children:[o.jsx("div",{className:"p-2 border-b border-border",children:o.jsx("input",{ref:p,value:u,onChange:w=>f(w.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:[y.length===0&&o.jsx("div",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:c.modelSelector_noResults}),y.map(w=>o.jsxs("button",{type:"button",disabled:w.disabled,onClick:()=>{n==null||n(w.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",w.id===t&&"bg-primary/10",w.disabled&&"opacity-50 cursor-not-allowed"),children:[w.icon&&o.jsx("span",{className:"text-lg shrink-0 mt-0.5",children:w.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:w.name}),w.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"})})]}),w.provider&&o.jsx("span",{className:"text-xs text-muted-foreground",children:w.provider}),w.description&&o.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 line-clamp-2",children:w.description}),w.badges&&w.badges.length>0&&o.jsx("div",{className:"flex flex-wrap gap-1 mt-1.5",children:w.badges.map(N=>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:N},N))})]})]},w.id))]})]})]})});oi.displayName="ModelSelector";const si=v.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)})}));si.displayName="ChatModeSelector";const ai=v.forwardRef(({question:e,options:t,onSelect:n,selected:r,allowFreeText:s,onFreeTextSubmit:a,columns:i=1,className:l,...c},d)=>{const g=Y(),[u,f]=v.useState(""),m=!!r,p=()=>{const h=u.trim();h&&(a==null||a(h),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(h=>{const y=h.id===r;return o.jsxs("button",{type:"button",disabled:m,onClick:()=>n==null?void 0:n(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",y?"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:[y&&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"})}),!y&&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:h.label}),h.description&&o.jsx("span",{className:"block text-xs text-muted-foreground mt-0.5 line-clamp-1",children:h.description})]})]},h.id)})}),s&&!m&&o.jsxs("div",{className:"flex gap-2 mt-2",children:[o.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"}),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})]})]})});ai.displayName="ChatFollowUp";const ii=v.forwardRef(({id:e,question:t,options:n,onSelect:r,selectedId:s,disabled:a=!1,allowFreeText:i,onFreeTextSubmit:l,columns:c=1,className:d,...g},u)=>{const f=Y(),[m,p]=v.useState(""),h=a||!!s,y=(w,N)=>{h||r==null||r(w,N)},b=()=>{const w=m.trim();!w||h||(l==null||l(w),p(""))};return o.jsxs("div",{ref:u,"data-question-id":e,className:x("rounded-xl border border-border bg-gradient-to-br from-muted/50 to-muted/30","backdrop-blur-sm overflow-hidden shadow-sm animate-in slide-in-from-bottom-2 duration-300","max-w-[85%]",d),...g,children:[o.jsx("div",{className:"px-4 py-3 bg-gradient-to-r from-primary/10 to-primary/5 border-b border-border/50",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"p-1.5 rounded-lg bg-primary/20 text-primary",children:o.jsx(T.HelpCircle,{className:"w-4 h-4"})}),o.jsx("p",{className:"text-sm font-semibold text-foreground",children:t})]})}),o.jsxs("div",{className:"p-3",children:[o.jsx("div",{className:x("grid gap-2",c===2?"grid-cols-1 sm:grid-cols-2":"grid-cols-1"),children:n.map(w=>{const N=w.id===s;return o.jsxs("button",{type:"button",disabled:h,onClick:()=>y(w.id,w.label),className:x("group flex items-center gap-3 w-full p-3 rounded-lg border transition-all duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",N?"border-primary bg-primary/10 shadow-md":h?"border-border/50 text-muted-foreground opacity-50 cursor-not-allowed":"border-border bg-background/80 hover:bg-background hover:border-primary/50 hover:shadow-md hover:scale-[1.01] active:scale-[0.99] cursor-pointer"),children:[N?o.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-primary flex items-center justify-center",children:o.jsx(T.Check,{className:"w-3.5 h-3.5 text-primary-foreground"})}):o.jsx("div",{className:x("flex-shrink-0 w-5 h-5 rounded-full border-2 transition-colors",h?"border-border/50":"border-border group-hover:border-primary/50")}),o.jsxs("div",{className:"flex-1 text-left min-w-0",children:[o.jsx("div",{className:x("font-medium text-sm transition-colors",N?"text-primary":"text-foreground"),children:w.label}),w.description&&o.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 line-clamp-2",children:w.description})]})]},w.id)})}),i&&!h&&o.jsxs("div",{className:"flex gap-2 mt-3 pt-3 border-t border-border/50",children:[o.jsx("input",{type:"text",value:m,onChange:w=>p(w.target.value),onKeyDown:w=>{w.key==="Enter"&&b()},placeholder:f.followUp_freeTextPlaceholder||"Or type your answer...",className:"flex-1 bg-background rounded-lg border border-border px-3 py-2 text-sm outline-none placeholder:text-muted-foreground focus:border-primary transition-colors"}),o.jsx("button",{type:"button",onClick:b,disabled:!m.trim(),className:x("rounded-lg px-3 py-2 flex items-center justify-center transition-all",m.trim()?"bg-primary text-primary-foreground hover:bg-primary/90 cursor-pointer":"bg-muted text-muted-foreground cursor-not-allowed opacity-50"),children:o.jsx(T.Send,{className:"w-4 h-4"})})]})]})]})});ii.displayName="ChatQuestion";const li=v.forwardRef(({type:e="info",title:t,description:n,icon:r,action:s,dismissible:a=!1,onDismiss:i,className:l,...c},d)=>{const[g,u]=v.useState(!1),f=()=>{u(!0),setTimeout(()=>i==null?void 0:i(),200)},m=r||(e==="success"?T.CheckCircle2:e==="warning"?T.AlertTriangle:T.Info),h={success:{border:"border-green-500/30",gradient:"from-green-500/10 to-green-500/5",iconBg:"bg-green-500/20 text-green-600 dark:text-green-400",titleColor:"text-green-900 dark:text-green-100"},info:{border:"border-blue-500/30",gradient:"from-blue-500/10 to-blue-500/5",iconBg:"bg-blue-500/20 text-blue-600 dark:text-blue-400",titleColor:"text-blue-900 dark:text-blue-100"},warning:{border:"border-orange-500/30",gradient:"from-orange-500/10 to-orange-500/5",iconBg:"bg-orange-500/20 text-orange-600 dark:text-orange-400",titleColor:"text-orange-900 dark:text-orange-100"}}[e];return g?null:o.jsx("div",{ref:d,className:x("rounded-xl border bg-gradient-to-br backdrop-blur-sm overflow-hidden","shadow-sm animate-in slide-in-from-bottom-2 duration-300","max-w-[85%]",h.border,h.gradient,g&&"animate-out slide-out-to-bottom-2",l),...c,children:o.jsxs("div",{className:"flex items-start gap-3 p-4",children:[o.jsx("div",{className:x("p-2 rounded-lg flex-shrink-0",h.iconBg),children:o.jsx(m,{className:"w-5 h-5"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h4",{className:x("text-sm font-semibold",h.titleColor),children:t}),n&&o.jsx("p",{className:"text-sm text-muted-foreground mt-0.5",children:n})]}),s&&o.jsxs("button",{type:"button",onClick:s.onClick,className:x("flex items-center gap-1 px-3 py-1.5 rounded-lg text-sm font-medium","transition-all hover:scale-105 active:scale-95","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",e==="success"&&"bg-green-500 hover:bg-green-600 text-white",e==="info"&&"bg-blue-500 hover:bg-blue-600 text-white",e==="warning"&&"bg-orange-500 hover:bg-orange-600 text-white"),children:[s.label,o.jsx(T.ChevronRight,{className:"w-3.5 h-3.5"})]}),a&&o.jsx("button",{type:"button",onClick:f,className:"flex-shrink-0 p-1 rounded-md hover:bg-muted/50 text-muted-foreground hover:text-foreground transition-colors","aria-label":"Dismiss",children:o.jsx(T.X,{className:"w-4 h-4"})})]})})});li.displayName="ChatActionCard";const di=v.forwardRef(({type:e,title:t,id:n,status:r,properties:s,link:a,icon:i,onNavigate:l,className:c,...d},g)=>{const u=i||(e==="task"?T.CheckSquare:e==="project"?T.FolderKanban:T.FileText),f={task:"text-blue-600 dark:text-blue-400 bg-blue-500/10",project:"text-purple-600 dark:text-purple-400 bg-purple-500/10",file:"text-orange-600 dark:text-orange-400 bg-orange-500/10",custom:"text-primary bg-primary/10"},m=f[e]||f.custom,p=()=>{a?window.location.href=a:l==null||l()},h=!!(a||l);return o.jsxs("div",{ref:g,role:h?"button":void 0,tabIndex:h?0:void 0,onClick:h?p:void 0,onKeyDown:h?y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),p())}:void 0,className:x("rounded-xl border border-border bg-gradient-to-br from-muted/30 to-background","overflow-hidden shadow-sm animate-in slide-in-from-bottom-2 duration-300","max-w-[85%]",h&&"cursor-pointer hover:border-primary/40 hover:shadow-md transition-all hover:scale-[1.01] active:scale-[0.99]",c),...d,children:[o.jsxs("div",{className:"flex items-start gap-3 p-4",children:[o.jsx("div",{className:x("p-2 rounded-lg flex-shrink-0",m),children:o.jsx(u,{className:"w-5 h-5"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[o.jsx("h4",{className:"text-sm font-semibold text-foreground truncate",children:t}),n&&o.jsx("span",{className:"px-2 py-0.5 rounded-md bg-muted text-xs font-mono text-muted-foreground",children:n})]}),r&&o.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:r})]}),h&&o.jsx(T.ExternalLink,{className:"w-4 h-4 text-muted-foreground flex-shrink-0 opacity-60"})]}),s&&Object.keys(s).length>0&&o.jsx("div",{className:"px-4 pb-4",children:o.jsx("div",{className:"rounded-lg bg-muted/50 p-3 space-y-2",children:Object.entries(s).map(([y,b])=>o.jsxs("div",{className:"flex items-start justify-between gap-3 text-xs",children:[o.jsx("span",{className:"text-muted-foreground font-medium",children:y}),o.jsx("span",{className:"text-foreground text-right break-all",children:b})]},y))})})]})});di.displayName="ChatEntityPreview";const lm={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"}},ci=v.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=Y(),[p,h]=v.useState(!1),y={copy:m.messageActions_copy,retry:m.messageActions_retry,edit:m.messageActions_edit,like:m.messageActions_like,dislike:m.messageActions_dislike,share:m.messageActions_share},w={copy:async()=>{if(t)try{await navigator.clipboard.writeText(t),h(!0),setTimeout(()=>h(!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(N=>{const R=N==="copy"&&p,k=N==="like"&&n==="liked"||N==="dislike"&&n==="disliked";return o.jsx("button",{type:"button",onClick:w[N],"aria-label":y[N],title:R?m.messageActions_copied:y[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?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:lm[N].path})})},N)})})});ci.displayName="MessageActions";const ui=v.forwardRef(({text:e,speed:t=2,onComplete:n,cursor:r=!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 y=Math.min(p.current+t,e.length);p.current=y,d(e.slice(0,y)),y>=e.length?(u(!0),n==null||n()):m.current=requestAnimationFrame(h)};return m.current=requestAnimationFrame(h),()=>{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"})]})});ui.displayName="StreamingText";const mi=v.forwardRef(({content:e,isThinking:t,duration:n,defaultOpen:r=!1,title:s,className:a,...i},l)=>{const c=Y(),[d,g]=v.useState(r||t===!0),[u,f]=v.useState(n??0),m=v.useRef(Date.now());v.useEffect(()=>{t&&g(!0)},[t]),v.useEffect(()=>{if(!t)return;m.current=Date.now();const y=setInterval(()=>{f(Math.floor((Date.now()-m.current)/1e3))},1e3);return()=>clearInterval(y)},[t]);const p=t?u:n??u,h=y=>y<60?`${y}s`:`${Math.floor(y/60)}m ${y%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(y=>!y),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?`${h(p)}...`:Be(c.reasoning_thoughtFor,{duration:h(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"})]})})})]})});mi.displayName="ReasoningBlock";const fi=v.forwardRef(({name:e,args:t,result:n,status:r,error:s,defaultOpen:a=!1,className:i,...l},c)=>{const d=Y(),[g,u]=v.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:Be(d.toolCall_calling,{name:e}),success:e,error:Be(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})]})]})]})});fi.displayName="ChatToolCall";function dm(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 gi=v.forwardRef(({conversations:e,activeId:t,onSelect:n,onNew:r,onDelete:s,onRename:a,showSearch:i=!0,className:l,...c},d)=>{const g=Y(),[u,f]=v.useState(""),[m,p]=v.useState(null),[h,y]=v.useState(""),b=v.useRef(null),w=v.useMemo(()=>{if(!u)return e;const k=u.toLowerCase();return e.filter(C=>{var F;return C.title.toLowerCase().includes(k)||((F=C.lastMessage)==null?void 0:F.toLowerCase().includes(k))})},[e,u]),N=[g.conversationList_today,g.conversationList_yesterday,g.conversationList_previous7Days,g.conversationList_older],R=v.useMemo(()=>dm(w,N),[w,N]),_=k=>{p(k.id),y(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 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:[R.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}),R.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(C=>{const F=C.id===t,G=C.id===m;return o.jsxs("div",{className:x("group flex items-center gap-2 rounded-lg px-2 py-2 cursor-pointer transition-colors",F?"bg-primary/10":"hover:bg-muted"),onClick:()=>!G&&(n==null?void 0:n(C.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:b,value:h,onChange:E=>y(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()}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"text-sm truncate font-medium",children:C.title}),C.lastMessage&&o.jsx("div",{className:"text-xs text-muted-foreground truncate",children:C.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(),_(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: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(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: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"})]})})]})]},C.id)})]},k.label))]})]})});gi.displayName="ConversationList";const cm={online:"bg-green-500",offline:"bg-muted-foreground/40",typing:"bg-primary animate-pulse"},pi=v.forwardRef(({title:e,model:t,modelIcon:n,status:r,onClear:s,onSettings:a,onBack:i,children:l,className:c,...d},g)=>{const u=Y(),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",cm[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"})]})})]})]})});pi.displayName="ChatHeader";const Cr=v.forwardRef(({citation:e,className:t,...n},r)=>{const[s,a]=v.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 hi=v.forwardRef(({citations:e,variant:t="footer",className:n,...r},s)=>{const a=Y();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))]})});hi.displayName="SourceCitation";function Hr(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Gr(e){return e.startsWith("image/")}function qr(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 xi=v.forwardRef(({files:e,onRemove:t,variant:n="compact",className:r,...s},a)=>{const i=Y();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:[Gr(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:qr(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:Hr(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":Be(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:[Gr(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:qr(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:Hr(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":Be(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))})});xi.displayName="FilePreview";const um={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"})]})},vi=v.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:h,followUp:y,onFollowUpSelect:b,onFollowUpFreeText:w,reasoning:N,toolCalls:R,citations:_,className:S,...k},C)=>{const F=Y(),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 o.jsxs("div",{ref:C,className:x("group flex gap-2 max-w-[85%]",G?"ml-auto flex-row-reverse":"mr-auto",S),...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:[N&&o.jsx("div",{className:x("rounded-xl border border-border/60 overflow-hidden",N.isThinking&&"border-primary/30"),children:o.jsx(mm,{...N})}),R==null?void 0:R.map((M,K)=>o.jsx(fm,{...M},K)),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,_&&_.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:F.sourceCitation_sources}),_.map(M=>o.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:[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:M.index}),o.jsx("span",{className:"truncate",children:M.title})]},M.index))]})]}),y&&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:y.question}),o.jsx("div",{className:"grid gap-1.5",children:y.options.map(M=>{const K=M.id===y.selected,V=!!y.selected;return o.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",K?"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:[K?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:M.label})]},M.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&&um[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(M=>{const K=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:F.messageActions_copy,retry:F.messageActions_retry,edit:F.messageActions_edit,like:F.messageActions_like,dislike:F.messageActions_dislike,share:F.messageActions_share};return o.jsx("button",{type:"button",onClick:V[M],title:K?F.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",K&&"text-green-500"),children:K?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"})}):M==="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"})]}):M==="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"})]}):M==="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"})}):M==="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"})}):M==="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"})]})},M)})})]})]})});vi.displayName="ChatMessage";function mm({content:e,isThinking:t,duration:n}){const r=Y(),[s,a]=v.useState(t===!0),[i,l]=v.useState(n??0);v.useEffect(()=>{t&&a(!0)},[t]),v.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...`:Be(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 fm({name:e,args:t,result:n,status:r,error:s}){const a=Y(),[i,l]=v.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"?Be(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=ti;exports.Accordion=td;exports.AccordionContent=Qo;exports.AccordionItem=Zo;exports.AccordionTrigger=Jo;exports.Alert=Rs;exports.AlertDescription=Ms;exports.AlertDialog=gd;exports.AlertDialogAction=As;exports.AlertDialogCancel=Es;exports.AlertDialogContent=Is;exports.AlertDialogDescription=Fs;exports.AlertDialogFooter=Ls;exports.AlertDialogHeader=Ts;exports.AlertDialogOverlay=mr;exports.AlertDialogPortal=Ps;exports.AlertDialogTitle=Ds;exports.AlertDialogTrigger=pd;exports.AlertTitle=_s;exports.AppShell=Ba;exports.AspectRatio=Zl;exports.Avatar=po;exports.AvatarFallback=xo;exports.AvatarImage=ho;exports.Badge=On;exports.Blockquote=Xu;exports.Box=Ao;exports.Breadcrumb=zs;exports.BreadcrumbEllipsis=Ws;exports.BreadcrumbItem=Os;exports.BreadcrumbLink=Hs;exports.BreadcrumbList=Bs;exports.BreadcrumbPage=Gs;exports.BreadcrumbSeparator=qs;exports.Button=pe;exports.Calendar=Wn;exports.Card=Un;exports.CardContent=Kn;exports.CardDescription=Go;exports.CardFooter=qo;exports.CardHeader=Yn;exports.CardTitle=Xn;exports.Carousel=ba;exports.CarouselContent=wa;exports.CarouselItem=ya;exports.CarouselNext=Ca;exports.CarouselPrevious=Na;exports.ChartContainer=Fa;exports.ChartLegend=Qu;exports.ChartTooltip=Ju;exports.ChatActionCard=li;exports.ChatBubble=Ua;exports.ChatBubbleActions=Za;exports.ChatBubbleAvatar=Ya;exports.ChatBubbleMessage=Xa;exports.ChatBubbleTimestamp=Ka;exports.ChatContainer=Qa;exports.ChatEntityPreview=di;exports.ChatFollowUp=ai;exports.ChatHeader=pi;exports.ChatInput=Ja;exports.ChatList=ei;exports.ChatMessage=vi;exports.ChatModeSelector=si;exports.ChatQuestion=ii;exports.ChatToolCall=fi;exports.Checkbox=vo;exports.CitationBadge=Cr;exports.Code=Yu;exports.CodeBlock=qu;exports.Collapsible=Jl;exports.CollapsibleContent=Oo;exports.CollapsibleTrigger=Ql;exports.ColorPicker=Xl;exports.Combobox=Hl;exports.Command=ur;exports.CommandDialog=md;exports.CommandEmpty=Ns;exports.CommandGroup=Cs;exports.CommandInput=ws;exports.CommandItem=Ss;exports.CommandList=ys;exports.CommandSeparator=js;exports.CommandShortcut=ks;exports.Container=Bo;exports.ContextMenu=ec;exports.ContextMenuCheckboxItem=da;exports.ContextMenuContent=ia;exports.ContextMenuGroup=nc;exports.ContextMenuItem=la;exports.ContextMenuLabel=ua;exports.ContextMenuPortal=rc;exports.ContextMenuRadioGroup=sc;exports.ContextMenuRadioItem=ca;exports.ContextMenuSeparator=ma;exports.ContextMenuShortcut=fa;exports.ContextMenuSub=oc;exports.ContextMenuSubContent=aa;exports.ContextMenuSubTrigger=sa;exports.ContextMenuTrigger=tc;exports.ConversationList=gi;exports.CopyInput=qa;exports.DataTable=$u;exports.DataTableColumnHeader=zu;exports.DatePicker=$l;exports.Dialog=es;exports.DialogClose=rd;exports.DialogContent=rr;exports.DialogDescription=ss;exports.DialogFooter=rs;exports.DialogHeader=ns;exports.DialogOverlay=nr;exports.DialogPortal=ts;exports.DialogTitle=os;exports.DialogTrigger=nd;exports.Drawer=as;exports.DrawerClose=ls;exports.DrawerContent=sr;exports.DrawerDescription=dr;exports.DrawerFooter=ir;exports.DrawerHeader=ar;exports.DrawerTitle=lr;exports.DrawerTrigger=is;exports.DropdownMenu=cs;exports.DropdownMenuCheckboxItem=gs;exports.DropdownMenuContent=cr;exports.DropdownMenuGroup=sd;exports.DropdownMenuItem=kt;exports.DropdownMenuLabel=hs;exports.DropdownMenuPortal=ad;exports.DropdownMenuRadioGroup=ld;exports.DropdownMenuRadioItem=ps;exports.DropdownMenuSeparator=xs;exports.DropdownMenuShortcut=vs;exports.DropdownMenuSub=id;exports.DropdownMenuSubContent=fs;exports.DropdownMenuSubTrigger=ms;exports.DropdownMenuTrigger=us;exports.EmptyState=Kd;exports.FilePreview=xi;exports.FileUpload=Wl;exports.Flex=Eo;exports.Grid=zo;exports.HStack=$o;exports.Header=Ha;exports.Heading=Wu;exports.HoverCard=ac;exports.HoverCardContent=ga;exports.HoverCardTrigger=ic;exports.Input=Je;exports.JsonViewer=Wa;exports.Label=ln;exports.Lead=Ku;exports.Main=Ga;exports.MarkdownRenderer=ni;exports.MessageActions=ci;exports.MetricCard=em;exports.ModeToggle=rm;exports.ModeToggleGroup=sm;exports.ModelSelector=oi;exports.MultiSelect=Gl;exports.Muted=Zu;exports.NUIProvider=Fo;exports.NavigationMenu=Qs;exports.NavigationMenuContent=ra;exports.NavigationMenuIndicator=oa;exports.NavigationMenuItem=Jd;exports.NavigationMenuLink=Qd;exports.NavigationMenuList=ea;exports.NavigationMenuTrigger=na;exports.NavigationMenuViewport=fr;exports.NumberInput=Bl;exports.OTPInput=ql;exports.Pagination=Us;exports.PaginationContent=Ys;exports.PaginationEllipsis=Js;exports.PaginationItem=Xs;exports.PaginationLink=cn;exports.PaginationNext=Zs;exports.PaginationPrevious=Ks;exports.Popover=ht;exports.PopoverContent=lt;exports.PopoverTrigger=xt;exports.Progress=Vs;exports.PromptSuggestions=ri;exports.RadioGroup=So;exports.RadioGroupItem=ko;exports.ReasoningBlock=mi;exports.ScrollArea=tr;exports.ScrollBar=rn;exports.Select=Dl;exports.SelectContent=yo;exports.SelectGroup=Fl;exports.SelectItem=Co;exports.SelectLabel=No;exports.SelectScrollDownButton=Gn;exports.SelectScrollUpButton=Hn;exports.SelectSeparator=jo;exports.SelectTrigger=wo;exports.SelectValue=Al;exports.Separator=go;exports.Sheet=as;exports.SheetClose=ls;exports.SheetContent=sr;exports.SheetDescription=dr;exports.SheetFooter=ir;exports.SheetHeader=ar;exports.SheetOverlay=or;exports.SheetPortal=ds;exports.SheetTitle=lr;exports.SheetTrigger=is;exports.Sidebar=Oa;exports.Skeleton=hd;exports.Slider=Ro;exports.SourceCitation=hi;exports.StatusBadge=nm;exports.Stepper=Zd;exports.StreamingText=ui;exports.Switch=bo;exports.Table=Zn;exports.TableBody=Qn;exports.TableCaption=Uo;exports.TableCell=nn;exports.TableFooter=Wo;exports.TableHead=er;exports.TableHeader=Jn;exports.TableRow=St;exports.Tabs=ed;exports.TabsContent=Ko;exports.TabsList=Yo;exports.TabsTrigger=Xo;exports.TagInput=Ol;exports.Text=Uu;exports.Textarea=mo;exports.ThemeProvider=Yd;exports.TimePicker=zl;exports.Timeline=Aa;exports.TimelineConnector=$a;exports.TimelineContent=za;exports.TimelineIcon=Va;exports.TimelineItem=Ea;exports.Toaster=Xd;exports.Toggle=_o;exports.ToggleGroup=Mo;exports.ToggleGroupItem=Io;exports.Tooltip=cd;exports.TooltipContent=bs;exports.TooltipProvider=dd;exports.TooltipTrigger=ud;exports.TranslateProvider=Fo;exports.VStack=Vo;exports.badgeVariants=fo;exports.buttonVariants=At;exports.cardVariants=Ho;exports.cn=x;exports.en=It;exports.headingVariants=La;exports.inputVariants=uo;exports.navigationMenuTriggerStyle=ta;exports.ru=To;exports.textVariants=Da;exports.toast=Ld;exports.toggleVariants=qn;exports.tpl=Be;exports.useLocale=Vl;exports.useNUILocale=Y;exports.useTheme=dn;exports.useTranslate=Y;
|
|
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(m=>m.trim()).filter((m,f,p)=>f>0&&f<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,m)=>o.jsx("th",{className:"px-3 py-2 text-left font-semibold text-foreground",children:rt(u)},m))})}),o.jsx("tbody",{children:g.map((u,m)=>o.jsx("tr",{className:"border-b border-border/50",children:u.map((f,p)=>o.jsx("td",{className:"px-3 py-2 text-muted-foreground",children:rt(f)},p))},m))})]})},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 oi=b.forwardRef(({content:e,streaming:t,className:n,...r},s)=>{const a=t?e:e.trim(),i=b.useMemo(()=>{try{return cm(a)}catch{return[b.createElement("p",{className:"text-sm"},a)]}},[a]);return o.jsx("div",{ref:s,className:x("markdown-renderer",n),...r,children:i})});oi.displayName="MarkdownRenderer";const si=b.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))})});si.displayName="PromptSuggestions";const ai=b.forwardRef(({models:e,value:t,onChange:n,placeholder:r,compact:s,className:a,...i},l)=>{const c=X(),[d,g]=b.useState(!1),[u,m]=b.useState(""),f=b.useRef(null),p=b.useRef(null),h=e.find(y=>y.id===t),w=b.useMemo(()=>{if(!u)return e;const y=u.toLowerCase();return e.filter(C=>{var k;return C.name.toLowerCase().includes(y)||((k=C.provider)==null?void 0:k.toLowerCase().includes(y))||C.id.toLowerCase().includes(y)})},[e,u]);b.useEffect(()=>{d&&(m(""),setTimeout(()=>{var y;return(y=p.current)==null?void 0:y.focus()},0))},[d]),b.useEffect(()=>{if(!d)return;const y=C=>{f.current&&!f.current.contains(C.target)&&g(!1)};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[d]);const v=y=>{y.key==="Escape"&&g(!1)};return o.jsxs("div",{ref:f,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",!h&&"text-muted-foreground"),children:[h?o.jsxs(o.Fragment,{children:[h.icon&&o.jsx("span",{className:"text-base shrink-0",children:h.icon}),o.jsx("span",{className:"font-medium truncate",children:h.name}),!s&&h.provider&&o.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",h.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:v,children:[o.jsx("div",{className:"p-2 border-b border-border",children:o.jsx("input",{ref:p,value:u,onChange:y=>m(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:[w.length===0&&o.jsx("div",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:c.modelSelector_noResults}),w.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))]})]})]})});ai.displayName="ModelSelector";const ii=b.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)})}));ii.displayName="ChatModeSelector";const li=b.forwardRef(({question:e,options:t,onSelect:n,selected:r,allowFreeText:s,onFreeTextSubmit:a,columns:i=1,className:l,...c},d)=>{const g=X(),[u,m]=b.useState(""),f=!!r,p=()=>{const h=u.trim();h&&(a==null||a(h),m(""))};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(h=>{const w=h.id===r;return o.jsxs("button",{type:"button",disabled:f,onClick:()=>n==null?void 0:n(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":f?"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&&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"})}),!w&&o.jsx("span",{className:x("h-4 w-4 shrink-0 rounded-full border-2",f?"border-border/50":"border-border")}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("span",{className:"block truncate",children:h.label}),h.description&&o.jsx("span",{className:"block text-xs text-muted-foreground mt-0.5 line-clamp-1",children:h.description})]})]},h.id)})}),s&&!f&&o.jsxs("div",{className:"flex gap-2 mt-2",children:[o.jsx("input",{type:"text",value:u,onChange:h=>m(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"}),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})]})]})});li.displayName="ChatFollowUp";const di=b.forwardRef(({id:e,question:t,options:n,onSelect:r,selectedId:s,disabled:a=!1,allowFreeText:i=!1,onFreeTextSubmit:l,columns:c=1,className:d,...g},u)=>{const[m,f]=b.useState(""),p=Array.isArray(n)?n:[],h=t??"",w=a||s!=null&&s!=="",v=b.useCallback((C,k)=>{w||r==null||r(C,k)},[w,r]),y=b.useCallback(()=>{const C=(m??"").trim();!C||w||(l==null||l(C),f(""))},[m,w,l]);return o.jsxs("div",{ref:u,"data-question-id":e,className:x("rounded-xl border border-border/60 overflow-hidden","bg-card shadow-sm","animate-in fade-in-0 slide-in-from-bottom-2 duration-300",d),...g,children:[o.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-3 border-b border-border/40 bg-muted/30",children:[o.jsx("div",{className:"flex-shrink-0 flex items-center justify-center w-7 h-7 rounded-lg bg-primary/15 text-primary",children:o.jsx(_.HelpCircle,{className:"w-4 h-4"})}),o.jsx("p",{className:"text-sm font-medium text-foreground leading-snug",children:h})]}),o.jsxs("div",{className:"p-3 space-y-3",children:[p.length>0&&o.jsx("div",{className:x("grid gap-2",c===2?"grid-cols-1 sm:grid-cols-2":"grid-cols-1"),children:p.map(C=>{if(!C||!C.id)return null;const k=s===C.id;return o.jsxs("button",{type:"button",disabled:w,onClick:()=>v(C.id,C.label??C.id),className:x("group relative flex items-center gap-3 w-full p-3 rounded-lg border text-left","transition-all duration-200 ease-out","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",k?"border-primary bg-primary/8 ring-1 ring-primary/20":w?"border-border/40 text-muted-foreground/60 cursor-not-allowed":"border-border/60 bg-background hover:border-primary/40 hover:bg-accent/50 cursor-pointer active:scale-[0.98]"),children:[o.jsx("div",{className:x("flex-shrink-0 flex items-center justify-center w-5 h-5 rounded-full border-2 transition-all duration-200",k?"border-primary bg-primary scale-110":w?"border-muted-foreground/30":"border-muted-foreground/40 group-hover:border-primary/60"),children:k&&o.jsx(_.Check,{className:"w-3 h-3 text-primary-foreground animate-in zoom-in-50 duration-200"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("span",{className:x("block text-sm font-medium leading-tight",k?"text-primary":"text-foreground"),children:C.label??C.id}),C.description&&o.jsx("span",{className:"block text-xs text-muted-foreground mt-0.5 line-clamp-2",children:C.description})]})]},C.id)})}),i&&!w&&o.jsxs("div",{className:"flex gap-2 pt-2 border-t border-border/30",children:[o.jsx("input",{type:"text",value:m,onChange:C=>f(C.target.value),onKeyDown:C=>{C.key==="Enter"&&(C.preventDefault(),y())},placeholder:"Или напишите свой ответ...",className:x("flex-1 rounded-lg border border-border/60 bg-background px-3 py-2 text-sm","placeholder:text-muted-foreground/60","outline-none focus:border-primary/50 focus:ring-1 focus:ring-primary/20","transition-colors")}),o.jsx("button",{type:"button",onClick:y,disabled:!(m??"").trim(),className:x("flex-shrink-0 flex items-center justify-center w-9 h-9 rounded-lg transition-all duration-150",(m??"").trim()?"bg-primary text-primary-foreground hover:bg-primary/90 cursor-pointer active:scale-95":"bg-muted text-muted-foreground/50 cursor-not-allowed"),children:o.jsx(_.Send,{className:"w-4 h-4"})})]})]})]})});di.displayName="ChatQuestion";const Hr={success:{Icon:_.CheckCircle2,border:"border-emerald-500/30",bg:"bg-emerald-500/5",iconBox:"bg-emerald-500/15 text-emerald-600 dark:text-emerald-400",title:"text-emerald-900 dark:text-emerald-100",btn:"bg-emerald-600 hover:bg-emerald-700 text-white"},info:{Icon:_.Info,border:"border-blue-500/30",bg:"bg-blue-500/5",iconBox:"bg-blue-500/15 text-blue-600 dark:text-blue-400",title:"text-blue-900 dark:text-blue-100",btn:"bg-blue-600 hover:bg-blue-700 text-white"},warning:{Icon:_.AlertTriangle,border:"border-amber-500/30",bg:"bg-amber-500/5",iconBox:"bg-amber-500/15 text-amber-600 dark:text-amber-400",title:"text-amber-900 dark:text-amber-100",btn:"bg-amber-600 hover:bg-amber-700 text-white"},result:{Icon:_.Sparkles,border:"border-violet-500/30",bg:"bg-gradient-to-br from-violet-500/8 to-emerald-500/5",iconBox:"bg-violet-500/15 text-violet-600 dark:text-violet-400",title:"text-violet-900 dark:text-violet-100",btn:"bg-violet-600 hover:bg-violet-700 text-white"}},ci=b.forwardRef(({type:e="info",title:t,description:n,icon:r,action:s,dismissible:a=!1,onDismiss:i,className:l,...c},d)=>{const[g,u]=b.useState(!1),[m,f]=b.useState(!1),p=Hr[e]??Hr.info,h=r??p.Icon,w=b.useCallback(()=>{u(!0),i==null||i()},[i]),v=b.useCallback(()=>{m||!(s!=null&&s.onClick)||(f(!0),s.onClick(),setTimeout(()=>f(!1),1e3))},[s,m]);return g?null:o.jsx("div",{ref:d,className:x("rounded-xl border overflow-hidden shadow-sm","animate-in fade-in-0 slide-in-from-bottom-2 duration-300",p.border,p.bg,l),...c,children:o.jsxs("div",{className:"flex items-start gap-3 p-4",children:[o.jsx("div",{className:x("flex-shrink-0 flex items-center justify-center w-9 h-9 rounded-lg",p.iconBox),children:o.jsx(h,{className:"w-5 h-5"})}),o.jsxs("div",{className:"flex-1 min-w-0 pt-0.5",children:[t&&o.jsx("h4",{className:x("text-sm font-semibold leading-tight",p.title),children:t}),n&&o.jsx("p",{className:"text-sm text-muted-foreground mt-1 leading-relaxed",children:n})]}),s&&s.label&&o.jsxs("button",{type:"button",disabled:m,onClick:v,className:x("flex-shrink-0 inline-flex items-center gap-1.5 px-3.5 py-1.5 rounded-lg","text-sm font-medium whitespace-nowrap","transition-all duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","active:scale-95",m?"opacity-60 cursor-wait":"cursor-pointer",p.btn),children:[s.label,o.jsx(_.ArrowRight,{className:"w-3.5 h-3.5"})]}),a&&o.jsx("button",{type:"button",onClick:w,className:"flex-shrink-0 p-1 rounded-md hover:bg-foreground/10 text-muted-foreground hover:text-foreground transition-colors","aria-label":"Dismiss",children:o.jsx(_.X,{className:"w-4 h-4"})})]})})});ci.displayName="ChatActionCard";const Gr={task:{Icon:_.CheckSquare,color:"text-blue-600 dark:text-blue-400 bg-blue-500/12"},project:{Icon:_.FolderKanban,color:"text-purple-600 dark:text-purple-400 bg-purple-500/12"},file:{Icon:_.FileText,color:"text-orange-600 dark:text-orange-400 bg-orange-500/12"},custom:{Icon:_.FileText,color:"text-primary bg-primary/12"}},ui=b.forwardRef(({type:e="task",title:t,id:n,status:r,properties:s,icon:a,onNavigate:i,className:l,...c},d)=>{const g=Gr[e]??Gr.custom,u=a??g.Icon,m=typeof i=="function",f=s&&typeof s=="object"?s:null,p=b.useCallback(()=>{i==null||i()},[i]),h=b.useCallback(w=>{m&&(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),i==null||i())},[m,i]);return o.jsxs("div",{ref:d,role:m?"button":void 0,tabIndex:m?0:void 0,onClick:m?p:void 0,onKeyDown:m?h:void 0,className:x("rounded-xl border border-border/60 bg-card overflow-hidden shadow-sm","animate-in fade-in-0 slide-in-from-bottom-2 duration-300",m&&"cursor-pointer hover:border-primary/40 hover:shadow-md transition-all active:scale-[0.99]",l),...c,children:[o.jsxs("div",{className:"flex items-start gap-3 p-4",children:[o.jsx("div",{className:x("flex-shrink-0 flex items-center justify-center w-9 h-9 rounded-lg",g.color),children:o.jsx(u,{className:"w-5 h-5"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[o.jsx("h4",{className:"text-sm font-semibold text-foreground truncate",children:t??"Untitled"}),n&&o.jsx("span",{className:"inline-flex px-1.5 py-0.5 rounded bg-muted text-[11px] font-mono text-muted-foreground leading-none",children:n})]}),r&&o.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:r})]}),m&&o.jsx(_.ExternalLink,{className:"flex-shrink-0 w-4 h-4 text-muted-foreground/50 mt-0.5"})]}),f&&Object.keys(f).length>0&&o.jsx("div",{className:"px-4 pb-4",children:o.jsx("div",{className:"rounded-lg bg-muted/40 divide-y divide-border/30",children:Object.entries(f).map(([w,v])=>o.jsxs("div",{className:"flex items-baseline justify-between gap-4 px-3 py-2 text-xs",children:[o.jsx("span",{className:"text-muted-foreground font-medium whitespace-nowrap",children:w}),o.jsx("span",{className:"text-foreground text-right break-words",children:String(v??"")})]},w))})})]})});ui.displayName="ChatEntityPreview";const mi=b.forwardRef(({title:e,description:t,icon:n,linkLabel:r,onNavigate:s,metadata:a,variant:i="success",className:l,...c},d)=>{const g=n??(i==="highlight"?_.Sparkles:_.CheckCircle2),u=a&&typeof a=="object"?a:null,m=typeof s=="function",f=i==="success";return o.jsx("div",{ref:d,className:x("rounded-xl border overflow-hidden shadow-sm","animate-in fade-in-0 slide-in-from-bottom-3 duration-300",f?"border-emerald-500/30 bg-gradient-to-br from-emerald-500/8 via-emerald-500/4 to-transparent":"border-violet-500/30 bg-gradient-to-br from-violet-500/8 via-violet-500/4 to-transparent",l),...c,children:o.jsxs("div",{className:"p-4 space-y-3",children:[o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("div",{className:x("flex-shrink-0 flex items-center justify-center w-10 h-10 rounded-xl",f?"bg-emerald-500/15 text-emerald-600 dark:text-emerald-400":"bg-violet-500/15 text-violet-600 dark:text-violet-400"),children:o.jsx(g,{className:"w-5 h-5"})}),o.jsxs("div",{className:"flex-1 min-w-0 pt-0.5",children:[e&&o.jsx("h4",{className:x("text-sm font-semibold leading-tight",f?"text-emerald-900 dark:text-emerald-100":"text-violet-900 dark:text-violet-100"),children:e}),t&&o.jsx("p",{className:"text-sm text-muted-foreground mt-1 leading-relaxed",children:t})]}),m&&o.jsxs("button",{type:"button",onClick:s,className:x("flex-shrink-0 inline-flex items-center gap-1.5 px-4 py-2 rounded-lg","text-sm font-medium whitespace-nowrap","transition-all duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","active:scale-95 cursor-pointer",f?"bg-emerald-600 hover:bg-emerald-700 text-white":"bg-violet-600 hover:bg-violet-700 text-white"),children:[r??"Перейти",o.jsx(_.ArrowRight,{className:"w-4 h-4"})]})]}),u&&Object.keys(u).length>0&&o.jsx("div",{className:"rounded-lg bg-background/60 border border-border/30 divide-y divide-border/20",children:Object.entries(u).map(([p,h])=>o.jsxs("div",{className:"flex items-baseline justify-between gap-4 px-3 py-2 text-xs",children:[o.jsx("span",{className:"text-muted-foreground font-medium whitespace-nowrap",children:p}),o.jsx("span",{className:"text-foreground text-right break-words",children:String(h??"")})]},p))})]})})});mi.displayName="ChatResultCard";const um={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"}},fi=b.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},m)=>{const f=X(),[p,h]=b.useState(!1),w={copy:f.messageActions_copy,retry:f.messageActions_retry,edit:f.messageActions_edit,like:f.messageActions_like,dislike:f.messageActions_dislike,share:f.messageActions_share},y={copy:async()=>{if(t)try{await navigator.clipboard.writeText(t),h(!0),setTimeout(()=>h(!1),2e3)}catch{}r==null||r()},retry:s,edit:a,like:i,dislike:l,share:c};return o.jsx("div",{ref:m,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 k=C==="copy"&&p,R=C==="like"&&n==="liked"||C==="dislike"&&n==="disliked";return o.jsx("button",{type:"button",onClick:y[C],"aria-label":w[C],title:k?f.messageActions_copied:w[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",R&&"text-primary",k&&"text-green-500"),children:k?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:R?"currentColor":"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:um[C].path})})},C)})})});fi.displayName="MessageActions";const gi=b.forwardRef(({text:e,speed:t=2,onComplete:n,cursor:r=!0,immediate:s=!1,className:a,...i},l)=>{const[c,d]=b.useState(s?e:""),[g,u]=b.useState(s),m=b.useRef(e),f=b.useRef(),p=b.useRef(s?e.length:0);return b.useEffect(()=>{if(e!==m.current){if(m.current=e,s){d(e),u(!0),p.current=e.length;return}e.startsWith(c)||(p.current=0,d("")),u(!1)}},[e,s,c]),b.useEffect(()=>{if(s||g)return;const h=()=>{const w=Math.min(p.current+t,e.length);p.current=w,d(e.slice(0,w)),w>=e.length?(u(!0),n==null||n()):f.current=requestAnimationFrame(h)};return f.current=requestAnimationFrame(h),()=>{f.current&&cancelAnimationFrame(f.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"})]})});gi.displayName="StreamingText";const pi=b.forwardRef(({content:e,isThinking:t,duration:n,defaultOpen:r=!1,title:s,className:a,...i},l)=>{const c=X(),[d,g]=b.useState(r||t===!0),[u,m]=b.useState(n??0),f=b.useRef(Date.now());b.useEffect(()=>{t&&g(!0)},[t]),b.useEffect(()=>{if(!t)return;f.current=Date.now();const w=setInterval(()=>{m(Math.floor((Date.now()-f.current)/1e3))},1e3);return()=>clearInterval(w)},[t]);const p=t?u:n??u,h=w=>w<60?`${w}s`:`${Math.floor(w/60)}m ${w%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(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",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?`${h(p)}...`:Be(c.reasoning_thoughtFor,{duration:h(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"})]})})})]})});pi.displayName="ReasoningBlock";const hi=b.forwardRef(({name:e,args:t,result:n,status:r,error:s,defaultOpen:a=!1,className:i,...l},c)=>{const d=X(),[g,u]=b.useState(a),m={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"})]})},f={running:Be(d.toolCall_calling,{name:e}),success:e,error:Be(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"})}),m[r],o.jsx("span",{className:x("font-medium font-mono text-xs",r==="running"&&"text-primary",r==="error"&&"text-destructive"),children:f[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})]})]})]})});hi.displayName="ChatToolCall";function mm(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 xi=b.forwardRef(({conversations:e,activeId:t,onSelect:n,onNew:r,onDelete:s,onRename:a,showSearch:i=!0,className:l,...c},d)=>{const g=X(),[u,m]=b.useState(""),[f,p]=b.useState(null),[h,w]=b.useState(""),v=b.useRef(null),y=b.useMemo(()=>{if(!u)return e;const R=u.toLowerCase();return e.filter(N=>{var F;return N.title.toLowerCase().includes(R)||((F=N.lastMessage)==null?void 0:F.toLowerCase().includes(R))})},[e,u]),C=[g.conversationList_today,g.conversationList_yesterday,g.conversationList_previous7Days,g.conversationList_older],k=b.useMemo(()=>mm(y,C),[y,C]),M=R=>{p(R.id),w(R.title),setTimeout(()=>{var N;return(N=v.current)==null?void 0:N.focus()},0)},S=()=>{f&&h.trim()&&(a==null||a(f,h.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:R=>m(R.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:[k.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}),k.map(R=>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:R.label}),R.items.map(N=>{const F=N.id===t,G=N.id===f;return o.jsxs("div",{className:x("group flex items-center gap-2 rounded-lg px-2 py-2 cursor-pointer transition-colors",F?"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:v,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()}):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(),M(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)})]},R.label))]})]})});xi.displayName="ConversationList";const fm={online:"bg-green-500",offline:"bg-muted-foreground/40",typing:"bg-primary animate-pulse"},bi=b.forwardRef(({title:e,model:t,modelIcon:n,status:r,onClear:s,onSettings:a,onBack:i,children:l,className:c,...d},g)=>{const u=X(),m={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",fm[r])}),o.jsx("span",{className:"text-[10px] text-muted-foreground",children:m[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"})]})})]})]})});bi.displayName="ChatHeader";const Nr=b.forwardRef(({citation:e,className:t,...n},r)=>{const[s,a]=b.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"})]})]})});Nr.displayName="CitationBadge";const vi=b.forwardRef(({citations:e,variant:t="footer",className:n,...r},s)=>{const a=X();return t==="inline"?o.jsx("span",{ref:s,className:x("inline",n),...r,children:e.map(i=>o.jsx(Nr,{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))]})});vi.displayName="SourceCitation";function qr(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Wr(e){return e.startsWith("image/")}function Ur(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 wi=b.forwardRef(({files:e,onRemove:t,variant:n="compact",className:r,...s},a)=>{const i=X();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:[Wr(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:Ur(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:qr(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":Be(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:[Wr(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:Ur(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:qr(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":Be(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))})});wi.displayName="FilePreview";const gm={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"})]})},yi=b.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:m,onLike:f,onDislike:p,onShare:h,followUp:w,onFollowUpSelect:v,onFollowUpFreeText:y,reasoning:C,toolCalls:k,citations:M,className:S,...R},N)=>{const F=X(),G=e==="sent",[E,J]=b.useState(!1),Q=async()=>{if(c)try{await navigator.clipboard.writeText(c),J(!0),setTimeout(()=>J(!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",S),...R,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(pm,{...C})}),k==null?void 0:k.map((P,K)=>o.jsx(hm,{...P},K)),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,M&&M.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:F.sourceCitation_sources}),M.map(P=>o.jsxs("a",{href:P.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:P.index}),o.jsx("span",{className:"truncate",children:P.title})]},P.index))]})]}),w&&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:w.question}),o.jsx("div",{className:"grid gap-1.5",children:w.options.map(P=>{const K=P.id===w.selected,V=!!w.selected;return o.jsxs("button",{type:"button",disabled:V,onClick:()=>v==null?void 0:v(P.id,P.label),className:x("flex items-center gap-2 rounded-xl border px-3 py-2 text-left text-sm transition-all",K?"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:[K?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:P.label})]},P.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&&gm[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(P=>{const K=P==="copy"&&E,V={copy:Q,retry:u,edit:m,like:f,dislike:p,share:h},U=P==="like"&&d==="liked"||P==="dislike"&&d==="disliked",I={copy:F.messageActions_copy,retry:F.messageActions_retry,edit:F.messageActions_edit,like:F.messageActions_like,dislike:F.messageActions_dislike,share:F.messageActions_share};return o.jsx("button",{type:"button",onClick:V[P],title:K?F.messageActions_copied:I[P],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",K&&"text-green-500"),children:K?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"})}):P==="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"})]}):P==="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"})]}):P==="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"})}):P==="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"})}):P==="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"})]})},P)})})]})]})});yi.displayName="ChatMessage";function pm({content:e,isThinking:t,duration:n}){const r=X(),[s,a]=b.useState(t===!0),[i,l]=b.useState(n??0);b.useEffect(()=>{t&&a(!0)},[t]),b.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...`:Be(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 hm({name:e,args:t,result:n,status:r,error:s}){const a=X(),[i,l]=b.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"?Be(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=ri;exports.Accordion=od;exports.AccordionContent=ts;exports.AccordionItem=Qo;exports.AccordionTrigger=es;exports.Alert=Ms;exports.AlertDescription=Is;exports.AlertDialog=xd;exports.AlertDialogAction=Vs;exports.AlertDialogCancel=$s;exports.AlertDialogContent=Ls;exports.AlertDialogDescription=Es;exports.AlertDialogFooter=Fs;exports.AlertDialogHeader=Ds;exports.AlertDialogOverlay=mr;exports.AlertDialogPortal=Ts;exports.AlertDialogTitle=As;exports.AlertDialogTrigger=bd;exports.AlertTitle=Ps;exports.AppShell=Ha;exports.AspectRatio=ed;exports.Avatar=xo;exports.AvatarFallback=vo;exports.AvatarImage=bo;exports.Badge=On;exports.Blockquote=Ju;exports.Box=Vo;exports.Breadcrumb=Os;exports.BreadcrumbEllipsis=Ys;exports.BreadcrumbItem=Gs;exports.BreadcrumbLink=qs;exports.BreadcrumbList=Hs;exports.BreadcrumbPage=Ws;exports.BreadcrumbSeparator=Us;exports.Button=pe;exports.Calendar=Wn;exports.Card=Un;exports.CardContent=Kn;exports.CardDescription=Wo;exports.CardFooter=Uo;exports.CardHeader=Yn;exports.CardTitle=Xn;exports.Carousel=ya;exports.CarouselContent=Ca;exports.CarouselItem=Na;exports.CarouselNext=Sa;exports.CarouselPrevious=ja;exports.ChartContainer=Ea;exports.ChartLegend=nm;exports.ChartTooltip=tm;exports.ChatActionCard=ci;exports.ChatBubble=Xa;exports.ChatBubbleActions=Qa;exports.ChatBubbleAvatar=Ka;exports.ChatBubbleMessage=Za;exports.ChatBubbleTimestamp=Ja;exports.ChatContainer=ti;exports.ChatEntityPreview=ui;exports.ChatFollowUp=li;exports.ChatHeader=bi;exports.ChatInput=ei;exports.ChatList=ni;exports.ChatMessage=yi;exports.ChatModeSelector=ii;exports.ChatQuestion=di;exports.ChatResultCard=mi;exports.ChatToolCall=hi;exports.Checkbox=wo;exports.CitationBadge=Nr;exports.Code=Zu;exports.CodeBlock=Yu;exports.Collapsible=td;exports.CollapsibleContent=Go;exports.CollapsibleTrigger=nd;exports.ColorPicker=Jl;exports.Combobox=Wl;exports.Command=ur;exports.CommandDialog=pd;exports.CommandEmpty=js;exports.CommandGroup=Ss;exports.CommandInput=Cs;exports.CommandItem=Rs;exports.CommandList=Ns;exports.CommandSeparator=ks;exports.CommandShortcut=_s;exports.Container=Ho;exports.ContextMenu=rc;exports.ContextMenuCheckboxItem=ua;exports.ContextMenuContent=da;exports.ContextMenuGroup=sc;exports.ContextMenuItem=ca;exports.ContextMenuLabel=fa;exports.ContextMenuPortal=ac;exports.ContextMenuRadioGroup=lc;exports.ContextMenuRadioItem=ma;exports.ContextMenuSeparator=ga;exports.ContextMenuShortcut=pa;exports.ContextMenuSub=ic;exports.ContextMenuSubContent=la;exports.ContextMenuSubTrigger=ia;exports.ContextMenuTrigger=oc;exports.ConversationList=xi;exports.CopyInput=Ua;exports.DataTable=Ou;exports.DataTableColumnHeader=Hu;exports.DatePicker=Ol;exports.Dialog=ns;exports.DialogClose=ad;exports.DialogContent=rr;exports.DialogDescription=is;exports.DialogFooter=ss;exports.DialogHeader=os;exports.DialogOverlay=nr;exports.DialogPortal=rs;exports.DialogTitle=as;exports.DialogTrigger=sd;exports.Drawer=ls;exports.DrawerClose=cs;exports.DrawerContent=sr;exports.DrawerDescription=dr;exports.DrawerFooter=ir;exports.DrawerHeader=ar;exports.DrawerTitle=lr;exports.DrawerTrigger=ds;exports.DropdownMenu=ms;exports.DropdownMenuCheckboxItem=hs;exports.DropdownMenuContent=cr;exports.DropdownMenuGroup=ld;exports.DropdownMenuItem=kt;exports.DropdownMenuLabel=bs;exports.DropdownMenuPortal=dd;exports.DropdownMenuRadioGroup=ud;exports.DropdownMenuRadioItem=xs;exports.DropdownMenuSeparator=vs;exports.DropdownMenuShortcut=ws;exports.DropdownMenuSub=cd;exports.DropdownMenuSubContent=ps;exports.DropdownMenuSubTrigger=gs;exports.DropdownMenuTrigger=fs;exports.EmptyState=Qd;exports.FilePreview=wi;exports.FileUpload=Xl;exports.Flex=$o;exports.Grid=Oo;exports.HStack=Bo;exports.Header=qa;exports.Heading=Xu;exports.HoverCard=dc;exports.HoverCardContent=ha;exports.HoverCardTrigger=cc;exports.Input=Je;exports.JsonViewer=Ya;exports.Label=ln;exports.Lead=Qu;exports.Main=Wa;exports.MarkdownRenderer=oi;exports.MessageActions=fi;exports.MetricCard=rm;exports.ModeToggle=am;exports.ModeToggleGroup=lm;exports.ModelSelector=ai;exports.MultiSelect=Ul;exports.Muted=em;exports.NUIProvider=Eo;exports.NavigationMenu=ta;exports.NavigationMenuContent=sa;exports.NavigationMenuIndicator=aa;exports.NavigationMenuItem=tc;exports.NavigationMenuLink=nc;exports.NavigationMenuList=na;exports.NavigationMenuTrigger=oa;exports.NavigationMenuViewport=fr;exports.NumberInput=Gl;exports.OTPInput=Yl;exports.Pagination=Xs;exports.PaginationContent=Ks;exports.PaginationEllipsis=ea;exports.PaginationItem=Zs;exports.PaginationLink=cn;exports.PaginationNext=Qs;exports.PaginationPrevious=Js;exports.Popover=ht;exports.PopoverContent=lt;exports.PopoverTrigger=xt;exports.Progress=zs;exports.PromptSuggestions=si;exports.RadioGroup=Ro;exports.RadioGroupItem=_o;exports.ReasoningBlock=pi;exports.ScrollArea=tr;exports.ScrollBar=rn;exports.Select=El;exports.SelectContent=No;exports.SelectGroup=Vl;exports.SelectItem=So;exports.SelectLabel=jo;exports.SelectScrollDownButton=Gn;exports.SelectScrollUpButton=Hn;exports.SelectSeparator=ko;exports.SelectTrigger=Co;exports.SelectValue=$l;exports.Separator=ho;exports.Sheet=ls;exports.SheetClose=cs;exports.SheetContent=sr;exports.SheetDescription=dr;exports.SheetFooter=ir;exports.SheetHeader=ar;exports.SheetOverlay=or;exports.SheetPortal=us;exports.SheetTitle=lr;exports.SheetTrigger=ds;exports.Sidebar=Ga;exports.Skeleton=vd;exports.Slider=Mo;exports.SourceCitation=vi;exports.StatusBadge=sm;exports.Stepper=ec;exports.StreamingText=gi;exports.Switch=yo;exports.Table=Zn;exports.TableBody=Qn;exports.TableCaption=Xo;exports.TableCell=nn;exports.TableFooter=Yo;exports.TableHead=er;exports.TableHeader=Jn;exports.TableRow=St;exports.Tabs=rd;exports.TabsContent=Jo;exports.TabsList=Ko;exports.TabsTrigger=Zo;exports.TagInput=ql;exports.Text=Ku;exports.Textarea=go;exports.ThemeProvider=Zd;exports.TimePicker=Hl;exports.Timeline=Va;exports.TimelineConnector=Ba;exports.TimelineContent=Oa;exports.TimelineIcon=za;exports.TimelineItem=$a;exports.Toaster=Jd;exports.Toggle=Po;exports.ToggleGroup=Io;exports.ToggleGroupItem=Lo;exports.Tooltip=fd;exports.TooltipContent=ys;exports.TooltipProvider=md;exports.TooltipTrigger=gd;exports.TranslateProvider=Eo;exports.VStack=zo;exports.badgeVariants=po;exports.buttonVariants=At;exports.cardVariants=qo;exports.cn=x;exports.en=It;exports.headingVariants=Fa;exports.inputVariants=fo;exports.navigationMenuTriggerStyle=ra;exports.ru=Do;exports.textVariants=Aa;exports.toast=Ad;exports.toggleVariants=qn;exports.tpl=Be;exports.useLocale=Bl;exports.useNUILocale=X;exports.useTheme=dn;exports.useTranslate=X;
|
|
38
38
|
//# sourceMappingURL=index.cjs.js.map
|