@yuno-payments/dashboard-design-system 3.0.0 → 3.1.0-beta.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 +17 -17
- package/dist/index.d.ts +52 -8
- package/dist/index.js +3059 -3032
- package/dist/styles.css +1 -1
- package/dist/tokens.css +22 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react"),ho=require("react-dom"),i=require("react/jsx-runtime");function b0(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 g=b0(C),lc=b0(ho);function w0(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=w0(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function C0(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=w0(e))&&(r&&(r+=" "),r+=t);return r}const Eg=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ng=C0,Ge=(e,t)=>n=>{var r;if(t?.variants==null)return Ng(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,a=Object.keys(o).map(u=>{const f=n?.[u],d=s?.[u];if(f===null)return null;const p=Eg(f)||Eg(d);return o[u][p]}),l=n&&Object.entries(n).reduce((u,f)=>{let[d,p]=f;return p===void 0||(u[d]=p),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:d,className:p,...h}=f;return Object.entries(h).every(m=>{let[x,v]=m;return Array.isArray(v)?v.includes({...s,...l}[x]):{...s,...l}[x]===v})?[...u,d,p]:u},[]);return Ng(e,a,c,n?.class,n?.className)},nC=(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},rC=(e,t)=>({classGroupId:e,validator:t}),S0=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Cl="-",_g=[],oC="arbitrary..",sC=e=>{const t=iC(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return aC(a);const l=a.split(Cl),c=l[0]===""&&l.length>1?1:0;return E0(l,c,t)},getConflictingClassGroupIds:(a,l)=>{if(l){const c=r[a],u=n[a];return c?u?nC(u,c):c:u||_g}return n[a]||_g}}},E0=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const u=E0(e,t+1,s);if(u)return u}const a=n.validators;if(a===null)return;const l=t===0?e.join(Cl):e.slice(t).join(Cl),c=a.length;for(let u=0;u<c;u++){const f=a[u];if(f.validator(l))return f.classGroupId}},aC=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?oC+r:void 0})(),iC=e=>{const{theme:t,classGroups:n}=e;return lC(n,t)},lC=(e,t)=>{const n=S0();for(const r in e){const o=e[r];Lf(o,n,r,t)}return n},Lf=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const a=e[s];cC(a,t,n,r)}},cC=(e,t,n,r)=>{if(typeof e=="string"){uC(e,t,n);return}if(typeof e=="function"){dC(e,t,n,r);return}fC(e,t,n,r)},uC=(e,t,n)=>{const r=e===""?t:N0(t,e);r.classGroupId=n},dC=(e,t,n,r)=>{if(pC(e)){Lf(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(rC(n,e))},fC=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let a=0;a<s;a++){const[l,c]=o[a];Lf(c,N0(t,l),n,r)}},N0=(e,t)=>{let n=e;const r=t.split(Cl),o=r.length;for(let s=0;s<o;s++){const a=r[s];let l=n.nextPart.get(a);l||(l=S0(),n.nextPart.set(a,l)),n=l}return n},pC=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,hC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,a)=>{n[s]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let a=n[s];if(a!==void 0)return a;if((a=r[s])!==void 0)return o(s,a),a},set(s,a){s in n?n[s]=a:o(s,a)}}},ud="!",jg=":",gC=[],kg=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),mC=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let a=0,l=0,c=0,u;const f=o.length;for(let x=0;x<f;x++){const v=o[x];if(a===0&&l===0){if(v===jg){s.push(o.slice(c,x)),c=x+1;continue}if(v==="/"){u=x;continue}}v==="["?a++:v==="]"?a--:v==="("?l++:v===")"&&l--}const d=s.length===0?o:o.slice(c);let p=d,h=!1;d.endsWith(ud)?(p=d.slice(0,-1),h=!0):d.startsWith(ud)&&(p=d.slice(1),h=!0);const m=u&&u>c?u-c:void 0;return kg(s,h,p,m)};if(t){const o=t+jg,s=r;r=a=>a.startsWith(o)?s(a.slice(o.length)):kg(gC,!1,a,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},xC=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const a=n[s],l=a[0]==="[",c=t.has(a);l||c?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(a)):o.push(a)}return o.length>0&&(o.sort(),r.push(...o)),r}},vC=e=>({cache:hC(e.cacheSize),parseClassName:mC(e),sortModifiers:xC(e),...sC(e)}),yC=/\s+/,bC=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,a=[],l=e.trim().split(yC);let c="";for(let u=l.length-1;u>=0;u-=1){const f=l[u],{isExternal:d,modifiers:p,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:x}=n(f);if(d){c=f+(c.length>0?" "+c:c);continue}let v=!!x,y=r(v?m.substring(0,x):m);if(!y){if(!v){c=f+(c.length>0?" "+c:c);continue}if(y=r(m),!y){c=f+(c.length>0?" "+c:c);continue}v=!1}const b=p.length===0?"":p.length===1?p[0]:s(p).join(":"),S=h?b+ud:b,w=S+y;if(a.indexOf(w)>-1)continue;a.push(w);const E=o(y,v);for(let N=0;N<E.length;++N){const _=E[N];a.push(S+_)}c=f+(c.length>0?" "+c:c)}return c},wC=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=_0(n))&&(o&&(o+=" "),o+=r);return o},_0=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=_0(e[r]))&&(n&&(n+=" "),n+=t);return n},CC=(e,...t)=>{let n,r,o,s;const a=c=>{const u=t.reduce((f,d)=>d(f),e());return n=vC(u),r=n.cache.get,o=n.cache.set,s=l,l(c)},l=c=>{const u=r(c);if(u)return u;const f=bC(c,n);return o(c,f),f};return s=a,(...c)=>s(wC(...c))},SC=[],lt=e=>{const t=n=>n[e]||SC;return t.isThemeGetter=!0,t},j0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,k0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,EC=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,NC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_C=/\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$/,jC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,kC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,RC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,cr=e=>EC.test(e),Ne=e=>!!e&&!Number.isNaN(Number(e)),ur=e=>!!e&&Number.isInteger(Number(e)),pu=e=>e.endsWith("%")&&Ne(e.slice(0,-1)),Gn=e=>NC.test(e),R0=()=>!0,MC=e=>_C.test(e)&&!jC.test(e),If=()=>!1,DC=e=>kC.test(e),AC=e=>RC.test(e),TC=e=>!se(e)&&!ie(e),PC=e=>kr(e,A0,If),se=e=>j0.test(e),$r=e=>kr(e,T0,MC),Rg=e=>kr(e,zC,Ne),OC=e=>kr(e,O0,R0),LC=e=>kr(e,P0,If),Mg=e=>kr(e,M0,If),IC=e=>kr(e,D0,AC),ji=e=>kr(e,L0,DC),ie=e=>k0.test(e),Bs=e=>go(e,T0),FC=e=>go(e,P0),Dg=e=>go(e,M0),$C=e=>go(e,A0),VC=e=>go(e,D0),ki=e=>go(e,L0,!0),BC=e=>go(e,O0,!0),kr=(e,t,n)=>{const r=j0.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},go=(e,t,n=!1)=>{const r=k0.exec(e);return r?r[1]?t(r[1]):n:!1},M0=e=>e==="position"||e==="percentage",D0=e=>e==="image"||e==="url",A0=e=>e==="length"||e==="size"||e==="bg-size",T0=e=>e==="length",zC=e=>e==="number",P0=e=>e==="family-name",O0=e=>e==="number"||e==="weight",L0=e=>e==="shadow",WC=()=>{const e=lt("color"),t=lt("font"),n=lt("text"),r=lt("font-weight"),o=lt("tracking"),s=lt("leading"),a=lt("breakpoint"),l=lt("container"),c=lt("spacing"),u=lt("radius"),f=lt("shadow"),d=lt("inset-shadow"),p=lt("text-shadow"),h=lt("drop-shadow"),m=lt("blur"),x=lt("perspective"),v=lt("aspect"),y=lt("ease"),b=lt("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...w(),ie,se],N=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],k=()=>[ie,se,c],I=()=>[cr,"full","auto",...k()],F=()=>[ur,"none","subgrid",ie,se],U=()=>["auto",{span:["full",ur,ie,se]},ur,ie,se],O=()=>[ur,"auto",ie,se],R=()=>["auto","min","max","fr",ie,se],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...k()],$=()=>[cr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],z=()=>[cr,"screen","full","dvw","lvw","svw","min","max","fit",...k()],P=()=>[cr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...k()],M=()=>[e,ie,se],G=()=>[...w(),Dg,Mg,{position:[ie,se]}],A=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",$C,PC,{size:[ie,se]}],H=()=>[pu,Bs,$r],T=()=>["","none","full",u,ie,se],B=()=>["",Ne,Bs,$r],Y=()=>["solid","dashed","dotted","double"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[Ne,pu,Dg,Mg],oe=()=>["","none",m,ie,se],ne=()=>["none",Ne,ie,se],le=()=>["none",Ne,ie,se],Ee=()=>[Ne,ie,se],re=()=>[cr,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Gn],breakpoint:[Gn],color:[R0],container:[Gn],"drop-shadow":[Gn],ease:["in","out","in-out"],font:[TC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Gn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Gn],shadow:[Gn],spacing:["px",Ne],text:[Gn],"text-shadow":[Gn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",cr,se,ie,v]}],container:["container"],columns:[{columns:[Ne,se,ie,l]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"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:E()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{"inset-s":I(),start:I()}],end:[{"inset-e":I(),end:I()}],"inset-bs":[{"inset-bs":I()}],"inset-be":[{"inset-be":I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[ur,"auto",ie,se]}],basis:[{basis:[cr,"full","auto",l,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ne,cr,"auto","initial","none",se]}],grow:[{grow:["",Ne,ie,se]}],shrink:[{shrink:["",Ne,ie,se]}],order:[{order:[ur,"first","last","none",ie,se]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:U()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:U()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":R()}],"auto-rows":[{"auto-rows":R()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pbs:[{pbs:k()}],pbe:[{pbe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mbs:[{mbs:D()}],mbe:[{mbe:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],"inline-size":[{inline:["auto",...z()]}],"min-inline-size":[{"min-inline":["auto",...z()]}],"max-inline-size":[{"max-inline":["none",...z()]}],"block-size":[{block:["auto",...P()]}],"min-block-size":[{"min-block":["auto",...P()]}],"max-block-size":[{"max-block":["none",...P()]}],w:[{w:[l,"screen",...$()]}],"min-w":[{"min-w":[l,"screen","none",...$()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[a]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",n,Bs,$r]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,BC,OC]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",pu,se]}],"font-family":[{font:[FC,LC,t]}],"font-features":[{"font-features":[se]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ie,se]}],"line-clamp":[{"line-clamp":[Ne,"none",ie,Rg]}],leading:[{leading:[s,...k()]}],"list-image":[{"list-image":["none",ie,se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ie,se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ne,"from-font","auto",ie,$r]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[Ne,"auto",ie,se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ie,se]}],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",ie,se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:G()}],"bg-repeat":[{bg:A()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ur,ie,se],radial:["",ie,se],conic:[ur,ie,se]},VC,IC]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:T()}],"rounded-s":[{"rounded-s":T()}],"rounded-e":[{"rounded-e":T()}],"rounded-t":[{"rounded-t":T()}],"rounded-r":[{"rounded-r":T()}],"rounded-b":[{"rounded-b":T()}],"rounded-l":[{"rounded-l":T()}],"rounded-ss":[{"rounded-ss":T()}],"rounded-se":[{"rounded-se":T()}],"rounded-ee":[{"rounded-ee":T()}],"rounded-es":[{"rounded-es":T()}],"rounded-tl":[{"rounded-tl":T()}],"rounded-tr":[{"rounded-tr":T()}],"rounded-br":[{"rounded-br":T()}],"rounded-bl":[{"rounded-bl":T()}],"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-bs":[{"border-bs":B()}],"border-w-be":[{"border-be":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:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...Y(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ne,ie,se]}],"outline-w":[{outline:["",Ne,Bs,$r]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",f,ki,ji]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",d,ki,ji]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[Ne,$r]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",p,ki,ji]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[Ne,ie,se]}],"mix-blend":[{"mix-blend":[...Z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Z()}],"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":[Ne]}],"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":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"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":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"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":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"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":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"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":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"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":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"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":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[ie,se]}],"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":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"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":w()}],"mask-image-conic-pos":[{"mask-conic":[Ne]}],"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":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:G()}],"mask-repeat":[{mask:A()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ie,se]}],filter:[{filter:["","none",ie,se]}],blur:[{blur:oe()}],brightness:[{brightness:[Ne,ie,se]}],contrast:[{contrast:[Ne,ie,se]}],"drop-shadow":[{"drop-shadow":["","none",h,ki,ji]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",Ne,ie,se]}],"hue-rotate":[{"hue-rotate":[Ne,ie,se]}],invert:[{invert:["",Ne,ie,se]}],saturate:[{saturate:[Ne,ie,se]}],sepia:[{sepia:["",Ne,ie,se]}],"backdrop-filter":[{"backdrop-filter":["","none",ie,se]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[Ne,ie,se]}],"backdrop-contrast":[{"backdrop-contrast":[Ne,ie,se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ne,ie,se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ne,ie,se]}],"backdrop-invert":[{"backdrop-invert":["",Ne,ie,se]}],"backdrop-opacity":[{"backdrop-opacity":[Ne,ie,se]}],"backdrop-saturate":[{"backdrop-saturate":[Ne,ie,se]}],"backdrop-sepia":[{"backdrop-sepia":["",Ne,ie,se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ie,se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ne,"initial",ie,se]}],ease:[{ease:["linear","initial",y,ie,se]}],delay:[{delay:[Ne,ie,se]}],animate:[{animate:["none",b,ie,se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,ie,se]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:le()}],"scale-x":[{"scale-x":le()}],"scale-y":[{"scale-y":le()}],"scale-z":[{"scale-z":le()}],"scale-3d":["scale-3d"],skew:[{skew:Ee()}],"skew-x":[{"skew-x":Ee()}],"skew-y":[{"skew-y":Ee()}],transform:[{transform:[ie,se,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:re()}],"translate-x":[{"translate-x":re()}],"translate-y":[{"translate-y":re()}],"translate-z":[{"translate-z":re()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"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",ie,se]}],"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":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mbs":[{"scroll-mbs":k()}],"scroll-mbe":[{"scroll-mbe":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pbs":[{"scroll-pbs":k()}],"scroll-pbe":[{"scroll-pbe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",ie,se]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[Ne,Bs,$r,Rg]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-bs","border-w-be","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-bs","border-color-be","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-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]}},HC=CC(WC);function j(...e){return HC(C0(e))}function ss(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}function GC(e,t=8,n="...",r=3,o=4){return e.length<=t?e:e.substring(0,r)+n+e.substring(e.length-o)}const UC=["en","es","ja","ar","fr","pt","tr","ru","de","zh"],I0="lang";function Za(){if(typeof window>"u")return"en";try{const e=localStorage.getItem(I0);if(e&&UC.includes(e))return e}catch{}return"en"}const YC=["ar"];function mo(e){const t=e??Za();return YC.includes(t)?"rtl":"ltr"}const KC=Ge("relative w-full rounded-lg border px-4 py-3 text-sm grid grid-cols-[auto_1fr] has-[>svg]:gap-x-3 has-[>i]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current [&>i]:translate-y-0.5",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function ZC({className:e,variant:t,...n}){return i.jsx("div",{"data-slot":"alert",role:"alert",className:j(KC({variant:t}),e),...n})}function qC({className:e,...t}){return i.jsx("div",{"data-slot":"alert-title",className:j("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function XC({className:e,...t}){return i.jsx("div",{"data-slot":"alert-description",className:j("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}function te(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Ag(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function At(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Ag(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Ag(e[o],null)}}}}function Se(...e){return g.useCallback(At(...e),e)}function JC(e,t){const n=g.createContext(t),r=s=>{const{children:a,...l}=s,c=g.useMemo(()=>l,Object.values(l));return i.jsx(n.Provider,{value:c,children:a})};r.displayName=e+"Provider";function o(s){const a=g.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function St(e,t=[]){let n=[];function r(s,a){const l=g.createContext(a),c=n.length;n=[...n,a];const u=d=>{const{scope:p,children:h,...m}=d,x=p?.[e]?.[c]||l,v=g.useMemo(()=>m,Object.values(m));return i.jsx(x.Provider,{value:v,children:h})};u.displayName=s+"Provider";function f(d,p){const h=p?.[e]?.[c]||l,m=g.useContext(h);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const o=()=>{const s=n.map(a=>g.createContext(a));return function(l){const c=l?.[e]||s;return g.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[r,QC(o,...t)]}function QC(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function e8(e){const t=t8(e),n=g.forwardRef((r,o)=>{const{children:s,...a}=r,l=g.Children.toArray(s),c=l.find(r8);if(c){const u=c.props.children,f=l.map(d=>d===c?g.Children.count(u)>1?g.Children.only(null):g.isValidElement(u)?u.props.children:null:d);return i.jsx(t,{...a,ref:o,children:g.isValidElement(u)?g.cloneElement(u,void 0,f):null})}return i.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function t8(e){const t=g.forwardRef((n,r)=>{const{children:o,...s}=n;if(g.isValidElement(o)){const a=s8(o),l=o8(s,o.props);return o.type!==g.Fragment&&(l.ref=r?At(r,a):a),g.cloneElement(o,l)}return g.Children.count(o)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var n8=Symbol("radix.slottable");function r8(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===n8}function o8(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...l)=>{const c=s(...l);return o(...l),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function s8(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var a8=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ue=a8.reduce((e,t)=>{const n=e8(`Primitive.${t}`),r=g.forwardRef((o,s)=>{const{asChild:a,...l}=o,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(c,{...l,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function F0(e,t){e&&lc.flushSync(()=>e.dispatchEvent(t))}function dn(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>t.current?.(...n),[])}function i8(e,t=globalThis?.document){const n=dn(e);g.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var l8="DismissableLayer",dd="dismissableLayer.update",c8="dismissableLayer.pointerDownOutside",u8="dismissableLayer.focusOutside",Tg,$0=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),vs=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:l,...c}=e,u=g.useContext($0),[f,d]=g.useState(null),p=f?.ownerDocument??globalThis?.document,[,h]=g.useState({}),m=Se(t,_=>d(_)),x=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=x.indexOf(v),b=f?x.indexOf(f):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,w=b>=y,E=p8(_=>{const k=_.target,I=[...u.branches].some(F=>F.contains(k));!w||I||(o?.(_),a?.(_),_.defaultPrevented||l?.())},p),N=h8(_=>{const k=_.target;[...u.branches].some(F=>F.contains(k))||(s?.(_),a?.(_),_.defaultPrevented||l?.())},p);return i8(_=>{b===u.layers.size-1&&(r?.(_),!_.defaultPrevented&&l&&(_.preventDefault(),l()))},p),g.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Tg=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Pg(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Tg)}},[f,p,n,u]),g.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Pg())},[f,u]),g.useEffect(()=>{const _=()=>h({});return document.addEventListener(dd,_),()=>document.removeEventListener(dd,_)},[]),i.jsx(ue.div,{...c,ref:m,style:{pointerEvents:S?w?"auto":"none":void 0,...e.style},onFocusCapture:te(e.onFocusCapture,N.onFocusCapture),onBlurCapture:te(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:te(e.onPointerDownCapture,E.onPointerDownCapture)})});vs.displayName=l8;var d8="DismissableLayerBranch",f8=g.forwardRef((e,t)=>{const n=g.useContext($0),r=g.useRef(null),o=Se(t,r);return g.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),i.jsx(ue.div,{...e,ref:o})});f8.displayName=d8;function p8(e,t=globalThis?.document){const n=dn(e),r=g.useRef(!1),o=g.useRef(()=>{});return g.useEffect(()=>{const s=l=>{if(l.target&&!r.current){let c=function(){V0(c8,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function h8(e,t=globalThis?.document){const n=dn(e),r=g.useRef(!1);return g.useEffect(()=>{const o=s=>{s.target&&!r.current&&V0(u8,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Pg(){const e=new CustomEvent(dd);document.dispatchEvent(e)}function V0(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?F0(o,s):o.dispatchEvent(s)}var at=globalThis?.document?g.useLayoutEffect:()=>{},g8=g[" useId ".trim().toString()]||(()=>{}),m8=0;function tt(e){const[t,n]=g.useState(g8());return at(()=>{n(r=>r??String(m8++))},[e]),e||(t?`radix-${t}`:"")}const x8=["top","right","bottom","left"],Sr=Math.min,Kt=Math.max,Sl=Math.round,Ri=Math.floor,On=e=>({x:e,y:e}),v8={left:"right",right:"left",bottom:"top",top:"bottom"};function fd(e,t,n){return Kt(e,Sr(t,n))}function tr(e,t){return typeof e=="function"?e(t):e}function nr(e){return e.split("-")[0]}function ys(e){return e.split("-")[1]}function Ff(e){return e==="x"?"y":"x"}function $f(e){return e==="y"?"height":"width"}function An(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Vf(e){return Ff(An(e))}function y8(e,t,n){n===void 0&&(n=!1);const r=ys(e),o=Vf(e),s=$f(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=El(a)),[a,El(a)]}function b8(e){const t=El(e);return[pd(e),t,pd(t)]}function pd(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Og=["left","right"],Lg=["right","left"],w8=["top","bottom"],C8=["bottom","top"];function S8(e,t,n){switch(e){case"top":case"bottom":return n?t?Lg:Og:t?Og:Lg;case"left":case"right":return t?w8:C8;default:return[]}}function E8(e,t,n,r){const o=ys(e);let s=S8(nr(e),n==="start",r);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(pd)))),s}function El(e){const t=nr(e);return v8[t]+e.slice(t.length)}function N8(e){return{top:0,right:0,bottom:0,left:0,...e}}function B0(e){return typeof e!="number"?N8(e):{top:e,right:e,bottom:e,left:e}}function Nl(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Ig(e,t,n){let{reference:r,floating:o}=e;const s=An(t),a=Vf(t),l=$f(a),c=nr(t),u=s==="y",f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[l]/2-o[l]/2;let h;switch(c){case"top":h={x:f,y:r.y-o.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(ys(t)){case"start":h[a]-=p*(n&&u?-1:1);break;case"end":h[a]+=p*(n&&u?-1:1);break}return h}async function _8(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:a,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=tr(t,e),m=B0(h),v=l[p?d==="floating"?"reference":"floating":d],y=Nl(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:u,rootBoundary:f,strategy:c})),b=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),w=await(s.isElement==null?void 0:s.isElement(S))?await(s.getScale==null?void 0:s.getScale(S))||{x:1,y:1}:{x:1,y:1},E=Nl(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:S,strategy:c}):b);return{top:(y.top-E.top+m.top)/w.y,bottom:(E.bottom-y.bottom+m.bottom)/w.y,left:(y.left-E.left+m.left)/w.x,right:(E.right-y.right+m.right)/w.x}}const j8=50,k8=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:a}=n,l=a.detectOverflow?a:{...a,detectOverflow:_8},c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=Ig(u,r,c),p=r,h=0;const m={};for(let x=0;x<s.length;x++){const v=s[x];if(!v)continue;const{name:y,fn:b}=v,{x:S,y:w,data:E,reset:N}=await b({x:f,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:m,rects:u,platform:l,elements:{reference:e,floating:t}});f=S??f,d=w??d,m[y]={...m[y],...E},N&&h<j8&&(h++,typeof N=="object"&&(N.placement&&(p=N.placement),N.rects&&(u=N.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):N.rects),{x:f,y:d}=Ig(u,p,c)),x=-1)}return{x:f,y:d,placement:p,strategy:o,middlewareData:m}},R8=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:a,elements:l,middlewareData:c}=t,{element:u,padding:f=0}=tr(e,t)||{};if(u==null)return{};const d=B0(f),p={x:n,y:r},h=Vf(o),m=$f(h),x=await a.getDimensions(u),v=h==="y",y=v?"top":"left",b=v?"bottom":"right",S=v?"clientHeight":"clientWidth",w=s.reference[m]+s.reference[h]-p[h]-s.floating[m],E=p[h]-s.reference[h],N=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let _=N?N[S]:0;(!_||!await(a.isElement==null?void 0:a.isElement(N)))&&(_=l.floating[S]||s.floating[m]);const k=w/2-E/2,I=_/2-x[m]/2-1,F=Sr(d[y],I),U=Sr(d[b],I),O=F,R=_-x[m]-U,L=_/2-x[m]/2+k,V=fd(O,L,R),D=!c.arrow&&ys(o)!=null&&L!==V&&s.reference[m]/2-(L<O?F:U)-x[m]/2<0,$=D?L<O?L-O:L-R:0;return{[h]:p[h]+$,data:{[h]:V,centerOffset:L-V-$,...D&&{alignmentOffset:$}},reset:D}}}),M8=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:a,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:x=!0,...v}=tr(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=nr(o),b=An(l),S=nr(l)===l,w=await(c.isRTL==null?void 0:c.isRTL(u.floating)),E=p||(S||!x?[El(l)]:b8(l)),N=m!=="none";!p&&N&&E.push(...E8(l,x,m,w));const _=[l,...E],k=await c.detectOverflow(t,v),I=[];let F=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&I.push(k[y]),d){const L=y8(o,a,w);I.push(k[L[0]],k[L[1]])}if(F=[...F,{placement:o,overflows:I}],!I.every(L=>L<=0)){var U,O;const L=(((U=s.flip)==null?void 0:U.index)||0)+1,V=_[L];if(V&&(!(d==="alignment"?b!==An(V):!1)||F.every(z=>An(z.placement)===b?z.overflows[0]>0:!0)))return{data:{index:L,overflows:F},reset:{placement:V}};let D=(O=F.filter($=>$.overflows[0]<=0).sort(($,z)=>$.overflows[1]-z.overflows[1])[0])==null?void 0:O.placement;if(!D)switch(h){case"bestFit":{var R;const $=(R=F.filter(z=>{if(N){const P=An(z.placement);return P===b||P==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(P=>P>0).reduce((P,M)=>P+M,0)]).sort((z,P)=>z[1]-P[1])[0])==null?void 0:R[0];$&&(D=$);break}case"initialPlacement":D=l;break}if(o!==D)return{reset:{placement:D}}}return{}}}};function Fg(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $g(e){return x8.some(t=>e[t]>=0)}const D8=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=tr(e,t);switch(o){case"referenceHidden":{const a=await r.detectOverflow(t,{...s,elementContext:"reference"}),l=Fg(a,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:$g(l)}}}case"escaped":{const a=await r.detectOverflow(t,{...s,altBoundary:!0}),l=Fg(a,n.floating);return{data:{escapedOffsets:l,escaped:$g(l)}}}default:return{}}}}},z0=new Set(["left","top"]);async function A8(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=nr(n),l=ys(n),c=An(n)==="y",u=z0.has(a)?-1:1,f=s&&c?-1:1,d=tr(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof m=="number"&&(h=l==="end"?m*-1:m),c?{x:h*f,y:p*u}:{x:p*u,y:h*f}}const T8=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:a,middlewareData:l}=t,c=await A8(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:a}}}}},P8=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:c={fn:y=>{let{x:b,y:S}=y;return{x:b,y:S}}},...u}=tr(e,t),f={x:n,y:r},d=await s.detectOverflow(t,u),p=An(nr(o)),h=Ff(p);let m=f[h],x=f[p];if(a){const y=h==="y"?"top":"left",b=h==="y"?"bottom":"right",S=m+d[y],w=m-d[b];m=fd(S,m,w)}if(l){const y=p==="y"?"top":"left",b=p==="y"?"bottom":"right",S=x+d[y],w=x-d[b];x=fd(S,x,w)}const v=c.fn({...t,[h]:m,[p]:x});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[h]:a,[p]:l}}}}}},O8=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:a}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=tr(e,t),f={x:n,y:r},d=An(o),p=Ff(d);let h=f[p],m=f[d];const x=tr(l,t),v=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(c){const S=p==="y"?"height":"width",w=s.reference[p]-s.floating[S]+v.mainAxis,E=s.reference[p]+s.reference[S]-v.mainAxis;h<w?h=w:h>E&&(h=E)}if(u){var y,b;const S=p==="y"?"width":"height",w=z0.has(nr(o)),E=s.reference[d]-s.floating[S]+(w&&((y=a.offset)==null?void 0:y[d])||0)+(w?0:v.crossAxis),N=s.reference[d]+s.reference[S]+(w?0:((b=a.offset)==null?void 0:b[d])||0)-(w?v.crossAxis:0);m<E?m=E:m>N&&(m=N)}return{[p]:h,[d]:m}}}},L8=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:a,elements:l}=t,{apply:c=()=>{},...u}=tr(e,t),f=await a.detectOverflow(t,u),d=nr(o),p=ys(o),h=An(o)==="y",{width:m,height:x}=s.floating;let v,y;d==="top"||d==="bottom"?(v=d,y=p===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(y=d,v=p==="end"?"top":"bottom");const b=x-f.top-f.bottom,S=m-f.left-f.right,w=Sr(x-f[v],b),E=Sr(m-f[y],S),N=!t.middlewareData.shift;let _=w,k=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(_=b),N&&!p){const F=Kt(f.left,0),U=Kt(f.right,0),O=Kt(f.top,0),R=Kt(f.bottom,0);h?k=m-2*(F!==0||U!==0?F+U:Kt(f.left,f.right)):_=x-2*(O!==0||R!==0?O+R:Kt(f.top,f.bottom))}await c({...t,availableWidth:k,availableHeight:_});const I=await a.getDimensions(l.floating);return m!==I.width||x!==I.height?{reset:{rects:!0}}:{}}}};function cc(){return typeof window<"u"}function bs(e){return W0(e)?(e.nodeName||"").toLowerCase():"#document"}function Zt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Vn(e){var t;return(t=(W0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function W0(e){return cc()?e instanceof Node||e instanceof Zt(e).Node:!1}function Cn(e){return cc()?e instanceof Element||e instanceof Zt(e).Element:!1}function or(e){return cc()?e instanceof HTMLElement||e instanceof Zt(e).HTMLElement:!1}function Vg(e){return!cc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Zt(e).ShadowRoot}function qa(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Sn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function I8(e){return/^(table|td|th)$/.test(bs(e))}function uc(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const F8=/transform|translate|scale|rotate|perspective|filter/,$8=/paint|layout|strict|content/,Vr=e=>!!e&&e!=="none";let hu;function Bf(e){const t=Cn(e)?Sn(e):e;return Vr(t.transform)||Vr(t.translate)||Vr(t.scale)||Vr(t.rotate)||Vr(t.perspective)||!zf()&&(Vr(t.backdropFilter)||Vr(t.filter))||F8.test(t.willChange||"")||$8.test(t.contain||"")}function V8(e){let t=Er(e);for(;or(t)&&!as(t);){if(Bf(t))return t;if(uc(t))return null;t=Er(t)}return null}function zf(){return hu==null&&(hu=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),hu}function as(e){return/^(html|body|#document)$/.test(bs(e))}function Sn(e){return Zt(e).getComputedStyle(e)}function dc(e){return Cn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Er(e){if(bs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Vg(e)&&e.host||Vn(e);return Vg(t)?t.host:t}function H0(e){const t=Er(e);return as(t)?e.ownerDocument?e.ownerDocument.body:e.body:or(t)&&qa(t)?t:H0(t)}function ja(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=H0(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=Zt(o);if(s){const l=hd(a);return t.concat(a,a.visualViewport||[],qa(o)?o:[],l&&n?ja(l):[])}else return t.concat(o,ja(o,[],n))}function hd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function G0(e){const t=Sn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=or(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=Sl(n)!==s||Sl(r)!==a;return l&&(n=s,r=a),{width:n,height:r,$:l}}function Wf(e){return Cn(e)?e:e.contextElement}function Qo(e){const t=Wf(e);if(!or(t))return On(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=G0(t);let a=(s?Sl(n.width):n.width)/r,l=(s?Sl(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const B8=On(0);function U0(e){const t=Zt(e);return!zf()||!t.visualViewport?B8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function z8(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Zt(e)?!1:t}function so(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Wf(e);let a=On(1);t&&(r?Cn(r)&&(a=Qo(r)):a=Qo(e));const l=z8(s,n,r)?U0(s):On(0);let c=(o.left+l.x)/a.x,u=(o.top+l.y)/a.y,f=o.width/a.x,d=o.height/a.y;if(s){const p=Zt(s),h=r&&Cn(r)?Zt(r):r;let m=p,x=hd(m);for(;x&&r&&h!==m;){const v=Qo(x),y=x.getBoundingClientRect(),b=Sn(x),S=y.left+(x.clientLeft+parseFloat(b.paddingLeft))*v.x,w=y.top+(x.clientTop+parseFloat(b.paddingTop))*v.y;c*=v.x,u*=v.y,f*=v.x,d*=v.y,c+=S,u+=w,m=Zt(x),x=hd(m)}}return Nl({width:f,height:d,x:c,y:u})}function fc(e,t){const n=dc(e).scrollLeft;return t?t.left+n:so(Vn(e)).left+n}function Y0(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-fc(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function W8(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",a=Vn(r),l=t?uc(t.floating):!1;if(r===a||l&&s)return n;let c={scrollLeft:0,scrollTop:0},u=On(1);const f=On(0),d=or(r);if((d||!d&&!s)&&((bs(r)!=="body"||qa(a))&&(c=dc(r)),d)){const h=so(r);u=Qo(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const p=a&&!d&&!s?Y0(a,c):On(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x+p.x,y:n.y*u.y-c.scrollTop*u.y+f.y+p.y}}function H8(e){return Array.from(e.getClientRects())}function G8(e){const t=Vn(e),n=dc(e),r=e.ownerDocument.body,o=Kt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Kt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+fc(e);const l=-n.scrollTop;return Sn(r).direction==="rtl"&&(a+=Kt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:a,y:l}}const Bg=25;function U8(e,t){const n=Zt(e),r=Vn(e),o=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,l=0,c=0;if(o){s=o.width,a=o.height;const f=zf();(!f||f&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}const u=fc(r);if(u<=0){const f=r.ownerDocument,d=f.body,p=getComputedStyle(d),h=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(r.clientWidth-d.clientWidth-h);m<=Bg&&(s-=m)}else u<=Bg&&(s+=u);return{width:s,height:a,x:l,y:c}}function Y8(e,t){const n=so(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=or(e)?Qo(e):On(1),a=e.clientWidth*s.x,l=e.clientHeight*s.y,c=o*s.x,u=r*s.y;return{width:a,height:l,x:c,y:u}}function zg(e,t,n){let r;if(t==="viewport")r=U8(e,n);else if(t==="document")r=G8(Vn(e));else if(Cn(t))r=Y8(t,n);else{const o=U0(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Nl(r)}function K0(e,t){const n=Er(e);return n===t||!Cn(n)||as(n)?!1:Sn(n).position==="fixed"||K0(n,t)}function K8(e,t){const n=t.get(e);if(n)return n;let r=ja(e,[],!1).filter(l=>Cn(l)&&bs(l)!=="body"),o=null;const s=Sn(e).position==="fixed";let a=s?Er(e):e;for(;Cn(a)&&!as(a);){const l=Sn(a),c=Bf(a);!c&&l.position==="fixed"&&(o=null),(s?!c&&!o:!c&&l.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||qa(a)&&!c&&K0(e,a))?r=r.filter(f=>f!==a):o=l,a=Er(a)}return t.set(e,r),r}function Z8(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?uc(t)?[]:K8(t,this._c):[].concat(n),r],l=zg(t,a[0],o);let c=l.top,u=l.right,f=l.bottom,d=l.left;for(let p=1;p<a.length;p++){const h=zg(t,a[p],o);c=Kt(h.top,c),u=Sr(h.right,u),f=Sr(h.bottom,f),d=Kt(h.left,d)}return{width:u-d,height:f-c,x:d,y:c}}function q8(e){const{width:t,height:n}=G0(e);return{width:t,height:n}}function X8(e,t,n){const r=or(t),o=Vn(t),s=n==="fixed",a=so(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const c=On(0);function u(){c.x=fc(o)}if(r||!r&&!s)if((bs(t)!=="body"||qa(o))&&(l=dc(t)),r){const h=so(t,!0,s,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else o&&u();s&&!r&&o&&u();const f=o&&!r&&!s?Y0(o,l):On(0),d=a.left+l.scrollLeft-c.x-f.x,p=a.top+l.scrollTop-c.y-f.y;return{x:d,y:p,width:a.width,height:a.height}}function gu(e){return Sn(e).position==="static"}function Wg(e,t){if(!or(e)||Sn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Vn(e)===n&&(n=n.ownerDocument.body),n}function Z0(e,t){const n=Zt(e);if(uc(e))return n;if(!or(e)){let o=Er(e);for(;o&&!as(o);){if(Cn(o)&&!gu(o))return o;o=Er(o)}return n}let r=Wg(e,t);for(;r&&I8(r)&&gu(r);)r=Wg(r,t);return r&&as(r)&&gu(r)&&!Bf(r)?n:r||V8(e)||n}const J8=async function(e){const t=this.getOffsetParent||Z0,n=this.getDimensions,r=await n(e.floating);return{reference:X8(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Q8(e){return Sn(e).direction==="rtl"}const e7={convertOffsetParentRelativeRectToViewportRelativeRect:W8,getDocumentElement:Vn,getClippingRect:Z8,getOffsetParent:Z0,getElementRects:J8,getClientRects:H8,getDimensions:q8,getScale:Qo,isElement:Cn,isRTL:Q8};function q0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function t7(e,t){let n=null,r;const o=Vn(e);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:f,top:d,width:p,height:h}=u;if(l||t(),!p||!h)return;const m=Ri(d),x=Ri(o.clientWidth-(f+p)),v=Ri(o.clientHeight-(d+h)),y=Ri(f),S={rootMargin:-m+"px "+-x+"px "+-v+"px "+-y+"px",threshold:Kt(0,Sr(1,c))||1};let w=!0;function E(N){const _=N[0].intersectionRatio;if(_!==c){if(!w)return a();_?a(!1,_):r=setTimeout(()=>{a(!1,1e-7)},1e3)}_===1&&!q0(u,e.getBoundingClientRect())&&a(),w=!1}try{n=new IntersectionObserver(E,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,S)}n.observe(e)}return a(!0),s}function n7(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Wf(e),f=o||s?[...u?ja(u):[],...t?ja(t):[]]:[];f.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const d=u&&l?t7(u,n):null;let p=-1,h=null;a&&(h=new ResizeObserver(y=>{let[b]=y;b&&b.target===u&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=h)==null||S.observe(t)})),n()}),u&&!c&&h.observe(u),t&&h.observe(t));let m,x=c?so(e):null;c&&v();function v(){const y=so(e);x&&!q0(x,y)&&n(),x=y,m=requestAnimationFrame(v)}return n(),()=>{var y;f.forEach(b=>{o&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),d?.(),(y=h)==null||y.disconnect(),h=null,c&&cancelAnimationFrame(m)}}const r7=T8,o7=P8,s7=M8,a7=L8,i7=D8,Hg=R8,l7=O8,c7=(e,t,n)=>{const r=new Map,o={platform:e7,...n},s={...o.platform,_c:r};return k8(e,t,{...o,platform:s})};var u7=typeof document<"u",d7=function(){},sl=u7?C.useLayoutEffect:d7;function _l(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!_l(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!_l(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function X0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gg(e,t){const n=X0(e);return Math.round(t*n)/n}function mu(e){const t=g.useRef(e);return sl(()=>{t.current=e}),t}function f7(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:a}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[f,d]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=g.useState(r);_l(p,r)||h(r);const[m,x]=g.useState(null),[v,y]=g.useState(null),b=g.useCallback(z=>{z!==N.current&&(N.current=z,x(z))},[]),S=g.useCallback(z=>{z!==_.current&&(_.current=z,y(z))},[]),w=s||m,E=a||v,N=g.useRef(null),_=g.useRef(null),k=g.useRef(f),I=c!=null,F=mu(c),U=mu(o),O=mu(u),R=g.useCallback(()=>{if(!N.current||!_.current)return;const z={placement:t,strategy:n,middleware:p};U.current&&(z.platform=U.current),c7(N.current,_.current,z).then(P=>{const M={...P,isPositioned:O.current!==!1};L.current&&!_l(k.current,M)&&(k.current=M,lc.flushSync(()=>{d(M)}))})},[p,t,n,U,O]);sl(()=>{u===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(z=>({...z,isPositioned:!1})))},[u]);const L=g.useRef(!1);sl(()=>(L.current=!0,()=>{L.current=!1}),[]),sl(()=>{if(w&&(N.current=w),E&&(_.current=E),w&&E){if(F.current)return F.current(w,E,R);R()}},[w,E,R,F,I]);const V=g.useMemo(()=>({reference:N,floating:_,setReference:b,setFloating:S}),[b,S]),D=g.useMemo(()=>({reference:w,floating:E}),[w,E]),$=g.useMemo(()=>{const z={position:n,left:0,top:0};if(!D.floating)return z;const P=Gg(D.floating,f.x),M=Gg(D.floating,f.y);return l?{...z,transform:"translate("+P+"px, "+M+"px)",...X0(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:P,top:M}},[n,l,D.floating,f.x,f.y]);return g.useMemo(()=>({...f,update:R,refs:V,elements:D,floatingStyles:$}),[f,R,V,D,$])}const p7=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Hg({element:r.current,padding:o}).fn(n):{}:r?Hg({element:r,padding:o}).fn(n):{}}}},h7=(e,t)=>{const n=r7(e);return{name:n.name,fn:n.fn,options:[e,t]}},g7=(e,t)=>{const n=o7(e);return{name:n.name,fn:n.fn,options:[e,t]}},m7=(e,t)=>({fn:l7(e).fn,options:[e,t]}),x7=(e,t)=>{const n=s7(e);return{name:n.name,fn:n.fn,options:[e,t]}},v7=(e,t)=>{const n=a7(e);return{name:n.name,fn:n.fn,options:[e,t]}},y7=(e,t)=>{const n=i7(e);return{name:n.name,fn:n.fn,options:[e,t]}},b7=(e,t)=>{const n=p7(e);return{name:n.name,fn:n.fn,options:[e,t]}};var w7="Arrow",J0=g.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return i.jsx(ue.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:i.jsx("polygon",{points:"0,0 30,0 15,10"})})});J0.displayName=w7;var C7=J0;function pc(e){const[t,n]=g.useState(void 0);return at(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,l;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,l=u.blockSize}else a=e.offsetWidth,l=e.offsetHeight;n({width:a,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Hf="Popper",[Q0,Rr]=St(Hf),[S7,e2]=Q0(Hf),t2=e=>{const{__scopePopper:t,children:n}=e,[r,o]=g.useState(null);return i.jsx(S7,{scope:t,anchor:r,onAnchorChange:o,children:n})};t2.displayName=Hf;var n2="PopperAnchor",r2=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=e2(n2,n),a=g.useRef(null),l=Se(t,a),c=g.useRef(null);return g.useEffect(()=>{const u=c.current;c.current=r?.current||a.current,u!==c.current&&s.onAnchorChange(c.current)}),r?null:i.jsx(ue.div,{...o,ref:l})});r2.displayName=n2;var Gf="PopperContent",[E7,N7]=Q0(Gf),o2=g.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:m,...x}=e,v=e2(Gf,n),[y,b]=g.useState(null),S=Se(t,Y=>b(Y)),[w,E]=g.useState(null),N=pc(w),_=N?.width??0,k=N?.height??0,I=r+(s!=="center"?"-"+s:""),F=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},U=Array.isArray(u)?u:[u],O=U.length>0,R={padding:F,boundary:U.filter(j7),altBoundary:O},{refs:L,floatingStyles:V,placement:D,isPositioned:$,middlewareData:z}=f7({strategy:"fixed",placement:I,whileElementsMounted:(...Y)=>n7(...Y,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[h7({mainAxis:o+k,alignmentAxis:a}),c&&g7({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?m7():void 0,...R}),c&&x7({...R}),v7({...R,apply:({elements:Y,rects:Z,availableWidth:q,availableHeight:oe})=>{const{width:ne,height:le}=Z.reference,Ee=Y.floating.style;Ee.setProperty("--radix-popper-available-width",`${q}px`),Ee.setProperty("--radix-popper-available-height",`${oe}px`),Ee.setProperty("--radix-popper-anchor-width",`${ne}px`),Ee.setProperty("--radix-popper-anchor-height",`${le}px`)}}),w&&b7({element:w,padding:l}),k7({arrowWidth:_,arrowHeight:k}),p&&y7({strategy:"referenceHidden",...R})]}),[P,M]=i2(D),G=dn(m);at(()=>{$&&G?.()},[$,G]);const A=z.arrow?.x,W=z.arrow?.y,H=z.arrow?.centerOffset!==0,[T,B]=g.useState();return at(()=>{y&&B(window.getComputedStyle(y).zIndex)},[y]),i.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:$?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:T,"--radix-popper-transform-origin":[z.transformOrigin?.x,z.transformOrigin?.y].join(" "),...z.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:i.jsx(E7,{scope:n,placedSide:P,onArrowChange:E,arrowX:A,arrowY:W,shouldHideArrow:H,children:i.jsx(ue.div,{"data-side":P,"data-align":M,...x,ref:S,style:{...x.style,animation:$?void 0:"none"}})})})});o2.displayName=Gf;var s2="PopperArrow",_7={top:"bottom",right:"left",bottom:"top",left:"right"},a2=g.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=N7(s2,r),a=_7[s.placedSide];return i.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:i.jsx(C7,{...o,ref:n,style:{...o.style,display:"block"}})})});a2.displayName=s2;function j7(e){return e!==null}var k7=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=o.arrow?.centerOffset!==0,l=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,f]=i2(n),d={start:"0%",center:"50%",end:"100%"}[f],p=(o.arrow?.x??0)+l/2,h=(o.arrow?.y??0)+c/2;let m="",x="";return u==="bottom"?(m=a?d:`${p}px`,x=`${-c}px`):u==="top"?(m=a?d:`${p}px`,x=`${r.floating.height+c}px`):u==="right"?(m=`${-c}px`,x=a?d:`${h}px`):u==="left"&&(m=`${r.floating.width+c}px`,x=a?d:`${h}px`),{data:{x:m,y:x}}}});function i2(e){const[t,n="center"]=e.split("-");return[t,n]}var Xa=t2,Ja=r2,hc=o2,gc=a2,R7="Portal",ws=g.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=g.useState(!1);at(()=>s(!0),[]);const a=n||o&&globalThis?.document?.body;return a?ho.createPortal(i.jsx(ue.div,{...r,ref:t}),a):null});ws.displayName=R7;function M7(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var Tt=e=>{const{present:t,children:n}=e,r=D7(t),o=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),s=Se(r.ref,A7(o));return typeof n=="function"||r.isPresent?g.cloneElement(o,{ref:s}):null};Tt.displayName="Presence";function D7(e){const[t,n]=g.useState(),r=g.useRef(null),o=g.useRef(e),s=g.useRef("none"),a=e?"mounted":"unmounted",[l,c]=M7(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const u=Mi(r.current);s.current=l==="mounted"?u:"none"},[l]),at(()=>{const u=r.current,f=o.current;if(f!==e){const p=s.current,h=Mi(u);e?c("MOUNT"):h==="none"||u?.display==="none"?c("UNMOUNT"):c(f&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),at(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,d=h=>{const x=Mi(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&x&&(c("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=h=>{h.target===t&&(s.current=Mi(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:g.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Mi(e){return e?.animationName||"none"}function A7(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var T7=Symbol("radix.slottable");function P7(e){const t=({children:n})=>i.jsx(i.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=T7,t}var O7=g[" useInsertionEffect ".trim().toString()]||at;function gt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,a]=L7({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:o;{const f=g.useRef(e!==void 0);g.useEffect(()=>{const d=f.current;d!==l&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=l},[l,r])}const u=g.useCallback(f=>{if(l){const d=I7(f)?f(e):f;d!==e&&a.current?.(d)}else s(f)},[l,e,s,a]);return[c,u]}function L7({defaultProp:e,onChange:t}){const[n,r]=g.useState(e),o=g.useRef(n),s=g.useRef(t);return O7(()=>{s.current=t},[t]),g.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function I7(e){return typeof e=="function"}var l2=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),F7="VisuallyHidden",c2=g.forwardRef((e,t)=>i.jsx(ue.span,{...e,ref:t,style:{...l2,...e.style}}));c2.displayName=F7;var $7=c2,[mc]=St("Tooltip",[Rr]),xc=Rr(),u2="TooltipProvider",V7=700,gd="tooltip.open",[B7,Uf]=mc(u2),d2=e=>{const{__scopeTooltip:t,delayDuration:n=V7,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,a=g.useRef(!0),l=g.useRef(!1),c=g.useRef(0);return g.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),i.jsx(B7,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:g.useCallback(u=>{l.current=u},[]),disableHoverableContent:o,children:s})};d2.displayName=u2;var ka="Tooltip",[z7,Qa]=mc(ka),f2=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:a,delayDuration:l}=e,c=Uf(ka,e.__scopeTooltip),u=xc(t),[f,d]=g.useState(null),p=tt(),h=g.useRef(0),m=a??c.disableHoverableContent,x=l??c.delayDuration,v=g.useRef(!1),[y,b]=gt({prop:r,defaultProp:o??!1,onChange:_=>{_?(c.onOpen(),document.dispatchEvent(new CustomEvent(gd))):c.onClose(),s?.(_)},caller:ka}),S=g.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),w=g.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,b(!0)},[b]),E=g.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b(!1)},[b]),N=g.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,b(!0),h.current=0},x)},[x,b]);return g.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),i.jsx(Xa,{...u,children:i.jsx(z7,{scope:t,contentId:p,open:y,stateAttribute:S,trigger:f,onTriggerChange:d,onTriggerEnter:g.useCallback(()=>{c.isOpenDelayedRef.current?N():w()},[c.isOpenDelayedRef,N,w]),onTriggerLeave:g.useCallback(()=>{m?E():(window.clearTimeout(h.current),h.current=0)},[E,m]),onOpen:w,onClose:E,disableHoverableContent:m,children:n})})};f2.displayName=ka;var md="TooltipTrigger",p2=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Qa(md,n),s=Uf(md,n),a=xc(n),l=g.useRef(null),c=Se(t,l,o.onTriggerChange),u=g.useRef(!1),f=g.useRef(!1),d=g.useCallback(()=>u.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),i.jsx(Ja,{asChild:!0,...a,children:i.jsx(ue.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:te(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:te(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:te(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:te(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:te(e.onBlur,o.onClose),onClick:te(e.onClick,o.onClose)})})});p2.displayName=md;var Yf="TooltipPortal",[W7,H7]=mc(Yf,{forceMount:void 0}),h2=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Qa(Yf,t);return i.jsx(W7,{scope:t,forceMount:n,children:i.jsx(Tt,{present:n||s.open,children:i.jsx(ws,{asChild:!0,container:o,children:r})})})};h2.displayName=Yf;var is="TooltipContent",g2=g.forwardRef((e,t)=>{const n=H7(is,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,a=Qa(is,e.__scopeTooltip);return i.jsx(Tt,{present:r||a.open,children:a.disableHoverableContent?i.jsx(m2,{side:o,...s,ref:t}):i.jsx(G7,{side:o,...s,ref:t})})}),G7=g.forwardRef((e,t)=>{const n=Qa(is,e.__scopeTooltip),r=Uf(is,e.__scopeTooltip),o=g.useRef(null),s=Se(t,o),[a,l]=g.useState(null),{trigger:c,onClose:u}=n,f=o.current,{onPointerInTransitChange:d}=r,p=g.useCallback(()=>{l(null),d(!1)},[d]),h=g.useCallback((m,x)=>{const v=m.currentTarget,y={x:m.clientX,y:m.clientY},b=Z7(y,v.getBoundingClientRect()),S=q7(y,b),w=X7(x.getBoundingClientRect()),E=Q7([...S,...w]);l(E),d(!0)},[d]);return g.useEffect(()=>()=>p(),[p]),g.useEffect(()=>{if(c&&f){const m=v=>h(v,f),x=v=>h(v,c);return c.addEventListener("pointerleave",m),f.addEventListener("pointerleave",x),()=>{c.removeEventListener("pointerleave",m),f.removeEventListener("pointerleave",x)}}},[c,f,h,p]),g.useEffect(()=>{if(a){const m=x=>{const v=x.target,y={x:x.clientX,y:x.clientY},b=c?.contains(v)||f?.contains(v),S=!J7(y,a);b?p():S&&(p(),u())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[c,f,a,u,p]),i.jsx(m2,{...e,ref:s})}),[U7,Y7]=mc(ka,{isInside:!1}),K7=P7("TooltipContent"),m2=g.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...l}=e,c=Qa(is,n),u=xc(n),{onClose:f}=c;return g.useEffect(()=>(document.addEventListener(gd,f),()=>document.removeEventListener(gd,f)),[f]),g.useEffect(()=>{if(c.trigger){const d=p=>{p.target?.contains(c.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,f]),i.jsx(vs,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:f,children:i.jsxs(hc,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[i.jsx(K7,{children:r}),i.jsx(U7,{scope:n,isInside:!0,children:i.jsx($7,{id:c.contentId,role:"tooltip",children:o||r})})]})})});g2.displayName=is;var x2="TooltipArrow",v2=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=xc(n);return Y7(x2,n).isInside?null:i.jsx(gc,{...o,...r,ref:t})});v2.displayName=x2;function Z7(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function q7(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function X7(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function J7(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const l=t[s],c=t[a],u=l.x,f=l.y,d=c.x,p=c.y;f>r!=p>r&&n<(d-u)*(r-f)/(p-f)+u&&(o=!o)}return o}function Q7(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),e9(t)}function e9(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var t9=d2,n9=f2,r9=p2,o9=h2,y2=g2,s9=v2;const Mt=t9,Vt=n9,Bt=r9,Dt=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>i.jsx(o9,{children:i.jsxs(y2,{ref:r,sideOffset:t,className:j("z-tooltip max-w-xs rounded-lg px-3 py-1.5 text-xs","bg-black text-white dark:bg-white dark:text-black dark:border dark:border-gray-200 dark: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,children:[n.children,i.jsx(s9,{className:"fill-black dark:fill-white"})]})}));Dt.displayName=y2.displayName;const a9=e=>!!(e==null||typeof e=="string"&&e.trim()===""||Array.isArray(e)&&e.length===0),zt=C.forwardRef(({content:e,children:t,contentProps:n,providerProps:r,triggerProps:o,show:s=!0,...a},l)=>!s||a9(e)?i.jsx(i.Fragment,{children:t}):i.jsx(Mt,{delayDuration:0,...r,children:i.jsxs(Vt,{...a,children:[i.jsx(Bt,{asChild:!0,className:j("flex items-center justify-center",o?.className),...o,children:i.jsx("div",{children:t})}),i.jsx(Dt,{ref:l,...n,children:e})]})}));zt.displayName="Tooltip";const i9=new Set(["ArrowLeft","ArrowRight","ArrowCircleLeft","ArrowCircleRight","ArrowCircleUpLeft","ArrowBendUpLeft","ArrowBendUpRight","ArrowElbowDownRight","ArrowUpRight","ArrowSquareIn","CaretLeft","CaretRight","CaretDoubleLeft","CaretDoubleRight","CaretCircleRight","SignOut","Export","PhoneOutgoing","ToggleLeft","ToggleRight","TrendUp","TrendDown","SortAscending","SortDescending","Play","PlayCircle"]),l9=({size:e=16,weight:t,...n})=>i.jsxs("svg",{width:e,height:e,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:[i.jsx("path",{d:"M22.5987 5.33325C21.7107 7.76002 20.9907 8.47896 18.565 9.36657C20.9907 10.2545 21.7107 10.9746 22.5987 13.4003C23.4867 10.9746 24.2064 10.2545 26.632 9.36657C24.2064 8.47896 23.4867 7.76002 22.5987 5.33325Z",fill:"url(#paint0_linear_12357_32157)"}),i.jsx("path",{d:"M13.7673 19.5838H18.8632C18.9599 19.5838 19.0557 19.5641 19.1446 19.526C19.2336 19.4879 19.3139 19.4321 19.3806 19.3621C19.4474 19.2921 19.4993 19.2092 19.5331 19.1186C19.567 19.0279 19.5821 18.9313 19.5775 18.8347C19.3936 15.3146 17.913 11.9873 15.4211 9.49435C12.9292 7.0014 9.60247 5.51937 6.0825 5.33405C5.98585 5.32949 5.88927 5.34459 5.79861 5.37842C5.70796 5.41226 5.62511 5.46414 5.55508 5.53092C5.48504 5.59769 5.42929 5.67798 5.39117 5.76693C5.35306 5.85587 5.33339 5.95162 5.33334 6.04839V11.7631C5.33479 11.9429 5.40368 12.1157 5.5264 12.2471C5.64912 12.3786 5.81672 12.4592 5.99602 12.473C7.49759 12.6156 8.91561 13.2294 10.0473 14.2266C11.179 15.2237 11.9665 16.5532 12.2971 18.0248C12.3447 18.2304 12.3397 18.4446 12.2823 18.6477C12.225 18.8507 12.1172 19.036 11.9691 19.1862C11.8543 19.3013 11.7179 19.3925 11.5678 19.4548C11.4176 19.517 11.2567 19.5491 11.0941 19.549H6.04656C5.9529 19.549 5.86016 19.5674 5.77363 19.6033C5.6871 19.6391 5.60847 19.6917 5.54224 19.7579C5.47601 19.8241 5.42348 19.9028 5.38764 19.9893C5.35179 20.0758 5.33334 20.1686 5.33334 20.2622V25.9534C5.3332 26.047 5.35151 26.1397 5.38723 26.2262C5.42295 26.3127 5.47538 26.3914 5.54152 26.4576C5.60765 26.5239 5.6862 26.5764 5.77267 26.6123C5.85914 26.6481 5.95183 26.6666 6.04544 26.6666H11.7321C11.8257 26.6666 11.9184 26.6481 12.0049 26.6123C12.0913 26.5764 12.1699 26.5239 12.236 26.4576C12.3022 26.3914 12.3546 26.3127 12.3903 26.2262C12.426 26.1397 12.4443 26.047 12.4442 25.9534V20.8991C12.4444 20.5717 12.5745 20.2579 12.8059 20.0263L12.889 19.9421C13.0038 19.8271 13.1402 19.7358 13.2903 19.6735C13.4404 19.6113 13.6014 19.5793 13.7639 19.5793",fill:"url(#paint1_linear_12357_32157)"}),i.jsxs("defs",{children:[i.jsxs("linearGradient",{id:"paint0_linear_12357_32157",x1:"19.6597",y1:"4.82531",x2:"26.6515",y2:"9.13909",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"#D073F6"}),i.jsx("stop",{offset:"1",stopColor:"#5E77FD"})]}),i.jsxs("linearGradient",{id:"paint1_linear_12357_32157",x1:"7.26631",y1:"3.98998",x2:"21.839",y2:"9.9936",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"#D073F6"}),i.jsx("stop",{offset:"0.5",stopColor:"#5E77FD"}),i.jsx("stop",{offset:"1",stopColor:"#21B8F2"})]})]})]}),c9=["M18.9181 12.7058C19.0037 12.6944 19.1257 12.697 19.2117 12.7065C20.0405 12.7978 20.5891 13.525 20.4977 14.339C20.457 14.7119 20.2693 15.0531 19.9765 15.2868C19.5409 15.6344 18.9722 15.7133 18.451 15.49C18.3061 15.4279 18.1314 15.27 17.9644 15.258C17.8207 15.2477 17.6876 15.3137 17.5806 15.406C17.4072 15.5557 17.4497 15.7744 17.4357 15.9913C17.4135 16.4233 17.2113 16.8309 16.8594 17.0887C16.6478 17.2437 16.3364 17.3523 16.3273 17.6707C16.3141 18.1211 16.736 18.1566 16.9936 18.4213C17.2715 18.7068 17.4447 19.0819 17.4402 19.4878C17.436 19.8629 17.2614 20.2553 16.9924 20.5185C16.7087 20.7961 16.3372 20.9337 15.9402 20.9259C15.5495 20.9194 15.1782 20.7542 14.9111 20.4682C14.6517 20.1891 14.5115 19.8193 14.5206 19.4379C14.5334 19.0006 14.7435 18.5756 15.0952 18.3111C15.2188 18.2181 15.3959 18.1347 15.5015 18.0361C15.5897 17.9421 15.6487 17.8201 15.6397 17.6892C15.6144 17.3227 15.2509 17.2267 15.0111 17.014C14.6316 16.6775 14.5314 16.3135 14.5133 15.8196C14.5082 15.6786 14.4509 15.4921 14.3338 15.4104C13.9997 15.1633 13.7828 15.408 13.4934 15.5333C12.5832 15.9275 11.504 15.3128 11.4627 14.2985C11.4454 13.8728 11.5544 13.5152 11.8351 13.2039C12.0824 12.9282 12.4296 12.7633 12.7991 12.7463C13.2294 12.7259 13.5874 12.8384 13.9089 13.1305C14.1204 13.3283 14.2938 13.6296 14.3424 13.9153C14.3895 14.1917 14.2881 14.4838 14.5293 14.692C14.8485 14.9676 15.1091 14.728 15.4122 14.5919C15.5483 14.5307 15.6937 14.4924 15.8423 14.4787C16.0869 14.454 16.3336 14.4936 16.5582 14.5938C16.8499 14.7248 17.1147 14.9836 17.4447 14.6963C17.6755 14.4953 17.576 14.176 17.6209 13.8989C17.6616 13.6607 17.7624 13.4369 17.9138 13.2488C18.1784 12.9245 18.5042 12.7494 18.9181 12.7058Z","M15.8666 11.5786C16.3162 11.5147 16.7322 11.8285 16.7954 12.2792C16.8587 12.7298 16.5452 13.1465 16.0955 13.2094C15.6464 13.2723 15.2314 12.9586 15.1683 12.5086C15.1051 12.0585 15.4177 11.6423 15.8666 11.5786Z","M18.9129 16.9054C19.3643 16.835 19.7865 17.1471 19.8528 17.6001C19.9192 18.0532 19.6043 18.4736 19.1517 18.5363C18.7045 18.5981 18.2912 18.2871 18.2256 17.8395C18.1601 17.3919 18.4668 16.9749 18.9129 16.9054Z","M21.6791 11.7651C22.1308 11.705 22.5451 12.0245 22.6029 12.4774C22.6608 12.9303 22.3402 13.3441 21.8881 13.4001C21.4388 13.4557 21.0291 13.1369 20.9716 12.6868C20.9141 12.2367 21.2303 11.8247 21.6791 11.7651Z","M15.8428 21.82C16.2915 21.7448 16.7159 22.0491 16.7897 22.499C16.8636 22.9489 16.5587 23.3734 16.1096 23.4461C15.6623 23.5186 15.2408 23.2145 15.1673 22.7664C15.0937 22.3182 15.3959 21.895 15.8428 21.82Z","M10.0689 11.7677C10.5197 11.6976 10.9412 12.0087 11.008 12.461C11.0748 12.9132 10.7614 13.3335 10.3097 13.3973C9.86249 13.4605 9.44817 13.1501 9.38202 12.7023C9.31584 12.2545 9.62264 11.8371 10.0689 11.7677Z","M12.8315 16.9047C13.281 16.8409 13.697 17.1547 13.7603 17.6054C13.8235 18.056 13.51 18.4726 13.0603 18.5356C12.6112 18.5984 12.1963 18.2848 12.1331 17.8347C12.0699 17.3847 12.3825 16.9685 12.8315 16.9047Z","M21.6634 18.5456C22.0785 18.4833 22.4654 18.7699 22.5278 19.1859C22.5902 19.6018 22.3045 19.9898 21.8895 20.0526C21.4742 20.1155 21.0867 19.8288 21.0242 19.4125C20.9617 18.9962 21.248 18.608 21.6634 18.5456Z","M10.0732 18.5491C10.3444 18.5003 10.6208 18.6025 10.7955 18.8161C10.9702 19.0298 11.0158 19.3214 10.9147 19.5784C10.8137 19.8354 10.5818 20.0174 10.3086 20.0541C9.89902 20.1092 9.52055 19.8262 9.45654 19.417C9.39253 19.0078 9.66641 18.6223 10.0732 18.5491Z","M15.8697 8.57548C16.2228 8.51297 16.5598 8.74843 16.6234 9.10208C16.687 9.45572 16.4533 9.79432 16.1007 9.85933C15.7463 9.92466 15.4064 9.68894 15.3425 9.33354C15.2785 8.97814 15.5149 8.63832 15.8697 8.57548Z","M25.4409 15.4978C25.6684 15.4275 25.9097 15.5556 25.9795 15.7838C26.0494 16.0119 25.9213 16.2536 25.6936 16.3234C25.4662 16.393 25.2255 16.2649 25.1558 16.0371C25.0861 15.8093 25.2136 15.5679 25.4409 15.4978Z","M20.5428 7.18061C20.7775 7.14535 20.9964 7.30701 21.0324 7.54215C21.0684 7.77726 20.9079 7.99727 20.6734 8.03416C20.4378 8.07121 20.217 7.90936 20.1808 7.67306C20.1447 7.4368 20.3069 7.21606 20.5428 7.18061Z","M6.36217 15.488C6.59397 15.4505 6.81298 15.6061 6.85458 15.8377C6.89614 16.0693 6.74498 16.2916 6.51467 16.3375C6.36195 16.3679 6.20469 16.3134 6.10345 16.1947C6.00219 16.0761 5.97272 15.912 6.02635 15.7654C6.08002 15.6189 6.20842 15.5128 6.36217 15.488Z","M20.4636 23.9889C20.6162 23.9601 20.7724 24.016 20.8723 24.1352C20.9722 24.2543 21.0002 24.4182 20.9456 24.5638C20.891 24.7095 20.7623 24.8144 20.6088 24.8381C20.558 24.846 20.5062 24.8447 20.4558 24.8342C20.2549 24.7924 20.1114 24.614 20.1133 24.4083C20.1152 24.2026 20.2619 24.027 20.4636 23.9889Z","M11.1449 7.28854C11.377 7.2425 11.6026 7.39338 11.6492 7.62593C11.6957 7.85845 11.5458 8.08492 11.314 8.13227C11.0812 8.17981 10.8541 8.02884 10.8073 7.79539C10.7605 7.56191 10.9118 7.33477 11.1449 7.28854Z","M11.1996 23.9599C11.424 23.89 11.6627 24.0145 11.7345 24.2388C11.8062 24.4631 11.6841 24.7034 11.4609 24.7773C11.2609 24.8435 11.0425 24.754 10.946 24.5663C10.888 24.4536 10.8828 24.3209 10.9317 24.2038C10.9806 24.0869 11.0787 23.9975 11.1996 23.9599Z","M9.24088 15.5032C9.38779 15.4797 9.53596 15.5374 9.62835 15.6543C9.72077 15.7712 9.74299 15.929 9.68648 16.0669C9.62997 16.2049 9.50355 16.3015 9.35587 16.3196C9.13332 16.3468 8.92996 16.1905 8.89861 15.968C8.8673 15.7455 9.01951 15.5388 9.24088 15.5032Z","M22.5853 15.5079C22.8058 15.4517 23.0299 15.5856 23.0854 15.8068C23.1408 16.028 23.0066 16.2522 22.7858 16.3072C22.5659 16.362 22.3431 16.228 22.2879 16.0078C22.2327 15.7875 22.3657 15.5639 22.5853 15.5079Z","M7.72145 10.7312C7.86888 10.7178 8.01203 10.785 8.09621 10.9071C8.18037 11.0291 8.1925 11.1871 8.12798 11.3206C8.06343 11.4541 7.93222 11.5425 7.7845 11.5519C7.56023 11.5663 7.36613 11.3973 7.34889 11.1727C7.33162 10.9482 7.49763 10.7514 7.72145 10.7312Z","M12.5084 9.73563C12.6462 9.68127 12.8025 9.70549 12.9175 9.79901C13.0325 9.89249 13.0884 10.0408 13.0637 10.1872C13.039 10.3335 12.9377 10.4552 12.7984 10.5057C12.5872 10.5822 12.3539 10.4745 12.2746 10.2639C12.1953 10.0534 12.2995 9.81807 12.5084 9.73563Z","M12.6283 21.3856C12.7719 21.3478 12.9247 21.3906 13.0278 21.4976C13.131 21.6045 13.1685 21.759 13.1258 21.9015C13.0832 22.044 12.9671 22.1523 12.8223 22.1848C12.604 22.2337 12.3868 22.0984 12.334 21.8806C12.2811 21.6628 12.412 21.4427 12.6283 21.3856Z","M15.9111 25.1808C16.134 25.1536 16.3372 25.3111 16.367 25.5342C16.3967 25.7573 16.2418 25.9628 16.0196 25.9951C15.8736 26.0164 15.7274 25.9573 15.6369 25.8405C15.5464 25.7237 15.5256 25.5672 15.5823 25.4306C15.639 25.2941 15.7646 25.1987 15.9111 25.1808Z","M19.1884 9.66256C19.4118 9.62987 19.6195 9.78455 19.6527 10.0084C19.686 10.2323 19.5322 10.4408 19.3089 10.4747C19.0848 10.5087 18.8757 10.3539 18.8424 10.1292C18.8091 9.90452 18.9641 9.69539 19.1884 9.66256Z","M15.9093 6.0062C16.132 5.96717 16.3441 6.11637 16.3832 6.33952C16.4223 6.56268 16.2736 6.77536 16.0509 6.81467C15.8281 6.85401 15.6157 6.70479 15.5765 6.48144C15.5374 6.25809 15.6865 6.04527 15.9093 6.0062Z","M24.17 10.7683C24.3155 10.744 24.4628 10.8 24.5555 10.915C24.6482 11.0301 24.672 11.1862 24.6177 11.3237C24.5634 11.4612 24.4394 11.5587 24.2933 11.579C24.0717 11.6096 23.8666 11.4562 23.8329 11.2346C23.7991 11.0129 23.9493 10.8052 24.17 10.7683Z","M24.1577 20.4064C24.3772 20.3549 24.5968 20.4912 24.6487 20.711C24.7005 20.9309 24.5652 21.1513 24.346 21.2039C24.126 21.2567 23.905 21.1205 23.8529 20.8998C23.8008 20.6791 23.9374 20.458 24.1577 20.4064Z","M19.0546 21.4122C19.2766 21.3851 19.4791 21.5417 19.5092 21.7637C19.5394 21.9858 19.3859 22.1909 19.1648 22.2241C19.019 22.2461 18.8728 22.1876 18.782 22.0712C18.6912 21.9548 18.67 21.7985 18.7265 21.662C18.783 21.5256 18.9083 21.4301 19.0546 21.4122Z","M7.6583 20.4175C7.80355 20.3896 7.95245 20.4426 8.04768 20.556C8.14294 20.6694 8.16967 20.8255 8.11756 20.9642C8.06546 21.1029 7.94268 21.2026 7.7965 21.2249C7.57628 21.2585 7.36979 21.1092 7.33212 20.8891C7.29445 20.6691 7.43948 20.4593 7.6583 20.4175Z"],u9=({size:e=16,weight:t,...n})=>i.jsx("svg",{width:e,height:e,viewBox:"4 4 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:c9.map((r,o)=>i.jsx("path",{d:r,fill:"currentColor"},o))}),Ug={light:"ph-light",fill:"ph-fill"},al={xs:12,sm:16,md:20,lg:24,xl:32},d9={AidaLogo:l9,Concierge:u9};function f9(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").toLowerCase()}function p9(e){return typeof e=="number"?e:e&&al[e]!=null?al[e]:e&&!Number.isNaN(Number(e))?Number(e):al.md}function h9(e){if(!e)return;const t=/(?:^|\s)(?:size|w|h|text)-\[(\d+(?:\.\d+)?)px\]/.exec(e);if(t)return Number(t[1]);const n=/(?:^|\s)(?:size|w|h)-(\d+(?:\.\d+)?)(?:\s|$|!)/.exec(e);if(n)return Number(n[1])*4}function g9({label:e,ariaLabel:t,ariaLabelledBy:n,ariaHidden:r,role:o,tooltip:s}){if(r!=null)return{"aria-hidden":r};const a=e??t??s;return a!=null||n!=null?{role:o??"img","aria-label":a,"aria-labelledby":n}:{"aria-hidden":!0}}const X=C.forwardRef(({name:e,weight:t="light",size:n,className:r,color:o,tooltip:s,tooltipProps:a,autoMirrorRtl:l,style:c,label:u,"aria-label":f,"aria-labelledby":d,"aria-hidden":p,role:h,...m},x)=>{if(!e)return null;const v=n!=null?p9(n):h9(r)??al.md,y=l??i9.has(e),b=g9({label:u,ariaLabel:f,ariaLabelledBy:d,ariaHidden:p,role:h,tooltip:s}),S=d9[e];if(S){const N=i.jsx(S,{size:v,color:o??"currentColor",className:j(y&&"rtl:scale-x-[-1]",r),"data-icon":e,...b,...m});return s?i.jsx(zt,{content:s,...a,children:N}):N}const w={fontSize:v,lineHeight:1,...o?{color:o}:null,...c},E=i.jsx("i",{ref:x,"data-icon":e,...b,className:j("inline-flex shrink-0",Ug[t]??Ug.light,`ph-${f9(e)}`,y&&"rtl:scale-x-[-1]",r),style:w,...m});return s?i.jsx(zt,{content:s,...a,children:E}):E});X.displayName="Icon";const m9=["Activity","AidaLogo","Archive","ArrowBendUpLeft","ArrowBendUpRight","ArrowCircleLeft","ArrowCircleRight","ArrowCircleUp","ArrowCircleUpLeft","ArrowClockwise","ArrowCounterClockwise","ArrowDown","ArrowElbowDownRight","ArrowLeft","ArrowRight","ArrowSquareIn","ArrowSquareOut","ArrowUp","ArrowUpRight","ArrowsClockwise","ArrowsCounterClockwise","ArrowsDownUp","ArrowsInSimple","ArrowsLeftRight","ArrowsOutSimple","Bank","BellRinging","BellSimple","BellSimpleSlash","Binoculars","BoundingBox","BracketsAngle","BracketsCurly","BracketsSquare","BugBeetle","Buildings","Calendar","CalendarDots","CalendarBlank","CalendarCheck","CalendarPlus","Camera","Cards","CaretCircleRight","CaretDoubleLeft","CaretDoubleRight","CaretDown","CaretLeft","CaretRight","CaretUp","CaretUpDown","Certificate","ChartBar","ChartLine","ChartLineUp","ChartPie","Check","CheckCircle","CheckSquare","CheckSquareOffset","Circle","CircleNotch","Clock","ClockClockwise","ClockCountdown","ClockCounterClockwise","CloudSlash","Code","Columns","Concierge","Copy","CopySimple","CreditCard","GoogleLogo","AppleLogo","PaypalLogo","CurrencyCircleDollar","CurrencyDollar","Desktop","Detective","DeviceMobileCamera","DeviceMobileSpeaker","DotsNine","DotsSixVertical","DotsThree","DotsThreeCircleVertical","DotsThreeOutline","DotsThreeVertical","Download","DownloadSimple","Envelope","Equals","Eraser","Export","Eye","EyeClosed","EyeSlash","File","FileArchive","FileArrowUp","FileCsv","FileDoc","FileJpg","FilePdf","FilePlus","FilePng","FilePpt","FileSearch","FileMagnifyingGlass","FileTxt","FileXls","FileZip","Flag","FlagBanner","FunnelSimple","Gear","GearFine","GearSix","GitBranch","GitFork","GlobeHemisphereWest","Hash","Headset","IdentificationCard","Image","ImageSquare","Info","Intersect","Key","Layout","Lifebuoy","Lightbulb","Lightning","LinkBreak","LinkSimple","LinkSimpleHorizontal","List","ListBullets","ListChecks","ListNumbers","ListPlus","Lock","LockKey","MagicWand","MagnifyingGlass","MapPin","Microphone","Minus","MinusCircle","Money","Monitor","Moon","Network","NetworkSlash","NotePencil","Notepad","Notification","NumberCircleOne","Package","Palette","Password","Pause","PauseCircle","Pencil","PencilSimple","PencilSimpleLine","Percent","Phone","PhoneCall","PhoneOutgoing","PhonePlus","PhoneSlash","PhoneX","Play","PlayCircle","Plug","Plugs","Plus","PlusCircle","Prohibit","PushPin","PushPinSimple","PushPinSimpleSlash","Question","Queue","RadioButton","Repeat","Rows","SelectionInverse","ShareNetwork","ShieldCheck","ShieldSlash","ShieldWarning","ShoppingCart","ShoppingCartSimple","Sidebar","SignOut","SortAscending","SortDescending","Sparkle","Square","SquareHalf","SquareHalfBottom","SquaresFour","Stack","Star","Storefront","Stop","Sun","Swap","Swatches","Table","Tag","TerminalWindow","TestTube","TextColumns","TextT","Textbox","ThumbsDown","ThumbsUp","Timer","ToggleLeft","ToggleRight","Translate","Trash","TreeStructure","TrendDown","TrendUp","Upload","UploadSimple","User","UserCircle","UserPlus","UserSwitch","Vault","Wallet","Warning","WarningCircle","X","XCircle"],Kf=C.forwardRef(({icon:e,title:t,description:n,iconProps:r,className:o,onClose:s,closeLabel:a,...l},c)=>i.jsxs(ZC,{ref:c,className:j("app-alert",s&&"relative pr-10",o),...l,children:[e&&i.jsx(X,{name:e,className:j("size-4",r?.className),...r}),t&&i.jsx(qC,{children:t}),n&&i.jsx(XC,{children:n}),s&&i.jsx("button",{type:"button",onClick:s,"aria-label":a??"Close",className:"absolute right-2 top-2 rounded p-1 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:i.jsx(X,{name:"X",size:"sm"})})]}));Kf.displayName="Alert";function Yg(e){const t=x9(e),n=g.forwardRef((r,o)=>{const{children:s,...a}=r,l=g.Children.toArray(s),c=l.find(y9);if(c){const u=c.props.children,f=l.map(d=>d===c?g.Children.count(u)>1?g.Children.only(null):g.isValidElement(u)?u.props.children:null:d);return i.jsx(t,{...a,ref:o,children:g.isValidElement(u)?g.cloneElement(u,void 0,f):null})}return i.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function x9(e){const t=g.forwardRef((n,r)=>{const{children:o,...s}=n;if(g.isValidElement(o)){const a=w9(o),l=b9(s,o.props);return o.type!==g.Fragment&&(l.ref=r?At(r,a):a),g.cloneElement(o,l)}return g.Children.count(o)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var v9=Symbol("radix.slottable");function y9(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===v9}function b9(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...l)=>{const c=s(...l);return o(...l),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function w9(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function vc(e){const t=e+"CollectionProvider",[n,r]=St(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=x=>{const{scope:v,children:y}=x,b=C.useRef(null),S=C.useRef(new Map).current;return i.jsx(o,{scope:v,itemMap:S,collectionRef:b,children:y})};a.displayName=t;const l=e+"CollectionSlot",c=Yg(l),u=C.forwardRef((x,v)=>{const{scope:y,children:b}=x,S=s(l,y),w=Se(v,S.collectionRef);return i.jsx(c,{ref:w,children:b})});u.displayName=l;const f=e+"CollectionItemSlot",d="data-radix-collection-item",p=Yg(f),h=C.forwardRef((x,v)=>{const{scope:y,children:b,...S}=x,w=C.useRef(null),E=Se(v,w),N=s(f,y);return C.useEffect(()=>(N.itemMap.set(w,{ref:w,...S}),()=>{N.itemMap.delete(w)})),i.jsx(p,{[d]:"",ref:E,children:b})});h.displayName=f;function m(x){const v=s(e+"CollectionConsumer",x);return C.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const S=Array.from(b.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((N,_)=>S.indexOf(N.ref.current)-S.indexOf(_.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:a,Slot:u,ItemSlot:h},m,r]}var yc="Collapsible",[C9,b2]=St(yc),[S9,Zf]=C9(yc),w2=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:s,onOpenChange:a,...l}=e,[c,u]=gt({prop:r,defaultProp:o??!1,onChange:a,caller:yc});return i.jsx(S9,{scope:n,disabled:s,contentId:tt(),open:c,onOpenToggle:g.useCallback(()=>u(f=>!f),[u]),children:i.jsx(ue.div,{"data-state":Xf(c),"data-disabled":s?"":void 0,...l,ref:t})})});w2.displayName=yc;var C2="CollapsibleTrigger",S2=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Zf(C2,n);return i.jsx(ue.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Xf(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:te(e.onClick,o.onOpenToggle)})});S2.displayName=C2;var qf="CollapsibleContent",E2=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Zf(qf,e.__scopeCollapsible);return i.jsx(Tt,{present:n||o.open,children:({present:s})=>i.jsx(E9,{...r,ref:t,present:s})})});E2.displayName=qf;var E9=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...s}=e,a=Zf(qf,n),[l,c]=g.useState(r),u=g.useRef(null),f=Se(t,u),d=g.useRef(0),p=d.current,h=g.useRef(0),m=h.current,x=a.open||l,v=g.useRef(x),y=g.useRef(void 0);return g.useEffect(()=>{const b=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(b)},[]),at(()=>{const b=u.current;if(b){y.current=y.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const S=b.getBoundingClientRect();d.current=S.height,h.current=S.width,v.current||(b.style.transitionDuration=y.current.transitionDuration,b.style.animationName=y.current.animationName),c(r)}},[a.open,r]),i.jsx(ue.div,{"data-state":Xf(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!x,...s,ref:f,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:x&&o})});function Xf(e){return e?"open":"closed"}var N9=w2,_9=S2,j9=E2,k9=g.createContext(void 0);function Cs(e){const t=g.useContext(k9);return e||t||"ltr"}var En="Accordion",R9=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Jf,M9,D9]=vc(En),[bc]=St(En,[D9,b2]),Qf=b2(),N2=C.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,s=r;return i.jsx(Jf.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?i.jsx(O9,{...s,ref:t}):i.jsx(P9,{...o,ref:t})})});N2.displayName=En;var[_2,A9]=bc(En),[j2,T9]=bc(En,{collapsible:!1}),P9=C.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:s=!1,...a}=e,[l,c]=gt({prop:n,defaultProp:r??"",onChange:o,caller:En});return i.jsx(_2,{scope:e.__scopeAccordion,value:C.useMemo(()=>l?[l]:[],[l]),onItemOpen:c,onItemClose:C.useCallback(()=>s&&c(""),[s,c]),children:i.jsx(j2,{scope:e.__scopeAccordion,collapsible:s,children:i.jsx(k2,{...a,ref:t})})})}),O9=C.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[a,l]=gt({prop:n,defaultProp:r??[],onChange:o,caller:En}),c=C.useCallback(f=>l((d=[])=>[...d,f]),[l]),u=C.useCallback(f=>l((d=[])=>d.filter(p=>p!==f)),[l]);return i.jsx(_2,{scope:e.__scopeAccordion,value:a,onItemOpen:c,onItemClose:u,children:i.jsx(j2,{scope:e.__scopeAccordion,collapsible:!0,children:i.jsx(k2,{...s,ref:t})})})}),[L9,wc]=bc(En),k2=C.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:s="vertical",...a}=e,l=C.useRef(null),c=Se(l,t),u=M9(n),d=Cs(o)==="ltr",p=te(e.onKeyDown,h=>{if(!R9.includes(h.key))return;const m=h.target,x=u().filter(k=>!k.ref.current?.disabled),v=x.findIndex(k=>k.ref.current===m),y=x.length;if(v===-1)return;h.preventDefault();let b=v;const S=0,w=y-1,E=()=>{b=v+1,b>w&&(b=S)},N=()=>{b=v-1,b<S&&(b=w)};switch(h.key){case"Home":b=S;break;case"End":b=w;break;case"ArrowRight":s==="horizontal"&&(d?E():N());break;case"ArrowDown":s==="vertical"&&E();break;case"ArrowLeft":s==="horizontal"&&(d?N():E());break;case"ArrowUp":s==="vertical"&&N();break}const _=b%y;x[_].ref.current?.focus()});return i.jsx(L9,{scope:n,disabled:r,direction:o,orientation:s,children:i.jsx(Jf.Slot,{scope:n,children:i.jsx(ue.div,{...a,"data-orientation":s,ref:c,onKeyDown:r?void 0:p})})})}),jl="AccordionItem",[I9,ep]=bc(jl),R2=C.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,s=wc(jl,n),a=A9(jl,n),l=Qf(n),c=tt(),u=r&&a.value.includes(r)||!1,f=s.disabled||e.disabled;return i.jsx(I9,{scope:n,open:u,disabled:f,triggerId:c,children:i.jsx(N9,{"data-orientation":s.orientation,"data-state":O2(u),...l,...o,ref:t,disabled:f,open:u,onOpenChange:d=>{d?a.onItemOpen(r):a.onItemClose(r)}})})});R2.displayName=jl;var M2="AccordionHeader",D2=C.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=wc(En,n),s=ep(M2,n);return i.jsx(ue.h3,{"data-orientation":o.orientation,"data-state":O2(s.open),"data-disabled":s.disabled?"":void 0,...r,ref:t})});D2.displayName=M2;var xd="AccordionTrigger",A2=C.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=wc(En,n),s=ep(xd,n),a=T9(xd,n),l=Qf(n);return i.jsx(Jf.ItemSlot,{scope:n,children:i.jsx(_9,{"aria-disabled":s.open&&!a.collapsible||void 0,"data-orientation":o.orientation,id:s.triggerId,...l,...r,ref:t})})});A2.displayName=xd;var T2="AccordionContent",P2=C.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=wc(En,n),s=ep(T2,n),a=Qf(n);return i.jsx(j9,{role:"region","aria-labelledby":s.triggerId,"data-orientation":o.orientation,...a,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});P2.displayName=T2;function O2(e){return e?"open":"closed"}var F9=N2,$9=R2,V9=D2,L2=A2,I2=P2;const B9=F9,F2=g.forwardRef(({className:e,...t},n)=>i.jsx($9,{ref:n,className:j("border-b",e),...t}));F2.displayName="AccordionItem";const $2=g.forwardRef(({className:e,children:t,...n},r)=>i.jsx(V9,{className:"flex",children:i.jsxs(L2,{ref:r,className:j("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,i.jsx(X,{name:"CaretDown",size:"sm",className:"shrink-0 text-muted-foreground transition-transform duration-200"})]})}));$2.displayName=L2.displayName;const V2=g.forwardRef(({className:e,children:t,...n},r)=>i.jsx(I2,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:i.jsx("div",{className:j("pb-4 pt-0",e),children:t})}));V2.displayName=I2.displayName;const B2=C.forwardRef(({className:e,children:t,...n},r)=>i.jsx(B9,{ref:r,className:j(e),...n,children:t}));B2.displayName="Accordion";const z2=C.forwardRef(({className:e,children:t,value:n,...r},o)=>i.jsx(F2,{ref:o,className:j(e),value:n,...r,children:t}));z2.displayName="AccordionItem";const W2=C.forwardRef(({className:e,children:t,...n},r)=>i.jsx($2,{ref:r,className:j(e),...n,children:t}));W2.displayName="AccordionTrigger";const H2=C.forwardRef(({className:e,children:t,...n},r)=>i.jsx(V2,{ref:r,className:j(e),...n,children:t}));H2.displayName="AccordionContent";const z9="It seems that you do not belong to any account with permissions to access this section's content. Verify your permissions or reach out to your account(s) administrator for assistance.",G2=C.forwardRef(({className:e,iconName:t="WarningCircle",iconWeight:n="fill",text:r=z9,...o},s)=>i.jsxs("div",{ref:s,className:j("flex w-full items-center gap-4 rounded-lg border border-border bg-background px-6 py-4 text-sm text-foreground",e),...o,children:[i.jsx(X,{name:t,weight:n,className:"size-6 shrink-0 text-yellow-500"}),i.jsx("p",{className:"m-0",children:r})]}));G2.displayName="AccessDeniedAlert";const W9=e=>{const t=e.replace(/[^\w\s]/gi,"").replace(/\d+/g,"").replace(/\s+/g," ").trim();if(!t)return;const n=t.split(" ").filter(r=>r.length>0);if(n.length!==0)return n.length===1?n[0].charAt(0).toUpperCase():(n[0].charAt(0)+n[n.length-1].charAt(0)).toUpperCase()};function H9(e,t=[]){let n=[];function r(s,a){const l=g.createContext(a);l.displayName=s+"Context";const c=n.length;n=[...n,a];const u=d=>{const{scope:p,children:h,...m}=d,x=p?.[e]?.[c]||l,v=g.useMemo(()=>m,Object.values(m));return i.jsx(x.Provider,{value:v,children:h})};u.displayName=s+"Provider";function f(d,p){const h=p?.[e]?.[c]||l,m=g.useContext(h);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const o=()=>{const s=n.map(a=>g.createContext(a));return function(l){const c=l?.[e]||s;return g.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[r,G9(o,...t)]}function G9(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var U9=Symbol.for("react.lazy"),kl=g[" use ".trim().toString()];function Y9(e){return typeof e=="object"&&e!==null&&"then"in e}function U2(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===U9&&"_payload"in e&&Y9(e._payload)}function ei(e){const t=K9(e),n=g.forwardRef((r,o)=>{let{children:s,...a}=r;U2(s)&&typeof kl=="function"&&(s=kl(s._payload));const l=g.Children.toArray(s),c=l.find(q9);if(c){const u=c.props.children,f=l.map(d=>d===c?g.Children.count(u)>1?g.Children.only(null):g.isValidElement(u)?u.props.children:null:d);return i.jsx(t,{...a,ref:o,children:g.isValidElement(u)?g.cloneElement(u,void 0,f):null})}return i.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var Cc=ei("Slot");function K9(e){const t=g.forwardRef((n,r)=>{let{children:o,...s}=n;if(U2(o)&&typeof kl=="function"&&(o=kl(o._payload)),g.isValidElement(o)){const a=J9(o),l=X9(s,o.props);return o.type!==g.Fragment&&(l.ref=r?At(r,a):a),g.cloneElement(o,l)}return g.Children.count(o)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Z9=Symbol("radix.slottable");function q9(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Z9}function X9(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...l)=>{const c=s(...l);return o(...l),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function J9(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Q9=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],tp=Q9.reduce((e,t)=>{const n=ei(`Primitive.${t}`),r=g.forwardRef((o,s)=>{const{asChild:a,...l}=o,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(c,{...l,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Di={exports:{}},xu={};var Kg;function eS(){if(Kg)return xu;Kg=1;var e=C;function t(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,a=e.useDebugValue;function l(d,p){var h=p(),m=r({inst:{value:h,getSnapshot:p}}),x=m[0].inst,v=m[1];return s(function(){x.value=h,x.getSnapshot=p,c(x)&&v({inst:x})},[d,h,p]),o(function(){return c(x)&&v({inst:x}),d(function(){c(x)&&v({inst:x})})},[d]),a(h),h}function c(d){var p=d.getSnapshot;d=d.value;try{var h=p();return!n(d,h)}catch{return!0}}function u(d,p){return p()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:l;return xu.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,xu}var vu={};var Zg;function tS(){return Zg||(Zg=1,process.env.NODE_ENV!=="production"&&(function(){function e(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}function t(h,m){f||o.startTransition===void 0||(f=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var x=m();if(!d){var v=m();s(x,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}v=a({inst:{value:x,getSnapshot:m}});var y=v[0].inst,b=v[1];return c(function(){y.value=x,y.getSnapshot=m,n(y)&&b({inst:y})},[h,x,m]),l(function(){return n(y)&&b({inst:y}),h(function(){n(y)&&b({inst:y})})},[h]),u(x),x}function n(h){var m=h.getSnapshot;h=h.value;try{var x=m();return!s(h,x)}catch{return!0}}function r(h,m){return m()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=C,s=typeof Object.is=="function"?Object.is:e,a=o.useState,l=o.useEffect,c=o.useLayoutEffect,u=o.useDebugValue,f=!1,d=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;vu.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),vu}var qg;function nS(){return qg||(qg=1,process.env.NODE_ENV==="production"?Di.exports=eS():Di.exports=tS()),Di.exports}var rS=nS();function oS(){return rS.useSyncExternalStore(sS,()=>!0,()=>!1)}function sS(){return()=>{}}var np="Avatar",[aS]=H9(np),[iS,Y2]=aS(np),K2=g.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,s]=g.useState("idle");return i.jsx(iS,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:s,children:i.jsx(tp.span,{...r,ref:t})})});K2.displayName=np;var Z2="AvatarImage",q2=g.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...s}=e,a=Y2(Z2,n),l=lS(r,s),c=dn(u=>{o(u),a.onImageLoadingStatusChange(u)});return at(()=>{l!=="idle"&&c(l)},[l,c]),l==="loaded"?i.jsx(tp.img,{...s,ref:t,src:r}):null});q2.displayName=Z2;var X2="AvatarFallback",J2=g.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,s=Y2(X2,n),[a,l]=g.useState(r===void 0);return g.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>l(!0),r);return()=>window.clearTimeout(c)}},[r]),a&&s.imageLoadingStatus!=="loaded"?i.jsx(tp.span,{...o,ref:t}):null});J2.displayName=X2;function Xg(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function lS(e,{referrerPolicy:t,crossOrigin:n}){const r=oS(),o=g.useRef(null),s=r?(o.current||(o.current=new window.Image),o.current):null,[a,l]=g.useState(()=>Xg(s,e));return at(()=>{l(Xg(s,e))},[s,e]),at(()=>{const c=d=>()=>{l(d)};if(!s)return;const u=c("loaded"),f=c("error");return s.addEventListener("load",u),s.addEventListener("error",f),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",u),s.removeEventListener("error",f)}},[s,n,t]),a}var cS=K2,uS=q2,dS=J2;function fS({className:e,...t}){return i.jsx(cS,{"data-slot":"avatar",className:j("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function pS({className:e,...t}){return i.jsx(uS,{"data-slot":"avatar-image",className:j("aspect-square size-full",e),...t})}function hS({className:e,...t}){return i.jsx(dS,{"data-slot":"avatar-fallback",className:j("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}const gS=Ge("relative flex shrink-0 overflow-hidden rounded-full",{variants:{size:{xs:"size-5",sm:"size-6",default:"size-8",lg:"size-10",xl:"size-12"}},defaultVariants:{size:"default"}}),mS=Ge("aspect-square h-full w-full object-cover"),xS=Ge("flex h-full w-full items-center justify-center rounded-full bg-muted text-muted-foreground font-medium uppercase",{variants:{size:{xs:"text-xs",sm:"text-xs",default:"text-sm",lg:"text-base",xl:"text-lg"}},defaultVariants:{size:"default"}}),Q2=C.forwardRef(({size:e,src:t,alt:n,name:r,fallback:o,className:s,...a},l)=>{const c=r?W9(r):void 0;let u;if(o)u=o;else if(c)u=c;else{const f={xs:10,sm:12,default:16,lg:20,xl:24};u=i.jsx(X,{name:"User",size:f[e??"default"]})}return i.jsxs(fS,{ref:l,className:j(gS({size:e}),s),"data-testid":"avatar",...a,children:[t&&i.jsx(pS,{src:t,alt:n||r||"Avatar",className:j(mS()),"data-testid":"avatar-image","data-slot":"avatar-image"}),i.jsx(hS,{className:j(xS({size:e})),"data-testid":"avatar-fallback",children:u})]})});Q2.displayName="Avatar";const vS=Ge("inline-flex items-center justify-center rounded-lg border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 cursor-default gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",error:"border-transparent bg-rose-600-10 text-rose-600 [a&]:hover:bg-rose-600-20 focus-visible:ring-rose-600-20 dark:bg-rose-600-10 dark:text-rose-600 dark:focus-visible:ring-rose-600-40 [&>svg]:fill-rose-600",warning:"border-transparent bg-yellow-500-10 text-yellow-500 [a&]:hover:bg-yellow-500-20 focus-visible:ring-yellow-500-20 dark:bg-yellow-500-10 dark:text-yellow-500 dark:focus-visible:ring-yellow-500-40 [&>svg]:fill-yellow-500",info:"border-transparent bg-blue-600-10 text-blue-600 [a&]:hover:bg-blue-600-20 focus-visible:ring-blue-600-20 dark:bg-blue-600-10 dark:text-blue-600 dark:focus-visible:ring-blue-600-40 [&>svg]:fill-blue-600",success:"border-transparent bg-green-600-10 text-green-600 [a&]:hover:bg-green-600-20 focus-visible:ring-green-600-20 dark:bg-green-600-10 dark:text-green-600 dark:focus-visible:ring-green-600-40 [&>svg]:fill-green-600",alert:"border-transparent bg-orange-600-10 text-orange-600 [a&]:hover:bg-orange-600-20 focus-visible:ring-orange-600-20 dark:bg-orange-600-10 dark:text-orange-600 dark:focus-visible:ring-orange-600-40 [&>svg]:fill-orange-600"}},defaultVariants:{variant:"default"}});function rp({className:e,variant:t,asChild:n=!1,...r}){const o=n?Cc:"span";return i.jsx(o,{"data-slot":"badge",className:j(vS({variant:t}),e),...r})}const Ze=C.forwardRef(({children:e,className:t,startIcon:n,endIcon:r,startIconProps:o,endIconProps:s,...a},l)=>i.jsxs(rp,{ref:l,className:j("app-badge",t),...a,children:[n&&i.jsx(X,{name:n,size:"xs",weight:o?.weight||"fill",...o}),e,r&&i.jsx(X,{name:r,size:"xs",weight:s?.weight||"regular",...s})]}));Ze.displayName="Badge";const es=Ge("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 text-xs has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),wt=g.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const a=r?Cc:"button";return i.jsx(a,{type:"button",ref:s,"data-slot":"button",className:j(es({variant:t,size:n,className:e})),...o})});wt.displayName="Button";const ot=C.forwardRef(({children:e,className:t,startIcon:n,endIcon:r,startIconProps:o,endIconProps:s,loading:a=!1,disabled:l,asChild:c=!1,...u},f)=>{const d=l||a;return c?i.jsx(wt,{ref:f,disabled:d,asChild:!0,className:j("app-button",t),...u,children:e}):i.jsxs(wt,{ref:f,disabled:d,className:j("app-button",t),...u,children:[a&&i.jsx(X,{name:"CircleNotch",size:"sm",className:"animate-spin"}),n&&!a&&i.jsx(X,{name:n,size:"sm",...o}),e,r&&!a&&i.jsx(X,{name:r,size:"sm",...s})]})});ot.displayName="Button";const yS=Ge("rounded-xl border bg-muted text-card-foreground",{variants:{variant:{default:"border-border",active:"border-primary"}},defaultVariants:{variant:"default"}}),ex=g.forwardRef(({className:e,variant:t,...n},r)=>i.jsx("div",{ref:r,className:j(yS({variant:t}),e),...n}));ex.displayName="Card";const tx=g.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:j("flex flex-col gap-1.5 p-6",e),...t}));tx.displayName="CardHeader";const nx=g.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:j("text-base font-semibold leading-none tracking-tight text-card-foreground",e),...t}));nx.displayName="CardTitle";const rx=g.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:j("text-sm text-muted-foreground",e),...t}));rx.displayName="CardDescription";const ox=g.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:j("p-6",e),...t}));ox.displayName="CardContent";const sx=g.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:j("flex items-center p-6 pt-0",e),...t}));sx.displayName="CardFooter";const Ss=C.forwardRef(({className:e,children:t,variant:n="default",...r},o)=>i.jsx(ex,{ref:o,className:j("app-card",e),variant:n,...r,children:t}));Ss.displayName="CardBase";const op=C.forwardRef(({className:e,children:t,...n},r)=>i.jsx(tx,{ref:r,className:j("app-card-header",e),...n,children:t}));op.displayName="CardHeader";const sp=C.forwardRef(({className:e,children:t,...n},r)=>i.jsx(nx,{ref:r,className:j("app-card-title",e),...n,children:t}));sp.displayName="CardTitle";const ap=C.forwardRef(({className:e,children:t,...n},r)=>i.jsx(rx,{ref:r,className:j("app-card-description",e),...n,children:t}));ap.displayName="CardDescription";const Sc=C.forwardRef(({className:e,children:t,...n},r)=>i.jsx(ox,{ref:r,className:j("app-card-content",e),...n,children:t}));Sc.displayName="CardContent";const Ec=C.forwardRef(({className:e,children:t,...n},r)=>i.jsx(sx,{ref:r,className:j("app-card-footer",e),...n,children:t}));Ec.displayName="CardFooter";const ax=C.forwardRef(({className:e,title:t,description:n,children:r,footer:o,variant:s="default",headerClassName:a,titleClassName:l,descriptionClassName:c,contentClassName:u,footerClassName:f,...d},p)=>{const h=t||n;return i.jsxs(Ss,{ref:p,className:e,variant:s,...d,children:[h&&i.jsxs(op,{className:a,children:[t&&i.jsx(sp,{className:l,children:t}),n&&i.jsx(ap,{className:c,children:n})]}),i.jsx(Sc,{className:u,children:r}),o&&i.jsx(Ec,{className:f,children:o})]})});ax.displayName="Card";const bS=Ge("",{variants:{size:{xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl"},fontWeight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{size:"sm",fontWeight:"bold"}}),wS=Ge("",{variants:{size:{xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl"}},defaultVariants:{size:"sm"}}),ip=C.forwardRef(({value:e,currency:t="USD",locales:n="en",size:r,fontWeight:o="bold",className:s,showCurrencyCode:a=!0,valueClassName:l,codeClassName:c,...u},f)=>{if(!e&&e!==0)return null;const d=new Intl.NumberFormat(n,t?{style:"currency",currency:t.length===3?t:"USD",currencyDisplay:"narrowSymbol",minimumFractionDigits:0,maximumFractionDigits:20}:{minimumFractionDigits:0,maximumFractionDigits:20}).format(e);return i.jsxs("div",{ref:f,className:j("flex items-center gap-1",s),...u,children:[i.jsx("span",{className:j(bS({size:r,fontWeight:o}),l),children:d}),a&&t&&i.jsx("span",{className:j(wS({size:r}),"text-muted-foreground",c),children:t.toUpperCase()})]})});ip.displayName="CurrencyField";const ix=6048e5,CS=864e5,Jg=Symbol.for("constructDateFrom");function it(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Jg in e?e[Jg](t):e instanceof Date?new e.constructor(t):new Date(t)}function $e(e,t){return it(t||e,e)}function lx(e,t,n){const r=$e(e,n?.in);return isNaN(t)?it(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function cx(e,t,n){const r=$e(e,n?.in);if(isNaN(t))return it(e,NaN);if(!t)return r;const o=r.getDate(),s=it(e,r.getTime());s.setMonth(r.getMonth()+t+1,0);const a=s.getDate();return o>=a?s:(r.setFullYear(s.getFullYear(),s.getMonth(),o),r)}let SS={};function ti(){return SS}function ls(e,t){const n=ti(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=$e(e,t?.in),s=o.getDay(),a=(s<r?7:0)+s-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function Ra(e,t){return ls(e,{...t,weekStartsOn:1})}function ux(e,t){const n=$e(e,t?.in),r=n.getFullYear(),o=it(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const s=Ra(o),a=it(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const l=Ra(a);return n.getTime()>=s.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function Qg(e){const t=$e(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Es(e,...t){const n=it.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Ma(e,t){const n=$e(e,t?.in);return n.setHours(0,0,0,0),n}function lp(e,t,n){const[r,o]=Es(n?.in,e,t),s=Ma(r),a=Ma(o),l=+s-Qg(s),c=+a-Qg(a);return Math.round((l-c)/CS)}function ES(e,t){const n=ux(e,t),r=it(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ra(r)}function NS(e,t,n){return lx(e,t*7,n)}function _S(e,t,n){return cx(e,t*12,n)}function jS(e,t){let n,r=t?.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=it.bind(null,o));const s=$e(o,r);(!n||n<s||isNaN(+s))&&(n=s)}),it(r,n||NaN)}function kS(e,t){let n,r=t?.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=it.bind(null,o));const s=$e(o,r);(!n||n>s||isNaN(+s))&&(n=s)}),it(r,n||NaN)}function RS(e,t,n){const[r,o]=Es(n?.in,e,t);return+Ma(r)==+Ma(o)}function dx(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function MS(e){return!(!dx(e)&&typeof e!="number"||isNaN(+$e(e)))}function fx(e,t,n){const[r,o]=Es(n?.in,e,t),s=r.getFullYear()-o.getFullYear(),a=r.getMonth()-o.getMonth();return s*12+a}function DS(e,t){const n=$e(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function px(e,t){const[n,r]=Es(e,t.start,t.end);return{start:n,end:r}}function AS(e,t){const{start:n,end:r}=px(t?.in,e);let o=+n>+r;const s=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0),a.setDate(1);let l=1;const c=[];for(;+a<=s;)c.push(it(n,a)),a.setMonth(a.getMonth()+l);return o?c.reverse():c}function TS(e,t){const n=$e(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function PS(e,t){const n=$e(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function hx(e,t){const n=$e(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function OS(e,t){const{start:n,end:r}=px(t?.in,e);let o=+n>+r;const s=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0),a.setMonth(0,1);let l=1;const c=[];for(;+a<=s;)c.push(it(n,a)),a.setFullYear(a.getFullYear()+l);return o?c.reverse():c}function gx(e,t){const n=ti(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=$e(e,t?.in),s=o.getDay(),a=(s<r?-7:0)+6-(s-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}function LS(e,t){return gx(e,{...t,weekStartsOn:1})}const IS={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},FS=(e,t,n)=>{let r;const o=IS[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function yu(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const $S={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},VS={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},BS={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},zS={date:yu({formats:$S,defaultWidth:"full"}),time:yu({formats:VS,defaultWidth:"full"}),dateTime:yu({formats:BS,defaultWidth:"full"})},WS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},HS=(e,t,n,r)=>WS[e];function zs(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,l=n?.width?String(n.width):a;o=e.formattingValues[l]||e.formattingValues[a]}else{const a=e.defaultWidth,l=n?.width?String(n.width):e.defaultWidth;o=e.values[l]||e.values[a]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const GS={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},US={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},YS={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},KS={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ZS={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},qS={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},XS=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},JS={ordinalNumber:XS,era:zs({values:GS,defaultWidth:"wide"}),quarter:zs({values:US,defaultWidth:"wide",argumentCallback:e=>e-1}),month:zs({values:YS,defaultWidth:"wide"}),day:zs({values:KS,defaultWidth:"wide"}),dayPeriod:zs({values:ZS,defaultWidth:"wide",formattingValues:qS,defaultFormattingWidth:"wide"})};function Ws(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const a=s[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?eE(l,d=>d.test(a)):QS(l,d=>d.test(a));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const f=t.slice(a.length);return{value:u,rest:f}}}function QS(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function eE(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function tE(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;const l=t.slice(o.length);return{value:a,rest:l}}}const nE=/^(\d+)(th|st|nd|rd)?/i,rE=/\d+/i,oE={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},sE={any:[/^b/i,/^(a|c)/i]},aE={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},iE={any:[/1/i,/2/i,/3/i,/4/i]},lE={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},cE={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},uE={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},dE={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},fE={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},pE={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},hE={ordinalNumber:tE({matchPattern:nE,parsePattern:rE,valueCallback:e=>parseInt(e,10)}),era:Ws({matchPatterns:oE,defaultMatchWidth:"wide",parsePatterns:sE,defaultParseWidth:"any"}),quarter:Ws({matchPatterns:aE,defaultMatchWidth:"wide",parsePatterns:iE,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ws({matchPatterns:lE,defaultMatchWidth:"wide",parsePatterns:cE,defaultParseWidth:"any"}),day:Ws({matchPatterns:uE,defaultMatchWidth:"wide",parsePatterns:dE,defaultParseWidth:"any"}),dayPeriod:Ws({matchPatterns:fE,defaultMatchWidth:"any",parsePatterns:pE,defaultParseWidth:"any"})},zo={code:"en-US",formatDistance:FS,formatLong:zS,formatRelative:HS,localize:JS,match:hE,options:{weekStartsOn:0,firstWeekContainsDate:1}};function gE(e,t){const n=$e(e,t?.in);return lp(n,hx(n))+1}function cp(e,t){const n=$e(e,t?.in),r=+Ra(n)-+ES(n);return Math.round(r/ix)+1}function mx(e,t){const n=$e(e,t?.in),r=n.getFullYear(),o=ti(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=it(t?.in||e,0);a.setFullYear(r+1,0,s),a.setHours(0,0,0,0);const l=ls(a,t),c=it(t?.in||e,0);c.setFullYear(r,0,s),c.setHours(0,0,0,0);const u=ls(c,t);return+n>=+l?r+1:+n>=+u?r:r-1}function mE(e,t){const n=ti(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=mx(e,t),s=it(t?.in||e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),ls(s,t)}function up(e,t){const n=$e(e,t?.in),r=+ls(n,t)-+mE(n,t);return Math.round(r/ix)+1}function Ie(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const dr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ie(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ie(n+1,2)},d(e,t){return Ie(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Ie(e.getHours()%12||12,t.length)},H(e,t){return Ie(e.getHours(),t.length)},m(e,t){return Ie(e.getMinutes(),t.length)},s(e,t){return Ie(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ie(o,t.length)}},jo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},em={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return dr.y(e,t)},Y:function(e,t,n,r){const o=mx(e,r),s=o>0?o:1-o;if(t==="YY"){const a=s%100;return Ie(a,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Ie(s,t.length)},R:function(e,t){const n=ux(e);return Ie(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ie(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ie(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ie(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return dr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ie(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=up(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ie(o,t.length)},I:function(e,t,n){const r=cp(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ie(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):dr.d(e,t)},D:function(e,t,n){const r=gE(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ie(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Ie(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Ie(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Ie(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=jo.noon:r===0?o=jo.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=jo.evening:r>=12?o=jo.afternoon:r>=4?o=jo.morning:o=jo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return dr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):dr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ie(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ie(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):dr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):dr.s(e,t)},S:function(e,t){return dr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return nm(r);case"XXXX":case"XX":return Hr(r);default:return Hr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return nm(r);case"xxxx":case"xx":return Hr(r);default:return Hr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+tm(r,":");default:return"GMT"+Hr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+tm(r,":");default:return"GMT"+Hr(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ie(r,t.length)},T:function(e,t,n){return Ie(+e,t.length)}};function tm(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+Ie(s,2)}function nm(e,t){return e%60===0?(e>0?"-":"+")+Ie(Math.abs(e)/60,2):Hr(e,t)}function Hr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ie(Math.trunc(r/60),2),s=Ie(r%60,2);return n+o+t+s}const rm=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},xx=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},xE=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return rm(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",rm(r,t)).replace("{{time}}",xx(o,t))},vE={p:xx,P:xE},yE=/^D+$/,bE=/^Y+$/,wE=["D","DD","YY","YYYY"];function CE(e){return yE.test(e)}function SE(e){return bE.test(e)}function EE(e,t,n){const r=NE(e,t,n);if(console.warn(r),wE.includes(e))throw new RangeError(r)}function NE(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const _E=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,jE=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,kE=/^'([^]*?)'?$/,RE=/''/g,ME=/[a-zA-Z]/;function Zn(e,t,n){const r=ti(),o=n?.locale??r.locale??zo,s=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,l=$e(e,n?.in);if(!MS(l))throw new RangeError("Invalid time value");let c=t.match(jE).map(f=>{const d=f[0];if(d==="p"||d==="P"){const p=vE[d];return p(f,o.formatLong)}return f}).join("").match(_E).map(f=>{if(f==="''")return{isToken:!1,value:"'"};const d=f[0];if(d==="'")return{isToken:!1,value:DE(f)};if(em[d])return{isToken:!0,value:f};if(d.match(ME))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:f}});o.localize.preprocessor&&(c=o.localize.preprocessor(l,c));const u={firstWeekContainsDate:s,weekStartsOn:a,locale:o};return c.map(f=>{if(!f.isToken)return f.value;const d=f.value;(!n?.useAdditionalWeekYearTokens&&SE(d)||!n?.useAdditionalDayOfYearTokens&&CE(d))&&EE(d,t,String(e));const p=em[d[0]];return p(l,d,o.localize,u)}).join("")}function DE(e){const t=e.match(kE);return t?t[1].replace(RE,"'"):e}function AE(e,t){const n=$e(e,t?.in),r=n.getFullYear(),o=n.getMonth(),s=it(n,0);return s.setFullYear(r,o+1,0),s.setHours(0,0,0,0),s.getDate()}function TE(e,t){return $e(e,t?.in).getMonth()}function PE(e,t){return $e(e,t?.in).getFullYear()}function OE(e,t){return+$e(e)>+$e(t)}function LE(e,t){return+$e(e)<+$e(t)}function IE(e,t,n){const[r,o]=Es(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function FE(e,t,n){const[r,o]=Es(n?.in,e,t);return r.getFullYear()===o.getFullYear()}function $E(e,t,n){const r=$e(e,n?.in),o=r.getFullYear(),s=r.getDate(),a=it(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const l=AE(a);return r.setMonth(t,Math.min(s,l)),r}function VE(e,t,n){const r=$e(e,n?.in);return isNaN(+r)?it(e,NaN):(r.setFullYear(t),r)}function BE(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const zE={},Qs={};function eo(e,t){try{const r=(zE[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return r in Qs?Qs[r]:om(r,r.split(":"))}catch{if(e in Qs)return Qs[e];const n=e?.match(WE);return n?om(e,n.slice(1)):NaN}}const WE=/([+-]\d\d):?(\d\d)?/;function om(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return Qs[e]=n*60+r>0?n*60+r+o:n*60-r-o}class Tn extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(eo(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),vx(this),vd(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new Tn(...n,t):new Tn(Date.now(),t)}withTimeZone(t){return new Tn(+this,t)}getTimezoneOffset(){const t=-eo(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),vd(this),+this}[Symbol.for("constructDateFrom")](t){return new Tn(+new Date(t),this.timeZone)}}const sm=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!sm.test(e))return;const t=e.replace(sm,"$1UTC");Tn.prototype[t]&&(e.startsWith("get")?Tn.prototype[e]=function(){return this.internal[t]()}:(Tn.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),HE(this),+this},Tn.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),vd(this),+this}))});function vd(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-eo(e.timeZone,e)*60))}function HE(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),vx(e)}function vx(e){const t=eo(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),s=-new Date(+r).getTimezoneOffset(),a=o-s,l=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&l&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const c=o-n;c&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+c);const u=new Date(+e);u.setUTCSeconds(0);const f=o>0?u.getSeconds():(u.getSeconds()-60)%60,d=Math.round(-(eo(e.timeZone,e)*60))%60;(d||f)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+d),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+d+f));const p=eo(e.timeZone,e),h=p>0?Math.floor(p):Math.ceil(p),x=-new Date(+e).getTimezoneOffset()-h,v=h!==n,y=x-c;if(v&&y){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y);const b=eo(e.timeZone,e),S=b>0?Math.floor(b):Math.ceil(b),w=h-S;w&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+w),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+w))}}class bt extends Tn{static tz(t,...n){return n.length?new bt(...n,t):new bt(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t?.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${BE(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new bt(+this,t)}[Symbol.for("constructDateFrom")](t){return new bt(+new Date(t),this.timeZone)}}const am=5,GE=4;function UE(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),s=t.addDays(o,am*7-1);return t.getMonth(e)===t.getMonth(s)?am:GE}function yx(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function YE(e,t){const n=yx(e,t),r=UE(e,t);return t.addDays(n,r*7-1)}const bx={...zo,labels:{labelDayButton:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(a,l)=>Zn(a,l,{locale:zo,...n});let s=o(e,"PPPP");return t.today&&(s=`Today, ${s}`),t.selected&&(s=`${s}, selected`),s},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,s)=>Zn(o,s,{locale:zo,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(a,l)=>Zn(a,l,{locale:zo,...n});let s=o(e,"PPPP");return t?.today&&(s=`Today, ${s}`),s},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,s)=>Zn(o,s,{locale:zo,...t}),r(e,"cccc")}}};class qt{constructor(t,n){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?bt.tz(this.options.timeZone):new this.Date,this.newDate=(r,o,s)=>this.overrides?.newDate?this.overrides.newDate(r,o,s):this.options.timeZone?new bt(r,o,s,this.options.timeZone):new Date(r,o,s),this.addDays=(r,o)=>this.overrides?.addDays?this.overrides.addDays(r,o):lx(r,o),this.addMonths=(r,o)=>this.overrides?.addMonths?this.overrides.addMonths(r,o):cx(r,o),this.addWeeks=(r,o)=>this.overrides?.addWeeks?this.overrides.addWeeks(r,o):NS(r,o),this.addYears=(r,o)=>this.overrides?.addYears?this.overrides.addYears(r,o):_S(r,o),this.differenceInCalendarDays=(r,o)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):lp(r,o),this.differenceInCalendarMonths=(r,o)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):fx(r,o),this.eachMonthOfInterval=r=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):AS(r),this.eachYearOfInterval=r=>{const o=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(r):OS(r),s=new Set(o.map(l=>this.getYear(l)));if(s.size===o.length)return o;const a=[];return s.forEach(l=>{a.push(new Date(l,0,1))}),a},this.endOfBroadcastWeek=r=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):YE(r,this),this.endOfISOWeek=r=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(r):LS(r),this.endOfMonth=r=>this.overrides?.endOfMonth?this.overrides.endOfMonth(r):DS(r),this.endOfWeek=(r,o)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(r,o):gx(r,this.options),this.endOfYear=r=>this.overrides?.endOfYear?this.overrides.endOfYear(r):PS(r),this.format=(r,o,s)=>{const a=this.overrides?.format?this.overrides.format(r,o,this.options):Zn(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(a):a},this.getISOWeek=r=>this.overrides?.getISOWeek?this.overrides.getISOWeek(r):cp(r),this.getMonth=(r,o)=>this.overrides?.getMonth?this.overrides.getMonth(r,this.options):TE(r,this.options),this.getYear=(r,o)=>this.overrides?.getYear?this.overrides.getYear(r,this.options):PE(r,this.options),this.getWeek=(r,o)=>this.overrides?.getWeek?this.overrides.getWeek(r,this.options):up(r,this.options),this.isAfter=(r,o)=>this.overrides?.isAfter?this.overrides.isAfter(r,o):OE(r,o),this.isBefore=(r,o)=>this.overrides?.isBefore?this.overrides.isBefore(r,o):LE(r,o),this.isDate=r=>this.overrides?.isDate?this.overrides.isDate(r):dx(r),this.isSameDay=(r,o)=>this.overrides?.isSameDay?this.overrides.isSameDay(r,o):RS(r,o),this.isSameMonth=(r,o)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(r,o):IE(r,o),this.isSameYear=(r,o)=>this.overrides?.isSameYear?this.overrides.isSameYear(r,o):FE(r,o),this.max=r=>this.overrides?.max?this.overrides.max(r):jS(r),this.min=r=>this.overrides?.min?this.overrides.min(r):kS(r),this.setMonth=(r,o)=>this.overrides?.setMonth?this.overrides.setMonth(r,o):$E(r,o),this.setYear=(r,o)=>this.overrides?.setYear?this.overrides.setYear(r,o):VE(r,o),this.startOfBroadcastWeek=(r,o)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):yx(r,this),this.startOfDay=r=>this.overrides?.startOfDay?this.overrides.startOfDay(r):Ma(r),this.startOfISOWeek=r=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(r):Ra(r),this.startOfMonth=r=>this.overrides?.startOfMonth?this.overrides.startOfMonth(r):TS(r),this.startOfWeek=(r,o)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(r,this.options):ls(r,this.options),this.startOfYear=r=>this.overrides?.startOfYear?this.overrides.startOfYear(r):hx(r),this.options={locale:bx,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){const t=this.options.locale?.code;return t&&qt.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:o}=this.options,s=n?.code;if(s&&qt.yearFirstLocales.has(s))try{return new Intl.DateTimeFormat(s,{month:"long",year:"numeric",timeZone:r,numberingSystem:o}).format(t)}catch{}const a=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,a)}}qt.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const Bn=new qt;class wx{constructor(t,n,r=Bn){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r,this.isoDate=r.format(t,"yyyy-MM-dd"),this.displayMonthId=r.format(n,"yyyy-MM"),this.dateMonthId=r.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class KE{constructor(t,n){this.date=t,this.weeks=n}}class ZE{constructor(t,n){this.days=n,this.weekNumber=t}}function qE(e){return C.createElement("button",{...e})}function XE(e){return C.createElement("span",{...e})}function JE(e){const{size:t=24,orientation:n="left",className:r}=e;return C.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&C.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&C.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&C.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&C.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function QE(e){const{day:t,modifiers:n,...r}=e;return C.createElement("td",{...r})}function eN(e){const{day:t,modifiers:n,...r}=e,o=C.useRef(null);return C.useEffect(()=>{n.focused&&o.current?.focus()},[n.focused]),C.createElement("button",{ref:o,...r})}var de;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(de||(de={}));var He;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(He||(He={}));var yn;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(yn||(yn={}));var Ut;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(Ut||(Ut={}));function tN(e){const{options:t,className:n,components:r,classNames:o,...s}=e,a=[o[de.Dropdown],n].join(" "),l=t?.find(({value:c})=>c===s.value);return C.createElement("span",{"data-disabled":s.disabled,className:o[de.DropdownRoot]},C.createElement(r.Select,{className:a,...s},t?.map(({value:c,label:u,disabled:f})=>C.createElement(r.Option,{key:c,value:c,disabled:f},u))),C.createElement("span",{className:o[de.CaptionLabel],"aria-hidden":!0},l?.label,C.createElement(r.Chevron,{orientation:"down",size:18,className:o[de.Chevron]})))}function nN(e){return C.createElement("div",{...e})}function rN(e){return C.createElement("div",{...e})}function oN(e){const{calendarMonth:t,displayIndex:n,...r}=e;return C.createElement("div",{...r},e.children)}function sN(e){const{calendarMonth:t,displayIndex:n,...r}=e;return C.createElement("div",{...r})}function aN(e){return C.createElement("table",{...e})}function iN(e){return C.createElement("div",{...e})}const Cx=C.createContext(void 0);function ni(){const e=C.useContext(Cx);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function lN(e){const{components:t}=ni();return C.createElement(t.Dropdown,{...e})}function cN(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...s}=e,{components:a,classNames:l,labels:{labelPrevious:c,labelNext:u}}=ni(),f=C.useCallback(p=>{o&&n?.(p)},[o,n]),d=C.useCallback(p=>{r&&t?.(p)},[r,t]);return C.createElement("nav",{...s},C.createElement(a.PreviousMonthButton,{type:"button",className:l[de.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:d},C.createElement(a.Chevron,{disabled:r?void 0:!0,className:l[de.Chevron],orientation:"left"})),C.createElement(a.NextMonthButton,{type:"button",className:l[de.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:f},C.createElement(a.Chevron,{disabled:o?void 0:!0,orientation:"right",className:l[de.Chevron]})))}function uN(e){const{components:t}=ni();return C.createElement(t.Button,{...e})}function dN(e){return C.createElement("option",{...e})}function fN(e){const{components:t}=ni();return C.createElement(t.Button,{...e})}function pN(e){const{rootRef:t,...n}=e;return C.createElement("div",{...n,ref:t})}function hN(e){return C.createElement("select",{...e})}function gN(e){const{week:t,...n}=e;return C.createElement("tr",{...n})}function mN(e){return C.createElement("th",{...e})}function xN(e){return C.createElement("thead",{"aria-hidden":!0},C.createElement("tr",{...e}))}function vN(e){const{week:t,...n}=e;return C.createElement("th",{...n})}function yN(e){return C.createElement("th",{...e})}function bN(e){return C.createElement("tbody",{...e})}function wN(e){const{components:t}=ni();return C.createElement(t.Dropdown,{...e})}const CN=Object.freeze(Object.defineProperty({__proto__:null,Button:qE,CaptionLabel:XE,Chevron:JE,Day:QE,DayButton:eN,Dropdown:tN,DropdownNav:nN,Footer:rN,Month:oN,MonthCaption:sN,MonthGrid:aN,Months:iN,MonthsDropdown:lN,Nav:cN,NextMonthButton:uN,Option:dN,PreviousMonthButton:fN,Root:pN,Select:hN,Week:gN,WeekNumber:vN,WeekNumberHeader:yN,Weekday:mN,Weekdays:xN,Weeks:bN,YearsDropdown:wN},Symbol.toStringTag,{value:"Module"}));function qn(e,t,n=!1,r=Bn){let{from:o,to:s}=e;const{differenceInCalendarDays:a,isSameDay:l}=r;return o&&s?(a(s,o)<0&&([o,s]=[s,o]),a(t,o)>=(n?1:0)&&a(s,t)>=(n?1:0)):!n&&s?l(s,t):!n&&o?l(o,t):!1}function dp(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Nc(e){return!!(e&&typeof e=="object"&&"from"in e)}function fp(e){return!!(e&&typeof e=="object"&&"after"in e)}function pp(e){return!!(e&&typeof e=="object"&&"before"in e)}function Sx(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Ex(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Xn(e,t,n=Bn){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:s,isAfter:a}=n;return r.some(l=>{if(typeof l=="boolean")return l;if(n.isDate(l))return o(e,l);if(Ex(l,n))return l.some(c=>o(e,c));if(Nc(l))return qn(l,e,!1,n);if(Sx(l))return Array.isArray(l.dayOfWeek)?l.dayOfWeek.includes(e.getDay()):l.dayOfWeek===e.getDay();if(dp(l)){const c=s(l.before,e),u=s(l.after,e),f=c>0,d=u<0;return a(l.before,l.after)?d&&f:f||d}return fp(l)?s(e,l.after)>0:pp(l)?s(l.before,e)>0:typeof l=="function"?l(e):!1})}function SN(e,t,n,r,o){const{disabled:s,hidden:a,modifiers:l,showOutsideDays:c,broadcastCalendar:u,today:f=o.today()}=t,{isSameDay:d,isSameMonth:p,startOfMonth:h,isBefore:m,endOfMonth:x,isAfter:v}=o,y=n&&h(n),b=r&&x(r),S={[He.focused]:[],[He.outside]:[],[He.disabled]:[],[He.hidden]:[],[He.today]:[]},w={};for(const E of e){const{date:N,displayMonth:_}=E,k=!!(_&&!p(N,_)),I=!!(y&&m(N,y)),F=!!(b&&v(N,b)),U=!!(s&&Xn(N,s,o)),O=!!(a&&Xn(N,a,o))||I||F||!u&&!c&&k||u&&c===!1&&k,R=d(N,f);k&&S.outside.push(E),U&&S.disabled.push(E),O&&S.hidden.push(E),R&&S.today.push(E),l&&Object.keys(l).forEach(L=>{const V=l?.[L];V&&Xn(N,V,o)&&(w[L]?w[L].push(E):w[L]=[E])})}return E=>{const N={[He.focused]:!1,[He.disabled]:!1,[He.hidden]:!1,[He.outside]:!1,[He.today]:!1},_={};for(const k in S){const I=S[k];N[k]=I.some(F=>F===E)}for(const k in w)_[k]=w[k].some(I=>I===E);return{...N,..._}}}function EN(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[s])=>(n[s]?o.push(n[s]):t[He[s]]?o.push(t[He[s]]):t[yn[s]]&&o.push(t[yn[s]]),o),[t[de.Day]])}function NN(e){return{...CN,...e}}function _N(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function jN(){const e={};for(const t in de)e[de[t]]=`rdp-${de[t]}`;for(const t in He)e[He[t]]=`rdp-${He[t]}`;for(const t in yn)e[yn[t]]=`rdp-${yn[t]}`;for(const t in Ut)e[Ut[t]]=`rdp-${Ut[t]}`;return e}function Nx(e,t,n){return(n??new qt(t)).formatMonthYear(e)}const kN=Nx;function RN(e,t,n){return(n??new qt(t)).format(e,"d")}function MN(e,t=Bn){return t.format(e,"LLLL")}function DN(e,t,n){return(n??new qt(t)).format(e,"cccccc")}function AN(e,t=Bn){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function TN(){return""}function _x(e,t=Bn){return t.format(e,"yyyy")}const PN=_x,ON=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Nx,formatDay:RN,formatMonthCaption:kN,formatMonthDropdown:MN,formatWeekNumber:AN,formatWeekNumberHeader:TN,formatWeekdayName:DN,formatYearCaption:PN,formatYearDropdown:_x},Symbol.toStringTag,{value:"Module"}));function LN(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...ON,...e}}function hp(e,t,n,r){let o=(r??new qt(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const IN=hp;function gp(e,t,n){return(n??new qt(t)).formatMonthYear(e)}const FN=gp;function jx(e,t,n,r){let o=(r??new qt(n)).format(e,"PPPP");return t?.today&&(o=`Today, ${o}`),o}function kx(e){return"Choose the Month"}function Rx(){return""}const $N="Go to the Next Month";function Mx(e,t){return $N}function Dx(e){return"Go to the Previous Month"}function Ax(e,t,n){return(n??new qt(t)).format(e,"cccc")}function Tx(e,t){return`Week ${e}`}function Px(e){return"Week Number"}function Ox(e){return"Choose the Year"}const VN=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:FN,labelDay:IN,labelDayButton:hp,labelGrid:gp,labelGridcell:jx,labelMonthDropdown:kx,labelNav:Rx,labelNext:Mx,labelPrevious:Dx,labelWeekNumber:Tx,labelWeekNumberHeader:Px,labelWeekday:Ax,labelYearDropdown:Ox},Symbol.toStringTag,{value:"Module"})),gn=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function BN(e,t){const n=t.locale?.labels??{};return{...VN,...e??{},labelDayButton:gn(hp,e?.labelDayButton,n.labelDayButton),labelMonthDropdown:gn(kx,e?.labelMonthDropdown,n.labelMonthDropdown),labelNext:gn(Mx,e?.labelNext,n.labelNext),labelPrevious:gn(Dx,e?.labelPrevious,n.labelPrevious),labelWeekNumber:gn(Tx,e?.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:gn(Ox,e?.labelYearDropdown,n.labelYearDropdown),labelGrid:gn(gp,e?.labelGrid,n.labelGrid),labelGridcell:gn(jx,e?.labelGridcell,n.labelGridcell),labelNav:gn(Rx,e?.labelNav,n.labelNav),labelWeekNumberHeader:gn(Px,e?.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:gn(Ax,e?.labelWeekday,n.labelWeekday)}}function zN(e,t,n,r,o){const{startOfMonth:s,startOfYear:a,endOfYear:l,eachMonthOfInterval:c,getMonth:u}=o;return c({start:a(e),end:l(e)}).map(p=>{const h=r.formatMonthDropdown(p,o),m=u(p),x=t&&p<s(t)||n&&p>s(n)||!1;return{value:m,label:h,disabled:x}})}function WN(e,t={},n={}){let r={...t?.[de.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n?.[o]}}),r}function HN(e,t,n,r){const o=r??e.today(),s=n?e.startOfBroadcastWeek(o,e):t?e.startOfISOWeek(o):e.startOfWeek(o),a=[];for(let l=0;l<7;l++){const c=e.addDays(s,l);a.push(c)}return a}function GN(e,t,n,r,o=!1){if(!e||!t)return;const{startOfYear:s,endOfYear:a,eachYearOfInterval:l,getYear:c}=r,u=s(e),f=a(t),d=l({start:u,end:f});return o&&d.reverse(),d.map(p=>{const h=n.formatYearDropdown(p,r);return{value:c(p),label:h,disabled:!1}})}function UN(e,t={}){const{weekStartsOn:n,locale:r}=t,o=n??r?.options?.weekStartsOn??0,s=l=>{const c=typeof l=="number"||typeof l=="string"?new Date(l):l;return new bt(c.getFullYear(),c.getMonth(),c.getDate(),12,0,0,e)},a=l=>{const c=s(l);return new Date(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0,0)};return{today:()=>s(bt.tz(e)),newDate:(l,c,u)=>new bt(l,c,u,12,0,0,e),startOfDay:l=>s(l),startOfWeek:(l,c)=>{const u=s(l),f=c?.weekStartsOn??o,d=(u.getDay()-f+7)%7;return u.setDate(u.getDate()-d),u},startOfISOWeek:l=>{const c=s(l),u=(c.getDay()-1+7)%7;return c.setDate(c.getDate()-u),c},startOfMonth:l=>{const c=s(l);return c.setDate(1),c},startOfYear:l=>{const c=s(l);return c.setMonth(0,1),c},endOfWeek:(l,c)=>{const u=s(l),p=(((c?.weekStartsOn??o)+6)%7-u.getDay()+7)%7;return u.setDate(u.getDate()+p),u},endOfISOWeek:l=>{const c=s(l),u=(7-c.getDay())%7;return c.setDate(c.getDate()+u),c},endOfMonth:l=>{const c=s(l);return c.setMonth(c.getMonth()+1,0),c},endOfYear:l=>{const c=s(l);return c.setMonth(11,31),c},eachMonthOfInterval:l=>{const c=s(l.start),u=s(l.end),f=[],d=new bt(c.getFullYear(),c.getMonth(),1,12,0,0,e),p=u.getFullYear()*12+u.getMonth();for(;d.getFullYear()*12+d.getMonth()<=p;)f.push(new bt(d,e)),d.setMonth(d.getMonth()+1,1);return f},addDays:(l,c)=>{const u=s(l);return u.setDate(u.getDate()+c),u},addWeeks:(l,c)=>{const u=s(l);return u.setDate(u.getDate()+c*7),u},addMonths:(l,c)=>{const u=s(l);return u.setMonth(u.getMonth()+c),u},addYears:(l,c)=>{const u=s(l);return u.setFullYear(u.getFullYear()+c),u},eachYearOfInterval:l=>{const c=s(l.start),u=s(l.end),f=[],d=new bt(c.getFullYear(),0,1,12,0,0,e);for(;d.getFullYear()<=u.getFullYear();)f.push(new bt(d,e)),d.setFullYear(d.getFullYear()+1,0,1);return f},getWeek:(l,c)=>{const u=a(l);return up(u,{weekStartsOn:c?.weekStartsOn??o,firstWeekContainsDate:c?.firstWeekContainsDate??r?.options?.firstWeekContainsDate??1})},getISOWeek:l=>{const c=a(l);return cp(c)},differenceInCalendarDays:(l,c)=>{const u=a(l),f=a(c);return lp(u,f)},differenceInCalendarMonths:(l,c)=>{const u=a(l),f=a(c);return fx(u,f)}}}const ri=e=>e instanceof HTMLElement?e:null,bu=e=>[...e.querySelectorAll("[data-animated-month]")??[]],YN=e=>ri(e.querySelector("[data-animated-month]")),wu=e=>ri(e.querySelector("[data-animated-caption]")),Cu=e=>ri(e.querySelector("[data-animated-weeks]")),KN=e=>ri(e.querySelector("[data-animated-nav]")),ZN=e=>ri(e.querySelector("[data-animated-weekdays]"));function qN(e,t,{classNames:n,months:r,focused:o,dateLib:s}){const a=C.useRef(null),l=C.useRef(r),c=C.useRef(!1);C.useLayoutEffect(()=>{const u=l.current;if(l.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||u.length===0||r.length!==u.length)return;const f=s.isSameMonth(r[0].date,u[0].date),d=s.isAfter(r[0].date,u[0].date),p=d?n[Ut.caption_after_enter]:n[Ut.caption_before_enter],h=d?n[Ut.weeks_after_enter]:n[Ut.weeks_before_enter],m=a.current,x=e.current.cloneNode(!0);if(x instanceof HTMLElement?(bu(x).forEach(S=>{if(!(S instanceof HTMLElement))return;const w=YN(S);w&&S.contains(w)&&S.removeChild(w);const E=wu(S);E&&E.classList.remove(p);const N=Cu(S);N&&N.classList.remove(h)}),a.current=x):a.current=null,c.current||f||o)return;const v=m instanceof HTMLElement?bu(m):[],y=bu(e.current);if(y?.every(b=>b instanceof HTMLElement)&&v&&v.every(b=>b instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const b=KN(e.current);b&&(b.style.zIndex="1"),y.forEach((S,w)=>{const E=v[w];if(!E)return;S.style.position="relative",S.style.overflow="hidden";const N=wu(S);N&&N.classList.add(p);const _=Cu(S);_&&_.classList.add(h);const k=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),b&&(b.style.zIndex=""),N&&N.classList.remove(p),_&&_.classList.remove(h),S.style.position="",S.style.overflow="",S.contains(E)&&S.removeChild(E)};E.style.pointerEvents="none",E.style.position="absolute",E.style.overflow="hidden",E.setAttribute("aria-hidden","true");const I=ZN(E);I&&(I.style.opacity="0");const F=wu(E);F&&(F.classList.add(d?n[Ut.caption_before_exit]:n[Ut.caption_after_exit]),F.addEventListener("animationend",k));const U=Cu(E);U&&U.classList.add(d?n[Ut.weeks_before_exit]:n[Ut.weeks_after_exit]),S.insertBefore(E,S.firstChild)})}})}function XN(e,t,n,r){const o=e[0],s=e[e.length-1],{ISOWeek:a,fixedWeeks:l,broadcastCalendar:c}=n??{},{addDays:u,differenceInCalendarDays:f,differenceInCalendarMonths:d,endOfBroadcastWeek:p,endOfISOWeek:h,endOfMonth:m,endOfWeek:x,isAfter:v,startOfBroadcastWeek:y,startOfISOWeek:b,startOfWeek:S}=r,w=c?y(o,r):a?b(o):S(o),E=c?p(s):a?h(m(s)):x(m(s)),N=t&&(c?p(t):a?h(t):x(t)),_=N&&v(E,N)?N:E,k=f(_,w),I=d(s,o)+1,F=[];for(let R=0;R<=k;R++){const L=u(w,R);F.push(L)}const O=(c?35:42)*I;if(l&&F.length<O){const R=O-F.length;for(let L=0;L<R;L++){const V=u(F[F.length-1],1);F.push(V)}}return F}function JN(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((s,a)=>s.concat(a.days.slice()),t.slice());return n.concat(o.slice())},t.slice())}function QN(e,t,n,r){const{numberOfMonths:o=1}=n,s=[];for(let a=0;a<o;a++){const l=r.addMonths(e,a);if(t&&l>t)break;s.push(l)}return s}function im(e,t,n,r){const{month:o,defaultMonth:s,today:a=r.today(),numberOfMonths:l=1}=e;let c=o||s||a;const{differenceInCalendarMonths:u,addMonths:f,startOfMonth:d}=r;if(n&&u(n,c)<l-1){const p=-1*(l-1);c=f(n,p)}return t&&u(c,t)<0&&(c=t),d(c)}function e_(e,t,n,r){const{addDays:o,endOfBroadcastWeek:s,endOfISOWeek:a,endOfMonth:l,endOfWeek:c,getISOWeek:u,getWeek:f,startOfBroadcastWeek:d,startOfISOWeek:p,startOfWeek:h}=r,m=e.reduce((x,v)=>{const y=n.broadcastCalendar?d(v,r):n.ISOWeek?p(v):h(v),b=n.broadcastCalendar?s(v):n.ISOWeek?a(l(v)):c(l(v)),S=t.filter(_=>_>=y&&_<=b),w=n.broadcastCalendar?35:42;if(n.fixedWeeks&&S.length<w){const _=t.filter(k=>{const I=w-S.length;return k>b&&k<=o(b,I)});S.push(..._)}const E=S.reduce((_,k)=>{const I=n.ISOWeek?u(k):f(k),F=_.find(O=>O.weekNumber===I),U=new wx(k,v,r);return F?F.days.push(U):_.push(new ZE(I,[U])),_},[]),N=new KE(v,E);return x.push(N),x},[]);return n.reverseMonths?m.reverse():m}function t_(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:s,startOfMonth:a,endOfMonth:l,addYears:c,endOfYear:u,newDate:f,today:d}=t,{fromYear:p,toYear:h,fromMonth:m,toMonth:x}=e;!n&&m&&(n=m),!n&&p&&(n=t.newDate(p,0,1)),!r&&x&&(r=x),!r&&h&&(r=f(h,11,31));const v=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=a(n):p?n=f(p,0,1):!n&&v&&(n=o(c(e.today??d(),-100))),r?r=l(r):h?r=f(h,11,31):!r&&v&&(r=u(e.today??d())),[n&&s(n),r&&s(r)]}function n_(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s=1}=n,{startOfMonth:a,addMonths:l,differenceInCalendarMonths:c}=r,u=o?s:1,f=a(e);if(!t)return l(f,u);if(!(c(t,e)<s))return l(f,u)}function r_(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s}=n,{startOfMonth:a,addMonths:l,differenceInCalendarMonths:c}=r,u=o?s??1:1,f=a(e);if(!t)return l(f,-u);if(!(c(f,t)<=0))return l(f,-u)}function o_(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function _c(e,t){const[n,r]=C.useState(e);return[t===void 0?n:t,r]}function s_(e,t){const[n,r]=t_(e,t),{startOfMonth:o,endOfMonth:s}=t,a=im(e,n,r,t),[l,c]=_c(a,e.month?a:void 0);C.useEffect(()=>{const w=im(e,n,r,t);c(w)},[e.timeZone]);const{months:u,weeks:f,days:d,previousMonth:p,nextMonth:h}=C.useMemo(()=>{const w=QN(l,r,{numberOfMonths:e.numberOfMonths},t),E=XN(w,e.endMonth?s(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),N=e_(w,E,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),_=o_(N),k=JN(N),I=r_(l,n,e,t),F=n_(l,r,e,t);return{months:N,weeks:_,days:k,previousMonth:I,nextMonth:F}},[t,l.getTime(),r?.getTime(),n?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:m,onMonthChange:x}=e,v=w=>f.some(E=>E.days.some(N=>N.isEqualTo(w))),y=w=>{if(m)return;let E=o(w);n&&E<o(n)&&(E=o(n)),r&&E>o(r)&&(E=o(r)),c(E),x?.(E)};return{months:u,weeks:f,days:d,navStart:n,navEnd:r,previousMonth:p,nextMonth:h,goToMonth:y,goToDay:w=>{v(w)||y(w.date)}}}var Rn;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Rn||(Rn={}));function lm(e){return!e[He.disabled]&&!e[He.hidden]&&!e[He.outside]}function a_(e,t,n,r){let o,s=-1;for(const a of e){const l=t(a);lm(l)&&(l[He.focused]&&s<Rn.FocusedModifier?(o=a,s=Rn.FocusedModifier):r?.isEqualTo(a)&&s<Rn.LastFocused?(o=a,s=Rn.LastFocused):n(a.date)&&s<Rn.Selected?(o=a,s=Rn.Selected):l[He.today]&&s<Rn.Today&&(o=a,s=Rn.Today))}return o||(o=e.find(a=>lm(t(a)))),o}function i_(e,t,n,r,o,s,a){const{ISOWeek:l,broadcastCalendar:c}=s,{addDays:u,addMonths:f,addWeeks:d,addYears:p,endOfBroadcastWeek:h,endOfISOWeek:m,endOfWeek:x,max:v,min:y,startOfBroadcastWeek:b,startOfISOWeek:S,startOfWeek:w}=a;let N={day:u,week:d,month:f,year:p,startOfWeek:_=>c?b(_,a):l?S(_):w(_),endOfWeek:_=>c?h(_):l?m(_):x(_)}[e](n,t==="after"?1:-1);return t==="before"&&r?N=v([r,N]):t==="after"&&o&&(N=y([o,N])),N}function Lx(e,t,n,r,o,s,a,l=0){if(l>365)return;const c=i_(e,t,n.date,r,o,s,a),u=!!(s.disabled&&Xn(c,s.disabled,a)),f=!!(s.hidden&&Xn(c,s.hidden,a)),d=c,p=new wx(c,d,a);return!u&&!f?p:Lx(e,t,p,r,o,s,a,l+1)}function l_(e,t,n,r,o){const{autoFocus:s}=e,[a,l]=C.useState(),c=a_(t.days,n,r||(()=>!1),a),[u,f]=C.useState(s?c:void 0);return{isFocusTarget:x=>!!c?.isEqualTo(x),setFocused:f,focused:u,blur:()=>{l(u),f(void 0)},moveFocus:(x,v)=>{if(!u)return;const y=Lx(x,v,u,t.navStart,t.navEnd,e,o);y&&(e.disableNavigation&&!t.days.some(S=>S.isEqualTo(y))||(t.goToDay(y),f(y)))}}}function c_(e,t){const{selected:n,required:r,onSelect:o}=e,[s,a]=_c(n,o?n:void 0),l=o?n:s,{isSameDay:c}=t,u=h=>l?.some(m=>c(m,h))??!1,{min:f,max:d}=e;return{selected:l,select:(h,m,x)=>{let v=[...l??[]];if(u(h)){if(l?.length===f||r&&l?.length===1)return;v=l?.filter(y=>!c(y,h))}else l?.length===d?v=[h]:v=[...v,h];return o||a(v),o?.(v,h,m,x),v},isSelected:u}}function u_(e,t,n=0,r=0,o=!1,s=Bn){const{from:a,to:l}=t||{},{isSameDay:c,isAfter:u,isBefore:f}=s;let d;if(!a&&!l)d={from:e,to:n>0?void 0:e};else if(a&&!l)c(a,e)?n===0?d={from:a,to:e}:o?d={from:a,to:void 0}:d=void 0:f(e,a)?d={from:e,to:a}:d={from:a,to:e};else if(a&&l)if(c(a,e)&&c(l,e))o?d={from:a,to:l}:d=void 0;else if(c(a,e))d={from:a,to:n>0?void 0:e};else if(c(l,e))d={from:e,to:n>0?void 0:e};else if(f(e,a))d={from:e,to:l};else if(u(e,a))d={from:a,to:e};else if(u(e,l))d={from:a,to:e};else throw new Error("Invalid range");if(d?.from&&d?.to){const p=s.differenceInCalendarDays(d.to,d.from);r>0&&p>r?d={from:e,to:void 0}:n>1&&p<n&&(d={from:e,to:void 0})}return d}function d_(e,t,n=Bn){const r=Array.isArray(t)?t:[t];let o=e.from;const s=n.differenceInCalendarDays(e.to,e.from),a=Math.min(s,6);for(let l=0;l<=a;l++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function cm(e,t,n=Bn){return qn(e,t.from,!1,n)||qn(e,t.to,!1,n)||qn(t,e.from,!1,n)||qn(t,e.to,!1,n)}function f_(e,t,n=Bn){const r=Array.isArray(t)?t:[t];if(r.filter(l=>typeof l!="function").some(l=>typeof l=="boolean"?l:n.isDate(l)?qn(e,l,!1,n):Ex(l,n)?l.some(c=>qn(e,c,!1,n)):Nc(l)?l.from&&l.to?cm(e,{from:l.from,to:l.to},n):!1:Sx(l)?d_(e,l.dayOfWeek,n):dp(l)?n.isAfter(l.before,l.after)?cm(e,{from:n.addDays(l.after,1),to:n.addDays(l.before,-1)},n):Xn(e.from,l,n)||Xn(e.to,l,n):fp(l)||pp(l)?Xn(e.from,l,n)||Xn(e.to,l,n):!1))return!0;const a=r.filter(l=>typeof l=="function");if(a.length){let l=e.from;const c=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=c;u++){if(a.some(f=>f(l)))return!0;l=n.addDays(l,1)}}return!1}function p_(e,t){const{disabled:n,excludeDisabled:r,resetOnSelect:o,selected:s,required:a,onSelect:l}=e,[c,u]=_c(s,l?s:void 0),f=l?s:c;return{selected:f,select:(h,m,x)=>{const{min:v,max:y}=e;let b;if(h){const S=f?.from,w=f?.to,E=!!S&&!!w,N=!!S&&!!w&&t.isSameDay(S,w)&&t.isSameDay(h,S);o&&(E||!f?.from)?!a&&N?b=void 0:b={from:h,to:void 0}:b=u_(h,f,v,y,a,t)}return r&&n&&b?.from&&b.to&&f_({from:b.from,to:b.to},n,t)&&(b.from=h,b.to=void 0),l||u(b),l?.(b,h,m,x),b},isSelected:h=>f&&qn(f,h,!1,t)}}function h_(e,t){const{selected:n,required:r,onSelect:o}=e,[s,a]=_c(n,o?n:void 0),l=o?n:s,{isSameDay:c}=t;return{selected:l,select:(d,p,h)=>{let m=d;return!r&&l&&l&&c(d,l)&&(m=void 0),o||a(m),o?.(m,d,p,h),m},isSelected:d=>l?c(l,d):!1}}function g_(e,t){const n=h_(e,t),r=c_(e,t),o=p_(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function nn(e,t){return e instanceof bt&&e.timeZone===t?e:new bt(e,t)}function ko(e,t,n){return nn(e,t)}function um(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?ko(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?ko(r,t):r):Nc(e)?{...e,from:e.from?nn(e.from,t):e.from,to:e.to?nn(e.to,t):e.to}:dp(e)?{before:ko(e.before,t),after:ko(e.after,t)}:fp(e)?{after:ko(e.after,t)}:pp(e)?{before:ko(e.before,t)}:e}function Su(e,t,n){return e&&(Array.isArray(e)?e.map(r=>um(r,t)):um(e,t))}function m_(e){let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=nn(t.today,n)),t.month&&(t.month=nn(t.month,n)),t.defaultMonth&&(t.defaultMonth=nn(t.defaultMonth,n)),t.startMonth&&(t.startMonth=nn(t.startMonth,n)),t.endMonth&&(t.endMonth=nn(t.endMonth,n)),t.mode==="single"&&t.selected?t.selected=nn(t.selected,n):t.mode==="multiple"&&t.selected?t.selected=t.selected?.map(pe=>nn(pe,n)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?nn(t.selected.from,n):t.selected.from,to:t.selected.to?nn(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=Su(t.disabled,n)),t.hidden!==void 0&&(t.hidden=Su(t.hidden,n)),t.modifiers)){const pe={};Object.keys(t.modifiers).forEach(_e=>{pe[_e]=Su(t.modifiers?.[_e],n)}),t.modifiers=pe}const{components:r,formatters:o,labels:s,dateLib:a,locale:l,classNames:c}=C.useMemo(()=>{const pe={...bx,...t.locale},_e=t.broadcastCalendar?1:t.weekStartsOn,xe=t.noonSafe&&t.timeZone?UN(t.timeZone,{weekStartsOn:_e,locale:pe}):void 0,ke=t.dateLib&&xe?{...xe,...t.dateLib}:t.dateLib??xe,mt=new qt({locale:pe,weekStartsOn:_e,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},ke);return{dateLib:mt,components:NN(t.components),formatters:LN(t.formatters),labels:BN(t.labels,mt.options),locale:pe,classNames:{...jN(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:a.today()});const{captionLayout:u,mode:f,navLayout:d,numberOfMonths:p=1,onDayBlur:h,onDayClick:m,onDayFocus:x,onDayKeyDown:v,onDayMouseEnter:y,onDayMouseLeave:b,onNextClick:S,onPrevClick:w,showWeekNumber:E,styles:N}=t,{formatCaption:_,formatDay:k,formatMonthDropdown:I,formatWeekNumber:F,formatWeekNumberHeader:U,formatWeekdayName:O,formatYearDropdown:R}=o,L=s_(t,a),{days:V,months:D,navStart:$,navEnd:z,previousMonth:P,nextMonth:M,goToMonth:G}=L,A=SN(V,t,$,z,a),{isSelected:W,select:H,selected:T}=g_(t,a)??{},{blur:B,focused:Y,isFocusTarget:Z,moveFocus:q,setFocused:oe}=l_(t,L,A,W??(()=>!1),a),{labelDayButton:ne,labelGridcell:le,labelGrid:Ee,labelMonthDropdown:re,labelNav:ce,labelPrevious:K,labelNext:Q,labelWeekday:ae,labelWeekNumber:J,labelWeekNumberHeader:be,labelYearDropdown:me}=s,fe=C.useMemo(()=>HN(a,t.ISOWeek,t.broadcastCalendar,t.today),[a,t.ISOWeek,t.broadcastCalendar,t.today]),Pe=f!==void 0||m!==void 0,Te=C.useCallback(()=>{P&&(G(P),w?.(P))},[P,G,w]),We=C.useCallback(()=>{M&&(G(M),S?.(M))},[G,M,S]),nt=C.useCallback((pe,_e)=>xe=>{xe.preventDefault(),xe.stopPropagation(),oe(pe),!_e.disabled&&(H?.(pe.date,_e,xe),m?.(pe.date,_e,xe))},[H,m,oe]),dt=C.useCallback((pe,_e)=>xe=>{oe(pe),x?.(pe.date,_e,xe)},[x,oe]),fn=C.useCallback((pe,_e)=>xe=>{B(),h?.(pe.date,_e,xe)},[B,h]),Ot=C.useCallback((pe,_e)=>xe=>{const ke={ArrowLeft:[xe.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[xe.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[xe.shiftKey?"year":"week","after"],ArrowUp:[xe.shiftKey?"year":"week","before"],PageUp:[xe.shiftKey?"year":"month","before"],PageDown:[xe.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(ke[xe.key]){xe.preventDefault(),xe.stopPropagation();const[mt,ee]=ke[xe.key];q(mt,ee)}v?.(pe.date,_e,xe)},[q,v,t.dir]),Nt=C.useCallback((pe,_e)=>xe=>{y?.(pe.date,_e,xe)},[y]),je=C.useCallback((pe,_e)=>xe=>{b?.(pe.date,_e,xe)},[b]),Me=C.useCallback(pe=>_e=>{const xe=Number(_e.target.value),ke=a.setMonth(a.startOfMonth(pe),xe);G(ke)},[a,G]),Ue=C.useCallback(pe=>_e=>{const xe=Number(_e.target.value),ke=a.setYear(a.startOfMonth(pe),xe);G(ke)},[a,G]),{className:Lt,style:Gt}=C.useMemo(()=>({className:[c[de.Root],t.className].filter(Boolean).join(" "),style:{...N?.[de.Root],...t.style}}),[c,t.className,t.style,N]),Ir=_N(t),_o=C.useRef(null);qN(_o,!!t.animate,{classNames:c,months:D,focused:Y,dateLib:a});const Hn={dayPickerProps:t,selected:T,select:H,isSelected:W,months:D,nextMonth:M,previousMonth:P,goToMonth:G,getModifiers:A,components:r,classNames:c,styles:N,labels:s,formatters:o};return C.createElement(Cx.Provider,{value:Hn},C.createElement(r.Root,{rootRef:t.animate?_o:void 0,className:Lt,style:Gt,dir:t.dir,id:t.id,lang:t.lang??l.code,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...Ir},C.createElement(r.Months,{className:c[de.Months],style:N?.[de.Months]},!t.hideNavigation&&!d&&C.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:c[de.Nav],style:N?.[de.Nav],"aria-label":ce(),onPreviousClick:Te,onNextClick:We,previousMonth:P,nextMonth:M}),D.map((pe,_e)=>C.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:c[de.Month],style:N?.[de.Month],key:_e,displayIndex:_e,calendarMonth:pe},d==="around"&&!t.hideNavigation&&_e===0&&C.createElement(r.PreviousMonthButton,{type:"button",className:c[de.PreviousMonthButton],tabIndex:P?void 0:-1,"aria-disabled":P?void 0:!0,"aria-label":K(P),onClick:Te,"data-animated-button":t.animate?"true":void 0},C.createElement(r.Chevron,{disabled:P?void 0:!0,className:c[de.Chevron],orientation:t.dir==="rtl"?"right":"left"})),C.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:c[de.MonthCaption],style:N?.[de.MonthCaption],calendarMonth:pe,displayIndex:_e},u?.startsWith("dropdown")?C.createElement(r.DropdownNav,{className:c[de.Dropdowns],style:N?.[de.Dropdowns]},(()=>{const xe=u==="dropdown"||u==="dropdown-months"?C.createElement(r.MonthsDropdown,{key:"month",className:c[de.MonthsDropdown],"aria-label":re(),classNames:c,components:r,disabled:!!t.disableNavigation,onChange:Me(pe.date),options:zN(pe.date,$,z,o,a),style:N?.[de.Dropdown],value:a.getMonth(pe.date)}):C.createElement("span",{key:"month"},I(pe.date,a)),ke=u==="dropdown"||u==="dropdown-years"?C.createElement(r.YearsDropdown,{key:"year",className:c[de.YearsDropdown],"aria-label":me(a.options),classNames:c,components:r,disabled:!!t.disableNavigation,onChange:Ue(pe.date),options:GN($,z,o,a,!!t.reverseYears),style:N?.[de.Dropdown],value:a.getYear(pe.date)}):C.createElement("span",{key:"year"},R(pe.date,a));return a.getMonthYearOrder()==="year-first"?[ke,xe]:[xe,ke]})(),C.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},_(pe.date,a.options,a))):C.createElement(r.CaptionLabel,{className:c[de.CaptionLabel],role:"status","aria-live":"polite"},_(pe.date,a.options,a))),d==="around"&&!t.hideNavigation&&_e===p-1&&C.createElement(r.NextMonthButton,{type:"button",className:c[de.NextMonthButton],tabIndex:M?void 0:-1,"aria-disabled":M?void 0:!0,"aria-label":Q(M),onClick:We,"data-animated-button":t.animate?"true":void 0},C.createElement(r.Chevron,{disabled:M?void 0:!0,className:c[de.Chevron],orientation:t.dir==="rtl"?"left":"right"})),_e===p-1&&d==="after"&&!t.hideNavigation&&C.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:c[de.Nav],style:N?.[de.Nav],"aria-label":ce(),onPreviousClick:Te,onNextClick:We,previousMonth:P,nextMonth:M}),C.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":f==="multiple"||f==="range","aria-label":Ee(pe.date,a.options,a)||void 0,className:c[de.MonthGrid],style:N?.[de.MonthGrid]},!t.hideWeekdays&&C.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:c[de.Weekdays],style:N?.[de.Weekdays]},E&&C.createElement(r.WeekNumberHeader,{"aria-label":be(a.options),className:c[de.WeekNumberHeader],style:N?.[de.WeekNumberHeader],scope:"col"},U()),fe.map(xe=>C.createElement(r.Weekday,{"aria-label":ae(xe,a.options,a),className:c[de.Weekday],key:String(xe),style:N?.[de.Weekday],scope:"col"},O(xe,a.options,a)))),C.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:c[de.Weeks],style:N?.[de.Weeks]},pe.weeks.map(xe=>C.createElement(r.Week,{className:c[de.Week],key:xe.weekNumber,style:N?.[de.Week],week:xe},E&&C.createElement(r.WeekNumber,{week:xe,style:N?.[de.WeekNumber],"aria-label":J(xe.weekNumber,{locale:l}),className:c[de.WeekNumber],scope:"row",role:"rowheader"},F(xe.weekNumber,a)),xe.days.map(ke=>{const{date:mt}=ke,ee=A(ke);if(ee[He.focused]=!ee.hidden&&!!Y?.isEqualTo(ke),ee[yn.selected]=W?.(mt)||ee.selected,Nc(T)){const{from:lr,to:Xe}=T;ee[yn.range_start]=!!(lr&&Xe&&a.isSameDay(mt,lr)),ee[yn.range_end]=!!(lr&&Xe&&a.isSameDay(mt,Xe)),ee[yn.range_middle]=qn(T,mt,!0,a)}const rt=WN(ee,N,t.modifiersStyles),ft=EN(ee,c,t.modifiersClassNames),_t=!Pe&&!ee.hidden?le(mt,ee,a.options,a):void 0;return C.createElement(r.Day,{key:`${ke.isoDate}_${ke.displayMonthId}`,day:ke,modifiers:ee,className:ft.join(" "),style:rt,role:"gridcell","aria-selected":ee.selected||void 0,"aria-label":_t,"data-day":ke.isoDate,"data-month":ke.outside?ke.dateMonthId:void 0,"data-selected":ee.selected||void 0,"data-disabled":ee.disabled||void 0,"data-hidden":ee.hidden||void 0,"data-outside":ke.outside||void 0,"data-focused":ee.focused||void 0,"data-today":ee.today||void 0},!ee.hidden&&Pe?C.createElement(r.DayButton,{className:c[de.DayButton],style:N?.[de.DayButton],type:"button",day:ke,modifiers:ee,disabled:!ee.focused&&ee.disabled||void 0,"aria-disabled":ee.focused&&ee.disabled||void 0,tabIndex:Z(ke)?0:-1,"aria-label":ne(mt,ee,a.options,a),onClick:nt(ke,ee),onBlur:fn(ke,ee),onFocus:dt(ke,ee),onKeyDown:Ot(ke,ee),onMouseEnter:Nt(ke,ee),onMouseLeave:je(ke,ee)},k(mt,a.options,a)):!ee.hidden&&k(ke.date,a.options,a))})))))))),t.footer&&C.createElement(r.Footer,{className:c[de.Footer],style:N?.[de.Footer],role:"status","aria-live":"polite"},t.footer)))}function mp({className:e,classNames:t,showOutsideDays:n=!0,...r}){return i.jsx(m_,{dir:mo(),fixedWeeks:!0,showOutsideDays:n,className:j("p-3",e),formatters:{formatMonthDropdown:(o,s)=>s.format(o,"LLL")},classNames:{months:"relative flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-2",month_caption:"flex h-9 justify-center items-center relative",caption_label:"flex items-center gap-1 text-sm font-medium",dropdowns:"flex gap-2 items-center justify-center",dropdown_root:"relative inline-flex items-center rounded-md border border-input bg-transparent px-2 py-1 hover:bg-accent focus-within:ring-2 focus-within:ring-ring",dropdown:"absolute inset-0 cursor-pointer opacity-0",nav:"flex h-9 items-center justify-between absolute inset-x-0 top-0 z-10 m-0 pointer-events-none",button_previous:j(es({variant:"ghost"}),"h-9 w-9 p-0 text-muted-foreground hover:text-foreground pointer-events-auto"),button_next:j(es({variant:"ghost"}),"h-9 w-9 p-0 text-muted-foreground hover:text-foreground pointer-events-auto"),chevron:"h-4 w-4",month_grid:"w-full border-collapse",weekdays:"flex mb-1",weekday:"flex h-8 w-9 items-center justify-center text-muted-foreground font-normal text-xs",week:"flex w-full mt-1",day:"h-9 w-9 text-center text-xs p-0 relative focus-within:relative focus-within:z-20",day_button:j(es({variant:"ghost"}),"h-9 w-9 p-0 font-normal rounded-full aria-selected:opacity-100"),selected:"bg-primary text-primary-foreground rounded-full hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",today:"bg-accent text-accent-foreground rounded-full",outside:"day-outside text-muted-foreground opacity-50",disabled:"text-muted-foreground opacity-50",range_start:"bg-primary text-primary-foreground rounded-full hover:bg-primary",range_end:"bg-primary text-primary-foreground rounded-full hover:bg-primary",range_middle:"rounded-full aria-selected:bg-accent aria-selected:text-accent-foreground",hidden:"invisible",...t},components:{Chevron:({className:o,orientation:s})=>{const a=s==="left"?"CaretLeft":s==="right"?"CaretRight":s==="up"?"CaretUp":"CaretDown";return i.jsx(X,{name:a,className:j("h-4 w-4",o)})}},...r})}mp.displayName="Calendar";var Eu=0;function jc(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??dm()),document.body.insertAdjacentElement("beforeend",e[1]??dm()),Eu++,()=>{Eu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Eu--}},[])}function dm(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Nu="focusScope.autoFocusOnMount",_u="focusScope.autoFocusOnUnmount",fm={bubbles:!1,cancelable:!0},x_="FocusScope",oi=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[l,c]=g.useState(null),u=dn(o),f=dn(s),d=g.useRef(null),p=Se(t,x=>c(x)),h=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let x=function(S){if(h.paused||!l)return;const w=S.target;l.contains(w)?d.current=w:pr(d.current,{select:!0})},v=function(S){if(h.paused||!l)return;const w=S.relatedTarget;w!==null&&(l.contains(w)||pr(d.current,{select:!0}))},y=function(S){if(document.activeElement===document.body)for(const E of S)E.removedNodes.length>0&&pr(l)};document.addEventListener("focusin",x),document.addEventListener("focusout",v);const b=new MutationObserver(y);return l&&b.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",v),b.disconnect()}}},[r,l,h.paused]),g.useEffect(()=>{if(l){hm.add(h);const x=document.activeElement;if(!l.contains(x)){const y=new CustomEvent(Nu,fm);l.addEventListener(Nu,u),l.dispatchEvent(y),y.defaultPrevented||(v_(S_(Ix(l)),{select:!0}),document.activeElement===x&&pr(l))}return()=>{l.removeEventListener(Nu,u),setTimeout(()=>{const y=new CustomEvent(_u,fm);l.addEventListener(_u,f),l.dispatchEvent(y),y.defaultPrevented||pr(x??document.body,{select:!0}),l.removeEventListener(_u,f),hm.remove(h)},0)}}},[l,u,f,h]);const m=g.useCallback(x=>{if(!n&&!r||h.paused)return;const v=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,y=document.activeElement;if(v&&y){const b=x.currentTarget,[S,w]=y_(b);S&&w?!x.shiftKey&&y===w?(x.preventDefault(),n&&pr(S,{select:!0})):x.shiftKey&&y===S&&(x.preventDefault(),n&&pr(w,{select:!0})):y===b&&x.preventDefault()}},[n,r,h.paused]);return i.jsx(ue.div,{tabIndex:-1,...a,ref:p,onKeyDown:m})});oi.displayName=x_;function v_(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(pr(r,{select:t}),document.activeElement!==n)return}function y_(e){const t=Ix(e),n=pm(t,e),r=pm(t.reverse(),e);return[n,r]}function Ix(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function pm(e,t){for(const n of e)if(!b_(n,{upTo:t}))return n}function b_(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function w_(e){return e instanceof HTMLInputElement&&"select"in e}function pr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&w_(e)&&t&&e.select()}}var hm=C_();function C_(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=gm(e,t),e.unshift(t)},remove(t){e=gm(e,t),e[0]?.resume()}}}function gm(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function S_(e){return e.filter(t=>t.tagName!=="A")}function E_(e){const t=N_(e),n=g.forwardRef((r,o)=>{const{children:s,...a}=r,l=g.Children.toArray(s),c=l.find(j_);if(c){const u=c.props.children,f=l.map(d=>d===c?g.Children.count(u)>1?g.Children.only(null):g.isValidElement(u)?u.props.children:null:d);return i.jsx(t,{...a,ref:o,children:g.isValidElement(u)?g.cloneElement(u,void 0,f):null})}return i.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function N_(e){const t=g.forwardRef((n,r)=>{const{children:o,...s}=n;if(g.isValidElement(o)){const a=R_(o),l=k_(s,o.props);return o.type!==g.Fragment&&(l.ref=r?At(r,a):a),g.cloneElement(o,l)}return g.Children.count(o)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var __=Symbol("radix.slottable");function j_(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===__}function k_(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...l)=>{const c=s(...l);return o(...l),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function R_(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var M_=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ro=new WeakMap,Ai=new WeakMap,Ti={},ju=0,Fx=function(e){return e&&(e.host||Fx(e.parentNode))},D_=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Fx(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},A_=function(e,t,n,r){var o=D_(t,Array.isArray(e)?e:[e]);Ti[n]||(Ti[n]=new WeakMap);var s=Ti[n],a=[],l=new Set,c=new Set(o),u=function(d){!d||l.has(d)||(l.add(d),u(d.parentNode))};o.forEach(u);var f=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(p){if(l.has(p))f(p);else try{var h=p.getAttribute(r),m=h!==null&&h!=="false",x=(Ro.get(p)||0)+1,v=(s.get(p)||0)+1;Ro.set(p,x),s.set(p,v),a.push(p),x===1&&m&&Ai.set(p,!0),v===1&&p.setAttribute(n,"true"),m||p.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return f(t),l.clear(),ju++,function(){a.forEach(function(d){var p=Ro.get(d)-1,h=s.get(d)-1;Ro.set(d,p),s.set(d,h),p||(Ai.has(d)||d.removeAttribute(r),Ai.delete(d)),h||d.removeAttribute(n)}),ju--,ju||(Ro=new WeakMap,Ro=new WeakMap,Ai=new WeakMap,Ti={})}},kc=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=M_(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),A_(r,o,n,"aria-hidden")):function(){return null}},Dn=function(){return Dn=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Dn.apply(this,arguments)};function $x(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function T_(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var il="right-scroll-bar-position",ll="width-before-scroll-bar",P_="with-scroll-bars-hidden",O_="--removed-body-scroll-bar-size";function ku(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function L_(e,t){var n=C.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var I_=typeof window<"u"?g.useLayoutEffect:g.useEffect,mm=new WeakMap;function F_(e,t){var n=L_(null,function(r){return e.forEach(function(o){return ku(o,r)})});return I_(function(){var r=mm.get(n);if(r){var o=new Set(r),s=new Set(e),a=n.current;o.forEach(function(l){s.has(l)||ku(l,null)}),s.forEach(function(l){o.has(l)||ku(l,a)})}mm.set(n,e)},[e]),n}function $_(e){return e}function V_(e,t){t===void 0&&(t=$_);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,r);return n.push(a),function(){n=n.filter(function(l){return l!==a})}},assignSyncMedium:function(s){for(r=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(l){return s(l)},filter:function(){return n}}},assignMedium:function(s){r=!0;var a=[];if(n.length){var l=n;n=[],l.forEach(s),a=n}var c=function(){var f=a;a=[],f.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(f){a.push(f),u()},filter:function(f){return a=a.filter(f),n}}}};return o}function B_(e){e===void 0&&(e={});var t=V_(null);return t.options=Dn({async:!0,ssr:!1},e),t}var Vx=function(e){var t=e.sideCar,n=$x(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return g.createElement(r,Dn({},n))};Vx.isSideCarExport=!0;function z_(e,t){return e.useMedium(t),Vx}var Bx=B_(),Ru=function(){},Rc=g.forwardRef(function(e,t){var n=g.useRef(null),r=g.useState({onScrollCapture:Ru,onWheelCapture:Ru,onTouchMoveCapture:Ru}),o=r[0],s=r[1],a=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,p=e.sideCar,h=e.noRelative,m=e.noIsolation,x=e.inert,v=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,S=e.gapMode,w=$x(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=p,N=F_([n,t]),_=Dn(Dn({},w),o);return g.createElement(g.Fragment,null,f&&g.createElement(E,{sideCar:Bx,removeScrollBar:u,shards:d,noRelative:h,noIsolation:m,inert:x,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:S}),a?g.cloneElement(g.Children.only(l),Dn(Dn({},_),{ref:N})):g.createElement(b,Dn({},_,{className:c,ref:N}),l))});Rc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Rc.classNames={fullWidth:ll,zeroRight:il};var W_=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function H_(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=W_();return t&&e.setAttribute("nonce",t),e}function G_(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function U_(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Y_=function(){var e=0,t=null;return{add:function(n){e==0&&(t=H_())&&(G_(t,n),U_(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},K_=function(){var e=Y_();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},zx=function(){var e=K_(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Z_={left:0,top:0,right:0,gap:0},Mu=function(e){return parseInt(e||"",10)||0},q_=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Mu(n),Mu(r),Mu(o)]},X_=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Z_;var t=q_(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},J_=zx(),ts="data-scroll-locked",Q_=function(e,t,n,r){var o=e.left,s=e.top,a=e.right,l=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
-
.`.concat(
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react"),ho=require("react-dom"),i=require("react/jsx-runtime");function b0(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 m=b0(C),lc=b0(ho);function w0(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=w0(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function C0(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=w0(e))&&(r&&(r+=" "),r+=t);return r}const Em=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Nm=C0,Ge=(e,t)=>n=>{var r;if(t?.variants==null)return Nm(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,a=Object.keys(o).map(u=>{const f=n?.[u],d=s?.[u];if(f===null)return null;const p=Em(f)||Em(d);return o[u][p]}),l=n&&Object.entries(n).reduce((u,f)=>{let[d,p]=f;return p===void 0||(u[d]=p),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:d,className:p,...h}=f;return Object.entries(h).every(g=>{let[x,v]=g;return Array.isArray(v)?v.includes({...s,...l}[x]):{...s,...l}[x]===v})?[...u,d,p]:u},[]);return Nm(e,a,c,n?.class,n?.className)},rC=(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},oC=(e,t)=>({classGroupId:e,validator:t}),S0=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Cl="-",_m=[],sC="arbitrary..",aC=e=>{const t=lC(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return iC(a);const l=a.split(Cl),c=l[0]===""&&l.length>1?1:0;return E0(l,c,t)},getConflictingClassGroupIds:(a,l)=>{if(l){const c=r[a],u=n[a];return c?u?rC(u,c):c:u||_m}return n[a]||_m}}},E0=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const u=E0(e,t+1,s);if(u)return u}const a=n.validators;if(a===null)return;const l=t===0?e.join(Cl):e.slice(t).join(Cl),c=a.length;for(let u=0;u<c;u++){const f=a[u];if(f.validator(l))return f.classGroupId}},iC=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?sC+r:void 0})(),lC=e=>{const{theme:t,classGroups:n}=e;return cC(n,t)},cC=(e,t)=>{const n=S0();for(const r in e){const o=e[r];Lf(o,n,r,t)}return n},Lf=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const a=e[s];uC(a,t,n,r)}},uC=(e,t,n,r)=>{if(typeof e=="string"){dC(e,t,n);return}if(typeof e=="function"){fC(e,t,n,r);return}pC(e,t,n,r)},dC=(e,t,n)=>{const r=e===""?t:N0(t,e);r.classGroupId=n},fC=(e,t,n,r)=>{if(hC(e)){Lf(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(oC(n,e))},pC=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let a=0;a<s;a++){const[l,c]=o[a];Lf(c,N0(t,l),n,r)}},N0=(e,t)=>{let n=e;const r=t.split(Cl),o=r.length;for(let s=0;s<o;s++){const a=r[s];let l=n.nextPart.get(a);l||(l=S0(),n.nextPart.set(a,l)),n=l}return n},hC=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,mC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,a)=>{n[s]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let a=n[s];if(a!==void 0)return a;if((a=r[s])!==void 0)return o(s,a),a},set(s,a){s in n?n[s]=a:o(s,a)}}},ud="!",jm=":",gC=[],km=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),xC=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let a=0,l=0,c=0,u;const f=o.length;for(let x=0;x<f;x++){const v=o[x];if(a===0&&l===0){if(v===jm){s.push(o.slice(c,x)),c=x+1;continue}if(v==="/"){u=x;continue}}v==="["?a++:v==="]"?a--:v==="("?l++:v===")"&&l--}const d=s.length===0?o:o.slice(c);let p=d,h=!1;d.endsWith(ud)?(p=d.slice(0,-1),h=!0):d.startsWith(ud)&&(p=d.slice(1),h=!0);const g=u&&u>c?u-c:void 0;return km(s,h,p,g)};if(t){const o=t+jm,s=r;r=a=>a.startsWith(o)?s(a.slice(o.length)):km(gC,!1,a,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},vC=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const a=n[s],l=a[0]==="[",c=t.has(a);l||c?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(a)):o.push(a)}return o.length>0&&(o.sort(),r.push(...o)),r}},yC=e=>({cache:mC(e.cacheSize),parseClassName:xC(e),sortModifiers:vC(e),...aC(e)}),bC=/\s+/,wC=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,a=[],l=e.trim().split(bC);let c="";for(let u=l.length-1;u>=0;u-=1){const f=l[u],{isExternal:d,modifiers:p,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:x}=n(f);if(d){c=f+(c.length>0?" "+c:c);continue}let v=!!x,y=r(v?g.substring(0,x):g);if(!y){if(!v){c=f+(c.length>0?" "+c:c);continue}if(y=r(g),!y){c=f+(c.length>0?" "+c:c);continue}v=!1}const b=p.length===0?"":p.length===1?p[0]:s(p).join(":"),S=h?b+ud:b,w=S+y;if(a.indexOf(w)>-1)continue;a.push(w);const E=o(y,v);for(let N=0;N<E.length;++N){const _=E[N];a.push(S+_)}c=f+(c.length>0?" "+c:c)}return c},CC=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=_0(n))&&(o&&(o+=" "),o+=r);return o},_0=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=_0(e[r]))&&(n&&(n+=" "),n+=t);return n},SC=(e,...t)=>{let n,r,o,s;const a=c=>{const u=t.reduce((f,d)=>d(f),e());return n=yC(u),r=n.cache.get,o=n.cache.set,s=l,l(c)},l=c=>{const u=r(c);if(u)return u;const f=wC(c,n);return o(c,f),f};return s=a,(...c)=>s(CC(...c))},EC=[],lt=e=>{const t=n=>n[e]||EC;return t.isThemeGetter=!0,t},j0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,k0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,NC=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,_C=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,jC=/\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$/,kC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,RC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,MC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,cr=e=>NC.test(e),Ne=e=>!!e&&!Number.isNaN(Number(e)),ur=e=>!!e&&Number.isInteger(Number(e)),pu=e=>e.endsWith("%")&&Ne(e.slice(0,-1)),Gn=e=>_C.test(e),R0=()=>!0,DC=e=>jC.test(e)&&!kC.test(e),If=()=>!1,AC=e=>RC.test(e),PC=e=>MC.test(e),TC=e=>!se(e)&&!ie(e),OC=e=>kr(e,A0,If),se=e=>j0.test(e),$r=e=>kr(e,P0,DC),Rm=e=>kr(e,WC,Ne),LC=e=>kr(e,O0,R0),IC=e=>kr(e,T0,If),Mm=e=>kr(e,M0,If),FC=e=>kr(e,D0,PC),ji=e=>kr(e,L0,AC),ie=e=>k0.test(e),Bs=e=>mo(e,P0),$C=e=>mo(e,T0),Dm=e=>mo(e,M0),VC=e=>mo(e,A0),BC=e=>mo(e,D0),ki=e=>mo(e,L0,!0),zC=e=>mo(e,O0,!0),kr=(e,t,n)=>{const r=j0.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},mo=(e,t,n=!1)=>{const r=k0.exec(e);return r?r[1]?t(r[1]):n:!1},M0=e=>e==="position"||e==="percentage",D0=e=>e==="image"||e==="url",A0=e=>e==="length"||e==="size"||e==="bg-size",P0=e=>e==="length",WC=e=>e==="number",T0=e=>e==="family-name",O0=e=>e==="number"||e==="weight",L0=e=>e==="shadow",HC=()=>{const e=lt("color"),t=lt("font"),n=lt("text"),r=lt("font-weight"),o=lt("tracking"),s=lt("leading"),a=lt("breakpoint"),l=lt("container"),c=lt("spacing"),u=lt("radius"),f=lt("shadow"),d=lt("inset-shadow"),p=lt("text-shadow"),h=lt("drop-shadow"),g=lt("blur"),x=lt("perspective"),v=lt("aspect"),y=lt("ease"),b=lt("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...w(),ie,se],N=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],k=()=>[ie,se,c],I=()=>[cr,"full","auto",...k()],F=()=>[ur,"none","subgrid",ie,se],U=()=>["auto",{span:["full",ur,ie,se]},ur,ie,se],O=()=>[ur,"auto",ie,se],R=()=>["auto","min","max","fr",ie,se],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...k()],$=()=>[cr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],z=()=>[cr,"screen","full","dvw","lvw","svw","min","max","fit",...k()],T=()=>[cr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...k()],M=()=>[e,ie,se],G=()=>[...w(),Dm,Mm,{position:[ie,se]}],A=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",VC,OC,{size:[ie,se]}],H=()=>[pu,Bs,$r],P=()=>["","none","full",u,ie,se],B=()=>["",Ne,Bs,$r],Y=()=>["solid","dashed","dotted","double"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[Ne,pu,Dm,Mm],oe=()=>["","none",g,ie,se],ne=()=>["none",Ne,ie,se],le=()=>["none",Ne,ie,se],Ee=()=>[Ne,ie,se],re=()=>[cr,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Gn],breakpoint:[Gn],color:[R0],container:[Gn],"drop-shadow":[Gn],ease:["in","out","in-out"],font:[TC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Gn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Gn],shadow:[Gn],spacing:["px",Ne],text:[Gn],"text-shadow":[Gn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",cr,se,ie,v]}],container:["container"],columns:[{columns:[Ne,se,ie,l]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"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:E()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{"inset-s":I(),start:I()}],end:[{"inset-e":I(),end:I()}],"inset-bs":[{"inset-bs":I()}],"inset-be":[{"inset-be":I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[ur,"auto",ie,se]}],basis:[{basis:[cr,"full","auto",l,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ne,cr,"auto","initial","none",se]}],grow:[{grow:["",Ne,ie,se]}],shrink:[{shrink:["",Ne,ie,se]}],order:[{order:[ur,"first","last","none",ie,se]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:U()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:U()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":R()}],"auto-rows":[{"auto-rows":R()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pbs:[{pbs:k()}],pbe:[{pbe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mbs:[{mbs:D()}],mbe:[{mbe:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],"inline-size":[{inline:["auto",...z()]}],"min-inline-size":[{"min-inline":["auto",...z()]}],"max-inline-size":[{"max-inline":["none",...z()]}],"block-size":[{block:["auto",...T()]}],"min-block-size":[{"min-block":["auto",...T()]}],"max-block-size":[{"max-block":["none",...T()]}],w:[{w:[l,"screen",...$()]}],"min-w":[{"min-w":[l,"screen","none",...$()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[a]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",n,Bs,$r]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,zC,LC]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",pu,se]}],"font-family":[{font:[$C,IC,t]}],"font-features":[{"font-features":[se]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ie,se]}],"line-clamp":[{"line-clamp":[Ne,"none",ie,Rm]}],leading:[{leading:[s,...k()]}],"list-image":[{"list-image":["none",ie,se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ie,se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ne,"from-font","auto",ie,$r]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[Ne,"auto",ie,se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ie,se]}],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",ie,se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:G()}],"bg-repeat":[{bg:A()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ur,ie,se],radial:["",ie,se],conic:[ur,ie,se]},BC,FC]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border: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-bs":[{"border-bs":B()}],"border-w-be":[{"border-be":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:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...Y(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ne,ie,se]}],"outline-w":[{outline:["",Ne,Bs,$r]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",f,ki,ji]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",d,ki,ji]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[Ne,$r]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",p,ki,ji]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[Ne,ie,se]}],"mix-blend":[{"mix-blend":[...Z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Z()}],"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":[Ne]}],"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":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"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":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"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":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"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":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"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":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"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":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"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":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[ie,se]}],"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":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"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":w()}],"mask-image-conic-pos":[{"mask-conic":[Ne]}],"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":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:G()}],"mask-repeat":[{mask:A()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ie,se]}],filter:[{filter:["","none",ie,se]}],blur:[{blur:oe()}],brightness:[{brightness:[Ne,ie,se]}],contrast:[{contrast:[Ne,ie,se]}],"drop-shadow":[{"drop-shadow":["","none",h,ki,ji]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",Ne,ie,se]}],"hue-rotate":[{"hue-rotate":[Ne,ie,se]}],invert:[{invert:["",Ne,ie,se]}],saturate:[{saturate:[Ne,ie,se]}],sepia:[{sepia:["",Ne,ie,se]}],"backdrop-filter":[{"backdrop-filter":["","none",ie,se]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[Ne,ie,se]}],"backdrop-contrast":[{"backdrop-contrast":[Ne,ie,se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ne,ie,se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ne,ie,se]}],"backdrop-invert":[{"backdrop-invert":["",Ne,ie,se]}],"backdrop-opacity":[{"backdrop-opacity":[Ne,ie,se]}],"backdrop-saturate":[{"backdrop-saturate":[Ne,ie,se]}],"backdrop-sepia":[{"backdrop-sepia":["",Ne,ie,se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ie,se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ne,"initial",ie,se]}],ease:[{ease:["linear","initial",y,ie,se]}],delay:[{delay:[Ne,ie,se]}],animate:[{animate:["none",b,ie,se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,ie,se]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:le()}],"scale-x":[{"scale-x":le()}],"scale-y":[{"scale-y":le()}],"scale-z":[{"scale-z":le()}],"scale-3d":["scale-3d"],skew:[{skew:Ee()}],"skew-x":[{"skew-x":Ee()}],"skew-y":[{"skew-y":Ee()}],transform:[{transform:[ie,se,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:re()}],"translate-x":[{"translate-x":re()}],"translate-y":[{"translate-y":re()}],"translate-z":[{"translate-z":re()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"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",ie,se]}],"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":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mbs":[{"scroll-mbs":k()}],"scroll-mbe":[{"scroll-mbe":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pbs":[{"scroll-pbs":k()}],"scroll-pbe":[{"scroll-pbe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",ie,se]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[Ne,Bs,$r,Rm]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-bs","border-w-be","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-bs","border-color-be","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-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]}},GC=SC(HC);function j(...e){return GC(C0(e))}function ss(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}function UC(e,t=8,n="...",r=3,o=4){return e.length<=t?e:e.substring(0,r)+n+e.substring(e.length-o)}const YC=["en","es","ja","ar","fr","pt","tr","ru","de","zh"],I0="lang";function Za(){if(typeof window>"u")return"en";try{const e=localStorage.getItem(I0);if(e&&YC.includes(e))return e}catch{}return"en"}const KC=["ar"];function go(e){const t=e??Za();return KC.includes(t)?"rtl":"ltr"}const ZC=Ge("relative w-full rounded-lg border px-4 py-3 text-sm grid grid-cols-[auto_1fr] has-[>svg]:gap-x-3 has-[>i]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current [&>i]:translate-y-0.5",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function qC({className:e,variant:t,...n}){return i.jsx("div",{"data-slot":"alert",role:"alert",className:j(ZC({variant:t}),e),...n})}function XC({className:e,...t}){return i.jsx("div",{"data-slot":"alert-title",className:j("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function JC({className:e,...t}){return i.jsx("div",{"data-slot":"alert-description",className:j("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}function te(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Am(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function At(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Am(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Am(e[o],null)}}}}function Se(...e){return m.useCallback(At(...e),e)}function QC(e,t){const n=m.createContext(t),r=s=>{const{children:a,...l}=s,c=m.useMemo(()=>l,Object.values(l));return i.jsx(n.Provider,{value:c,children:a})};r.displayName=e+"Provider";function o(s){const a=m.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function St(e,t=[]){let n=[];function r(s,a){const l=m.createContext(a),c=n.length;n=[...n,a];const u=d=>{const{scope:p,children:h,...g}=d,x=p?.[e]?.[c]||l,v=m.useMemo(()=>g,Object.values(g));return i.jsx(x.Provider,{value:v,children:h})};u.displayName=s+"Provider";function f(d,p){const h=p?.[e]?.[c]||l,g=m.useContext(h);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const o=()=>{const s=n.map(a=>m.createContext(a));return function(l){const c=l?.[e]||s;return m.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[r,e8(o,...t)]}function e8(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function t8(e){const t=n8(e),n=m.forwardRef((r,o)=>{const{children:s,...a}=r,l=m.Children.toArray(s),c=l.find(o8);if(c){const u=c.props.children,f=l.map(d=>d===c?m.Children.count(u)>1?m.Children.only(null):m.isValidElement(u)?u.props.children:null:d);return i.jsx(t,{...a,ref:o,children:m.isValidElement(u)?m.cloneElement(u,void 0,f):null})}return i.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function n8(e){const t=m.forwardRef((n,r)=>{const{children:o,...s}=n;if(m.isValidElement(o)){const a=a8(o),l=s8(s,o.props);return o.type!==m.Fragment&&(l.ref=r?At(r,a):a),m.cloneElement(o,l)}return m.Children.count(o)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var r8=Symbol("radix.slottable");function o8(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===r8}function s8(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...l)=>{const c=s(...l);return o(...l),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function a8(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var i8=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ue=i8.reduce((e,t)=>{const n=t8(`Primitive.${t}`),r=m.forwardRef((o,s)=>{const{asChild:a,...l}=o,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(c,{...l,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function F0(e,t){e&&lc.flushSync(()=>e.dispatchEvent(t))}function dn(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...n)=>t.current?.(...n),[])}function l8(e,t=globalThis?.document){const n=dn(e);m.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var c8="DismissableLayer",dd="dismissableLayer.update",u8="dismissableLayer.pointerDownOutside",d8="dismissableLayer.focusOutside",Pm,$0=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),vs=m.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:l,...c}=e,u=m.useContext($0),[f,d]=m.useState(null),p=f?.ownerDocument??globalThis?.document,[,h]=m.useState({}),g=Se(t,_=>d(_)),x=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=x.indexOf(v),b=f?x.indexOf(f):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,w=b>=y,E=h8(_=>{const k=_.target,I=[...u.branches].some(F=>F.contains(k));!w||I||(o?.(_),a?.(_),_.defaultPrevented||l?.())},p),N=m8(_=>{const k=_.target;[...u.branches].some(F=>F.contains(k))||(s?.(_),a?.(_),_.defaultPrevented||l?.())},p);return l8(_=>{b===u.layers.size-1&&(r?.(_),!_.defaultPrevented&&l&&(_.preventDefault(),l()))},p),m.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Pm=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Tm(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Pm)}},[f,p,n,u]),m.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Tm())},[f,u]),m.useEffect(()=>{const _=()=>h({});return document.addEventListener(dd,_),()=>document.removeEventListener(dd,_)},[]),i.jsx(ue.div,{...c,ref:g,style:{pointerEvents:S?w?"auto":"none":void 0,...e.style},onFocusCapture:te(e.onFocusCapture,N.onFocusCapture),onBlurCapture:te(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:te(e.onPointerDownCapture,E.onPointerDownCapture)})});vs.displayName=c8;var f8="DismissableLayerBranch",p8=m.forwardRef((e,t)=>{const n=m.useContext($0),r=m.useRef(null),o=Se(t,r);return m.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),i.jsx(ue.div,{...e,ref:o})});p8.displayName=f8;function h8(e,t=globalThis?.document){const n=dn(e),r=m.useRef(!1),o=m.useRef(()=>{});return m.useEffect(()=>{const s=l=>{if(l.target&&!r.current){let c=function(){V0(u8,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function m8(e,t=globalThis?.document){const n=dn(e),r=m.useRef(!1);return m.useEffect(()=>{const o=s=>{s.target&&!r.current&&V0(d8,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Tm(){const e=new CustomEvent(dd);document.dispatchEvent(e)}function V0(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?F0(o,s):o.dispatchEvent(s)}var at=globalThis?.document?m.useLayoutEffect:()=>{},g8=m[" useId ".trim().toString()]||(()=>{}),x8=0;function tt(e){const[t,n]=m.useState(g8());return at(()=>{n(r=>r??String(x8++))},[e]),e||(t?`radix-${t}`:"")}const v8=["top","right","bottom","left"],Sr=Math.min,Kt=Math.max,Sl=Math.round,Ri=Math.floor,On=e=>({x:e,y:e}),y8={left:"right",right:"left",bottom:"top",top:"bottom"};function fd(e,t,n){return Kt(e,Sr(t,n))}function tr(e,t){return typeof e=="function"?e(t):e}function nr(e){return e.split("-")[0]}function ys(e){return e.split("-")[1]}function Ff(e){return e==="x"?"y":"x"}function $f(e){return e==="y"?"height":"width"}function An(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Vf(e){return Ff(An(e))}function b8(e,t,n){n===void 0&&(n=!1);const r=ys(e),o=Vf(e),s=$f(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=El(a)),[a,El(a)]}function w8(e){const t=El(e);return[pd(e),t,pd(t)]}function pd(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Om=["left","right"],Lm=["right","left"],C8=["top","bottom"],S8=["bottom","top"];function E8(e,t,n){switch(e){case"top":case"bottom":return n?t?Lm:Om:t?Om:Lm;case"left":case"right":return t?C8:S8;default:return[]}}function N8(e,t,n,r){const o=ys(e);let s=E8(nr(e),n==="start",r);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(pd)))),s}function El(e){const t=nr(e);return y8[t]+e.slice(t.length)}function _8(e){return{top:0,right:0,bottom:0,left:0,...e}}function B0(e){return typeof e!="number"?_8(e):{top:e,right:e,bottom:e,left:e}}function Nl(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Im(e,t,n){let{reference:r,floating:o}=e;const s=An(t),a=Vf(t),l=$f(a),c=nr(t),u=s==="y",f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[l]/2-o[l]/2;let h;switch(c){case"top":h={x:f,y:r.y-o.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(ys(t)){case"start":h[a]-=p*(n&&u?-1:1);break;case"end":h[a]+=p*(n&&u?-1:1);break}return h}async function j8(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:a,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=tr(t,e),g=B0(h),v=l[p?d==="floating"?"reference":"floating":d],y=Nl(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:u,rootBoundary:f,strategy:c})),b=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),w=await(s.isElement==null?void 0:s.isElement(S))?await(s.getScale==null?void 0:s.getScale(S))||{x:1,y:1}:{x:1,y:1},E=Nl(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:S,strategy:c}):b);return{top:(y.top-E.top+g.top)/w.y,bottom:(E.bottom-y.bottom+g.bottom)/w.y,left:(y.left-E.left+g.left)/w.x,right:(E.right-y.right+g.right)/w.x}}const k8=50,R8=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:a}=n,l=a.detectOverflow?a:{...a,detectOverflow:j8},c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=Im(u,r,c),p=r,h=0;const g={};for(let x=0;x<s.length;x++){const v=s[x];if(!v)continue;const{name:y,fn:b}=v,{x:S,y:w,data:E,reset:N}=await b({x:f,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:g,rects:u,platform:l,elements:{reference:e,floating:t}});f=S??f,d=w??d,g[y]={...g[y],...E},N&&h<k8&&(h++,typeof N=="object"&&(N.placement&&(p=N.placement),N.rects&&(u=N.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):N.rects),{x:f,y:d}=Im(u,p,c)),x=-1)}return{x:f,y:d,placement:p,strategy:o,middlewareData:g}},M8=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:a,elements:l,middlewareData:c}=t,{element:u,padding:f=0}=tr(e,t)||{};if(u==null)return{};const d=B0(f),p={x:n,y:r},h=Vf(o),g=$f(h),x=await a.getDimensions(u),v=h==="y",y=v?"top":"left",b=v?"bottom":"right",S=v?"clientHeight":"clientWidth",w=s.reference[g]+s.reference[h]-p[h]-s.floating[g],E=p[h]-s.reference[h],N=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let _=N?N[S]:0;(!_||!await(a.isElement==null?void 0:a.isElement(N)))&&(_=l.floating[S]||s.floating[g]);const k=w/2-E/2,I=_/2-x[g]/2-1,F=Sr(d[y],I),U=Sr(d[b],I),O=F,R=_-x[g]-U,L=_/2-x[g]/2+k,V=fd(O,L,R),D=!c.arrow&&ys(o)!=null&&L!==V&&s.reference[g]/2-(L<O?F:U)-x[g]/2<0,$=D?L<O?L-O:L-R:0;return{[h]:p[h]+$,data:{[h]:V,centerOffset:L-V-$,...D&&{alignmentOffset:$}},reset:D}}}),D8=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:a,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:x=!0,...v}=tr(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=nr(o),b=An(l),S=nr(l)===l,w=await(c.isRTL==null?void 0:c.isRTL(u.floating)),E=p||(S||!x?[El(l)]:w8(l)),N=g!=="none";!p&&N&&E.push(...N8(l,x,g,w));const _=[l,...E],k=await c.detectOverflow(t,v),I=[];let F=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&I.push(k[y]),d){const L=b8(o,a,w);I.push(k[L[0]],k[L[1]])}if(F=[...F,{placement:o,overflows:I}],!I.every(L=>L<=0)){var U,O;const L=(((U=s.flip)==null?void 0:U.index)||0)+1,V=_[L];if(V&&(!(d==="alignment"?b!==An(V):!1)||F.every(z=>An(z.placement)===b?z.overflows[0]>0:!0)))return{data:{index:L,overflows:F},reset:{placement:V}};let D=(O=F.filter($=>$.overflows[0]<=0).sort(($,z)=>$.overflows[1]-z.overflows[1])[0])==null?void 0:O.placement;if(!D)switch(h){case"bestFit":{var R;const $=(R=F.filter(z=>{if(N){const T=An(z.placement);return T===b||T==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(T=>T>0).reduce((T,M)=>T+M,0)]).sort((z,T)=>z[1]-T[1])[0])==null?void 0:R[0];$&&(D=$);break}case"initialPlacement":D=l;break}if(o!==D)return{reset:{placement:D}}}return{}}}};function Fm(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $m(e){return v8.some(t=>e[t]>=0)}const A8=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=tr(e,t);switch(o){case"referenceHidden":{const a=await r.detectOverflow(t,{...s,elementContext:"reference"}),l=Fm(a,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:$m(l)}}}case"escaped":{const a=await r.detectOverflow(t,{...s,altBoundary:!0}),l=Fm(a,n.floating);return{data:{escapedOffsets:l,escaped:$m(l)}}}default:return{}}}}},z0=new Set(["left","top"]);async function P8(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=nr(n),l=ys(n),c=An(n)==="y",u=z0.has(a)?-1:1,f=s&&c?-1:1,d=tr(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof g=="number"&&(h=l==="end"?g*-1:g),c?{x:h*f,y:p*u}:{x:p*u,y:h*f}}const T8=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:a,middlewareData:l}=t,c=await P8(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:a}}}}},O8=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:c={fn:y=>{let{x:b,y:S}=y;return{x:b,y:S}}},...u}=tr(e,t),f={x:n,y:r},d=await s.detectOverflow(t,u),p=An(nr(o)),h=Ff(p);let g=f[h],x=f[p];if(a){const y=h==="y"?"top":"left",b=h==="y"?"bottom":"right",S=g+d[y],w=g-d[b];g=fd(S,g,w)}if(l){const y=p==="y"?"top":"left",b=p==="y"?"bottom":"right",S=x+d[y],w=x-d[b];x=fd(S,x,w)}const v=c.fn({...t,[h]:g,[p]:x});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[h]:a,[p]:l}}}}}},L8=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:a}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=tr(e,t),f={x:n,y:r},d=An(o),p=Ff(d);let h=f[p],g=f[d];const x=tr(l,t),v=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(c){const S=p==="y"?"height":"width",w=s.reference[p]-s.floating[S]+v.mainAxis,E=s.reference[p]+s.reference[S]-v.mainAxis;h<w?h=w:h>E&&(h=E)}if(u){var y,b;const S=p==="y"?"width":"height",w=z0.has(nr(o)),E=s.reference[d]-s.floating[S]+(w&&((y=a.offset)==null?void 0:y[d])||0)+(w?0:v.crossAxis),N=s.reference[d]+s.reference[S]+(w?0:((b=a.offset)==null?void 0:b[d])||0)-(w?v.crossAxis:0);g<E?g=E:g>N&&(g=N)}return{[p]:h,[d]:g}}}},I8=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:a,elements:l}=t,{apply:c=()=>{},...u}=tr(e,t),f=await a.detectOverflow(t,u),d=nr(o),p=ys(o),h=An(o)==="y",{width:g,height:x}=s.floating;let v,y;d==="top"||d==="bottom"?(v=d,y=p===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(y=d,v=p==="end"?"top":"bottom");const b=x-f.top-f.bottom,S=g-f.left-f.right,w=Sr(x-f[v],b),E=Sr(g-f[y],S),N=!t.middlewareData.shift;let _=w,k=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(_=b),N&&!p){const F=Kt(f.left,0),U=Kt(f.right,0),O=Kt(f.top,0),R=Kt(f.bottom,0);h?k=g-2*(F!==0||U!==0?F+U:Kt(f.left,f.right)):_=x-2*(O!==0||R!==0?O+R:Kt(f.top,f.bottom))}await c({...t,availableWidth:k,availableHeight:_});const I=await a.getDimensions(l.floating);return g!==I.width||x!==I.height?{reset:{rects:!0}}:{}}}};function cc(){return typeof window<"u"}function bs(e){return W0(e)?(e.nodeName||"").toLowerCase():"#document"}function Zt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Vn(e){var t;return(t=(W0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function W0(e){return cc()?e instanceof Node||e instanceof Zt(e).Node:!1}function Cn(e){return cc()?e instanceof Element||e instanceof Zt(e).Element:!1}function or(e){return cc()?e instanceof HTMLElement||e instanceof Zt(e).HTMLElement:!1}function Vm(e){return!cc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Zt(e).ShadowRoot}function qa(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Sn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function F8(e){return/^(table|td|th)$/.test(bs(e))}function uc(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const $8=/transform|translate|scale|rotate|perspective|filter/,V8=/paint|layout|strict|content/,Vr=e=>!!e&&e!=="none";let hu;function Bf(e){const t=Cn(e)?Sn(e):e;return Vr(t.transform)||Vr(t.translate)||Vr(t.scale)||Vr(t.rotate)||Vr(t.perspective)||!zf()&&(Vr(t.backdropFilter)||Vr(t.filter))||$8.test(t.willChange||"")||V8.test(t.contain||"")}function B8(e){let t=Er(e);for(;or(t)&&!as(t);){if(Bf(t))return t;if(uc(t))return null;t=Er(t)}return null}function zf(){return hu==null&&(hu=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),hu}function as(e){return/^(html|body|#document)$/.test(bs(e))}function Sn(e){return Zt(e).getComputedStyle(e)}function dc(e){return Cn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Er(e){if(bs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Vm(e)&&e.host||Vn(e);return Vm(t)?t.host:t}function H0(e){const t=Er(e);return as(t)?e.ownerDocument?e.ownerDocument.body:e.body:or(t)&&qa(t)?t:H0(t)}function ja(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=H0(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=Zt(o);if(s){const l=hd(a);return t.concat(a,a.visualViewport||[],qa(o)?o:[],l&&n?ja(l):[])}else return t.concat(o,ja(o,[],n))}function hd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function G0(e){const t=Sn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=or(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=Sl(n)!==s||Sl(r)!==a;return l&&(n=s,r=a),{width:n,height:r,$:l}}function Wf(e){return Cn(e)?e:e.contextElement}function Qo(e){const t=Wf(e);if(!or(t))return On(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=G0(t);let a=(s?Sl(n.width):n.width)/r,l=(s?Sl(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const z8=On(0);function U0(e){const t=Zt(e);return!zf()||!t.visualViewport?z8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function W8(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Zt(e)?!1:t}function so(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Wf(e);let a=On(1);t&&(r?Cn(r)&&(a=Qo(r)):a=Qo(e));const l=W8(s,n,r)?U0(s):On(0);let c=(o.left+l.x)/a.x,u=(o.top+l.y)/a.y,f=o.width/a.x,d=o.height/a.y;if(s){const p=Zt(s),h=r&&Cn(r)?Zt(r):r;let g=p,x=hd(g);for(;x&&r&&h!==g;){const v=Qo(x),y=x.getBoundingClientRect(),b=Sn(x),S=y.left+(x.clientLeft+parseFloat(b.paddingLeft))*v.x,w=y.top+(x.clientTop+parseFloat(b.paddingTop))*v.y;c*=v.x,u*=v.y,f*=v.x,d*=v.y,c+=S,u+=w,g=Zt(x),x=hd(g)}}return Nl({width:f,height:d,x:c,y:u})}function fc(e,t){const n=dc(e).scrollLeft;return t?t.left+n:so(Vn(e)).left+n}function Y0(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-fc(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function H8(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",a=Vn(r),l=t?uc(t.floating):!1;if(r===a||l&&s)return n;let c={scrollLeft:0,scrollTop:0},u=On(1);const f=On(0),d=or(r);if((d||!d&&!s)&&((bs(r)!=="body"||qa(a))&&(c=dc(r)),d)){const h=so(r);u=Qo(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const p=a&&!d&&!s?Y0(a,c):On(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x+p.x,y:n.y*u.y-c.scrollTop*u.y+f.y+p.y}}function G8(e){return Array.from(e.getClientRects())}function U8(e){const t=Vn(e),n=dc(e),r=e.ownerDocument.body,o=Kt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Kt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+fc(e);const l=-n.scrollTop;return Sn(r).direction==="rtl"&&(a+=Kt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:a,y:l}}const Bm=25;function Y8(e,t){const n=Zt(e),r=Vn(e),o=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,l=0,c=0;if(o){s=o.width,a=o.height;const f=zf();(!f||f&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}const u=fc(r);if(u<=0){const f=r.ownerDocument,d=f.body,p=getComputedStyle(d),h=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(r.clientWidth-d.clientWidth-h);g<=Bm&&(s-=g)}else u<=Bm&&(s+=u);return{width:s,height:a,x:l,y:c}}function K8(e,t){const n=so(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=or(e)?Qo(e):On(1),a=e.clientWidth*s.x,l=e.clientHeight*s.y,c=o*s.x,u=r*s.y;return{width:a,height:l,x:c,y:u}}function zm(e,t,n){let r;if(t==="viewport")r=Y8(e,n);else if(t==="document")r=U8(Vn(e));else if(Cn(t))r=K8(t,n);else{const o=U0(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Nl(r)}function K0(e,t){const n=Er(e);return n===t||!Cn(n)||as(n)?!1:Sn(n).position==="fixed"||K0(n,t)}function Z8(e,t){const n=t.get(e);if(n)return n;let r=ja(e,[],!1).filter(l=>Cn(l)&&bs(l)!=="body"),o=null;const s=Sn(e).position==="fixed";let a=s?Er(e):e;for(;Cn(a)&&!as(a);){const l=Sn(a),c=Bf(a);!c&&l.position==="fixed"&&(o=null),(s?!c&&!o:!c&&l.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||qa(a)&&!c&&K0(e,a))?r=r.filter(f=>f!==a):o=l,a=Er(a)}return t.set(e,r),r}function q8(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?uc(t)?[]:Z8(t,this._c):[].concat(n),r],l=zm(t,a[0],o);let c=l.top,u=l.right,f=l.bottom,d=l.left;for(let p=1;p<a.length;p++){const h=zm(t,a[p],o);c=Kt(h.top,c),u=Sr(h.right,u),f=Sr(h.bottom,f),d=Kt(h.left,d)}return{width:u-d,height:f-c,x:d,y:c}}function X8(e){const{width:t,height:n}=G0(e);return{width:t,height:n}}function J8(e,t,n){const r=or(t),o=Vn(t),s=n==="fixed",a=so(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const c=On(0);function u(){c.x=fc(o)}if(r||!r&&!s)if((bs(t)!=="body"||qa(o))&&(l=dc(t)),r){const h=so(t,!0,s,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else o&&u();s&&!r&&o&&u();const f=o&&!r&&!s?Y0(o,l):On(0),d=a.left+l.scrollLeft-c.x-f.x,p=a.top+l.scrollTop-c.y-f.y;return{x:d,y:p,width:a.width,height:a.height}}function mu(e){return Sn(e).position==="static"}function Wm(e,t){if(!or(e)||Sn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Vn(e)===n&&(n=n.ownerDocument.body),n}function Z0(e,t){const n=Zt(e);if(uc(e))return n;if(!or(e)){let o=Er(e);for(;o&&!as(o);){if(Cn(o)&&!mu(o))return o;o=Er(o)}return n}let r=Wm(e,t);for(;r&&F8(r)&&mu(r);)r=Wm(r,t);return r&&as(r)&&mu(r)&&!Bf(r)?n:r||B8(e)||n}const Q8=async function(e){const t=this.getOffsetParent||Z0,n=this.getDimensions,r=await n(e.floating);return{reference:J8(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function e7(e){return Sn(e).direction==="rtl"}const t7={convertOffsetParentRelativeRectToViewportRelativeRect:H8,getDocumentElement:Vn,getClippingRect:q8,getOffsetParent:Z0,getElementRects:Q8,getClientRects:G8,getDimensions:X8,getScale:Qo,isElement:Cn,isRTL:e7};function q0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function n7(e,t){let n=null,r;const o=Vn(e);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:f,top:d,width:p,height:h}=u;if(l||t(),!p||!h)return;const g=Ri(d),x=Ri(o.clientWidth-(f+p)),v=Ri(o.clientHeight-(d+h)),y=Ri(f),S={rootMargin:-g+"px "+-x+"px "+-v+"px "+-y+"px",threshold:Kt(0,Sr(1,c))||1};let w=!0;function E(N){const _=N[0].intersectionRatio;if(_!==c){if(!w)return a();_?a(!1,_):r=setTimeout(()=>{a(!1,1e-7)},1e3)}_===1&&!q0(u,e.getBoundingClientRect())&&a(),w=!1}try{n=new IntersectionObserver(E,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,S)}n.observe(e)}return a(!0),s}function r7(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Wf(e),f=o||s?[...u?ja(u):[],...t?ja(t):[]]:[];f.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const d=u&&l?n7(u,n):null;let p=-1,h=null;a&&(h=new ResizeObserver(y=>{let[b]=y;b&&b.target===u&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=h)==null||S.observe(t)})),n()}),u&&!c&&h.observe(u),t&&h.observe(t));let g,x=c?so(e):null;c&&v();function v(){const y=so(e);x&&!q0(x,y)&&n(),x=y,g=requestAnimationFrame(v)}return n(),()=>{var y;f.forEach(b=>{o&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),d?.(),(y=h)==null||y.disconnect(),h=null,c&&cancelAnimationFrame(g)}}const o7=T8,s7=O8,a7=D8,i7=I8,l7=A8,Hm=M8,c7=L8,u7=(e,t,n)=>{const r=new Map,o={platform:t7,...n},s={...o.platform,_c:r};return R8(e,t,{...o,platform:s})};var d7=typeof document<"u",f7=function(){},sl=d7?C.useLayoutEffect:f7;function _l(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!_l(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!_l(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function X0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gm(e,t){const n=X0(e);return Math.round(t*n)/n}function gu(e){const t=m.useRef(e);return sl(()=>{t.current=e}),t}function p7(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:a}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[f,d]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=m.useState(r);_l(p,r)||h(r);const[g,x]=m.useState(null),[v,y]=m.useState(null),b=m.useCallback(z=>{z!==N.current&&(N.current=z,x(z))},[]),S=m.useCallback(z=>{z!==_.current&&(_.current=z,y(z))},[]),w=s||g,E=a||v,N=m.useRef(null),_=m.useRef(null),k=m.useRef(f),I=c!=null,F=gu(c),U=gu(o),O=gu(u),R=m.useCallback(()=>{if(!N.current||!_.current)return;const z={placement:t,strategy:n,middleware:p};U.current&&(z.platform=U.current),u7(N.current,_.current,z).then(T=>{const M={...T,isPositioned:O.current!==!1};L.current&&!_l(k.current,M)&&(k.current=M,lc.flushSync(()=>{d(M)}))})},[p,t,n,U,O]);sl(()=>{u===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(z=>({...z,isPositioned:!1})))},[u]);const L=m.useRef(!1);sl(()=>(L.current=!0,()=>{L.current=!1}),[]),sl(()=>{if(w&&(N.current=w),E&&(_.current=E),w&&E){if(F.current)return F.current(w,E,R);R()}},[w,E,R,F,I]);const V=m.useMemo(()=>({reference:N,floating:_,setReference:b,setFloating:S}),[b,S]),D=m.useMemo(()=>({reference:w,floating:E}),[w,E]),$=m.useMemo(()=>{const z={position:n,left:0,top:0};if(!D.floating)return z;const T=Gm(D.floating,f.x),M=Gm(D.floating,f.y);return l?{...z,transform:"translate("+T+"px, "+M+"px)",...X0(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:M}},[n,l,D.floating,f.x,f.y]);return m.useMemo(()=>({...f,update:R,refs:V,elements:D,floatingStyles:$}),[f,R,V,D,$])}const h7=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Hm({element:r.current,padding:o}).fn(n):{}:r?Hm({element:r,padding:o}).fn(n):{}}}},m7=(e,t)=>{const n=o7(e);return{name:n.name,fn:n.fn,options:[e,t]}},g7=(e,t)=>{const n=s7(e);return{name:n.name,fn:n.fn,options:[e,t]}},x7=(e,t)=>({fn:c7(e).fn,options:[e,t]}),v7=(e,t)=>{const n=a7(e);return{name:n.name,fn:n.fn,options:[e,t]}},y7=(e,t)=>{const n=i7(e);return{name:n.name,fn:n.fn,options:[e,t]}},b7=(e,t)=>{const n=l7(e);return{name:n.name,fn:n.fn,options:[e,t]}},w7=(e,t)=>{const n=h7(e);return{name:n.name,fn:n.fn,options:[e,t]}};var C7="Arrow",J0=m.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return i.jsx(ue.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:i.jsx("polygon",{points:"0,0 30,0 15,10"})})});J0.displayName=C7;var S7=J0;function pc(e){const[t,n]=m.useState(void 0);return at(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,l;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,l=u.blockSize}else a=e.offsetWidth,l=e.offsetHeight;n({width:a,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Hf="Popper",[Q0,Rr]=St(Hf),[E7,ex]=Q0(Hf),tx=e=>{const{__scopePopper:t,children:n}=e,[r,o]=m.useState(null);return i.jsx(E7,{scope:t,anchor:r,onAnchorChange:o,children:n})};tx.displayName=Hf;var nx="PopperAnchor",rx=m.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=ex(nx,n),a=m.useRef(null),l=Se(t,a),c=m.useRef(null);return m.useEffect(()=>{const u=c.current;c.current=r?.current||a.current,u!==c.current&&s.onAnchorChange(c.current)}),r?null:i.jsx(ue.div,{...o,ref:l})});rx.displayName=nx;var Gf="PopperContent",[N7,_7]=Q0(Gf),ox=m.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:g,...x}=e,v=ex(Gf,n),[y,b]=m.useState(null),S=Se(t,Y=>b(Y)),[w,E]=m.useState(null),N=pc(w),_=N?.width??0,k=N?.height??0,I=r+(s!=="center"?"-"+s:""),F=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},U=Array.isArray(u)?u:[u],O=U.length>0,R={padding:F,boundary:U.filter(k7),altBoundary:O},{refs:L,floatingStyles:V,placement:D,isPositioned:$,middlewareData:z}=p7({strategy:"fixed",placement:I,whileElementsMounted:(...Y)=>r7(...Y,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[m7({mainAxis:o+k,alignmentAxis:a}),c&&g7({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?x7():void 0,...R}),c&&v7({...R}),y7({...R,apply:({elements:Y,rects:Z,availableWidth:q,availableHeight:oe})=>{const{width:ne,height:le}=Z.reference,Ee=Y.floating.style;Ee.setProperty("--radix-popper-available-width",`${q}px`),Ee.setProperty("--radix-popper-available-height",`${oe}px`),Ee.setProperty("--radix-popper-anchor-width",`${ne}px`),Ee.setProperty("--radix-popper-anchor-height",`${le}px`)}}),w&&w7({element:w,padding:l}),R7({arrowWidth:_,arrowHeight:k}),p&&b7({strategy:"referenceHidden",...R})]}),[T,M]=ix(D),G=dn(g);at(()=>{$&&G?.()},[$,G]);const A=z.arrow?.x,W=z.arrow?.y,H=z.arrow?.centerOffset!==0,[P,B]=m.useState();return at(()=>{y&&B(window.getComputedStyle(y).zIndex)},[y]),i.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:$?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:P,"--radix-popper-transform-origin":[z.transformOrigin?.x,z.transformOrigin?.y].join(" "),...z.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:i.jsx(N7,{scope:n,placedSide:T,onArrowChange:E,arrowX:A,arrowY:W,shouldHideArrow:H,children:i.jsx(ue.div,{"data-side":T,"data-align":M,...x,ref:S,style:{...x.style,animation:$?void 0:"none"}})})})});ox.displayName=Gf;var sx="PopperArrow",j7={top:"bottom",right:"left",bottom:"top",left:"right"},ax=m.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=_7(sx,r),a=j7[s.placedSide];return i.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:i.jsx(S7,{...o,ref:n,style:{...o.style,display:"block"}})})});ax.displayName=sx;function k7(e){return e!==null}var R7=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=o.arrow?.centerOffset!==0,l=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,f]=ix(n),d={start:"0%",center:"50%",end:"100%"}[f],p=(o.arrow?.x??0)+l/2,h=(o.arrow?.y??0)+c/2;let g="",x="";return u==="bottom"?(g=a?d:`${p}px`,x=`${-c}px`):u==="top"?(g=a?d:`${p}px`,x=`${r.floating.height+c}px`):u==="right"?(g=`${-c}px`,x=a?d:`${h}px`):u==="left"&&(g=`${r.floating.width+c}px`,x=a?d:`${h}px`),{data:{x:g,y:x}}}});function ix(e){const[t,n="center"]=e.split("-");return[t,n]}var Xa=tx,Ja=rx,hc=ox,mc=ax,M7="Portal",ws=m.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=m.useState(!1);at(()=>s(!0),[]);const a=n||o&&globalThis?.document?.body;return a?ho.createPortal(i.jsx(ue.div,{...r,ref:t}),a):null});ws.displayName=M7;function D7(e,t){return m.useReducer((n,r)=>t[n][r]??n,e)}var Pt=e=>{const{present:t,children:n}=e,r=A7(t),o=typeof n=="function"?n({present:r.isPresent}):m.Children.only(n),s=Se(r.ref,P7(o));return typeof n=="function"||r.isPresent?m.cloneElement(o,{ref:s}):null};Pt.displayName="Presence";function A7(e){const[t,n]=m.useState(),r=m.useRef(null),o=m.useRef(e),s=m.useRef("none"),a=e?"mounted":"unmounted",[l,c]=D7(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const u=Mi(r.current);s.current=l==="mounted"?u:"none"},[l]),at(()=>{const u=r.current,f=o.current;if(f!==e){const p=s.current,h=Mi(u);e?c("MOUNT"):h==="none"||u?.display==="none"?c("UNMOUNT"):c(f&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),at(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,d=h=>{const x=Mi(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&x&&(c("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=h=>{h.target===t&&(s.current=Mi(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:m.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Mi(e){return e?.animationName||"none"}function P7(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var T7=Symbol("radix.slottable");function O7(e){const t=({children:n})=>i.jsx(i.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=T7,t}var L7=m[" useInsertionEffect ".trim().toString()]||at;function mt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,a]=I7({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:o;{const f=m.useRef(e!==void 0);m.useEffect(()=>{const d=f.current;d!==l&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=l},[l,r])}const u=m.useCallback(f=>{if(l){const d=F7(f)?f(e):f;d!==e&&a.current?.(d)}else s(f)},[l,e,s,a]);return[c,u]}function I7({defaultProp:e,onChange:t}){const[n,r]=m.useState(e),o=m.useRef(n),s=m.useRef(t);return L7(()=>{s.current=t},[t]),m.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function F7(e){return typeof e=="function"}var lx=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),$7="VisuallyHidden",cx=m.forwardRef((e,t)=>i.jsx(ue.span,{...e,ref:t,style:{...lx,...e.style}}));cx.displayName=$7;var V7=cx,[gc]=St("Tooltip",[Rr]),xc=Rr(),ux="TooltipProvider",B7=700,md="tooltip.open",[z7,Uf]=gc(ux),dx=e=>{const{__scopeTooltip:t,delayDuration:n=B7,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,a=m.useRef(!0),l=m.useRef(!1),c=m.useRef(0);return m.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),i.jsx(z7,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:m.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:m.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:m.useCallback(u=>{l.current=u},[]),disableHoverableContent:o,children:s})};dx.displayName=ux;var ka="Tooltip",[W7,Qa]=gc(ka),fx=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:a,delayDuration:l}=e,c=Uf(ka,e.__scopeTooltip),u=xc(t),[f,d]=m.useState(null),p=tt(),h=m.useRef(0),g=a??c.disableHoverableContent,x=l??c.delayDuration,v=m.useRef(!1),[y,b]=mt({prop:r,defaultProp:o??!1,onChange:_=>{_?(c.onOpen(),document.dispatchEvent(new CustomEvent(md))):c.onClose(),s?.(_)},caller:ka}),S=m.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),w=m.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,b(!0)},[b]),E=m.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b(!1)},[b]),N=m.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,b(!0),h.current=0},x)},[x,b]);return m.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),i.jsx(Xa,{...u,children:i.jsx(W7,{scope:t,contentId:p,open:y,stateAttribute:S,trigger:f,onTriggerChange:d,onTriggerEnter:m.useCallback(()=>{c.isOpenDelayedRef.current?N():w()},[c.isOpenDelayedRef,N,w]),onTriggerLeave:m.useCallback(()=>{g?E():(window.clearTimeout(h.current),h.current=0)},[E,g]),onOpen:w,onClose:E,disableHoverableContent:g,children:n})})};fx.displayName=ka;var gd="TooltipTrigger",px=m.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Qa(gd,n),s=Uf(gd,n),a=xc(n),l=m.useRef(null),c=Se(t,l,o.onTriggerChange),u=m.useRef(!1),f=m.useRef(!1),d=m.useCallback(()=>u.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),i.jsx(Ja,{asChild:!0,...a,children:i.jsx(ue.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:te(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:te(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:te(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:te(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:te(e.onBlur,o.onClose),onClick:te(e.onClick,o.onClose)})})});px.displayName=gd;var Yf="TooltipPortal",[H7,G7]=gc(Yf,{forceMount:void 0}),hx=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Qa(Yf,t);return i.jsx(H7,{scope:t,forceMount:n,children:i.jsx(Pt,{present:n||s.open,children:i.jsx(ws,{asChild:!0,container:o,children:r})})})};hx.displayName=Yf;var is="TooltipContent",mx=m.forwardRef((e,t)=>{const n=G7(is,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,a=Qa(is,e.__scopeTooltip);return i.jsx(Pt,{present:r||a.open,children:a.disableHoverableContent?i.jsx(gx,{side:o,...s,ref:t}):i.jsx(U7,{side:o,...s,ref:t})})}),U7=m.forwardRef((e,t)=>{const n=Qa(is,e.__scopeTooltip),r=Uf(is,e.__scopeTooltip),o=m.useRef(null),s=Se(t,o),[a,l]=m.useState(null),{trigger:c,onClose:u}=n,f=o.current,{onPointerInTransitChange:d}=r,p=m.useCallback(()=>{l(null),d(!1)},[d]),h=m.useCallback((g,x)=>{const v=g.currentTarget,y={x:g.clientX,y:g.clientY},b=q7(y,v.getBoundingClientRect()),S=X7(y,b),w=J7(x.getBoundingClientRect()),E=e9([...S,...w]);l(E),d(!0)},[d]);return m.useEffect(()=>()=>p(),[p]),m.useEffect(()=>{if(c&&f){const g=v=>h(v,f),x=v=>h(v,c);return c.addEventListener("pointerleave",g),f.addEventListener("pointerleave",x),()=>{c.removeEventListener("pointerleave",g),f.removeEventListener("pointerleave",x)}}},[c,f,h,p]),m.useEffect(()=>{if(a){const g=x=>{const v=x.target,y={x:x.clientX,y:x.clientY},b=c?.contains(v)||f?.contains(v),S=!Q7(y,a);b?p():S&&(p(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[c,f,a,u,p]),i.jsx(gx,{...e,ref:s})}),[Y7,K7]=gc(ka,{isInside:!1}),Z7=O7("TooltipContent"),gx=m.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...l}=e,c=Qa(is,n),u=xc(n),{onClose:f}=c;return m.useEffect(()=>(document.addEventListener(md,f),()=>document.removeEventListener(md,f)),[f]),m.useEffect(()=>{if(c.trigger){const d=p=>{p.target?.contains(c.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,f]),i.jsx(vs,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:f,children:i.jsxs(hc,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[i.jsx(Z7,{children:r}),i.jsx(Y7,{scope:n,isInside:!0,children:i.jsx(V7,{id:c.contentId,role:"tooltip",children:o||r})})]})})});mx.displayName=is;var xx="TooltipArrow",vx=m.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=xc(n);return K7(xx,n).isInside?null:i.jsx(mc,{...o,...r,ref:t})});vx.displayName=xx;function q7(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function X7(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function J7(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Q7(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const l=t[s],c=t[a],u=l.x,f=l.y,d=c.x,p=c.y;f>r!=p>r&&n<(d-u)*(r-f)/(p-f)+u&&(o=!o)}return o}function e9(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),t9(t)}function t9(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var n9=dx,r9=fx,o9=px,s9=hx,yx=mx,a9=vx;const Mt=n9,Vt=r9,Bt=o9,Dt=m.forwardRef(({className:e,sideOffset:t=4,...n},r)=>i.jsx(s9,{children:i.jsxs(yx,{ref:r,sideOffset:t,className:j("z-tooltip max-w-xs rounded-lg px-3 py-1.5 text-xs","bg-black text-white dark:bg-white dark:text-black dark:border dark:border-gray-200 dark: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,children:[n.children,i.jsx(a9,{className:"fill-black dark:fill-white"})]})}));Dt.displayName=yx.displayName;const i9=e=>!!(e==null||typeof e=="string"&&e.trim()===""||Array.isArray(e)&&e.length===0),zt=C.forwardRef(({content:e,children:t,contentProps:n,providerProps:r,triggerProps:o,show:s=!0,...a},l)=>!s||i9(e)?i.jsx(i.Fragment,{children:t}):i.jsx(Mt,{delayDuration:0,...r,children:i.jsxs(Vt,{...a,children:[i.jsx(Bt,{asChild:!0,className:j("flex items-center justify-center",o?.className),...o,children:i.jsx("div",{children:t})}),i.jsx(Dt,{ref:l,...n,children:e})]})}));zt.displayName="Tooltip";const l9=new Set(["ArrowLeft","ArrowRight","ArrowCircleLeft","ArrowCircleRight","ArrowCircleUpLeft","ArrowBendUpLeft","ArrowBendUpRight","ArrowElbowDownRight","ArrowUpRight","ArrowSquareIn","CaretLeft","CaretRight","CaretDoubleLeft","CaretDoubleRight","CaretCircleRight","SignOut","Export","PhoneOutgoing","ToggleLeft","ToggleRight","TrendUp","TrendDown","SortAscending","SortDescending","Play","PlayCircle"]),c9=({size:e=16,weight:t,...n})=>i.jsxs("svg",{width:e,height:e,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:[i.jsx("path",{d:"M22.5987 5.33325C21.7107 7.76002 20.9907 8.47896 18.565 9.36657C20.9907 10.2545 21.7107 10.9746 22.5987 13.4003C23.4867 10.9746 24.2064 10.2545 26.632 9.36657C24.2064 8.47896 23.4867 7.76002 22.5987 5.33325Z",fill:"url(#paint0_linear_12357_32157)"}),i.jsx("path",{d:"M13.7673 19.5838H18.8632C18.9599 19.5838 19.0557 19.5641 19.1446 19.526C19.2336 19.4879 19.3139 19.4321 19.3806 19.3621C19.4474 19.2921 19.4993 19.2092 19.5331 19.1186C19.567 19.0279 19.5821 18.9313 19.5775 18.8347C19.3936 15.3146 17.913 11.9873 15.4211 9.49435C12.9292 7.0014 9.60247 5.51937 6.0825 5.33405C5.98585 5.32949 5.88927 5.34459 5.79861 5.37842C5.70796 5.41226 5.62511 5.46414 5.55508 5.53092C5.48504 5.59769 5.42929 5.67798 5.39117 5.76693C5.35306 5.85587 5.33339 5.95162 5.33334 6.04839V11.7631C5.33479 11.9429 5.40368 12.1157 5.5264 12.2471C5.64912 12.3786 5.81672 12.4592 5.99602 12.473C7.49759 12.6156 8.91561 13.2294 10.0473 14.2266C11.179 15.2237 11.9665 16.5532 12.2971 18.0248C12.3447 18.2304 12.3397 18.4446 12.2823 18.6477C12.225 18.8507 12.1172 19.036 11.9691 19.1862C11.8543 19.3013 11.7179 19.3925 11.5678 19.4548C11.4176 19.517 11.2567 19.5491 11.0941 19.549H6.04656C5.9529 19.549 5.86016 19.5674 5.77363 19.6033C5.6871 19.6391 5.60847 19.6917 5.54224 19.7579C5.47601 19.8241 5.42348 19.9028 5.38764 19.9893C5.35179 20.0758 5.33334 20.1686 5.33334 20.2622V25.9534C5.3332 26.047 5.35151 26.1397 5.38723 26.2262C5.42295 26.3127 5.47538 26.3914 5.54152 26.4576C5.60765 26.5239 5.6862 26.5764 5.77267 26.6123C5.85914 26.6481 5.95183 26.6666 6.04544 26.6666H11.7321C11.8257 26.6666 11.9184 26.6481 12.0049 26.6123C12.0913 26.5764 12.1699 26.5239 12.236 26.4576C12.3022 26.3914 12.3546 26.3127 12.3903 26.2262C12.426 26.1397 12.4443 26.047 12.4442 25.9534V20.8991C12.4444 20.5717 12.5745 20.2579 12.8059 20.0263L12.889 19.9421C13.0038 19.8271 13.1402 19.7358 13.2903 19.6735C13.4404 19.6113 13.6014 19.5793 13.7639 19.5793",fill:"url(#paint1_linear_12357_32157)"}),i.jsxs("defs",{children:[i.jsxs("linearGradient",{id:"paint0_linear_12357_32157",x1:"19.6597",y1:"4.82531",x2:"26.6515",y2:"9.13909",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"#D073F6"}),i.jsx("stop",{offset:"1",stopColor:"#5E77FD"})]}),i.jsxs("linearGradient",{id:"paint1_linear_12357_32157",x1:"7.26631",y1:"3.98998",x2:"21.839",y2:"9.9936",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"#D073F6"}),i.jsx("stop",{offset:"0.5",stopColor:"#5E77FD"}),i.jsx("stop",{offset:"1",stopColor:"#21B8F2"})]})]})]}),u9=["M18.9181 12.7058C19.0037 12.6944 19.1257 12.697 19.2117 12.7065C20.0405 12.7978 20.5891 13.525 20.4977 14.339C20.457 14.7119 20.2693 15.0531 19.9765 15.2868C19.5409 15.6344 18.9722 15.7133 18.451 15.49C18.3061 15.4279 18.1314 15.27 17.9644 15.258C17.8207 15.2477 17.6876 15.3137 17.5806 15.406C17.4072 15.5557 17.4497 15.7744 17.4357 15.9913C17.4135 16.4233 17.2113 16.8309 16.8594 17.0887C16.6478 17.2437 16.3364 17.3523 16.3273 17.6707C16.3141 18.1211 16.736 18.1566 16.9936 18.4213C17.2715 18.7068 17.4447 19.0819 17.4402 19.4878C17.436 19.8629 17.2614 20.2553 16.9924 20.5185C16.7087 20.7961 16.3372 20.9337 15.9402 20.9259C15.5495 20.9194 15.1782 20.7542 14.9111 20.4682C14.6517 20.1891 14.5115 19.8193 14.5206 19.4379C14.5334 19.0006 14.7435 18.5756 15.0952 18.3111C15.2188 18.2181 15.3959 18.1347 15.5015 18.0361C15.5897 17.9421 15.6487 17.8201 15.6397 17.6892C15.6144 17.3227 15.2509 17.2267 15.0111 17.014C14.6316 16.6775 14.5314 16.3135 14.5133 15.8196C14.5082 15.6786 14.4509 15.4921 14.3338 15.4104C13.9997 15.1633 13.7828 15.408 13.4934 15.5333C12.5832 15.9275 11.504 15.3128 11.4627 14.2985C11.4454 13.8728 11.5544 13.5152 11.8351 13.2039C12.0824 12.9282 12.4296 12.7633 12.7991 12.7463C13.2294 12.7259 13.5874 12.8384 13.9089 13.1305C14.1204 13.3283 14.2938 13.6296 14.3424 13.9153C14.3895 14.1917 14.2881 14.4838 14.5293 14.692C14.8485 14.9676 15.1091 14.728 15.4122 14.5919C15.5483 14.5307 15.6937 14.4924 15.8423 14.4787C16.0869 14.454 16.3336 14.4936 16.5582 14.5938C16.8499 14.7248 17.1147 14.9836 17.4447 14.6963C17.6755 14.4953 17.576 14.176 17.6209 13.8989C17.6616 13.6607 17.7624 13.4369 17.9138 13.2488C18.1784 12.9245 18.5042 12.7494 18.9181 12.7058Z","M15.8666 11.5786C16.3162 11.5147 16.7322 11.8285 16.7954 12.2792C16.8587 12.7298 16.5452 13.1465 16.0955 13.2094C15.6464 13.2723 15.2314 12.9586 15.1683 12.5086C15.1051 12.0585 15.4177 11.6423 15.8666 11.5786Z","M18.9129 16.9054C19.3643 16.835 19.7865 17.1471 19.8528 17.6001C19.9192 18.0532 19.6043 18.4736 19.1517 18.5363C18.7045 18.5981 18.2912 18.2871 18.2256 17.8395C18.1601 17.3919 18.4668 16.9749 18.9129 16.9054Z","M21.6791 11.7651C22.1308 11.705 22.5451 12.0245 22.6029 12.4774C22.6608 12.9303 22.3402 13.3441 21.8881 13.4001C21.4388 13.4557 21.0291 13.1369 20.9716 12.6868C20.9141 12.2367 21.2303 11.8247 21.6791 11.7651Z","M15.8428 21.82C16.2915 21.7448 16.7159 22.0491 16.7897 22.499C16.8636 22.9489 16.5587 23.3734 16.1096 23.4461C15.6623 23.5186 15.2408 23.2145 15.1673 22.7664C15.0937 22.3182 15.3959 21.895 15.8428 21.82Z","M10.0689 11.7677C10.5197 11.6976 10.9412 12.0087 11.008 12.461C11.0748 12.9132 10.7614 13.3335 10.3097 13.3973C9.86249 13.4605 9.44817 13.1501 9.38202 12.7023C9.31584 12.2545 9.62264 11.8371 10.0689 11.7677Z","M12.8315 16.9047C13.281 16.8409 13.697 17.1547 13.7603 17.6054C13.8235 18.056 13.51 18.4726 13.0603 18.5356C12.6112 18.5984 12.1963 18.2848 12.1331 17.8347C12.0699 17.3847 12.3825 16.9685 12.8315 16.9047Z","M21.6634 18.5456C22.0785 18.4833 22.4654 18.7699 22.5278 19.1859C22.5902 19.6018 22.3045 19.9898 21.8895 20.0526C21.4742 20.1155 21.0867 19.8288 21.0242 19.4125C20.9617 18.9962 21.248 18.608 21.6634 18.5456Z","M10.0732 18.5491C10.3444 18.5003 10.6208 18.6025 10.7955 18.8161C10.9702 19.0298 11.0158 19.3214 10.9147 19.5784C10.8137 19.8354 10.5818 20.0174 10.3086 20.0541C9.89902 20.1092 9.52055 19.8262 9.45654 19.417C9.39253 19.0078 9.66641 18.6223 10.0732 18.5491Z","M15.8697 8.57548C16.2228 8.51297 16.5598 8.74843 16.6234 9.10208C16.687 9.45572 16.4533 9.79432 16.1007 9.85933C15.7463 9.92466 15.4064 9.68894 15.3425 9.33354C15.2785 8.97814 15.5149 8.63832 15.8697 8.57548Z","M25.4409 15.4978C25.6684 15.4275 25.9097 15.5556 25.9795 15.7838C26.0494 16.0119 25.9213 16.2536 25.6936 16.3234C25.4662 16.393 25.2255 16.2649 25.1558 16.0371C25.0861 15.8093 25.2136 15.5679 25.4409 15.4978Z","M20.5428 7.18061C20.7775 7.14535 20.9964 7.30701 21.0324 7.54215C21.0684 7.77726 20.9079 7.99727 20.6734 8.03416C20.4378 8.07121 20.217 7.90936 20.1808 7.67306C20.1447 7.4368 20.3069 7.21606 20.5428 7.18061Z","M6.36217 15.488C6.59397 15.4505 6.81298 15.6061 6.85458 15.8377C6.89614 16.0693 6.74498 16.2916 6.51467 16.3375C6.36195 16.3679 6.20469 16.3134 6.10345 16.1947C6.00219 16.0761 5.97272 15.912 6.02635 15.7654C6.08002 15.6189 6.20842 15.5128 6.36217 15.488Z","M20.4636 23.9889C20.6162 23.9601 20.7724 24.016 20.8723 24.1352C20.9722 24.2543 21.0002 24.4182 20.9456 24.5638C20.891 24.7095 20.7623 24.8144 20.6088 24.8381C20.558 24.846 20.5062 24.8447 20.4558 24.8342C20.2549 24.7924 20.1114 24.614 20.1133 24.4083C20.1152 24.2026 20.2619 24.027 20.4636 23.9889Z","M11.1449 7.28854C11.377 7.2425 11.6026 7.39338 11.6492 7.62593C11.6957 7.85845 11.5458 8.08492 11.314 8.13227C11.0812 8.17981 10.8541 8.02884 10.8073 7.79539C10.7605 7.56191 10.9118 7.33477 11.1449 7.28854Z","M11.1996 23.9599C11.424 23.89 11.6627 24.0145 11.7345 24.2388C11.8062 24.4631 11.6841 24.7034 11.4609 24.7773C11.2609 24.8435 11.0425 24.754 10.946 24.5663C10.888 24.4536 10.8828 24.3209 10.9317 24.2038C10.9806 24.0869 11.0787 23.9975 11.1996 23.9599Z","M9.24088 15.5032C9.38779 15.4797 9.53596 15.5374 9.62835 15.6543C9.72077 15.7712 9.74299 15.929 9.68648 16.0669C9.62997 16.2049 9.50355 16.3015 9.35587 16.3196C9.13332 16.3468 8.92996 16.1905 8.89861 15.968C8.8673 15.7455 9.01951 15.5388 9.24088 15.5032Z","M22.5853 15.5079C22.8058 15.4517 23.0299 15.5856 23.0854 15.8068C23.1408 16.028 23.0066 16.2522 22.7858 16.3072C22.5659 16.362 22.3431 16.228 22.2879 16.0078C22.2327 15.7875 22.3657 15.5639 22.5853 15.5079Z","M7.72145 10.7312C7.86888 10.7178 8.01203 10.785 8.09621 10.9071C8.18037 11.0291 8.1925 11.1871 8.12798 11.3206C8.06343 11.4541 7.93222 11.5425 7.7845 11.5519C7.56023 11.5663 7.36613 11.3973 7.34889 11.1727C7.33162 10.9482 7.49763 10.7514 7.72145 10.7312Z","M12.5084 9.73563C12.6462 9.68127 12.8025 9.70549 12.9175 9.79901C13.0325 9.89249 13.0884 10.0408 13.0637 10.1872C13.039 10.3335 12.9377 10.4552 12.7984 10.5057C12.5872 10.5822 12.3539 10.4745 12.2746 10.2639C12.1953 10.0534 12.2995 9.81807 12.5084 9.73563Z","M12.6283 21.3856C12.7719 21.3478 12.9247 21.3906 13.0278 21.4976C13.131 21.6045 13.1685 21.759 13.1258 21.9015C13.0832 22.044 12.9671 22.1523 12.8223 22.1848C12.604 22.2337 12.3868 22.0984 12.334 21.8806C12.2811 21.6628 12.412 21.4427 12.6283 21.3856Z","M15.9111 25.1808C16.134 25.1536 16.3372 25.3111 16.367 25.5342C16.3967 25.7573 16.2418 25.9628 16.0196 25.9951C15.8736 26.0164 15.7274 25.9573 15.6369 25.8405C15.5464 25.7237 15.5256 25.5672 15.5823 25.4306C15.639 25.2941 15.7646 25.1987 15.9111 25.1808Z","M19.1884 9.66256C19.4118 9.62987 19.6195 9.78455 19.6527 10.0084C19.686 10.2323 19.5322 10.4408 19.3089 10.4747C19.0848 10.5087 18.8757 10.3539 18.8424 10.1292C18.8091 9.90452 18.9641 9.69539 19.1884 9.66256Z","M15.9093 6.0062C16.132 5.96717 16.3441 6.11637 16.3832 6.33952C16.4223 6.56268 16.2736 6.77536 16.0509 6.81467C15.8281 6.85401 15.6157 6.70479 15.5765 6.48144C15.5374 6.25809 15.6865 6.04527 15.9093 6.0062Z","M24.17 10.7683C24.3155 10.744 24.4628 10.8 24.5555 10.915C24.6482 11.0301 24.672 11.1862 24.6177 11.3237C24.5634 11.4612 24.4394 11.5587 24.2933 11.579C24.0717 11.6096 23.8666 11.4562 23.8329 11.2346C23.7991 11.0129 23.9493 10.8052 24.17 10.7683Z","M24.1577 20.4064C24.3772 20.3549 24.5968 20.4912 24.6487 20.711C24.7005 20.9309 24.5652 21.1513 24.346 21.2039C24.126 21.2567 23.905 21.1205 23.8529 20.8998C23.8008 20.6791 23.9374 20.458 24.1577 20.4064Z","M19.0546 21.4122C19.2766 21.3851 19.4791 21.5417 19.5092 21.7637C19.5394 21.9858 19.3859 22.1909 19.1648 22.2241C19.019 22.2461 18.8728 22.1876 18.782 22.0712C18.6912 21.9548 18.67 21.7985 18.7265 21.662C18.783 21.5256 18.9083 21.4301 19.0546 21.4122Z","M7.6583 20.4175C7.80355 20.3896 7.95245 20.4426 8.04768 20.556C8.14294 20.6694 8.16967 20.8255 8.11756 20.9642C8.06546 21.1029 7.94268 21.2026 7.7965 21.2249C7.57628 21.2585 7.36979 21.1092 7.33212 20.8891C7.29445 20.6691 7.43948 20.4593 7.6583 20.4175Z"],d9=({size:e=16,weight:t,...n})=>i.jsx("svg",{width:e,height:e,viewBox:"4 4 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:u9.map((r,o)=>i.jsx("path",{d:r,fill:"currentColor"},o))}),Um={light:"ph-light",fill:"ph-fill"},al={xs:12,sm:16,md:20,lg:24,xl:32},f9={AidaLogo:c9,Concierge:d9};function p9(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").toLowerCase()}function h9(e){return typeof e=="number"?e:e&&al[e]!=null?al[e]:e&&!Number.isNaN(Number(e))?Number(e):al.md}function m9(e){if(!e)return;const t=/(?:^|\s)(?:size|w|h|text)-\[(\d+(?:\.\d+)?)px\]/.exec(e);if(t)return Number(t[1]);const n=/(?:^|\s)(?:size|w|h)-(\d+(?:\.\d+)?)(?:\s|$|!)/.exec(e);if(n)return Number(n[1])*4}function g9({label:e,ariaLabel:t,ariaLabelledBy:n,ariaHidden:r,role:o,tooltip:s}){if(r!=null)return{"aria-hidden":r};const a=e??t??s;return a!=null||n!=null?{role:o??"img","aria-label":a,"aria-labelledby":n}:{"aria-hidden":!0}}const X=C.forwardRef(({name:e,weight:t="light",size:n,className:r,color:o,tooltip:s,tooltipProps:a,autoMirrorRtl:l,style:c,label:u,"aria-label":f,"aria-labelledby":d,"aria-hidden":p,role:h,...g},x)=>{if(!e)return null;const v=n!=null?h9(n):m9(r)??al.md,y=l??l9.has(e),b=g9({label:u,ariaLabel:f,ariaLabelledBy:d,ariaHidden:p,role:h,tooltip:s}),S=f9[e];if(S){const N=i.jsx(S,{size:v,color:o??"currentColor",className:j(y&&"rtl:scale-x-[-1]",r),"data-icon":e,...b,...g});return s?i.jsx(zt,{content:s,...a,children:N}):N}const w={fontSize:v,lineHeight:1,...o?{color:o}:null,...c},E=i.jsx("i",{ref:x,"data-icon":e,...b,className:j("inline-flex shrink-0",Um[t]??Um.light,`ph-${p9(e)}`,y&&"rtl:scale-x-[-1]",r),style:w,...g});return s?i.jsx(zt,{content:s,...a,children:E}):E});X.displayName="Icon";const x9=["Activity","AidaLogo","Archive","ArrowBendUpLeft","ArrowBendUpRight","ArrowCircleLeft","ArrowCircleRight","ArrowCircleUp","ArrowCircleUpLeft","ArrowClockwise","ArrowCounterClockwise","ArrowDown","ArrowElbowDownRight","ArrowLeft","ArrowRight","ArrowSquareIn","ArrowSquareOut","ArrowUp","ArrowUpRight","ArrowsClockwise","ArrowsCounterClockwise","ArrowsDownUp","ArrowsInSimple","ArrowsLeftRight","ArrowsOutSimple","Bank","BellRinging","BellSimple","BellSimpleSlash","Binoculars","BoundingBox","BracketsAngle","BracketsCurly","BracketsSquare","BugBeetle","Buildings","Calendar","CalendarDots","CalendarBlank","CalendarCheck","CalendarPlus","Camera","Cards","CaretCircleRight","CaretDoubleLeft","CaretDoubleRight","CaretDown","CaretLeft","CaretRight","CaretUp","CaretUpDown","Certificate","ChartBar","ChartLine","ChartLineUp","ChartPie","Check","CheckCircle","CheckSquare","CheckSquareOffset","Circle","CircleNotch","Clock","ClockClockwise","ClockCountdown","ClockCounterClockwise","CloudSlash","Code","Columns","Concierge","Copy","CopySimple","CreditCard","GoogleLogo","AppleLogo","PaypalLogo","CurrencyCircleDollar","CurrencyDollar","Desktop","Detective","DeviceMobileCamera","DeviceMobileSpeaker","DotsNine","DotsSixVertical","DotsThree","DotsThreeCircleVertical","DotsThreeOutline","DotsThreeVertical","Download","DownloadSimple","Envelope","Equals","Eraser","Export","Eye","EyeClosed","EyeSlash","File","FileArchive","FileArrowUp","FileCsv","FileDoc","FileJpg","FilePdf","FilePlus","FilePng","FilePpt","FileSearch","FileMagnifyingGlass","FileTxt","FileXls","FileZip","Flag","FlagBanner","FunnelSimple","Gear","GearFine","GearSix","GitBranch","GitFork","GlobeHemisphereWest","Hash","Headset","IdentificationCard","Image","ImageSquare","Info","Intersect","Key","Layout","Lifebuoy","Lightbulb","Lightning","LinkBreak","LinkSimple","LinkSimpleHorizontal","List","ListBullets","ListChecks","ListNumbers","ListPlus","Lock","LockKey","MagicWand","MagnifyingGlass","MapPin","Microphone","Minus","MinusCircle","Money","Monitor","Moon","Network","NetworkSlash","NotePencil","Notepad","Notification","NumberCircleOne","Package","Palette","Password","Pause","PauseCircle","Pencil","PencilSimple","PencilSimpleLine","Percent","Phone","PhoneCall","PhoneOutgoing","PhonePlus","PhoneSlash","PhoneX","Play","PlayCircle","Plug","Plugs","Plus","PlusCircle","Prohibit","PushPin","PushPinSimple","PushPinSimpleSlash","Question","Queue","RadioButton","Repeat","Rows","SelectionInverse","ShareNetwork","ShieldCheck","ShieldSlash","ShieldWarning","ShoppingCart","ShoppingCartSimple","Sidebar","SignOut","SortAscending","SortDescending","Sparkle","Square","SquareHalf","SquareHalfBottom","SquaresFour","Stack","Star","Storefront","Stop","Sun","Swap","Swatches","Table","Tag","TerminalWindow","TestTube","TextColumns","TextT","Textbox","ThumbsDown","ThumbsUp","Timer","ToggleLeft","ToggleRight","Translate","Trash","TreeStructure","TrendDown","TrendUp","Upload","UploadSimple","User","UserCircle","UserPlus","UserSwitch","Vault","Wallet","Warning","WarningCircle","X","XCircle"],Kf=C.forwardRef(({icon:e,title:t,description:n,iconProps:r,className:o,onClose:s,closeLabel:a,...l},c)=>i.jsxs(qC,{ref:c,className:j("app-alert",s&&"relative pr-10",o),...l,children:[e&&i.jsx(X,{name:e,className:j("size-4",r?.className),...r}),t&&i.jsx(XC,{children:t}),n&&i.jsx(JC,{children:n}),s&&i.jsx("button",{type:"button",onClick:s,"aria-label":a??"Close",className:"absolute right-2 top-2 rounded p-1 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:i.jsx(X,{name:"X",size:"sm"})})]}));Kf.displayName="Alert";function Ym(e){const t=v9(e),n=m.forwardRef((r,o)=>{const{children:s,...a}=r,l=m.Children.toArray(s),c=l.find(b9);if(c){const u=c.props.children,f=l.map(d=>d===c?m.Children.count(u)>1?m.Children.only(null):m.isValidElement(u)?u.props.children:null:d);return i.jsx(t,{...a,ref:o,children:m.isValidElement(u)?m.cloneElement(u,void 0,f):null})}return i.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function v9(e){const t=m.forwardRef((n,r)=>{const{children:o,...s}=n;if(m.isValidElement(o)){const a=C9(o),l=w9(s,o.props);return o.type!==m.Fragment&&(l.ref=r?At(r,a):a),m.cloneElement(o,l)}return m.Children.count(o)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var y9=Symbol("radix.slottable");function b9(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===y9}function w9(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...l)=>{const c=s(...l);return o(...l),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function C9(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function vc(e){const t=e+"CollectionProvider",[n,r]=St(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=x=>{const{scope:v,children:y}=x,b=C.useRef(null),S=C.useRef(new Map).current;return i.jsx(o,{scope:v,itemMap:S,collectionRef:b,children:y})};a.displayName=t;const l=e+"CollectionSlot",c=Ym(l),u=C.forwardRef((x,v)=>{const{scope:y,children:b}=x,S=s(l,y),w=Se(v,S.collectionRef);return i.jsx(c,{ref:w,children:b})});u.displayName=l;const f=e+"CollectionItemSlot",d="data-radix-collection-item",p=Ym(f),h=C.forwardRef((x,v)=>{const{scope:y,children:b,...S}=x,w=C.useRef(null),E=Se(v,w),N=s(f,y);return C.useEffect(()=>(N.itemMap.set(w,{ref:w,...S}),()=>{N.itemMap.delete(w)})),i.jsx(p,{[d]:"",ref:E,children:b})});h.displayName=f;function g(x){const v=s(e+"CollectionConsumer",x);return C.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const S=Array.from(b.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((N,_)=>S.indexOf(N.ref.current)-S.indexOf(_.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:a,Slot:u,ItemSlot:h},g,r]}var yc="Collapsible",[S9,bx]=St(yc),[E9,Zf]=S9(yc),wx=m.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:s,onOpenChange:a,...l}=e,[c,u]=mt({prop:r,defaultProp:o??!1,onChange:a,caller:yc});return i.jsx(E9,{scope:n,disabled:s,contentId:tt(),open:c,onOpenToggle:m.useCallback(()=>u(f=>!f),[u]),children:i.jsx(ue.div,{"data-state":Xf(c),"data-disabled":s?"":void 0,...l,ref:t})})});wx.displayName=yc;var Cx="CollapsibleTrigger",Sx=m.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Zf(Cx,n);return i.jsx(ue.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Xf(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:te(e.onClick,o.onOpenToggle)})});Sx.displayName=Cx;var qf="CollapsibleContent",Ex=m.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Zf(qf,e.__scopeCollapsible);return i.jsx(Pt,{present:n||o.open,children:({present:s})=>i.jsx(N9,{...r,ref:t,present:s})})});Ex.displayName=qf;var N9=m.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...s}=e,a=Zf(qf,n),[l,c]=m.useState(r),u=m.useRef(null),f=Se(t,u),d=m.useRef(0),p=d.current,h=m.useRef(0),g=h.current,x=a.open||l,v=m.useRef(x),y=m.useRef(void 0);return m.useEffect(()=>{const b=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(b)},[]),at(()=>{const b=u.current;if(b){y.current=y.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const S=b.getBoundingClientRect();d.current=S.height,h.current=S.width,v.current||(b.style.transitionDuration=y.current.transitionDuration,b.style.animationName=y.current.animationName),c(r)}},[a.open,r]),i.jsx(ue.div,{"data-state":Xf(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!x,...s,ref:f,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:x&&o})});function Xf(e){return e?"open":"closed"}var _9=wx,j9=Sx,k9=Ex,R9=m.createContext(void 0);function Cs(e){const t=m.useContext(R9);return e||t||"ltr"}var En="Accordion",M9=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Jf,D9,A9]=vc(En),[bc]=St(En,[A9,bx]),Qf=bx(),Nx=C.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,s=r;return i.jsx(Jf.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?i.jsx(L9,{...s,ref:t}):i.jsx(O9,{...o,ref:t})})});Nx.displayName=En;var[_x,P9]=bc(En),[jx,T9]=bc(En,{collapsible:!1}),O9=C.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:s=!1,...a}=e,[l,c]=mt({prop:n,defaultProp:r??"",onChange:o,caller:En});return i.jsx(_x,{scope:e.__scopeAccordion,value:C.useMemo(()=>l?[l]:[],[l]),onItemOpen:c,onItemClose:C.useCallback(()=>s&&c(""),[s,c]),children:i.jsx(jx,{scope:e.__scopeAccordion,collapsible:s,children:i.jsx(kx,{...a,ref:t})})})}),L9=C.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[a,l]=mt({prop:n,defaultProp:r??[],onChange:o,caller:En}),c=C.useCallback(f=>l((d=[])=>[...d,f]),[l]),u=C.useCallback(f=>l((d=[])=>d.filter(p=>p!==f)),[l]);return i.jsx(_x,{scope:e.__scopeAccordion,value:a,onItemOpen:c,onItemClose:u,children:i.jsx(jx,{scope:e.__scopeAccordion,collapsible:!0,children:i.jsx(kx,{...s,ref:t})})})}),[I9,wc]=bc(En),kx=C.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:s="vertical",...a}=e,l=C.useRef(null),c=Se(l,t),u=D9(n),d=Cs(o)==="ltr",p=te(e.onKeyDown,h=>{if(!M9.includes(h.key))return;const g=h.target,x=u().filter(k=>!k.ref.current?.disabled),v=x.findIndex(k=>k.ref.current===g),y=x.length;if(v===-1)return;h.preventDefault();let b=v;const S=0,w=y-1,E=()=>{b=v+1,b>w&&(b=S)},N=()=>{b=v-1,b<S&&(b=w)};switch(h.key){case"Home":b=S;break;case"End":b=w;break;case"ArrowRight":s==="horizontal"&&(d?E():N());break;case"ArrowDown":s==="vertical"&&E();break;case"ArrowLeft":s==="horizontal"&&(d?N():E());break;case"ArrowUp":s==="vertical"&&N();break}const _=b%y;x[_].ref.current?.focus()});return i.jsx(I9,{scope:n,disabled:r,direction:o,orientation:s,children:i.jsx(Jf.Slot,{scope:n,children:i.jsx(ue.div,{...a,"data-orientation":s,ref:c,onKeyDown:r?void 0:p})})})}),jl="AccordionItem",[F9,ep]=bc(jl),Rx=C.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,s=wc(jl,n),a=P9(jl,n),l=Qf(n),c=tt(),u=r&&a.value.includes(r)||!1,f=s.disabled||e.disabled;return i.jsx(F9,{scope:n,open:u,disabled:f,triggerId:c,children:i.jsx(_9,{"data-orientation":s.orientation,"data-state":Ox(u),...l,...o,ref:t,disabled:f,open:u,onOpenChange:d=>{d?a.onItemOpen(r):a.onItemClose(r)}})})});Rx.displayName=jl;var Mx="AccordionHeader",Dx=C.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=wc(En,n),s=ep(Mx,n);return i.jsx(ue.h3,{"data-orientation":o.orientation,"data-state":Ox(s.open),"data-disabled":s.disabled?"":void 0,...r,ref:t})});Dx.displayName=Mx;var xd="AccordionTrigger",Ax=C.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=wc(En,n),s=ep(xd,n),a=T9(xd,n),l=Qf(n);return i.jsx(Jf.ItemSlot,{scope:n,children:i.jsx(j9,{"aria-disabled":s.open&&!a.collapsible||void 0,"data-orientation":o.orientation,id:s.triggerId,...l,...r,ref:t})})});Ax.displayName=xd;var Px="AccordionContent",Tx=C.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=wc(En,n),s=ep(Px,n),a=Qf(n);return i.jsx(k9,{role:"region","aria-labelledby":s.triggerId,"data-orientation":o.orientation,...a,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});Tx.displayName=Px;function Ox(e){return e?"open":"closed"}var $9=Nx,V9=Rx,B9=Dx,Lx=Ax,Ix=Tx;const z9=$9,Fx=m.forwardRef(({className:e,...t},n)=>i.jsx(V9,{ref:n,className:j("border-b",e),...t}));Fx.displayName="AccordionItem";const $x=m.forwardRef(({className:e,children:t,...n},r)=>i.jsx(B9,{className:"flex",children:i.jsxs(Lx,{ref:r,className:j("flex flex-1 items-center justify-between rounded-md py-4 text-sm font-medium text-foreground outline-none transition-all hover:underline focus-visible:ring-[3px] focus-visible:ring-ring/50 active:opacity-60 [&[data-state=open]>svg]:rotate-180 [&[data-state=open]>i]:rotate-180",e),...n,children:[t,i.jsx(X,{name:"CaretDown",size:"sm",className:"shrink-0 text-foreground transition-transform duration-200"})]})}));$x.displayName=Lx.displayName;const Vx=m.forwardRef(({className:e,children:t,...n},r)=>i.jsx(Ix,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:i.jsx("div",{className:j("pb-4 pt-0",e),children:t})}));Vx.displayName=Ix.displayName;const Bx=C.forwardRef(({className:e,children:t,...n},r)=>i.jsx(z9,{ref:r,className:j(e),...n,children:t}));Bx.displayName="Accordion";const zx=C.forwardRef(({className:e,children:t,value:n,...r},o)=>i.jsx(Fx,{ref:o,className:j(e),value:n,...r,children:t}));zx.displayName="AccordionItem";const Wx=C.forwardRef(({className:e,children:t,...n},r)=>i.jsx($x,{ref:r,className:j(e),...n,children:t}));Wx.displayName="AccordionTrigger";const Hx=C.forwardRef(({className:e,children:t,...n},r)=>i.jsx(Vx,{ref:r,className:j(e),...n,children:t}));Hx.displayName="AccordionContent";const W9="It seems that you do not belong to any account with permissions to access this section's content. Verify your permissions or reach out to your account(s) administrator for assistance.",Gx=C.forwardRef(({className:e,iconName:t="WarningCircle",iconWeight:n="fill",text:r=W9,...o},s)=>i.jsxs("div",{ref:s,className:j("flex w-full items-center gap-4 rounded-lg border border-border bg-background px-6 py-4 text-sm text-foreground",e),...o,children:[i.jsx(X,{name:t,weight:n,className:"size-6 shrink-0 text-yellow-500"}),i.jsx("p",{className:"m-0",children:r})]}));Gx.displayName="AccessDeniedAlert";const H9=e=>{const t=e.replace(/[^\w\s]/gi,"").replace(/\d+/g,"").replace(/\s+/g," ").trim();if(!t)return;const n=t.split(" ").filter(r=>r.length>0);if(n.length!==0)return n.length===1?n[0].charAt(0).toUpperCase():(n[0].charAt(0)+n[n.length-1].charAt(0)).toUpperCase()};function G9(e,t=[]){let n=[];function r(s,a){const l=m.createContext(a);l.displayName=s+"Context";const c=n.length;n=[...n,a];const u=d=>{const{scope:p,children:h,...g}=d,x=p?.[e]?.[c]||l,v=m.useMemo(()=>g,Object.values(g));return i.jsx(x.Provider,{value:v,children:h})};u.displayName=s+"Provider";function f(d,p){const h=p?.[e]?.[c]||l,g=m.useContext(h);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const o=()=>{const s=n.map(a=>m.createContext(a));return function(l){const c=l?.[e]||s;return m.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[r,U9(o,...t)]}function U9(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Y9=Symbol.for("react.lazy"),kl=m[" use ".trim().toString()];function K9(e){return typeof e=="object"&&e!==null&&"then"in e}function Ux(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Y9&&"_payload"in e&&K9(e._payload)}function ei(e){const t=Z9(e),n=m.forwardRef((r,o)=>{let{children:s,...a}=r;Ux(s)&&typeof kl=="function"&&(s=kl(s._payload));const l=m.Children.toArray(s),c=l.find(X9);if(c){const u=c.props.children,f=l.map(d=>d===c?m.Children.count(u)>1?m.Children.only(null):m.isValidElement(u)?u.props.children:null:d);return i.jsx(t,{...a,ref:o,children:m.isValidElement(u)?m.cloneElement(u,void 0,f):null})}return i.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var Cc=ei("Slot");function Z9(e){const t=m.forwardRef((n,r)=>{let{children:o,...s}=n;if(Ux(o)&&typeof kl=="function"&&(o=kl(o._payload)),m.isValidElement(o)){const a=Q9(o),l=J9(s,o.props);return o.type!==m.Fragment&&(l.ref=r?At(r,a):a),m.cloneElement(o,l)}return m.Children.count(o)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var q9=Symbol("radix.slottable");function X9(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===q9}function J9(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...l)=>{const c=s(...l);return o(...l),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Q9(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var eS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],tp=eS.reduce((e,t)=>{const n=ei(`Primitive.${t}`),r=m.forwardRef((o,s)=>{const{asChild:a,...l}=o,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(c,{...l,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Di={exports:{}},xu={};var Km;function tS(){if(Km)return xu;Km=1;var e=C;function t(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,a=e.useDebugValue;function l(d,p){var h=p(),g=r({inst:{value:h,getSnapshot:p}}),x=g[0].inst,v=g[1];return s(function(){x.value=h,x.getSnapshot=p,c(x)&&v({inst:x})},[d,h,p]),o(function(){return c(x)&&v({inst:x}),d(function(){c(x)&&v({inst:x})})},[d]),a(h),h}function c(d){var p=d.getSnapshot;d=d.value;try{var h=p();return!n(d,h)}catch{return!0}}function u(d,p){return p()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:l;return xu.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,xu}var vu={};var Zm;function nS(){return Zm||(Zm=1,process.env.NODE_ENV!=="production"&&(function(){function e(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}function t(h,g){f||o.startTransition===void 0||(f=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var x=g();if(!d){var v=g();s(x,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}v=a({inst:{value:x,getSnapshot:g}});var y=v[0].inst,b=v[1];return c(function(){y.value=x,y.getSnapshot=g,n(y)&&b({inst:y})},[h,x,g]),l(function(){return n(y)&&b({inst:y}),h(function(){n(y)&&b({inst:y})})},[h]),u(x),x}function n(h){var g=h.getSnapshot;h=h.value;try{var x=g();return!s(h,x)}catch{return!0}}function r(h,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=C,s=typeof Object.is=="function"?Object.is:e,a=o.useState,l=o.useEffect,c=o.useLayoutEffect,u=o.useDebugValue,f=!1,d=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;vu.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),vu}var qm;function rS(){return qm||(qm=1,process.env.NODE_ENV==="production"?Di.exports=tS():Di.exports=nS()),Di.exports}var oS=rS();function sS(){return oS.useSyncExternalStore(aS,()=>!0,()=>!1)}function aS(){return()=>{}}var np="Avatar",[iS]=G9(np),[lS,Yx]=iS(np),Kx=m.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,s]=m.useState("idle");return i.jsx(lS,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:s,children:i.jsx(tp.span,{...r,ref:t})})});Kx.displayName=np;var Zx="AvatarImage",qx=m.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...s}=e,a=Yx(Zx,n),l=cS(r,s),c=dn(u=>{o(u),a.onImageLoadingStatusChange(u)});return at(()=>{l!=="idle"&&c(l)},[l,c]),l==="loaded"?i.jsx(tp.img,{...s,ref:t,src:r}):null});qx.displayName=Zx;var Xx="AvatarFallback",Jx=m.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,s=Yx(Xx,n),[a,l]=m.useState(r===void 0);return m.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>l(!0),r);return()=>window.clearTimeout(c)}},[r]),a&&s.imageLoadingStatus!=="loaded"?i.jsx(tp.span,{...o,ref:t}):null});Jx.displayName=Xx;function Xm(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function cS(e,{referrerPolicy:t,crossOrigin:n}){const r=sS(),o=m.useRef(null),s=r?(o.current||(o.current=new window.Image),o.current):null,[a,l]=m.useState(()=>Xm(s,e));return at(()=>{l(Xm(s,e))},[s,e]),at(()=>{const c=d=>()=>{l(d)};if(!s)return;const u=c("loaded"),f=c("error");return s.addEventListener("load",u),s.addEventListener("error",f),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",u),s.removeEventListener("error",f)}},[s,n,t]),a}var uS=Kx,dS=qx,fS=Jx;function pS({className:e,...t}){return i.jsx(uS,{"data-slot":"avatar",className:j("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function hS({className:e,...t}){return i.jsx(dS,{"data-slot":"avatar-image",className:j("aspect-square size-full",e),...t})}function mS({className:e,...t}){return i.jsx(fS,{"data-slot":"avatar-fallback",className:j("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}const gS=Ge("relative flex shrink-0 overflow-hidden rounded-full",{variants:{size:{xs:"size-5",sm:"size-6",default:"size-8",lg:"size-10",xl:"size-12"}},defaultVariants:{size:"default"}}),xS=Ge("aspect-square h-full w-full object-cover"),vS=Ge("flex h-full w-full items-center justify-center rounded-full bg-muted text-muted-foreground font-medium uppercase",{variants:{size:{xs:"text-xs",sm:"text-xs",default:"text-sm",lg:"text-base",xl:"text-lg"}},defaultVariants:{size:"default"}}),Qx=C.forwardRef(({size:e,src:t,alt:n,name:r,fallback:o,className:s,...a},l)=>{const c=r?H9(r):void 0;let u;if(o)u=o;else if(c)u=c;else{const f={xs:10,sm:12,default:16,lg:20,xl:24};u=i.jsx(X,{name:"User",size:f[e??"default"]})}return i.jsxs(pS,{ref:l,className:j(gS({size:e}),s),"data-testid":"avatar",...a,children:[t&&i.jsx(hS,{src:t,alt:n||r||"Avatar",className:j(xS()),"data-testid":"avatar-image","data-slot":"avatar-image"}),i.jsx(mS,{className:j(vS({size:e})),"data-testid":"avatar-fallback",children:u})]})});Qx.displayName="Avatar";const yS=Ge("inline-flex items-center justify-center rounded-lg border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 cursor-default gap-1 [&>svg]:pointer-events-none [&>i]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",error:"border-transparent bg-rose-600-10 text-rose-600 [a&]:hover:bg-rose-600-20 focus-visible:ring-rose-600-20 dark:bg-rose-600-10 dark:text-rose-600 dark:focus-visible:ring-rose-600-40 [&>svg]:fill-rose-600",warning:"border-transparent bg-yellow-500-10 text-yellow-500 [a&]:hover:bg-yellow-500-20 focus-visible:ring-yellow-500-20 dark:bg-yellow-500-10 dark:text-yellow-500 dark:focus-visible:ring-yellow-500-40 [&>svg]:fill-yellow-500",info:"border-transparent bg-blue-600-10 text-blue-600 [a&]:hover:bg-blue-600-20 focus-visible:ring-blue-600-20 dark:bg-blue-600-10 dark:text-blue-600 dark:focus-visible:ring-blue-600-40 [&>svg]:fill-blue-600",success:"border-transparent bg-green-600-10 text-green-600 [a&]:hover:bg-green-600-20 focus-visible:ring-green-600-20 dark:bg-green-600-10 dark:text-green-600 dark:focus-visible:ring-green-600-40 [&>svg]:fill-green-600",alert:"border-transparent bg-orange-600-10 text-orange-600 [a&]:hover:bg-orange-600-20 focus-visible:ring-orange-600-20 dark:bg-orange-600-10 dark:text-orange-600 dark:focus-visible:ring-orange-600-40 [&>svg]:fill-orange-600"}},defaultVariants:{variant:"default"}});function rp({className:e,variant:t,asChild:n=!1,...r}){const o=n?Cc:"span";return i.jsx(o,{"data-slot":"badge",className:j(yS({variant:t}),e),...r})}const Ze=C.forwardRef(({children:e,className:t,startIcon:n,endIcon:r,startIconProps:o,endIconProps:s,...a},l)=>i.jsxs(rp,{ref:l,className:j("app-badge",t),...a,children:[n&&i.jsx(X,{name:n,size:"xs",weight:o?.weight||"fill",...o}),e,r&&i.jsx(X,{name:r,size:"xs",weight:s?.weight||"regular",...s})]}));Ze.displayName="Badge";const es=Ge("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3 has-[>i]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 text-xs has-[>svg]:px-2.5 has-[>i]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4 has-[>i]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),wt=m.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const a=r?Cc:"button";return i.jsx(a,{type:"button",ref:s,"data-slot":"button",className:j(es({variant:t,size:n,className:e})),...o})});wt.displayName="Button";const ot=C.forwardRef(({children:e,className:t,startIcon:n,endIcon:r,startIconProps:o,endIconProps:s,loading:a=!1,disabled:l,asChild:c=!1,...u},f)=>{const d=l||a;return c?i.jsx(wt,{ref:f,disabled:d,asChild:!0,className:j("app-button",t),...u,children:e}):i.jsxs(wt,{ref:f,disabled:d,className:j("app-button",t),...u,children:[a&&i.jsx(X,{name:"CircleNotch",size:"sm",className:"animate-spin"}),n&&!a&&i.jsx(X,{name:n,size:"sm",...o}),e,r&&!a&&i.jsx(X,{name:r,size:"sm",...s})]})});ot.displayName="Button";const bS=Ge("rounded-xl border bg-muted text-card-foreground",{variants:{variant:{default:"border-border",active:"border-primary"}},defaultVariants:{variant:"default"}}),e2=m.forwardRef(({className:e,variant:t,...n},r)=>i.jsx("div",{ref:r,className:j(bS({variant:t}),e),...n}));e2.displayName="Card";const t2=m.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:j("flex flex-col gap-1.5 p-6",e),...t}));t2.displayName="CardHeader";const n2=m.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:j("text-base font-semibold leading-none tracking-tight text-card-foreground",e),...t}));n2.displayName="CardTitle";const r2=m.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:j("text-sm text-muted-foreground",e),...t}));r2.displayName="CardDescription";const o2=m.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:j("p-6",e),...t}));o2.displayName="CardContent";const s2=m.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:j("flex items-center p-6 pt-0",e),...t}));s2.displayName="CardFooter";const Ss=C.forwardRef(({className:e,children:t,variant:n="default",...r},o)=>i.jsx(e2,{ref:o,className:j("app-card",e),variant:n,...r,children:t}));Ss.displayName="CardBase";const op=C.forwardRef(({className:e,children:t,...n},r)=>i.jsx(t2,{ref:r,className:j("app-card-header",e),...n,children:t}));op.displayName="CardHeader";const sp=C.forwardRef(({className:e,children:t,...n},r)=>i.jsx(n2,{ref:r,className:j("app-card-title",e),...n,children:t}));sp.displayName="CardTitle";const ap=C.forwardRef(({className:e,children:t,...n},r)=>i.jsx(r2,{ref:r,className:j("app-card-description",e),...n,children:t}));ap.displayName="CardDescription";const Sc=C.forwardRef(({className:e,children:t,...n},r)=>i.jsx(o2,{ref:r,className:j("app-card-content",e),...n,children:t}));Sc.displayName="CardContent";const Ec=C.forwardRef(({className:e,children:t,...n},r)=>i.jsx(s2,{ref:r,className:j("app-card-footer",e),...n,children:t}));Ec.displayName="CardFooter";const a2=C.forwardRef(({className:e,title:t,description:n,children:r,footer:o,variant:s="default",headerClassName:a,titleClassName:l,descriptionClassName:c,contentClassName:u,footerClassName:f,...d},p)=>{const h=t||n;return i.jsxs(Ss,{ref:p,className:e,variant:s,...d,children:[h&&i.jsxs(op,{className:a,children:[t&&i.jsx(sp,{className:l,children:t}),n&&i.jsx(ap,{className:c,children:n})]}),i.jsx(Sc,{className:u,children:r}),o&&i.jsx(Ec,{className:f,children:o})]})});a2.displayName="Card";const wS=Ge("",{variants:{size:{xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl"},fontWeight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{size:"sm",fontWeight:"bold"}}),CS=Ge("",{variants:{size:{xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl"}},defaultVariants:{size:"sm"}}),ip=C.forwardRef(({value:e,currency:t="USD",locales:n="en",size:r,fontWeight:o="bold",className:s,showCurrencyCode:a=!0,valueClassName:l,codeClassName:c,...u},f)=>{if(!e&&e!==0)return null;const d=new Intl.NumberFormat(n,t?{style:"currency",currency:t.length===3?t:"USD",currencyDisplay:"narrowSymbol",minimumFractionDigits:0,maximumFractionDigits:20}:{minimumFractionDigits:0,maximumFractionDigits:20}).format(e);return i.jsxs("div",{ref:f,className:j("flex items-center gap-1",s),...u,children:[i.jsx("span",{className:j(wS({size:r,fontWeight:o}),l),children:d}),a&&t&&i.jsx("span",{className:j(CS({size:r}),"text-muted-foreground",c),children:t.toUpperCase()})]})});ip.displayName="CurrencyField";const i2=6048e5,SS=864e5,Jm=Symbol.for("constructDateFrom");function it(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Jm in e?e[Jm](t):e instanceof Date?new e.constructor(t):new Date(t)}function $e(e,t){return it(t||e,e)}function l2(e,t,n){const r=$e(e,n?.in);return isNaN(t)?it(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function c2(e,t,n){const r=$e(e,n?.in);if(isNaN(t))return it(e,NaN);if(!t)return r;const o=r.getDate(),s=it(e,r.getTime());s.setMonth(r.getMonth()+t+1,0);const a=s.getDate();return o>=a?s:(r.setFullYear(s.getFullYear(),s.getMonth(),o),r)}let ES={};function ti(){return ES}function ls(e,t){const n=ti(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=$e(e,t?.in),s=o.getDay(),a=(s<r?7:0)+s-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function Ra(e,t){return ls(e,{...t,weekStartsOn:1})}function u2(e,t){const n=$e(e,t?.in),r=n.getFullYear(),o=it(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const s=Ra(o),a=it(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const l=Ra(a);return n.getTime()>=s.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function Qm(e){const t=$e(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Es(e,...t){const n=it.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Ma(e,t){const n=$e(e,t?.in);return n.setHours(0,0,0,0),n}function lp(e,t,n){const[r,o]=Es(n?.in,e,t),s=Ma(r),a=Ma(o),l=+s-Qm(s),c=+a-Qm(a);return Math.round((l-c)/SS)}function NS(e,t){const n=u2(e,t),r=it(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ra(r)}function _S(e,t,n){return l2(e,t*7,n)}function jS(e,t,n){return c2(e,t*12,n)}function kS(e,t){let n,r=t?.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=it.bind(null,o));const s=$e(o,r);(!n||n<s||isNaN(+s))&&(n=s)}),it(r,n||NaN)}function RS(e,t){let n,r=t?.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=it.bind(null,o));const s=$e(o,r);(!n||n>s||isNaN(+s))&&(n=s)}),it(r,n||NaN)}function MS(e,t,n){const[r,o]=Es(n?.in,e,t);return+Ma(r)==+Ma(o)}function d2(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function DS(e){return!(!d2(e)&&typeof e!="number"||isNaN(+$e(e)))}function f2(e,t,n){const[r,o]=Es(n?.in,e,t),s=r.getFullYear()-o.getFullYear(),a=r.getMonth()-o.getMonth();return s*12+a}function AS(e,t){const n=$e(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function p2(e,t){const[n,r]=Es(e,t.start,t.end);return{start:n,end:r}}function PS(e,t){const{start:n,end:r}=p2(t?.in,e);let o=+n>+r;const s=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0),a.setDate(1);let l=1;const c=[];for(;+a<=s;)c.push(it(n,a)),a.setMonth(a.getMonth()+l);return o?c.reverse():c}function TS(e,t){const n=$e(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function OS(e,t){const n=$e(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function h2(e,t){const n=$e(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function LS(e,t){const{start:n,end:r}=p2(t?.in,e);let o=+n>+r;const s=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0),a.setMonth(0,1);let l=1;const c=[];for(;+a<=s;)c.push(it(n,a)),a.setFullYear(a.getFullYear()+l);return o?c.reverse():c}function m2(e,t){const n=ti(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=$e(e,t?.in),s=o.getDay(),a=(s<r?-7:0)+6-(s-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}function IS(e,t){return m2(e,{...t,weekStartsOn:1})}const FS={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},$S=(e,t,n)=>{let r;const o=FS[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function yu(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const VS={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},BS={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},zS={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},WS={date:yu({formats:VS,defaultWidth:"full"}),time:yu({formats:BS,defaultWidth:"full"}),dateTime:yu({formats:zS,defaultWidth:"full"})},HS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},GS=(e,t,n,r)=>HS[e];function zs(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,l=n?.width?String(n.width):a;o=e.formattingValues[l]||e.formattingValues[a]}else{const a=e.defaultWidth,l=n?.width?String(n.width):e.defaultWidth;o=e.values[l]||e.values[a]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const US={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},YS={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},KS={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ZS={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},qS={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},XS={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},JS=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},QS={ordinalNumber:JS,era:zs({values:US,defaultWidth:"wide"}),quarter:zs({values:YS,defaultWidth:"wide",argumentCallback:e=>e-1}),month:zs({values:KS,defaultWidth:"wide"}),day:zs({values:ZS,defaultWidth:"wide"}),dayPeriod:zs({values:qS,defaultWidth:"wide",formattingValues:XS,defaultFormattingWidth:"wide"})};function Ws(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const a=s[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?tE(l,d=>d.test(a)):eE(l,d=>d.test(a));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const f=t.slice(a.length);return{value:u,rest:f}}}function eE(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function tE(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function nE(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;const l=t.slice(o.length);return{value:a,rest:l}}}const rE=/^(\d+)(th|st|nd|rd)?/i,oE=/\d+/i,sE={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},aE={any:[/^b/i,/^(a|c)/i]},iE={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},lE={any:[/1/i,/2/i,/3/i,/4/i]},cE={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},uE={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},dE={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},fE={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},pE={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},hE={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},mE={ordinalNumber:nE({matchPattern:rE,parsePattern:oE,valueCallback:e=>parseInt(e,10)}),era:Ws({matchPatterns:sE,defaultMatchWidth:"wide",parsePatterns:aE,defaultParseWidth:"any"}),quarter:Ws({matchPatterns:iE,defaultMatchWidth:"wide",parsePatterns:lE,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ws({matchPatterns:cE,defaultMatchWidth:"wide",parsePatterns:uE,defaultParseWidth:"any"}),day:Ws({matchPatterns:dE,defaultMatchWidth:"wide",parsePatterns:fE,defaultParseWidth:"any"}),dayPeriod:Ws({matchPatterns:pE,defaultMatchWidth:"any",parsePatterns:hE,defaultParseWidth:"any"})},zo={code:"en-US",formatDistance:$S,formatLong:WS,formatRelative:GS,localize:QS,match:mE,options:{weekStartsOn:0,firstWeekContainsDate:1}};function gE(e,t){const n=$e(e,t?.in);return lp(n,h2(n))+1}function cp(e,t){const n=$e(e,t?.in),r=+Ra(n)-+NS(n);return Math.round(r/i2)+1}function g2(e,t){const n=$e(e,t?.in),r=n.getFullYear(),o=ti(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=it(t?.in||e,0);a.setFullYear(r+1,0,s),a.setHours(0,0,0,0);const l=ls(a,t),c=it(t?.in||e,0);c.setFullYear(r,0,s),c.setHours(0,0,0,0);const u=ls(c,t);return+n>=+l?r+1:+n>=+u?r:r-1}function xE(e,t){const n=ti(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=g2(e,t),s=it(t?.in||e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),ls(s,t)}function up(e,t){const n=$e(e,t?.in),r=+ls(n,t)-+xE(n,t);return Math.round(r/i2)+1}function Ie(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const dr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ie(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ie(n+1,2)},d(e,t){return Ie(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Ie(e.getHours()%12||12,t.length)},H(e,t){return Ie(e.getHours(),t.length)},m(e,t){return Ie(e.getMinutes(),t.length)},s(e,t){return Ie(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ie(o,t.length)}},jo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},eg={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return dr.y(e,t)},Y:function(e,t,n,r){const o=g2(e,r),s=o>0?o:1-o;if(t==="YY"){const a=s%100;return Ie(a,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Ie(s,t.length)},R:function(e,t){const n=u2(e);return Ie(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ie(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ie(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ie(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return dr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ie(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=up(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ie(o,t.length)},I:function(e,t,n){const r=cp(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ie(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):dr.d(e,t)},D:function(e,t,n){const r=gE(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ie(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Ie(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Ie(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Ie(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=jo.noon:r===0?o=jo.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=jo.evening:r>=12?o=jo.afternoon:r>=4?o=jo.morning:o=jo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return dr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):dr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ie(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ie(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):dr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):dr.s(e,t)},S:function(e,t){return dr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return ng(r);case"XXXX":case"XX":return Hr(r);default:return Hr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return ng(r);case"xxxx":case"xx":return Hr(r);default:return Hr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+tg(r,":");default:return"GMT"+Hr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+tg(r,":");default:return"GMT"+Hr(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ie(r,t.length)},T:function(e,t,n){return Ie(+e,t.length)}};function tg(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+Ie(s,2)}function ng(e,t){return e%60===0?(e>0?"-":"+")+Ie(Math.abs(e)/60,2):Hr(e,t)}function Hr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ie(Math.trunc(r/60),2),s=Ie(r%60,2);return n+o+t+s}const rg=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},x2=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},vE=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return rg(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",rg(r,t)).replace("{{time}}",x2(o,t))},yE={p:x2,P:vE},bE=/^D+$/,wE=/^Y+$/,CE=["D","DD","YY","YYYY"];function SE(e){return bE.test(e)}function EE(e){return wE.test(e)}function NE(e,t,n){const r=_E(e,t,n);if(console.warn(r),CE.includes(e))throw new RangeError(r)}function _E(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const jE=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,kE=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,RE=/^'([^]*?)'?$/,ME=/''/g,DE=/[a-zA-Z]/;function Zn(e,t,n){const r=ti(),o=n?.locale??r.locale??zo,s=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,l=$e(e,n?.in);if(!DS(l))throw new RangeError("Invalid time value");let c=t.match(kE).map(f=>{const d=f[0];if(d==="p"||d==="P"){const p=yE[d];return p(f,o.formatLong)}return f}).join("").match(jE).map(f=>{if(f==="''")return{isToken:!1,value:"'"};const d=f[0];if(d==="'")return{isToken:!1,value:AE(f)};if(eg[d])return{isToken:!0,value:f};if(d.match(DE))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:f}});o.localize.preprocessor&&(c=o.localize.preprocessor(l,c));const u={firstWeekContainsDate:s,weekStartsOn:a,locale:o};return c.map(f=>{if(!f.isToken)return f.value;const d=f.value;(!n?.useAdditionalWeekYearTokens&&EE(d)||!n?.useAdditionalDayOfYearTokens&&SE(d))&&NE(d,t,String(e));const p=eg[d[0]];return p(l,d,o.localize,u)}).join("")}function AE(e){const t=e.match(RE);return t?t[1].replace(ME,"'"):e}function PE(e,t){const n=$e(e,t?.in),r=n.getFullYear(),o=n.getMonth(),s=it(n,0);return s.setFullYear(r,o+1,0),s.setHours(0,0,0,0),s.getDate()}function TE(e,t){return $e(e,t?.in).getMonth()}function OE(e,t){return $e(e,t?.in).getFullYear()}function LE(e,t){return+$e(e)>+$e(t)}function IE(e,t){return+$e(e)<+$e(t)}function FE(e,t,n){const[r,o]=Es(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function $E(e,t,n){const[r,o]=Es(n?.in,e,t);return r.getFullYear()===o.getFullYear()}function VE(e,t,n){const r=$e(e,n?.in),o=r.getFullYear(),s=r.getDate(),a=it(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const l=PE(a);return r.setMonth(t,Math.min(s,l)),r}function BE(e,t,n){const r=$e(e,n?.in);return isNaN(+r)?it(e,NaN):(r.setFullYear(t),r)}function zE(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const WE={},Qs={};function eo(e,t){try{const r=(WE[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return r in Qs?Qs[r]:og(r,r.split(":"))}catch{if(e in Qs)return Qs[e];const n=e?.match(HE);return n?og(e,n.slice(1)):NaN}}const HE=/([+-]\d\d):?(\d\d)?/;function og(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return Qs[e]=n*60+r>0?n*60+r+o:n*60-r-o}class Pn extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(eo(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),v2(this),vd(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new Pn(...n,t):new Pn(Date.now(),t)}withTimeZone(t){return new Pn(+this,t)}getTimezoneOffset(){const t=-eo(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),vd(this),+this}[Symbol.for("constructDateFrom")](t){return new Pn(+new Date(t),this.timeZone)}}const sg=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!sg.test(e))return;const t=e.replace(sg,"$1UTC");Pn.prototype[t]&&(e.startsWith("get")?Pn.prototype[e]=function(){return this.internal[t]()}:(Pn.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),GE(this),+this},Pn.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),vd(this),+this}))});function vd(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-eo(e.timeZone,e)*60))}function GE(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),v2(e)}function v2(e){const t=eo(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),s=-new Date(+r).getTimezoneOffset(),a=o-s,l=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&l&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const c=o-n;c&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+c);const u=new Date(+e);u.setUTCSeconds(0);const f=o>0?u.getSeconds():(u.getSeconds()-60)%60,d=Math.round(-(eo(e.timeZone,e)*60))%60;(d||f)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+d),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+d+f));const p=eo(e.timeZone,e),h=p>0?Math.floor(p):Math.ceil(p),x=-new Date(+e).getTimezoneOffset()-h,v=h!==n,y=x-c;if(v&&y){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y);const b=eo(e.timeZone,e),S=b>0?Math.floor(b):Math.ceil(b),w=h-S;w&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+w),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+w))}}class bt extends Pn{static tz(t,...n){return n.length?new bt(...n,t):new bt(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t?.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${zE(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new bt(+this,t)}[Symbol.for("constructDateFrom")](t){return new bt(+new Date(t),this.timeZone)}}const ag=5,UE=4;function YE(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),s=t.addDays(o,ag*7-1);return t.getMonth(e)===t.getMonth(s)?ag:UE}function y2(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function KE(e,t){const n=y2(e,t),r=YE(e,t);return t.addDays(n,r*7-1)}const b2={...zo,labels:{labelDayButton:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(a,l)=>Zn(a,l,{locale:zo,...n});let s=o(e,"PPPP");return t.today&&(s=`Today, ${s}`),t.selected&&(s=`${s}, selected`),s},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,s)=>Zn(o,s,{locale:zo,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(a,l)=>Zn(a,l,{locale:zo,...n});let s=o(e,"PPPP");return t?.today&&(s=`Today, ${s}`),s},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,s)=>Zn(o,s,{locale:zo,...t}),r(e,"cccc")}}};class qt{constructor(t,n){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?bt.tz(this.options.timeZone):new this.Date,this.newDate=(r,o,s)=>this.overrides?.newDate?this.overrides.newDate(r,o,s):this.options.timeZone?new bt(r,o,s,this.options.timeZone):new Date(r,o,s),this.addDays=(r,o)=>this.overrides?.addDays?this.overrides.addDays(r,o):l2(r,o),this.addMonths=(r,o)=>this.overrides?.addMonths?this.overrides.addMonths(r,o):c2(r,o),this.addWeeks=(r,o)=>this.overrides?.addWeeks?this.overrides.addWeeks(r,o):_S(r,o),this.addYears=(r,o)=>this.overrides?.addYears?this.overrides.addYears(r,o):jS(r,o),this.differenceInCalendarDays=(r,o)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):lp(r,o),this.differenceInCalendarMonths=(r,o)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):f2(r,o),this.eachMonthOfInterval=r=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):PS(r),this.eachYearOfInterval=r=>{const o=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(r):LS(r),s=new Set(o.map(l=>this.getYear(l)));if(s.size===o.length)return o;const a=[];return s.forEach(l=>{a.push(new Date(l,0,1))}),a},this.endOfBroadcastWeek=r=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):KE(r,this),this.endOfISOWeek=r=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(r):IS(r),this.endOfMonth=r=>this.overrides?.endOfMonth?this.overrides.endOfMonth(r):AS(r),this.endOfWeek=(r,o)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(r,o):m2(r,this.options),this.endOfYear=r=>this.overrides?.endOfYear?this.overrides.endOfYear(r):OS(r),this.format=(r,o,s)=>{const a=this.overrides?.format?this.overrides.format(r,o,this.options):Zn(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(a):a},this.getISOWeek=r=>this.overrides?.getISOWeek?this.overrides.getISOWeek(r):cp(r),this.getMonth=(r,o)=>this.overrides?.getMonth?this.overrides.getMonth(r,this.options):TE(r,this.options),this.getYear=(r,o)=>this.overrides?.getYear?this.overrides.getYear(r,this.options):OE(r,this.options),this.getWeek=(r,o)=>this.overrides?.getWeek?this.overrides.getWeek(r,this.options):up(r,this.options),this.isAfter=(r,o)=>this.overrides?.isAfter?this.overrides.isAfter(r,o):LE(r,o),this.isBefore=(r,o)=>this.overrides?.isBefore?this.overrides.isBefore(r,o):IE(r,o),this.isDate=r=>this.overrides?.isDate?this.overrides.isDate(r):d2(r),this.isSameDay=(r,o)=>this.overrides?.isSameDay?this.overrides.isSameDay(r,o):MS(r,o),this.isSameMonth=(r,o)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(r,o):FE(r,o),this.isSameYear=(r,o)=>this.overrides?.isSameYear?this.overrides.isSameYear(r,o):$E(r,o),this.max=r=>this.overrides?.max?this.overrides.max(r):kS(r),this.min=r=>this.overrides?.min?this.overrides.min(r):RS(r),this.setMonth=(r,o)=>this.overrides?.setMonth?this.overrides.setMonth(r,o):VE(r,o),this.setYear=(r,o)=>this.overrides?.setYear?this.overrides.setYear(r,o):BE(r,o),this.startOfBroadcastWeek=(r,o)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):y2(r,this),this.startOfDay=r=>this.overrides?.startOfDay?this.overrides.startOfDay(r):Ma(r),this.startOfISOWeek=r=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(r):Ra(r),this.startOfMonth=r=>this.overrides?.startOfMonth?this.overrides.startOfMonth(r):TS(r),this.startOfWeek=(r,o)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(r,this.options):ls(r,this.options),this.startOfYear=r=>this.overrides?.startOfYear?this.overrides.startOfYear(r):h2(r),this.options={locale:b2,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){const t=this.options.locale?.code;return t&&qt.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:o}=this.options,s=n?.code;if(s&&qt.yearFirstLocales.has(s))try{return new Intl.DateTimeFormat(s,{month:"long",year:"numeric",timeZone:r,numberingSystem:o}).format(t)}catch{}const a=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,a)}}qt.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const Bn=new qt;class w2{constructor(t,n,r=Bn){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r,this.isoDate=r.format(t,"yyyy-MM-dd"),this.displayMonthId=r.format(n,"yyyy-MM"),this.dateMonthId=r.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class ZE{constructor(t,n){this.date=t,this.weeks=n}}class qE{constructor(t,n){this.days=n,this.weekNumber=t}}function XE(e){return C.createElement("button",{...e})}function JE(e){return C.createElement("span",{...e})}function QE(e){const{size:t=24,orientation:n="left",className:r}=e;return C.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&C.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&C.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&C.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&C.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function eN(e){const{day:t,modifiers:n,...r}=e;return C.createElement("td",{...r})}function tN(e){const{day:t,modifiers:n,...r}=e,o=C.useRef(null);return C.useEffect(()=>{n.focused&&o.current?.focus()},[n.focused]),C.createElement("button",{ref:o,...r})}var de;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(de||(de={}));var He;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(He||(He={}));var yn;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(yn||(yn={}));var Ut;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(Ut||(Ut={}));function nN(e){const{options:t,className:n,components:r,classNames:o,...s}=e,a=[o[de.Dropdown],n].join(" "),l=t?.find(({value:c})=>c===s.value);return C.createElement("span",{"data-disabled":s.disabled,className:o[de.DropdownRoot]},C.createElement(r.Select,{className:a,...s},t?.map(({value:c,label:u,disabled:f})=>C.createElement(r.Option,{key:c,value:c,disabled:f},u))),C.createElement("span",{className:o[de.CaptionLabel],"aria-hidden":!0},l?.label,C.createElement(r.Chevron,{orientation:"down",size:18,className:o[de.Chevron]})))}function rN(e){return C.createElement("div",{...e})}function oN(e){return C.createElement("div",{...e})}function sN(e){const{calendarMonth:t,displayIndex:n,...r}=e;return C.createElement("div",{...r},e.children)}function aN(e){const{calendarMonth:t,displayIndex:n,...r}=e;return C.createElement("div",{...r})}function iN(e){return C.createElement("table",{...e})}function lN(e){return C.createElement("div",{...e})}const C2=C.createContext(void 0);function ni(){const e=C.useContext(C2);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function cN(e){const{components:t}=ni();return C.createElement(t.Dropdown,{...e})}function uN(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...s}=e,{components:a,classNames:l,labels:{labelPrevious:c,labelNext:u}}=ni(),f=C.useCallback(p=>{o&&n?.(p)},[o,n]),d=C.useCallback(p=>{r&&t?.(p)},[r,t]);return C.createElement("nav",{...s},C.createElement(a.PreviousMonthButton,{type:"button",className:l[de.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:d},C.createElement(a.Chevron,{disabled:r?void 0:!0,className:l[de.Chevron],orientation:"left"})),C.createElement(a.NextMonthButton,{type:"button",className:l[de.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:f},C.createElement(a.Chevron,{disabled:o?void 0:!0,orientation:"right",className:l[de.Chevron]})))}function dN(e){const{components:t}=ni();return C.createElement(t.Button,{...e})}function fN(e){return C.createElement("option",{...e})}function pN(e){const{components:t}=ni();return C.createElement(t.Button,{...e})}function hN(e){const{rootRef:t,...n}=e;return C.createElement("div",{...n,ref:t})}function mN(e){return C.createElement("select",{...e})}function gN(e){const{week:t,...n}=e;return C.createElement("tr",{...n})}function xN(e){return C.createElement("th",{...e})}function vN(e){return C.createElement("thead",{"aria-hidden":!0},C.createElement("tr",{...e}))}function yN(e){const{week:t,...n}=e;return C.createElement("th",{...n})}function bN(e){return C.createElement("th",{...e})}function wN(e){return C.createElement("tbody",{...e})}function CN(e){const{components:t}=ni();return C.createElement(t.Dropdown,{...e})}const SN=Object.freeze(Object.defineProperty({__proto__:null,Button:XE,CaptionLabel:JE,Chevron:QE,Day:eN,DayButton:tN,Dropdown:nN,DropdownNav:rN,Footer:oN,Month:sN,MonthCaption:aN,MonthGrid:iN,Months:lN,MonthsDropdown:cN,Nav:uN,NextMonthButton:dN,Option:fN,PreviousMonthButton:pN,Root:hN,Select:mN,Week:gN,WeekNumber:yN,WeekNumberHeader:bN,Weekday:xN,Weekdays:vN,Weeks:wN,YearsDropdown:CN},Symbol.toStringTag,{value:"Module"}));function qn(e,t,n=!1,r=Bn){let{from:o,to:s}=e;const{differenceInCalendarDays:a,isSameDay:l}=r;return o&&s?(a(s,o)<0&&([o,s]=[s,o]),a(t,o)>=(n?1:0)&&a(s,t)>=(n?1:0)):!n&&s?l(s,t):!n&&o?l(o,t):!1}function dp(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Nc(e){return!!(e&&typeof e=="object"&&"from"in e)}function fp(e){return!!(e&&typeof e=="object"&&"after"in e)}function pp(e){return!!(e&&typeof e=="object"&&"before"in e)}function S2(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function E2(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Xn(e,t,n=Bn){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:s,isAfter:a}=n;return r.some(l=>{if(typeof l=="boolean")return l;if(n.isDate(l))return o(e,l);if(E2(l,n))return l.some(c=>o(e,c));if(Nc(l))return qn(l,e,!1,n);if(S2(l))return Array.isArray(l.dayOfWeek)?l.dayOfWeek.includes(e.getDay()):l.dayOfWeek===e.getDay();if(dp(l)){const c=s(l.before,e),u=s(l.after,e),f=c>0,d=u<0;return a(l.before,l.after)?d&&f:f||d}return fp(l)?s(e,l.after)>0:pp(l)?s(l.before,e)>0:typeof l=="function"?l(e):!1})}function EN(e,t,n,r,o){const{disabled:s,hidden:a,modifiers:l,showOutsideDays:c,broadcastCalendar:u,today:f=o.today()}=t,{isSameDay:d,isSameMonth:p,startOfMonth:h,isBefore:g,endOfMonth:x,isAfter:v}=o,y=n&&h(n),b=r&&x(r),S={[He.focused]:[],[He.outside]:[],[He.disabled]:[],[He.hidden]:[],[He.today]:[]},w={};for(const E of e){const{date:N,displayMonth:_}=E,k=!!(_&&!p(N,_)),I=!!(y&&g(N,y)),F=!!(b&&v(N,b)),U=!!(s&&Xn(N,s,o)),O=!!(a&&Xn(N,a,o))||I||F||!u&&!c&&k||u&&c===!1&&k,R=d(N,f);k&&S.outside.push(E),U&&S.disabled.push(E),O&&S.hidden.push(E),R&&S.today.push(E),l&&Object.keys(l).forEach(L=>{const V=l?.[L];V&&Xn(N,V,o)&&(w[L]?w[L].push(E):w[L]=[E])})}return E=>{const N={[He.focused]:!1,[He.disabled]:!1,[He.hidden]:!1,[He.outside]:!1,[He.today]:!1},_={};for(const k in S){const I=S[k];N[k]=I.some(F=>F===E)}for(const k in w)_[k]=w[k].some(I=>I===E);return{...N,..._}}}function NN(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[s])=>(n[s]?o.push(n[s]):t[He[s]]?o.push(t[He[s]]):t[yn[s]]&&o.push(t[yn[s]]),o),[t[de.Day]])}function _N(e){return{...SN,...e}}function jN(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function kN(){const e={};for(const t in de)e[de[t]]=`rdp-${de[t]}`;for(const t in He)e[He[t]]=`rdp-${He[t]}`;for(const t in yn)e[yn[t]]=`rdp-${yn[t]}`;for(const t in Ut)e[Ut[t]]=`rdp-${Ut[t]}`;return e}function N2(e,t,n){return(n??new qt(t)).formatMonthYear(e)}const RN=N2;function MN(e,t,n){return(n??new qt(t)).format(e,"d")}function DN(e,t=Bn){return t.format(e,"LLLL")}function AN(e,t,n){return(n??new qt(t)).format(e,"cccccc")}function PN(e,t=Bn){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function TN(){return""}function _2(e,t=Bn){return t.format(e,"yyyy")}const ON=_2,LN=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:N2,formatDay:MN,formatMonthCaption:RN,formatMonthDropdown:DN,formatWeekNumber:PN,formatWeekNumberHeader:TN,formatWeekdayName:AN,formatYearCaption:ON,formatYearDropdown:_2},Symbol.toStringTag,{value:"Module"}));function IN(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...LN,...e}}function hp(e,t,n,r){let o=(r??new qt(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const FN=hp;function mp(e,t,n){return(n??new qt(t)).formatMonthYear(e)}const $N=mp;function j2(e,t,n,r){let o=(r??new qt(n)).format(e,"PPPP");return t?.today&&(o=`Today, ${o}`),o}function k2(e){return"Choose the Month"}function R2(){return""}const VN="Go to the Next Month";function M2(e,t){return VN}function D2(e){return"Go to the Previous Month"}function A2(e,t,n){return(n??new qt(t)).format(e,"cccc")}function P2(e,t){return`Week ${e}`}function T2(e){return"Week Number"}function O2(e){return"Choose the Year"}const BN=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:$N,labelDay:FN,labelDayButton:hp,labelGrid:mp,labelGridcell:j2,labelMonthDropdown:k2,labelNav:R2,labelNext:M2,labelPrevious:D2,labelWeekNumber:P2,labelWeekNumberHeader:T2,labelWeekday:A2,labelYearDropdown:O2},Symbol.toStringTag,{value:"Module"})),mn=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function zN(e,t){const n=t.locale?.labels??{};return{...BN,...e??{},labelDayButton:mn(hp,e?.labelDayButton,n.labelDayButton),labelMonthDropdown:mn(k2,e?.labelMonthDropdown,n.labelMonthDropdown),labelNext:mn(M2,e?.labelNext,n.labelNext),labelPrevious:mn(D2,e?.labelPrevious,n.labelPrevious),labelWeekNumber:mn(P2,e?.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:mn(O2,e?.labelYearDropdown,n.labelYearDropdown),labelGrid:mn(mp,e?.labelGrid,n.labelGrid),labelGridcell:mn(j2,e?.labelGridcell,n.labelGridcell),labelNav:mn(R2,e?.labelNav,n.labelNav),labelWeekNumberHeader:mn(T2,e?.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:mn(A2,e?.labelWeekday,n.labelWeekday)}}function WN(e,t,n,r,o){const{startOfMonth:s,startOfYear:a,endOfYear:l,eachMonthOfInterval:c,getMonth:u}=o;return c({start:a(e),end:l(e)}).map(p=>{const h=r.formatMonthDropdown(p,o),g=u(p),x=t&&p<s(t)||n&&p>s(n)||!1;return{value:g,label:h,disabled:x}})}function HN(e,t={},n={}){let r={...t?.[de.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n?.[o]}}),r}function GN(e,t,n,r){const o=r??e.today(),s=n?e.startOfBroadcastWeek(o,e):t?e.startOfISOWeek(o):e.startOfWeek(o),a=[];for(let l=0;l<7;l++){const c=e.addDays(s,l);a.push(c)}return a}function UN(e,t,n,r,o=!1){if(!e||!t)return;const{startOfYear:s,endOfYear:a,eachYearOfInterval:l,getYear:c}=r,u=s(e),f=a(t),d=l({start:u,end:f});return o&&d.reverse(),d.map(p=>{const h=n.formatYearDropdown(p,r);return{value:c(p),label:h,disabled:!1}})}function YN(e,t={}){const{weekStartsOn:n,locale:r}=t,o=n??r?.options?.weekStartsOn??0,s=l=>{const c=typeof l=="number"||typeof l=="string"?new Date(l):l;return new bt(c.getFullYear(),c.getMonth(),c.getDate(),12,0,0,e)},a=l=>{const c=s(l);return new Date(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0,0)};return{today:()=>s(bt.tz(e)),newDate:(l,c,u)=>new bt(l,c,u,12,0,0,e),startOfDay:l=>s(l),startOfWeek:(l,c)=>{const u=s(l),f=c?.weekStartsOn??o,d=(u.getDay()-f+7)%7;return u.setDate(u.getDate()-d),u},startOfISOWeek:l=>{const c=s(l),u=(c.getDay()-1+7)%7;return c.setDate(c.getDate()-u),c},startOfMonth:l=>{const c=s(l);return c.setDate(1),c},startOfYear:l=>{const c=s(l);return c.setMonth(0,1),c},endOfWeek:(l,c)=>{const u=s(l),p=(((c?.weekStartsOn??o)+6)%7-u.getDay()+7)%7;return u.setDate(u.getDate()+p),u},endOfISOWeek:l=>{const c=s(l),u=(7-c.getDay())%7;return c.setDate(c.getDate()+u),c},endOfMonth:l=>{const c=s(l);return c.setMonth(c.getMonth()+1,0),c},endOfYear:l=>{const c=s(l);return c.setMonth(11,31),c},eachMonthOfInterval:l=>{const c=s(l.start),u=s(l.end),f=[],d=new bt(c.getFullYear(),c.getMonth(),1,12,0,0,e),p=u.getFullYear()*12+u.getMonth();for(;d.getFullYear()*12+d.getMonth()<=p;)f.push(new bt(d,e)),d.setMonth(d.getMonth()+1,1);return f},addDays:(l,c)=>{const u=s(l);return u.setDate(u.getDate()+c),u},addWeeks:(l,c)=>{const u=s(l);return u.setDate(u.getDate()+c*7),u},addMonths:(l,c)=>{const u=s(l);return u.setMonth(u.getMonth()+c),u},addYears:(l,c)=>{const u=s(l);return u.setFullYear(u.getFullYear()+c),u},eachYearOfInterval:l=>{const c=s(l.start),u=s(l.end),f=[],d=new bt(c.getFullYear(),0,1,12,0,0,e);for(;d.getFullYear()<=u.getFullYear();)f.push(new bt(d,e)),d.setFullYear(d.getFullYear()+1,0,1);return f},getWeek:(l,c)=>{const u=a(l);return up(u,{weekStartsOn:c?.weekStartsOn??o,firstWeekContainsDate:c?.firstWeekContainsDate??r?.options?.firstWeekContainsDate??1})},getISOWeek:l=>{const c=a(l);return cp(c)},differenceInCalendarDays:(l,c)=>{const u=a(l),f=a(c);return lp(u,f)},differenceInCalendarMonths:(l,c)=>{const u=a(l),f=a(c);return f2(u,f)}}}const ri=e=>e instanceof HTMLElement?e:null,bu=e=>[...e.querySelectorAll("[data-animated-month]")??[]],KN=e=>ri(e.querySelector("[data-animated-month]")),wu=e=>ri(e.querySelector("[data-animated-caption]")),Cu=e=>ri(e.querySelector("[data-animated-weeks]")),ZN=e=>ri(e.querySelector("[data-animated-nav]")),qN=e=>ri(e.querySelector("[data-animated-weekdays]"));function XN(e,t,{classNames:n,months:r,focused:o,dateLib:s}){const a=C.useRef(null),l=C.useRef(r),c=C.useRef(!1);C.useLayoutEffect(()=>{const u=l.current;if(l.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||u.length===0||r.length!==u.length)return;const f=s.isSameMonth(r[0].date,u[0].date),d=s.isAfter(r[0].date,u[0].date),p=d?n[Ut.caption_after_enter]:n[Ut.caption_before_enter],h=d?n[Ut.weeks_after_enter]:n[Ut.weeks_before_enter],g=a.current,x=e.current.cloneNode(!0);if(x instanceof HTMLElement?(bu(x).forEach(S=>{if(!(S instanceof HTMLElement))return;const w=KN(S);w&&S.contains(w)&&S.removeChild(w);const E=wu(S);E&&E.classList.remove(p);const N=Cu(S);N&&N.classList.remove(h)}),a.current=x):a.current=null,c.current||f||o)return;const v=g instanceof HTMLElement?bu(g):[],y=bu(e.current);if(y?.every(b=>b instanceof HTMLElement)&&v&&v.every(b=>b instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const b=ZN(e.current);b&&(b.style.zIndex="1"),y.forEach((S,w)=>{const E=v[w];if(!E)return;S.style.position="relative",S.style.overflow="hidden";const N=wu(S);N&&N.classList.add(p);const _=Cu(S);_&&_.classList.add(h);const k=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),b&&(b.style.zIndex=""),N&&N.classList.remove(p),_&&_.classList.remove(h),S.style.position="",S.style.overflow="",S.contains(E)&&S.removeChild(E)};E.style.pointerEvents="none",E.style.position="absolute",E.style.overflow="hidden",E.setAttribute("aria-hidden","true");const I=qN(E);I&&(I.style.opacity="0");const F=wu(E);F&&(F.classList.add(d?n[Ut.caption_before_exit]:n[Ut.caption_after_exit]),F.addEventListener("animationend",k));const U=Cu(E);U&&U.classList.add(d?n[Ut.weeks_before_exit]:n[Ut.weeks_after_exit]),S.insertBefore(E,S.firstChild)})}})}function JN(e,t,n,r){const o=e[0],s=e[e.length-1],{ISOWeek:a,fixedWeeks:l,broadcastCalendar:c}=n??{},{addDays:u,differenceInCalendarDays:f,differenceInCalendarMonths:d,endOfBroadcastWeek:p,endOfISOWeek:h,endOfMonth:g,endOfWeek:x,isAfter:v,startOfBroadcastWeek:y,startOfISOWeek:b,startOfWeek:S}=r,w=c?y(o,r):a?b(o):S(o),E=c?p(s):a?h(g(s)):x(g(s)),N=t&&(c?p(t):a?h(t):x(t)),_=N&&v(E,N)?N:E,k=f(_,w),I=d(s,o)+1,F=[];for(let R=0;R<=k;R++){const L=u(w,R);F.push(L)}const O=(c?35:42)*I;if(l&&F.length<O){const R=O-F.length;for(let L=0;L<R;L++){const V=u(F[F.length-1],1);F.push(V)}}return F}function QN(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((s,a)=>s.concat(a.days.slice()),t.slice());return n.concat(o.slice())},t.slice())}function e_(e,t,n,r){const{numberOfMonths:o=1}=n,s=[];for(let a=0;a<o;a++){const l=r.addMonths(e,a);if(t&&l>t)break;s.push(l)}return s}function ig(e,t,n,r){const{month:o,defaultMonth:s,today:a=r.today(),numberOfMonths:l=1}=e;let c=o||s||a;const{differenceInCalendarMonths:u,addMonths:f,startOfMonth:d}=r;if(n&&u(n,c)<l-1){const p=-1*(l-1);c=f(n,p)}return t&&u(c,t)<0&&(c=t),d(c)}function t_(e,t,n,r){const{addDays:o,endOfBroadcastWeek:s,endOfISOWeek:a,endOfMonth:l,endOfWeek:c,getISOWeek:u,getWeek:f,startOfBroadcastWeek:d,startOfISOWeek:p,startOfWeek:h}=r,g=e.reduce((x,v)=>{const y=n.broadcastCalendar?d(v,r):n.ISOWeek?p(v):h(v),b=n.broadcastCalendar?s(v):n.ISOWeek?a(l(v)):c(l(v)),S=t.filter(_=>_>=y&&_<=b),w=n.broadcastCalendar?35:42;if(n.fixedWeeks&&S.length<w){const _=t.filter(k=>{const I=w-S.length;return k>b&&k<=o(b,I)});S.push(..._)}const E=S.reduce((_,k)=>{const I=n.ISOWeek?u(k):f(k),F=_.find(O=>O.weekNumber===I),U=new w2(k,v,r);return F?F.days.push(U):_.push(new qE(I,[U])),_},[]),N=new ZE(v,E);return x.push(N),x},[]);return n.reverseMonths?g.reverse():g}function n_(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:s,startOfMonth:a,endOfMonth:l,addYears:c,endOfYear:u,newDate:f,today:d}=t,{fromYear:p,toYear:h,fromMonth:g,toMonth:x}=e;!n&&g&&(n=g),!n&&p&&(n=t.newDate(p,0,1)),!r&&x&&(r=x),!r&&h&&(r=f(h,11,31));const v=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=a(n):p?n=f(p,0,1):!n&&v&&(n=o(c(e.today??d(),-100))),r?r=l(r):h?r=f(h,11,31):!r&&v&&(r=u(e.today??d())),[n&&s(n),r&&s(r)]}function r_(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s=1}=n,{startOfMonth:a,addMonths:l,differenceInCalendarMonths:c}=r,u=o?s:1,f=a(e);if(!t)return l(f,u);if(!(c(t,e)<s))return l(f,u)}function o_(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s}=n,{startOfMonth:a,addMonths:l,differenceInCalendarMonths:c}=r,u=o?s??1:1,f=a(e);if(!t)return l(f,-u);if(!(c(f,t)<=0))return l(f,-u)}function s_(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function _c(e,t){const[n,r]=C.useState(e);return[t===void 0?n:t,r]}function a_(e,t){const[n,r]=n_(e,t),{startOfMonth:o,endOfMonth:s}=t,a=ig(e,n,r,t),[l,c]=_c(a,e.month?a:void 0);C.useEffect(()=>{const w=ig(e,n,r,t);c(w)},[e.timeZone]);const{months:u,weeks:f,days:d,previousMonth:p,nextMonth:h}=C.useMemo(()=>{const w=e_(l,r,{numberOfMonths:e.numberOfMonths},t),E=JN(w,e.endMonth?s(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),N=t_(w,E,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),_=s_(N),k=QN(N),I=o_(l,n,e,t),F=r_(l,r,e,t);return{months:N,weeks:_,days:k,previousMonth:I,nextMonth:F}},[t,l.getTime(),r?.getTime(),n?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:g,onMonthChange:x}=e,v=w=>f.some(E=>E.days.some(N=>N.isEqualTo(w))),y=w=>{if(g)return;let E=o(w);n&&E<o(n)&&(E=o(n)),r&&E>o(r)&&(E=o(r)),c(E),x?.(E)};return{months:u,weeks:f,days:d,navStart:n,navEnd:r,previousMonth:p,nextMonth:h,goToMonth:y,goToDay:w=>{v(w)||y(w.date)}}}var Rn;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Rn||(Rn={}));function lg(e){return!e[He.disabled]&&!e[He.hidden]&&!e[He.outside]}function i_(e,t,n,r){let o,s=-1;for(const a of e){const l=t(a);lg(l)&&(l[He.focused]&&s<Rn.FocusedModifier?(o=a,s=Rn.FocusedModifier):r?.isEqualTo(a)&&s<Rn.LastFocused?(o=a,s=Rn.LastFocused):n(a.date)&&s<Rn.Selected?(o=a,s=Rn.Selected):l[He.today]&&s<Rn.Today&&(o=a,s=Rn.Today))}return o||(o=e.find(a=>lg(t(a)))),o}function l_(e,t,n,r,o,s,a){const{ISOWeek:l,broadcastCalendar:c}=s,{addDays:u,addMonths:f,addWeeks:d,addYears:p,endOfBroadcastWeek:h,endOfISOWeek:g,endOfWeek:x,max:v,min:y,startOfBroadcastWeek:b,startOfISOWeek:S,startOfWeek:w}=a;let N={day:u,week:d,month:f,year:p,startOfWeek:_=>c?b(_,a):l?S(_):w(_),endOfWeek:_=>c?h(_):l?g(_):x(_)}[e](n,t==="after"?1:-1);return t==="before"&&r?N=v([r,N]):t==="after"&&o&&(N=y([o,N])),N}function L2(e,t,n,r,o,s,a,l=0){if(l>365)return;const c=l_(e,t,n.date,r,o,s,a),u=!!(s.disabled&&Xn(c,s.disabled,a)),f=!!(s.hidden&&Xn(c,s.hidden,a)),d=c,p=new w2(c,d,a);return!u&&!f?p:L2(e,t,p,r,o,s,a,l+1)}function c_(e,t,n,r,o){const{autoFocus:s}=e,[a,l]=C.useState(),c=i_(t.days,n,r||(()=>!1),a),[u,f]=C.useState(s?c:void 0);return{isFocusTarget:x=>!!c?.isEqualTo(x),setFocused:f,focused:u,blur:()=>{l(u),f(void 0)},moveFocus:(x,v)=>{if(!u)return;const y=L2(x,v,u,t.navStart,t.navEnd,e,o);y&&(e.disableNavigation&&!t.days.some(S=>S.isEqualTo(y))||(t.goToDay(y),f(y)))}}}function u_(e,t){const{selected:n,required:r,onSelect:o}=e,[s,a]=_c(n,o?n:void 0),l=o?n:s,{isSameDay:c}=t,u=h=>l?.some(g=>c(g,h))??!1,{min:f,max:d}=e;return{selected:l,select:(h,g,x)=>{let v=[...l??[]];if(u(h)){if(l?.length===f||r&&l?.length===1)return;v=l?.filter(y=>!c(y,h))}else l?.length===d?v=[h]:v=[...v,h];return o||a(v),o?.(v,h,g,x),v},isSelected:u}}function d_(e,t,n=0,r=0,o=!1,s=Bn){const{from:a,to:l}=t||{},{isSameDay:c,isAfter:u,isBefore:f}=s;let d;if(!a&&!l)d={from:e,to:n>0?void 0:e};else if(a&&!l)c(a,e)?n===0?d={from:a,to:e}:o?d={from:a,to:void 0}:d=void 0:f(e,a)?d={from:e,to:a}:d={from:a,to:e};else if(a&&l)if(c(a,e)&&c(l,e))o?d={from:a,to:l}:d=void 0;else if(c(a,e))d={from:a,to:n>0?void 0:e};else if(c(l,e))d={from:e,to:n>0?void 0:e};else if(f(e,a))d={from:e,to:l};else if(u(e,a))d={from:a,to:e};else if(u(e,l))d={from:a,to:e};else throw new Error("Invalid range");if(d?.from&&d?.to){const p=s.differenceInCalendarDays(d.to,d.from);r>0&&p>r?d={from:e,to:void 0}:n>1&&p<n&&(d={from:e,to:void 0})}return d}function f_(e,t,n=Bn){const r=Array.isArray(t)?t:[t];let o=e.from;const s=n.differenceInCalendarDays(e.to,e.from),a=Math.min(s,6);for(let l=0;l<=a;l++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function cg(e,t,n=Bn){return qn(e,t.from,!1,n)||qn(e,t.to,!1,n)||qn(t,e.from,!1,n)||qn(t,e.to,!1,n)}function p_(e,t,n=Bn){const r=Array.isArray(t)?t:[t];if(r.filter(l=>typeof l!="function").some(l=>typeof l=="boolean"?l:n.isDate(l)?qn(e,l,!1,n):E2(l,n)?l.some(c=>qn(e,c,!1,n)):Nc(l)?l.from&&l.to?cg(e,{from:l.from,to:l.to},n):!1:S2(l)?f_(e,l.dayOfWeek,n):dp(l)?n.isAfter(l.before,l.after)?cg(e,{from:n.addDays(l.after,1),to:n.addDays(l.before,-1)},n):Xn(e.from,l,n)||Xn(e.to,l,n):fp(l)||pp(l)?Xn(e.from,l,n)||Xn(e.to,l,n):!1))return!0;const a=r.filter(l=>typeof l=="function");if(a.length){let l=e.from;const c=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=c;u++){if(a.some(f=>f(l)))return!0;l=n.addDays(l,1)}}return!1}function h_(e,t){const{disabled:n,excludeDisabled:r,resetOnSelect:o,selected:s,required:a,onSelect:l}=e,[c,u]=_c(s,l?s:void 0),f=l?s:c;return{selected:f,select:(h,g,x)=>{const{min:v,max:y}=e;let b;if(h){const S=f?.from,w=f?.to,E=!!S&&!!w,N=!!S&&!!w&&t.isSameDay(S,w)&&t.isSameDay(h,S);o&&(E||!f?.from)?!a&&N?b=void 0:b={from:h,to:void 0}:b=d_(h,f,v,y,a,t)}return r&&n&&b?.from&&b.to&&p_({from:b.from,to:b.to},n,t)&&(b.from=h,b.to=void 0),l||u(b),l?.(b,h,g,x),b},isSelected:h=>f&&qn(f,h,!1,t)}}function m_(e,t){const{selected:n,required:r,onSelect:o}=e,[s,a]=_c(n,o?n:void 0),l=o?n:s,{isSameDay:c}=t;return{selected:l,select:(d,p,h)=>{let g=d;return!r&&l&&l&&c(d,l)&&(g=void 0),o||a(g),o?.(g,d,p,h),g},isSelected:d=>l?c(l,d):!1}}function g_(e,t){const n=m_(e,t),r=u_(e,t),o=h_(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function nn(e,t){return e instanceof bt&&e.timeZone===t?e:new bt(e,t)}function ko(e,t,n){return nn(e,t)}function ug(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?ko(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?ko(r,t):r):Nc(e)?{...e,from:e.from?nn(e.from,t):e.from,to:e.to?nn(e.to,t):e.to}:dp(e)?{before:ko(e.before,t),after:ko(e.after,t)}:fp(e)?{after:ko(e.after,t)}:pp(e)?{before:ko(e.before,t)}:e}function Su(e,t,n){return e&&(Array.isArray(e)?e.map(r=>ug(r,t)):ug(e,t))}function x_(e){let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=nn(t.today,n)),t.month&&(t.month=nn(t.month,n)),t.defaultMonth&&(t.defaultMonth=nn(t.defaultMonth,n)),t.startMonth&&(t.startMonth=nn(t.startMonth,n)),t.endMonth&&(t.endMonth=nn(t.endMonth,n)),t.mode==="single"&&t.selected?t.selected=nn(t.selected,n):t.mode==="multiple"&&t.selected?t.selected=t.selected?.map(pe=>nn(pe,n)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?nn(t.selected.from,n):t.selected.from,to:t.selected.to?nn(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=Su(t.disabled,n)),t.hidden!==void 0&&(t.hidden=Su(t.hidden,n)),t.modifiers)){const pe={};Object.keys(t.modifiers).forEach(_e=>{pe[_e]=Su(t.modifiers?.[_e],n)}),t.modifiers=pe}const{components:r,formatters:o,labels:s,dateLib:a,locale:l,classNames:c}=C.useMemo(()=>{const pe={...b2,...t.locale},_e=t.broadcastCalendar?1:t.weekStartsOn,xe=t.noonSafe&&t.timeZone?YN(t.timeZone,{weekStartsOn:_e,locale:pe}):void 0,ke=t.dateLib&&xe?{...xe,...t.dateLib}:t.dateLib??xe,gt=new qt({locale:pe,weekStartsOn:_e,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},ke);return{dateLib:gt,components:_N(t.components),formatters:IN(t.formatters),labels:zN(t.labels,gt.options),locale:pe,classNames:{...kN(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:a.today()});const{captionLayout:u,mode:f,navLayout:d,numberOfMonths:p=1,onDayBlur:h,onDayClick:g,onDayFocus:x,onDayKeyDown:v,onDayMouseEnter:y,onDayMouseLeave:b,onNextClick:S,onPrevClick:w,showWeekNumber:E,styles:N}=t,{formatCaption:_,formatDay:k,formatMonthDropdown:I,formatWeekNumber:F,formatWeekNumberHeader:U,formatWeekdayName:O,formatYearDropdown:R}=o,L=a_(t,a),{days:V,months:D,navStart:$,navEnd:z,previousMonth:T,nextMonth:M,goToMonth:G}=L,A=EN(V,t,$,z,a),{isSelected:W,select:H,selected:P}=g_(t,a)??{},{blur:B,focused:Y,isFocusTarget:Z,moveFocus:q,setFocused:oe}=c_(t,L,A,W??(()=>!1),a),{labelDayButton:ne,labelGridcell:le,labelGrid:Ee,labelMonthDropdown:re,labelNav:ce,labelPrevious:K,labelNext:Q,labelWeekday:ae,labelWeekNumber:J,labelWeekNumberHeader:be,labelYearDropdown:ge}=s,fe=C.useMemo(()=>GN(a,t.ISOWeek,t.broadcastCalendar,t.today),[a,t.ISOWeek,t.broadcastCalendar,t.today]),Te=f!==void 0||g!==void 0,Pe=C.useCallback(()=>{T&&(G(T),w?.(T))},[T,G,w]),We=C.useCallback(()=>{M&&(G(M),S?.(M))},[G,M,S]),nt=C.useCallback((pe,_e)=>xe=>{xe.preventDefault(),xe.stopPropagation(),oe(pe),!_e.disabled&&(H?.(pe.date,_e,xe),g?.(pe.date,_e,xe))},[H,g,oe]),dt=C.useCallback((pe,_e)=>xe=>{oe(pe),x?.(pe.date,_e,xe)},[x,oe]),fn=C.useCallback((pe,_e)=>xe=>{B(),h?.(pe.date,_e,xe)},[B,h]),Ot=C.useCallback((pe,_e)=>xe=>{const ke={ArrowLeft:[xe.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[xe.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[xe.shiftKey?"year":"week","after"],ArrowUp:[xe.shiftKey?"year":"week","before"],PageUp:[xe.shiftKey?"year":"month","before"],PageDown:[xe.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(ke[xe.key]){xe.preventDefault(),xe.stopPropagation();const[gt,ee]=ke[xe.key];q(gt,ee)}v?.(pe.date,_e,xe)},[q,v,t.dir]),Nt=C.useCallback((pe,_e)=>xe=>{y?.(pe.date,_e,xe)},[y]),je=C.useCallback((pe,_e)=>xe=>{b?.(pe.date,_e,xe)},[b]),Me=C.useCallback(pe=>_e=>{const xe=Number(_e.target.value),ke=a.setMonth(a.startOfMonth(pe),xe);G(ke)},[a,G]),Ue=C.useCallback(pe=>_e=>{const xe=Number(_e.target.value),ke=a.setYear(a.startOfMonth(pe),xe);G(ke)},[a,G]),{className:Lt,style:Gt}=C.useMemo(()=>({className:[c[de.Root],t.className].filter(Boolean).join(" "),style:{...N?.[de.Root],...t.style}}),[c,t.className,t.style,N]),Ir=jN(t),_o=C.useRef(null);XN(_o,!!t.animate,{classNames:c,months:D,focused:Y,dateLib:a});const Hn={dayPickerProps:t,selected:P,select:H,isSelected:W,months:D,nextMonth:M,previousMonth:T,goToMonth:G,getModifiers:A,components:r,classNames:c,styles:N,labels:s,formatters:o};return C.createElement(C2.Provider,{value:Hn},C.createElement(r.Root,{rootRef:t.animate?_o:void 0,className:Lt,style:Gt,dir:t.dir,id:t.id,lang:t.lang??l.code,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...Ir},C.createElement(r.Months,{className:c[de.Months],style:N?.[de.Months]},!t.hideNavigation&&!d&&C.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:c[de.Nav],style:N?.[de.Nav],"aria-label":ce(),onPreviousClick:Pe,onNextClick:We,previousMonth:T,nextMonth:M}),D.map((pe,_e)=>C.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:c[de.Month],style:N?.[de.Month],key:_e,displayIndex:_e,calendarMonth:pe},d==="around"&&!t.hideNavigation&&_e===0&&C.createElement(r.PreviousMonthButton,{type:"button",className:c[de.PreviousMonthButton],tabIndex:T?void 0:-1,"aria-disabled":T?void 0:!0,"aria-label":K(T),onClick:Pe,"data-animated-button":t.animate?"true":void 0},C.createElement(r.Chevron,{disabled:T?void 0:!0,className:c[de.Chevron],orientation:t.dir==="rtl"?"right":"left"})),C.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:c[de.MonthCaption],style:N?.[de.MonthCaption],calendarMonth:pe,displayIndex:_e},u?.startsWith("dropdown")?C.createElement(r.DropdownNav,{className:c[de.Dropdowns],style:N?.[de.Dropdowns]},(()=>{const xe=u==="dropdown"||u==="dropdown-months"?C.createElement(r.MonthsDropdown,{key:"month",className:c[de.MonthsDropdown],"aria-label":re(),classNames:c,components:r,disabled:!!t.disableNavigation,onChange:Me(pe.date),options:WN(pe.date,$,z,o,a),style:N?.[de.Dropdown],value:a.getMonth(pe.date)}):C.createElement("span",{key:"month"},I(pe.date,a)),ke=u==="dropdown"||u==="dropdown-years"?C.createElement(r.YearsDropdown,{key:"year",className:c[de.YearsDropdown],"aria-label":ge(a.options),classNames:c,components:r,disabled:!!t.disableNavigation,onChange:Ue(pe.date),options:UN($,z,o,a,!!t.reverseYears),style:N?.[de.Dropdown],value:a.getYear(pe.date)}):C.createElement("span",{key:"year"},R(pe.date,a));return a.getMonthYearOrder()==="year-first"?[ke,xe]:[xe,ke]})(),C.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},_(pe.date,a.options,a))):C.createElement(r.CaptionLabel,{className:c[de.CaptionLabel],role:"status","aria-live":"polite"},_(pe.date,a.options,a))),d==="around"&&!t.hideNavigation&&_e===p-1&&C.createElement(r.NextMonthButton,{type:"button",className:c[de.NextMonthButton],tabIndex:M?void 0:-1,"aria-disabled":M?void 0:!0,"aria-label":Q(M),onClick:We,"data-animated-button":t.animate?"true":void 0},C.createElement(r.Chevron,{disabled:M?void 0:!0,className:c[de.Chevron],orientation:t.dir==="rtl"?"left":"right"})),_e===p-1&&d==="after"&&!t.hideNavigation&&C.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:c[de.Nav],style:N?.[de.Nav],"aria-label":ce(),onPreviousClick:Pe,onNextClick:We,previousMonth:T,nextMonth:M}),C.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":f==="multiple"||f==="range","aria-label":Ee(pe.date,a.options,a)||void 0,className:c[de.MonthGrid],style:N?.[de.MonthGrid]},!t.hideWeekdays&&C.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:c[de.Weekdays],style:N?.[de.Weekdays]},E&&C.createElement(r.WeekNumberHeader,{"aria-label":be(a.options),className:c[de.WeekNumberHeader],style:N?.[de.WeekNumberHeader],scope:"col"},U()),fe.map(xe=>C.createElement(r.Weekday,{"aria-label":ae(xe,a.options,a),className:c[de.Weekday],key:String(xe),style:N?.[de.Weekday],scope:"col"},O(xe,a.options,a)))),C.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:c[de.Weeks],style:N?.[de.Weeks]},pe.weeks.map(xe=>C.createElement(r.Week,{className:c[de.Week],key:xe.weekNumber,style:N?.[de.Week],week:xe},E&&C.createElement(r.WeekNumber,{week:xe,style:N?.[de.WeekNumber],"aria-label":J(xe.weekNumber,{locale:l}),className:c[de.WeekNumber],scope:"row",role:"rowheader"},F(xe.weekNumber,a)),xe.days.map(ke=>{const{date:gt}=ke,ee=A(ke);if(ee[He.focused]=!ee.hidden&&!!Y?.isEqualTo(ke),ee[yn.selected]=W?.(gt)||ee.selected,Nc(P)){const{from:lr,to:Xe}=P;ee[yn.range_start]=!!(lr&&Xe&&a.isSameDay(gt,lr)),ee[yn.range_end]=!!(lr&&Xe&&a.isSameDay(gt,Xe)),ee[yn.range_middle]=qn(P,gt,!0,a)}const rt=HN(ee,N,t.modifiersStyles),ft=NN(ee,c,t.modifiersClassNames),_t=!Te&&!ee.hidden?le(gt,ee,a.options,a):void 0;return C.createElement(r.Day,{key:`${ke.isoDate}_${ke.displayMonthId}`,day:ke,modifiers:ee,className:ft.join(" "),style:rt,role:"gridcell","aria-selected":ee.selected||void 0,"aria-label":_t,"data-day":ke.isoDate,"data-month":ke.outside?ke.dateMonthId:void 0,"data-selected":ee.selected||void 0,"data-disabled":ee.disabled||void 0,"data-hidden":ee.hidden||void 0,"data-outside":ke.outside||void 0,"data-focused":ee.focused||void 0,"data-today":ee.today||void 0},!ee.hidden&&Te?C.createElement(r.DayButton,{className:c[de.DayButton],style:N?.[de.DayButton],type:"button",day:ke,modifiers:ee,disabled:!ee.focused&&ee.disabled||void 0,"aria-disabled":ee.focused&&ee.disabled||void 0,tabIndex:Z(ke)?0:-1,"aria-label":ne(gt,ee,a.options,a),onClick:nt(ke,ee),onBlur:fn(ke,ee),onFocus:dt(ke,ee),onKeyDown:Ot(ke,ee),onMouseEnter:Nt(ke,ee),onMouseLeave:je(ke,ee)},k(gt,a.options,a)):!ee.hidden&&k(ke.date,a.options,a))})))))))),t.footer&&C.createElement(r.Footer,{className:c[de.Footer],style:N?.[de.Footer],role:"status","aria-live":"polite"},t.footer)))}function gp({className:e,classNames:t,showOutsideDays:n=!0,...r}){return i.jsx(x_,{dir:go(),fixedWeeks:!0,showOutsideDays:n,className:j("p-3",e),formatters:{formatMonthDropdown:(o,s)=>s.format(o,"LLL")},classNames:{months:"relative flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-2",month_caption:"flex h-9 justify-center items-center relative",caption_label:"flex items-center gap-1 text-sm font-medium",dropdowns:"flex gap-2 items-center justify-center",dropdown_root:"relative inline-flex items-center rounded-md border border-input bg-transparent px-2 py-1 hover:bg-accent focus-within:ring-2 focus-within:ring-ring",dropdown:"absolute inset-0 cursor-pointer opacity-0",nav:"flex h-9 items-center justify-between absolute inset-x-0 top-0 z-10 m-0 pointer-events-none",button_previous:j(es({variant:"ghost"}),"h-9 w-9 p-0 text-muted-foreground hover:text-foreground pointer-events-auto"),button_next:j(es({variant:"ghost"}),"h-9 w-9 p-0 text-muted-foreground hover:text-foreground pointer-events-auto"),chevron:"h-4 w-4",month_grid:"w-full border-collapse",weekdays:"flex mb-1",weekday:"flex h-8 w-9 items-center justify-center text-muted-foreground font-normal text-xs",week:"flex w-full mt-1",day:"h-9 w-9 text-center text-xs p-0 relative focus-within:relative focus-within:z-20",day_button:j(es({variant:"ghost"}),"h-9 w-9 p-0 font-normal rounded-full aria-selected:opacity-100"),selected:"bg-primary text-primary-foreground rounded-full hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",today:"bg-accent text-accent-foreground rounded-full",outside:"day-outside text-muted-foreground opacity-50",disabled:"text-muted-foreground opacity-50",range_start:"bg-primary text-primary-foreground rounded-full hover:bg-primary",range_end:"bg-primary text-primary-foreground rounded-full hover:bg-primary",range_middle:"rounded-full aria-selected:bg-accent aria-selected:text-accent-foreground",hidden:"invisible",...t},components:{Chevron:({className:o,orientation:s})=>{const a=s==="left"?"CaretLeft":s==="right"?"CaretRight":s==="up"?"CaretUp":"CaretDown";return i.jsx(X,{name:a,className:j("h-4 w-4",o)})}},...r})}gp.displayName="Calendar";var Eu=0;function jc(){m.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??dg()),document.body.insertAdjacentElement("beforeend",e[1]??dg()),Eu++,()=>{Eu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Eu--}},[])}function dg(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Nu="focusScope.autoFocusOnMount",_u="focusScope.autoFocusOnUnmount",fg={bubbles:!1,cancelable:!0},v_="FocusScope",oi=m.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[l,c]=m.useState(null),u=dn(o),f=dn(s),d=m.useRef(null),p=Se(t,x=>c(x)),h=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(r){let x=function(S){if(h.paused||!l)return;const w=S.target;l.contains(w)?d.current=w:pr(d.current,{select:!0})},v=function(S){if(h.paused||!l)return;const w=S.relatedTarget;w!==null&&(l.contains(w)||pr(d.current,{select:!0}))},y=function(S){if(document.activeElement===document.body)for(const E of S)E.removedNodes.length>0&&pr(l)};document.addEventListener("focusin",x),document.addEventListener("focusout",v);const b=new MutationObserver(y);return l&&b.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",v),b.disconnect()}}},[r,l,h.paused]),m.useEffect(()=>{if(l){hg.add(h);const x=document.activeElement;if(!l.contains(x)){const y=new CustomEvent(Nu,fg);l.addEventListener(Nu,u),l.dispatchEvent(y),y.defaultPrevented||(y_(E_(I2(l)),{select:!0}),document.activeElement===x&&pr(l))}return()=>{l.removeEventListener(Nu,u),setTimeout(()=>{const y=new CustomEvent(_u,fg);l.addEventListener(_u,f),l.dispatchEvent(y),y.defaultPrevented||pr(x??document.body,{select:!0}),l.removeEventListener(_u,f),hg.remove(h)},0)}}},[l,u,f,h]);const g=m.useCallback(x=>{if(!n&&!r||h.paused)return;const v=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,y=document.activeElement;if(v&&y){const b=x.currentTarget,[S,w]=b_(b);S&&w?!x.shiftKey&&y===w?(x.preventDefault(),n&&pr(S,{select:!0})):x.shiftKey&&y===S&&(x.preventDefault(),n&&pr(w,{select:!0})):y===b&&x.preventDefault()}},[n,r,h.paused]);return i.jsx(ue.div,{tabIndex:-1,...a,ref:p,onKeyDown:g})});oi.displayName=v_;function y_(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(pr(r,{select:t}),document.activeElement!==n)return}function b_(e){const t=I2(e),n=pg(t,e),r=pg(t.reverse(),e);return[n,r]}function I2(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function pg(e,t){for(const n of e)if(!w_(n,{upTo:t}))return n}function w_(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function C_(e){return e instanceof HTMLInputElement&&"select"in e}function pr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&C_(e)&&t&&e.select()}}var hg=S_();function S_(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=mg(e,t),e.unshift(t)},remove(t){e=mg(e,t),e[0]?.resume()}}}function mg(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function E_(e){return e.filter(t=>t.tagName!=="A")}function N_(e){const t=__(e),n=m.forwardRef((r,o)=>{const{children:s,...a}=r,l=m.Children.toArray(s),c=l.find(k_);if(c){const u=c.props.children,f=l.map(d=>d===c?m.Children.count(u)>1?m.Children.only(null):m.isValidElement(u)?u.props.children:null:d);return i.jsx(t,{...a,ref:o,children:m.isValidElement(u)?m.cloneElement(u,void 0,f):null})}return i.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function __(e){const t=m.forwardRef((n,r)=>{const{children:o,...s}=n;if(m.isValidElement(o)){const a=M_(o),l=R_(s,o.props);return o.type!==m.Fragment&&(l.ref=r?At(r,a):a),m.cloneElement(o,l)}return m.Children.count(o)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var j_=Symbol("radix.slottable");function k_(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===j_}function R_(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...l)=>{const c=s(...l);return o(...l),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function M_(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var D_=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ro=new WeakMap,Ai=new WeakMap,Pi={},ju=0,F2=function(e){return e&&(e.host||F2(e.parentNode))},A_=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=F2(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},P_=function(e,t,n,r){var o=A_(t,Array.isArray(e)?e:[e]);Pi[n]||(Pi[n]=new WeakMap);var s=Pi[n],a=[],l=new Set,c=new Set(o),u=function(d){!d||l.has(d)||(l.add(d),u(d.parentNode))};o.forEach(u);var f=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(p){if(l.has(p))f(p);else try{var h=p.getAttribute(r),g=h!==null&&h!=="false",x=(Ro.get(p)||0)+1,v=(s.get(p)||0)+1;Ro.set(p,x),s.set(p,v),a.push(p),x===1&&g&&Ai.set(p,!0),v===1&&p.setAttribute(n,"true"),g||p.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return f(t),l.clear(),ju++,function(){a.forEach(function(d){var p=Ro.get(d)-1,h=s.get(d)-1;Ro.set(d,p),s.set(d,h),p||(Ai.has(d)||d.removeAttribute(r),Ai.delete(d)),h||d.removeAttribute(n)}),ju--,ju||(Ro=new WeakMap,Ro=new WeakMap,Ai=new WeakMap,Pi={})}},kc=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=D_(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),P_(r,o,n,"aria-hidden")):function(){return null}},Dn=function(){return Dn=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Dn.apply(this,arguments)};function $2(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function T_(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var il="right-scroll-bar-position",ll="width-before-scroll-bar",O_="with-scroll-bars-hidden",L_="--removed-body-scroll-bar-size";function ku(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function I_(e,t){var n=C.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var F_=typeof window<"u"?m.useLayoutEffect:m.useEffect,gg=new WeakMap;function $_(e,t){var n=I_(null,function(r){return e.forEach(function(o){return ku(o,r)})});return F_(function(){var r=gg.get(n);if(r){var o=new Set(r),s=new Set(e),a=n.current;o.forEach(function(l){s.has(l)||ku(l,null)}),s.forEach(function(l){o.has(l)||ku(l,a)})}gg.set(n,e)},[e]),n}function V_(e){return e}function B_(e,t){t===void 0&&(t=V_);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,r);return n.push(a),function(){n=n.filter(function(l){return l!==a})}},assignSyncMedium:function(s){for(r=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(l){return s(l)},filter:function(){return n}}},assignMedium:function(s){r=!0;var a=[];if(n.length){var l=n;n=[],l.forEach(s),a=n}var c=function(){var f=a;a=[],f.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(f){a.push(f),u()},filter:function(f){return a=a.filter(f),n}}}};return o}function z_(e){e===void 0&&(e={});var t=B_(null);return t.options=Dn({async:!0,ssr:!1},e),t}var V2=function(e){var t=e.sideCar,n=$2(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return m.createElement(r,Dn({},n))};V2.isSideCarExport=!0;function W_(e,t){return e.useMedium(t),V2}var B2=z_(),Ru=function(){},Rc=m.forwardRef(function(e,t){var n=m.useRef(null),r=m.useState({onScrollCapture:Ru,onWheelCapture:Ru,onTouchMoveCapture:Ru}),o=r[0],s=r[1],a=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,p=e.sideCar,h=e.noRelative,g=e.noIsolation,x=e.inert,v=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,S=e.gapMode,w=$2(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=p,N=$_([n,t]),_=Dn(Dn({},w),o);return m.createElement(m.Fragment,null,f&&m.createElement(E,{sideCar:B2,removeScrollBar:u,shards:d,noRelative:h,noIsolation:g,inert:x,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:S}),a?m.cloneElement(m.Children.only(l),Dn(Dn({},_),{ref:N})):m.createElement(b,Dn({},_,{className:c,ref:N}),l))});Rc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Rc.classNames={fullWidth:ll,zeroRight:il};var H_=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function G_(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=H_();return t&&e.setAttribute("nonce",t),e}function U_(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Y_(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var K_=function(){var e=0,t=null;return{add:function(n){e==0&&(t=G_())&&(U_(t,n),Y_(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Z_=function(){var e=K_();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},z2=function(){var e=Z_(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},q_={left:0,top:0,right:0,gap:0},Mu=function(e){return parseInt(e||"",10)||0},X_=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Mu(n),Mu(r),Mu(o)]},J_=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return q_;var t=X_(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Q_=z2(),ts="data-scroll-locked",ej=function(e,t,n,r){var o=e.left,s=e.top,a=e.right,l=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat(O_,` {
|
|
3
3
|
overflow: hidden `).concat(r,`;
|
|
4
4
|
padding-right: `).concat(l,"px ").concat(r,`;
|
|
5
5
|
}
|
|
@@ -33,30 +33,30 @@
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
body[`).concat(ts,`] {
|
|
36
|
-
`).concat(
|
|
36
|
+
`).concat(L_,": ").concat(l,`px;
|
|
37
37
|
}
|
|
38
|
-
`)},
|
|
38
|
+
`)},xg=function(){var e=parseInt(document.body.getAttribute(ts)||"0",10);return isFinite(e)?e:0},tj=function(){m.useEffect(function(){return document.body.setAttribute(ts,(xg()+1).toString()),function(){var e=xg()-1;e<=0?document.body.removeAttribute(ts):document.body.setAttribute(ts,e.toString())}},[])},nj=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;tj();var s=m.useMemo(function(){return J_(o)},[o]);return m.createElement(Q_,{styles:ej(s,!t,o,n?"":"!important")})},yd=!1;if(typeof window<"u")try{var Ti=Object.defineProperty({},"passive",{get:function(){return yd=!0,!0}});window.addEventListener("test",Ti,Ti),window.removeEventListener("test",Ti,Ti)}catch{yd=!1}var Mo=yd?{passive:!1}:!1,rj=function(e){return e.tagName==="TEXTAREA"},W2=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!rj(e)&&n[t]==="visible")},oj=function(e){return W2(e,"overflowY")},sj=function(e){return W2(e,"overflowX")},vg=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=H2(e,r);if(o){var s=G2(e,r),a=s[1],l=s[2];if(a>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},aj=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ij=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},H2=function(e,t){return e==="v"?oj(t):sj(t)},G2=function(e,t){return e==="v"?aj(t):ij(t)},lj=function(e,t){return e==="h"&&t==="rtl"?-1:1},cj=function(e,t,n,r,o){var s=lj(e,window.getComputedStyle(t).direction),a=s*r,l=n.target,c=t.contains(l),u=!1,f=a>0,d=0,p=0;do{if(!l)break;var h=G2(e,l),g=h[0],x=h[1],v=h[2],y=x-v-s*g;(g||y)&&H2(e,l)&&(d+=y,p+=g);var b=l.parentNode;l=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(f&&Math.abs(d)<1||!f&&Math.abs(p)<1)&&(u=!0),u},Oi=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},yg=function(e){return[e.deltaX,e.deltaY]},bg=function(e){return e&&"current"in e?e.current:e},uj=function(e,t){return e[0]===t[0]&&e[1]===t[1]},dj=function(e){return`
|
|
39
39
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
40
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},dj=0,Do=[];function fj(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),o=g.useState(dj++)[0],s=g.useState(zx)[0],a=g.useRef(e);g.useEffect(function(){a.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var x=T_([e.lockRef.current],(e.shards||[]).map(bm),!0).filter(Boolean);return x.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),x.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=g.useCallback(function(x,v){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!a.current.allowPinchZoom;var y=Oi(x),b=n.current,S="deltaX"in x?x.deltaX:b[0]-y[0],w="deltaY"in x?x.deltaY:b[1]-y[1],E,N=x.target,_=Math.abs(S)>Math.abs(w)?"h":"v";if("touches"in x&&_==="h"&&N.type==="range")return!1;var k=window.getSelection(),I=k&&k.anchorNode,F=I?I===N||I.contains(N):!1;if(F)return!1;var U=vm(_,N);if(!U)return!0;if(U?E=_:(E=_==="v"?"h":"v",U=vm(_,N)),!U)return!1;if(!r.current&&"changedTouches"in x&&(S||w)&&(r.current=E),!E)return!0;var O=r.current||E;return lj(O,v,x,O==="h"?S:w)},[]),c=g.useCallback(function(x){var v=x;if(!(!Do.length||Do[Do.length-1]!==s)){var y="deltaY"in v?ym(v):Oi(v),b=t.current.filter(function(E){return E.name===v.type&&(E.target===v.target||v.target===E.shadowParent)&&cj(E.delta,y)})[0];if(b&&b.should){v.cancelable&&v.preventDefault();return}if(!b){var S=(a.current.shards||[]).map(bm).filter(Boolean).filter(function(E){return E.contains(v.target)}),w=S.length>0?l(v,S[0]):!a.current.noIsolation;w&&v.cancelable&&v.preventDefault()}}},[]),u=g.useCallback(function(x,v,y,b){var S={name:x,delta:v,target:y,should:b,shadowParent:pj(y)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(w){return w!==S})},1)},[]),f=g.useCallback(function(x){n.current=Oi(x),r.current=void 0},[]),d=g.useCallback(function(x){u(x.type,ym(x),x.target,l(x,e.lockRef.current))},[]),p=g.useCallback(function(x){u(x.type,Oi(x),x.target,l(x,e.lockRef.current))},[]);g.useEffect(function(){return Do.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Mo),document.addEventListener("touchmove",c,Mo),document.addEventListener("touchstart",f,Mo),function(){Do=Do.filter(function(x){return x!==s}),document.removeEventListener("wheel",c,Mo),document.removeEventListener("touchmove",c,Mo),document.removeEventListener("touchstart",f,Mo)}},[]);var h=e.removeScrollBar,m=e.inert;return g.createElement(g.Fragment,null,m?g.createElement(s,{styles:uj(o)}):null,h?g.createElement(tj,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function pj(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const hj=z_(Bx,fj);var si=g.forwardRef(function(e,t){return g.createElement(Rc,Dn({},e,{ref:t,sideCar:hj}))});si.classNames=Rc.classNames;var Mc="Popover",[Ux]=St(Mc,[Rr]),ai=Rr(),[gj,Mr]=Ux(Mc),Yx=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:a=!1}=e,l=ai(t),c=g.useRef(null),[u,f]=g.useState(!1),[d,p]=gt({prop:r,defaultProp:o??!1,onChange:s,caller:Mc});return i.jsx(Xa,{...l,children:i.jsx(gj,{scope:t,contentId:tt(),triggerRef:c,open:d,onOpenChange:p,onOpenToggle:g.useCallback(()=>p(h=>!h),[p]),hasCustomAnchor:u,onCustomAnchorAdd:g.useCallback(()=>f(!0),[]),onCustomAnchorRemove:g.useCallback(()=>f(!1),[]),modal:a,children:n})})};Yx.displayName=Mc;var Kx="PopoverAnchor",mj=g.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Mr(Kx,n),s=ai(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:l}=o;return g.useEffect(()=>(a(),()=>l()),[a,l]),i.jsx(Ja,{...s,...r,ref:t})});mj.displayName=Kx;var Zx="PopoverTrigger",qx=g.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Mr(Zx,n),s=ai(n),a=Se(t,o.triggerRef),l=i.jsx(ue.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":tv(o.open),...r,ref:a,onClick:te(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:i.jsx(Ja,{asChild:!0,...s,children:l})});qx.displayName=Zx;var xp="PopoverPortal",[xj,vj]=Ux(xp,{forceMount:void 0}),Xx=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=Mr(xp,t);return i.jsx(xj,{scope:t,forceMount:n,children:i.jsx(Tt,{present:n||s.open,children:i.jsx(ws,{asChild:!0,container:o,children:r})})})};Xx.displayName=xp;var cs="PopoverContent",Jx=g.forwardRef((e,t)=>{const n=vj(cs,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=Mr(cs,e.__scopePopover);return i.jsx(Tt,{present:r||s.open,children:s.modal?i.jsx(bj,{...o,ref:t}):i.jsx(wj,{...o,ref:t})})});Jx.displayName=cs;var yj=E_("PopoverContent.RemoveScroll"),bj=g.forwardRef((e,t)=>{const n=Mr(cs,e.__scopePopover),r=g.useRef(null),o=Se(t,r),s=g.useRef(!1);return g.useEffect(()=>{const a=r.current;if(a)return kc(a)},[]),i.jsx(si,{as:yj,allowPinchZoom:!0,children:i.jsx(Qx,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:te(e.onCloseAutoFocus,a=>{a.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:te(e.onPointerDownOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:te(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),wj=g.forwardRef((e,t)=>{const n=Mr(cs,e.__scopePopover),r=g.useRef(!1),o=g.useRef(!1);return i.jsx(Qx,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Qx=g.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...d}=e,p=Mr(cs,n),h=ai(n);return jc(),i.jsx(oi,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:i.jsx(vs,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:f,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:i.jsx(hc,{"data-state":tv(p.open),role:"dialog",id:p.contentId,...h,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),ev="PopoverClose",Cj=g.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Mr(ev,n);return i.jsx(ue.button,{type:"button",...r,ref:t,onClick:te(e.onClick,()=>o.onOpenChange(!1))})});Cj.displayName=ev;var Sj="PopoverArrow",Ej=g.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ai(n);return i.jsx(gc,{...o,...r,ref:t})});Ej.displayName=Sj;function tv(e){return e?"open":"closed"}var nv=Yx,rv=qx,ov=Xx,Dc=Jx;const Ac=nv,Tc=rv,ii=g.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>i.jsx(ov,{children:i.jsx(Dc,{ref:o,align:t,sideOffset:n,className:j("z-popover 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})}));ii.displayName=Dc.displayName;const Nj=Ge("",{variants:{orientation:{vertical:"flex flex-col gap-2",horizontal:"flex flex-row items-start gap-4",responsive:"flex flex-col gap-2 @container/field-group:flex-row @container/field-group:items-start @container/field-group:gap-4"}},defaultVariants:{orientation:"vertical"}}),_j=g.forwardRef(({className:e,...t},n)=>i.jsx("fieldset",{ref:n,className:j("space-y-6",e),...t}));_j.displayName="FieldSet";const jj=Ge("",{variants:{variant:{legend:"text-base font-semibold",label:"text-sm font-medium"}},defaultVariants:{variant:"legend"}}),kj=g.forwardRef(({className:e,variant:t,...n},r)=>i.jsx("legend",{ref:r,className:j(jj({variant:t}),e),...n}));kj.displayName="FieldLegend";const Rj=g.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:j("flex flex-col gap-6",e),...t}));Rj.displayName="FieldGroup";const xo=g.forwardRef(({className:e,orientation:t,"data-invalid":n,...r},o)=>i.jsx("div",{ref:o,role:"group","data-invalid":n?"":void 0,className:j(Nj({orientation:t}),e),...r}));xo.displayName="Field";const Mj=g.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:j("flex flex-col gap-1.5",e),...t}));Mj.displayName="FieldContent";const Ns=g.forwardRef(({className:e,asChild:t,...n},r)=>t?i.jsx("label",{ref:r,className:j("text-sm font-medium",e),...n}):i.jsx("label",{ref:r,className:j("text-sm font-medium",e),...n}));Ns.displayName="FieldLabel";const Dj=g.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:j("text-sm font-medium",e),...t}));Dj.displayName="FieldTitle";const _s=g.forwardRef(({className:e,...t},n)=>i.jsx("p",{ref:n,className:j("text-sm text-muted-foreground",e),...t}));_s.displayName="FieldDescription";const Aj=g.forwardRef(({className:e,children:t,...n},r)=>i.jsxs("div",{ref:r,className:j("flex items-center gap-4",e),...n,children:[i.jsx("div",{className:"flex-1 border-t"}),t&&i.jsx("span",{className:"text-sm text-muted-foreground",children:t}),i.jsx("div",{className:"flex-1 border-t"})]}));Aj.displayName="FieldSeparator";const Dr=g.forwardRef(({className:e,children:t,errors:n,...r},o)=>{const s=n?.filter(Boolean).map(l=>l?.message)||[];return s.length>0||!!t?i.jsx("div",{ref:o,role:"alert",className:j("text-sm text-destructive",e),...r,children:t||i.jsx("ul",{className:"list-disc list-inside",children:s.map((l,c)=>i.jsx("li",{children:l},c))})}):null});Dr.displayName="FieldError";var Tj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Pj=Tj.reduce((e,t)=>{const n=ei(`Primitive.${t}`),r=g.forwardRef((o,s)=>{const{asChild:a,...l}=o,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(c,{...l,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Oj="Label",sv=g.forwardRef((e,t)=>i.jsx(Pj.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));sv.displayName=Oj;var Lj=sv;function Ij({className:e,...t}){return i.jsx(Lj,{"data-slot":"label",className:j("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const Wt=({htmlFor:e,className:t,info:n,requiredIndicator:r,required:o=!1,disabled:s=!1,children:a,...l})=>{const c=()=>r?typeof r=="string"?r:o?"required":"optional":null;return i.jsxs("div",{className:j("flex items-center justify-between gap-2",s&&"text-muted-foreground"),children:[i.jsxs("div",{className:"flex items-center gap-1",children:[a&&i.jsx(Ij,{htmlFor:e,className:j("text-sm cursor-pointer",t),...l,children:a}),n&&i.jsx(zt,{content:n,children:i.jsx(X,{name:"Info",size:"sm",className:"cursor-default text-muted-foreground"})})]}),c()&&i.jsxs("span",{className:"text-sm text-muted-foreground font-normal",children:["(",c(),")"]})]})};Wt.displayName="Label";function Fj({date:e,onChange:t,placeholder:n="Pick a date",disabled:r=!1,className:o,iconPosition:s="start",minDate:a,maxDate:l,dateFormat:c="MMM d, yyyy",label:u,error:f,description:d,info:p,requiredIndicator:h,required:m=!1,orientation:x="vertical",id:v,captionLayout:y,fromYear:b,toYear:S,fromMonth:w,toMonth:E}){const N=C.useId(),_=v||N,k=!!f,I=s==="start",F=s==="end",U=w??(b!=null?new Date(b,0,1):a),O=E??(S!=null?new Date(S,11,31):l),R=y==="buttons"?"label":y?"dropdown":void 0,L=i.jsxs(Ac,{children:[i.jsx(Tc,{asChild:!0,children:i.jsxs(wt,{variant:"outline",className:j("w-full text-left font-normal h-9",F||k?"justify-between":"justify-start",!e&&"text-muted-foreground",k&&"border-destructive focus-visible:border-destructive",o),disabled:r,"aria-invalid":k?!0:void 0,"aria-describedby":d||f?`${_}-description`:void 0,id:_,children:[i.jsxs("div",{className:"flex items-center gap-2",children:[I&&i.jsx(X,{name:"Calendar",className:"h-4 w-4"}),e?Zn(e,c):i.jsx("span",{children:n})]}),F?i.jsx(X,{name:"CaretDown",className:"h-4 w-4 opacity-50"}):k&&i.jsx(X,{name:"WarningCircle",className:"h-4 w-4 text-destructive"})]})}),i.jsx(ii,{className:"w-auto p-0",children:i.jsx(mp,{mode:"single",selected:e,onSelect:t,autoFocus:!0,disabled:[...a?[{before:a}]:[],...l?[{after:l}]:[]],captionLayout:R,startMonth:U,endMonth:O})})]});return u||f||d||p||h?i.jsxs(xo,{orientation:x,"data-invalid":k,className:j("w-full",o),children:[(u||p||h)&&i.jsx(Wt,{htmlFor:_,info:p,requiredIndicator:h,required:m,disabled:r,children:u}),i.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[L,d&&!f&&i.jsx(_s,{id:`${_}-description`,children:d}),f&&i.jsx(Dr,{id:`${_}-description`,children:f})]})]}):L}const cl=Fj;function $j({dateRange:e,onChange:t,placeholder:n="Pick a date range",disabled:r=!1,className:o}){return i.jsxs(Ac,{children:[i.jsx(Tc,{asChild:!0,children:i.jsxs(wt,{variant:"outline",className:j("w-full justify-start text-left font-normal h-9",!e&&"text-muted-foreground",o),disabled:r,children:[i.jsx(X,{name:"Calendar",className:"mr-2 h-4 w-4"}),e?.from?e.to?i.jsxs(i.Fragment,{children:[Zn(e.from,"dd.MM.yyyy")," -"," ",Zn(e.to,"dd.MM.yyyy")]}):Zn(e.from,"dd.MM.yyyy"):i.jsx("span",{children:n})]})}),i.jsx(ii,{className:"w-auto p-0",align:"start",children:i.jsx(mp,{mode:"range",selected:e,onSelect:t,autoFocus:!0,numberOfMonths:1})})]})}const Vj=$j;var Du="rovingFocusGroup.onEntryFocus",Bj={bubbles:!1,cancelable:!0},li="RovingFocusGroup",[bd,av,zj]=vc(li),[Wj,js]=St(li,[zj]),[Hj,Gj]=Wj(li),iv=g.forwardRef((e,t)=>i.jsx(bd.Provider,{scope:e.__scopeRovingFocusGroup,children:i.jsx(bd.Slot,{scope:e.__scopeRovingFocusGroup,children:i.jsx(Uj,{...e,ref:t})})}));iv.displayName=li;var Uj=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...d}=e,p=g.useRef(null),h=Se(t,p),m=Cs(s),[x,v]=gt({prop:a,defaultProp:l??null,onChange:c,caller:li}),[y,b]=g.useState(!1),S=dn(u),w=av(n),E=g.useRef(!1),[N,_]=g.useState(0);return g.useEffect(()=>{const k=p.current;if(k)return k.addEventListener(Du,S),()=>k.removeEventListener(Du,S)},[S]),i.jsx(Hj,{scope:n,orientation:r,dir:m,loop:o,currentTabStopId:x,onItemFocus:g.useCallback(k=>v(k),[v]),onItemShiftTab:g.useCallback(()=>b(!0),[]),onFocusableItemAdd:g.useCallback(()=>_(k=>k+1),[]),onFocusableItemRemove:g.useCallback(()=>_(k=>k-1),[]),children:i.jsx(ue.div,{tabIndex:y||N===0?-1:0,"data-orientation":r,...d,ref:h,style:{outline:"none",...e.style},onMouseDown:te(e.onMouseDown,()=>{E.current=!0}),onFocus:te(e.onFocus,k=>{const I=!E.current;if(k.target===k.currentTarget&&I&&!y){const F=new CustomEvent(Du,Bj);if(k.currentTarget.dispatchEvent(F),!F.defaultPrevented){const U=w().filter(D=>D.focusable),O=U.find(D=>D.active),R=U.find(D=>D.id===x),V=[O,R,...U].filter(Boolean).map(D=>D.ref.current);uv(V,f)}}E.current=!1}),onBlur:te(e.onBlur,()=>b(!1))})})}),lv="RovingFocusGroupItem",cv=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:a,...l}=e,c=tt(),u=s||c,f=Gj(lv,n),d=f.currentTabStopId===u,p=av(n),{onFocusableItemAdd:h,onFocusableItemRemove:m,currentTabStopId:x}=f;return g.useEffect(()=>{if(r)return h(),()=>m()},[r,h,m]),i.jsx(bd.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:i.jsx(ue.span,{tabIndex:d?0:-1,"data-orientation":f.orientation,...l,ref:t,onMouseDown:te(e.onMouseDown,v=>{r?f.onItemFocus(u):v.preventDefault()}),onFocus:te(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:te(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=Zj(v,f.orientation,f.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let S=p().filter(w=>w.focusable).map(w=>w.ref.current);if(y==="last")S.reverse();else if(y==="prev"||y==="next"){y==="prev"&&S.reverse();const w=S.indexOf(v.currentTarget);S=f.loop?qj(S,w+1):S.slice(w+1)}setTimeout(()=>uv(S))}}),children:typeof a=="function"?a({isCurrentTabStop:d,hasTabStop:x!=null}):a})})});cv.displayName=lv;var Yj={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Kj(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Zj(e,t,n){const r=Kj(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Yj[r]}function uv(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function qj(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var vp=iv,yp=cv;function Xj(e){const t=Jj(e),n=g.forwardRef((r,o)=>{const{children:s,...a}=r,l=g.Children.toArray(s),c=l.find(ek);if(c){const u=c.props.children,f=l.map(d=>d===c?g.Children.count(u)>1?g.Children.only(null):g.isValidElement(u)?u.props.children:null:d);return i.jsx(t,{...a,ref:o,children:g.isValidElement(u)?g.cloneElement(u,void 0,f):null})}return i.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Jj(e){const t=g.forwardRef((n,r)=>{const{children:o,...s}=n;if(g.isValidElement(o)){const a=nk(o),l=tk(s,o.props);return o.type!==g.Fragment&&(l.ref=r?At(r,a):a),g.cloneElement(o,l)}return g.Children.count(o)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qj=Symbol("radix.slottable");function ek(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qj}function tk(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...l)=>{const c=s(...l);return o(...l),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function nk(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var wd=["Enter"," "],rk=["ArrowDown","PageUp","Home"],dv=["ArrowUp","PageDown","End"],ok=[...rk,...dv],sk={ltr:[...wd,"ArrowRight"],rtl:[...wd,"ArrowLeft"]},ak={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ci="Menu",[Da,ik,lk]=vc(ci),[vo,fv]=St(ci,[lk,Rr,js]),ui=Rr(),pv=js(),[hv,Ar]=vo(ci),[ck,di]=vo(ci),gv=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:a=!0}=e,l=ui(t),[c,u]=g.useState(null),f=g.useRef(!1),d=dn(s),p=Cs(o);return g.useEffect(()=>{const h=()=>{f.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>f.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),i.jsx(Xa,{...l,children:i.jsx(hv,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:u,children:i.jsx(ck,{scope:t,onClose:g.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:p,modal:a,children:r})})})};gv.displayName=ci;var uk="MenuAnchor",bp=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=ui(n);return i.jsx(Ja,{...o,...r,ref:t})});bp.displayName=uk;var wp="MenuPortal",[dk,mv]=vo(wp,{forceMount:void 0}),xv=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Ar(wp,t);return i.jsx(dk,{scope:t,forceMount:n,children:i.jsx(Tt,{present:n||s.open,children:i.jsx(ws,{asChild:!0,container:o,children:r})})})};xv.displayName=wp;var cn="MenuContent",[fk,Cp]=vo(cn),vv=g.forwardRef((e,t)=>{const n=mv(cn,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ar(cn,e.__scopeMenu),a=di(cn,e.__scopeMenu);return i.jsx(Da.Provider,{scope:e.__scopeMenu,children:i.jsx(Tt,{present:r||s.open,children:i.jsx(Da.Slot,{scope:e.__scopeMenu,children:a.modal?i.jsx(pk,{...o,ref:t}):i.jsx(hk,{...o,ref:t})})})})}),pk=g.forwardRef((e,t)=>{const n=Ar(cn,e.__scopeMenu),r=g.useRef(null),o=Se(t,r);return g.useEffect(()=>{const s=r.current;if(s)return kc(s)},[]),i.jsx(Sp,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:te(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),hk=g.forwardRef((e,t)=>{const n=Ar(cn,e.__scopeMenu);return i.jsx(Sp,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),gk=Xj("MenuContent.ScrollLock"),Sp=g.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:h,disableOutsideScroll:m,...x}=e,v=Ar(cn,n),y=di(cn,n),b=ui(n),S=pv(n),w=ik(n),[E,N]=g.useState(null),_=g.useRef(null),k=Se(t,_,v.onContentChange),I=g.useRef(0),F=g.useRef(""),U=g.useRef(0),O=g.useRef(null),R=g.useRef("right"),L=g.useRef(0),V=m?si:g.Fragment,D=m?{as:gk,allowPinchZoom:!0}:void 0,$=P=>{const M=F.current+P,G=w().filter(Y=>!Y.disabled),A=document.activeElement,W=G.find(Y=>Y.ref.current===A)?.textValue,H=G.map(Y=>Y.textValue),T=jk(H,M,W),B=G.find(Y=>Y.textValue===T)?.ref.current;(function Y(Z){F.current=Z,window.clearTimeout(I.current),Z!==""&&(I.current=window.setTimeout(()=>Y(""),1e3))})(M),B&&setTimeout(()=>B.focus())};g.useEffect(()=>()=>window.clearTimeout(I.current),[]),jc();const z=g.useCallback(P=>R.current===O.current?.side&&Rk(P,O.current?.area),[]);return i.jsx(fk,{scope:n,searchRef:F,onItemEnter:g.useCallback(P=>{z(P)&&P.preventDefault()},[z]),onItemLeave:g.useCallback(P=>{z(P)||(_.current?.focus(),N(null))},[z]),onTriggerLeave:g.useCallback(P=>{z(P)&&P.preventDefault()},[z]),pointerGraceTimerRef:U,onPointerGraceIntentChange:g.useCallback(P=>{O.current=P},[]),children:i.jsx(V,{...D,children:i.jsx(oi,{asChild:!0,trapped:o,onMountAutoFocus:te(s,P=>{P.preventDefault(),_.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:i.jsx(vs,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:h,children:i.jsx(vp,{asChild:!0,...S,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:N,onEntryFocus:te(c,P=>{y.isUsingKeyboardRef.current||P.preventDefault()}),preventScrollOnEntryFocus:!0,children:i.jsx(hc,{role:"menu","aria-orientation":"vertical","data-state":Ov(v.open),"data-radix-menu-content":"",dir:y.dir,...b,...x,ref:k,style:{outline:"none",...x.style},onKeyDown:te(x.onKeyDown,P=>{const G=P.target.closest("[data-radix-menu-content]")===P.currentTarget,A=P.ctrlKey||P.altKey||P.metaKey,W=P.key.length===1;G&&(P.key==="Tab"&&P.preventDefault(),!A&&W&&$(P.key));const H=_.current;if(P.target!==H||!ok.includes(P.key))return;P.preventDefault();const B=w().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);dv.includes(P.key)&&B.reverse(),Nk(B)}),onBlur:te(e.onBlur,P=>{P.currentTarget.contains(P.target)||(window.clearTimeout(I.current),F.current="")}),onPointerMove:te(e.onPointerMove,Aa(P=>{const M=P.target,G=L.current!==P.clientX;if(P.currentTarget.contains(M)&&G){const A=P.clientX>L.current?"right":"left";R.current=A,L.current=P.clientX}}))})})})})})})});vv.displayName=cn;var mk="MenuGroup",Ep=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(ue.div,{role:"group",...r,ref:t})});Ep.displayName=mk;var xk="MenuLabel",yv=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(ue.div,{...r,ref:t})});yv.displayName=xk;var Rl="MenuItem",wm="menu.itemSelect",Pc=g.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=g.useRef(null),a=di(Rl,e.__scopeMenu),l=Cp(Rl,e.__scopeMenu),c=Se(t,s),u=g.useRef(!1),f=()=>{const d=s.current;if(!n&&d){const p=new CustomEvent(wm,{bubbles:!0,cancelable:!0});d.addEventListener(wm,h=>r?.(h),{once:!0}),F0(d,p),p.defaultPrevented?u.current=!1:a.onClose()}};return i.jsx(bv,{...o,ref:c,disabled:n,onClick:te(e.onClick,f),onPointerDown:d=>{e.onPointerDown?.(d),u.current=!0},onPointerUp:te(e.onPointerUp,d=>{u.current||d.currentTarget?.click()}),onKeyDown:te(e.onKeyDown,d=>{const p=l.searchRef.current!=="";n||p&&d.key===" "||wd.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Pc.displayName=Rl;var bv=g.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,a=Cp(Rl,n),l=pv(n),c=g.useRef(null),u=Se(t,c),[f,d]=g.useState(!1),[p,h]=g.useState("");return g.useEffect(()=>{const m=c.current;m&&h((m.textContent??"").trim())},[s.children]),i.jsx(Da.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:i.jsx(yp,{asChild:!0,...l,focusable:!r,children:i.jsx(ue.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:u,onPointerMove:te(e.onPointerMove,Aa(m=>{r?a.onItemLeave(m):(a.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:te(e.onPointerLeave,Aa(m=>a.onItemLeave(m))),onFocus:te(e.onFocus,()=>d(!0)),onBlur:te(e.onBlur,()=>d(!1))})})})}),vk="MenuCheckboxItem",wv=g.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return i.jsx(_v,{scope:e.__scopeMenu,checked:n,children:i.jsx(Pc,{role:"menuitemcheckbox","aria-checked":Ml(n)?"mixed":n,...o,ref:t,"data-state":jp(n),onSelect:te(o.onSelect,()=>r?.(Ml(n)?!0:!n),{checkForDefaultPrevented:!1})})})});wv.displayName=vk;var Cv="MenuRadioGroup",[yk,bk]=vo(Cv,{value:void 0,onValueChange:()=>{}}),Sv=g.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=dn(r);return i.jsx(yk,{scope:e.__scopeMenu,value:n,onValueChange:s,children:i.jsx(Ep,{...o,ref:t})})});Sv.displayName=Cv;var Ev="MenuRadioItem",Nv=g.forwardRef((e,t)=>{const{value:n,...r}=e,o=bk(Ev,e.__scopeMenu),s=n===o.value;return i.jsx(_v,{scope:e.__scopeMenu,checked:s,children:i.jsx(Pc,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":jp(s),onSelect:te(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Nv.displayName=Ev;var Np="MenuItemIndicator",[_v,wk]=vo(Np,{checked:!1}),jv=g.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=wk(Np,n);return i.jsx(Tt,{present:r||Ml(s.checked)||s.checked===!0,children:i.jsx(ue.span,{...o,ref:t,"data-state":jp(s.checked)})})});jv.displayName=Np;var Ck="MenuSeparator",kv=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(ue.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});kv.displayName=Ck;var Sk="MenuArrow",Rv=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=ui(n);return i.jsx(gc,{...o,...r,ref:t})});Rv.displayName=Sk;var _p="MenuSub",[Ek,Mv]=vo(_p),Dv=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=Ar(_p,t),a=ui(t),[l,c]=g.useState(null),[u,f]=g.useState(null),d=dn(o);return g.useEffect(()=>(s.open===!1&&d(!1),()=>d(!1)),[s.open,d]),i.jsx(Xa,{...a,children:i.jsx(hv,{scope:t,open:r,onOpenChange:d,content:u,onContentChange:f,children:i.jsx(Ek,{scope:t,contentId:tt(),triggerId:tt(),trigger:l,onTriggerChange:c,children:n})})})};Dv.displayName=_p;var ea="MenuSubTrigger",Av=g.forwardRef((e,t)=>{const n=Ar(ea,e.__scopeMenu),r=di(ea,e.__scopeMenu),o=Mv(ea,e.__scopeMenu),s=Cp(ea,e.__scopeMenu),a=g.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=s,u={__scopeMenu:e.__scopeMenu},f=g.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return g.useEffect(()=>f,[f]),g.useEffect(()=>{const d=l.current;return()=>{window.clearTimeout(d),c(null)}},[l,c]),i.jsx(bp,{asChild:!0,...u,children:i.jsx(bv,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Ov(n.open),...e,ref:At(t,o.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:te(e.onPointerMove,Aa(d=>{s.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:te(e.onPointerLeave,Aa(d=>{f();const p=n.content?.getBoundingClientRect();if(p){const h=n.content?.dataset.side,m=h==="right",x=m?-5:5,v=p[m?"left":"right"],y=p[m?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+x,y:d.clientY},{x:v,y:p.top},{x:y,y:p.top},{x:y,y:p.bottom},{x:v,y:p.bottom}],side:h}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:te(e.onKeyDown,d=>{const p=s.searchRef.current!=="";e.disabled||p&&d.key===" "||sk[r.dir].includes(d.key)&&(n.onOpenChange(!0),n.content?.focus(),d.preventDefault())})})})});Av.displayName=ea;var Tv="MenuSubContent",Pv=g.forwardRef((e,t)=>{const n=mv(cn,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ar(cn,e.__scopeMenu),a=di(cn,e.__scopeMenu),l=Mv(Tv,e.__scopeMenu),c=g.useRef(null),u=Se(t,c);return i.jsx(Da.Provider,{scope:e.__scopeMenu,children:i.jsx(Tt,{present:r||s.open,children:i.jsx(Da.Slot,{scope:e.__scopeMenu,children:i.jsx(Sp,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{a.isUsingKeyboardRef.current&&c.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:te(e.onFocusOutside,f=>{f.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:te(e.onEscapeKeyDown,f=>{a.onClose(),f.preventDefault()}),onKeyDown:te(e.onKeyDown,f=>{const d=f.currentTarget.contains(f.target),p=ak[a.dir].includes(f.key);d&&p&&(s.onOpenChange(!1),l.trigger?.focus(),f.preventDefault())})})})})})});Pv.displayName=Tv;function Ov(e){return e?"open":"closed"}function Ml(e){return e==="indeterminate"}function jp(e){return Ml(e)?"indeterminate":e?"checked":"unchecked"}function Nk(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function _k(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function jk(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=_k(e,Math.max(s,0));o.length===1&&(a=a.filter(u=>u!==n));const c=a.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function kk(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const l=t[s],c=t[a],u=l.x,f=l.y,d=c.x,p=c.y;f>r!=p>r&&n<(d-u)*(r-f)/(p-f)+u&&(o=!o)}return o}function Rk(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return kk(n,t)}function Aa(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Mk=gv,Dk=bp,Ak=xv,Tk=vv,Pk=Ep,Ok=yv,Lk=Pc,Ik=wv,Fk=Sv,$k=Nv,Vk=jv,Bk=kv,zk=Rv,Wk=Dv,Hk=Av,Gk=Pv,Oc="DropdownMenu",[Uk]=St(Oc,[fv]),Et=fv(),[Yk,Lv]=Uk(Oc),Iv=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:a,modal:l=!0}=e,c=Et(t),u=g.useRef(null),[f,d]=gt({prop:o,defaultProp:s??!1,onChange:a,caller:Oc});return i.jsx(Yk,{scope:t,triggerId:tt(),triggerRef:u,contentId:tt(),open:f,onOpenChange:d,onOpenToggle:g.useCallback(()=>d(p=>!p),[d]),modal:l,children:i.jsx(Mk,{...c,open:f,onOpenChange:d,dir:r,modal:l,children:n})})};Iv.displayName=Oc;var Fv="DropdownMenuTrigger",$v=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=Lv(Fv,n),a=Et(n);return i.jsx(Dk,{asChild:!0,...a,children:i.jsx(ue.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:At(t,s.triggerRef),onPointerDown:te(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(s.onOpenToggle(),s.open||l.preventDefault())}),onKeyDown:te(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&s.onOpenToggle(),l.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});$v.displayName=Fv;var Kk="DropdownMenuPortal",Vv=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Et(t);return i.jsx(Ak,{...r,...n})};Vv.displayName=Kk;var Bv="DropdownMenuContent",zv=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Lv(Bv,n),s=Et(n),a=g.useRef(!1);return i.jsx(Tk,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:te(e.onCloseAutoFocus,l=>{a.current||o.triggerRef.current?.focus(),a.current=!1,l.preventDefault()}),onInteractOutside:te(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,f=c.button===2||u;(!o.modal||f)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});zv.displayName=Bv;var Zk="DropdownMenuGroup",Wv=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Et(n);return i.jsx(Pk,{...o,...r,ref:t})});Wv.displayName=Zk;var qk="DropdownMenuLabel",Hv=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Et(n);return i.jsx(Ok,{...o,...r,ref:t})});Hv.displayName=qk;var Xk="DropdownMenuItem",Gv=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Et(n);return i.jsx(Lk,{...o,...r,ref:t})});Gv.displayName=Xk;var Jk="DropdownMenuCheckboxItem",Uv=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Et(n);return i.jsx(Ik,{...o,...r,ref:t})});Uv.displayName=Jk;var Qk="DropdownMenuRadioGroup",Yv=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Et(n);return i.jsx(Fk,{...o,...r,ref:t})});Yv.displayName=Qk;var eR="DropdownMenuRadioItem",Kv=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Et(n);return i.jsx($k,{...o,...r,ref:t})});Kv.displayName=eR;var tR="DropdownMenuItemIndicator",Zv=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Et(n);return i.jsx(Vk,{...o,...r,ref:t})});Zv.displayName=tR;var nR="DropdownMenuSeparator",qv=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Et(n);return i.jsx(Bk,{...o,...r,ref:t})});qv.displayName=nR;var rR="DropdownMenuArrow",oR=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Et(n);return i.jsx(zk,{...o,...r,ref:t})});oR.displayName=rR;var sR=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,a=Et(t),[l,c]=gt({prop:r,defaultProp:s??!1,onChange:o,caller:"DropdownMenuSub"});return i.jsx(Wk,{...a,open:l,onOpenChange:c,children:n})},aR="DropdownMenuSubTrigger",Xv=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Et(n);return i.jsx(Hk,{...o,...r,ref:t})});Xv.displayName=aR;var iR="DropdownMenuSubContent",Jv=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Et(n);return i.jsx(Gk,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Jv.displayName=iR;var lR=Iv,cR=$v,Qv=Vv,uR=zv,dR=Wv,fR=Hv,pR=Gv,hR=Uv,gR=Yv,mR=Kv,ey=Zv,xR=qv,vR=sR,yR=Xv,bR=Jv;function Cd(e){return i.jsx(lR,{"data-slot":"dropdown-menu",...e})}function wR(e){return i.jsx(Qv,{"data-slot":"dropdown-menu-portal",...e})}function Sd(e){return i.jsx(cR,{"data-slot":"dropdown-menu-trigger",...e})}function Ed({className:e,sideOffset:t=4,...n}){return i.jsx(Qv,{children:i.jsx(uR,{"data-slot":"dropdown-menu-content",sideOffset:t,className:j("bg-popover text-popover-foreground 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 z-popover max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function CR(e){return i.jsx(dR,{"data-slot":"dropdown-menu-group",...e})}function Nd({className:e,inset:t,variant:n="default",...r}){return i.jsx(pR,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:j("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:ps-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function SR({className:e,children:t,checked:n,...r}){return i.jsxs(hR,{"data-slot":"dropdown-menu-checkbox-item",className:j("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pe-2 ps-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[i.jsx("span",{className:"pointer-events-none absolute start-2 flex size-3.5 items-center justify-center",children:i.jsx(ey,{children:i.jsx(X,{name:"Check",className:"size-4"})})}),t]})}function ER(e){return i.jsx(gR,{"data-slot":"dropdown-menu-radio-group",...e})}function NR({className:e,children:t,...n}){return i.jsxs(mR,{"data-slot":"dropdown-menu-radio-item",className:j("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pe-2 ps-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[i.jsx("span",{className:"pointer-events-none absolute start-2 flex size-3.5 items-center justify-center",children:i.jsx(ey,{children:i.jsx(X,{name:"Circle",weight:"fill",className:"size-2"})})}),t]})}function _R({className:e,inset:t,...n}){return i.jsx(fR,{"data-slot":"dropdown-menu-label","data-inset":t,className:j("px-2 py-1.5 text-sm font-medium data-[inset]:ps-8",e),...n})}function jR({className:e,...t}){return i.jsx(xR,{"data-slot":"dropdown-menu-separator",className:j("bg-border -mx-1 my-1 h-px",e),...t})}function kR({className:e,...t}){return i.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:j("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}function RR(e){return i.jsx(vR,{"data-slot":"dropdown-menu-sub",...e})}function MR({className:e,inset:t,children:n,...r}){return i.jsxs(yR,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:j("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:ps-8",e),...r,children:[n,i.jsx(X,{name:"CaretRight",className:"ms-auto size-4"})]})}function DR({className:e,...t}){return i.jsx(bR,{"data-slot":"dropdown-menu-sub-content",className:j("bg-popover text-popover-foreground 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 z-popover min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t})}const Lc=({children:e,...t})=>i.jsx(Cd,{...t,children:e});Lc.displayName="DropdownMenu";const ty=({children:e,...t})=>i.jsx(wR,{...t,children:e});ty.displayName="DropdownMenuPortal";const Ic=g.forwardRef(({className:e,children:t,...n},r)=>i.jsx(Sd,{ref:r,className:j(e),...n,children:t}));Ic.displayName="DropdownMenuTrigger";const Fc=g.forwardRef(({className:e,children:t,...n},r)=>i.jsx(Ed,{ref:r,className:j(e),...n,children:t}));Fc.displayName="DropdownMenuContent";const ny=({children:e,...t})=>i.jsx(CR,{...t,children:e});ny.displayName="DropdownMenuGroup";const ry=g.forwardRef(({className:e,children:t,...n},r)=>i.jsx(_R,{ref:r,className:j(e),...n,children:t}));ry.displayName="DropdownMenuLabel";const xn=g.forwardRef(({className:e,children:t,...n},r)=>i.jsx(Nd,{ref:r,className:j(e),...n,children:t}));xn.displayName="DropdownMenuItem";const oy=g.forwardRef(({className:e,children:t,...n},r)=>i.jsx(SR,{ref:r,className:j(e),...n,children:t}));oy.displayName="DropdownMenuCheckboxItem";const sy=({children:e,...t})=>i.jsx(ER,{...t,children:e});sy.displayName="DropdownMenuRadioGroup";const ay=g.forwardRef(({className:e,children:t,...n},r)=>i.jsx(NR,{ref:r,className:j(e),...n,children:t}));ay.displayName="DropdownMenuRadioItem";const Dl=g.forwardRef(({className:e,...t},n)=>i.jsx(jR,{ref:n,className:j(e),...t}));Dl.displayName="DropdownMenuSeparator";const iy=g.forwardRef(({className:e,children:t,...n},r)=>i.jsx(kR,{ref:r,className:j(e),...n,children:t}));iy.displayName="DropdownMenuShortcut";const ly=({children:e,...t})=>i.jsx(RR,{...t,children:e});ly.displayName="DropdownMenuSub";const cy=g.forwardRef(({className:e,children:t,...n},r)=>i.jsx(MR,{ref:r,className:j(e),...n,children:t}));cy.displayName="DropdownMenuSubTrigger";const uy=g.forwardRef(({className:e,children:t,...n},r)=>i.jsx(DR,{ref:r,className:j(e),...n,children:t}));uy.displayName="DropdownMenuSubContent";var dy="Toggle",kp=g.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...s}=e,[a,l]=gt({prop:n,onChange:o,defaultProp:r??!1,caller:dy});return i.jsx(ue.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:te(e.onClick,()=>{e.disabled||l(!a)})})});kp.displayName=dy;var fy=kp,Tr="ToggleGroup",[py]=St(Tr,[js]),hy=js(),Rp=C.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return i.jsx(AR,{...o,ref:t})}if(n==="multiple"){const o=r;return i.jsx(TR,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${Tr}\``)});Rp.displayName=Tr;var[gy,my]=py(Tr),AR=C.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[a,l]=gt({prop:n,defaultProp:r??"",onChange:o,caller:Tr});return i.jsx(gy,{scope:e.__scopeToggleGroup,type:"single",value:C.useMemo(()=>a?[a]:[],[a]),onItemActivate:l,onItemDeactivate:C.useCallback(()=>l(""),[l]),children:i.jsx(xy,{...s,ref:t})})}),TR=C.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[a,l]=gt({prop:n,defaultProp:r??[],onChange:o,caller:Tr}),c=C.useCallback(f=>l((d=[])=>[...d,f]),[l]),u=C.useCallback(f=>l((d=[])=>d.filter(p=>p!==f)),[l]);return i.jsx(gy,{scope:e.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:c,onItemDeactivate:u,children:i.jsx(xy,{...s,ref:t})})});Rp.displayName=Tr;var[PR,OR]=py(Tr),xy=C.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:s,dir:a,loop:l=!0,...c}=e,u=hy(n),f=Cs(a),d={role:"group",dir:f,...c};return i.jsx(PR,{scope:n,rovingFocus:o,disabled:r,children:o?i.jsx(vp,{asChild:!0,...u,orientation:s,dir:f,loop:l,children:i.jsx(ue.div,{...d,ref:t})}):i.jsx(ue.div,{...d,ref:t})})}),Al="ToggleGroupItem",vy=C.forwardRef((e,t)=>{const n=my(Al,e.__scopeToggleGroup),r=OR(Al,e.__scopeToggleGroup),o=hy(e.__scopeToggleGroup),s=n.value.includes(e.value),a=r.disabled||e.disabled,l={...e,pressed:s,disabled:a},c=C.useRef(null);return r.rovingFocus?i.jsx(yp,{asChild:!0,...o,focusable:!a,active:s,ref:c,children:i.jsx(Cm,{...l,ref:t})}):i.jsx(Cm,{...l,ref:t})});vy.displayName=Al;var Cm=C.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,s=my(Al,n),a={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=s.type==="single"?a:void 0;return i.jsx(kp,{...l,...o,ref:t,onPressedChange:c=>{c?s.onItemActivate(r):s.onItemDeactivate(r)}})}),yy=Rp,by=vy;const wy=Ge("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-border bg-background hover:bg-muted hover:text-accent-foreground data-[state=on]:bg-muted"},size:{default:"h-9 p-1.5",sm:"h-8 p-1.5",lg:"h-10 p-1.5"}},defaultVariants:{variant:"default",size:"default"}}),LR=g.forwardRef(({className:e,variant:t,size:n,...r},o)=>i.jsx(fy,{ref:o,className:j(wy({variant:t,size:n,className:e})),...r}));LR.displayName=fy.displayName;const Cy=g.createContext({size:"default",variant:"default"}),Sy=g.forwardRef(({className:e,variant:t,size:n,children:r,...o},s)=>i.jsx(yy,{ref:s,className:j("inline-flex items-center justify-center",e),...o,children:i.jsx(Cy.Provider,{value:{variant:t,size:n},children:r})}));Sy.displayName=yy.displayName;const Ey=g.forwardRef(({className:e,children:t,variant:n,size:r,...o},s)=>{const a=g.useContext(Cy);return i.jsx(by,{ref:s,className:j(wy({variant:a.variant||n,size:a.size||r}),"rounded-none first:rounded-s-md last:rounded-e-md",(a.variant==="outline"||n==="outline")&&"-mr-px",e),...o,children:t})});Ey.displayName=by.displayName;const Ny=g.forwardRef(({className:e,variant:t,size:n,children:r,onChange:o,...s},a)=>i.jsx(Sy,{ref:a,className:j(e),variant:t,size:n,onValueChange:o,...s,children:r}));Ny.displayName="ToggleGroup";const _y=g.forwardRef(({className:e,variant:t,size:n,children:r,...o},s)=>i.jsx(Ey,{ref:s,className:j(e),variant:t,size:n,...o,children:r}));_y.displayName="ToggleGroupItem";const Mp=C.forwardRef(({className:e,underline:t=!0,asChild:n=!1,children:r,...o},s)=>{const a=n?Cc:"a",l=!n&&o.href==null&&o.onClick!=null,c=u=>{o.onKeyDown?.(u),l&&(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),u.currentTarget.click())};return i.jsx(a,{ref:s,className:j("text-sm font-normal leading-5 text-primary transition-colors hover:text-primary/80 cursor-pointer",t&&"underline decoration-solid [text-decoration-skip-ink:none] [text-underline-position:from-font]",e),...o,...l&&{role:"link",tabIndex:o.tabIndex??0,onKeyDown:c},children:r})});Mp.displayName="Link";const jy=({children:e,...t})=>i.jsx(Ac,{...t,children:e});jy.displayName="Popover";const ky=g.forwardRef(({className:e,children:t,...n},r)=>i.jsx(Tc,{ref:r,className:j(e),...n,children:t}));ky.displayName="PopoverTrigger";const Ry=g.forwardRef(({className:e,children:t,...n},r)=>i.jsx(ii,{ref:r,className:j(e),...n,children:t}));Ry.displayName="PopoverContent";function Ln({className:e,...t}){return i.jsx("div",{"data-slot":"skeleton",className:j("bg-accent animate-pulse rounded-md",e),...t})}var IR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],FR=IR.reduce((e,t)=>{const n=ei(`Primitive.${t}`),r=g.forwardRef((o,s)=>{const{asChild:a,...l}=o,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(c,{...l,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),$R="Separator",Sm="horizontal",VR=["horizontal","vertical"],My=g.forwardRef((e,t)=>{const{decorative:n,orientation:r=Sm,...o}=e,s=BR(r)?r:Sm,l=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return i.jsx(FR.div,{"data-orientation":s,...l,...o,ref:t})});My.displayName=$R;function BR(e){return VR.includes(e)}var zR=My;function Nr({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return i.jsx(zR,{"data-slot":"separator",decorative:n,orientation:t,className:j("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px",e),...r})}const WR=Ge("shrink-0 bg-border",{variants:{orientation:{horizontal:"",vertical:""},spacing:{none:"",xs:"",sm:"",md:"",lg:"",xl:""}},compoundVariants:[{orientation:"horizontal",spacing:"xs",class:"my-1"},{orientation:"horizontal",spacing:"sm",class:"my-2"},{orientation:"horizontal",spacing:"md",class:"my-4"},{orientation:"horizontal",spacing:"lg",class:"my-6"},{orientation:"horizontal",spacing:"xl",class:"my-8"},{orientation:"vertical",spacing:"xs",class:"mx-1"},{orientation:"vertical",spacing:"sm",class:"mx-2"},{orientation:"vertical",spacing:"md",class:"mx-4"},{orientation:"vertical",spacing:"lg",class:"mx-6"},{orientation:"vertical",spacing:"xl",class:"mx-8"}],defaultVariants:{orientation:"horizontal",spacing:"none"}}),Ta=({className:e,orientation:t,spacing:n,...r})=>i.jsx(Nr,{orientation:t,className:j(WR({orientation:t,spacing:n}),e),...r});Ta.displayName="Separator";const HR=Ge("animate-spin",{variants:{size:{xs:"",sm:"",md:"",lg:"",xl:""}},defaultVariants:{size:"md"}}),Dy=C.forwardRef(({size:e="md",weight:t="light",color:n,className:r,mirrored:o=!1,label:s,"aria-label":a,...l},c)=>i.jsx(X,{ref:c,name:"CircleNotch",size:e,weight:t,color:n,label:s,"aria-label":a,className:j(HR({size:e}),o&&"scale-x-[-1]",r),...l}));Dy.displayName="Loading";const Dp=C.forwardRef(({className:e,children:t,as:n="h1",...r},o)=>i.jsx(n,{ref:o,className:j("app-page-title","text-3xl font-semibold leading-[140%]",e),...r,children:t}));Dp.displayName="PageTitle";const fi=g.forwardRef(({className:e,type:t,...n},r)=>i.jsx("input",{type:t,ref:r,"data-slot":"input",className:j("font-normal file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-input px-3 py-1 text-base transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-normal disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n}));fi.displayName="Input";const Em=(e,t)=>{const n=GC(e,30,"...",19,10);return t?n.split("").map(()=>"*").join(""):n},GR=({protect:e=!0,text:t="Default Text",className:n})=>{const[r,o]=C.useState(Em(t,e));return C.useEffect(()=>{o(Em(t,e))},[e,t]),i.jsx(fi,{disabled:!0,value:r,className:j("min-w-[260px] bg-transparent border-none text-foreground leading-[1.5] shadow-none px-0",n),readOnly:!0})};function UR(e,t=[]){let n=[];function r(s,a){const l=g.createContext(a);l.displayName=s+"Context";const c=n.length;n=[...n,a];const u=d=>{const{scope:p,children:h,...m}=d,x=p?.[e]?.[c]||l,v=g.useMemo(()=>m,Object.values(m));return i.jsx(x.Provider,{value:v,children:h})};u.displayName=s+"Provider";function f(d,p){const h=p?.[e]?.[c]||l,m=g.useContext(h);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const o=()=>{const s=n.map(a=>g.createContext(a));return function(l){const c=l?.[e]||s;return g.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[r,YR(o,...t)]}function YR(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var KR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ay=KR.reduce((e,t)=>{const n=ei(`Primitive.${t}`),r=g.forwardRef((o,s)=>{const{asChild:a,...l}=o,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(c,{...l,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Ap="Progress",Tp=100,[ZR]=UR(Ap),[qR,XR]=ZR(Ap),Ty=g.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:s=JR,...a}=e;(o||o===0)&&!Nm(o)&&console.error(QR(`${o}`,"Progress"));const l=Nm(o)?o:Tp;r!==null&&!_m(r,l)&&console.error(eM(`${r}`,"Progress"));const c=_m(r,l)?r:null,u=Tl(c)?s(c,l):void 0;return i.jsx(qR,{scope:n,value:c,max:l,children:i.jsx(Ay.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Tl(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":Ly(c,l),"data-value":c??void 0,"data-max":l,...a,ref:t})})});Ty.displayName=Ap;var Py="ProgressIndicator",Oy=g.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=XR(Py,n);return i.jsx(Ay.div,{"data-state":Ly(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Oy.displayName=Py;function JR(e,t){return`${Math.round(e/t*100)}%`}function Ly(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Tl(e){return typeof e=="number"}function Nm(e){return Tl(e)&&!isNaN(e)&&e>0}function _m(e,t){return Tl(e)&&!isNaN(e)&&e<=t&&e>=0}function QR(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Tp}\`.`}function eM(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
41
|
+
`)},fj=0,Do=[];function pj(e){var t=m.useRef([]),n=m.useRef([0,0]),r=m.useRef(),o=m.useState(fj++)[0],s=m.useState(z2)[0],a=m.useRef(e);m.useEffect(function(){a.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var x=T_([e.lockRef.current],(e.shards||[]).map(bg),!0).filter(Boolean);return x.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),x.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=m.useCallback(function(x,v){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!a.current.allowPinchZoom;var y=Oi(x),b=n.current,S="deltaX"in x?x.deltaX:b[0]-y[0],w="deltaY"in x?x.deltaY:b[1]-y[1],E,N=x.target,_=Math.abs(S)>Math.abs(w)?"h":"v";if("touches"in x&&_==="h"&&N.type==="range")return!1;var k=window.getSelection(),I=k&&k.anchorNode,F=I?I===N||I.contains(N):!1;if(F)return!1;var U=vg(_,N);if(!U)return!0;if(U?E=_:(E=_==="v"?"h":"v",U=vg(_,N)),!U)return!1;if(!r.current&&"changedTouches"in x&&(S||w)&&(r.current=E),!E)return!0;var O=r.current||E;return cj(O,v,x,O==="h"?S:w)},[]),c=m.useCallback(function(x){var v=x;if(!(!Do.length||Do[Do.length-1]!==s)){var y="deltaY"in v?yg(v):Oi(v),b=t.current.filter(function(E){return E.name===v.type&&(E.target===v.target||v.target===E.shadowParent)&&uj(E.delta,y)})[0];if(b&&b.should){v.cancelable&&v.preventDefault();return}if(!b){var S=(a.current.shards||[]).map(bg).filter(Boolean).filter(function(E){return E.contains(v.target)}),w=S.length>0?l(v,S[0]):!a.current.noIsolation;w&&v.cancelable&&v.preventDefault()}}},[]),u=m.useCallback(function(x,v,y,b){var S={name:x,delta:v,target:y,should:b,shadowParent:hj(y)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(w){return w!==S})},1)},[]),f=m.useCallback(function(x){n.current=Oi(x),r.current=void 0},[]),d=m.useCallback(function(x){u(x.type,yg(x),x.target,l(x,e.lockRef.current))},[]),p=m.useCallback(function(x){u(x.type,Oi(x),x.target,l(x,e.lockRef.current))},[]);m.useEffect(function(){return Do.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Mo),document.addEventListener("touchmove",c,Mo),document.addEventListener("touchstart",f,Mo),function(){Do=Do.filter(function(x){return x!==s}),document.removeEventListener("wheel",c,Mo),document.removeEventListener("touchmove",c,Mo),document.removeEventListener("touchstart",f,Mo)}},[]);var h=e.removeScrollBar,g=e.inert;return m.createElement(m.Fragment,null,g?m.createElement(s,{styles:dj(o)}):null,h?m.createElement(nj,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function hj(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const mj=W_(B2,pj);var si=m.forwardRef(function(e,t){return m.createElement(Rc,Dn({},e,{ref:t,sideCar:mj}))});si.classNames=Rc.classNames;var Mc="Popover",[U2]=St(Mc,[Rr]),ai=Rr(),[gj,Mr]=U2(Mc),Y2=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:a=!1}=e,l=ai(t),c=m.useRef(null),[u,f]=m.useState(!1),[d,p]=mt({prop:r,defaultProp:o??!1,onChange:s,caller:Mc});return i.jsx(Xa,{...l,children:i.jsx(gj,{scope:t,contentId:tt(),triggerRef:c,open:d,onOpenChange:p,onOpenToggle:m.useCallback(()=>p(h=>!h),[p]),hasCustomAnchor:u,onCustomAnchorAdd:m.useCallback(()=>f(!0),[]),onCustomAnchorRemove:m.useCallback(()=>f(!1),[]),modal:a,children:n})})};Y2.displayName=Mc;var K2="PopoverAnchor",Z2=m.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Mr(K2,n),s=ai(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:l}=o;return m.useEffect(()=>(a(),()=>l()),[a,l]),i.jsx(Ja,{...s,...r,ref:t})});Z2.displayName=K2;var q2="PopoverTrigger",X2=m.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Mr(q2,n),s=ai(n),a=Se(t,o.triggerRef),l=i.jsx(ue.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":nv(o.open),...r,ref:a,onClick:te(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:i.jsx(Ja,{asChild:!0,...s,children:l})});X2.displayName=q2;var xp="PopoverPortal",[xj,vj]=U2(xp,{forceMount:void 0}),J2=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=Mr(xp,t);return i.jsx(xj,{scope:t,forceMount:n,children:i.jsx(Pt,{present:n||s.open,children:i.jsx(ws,{asChild:!0,container:o,children:r})})})};J2.displayName=xp;var cs="PopoverContent",Q2=m.forwardRef((e,t)=>{const n=vj(cs,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=Mr(cs,e.__scopePopover);return i.jsx(Pt,{present:r||s.open,children:s.modal?i.jsx(bj,{...o,ref:t}):i.jsx(wj,{...o,ref:t})})});Q2.displayName=cs;var yj=N_("PopoverContent.RemoveScroll"),bj=m.forwardRef((e,t)=>{const n=Mr(cs,e.__scopePopover),r=m.useRef(null),o=Se(t,r),s=m.useRef(!1);return m.useEffect(()=>{const a=r.current;if(a)return kc(a)},[]),i.jsx(si,{as:yj,allowPinchZoom:!0,children:i.jsx(ev,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:te(e.onCloseAutoFocus,a=>{a.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:te(e.onPointerDownOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:te(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),wj=m.forwardRef((e,t)=>{const n=Mr(cs,e.__scopePopover),r=m.useRef(!1),o=m.useRef(!1);return i.jsx(ev,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),ev=m.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...d}=e,p=Mr(cs,n),h=ai(n);return jc(),i.jsx(oi,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:i.jsx(vs,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:f,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:i.jsx(hc,{"data-state":nv(p.open),role:"dialog",id:p.contentId,...h,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),tv="PopoverClose",Cj=m.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Mr(tv,n);return i.jsx(ue.button,{type:"button",...r,ref:t,onClick:te(e.onClick,()=>o.onOpenChange(!1))})});Cj.displayName=tv;var Sj="PopoverArrow",Ej=m.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ai(n);return i.jsx(mc,{...o,...r,ref:t})});Ej.displayName=Sj;function nv(e){return e?"open":"closed"}var rv=Y2,Nj=Z2,ov=X2,sv=J2,Dc=Q2;const Ac=rv,Pc=ov,_j=Nj,ii=m.forwardRef(({className:e,align:t="center",sideOffset:n=4,container:r,...o},s)=>i.jsx(sv,{container:r??void 0,children:i.jsx(Dc,{ref:s,align:t,sideOffset:n,className:j("animate-dialog-in z-popover w-72 rounded-md border border-border bg-popover p-4 text-popover-foreground shadow-md outline-none",e),...o})}));ii.displayName=Dc.displayName;const jj=Ge("",{variants:{orientation:{vertical:"flex flex-col gap-2",horizontal:"flex flex-row items-start gap-4",responsive:"flex flex-col gap-2 @container/field-group:flex-row @container/field-group:items-start @container/field-group:gap-4"}},defaultVariants:{orientation:"vertical"}}),kj=m.forwardRef(({className:e,...t},n)=>i.jsx("fieldset",{ref:n,className:j("space-y-6",e),...t}));kj.displayName="FieldSet";const Rj=Ge("",{variants:{variant:{legend:"text-base font-semibold",label:"text-sm font-medium"}},defaultVariants:{variant:"legend"}}),Mj=m.forwardRef(({className:e,variant:t,...n},r)=>i.jsx("legend",{ref:r,className:j(Rj({variant:t}),e),...n}));Mj.displayName="FieldLegend";const Dj=m.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:j("flex flex-col gap-6",e),...t}));Dj.displayName="FieldGroup";const xo=m.forwardRef(({className:e,orientation:t,"data-invalid":n,...r},o)=>i.jsx("div",{ref:o,role:"group","data-invalid":n?"":void 0,className:j(jj({orientation:t}),e),...r}));xo.displayName="Field";const Aj=m.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:j("flex flex-col gap-1.5",e),...t}));Aj.displayName="FieldContent";const Ns=m.forwardRef(({className:e,asChild:t,...n},r)=>t?i.jsx("label",{ref:r,className:j("text-sm font-medium",e),...n}):i.jsx("label",{ref:r,className:j("text-sm font-medium",e),...n}));Ns.displayName="FieldLabel";const Pj=m.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:j("text-sm font-medium",e),...t}));Pj.displayName="FieldTitle";const _s=m.forwardRef(({className:e,...t},n)=>i.jsx("p",{ref:n,className:j("text-sm text-muted-foreground",e),...t}));_s.displayName="FieldDescription";const Tj=m.forwardRef(({className:e,children:t,...n},r)=>i.jsxs("div",{ref:r,className:j("flex items-center gap-4",e),...n,children:[i.jsx("div",{className:"flex-1 border-t"}),t&&i.jsx("span",{className:"text-sm text-muted-foreground",children:t}),i.jsx("div",{className:"flex-1 border-t"})]}));Tj.displayName="FieldSeparator";const Dr=m.forwardRef(({className:e,children:t,errors:n,...r},o)=>{const s=n?.filter(Boolean).map(l=>l?.message)||[];return s.length>0||!!t?i.jsx("div",{ref:o,role:"alert",className:j("text-sm text-destructive",e),...r,children:t||i.jsx("ul",{className:"list-disc list-inside",children:s.map((l,c)=>i.jsx("li",{children:l},c))})}):null});Dr.displayName="FieldError";var Oj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Lj=Oj.reduce((e,t)=>{const n=ei(`Primitive.${t}`),r=m.forwardRef((o,s)=>{const{asChild:a,...l}=o,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(c,{...l,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Ij="Label",av=m.forwardRef((e,t)=>i.jsx(Lj.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));av.displayName=Ij;var Fj=av;function $j({className:e,...t}){return i.jsx(Fj,{"data-slot":"label",className:j("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const Wt=({htmlFor:e,className:t,info:n,requiredIndicator:r,required:o=!1,disabled:s=!1,children:a,...l})=>{const c=r===!0&&o,u=()=>!r||c?null:typeof r=="string"?r:"optional";return i.jsxs("div",{className:j("flex items-center justify-between gap-2",s&&"text-muted-foreground"),children:[i.jsxs("div",{className:"flex items-center gap-1",children:[a&&i.jsxs($j,{htmlFor:e,className:j("text-sm cursor-pointer",t),...l,children:[a,c&&i.jsxs(i.Fragment,{children:[i.jsx("span",{"aria-hidden":"true",className:"ml-0.5 text-destructive",children:"*"}),i.jsx("span",{className:"sr-only",children:"(required)"})]})]}),n&&i.jsx(zt,{content:n,children:i.jsx(X,{name:"Info",size:"sm",className:"cursor-default text-muted-foreground"})})]}),u()&&i.jsxs("span",{className:"text-sm text-muted-foreground font-normal",children:["(",u(),")"]})]})};Wt.displayName="Label";function Vj({date:e,onChange:t,placeholder:n="Pick a date",disabled:r=!1,className:o,iconPosition:s="start",minDate:a,maxDate:l,dateFormat:c="MMM d, yyyy",label:u,error:f,description:d,info:p,requiredIndicator:h,required:g=!1,orientation:x="vertical",id:v,captionLayout:y,fromYear:b,toYear:S,fromMonth:w,toMonth:E}){const N=C.useId(),_=v||N,k=!!f,I=s==="start",F=s==="end",U=w??(b!=null?new Date(b,0,1):a),O=E??(S!=null?new Date(S,11,31):l),R=y==="buttons"?"label":y?"dropdown":void 0,L=i.jsxs(Ac,{children:[i.jsx(Pc,{asChild:!0,children:i.jsxs(wt,{variant:"outline",className:j("w-full text-left font-normal h-9",F||k?"justify-between":"justify-start",!e&&"text-muted-foreground",k&&"border-destructive focus-visible:border-destructive",o),disabled:r,"aria-invalid":k?!0:void 0,"aria-describedby":d||f?`${_}-description`:void 0,id:_,children:[i.jsxs("div",{className:"flex items-center gap-2",children:[I&&i.jsx(X,{name:"Calendar",className:"h-4 w-4"}),e?Zn(e,c):i.jsx("span",{children:n})]}),F?i.jsx(X,{name:"CaretDown",className:"h-4 w-4 opacity-50"}):k&&i.jsx(X,{name:"WarningCircle",className:"h-4 w-4 text-destructive"})]})}),i.jsx(ii,{className:"w-auto p-0",children:i.jsx(gp,{mode:"single",selected:e,onSelect:t,autoFocus:!0,disabled:[...a?[{before:a}]:[],...l?[{after:l}]:[]],captionLayout:R,startMonth:U,endMonth:O})})]});return u||f||d||p||h?i.jsxs(xo,{orientation:x,"data-invalid":k,className:j("w-full",o),children:[(u||p||h)&&i.jsx(Wt,{htmlFor:_,info:p,requiredIndicator:h,required:g,disabled:r,children:u}),i.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[L,d&&!f&&i.jsx(_s,{id:`${_}-description`,children:d}),f&&i.jsx(Dr,{id:`${_}-description`,children:f})]})]}):L}const cl=Vj;function Bj({dateRange:e,onChange:t,placeholder:n="Pick a date range",disabled:r=!1,className:o}){return i.jsxs(Ac,{children:[i.jsx(Pc,{asChild:!0,children:i.jsxs(wt,{variant:"outline",className:j("w-full justify-start text-left font-normal h-9",!e&&"text-muted-foreground",o),disabled:r,children:[i.jsx(X,{name:"Calendar",className:"mr-2 h-4 w-4"}),e?.from?e.to?i.jsxs(i.Fragment,{children:[Zn(e.from,"dd.MM.yyyy")," -"," ",Zn(e.to,"dd.MM.yyyy")]}):Zn(e.from,"dd.MM.yyyy"):i.jsx("span",{children:n})]})}),i.jsx(ii,{className:"w-auto p-0",align:"start",children:i.jsx(gp,{mode:"range",selected:e,onSelect:t,autoFocus:!0,numberOfMonths:1})})]})}const zj=Bj;var Du="rovingFocusGroup.onEntryFocus",Wj={bubbles:!1,cancelable:!0},li="RovingFocusGroup",[bd,iv,Hj]=vc(li),[Gj,js]=St(li,[Hj]),[Uj,Yj]=Gj(li),lv=m.forwardRef((e,t)=>i.jsx(bd.Provider,{scope:e.__scopeRovingFocusGroup,children:i.jsx(bd.Slot,{scope:e.__scopeRovingFocusGroup,children:i.jsx(Kj,{...e,ref:t})})}));lv.displayName=li;var Kj=m.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...d}=e,p=m.useRef(null),h=Se(t,p),g=Cs(s),[x,v]=mt({prop:a,defaultProp:l??null,onChange:c,caller:li}),[y,b]=m.useState(!1),S=dn(u),w=iv(n),E=m.useRef(!1),[N,_]=m.useState(0);return m.useEffect(()=>{const k=p.current;if(k)return k.addEventListener(Du,S),()=>k.removeEventListener(Du,S)},[S]),i.jsx(Uj,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:x,onItemFocus:m.useCallback(k=>v(k),[v]),onItemShiftTab:m.useCallback(()=>b(!0),[]),onFocusableItemAdd:m.useCallback(()=>_(k=>k+1),[]),onFocusableItemRemove:m.useCallback(()=>_(k=>k-1),[]),children:i.jsx(ue.div,{tabIndex:y||N===0?-1:0,"data-orientation":r,...d,ref:h,style:{outline:"none",...e.style},onMouseDown:te(e.onMouseDown,()=>{E.current=!0}),onFocus:te(e.onFocus,k=>{const I=!E.current;if(k.target===k.currentTarget&&I&&!y){const F=new CustomEvent(Du,Wj);if(k.currentTarget.dispatchEvent(F),!F.defaultPrevented){const U=w().filter(D=>D.focusable),O=U.find(D=>D.active),R=U.find(D=>D.id===x),V=[O,R,...U].filter(Boolean).map(D=>D.ref.current);dv(V,f)}}E.current=!1}),onBlur:te(e.onBlur,()=>b(!1))})})}),cv="RovingFocusGroupItem",uv=m.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:a,...l}=e,c=tt(),u=s||c,f=Yj(cv,n),d=f.currentTabStopId===u,p=iv(n),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:x}=f;return m.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),i.jsx(bd.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:i.jsx(ue.span,{tabIndex:d?0:-1,"data-orientation":f.orientation,...l,ref:t,onMouseDown:te(e.onMouseDown,v=>{r?f.onItemFocus(u):v.preventDefault()}),onFocus:te(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:te(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=Xj(v,f.orientation,f.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let S=p().filter(w=>w.focusable).map(w=>w.ref.current);if(y==="last")S.reverse();else if(y==="prev"||y==="next"){y==="prev"&&S.reverse();const w=S.indexOf(v.currentTarget);S=f.loop?Jj(S,w+1):S.slice(w+1)}setTimeout(()=>dv(S))}}),children:typeof a=="function"?a({isCurrentTabStop:d,hasTabStop:x!=null}):a})})});uv.displayName=cv;var Zj={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function qj(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Xj(e,t,n){const r=qj(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Zj[r]}function dv(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Jj(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var vp=lv,yp=uv;function Qj(e){const t=ek(e),n=m.forwardRef((r,o)=>{const{children:s,...a}=r,l=m.Children.toArray(s),c=l.find(nk);if(c){const u=c.props.children,f=l.map(d=>d===c?m.Children.count(u)>1?m.Children.only(null):m.isValidElement(u)?u.props.children:null:d);return i.jsx(t,{...a,ref:o,children:m.isValidElement(u)?m.cloneElement(u,void 0,f):null})}return i.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function ek(e){const t=m.forwardRef((n,r)=>{const{children:o,...s}=n;if(m.isValidElement(o)){const a=ok(o),l=rk(s,o.props);return o.type!==m.Fragment&&(l.ref=r?At(r,a):a),m.cloneElement(o,l)}return m.Children.count(o)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var tk=Symbol("radix.slottable");function nk(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===tk}function rk(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...l)=>{const c=s(...l);return o(...l),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function ok(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var wd=["Enter"," "],sk=["ArrowDown","PageUp","Home"],fv=["ArrowUp","PageDown","End"],ak=[...sk,...fv],ik={ltr:[...wd,"ArrowRight"],rtl:[...wd,"ArrowLeft"]},lk={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ci="Menu",[Da,ck,uk]=vc(ci),[vo,pv]=St(ci,[uk,Rr,js]),ui=Rr(),hv=js(),[mv,Ar]=vo(ci),[dk,di]=vo(ci),gv=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:a=!0}=e,l=ui(t),[c,u]=m.useState(null),f=m.useRef(!1),d=dn(s),p=Cs(o);return m.useEffect(()=>{const h=()=>{f.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>f.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),i.jsx(Xa,{...l,children:i.jsx(mv,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:u,children:i.jsx(dk,{scope:t,onClose:m.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:p,modal:a,children:r})})})};gv.displayName=ci;var fk="MenuAnchor",bp=m.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=ui(n);return i.jsx(Ja,{...o,...r,ref:t})});bp.displayName=fk;var wp="MenuPortal",[pk,xv]=vo(wp,{forceMount:void 0}),vv=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Ar(wp,t);return i.jsx(pk,{scope:t,forceMount:n,children:i.jsx(Pt,{present:n||s.open,children:i.jsx(ws,{asChild:!0,container:o,children:r})})})};vv.displayName=wp;var cn="MenuContent",[hk,Cp]=vo(cn),yv=m.forwardRef((e,t)=>{const n=xv(cn,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ar(cn,e.__scopeMenu),a=di(cn,e.__scopeMenu);return i.jsx(Da.Provider,{scope:e.__scopeMenu,children:i.jsx(Pt,{present:r||s.open,children:i.jsx(Da.Slot,{scope:e.__scopeMenu,children:a.modal?i.jsx(mk,{...o,ref:t}):i.jsx(gk,{...o,ref:t})})})})}),mk=m.forwardRef((e,t)=>{const n=Ar(cn,e.__scopeMenu),r=m.useRef(null),o=Se(t,r);return m.useEffect(()=>{const s=r.current;if(s)return kc(s)},[]),i.jsx(Sp,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:te(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),gk=m.forwardRef((e,t)=>{const n=Ar(cn,e.__scopeMenu);return i.jsx(Sp,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),xk=Qj("MenuContent.ScrollLock"),Sp=m.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:h,disableOutsideScroll:g,...x}=e,v=Ar(cn,n),y=di(cn,n),b=ui(n),S=hv(n),w=ck(n),[E,N]=m.useState(null),_=m.useRef(null),k=Se(t,_,v.onContentChange),I=m.useRef(0),F=m.useRef(""),U=m.useRef(0),O=m.useRef(null),R=m.useRef("right"),L=m.useRef(0),V=g?si:m.Fragment,D=g?{as:xk,allowPinchZoom:!0}:void 0,$=T=>{const M=F.current+T,G=w().filter(Y=>!Y.disabled),A=document.activeElement,W=G.find(Y=>Y.ref.current===A)?.textValue,H=G.map(Y=>Y.textValue),P=Rk(H,M,W),B=G.find(Y=>Y.textValue===P)?.ref.current;(function Y(Z){F.current=Z,window.clearTimeout(I.current),Z!==""&&(I.current=window.setTimeout(()=>Y(""),1e3))})(M),B&&setTimeout(()=>B.focus())};m.useEffect(()=>()=>window.clearTimeout(I.current),[]),jc();const z=m.useCallback(T=>R.current===O.current?.side&&Dk(T,O.current?.area),[]);return i.jsx(hk,{scope:n,searchRef:F,onItemEnter:m.useCallback(T=>{z(T)&&T.preventDefault()},[z]),onItemLeave:m.useCallback(T=>{z(T)||(_.current?.focus(),N(null))},[z]),onTriggerLeave:m.useCallback(T=>{z(T)&&T.preventDefault()},[z]),pointerGraceTimerRef:U,onPointerGraceIntentChange:m.useCallback(T=>{O.current=T},[]),children:i.jsx(V,{...D,children:i.jsx(oi,{asChild:!0,trapped:o,onMountAutoFocus:te(s,T=>{T.preventDefault(),_.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:i.jsx(vs,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:h,children:i.jsx(vp,{asChild:!0,...S,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:N,onEntryFocus:te(c,T=>{y.isUsingKeyboardRef.current||T.preventDefault()}),preventScrollOnEntryFocus:!0,children:i.jsx(hc,{role:"menu","aria-orientation":"vertical","data-state":Lv(v.open),"data-radix-menu-content":"",dir:y.dir,...b,...x,ref:k,style:{outline:"none",...x.style},onKeyDown:te(x.onKeyDown,T=>{const G=T.target.closest("[data-radix-menu-content]")===T.currentTarget,A=T.ctrlKey||T.altKey||T.metaKey,W=T.key.length===1;G&&(T.key==="Tab"&&T.preventDefault(),!A&&W&&$(T.key));const H=_.current;if(T.target!==H||!ak.includes(T.key))return;T.preventDefault();const B=w().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);fv.includes(T.key)&&B.reverse(),jk(B)}),onBlur:te(e.onBlur,T=>{T.currentTarget.contains(T.target)||(window.clearTimeout(I.current),F.current="")}),onPointerMove:te(e.onPointerMove,Aa(T=>{const M=T.target,G=L.current!==T.clientX;if(T.currentTarget.contains(M)&&G){const A=T.clientX>L.current?"right":"left";R.current=A,L.current=T.clientX}}))})})})})})})});yv.displayName=cn;var vk="MenuGroup",Ep=m.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(ue.div,{role:"group",...r,ref:t})});Ep.displayName=vk;var yk="MenuLabel",bv=m.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(ue.div,{...r,ref:t})});bv.displayName=yk;var Rl="MenuItem",wg="menu.itemSelect",Tc=m.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=m.useRef(null),a=di(Rl,e.__scopeMenu),l=Cp(Rl,e.__scopeMenu),c=Se(t,s),u=m.useRef(!1),f=()=>{const d=s.current;if(!n&&d){const p=new CustomEvent(wg,{bubbles:!0,cancelable:!0});d.addEventListener(wg,h=>r?.(h),{once:!0}),F0(d,p),p.defaultPrevented?u.current=!1:a.onClose()}};return i.jsx(wv,{...o,ref:c,disabled:n,onClick:te(e.onClick,f),onPointerDown:d=>{e.onPointerDown?.(d),u.current=!0},onPointerUp:te(e.onPointerUp,d=>{u.current||d.currentTarget?.click()}),onKeyDown:te(e.onKeyDown,d=>{const p=l.searchRef.current!=="";n||p&&d.key===" "||wd.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Tc.displayName=Rl;var wv=m.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,a=Cp(Rl,n),l=hv(n),c=m.useRef(null),u=Se(t,c),[f,d]=m.useState(!1),[p,h]=m.useState("");return m.useEffect(()=>{const g=c.current;g&&h((g.textContent??"").trim())},[s.children]),i.jsx(Da.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:i.jsx(yp,{asChild:!0,...l,focusable:!r,children:i.jsx(ue.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:u,onPointerMove:te(e.onPointerMove,Aa(g=>{r?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:te(e.onPointerLeave,Aa(g=>a.onItemLeave(g))),onFocus:te(e.onFocus,()=>d(!0)),onBlur:te(e.onBlur,()=>d(!1))})})})}),bk="MenuCheckboxItem",Cv=m.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return i.jsx(jv,{scope:e.__scopeMenu,checked:n,children:i.jsx(Tc,{role:"menuitemcheckbox","aria-checked":Ml(n)?"mixed":n,...o,ref:t,"data-state":jp(n),onSelect:te(o.onSelect,()=>r?.(Ml(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Cv.displayName=bk;var Sv="MenuRadioGroup",[wk,Ck]=vo(Sv,{value:void 0,onValueChange:()=>{}}),Ev=m.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=dn(r);return i.jsx(wk,{scope:e.__scopeMenu,value:n,onValueChange:s,children:i.jsx(Ep,{...o,ref:t})})});Ev.displayName=Sv;var Nv="MenuRadioItem",_v=m.forwardRef((e,t)=>{const{value:n,...r}=e,o=Ck(Nv,e.__scopeMenu),s=n===o.value;return i.jsx(jv,{scope:e.__scopeMenu,checked:s,children:i.jsx(Tc,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":jp(s),onSelect:te(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});_v.displayName=Nv;var Np="MenuItemIndicator",[jv,Sk]=vo(Np,{checked:!1}),kv=m.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Sk(Np,n);return i.jsx(Pt,{present:r||Ml(s.checked)||s.checked===!0,children:i.jsx(ue.span,{...o,ref:t,"data-state":jp(s.checked)})})});kv.displayName=Np;var Ek="MenuSeparator",Rv=m.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(ue.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Rv.displayName=Ek;var Nk="MenuArrow",Mv=m.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=ui(n);return i.jsx(mc,{...o,...r,ref:t})});Mv.displayName=Nk;var _p="MenuSub",[_k,Dv]=vo(_p),Av=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=Ar(_p,t),a=ui(t),[l,c]=m.useState(null),[u,f]=m.useState(null),d=dn(o);return m.useEffect(()=>(s.open===!1&&d(!1),()=>d(!1)),[s.open,d]),i.jsx(Xa,{...a,children:i.jsx(mv,{scope:t,open:r,onOpenChange:d,content:u,onContentChange:f,children:i.jsx(_k,{scope:t,contentId:tt(),triggerId:tt(),trigger:l,onTriggerChange:c,children:n})})})};Av.displayName=_p;var ea="MenuSubTrigger",Pv=m.forwardRef((e,t)=>{const n=Ar(ea,e.__scopeMenu),r=di(ea,e.__scopeMenu),o=Dv(ea,e.__scopeMenu),s=Cp(ea,e.__scopeMenu),a=m.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=s,u={__scopeMenu:e.__scopeMenu},f=m.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return m.useEffect(()=>f,[f]),m.useEffect(()=>{const d=l.current;return()=>{window.clearTimeout(d),c(null)}},[l,c]),i.jsx(bp,{asChild:!0,...u,children:i.jsx(wv,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Lv(n.open),...e,ref:At(t,o.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:te(e.onPointerMove,Aa(d=>{s.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:te(e.onPointerLeave,Aa(d=>{f();const p=n.content?.getBoundingClientRect();if(p){const h=n.content?.dataset.side,g=h==="right",x=g?-5:5,v=p[g?"left":"right"],y=p[g?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+x,y:d.clientY},{x:v,y:p.top},{x:y,y:p.top},{x:y,y:p.bottom},{x:v,y:p.bottom}],side:h}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:te(e.onKeyDown,d=>{const p=s.searchRef.current!=="";e.disabled||p&&d.key===" "||ik[r.dir].includes(d.key)&&(n.onOpenChange(!0),n.content?.focus(),d.preventDefault())})})})});Pv.displayName=ea;var Tv="MenuSubContent",Ov=m.forwardRef((e,t)=>{const n=xv(cn,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ar(cn,e.__scopeMenu),a=di(cn,e.__scopeMenu),l=Dv(Tv,e.__scopeMenu),c=m.useRef(null),u=Se(t,c);return i.jsx(Da.Provider,{scope:e.__scopeMenu,children:i.jsx(Pt,{present:r||s.open,children:i.jsx(Da.Slot,{scope:e.__scopeMenu,children:i.jsx(Sp,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{a.isUsingKeyboardRef.current&&c.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:te(e.onFocusOutside,f=>{f.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:te(e.onEscapeKeyDown,f=>{a.onClose(),f.preventDefault()}),onKeyDown:te(e.onKeyDown,f=>{const d=f.currentTarget.contains(f.target),p=lk[a.dir].includes(f.key);d&&p&&(s.onOpenChange(!1),l.trigger?.focus(),f.preventDefault())})})})})})});Ov.displayName=Tv;function Lv(e){return e?"open":"closed"}function Ml(e){return e==="indeterminate"}function jp(e){return Ml(e)?"indeterminate":e?"checked":"unchecked"}function jk(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function kk(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Rk(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=kk(e,Math.max(s,0));o.length===1&&(a=a.filter(u=>u!==n));const c=a.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function Mk(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const l=t[s],c=t[a],u=l.x,f=l.y,d=c.x,p=c.y;f>r!=p>r&&n<(d-u)*(r-f)/(p-f)+u&&(o=!o)}return o}function Dk(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Mk(n,t)}function Aa(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Ak=gv,Pk=bp,Tk=vv,Ok=yv,Lk=Ep,Ik=bv,Fk=Tc,$k=Cv,Vk=Ev,Bk=_v,zk=kv,Wk=Rv,Hk=Mv,Gk=Av,Uk=Pv,Yk=Ov,Oc="DropdownMenu",[Kk]=St(Oc,[pv]),Et=pv(),[Zk,Iv]=Kk(Oc),Fv=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:a,modal:l=!0}=e,c=Et(t),u=m.useRef(null),[f,d]=mt({prop:o,defaultProp:s??!1,onChange:a,caller:Oc});return i.jsx(Zk,{scope:t,triggerId:tt(),triggerRef:u,contentId:tt(),open:f,onOpenChange:d,onOpenToggle:m.useCallback(()=>d(p=>!p),[d]),modal:l,children:i.jsx(Ak,{...c,open:f,onOpenChange:d,dir:r,modal:l,children:n})})};Fv.displayName=Oc;var $v="DropdownMenuTrigger",Vv=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=Iv($v,n),a=Et(n);return i.jsx(Pk,{asChild:!0,...a,children:i.jsx(ue.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:At(t,s.triggerRef),onPointerDown:te(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(s.onOpenToggle(),s.open||l.preventDefault())}),onKeyDown:te(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&s.onOpenToggle(),l.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});Vv.displayName=$v;var qk="DropdownMenuPortal",Bv=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Et(t);return i.jsx(Tk,{...r,...n})};Bv.displayName=qk;var zv="DropdownMenuContent",Wv=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Iv(zv,n),s=Et(n),a=m.useRef(!1);return i.jsx(Ok,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:te(e.onCloseAutoFocus,l=>{a.current||o.triggerRef.current?.focus(),a.current=!1,l.preventDefault()}),onInteractOutside:te(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,f=c.button===2||u;(!o.modal||f)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Wv.displayName=zv;var Xk="DropdownMenuGroup",Hv=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Et(n);return i.jsx(Lk,{...o,...r,ref:t})});Hv.displayName=Xk;var Jk="DropdownMenuLabel",Gv=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Et(n);return i.jsx(Ik,{...o,...r,ref:t})});Gv.displayName=Jk;var Qk="DropdownMenuItem",Uv=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Et(n);return i.jsx(Fk,{...o,...r,ref:t})});Uv.displayName=Qk;var eR="DropdownMenuCheckboxItem",Yv=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Et(n);return i.jsx($k,{...o,...r,ref:t})});Yv.displayName=eR;var tR="DropdownMenuRadioGroup",Kv=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Et(n);return i.jsx(Vk,{...o,...r,ref:t})});Kv.displayName=tR;var nR="DropdownMenuRadioItem",Zv=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Et(n);return i.jsx(Bk,{...o,...r,ref:t})});Zv.displayName=nR;var rR="DropdownMenuItemIndicator",qv=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Et(n);return i.jsx(zk,{...o,...r,ref:t})});qv.displayName=rR;var oR="DropdownMenuSeparator",Xv=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Et(n);return i.jsx(Wk,{...o,...r,ref:t})});Xv.displayName=oR;var sR="DropdownMenuArrow",aR=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Et(n);return i.jsx(Hk,{...o,...r,ref:t})});aR.displayName=sR;var iR=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,a=Et(t),[l,c]=mt({prop:r,defaultProp:s??!1,onChange:o,caller:"DropdownMenuSub"});return i.jsx(Gk,{...a,open:l,onOpenChange:c,children:n})},lR="DropdownMenuSubTrigger",Jv=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Et(n);return i.jsx(Uk,{...o,...r,ref:t})});Jv.displayName=lR;var cR="DropdownMenuSubContent",Qv=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Et(n);return i.jsx(Yk,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Qv.displayName=cR;var uR=Fv,dR=Vv,ey=Bv,fR=Wv,pR=Hv,hR=Gv,mR=Uv,gR=Yv,xR=Kv,vR=Zv,ty=qv,yR=Xv,bR=iR,wR=Jv,CR=Qv;function Cd(e){return i.jsx(uR,{"data-slot":"dropdown-menu",...e})}function SR(e){return i.jsx(ey,{"data-slot":"dropdown-menu-portal",...e})}function Sd(e){return i.jsx(dR,{"data-slot":"dropdown-menu-trigger",...e})}function Ed({className:e,sideOffset:t=4,...n}){return i.jsx(ey,{children:i.jsx(fR,{"data-slot":"dropdown-menu-content",sideOffset:t,className:j("bg-popover text-popover-foreground 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 z-popover max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function ER(e){return i.jsx(pR,{"data-slot":"dropdown-menu-group",...e})}function Nd({className:e,inset:t,...n}){return i.jsx(mR,{"data-slot":"dropdown-menu-item","data-inset":t,className:j("focus:bg-muted focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:ps-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n})}function NR({className:e,children:t,checked:n,...r}){return i.jsxs(gR,{"data-slot":"dropdown-menu-checkbox-item",className:j("focus:bg-muted focus:text-accent-foreground relative flex cursor-pointer items-center gap-2 rounded-sm py-1.5 pe-2 ps-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[i.jsx("span",{className:"pointer-events-none absolute start-2 flex size-3.5 items-center justify-center",children:i.jsx(ty,{children:i.jsx(X,{name:"Check",className:"size-4"})})}),t]})}function _R(e){return i.jsx(xR,{"data-slot":"dropdown-menu-radio-group",...e})}function jR({className:e,children:t,...n}){return i.jsxs(vR,{"data-slot":"dropdown-menu-radio-item",className:j("focus:bg-muted focus:text-accent-foreground relative flex cursor-pointer items-center gap-2 rounded-sm py-1.5 pe-2 ps-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[i.jsx("span",{className:"pointer-events-none absolute start-2 flex size-3.5 items-center justify-center",children:i.jsx(ty,{children:i.jsx(X,{name:"Circle",weight:"fill",className:"size-2"})})}),t]})}function kR({className:e,inset:t,...n}){return i.jsx(hR,{"data-slot":"dropdown-menu-label","data-inset":t,className:j("px-2 py-1.5 text-sm font-medium data-[inset]:ps-8",e),...n})}function RR({className:e,...t}){return i.jsx(yR,{"data-slot":"dropdown-menu-separator",className:j("bg-border -mx-1 my-1 h-px",e),...t})}function MR({className:e,...t}){return i.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:j("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}function DR(e){return i.jsx(bR,{"data-slot":"dropdown-menu-sub",...e})}function AR({className:e,inset:t,children:n,...r}){return i.jsxs(wR,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:j("focus:bg-muted focus:text-accent-foreground data-[state=open]:bg-muted data-[state=open]:text-accent-foreground flex cursor-pointer items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:ps-8",e),...r,children:[n,i.jsx(X,{name:"CaretRight",className:"ms-auto size-4"})]})}function PR({className:e,...t}){return i.jsx(CR,{"data-slot":"dropdown-menu-sub-content",className:j("bg-popover text-popover-foreground 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 z-popover min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t})}const Lc=({children:e,...t})=>i.jsx(Cd,{...t,children:e});Lc.displayName="DropdownMenu";const ny=({children:e,...t})=>i.jsx(SR,{...t,children:e});ny.displayName="DropdownMenuPortal";const Ic=m.forwardRef(({className:e,children:t,...n},r)=>i.jsx(Sd,{ref:r,className:j(e),...n,children:t}));Ic.displayName="DropdownMenuTrigger";const Fc=m.forwardRef(({className:e,children:t,...n},r)=>i.jsx(Ed,{ref:r,className:j(e),...n,children:t}));Fc.displayName="DropdownMenuContent";const ry=({children:e,...t})=>i.jsx(ER,{...t,children:e});ry.displayName="DropdownMenuGroup";const oy=m.forwardRef(({className:e,children:t,...n},r)=>i.jsx(kR,{ref:r,className:j(e),...n,children:t}));oy.displayName="DropdownMenuLabel";const xn=m.forwardRef(({className:e,children:t,...n},r)=>i.jsx(Nd,{ref:r,className:j(e),...n,children:t}));xn.displayName="DropdownMenuItem";const sy=m.forwardRef(({className:e,children:t,...n},r)=>i.jsx(NR,{ref:r,className:j(e),...n,children:t}));sy.displayName="DropdownMenuCheckboxItem";const ay=({children:e,...t})=>i.jsx(_R,{...t,children:e});ay.displayName="DropdownMenuRadioGroup";const iy=m.forwardRef(({className:e,children:t,...n},r)=>i.jsx(jR,{ref:r,className:j(e),...n,children:t}));iy.displayName="DropdownMenuRadioItem";const Dl=m.forwardRef(({className:e,...t},n)=>i.jsx(RR,{ref:n,className:j(e),...t}));Dl.displayName="DropdownMenuSeparator";const ly=m.forwardRef(({className:e,children:t,...n},r)=>i.jsx(MR,{ref:r,className:j(e),...n,children:t}));ly.displayName="DropdownMenuShortcut";const cy=({children:e,...t})=>i.jsx(DR,{...t,children:e});cy.displayName="DropdownMenuSub";const uy=m.forwardRef(({className:e,children:t,...n},r)=>i.jsx(AR,{ref:r,className:j(e),...n,children:t}));uy.displayName="DropdownMenuSubTrigger";const dy=m.forwardRef(({className:e,children:t,...n},r)=>i.jsx(PR,{ref:r,className:j(e),...n,children:t}));dy.displayName="DropdownMenuSubContent";var fy="Toggle",kp=m.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...s}=e,[a,l]=mt({prop:n,onChange:o,defaultProp:r??!1,caller:fy});return i.jsx(ue.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:te(e.onClick,()=>{e.disabled||l(!a)})})});kp.displayName=fy;var py=kp,Pr="ToggleGroup",[hy]=St(Pr,[js]),my=js(),Rp=C.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return i.jsx(TR,{...o,ref:t})}if(n==="multiple"){const o=r;return i.jsx(OR,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${Pr}\``)});Rp.displayName=Pr;var[gy,xy]=hy(Pr),TR=C.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[a,l]=mt({prop:n,defaultProp:r??"",onChange:o,caller:Pr});return i.jsx(gy,{scope:e.__scopeToggleGroup,type:"single",value:C.useMemo(()=>a?[a]:[],[a]),onItemActivate:l,onItemDeactivate:C.useCallback(()=>l(""),[l]),children:i.jsx(vy,{...s,ref:t})})}),OR=C.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[a,l]=mt({prop:n,defaultProp:r??[],onChange:o,caller:Pr}),c=C.useCallback(f=>l((d=[])=>[...d,f]),[l]),u=C.useCallback(f=>l((d=[])=>d.filter(p=>p!==f)),[l]);return i.jsx(gy,{scope:e.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:c,onItemDeactivate:u,children:i.jsx(vy,{...s,ref:t})})});Rp.displayName=Pr;var[LR,IR]=hy(Pr),vy=C.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:s,dir:a,loop:l=!0,...c}=e,u=my(n),f=Cs(a),d={role:"group",dir:f,...c};return i.jsx(LR,{scope:n,rovingFocus:o,disabled:r,children:o?i.jsx(vp,{asChild:!0,...u,orientation:s,dir:f,loop:l,children:i.jsx(ue.div,{...d,ref:t})}):i.jsx(ue.div,{...d,ref:t})})}),Al="ToggleGroupItem",yy=C.forwardRef((e,t)=>{const n=xy(Al,e.__scopeToggleGroup),r=IR(Al,e.__scopeToggleGroup),o=my(e.__scopeToggleGroup),s=n.value.includes(e.value),a=r.disabled||e.disabled,l={...e,pressed:s,disabled:a},c=C.useRef(null);return r.rovingFocus?i.jsx(yp,{asChild:!0,...o,focusable:!a,active:s,ref:c,children:i.jsx(Cg,{...l,ref:t})}):i.jsx(Cg,{...l,ref:t})});yy.displayName=Al;var Cg=C.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,s=xy(Al,n),a={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=s.type==="single"?a:void 0;return i.jsx(kp,{...l,...o,ref:t,onPressedChange:c=>{c?s.onItemActivate(r):s.onItemDeactivate(r)}})}),by=Rp,wy=yy;const Cy=Ge("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-border bg-background hover:bg-muted hover:text-accent-foreground data-[state=on]:bg-muted"},size:{default:"h-9 p-1.5",sm:"h-8 p-1.5",lg:"h-10 p-1.5"}},defaultVariants:{variant:"default",size:"default"}}),FR=m.forwardRef(({className:e,variant:t,size:n,...r},o)=>i.jsx(py,{ref:o,className:j(Cy({variant:t,size:n,className:e})),...r}));FR.displayName=py.displayName;const Sy=m.createContext({size:"default",variant:"default"}),Ey=m.forwardRef(({className:e,variant:t,size:n,children:r,...o},s)=>i.jsx(by,{ref:s,className:j("inline-flex items-center justify-center",e),...o,children:i.jsx(Sy.Provider,{value:{variant:t,size:n},children:r})}));Ey.displayName=by.displayName;const Ny=m.forwardRef(({className:e,children:t,variant:n,size:r,...o},s)=>{const a=m.useContext(Sy);return i.jsx(wy,{ref:s,className:j(Cy({variant:a.variant||n,size:a.size||r}),"rounded-none first:rounded-s-md last:rounded-e-md",(a.variant==="outline"||n==="outline")&&"-mr-px",e),...o,children:t})});Ny.displayName=wy.displayName;const _y=m.forwardRef(({className:e,variant:t,size:n,children:r,onChange:o,...s},a)=>i.jsx(Ey,{ref:a,className:j(e),variant:t,size:n,onValueChange:o,...s,children:r}));_y.displayName="ToggleGroup";const jy=m.forwardRef(({className:e,variant:t,size:n,children:r,...o},s)=>i.jsx(Ny,{ref:s,className:j(e),variant:t,size:n,...o,children:r}));jy.displayName="ToggleGroupItem";const Mp=C.forwardRef(({className:e,underline:t=!0,asChild:n=!1,children:r,...o},s)=>{const a=n?Cc:"a",l=!n&&o.href==null&&o.onClick!=null,c=u=>{o.onKeyDown?.(u),l&&(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),u.currentTarget.click())};return i.jsx(a,{ref:s,className:j("text-sm font-normal leading-5 text-primary transition-colors hover:text-primary/80 cursor-pointer",t&&"underline decoration-solid [text-decoration-skip-ink:none] [text-underline-position:from-font]",e),...o,...l&&{role:"link",tabIndex:o.tabIndex??0,onKeyDown:c},children:r})});Mp.displayName="Link";const ky=({children:e,...t})=>i.jsx(Ac,{...t,children:e});ky.displayName="Popover";const Ry=m.forwardRef(({className:e,children:t,...n},r)=>i.jsx(Pc,{ref:r,className:j(e),...n,children:t}));Ry.displayName="PopoverTrigger";const My=m.forwardRef(({className:e,children:t,...n},r)=>i.jsx(ii,{ref:r,className:j(e),...n,children:t}));My.displayName="PopoverContent";const $R=_j;function Ln({className:e,...t}){return i.jsx("div",{"data-slot":"skeleton",className:j("bg-muted animate-pulse rounded-md",e),...t})}var VR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],BR=VR.reduce((e,t)=>{const n=ei(`Primitive.${t}`),r=m.forwardRef((o,s)=>{const{asChild:a,...l}=o,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(c,{...l,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),zR="Separator",Sg="horizontal",WR=["horizontal","vertical"],Dy=m.forwardRef((e,t)=>{const{decorative:n,orientation:r=Sg,...o}=e,s=HR(r)?r:Sg,l=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return i.jsx(BR.div,{"data-orientation":s,...l,...o,ref:t})});Dy.displayName=zR;function HR(e){return WR.includes(e)}var GR=Dy;function Nr({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return i.jsx(GR,{"data-slot":"separator",decorative:n,orientation:t,className:j("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px",e),...r})}const UR=Ge("shrink-0 bg-border",{variants:{orientation:{horizontal:"",vertical:""},spacing:{none:"",xs:"",sm:"",md:"",lg:"",xl:""}},compoundVariants:[{orientation:"horizontal",spacing:"xs",class:"my-1"},{orientation:"horizontal",spacing:"sm",class:"my-2"},{orientation:"horizontal",spacing:"md",class:"my-4"},{orientation:"horizontal",spacing:"lg",class:"my-6"},{orientation:"horizontal",spacing:"xl",class:"my-8"},{orientation:"vertical",spacing:"xs",class:"mx-1"},{orientation:"vertical",spacing:"sm",class:"mx-2"},{orientation:"vertical",spacing:"md",class:"mx-4"},{orientation:"vertical",spacing:"lg",class:"mx-6"},{orientation:"vertical",spacing:"xl",class:"mx-8"}],defaultVariants:{orientation:"horizontal",spacing:"none"}}),Pa=({className:e,orientation:t,spacing:n,...r})=>i.jsx(Nr,{orientation:t,className:j(UR({orientation:t,spacing:n}),e),...r});Pa.displayName="Separator";const YR=Ge("animate-spin",{variants:{size:{xs:"",sm:"",md:"",lg:"",xl:""}},defaultVariants:{size:"md"}}),Ay=C.forwardRef(({size:e="md",weight:t="light",color:n,className:r,mirrored:o=!1,label:s,"aria-label":a,...l},c)=>i.jsx(X,{ref:c,name:"CircleNotch",size:e,weight:t,color:n,label:s,"aria-label":a,className:j(YR({size:e}),o&&"scale-x-[-1]",r),...l}));Ay.displayName="Loading";const Dp=C.forwardRef(({className:e,children:t,as:n="h1",...r},o)=>i.jsx(n,{ref:o,className:j("app-page-title","text-3xl font-semibold leading-[140%]",e),...r,children:t}));Dp.displayName="PageTitle";const fi=m.forwardRef(({className:e,type:t,...n},r)=>i.jsx("input",{type:t,ref:r,"data-slot":"input",className:j("font-normal file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-input px-3 py-1 text-base transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-normal disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n}));fi.displayName="Input";const Eg=(e,t)=>{const n=UC(e,30,"...",19,10);return t?n.split("").map(()=>"*").join(""):n},KR=({protect:e=!0,text:t="Default Text",className:n})=>{const[r,o]=C.useState(Eg(t,e));return C.useEffect(()=>{o(Eg(t,e))},[e,t]),i.jsx(fi,{disabled:!0,value:r,className:j("min-w-[260px] bg-transparent border-none text-foreground leading-[1.5] shadow-none px-0",n),readOnly:!0})};function ZR(e,t=[]){let n=[];function r(s,a){const l=m.createContext(a);l.displayName=s+"Context";const c=n.length;n=[...n,a];const u=d=>{const{scope:p,children:h,...g}=d,x=p?.[e]?.[c]||l,v=m.useMemo(()=>g,Object.values(g));return i.jsx(x.Provider,{value:v,children:h})};u.displayName=s+"Provider";function f(d,p){const h=p?.[e]?.[c]||l,g=m.useContext(h);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const o=()=>{const s=n.map(a=>m.createContext(a));return function(l){const c=l?.[e]||s;return m.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[r,qR(o,...t)]}function qR(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var XR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Py=XR.reduce((e,t)=>{const n=ei(`Primitive.${t}`),r=m.forwardRef((o,s)=>{const{asChild:a,...l}=o,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(c,{...l,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Ap="Progress",Pp=100,[JR]=ZR(Ap),[QR,eM]=JR(Ap),Ty=m.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:s=tM,...a}=e;(o||o===0)&&!Ng(o)&&console.error(nM(`${o}`,"Progress"));const l=Ng(o)?o:Pp;r!==null&&!_g(r,l)&&console.error(rM(`${r}`,"Progress"));const c=_g(r,l)?r:null,u=Pl(c)?s(c,l):void 0;return i.jsx(QR,{scope:n,value:c,max:l,children:i.jsx(Py.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Pl(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":Iy(c,l),"data-value":c??void 0,"data-max":l,...a,ref:t})})});Ty.displayName=Ap;var Oy="ProgressIndicator",Ly=m.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=eM(Oy,n);return i.jsx(Py.div,{"data-state":Iy(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Ly.displayName=Oy;function tM(e,t){return`${Math.round(e/t*100)}%`}function Iy(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Pl(e){return typeof e=="number"}function Ng(e){return Pl(e)&&!isNaN(e)&&e>0}function _g(e,t){return Pl(e)&&!isNaN(e)&&e<=t&&e>=0}function nM(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Pp}\`.`}function rM(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
42
42
|
- a positive number
|
|
43
|
-
- less than the value passed to \`max\` (or ${
|
|
43
|
+
- less than the value passed to \`max\` (or ${Pp} if no \`max\` prop is set)
|
|
44
44
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
45
45
|
|
|
46
|
-
Defaulting to \`null\`.`}var Iy=Ty,tM=Oy;const Fy=g.forwardRef(({className:e,value:t,...n},r)=>i.jsx(Iy,{ref:r,"data-slot":"progress",className:j("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:i.jsx(tM,{"data-slot":"progress-indicator",className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Fy.displayName=Iy.displayName;const Pp=({value:e,...t})=>i.jsx(Fy,{value:e,...t});Pp.displayName="Progress";function zn(){const[e,t]=C.useState(()=>typeof document<"u"&&document.documentElement.classList.contains("dark"));return C.useEffect(()=>{if(typeof document>"u")return;const n=document.documentElement,r=()=>t(n.classList.contains("dark"));r();const o=new MutationObserver(r);return o.observe(n,{attributes:!0,attributeFilter:["class"]}),()=>o.disconnect()},[]),e}function $y({lightSrc:e,darkSrc:t,className:n,...r}){const o=zn();return i.jsx("img",{src:o?t:e,className:n,...r})}function nM(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 rM=e=>{switch(e){case"success":return aM;case"info":return lM;case"warning":return iM;case"error":return cM;default:return null}},oM=Array(12).fill(0),sM=({visible:e,className:t})=>C.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},C.createElement("div",{className:"sonner-spinner"},oM.map((n,r)=>C.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),aM=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),iM=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},C.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"})),lM=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),cM=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),uM=C.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"},C.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),C.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),dM=()=>{const[e,t]=C.useState(document.hidden);return C.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let _d=1,fM=class{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,...o}=t,s=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:_d++,a=this.toasts.find(c=>c.id===s),l=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),a?this.toasts=this.toasts.map(c=>c.id===s?(this.publish({...c,...t,id:s,title:r}),{...c,...t,id:s,dismissible:l,title:r}):c):this.addToast({title:r,...o,dismissible:l,id:s}),s},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 o=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,a;const l=o.then(async u=>{if(a=["resolve",u],C.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(hM(u)&&!u.ok){s=!1;const d=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,m=typeof d=="object"&&!C.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:p,...m})}else if(u instanceof Error){s=!1;const d=typeof n.error=="function"?await n.error(u):n.error,p=typeof n.description=="function"?await n.description(u):n.description,m=typeof d=="object"&&!C.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:p,...m})}else if(n.success!==void 0){s=!1;const d=typeof n.success=="function"?await n.success(u):n.success,p=typeof n.description=="function"?await n.description(u):n.description,m=typeof d=="object"&&!C.isValidElement(d)?d:{message:d};this.create({id:r,type:"success",description:p,...m})}}).catch(async u=>{if(a=["reject",u],n.error!==void 0){s=!1;const f=typeof n.error=="function"?await n.error(u):n.error,d=typeof n.description=="function"?await n.description(u):n.description,h=typeof f=="object"&&!C.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:d,...h})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((u,f)=>l.then(()=>a[0]==="reject"?f(a[1]):u(a[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=n?.id||_d++;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 It=new fM,pM=(e,t)=>{const n=t?.id||_d++;return It.addToast({title:e,...t,id:n}),n},hM=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",gM=pM,mM=()=>It.toasts,xM=()=>It.getActiveToasts(),Kn=Object.assign(gM,{success:It.success,info:It.info,warning:It.warning,error:It.error,custom:It.custom,message:It.message,promise:It.promise,dismiss:It.dismiss,loading:It.loading},{getHistory:mM,getToasts:xM});nM("[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 Li(e){return e.label!==void 0}const vM=3,yM="24px",bM="16px",jm=4e3,wM=356,CM=14,SM=45,EM=200;function kn(...e){return e.filter(Boolean).join(" ")}function NM(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const _M=e=>{var t,n,r,o,s,a,l,c,u;const{invert:f,toast:d,unstyled:p,interacting:h,setHeights:m,visibleToasts:x,heights:v,index:y,toasts:b,expanded:S,removeToast:w,defaultRichColors:E,closeButton:N,style:_,cancelButtonStyle:k,actionButtonStyle:I,className:F="",descriptionClassName:U="",duration:O,position:R,gap:L,expandByDefault:V,classNames:D,icons:$,closeButtonAriaLabel:z="Close toast"}=e,[P,M]=C.useState(null),[G,A]=C.useState(null),[W,H]=C.useState(!1),[T,B]=C.useState(!1),[Y,Z]=C.useState(!1),[q,oe]=C.useState(!1),[ne,le]=C.useState(!1),[Ee,re]=C.useState(0),[ce,K]=C.useState(0),Q=C.useRef(d.duration||O||jm),ae=C.useRef(null),J=C.useRef(null),be=y===0,me=y+1<=x,fe=d.type,Pe=d.dismissible!==!1,Te=d.className||"",We=d.descriptionClassName||"",nt=C.useMemo(()=>v.findIndex(ee=>ee.toastId===d.id)||0,[v,d.id]),dt=C.useMemo(()=>{var ee;return(ee=d.closeButton)!=null?ee:N},[d.closeButton,N]),fn=C.useMemo(()=>d.duration||O||jm,[d.duration,O]),Ot=C.useRef(0),Nt=C.useRef(0),je=C.useRef(0),Me=C.useRef(null),[Ue,Lt]=R.split("-"),Gt=C.useMemo(()=>v.reduce((ee,rt,ft)=>ft>=nt?ee:ee+rt.height,0),[v,nt]),Ir=dM(),_o=d.invert||f,Hn=fe==="loading";Nt.current=C.useMemo(()=>nt*L+Gt,[nt,Gt]),C.useEffect(()=>{Q.current=fn},[fn]),C.useEffect(()=>{H(!0)},[]),C.useEffect(()=>{const ee=J.current;if(ee){const rt=ee.getBoundingClientRect().height;return K(rt),m(ft=>[{toastId:d.id,height:rt,position:d.position},...ft]),()=>m(ft=>ft.filter(_t=>_t.toastId!==d.id))}},[m,d.id]),C.useLayoutEffect(()=>{if(!W)return;const ee=J.current,rt=ee.style.height;ee.style.height="auto";const ft=ee.getBoundingClientRect().height;ee.style.height=rt,K(ft),m(_t=>_t.find(Xe=>Xe.toastId===d.id)?_t.map(Xe=>Xe.toastId===d.id?{...Xe,height:ft}:Xe):[{toastId:d.id,height:ft,position:d.position},..._t])},[W,d.title,d.description,m,d.id,d.jsx,d.action,d.cancel]);const pe=C.useCallback(()=>{B(!0),re(Nt.current),m(ee=>ee.filter(rt=>rt.toastId!==d.id)),setTimeout(()=>{w(d)},EM)},[d,w,m,Nt]);C.useEffect(()=>{if(d.promise&&fe==="loading"||d.duration===1/0||d.type==="loading")return;let ee;return S||h||Ir?(()=>{if(je.current<Ot.current){const _t=new Date().getTime()-Ot.current;Q.current=Q.current-_t}je.current=new Date().getTime()})():Q.current!==1/0&&(Ot.current=new Date().getTime(),ee=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),pe()},Q.current)),()=>clearTimeout(ee)},[S,h,d,fe,Ir,pe]),C.useEffect(()=>{d.delete&&(pe(),d.onDismiss==null||d.onDismiss.call(d,d))},[pe,d.delete]);function _e(){var ee;if($?.loading){var rt;return C.createElement("div",{className:kn(D?.loader,d==null||(rt=d.classNames)==null?void 0:rt.loader,"sonner-loader"),"data-visible":fe==="loading"},$.loading)}return C.createElement(sM,{className:kn(D?.loader,d==null||(ee=d.classNames)==null?void 0:ee.loader),visible:fe==="loading"})}const xe=d.icon||$?.[fe]||rM(fe);var ke,mt;return C.createElement("li",{tabIndex:0,ref:J,className:kn(F,Te,D?.toast,d==null||(t=d.classNames)==null?void 0:t.toast,D?.default,D?.[fe],d==null||(n=d.classNames)==null?void 0:n[fe]),"data-sonner-toast":"","data-rich-colors":(ke=d.richColors)!=null?ke:E,"data-styled":!(d.jsx||d.unstyled||p),"data-mounted":W,"data-promise":!!d.promise,"data-swiped":ne,"data-removed":T,"data-visible":me,"data-y-position":Ue,"data-x-position":Lt,"data-index":y,"data-front":be,"data-swiping":Y,"data-dismissible":Pe,"data-type":fe,"data-invert":_o,"data-swipe-out":q,"data-swipe-direction":G,"data-expanded":!!(S||V&&W),"data-testid":d.testId,style:{"--index":y,"--toasts-before":y,"--z-index":b.length-y,"--offset":`${T?Ee:Nt.current}px`,"--initial-height":V?"auto":`${ce}px`,..._,...d.style},onDragEnd:()=>{Z(!1),M(null),Me.current=null},onPointerDown:ee=>{ee.button!==2&&(Hn||!Pe||(ae.current=new Date,re(Nt.current),ee.target.setPointerCapture(ee.pointerId),ee.target.tagName!=="BUTTON"&&(Z(!0),Me.current={x:ee.clientX,y:ee.clientY})))},onPointerUp:()=>{var ee,rt,ft;if(q||!Pe)return;Me.current=null;const _t=Number(((ee=J.current)==null?void 0:ee.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),lr=Number(((rt=J.current)==null?void 0:rt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Xe=new Date().getTime()-((ft=ae.current)==null?void 0:ft.getTime()),en=P==="x"?_t:lr,_i=Math.abs(en)/Xe;if(Math.abs(en)>=SM||_i>.11){re(Nt.current),d.onDismiss==null||d.onDismiss.call(d,d),A(P==="x"?_t>0?"right":"left":lr>0?"down":"up"),pe(),oe(!0);return}else{var pn,hn;(pn=J.current)==null||pn.style.setProperty("--swipe-amount-x","0px"),(hn=J.current)==null||hn.style.setProperty("--swipe-amount-y","0px")}le(!1),Z(!1),M(null)},onPointerMove:ee=>{var rt,ft,_t;if(!Me.current||!Pe||((rt=window.getSelection())==null?void 0:rt.toString().length)>0)return;const Xe=ee.clientY-Me.current.y,en=ee.clientX-Me.current.x;var _i;const pn=(_i=e.swipeDirections)!=null?_i:NM(R);!P&&(Math.abs(en)>1||Math.abs(Xe)>1)&&M(Math.abs(en)>Math.abs(Xe)?"x":"y");let hn={x:0,y:0};const Sg=Fr=>1/(1.5+Math.abs(Fr)/20);if(P==="y"){if(pn.includes("top")||pn.includes("bottom"))if(pn.includes("top")&&Xe<0||pn.includes("bottom")&&Xe>0)hn.y=Xe;else{const Fr=Xe*Sg(Xe);hn.y=Math.abs(Fr)<Math.abs(Xe)?Fr:Xe}}else if(P==="x"&&(pn.includes("left")||pn.includes("right")))if(pn.includes("left")&&en<0||pn.includes("right")&&en>0)hn.x=en;else{const Fr=en*Sg(en);hn.x=Math.abs(Fr)<Math.abs(en)?Fr:en}(Math.abs(hn.x)>0||Math.abs(hn.y)>0)&&le(!0),(ft=J.current)==null||ft.style.setProperty("--swipe-amount-x",`${hn.x}px`),(_t=J.current)==null||_t.style.setProperty("--swipe-amount-y",`${hn.y}px`)}},dt&&!d.jsx&&fe!=="loading"?C.createElement("button",{"aria-label":z,"data-disabled":Hn,"data-close-button":!0,onClick:Hn||!Pe?()=>{}:()=>{pe(),d.onDismiss==null||d.onDismiss.call(d,d)},className:kn(D?.closeButton,d==null||(r=d.classNames)==null?void 0:r.closeButton)},(mt=$?.close)!=null?mt:uM):null,(fe||d.icon||d.promise)&&d.icon!==null&&($?.[fe]!==null||d.icon)?C.createElement("div",{"data-icon":"",className:kn(D?.icon,d==null||(o=d.classNames)==null?void 0:o.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||_e():null,d.type!=="loading"?xe:null):null,C.createElement("div",{"data-content":"",className:kn(D?.content,d==null||(s=d.classNames)==null?void 0:s.content)},C.createElement("div",{"data-title":"",className:kn(D?.title,d==null||(a=d.classNames)==null?void 0:a.title)},d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title),d.description?C.createElement("div",{"data-description":"",className:kn(U,We,D?.description,d==null||(l=d.classNames)==null?void 0:l.description)},typeof d.description=="function"?d.description():d.description):null),C.isValidElement(d.cancel)?d.cancel:d.cancel&&Li(d.cancel)?C.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||k,onClick:ee=>{Li(d.cancel)&&Pe&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,ee),pe())},className:kn(D?.cancelButton,d==null||(c=d.classNames)==null?void 0:c.cancelButton)},d.cancel.label):null,C.isValidElement(d.action)?d.action:d.action&&Li(d.action)?C.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||I,onClick:ee=>{Li(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,ee),!ee.defaultPrevented&&pe())},className:kn(D?.actionButton,d==null||(u=d.classNames)==null?void 0:u.actionButton)},d.action.label):null)};function km(){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 jM(e,t){const n={};return[e,t].forEach((r,o)=>{const s=o===1,a=s?"--mobile-offset":"--offset",l=s?bM:yM;function c(u){["top","right","bottom","left"].forEach(f=>{n[`${a}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${a}-${u}`]=l:n[`${a}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(l)}),n}const kM=C.forwardRef(function(t,n){const{id:r,invert:o,position:s="bottom-right",hotkey:a=["altKey","KeyT"],expand:l,closeButton:c,className:u,offset:f,mobileOffset:d,theme:p="light",richColors:h,duration:m,style:x,visibleToasts:v=vM,toastOptions:y,dir:b=km(),gap:S=CM,icons:w,containerAriaLabel:E="Notifications"}=t,[N,_]=C.useState([]),k=C.useMemo(()=>r?N.filter(W=>W.toasterId===r):N.filter(W=>!W.toasterId),[N,r]),I=C.useMemo(()=>Array.from(new Set([s].concat(k.filter(W=>W.position).map(W=>W.position)))),[k,s]),[F,U]=C.useState([]),[O,R]=C.useState(!1),[L,V]=C.useState(!1),[D,$]=C.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),z=C.useRef(null),P=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),M=C.useRef(null),G=C.useRef(!1),A=C.useCallback(W=>{_(H=>{var T;return(T=H.find(B=>B.id===W.id))!=null&&T.delete||It.dismiss(W.id),H.filter(({id:B})=>B!==W.id)})},[]);return C.useEffect(()=>It.subscribe(W=>{if(W.dismiss){requestAnimationFrame(()=>{_(H=>H.map(T=>T.id===W.id?{...T,delete:!0}:T))});return}setTimeout(()=>{ho.flushSync(()=>{_(H=>{const T=H.findIndex(B=>B.id===W.id);return T!==-1?[...H.slice(0,T),{...H[T],...W},...H.slice(T+1)]:[W,...H]})})})}),[N]),C.useEffect(()=>{if(p!=="system"){$(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?$("dark"):$("light")),typeof window>"u")return;const W=window.matchMedia("(prefers-color-scheme: dark)");try{W.addEventListener("change",({matches:H})=>{$(H?"dark":"light")})}catch{W.addListener(({matches:T})=>{try{$(T?"dark":"light")}catch(B){console.error(B)}})}},[p]),C.useEffect(()=>{N.length<=1&&R(!1)},[N]),C.useEffect(()=>{const W=H=>{var T;if(a.every(Z=>H[Z]||H.code===Z)){var Y;R(!0),(Y=z.current)==null||Y.focus()}H.code==="Escape"&&(document.activeElement===z.current||(T=z.current)!=null&&T.contains(document.activeElement))&&R(!1)};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[a]),C.useEffect(()=>{if(z.current)return()=>{M.current&&(M.current.focus({preventScroll:!0}),M.current=null,G.current=!1)}},[z.current]),C.createElement("section",{ref:n,"aria-label":`${E} ${P}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},I.map((W,H)=>{var T;const[B,Y]=W.split("-");return k.length?C.createElement("ol",{key:W,dir:b==="auto"?km():b,tabIndex:-1,ref:z,className:u,"data-sonner-toaster":!0,"data-sonner-theme":D,"data-y-position":B,"data-x-position":Y,style:{"--front-toast-height":`${((T=F[0])==null?void 0:T.height)||0}px`,"--width":`${wM}px`,"--gap":`${S}px`,...x,...jM(f,d)},onBlur:Z=>{G.current&&!Z.currentTarget.contains(Z.relatedTarget)&&(G.current=!1,M.current&&(M.current.focus({preventScroll:!0}),M.current=null))},onFocus:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||G.current||(G.current=!0,M.current=Z.relatedTarget)},onMouseEnter:()=>R(!0),onMouseMove:()=>R(!0),onMouseLeave:()=>{L||R(!1)},onDragEnd:()=>R(!1),onPointerDown:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||V(!0)},onPointerUp:()=>V(!1)},k.filter(Z=>!Z.position&&H===0||Z.position===W).map((Z,q)=>{var oe,ne;return C.createElement(_M,{key:Z.id,icons:w,index:q,toast:Z,defaultRichColors:h,duration:(oe=y?.duration)!=null?oe:m,className:y?.className,descriptionClassName:y?.descriptionClassName,invert:o,visibleToasts:v,closeButton:(ne=y?.closeButton)!=null?ne:c,interacting:L,position:W,style:y?.style,unstyled:y?.unstyled,classNames:y?.classNames,cancelButtonStyle:y?.cancelButtonStyle,actionButtonStyle:y?.actionButtonStyle,closeButtonAriaLabel:y?.closeButtonAriaLabel,removeToast:A,toasts:k.filter(le=>le.position==Z.position),heights:F.filter(le=>le.position==Z.position),setHeights:U,expandByDefault:l,gap:S,expanded:O,swipeDirections:t.swipeDirections})})):null}))}),RM=({position:e="bottom-center",...t})=>i.jsx(kM,{className:"toaster group",position:e,toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-card group-[.toaster]:text-card-foreground group-[.toaster]:border group-[.toaster]:border-border group-[.toaster]:shadow-lg",content:"w-full",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"},style:{minWidth:"300px",maxWidth:"420px"}},...t});function MM({...e}){return i.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}function DM({className:e,...t}){return i.jsx("ol",{"data-slot":"breadcrumb-list",className:j("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",e),...t})}function Rm({className:e,...t}){return i.jsx("li",{"data-slot":"breadcrumb-item",className:j("inline-flex items-center gap-1.5",e),...t})}function AM({asChild:e,className:t,...n}){const r=e?Cc:"a";return i.jsx(r,{"data-slot":"breadcrumb-link",className:j("hover:text-foreground transition-colors",t),...n})}function TM({className:e,...t}){return i.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:j("text-foreground font-normal",e),...t})}function PM({children:e,className:t,...n}){return i.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:j("[&>svg]:size-3.5",t),...n,children:e??i.jsx(X,{name:"CaretRight",className:"size-3.5"})})}function OM({className:e,...t}){return i.jsxs("span",{"data-slot":"breadcrumb-ellipsis",role:"presentation","aria-hidden":"true",className:j("flex size-9 items-center justify-center",e),...t,children:[i.jsx(X,{name:"DotsThree",className:"size-4"}),i.jsx("span",{className:"sr-only",children:"More"})]})}const Vy=C.forwardRef(({items:e,separator:t,maxItems:n=0,className:r},o)=>{const s=n>0&&e.length>n,a=s?[e[0],null,...e.slice(-(n-2))]:e,l=s?e.slice(1,e.length-(n-2)):[],u=(m=>{for(let x=m.length-1;x>=0;x--)if(m[x])return x;return-1})(a),f=()=>i.jsx(PM,{children:t}),d=m=>i.jsxs(Cd,{children:[i.jsxs(Sd,{className:"flex items-center gap-1 text-sm text-muted-foreground hover:text-neutral-700 transition-colors",children:[m.label,i.jsx(X,{name:"CaretDown",className:"size-4"})]}),i.jsx(Ed,{children:m.dropdown?.map((x,v)=>i.jsx(Nd,{asChild:!0,children:i.jsx("a",{href:x.href,children:x.label})},v))})]}),p=(m,x)=>x?i.jsx(TM,{children:m.label}):i.jsx(AM,{href:m.href,children:m.label}),h=()=>i.jsxs(i.Fragment,{children:[i.jsx(Rm,{children:i.jsxs(Cd,{children:[i.jsx(Sd,{children:i.jsx(OM,{})}),i.jsx(Ed,{children:l.map((m,x)=>i.jsx(Nd,{asChild:!0,children:i.jsx("a",{href:m.href,children:m.label})},x))})]})}),f()]});return i.jsx(MM,{ref:o,className:r,children:i.jsx(DM,{children:a.map((m,x)=>{if(m===null&&l.length>0)return i.jsx(C.Fragment,{children:h()},x);if(!m)return null;const v=x===u;return i.jsxs(C.Fragment,{children:[i.jsx(Rm,{children:m.dropdown?d(m):p(m,v)}),x<a.length-1&&m&&f()]},x)})})})});Vy.displayName="Breadcrumb";const By=({className:e,...t})=>i.jsx("nav",{role:"navigation","aria-label":"pagination",className:j("mx-auto flex w-full justify-center",e),...t});By.displayName="Pagination";const Op=g.forwardRef(({className:e,...t},n)=>i.jsx("ul",{ref:n,className:j("flex flex-row items-center gap-1",e),...t}));Op.displayName="PaginationContent";const ro=g.forwardRef(({className:e,...t},n)=>i.jsx("li",{ref:n,className:j("",e),...t}));ro.displayName="PaginationItem";const us=({className:e,isActive:t,size:n="icon",...r})=>{const o=r.href==null&&r.onClick!=null,s=r["aria-disabled"]===!0,a=l=>{r.onKeyDown?.(l),!(!o||s)&&(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),l.currentTarget.click())};return i.jsx("a",{"aria-current":t?"page":void 0,className:j(es({variant:t?"outline":"ghost",size:n}),o&&!s&&"cursor-pointer",e),...r,...o&&{role:"link",tabIndex:s?-1:r.tabIndex??0,onKeyDown:a}})};us.displayName="PaginationLink";const Lp=({className:e,size:t="default",label:n="Previous",ariaLabel:r="Go to previous page",...o})=>i.jsxs(us,{"aria-label":r,size:t,className:j("gap-1 ps-2.5 pe-4",e),...o,children:[i.jsx(X,{name:"CaretLeft",size:"sm"}),i.jsx("span",{children:n})]});Lp.displayName="PaginationPrevious";const Ip=({className:e,size:t="default",label:n="Next",ariaLabel:r="Go to next page",...o})=>i.jsxs(us,{"aria-label":r,size:t,className:j("gap-1 ps-4 pe-2.5",e),...o,children:[i.jsx("span",{children:n}),i.jsx(X,{name:"CaretRight",size:"sm"})]});Ip.displayName="PaginationNext";const Fp=({className:e,srLabel:t="More pages",...n})=>i.jsxs("span",{"aria-hidden":!0,className:j("flex size-9 items-center justify-center",e),...n,children:[i.jsx(X,{name:"DotsThree",className:"size-4"}),i.jsx("span",{className:"sr-only",children:t})]});Fp.displayName="PaginationEllipsis";const LM=(e,t,n)=>{if(t<=n)return Array.from({length:t},(l,c)=>c+1);const r=Math.max(e-1,1),o=Math.min(e+1,t),s=r>2,a=o<t-1;return!s&&a?[...Array.from({length:Math.min(3,t)},(c,u)=>u+1),"ellipsis",t]:s&&!a?[1,"ellipsis",...Array.from({length:3},(c,u)=>Math.max(t-2,1)+u).filter(c=>c<=t)]:s&&a?[1,"ellipsis",e,"ellipsis",t]:Array.from({length:t},(l,c)=>c+1)},IM=({currentPage:e,totalPages:t,maxVisiblePages:n,onPageClick:r,morePagesLabel:o})=>{if(!t)return i.jsx(ro,{children:i.jsx(us,{isActive:!0,children:e})});const s=(l,c)=>{l.preventDefault(),c!==e&&r?.(c)},a=LM(e,t,n);return i.jsx(i.Fragment,{children:a.map((l,c)=>l==="ellipsis"?i.jsx(ro,{children:i.jsx(Fp,{srLabel:o})},`ellipsis-${c}`):i.jsx(ro,{children:i.jsx(us,{onClick:u=>s(u,l),isActive:l===e,children:l})},l))})},zy={previous:"Previous",next:"Next",morePages:"More pages",goToPreviousPage:"Go to previous page",goToNextPage:"Go to next page"},FM={previous:"Anterior",next:"Siguiente",morePages:"Más páginas",goToPreviousPage:"Ir a página anterior",goToNextPage:"Ir a página siguiente"},$M={previous:"前へ",next:"次へ",morePages:"その他のページ",goToPreviousPage:"前のページへ",goToNextPage:"次のページへ"},VM={previous:"السابق",next:"التالي",morePages:"صفحات أخرى",goToPreviousPage:"انتقل إلى الصفحة السابقة",goToNextPage:"انتقل إلى الصفحة التالية"},BM={previous:"Précédent",next:"Suivant",morePages:"Plus de pages",goToPreviousPage:"Aller à la page précédente",goToNextPage:"Aller à la page suivante"},zM={previous:"Anterior",next:"Próximo",morePages:"Mais páginas",goToPreviousPage:"Ir para página anterior",goToNextPage:"Ir para próxima página"},WM={previous:"Önceki",next:"Sonraki",morePages:"Daha fazla sayfa",goToPreviousPage:"Önceki sayfaya git",goToNextPage:"Sonraki sayfaya git"},HM={previous:"Назад",next:"Вперёд",morePages:"Ещё страницы",goToPreviousPage:"Перейти на предыдущую страницу",goToNextPage:"Перейти на следующую страницу"},GM={previous:"Zurück",next:"Weiter",morePages:"Weitere Seiten",goToPreviousPage:"Zur vorherigen Seite",goToNextPage:"Zur nächsten Seite"},UM={previous:"上一页",next:"下一页",morePages:"更多页面",goToPreviousPage:"转到上一页",goToNextPage:"转到下一页"},YM={en:zy,es:FM,ja:$M,ar:VM,fr:BM,pt:zM,tr:WM,ru:HM,de:GM,zh:UM},KM=zy;function ZM(e){const t=e??Za();return YM[t]??KM}const Mm="pointer-events-none opacity-50",$p=C.forwardRef(({currentPage:e,totalPages:t,onPageClick:n,onClickNext:r,onClickPrev:o,disablePrevious:s=!1,disableNext:a=!1,showPreviousNext:l=!0,maxVisiblePages:c=5,lang:u,translations:f,actionName:d,className:p,...h},m)=>{const x=C.useMemo(()=>({...ZM(u),...f}),[u,f]),v=e===1||s,y=(t?e>=t:!1)||a,b=w=>{w.preventDefault(),!v&&o?.()},S=w=>{w.preventDefault(),!y&&r?.()};return i.jsx(By,{ref:m,className:p,"data-action-name":d,...h,children:i.jsxs(Op,{children:[l&&i.jsx(ro,{children:i.jsx(Lp,{onClick:b,"aria-disabled":v,className:v?Mm:"",label:x.previous,ariaLabel:x.goToPreviousPage})}),i.jsx(IM,{currentPage:e,totalPages:t,maxVisiblePages:c,onPageClick:n,morePagesLabel:x.morePages}),l&&i.jsx(ro,{children:i.jsx(Ip,{onClick:S,"aria-disabled":y,className:y?Mm:"",label:x.next,ariaLabel:x.goToNextPage})})]})})});$p.displayName="Pagination";const Vp=g.forwardRef(({className:e,title:t,titleId:n,onClose:r,onBack:o,otherActions:s,showCloseButton:a=!0,...l},c)=>i.jsxs("div",{ref:c,className:j("app-dialog-header","flex items-center justify-between p-6 border-b border-border",e),...l,children:[i.jsxs("div",{className:"flex items-center gap-4 flex-1",children:[o&&i.jsx("button",{onClick:o,className:j("inline-flex items-center justify-center size-6 rounded-sm opacity-70 hover:opacity-100 transition-opacity"),"aria-label":"Go back","data-testid":"dialog-back-button",children:i.jsx(X,{name:"ArrowLeft",className:"size-4"})}),t&&i.jsx("div",{id:n,className:j("text-lg font-semibold leading-none tracking-tight"),children:t})]}),i.jsxs("div",{className:"flex items-center gap-4",children:[s,a&&r&&i.jsx("button",{onClick:r,className:j("inline-flex items-center justify-center size-6 rounded-sm opacity-70 hover:opacity-100 transition-opacity"),"aria-label":"Close dialog","data-testid":"dialog-close-button",children:i.jsx(X,{name:"X",className:"size-4"})})]})]}));Vp.displayName="DialogHeader";const Bp=g.forwardRef(({className:e,children:t,...n},r)=>i.jsx("div",{ref:r,className:j("app-dialog-content","flex-1 overflow-auto p-6 text-muted-foreground",e),...n,children:t}));Bp.displayName="DialogContent";const zp=g.forwardRef(({className:e,buttons:t=[],...n},r)=>t.length===0?null:i.jsx("div",{ref:r,className:j("app-dialog-footer","flex items-center justify-end gap-3 p-6 border-t border-border",e),...n,children:t.map((o,s)=>i.jsx(ot,{...o},o.key||s))}));zp.displayName="DialogFooter";const $c=g.forwardRef(({children:e,current:t=!1,badge:n,disabled:r=!1,className:o,onClick:s,...a},l)=>{const c=a.href==null,u=r?-1:a.tabIndex??0,f=p=>{if(r){p.preventDefault();return}s?.(p)},d=p=>{a.onKeyDown?.(p),!(!c||r)&&(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),p.currentTarget.click())};return i.jsx("a",{ref:l,...a,className:j("box-border flex items-center justify-center gap-2 px-0 py-1.5 h-12",t&&"border-b-2 border-primary",!t&&"border-b-2 border-transparent",c&&!r&&"cursor-pointer",r&&"pointer-events-none cursor-not-allowed",o),onClick:f,onKeyDown:d,tabIndex:c?u:a.tabIndex,role:a.role??(c?"link":void 0),"aria-current":t?"page":void 0,"aria-disabled":r,children:i.jsxs("div",{className:j("flex items-center justify-center gap-2 px-2.5 py-2 rounded-md",!r&&!t&&"text-muted-foreground",!r&&t&&"text-foreground",r&&"text-muted-foreground opacity-50",!r&&!t&&"hover:bg-accent hover:text-accent-foreground"),children:[i.jsx("span",{className:"text-sm font-normal leading-5 whitespace-nowrap",children:e}),n&&i.jsx(Ze,{variant:"default",className:"min-w-5 h-5 px-1 rounded-full",children:n})]})})});$c.displayName="NavLink";const Wp=g.forwardRef(({tabs:e,defaultTab:t=0,onChange:n,className:r,contentClassName:o,navTabsClassName:s,rightSlot:a,keepMounted:l=!1,variant:c="underline"},u)=>{const[f,d]=g.useState(t),[p,h]=g.useState(()=>new Set([t]));g.useEffect(()=>{l&&h(x=>x.has(f)?x:new Set(x).add(f))},[l,f]),g.useEffect(()=>{d(t)},[t]);const m=(x,v)=>{v.disabled||(d(x),n?.(x,v))};return i.jsxs("div",{ref:u,className:j("flex flex-col",r),children:[i.jsxs("div",{className:"flex items-center justify-between gap-4",children:[i.jsx("nav",{className:j(c==="pill"?"inline-flex h-9 items-center justify-center rounded-md bg-accent p-1 text-muted-foreground":"flex gap-0",s),role:"tablist",children:e.map((x,v)=>{const y=x.id||`tab-${v}`,b=f===v;return c==="pill"?i.jsx("button",{type:"button",disabled:x.disabled,onClick:()=>m(v,x),role:"tab","aria-selected":b,"aria-controls":`tabpanel-${y}`,id:`tab-${y}`,"data-action-name":x.actionName,className:j("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-sm px-3 py-1 text-sm font-medium transition-all","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-50",b?"bg-card text-foreground shadow-xs":"text-muted-foreground"),children:x.label},y):i.jsx($c,{current:b,badge:x.badge,disabled:x.disabled,onClick:S=>{S.preventDefault(),m(v,x)},role:"tab","aria-selected":b,"aria-controls":`tabpanel-${y}`,id:`tab-${y}`,"data-action-name":x.actionName,children:x.label},y)})}),a&&i.jsx("div",{className:"shrink-0",children:a})]}),i.jsx("div",{className:j("mt-6",o),children:e.map((x,v)=>{const y=x.id||`tab-${v}`,b=f===v;return i.jsx("div",{role:"tabpanel",id:`tabpanel-${y}`,"aria-labelledby":`tab-${y}`,hidden:!b,className:j(!b&&"hidden"),children:l?p.has(v)&&x.content:b&&x.content},y)})})]})});Wp.displayName="NavTabs";function qM(e){return e==null||e===""}const pi=C.forwardRef(({label:e,value:t,copyable:n=!1,copyValue:r,badge:o=!1,badgeProps:s,orientation:a="vertical",labelWidth:l,emptyState:c="-",truncateValue:u=!1,className:f,...d},p)=>{const[h,m]=C.useState(!1),x=qM(t),v=r??(typeof t=="string"?t:""),y=n&&!x&&v.length>0,b=async()=>{try{await navigator?.clipboard?.writeText?.(v),m(!0),setTimeout(()=>m(!1),1500)}catch{}},S=(()=>{if(x)return i.jsx("span",{className:"text-sm text-muted-foreground",children:c});if(o)return i.jsx(Ze,{variant:"secondary",...s,children:t});const w=i.jsx("span",{className:j("text-sm text-muted-foreground",u&&"block max-w-full truncate"),children:t});return u&&typeof t=="string"?i.jsx(zt,{content:t,children:w}):w})();return i.jsxs("div",{ref:p,"data-testid":"data-item",className:j("flex min-w-0 overflow-hidden",a==="vertical"?"flex-col gap-2":"flex-row items-center gap-2",f),...d,children:[i.jsx("span",{className:"flex items-center gap-1 text-sm font-semibold text-foreground",style:a==="horizontal"&&l!==void 0?{width:ss(l),flexShrink:0}:void 0,children:e}),i.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[S,y&&i.jsx(zt,{content:h?"Copied":"Copy",children:i.jsx("button",{type:"button","data-testid":"data-item-copy","aria-label":"Copy",onClick:b,className:"flex size-6 flex-shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted",children:i.jsx(X,{name:h?"CheckCircle":"CopySimple",size:"sm"})})})]})]})});pi.displayName="DataItem";const ve=e=>typeof e=="string",Hs=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},Dm=e=>e==null?"":""+e,XM=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},JM=/###/g,Am=e=>e&&e.indexOf("###")>-1?e.replace(JM,"."):e,Tm=e=>!e||ve(e),ya=(e,t,n)=>{const r=ve(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(Tm(e))return{};const s=Am(r[o]);!e[s]&&n&&(e[s]=new n),Object.prototype.hasOwnProperty.call(e,s)?e=e[s]:e={},++o}return Tm(e)?{}:{obj:e,k:Am(r[o])}},Pm=(e,t,n)=>{const{obj:r,k:o}=ya(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let s=t[t.length-1],a=t.slice(0,t.length-1),l=ya(e,a,Object);for(;l.obj===void 0&&a.length;)s=`${a[a.length-1]}.${s}`,a=a.slice(0,a.length-1),l=ya(e,a,Object),l&&l.obj&&typeof l.obj[`${l.k}.${s}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${s}`]=n},QM=(e,t,n,r)=>{const{obj:o,k:s}=ya(e,t,Object);o[s]=o[s]||[],o[s].push(n)},Pl=(e,t)=>{const{obj:n,k:r}=ya(e,t);if(n)return n[r]},eD=(e,t,n)=>{const r=Pl(e,n);return r!==void 0?r:Pl(t,n)},Wy=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?ve(e[r])||e[r]instanceof String||ve(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Wy(e[r],t[r],n):e[r]=t[r]);return e},Ao=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var tD={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const nD=e=>ve(e)?e.replace(/[&<>"'\/]/g,t=>tD[t]):e;class rD{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const oD=[" ",",","?","!",";"],sD=new rD(20),aD=(e,t,n)=>{t=t||"",n=n||"";const r=oD.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const o=sD.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let s=!o.test(e);if(!s){const a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(s=!0)}return s},jd=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let s=0;s<r.length;){if(!o||typeof o!="object")return;let a,l="";for(let c=s;c<r.length;++c)if(c!==s&&(l+=n),l+=r[c],a=o[l],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&c<r.length-1)continue;s+=c-s+1;break}o=a}return o},Ol=e=>e&&e.replace("_","-"),iD={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Ll{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||iD,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,o){return o&&!this.debug?null:(ve(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Ll(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Ll(this.logger,t)}}var Pn=new Ll;class Vc{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(a=>{let[l,c]=a;for(let u=0;u<c;u++)l(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[l,c]=a;for(let u=0;u<c;u++)l.apply(l,[t,...r])})}}class Om extends Vc{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,a=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.indexOf(".")>-1?l=t.split("."):(l=[t,n],r&&(Array.isArray(r)?l.push(...r):ve(r)&&s?l.push(...r.split(s)):l.push(r)));const c=Pl(this.data,l);return!c&&!n&&!r&&t.indexOf(".")>-1&&(t=l[0],n=l[1],r=l.slice(2).join(".")),c||!a||!ve(r)?c:jd(this.data&&this.data[t]&&this.data[t][n],r,s)}addResource(t,n,r,o){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let l=[t,n];r&&(l=l.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(l=t.split("."),o=n,n=l[1]),this.addNamespaces(n),Pm(this.data,l,o),s.silent||this.emit("added",t,n,r,o)}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in r)(ve(r[s])||Array.isArray(r[s]))&&this.addResource(t,n,s,r[s],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,s){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[t,n];t.indexOf(".")>-1&&(l=t.split("."),o=r,r=n,n=l[1]),this.addNamespaces(n);let c=Pl(this.data,l)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?Wy(c,r,s):c={...c,...r},Pm(this.data,l,c),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var Hy={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(s=>{this.processors[s]&&(t=this.processors[s].process(t,n,r,o))}),t}};const Lm={};class Il extends Vc{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),XM(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Pn.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let s=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!aD(t,r,o);if(a&&!l){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:ve(s)?[s]:s};const u=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(u[0])>-1)&&(s=u.shift()),t=u.join(o)}return{key:t,namespaces:ve(s)?[s]:s}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:l}=this.extractFromKey(t[t.length-1],n),c=l[l.length-1],u=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(f){const w=n.nsSeparator||this.options.nsSeparator;return o?{res:`${c}${w}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${w}${a}`}return o?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:a}const d=this.resolve(t,n);let p=d&&d.res;const h=d&&d.usedKey||a,m=d&&d.exactUsedKey||a,x=Object.prototype.toString.apply(p),v=["[object Number]","[object Function]","[object RegExp]"],y=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,S=!ve(p)&&typeof p!="boolean"&&typeof p!="number";if(b&&p&&S&&v.indexOf(x)<0&&!(ve(y)&&Array.isArray(p))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const w=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,p,{...n,ns:l}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(d.res=w,d.usedParams=this.getUsedParamsDetails(n),d):w}if(s){const w=Array.isArray(p),E=w?[]:{},N=w?m:h;for(const _ in p)if(Object.prototype.hasOwnProperty.call(p,_)){const k=`${N}${s}${_}`;E[_]=this.translate(k,{...n,joinArrays:!1,ns:l}),E[_]===k&&(E[_]=p[_])}p=E}}else if(b&&ve(y)&&Array.isArray(p))p=p.join(y),p&&(p=this.extendTranslation(p,t,n,r));else{let w=!1,E=!1;const N=n.count!==void 0&&!ve(n.count),_=Il.hasDefaultValue(n),k=N?this.pluralResolver.getSuffix(u,n.count,n):"",I=n.ordinal&&N?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",F=N&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),U=F&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${k}`]||n[`defaultValue${I}`]||n.defaultValue;!this.isValidLookup(p)&&_&&(w=!0,p=U),this.isValidLookup(p)||(E=!0,p=a);const R=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&E?void 0:p,L=_&&U!==p&&this.options.updateMissing;if(E||w||L){if(this.logger.log(L?"updateKey":"missingKey",u,c,a,L?U:p),s){const z=this.resolve(a,{...n,keySeparator:!1});z&&z.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let V=[];const D=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&D&&D[0])for(let z=0;z<D.length;z++)V.push(D[z]);else this.options.saveMissingTo==="all"?V=this.languageUtils.toResolveHierarchy(n.lng||this.language):V.push(n.lng||this.language);const $=(z,P,M)=>{const G=_&&M!==p?M:R;this.options.missingKeyHandler?this.options.missingKeyHandler(z,c,P,G,L,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(z,c,P,G,L,n),this.emit("missingKey",z,c,P,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&N?V.forEach(z=>{const P=this.pluralResolver.getSuffixes(z,n);F&&n[`defaultValue${this.options.pluralSeparator}zero`]&&P.indexOf(`${this.options.pluralSeparator}zero`)<0&&P.push(`${this.options.pluralSeparator}zero`),P.forEach(M=>{$([z],a+M,n[`defaultValue${M}`]||U)})}):$(V,a,U))}p=this.extendTranslation(p,t,n,d,r),E&&p===a&&this.options.appendNamespaceToMissingKey&&(p=`${c}:${a}`),(E||w)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${a}`:a,w?p:void 0):p=this.options.parseMissingKeyHandler(p))}return o?(d.res=p,d.usedParams=this.getUsedParamsDetails(n),d):p}extendTranslation(t,n,r,o,s){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=ve(t)&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(u){const p=t.match(this.interpolator.nestingRegexp);f=p&&p.length}let d=r.replace&&!ve(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),t=this.interpolator.interpolate(t,d,r.lng||this.language||o.usedLng,r),u){const p=t.match(this.interpolator.nestingRegexp),h=p&&p.length;f<h&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var p=arguments.length,h=new Array(p),m=0;m<p;m++)h[m]=arguments[m];return s&&s[0]===h[0]&&!r.context?(a.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${n[0]}`),null):a.translate(...h,n)},r)),r.interpolation&&this.interpolator.reset()}const l=r.postProcess||this.options.postProcess,c=ve(l)?[l]:l;return t!=null&&c&&c.length&&r.applyPostProcessor!==!1&&(t=Hy.handle(c,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,o,s,a,l;return ve(t)&&(t=[t]),t.forEach(c=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(c,n),f=u.key;o=f;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const p=n.count!==void 0&&!ve(n.count),h=p&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),m=n.context!==void 0&&(ve(n.context)||typeof n.context=="number")&&n.context!=="",x=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(v=>{this.isValidLookup(r)||(l=v,!Lm[`${x[0]}-${v}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(Lm[`${x[0]}-${v}`]=!0,this.logger.warn(`key "${o}" for languages "${x.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),x.forEach(y=>{if(this.isValidLookup(r))return;a=y;const b=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(b,f,y,v,n);else{let w;p&&(w=this.pluralResolver.getSuffix(y,n.count,n));const E=`${this.options.pluralSeparator}zero`,N=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(b.push(f+w),n.ordinal&&w.indexOf(N)===0&&b.push(f+w.replace(N,this.options.pluralSeparator)),h&&b.push(f+E)),m){const _=`${f}${this.options.contextSeparator}${n.context}`;b.push(_),p&&(b.push(_+w),n.ordinal&&w.indexOf(N)===0&&b.push(_+w.replace(N,this.options.pluralSeparator)),h&&b.push(_+E))}}let S;for(;S=b.pop();)this.isValidLookup(r)||(s=S,r=this.getResource(y,v,S,n))}))})}),{res:r,usedKey:o,exactUsedKey:s,usedLng:a,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!ve(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const s of n)delete o[s]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const Au=e=>e.charAt(0).toUpperCase()+e.slice(1);class Im{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Pn.create("languageUtils")}getScriptPartFromCode(t){if(t=Ol(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Ol(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(ve(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let o=Intl.getCanonicalLocales(t)[0];if(o&&this.options.lowerCaseLng&&(o=o.toLowerCase()),o)return o}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(o=>o.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Au(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Au(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=Au(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(s=>{if(s===o)return s;if(!(s.indexOf("-")<0&&o.indexOf("-")<0)&&(s.indexOf("-")>0&&o.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===o||s.indexOf(o)===0&&o.length>1))return s})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),ve(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],s=a=>{a&&(this.isSupportedCode(a)?o.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return ve(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):ve(t)&&s(this.formatLanguageCode(t)),r.forEach(a=>{o.indexOf(a)<0&&s(this.formatLanguageCode(a))}),o}}let lD=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],cD={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const uD=["v1","v2","v3"],dD=["v4"],Fm={zero:0,one:1,two:2,few:3,many:4,other:5},fD=()=>{const e={};return lD.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:cD[t.fc]}})}),e};class pD{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Pn.create("pluralResolver"),(!this.options.compatibilityJSON||dD.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=fD(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const r=Ol(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:r,type:o});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let a;try{a=new Intl.PluralRules(r,{type:o})}catch{if(!t.match(/-|_/))return;const c=this.languageUtils.getLanguagePartFromCode(t);a=this.getRule(c,n)}return this.pluralRulesCache[s]=a,a}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((o,s)=>Fm[o]-Fm[s]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):r.numbers.map(o=>this.getSuffix(t,o,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:this.getSuffixRetroCompatible(o,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let o=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const s=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?`_plural_${o.toString()}`:s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?s():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!uD.includes(this.options.compatibilityJSON)}}const $m=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=eD(e,t,n);return!s&&o&&ve(n)&&(s=jd(e,n,r),s===void 0&&(s=jd(t,n,r))),s},Tu=e=>e.replace(/\$/g,"$$$$");class hD{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Pn.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:s,prefixEscaped:a,suffix:l,suffixEscaped:c,formatSeparator:u,unescapeSuffix:f,unescapePrefix:d,nestingPrefix:p,nestingPrefixEscaped:h,nestingSuffix:m,nestingSuffixEscaped:x,nestingOptionsSeparator:v,maxReplaces:y,alwaysFormat:b}=t.interpolation;this.escape=n!==void 0?n:nD,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=s?Ao(s):a||"{{",this.suffix=l?Ao(l):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=f?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=p?Ao(p):h||Ao("$t("),this.nestingSuffix=m?Ao(m):x||Ao(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=y||1e3,this.alwaysFormat=b!==void 0?b:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,o){let s,a,l;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=h=>{if(h.indexOf(this.formatSeparator)<0){const y=$m(n,c,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,r,{...o,...n,interpolationkey:h}):y}const m=h.split(this.formatSeparator),x=m.shift().trim(),v=m.join(this.formatSeparator).trim();return this.format($m(n,c,x,this.options.keySeparator,this.options.ignoreJSONStructure),v,r,{...o,...n,interpolationkey:x})};this.resetRegExp();const f=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,d=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>Tu(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?Tu(this.escape(h)):Tu(h)}].forEach(h=>{for(l=0;s=h.regex.exec(t);){const m=s[1].trim();if(a=u(m),a===void 0)if(typeof f=="function"){const v=f(t,s,o);a=ve(v)?v:""}else if(o&&Object.prototype.hasOwnProperty.call(o,m))a="";else if(d){a=s[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${t}`),a="";else!ve(a)&&!this.useRawValueToEscape&&(a=Dm(a));const x=h.safeValue(a);if(t=t.replace(s[0],x),d?(h.regex.lastIndex+=a.length,h.regex.lastIndex-=s[0].length):h.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,s,a;const l=(c,u)=>{const f=this.nestingOptionsSeparator;if(c.indexOf(f)<0)return c;const d=c.split(new RegExp(`${f}[ ]*{`));let p=`{${d[1]}`;c=d[0],p=this.interpolate(p,a);const h=p.match(/'/g),m=p.match(/"/g);(h&&h.length%2===0&&!m||m.length%2!==0)&&(p=p.replace(/'/g,'"'));try{a=JSON.parse(p),u&&(a={...u,...a})}catch(x){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,x),`${c}${f}${p}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,c};for(;o=this.nestingRegexp.exec(t);){let c=[];a={...r},a=a.replace&&!ve(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let u=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const f=o[1].split(this.formatSeparator).map(d=>d.trim());o[1]=f.shift(),c=f,u=!0}if(s=n(l.call(this,o[1].trim(),a),a),s&&o[0]===t&&!ve(s))return s;ve(s)||(s=Dm(s)),s||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),s=""),u&&(s=c.reduce((f,d)=>this.format(f,d,r.lng,{...r,interpolationkey:o[1].trim()}),s.trim())),t=t.replace(o[0],s),this.regexp.lastIndex=0}return t}}const gD=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(a=>{if(a){const[l,...c]=a.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),f=l.trim();n[f]||(n[f]=u),u==="false"&&(n[f]=!1),u==="true"&&(n[f]=!0),isNaN(u)||(n[f]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},To=e=>{const t={};return(n,r,o)=>{let s=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(s={...s,[o.interpolationkey]:void 0});const a=r+JSON.stringify(s);let l=t[a];return l||(l=e(Ol(r),o),t[a]=l),l(n)}};class mD{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Pn.create("formatter"),this.options=t,this.formats={number:To((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return s=>o.format(s)}),currency:To((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return s=>o.format(s)}),datetime:To((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return s=>o.format(s)}),relativetime:To((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return s=>o.format(s,r.range||"day")}),list:To((n,r)=>{const o=new Intl.ListFormat(n,{...r});return s=>o.format(s)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=To(n)}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=n.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(l=>l.indexOf(")")>-1)){const l=s.findIndex(c=>c.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,l)].join(this.formatSeparator)}return s.reduce((l,c)=>{const{formatName:u,formatOptions:f}=gD(c);if(this.formats[u]){let d=l;try{const p=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},h=p.locale||p.lng||o.locale||o.lng||r;d=this.formats[u](l,h,{...f,...o,...p})}catch(p){this.logger.warn(p)}return d}else this.logger.warn(`there was no format function for ${u}`);return l},t)}}const xD=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class vD extends Vc{constructor(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Pn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,o.backend,o)}queueLoad(t,n,r,o){const s={},a={},l={},c={};return t.forEach(u=>{let f=!0;n.forEach(d=>{const p=`${u}|${d}`;!r.reload&&this.store.hasResourceBundle(u,d)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?a[p]===void 0&&(a[p]=!0):(this.state[p]=1,f=!1,a[p]===void 0&&(a[p]=!0),s[p]===void 0&&(s[p]=!0),c[d]===void 0&&(c[d]=!0)))}),f||(l[u]=!0)}),(Object.keys(s).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(s),pending:Object.keys(a),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(c)}}loaded(t,n,r){const o=t.split("|"),s=o[0],a=o[1];n&&this.emit("failedLoading",s,a,n),!n&&r&&this.store.addResourceBundle(s,a,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const l={};this.queue.forEach(c=>{QM(c.loaded,[s],a),xD(c,t),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{l[u]||(l[u]={});const f=c.loaded[u];f.length&&f.forEach(d=>{l[u][d]===void 0&&(l[u][d]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(c=>!c.done)}read(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:s,callback:a});return}this.readingCalls++;const l=(u,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&f&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,o+1,s*2,a)},s);return}a(u,f)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const u=c(t,n);u&&typeof u.then=="function"?u.then(f=>l(null,f)).catch(l):l(null,u)}catch(u){l(u)}return}return c(t,n,l)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();ve(t)&&(t=this.languageUtils.toResolveHierarchy(t)),ve(n)&&(n=[n]);const s=this.queueLoad(t,n,r,o);if(!s.toLoad.length)return s.pending.length||o(),null;s.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),o=r[0],s=r[1];this.read(o,s,"read",void 0,void 0,(a,l)=>{a&&this.logger.warn(`${n}loading namespace ${s} for language ${o} failed`,a),!a&&l&&this.logger.log(`${n}loaded namespace ${s} for language ${o}`,l),this.loaded(t,a,l)})}saveMissing(t,n,r,o,s){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const c={...a,isUpdate:s},u=this.backend.create.bind(this.backend);if(u.length<6)try{let f;u.length===5?f=u(t,n,r,o,c):f=u(t,n,r,o),f&&typeof f.then=="function"?f.then(d=>l(null,d)).catch(l):l(null,f)}catch(f){l(f)}else u(t,n,r,o,l,c)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}const Vm=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),ve(e[1])&&(t.defaultValue=e[1]),ve(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Bm=e=>(ve(e.ns)&&(e.ns=[e.ns]),ve(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),ve(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Ii=()=>{},yD=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Pa extends Vc{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Bm(t),this.services={},this.logger=Pn,this.modules={external:[]},yD(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(ve(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=Vm();this.options={...o,...this.options,...Bm(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const s=f=>f?typeof f=="function"?new f:f:null;if(!this.options.isClone){this.modules.logger?Pn.init(s(this.modules.logger),this.options):Pn.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=mD);const d=new Im(this.options);this.store=new Om(this.options.resources,this.options);const p=this.services;p.logger=Pn,p.resourceStore=this.store,p.languageUtils=d,p.pluralResolver=new pD(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(p.formatter=s(f),p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new hD(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new vD(s(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(h){for(var m=arguments.length,x=new Array(m>1?m-1:0),v=1;v<m;v++)x[v-1]=arguments[v];t.emit(h,...x)}),this.modules.languageDetector&&(p.languageDetector=s(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=s(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new Il(this.services,this.options),this.translator.on("*",function(h){for(var m=arguments.length,x=new Array(m>1?m-1:0),v=1;v<m;v++)x[v-1]=arguments[v];t.emit(h,...x)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Ii),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=function(){return t.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return t.store[f](...arguments),t}});const c=Hs(),u=()=>{const f=(d,p)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(p),r(d,p)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),c}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ii;const o=ve(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const s=[],a=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(u=>{u!=="cimode"&&s.indexOf(u)<0&&s.push(u)})};o?a(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>a(c)),this.options.preload&&this.options.preload.forEach(l=>a(l)),this.services.backendConnector.load(s,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(l)})}else r(null)}reloadResources(t,n,r){const o=Hs();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Ii),this.services.backendConnector.reload(t,n,s=>{o.resolve(),r(s)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Hy.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const o=Hs();this.emit("languageChanging",t);const s=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},a=(c,u)=>{u?(s(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},l=c=>{!t&&!c&&this.services.languageDetector&&(c=[]);const u=ve(c)?c:this.services.languageUtils.getBestMatchFromCodes(c);u&&(this.language||s(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,f=>{a(f,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(t),o}getFixedT(t,n,r){var o=this;const s=function(a,l){let c;if(typeof l!="object"){for(var u=arguments.length,f=new Array(u>2?u-2:0),d=2;d<u;d++)f[d-2]=arguments[d];c=o.options.overloadTranslationOptionHandler([a,l].concat(f))}else c={...l};c.lng=c.lng||s.lng,c.lngs=c.lngs||s.lngs,c.ns=c.ns||s.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||r||s.keyPrefix);const p=o.options.keySeparator||".";let h;return c.keyPrefix&&Array.isArray(a)?h=a.map(m=>`${c.keyPrefix}${p}${m}`):h=c.keyPrefix?`${c.keyPrefix}${p}${a}`:a,o.t(h,c)};return ve(t)?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(l,c)=>{const u=this.services.backendConnector.state[`${l}|${c}`];return u===-1||u===0||u===2};if(n.precheck){const l=n.precheck(this,a);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!o||a(s,t)))}loadNamespaces(t,n){const r=Hs();return this.options.ns?(ve(t)&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Hs();ve(t)&&(t=[t]);const o=this.options.preload||[],s=t.filter(a=>o.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return s.length?(this.options.preload=o.concat(s),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new Im(Vm());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Pa(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ii;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},s=new Pa(o);return(t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(l=>{s[l]=this[l]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},r&&(s.store=new Om(this.store.data,o),s.services.resourceStore=s.store),s.translator=new Il(s.services,o),s.translator.on("*",function(l){for(var c=arguments.length,u=new Array(c>1?c-1:0),f=1;f<c;f++)u[f-1]=arguments[f];s.emit(l,...u)}),s.init(o,n),s.translator.options=o,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const st=Pa.createInstance();st.createInstance=Pa.createInstance;st.createInstance;st.dir;st.init;st.loadResources;st.reloadResources;st.use;st.changeLanguage;st.getFixedT;st.t;st.exists;st.setDefaultNamespace;st.hasLoadedNamespace;st.loadNamespaces;st.loadLanguages;function bD(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];oo(t[0])&&(t[0]=`react-i18next:: ${t[0]}`),console.warn(...t)}}const zm={};function kd(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];oo(t[0])&&zm[t[0]]||(oo(t[0])&&(zm[t[0]]=new Date),bD(...t))}const Gy=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Wm=(e,t,n)=>{e.loadNamespaces(t,Gy(e,n))},Hm=(e,t,n,r)=>{oo(n)&&(n=[n]),n.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,Gy(e,r))},wD=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],o=t.options?t.options.fallbackLng:!1,s=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(l,c)=>{const u=t.services.backendConnector.state[`${l}|${c}`];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||a(r,e)&&(!o||a(s,e)))},CD=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(kd("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(o,s)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!s(o.isLanguageChangingTo,e))return!1}}):wD(e,t,n)},oo=e=>typeof e=="string",SD=e=>typeof e=="object"&&e!==null,ED=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ND={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},_D=e=>ND[e],jD=e=>e.replace(ED,_D);let Rd={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:jD};const Uy=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Rd={...Rd,...e}},Yy=()=>Rd;let Ky;const Zy=e=>{Ky=e},qy=()=>Ky,Xy={type:"3rdParty",init(e){Uy(e.options.react),Zy(e)}},Jy=C.createContext();class kD{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces=()=>Object.keys(this.usedNamespaces)}const RD=(e,t)=>{const n=C.useRef();return C.useEffect(()=>{n.current=e},[e,t]),n.current},Qy=(e,t,n,r)=>e.getFixedT(t,n,r),MD=(e,t,n,r)=>C.useCallback(Qy(e,t,n,r),[e,t,n,r]),DD=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:o}=C.useContext(Jy)||{},s=n||r||qy();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new kD),!s){kd("You will need to pass in an i18next instance by using initReactI18next");const w=(N,_)=>oo(_)?_:SD(_)&&oo(_.defaultValue)?_.defaultValue:Array.isArray(N)?N[N.length-1]:N,E=[w,{},!1];return E.t=w,E.i18n={},E.ready=!1,E}s.options.react&&s.options.react.wait!==void 0&&kd("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...Yy(),...s.options.react,...t},{useSuspense:l,keyPrefix:c}=a;let u=e;u=oo(u)?[u]:u||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(u);const f=(s.isInitialized||s.initializedStoreOnce)&&u.every(w=>CD(w,s,a)),d=MD(s,t.lng||null,a.nsMode==="fallback"?u:u[0],c),p=()=>d,h=()=>Qy(s,t.lng||null,a.nsMode==="fallback"?u:u[0],c),[m,x]=C.useState(p);let v=u.join();t.lng&&(v=`${t.lng}${v}`);const y=RD(v),b=C.useRef(!0);C.useEffect(()=>{const{bindI18n:w,bindI18nStore:E}=a;b.current=!0,!f&&!l&&(t.lng?Hm(s,t.lng,u,()=>{b.current&&x(h)}):Wm(s,u,()=>{b.current&&x(h)})),f&&y&&y!==v&&b.current&&x(h);const N=()=>{b.current&&x(h)};return w&&s&&s.on(w,N),E&&s&&s.store.on(E,N),()=>{b.current=!1,w&&s&&w.split(" ").forEach(_=>s.off(_,N)),E&&s&&E.split(" ").forEach(_=>s.store.off(_,N))}},[s,v]),C.useEffect(()=>{b.current&&f&&x(p)},[s,c,f]);const S=[m,s,f];if(S.t=m,S.i18n=s,S.ready=f,f||!f&&!l)return S;throw new Promise(w=>{t.lng?Hm(s,t.lng,u,()=>w()):Wm(s,u,()=>w())})},AD=Object.freeze(Object.defineProperty({__proto__:null,I18nContext:Jy,getDefaults:Yy,getI18n:qy,initReactI18next:Xy,setDefaults:Uy,setI18n:Zy,useTranslation:DD},Symbol.toStringTag,{value:"Module"})),TD={lastUpdated:"آخر تحديث {{time}} ·",cadence:{REALTIME:"الحالة في الوقت الفعلي",EVERY_MINUTE:"كل دقيقة",EVERY_10_MIN:"كل 10 دقائق",EVERY_15_MIN:"كل 15 دقيقة",EVERY_HOUR:"كل ساعة",EVERY_15_SEC:"كل 15 ثانية"}},PD={freshness:TD},OD={lastUpdated:"Zuletzt aktualisiert {{time}} ·",cadence:{REALTIME:"Echtzeit-Status",EVERY_MINUTE:"Jede Minute",EVERY_10_MIN:"Alle 10 Minuten",EVERY_15_MIN:"Alle 15 Minuten",EVERY_HOUR:"Stündlich",EVERY_15_SEC:"Alle 15 Sekunden"}},LD={freshness:OD},ID={lastUpdated:"Last updated {{time}} ·",cadence:{REALTIME:"Real-time status",EVERY_MINUTE:"Every minute",EVERY_10_MIN:"Every 10 minutes",EVERY_15_MIN:"Every 15 minutes",EVERY_HOUR:"Every hour",EVERY_15_SEC:"Every 15 seconds"}},FD={freshness:ID},$D={lastUpdated:"Última actualización {{time}} ·",cadence:{REALTIME:"Estado en tiempo real",EVERY_MINUTE:"Cada minuto",EVERY_10_MIN:"Cada 10 minutos",EVERY_15_MIN:"Cada 15 minutos",EVERY_HOUR:"Cada hora",EVERY_15_SEC:"Cada 15 segundos"}},VD={freshness:$D},BD={lastUpdated:"Dernière mise à jour {{time}} ·",cadence:{REALTIME:"Statut en temps réel",EVERY_MINUTE:"Toutes les minutes",EVERY_10_MIN:"Toutes les 10 minutes",EVERY_15_MIN:"Toutes les 15 minutes",EVERY_HOUR:"Toutes les heures",EVERY_15_SEC:"Toutes les 15 secondes"}},zD={freshness:BD},WD={lastUpdated:"最終更新 {{time}} ·",cadence:{REALTIME:"リアルタイム ステータス",EVERY_MINUTE:"1分ごと",EVERY_10_MIN:"10分ごと",EVERY_15_MIN:"15分ごと",EVERY_HOUR:"1時間ごと",EVERY_15_SEC:"15秒ごと"}},HD={freshness:WD},GD={lastUpdated:"Última atualização {{time}} ·",cadence:{REALTIME:"Status em tempo real",EVERY_MINUTE:"A cada minuto",EVERY_10_MIN:"A cada 10 minutos",EVERY_15_MIN:"A cada 15 minutos",EVERY_HOUR:"A cada hora",EVERY_15_SEC:"A cada 15 segundos"}},UD={freshness:GD},YD={lastUpdated:"Обновлено {{time}} ·",cadence:{REALTIME:"Статус в реальном времени",EVERY_MINUTE:"Каждую минуту",EVERY_10_MIN:"Каждые 10 минут",EVERY_15_MIN:"Каждые 15 минут",EVERY_HOUR:"Каждый час",EVERY_15_SEC:"Каждые 15 секунд"}},KD={freshness:YD},ZD={lastUpdated:"Son güncelleme {{time}} ·",cadence:{REALTIME:"Gerçek zamanlı durum",EVERY_MINUTE:"Her dakika",EVERY_10_MIN:"Her 10 dakika",EVERY_15_MIN:"Her 15 dakika",EVERY_HOUR:"Her saat",EVERY_15_SEC:"Her 15 saniyede bir"}},qD={freshness:ZD},XD={lastUpdated:"最近更新 {{time}} ·",cadence:{REALTIME:"实时状态",EVERY_MINUTE:"每分钟",EVERY_10_MIN:"每10分钟",EVERY_15_MIN:"每15分钟",EVERY_HOUR:"每小时",EVERY_15_SEC:"每15秒"}},JD={freshness:XD},{useTranslation:QD}=AD;let Fl;try{Fl=Xy}catch{Fl=void 0}const $l="ds",eA={ar:PD,de:LD,en:FD,es:VD,fr:zD,ja:HD,pt:UD,ru:KD,tr:qD,zh:JD},e3=()=>{for(const[e,t]of Object.entries(eA))st.addResourceBundle(e,$l,t,!0,!0)};st.isInitialized||(Fl?st.use(Fl):st).init({lng:"en",fallbackLng:"en",ns:[$l],defaultNS:$l,resources:{},interpolation:{escapeValue:!1},react:{useSuspense:!1}});e3();st.on("languageChanged",e3);const tA=()=>QD($l),nA={fresh:"bg-green-600",stale:"bg-yellow-500"},t3=C.forwardRef(({cadenceKey:e,lastUpdated:t,tone:n="fresh",showDot:r=!0,className:o},s)=>{const{t:a}=tA(),c=!(e==="REALTIME")&&t?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1}):null;return i.jsxs(Ze,{ref:s,variant:"secondary","data-testid":"data-freshness-badge",className:j("font-normal",o),children:[r&&i.jsx("span",{className:"inline-flex size-3 items-center justify-center","aria-hidden":"true",children:i.jsx("span",{className:j("size-1.5 rounded-full",nA[n])})}),c!=null&&i.jsx("span",{className:"font-semibold text-foreground",children:a("freshness.lastUpdated",{time:c})}),i.jsx("span",{className:"text-muted-foreground",children:a(`freshness.cadence.${e}`)})]})});t3.displayName="DataFreshnessBadge";const n3=C.forwardRef(({className:e,icon:t,title:n,description:r,button:o,variant:s="default",onClose:a,closeLabel:l,...c},u)=>{const f=s==="secondary";return i.jsxs("div",{ref:u,className:j("relative flex items-center gap-6 rounded-xl border p-6",f?"border-border bg-background":"border-primary bg-primary",a&&"pr-12",e),...c,children:[i.jsx("div",{className:j("flex size-16 shrink-0 items-center justify-center rounded-full border-2",f?"border-primary":"border-muted"),children:i.jsx(X,{name:t,size:"xl",className:j("text-muted-foreground",f?"text-primary":"text-primary-foreground"),weight:"fill"})}),i.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[i.jsx("div",{className:j("text-lg font-semibold leading-7",f?"text-foreground":"text-[#FAFAFA]"),children:n}),i.jsx("div",{className:j("text-sm leading-5 opacity-80",f?"text-muted-foreground":"text-[#FAFAFA]"),children:r})]}),o&&i.jsx("div",{className:"shrink-0",children:o}),a&&i.jsx("button",{type:"button",onClick:a,"aria-label":l??"Close",className:j("absolute right-3 top-3 rounded p-1 transition-colors",f?"text-muted-foreground hover:bg-muted hover:text-foreground":"text-primary-foreground hover:bg-primary-foreground/10"),children:i.jsx(X,{name:"X",size:"sm"})})]})});n3.displayName="HighlightBanner";const rA="https://dashboard-assets.y.uno/common/empty-states/empty_illustration_tables.svg",oA="https://dashboard-assets.y.uno/common/empty-states/empty_illustration_tables_dark.svg",Bc=C.forwardRef(({className:e,media:t,title:n,description:r,actions:o,...s},a)=>{const c=t===void 0?i.jsx($y,{lightSrc:rA,darkSrc:oA,alt:""}):t;return i.jsxs("div",{ref:a,className:j("flex flex-col items-center gap-6 bg-secondary px-6 py-12 rounded-lg w-full",e),...s,children:[c&&i.jsx("div",{className:"flex-shrink-0",children:c}),i.jsxs("div",{className:"flex flex-col gap-6 items-center w-full",children:[i.jsxs("div",{className:"flex flex-col gap-2 items-center w-full",children:[i.jsx("h3",{className:"text-base font-semibold text-center leading-none",children:n}),r&&i.jsx("p",{className:"text-sm text-muted-foreground text-center",children:r})]}),o&&i.jsx("div",{className:"flex gap-3 items-center justify-center",children:o})]})]})});Bc.displayName="Empty";function sA({name:e,size:t="xl",className:n,children:r}){return i.jsx("div",{className:"p-4 bg-background rounded-lg shadow-sm",children:r||i.jsx(X,{name:e,size:t,className:n})})}const r3="https://dashboard-assets.y.uno",tn=(e,t)=>`${r3}/tables/empty-states/mask_${e}_${t}.svg`,Po=(e,t)=>`${r3}/risk-conditions/empty-states/mask_${e}_${t}.svg`,sr={payments:{light:tn("payments","light"),dark:tn("payments","dark")},chargebacks:{light:tn("chargebacks","light"),dark:tn("chargebacks","dark")},installments:{light:tn("installments","light"),dark:tn("installments","dark")},paymentLinks:{light:tn("payment-links","light"),dark:tn("payment-links","dark")},recipients:{light:tn("recipients","light"),dark:tn("recipients","dark")},subscriptions:{light:tn("subscriptions","light"),dark:tn("subscriptions","dark")},rules:{light:Po("rules","light"),dark:Po("rules","dark")},blocklists:{light:Po("blocklists","light"),dark:Po("blocklists","dark")},allowlists:{light:Po("allowlists","light"),dark:Po("allowlists","dark")}},Wn=C.forwardRef(({maskSrc:e,alt:t="",className:n,children:r,variant:o},s)=>i.jsxs("div",{ref:s,"data-variant":o,className:j("app-scene relative w-full aspect-[592/444] overflow-hidden rounded-lg",n),children:[i.jsx("img",{src:e,alt:t,"aria-hidden":t===""?!0:void 0,draggable:!1,className:"absolute inset-0 h-full w-full select-none object-cover"}),r&&i.jsx("svg",{className:"pointer-events-none absolute inset-0 h-full w-full",viewBox:"0 0 592 444",xmlns:"http://www.w3.org/2000/svg",children:r})]}));Wn.displayName="SceneShell";const Gm=296,Um=209;function ks({cx:e=Gm,cy:t=Um,topFaceFill:n,clipId:r}){const o=e-Gm,s=t-Um;return i.jsxs("g",{transform:o===0&&s===0?void 0:`translate(${o},${s})`,children:[i.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M397 233.145H396.962C397.691 248.543 387.869 264.075 367.494 275.816C328.154 298.484 264.276 298.484 224.936 275.816C204.561 264.075 194.739 248.543 195.469 233.145H195.43V209.074C195.43 223.943 205.266 238.812 224.936 250.146C264.276 272.815 328.154 272.815 367.494 250.146C387.165 238.812 397 223.943 397 209.074V233.145Z",fill:"#3E4FE0",stroke:"black"}),i.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M224.936 168.001C264.276 145.333 328.155 145.333 367.495 168.001C406.835 190.67 406.835 227.478 367.495 250.146C328.155 272.815 264.276 272.815 224.936 250.146C185.596 227.478 185.596 190.67 224.936 168.001Z",fill:n,stroke:"#3E4FE0",strokeLinecap:"round",strokeLinejoin:"round"}),i.jsxs("g",{clipPath:`url(#${r})`,children:[i.jsx("path",{d:"M266.047 207.984C265.096 208.618 265.096 209.651 266.047 210.29C266.997 210.928 268.542 210.932 269.493 210.298C270.444 209.664 270.444 208.63 269.494 207.992C268.543 207.353 266.998 207.35 266.047 207.984Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M271.711 204.206C270.76 204.84 270.76 205.874 271.71 206.513C272.661 207.151 274.206 207.155 275.157 206.521C276.108 205.887 276.108 204.853 275.158 204.215C274.207 203.576 272.662 203.572 271.711 204.206Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M279.761 202.029C280.126 201.786 280.126 201.39 279.761 201.144C279.396 200.899 278.804 200.898 278.439 201.141C278.074 201.385 278.074 201.781 278.439 202.026C278.804 202.271 279.396 202.272 279.761 202.029Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M274.508 213.668C275.092 213.279 275.092 212.645 274.508 212.253C273.924 211.861 272.977 211.858 272.393 212.248C271.809 212.637 271.809 213.271 272.393 213.663C272.977 214.056 273.924 214.058 274.508 213.668Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M277.387 208.023C276.436 208.657 276.436 209.69 277.386 210.329C278.337 210.968 279.882 210.971 280.833 210.337C281.784 209.703 281.784 208.669 280.833 208.031C279.883 207.392 278.338 207.389 277.387 208.023Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M285.836 206.117C286.421 205.728 286.421 205.095 285.836 204.702C285.252 204.31 284.306 204.307 283.721 204.697C283.137 205.087 283.137 205.72 283.721 206.113C284.305 206.505 285.252 206.507 285.836 206.117Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M278.444 216.313C278.08 216.556 278.08 216.953 278.444 217.198C278.808 217.442 279.402 217.444 279.766 217.201C280.13 216.958 280.13 216.561 279.766 216.316C279.402 216.072 278.809 216.07 278.444 216.313Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M283.044 211.82C282.093 212.454 282.093 213.487 283.044 214.126C283.994 214.764 285.539 214.768 286.49 214.134C287.441 213.5 287.441 212.466 286.491 211.828C285.54 211.189 283.995 211.186 283.044 211.82Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M288.708 208.042C287.757 208.676 287.757 209.71 288.708 210.349C289.658 210.987 291.203 210.991 292.154 210.357C293.105 209.723 293.106 208.689 292.155 208.051C291.204 207.412 289.66 207.408 288.708 208.042Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M285.437 198.252C285.801 198.009 285.801 197.612 285.437 197.367C285.073 197.123 284.479 197.121 284.115 197.364C283.751 197.607 283.751 198.004 284.115 198.249C284.479 198.493 285.073 198.494 285.437 198.252Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M292.161 195.189C293.113 194.554 293.113 193.522 292.162 192.883C291.21 192.243 289.667 192.24 288.716 192.874C287.764 193.509 287.763 194.542 288.715 195.181C289.666 195.82 291.209 195.823 292.161 195.189Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M294.38 189.097C293.429 189.731 293.428 190.765 294.379 191.403C295.33 192.042 296.874 192.045 297.825 191.411C298.776 190.777 298.777 189.744 297.826 189.105C296.875 188.467 295.331 188.463 294.38 189.097Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M291.513 202.332C292.097 201.943 292.097 201.309 291.513 200.917C290.929 200.525 289.983 200.522 289.398 200.912C288.813 201.302 288.813 201.935 289.398 202.327C289.982 202.72 290.928 202.722 291.513 202.332Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M294.391 196.683C293.44 197.317 293.44 198.351 294.391 198.989C295.341 199.628 296.886 199.631 297.837 198.997C298.788 198.363 298.788 197.33 297.838 196.691C296.887 196.053 295.342 196.049 294.391 196.683Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M300.726 193.357C300.141 193.747 300.141 194.38 300.725 194.773C301.31 195.165 302.256 195.167 302.84 194.778C303.425 194.388 303.425 193.755 302.841 193.362C302.257 192.97 301.31 192.968 300.726 193.357Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M300.055 200.488C299.104 201.122 299.104 202.155 300.055 202.794C301.005 203.432 302.55 203.436 303.501 202.802C304.452 202.168 304.452 201.134 303.502 200.496C302.551 199.857 301.006 199.854 300.055 200.488Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M308.104 198.306C308.47 198.063 308.47 197.667 308.105 197.422C307.74 197.177 307.148 197.175 306.783 197.419C306.418 197.662 306.417 198.058 306.782 198.303C307.147 198.548 307.739 198.55 308.104 198.306Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M294.385 204.261C293.434 204.895 293.433 205.929 294.384 206.567C295.335 207.206 296.879 207.209 297.83 206.575C298.782 205.941 298.782 204.908 297.831 204.269C296.88 203.631 295.336 203.627 294.385 204.261Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M284.108 220.118C283.744 220.361 283.744 220.758 284.108 221.002C284.472 221.247 285.065 221.248 285.43 221.006C285.794 220.763 285.794 220.365 285.43 220.121C285.066 219.876 284.472 219.875 284.108 220.118Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M289.372 216.072C288.787 216.462 288.787 217.095 289.372 217.488C289.956 217.88 290.902 217.882 291.487 217.492C292.071 217.103 292.071 216.47 291.487 216.077C290.903 215.685 289.956 215.682 289.372 216.072Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M294.372 211.847C293.421 212.481 293.421 213.515 294.371 214.153C295.322 214.792 296.867 214.795 297.818 214.161C298.769 213.527 298.769 212.494 297.818 211.855C296.868 211.217 295.323 211.213 294.372 211.847Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M289.771 223.919C289.407 224.161 289.407 224.559 289.771 224.803C290.135 225.048 290.729 225.049 291.093 224.806C291.457 224.564 291.457 224.166 291.093 223.922C290.729 223.677 290.136 223.676 289.771 223.919Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M295.441 220.141C295.077 220.384 295.077 220.781 295.441 221.026C295.805 221.27 296.399 221.272 296.763 221.029C297.127 220.786 297.127 220.389 296.763 220.144C296.399 219.9 295.806 219.898 295.441 220.141Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M300.035 215.652C299.084 216.286 299.084 217.319 300.035 217.958C300.985 218.596 302.53 218.6 303.481 217.966C304.432 217.332 304.432 216.298 303.482 215.66C302.531 215.021 300.986 215.018 300.035 215.652Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M295.447 227.731C295.083 227.974 295.083 228.371 295.447 228.616C295.811 228.86 296.405 228.862 296.769 228.619C297.133 228.376 297.133 227.979 296.769 227.734C296.405 227.49 295.811 227.488 295.447 227.731Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M302.439 224.842C302.804 224.598 302.804 224.202 302.439 223.957C302.074 223.712 301.482 223.71 301.117 223.954C300.752 224.197 300.752 224.593 301.117 224.838C301.482 225.084 302.074 225.085 302.439 224.842Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M305.711 219.464C304.76 220.098 304.76 221.132 305.711 221.77C306.661 222.409 308.206 222.413 309.157 221.779C310.108 221.144 310.108 220.111 309.158 219.472C308.207 218.834 306.662 218.83 305.711 219.464Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M303.494 210.376C304.446 209.742 304.446 208.709 303.495 208.07C302.543 207.431 301 207.427 300.048 208.062C299.096 208.697 299.096 209.729 300.048 210.368C300.999 211.007 302.542 211.011 303.494 210.376Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M306.376 204.732C305.792 205.122 305.792 205.755 306.376 206.148C306.96 206.54 307.906 206.542 308.491 206.153C309.076 205.763 309.076 205.13 308.491 204.737C307.907 204.345 306.961 204.343 306.376 204.732Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M313.768 202.111C314.133 201.868 314.133 201.472 313.768 201.226C313.403 200.981 312.811 200.98 312.446 201.223C312.081 201.467 312.081 201.863 312.446 202.108C312.811 202.353 313.403 202.354 313.768 202.111Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M309.157 214.181C310.109 213.546 310.11 212.514 309.158 211.875C308.207 211.236 306.664 211.232 305.712 211.867C304.76 212.501 304.76 213.534 305.711 214.173C306.663 214.812 308.205 214.815 309.157 214.181Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M313.761 209.697C314.126 209.454 314.126 209.057 313.761 208.812C313.397 208.567 312.805 208.566 312.44 208.809C312.074 209.053 312.074 209.449 312.439 209.694C312.804 209.939 313.396 209.94 313.761 209.697Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M319.431 205.916C319.796 205.672 319.796 205.276 319.432 205.031C319.067 204.786 318.475 204.785 318.11 205.028C317.744 205.271 317.744 205.667 318.109 205.913C318.474 206.158 319.066 206.159 319.431 205.916Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M311.388 215.679C310.437 216.313 310.436 217.347 311.387 217.985C312.338 218.624 313.882 218.627 314.833 217.993C315.784 217.359 315.785 216.326 314.834 215.687C313.883 215.049 312.339 215.045 311.388 215.679Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M319.437 213.509C319.802 213.266 319.802 212.87 319.437 212.625C319.072 212.38 318.481 212.378 318.115 212.622C317.75 212.865 317.75 213.261 318.115 213.506C318.48 213.751 319.072 213.753 319.437 213.509Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M325.108 209.728C325.473 209.485 325.473 209.089 325.108 208.844C324.743 208.598 324.151 208.597 323.786 208.841C323.421 209.084 323.421 209.48 323.786 209.725C324.151 209.97 324.742 209.972 325.108 209.728Z",fill:"#3E4FE0"})]})]})}function aA(){return typeof SVGPathElement<"u"&&typeof SVGPathElement.prototype.getPointAtLength=="function"}function iA(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function ar(e,t,n=[]){const r=C.useRef(t);r.current=t,C.useEffect(()=>{const o=e.current;if(!o||!aA()||iA())return;const s=r.current(o);if(!s)return;let a=null;const l=()=>{a===null&&(a=requestAnimationFrame(function d(p){s(p),a=requestAnimationFrame(d)}))},c=()=>{a!==null&&(cancelAnimationFrame(a),a=null)};l();const u=typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(prefers-reduced-motion: reduce)"):null,f=d=>d.matches?c():l();return u?.addEventListener("change",f),()=>{c(),u?.removeEventListener("change",f)}},[e,...n])}function Ve(e){return e<.5?2*e*e:1-(-2*e+2)**2/2}function Vl(e){const t=Math.max(0,Math.min(1,e));return t*t*(3-2*t)}function Ym(e){const t=parseInt(e.slice(1),16);return[t>>16&255,t>>8&255,t&255]}function lA(e,t,n){return"#"+((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)}function ns(e,t,n){const r=Ym(e),o=Ym(t);return lA(Math.round(r[0]+(o[0]-r[0])*n),Math.round(r[1]+(o[1]-r[1])*n),Math.round(r[2]+(o[2]-r[2])*n))}function to(e,t,n){return{f1:ns(e.f1,t.f1,n),f2:ns(e.f2,t.f2,n),f3:ns(e.f3,t.f3,n)}}function Ae(e,t,n){return e.getPointAtLength(Math.max(0,Math.min(n,1))*t)}function ye(e,t,n){e.setAttribute("transform",`translate(${t.x.toFixed(1)},${t.y.toFixed(1)})`),e.setAttribute("opacity",n.toFixed(3))}function Be(e,t){const n=e.querySelectorAll("polygon");n[0]?.setAttribute("fill",t.f1),n[1]?.setAttribute("fill",t.f2),n[2]?.setAttribute("fill",t.f3)}const Km=e=>e<.05?e/.05:e>.95?(1-e)/.05:1,Br={f1:"#3E4FE0",f2:"#0617A9",f3:"#5A6BFF"},cA={f1:"#22C55E",f2:"#06A541",f3:"#44ED82"},Gr=2400,ul=2400,Md=2200,uA=800,dA=Gr+ul+Md+uA,Fi=800,fA=250,pA={purchaseTopGrad:["#161D61","#2531A0"],cubePurchase:["#0E133D","#161D61"],cubeNeutralFill:"black",cubeNeutralStroke:"#A3A3A3",pulseBlue:"#737373",pulseOpacity:[.45,.4,.4,.35],yunoTopFaceFill:"black"},hA={purchaseTopGrad:["#F3F4FF","white"],cubePurchase:["#C3C9FA","#EBECF9"],cubeNeutralFill:"white",cubeNeutralStroke:"#737373",pulseBlue:"#3E4FE0",pulseOpacity:[.3,.25,.25,.2],yunoTopFaceFill:"white"};function gA({className:e,alt:t}){const n=zn(),r=C.useId(),o=C.useRef(null),s=n?pA:hA,a=l=>`${r}-${l}`;return ar(o,l=>{const c=V=>l.querySelector(`[data-anim="${V}"]`),u=c("pathMain"),f=c("pathCapture"),d=c("pathPingRule"),p=c("pathPing3ds"),h=u.getTotalLength(),m=f.getTotalLength(),x=d.getTotalLength(),v=p.getTotalLength(),y=c("part"),b=c("trail1"),S=c("trail2"),w=c("pingRule"),E=c("ping3ds"),N=[{el:c("gl_purchase"),x:154,y:297,r:40},{el:c("gl_rule"),x:122,y:104,r:35},{el:c("gl_3ds"),x:508,y:78,r:35},{el:c("gl_capture"),x:490,y:345,r:40}],_=[{el:c("cube_purchase"),cx:106,cy:332,scale:1},{el:c("cube_ruleengine"),cx:122.596,cy:118,scale:1},{el:c("cube_3ds"),cx:507.952,cy:90,scale:1},{el:c("cube_capture"),cx:490,cy:360,scale:1}],k=55,I=.15,F=.18,U=.04;function O(V){N.forEach(D=>{let $=0;V.forEach(z=>{const P=Math.hypot(z.x-D.x,z.y-D.y),M=Math.max(0,1-P/D.r);M>$&&($=M)}),D.el.setAttribute("opacity",($*$*.12).toFixed(3))})}function R(V){_.forEach(D=>{let $=1;V.forEach(P=>{const M=Math.hypot(P.x-D.cx,P.y-D.cy),G=Math.max(0,1-M/k),A=1+G*G*I;A>$&&($=A)});const z=$>D.scale?F:U;D.scale+=($-D.scale)*z,D.el.setAttribute("transform",`translate(${D.cx},${D.cy}) scale(${D.scale.toFixed(4)}) translate(${-D.cx},${-D.cy})`)})}function L(){y.setAttribute("opacity","0"),b.setAttribute("opacity","0"),S.setAttribute("opacity","0"),w.setAttribute("opacity","0"),E.setAttribute("opacity","0"),N.forEach(V=>V.el.setAttribute("opacity","0")),Be(y,Br),Be(b,Br),Be(S,Br)}return V=>{const D=V%dA,$=[];if(D<Gr){const z=D/Gr,P=Ve(z),M=Math.min(1,z/.05),G=z>.85?Math.max(0,(1-z)/.15):1,A=M*G,W=Ae(u,h,P);ye(y,W,A),$.push(W),ye(b,Ae(u,h,Math.max(0,P-.04)),A*.45),ye(S,Ae(u,h,Math.max(0,P-.08)),A*.2),Be(y,Br),Be(b,Br),Be(S,Br),w.setAttribute("opacity","0"),E.setAttribute("opacity","0")}else if(D<Gr+ul){const z=D-Gr;y.setAttribute("opacity","0"),b.setAttribute("opacity","0"),S.setAttribute("opacity","0");const P=200,M=P+Fi*2;if(z>=P&&z<=M){const W=(z-P)/(Fi*2),H=W<=.5?Ve(W*2):1-Ve((W-.5)*2),T=Ae(d,x,H),B=Km(W);ye(w,T,B*.85),$.push(T)}else w.setAttribute("opacity","0");const G=P+fA,A=G+Fi*2;if(z>=G&&z<=A){const W=(z-G)/(Fi*2),H=W<=.5?Ve(W*2):1-Ve((W-.5)*2),T=Ae(p,v,H),B=Km(W);ye(E,T,B*.85),$.push(T)}else E.setAttribute("opacity","0")}else if(D<Gr+ul+Md){const z=(D-Gr-ul)/Md,P=Ve(z),M=Math.min(1,z/.08),G=z>.88?Math.max(0,(1-z)/.12):1,A=M*G,W=Ae(f,m,P);ye(y,W,A),$.push(W),ye(b,Ae(f,m,Math.max(0,P-.04)),A*.45),ye(S,Ae(f,m,Math.max(0,P-.08)),A*.2);const H=Vl((z-.1)/.2),T=to(Br,cA,H);Be(y,T),Be(b,T),Be(S,T),w.setAttribute("opacity","0"),E.setAttribute("opacity","0")}else L();$.length>0?O($):N.forEach(z=>z.el.setAttribute("opacity","0")),R($)}}),i.jsxs(Wn,{ref:o,maskSrc:sr.payments[n?"dark":"light"],alt:t,variant:"payments",className:e,children:[i.jsxs("defs",{children:[i.jsxs("linearGradient",{id:a("captureTopGrad"),x1:"526.204",y1:"324.372",x2:"490.312",y2:"386.539",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"#22C55E"}),i.jsx("stop",{offset:"1",stopColor:"#39DD75"})]}),i.jsxs("linearGradient",{id:a("captureRightGrad"),x1:"539.882",y1:"396.514",x2:"522.408",y2:"376.26",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"#22C55E"}),i.jsx("stop",{offset:"1",stopColor:"#06A541"})]}),i.jsxs("linearGradient",{id:a("captureRightStroke"),x1:"571.35",y1:"362.114",x2:"492.163",y2:"362.114",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"white",stopOpacity:"0"}),i.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0.4"})]}),i.jsxs("linearGradient",{id:a("captureLeftStroke"),x1:"93.5752",y1:"15.9521",x2:"2.13717",y2:"15.9521",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"white",stopOpacity:"0"}),i.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0.4"})]}),i.jsxs("linearGradient",{id:a("captureTopStroke"),x1:"448.864",y1:"321.162",x2:"490.315",y2:"392.956",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"white",stopOpacity:"0"}),i.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0.4"})]}),i.jsxs("linearGradient",{id:a("purchaseTopGrad"),x1:"147.444",y1:"340.975",x2:"106",y2:"269.192",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:s.purchaseTopGrad[0]}),i.jsx("stop",{offset:"1",stopColor:s.purchaseTopGrad[1]})]}),i.jsx("clipPath",{id:a("clip_dots"),children:i.jsx("rect",{width:"38.194",height:"38.2849",fill:"white",transform:"matrix(0.83205 -0.5547 0.830139 0.557556 264.324 209.133)"})})]}),i.jsx("path",{"data-anim":"pathMain",d:"M154,297 L209,266 L296,209",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathCapture",d:"M296,209 L371,274 L448,318 L490,345",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathPingRule",d:"M296,209 L209,175 L155,143 L122,104",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathPing3ds",d:"M296,209 L381,173 L476,118 L508,78",fill:"none",stroke:"none"}),i.jsx("path",{d:"M154,297 L209,266 L296,209",fill:"none",stroke:s.pulseBlue,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity[0],className:"app-scene-pulse-line",style:{animationDuration:"4.4s"}}),i.jsx("path",{d:"M296,209 L209,175 L155,143 L122,104",fill:"none",stroke:s.pulseBlue,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity[1],className:"app-scene-pulse-line",style:{animationDuration:"5s",animationDelay:".6s"}}),i.jsx("path",{d:"M296,209 L381,173 L476,118 L508,78",fill:"none",stroke:s.pulseBlue,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity[2],className:"app-scene-pulse-line",style:{animationDuration:"4.4s",animationDelay:"1.2s"}}),i.jsx("path",{d:"M296,209 L371,274 L448,318 L490,345",fill:"none",stroke:"#22C55E",strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity[3],className:"app-scene-pulse-line",style:{animationDuration:"5.6s",animationDelay:"1.8s"}}),i.jsxs("g",{"data-anim":"cube_purchase",children:[i.jsx("path",{d:"M188.889 317.047L106 364.903L106 396.807L188.889 348.951L188.889 317.047Z",fill:s.cubePurchase[0],stroke:"#3E4FE0"}),i.jsx("path",{d:"M23.111 317.047L106 364.903L106 396.807L23.111 348.951L23.111 317.047Z",fill:s.cubePurchase[1],stroke:"#3E4FE0"}),i.jsx("path",{d:"M106 269.191L23.1108 317.048L106 364.904L188.889 317.048L106 269.191Z",fill:`url(#${a("purchaseTopGrad")})`,stroke:"#3E4FE0"})]}),i.jsxs("g",{"data-anim":"cube_ruleengine",children:[i.jsx("path",{d:"M178.547 104.578L122.596 136.881V158.416L178.547 126.113V104.578Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke}),i.jsx("path",{d:"M66.646 104.578L122.596 136.881V158.416L66.646 126.113V104.578Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke}),i.jsx("path",{d:"M122.596 72.277L66.646 104.58L122.596 136.883L178.547 104.58L122.596 72.277Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke})]}),i.jsxs("g",{"data-anim":"cube_3ds",children:[i.jsx("path",{d:"M563.902 78.301L507.952 110.604V132.139L563.902 99.836V78.301Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke}),i.jsx("path",{d:"M452.002 78.301L507.952 110.604V132.139L452.002 99.836V78.301Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke}),i.jsx("path",{d:"M507.952 46L452.002 78.303L507.952 110.606L563.902 78.303L507.952 46Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke})]}),i.jsxs("g",{"data-anim":"cube_capture",children:[i.jsx("path",{d:"M573.201 345.094L490.312 392.95V424.854L573.201 376.998V345.094Z",fill:`url(#${a("captureRightGrad")})`,stroke:`url(#${a("captureRightStroke")})`}),i.jsx("rect",{width:"95.7123",height:"31.9041",transform:"matrix(-0.866025 -0.5 -2.20305e-08 1 490.312 392.953)",fill:"#22C55E",stroke:`url(#${a("captureLeftStroke")})`}),i.jsx("path",{d:"M490.312 297.238L407.423 345.094L490.312 392.951L573.201 345.094L490.312 297.238Z",fill:`url(#${a("captureTopGrad")})`,stroke:`url(#${a("captureTopStroke")})`})]}),i.jsx("circle",{"data-anim":"gl_purchase",cx:"154",cy:"297",r:"32",fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"}),i.jsx("circle",{"data-anim":"gl_rule",cx:"122",cy:"104",r:"26",fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"}),i.jsx("circle",{"data-anim":"gl_3ds",cx:"508",cy:"78",r:"26",fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"}),i.jsx("circle",{"data-anim":"gl_capture",cx:"490",cy:"345",r:"32",fill:"#22C55E",opacity:"0",className:"app-scene-glow"}),i.jsxs("g",{"data-anim":"part",opacity:"0",children:[i.jsx("polygon",{points:"0,-6 6.2,-3 0,0 -6.2,-3",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-6.2,-3 0,0 0,4 -6.2,1",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 6.2,-3 6.2,1 0,4",fill:"#5A6BFF"})]}),i.jsxs("g",{"data-anim":"trail1",opacity:"0",children:[i.jsx("polygon",{points:"0,-3.5 3.6,-1.7 0,0 -3.6,-1.7",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-3.6,-1.7 0,0 0,2.3 -3.6,.6",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 3.6,-1.7 3.6,.6 0,2.3",fill:"#5A6BFF"})]}),i.jsxs("g",{"data-anim":"trail2",opacity:"0",children:[i.jsx("polygon",{points:"0,-2.5 2.6,-1.2 0,0 -2.6,-1.2",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-2.6,-1.2 0,0 0,1.6 -2.6,.4",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 2.6,-1.2 2.6,.4 0,1.6",fill:"#5A6BFF"})]}),i.jsxs("g",{"data-anim":"pingRule",opacity:"0",children:[i.jsx("polygon",{points:"0,-4 4.1,-2 0,0 -4.1,-2",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-4.1,-2 0,0 0,2.6 -4.1,.6",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 4.1,-2 4.1,.6 0,2.6",fill:"#5A6BFF"})]}),i.jsxs("g",{"data-anim":"ping3ds",opacity:"0",children:[i.jsx("polygon",{points:"0,-4 4.1,-2 0,0 -4.1,-2",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-4.1,-2 0,0 0,2.6 -4.1,.6",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 4.1,-2 4.1,.6 0,2.6",fill:"#5A6BFF"})]}),i.jsx(ks,{topFaceFill:s.yunoTopFaceFill,clipId:a("clip_dots")})]})}const $i={f1:"#3E4FE0",f2:"#0617A9",f3:"#5A6BFF"},Pu={f1:"#EF4444",f2:"#AA0707",f3:"#FF5E5E"},mA={f1:"#22C55E",f2:"#06A541",f3:"#44ED82"},o3=2400,xA=800,s3=2400,vA=800,a3=2200,yA=600,i3=2200,bA=800,l3=o3,Dd=l3+xA,Hp=Dd+s3,Ad=Hp+vA,c3=Ad+a3,Td=c3+yA,u3=Td+i3,Zm=u3+bA,wA=Hp,CA=6,Oo=55,SA=.15,EA=.18,NA=.04,Vi={x:328.889,y:232},qm={x:477.95,y:137},_A={x:141.78,y:98},jA={x:165.95,y:344},kA={pulseNeutral:"#737373",pulseOpacity:.4,yunoTopFaceFill:"black"},RA={pulseNeutral:"#3E4FE0",pulseOpacity:.25,yunoTopFaceFill:"white"},Xm=[{cx:165.95,cy:355},{cx:328.889,cy:248},{cx:477.95,cy:148}],Jm=[{cx:165.95,cy:344,r:40},{cx:328.889,cy:232,r:70}];function Gs(e,t,n){const r=Math.hypot(e.x-t.x,e.y-t.y);return r<n*.4?0:r<n*.7?(r-n*.4)/(n*.3):1}function MA({className:e,alt:t}){const n=zn(),r=C.useId(),o=C.useRef(null),s=n?kA:RA,a=l=>`${r}-${l}`;return ar(o,l=>{const c=O=>l.querySelector(`[data-anim="${O}"]`),u=O=>Array.from(l.querySelectorAll(`[data-anim="${O}"]`)),f=c("pathCustomerToMerchant"),d=c("pathMerchantToBank"),p=c("pathBankToMerchant"),h=c("pathMerchantToYuno"),m=c("pathMerchantToCustomer"),x=f.getTotalLength(),v=d.getTotalLength(),y=p.getTotalLength(),b=h.getTotalLength(),S=m.getTotalLength(),w=Jm.map((O,R)=>({...O,el:u("glow")[R]})),E=Xm.map((O,R)=>({...O,scale:1,el:u("cube")[R]})),_=u("pSlot").map(O=>({el:O,active:!1,born:0,won:!0}));let k=0;function I(O,R){if(O>Zm)return null;if(O<l3){const L=O/o3,V=Ve(L),D=Ae(f,x,V),$=Math.min(1,L/.05);return{pos:D,col:Pu,op:$*Gs(D,Vi,Oo)}}if(O<Dd)return{pos:Vi,col:Pu,op:0};if(O<Hp){const L=(O-Dd)/s3,V=Ve(L),D=Ae(d,v,V),$=Math.min(1,L/.08);return{pos:D,col:$i,op:$*Gs(D,qm,Oo)}}if(O<Ad)return{pos:qm,col:$i,op:0};if(O<c3){const L=(O-Ad)/a3,V=Ve(L),D=Ae(p,y,V),$=Math.min(1,L/.08);return{pos:D,col:$i,op:$*Gs(D,Vi,Oo)}}if(O<Td)return{pos:Vi,col:$i,op:0};if(O<u3){const L=(O-Td)/i3,V=Ve(L),D=Math.min(1,L/.08),$=L>.85?Math.max(0,(1-L)/.15):1;if(R){const P=Ae(h,b,V);return{pos:P,col:mA,op:D*$*Gs(P,_A,Oo)}}const z=Ae(m,S,V);return{pos:z,col:Pu,op:D*$*Gs(z,jA,Oo)}}return null}function F(O){w.forEach(R=>{let L=0;O.forEach(V=>{const D=Math.hypot(V.x-R.cx,V.y-R.cy),$=Math.max(0,1-D/R.r);$>L&&(L=$)}),R.el.setAttribute("opacity",(L*L*.12).toFixed(3))})}function U(O){E.forEach(R=>{let L=1;O.forEach(D=>{const $=Math.hypot(D.x-R.cx,D.y-R.cy),z=Math.max(0,1-$/Oo),P=1+z*z*SA;P>L&&(L=P)});const V=L>R.scale?EA:NA;R.scale+=(L-R.scale)*V,R.el.setAttribute("transform",`translate(${R.cx},${R.cy}) scale(${R.scale.toFixed(4)}) translate(${-R.cx},${-R.cy})`)})}return O=>{if(O>=k){const L=_.find(V=>!V.active||O-V.born>Zm);L&&(L.active=!0,L.born=O,L.won=Math.random()<.5,k=O+wA)}const R=[];for(const L of _){if(!L.active){L.el.setAttribute("opacity","0");continue}const V=O-L.born,D=I(V,L.won);if(!D){L.active=!1,L.el.setAttribute("opacity","0");continue}D.op>.001?(ye(L.el,D.pos,D.op),Be(L.el,D.col)):L.el.setAttribute("opacity","0"),R.push(D.pos)}R.length>0?F(R):w.forEach(L=>L.el.setAttribute("opacity","0")),U(R)}}),i.jsxs(Wn,{ref:o,maskSrc:sr.chargebacks[n?"dark":"light"],alt:t,variant:"chargebacks",className:e,children:[i.jsx("defs",{children:i.jsx("clipPath",{id:a("clip_dots"),children:i.jsx("rect",{width:"38.194",height:"38.2849",fill:"white",transform:"matrix(0.83205 -0.5547 0.830139 0.557556 109.894 98.1328)"})})}),i.jsx("path",{"data-anim":"pathCustomerToMerchant",d:"M191,326.5 L272.121,279.202",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathMerchantToBank",d:"M375.5 211.004L444 171.5L477.95 137.303",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathBankToMerchant",d:"M509.557,172.699 L564.964,204.701C566.397,205.528 566.399,206.869 564.968,207.698 L416.004,293.991C414.568,294.823 412.235,294.823 410.799,293.991 L385.054,279.069 L328.889,232",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathMerchantToYuno",d:"M290,206.498 L215.5,163.498 L141.78,98",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathMerchantToCustomer",d:"M354.925,296.539 L384.724,313.81C386.149,314.636 386.152,315.971 384.732,316.8 L239.076,401.787C237.642,402.624 235.302,402.626 233.862,401.792 L179.482,370.3",fill:"none",stroke:"none"}),i.jsx("path",{d:"M191 326.5L272.121 279.202",fill:"none",stroke:s.pulseNeutral,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity,className:"app-scene-pulse-line",style:{animationDuration:"4.4s"}}),i.jsx("path",{d:"M375.5 211.004L444 171.5",fill:"none",stroke:s.pulseNeutral,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity,className:"app-scene-pulse-line",style:{animationDuration:"4.4s",animationDelay:".6s"}}),i.jsx("path",{d:"M206 387L233.862 401.792C235.302 402.626 237.642 402.624 239.076 401.787L384.732 316.8C386.152 315.971 386.149 314.636 384.724 313.81L354.925 296.539",fill:"none",stroke:s.pulseNeutral,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity,className:"app-scene-pulse-line",style:{animationDuration:"5.6s",animationDelay:"1.2s"}}),i.jsx("path",{d:"M385.054 279.069L410.799 293.991C412.235 294.823 414.568 294.823 416.004 293.991L564.968 207.698C566.399 206.869 566.397 205.528 564.964 204.701L509.557 172.699",fill:"none",stroke:s.pulseNeutral,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity,className:"app-scene-pulse-line",style:{animationDuration:"5.6s",animationDelay:"1.8s"}}),i.jsx("path",{d:"M215.5 163.498L290 206.498",fill:"none",stroke:s.pulseNeutral,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity,className:"app-scene-pulse-line",style:{animationDuration:"4s",animationDelay:"2.4s"}}),Xm.map((l,c)=>{const u=[{x:110,y:312,w:112,h:87},{x:246,y:184,w:166,h:128},{x:422,y:105,w:112,h:87}][c];return i.jsx("g",{"data-anim":"cube",children:i.jsx("rect",{x:u.x,y:u.y,width:u.w,height:u.h,fill:"none",stroke:"none"})},c)}),Jm.map((l,c)=>i.jsx("circle",{"data-anim":"glow",cx:l.cx,cy:l.cy,r:l.r,fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"},c)),Array.from({length:CA},(l,c)=>i.jsxs("g",{"data-anim":"pSlot",opacity:"0",children:[i.jsx("polygon",{points:"0,-6 6.2,-3 0,0 -6.2,-3",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-6.2,-3 0,0 0,4 -6.2,1",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 6.2,-3 6.2,1 0,4",fill:"#5A6BFF"})]},c)),i.jsx(ks,{cx:141.78,cy:98.074,topFaceFill:s.yunoTopFaceFill,clipId:a("clip_dots")})]})}const Pd=2400,Od=2200,Ld=2200,Id=2200,DA=800,AA=Pd+Od+Ld+Id+DA,TA=55,PA=.15,OA=.18,LA=.04,IA={pulseNeutral:"#737373",pulseNeutralOpacity:.4,pulseOptionOpacity:.35,yunoTopFaceFill:"black"},FA={pulseNeutral:"#3E4FE0",pulseNeutralOpacity:.25,pulseOptionOpacity:.2,yunoTopFaceFill:"white"},Qm=[{name:"availability",cx:122.597,cy:115},{name:"3x",cx:424,cy:89},{name:"6x",cx:478,cy:120},{name:"12x",cx:528,cy:149},{name:"brand",cx:239,cy:370},{name:"bin",cx:94,cy:280},{name:"amount",cx:423,cy:365}],e1=[{cx:122,cy:104,r:45,fill:"#3E4FE0"},{cx:239,cy:370,r:40,fill:"#737373"},{cx:94,cy:280,r:40,fill:"#737373"},{cx:423,cy:365,r:40,fill:"#737373"},{cx:424,cy:89,r:35,fill:"#3E4FE0"},{cx:478,cy:120,r:35,fill:"#3E4FE0"},{cx:528,cy:149,r:35,fill:"#3E4FE0"}];function $A({className:e,alt:t}){const n=zn(),r=C.useId(),o=C.useRef(null),s=n?IA:FA,a=l=>`${r}-${l}`;return ar(o,l=>{const c=O=>l.querySelector(`[data-anim="${O}"]`),u=O=>Array.from(l.querySelectorAll(`[data-anim="${O}"]`)),f={availToYuno:c("pathAvailToYuno"),yunoToBrand:c("pathYunoToBrand"),yunoToBin:c("pathYunoToBin"),yunoToAmount:c("pathYunoToAmount"),yunoTo3x:c("pathYunoTo3x"),yunoTo6x:c("pathYunoTo6x"),yunoTo12x:c("pathYunoTo12x")},d=Object.fromEntries(Object.entries(f).map(([O,R])=>[O,R.getTotalLength()])),p=c("pAvail"),h=c("pBrand"),m=c("pBin"),x=c("pAmount"),v=c("pOpt3x"),y=c("pOpt6x"),b=c("pOpt12x"),S=e1.map((O,R)=>({...O,el:u("glow")[R]})),w=Qm.map((O,R)=>({...O,scale:1,el:u("cube")[R]}));function E(O){S.forEach(R=>{let L=0;O.forEach(V=>{const D=Math.hypot(V.x-R.cx,V.y-R.cy),$=Math.max(0,1-D/R.r);$>L&&(L=$)}),R.el.setAttribute("opacity",(L*L*.12).toFixed(3))})}function N(O){w.forEach(R=>{let L=1;O.forEach(D=>{const $=Math.hypot(D.x-R.cx,D.y-R.cy),z=Math.max(0,1-$/TA),P=1+z*z*PA;P>L&&(L=P)});const V=L>R.scale?OA:LA;R.scale+=(L-R.scale)*V,R.el.setAttribute("transform",`translate(${R.cx},${R.cy}) scale(${R.scale.toFixed(4)}) translate(${-R.cx},${-R.cy})`)})}function _(){[p,h,m,x,v,y,b].forEach(O=>O.setAttribute("opacity","0")),S.forEach(O=>O.el.setAttribute("opacity","0"))}function k(O,R){const L=Math.abs(O.x-R.x),V=Math.abs(O.y-R.y);if(L<R.rx&&V<R.ry)return 0;const D=Math.max(0,1-Math.max(L/R.rx,V/R.ry));return D>.7?Math.max(0,(1-D)/.3):1}const I={x:410,y:85,rx:48,ry:30},F={x:464,y:116,rx:48,ry:30},U={x:514,y:145,rx:48,ry:30};return O=>{const R=O%AA,L=[],V=Pd,D=V+Od,$=D+Ld,z=$+Id;if(R<V){const P=R/Pd,M=Ve(P),G=Math.min(1,P/.05),A=P>.85?Math.max(0,(1-P)/.15):1,W=Ae(f.availToYuno,d.availToYuno,M);ye(p,W,G*A),L.push(W),[h,m,x,v,y,b].forEach(H=>H.setAttribute("opacity","0"))}else if(R<D){const P=(R-V)/Od,M=Ve(P),G=Math.min(1,P/.08),A=P>.88?Math.max(0,(1-P)/.12):1,W=G*A,H=Ae(f.yunoToBrand,d.yunoToBrand,M);ye(h,H,W),L.push(H);const T=Ae(f.yunoToBin,d.yunoToBin,M);ye(m,T,W),L.push(T);const B=Ae(f.yunoToAmount,d.yunoToAmount,M);ye(x,B,W),L.push(B),p.setAttribute("opacity","0"),[v,y,b].forEach(Y=>Y.setAttribute("opacity","0"))}else if(R<$){const P=(R-D)/Ld,G=1-Ve(P),A=Math.min(1,P/.08),W=P>.88?Math.max(0,(1-P)/.12):1,H=A*W,T=Ae(f.yunoToBrand,d.yunoToBrand,G);ye(h,T,H),L.push(T);const B=Ae(f.yunoToBin,d.yunoToBin,G);ye(m,B,H),L.push(B);const Y=Ae(f.yunoToAmount,d.yunoToAmount,G);ye(x,Y,H),L.push(Y),p.setAttribute("opacity","0"),[v,y,b].forEach(Z=>Z.setAttribute("opacity","0"))}else if(R<z){const P=(R-$)/Id,M=Ve(P),G=Math.min(1,P/.08),A=Ae(f.yunoTo3x,d.yunoTo3x,M),W=G*k(A,I);ye(v,A,W),W>0&&L.push(A);const H=Ae(f.yunoTo6x,d.yunoTo6x,M),T=G*k(H,F);ye(y,H,T),T>0&&L.push(H);const B=Ae(f.yunoTo12x,d.yunoTo12x,M),Y=G*k(B,U);ye(b,B,Y),Y>0&&L.push(B),p.setAttribute("opacity","0"),[h,m,x].forEach(Z=>Z.setAttribute("opacity","0"))}else _();L.length>0?E(L):S.forEach(P=>P.el.setAttribute("opacity","0")),N(L)}}),i.jsxs(Wn,{ref:o,maskSrc:sr.installments[n?"dark":"light"],alt:t,variant:"installments",className:e,children:[i.jsxs("defs",{children:[i.jsx("clipPath",{id:a("clipOptionCubes"),children:i.jsx("path",{fillRule:"evenodd",d:`M0,0 H592 V444 H0 Z
|
|
46
|
+
Defaulting to \`null\`.`}var Fy=Ty,oM=Ly;const $y=m.forwardRef(({className:e,value:t,...n},r)=>i.jsx(Fy,{ref:r,"data-slot":"progress",className:j("relative h-2 w-full overflow-hidden rounded-full bg-muted",e),...n,children:i.jsx(oM,{"data-slot":"progress-indicator",className:"h-full w-full flex-1 rounded-full bg-primary transition-transform",style:{transform:`translateX(-${100-(t||0)}%)`}})}));$y.displayName=Fy.displayName;const Tp=({value:e,...t})=>i.jsx($y,{value:e,...t});Tp.displayName="Progress";function zn(){const[e,t]=C.useState(()=>typeof document<"u"&&document.documentElement.classList.contains("dark"));return C.useEffect(()=>{if(typeof document>"u")return;const n=document.documentElement,r=()=>t(n.classList.contains("dark"));r();const o=new MutationObserver(r);return o.observe(n,{attributes:!0,attributeFilter:["class"]}),()=>o.disconnect()},[]),e}function Vy({lightSrc:e,darkSrc:t,className:n,...r}){const o=zn();return i.jsx("img",{src:o?t:e,className:n,...r})}function sM(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 aM=e=>{switch(e){case"success":return cM;case"info":return dM;case"warning":return uM;case"error":return fM;default:return null}},iM=Array(12).fill(0),lM=({visible:e,className:t})=>C.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},C.createElement("div",{className:"sonner-spinner"},iM.map((n,r)=>C.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),cM=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),uM=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},C.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"})),dM=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),fM=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),pM=C.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"},C.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),C.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),hM=()=>{const[e,t]=C.useState(document.hidden);return C.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let _d=1,mM=class{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,...o}=t,s=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:_d++,a=this.toasts.find(c=>c.id===s),l=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),a?this.toasts=this.toasts.map(c=>c.id===s?(this.publish({...c,...t,id:s,title:r}),{...c,...t,id:s,dismissible:l,title:r}):c):this.addToast({title:r,...o,dismissible:l,id:s}),s},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 o=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,a;const l=o.then(async u=>{if(a=["resolve",u],C.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(xM(u)&&!u.ok){s=!1;const d=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,g=typeof d=="object"&&!C.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:p,...g})}else if(u instanceof Error){s=!1;const d=typeof n.error=="function"?await n.error(u):n.error,p=typeof n.description=="function"?await n.description(u):n.description,g=typeof d=="object"&&!C.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:p,...g})}else if(n.success!==void 0){s=!1;const d=typeof n.success=="function"?await n.success(u):n.success,p=typeof n.description=="function"?await n.description(u):n.description,g=typeof d=="object"&&!C.isValidElement(d)?d:{message:d};this.create({id:r,type:"success",description:p,...g})}}).catch(async u=>{if(a=["reject",u],n.error!==void 0){s=!1;const f=typeof n.error=="function"?await n.error(u):n.error,d=typeof n.description=="function"?await n.description(u):n.description,h=typeof f=="object"&&!C.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:d,...h})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((u,f)=>l.then(()=>a[0]==="reject"?f(a[1]):u(a[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=n?.id||_d++;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 It=new mM,gM=(e,t)=>{const n=t?.id||_d++;return It.addToast({title:e,...t,id:n}),n},xM=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",vM=gM,yM=()=>It.toasts,bM=()=>It.getActiveToasts(),Kn=Object.assign(vM,{success:It.success,info:It.info,warning:It.warning,error:It.error,custom:It.custom,message:It.message,promise:It.promise,dismiss:It.dismiss,loading:It.loading},{getHistory:yM,getToasts:bM});sM("[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 Li(e){return e.label!==void 0}const wM=3,CM="24px",SM="16px",jg=4e3,EM=356,NM=14,_M=45,jM=200;function kn(...e){return e.filter(Boolean).join(" ")}function kM(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const RM=e=>{var t,n,r,o,s,a,l,c,u;const{invert:f,toast:d,unstyled:p,interacting:h,setHeights:g,visibleToasts:x,heights:v,index:y,toasts:b,expanded:S,removeToast:w,defaultRichColors:E,closeButton:N,style:_,cancelButtonStyle:k,actionButtonStyle:I,className:F="",descriptionClassName:U="",duration:O,position:R,gap:L,expandByDefault:V,classNames:D,icons:$,closeButtonAriaLabel:z="Close toast"}=e,[T,M]=C.useState(null),[G,A]=C.useState(null),[W,H]=C.useState(!1),[P,B]=C.useState(!1),[Y,Z]=C.useState(!1),[q,oe]=C.useState(!1),[ne,le]=C.useState(!1),[Ee,re]=C.useState(0),[ce,K]=C.useState(0),Q=C.useRef(d.duration||O||jg),ae=C.useRef(null),J=C.useRef(null),be=y===0,ge=y+1<=x,fe=d.type,Te=d.dismissible!==!1,Pe=d.className||"",We=d.descriptionClassName||"",nt=C.useMemo(()=>v.findIndex(ee=>ee.toastId===d.id)||0,[v,d.id]),dt=C.useMemo(()=>{var ee;return(ee=d.closeButton)!=null?ee:N},[d.closeButton,N]),fn=C.useMemo(()=>d.duration||O||jg,[d.duration,O]),Ot=C.useRef(0),Nt=C.useRef(0),je=C.useRef(0),Me=C.useRef(null),[Ue,Lt]=R.split("-"),Gt=C.useMemo(()=>v.reduce((ee,rt,ft)=>ft>=nt?ee:ee+rt.height,0),[v,nt]),Ir=hM(),_o=d.invert||f,Hn=fe==="loading";Nt.current=C.useMemo(()=>nt*L+Gt,[nt,Gt]),C.useEffect(()=>{Q.current=fn},[fn]),C.useEffect(()=>{H(!0)},[]),C.useEffect(()=>{const ee=J.current;if(ee){const rt=ee.getBoundingClientRect().height;return K(rt),g(ft=>[{toastId:d.id,height:rt,position:d.position},...ft]),()=>g(ft=>ft.filter(_t=>_t.toastId!==d.id))}},[g,d.id]),C.useLayoutEffect(()=>{if(!W)return;const ee=J.current,rt=ee.style.height;ee.style.height="auto";const ft=ee.getBoundingClientRect().height;ee.style.height=rt,K(ft),g(_t=>_t.find(Xe=>Xe.toastId===d.id)?_t.map(Xe=>Xe.toastId===d.id?{...Xe,height:ft}:Xe):[{toastId:d.id,height:ft,position:d.position},..._t])},[W,d.title,d.description,g,d.id,d.jsx,d.action,d.cancel]);const pe=C.useCallback(()=>{B(!0),re(Nt.current),g(ee=>ee.filter(rt=>rt.toastId!==d.id)),setTimeout(()=>{w(d)},jM)},[d,w,g,Nt]);C.useEffect(()=>{if(d.promise&&fe==="loading"||d.duration===1/0||d.type==="loading")return;let ee;return S||h||Ir?(()=>{if(je.current<Ot.current){const _t=new Date().getTime()-Ot.current;Q.current=Q.current-_t}je.current=new Date().getTime()})():Q.current!==1/0&&(Ot.current=new Date().getTime(),ee=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),pe()},Q.current)),()=>clearTimeout(ee)},[S,h,d,fe,Ir,pe]),C.useEffect(()=>{d.delete&&(pe(),d.onDismiss==null||d.onDismiss.call(d,d))},[pe,d.delete]);function _e(){var ee;if($?.loading){var rt;return C.createElement("div",{className:kn(D?.loader,d==null||(rt=d.classNames)==null?void 0:rt.loader,"sonner-loader"),"data-visible":fe==="loading"},$.loading)}return C.createElement(lM,{className:kn(D?.loader,d==null||(ee=d.classNames)==null?void 0:ee.loader),visible:fe==="loading"})}const xe=d.icon||$?.[fe]||aM(fe);var ke,gt;return C.createElement("li",{tabIndex:0,ref:J,className:kn(F,Pe,D?.toast,d==null||(t=d.classNames)==null?void 0:t.toast,D?.default,D?.[fe],d==null||(n=d.classNames)==null?void 0:n[fe]),"data-sonner-toast":"","data-rich-colors":(ke=d.richColors)!=null?ke:E,"data-styled":!(d.jsx||d.unstyled||p),"data-mounted":W,"data-promise":!!d.promise,"data-swiped":ne,"data-removed":P,"data-visible":ge,"data-y-position":Ue,"data-x-position":Lt,"data-index":y,"data-front":be,"data-swiping":Y,"data-dismissible":Te,"data-type":fe,"data-invert":_o,"data-swipe-out":q,"data-swipe-direction":G,"data-expanded":!!(S||V&&W),"data-testid":d.testId,style:{"--index":y,"--toasts-before":y,"--z-index":b.length-y,"--offset":`${P?Ee:Nt.current}px`,"--initial-height":V?"auto":`${ce}px`,..._,...d.style},onDragEnd:()=>{Z(!1),M(null),Me.current=null},onPointerDown:ee=>{ee.button!==2&&(Hn||!Te||(ae.current=new Date,re(Nt.current),ee.target.setPointerCapture(ee.pointerId),ee.target.tagName!=="BUTTON"&&(Z(!0),Me.current={x:ee.clientX,y:ee.clientY})))},onPointerUp:()=>{var ee,rt,ft;if(q||!Te)return;Me.current=null;const _t=Number(((ee=J.current)==null?void 0:ee.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),lr=Number(((rt=J.current)==null?void 0:rt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Xe=new Date().getTime()-((ft=ae.current)==null?void 0:ft.getTime()),en=T==="x"?_t:lr,_i=Math.abs(en)/Xe;if(Math.abs(en)>=_M||_i>.11){re(Nt.current),d.onDismiss==null||d.onDismiss.call(d,d),A(T==="x"?_t>0?"right":"left":lr>0?"down":"up"),pe(),oe(!0);return}else{var pn,hn;(pn=J.current)==null||pn.style.setProperty("--swipe-amount-x","0px"),(hn=J.current)==null||hn.style.setProperty("--swipe-amount-y","0px")}le(!1),Z(!1),M(null)},onPointerMove:ee=>{var rt,ft,_t;if(!Me.current||!Te||((rt=window.getSelection())==null?void 0:rt.toString().length)>0)return;const Xe=ee.clientY-Me.current.y,en=ee.clientX-Me.current.x;var _i;const pn=(_i=e.swipeDirections)!=null?_i:kM(R);!T&&(Math.abs(en)>1||Math.abs(Xe)>1)&&M(Math.abs(en)>Math.abs(Xe)?"x":"y");let hn={x:0,y:0};const Sm=Fr=>1/(1.5+Math.abs(Fr)/20);if(T==="y"){if(pn.includes("top")||pn.includes("bottom"))if(pn.includes("top")&&Xe<0||pn.includes("bottom")&&Xe>0)hn.y=Xe;else{const Fr=Xe*Sm(Xe);hn.y=Math.abs(Fr)<Math.abs(Xe)?Fr:Xe}}else if(T==="x"&&(pn.includes("left")||pn.includes("right")))if(pn.includes("left")&&en<0||pn.includes("right")&&en>0)hn.x=en;else{const Fr=en*Sm(en);hn.x=Math.abs(Fr)<Math.abs(en)?Fr:en}(Math.abs(hn.x)>0||Math.abs(hn.y)>0)&&le(!0),(ft=J.current)==null||ft.style.setProperty("--swipe-amount-x",`${hn.x}px`),(_t=J.current)==null||_t.style.setProperty("--swipe-amount-y",`${hn.y}px`)}},dt&&!d.jsx&&fe!=="loading"?C.createElement("button",{"aria-label":z,"data-disabled":Hn,"data-close-button":!0,onClick:Hn||!Te?()=>{}:()=>{pe(),d.onDismiss==null||d.onDismiss.call(d,d)},className:kn(D?.closeButton,d==null||(r=d.classNames)==null?void 0:r.closeButton)},(gt=$?.close)!=null?gt:pM):null,(fe||d.icon||d.promise)&&d.icon!==null&&($?.[fe]!==null||d.icon)?C.createElement("div",{"data-icon":"",className:kn(D?.icon,d==null||(o=d.classNames)==null?void 0:o.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||_e():null,d.type!=="loading"?xe:null):null,C.createElement("div",{"data-content":"",className:kn(D?.content,d==null||(s=d.classNames)==null?void 0:s.content)},C.createElement("div",{"data-title":"",className:kn(D?.title,d==null||(a=d.classNames)==null?void 0:a.title)},d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title),d.description?C.createElement("div",{"data-description":"",className:kn(U,We,D?.description,d==null||(l=d.classNames)==null?void 0:l.description)},typeof d.description=="function"?d.description():d.description):null),C.isValidElement(d.cancel)?d.cancel:d.cancel&&Li(d.cancel)?C.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||k,onClick:ee=>{Li(d.cancel)&&Te&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,ee),pe())},className:kn(D?.cancelButton,d==null||(c=d.classNames)==null?void 0:c.cancelButton)},d.cancel.label):null,C.isValidElement(d.action)?d.action:d.action&&Li(d.action)?C.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||I,onClick:ee=>{Li(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,ee),!ee.defaultPrevented&&pe())},className:kn(D?.actionButton,d==null||(u=d.classNames)==null?void 0:u.actionButton)},d.action.label):null)};function kg(){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 MM(e,t){const n={};return[e,t].forEach((r,o)=>{const s=o===1,a=s?"--mobile-offset":"--offset",l=s?SM:CM;function c(u){["top","right","bottom","left"].forEach(f=>{n[`${a}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${a}-${u}`]=l:n[`${a}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(l)}),n}const DM=C.forwardRef(function(t,n){const{id:r,invert:o,position:s="bottom-right",hotkey:a=["altKey","KeyT"],expand:l,closeButton:c,className:u,offset:f,mobileOffset:d,theme:p="light",richColors:h,duration:g,style:x,visibleToasts:v=wM,toastOptions:y,dir:b=kg(),gap:S=NM,icons:w,containerAriaLabel:E="Notifications"}=t,[N,_]=C.useState([]),k=C.useMemo(()=>r?N.filter(W=>W.toasterId===r):N.filter(W=>!W.toasterId),[N,r]),I=C.useMemo(()=>Array.from(new Set([s].concat(k.filter(W=>W.position).map(W=>W.position)))),[k,s]),[F,U]=C.useState([]),[O,R]=C.useState(!1),[L,V]=C.useState(!1),[D,$]=C.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),z=C.useRef(null),T=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),M=C.useRef(null),G=C.useRef(!1),A=C.useCallback(W=>{_(H=>{var P;return(P=H.find(B=>B.id===W.id))!=null&&P.delete||It.dismiss(W.id),H.filter(({id:B})=>B!==W.id)})},[]);return C.useEffect(()=>It.subscribe(W=>{if(W.dismiss){requestAnimationFrame(()=>{_(H=>H.map(P=>P.id===W.id?{...P,delete:!0}:P))});return}setTimeout(()=>{ho.flushSync(()=>{_(H=>{const P=H.findIndex(B=>B.id===W.id);return P!==-1?[...H.slice(0,P),{...H[P],...W},...H.slice(P+1)]:[W,...H]})})})}),[N]),C.useEffect(()=>{if(p!=="system"){$(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?$("dark"):$("light")),typeof window>"u")return;const W=window.matchMedia("(prefers-color-scheme: dark)");try{W.addEventListener("change",({matches:H})=>{$(H?"dark":"light")})}catch{W.addListener(({matches:P})=>{try{$(P?"dark":"light")}catch(B){console.error(B)}})}},[p]),C.useEffect(()=>{N.length<=1&&R(!1)},[N]),C.useEffect(()=>{const W=H=>{var P;if(a.every(Z=>H[Z]||H.code===Z)){var Y;R(!0),(Y=z.current)==null||Y.focus()}H.code==="Escape"&&(document.activeElement===z.current||(P=z.current)!=null&&P.contains(document.activeElement))&&R(!1)};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[a]),C.useEffect(()=>{if(z.current)return()=>{M.current&&(M.current.focus({preventScroll:!0}),M.current=null,G.current=!1)}},[z.current]),C.createElement("section",{ref:n,"aria-label":`${E} ${T}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},I.map((W,H)=>{var P;const[B,Y]=W.split("-");return k.length?C.createElement("ol",{key:W,dir:b==="auto"?kg():b,tabIndex:-1,ref:z,className:u,"data-sonner-toaster":!0,"data-sonner-theme":D,"data-y-position":B,"data-x-position":Y,style:{"--front-toast-height":`${((P=F[0])==null?void 0:P.height)||0}px`,"--width":`${EM}px`,"--gap":`${S}px`,...x,...MM(f,d)},onBlur:Z=>{G.current&&!Z.currentTarget.contains(Z.relatedTarget)&&(G.current=!1,M.current&&(M.current.focus({preventScroll:!0}),M.current=null))},onFocus:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||G.current||(G.current=!0,M.current=Z.relatedTarget)},onMouseEnter:()=>R(!0),onMouseMove:()=>R(!0),onMouseLeave:()=>{L||R(!1)},onDragEnd:()=>R(!1),onPointerDown:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||V(!0)},onPointerUp:()=>V(!1)},k.filter(Z=>!Z.position&&H===0||Z.position===W).map((Z,q)=>{var oe,ne;return C.createElement(RM,{key:Z.id,icons:w,index:q,toast:Z,defaultRichColors:h,duration:(oe=y?.duration)!=null?oe:g,className:y?.className,descriptionClassName:y?.descriptionClassName,invert:o,visibleToasts:v,closeButton:(ne=y?.closeButton)!=null?ne:c,interacting:L,position:W,style:y?.style,unstyled:y?.unstyled,classNames:y?.classNames,cancelButtonStyle:y?.cancelButtonStyle,actionButtonStyle:y?.actionButtonStyle,closeButtonAriaLabel:y?.closeButtonAriaLabel,removeToast:A,toasts:k.filter(le=>le.position==Z.position),heights:F.filter(le=>le.position==Z.position),setHeights:U,expandByDefault:l,gap:S,expanded:O,swipeDirections:t.swipeDirections})})):null}))}),AM=({position:e="bottom-center",...t})=>i.jsx(DM,{className:"toaster group",position:e,toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-card group-[.toaster]:text-card-foreground group-[.toaster]:border group-[.toaster]:border-border group-[.toaster]:shadow-lg",content:"w-full",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"},style:{minWidth:"300px",maxWidth:"420px"}},...t});function PM({...e}){return i.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}function TM({className:e,...t}){return i.jsx("ol",{"data-slot":"breadcrumb-list",className:j("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",e),...t})}function Rg({className:e,...t}){return i.jsx("li",{"data-slot":"breadcrumb-item",className:j("inline-flex items-center gap-1.5",e),...t})}function OM({asChild:e,className:t,...n}){const r=e?Cc:"a";return i.jsx(r,{"data-slot":"breadcrumb-link",className:j("hover:text-foreground transition-colors",t),...n})}function LM({className:e,...t}){return i.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:j("text-foreground font-normal",e),...t})}function IM({children:e,className:t,...n}){return i.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:j("[&>svg]:size-3.5",t),...n,children:e??i.jsx(X,{name:"CaretRight",className:"size-3.5"})})}function FM({className:e,...t}){return i.jsxs("span",{"data-slot":"breadcrumb-ellipsis",role:"presentation","aria-hidden":"true",className:j("flex size-9 items-center justify-center",e),...t,children:[i.jsx(X,{name:"DotsThree",className:"size-4"}),i.jsx("span",{className:"sr-only",children:"More"})]})}const By=C.forwardRef(({items:e,separator:t,maxItems:n=0,className:r},o)=>{const s=n>0&&e.length>n,a=s?[e[0],null,...e.slice(-(n-2))]:e,l=s?e.slice(1,e.length-(n-2)):[],u=(g=>{for(let x=g.length-1;x>=0;x--)if(g[x])return x;return-1})(a),f=()=>i.jsx(IM,{children:t}),d=g=>i.jsxs(Cd,{children:[i.jsxs(Sd,{className:"flex items-center gap-1 text-sm text-muted-foreground hover:text-neutral-700 transition-colors",children:[g.label,i.jsx(X,{name:"CaretDown",className:"size-4"})]}),i.jsx(Ed,{children:g.dropdown?.map((x,v)=>i.jsx(Nd,{asChild:!0,children:i.jsx("a",{href:x.href,children:x.label})},v))})]}),p=(g,x)=>x?i.jsx(LM,{children:g.label}):i.jsx(OM,{href:g.href,children:g.label}),h=()=>i.jsxs(i.Fragment,{children:[i.jsx(Rg,{children:i.jsxs(Cd,{children:[i.jsx(Sd,{children:i.jsx(FM,{})}),i.jsx(Ed,{children:l.map((g,x)=>i.jsx(Nd,{asChild:!0,children:i.jsx("a",{href:g.href,children:g.label})},x))})]})}),f()]});return i.jsx(PM,{ref:o,className:r,children:i.jsx(TM,{children:a.map((g,x)=>{if(g===null&&l.length>0)return i.jsx(C.Fragment,{children:h()},x);if(!g)return null;const v=x===u;return i.jsxs(C.Fragment,{children:[i.jsx(Rg,{children:g.dropdown?d(g):p(g,v)}),x<a.length-1&&g&&f()]},x)})})})});By.displayName="Breadcrumb";const zy=({className:e,...t})=>i.jsx("nav",{role:"navigation","aria-label":"pagination",className:j("mx-auto flex w-full justify-center",e),...t});zy.displayName="Pagination";const Op=m.forwardRef(({className:e,...t},n)=>i.jsx("ul",{ref:n,className:j("flex flex-row items-center gap-1",e),...t}));Op.displayName="PaginationContent";const ro=m.forwardRef(({className:e,...t},n)=>i.jsx("li",{ref:n,className:j("",e),...t}));ro.displayName="PaginationItem";const us=({className:e,isActive:t,size:n="icon",...r})=>{const o=r.href==null&&r.onClick!=null,s=r["aria-disabled"]===!0,a=l=>{r.onKeyDown?.(l),!(!o||s)&&(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),l.currentTarget.click())};return i.jsx("a",{"aria-current":t?"page":void 0,className:j(es({variant:t?"outline":"ghost",size:n}),o&&!s&&"cursor-pointer",e),...r,...o&&{role:"link",tabIndex:s?-1:r.tabIndex??0,onKeyDown:a}})};us.displayName="PaginationLink";const Lp=({className:e,size:t="default",label:n="Previous",ariaLabel:r="Go to previous page",...o})=>i.jsxs(us,{"aria-label":r,size:t,className:j("gap-1 ps-2.5 pe-4",e),...o,children:[i.jsx(X,{name:"CaretLeft",size:"sm"}),i.jsx("span",{children:n})]});Lp.displayName="PaginationPrevious";const Ip=({className:e,size:t="default",label:n="Next",ariaLabel:r="Go to next page",...o})=>i.jsxs(us,{"aria-label":r,size:t,className:j("gap-1 ps-4 pe-2.5",e),...o,children:[i.jsx("span",{children:n}),i.jsx(X,{name:"CaretRight",size:"sm"})]});Ip.displayName="PaginationNext";const Fp=({className:e,srLabel:t="More pages",...n})=>i.jsxs("span",{"aria-hidden":!0,className:j("flex size-9 items-center justify-center",e),...n,children:[i.jsx(X,{name:"DotsThree",className:"size-4"}),i.jsx("span",{className:"sr-only",children:t})]});Fp.displayName="PaginationEllipsis";const $M=(e,t,n)=>{if(t<=n)return Array.from({length:t},(l,c)=>c+1);const r=Math.max(e-1,1),o=Math.min(e+1,t),s=r>2,a=o<t-1;return!s&&a?[...Array.from({length:Math.min(3,t)},(c,u)=>u+1),"ellipsis",t]:s&&!a?[1,"ellipsis",...Array.from({length:3},(c,u)=>Math.max(t-2,1)+u).filter(c=>c<=t)]:s&&a?[1,"ellipsis",e,"ellipsis",t]:Array.from({length:t},(l,c)=>c+1)},VM=({currentPage:e,totalPages:t,maxVisiblePages:n,onPageClick:r,morePagesLabel:o})=>{if(!t)return i.jsx(ro,{children:i.jsx(us,{isActive:!0,children:e})});const s=(l,c)=>{l.preventDefault(),c!==e&&r?.(c)},a=$M(e,t,n);return i.jsx(i.Fragment,{children:a.map((l,c)=>l==="ellipsis"?i.jsx(ro,{children:i.jsx(Fp,{srLabel:o})},`ellipsis-${c}`):i.jsx(ro,{children:i.jsx(us,{onClick:u=>s(u,l),isActive:l===e,children:l})},l))})},Wy={previous:"Previous",next:"Next",morePages:"More pages",goToPreviousPage:"Go to previous page",goToNextPage:"Go to next page"},BM={previous:"Anterior",next:"Siguiente",morePages:"Más páginas",goToPreviousPage:"Ir a página anterior",goToNextPage:"Ir a página siguiente"},zM={previous:"前へ",next:"次へ",morePages:"その他のページ",goToPreviousPage:"前のページへ",goToNextPage:"次のページへ"},WM={previous:"السابق",next:"التالي",morePages:"صفحات أخرى",goToPreviousPage:"انتقل إلى الصفحة السابقة",goToNextPage:"انتقل إلى الصفحة التالية"},HM={previous:"Précédent",next:"Suivant",morePages:"Plus de pages",goToPreviousPage:"Aller à la page précédente",goToNextPage:"Aller à la page suivante"},GM={previous:"Anterior",next:"Próximo",morePages:"Mais páginas",goToPreviousPage:"Ir para página anterior",goToNextPage:"Ir para próxima página"},UM={previous:"Önceki",next:"Sonraki",morePages:"Daha fazla sayfa",goToPreviousPage:"Önceki sayfaya git",goToNextPage:"Sonraki sayfaya git"},YM={previous:"Назад",next:"Вперёд",morePages:"Ещё страницы",goToPreviousPage:"Перейти на предыдущую страницу",goToNextPage:"Перейти на следующую страницу"},KM={previous:"Zurück",next:"Weiter",morePages:"Weitere Seiten",goToPreviousPage:"Zur vorherigen Seite",goToNextPage:"Zur nächsten Seite"},ZM={previous:"上一页",next:"下一页",morePages:"更多页面",goToPreviousPage:"转到上一页",goToNextPage:"转到下一页"},qM={en:Wy,es:BM,ja:zM,ar:WM,fr:HM,pt:GM,tr:UM,ru:YM,de:KM,zh:ZM},XM=Wy;function JM(e){const t=e??Za();return qM[t]??XM}const Mg="pointer-events-none opacity-50",$p=C.forwardRef(({currentPage:e,totalPages:t,onPageClick:n,onClickNext:r,onClickPrev:o,disablePrevious:s=!1,disableNext:a=!1,showPreviousNext:l=!0,maxVisiblePages:c=5,lang:u,translations:f,actionName:d,className:p,...h},g)=>{const x=C.useMemo(()=>({...JM(u),...f}),[u,f]),v=e===1||s,y=(t?e>=t:!1)||a,b=w=>{w.preventDefault(),!v&&o?.()},S=w=>{w.preventDefault(),!y&&r?.()};return i.jsx(zy,{ref:g,className:p,"data-action-name":d,...h,children:i.jsxs(Op,{children:[l&&i.jsx(ro,{children:i.jsx(Lp,{onClick:b,"aria-disabled":v,className:v?Mg:"",label:x.previous,ariaLabel:x.goToPreviousPage})}),i.jsx(VM,{currentPage:e,totalPages:t,maxVisiblePages:c,onPageClick:n,morePagesLabel:x.morePages}),l&&i.jsx(ro,{children:i.jsx(Ip,{onClick:S,"aria-disabled":y,className:y?Mg:"",label:x.next,ariaLabel:x.goToNextPage})})]})})});$p.displayName="Pagination";const Vp=m.forwardRef(({className:e,title:t,titleId:n,onClose:r,onBack:o,otherActions:s,showCloseButton:a=!0,...l},c)=>i.jsxs("div",{ref:c,className:j("app-dialog-header","flex items-center justify-between p-6 border-b border-border",e),...l,children:[i.jsxs("div",{className:"flex items-center gap-4 flex-1",children:[o&&i.jsx("button",{onClick:o,className:j("inline-flex items-center justify-center size-6 rounded-sm opacity-70 hover:opacity-100 transition-opacity"),"aria-label":"Go back","data-testid":"dialog-back-button",children:i.jsx(X,{name:"ArrowLeft",className:"size-4"})}),t&&i.jsx("div",{id:n,className:j("text-lg font-semibold leading-none tracking-tight"),children:t})]}),i.jsxs("div",{className:"flex items-center gap-4",children:[s,a&&r&&i.jsx("button",{onClick:r,className:j("inline-flex items-center justify-center size-6 rounded-sm opacity-70 hover:opacity-100 transition-opacity"),"aria-label":"Close dialog","data-testid":"dialog-close-button",children:i.jsx(X,{name:"X",className:"size-4"})})]})]}));Vp.displayName="DialogHeader";const Bp=m.forwardRef(({className:e,children:t,...n},r)=>i.jsx("div",{ref:r,className:j("app-dialog-content","flex-1 overflow-auto p-6 text-muted-foreground",e),...n,children:t}));Bp.displayName="DialogContent";const zp=m.forwardRef(({className:e,buttons:t=[],...n},r)=>t.length===0?null:i.jsx("div",{ref:r,className:j("app-dialog-footer","flex items-center justify-end gap-3 p-6 border-t border-border",e),...n,children:t.map((o,s)=>i.jsx(ot,{...o},o.key||s))}));zp.displayName="DialogFooter";const $c=m.forwardRef(({children:e,current:t=!1,badge:n,disabled:r=!1,className:o,onClick:s,...a},l)=>{const c=a.href==null,u=r?-1:a.tabIndex??0,f=p=>{if(r){p.preventDefault();return}s?.(p)},d=p=>{a.onKeyDown?.(p),!(!c||r)&&(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),p.currentTarget.click())};return i.jsx("a",{ref:l,...a,className:j("box-border flex items-center justify-center gap-2 px-0 py-1.5 h-12",t&&"border-b-2 border-primary",!t&&"border-b-2 border-transparent",c&&!r&&"cursor-pointer",r&&"pointer-events-none cursor-not-allowed",o),onClick:f,onKeyDown:d,tabIndex:c?u:a.tabIndex,role:a.role??(c?"link":void 0),"aria-current":t?"page":void 0,"aria-disabled":r,children:i.jsxs("div",{className:j("flex items-center justify-center gap-2 px-2.5 py-2 rounded-md",!r&&!t&&"text-muted-foreground",!r&&t&&"text-foreground",r&&"text-muted-foreground opacity-50",!r&&!t&&"hover:bg-accent hover:text-accent-foreground"),children:[i.jsx("span",{className:"text-sm font-normal leading-5 whitespace-nowrap",children:e}),n&&i.jsx(Ze,{variant:"default",className:"min-w-5 h-5 px-1 rounded-full",children:n})]})})});$c.displayName="NavLink";const Wp=m.forwardRef(({tabs:e,defaultTab:t=0,onChange:n,className:r,contentClassName:o,navTabsClassName:s,rightSlot:a,keepMounted:l=!1,variant:c="underline"},u)=>{const[f,d]=m.useState(t),[p,h]=m.useState(()=>new Set([t]));m.useEffect(()=>{l&&h(x=>x.has(f)?x:new Set(x).add(f))},[l,f]),m.useEffect(()=>{d(t)},[t]);const g=(x,v)=>{v.disabled||(d(x),n?.(x,v))};return i.jsxs("div",{ref:u,className:j("flex flex-col",r),children:[i.jsxs("div",{className:"flex items-center justify-between gap-4",children:[i.jsx("nav",{className:j(c==="pill"?"inline-flex h-9 items-center justify-center rounded-md bg-accent p-1 text-muted-foreground":"flex gap-0",s),role:"tablist",children:e.map((x,v)=>{const y=x.id||`tab-${v}`,b=f===v;return c==="pill"?i.jsx("button",{type:"button",disabled:x.disabled,onClick:()=>g(v,x),role:"tab","aria-selected":b,"aria-controls":`tabpanel-${y}`,id:`tab-${y}`,"data-action-name":x.actionName,className:j("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-sm px-3 py-1 text-sm font-medium transition-all","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-50",b?"bg-card text-foreground shadow-xs":"text-muted-foreground"),children:x.label},y):i.jsx($c,{current:b,badge:x.badge,disabled:x.disabled,onClick:S=>{S.preventDefault(),g(v,x)},role:"tab","aria-selected":b,"aria-controls":`tabpanel-${y}`,id:`tab-${y}`,"data-action-name":x.actionName,children:x.label},y)})}),a&&i.jsx("div",{className:"shrink-0",children:a})]}),i.jsx("div",{className:j("mt-6",o),children:e.map((x,v)=>{const y=x.id||`tab-${v}`,b=f===v;return i.jsx("div",{role:"tabpanel",id:`tabpanel-${y}`,"aria-labelledby":`tab-${y}`,hidden:!b,className:j(!b&&"hidden"),children:l?p.has(v)&&x.content:b&&x.content},y)})})]})});Wp.displayName="NavTabs";function QM(e){return e==null||e===""}const pi=C.forwardRef(({label:e,value:t,copyable:n=!1,copyValue:r,badge:o=!1,badgeProps:s,orientation:a="vertical",labelWidth:l,emptyState:c="-",truncateValue:u=!1,className:f,...d},p)=>{const[h,g]=C.useState(!1),x=QM(t),v=r??(typeof t=="string"?t:""),y=n&&!x&&v.length>0,b=async()=>{try{await navigator?.clipboard?.writeText?.(v),g(!0),setTimeout(()=>g(!1),1500)}catch{}},S=(()=>{if(x)return i.jsx("span",{className:"text-sm text-muted-foreground",children:c});if(o)return i.jsx(Ze,{variant:"secondary",...s,children:t});const w=i.jsx("span",{className:j("text-sm text-muted-foreground",u&&"block max-w-full truncate"),children:t});return u&&typeof t=="string"?i.jsx(zt,{content:t,children:w}):w})();return i.jsxs("div",{ref:p,"data-testid":"data-item",className:j("flex min-w-0 overflow-hidden",a==="vertical"?"flex-col gap-2":"flex-row items-center gap-2",f),...d,children:[i.jsx("span",{className:"flex items-center gap-1 text-sm font-semibold text-foreground",style:a==="horizontal"&&l!==void 0?{width:ss(l),flexShrink:0}:void 0,children:e}),i.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[S,y&&i.jsx(zt,{content:h?"Copied":"Copy",children:i.jsx("button",{type:"button","data-testid":"data-item-copy","aria-label":"Copy",onClick:b,className:"flex size-6 flex-shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted",children:i.jsx(X,{name:h?"CheckCircle":"CopySimple",size:"sm"})})})]})]})});pi.displayName="DataItem";const ve=e=>typeof e=="string",Hs=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},Dg=e=>e==null?"":""+e,eD=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},tD=/###/g,Ag=e=>e&&e.indexOf("###")>-1?e.replace(tD,"."):e,Pg=e=>!e||ve(e),ya=(e,t,n)=>{const r=ve(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(Pg(e))return{};const s=Ag(r[o]);!e[s]&&n&&(e[s]=new n),Object.prototype.hasOwnProperty.call(e,s)?e=e[s]:e={},++o}return Pg(e)?{}:{obj:e,k:Ag(r[o])}},Tg=(e,t,n)=>{const{obj:r,k:o}=ya(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let s=t[t.length-1],a=t.slice(0,t.length-1),l=ya(e,a,Object);for(;l.obj===void 0&&a.length;)s=`${a[a.length-1]}.${s}`,a=a.slice(0,a.length-1),l=ya(e,a,Object),l&&l.obj&&typeof l.obj[`${l.k}.${s}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${s}`]=n},nD=(e,t,n,r)=>{const{obj:o,k:s}=ya(e,t,Object);o[s]=o[s]||[],o[s].push(n)},Tl=(e,t)=>{const{obj:n,k:r}=ya(e,t);if(n)return n[r]},rD=(e,t,n)=>{const r=Tl(e,n);return r!==void 0?r:Tl(t,n)},Hy=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?ve(e[r])||e[r]instanceof String||ve(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Hy(e[r],t[r],n):e[r]=t[r]);return e},Ao=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var oD={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const sD=e=>ve(e)?e.replace(/[&<>"'\/]/g,t=>oD[t]):e;class aD{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const iD=[" ",",","?","!",";"],lD=new aD(20),cD=(e,t,n)=>{t=t||"",n=n||"";const r=iD.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const o=lD.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let s=!o.test(e);if(!s){const a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(s=!0)}return s},jd=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let s=0;s<r.length;){if(!o||typeof o!="object")return;let a,l="";for(let c=s;c<r.length;++c)if(c!==s&&(l+=n),l+=r[c],a=o[l],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&c<r.length-1)continue;s+=c-s+1;break}o=a}return o},Ol=e=>e&&e.replace("_","-"),uD={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Ll{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||uD,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,o){return o&&!this.debug?null:(ve(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Ll(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Ll(this.logger,t)}}var Tn=new Ll;class Vc{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(a=>{let[l,c]=a;for(let u=0;u<c;u++)l(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[l,c]=a;for(let u=0;u<c;u++)l.apply(l,[t,...r])})}}class Og extends Vc{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,a=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.indexOf(".")>-1?l=t.split("."):(l=[t,n],r&&(Array.isArray(r)?l.push(...r):ve(r)&&s?l.push(...r.split(s)):l.push(r)));const c=Tl(this.data,l);return!c&&!n&&!r&&t.indexOf(".")>-1&&(t=l[0],n=l[1],r=l.slice(2).join(".")),c||!a||!ve(r)?c:jd(this.data&&this.data[t]&&this.data[t][n],r,s)}addResource(t,n,r,o){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let l=[t,n];r&&(l=l.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(l=t.split("."),o=n,n=l[1]),this.addNamespaces(n),Tg(this.data,l,o),s.silent||this.emit("added",t,n,r,o)}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in r)(ve(r[s])||Array.isArray(r[s]))&&this.addResource(t,n,s,r[s],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,s){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[t,n];t.indexOf(".")>-1&&(l=t.split("."),o=r,r=n,n=l[1]),this.addNamespaces(n);let c=Tl(this.data,l)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?Hy(c,r,s):c={...c,...r},Tg(this.data,l,c),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var Gy={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(s=>{this.processors[s]&&(t=this.processors[s].process(t,n,r,o))}),t}};const Lg={};class Il extends Vc{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),eD(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Tn.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let s=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!cD(t,r,o);if(a&&!l){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:ve(s)?[s]:s};const u=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(u[0])>-1)&&(s=u.shift()),t=u.join(o)}return{key:t,namespaces:ve(s)?[s]:s}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:l}=this.extractFromKey(t[t.length-1],n),c=l[l.length-1],u=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(f){const w=n.nsSeparator||this.options.nsSeparator;return o?{res:`${c}${w}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${w}${a}`}return o?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:a}const d=this.resolve(t,n);let p=d&&d.res;const h=d&&d.usedKey||a,g=d&&d.exactUsedKey||a,x=Object.prototype.toString.apply(p),v=["[object Number]","[object Function]","[object RegExp]"],y=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,S=!ve(p)&&typeof p!="boolean"&&typeof p!="number";if(b&&p&&S&&v.indexOf(x)<0&&!(ve(y)&&Array.isArray(p))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const w=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,p,{...n,ns:l}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(d.res=w,d.usedParams=this.getUsedParamsDetails(n),d):w}if(s){const w=Array.isArray(p),E=w?[]:{},N=w?g:h;for(const _ in p)if(Object.prototype.hasOwnProperty.call(p,_)){const k=`${N}${s}${_}`;E[_]=this.translate(k,{...n,joinArrays:!1,ns:l}),E[_]===k&&(E[_]=p[_])}p=E}}else if(b&&ve(y)&&Array.isArray(p))p=p.join(y),p&&(p=this.extendTranslation(p,t,n,r));else{let w=!1,E=!1;const N=n.count!==void 0&&!ve(n.count),_=Il.hasDefaultValue(n),k=N?this.pluralResolver.getSuffix(u,n.count,n):"",I=n.ordinal&&N?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",F=N&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),U=F&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${k}`]||n[`defaultValue${I}`]||n.defaultValue;!this.isValidLookup(p)&&_&&(w=!0,p=U),this.isValidLookup(p)||(E=!0,p=a);const R=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&E?void 0:p,L=_&&U!==p&&this.options.updateMissing;if(E||w||L){if(this.logger.log(L?"updateKey":"missingKey",u,c,a,L?U:p),s){const z=this.resolve(a,{...n,keySeparator:!1});z&&z.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let V=[];const D=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&D&&D[0])for(let z=0;z<D.length;z++)V.push(D[z]);else this.options.saveMissingTo==="all"?V=this.languageUtils.toResolveHierarchy(n.lng||this.language):V.push(n.lng||this.language);const $=(z,T,M)=>{const G=_&&M!==p?M:R;this.options.missingKeyHandler?this.options.missingKeyHandler(z,c,T,G,L,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(z,c,T,G,L,n),this.emit("missingKey",z,c,T,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&N?V.forEach(z=>{const T=this.pluralResolver.getSuffixes(z,n);F&&n[`defaultValue${this.options.pluralSeparator}zero`]&&T.indexOf(`${this.options.pluralSeparator}zero`)<0&&T.push(`${this.options.pluralSeparator}zero`),T.forEach(M=>{$([z],a+M,n[`defaultValue${M}`]||U)})}):$(V,a,U))}p=this.extendTranslation(p,t,n,d,r),E&&p===a&&this.options.appendNamespaceToMissingKey&&(p=`${c}:${a}`),(E||w)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${a}`:a,w?p:void 0):p=this.options.parseMissingKeyHandler(p))}return o?(d.res=p,d.usedParams=this.getUsedParamsDetails(n),d):p}extendTranslation(t,n,r,o,s){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=ve(t)&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(u){const p=t.match(this.interpolator.nestingRegexp);f=p&&p.length}let d=r.replace&&!ve(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),t=this.interpolator.interpolate(t,d,r.lng||this.language||o.usedLng,r),u){const p=t.match(this.interpolator.nestingRegexp),h=p&&p.length;f<h&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var p=arguments.length,h=new Array(p),g=0;g<p;g++)h[g]=arguments[g];return s&&s[0]===h[0]&&!r.context?(a.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${n[0]}`),null):a.translate(...h,n)},r)),r.interpolation&&this.interpolator.reset()}const l=r.postProcess||this.options.postProcess,c=ve(l)?[l]:l;return t!=null&&c&&c.length&&r.applyPostProcessor!==!1&&(t=Gy.handle(c,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,o,s,a,l;return ve(t)&&(t=[t]),t.forEach(c=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(c,n),f=u.key;o=f;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const p=n.count!==void 0&&!ve(n.count),h=p&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),g=n.context!==void 0&&(ve(n.context)||typeof n.context=="number")&&n.context!=="",x=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(v=>{this.isValidLookup(r)||(l=v,!Lg[`${x[0]}-${v}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(Lg[`${x[0]}-${v}`]=!0,this.logger.warn(`key "${o}" for languages "${x.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),x.forEach(y=>{if(this.isValidLookup(r))return;a=y;const b=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(b,f,y,v,n);else{let w;p&&(w=this.pluralResolver.getSuffix(y,n.count,n));const E=`${this.options.pluralSeparator}zero`,N=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(b.push(f+w),n.ordinal&&w.indexOf(N)===0&&b.push(f+w.replace(N,this.options.pluralSeparator)),h&&b.push(f+E)),g){const _=`${f}${this.options.contextSeparator}${n.context}`;b.push(_),p&&(b.push(_+w),n.ordinal&&w.indexOf(N)===0&&b.push(_+w.replace(N,this.options.pluralSeparator)),h&&b.push(_+E))}}let S;for(;S=b.pop();)this.isValidLookup(r)||(s=S,r=this.getResource(y,v,S,n))}))})}),{res:r,usedKey:o,exactUsedKey:s,usedLng:a,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!ve(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const s of n)delete o[s]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const Au=e=>e.charAt(0).toUpperCase()+e.slice(1);class Ig{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Tn.create("languageUtils")}getScriptPartFromCode(t){if(t=Ol(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Ol(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(ve(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let o=Intl.getCanonicalLocales(t)[0];if(o&&this.options.lowerCaseLng&&(o=o.toLowerCase()),o)return o}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(o=>o.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Au(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Au(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=Au(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(s=>{if(s===o)return s;if(!(s.indexOf("-")<0&&o.indexOf("-")<0)&&(s.indexOf("-")>0&&o.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===o||s.indexOf(o)===0&&o.length>1))return s})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),ve(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],s=a=>{a&&(this.isSupportedCode(a)?o.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return ve(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):ve(t)&&s(this.formatLanguageCode(t)),r.forEach(a=>{o.indexOf(a)<0&&s(this.formatLanguageCode(a))}),o}}let dD=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],fD={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const pD=["v1","v2","v3"],hD=["v4"],Fg={zero:0,one:1,two:2,few:3,many:4,other:5},mD=()=>{const e={};return dD.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:fD[t.fc]}})}),e};class gD{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Tn.create("pluralResolver"),(!this.options.compatibilityJSON||hD.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=mD(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const r=Ol(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:r,type:o});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let a;try{a=new Intl.PluralRules(r,{type:o})}catch{if(!t.match(/-|_/))return;const c=this.languageUtils.getLanguagePartFromCode(t);a=this.getRule(c,n)}return this.pluralRulesCache[s]=a,a}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((o,s)=>Fg[o]-Fg[s]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):r.numbers.map(o=>this.getSuffix(t,o,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:this.getSuffixRetroCompatible(o,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let o=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const s=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?`_plural_${o.toString()}`:s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?s():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!pD.includes(this.options.compatibilityJSON)}}const $g=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=rD(e,t,n);return!s&&o&&ve(n)&&(s=jd(e,n,r),s===void 0&&(s=jd(t,n,r))),s},Pu=e=>e.replace(/\$/g,"$$$$");class xD{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Tn.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:s,prefixEscaped:a,suffix:l,suffixEscaped:c,formatSeparator:u,unescapeSuffix:f,unescapePrefix:d,nestingPrefix:p,nestingPrefixEscaped:h,nestingSuffix:g,nestingSuffixEscaped:x,nestingOptionsSeparator:v,maxReplaces:y,alwaysFormat:b}=t.interpolation;this.escape=n!==void 0?n:sD,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=s?Ao(s):a||"{{",this.suffix=l?Ao(l):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=f?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=p?Ao(p):h||Ao("$t("),this.nestingSuffix=g?Ao(g):x||Ao(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=y||1e3,this.alwaysFormat=b!==void 0?b:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,o){let s,a,l;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=h=>{if(h.indexOf(this.formatSeparator)<0){const y=$g(n,c,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,r,{...o,...n,interpolationkey:h}):y}const g=h.split(this.formatSeparator),x=g.shift().trim(),v=g.join(this.formatSeparator).trim();return this.format($g(n,c,x,this.options.keySeparator,this.options.ignoreJSONStructure),v,r,{...o,...n,interpolationkey:x})};this.resetRegExp();const f=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,d=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>Pu(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?Pu(this.escape(h)):Pu(h)}].forEach(h=>{for(l=0;s=h.regex.exec(t);){const g=s[1].trim();if(a=u(g),a===void 0)if(typeof f=="function"){const v=f(t,s,o);a=ve(v)?v:""}else if(o&&Object.prototype.hasOwnProperty.call(o,g))a="";else if(d){a=s[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),a="";else!ve(a)&&!this.useRawValueToEscape&&(a=Dg(a));const x=h.safeValue(a);if(t=t.replace(s[0],x),d?(h.regex.lastIndex+=a.length,h.regex.lastIndex-=s[0].length):h.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,s,a;const l=(c,u)=>{const f=this.nestingOptionsSeparator;if(c.indexOf(f)<0)return c;const d=c.split(new RegExp(`${f}[ ]*{`));let p=`{${d[1]}`;c=d[0],p=this.interpolate(p,a);const h=p.match(/'/g),g=p.match(/"/g);(h&&h.length%2===0&&!g||g.length%2!==0)&&(p=p.replace(/'/g,'"'));try{a=JSON.parse(p),u&&(a={...u,...a})}catch(x){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,x),`${c}${f}${p}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,c};for(;o=this.nestingRegexp.exec(t);){let c=[];a={...r},a=a.replace&&!ve(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let u=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const f=o[1].split(this.formatSeparator).map(d=>d.trim());o[1]=f.shift(),c=f,u=!0}if(s=n(l.call(this,o[1].trim(),a),a),s&&o[0]===t&&!ve(s))return s;ve(s)||(s=Dg(s)),s||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),s=""),u&&(s=c.reduce((f,d)=>this.format(f,d,r.lng,{...r,interpolationkey:o[1].trim()}),s.trim())),t=t.replace(o[0],s),this.regexp.lastIndex=0}return t}}const vD=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(a=>{if(a){const[l,...c]=a.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),f=l.trim();n[f]||(n[f]=u),u==="false"&&(n[f]=!1),u==="true"&&(n[f]=!0),isNaN(u)||(n[f]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},Po=e=>{const t={};return(n,r,o)=>{let s=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(s={...s,[o.interpolationkey]:void 0});const a=r+JSON.stringify(s);let l=t[a];return l||(l=e(Ol(r),o),t[a]=l),l(n)}};class yD{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Tn.create("formatter"),this.options=t,this.formats={number:Po((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return s=>o.format(s)}),currency:Po((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return s=>o.format(s)}),datetime:Po((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return s=>o.format(s)}),relativetime:Po((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return s=>o.format(s,r.range||"day")}),list:Po((n,r)=>{const o=new Intl.ListFormat(n,{...r});return s=>o.format(s)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Po(n)}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=n.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(l=>l.indexOf(")")>-1)){const l=s.findIndex(c=>c.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,l)].join(this.formatSeparator)}return s.reduce((l,c)=>{const{formatName:u,formatOptions:f}=vD(c);if(this.formats[u]){let d=l;try{const p=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},h=p.locale||p.lng||o.locale||o.lng||r;d=this.formats[u](l,h,{...f,...o,...p})}catch(p){this.logger.warn(p)}return d}else this.logger.warn(`there was no format function for ${u}`);return l},t)}}const bD=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class wD extends Vc{constructor(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Tn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,o.backend,o)}queueLoad(t,n,r,o){const s={},a={},l={},c={};return t.forEach(u=>{let f=!0;n.forEach(d=>{const p=`${u}|${d}`;!r.reload&&this.store.hasResourceBundle(u,d)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?a[p]===void 0&&(a[p]=!0):(this.state[p]=1,f=!1,a[p]===void 0&&(a[p]=!0),s[p]===void 0&&(s[p]=!0),c[d]===void 0&&(c[d]=!0)))}),f||(l[u]=!0)}),(Object.keys(s).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(s),pending:Object.keys(a),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(c)}}loaded(t,n,r){const o=t.split("|"),s=o[0],a=o[1];n&&this.emit("failedLoading",s,a,n),!n&&r&&this.store.addResourceBundle(s,a,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const l={};this.queue.forEach(c=>{nD(c.loaded,[s],a),bD(c,t),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{l[u]||(l[u]={});const f=c.loaded[u];f.length&&f.forEach(d=>{l[u][d]===void 0&&(l[u][d]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(c=>!c.done)}read(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:s,callback:a});return}this.readingCalls++;const l=(u,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&f&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,o+1,s*2,a)},s);return}a(u,f)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const u=c(t,n);u&&typeof u.then=="function"?u.then(f=>l(null,f)).catch(l):l(null,u)}catch(u){l(u)}return}return c(t,n,l)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();ve(t)&&(t=this.languageUtils.toResolveHierarchy(t)),ve(n)&&(n=[n]);const s=this.queueLoad(t,n,r,o);if(!s.toLoad.length)return s.pending.length||o(),null;s.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),o=r[0],s=r[1];this.read(o,s,"read",void 0,void 0,(a,l)=>{a&&this.logger.warn(`${n}loading namespace ${s} for language ${o} failed`,a),!a&&l&&this.logger.log(`${n}loaded namespace ${s} for language ${o}`,l),this.loaded(t,a,l)})}saveMissing(t,n,r,o,s){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const c={...a,isUpdate:s},u=this.backend.create.bind(this.backend);if(u.length<6)try{let f;u.length===5?f=u(t,n,r,o,c):f=u(t,n,r,o),f&&typeof f.then=="function"?f.then(d=>l(null,d)).catch(l):l(null,f)}catch(f){l(f)}else u(t,n,r,o,l,c)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}const Vg=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),ve(e[1])&&(t.defaultValue=e[1]),ve(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Bg=e=>(ve(e.ns)&&(e.ns=[e.ns]),ve(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),ve(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Ii=()=>{},CD=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Ta extends Vc{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Bg(t),this.services={},this.logger=Tn,this.modules={external:[]},CD(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(ve(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=Vg();this.options={...o,...this.options,...Bg(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const s=f=>f?typeof f=="function"?new f:f:null;if(!this.options.isClone){this.modules.logger?Tn.init(s(this.modules.logger),this.options):Tn.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=yD);const d=new Ig(this.options);this.store=new Og(this.options.resources,this.options);const p=this.services;p.logger=Tn,p.resourceStore=this.store,p.languageUtils=d,p.pluralResolver=new gD(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(p.formatter=s(f),p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new xD(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new wD(s(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(h){for(var g=arguments.length,x=new Array(g>1?g-1:0),v=1;v<g;v++)x[v-1]=arguments[v];t.emit(h,...x)}),this.modules.languageDetector&&(p.languageDetector=s(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=s(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new Il(this.services,this.options),this.translator.on("*",function(h){for(var g=arguments.length,x=new Array(g>1?g-1:0),v=1;v<g;v++)x[v-1]=arguments[v];t.emit(h,...x)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Ii),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=function(){return t.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return t.store[f](...arguments),t}});const c=Hs(),u=()=>{const f=(d,p)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(p),r(d,p)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),c}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ii;const o=ve(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const s=[],a=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(u=>{u!=="cimode"&&s.indexOf(u)<0&&s.push(u)})};o?a(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>a(c)),this.options.preload&&this.options.preload.forEach(l=>a(l)),this.services.backendConnector.load(s,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(l)})}else r(null)}reloadResources(t,n,r){const o=Hs();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Ii),this.services.backendConnector.reload(t,n,s=>{o.resolve(),r(s)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Gy.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const o=Hs();this.emit("languageChanging",t);const s=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},a=(c,u)=>{u?(s(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},l=c=>{!t&&!c&&this.services.languageDetector&&(c=[]);const u=ve(c)?c:this.services.languageUtils.getBestMatchFromCodes(c);u&&(this.language||s(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,f=>{a(f,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(t),o}getFixedT(t,n,r){var o=this;const s=function(a,l){let c;if(typeof l!="object"){for(var u=arguments.length,f=new Array(u>2?u-2:0),d=2;d<u;d++)f[d-2]=arguments[d];c=o.options.overloadTranslationOptionHandler([a,l].concat(f))}else c={...l};c.lng=c.lng||s.lng,c.lngs=c.lngs||s.lngs,c.ns=c.ns||s.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||r||s.keyPrefix);const p=o.options.keySeparator||".";let h;return c.keyPrefix&&Array.isArray(a)?h=a.map(g=>`${c.keyPrefix}${p}${g}`):h=c.keyPrefix?`${c.keyPrefix}${p}${a}`:a,o.t(h,c)};return ve(t)?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(l,c)=>{const u=this.services.backendConnector.state[`${l}|${c}`];return u===-1||u===0||u===2};if(n.precheck){const l=n.precheck(this,a);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!o||a(s,t)))}loadNamespaces(t,n){const r=Hs();return this.options.ns?(ve(t)&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Hs();ve(t)&&(t=[t]);const o=this.options.preload||[],s=t.filter(a=>o.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return s.length?(this.options.preload=o.concat(s),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new Ig(Vg());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Ta(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ii;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},s=new Ta(o);return(t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(l=>{s[l]=this[l]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},r&&(s.store=new Og(this.store.data,o),s.services.resourceStore=s.store),s.translator=new Il(s.services,o),s.translator.on("*",function(l){for(var c=arguments.length,u=new Array(c>1?c-1:0),f=1;f<c;f++)u[f-1]=arguments[f];s.emit(l,...u)}),s.init(o,n),s.translator.options=o,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const st=Ta.createInstance();st.createInstance=Ta.createInstance;st.createInstance;st.dir;st.init;st.loadResources;st.reloadResources;st.use;st.changeLanguage;st.getFixedT;st.t;st.exists;st.setDefaultNamespace;st.hasLoadedNamespace;st.loadNamespaces;st.loadLanguages;function SD(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];oo(t[0])&&(t[0]=`react-i18next:: ${t[0]}`),console.warn(...t)}}const zg={};function kd(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];oo(t[0])&&zg[t[0]]||(oo(t[0])&&(zg[t[0]]=new Date),SD(...t))}const Uy=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Wg=(e,t,n)=>{e.loadNamespaces(t,Uy(e,n))},Hg=(e,t,n,r)=>{oo(n)&&(n=[n]),n.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,Uy(e,r))},ED=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],o=t.options?t.options.fallbackLng:!1,s=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(l,c)=>{const u=t.services.backendConnector.state[`${l}|${c}`];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||a(r,e)&&(!o||a(s,e)))},ND=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(kd("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(o,s)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!s(o.isLanguageChangingTo,e))return!1}}):ED(e,t,n)},oo=e=>typeof e=="string",_D=e=>typeof e=="object"&&e!==null,jD=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,kD={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},RD=e=>kD[e],MD=e=>e.replace(jD,RD);let Rd={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:MD};const Yy=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Rd={...Rd,...e}},Ky=()=>Rd;let Zy;const qy=e=>{Zy=e},Xy=()=>Zy,Jy={type:"3rdParty",init(e){Yy(e.options.react),qy(e)}},Qy=C.createContext();class DD{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces=()=>Object.keys(this.usedNamespaces)}const AD=(e,t)=>{const n=C.useRef();return C.useEffect(()=>{n.current=e},[e,t]),n.current},e3=(e,t,n,r)=>e.getFixedT(t,n,r),PD=(e,t,n,r)=>C.useCallback(e3(e,t,n,r),[e,t,n,r]),TD=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:o}=C.useContext(Qy)||{},s=n||r||Xy();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new DD),!s){kd("You will need to pass in an i18next instance by using initReactI18next");const w=(N,_)=>oo(_)?_:_D(_)&&oo(_.defaultValue)?_.defaultValue:Array.isArray(N)?N[N.length-1]:N,E=[w,{},!1];return E.t=w,E.i18n={},E.ready=!1,E}s.options.react&&s.options.react.wait!==void 0&&kd("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...Ky(),...s.options.react,...t},{useSuspense:l,keyPrefix:c}=a;let u=e;u=oo(u)?[u]:u||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(u);const f=(s.isInitialized||s.initializedStoreOnce)&&u.every(w=>ND(w,s,a)),d=PD(s,t.lng||null,a.nsMode==="fallback"?u:u[0],c),p=()=>d,h=()=>e3(s,t.lng||null,a.nsMode==="fallback"?u:u[0],c),[g,x]=C.useState(p);let v=u.join();t.lng&&(v=`${t.lng}${v}`);const y=AD(v),b=C.useRef(!0);C.useEffect(()=>{const{bindI18n:w,bindI18nStore:E}=a;b.current=!0,!f&&!l&&(t.lng?Hg(s,t.lng,u,()=>{b.current&&x(h)}):Wg(s,u,()=>{b.current&&x(h)})),f&&y&&y!==v&&b.current&&x(h);const N=()=>{b.current&&x(h)};return w&&s&&s.on(w,N),E&&s&&s.store.on(E,N),()=>{b.current=!1,w&&s&&w.split(" ").forEach(_=>s.off(_,N)),E&&s&&E.split(" ").forEach(_=>s.store.off(_,N))}},[s,v]),C.useEffect(()=>{b.current&&f&&x(p)},[s,c,f]);const S=[g,s,f];if(S.t=g,S.i18n=s,S.ready=f,f||!f&&!l)return S;throw new Promise(w=>{t.lng?Hg(s,t.lng,u,()=>w()):Wg(s,u,()=>w())})},OD=Object.freeze(Object.defineProperty({__proto__:null,I18nContext:Qy,getDefaults:Ky,getI18n:Xy,initReactI18next:Jy,setDefaults:Yy,setI18n:qy,useTranslation:TD},Symbol.toStringTag,{value:"Module"})),LD={lastUpdated:"آخر تحديث {{time}} ·",cadence:{REALTIME:"الحالة في الوقت الفعلي",EVERY_MINUTE:"كل دقيقة",EVERY_10_MIN:"كل 10 دقائق",EVERY_15_MIN:"كل 15 دقيقة",EVERY_HOUR:"كل ساعة",EVERY_15_SEC:"كل 15 ثانية"}},ID={freshness:LD},FD={lastUpdated:"Zuletzt aktualisiert {{time}} ·",cadence:{REALTIME:"Echtzeit-Status",EVERY_MINUTE:"Jede Minute",EVERY_10_MIN:"Alle 10 Minuten",EVERY_15_MIN:"Alle 15 Minuten",EVERY_HOUR:"Stündlich",EVERY_15_SEC:"Alle 15 Sekunden"}},$D={freshness:FD},VD={lastUpdated:"Last updated {{time}} ·",cadence:{REALTIME:"Real-time status",EVERY_MINUTE:"Every minute",EVERY_10_MIN:"Every 10 minutes",EVERY_15_MIN:"Every 15 minutes",EVERY_HOUR:"Every hour",EVERY_15_SEC:"Every 15 seconds"}},BD={freshness:VD},zD={lastUpdated:"Última actualización {{time}} ·",cadence:{REALTIME:"Estado en tiempo real",EVERY_MINUTE:"Cada minuto",EVERY_10_MIN:"Cada 10 minutos",EVERY_15_MIN:"Cada 15 minutos",EVERY_HOUR:"Cada hora",EVERY_15_SEC:"Cada 15 segundos"}},WD={freshness:zD},HD={lastUpdated:"Dernière mise à jour {{time}} ·",cadence:{REALTIME:"Statut en temps réel",EVERY_MINUTE:"Toutes les minutes",EVERY_10_MIN:"Toutes les 10 minutes",EVERY_15_MIN:"Toutes les 15 minutes",EVERY_HOUR:"Toutes les heures",EVERY_15_SEC:"Toutes les 15 secondes"}},GD={freshness:HD},UD={lastUpdated:"最終更新 {{time}} ·",cadence:{REALTIME:"リアルタイム ステータス",EVERY_MINUTE:"1分ごと",EVERY_10_MIN:"10分ごと",EVERY_15_MIN:"15分ごと",EVERY_HOUR:"1時間ごと",EVERY_15_SEC:"15秒ごと"}},YD={freshness:UD},KD={lastUpdated:"Última atualização {{time}} ·",cadence:{REALTIME:"Status em tempo real",EVERY_MINUTE:"A cada minuto",EVERY_10_MIN:"A cada 10 minutos",EVERY_15_MIN:"A cada 15 minutos",EVERY_HOUR:"A cada hora",EVERY_15_SEC:"A cada 15 segundos"}},ZD={freshness:KD},qD={lastUpdated:"Обновлено {{time}} ·",cadence:{REALTIME:"Статус в реальном времени",EVERY_MINUTE:"Каждую минуту",EVERY_10_MIN:"Каждые 10 минут",EVERY_15_MIN:"Каждые 15 минут",EVERY_HOUR:"Каждый час",EVERY_15_SEC:"Каждые 15 секунд"}},XD={freshness:qD},JD={lastUpdated:"Son güncelleme {{time}} ·",cadence:{REALTIME:"Gerçek zamanlı durum",EVERY_MINUTE:"Her dakika",EVERY_10_MIN:"Her 10 dakika",EVERY_15_MIN:"Her 15 dakika",EVERY_HOUR:"Her saat",EVERY_15_SEC:"Her 15 saniyede bir"}},QD={freshness:JD},eA={lastUpdated:"最近更新 {{time}} ·",cadence:{REALTIME:"实时状态",EVERY_MINUTE:"每分钟",EVERY_10_MIN:"每10分钟",EVERY_15_MIN:"每15分钟",EVERY_HOUR:"每小时",EVERY_15_SEC:"每15秒"}},tA={freshness:eA},{useTranslation:nA}=OD;let Fl;try{Fl=Jy}catch{Fl=void 0}const $l="ds",rA={ar:ID,de:$D,en:BD,es:WD,fr:GD,ja:YD,pt:ZD,ru:XD,tr:QD,zh:tA},t3=()=>{for(const[e,t]of Object.entries(rA))st.addResourceBundle(e,$l,t,!0,!0)};st.isInitialized||(Fl?st.use(Fl):st).init({lng:"en",fallbackLng:"en",ns:[$l],defaultNS:$l,resources:{},interpolation:{escapeValue:!1},react:{useSuspense:!1}});t3();st.on("languageChanged",t3);const oA=()=>nA($l),sA={fresh:"bg-green-600",stale:"bg-yellow-500"},n3=C.forwardRef(({cadenceKey:e,lastUpdated:t,tone:n="fresh",showDot:r=!0,className:o},s)=>{const{t:a}=oA(),c=!(e==="REALTIME")&&t?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1}):null;return i.jsxs(Ze,{ref:s,variant:"secondary","data-testid":"data-freshness-badge",className:j("font-normal",o),children:[r&&i.jsx("span",{className:"inline-flex size-3 items-center justify-center","aria-hidden":"true",children:i.jsx("span",{className:j("size-1.5 rounded-full",sA[n])})}),c!=null&&i.jsx("span",{className:"font-semibold text-foreground",children:a("freshness.lastUpdated",{time:c})}),i.jsx("span",{className:"text-muted-foreground",children:a(`freshness.cadence.${e}`)})]})});n3.displayName="DataFreshnessBadge";const r3=C.forwardRef(({className:e,icon:t,title:n,description:r,button:o,variant:s="default",onClose:a,closeLabel:l,...c},u)=>{const f=s==="secondary";return i.jsxs("div",{ref:u,className:j("relative flex items-center gap-6 rounded-xl border p-6",f?"border-border bg-background":"border-primary bg-primary",a&&"pr-12",e),...c,children:[i.jsx("div",{className:j("flex size-16 shrink-0 items-center justify-center rounded-full border-2",f?"border-primary":"border-muted"),children:i.jsx(X,{name:t,size:"xl",className:j("text-muted-foreground",f?"text-primary":"text-primary-foreground"),weight:"fill"})}),i.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[i.jsx("div",{className:j("text-lg font-semibold leading-7",f?"text-foreground":"text-[#FAFAFA]"),children:n}),i.jsx("div",{className:j("text-sm leading-5 opacity-80",f?"text-muted-foreground":"text-[#FAFAFA]"),children:r})]}),o&&i.jsx("div",{className:"shrink-0",children:o}),a&&i.jsx("button",{type:"button",onClick:a,"aria-label":l??"Close",className:j("absolute right-3 top-3 rounded p-1 transition-colors",f?"text-muted-foreground hover:bg-muted hover:text-foreground":"text-primary-foreground hover:bg-primary-foreground/10"),children:i.jsx(X,{name:"X",size:"sm"})})]})});r3.displayName="HighlightBanner";const aA="https://dashboard-assets.y.uno/common/empty-states/empty_illustration_tables.svg",iA="https://dashboard-assets.y.uno/common/empty-states/empty_illustration_tables_dark.svg",Bc=C.forwardRef(({className:e,media:t,title:n,description:r,actions:o,...s},a)=>{const c=t===void 0?i.jsx(Vy,{lightSrc:aA,darkSrc:iA,alt:""}):t;return i.jsxs("div",{ref:a,className:j("flex flex-col items-center gap-6 bg-secondary px-6 py-12 rounded-lg w-full",e),...s,children:[c&&i.jsx("div",{className:"flex-shrink-0",children:c}),i.jsxs("div",{className:"flex flex-col gap-6 items-center w-full",children:[i.jsxs("div",{className:"flex flex-col gap-2 items-center w-full",children:[i.jsx("h3",{className:"text-base font-semibold text-center leading-none",children:n}),r&&i.jsx("p",{className:"text-sm text-muted-foreground text-center",children:r})]}),o&&i.jsx("div",{className:"flex gap-3 items-center justify-center",children:o})]})]})});Bc.displayName="Empty";function lA({name:e,size:t="xl",className:n,children:r}){return i.jsx("div",{className:"p-4 bg-background rounded-lg shadow-sm",children:r||i.jsx(X,{name:e,size:t,className:n})})}const o3="https://dashboard-assets.y.uno",tn=(e,t)=>`${o3}/tables/empty-states/mask_${e}_${t}.svg`,To=(e,t)=>`${o3}/risk-conditions/empty-states/mask_${e}_${t}.svg`,sr={payments:{light:tn("payments","light"),dark:tn("payments","dark")},chargebacks:{light:tn("chargebacks","light"),dark:tn("chargebacks","dark")},installments:{light:tn("installments","light"),dark:tn("installments","dark")},paymentLinks:{light:tn("payment-links","light"),dark:tn("payment-links","dark")},recipients:{light:tn("recipients","light"),dark:tn("recipients","dark")},subscriptions:{light:tn("subscriptions","light"),dark:tn("subscriptions","dark")},rules:{light:To("rules","light"),dark:To("rules","dark")},blocklists:{light:To("blocklists","light"),dark:To("blocklists","dark")},allowlists:{light:To("allowlists","light"),dark:To("allowlists","dark")}},Wn=C.forwardRef(({maskSrc:e,alt:t="",className:n,children:r,variant:o},s)=>i.jsxs("div",{ref:s,"data-variant":o,className:j("app-scene relative w-full aspect-[592/444] overflow-hidden rounded-lg",n),children:[i.jsx("img",{src:e,alt:t,"aria-hidden":t===""?!0:void 0,draggable:!1,className:"absolute inset-0 h-full w-full select-none object-cover"}),r&&i.jsx("svg",{className:"pointer-events-none absolute inset-0 h-full w-full",viewBox:"0 0 592 444",xmlns:"http://www.w3.org/2000/svg",children:r})]}));Wn.displayName="SceneShell";const Gg=296,Ug=209;function ks({cx:e=Gg,cy:t=Ug,topFaceFill:n,clipId:r}){const o=e-Gg,s=t-Ug;return i.jsxs("g",{transform:o===0&&s===0?void 0:`translate(${o},${s})`,children:[i.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M397 233.145H396.962C397.691 248.543 387.869 264.075 367.494 275.816C328.154 298.484 264.276 298.484 224.936 275.816C204.561 264.075 194.739 248.543 195.469 233.145H195.43V209.074C195.43 223.943 205.266 238.812 224.936 250.146C264.276 272.815 328.154 272.815 367.494 250.146C387.165 238.812 397 223.943 397 209.074V233.145Z",fill:"#3E4FE0",stroke:"black"}),i.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M224.936 168.001C264.276 145.333 328.155 145.333 367.495 168.001C406.835 190.67 406.835 227.478 367.495 250.146C328.155 272.815 264.276 272.815 224.936 250.146C185.596 227.478 185.596 190.67 224.936 168.001Z",fill:n,stroke:"#3E4FE0",strokeLinecap:"round",strokeLinejoin:"round"}),i.jsxs("g",{clipPath:`url(#${r})`,children:[i.jsx("path",{d:"M266.047 207.984C265.096 208.618 265.096 209.651 266.047 210.29C266.997 210.928 268.542 210.932 269.493 210.298C270.444 209.664 270.444 208.63 269.494 207.992C268.543 207.353 266.998 207.35 266.047 207.984Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M271.711 204.206C270.76 204.84 270.76 205.874 271.71 206.513C272.661 207.151 274.206 207.155 275.157 206.521C276.108 205.887 276.108 204.853 275.158 204.215C274.207 203.576 272.662 203.572 271.711 204.206Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M279.761 202.029C280.126 201.786 280.126 201.39 279.761 201.144C279.396 200.899 278.804 200.898 278.439 201.141C278.074 201.385 278.074 201.781 278.439 202.026C278.804 202.271 279.396 202.272 279.761 202.029Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M274.508 213.668C275.092 213.279 275.092 212.645 274.508 212.253C273.924 211.861 272.977 211.858 272.393 212.248C271.809 212.637 271.809 213.271 272.393 213.663C272.977 214.056 273.924 214.058 274.508 213.668Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M277.387 208.023C276.436 208.657 276.436 209.69 277.386 210.329C278.337 210.968 279.882 210.971 280.833 210.337C281.784 209.703 281.784 208.669 280.833 208.031C279.883 207.392 278.338 207.389 277.387 208.023Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M285.836 206.117C286.421 205.728 286.421 205.095 285.836 204.702C285.252 204.31 284.306 204.307 283.721 204.697C283.137 205.087 283.137 205.72 283.721 206.113C284.305 206.505 285.252 206.507 285.836 206.117Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M278.444 216.313C278.08 216.556 278.08 216.953 278.444 217.198C278.808 217.442 279.402 217.444 279.766 217.201C280.13 216.958 280.13 216.561 279.766 216.316C279.402 216.072 278.809 216.07 278.444 216.313Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M283.044 211.82C282.093 212.454 282.093 213.487 283.044 214.126C283.994 214.764 285.539 214.768 286.49 214.134C287.441 213.5 287.441 212.466 286.491 211.828C285.54 211.189 283.995 211.186 283.044 211.82Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M288.708 208.042C287.757 208.676 287.757 209.71 288.708 210.349C289.658 210.987 291.203 210.991 292.154 210.357C293.105 209.723 293.106 208.689 292.155 208.051C291.204 207.412 289.66 207.408 288.708 208.042Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M285.437 198.252C285.801 198.009 285.801 197.612 285.437 197.367C285.073 197.123 284.479 197.121 284.115 197.364C283.751 197.607 283.751 198.004 284.115 198.249C284.479 198.493 285.073 198.494 285.437 198.252Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M292.161 195.189C293.113 194.554 293.113 193.522 292.162 192.883C291.21 192.243 289.667 192.24 288.716 192.874C287.764 193.509 287.763 194.542 288.715 195.181C289.666 195.82 291.209 195.823 292.161 195.189Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M294.38 189.097C293.429 189.731 293.428 190.765 294.379 191.403C295.33 192.042 296.874 192.045 297.825 191.411C298.776 190.777 298.777 189.744 297.826 189.105C296.875 188.467 295.331 188.463 294.38 189.097Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M291.513 202.332C292.097 201.943 292.097 201.309 291.513 200.917C290.929 200.525 289.983 200.522 289.398 200.912C288.813 201.302 288.813 201.935 289.398 202.327C289.982 202.72 290.928 202.722 291.513 202.332Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M294.391 196.683C293.44 197.317 293.44 198.351 294.391 198.989C295.341 199.628 296.886 199.631 297.837 198.997C298.788 198.363 298.788 197.33 297.838 196.691C296.887 196.053 295.342 196.049 294.391 196.683Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M300.726 193.357C300.141 193.747 300.141 194.38 300.725 194.773C301.31 195.165 302.256 195.167 302.84 194.778C303.425 194.388 303.425 193.755 302.841 193.362C302.257 192.97 301.31 192.968 300.726 193.357Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M300.055 200.488C299.104 201.122 299.104 202.155 300.055 202.794C301.005 203.432 302.55 203.436 303.501 202.802C304.452 202.168 304.452 201.134 303.502 200.496C302.551 199.857 301.006 199.854 300.055 200.488Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M308.104 198.306C308.47 198.063 308.47 197.667 308.105 197.422C307.74 197.177 307.148 197.175 306.783 197.419C306.418 197.662 306.417 198.058 306.782 198.303C307.147 198.548 307.739 198.55 308.104 198.306Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M294.385 204.261C293.434 204.895 293.433 205.929 294.384 206.567C295.335 207.206 296.879 207.209 297.83 206.575C298.782 205.941 298.782 204.908 297.831 204.269C296.88 203.631 295.336 203.627 294.385 204.261Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M284.108 220.118C283.744 220.361 283.744 220.758 284.108 221.002C284.472 221.247 285.065 221.248 285.43 221.006C285.794 220.763 285.794 220.365 285.43 220.121C285.066 219.876 284.472 219.875 284.108 220.118Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M289.372 216.072C288.787 216.462 288.787 217.095 289.372 217.488C289.956 217.88 290.902 217.882 291.487 217.492C292.071 217.103 292.071 216.47 291.487 216.077C290.903 215.685 289.956 215.682 289.372 216.072Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M294.372 211.847C293.421 212.481 293.421 213.515 294.371 214.153C295.322 214.792 296.867 214.795 297.818 214.161C298.769 213.527 298.769 212.494 297.818 211.855C296.868 211.217 295.323 211.213 294.372 211.847Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M289.771 223.919C289.407 224.161 289.407 224.559 289.771 224.803C290.135 225.048 290.729 225.049 291.093 224.806C291.457 224.564 291.457 224.166 291.093 223.922C290.729 223.677 290.136 223.676 289.771 223.919Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M295.441 220.141C295.077 220.384 295.077 220.781 295.441 221.026C295.805 221.27 296.399 221.272 296.763 221.029C297.127 220.786 297.127 220.389 296.763 220.144C296.399 219.9 295.806 219.898 295.441 220.141Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M300.035 215.652C299.084 216.286 299.084 217.319 300.035 217.958C300.985 218.596 302.53 218.6 303.481 217.966C304.432 217.332 304.432 216.298 303.482 215.66C302.531 215.021 300.986 215.018 300.035 215.652Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M295.447 227.731C295.083 227.974 295.083 228.371 295.447 228.616C295.811 228.86 296.405 228.862 296.769 228.619C297.133 228.376 297.133 227.979 296.769 227.734C296.405 227.49 295.811 227.488 295.447 227.731Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M302.439 224.842C302.804 224.598 302.804 224.202 302.439 223.957C302.074 223.712 301.482 223.71 301.117 223.954C300.752 224.197 300.752 224.593 301.117 224.838C301.482 225.084 302.074 225.085 302.439 224.842Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M305.711 219.464C304.76 220.098 304.76 221.132 305.711 221.77C306.661 222.409 308.206 222.413 309.157 221.779C310.108 221.144 310.108 220.111 309.158 219.472C308.207 218.834 306.662 218.83 305.711 219.464Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M303.494 210.376C304.446 209.742 304.446 208.709 303.495 208.07C302.543 207.431 301 207.427 300.048 208.062C299.096 208.697 299.096 209.729 300.048 210.368C300.999 211.007 302.542 211.011 303.494 210.376Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M306.376 204.732C305.792 205.122 305.792 205.755 306.376 206.148C306.96 206.54 307.906 206.542 308.491 206.153C309.076 205.763 309.076 205.13 308.491 204.737C307.907 204.345 306.961 204.343 306.376 204.732Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M313.768 202.111C314.133 201.868 314.133 201.472 313.768 201.226C313.403 200.981 312.811 200.98 312.446 201.223C312.081 201.467 312.081 201.863 312.446 202.108C312.811 202.353 313.403 202.354 313.768 202.111Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M309.157 214.181C310.109 213.546 310.11 212.514 309.158 211.875C308.207 211.236 306.664 211.232 305.712 211.867C304.76 212.501 304.76 213.534 305.711 214.173C306.663 214.812 308.205 214.815 309.157 214.181Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M313.761 209.697C314.126 209.454 314.126 209.057 313.761 208.812C313.397 208.567 312.805 208.566 312.44 208.809C312.074 209.053 312.074 209.449 312.439 209.694C312.804 209.939 313.396 209.94 313.761 209.697Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M319.431 205.916C319.796 205.672 319.796 205.276 319.432 205.031C319.067 204.786 318.475 204.785 318.11 205.028C317.744 205.271 317.744 205.667 318.109 205.913C318.474 206.158 319.066 206.159 319.431 205.916Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M311.388 215.679C310.437 216.313 310.436 217.347 311.387 217.985C312.338 218.624 313.882 218.627 314.833 217.993C315.784 217.359 315.785 216.326 314.834 215.687C313.883 215.049 312.339 215.045 311.388 215.679Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M319.437 213.509C319.802 213.266 319.802 212.87 319.437 212.625C319.072 212.38 318.481 212.378 318.115 212.622C317.75 212.865 317.75 213.261 318.115 213.506C318.48 213.751 319.072 213.753 319.437 213.509Z",fill:"#3E4FE0"}),i.jsx("path",{d:"M325.108 209.728C325.473 209.485 325.473 209.089 325.108 208.844C324.743 208.598 324.151 208.597 323.786 208.841C323.421 209.084 323.421 209.48 323.786 209.725C324.151 209.97 324.742 209.972 325.108 209.728Z",fill:"#3E4FE0"})]})]})}function cA(){return typeof SVGPathElement<"u"&&typeof SVGPathElement.prototype.getPointAtLength=="function"}function uA(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function ar(e,t,n=[]){const r=C.useRef(t);r.current=t,C.useEffect(()=>{const o=e.current;if(!o||!cA()||uA())return;const s=r.current(o);if(!s)return;let a=null;const l=()=>{a===null&&(a=requestAnimationFrame(function d(p){s(p),a=requestAnimationFrame(d)}))},c=()=>{a!==null&&(cancelAnimationFrame(a),a=null)};l();const u=typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(prefers-reduced-motion: reduce)"):null,f=d=>d.matches?c():l();return u?.addEventListener("change",f),()=>{c(),u?.removeEventListener("change",f)}},[e,...n])}function Ve(e){return e<.5?2*e*e:1-(-2*e+2)**2/2}function Vl(e){const t=Math.max(0,Math.min(1,e));return t*t*(3-2*t)}function Yg(e){const t=parseInt(e.slice(1),16);return[t>>16&255,t>>8&255,t&255]}function dA(e,t,n){return"#"+((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)}function ns(e,t,n){const r=Yg(e),o=Yg(t);return dA(Math.round(r[0]+(o[0]-r[0])*n),Math.round(r[1]+(o[1]-r[1])*n),Math.round(r[2]+(o[2]-r[2])*n))}function to(e,t,n){return{f1:ns(e.f1,t.f1,n),f2:ns(e.f2,t.f2,n),f3:ns(e.f3,t.f3,n)}}function Ae(e,t,n){return e.getPointAtLength(Math.max(0,Math.min(n,1))*t)}function ye(e,t,n){e.setAttribute("transform",`translate(${t.x.toFixed(1)},${t.y.toFixed(1)})`),e.setAttribute("opacity",n.toFixed(3))}function Be(e,t){const n=e.querySelectorAll("polygon");n[0]?.setAttribute("fill",t.f1),n[1]?.setAttribute("fill",t.f2),n[2]?.setAttribute("fill",t.f3)}const Kg=e=>e<.05?e/.05:e>.95?(1-e)/.05:1,Br={f1:"#3E4FE0",f2:"#0617A9",f3:"#5A6BFF"},fA={f1:"#22C55E",f2:"#06A541",f3:"#44ED82"},Gr=2400,ul=2400,Md=2200,pA=800,hA=Gr+ul+Md+pA,Fi=800,mA=250,gA={purchaseTopGrad:["#161D61","#2531A0"],cubePurchase:["#0E133D","#161D61"],cubeNeutralFill:"black",cubeNeutralStroke:"#A3A3A3",pulseBlue:"#737373",pulseOpacity:[.45,.4,.4,.35],yunoTopFaceFill:"black"},xA={purchaseTopGrad:["#F3F4FF","white"],cubePurchase:["#C3C9FA","#EBECF9"],cubeNeutralFill:"white",cubeNeutralStroke:"#737373",pulseBlue:"#3E4FE0",pulseOpacity:[.3,.25,.25,.2],yunoTopFaceFill:"white"};function vA({className:e,alt:t}){const n=zn(),r=C.useId(),o=C.useRef(null),s=n?gA:xA,a=l=>`${r}-${l}`;return ar(o,l=>{const c=V=>l.querySelector(`[data-anim="${V}"]`),u=c("pathMain"),f=c("pathCapture"),d=c("pathPingRule"),p=c("pathPing3ds"),h=u.getTotalLength(),g=f.getTotalLength(),x=d.getTotalLength(),v=p.getTotalLength(),y=c("part"),b=c("trail1"),S=c("trail2"),w=c("pingRule"),E=c("ping3ds"),N=[{el:c("gl_purchase"),x:154,y:297,r:40},{el:c("gl_rule"),x:122,y:104,r:35},{el:c("gl_3ds"),x:508,y:78,r:35},{el:c("gl_capture"),x:490,y:345,r:40}],_=[{el:c("cube_purchase"),cx:106,cy:332,scale:1},{el:c("cube_ruleengine"),cx:122.596,cy:118,scale:1},{el:c("cube_3ds"),cx:507.952,cy:90,scale:1},{el:c("cube_capture"),cx:490,cy:360,scale:1}],k=55,I=.15,F=.18,U=.04;function O(V){N.forEach(D=>{let $=0;V.forEach(z=>{const T=Math.hypot(z.x-D.x,z.y-D.y),M=Math.max(0,1-T/D.r);M>$&&($=M)}),D.el.setAttribute("opacity",($*$*.12).toFixed(3))})}function R(V){_.forEach(D=>{let $=1;V.forEach(T=>{const M=Math.hypot(T.x-D.cx,T.y-D.cy),G=Math.max(0,1-M/k),A=1+G*G*I;A>$&&($=A)});const z=$>D.scale?F:U;D.scale+=($-D.scale)*z,D.el.setAttribute("transform",`translate(${D.cx},${D.cy}) scale(${D.scale.toFixed(4)}) translate(${-D.cx},${-D.cy})`)})}function L(){y.setAttribute("opacity","0"),b.setAttribute("opacity","0"),S.setAttribute("opacity","0"),w.setAttribute("opacity","0"),E.setAttribute("opacity","0"),N.forEach(V=>V.el.setAttribute("opacity","0")),Be(y,Br),Be(b,Br),Be(S,Br)}return V=>{const D=V%hA,$=[];if(D<Gr){const z=D/Gr,T=Ve(z),M=Math.min(1,z/.05),G=z>.85?Math.max(0,(1-z)/.15):1,A=M*G,W=Ae(u,h,T);ye(y,W,A),$.push(W),ye(b,Ae(u,h,Math.max(0,T-.04)),A*.45),ye(S,Ae(u,h,Math.max(0,T-.08)),A*.2),Be(y,Br),Be(b,Br),Be(S,Br),w.setAttribute("opacity","0"),E.setAttribute("opacity","0")}else if(D<Gr+ul){const z=D-Gr;y.setAttribute("opacity","0"),b.setAttribute("opacity","0"),S.setAttribute("opacity","0");const T=200,M=T+Fi*2;if(z>=T&&z<=M){const W=(z-T)/(Fi*2),H=W<=.5?Ve(W*2):1-Ve((W-.5)*2),P=Ae(d,x,H),B=Kg(W);ye(w,P,B*.85),$.push(P)}else w.setAttribute("opacity","0");const G=T+mA,A=G+Fi*2;if(z>=G&&z<=A){const W=(z-G)/(Fi*2),H=W<=.5?Ve(W*2):1-Ve((W-.5)*2),P=Ae(p,v,H),B=Kg(W);ye(E,P,B*.85),$.push(P)}else E.setAttribute("opacity","0")}else if(D<Gr+ul+Md){const z=(D-Gr-ul)/Md,T=Ve(z),M=Math.min(1,z/.08),G=z>.88?Math.max(0,(1-z)/.12):1,A=M*G,W=Ae(f,g,T);ye(y,W,A),$.push(W),ye(b,Ae(f,g,Math.max(0,T-.04)),A*.45),ye(S,Ae(f,g,Math.max(0,T-.08)),A*.2);const H=Vl((z-.1)/.2),P=to(Br,fA,H);Be(y,P),Be(b,P),Be(S,P),w.setAttribute("opacity","0"),E.setAttribute("opacity","0")}else L();$.length>0?O($):N.forEach(z=>z.el.setAttribute("opacity","0")),R($)}}),i.jsxs(Wn,{ref:o,maskSrc:sr.payments[n?"dark":"light"],alt:t,variant:"payments",className:e,children:[i.jsxs("defs",{children:[i.jsxs("linearGradient",{id:a("captureTopGrad"),x1:"526.204",y1:"324.372",x2:"490.312",y2:"386.539",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"#22C55E"}),i.jsx("stop",{offset:"1",stopColor:"#39DD75"})]}),i.jsxs("linearGradient",{id:a("captureRightGrad"),x1:"539.882",y1:"396.514",x2:"522.408",y2:"376.26",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"#22C55E"}),i.jsx("stop",{offset:"1",stopColor:"#06A541"})]}),i.jsxs("linearGradient",{id:a("captureRightStroke"),x1:"571.35",y1:"362.114",x2:"492.163",y2:"362.114",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"white",stopOpacity:"0"}),i.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0.4"})]}),i.jsxs("linearGradient",{id:a("captureLeftStroke"),x1:"93.5752",y1:"15.9521",x2:"2.13717",y2:"15.9521",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"white",stopOpacity:"0"}),i.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0.4"})]}),i.jsxs("linearGradient",{id:a("captureTopStroke"),x1:"448.864",y1:"321.162",x2:"490.315",y2:"392.956",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"white",stopOpacity:"0"}),i.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0.4"})]}),i.jsxs("linearGradient",{id:a("purchaseTopGrad"),x1:"147.444",y1:"340.975",x2:"106",y2:"269.192",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:s.purchaseTopGrad[0]}),i.jsx("stop",{offset:"1",stopColor:s.purchaseTopGrad[1]})]}),i.jsx("clipPath",{id:a("clip_dots"),children:i.jsx("rect",{width:"38.194",height:"38.2849",fill:"white",transform:"matrix(0.83205 -0.5547 0.830139 0.557556 264.324 209.133)"})})]}),i.jsx("path",{"data-anim":"pathMain",d:"M154,297 L209,266 L296,209",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathCapture",d:"M296,209 L371,274 L448,318 L490,345",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathPingRule",d:"M296,209 L209,175 L155,143 L122,104",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathPing3ds",d:"M296,209 L381,173 L476,118 L508,78",fill:"none",stroke:"none"}),i.jsx("path",{d:"M154,297 L209,266 L296,209",fill:"none",stroke:s.pulseBlue,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity[0],className:"app-scene-pulse-line",style:{animationDuration:"4.4s"}}),i.jsx("path",{d:"M296,209 L209,175 L155,143 L122,104",fill:"none",stroke:s.pulseBlue,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity[1],className:"app-scene-pulse-line",style:{animationDuration:"5s",animationDelay:".6s"}}),i.jsx("path",{d:"M296,209 L381,173 L476,118 L508,78",fill:"none",stroke:s.pulseBlue,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity[2],className:"app-scene-pulse-line",style:{animationDuration:"4.4s",animationDelay:"1.2s"}}),i.jsx("path",{d:"M296,209 L371,274 L448,318 L490,345",fill:"none",stroke:"#22C55E",strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity[3],className:"app-scene-pulse-line",style:{animationDuration:"5.6s",animationDelay:"1.8s"}}),i.jsxs("g",{"data-anim":"cube_purchase",children:[i.jsx("path",{d:"M188.889 317.047L106 364.903L106 396.807L188.889 348.951L188.889 317.047Z",fill:s.cubePurchase[0],stroke:"#3E4FE0"}),i.jsx("path",{d:"M23.111 317.047L106 364.903L106 396.807L23.111 348.951L23.111 317.047Z",fill:s.cubePurchase[1],stroke:"#3E4FE0"}),i.jsx("path",{d:"M106 269.191L23.1108 317.048L106 364.904L188.889 317.048L106 269.191Z",fill:`url(#${a("purchaseTopGrad")})`,stroke:"#3E4FE0"})]}),i.jsxs("g",{"data-anim":"cube_ruleengine",children:[i.jsx("path",{d:"M178.547 104.578L122.596 136.881V158.416L178.547 126.113V104.578Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke}),i.jsx("path",{d:"M66.646 104.578L122.596 136.881V158.416L66.646 126.113V104.578Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke}),i.jsx("path",{d:"M122.596 72.277L66.646 104.58L122.596 136.883L178.547 104.58L122.596 72.277Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke})]}),i.jsxs("g",{"data-anim":"cube_3ds",children:[i.jsx("path",{d:"M563.902 78.301L507.952 110.604V132.139L563.902 99.836V78.301Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke}),i.jsx("path",{d:"M452.002 78.301L507.952 110.604V132.139L452.002 99.836V78.301Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke}),i.jsx("path",{d:"M507.952 46L452.002 78.303L507.952 110.606L563.902 78.303L507.952 46Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke})]}),i.jsxs("g",{"data-anim":"cube_capture",children:[i.jsx("path",{d:"M573.201 345.094L490.312 392.95V424.854L573.201 376.998V345.094Z",fill:`url(#${a("captureRightGrad")})`,stroke:`url(#${a("captureRightStroke")})`}),i.jsx("rect",{width:"95.7123",height:"31.9041",transform:"matrix(-0.866025 -0.5 -2.20305e-08 1 490.312 392.953)",fill:"#22C55E",stroke:`url(#${a("captureLeftStroke")})`}),i.jsx("path",{d:"M490.312 297.238L407.423 345.094L490.312 392.951L573.201 345.094L490.312 297.238Z",fill:`url(#${a("captureTopGrad")})`,stroke:`url(#${a("captureTopStroke")})`})]}),i.jsx("circle",{"data-anim":"gl_purchase",cx:"154",cy:"297",r:"32",fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"}),i.jsx("circle",{"data-anim":"gl_rule",cx:"122",cy:"104",r:"26",fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"}),i.jsx("circle",{"data-anim":"gl_3ds",cx:"508",cy:"78",r:"26",fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"}),i.jsx("circle",{"data-anim":"gl_capture",cx:"490",cy:"345",r:"32",fill:"#22C55E",opacity:"0",className:"app-scene-glow"}),i.jsxs("g",{"data-anim":"part",opacity:"0",children:[i.jsx("polygon",{points:"0,-6 6.2,-3 0,0 -6.2,-3",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-6.2,-3 0,0 0,4 -6.2,1",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 6.2,-3 6.2,1 0,4",fill:"#5A6BFF"})]}),i.jsxs("g",{"data-anim":"trail1",opacity:"0",children:[i.jsx("polygon",{points:"0,-3.5 3.6,-1.7 0,0 -3.6,-1.7",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-3.6,-1.7 0,0 0,2.3 -3.6,.6",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 3.6,-1.7 3.6,.6 0,2.3",fill:"#5A6BFF"})]}),i.jsxs("g",{"data-anim":"trail2",opacity:"0",children:[i.jsx("polygon",{points:"0,-2.5 2.6,-1.2 0,0 -2.6,-1.2",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-2.6,-1.2 0,0 0,1.6 -2.6,.4",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 2.6,-1.2 2.6,.4 0,1.6",fill:"#5A6BFF"})]}),i.jsxs("g",{"data-anim":"pingRule",opacity:"0",children:[i.jsx("polygon",{points:"0,-4 4.1,-2 0,0 -4.1,-2",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-4.1,-2 0,0 0,2.6 -4.1,.6",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 4.1,-2 4.1,.6 0,2.6",fill:"#5A6BFF"})]}),i.jsxs("g",{"data-anim":"ping3ds",opacity:"0",children:[i.jsx("polygon",{points:"0,-4 4.1,-2 0,0 -4.1,-2",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-4.1,-2 0,0 0,2.6 -4.1,.6",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 4.1,-2 4.1,.6 0,2.6",fill:"#5A6BFF"})]}),i.jsx(ks,{topFaceFill:s.yunoTopFaceFill,clipId:a("clip_dots")})]})}const $i={f1:"#3E4FE0",f2:"#0617A9",f3:"#5A6BFF"},Tu={f1:"#EF4444",f2:"#AA0707",f3:"#FF5E5E"},yA={f1:"#22C55E",f2:"#06A541",f3:"#44ED82"},s3=2400,bA=800,a3=2400,wA=800,i3=2200,CA=600,l3=2200,SA=800,c3=s3,Dd=c3+bA,Hp=Dd+a3,Ad=Hp+wA,u3=Ad+i3,Pd=u3+CA,d3=Pd+l3,Zg=d3+SA,EA=Hp,NA=6,Oo=55,_A=.15,jA=.18,kA=.04,Vi={x:328.889,y:232},qg={x:477.95,y:137},RA={x:141.78,y:98},MA={x:165.95,y:344},DA={pulseNeutral:"#737373",pulseOpacity:.4,yunoTopFaceFill:"black"},AA={pulseNeutral:"#3E4FE0",pulseOpacity:.25,yunoTopFaceFill:"white"},Xg=[{cx:165.95,cy:355},{cx:328.889,cy:248},{cx:477.95,cy:148}],Jg=[{cx:165.95,cy:344,r:40},{cx:328.889,cy:232,r:70}];function Gs(e,t,n){const r=Math.hypot(e.x-t.x,e.y-t.y);return r<n*.4?0:r<n*.7?(r-n*.4)/(n*.3):1}function PA({className:e,alt:t}){const n=zn(),r=C.useId(),o=C.useRef(null),s=n?DA:AA,a=l=>`${r}-${l}`;return ar(o,l=>{const c=O=>l.querySelector(`[data-anim="${O}"]`),u=O=>Array.from(l.querySelectorAll(`[data-anim="${O}"]`)),f=c("pathCustomerToMerchant"),d=c("pathMerchantToBank"),p=c("pathBankToMerchant"),h=c("pathMerchantToYuno"),g=c("pathMerchantToCustomer"),x=f.getTotalLength(),v=d.getTotalLength(),y=p.getTotalLength(),b=h.getTotalLength(),S=g.getTotalLength(),w=Jg.map((O,R)=>({...O,el:u("glow")[R]})),E=Xg.map((O,R)=>({...O,scale:1,el:u("cube")[R]})),_=u("pSlot").map(O=>({el:O,active:!1,born:0,won:!0}));let k=0;function I(O,R){if(O>Zg)return null;if(O<c3){const L=O/s3,V=Ve(L),D=Ae(f,x,V),$=Math.min(1,L/.05);return{pos:D,col:Tu,op:$*Gs(D,Vi,Oo)}}if(O<Dd)return{pos:Vi,col:Tu,op:0};if(O<Hp){const L=(O-Dd)/a3,V=Ve(L),D=Ae(d,v,V),$=Math.min(1,L/.08);return{pos:D,col:$i,op:$*Gs(D,qg,Oo)}}if(O<Ad)return{pos:qg,col:$i,op:0};if(O<u3){const L=(O-Ad)/i3,V=Ve(L),D=Ae(p,y,V),$=Math.min(1,L/.08);return{pos:D,col:$i,op:$*Gs(D,Vi,Oo)}}if(O<Pd)return{pos:Vi,col:$i,op:0};if(O<d3){const L=(O-Pd)/l3,V=Ve(L),D=Math.min(1,L/.08),$=L>.85?Math.max(0,(1-L)/.15):1;if(R){const T=Ae(h,b,V);return{pos:T,col:yA,op:D*$*Gs(T,RA,Oo)}}const z=Ae(g,S,V);return{pos:z,col:Tu,op:D*$*Gs(z,MA,Oo)}}return null}function F(O){w.forEach(R=>{let L=0;O.forEach(V=>{const D=Math.hypot(V.x-R.cx,V.y-R.cy),$=Math.max(0,1-D/R.r);$>L&&(L=$)}),R.el.setAttribute("opacity",(L*L*.12).toFixed(3))})}function U(O){E.forEach(R=>{let L=1;O.forEach(D=>{const $=Math.hypot(D.x-R.cx,D.y-R.cy),z=Math.max(0,1-$/Oo),T=1+z*z*_A;T>L&&(L=T)});const V=L>R.scale?jA:kA;R.scale+=(L-R.scale)*V,R.el.setAttribute("transform",`translate(${R.cx},${R.cy}) scale(${R.scale.toFixed(4)}) translate(${-R.cx},${-R.cy})`)})}return O=>{if(O>=k){const L=_.find(V=>!V.active||O-V.born>Zg);L&&(L.active=!0,L.born=O,L.won=Math.random()<.5,k=O+EA)}const R=[];for(const L of _){if(!L.active){L.el.setAttribute("opacity","0");continue}const V=O-L.born,D=I(V,L.won);if(!D){L.active=!1,L.el.setAttribute("opacity","0");continue}D.op>.001?(ye(L.el,D.pos,D.op),Be(L.el,D.col)):L.el.setAttribute("opacity","0"),R.push(D.pos)}R.length>0?F(R):w.forEach(L=>L.el.setAttribute("opacity","0")),U(R)}}),i.jsxs(Wn,{ref:o,maskSrc:sr.chargebacks[n?"dark":"light"],alt:t,variant:"chargebacks",className:e,children:[i.jsx("defs",{children:i.jsx("clipPath",{id:a("clip_dots"),children:i.jsx("rect",{width:"38.194",height:"38.2849",fill:"white",transform:"matrix(0.83205 -0.5547 0.830139 0.557556 109.894 98.1328)"})})}),i.jsx("path",{"data-anim":"pathCustomerToMerchant",d:"M191,326.5 L272.121,279.202",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathMerchantToBank",d:"M375.5 211.004L444 171.5L477.95 137.303",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathBankToMerchant",d:"M509.557,172.699 L564.964,204.701C566.397,205.528 566.399,206.869 564.968,207.698 L416.004,293.991C414.568,294.823 412.235,294.823 410.799,293.991 L385.054,279.069 L328.889,232",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathMerchantToYuno",d:"M290,206.498 L215.5,163.498 L141.78,98",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathMerchantToCustomer",d:"M354.925,296.539 L384.724,313.81C386.149,314.636 386.152,315.971 384.732,316.8 L239.076,401.787C237.642,402.624 235.302,402.626 233.862,401.792 L179.482,370.3",fill:"none",stroke:"none"}),i.jsx("path",{d:"M191 326.5L272.121 279.202",fill:"none",stroke:s.pulseNeutral,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity,className:"app-scene-pulse-line",style:{animationDuration:"4.4s"}}),i.jsx("path",{d:"M375.5 211.004L444 171.5",fill:"none",stroke:s.pulseNeutral,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity,className:"app-scene-pulse-line",style:{animationDuration:"4.4s",animationDelay:".6s"}}),i.jsx("path",{d:"M206 387L233.862 401.792C235.302 402.626 237.642 402.624 239.076 401.787L384.732 316.8C386.152 315.971 386.149 314.636 384.724 313.81L354.925 296.539",fill:"none",stroke:s.pulseNeutral,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity,className:"app-scene-pulse-line",style:{animationDuration:"5.6s",animationDelay:"1.2s"}}),i.jsx("path",{d:"M385.054 279.069L410.799 293.991C412.235 294.823 414.568 294.823 416.004 293.991L564.968 207.698C566.399 206.869 566.397 205.528 564.964 204.701L509.557 172.699",fill:"none",stroke:s.pulseNeutral,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity,className:"app-scene-pulse-line",style:{animationDuration:"5.6s",animationDelay:"1.8s"}}),i.jsx("path",{d:"M215.5 163.498L290 206.498",fill:"none",stroke:s.pulseNeutral,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity,className:"app-scene-pulse-line",style:{animationDuration:"4s",animationDelay:"2.4s"}}),Xg.map((l,c)=>{const u=[{x:110,y:312,w:112,h:87},{x:246,y:184,w:166,h:128},{x:422,y:105,w:112,h:87}][c];return i.jsx("g",{"data-anim":"cube",children:i.jsx("rect",{x:u.x,y:u.y,width:u.w,height:u.h,fill:"none",stroke:"none"})},c)}),Jg.map((l,c)=>i.jsx("circle",{"data-anim":"glow",cx:l.cx,cy:l.cy,r:l.r,fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"},c)),Array.from({length:NA},(l,c)=>i.jsxs("g",{"data-anim":"pSlot",opacity:"0",children:[i.jsx("polygon",{points:"0,-6 6.2,-3 0,0 -6.2,-3",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-6.2,-3 0,0 0,4 -6.2,1",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 6.2,-3 6.2,1 0,4",fill:"#5A6BFF"})]},c)),i.jsx(ks,{cx:141.78,cy:98.074,topFaceFill:s.yunoTopFaceFill,clipId:a("clip_dots")})]})}const Td=2400,Od=2200,Ld=2200,Id=2200,TA=800,OA=Td+Od+Ld+Id+TA,LA=55,IA=.15,FA=.18,$A=.04,VA={pulseNeutral:"#737373",pulseNeutralOpacity:.4,pulseOptionOpacity:.35,yunoTopFaceFill:"black"},BA={pulseNeutral:"#3E4FE0",pulseNeutralOpacity:.25,pulseOptionOpacity:.2,yunoTopFaceFill:"white"},Qg=[{name:"availability",cx:122.597,cy:115},{name:"3x",cx:424,cy:89},{name:"6x",cx:478,cy:120},{name:"12x",cx:528,cy:149},{name:"brand",cx:239,cy:370},{name:"bin",cx:94,cy:280},{name:"amount",cx:423,cy:365}],e1=[{cx:122,cy:104,r:45,fill:"#3E4FE0"},{cx:239,cy:370,r:40,fill:"#737373"},{cx:94,cy:280,r:40,fill:"#737373"},{cx:423,cy:365,r:40,fill:"#737373"},{cx:424,cy:89,r:35,fill:"#3E4FE0"},{cx:478,cy:120,r:35,fill:"#3E4FE0"},{cx:528,cy:149,r:35,fill:"#3E4FE0"}];function zA({className:e,alt:t}){const n=zn(),r=C.useId(),o=C.useRef(null),s=n?VA:BA,a=l=>`${r}-${l}`;return ar(o,l=>{const c=O=>l.querySelector(`[data-anim="${O}"]`),u=O=>Array.from(l.querySelectorAll(`[data-anim="${O}"]`)),f={availToYuno:c("pathAvailToYuno"),yunoToBrand:c("pathYunoToBrand"),yunoToBin:c("pathYunoToBin"),yunoToAmount:c("pathYunoToAmount"),yunoTo3x:c("pathYunoTo3x"),yunoTo6x:c("pathYunoTo6x"),yunoTo12x:c("pathYunoTo12x")},d=Object.fromEntries(Object.entries(f).map(([O,R])=>[O,R.getTotalLength()])),p=c("pAvail"),h=c("pBrand"),g=c("pBin"),x=c("pAmount"),v=c("pOpt3x"),y=c("pOpt6x"),b=c("pOpt12x"),S=e1.map((O,R)=>({...O,el:u("glow")[R]})),w=Qg.map((O,R)=>({...O,scale:1,el:u("cube")[R]}));function E(O){S.forEach(R=>{let L=0;O.forEach(V=>{const D=Math.hypot(V.x-R.cx,V.y-R.cy),$=Math.max(0,1-D/R.r);$>L&&(L=$)}),R.el.setAttribute("opacity",(L*L*.12).toFixed(3))})}function N(O){w.forEach(R=>{let L=1;O.forEach(D=>{const $=Math.hypot(D.x-R.cx,D.y-R.cy),z=Math.max(0,1-$/LA),T=1+z*z*IA;T>L&&(L=T)});const V=L>R.scale?FA:$A;R.scale+=(L-R.scale)*V,R.el.setAttribute("transform",`translate(${R.cx},${R.cy}) scale(${R.scale.toFixed(4)}) translate(${-R.cx},${-R.cy})`)})}function _(){[p,h,g,x,v,y,b].forEach(O=>O.setAttribute("opacity","0")),S.forEach(O=>O.el.setAttribute("opacity","0"))}function k(O,R){const L=Math.abs(O.x-R.x),V=Math.abs(O.y-R.y);if(L<R.rx&&V<R.ry)return 0;const D=Math.max(0,1-Math.max(L/R.rx,V/R.ry));return D>.7?Math.max(0,(1-D)/.3):1}const I={x:410,y:85,rx:48,ry:30},F={x:464,y:116,rx:48,ry:30},U={x:514,y:145,rx:48,ry:30};return O=>{const R=O%OA,L=[],V=Td,D=V+Od,$=D+Ld,z=$+Id;if(R<V){const T=R/Td,M=Ve(T),G=Math.min(1,T/.05),A=T>.85?Math.max(0,(1-T)/.15):1,W=Ae(f.availToYuno,d.availToYuno,M);ye(p,W,G*A),L.push(W),[h,g,x,v,y,b].forEach(H=>H.setAttribute("opacity","0"))}else if(R<D){const T=(R-V)/Od,M=Ve(T),G=Math.min(1,T/.08),A=T>.88?Math.max(0,(1-T)/.12):1,W=G*A,H=Ae(f.yunoToBrand,d.yunoToBrand,M);ye(h,H,W),L.push(H);const P=Ae(f.yunoToBin,d.yunoToBin,M);ye(g,P,W),L.push(P);const B=Ae(f.yunoToAmount,d.yunoToAmount,M);ye(x,B,W),L.push(B),p.setAttribute("opacity","0"),[v,y,b].forEach(Y=>Y.setAttribute("opacity","0"))}else if(R<$){const T=(R-D)/Ld,G=1-Ve(T),A=Math.min(1,T/.08),W=T>.88?Math.max(0,(1-T)/.12):1,H=A*W,P=Ae(f.yunoToBrand,d.yunoToBrand,G);ye(h,P,H),L.push(P);const B=Ae(f.yunoToBin,d.yunoToBin,G);ye(g,B,H),L.push(B);const Y=Ae(f.yunoToAmount,d.yunoToAmount,G);ye(x,Y,H),L.push(Y),p.setAttribute("opacity","0"),[v,y,b].forEach(Z=>Z.setAttribute("opacity","0"))}else if(R<z){const T=(R-$)/Id,M=Ve(T),G=Math.min(1,T/.08),A=Ae(f.yunoTo3x,d.yunoTo3x,M),W=G*k(A,I);ye(v,A,W),W>0&&L.push(A);const H=Ae(f.yunoTo6x,d.yunoTo6x,M),P=G*k(H,F);ye(y,H,P),P>0&&L.push(H);const B=Ae(f.yunoTo12x,d.yunoTo12x,M),Y=G*k(B,U);ye(b,B,Y),Y>0&&L.push(B),p.setAttribute("opacity","0"),[h,g,x].forEach(Z=>Z.setAttribute("opacity","0"))}else _();L.length>0?E(L):S.forEach(T=>T.el.setAttribute("opacity","0")),N(L)}}),i.jsxs(Wn,{ref:o,maskSrc:sr.installments[n?"dark":"light"],alt:t,variant:"installments",className:e,children:[i.jsxs("defs",{children:[i.jsx("clipPath",{id:a("clipOptionCubes"),children:i.jsx("path",{fillRule:"evenodd",d:`M0,0 H592 V444 H0 Z
|
|
47
47
|
M423.68,55 L363.999,89.4564 L396.398,108.168 L396.398,122.275 L456.078,87.819 L456.302,73.8345 Z
|
|
48
48
|
M477.682,86 L418.001,120.456 L450.4,139.164 L450.4,153.275 L510.08,118.819 L510.304,104.835 Z
|
|
49
|
-
M527.68,115 L467.999,149.456 L500.398,168.164 L500.4,182.271 L560.08,147.815 L560.302,133.835 Z`})}),i.jsx("clipPath",{id:a("clip_yuno_dots"),children:i.jsx("rect",{width:"38.194",height:"38.2849",fill:"white",transform:"matrix(0.83205 -0.5547 0.830139 0.557556 264.323 208.719)"})})]}),i.jsx("path",{"data-anim":"pathAvailToYuno",d:"M153.781,140.375 L211.336,173.893 L296,209",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathYunoToBrand",d:"M296,209 L280.497,291.998 L258.707,304.29C257.243,305.115 257.23,306.472 258.676,307.307L288.465,324.506C289.903,325.335 289.9,326.681 288.459,327.509L257.574,345.254",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathYunoToBin",d:"M296,209 L209.5,264 L191.817,274.105C190.379,274.926 188.061,274.922 186.631,274.096L140.802,247.587C139.373,246.76 137.053,246.756 135.616,247.579L111.681,261.273",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathYunoToAmount",d:"M296,209 L373.79,271.996 L461.917,322.876C463.352,323.704 463.352,325.048 461.917,325.876L440.958,337.977",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathYunoTo3x",d:"M296,209 L397.5,161.348 L348.172,132.868C346.728,132.034 346.739,130.68 348.198,129.854L379.172,112.309 L424,89",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathYunoTo6x",d:"M296,209 L376,173.816C397.521,161.392 409.586,154.425 431.107,142.001 L478,120",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathYunoTo12x",d:"M296,209 L397.579,161.498 L445.063,188.913C446.454,189.716 448.695,189.744 450.145,188.976L482.47,171.849 L528,149",fill:"none",stroke:"none"}),i.jsx("path",{d:"M153.781,140.375 L211.336,173.893",fill:"none",stroke:s.pulseNeutral,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseNeutralOpacity,className:"app-scene-pulse-line",style:{animationDuration:"4.4s"}}),i.jsx("path",{d:"M257.574 345.254L288.459 327.509C289.9 326.681 289.903 325.335 288.465 324.506L258.676 307.307C257.23 306.472 257.243 305.115 258.707 304.29L280.497 291.998",fill:"none",stroke:s.pulseNeutral,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseNeutralOpacity,className:"app-scene-pulse-line",style:{animationDuration:"5s",animationDelay:".3s"}}),i.jsx("path",{d:"M111.681 261.273L135.616 247.579C137.053 246.756 139.373 246.76 140.802 247.587L186.631 274.096C188.061 274.922 190.379 274.926 191.817 274.105L209.5 264",fill:"none",stroke:s.pulseNeutral,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseNeutralOpacity,className:"app-scene-pulse-line",style:{animationDuration:"5.2s",animationDelay:".6s"}}),i.jsx("path",{d:"M440.958 337.977L461.917 325.876C463.352 325.048 463.352 323.704 461.917 322.876L373.79 271.996",fill:"none",stroke:s.pulseNeutral,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseNeutralOpacity,className:"app-scene-pulse-line",style:{animationDuration:"5s",animationDelay:".9s"}}),i.jsx("path",{d:"M379.172 112.309L348.198 129.854C346.739 130.68 346.728 132.034 348.172 132.868L397.5 161.348",fill:"none",stroke:"#3E4FE0",strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOptionOpacity,className:"app-scene-pulse-line",style:{animationDuration:"4.4s",animationDelay:"1.2s"}}),i.jsx("path",{d:"M376 173.816C397.521 161.392 409.586 154.425 431.107 142.001",fill:"none",stroke:"#3E4FE0",strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOptionOpacity,className:"app-scene-pulse-line",style:{animationDuration:"4.4s",animationDelay:"1.5s"}}),i.jsx("path",{d:"M482.47 171.849L450.145 188.976C448.695 189.744 446.454 189.716 445.063 188.913L397.579 161.498",fill:"none",stroke:"#3E4FE0",strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOptionOpacity,className:"app-scene-pulse-line",style:{animationDuration:"4.6s",animationDelay:"1.8s"}}),Qm.map(l=>i.jsx("g",{"data-anim":"cube",children:i.jsx("rect",{x:l.cx-53,y:l.cy-38.5,width:"106",height:"77",fill:"none",stroke:"none"})},l.name)),e1.map((l,c)=>i.jsx("circle",{"data-anim":"glow",cx:l.cx,cy:l.cy,r:l.r,fill:l.fill,opacity:"0",className:"app-scene-glow"},c)),i.jsxs("g",{"data-anim":"pAvail",opacity:"0",children:[i.jsx("polygon",{points:"0,-6 6.2,-3 0,0 -6.2,-3",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-6.2,-3 0,0 0,4 -6.2,1",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 6.2,-3 6.2,1 0,4",fill:"#5A6BFF"})]}),i.jsxs("g",{"data-anim":"pBrand",opacity:"0",children:[i.jsx("polygon",{points:"0,-4 4.1,-2 0,0 -4.1,-2",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-4.1,-2 0,0 0,2.6 -4.1,.6",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 4.1,-2 4.1,.6 0,2.6",fill:"#5A6BFF"})]}),i.jsxs("g",{"data-anim":"pBin",opacity:"0",children:[i.jsx("polygon",{points:"0,-4 4.1,-2 0,0 -4.1,-2",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-4.1,-2 0,0 0,2.6 -4.1,.6",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 4.1,-2 4.1,.6 0,2.6",fill:"#5A6BFF"})]}),i.jsxs("g",{"data-anim":"pAmount",opacity:"0",children:[i.jsx("polygon",{points:"0,-4 4.1,-2 0,0 -4.1,-2",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-4.1,-2 0,0 0,2.6 -4.1,.6",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 4.1,-2 4.1,.6 0,2.6",fill:"#5A6BFF"})]}),i.jsxs("g",{clipPath:`url(#${a("clipOptionCubes")})`,children:[i.jsxs("g",{"data-anim":"pOpt3x",opacity:"0",children:[i.jsx("polygon",{points:"0,-5 5.2,-2.5 0,0 -5.2,-2.5",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-5.2,-2.5 0,0 0,3.3 -5.2,.8",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 5.2,-2.5 5.2,.8 0,3.3",fill:"#5A6BFF"})]}),i.jsxs("g",{"data-anim":"pOpt6x",opacity:"0",children:[i.jsx("polygon",{points:"0,-5 5.2,-2.5 0,0 -5.2,-2.5",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-5.2,-2.5 0,0 0,3.3 -5.2,.8",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 5.2,-2.5 5.2,.8 0,3.3",fill:"#5A6BFF"})]}),i.jsxs("g",{"data-anim":"pOpt12x",opacity:"0",children:[i.jsx("polygon",{points:"0,-5 5.2,-2.5 0,0 -5.2,-2.5",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-5.2,-2.5 0,0 0,3.3 -5.2,.8",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 5.2,-2.5 5.2,.8 0,3.3",fill:"#5A6BFF"})]})]}),i.jsx(ks,{topFaceFill:s.yunoTopFaceFill,clipId:a("clip_yuno_dots")})]})}const VA=55,BA=.15,zA=.18,WA=.04,t1=9500,HA=1800,GA=1250,Ou=.76,UA={pulseColor:"#737373",pulseOpacity:.4,shimmerColor:"#93C5FD",shimmerOpacity:.22,yunoTopFaceFill:"black",labelFill:"#9CA3AF"},YA={pulseColor:"#3E4FE0",pulseOpacity:.3,shimmerColor:"#3E4FE0",shimmerOpacity:.15,yunoTopFaceFill:"white",labelFill:"black"},n1=[{name:"merchant",x:62,y:238,w:166,h:128,cx:145.042,cy:301.8},{name:"paymentlink",x:100,y:89,w:113,h:87,cx:156.319,cy:132.2},{name:"checkout",x:380,y:89,w:113,h:87,cx:436.278,cy:132.2},{name:"succeeded",x:364,y:238,w:166,h:128,cx:447.3,cy:301.8}],r1=[{cx:145,cy:286,r:40},{cx:156,cy:121,r:35},{cx:436,cy:121,r:35},{cx:447,cy:286,r:40}],KA=["M507.882 160.159L515.557 157.795L516.519 158.35L512.424 162.782L511.662 162.341L515.392 158.446L508.644 160.599L507.882 160.159ZM510.46 159.714L511.405 159.456L513.643 160.748L513.195 161.293L510.46 159.714ZM514.717 164.22C514.28 163.968 514.079 163.683 514.112 163.364C514.151 163.041 514.43 162.73 514.949 162.43L517.776 160.798L518.472 161.2L515.836 162.722C515.411 162.968 515.17 163.193 515.115 163.397C515.071 163.601 515.206 163.794 515.521 163.976C515.864 164.174 516.245 164.266 516.665 164.254C517.09 164.238 517.499 164.116 517.892 163.89L520.511 162.378L521.207 162.78L516.814 165.316L516.151 164.933L517.237 164.306L517.287 164.402C516.839 164.558 516.391 164.622 515.944 164.593C515.502 164.562 515.093 164.437 514.717 164.22ZM520.74 167.583C520.314 167.337 520.096 167.096 520.085 166.86C520.074 166.624 520.273 166.388 520.682 166.152L524.893 163.721L525.589 164.123L521.378 166.554C521.174 166.672 521.069 166.787 521.063 166.898C521.063 167.007 521.16 167.117 521.353 167.228L522.53 167.908L521.917 168.262L520.74 167.583ZM521.801 163.831L522.414 163.476L526.31 165.726L525.697 166.08L521.801 163.831ZM523.406 169.122L529.291 165.724L529.987 166.126L527.525 167.547L527.459 167.49C527.757 167.381 528.05 167.321 528.338 167.308C528.625 167.295 528.901 167.324 529.166 167.394C529.437 167.461 529.686 167.56 529.912 167.691C530.227 167.873 530.421 168.067 530.493 168.275C530.576 168.482 530.545 168.691 530.401 168.902C530.269 169.112 530.04 169.311 529.714 169.5L526.887 171.132L526.191 170.73L528.818 169.213C529.244 168.967 529.481 168.74 529.531 168.533C529.586 168.329 529.459 168.137 529.15 167.959C528.796 167.755 528.404 167.652 527.973 167.652C527.547 167.656 527.13 167.775 526.721 168.011L524.102 169.524L523.406 169.122ZM529.934 173.006C529.531 172.773 529.271 172.514 529.155 172.23C529.044 171.95 529.078 171.663 529.254 171.369C529.437 171.072 529.76 170.79 530.224 170.522C530.694 170.251 531.183 170.064 531.691 169.962C532.2 169.86 532.697 169.841 533.183 169.905C533.675 169.972 534.123 170.122 534.526 170.354C534.93 170.587 535.187 170.844 535.297 171.125C535.413 171.409 535.383 171.698 535.206 171.991C535.029 172.285 534.706 172.567 534.236 172.838C533.772 173.106 533.283 173.293 532.769 173.398C532.261 173.5 531.76 173.518 531.269 173.451C530.782 173.387 530.337 173.239 529.934 173.006ZM530.597 172.623C531.001 172.856 531.456 172.953 531.965 172.915C532.484 172.876 532.998 172.711 533.507 172.417C534.015 172.124 534.3 171.828 534.36 171.532C534.432 171.235 534.266 170.97 533.863 170.737C533.46 170.504 532.998 170.407 532.479 170.445C531.97 170.484 531.462 170.65 530.954 170.943C530.445 171.237 530.155 171.532 530.083 171.828C530.022 172.125 530.194 172.39 530.597 172.623ZM534.407 175.473L538.8 172.937L539.38 173.272L538.336 173.951L538.286 173.904C538.717 173.718 539.112 173.628 539.471 173.631C539.836 173.637 540.173 173.73 540.483 173.908L541.386 174.43L540.756 174.794L539.861 174.277C539.645 174.152 539.419 174.073 539.181 174.038C538.955 174.002 538.72 174.01 538.477 174.061C538.239 174.109 537.999 174.203 537.756 174.344L535.103 175.875L534.407 175.473ZM533.263 174.813L533.876 174.459L537.109 176.325L536.496 176.679L533.263 174.813ZM537.043 172.631L537.656 172.276L539.181 173.157L538.568 173.511L537.043 172.631ZM539.916 178.654L544.309 176.117L545.005 176.519L540.612 179.056L539.916 178.654ZM538.15 177.634L538.764 177.28L542.742 179.577L542.129 179.932L538.15 177.634ZM542.013 175.5L542.626 175.146L545.005 176.519L544.392 176.874L542.013 175.5ZM544.931 175.682L545.743 175.213L546.472 175.634L545.66 176.103L544.931 175.682ZM543.137 180.514L543.833 180.112L549.702 179.939L547 178.379L547.613 178.025L551.078 180.025L550.381 180.427L544.513 180.6L547.364 182.246L546.751 182.6L543.137 180.514ZM549.856 184.393L554.249 181.856L554.945 182.258L550.552 184.795L549.856 184.393ZM548.09 183.373L548.704 183.019L552.683 185.316L552.069 185.671L548.09 183.373ZM551.953 181.239L552.566 180.885L554.945 182.258L554.332 182.613L551.953 181.239ZM554.871 181.421L555.683 180.952L556.413 181.373L555.6 181.842L554.871 181.421ZM553.094 186.262L557.487 183.726L558.125 184.094L557.031 184.755L557.023 184.664C557.338 184.546 557.65 184.48 557.959 184.467C558.28 184.455 558.584 184.483 558.871 184.554C559.158 184.624 559.415 184.724 559.642 184.855C559.979 185.05 560.184 185.254 560.255 185.468C560.333 185.685 560.302 185.9 560.164 186.114C560.032 186.324 559.811 186.519 559.501 186.698L556.675 188.329L555.978 187.927L558.606 186.41C559.015 186.174 559.244 185.949 559.294 185.736C559.349 185.519 559.211 185.315 558.879 185.123C558.653 184.992 558.399 184.903 558.117 184.855C557.841 184.804 557.553 184.801 557.255 184.846C556.967 184.89 556.688 184.991 556.418 185.147L553.79 186.664L553.094 186.262ZM558.487 190.926C558.172 190.744 557.94 190.55 557.79 190.342C557.641 190.135 557.578 189.926 557.6 189.715C557.622 189.505 557.73 189.309 557.923 189.127L558.702 189.519C558.564 189.676 558.52 189.835 558.569 189.998C558.619 190.167 558.813 190.349 559.15 190.543C559.548 190.773 559.932 190.902 560.302 190.931C560.678 190.963 561.026 190.886 561.346 190.701L562.059 190.29C561.722 190.363 561.368 190.373 560.998 190.318C560.628 190.264 560.299 190.154 560.012 189.988C559.642 189.774 559.401 189.53 559.291 189.256C559.186 188.985 559.211 188.709 559.365 188.428C559.525 188.151 559.813 187.892 560.227 187.653C560.647 187.41 561.095 187.244 561.57 187.155C562.051 187.063 562.523 187.045 562.987 187.102C563.457 187.163 563.874 187.299 564.239 187.509C564.549 187.688 564.753 187.889 564.853 188.112C564.957 188.339 564.938 188.551 564.794 188.749L565.491 188.347L566.154 188.73L562.059 191.094C561.717 191.291 561.346 191.416 560.948 191.467C560.545 191.521 560.136 191.502 559.722 191.41C559.302 191.32 558.89 191.159 558.487 190.926ZM560.708 189.625C561.084 189.841 561.515 189.94 562.001 189.921C562.493 189.899 562.968 189.759 563.427 189.5C563.736 189.328 563.946 189.149 564.057 188.964C564.178 188.779 564.2 188.597 564.123 188.419C564.057 188.24 563.897 188.077 563.642 187.93C563.256 187.707 562.822 187.61 562.341 187.638C561.871 187.667 561.41 187.812 560.957 188.074C560.504 188.336 560.252 188.605 560.202 188.883C560.164 189.16 560.332 189.408 560.708 189.625ZM565.589 193.476L566.6 192.892L567.628 193.486L566.617 194.07L565.589 193.476ZM569.277 195.606L570.289 195.022L571.316 195.615L570.305 196.199L569.277 195.606ZM572.958 197.731L573.969 197.147L574.997 197.74L573.985 198.324L572.958 197.731Z","M315.653 51.6748C315.183 51.4036 314.909 51.1021 314.832 50.7703C314.755 50.4385 314.86 50.0907 315.147 49.727C315.44 49.3665 315.901 49.0044 316.531 48.6407C317.167 48.2738 317.797 48.0058 318.421 47.8367C319.051 47.6708 319.653 47.6102 320.228 47.6548C320.808 47.6963 321.333 47.8526 321.803 48.1238C322.322 48.4237 322.593 48.7779 322.615 49.1862C322.643 49.5914 322.414 50.0046 321.927 50.4257L321.115 50.0142C321.446 49.7143 321.604 49.4351 321.587 49.1767C321.576 48.9214 321.416 48.7045 321.107 48.5258C320.792 48.344 320.432 48.2451 320.029 48.2291C319.637 48.2132 319.206 48.277 318.736 48.4205C318.272 48.5609 317.786 48.7779 317.277 49.0714C316.774 49.3617 316.401 49.6409 316.158 49.9089C315.915 50.1769 315.804 50.4257 315.827 50.6554C315.86 50.8851 316.034 51.0909 316.349 51.2728C316.691 51.4706 317.1 51.5695 317.576 51.5695C318.051 51.5695 318.565 51.4578 319.117 51.2345L319.83 51.6939C319.079 52.0066 318.333 52.1629 317.592 52.1629C316.857 52.1597 316.211 51.997 315.653 51.6748ZM319.081 53.501L324.966 50.1032L325.662 50.5052L323.2 51.9265L323.134 51.8691C323.433 51.7606 323.725 51.7 324.013 51.6872C324.3 51.6745 324.576 51.7032 324.842 51.7734C325.112 51.8404 325.361 51.9393 325.588 52.0701C325.903 52.2519 326.096 52.4466 326.168 52.6539C326.251 52.8613 326.22 53.0703 326.077 53.2809C325.944 53.4914 325.715 53.6908 325.389 53.8791L322.562 55.511L321.866 55.109L324.494 53.5919C324.919 53.3463 325.157 53.1197 325.206 52.9124C325.262 52.7082 325.135 52.5168 324.825 52.3381C324.471 52.1339 324.079 52.0318 323.648 52.0318C323.223 52.035 322.805 52.1546 322.396 52.3907L319.777 53.903L319.081 53.501ZM325.684 57.4281C325.269 57.1888 325.004 56.9272 324.888 56.6433C324.778 56.3625 324.811 56.0754 324.988 55.7819C325.176 55.4883 325.502 55.2076 325.966 54.9396C326.43 54.6716 326.913 54.485 327.416 54.3797C327.925 54.2776 328.419 54.2568 328.9 54.3175C329.392 54.3781 329.839 54.5248 330.243 54.7577C330.624 54.9779 330.87 55.2251 330.981 55.4995C331.097 55.7707 331.066 56.0531 330.889 56.3466C330.713 56.6401 330.378 56.9288 329.886 57.2128L329.679 57.3324L326.48 55.4852C326.038 55.7723 325.808 56.0483 325.792 56.3131C325.781 56.5811 325.966 56.8251 326.347 57.0453C326.634 57.2112 326.936 57.3085 327.251 57.3372C327.577 57.3659 327.886 57.3372 328.179 57.2511L328.867 57.7153C328.359 57.8748 327.814 57.9338 327.234 57.8923C326.665 57.8508 326.148 57.6961 325.684 57.4281ZM327.093 55.131L329.53 56.538C329.922 56.2732 330.11 56.0211 330.094 55.7819C330.077 55.5426 329.906 55.3288 329.58 55.1406C329.243 54.946 328.859 54.8455 328.428 54.8391C328.008 54.8327 327.563 54.93 327.093 55.131ZM330.696 60.3215C330.287 60.0855 330.024 59.8254 329.908 59.5415C329.792 59.2575 329.822 58.9688 329.999 58.6753C330.182 58.3786 330.505 58.0962 330.969 57.8282C331.433 57.5602 331.92 57.3752 332.428 57.2731C332.936 57.171 333.436 57.1535 333.928 57.2205C334.426 57.2843 334.879 57.4342 335.288 57.6703C335.614 57.8585 335.843 58.0611 335.976 58.2781C336.114 58.4918 336.152 58.712 336.092 58.9385C336.031 59.165 335.868 59.3899 335.603 59.6133L334.823 59.2209C335.05 59.0135 335.141 58.8077 335.097 58.6035C335.064 58.3993 334.906 58.2159 334.624 58.0532C334.221 57.8203 333.757 57.7214 333.232 57.7565C332.718 57.7915 332.207 57.9559 331.698 58.2494C331.19 58.5429 330.903 58.8396 330.836 59.1395C330.781 59.4394 330.955 59.7058 331.359 59.9387C331.64 60.1014 331.966 60.1939 332.337 60.2163C332.712 60.2418 333.099 60.178 333.497 60.0248L334.177 60.4747C333.79 60.6278 333.389 60.7251 332.975 60.7666C332.566 60.8049 332.165 60.7873 331.773 60.714C331.381 60.6406 331.022 60.5098 330.696 60.3215ZM333.908 62.0616L339.794 58.6639L340.49 59.0658L336.635 61.2912L341.136 61.1619L342.065 61.6979L338.467 61.7745L337.754 64.2822L336.909 63.794L337.522 61.7745L335.749 61.8032L334.605 62.4636L333.908 62.0616ZM340.52 65.9935C340.116 65.7606 339.857 65.5022 339.741 65.2183C339.63 64.9375 339.663 64.6504 339.84 64.3569C340.022 64.0602 340.346 63.7778 340.81 63.5098C341.28 63.2386 341.769 63.052 342.277 62.9499C342.785 62.8478 343.283 62.8287 343.769 62.8925C344.261 62.9595 344.708 63.1094 345.112 63.3423C345.515 63.5752 345.772 63.832 345.883 64.1128C345.999 64.3967 345.968 64.6855 345.791 64.979C345.615 65.2725 345.291 65.5549 344.822 65.8261C344.357 66.094 343.868 66.2807 343.355 66.386C342.846 66.4881 342.346 66.5056 341.854 66.4386C341.368 66.3748 340.923 66.2264 340.52 65.9935ZM341.183 65.6107C341.586 65.8436 342.042 65.9409 342.55 65.9026C343.07 65.8643 343.584 65.6984 344.092 65.4049C344.601 65.1114 344.885 64.8163 344.946 64.5196C345.018 64.2229 344.852 63.9581 344.449 63.7252C344.045 63.4923 343.584 63.395 343.064 63.4332C342.556 63.4715 342.048 63.6374 341.539 63.9309C341.031 64.2245 340.741 64.5196 340.669 64.8163C340.608 65.113 340.779 65.3778 341.183 65.6107ZM345.183 68.686C344.747 68.4339 344.545 68.1484 344.578 67.8294C344.617 67.5071 344.896 67.1961 345.415 66.8962L348.242 65.2643L348.938 65.6663L346.302 67.1881C345.877 67.4337 345.636 67.6587 345.581 67.8629C345.537 68.067 345.672 68.2601 345.987 68.4419C346.33 68.6397 346.711 68.7322 347.131 68.7195C347.557 68.7035 347.965 68.5823 348.358 68.3558L350.977 66.8435L351.673 67.2455L347.28 69.7819L346.617 69.399L347.703 68.7721L347.753 68.8678C347.305 69.0242 346.857 69.088 346.41 69.0593C345.968 69.0274 345.559 68.9029 345.183 68.686ZM351.206 72.0484C350.78 71.8027 350.562 71.5619 350.551 71.3258C350.54 71.0897 350.739 70.8536 351.148 70.6175L355.359 68.1864L356.055 68.5884L351.844 71.0195C351.64 71.1375 351.535 71.2524 351.529 71.3641C351.529 71.4725 351.626 71.5826 351.819 71.6943L352.996 72.3738L352.383 72.728L351.206 72.0484ZM352.267 68.2965L352.88 67.9423L356.776 70.1916L356.163 70.5457L352.267 68.2965ZM360.276 77.2849L364.984 74.5667C365.161 74.4646 365.249 74.3561 365.249 74.2413C365.249 74.1264 365.161 74.0179 364.984 73.9158L363.948 73.3176L364.561 72.9635L365.631 73.5808C366.034 73.8137 366.233 74.0498 366.227 74.2891C366.233 74.5284 366.034 74.7645 365.631 74.9974L360.972 77.6869L360.276 77.2849ZM358.51 76.2656L359.124 75.9114L363.102 78.2085L362.489 78.5627L358.51 76.2656ZM365.412 80.2501L369.805 77.7137L370.501 78.1157L366.108 80.6521L365.412 80.2501ZM363.646 79.2308L364.26 78.8767L368.238 81.1738L367.625 81.5279L363.646 79.2308ZM367.509 77.0964L368.122 76.7423L370.501 78.1157L369.888 78.4699L367.509 77.0964ZM370.427 77.2783L371.239 76.8093L371.968 77.2304L371.156 77.6994L370.427 77.2783ZM368.649 82.1194L373.043 79.5831L373.681 79.9515L372.587 80.612L372.578 80.521C372.893 80.403 373.206 80.3376 373.515 80.3248C373.836 80.3121 374.14 80.3408 374.427 80.411C374.714 80.4812 374.971 80.5817 375.198 80.7125C375.535 80.9071 375.739 81.1113 375.811 81.325C375.888 81.542 375.858 81.7573 375.72 81.9711C375.587 82.1816 375.366 82.3763 375.057 82.5549L372.23 84.1868L371.534 83.7848L374.162 82.2678C374.571 82.0317 374.8 81.8068 374.85 81.593C374.905 81.3761 374.767 81.1719 374.435 80.9805C374.209 80.8496 373.954 80.7603 373.673 80.7125C373.396 80.6614 373.109 80.6582 372.811 80.7029C372.523 80.7476 372.244 80.8481 371.973 81.0044L369.346 82.5214L368.649 82.1194ZM373.669 85.0176L379.554 81.6199L380.251 82.0218L376.396 84.2472L380.897 84.1179L381.826 84.6539L378.228 84.7305L377.515 87.2382L376.67 86.75L377.283 84.7305L375.509 84.7592L374.366 85.4196L373.669 85.0176Z","M27.4905 191.634L21.6053 188.237L22.9979 187.433C23.5063 187.139 24.0644 186.951 24.6722 186.868C25.2801 186.779 25.9073 186.803 26.5538 186.94C27.2004 187.071 27.8386 187.318 28.4686 187.681C29.0985 188.045 29.5268 188.414 29.7534 188.787C29.9854 189.157 30.0241 189.518 29.8694 189.868C29.7202 190.216 29.3914 190.537 28.883 190.83L27.4905 191.634ZM27.5071 190.821L28.1453 190.452C28.72 190.121 28.9797 189.757 28.9245 189.361C28.8692 188.959 28.4686 188.543 27.7226 188.112C26.9766 187.681 26.2554 187.45 25.5592 187.418C24.8629 187.38 24.2274 187.527 23.6527 187.859L23.0145 188.227L27.5071 190.821ZM33.7205 188.152C33.4442 188.312 33.1458 188.427 32.8253 188.497C32.5048 188.567 32.1926 188.588 31.8887 188.559C31.5792 188.527 31.3057 188.443 31.0681 188.305C30.6923 188.089 30.5127 187.857 30.5293 187.612C30.5459 187.36 30.7476 187.068 31.1344 186.736L32.3114 185.712C31.9356 185.495 31.5709 185.383 31.2173 185.377C30.8691 185.367 30.5376 185.453 30.2226 185.635C29.9187 185.811 29.7501 185.988 29.717 186.166C29.6783 186.342 29.7529 186.522 29.9408 186.707L29.145 187.099C28.8135 186.812 28.6753 186.506 28.7306 186.181C28.7858 185.849 29.0621 185.539 29.5595 185.252C30.09 184.946 30.6619 184.801 31.2753 184.817C31.8831 184.83 32.4661 184.997 33.0242 185.319L34.8478 186.372C34.9473 186.43 35.0385 186.457 35.1213 186.453C35.2042 186.45 35.2899 186.423 35.3783 186.372L35.6601 186.209L36.2735 186.564C36.2459 186.586 36.1961 186.618 36.1243 186.659C36.058 186.704 35.9917 186.745 35.9254 186.784C35.7375 186.892 35.5468 186.967 35.3534 187.009C35.1656 187.047 34.9721 187.047 34.7732 187.009C34.5688 186.967 34.356 186.886 34.135 186.765L34.2676 186.688C34.4168 186.819 34.4942 186.972 34.4997 187.147C34.5052 187.316 34.4417 187.49 34.309 187.669C34.1709 187.844 33.9747 188.006 33.7205 188.152ZM33.1734 187.76C33.4719 187.588 33.6708 187.415 33.7703 187.243C33.8642 187.068 33.8697 186.898 33.7868 186.736C33.6984 186.57 33.5326 186.417 33.2895 186.276L32.9082 186.056L31.8306 186.985C31.5875 187.189 31.4659 187.358 31.4659 187.492C31.4604 187.623 31.5488 187.741 31.7312 187.846C31.9356 187.964 32.165 188.017 32.4192 188.004C32.6733 187.985 32.9248 187.903 33.1734 187.76ZM39.3538 184.9C38.9725 185.12 38.5774 185.272 38.1684 185.355C37.7595 185.438 37.3644 185.461 36.9831 185.426C36.6018 185.385 36.262 185.291 35.9636 185.144L36.6433 184.694C36.9583 184.825 37.2898 184.879 37.6379 184.857C37.9916 184.831 38.3425 184.718 38.6906 184.517C39.0167 184.329 39.2211 184.157 39.304 184C39.3924 183.841 39.3372 183.704 39.1382 183.589C39.0111 183.515 38.8758 183.472 38.7321 183.46C38.5884 183.447 38.4061 183.472 38.185 183.536C37.9585 183.597 37.6573 183.704 37.2815 183.857C36.7787 184.058 36.3504 184.196 35.9967 184.273C35.6431 184.343 35.3309 184.358 35.0601 184.316C34.7893 184.275 34.5351 184.185 34.2975 184.048C34.0433 183.901 33.8803 183.734 33.8085 183.546C33.7366 183.357 33.767 183.158 33.8996 182.947C34.0323 182.737 34.2782 182.528 34.6374 182.321C35.0021 182.11 35.3723 181.973 35.7481 181.909C36.1238 181.839 36.4913 181.824 36.8505 181.866C37.2042 181.904 37.5302 181.984 37.8286 182.105L37.1489 182.555C36.961 182.485 36.7621 182.443 36.5521 182.431C36.3421 182.411 36.1294 182.426 35.9138 182.474C35.6983 182.515 35.4911 182.593 35.2922 182.708C34.9717 182.893 34.7976 183.067 34.77 183.23C34.7423 183.393 34.8225 183.528 35.0104 183.637C35.1596 183.723 35.3143 183.771 35.4745 183.78C35.6348 183.79 35.8227 183.764 36.0382 183.704C36.2482 183.64 36.5079 183.544 36.8173 183.416C37.3423 183.196 37.7871 183.048 38.1519 182.971C38.511 182.892 38.8233 182.871 39.0885 182.909C39.3538 182.947 39.6079 183.037 39.8511 183.177C40.1108 183.327 40.2572 183.501 40.2904 183.699C40.3236 183.89 40.2572 184.091 40.0915 184.302C39.9312 184.509 39.6853 184.709 39.3538 184.9ZM42.4837 182.978L36.5986 179.58L37.2949 179.178L39.7567 180.6L39.6572 180.638C39.4693 180.466 39.3643 180.296 39.3422 180.131C39.3201 179.965 39.3699 179.805 39.4914 179.652C39.6075 179.496 39.7788 179.352 40.0053 179.221C40.3203 179.039 40.6574 178.928 41.0166 178.886C41.3758 178.838 41.7377 178.856 42.1024 178.939C42.4672 179.016 42.8125 179.148 43.1386 179.336L45.9651 180.968L45.2688 181.37L42.6412 179.853C42.2157 179.607 41.8234 179.47 41.4642 179.441C41.1105 179.41 40.779 179.483 40.4695 179.662C40.1159 179.866 39.939 180.092 39.939 180.341C39.9446 180.587 40.1518 180.828 40.5607 181.064L43.18 182.576L42.4837 182.978ZM49.4846 179.051C49.1807 179.226 48.8436 179.344 48.4734 179.405C48.0976 179.462 47.7274 179.459 47.3627 179.395L48.0009 179.793L47.371 180.156L41.4858 176.759L42.1821 176.357L44.2875 177.572C44.2156 177.403 44.2239 177.21 44.3123 176.993C44.3952 176.773 44.5886 176.575 44.8926 176.4C45.2794 176.176 45.7077 176.038 46.1774 175.983C46.6471 175.929 47.1278 175.958 47.6196 176.069C48.117 176.178 48.6005 176.368 49.0702 176.639C49.5399 176.91 49.8687 177.189 50.0566 177.476C50.25 177.76 50.2997 178.038 50.2058 178.309C50.1118 178.58 49.8715 178.828 49.4846 179.051ZM48.7801 178.692C49.1503 178.478 49.294 178.226 49.2111 177.936C49.1337 177.642 48.8436 177.35 48.3408 177.06C47.8324 176.767 47.3268 176.599 46.8239 176.558C46.321 176.51 45.89 176.59 45.5308 176.797C45.26 176.953 45.0943 177.125 45.0335 177.314C44.9672 177.499 45.0031 177.692 45.1412 177.893C45.2849 178.091 45.5281 178.288 45.8707 178.486C46.2022 178.678 46.5421 178.816 46.8902 178.903C47.2383 178.982 47.5727 179.006 47.8932 178.974C48.2192 178.939 48.5148 178.845 48.7801 178.692ZM54.1812 176.339C53.7778 176.572 53.3302 176.722 52.8384 176.789C52.3521 176.853 51.8548 176.834 51.3464 176.732C50.8325 176.626 50.3435 176.44 49.8793 176.172C49.4096 175.901 49.0863 175.618 48.9095 175.325C48.7326 175.031 48.6995 174.744 48.81 174.463C48.926 174.179 49.1858 173.921 49.5892 173.688C49.9926 173.455 50.4374 173.307 50.9237 173.243C51.4155 173.176 51.9156 173.194 52.424 173.296C52.9324 173.398 53.4214 173.584 53.8911 173.856C54.3553 174.124 54.6786 174.406 54.8609 174.703C55.0378 174.996 55.0681 175.285 54.9521 175.569C54.8416 175.85 54.5846 176.106 54.1812 176.339ZM53.5181 175.956C53.9215 175.724 54.0901 175.46 54.0237 175.167C53.9574 174.867 53.6701 174.57 53.1617 174.277C52.6533 173.983 52.1422 173.819 51.6282 173.784C51.1143 173.742 50.6557 173.838 50.2523 174.071C49.8489 174.304 49.6803 174.57 49.7467 174.87C49.813 175.164 50.1003 175.457 50.6087 175.751C51.1171 176.044 51.6282 176.212 52.1422 176.253C52.6561 176.288 53.1147 176.189 53.5181 175.956ZM58.5711 173.805C58.2948 173.964 57.9964 174.079 57.6759 174.149C57.3554 174.22 57.0432 174.24 56.7393 174.212C56.4298 174.18 56.1563 174.095 55.9187 173.958C55.5429 173.741 55.3633 173.51 55.3799 173.264C55.3965 173.012 55.5982 172.72 55.985 172.388L57.162 171.364C56.7862 171.147 56.4215 171.036 56.0679 171.029C55.7197 171.02 55.3882 171.106 55.0732 171.288C54.7693 171.463 54.6007 171.64 54.5676 171.819C54.5289 171.994 54.6035 172.175 54.7914 172.36L53.9956 172.752C53.6641 172.465 53.5259 172.159 53.5812 171.833C53.6364 171.501 53.9127 171.192 54.4101 170.905C54.9406 170.598 55.5125 170.453 56.1259 170.469C56.7337 170.482 57.3167 170.65 57.8749 170.972L59.6984 172.025C59.7979 172.082 59.8891 172.109 59.972 172.106C60.0548 172.103 60.1405 172.076 60.2289 172.025L60.5107 171.862L61.1241 172.216C61.0965 172.238 61.0467 172.27 60.9749 172.312C60.9086 172.356 60.8423 172.398 60.776 172.436C60.5881 172.545 60.3974 172.62 60.204 172.661C60.0162 172.699 59.8227 172.699 59.6238 172.661C59.4194 172.62 59.2066 172.538 58.9856 172.417L59.1182 172.34C59.2674 172.471 59.3448 172.624 59.3503 172.8C59.3558 172.969 59.2923 173.143 59.1596 173.321C59.0215 173.497 58.8253 173.658 58.5711 173.805ZM58.0241 173.412C58.3225 173.24 58.5214 173.068 58.6209 172.896C58.7148 172.72 58.7203 172.551 58.6374 172.388C58.549 172.222 58.3832 172.069 58.1401 171.929L57.7588 171.709L56.6812 172.637C56.4381 172.841 56.3165 173.01 56.3165 173.144C56.311 173.275 56.3994 173.393 56.5818 173.499C56.7862 173.617 57.0156 173.669 57.2698 173.656C57.524 173.637 57.7754 173.556 58.0241 173.412ZM63.4252 170.887L59.0321 168.351L59.6123 168.016L60.7893 168.619L60.7064 168.648C60.3859 168.399 60.2284 168.171 60.234 167.963C60.245 167.753 60.4053 167.558 60.7147 167.38L61.6182 166.858L62.2482 167.222L61.353 167.739C61.1375 167.863 60.9993 167.994 60.9385 168.131C60.8777 168.262 60.8916 168.397 60.98 168.538C61.0629 168.675 61.2259 168.814 61.469 168.954L64.1215 170.485L63.4252 170.887ZM62.2813 171.548L61.6679 171.194L64.9006 169.327L65.514 169.681L62.2813 171.548ZM58.5016 169.366L57.8882 169.012L59.4134 168.131L60.0267 168.485L58.5016 169.366ZM68.8181 167.889C68.4312 168.112 68.003 168.251 67.5333 168.305C67.0636 168.359 66.58 168.332 66.0827 168.224C65.5909 168.112 65.1101 167.921 64.6404 167.649C64.1707 167.378 63.8392 167.101 63.6458 166.817C63.4579 166.53 63.4109 166.25 63.5048 165.979C63.5988 165.708 63.8392 165.461 64.226 165.238C64.5354 165.059 64.8808 164.946 65.2621 164.898C65.6379 164.847 65.9694 164.844 66.2568 164.888L64.1514 163.673L64.8477 163.271L70.7328 166.668L70.1028 167.032L69.4149 166.664C69.5309 166.871 69.5392 167.083 69.4397 167.3C69.3347 167.514 69.1275 167.71 68.8181 167.889ZM68.1964 167.482C68.4616 167.329 68.6219 167.16 68.6771 166.975C68.7379 166.786 68.6965 166.593 68.5528 166.396C68.4091 166.191 68.1715 165.994 67.84 165.802C67.4974 165.604 67.152 165.466 66.8038 165.386C66.4612 165.303 66.1297 165.281 65.8092 165.319C65.4831 165.354 65.1847 165.45 64.914 165.606C64.5548 165.813 64.4139 166.064 64.4912 166.357C64.5686 166.644 64.8615 166.935 65.3699 167.228C65.8727 167.519 66.3756 167.688 66.8784 167.736C67.3868 167.78 67.8261 167.696 68.1964 167.482Z"];function ZA({className:e,alt:t}){const n=zn(),r=C.useId(),o=C.useRef(null),s=n?UA:YA,a=l=>`${r}-${l}`;return ar(o,l=>{const c=V=>l.querySelector(`[data-anim="${V}"]`),u=V=>Array.from(l.querySelectorAll(`[data-anim="${V}"]`)),f=c("orbit"),d=f.getTotalLength(),p=c("part"),h=c("trail1"),m=c("trail2"),x=c("shimmerFace"),v=c("shimmerGrad"),y=r1.map((V,D)=>({...V,el:u("glow")[D]})),b=n1.map((V,D)=>({...V,scale:1,el:u("cube")[D]}));function S(V){return Ae(f,d,V)}function w(V){b.forEach(D=>{let $=1;if(V){const P=Math.hypot(V.x-D.cx,V.y-D.cy),M=Math.max(0,1-P/VA);$=1+M*M*BA}const z=$>D.scale?zA:WA;D.scale+=($-D.scale)*z,D.el.setAttribute("transform",`translate(${D.cx},${D.cy}) scale(${D.scale.toFixed(4)}) translate(${-D.cx},${-D.cy})`)})}function E(V,D){let $=1/0,z=0;for(let P=0;P<=500;P++){const M=P/500,G=f.getPointAtLength(M*d),A=Math.hypot(G.x-V,G.y-D);A<$&&($=A,z=M)}return z}const N=E(156,121),_=E(436,121),k=N/Ou,I=Math.round(k*t1),F=HA,U=t1-I,O=GA,R=I+F+U+O;function L(){p.setAttribute("opacity","0"),h.setAttribute("opacity","0"),m.setAttribute("opacity","0"),x.setAttribute("opacity","0"),y.forEach(V=>V.el.setAttribute("opacity","0"))}return V=>{const D=V%R;let $=null;if(D<I){const z=D/I,P=Ve(z)*N,M=Math.min(1,z/.05),G=S(P);ye(p,G,M),$=G,ye(h,S(Math.max(0,P-.012)),M*.45),ye(m,S(Math.max(0,P-.025)),M*.2),y.forEach(A=>{const W=Math.hypot(G.x-A.cx,G.y-A.cy),H=Math.max(0,1-W/A.r);A.el.setAttribute("opacity",(H*H*.12).toFixed(3))})}else if(D<I+F){const z=(D-I)/F,P=S(N);ye(p,P,1),$=P,ye(h,P,Math.max(0,.45*(1-z*3))),ye(m,P,Math.max(0,.2*(1-z*3))),y.forEach(H=>H.el.setAttribute("opacity","0"));const M=Math.min(1,z/.12),G=z>.8?(1-z)/.2:1;x.setAttribute("opacity",(M*G).toFixed(3));let A;z<.1?A=0:z<.5?A=Ve((z-.1)/.4):z<.9?A=1-Ve((z-.5)/.4):A=0;const W=40+A*190;v.setAttribute("x1",(W-20).toFixed(1)),v.setAttribute("x2",(W+20).toFixed(1))}else if(D<I+F+U){const z=(D-I-F)/U,P=(_-N)/(Ou-N);let M=Ve(z);const G=Math.abs(M-P);if(G<.15){const B=1-(1-G/.15)*.5;M=P+(M-P)*B}const A=N+M*(Ou-N),W=Math.max(0,1-z*10);x.setAttribute("opacity",W.toFixed(3));const H=z>.88?Math.max(0,(1-z)/.12):1,T=S(A);ye(p,T,H),$=T,ye(h,S(Math.max(0,A-.012)),H*.45),ye(m,S(Math.max(0,A-.025)),H*.2),y.forEach(B=>{const Y=Math.hypot(T.x-B.cx,T.y-B.cy),Z=Math.max(0,1-Y/B.r);B.el.setAttribute("opacity",(Z*Z*.12).toFixed(3))})}else L();w($)}}),i.jsxs(Wn,{ref:o,maskSrc:sr.paymentLinks[n?"dark":"light"],alt:t,variant:"paymentLinks",className:e,children:[i.jsxs("defs",{children:[i.jsxs("linearGradient",{id:a("shimmerGrad"),"data-anim":"shimmerGrad",gradientUnits:"userSpaceOnUse",x1:"60",y1:"0",x2:"100",y2:"0",children:[i.jsx("stop",{offset:"0",stopColor:s.shimmerColor,stopOpacity:"0"}),i.jsx("stop",{offset:"0.5",stopColor:s.shimmerColor,stopOpacity:s.shimmerOpacity}),i.jsx("stop",{offset:"1",stopColor:s.shimmerColor,stopOpacity:"0"})]}),i.jsx("clipPath",{id:a("dotClip"),children:i.jsx("rect",{width:"38.194",height:"38.2849",fill:"white",transform:"matrix(0.83205 -0.5547 0.830139 0.557556 265.475 194.07)"})})]}),i.jsx("path",{"data-anim":"orbit",d:`M145,286 L103.507,262.346 L15.783,211.699 L103.507,161.051
|
|
49
|
+
M527.68,115 L467.999,149.456 L500.398,168.164 L500.4,182.271 L560.08,147.815 L560.302,133.835 Z`})}),i.jsx("clipPath",{id:a("clip_yuno_dots"),children:i.jsx("rect",{width:"38.194",height:"38.2849",fill:"white",transform:"matrix(0.83205 -0.5547 0.830139 0.557556 264.323 208.719)"})})]}),i.jsx("path",{"data-anim":"pathAvailToYuno",d:"M153.781,140.375 L211.336,173.893 L296,209",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathYunoToBrand",d:"M296,209 L280.497,291.998 L258.707,304.29C257.243,305.115 257.23,306.472 258.676,307.307L288.465,324.506C289.903,325.335 289.9,326.681 288.459,327.509L257.574,345.254",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathYunoToBin",d:"M296,209 L209.5,264 L191.817,274.105C190.379,274.926 188.061,274.922 186.631,274.096L140.802,247.587C139.373,246.76 137.053,246.756 135.616,247.579L111.681,261.273",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathYunoToAmount",d:"M296,209 L373.79,271.996 L461.917,322.876C463.352,323.704 463.352,325.048 461.917,325.876L440.958,337.977",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathYunoTo3x",d:"M296,209 L397.5,161.348 L348.172,132.868C346.728,132.034 346.739,130.68 348.198,129.854L379.172,112.309 L424,89",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathYunoTo6x",d:"M296,209 L376,173.816C397.521,161.392 409.586,154.425 431.107,142.001 L478,120",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathYunoTo12x",d:"M296,209 L397.579,161.498 L445.063,188.913C446.454,189.716 448.695,189.744 450.145,188.976L482.47,171.849 L528,149",fill:"none",stroke:"none"}),i.jsx("path",{d:"M153.781,140.375 L211.336,173.893",fill:"none",stroke:s.pulseNeutral,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseNeutralOpacity,className:"app-scene-pulse-line",style:{animationDuration:"4.4s"}}),i.jsx("path",{d:"M257.574 345.254L288.459 327.509C289.9 326.681 289.903 325.335 288.465 324.506L258.676 307.307C257.23 306.472 257.243 305.115 258.707 304.29L280.497 291.998",fill:"none",stroke:s.pulseNeutral,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseNeutralOpacity,className:"app-scene-pulse-line",style:{animationDuration:"5s",animationDelay:".3s"}}),i.jsx("path",{d:"M111.681 261.273L135.616 247.579C137.053 246.756 139.373 246.76 140.802 247.587L186.631 274.096C188.061 274.922 190.379 274.926 191.817 274.105L209.5 264",fill:"none",stroke:s.pulseNeutral,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseNeutralOpacity,className:"app-scene-pulse-line",style:{animationDuration:"5.2s",animationDelay:".6s"}}),i.jsx("path",{d:"M440.958 337.977L461.917 325.876C463.352 325.048 463.352 323.704 461.917 322.876L373.79 271.996",fill:"none",stroke:s.pulseNeutral,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseNeutralOpacity,className:"app-scene-pulse-line",style:{animationDuration:"5s",animationDelay:".9s"}}),i.jsx("path",{d:"M379.172 112.309L348.198 129.854C346.739 130.68 346.728 132.034 348.172 132.868L397.5 161.348",fill:"none",stroke:"#3E4FE0",strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOptionOpacity,className:"app-scene-pulse-line",style:{animationDuration:"4.4s",animationDelay:"1.2s"}}),i.jsx("path",{d:"M376 173.816C397.521 161.392 409.586 154.425 431.107 142.001",fill:"none",stroke:"#3E4FE0",strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOptionOpacity,className:"app-scene-pulse-line",style:{animationDuration:"4.4s",animationDelay:"1.5s"}}),i.jsx("path",{d:"M482.47 171.849L450.145 188.976C448.695 189.744 446.454 189.716 445.063 188.913L397.579 161.498",fill:"none",stroke:"#3E4FE0",strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOptionOpacity,className:"app-scene-pulse-line",style:{animationDuration:"4.6s",animationDelay:"1.8s"}}),Qg.map(l=>i.jsx("g",{"data-anim":"cube",children:i.jsx("rect",{x:l.cx-53,y:l.cy-38.5,width:"106",height:"77",fill:"none",stroke:"none"})},l.name)),e1.map((l,c)=>i.jsx("circle",{"data-anim":"glow",cx:l.cx,cy:l.cy,r:l.r,fill:l.fill,opacity:"0",className:"app-scene-glow"},c)),i.jsxs("g",{"data-anim":"pAvail",opacity:"0",children:[i.jsx("polygon",{points:"0,-6 6.2,-3 0,0 -6.2,-3",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-6.2,-3 0,0 0,4 -6.2,1",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 6.2,-3 6.2,1 0,4",fill:"#5A6BFF"})]}),i.jsxs("g",{"data-anim":"pBrand",opacity:"0",children:[i.jsx("polygon",{points:"0,-4 4.1,-2 0,0 -4.1,-2",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-4.1,-2 0,0 0,2.6 -4.1,.6",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 4.1,-2 4.1,.6 0,2.6",fill:"#5A6BFF"})]}),i.jsxs("g",{"data-anim":"pBin",opacity:"0",children:[i.jsx("polygon",{points:"0,-4 4.1,-2 0,0 -4.1,-2",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-4.1,-2 0,0 0,2.6 -4.1,.6",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 4.1,-2 4.1,.6 0,2.6",fill:"#5A6BFF"})]}),i.jsxs("g",{"data-anim":"pAmount",opacity:"0",children:[i.jsx("polygon",{points:"0,-4 4.1,-2 0,0 -4.1,-2",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-4.1,-2 0,0 0,2.6 -4.1,.6",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 4.1,-2 4.1,.6 0,2.6",fill:"#5A6BFF"})]}),i.jsxs("g",{clipPath:`url(#${a("clipOptionCubes")})`,children:[i.jsxs("g",{"data-anim":"pOpt3x",opacity:"0",children:[i.jsx("polygon",{points:"0,-5 5.2,-2.5 0,0 -5.2,-2.5",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-5.2,-2.5 0,0 0,3.3 -5.2,.8",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 5.2,-2.5 5.2,.8 0,3.3",fill:"#5A6BFF"})]}),i.jsxs("g",{"data-anim":"pOpt6x",opacity:"0",children:[i.jsx("polygon",{points:"0,-5 5.2,-2.5 0,0 -5.2,-2.5",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-5.2,-2.5 0,0 0,3.3 -5.2,.8",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 5.2,-2.5 5.2,.8 0,3.3",fill:"#5A6BFF"})]}),i.jsxs("g",{"data-anim":"pOpt12x",opacity:"0",children:[i.jsx("polygon",{points:"0,-5 5.2,-2.5 0,0 -5.2,-2.5",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-5.2,-2.5 0,0 0,3.3 -5.2,.8",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 5.2,-2.5 5.2,.8 0,3.3",fill:"#5A6BFF"})]})]}),i.jsx(ks,{topFaceFill:s.yunoTopFaceFill,clipId:a("clip_yuno_dots")})]})}const WA=55,HA=.15,GA=.18,UA=.04,t1=9500,YA=1800,KA=1250,Ou=.76,ZA={pulseColor:"#737373",pulseOpacity:.4,shimmerColor:"#93C5FD",shimmerOpacity:.22,yunoTopFaceFill:"black",labelFill:"#9CA3AF"},qA={pulseColor:"#3E4FE0",pulseOpacity:.3,shimmerColor:"#3E4FE0",shimmerOpacity:.15,yunoTopFaceFill:"white",labelFill:"black"},n1=[{name:"merchant",x:62,y:238,w:166,h:128,cx:145.042,cy:301.8},{name:"paymentlink",x:100,y:89,w:113,h:87,cx:156.319,cy:132.2},{name:"checkout",x:380,y:89,w:113,h:87,cx:436.278,cy:132.2},{name:"succeeded",x:364,y:238,w:166,h:128,cx:447.3,cy:301.8}],r1=[{cx:145,cy:286,r:40},{cx:156,cy:121,r:35},{cx:436,cy:121,r:35},{cx:447,cy:286,r:40}],XA=["M507.882 160.159L515.557 157.795L516.519 158.35L512.424 162.782L511.662 162.341L515.392 158.446L508.644 160.599L507.882 160.159ZM510.46 159.714L511.405 159.456L513.643 160.748L513.195 161.293L510.46 159.714ZM514.717 164.22C514.28 163.968 514.079 163.683 514.112 163.364C514.151 163.041 514.43 162.73 514.949 162.43L517.776 160.798L518.472 161.2L515.836 162.722C515.411 162.968 515.17 163.193 515.115 163.397C515.071 163.601 515.206 163.794 515.521 163.976C515.864 164.174 516.245 164.266 516.665 164.254C517.09 164.238 517.499 164.116 517.892 163.89L520.511 162.378L521.207 162.78L516.814 165.316L516.151 164.933L517.237 164.306L517.287 164.402C516.839 164.558 516.391 164.622 515.944 164.593C515.502 164.562 515.093 164.437 514.717 164.22ZM520.74 167.583C520.314 167.337 520.096 167.096 520.085 166.86C520.074 166.624 520.273 166.388 520.682 166.152L524.893 163.721L525.589 164.123L521.378 166.554C521.174 166.672 521.069 166.787 521.063 166.898C521.063 167.007 521.16 167.117 521.353 167.228L522.53 167.908L521.917 168.262L520.74 167.583ZM521.801 163.831L522.414 163.476L526.31 165.726L525.697 166.08L521.801 163.831ZM523.406 169.122L529.291 165.724L529.987 166.126L527.525 167.547L527.459 167.49C527.757 167.381 528.05 167.321 528.338 167.308C528.625 167.295 528.901 167.324 529.166 167.394C529.437 167.461 529.686 167.56 529.912 167.691C530.227 167.873 530.421 168.067 530.493 168.275C530.576 168.482 530.545 168.691 530.401 168.902C530.269 169.112 530.04 169.311 529.714 169.5L526.887 171.132L526.191 170.73L528.818 169.213C529.244 168.967 529.481 168.74 529.531 168.533C529.586 168.329 529.459 168.137 529.15 167.959C528.796 167.755 528.404 167.652 527.973 167.652C527.547 167.656 527.13 167.775 526.721 168.011L524.102 169.524L523.406 169.122ZM529.934 173.006C529.531 172.773 529.271 172.514 529.155 172.23C529.044 171.95 529.078 171.663 529.254 171.369C529.437 171.072 529.76 170.79 530.224 170.522C530.694 170.251 531.183 170.064 531.691 169.962C532.2 169.86 532.697 169.841 533.183 169.905C533.675 169.972 534.123 170.122 534.526 170.354C534.93 170.587 535.187 170.844 535.297 171.125C535.413 171.409 535.383 171.698 535.206 171.991C535.029 172.285 534.706 172.567 534.236 172.838C533.772 173.106 533.283 173.293 532.769 173.398C532.261 173.5 531.76 173.518 531.269 173.451C530.782 173.387 530.337 173.239 529.934 173.006ZM530.597 172.623C531.001 172.856 531.456 172.953 531.965 172.915C532.484 172.876 532.998 172.711 533.507 172.417C534.015 172.124 534.3 171.828 534.36 171.532C534.432 171.235 534.266 170.97 533.863 170.737C533.46 170.504 532.998 170.407 532.479 170.445C531.97 170.484 531.462 170.65 530.954 170.943C530.445 171.237 530.155 171.532 530.083 171.828C530.022 172.125 530.194 172.39 530.597 172.623ZM534.407 175.473L538.8 172.937L539.38 173.272L538.336 173.951L538.286 173.904C538.717 173.718 539.112 173.628 539.471 173.631C539.836 173.637 540.173 173.73 540.483 173.908L541.386 174.43L540.756 174.794L539.861 174.277C539.645 174.152 539.419 174.073 539.181 174.038C538.955 174.002 538.72 174.01 538.477 174.061C538.239 174.109 537.999 174.203 537.756 174.344L535.103 175.875L534.407 175.473ZM533.263 174.813L533.876 174.459L537.109 176.325L536.496 176.679L533.263 174.813ZM537.043 172.631L537.656 172.276L539.181 173.157L538.568 173.511L537.043 172.631ZM539.916 178.654L544.309 176.117L545.005 176.519L540.612 179.056L539.916 178.654ZM538.15 177.634L538.764 177.28L542.742 179.577L542.129 179.932L538.15 177.634ZM542.013 175.5L542.626 175.146L545.005 176.519L544.392 176.874L542.013 175.5ZM544.931 175.682L545.743 175.213L546.472 175.634L545.66 176.103L544.931 175.682ZM543.137 180.514L543.833 180.112L549.702 179.939L547 178.379L547.613 178.025L551.078 180.025L550.381 180.427L544.513 180.6L547.364 182.246L546.751 182.6L543.137 180.514ZM549.856 184.393L554.249 181.856L554.945 182.258L550.552 184.795L549.856 184.393ZM548.09 183.373L548.704 183.019L552.683 185.316L552.069 185.671L548.09 183.373ZM551.953 181.239L552.566 180.885L554.945 182.258L554.332 182.613L551.953 181.239ZM554.871 181.421L555.683 180.952L556.413 181.373L555.6 181.842L554.871 181.421ZM553.094 186.262L557.487 183.726L558.125 184.094L557.031 184.755L557.023 184.664C557.338 184.546 557.65 184.48 557.959 184.467C558.28 184.455 558.584 184.483 558.871 184.554C559.158 184.624 559.415 184.724 559.642 184.855C559.979 185.05 560.184 185.254 560.255 185.468C560.333 185.685 560.302 185.9 560.164 186.114C560.032 186.324 559.811 186.519 559.501 186.698L556.675 188.329L555.978 187.927L558.606 186.41C559.015 186.174 559.244 185.949 559.294 185.736C559.349 185.519 559.211 185.315 558.879 185.123C558.653 184.992 558.399 184.903 558.117 184.855C557.841 184.804 557.553 184.801 557.255 184.846C556.967 184.89 556.688 184.991 556.418 185.147L553.79 186.664L553.094 186.262ZM558.487 190.926C558.172 190.744 557.94 190.55 557.79 190.342C557.641 190.135 557.578 189.926 557.6 189.715C557.622 189.505 557.73 189.309 557.923 189.127L558.702 189.519C558.564 189.676 558.52 189.835 558.569 189.998C558.619 190.167 558.813 190.349 559.15 190.543C559.548 190.773 559.932 190.902 560.302 190.931C560.678 190.963 561.026 190.886 561.346 190.701L562.059 190.29C561.722 190.363 561.368 190.373 560.998 190.318C560.628 190.264 560.299 190.154 560.012 189.988C559.642 189.774 559.401 189.53 559.291 189.256C559.186 188.985 559.211 188.709 559.365 188.428C559.525 188.151 559.813 187.892 560.227 187.653C560.647 187.41 561.095 187.244 561.57 187.155C562.051 187.063 562.523 187.045 562.987 187.102C563.457 187.163 563.874 187.299 564.239 187.509C564.549 187.688 564.753 187.889 564.853 188.112C564.957 188.339 564.938 188.551 564.794 188.749L565.491 188.347L566.154 188.73L562.059 191.094C561.717 191.291 561.346 191.416 560.948 191.467C560.545 191.521 560.136 191.502 559.722 191.41C559.302 191.32 558.89 191.159 558.487 190.926ZM560.708 189.625C561.084 189.841 561.515 189.94 562.001 189.921C562.493 189.899 562.968 189.759 563.427 189.5C563.736 189.328 563.946 189.149 564.057 188.964C564.178 188.779 564.2 188.597 564.123 188.419C564.057 188.24 563.897 188.077 563.642 187.93C563.256 187.707 562.822 187.61 562.341 187.638C561.871 187.667 561.41 187.812 560.957 188.074C560.504 188.336 560.252 188.605 560.202 188.883C560.164 189.16 560.332 189.408 560.708 189.625ZM565.589 193.476L566.6 192.892L567.628 193.486L566.617 194.07L565.589 193.476ZM569.277 195.606L570.289 195.022L571.316 195.615L570.305 196.199L569.277 195.606ZM572.958 197.731L573.969 197.147L574.997 197.74L573.985 198.324L572.958 197.731Z","M315.653 51.6748C315.183 51.4036 314.909 51.1021 314.832 50.7703C314.755 50.4385 314.86 50.0907 315.147 49.727C315.44 49.3665 315.901 49.0044 316.531 48.6407C317.167 48.2738 317.797 48.0058 318.421 47.8367C319.051 47.6708 319.653 47.6102 320.228 47.6548C320.808 47.6963 321.333 47.8526 321.803 48.1238C322.322 48.4237 322.593 48.7779 322.615 49.1862C322.643 49.5914 322.414 50.0046 321.927 50.4257L321.115 50.0142C321.446 49.7143 321.604 49.4351 321.587 49.1767C321.576 48.9214 321.416 48.7045 321.107 48.5258C320.792 48.344 320.432 48.2451 320.029 48.2291C319.637 48.2132 319.206 48.277 318.736 48.4205C318.272 48.5609 317.786 48.7779 317.277 49.0714C316.774 49.3617 316.401 49.6409 316.158 49.9089C315.915 50.1769 315.804 50.4257 315.827 50.6554C315.86 50.8851 316.034 51.0909 316.349 51.2728C316.691 51.4706 317.1 51.5695 317.576 51.5695C318.051 51.5695 318.565 51.4578 319.117 51.2345L319.83 51.6939C319.079 52.0066 318.333 52.1629 317.592 52.1629C316.857 52.1597 316.211 51.997 315.653 51.6748ZM319.081 53.501L324.966 50.1032L325.662 50.5052L323.2 51.9265L323.134 51.8691C323.433 51.7606 323.725 51.7 324.013 51.6872C324.3 51.6745 324.576 51.7032 324.842 51.7734C325.112 51.8404 325.361 51.9393 325.588 52.0701C325.903 52.2519 326.096 52.4466 326.168 52.6539C326.251 52.8613 326.22 53.0703 326.077 53.2809C325.944 53.4914 325.715 53.6908 325.389 53.8791L322.562 55.511L321.866 55.109L324.494 53.5919C324.919 53.3463 325.157 53.1197 325.206 52.9124C325.262 52.7082 325.135 52.5168 324.825 52.3381C324.471 52.1339 324.079 52.0318 323.648 52.0318C323.223 52.035 322.805 52.1546 322.396 52.3907L319.777 53.903L319.081 53.501ZM325.684 57.4281C325.269 57.1888 325.004 56.9272 324.888 56.6433C324.778 56.3625 324.811 56.0754 324.988 55.7819C325.176 55.4883 325.502 55.2076 325.966 54.9396C326.43 54.6716 326.913 54.485 327.416 54.3797C327.925 54.2776 328.419 54.2568 328.9 54.3175C329.392 54.3781 329.839 54.5248 330.243 54.7577C330.624 54.9779 330.87 55.2251 330.981 55.4995C331.097 55.7707 331.066 56.0531 330.889 56.3466C330.713 56.6401 330.378 56.9288 329.886 57.2128L329.679 57.3324L326.48 55.4852C326.038 55.7723 325.808 56.0483 325.792 56.3131C325.781 56.5811 325.966 56.8251 326.347 57.0453C326.634 57.2112 326.936 57.3085 327.251 57.3372C327.577 57.3659 327.886 57.3372 328.179 57.2511L328.867 57.7153C328.359 57.8748 327.814 57.9338 327.234 57.8923C326.665 57.8508 326.148 57.6961 325.684 57.4281ZM327.093 55.131L329.53 56.538C329.922 56.2732 330.11 56.0211 330.094 55.7819C330.077 55.5426 329.906 55.3288 329.58 55.1406C329.243 54.946 328.859 54.8455 328.428 54.8391C328.008 54.8327 327.563 54.93 327.093 55.131ZM330.696 60.3215C330.287 60.0855 330.024 59.8254 329.908 59.5415C329.792 59.2575 329.822 58.9688 329.999 58.6753C330.182 58.3786 330.505 58.0962 330.969 57.8282C331.433 57.5602 331.92 57.3752 332.428 57.2731C332.936 57.171 333.436 57.1535 333.928 57.2205C334.426 57.2843 334.879 57.4342 335.288 57.6703C335.614 57.8585 335.843 58.0611 335.976 58.2781C336.114 58.4918 336.152 58.712 336.092 58.9385C336.031 59.165 335.868 59.3899 335.603 59.6133L334.823 59.2209C335.05 59.0135 335.141 58.8077 335.097 58.6035C335.064 58.3993 334.906 58.2159 334.624 58.0532C334.221 57.8203 333.757 57.7214 333.232 57.7565C332.718 57.7915 332.207 57.9559 331.698 58.2494C331.19 58.5429 330.903 58.8396 330.836 59.1395C330.781 59.4394 330.955 59.7058 331.359 59.9387C331.64 60.1014 331.966 60.1939 332.337 60.2163C332.712 60.2418 333.099 60.178 333.497 60.0248L334.177 60.4747C333.79 60.6278 333.389 60.7251 332.975 60.7666C332.566 60.8049 332.165 60.7873 331.773 60.714C331.381 60.6406 331.022 60.5098 330.696 60.3215ZM333.908 62.0616L339.794 58.6639L340.49 59.0658L336.635 61.2912L341.136 61.1619L342.065 61.6979L338.467 61.7745L337.754 64.2822L336.909 63.794L337.522 61.7745L335.749 61.8032L334.605 62.4636L333.908 62.0616ZM340.52 65.9935C340.116 65.7606 339.857 65.5022 339.741 65.2183C339.63 64.9375 339.663 64.6504 339.84 64.3569C340.022 64.0602 340.346 63.7778 340.81 63.5098C341.28 63.2386 341.769 63.052 342.277 62.9499C342.785 62.8478 343.283 62.8287 343.769 62.8925C344.261 62.9595 344.708 63.1094 345.112 63.3423C345.515 63.5752 345.772 63.832 345.883 64.1128C345.999 64.3967 345.968 64.6855 345.791 64.979C345.615 65.2725 345.291 65.5549 344.822 65.8261C344.357 66.094 343.868 66.2807 343.355 66.386C342.846 66.4881 342.346 66.5056 341.854 66.4386C341.368 66.3748 340.923 66.2264 340.52 65.9935ZM341.183 65.6107C341.586 65.8436 342.042 65.9409 342.55 65.9026C343.07 65.8643 343.584 65.6984 344.092 65.4049C344.601 65.1114 344.885 64.8163 344.946 64.5196C345.018 64.2229 344.852 63.9581 344.449 63.7252C344.045 63.4923 343.584 63.395 343.064 63.4332C342.556 63.4715 342.048 63.6374 341.539 63.9309C341.031 64.2245 340.741 64.5196 340.669 64.8163C340.608 65.113 340.779 65.3778 341.183 65.6107ZM345.183 68.686C344.747 68.4339 344.545 68.1484 344.578 67.8294C344.617 67.5071 344.896 67.1961 345.415 66.8962L348.242 65.2643L348.938 65.6663L346.302 67.1881C345.877 67.4337 345.636 67.6587 345.581 67.8629C345.537 68.067 345.672 68.2601 345.987 68.4419C346.33 68.6397 346.711 68.7322 347.131 68.7195C347.557 68.7035 347.965 68.5823 348.358 68.3558L350.977 66.8435L351.673 67.2455L347.28 69.7819L346.617 69.399L347.703 68.7721L347.753 68.8678C347.305 69.0242 346.857 69.088 346.41 69.0593C345.968 69.0274 345.559 68.9029 345.183 68.686ZM351.206 72.0484C350.78 71.8027 350.562 71.5619 350.551 71.3258C350.54 71.0897 350.739 70.8536 351.148 70.6175L355.359 68.1864L356.055 68.5884L351.844 71.0195C351.64 71.1375 351.535 71.2524 351.529 71.3641C351.529 71.4725 351.626 71.5826 351.819 71.6943L352.996 72.3738L352.383 72.728L351.206 72.0484ZM352.267 68.2965L352.88 67.9423L356.776 70.1916L356.163 70.5457L352.267 68.2965ZM360.276 77.2849L364.984 74.5667C365.161 74.4646 365.249 74.3561 365.249 74.2413C365.249 74.1264 365.161 74.0179 364.984 73.9158L363.948 73.3176L364.561 72.9635L365.631 73.5808C366.034 73.8137 366.233 74.0498 366.227 74.2891C366.233 74.5284 366.034 74.7645 365.631 74.9974L360.972 77.6869L360.276 77.2849ZM358.51 76.2656L359.124 75.9114L363.102 78.2085L362.489 78.5627L358.51 76.2656ZM365.412 80.2501L369.805 77.7137L370.501 78.1157L366.108 80.6521L365.412 80.2501ZM363.646 79.2308L364.26 78.8767L368.238 81.1738L367.625 81.5279L363.646 79.2308ZM367.509 77.0964L368.122 76.7423L370.501 78.1157L369.888 78.4699L367.509 77.0964ZM370.427 77.2783L371.239 76.8093L371.968 77.2304L371.156 77.6994L370.427 77.2783ZM368.649 82.1194L373.043 79.5831L373.681 79.9515L372.587 80.612L372.578 80.521C372.893 80.403 373.206 80.3376 373.515 80.3248C373.836 80.3121 374.14 80.3408 374.427 80.411C374.714 80.4812 374.971 80.5817 375.198 80.7125C375.535 80.9071 375.739 81.1113 375.811 81.325C375.888 81.542 375.858 81.7573 375.72 81.9711C375.587 82.1816 375.366 82.3763 375.057 82.5549L372.23 84.1868L371.534 83.7848L374.162 82.2678C374.571 82.0317 374.8 81.8068 374.85 81.593C374.905 81.3761 374.767 81.1719 374.435 80.9805C374.209 80.8496 373.954 80.7603 373.673 80.7125C373.396 80.6614 373.109 80.6582 372.811 80.7029C372.523 80.7476 372.244 80.8481 371.973 81.0044L369.346 82.5214L368.649 82.1194ZM373.669 85.0176L379.554 81.6199L380.251 82.0218L376.396 84.2472L380.897 84.1179L381.826 84.6539L378.228 84.7305L377.515 87.2382L376.67 86.75L377.283 84.7305L375.509 84.7592L374.366 85.4196L373.669 85.0176Z","M27.4905 191.634L21.6053 188.237L22.9979 187.433C23.5063 187.139 24.0644 186.951 24.6722 186.868C25.2801 186.779 25.9073 186.803 26.5538 186.94C27.2004 187.071 27.8386 187.318 28.4686 187.681C29.0985 188.045 29.5268 188.414 29.7534 188.787C29.9854 189.157 30.0241 189.518 29.8694 189.868C29.7202 190.216 29.3914 190.537 28.883 190.83L27.4905 191.634ZM27.5071 190.821L28.1453 190.452C28.72 190.121 28.9797 189.757 28.9245 189.361C28.8692 188.959 28.4686 188.543 27.7226 188.112C26.9766 187.681 26.2554 187.45 25.5592 187.418C24.8629 187.38 24.2274 187.527 23.6527 187.859L23.0145 188.227L27.5071 190.821ZM33.7205 188.152C33.4442 188.312 33.1458 188.427 32.8253 188.497C32.5048 188.567 32.1926 188.588 31.8887 188.559C31.5792 188.527 31.3057 188.443 31.0681 188.305C30.6923 188.089 30.5127 187.857 30.5293 187.612C30.5459 187.36 30.7476 187.068 31.1344 186.736L32.3114 185.712C31.9356 185.495 31.5709 185.383 31.2173 185.377C30.8691 185.367 30.5376 185.453 30.2226 185.635C29.9187 185.811 29.7501 185.988 29.717 186.166C29.6783 186.342 29.7529 186.522 29.9408 186.707L29.145 187.099C28.8135 186.812 28.6753 186.506 28.7306 186.181C28.7858 185.849 29.0621 185.539 29.5595 185.252C30.09 184.946 30.6619 184.801 31.2753 184.817C31.8831 184.83 32.4661 184.997 33.0242 185.319L34.8478 186.372C34.9473 186.43 35.0385 186.457 35.1213 186.453C35.2042 186.45 35.2899 186.423 35.3783 186.372L35.6601 186.209L36.2735 186.564C36.2459 186.586 36.1961 186.618 36.1243 186.659C36.058 186.704 35.9917 186.745 35.9254 186.784C35.7375 186.892 35.5468 186.967 35.3534 187.009C35.1656 187.047 34.9721 187.047 34.7732 187.009C34.5688 186.967 34.356 186.886 34.135 186.765L34.2676 186.688C34.4168 186.819 34.4942 186.972 34.4997 187.147C34.5052 187.316 34.4417 187.49 34.309 187.669C34.1709 187.844 33.9747 188.006 33.7205 188.152ZM33.1734 187.76C33.4719 187.588 33.6708 187.415 33.7703 187.243C33.8642 187.068 33.8697 186.898 33.7868 186.736C33.6984 186.57 33.5326 186.417 33.2895 186.276L32.9082 186.056L31.8306 186.985C31.5875 187.189 31.4659 187.358 31.4659 187.492C31.4604 187.623 31.5488 187.741 31.7312 187.846C31.9356 187.964 32.165 188.017 32.4192 188.004C32.6733 187.985 32.9248 187.903 33.1734 187.76ZM39.3538 184.9C38.9725 185.12 38.5774 185.272 38.1684 185.355C37.7595 185.438 37.3644 185.461 36.9831 185.426C36.6018 185.385 36.262 185.291 35.9636 185.144L36.6433 184.694C36.9583 184.825 37.2898 184.879 37.6379 184.857C37.9916 184.831 38.3425 184.718 38.6906 184.517C39.0167 184.329 39.2211 184.157 39.304 184C39.3924 183.841 39.3372 183.704 39.1382 183.589C39.0111 183.515 38.8758 183.472 38.7321 183.46C38.5884 183.447 38.4061 183.472 38.185 183.536C37.9585 183.597 37.6573 183.704 37.2815 183.857C36.7787 184.058 36.3504 184.196 35.9967 184.273C35.6431 184.343 35.3309 184.358 35.0601 184.316C34.7893 184.275 34.5351 184.185 34.2975 184.048C34.0433 183.901 33.8803 183.734 33.8085 183.546C33.7366 183.357 33.767 183.158 33.8996 182.947C34.0323 182.737 34.2782 182.528 34.6374 182.321C35.0021 182.11 35.3723 181.973 35.7481 181.909C36.1238 181.839 36.4913 181.824 36.8505 181.866C37.2042 181.904 37.5302 181.984 37.8286 182.105L37.1489 182.555C36.961 182.485 36.7621 182.443 36.5521 182.431C36.3421 182.411 36.1294 182.426 35.9138 182.474C35.6983 182.515 35.4911 182.593 35.2922 182.708C34.9717 182.893 34.7976 183.067 34.77 183.23C34.7423 183.393 34.8225 183.528 35.0104 183.637C35.1596 183.723 35.3143 183.771 35.4745 183.78C35.6348 183.79 35.8227 183.764 36.0382 183.704C36.2482 183.64 36.5079 183.544 36.8173 183.416C37.3423 183.196 37.7871 183.048 38.1519 182.971C38.511 182.892 38.8233 182.871 39.0885 182.909C39.3538 182.947 39.6079 183.037 39.8511 183.177C40.1108 183.327 40.2572 183.501 40.2904 183.699C40.3236 183.89 40.2572 184.091 40.0915 184.302C39.9312 184.509 39.6853 184.709 39.3538 184.9ZM42.4837 182.978L36.5986 179.58L37.2949 179.178L39.7567 180.6L39.6572 180.638C39.4693 180.466 39.3643 180.296 39.3422 180.131C39.3201 179.965 39.3699 179.805 39.4914 179.652C39.6075 179.496 39.7788 179.352 40.0053 179.221C40.3203 179.039 40.6574 178.928 41.0166 178.886C41.3758 178.838 41.7377 178.856 42.1024 178.939C42.4672 179.016 42.8125 179.148 43.1386 179.336L45.9651 180.968L45.2688 181.37L42.6412 179.853C42.2157 179.607 41.8234 179.47 41.4642 179.441C41.1105 179.41 40.779 179.483 40.4695 179.662C40.1159 179.866 39.939 180.092 39.939 180.341C39.9446 180.587 40.1518 180.828 40.5607 181.064L43.18 182.576L42.4837 182.978ZM49.4846 179.051C49.1807 179.226 48.8436 179.344 48.4734 179.405C48.0976 179.462 47.7274 179.459 47.3627 179.395L48.0009 179.793L47.371 180.156L41.4858 176.759L42.1821 176.357L44.2875 177.572C44.2156 177.403 44.2239 177.21 44.3123 176.993C44.3952 176.773 44.5886 176.575 44.8926 176.4C45.2794 176.176 45.7077 176.038 46.1774 175.983C46.6471 175.929 47.1278 175.958 47.6196 176.069C48.117 176.178 48.6005 176.368 49.0702 176.639C49.5399 176.91 49.8687 177.189 50.0566 177.476C50.25 177.76 50.2997 178.038 50.2058 178.309C50.1118 178.58 49.8715 178.828 49.4846 179.051ZM48.7801 178.692C49.1503 178.478 49.294 178.226 49.2111 177.936C49.1337 177.642 48.8436 177.35 48.3408 177.06C47.8324 176.767 47.3268 176.599 46.8239 176.558C46.321 176.51 45.89 176.59 45.5308 176.797C45.26 176.953 45.0943 177.125 45.0335 177.314C44.9672 177.499 45.0031 177.692 45.1412 177.893C45.2849 178.091 45.5281 178.288 45.8707 178.486C46.2022 178.678 46.5421 178.816 46.8902 178.903C47.2383 178.982 47.5727 179.006 47.8932 178.974C48.2192 178.939 48.5148 178.845 48.7801 178.692ZM54.1812 176.339C53.7778 176.572 53.3302 176.722 52.8384 176.789C52.3521 176.853 51.8548 176.834 51.3464 176.732C50.8325 176.626 50.3435 176.44 49.8793 176.172C49.4096 175.901 49.0863 175.618 48.9095 175.325C48.7326 175.031 48.6995 174.744 48.81 174.463C48.926 174.179 49.1858 173.921 49.5892 173.688C49.9926 173.455 50.4374 173.307 50.9237 173.243C51.4155 173.176 51.9156 173.194 52.424 173.296C52.9324 173.398 53.4214 173.584 53.8911 173.856C54.3553 174.124 54.6786 174.406 54.8609 174.703C55.0378 174.996 55.0681 175.285 54.9521 175.569C54.8416 175.85 54.5846 176.106 54.1812 176.339ZM53.5181 175.956C53.9215 175.724 54.0901 175.46 54.0237 175.167C53.9574 174.867 53.6701 174.57 53.1617 174.277C52.6533 173.983 52.1422 173.819 51.6282 173.784C51.1143 173.742 50.6557 173.838 50.2523 174.071C49.8489 174.304 49.6803 174.57 49.7467 174.87C49.813 175.164 50.1003 175.457 50.6087 175.751C51.1171 176.044 51.6282 176.212 52.1422 176.253C52.6561 176.288 53.1147 176.189 53.5181 175.956ZM58.5711 173.805C58.2948 173.964 57.9964 174.079 57.6759 174.149C57.3554 174.22 57.0432 174.24 56.7393 174.212C56.4298 174.18 56.1563 174.095 55.9187 173.958C55.5429 173.741 55.3633 173.51 55.3799 173.264C55.3965 173.012 55.5982 172.72 55.985 172.388L57.162 171.364C56.7862 171.147 56.4215 171.036 56.0679 171.029C55.7197 171.02 55.3882 171.106 55.0732 171.288C54.7693 171.463 54.6007 171.64 54.5676 171.819C54.5289 171.994 54.6035 172.175 54.7914 172.36L53.9956 172.752C53.6641 172.465 53.5259 172.159 53.5812 171.833C53.6364 171.501 53.9127 171.192 54.4101 170.905C54.9406 170.598 55.5125 170.453 56.1259 170.469C56.7337 170.482 57.3167 170.65 57.8749 170.972L59.6984 172.025C59.7979 172.082 59.8891 172.109 59.972 172.106C60.0548 172.103 60.1405 172.076 60.2289 172.025L60.5107 171.862L61.1241 172.216C61.0965 172.238 61.0467 172.27 60.9749 172.312C60.9086 172.356 60.8423 172.398 60.776 172.436C60.5881 172.545 60.3974 172.62 60.204 172.661C60.0162 172.699 59.8227 172.699 59.6238 172.661C59.4194 172.62 59.2066 172.538 58.9856 172.417L59.1182 172.34C59.2674 172.471 59.3448 172.624 59.3503 172.8C59.3558 172.969 59.2923 173.143 59.1596 173.321C59.0215 173.497 58.8253 173.658 58.5711 173.805ZM58.0241 173.412C58.3225 173.24 58.5214 173.068 58.6209 172.896C58.7148 172.72 58.7203 172.551 58.6374 172.388C58.549 172.222 58.3832 172.069 58.1401 171.929L57.7588 171.709L56.6812 172.637C56.4381 172.841 56.3165 173.01 56.3165 173.144C56.311 173.275 56.3994 173.393 56.5818 173.499C56.7862 173.617 57.0156 173.669 57.2698 173.656C57.524 173.637 57.7754 173.556 58.0241 173.412ZM63.4252 170.887L59.0321 168.351L59.6123 168.016L60.7893 168.619L60.7064 168.648C60.3859 168.399 60.2284 168.171 60.234 167.963C60.245 167.753 60.4053 167.558 60.7147 167.38L61.6182 166.858L62.2482 167.222L61.353 167.739C61.1375 167.863 60.9993 167.994 60.9385 168.131C60.8777 168.262 60.8916 168.397 60.98 168.538C61.0629 168.675 61.2259 168.814 61.469 168.954L64.1215 170.485L63.4252 170.887ZM62.2813 171.548L61.6679 171.194L64.9006 169.327L65.514 169.681L62.2813 171.548ZM58.5016 169.366L57.8882 169.012L59.4134 168.131L60.0267 168.485L58.5016 169.366ZM68.8181 167.889C68.4312 168.112 68.003 168.251 67.5333 168.305C67.0636 168.359 66.58 168.332 66.0827 168.224C65.5909 168.112 65.1101 167.921 64.6404 167.649C64.1707 167.378 63.8392 167.101 63.6458 166.817C63.4579 166.53 63.4109 166.25 63.5048 165.979C63.5988 165.708 63.8392 165.461 64.226 165.238C64.5354 165.059 64.8808 164.946 65.2621 164.898C65.6379 164.847 65.9694 164.844 66.2568 164.888L64.1514 163.673L64.8477 163.271L70.7328 166.668L70.1028 167.032L69.4149 166.664C69.5309 166.871 69.5392 167.083 69.4397 167.3C69.3347 167.514 69.1275 167.71 68.8181 167.889ZM68.1964 167.482C68.4616 167.329 68.6219 167.16 68.6771 166.975C68.7379 166.786 68.6965 166.593 68.5528 166.396C68.4091 166.191 68.1715 165.994 67.84 165.802C67.4974 165.604 67.152 165.466 66.8038 165.386C66.4612 165.303 66.1297 165.281 65.8092 165.319C65.4831 165.354 65.1847 165.45 64.914 165.606C64.5548 165.813 64.4139 166.064 64.4912 166.357C64.5686 166.644 64.8615 166.935 65.3699 167.228C65.8727 167.519 66.3756 167.688 66.8784 167.736C67.3868 167.78 67.8261 167.696 68.1964 167.482Z"];function JA({className:e,alt:t}){const n=zn(),r=C.useId(),o=C.useRef(null),s=n?ZA:qA,a=l=>`${r}-${l}`;return ar(o,l=>{const c=V=>l.querySelector(`[data-anim="${V}"]`),u=V=>Array.from(l.querySelectorAll(`[data-anim="${V}"]`)),f=c("orbit"),d=f.getTotalLength(),p=c("part"),h=c("trail1"),g=c("trail2"),x=c("shimmerFace"),v=c("shimmerGrad"),y=r1.map((V,D)=>({...V,el:u("glow")[D]})),b=n1.map((V,D)=>({...V,scale:1,el:u("cube")[D]}));function S(V){return Ae(f,d,V)}function w(V){b.forEach(D=>{let $=1;if(V){const T=Math.hypot(V.x-D.cx,V.y-D.cy),M=Math.max(0,1-T/WA);$=1+M*M*HA}const z=$>D.scale?GA:UA;D.scale+=($-D.scale)*z,D.el.setAttribute("transform",`translate(${D.cx},${D.cy}) scale(${D.scale.toFixed(4)}) translate(${-D.cx},${-D.cy})`)})}function E(V,D){let $=1/0,z=0;for(let T=0;T<=500;T++){const M=T/500,G=f.getPointAtLength(M*d),A=Math.hypot(G.x-V,G.y-D);A<$&&($=A,z=M)}return z}const N=E(156,121),_=E(436,121),k=N/Ou,I=Math.round(k*t1),F=YA,U=t1-I,O=KA,R=I+F+U+O;function L(){p.setAttribute("opacity","0"),h.setAttribute("opacity","0"),g.setAttribute("opacity","0"),x.setAttribute("opacity","0"),y.forEach(V=>V.el.setAttribute("opacity","0"))}return V=>{const D=V%R;let $=null;if(D<I){const z=D/I,T=Ve(z)*N,M=Math.min(1,z/.05),G=S(T);ye(p,G,M),$=G,ye(h,S(Math.max(0,T-.012)),M*.45),ye(g,S(Math.max(0,T-.025)),M*.2),y.forEach(A=>{const W=Math.hypot(G.x-A.cx,G.y-A.cy),H=Math.max(0,1-W/A.r);A.el.setAttribute("opacity",(H*H*.12).toFixed(3))})}else if(D<I+F){const z=(D-I)/F,T=S(N);ye(p,T,1),$=T,ye(h,T,Math.max(0,.45*(1-z*3))),ye(g,T,Math.max(0,.2*(1-z*3))),y.forEach(H=>H.el.setAttribute("opacity","0"));const M=Math.min(1,z/.12),G=z>.8?(1-z)/.2:1;x.setAttribute("opacity",(M*G).toFixed(3));let A;z<.1?A=0:z<.5?A=Ve((z-.1)/.4):z<.9?A=1-Ve((z-.5)/.4):A=0;const W=40+A*190;v.setAttribute("x1",(W-20).toFixed(1)),v.setAttribute("x2",(W+20).toFixed(1))}else if(D<I+F+U){const z=(D-I-F)/U,T=(_-N)/(Ou-N);let M=Ve(z);const G=Math.abs(M-T);if(G<.15){const B=1-(1-G/.15)*.5;M=T+(M-T)*B}const A=N+M*(Ou-N),W=Math.max(0,1-z*10);x.setAttribute("opacity",W.toFixed(3));const H=z>.88?Math.max(0,(1-z)/.12):1,P=S(A);ye(p,P,H),$=P,ye(h,S(Math.max(0,A-.012)),H*.45),ye(g,S(Math.max(0,A-.025)),H*.2),y.forEach(B=>{const Y=Math.hypot(P.x-B.cx,P.y-B.cy),Z=Math.max(0,1-Y/B.r);B.el.setAttribute("opacity",(Z*Z*.12).toFixed(3))})}else L();w($)}}),i.jsxs(Wn,{ref:o,maskSrc:sr.paymentLinks[n?"dark":"light"],alt:t,variant:"paymentLinks",className:e,children:[i.jsxs("defs",{children:[i.jsxs("linearGradient",{id:a("shimmerGrad"),"data-anim":"shimmerGrad",gradientUnits:"userSpaceOnUse",x1:"60",y1:"0",x2:"100",y2:"0",children:[i.jsx("stop",{offset:"0",stopColor:s.shimmerColor,stopOpacity:"0"}),i.jsx("stop",{offset:"0.5",stopColor:s.shimmerColor,stopOpacity:s.shimmerOpacity}),i.jsx("stop",{offset:"1",stopColor:s.shimmerColor,stopOpacity:"0"})]}),i.jsx("clipPath",{id:a("dotClip"),children:i.jsx("rect",{width:"38.194",height:"38.2849",fill:"white",transform:"matrix(0.83205 -0.5547 0.830139 0.557556 265.475 194.07)"})})]}),i.jsx("path",{"data-anim":"orbit",d:`M145,286 L103.507,262.346 L15.783,211.699 L103.507,161.051
|
|
50
50
|
L156,121 L208.456,101.504 L296.181,50.856 L383.905,101.504
|
|
51
51
|
L436,121 L491.226,161.051 L578.95,211.699 L491.226,262.346
|
|
52
|
-
L447,286 C400,330 200,330 145,286`,fill:"none",stroke:"none"}),i.jsx("path",{d:"M103.507,262.346 L15.783,211.699 L103.507,161.051",fill:"none",stroke:s.pulseColor,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity,className:"app-scene-pulse-line",style:{animationDuration:"4.4s"}}),i.jsx("path",{d:"M208.456,101.504 L296.181,50.856 L383.905,101.504",fill:"none",stroke:s.pulseColor,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity,className:"app-scene-pulse-line",style:{animationDuration:"5s",animationDelay:".6s"}}),i.jsx("path",{d:"M491.226,161.051 L578.95,211.699 L491.226,262.346",fill:"none",stroke:s.pulseColor,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity,className:"app-scene-pulse-line",style:{animationDuration:"4.4s",animationDelay:"1.2s"}}),n1.map(l=>i.jsx("g",{"data-anim":"cube",children:i.jsx("rect",{x:l.x,y:l.y,width:l.w,height:l.h,fill:"none",stroke:"none"})},l.name)),r1.map((l,c)=>i.jsx("circle",{"data-anim":"glow",cx:l.cx,cy:l.cy,r:l.r,fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"},c)),i.jsx(ks,{cx:297.151,cy:193.937,topFaceFill:s.yunoTopFaceFill,clipId:a("dotClip")}),i.jsx("path",{"data-anim":"shimmerFace",d:"M156.319 89.1367L100.369 121.44L156.319 153.743L212.27 121.44L156.319 89.1367Z",fill:`url(#${a("shimmerGrad")})`,opacity:"0"}),i.jsxs("g",{"data-anim":"part",opacity:"0",children:[i.jsx("polygon",{points:"0,-6 6.2,-3 0,0 -6.2,-3",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-6.2,-3 0,0 0,4 -6.2,1",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 6.2,-3 6.2,1 0,4",fill:"#5A6BFF"})]}),i.jsxs("g",{"data-anim":"trail1",opacity:"0",children:[i.jsx("polygon",{points:"0,-3.5 3.6,-1.7 0,0 -3.6,-1.7",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-3.6,-1.7 0,0 0,2.3 -3.6,.6",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 3.6,-1.7 3.6,.6 0,2.3",fill:"#5A6BFF"})]}),i.jsxs("g",{"data-anim":"trail2",opacity:"0",children:[i.jsx("polygon",{points:"0,-2.5 2.6,-1.2 0,0 -2.6,-1.2",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-2.6,-1.2 0,0 0,1.6 -2.6,.4",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 2.6,-1.2 2.6,.4 0,1.6",fill:"#5A6BFF"})]}),KA.map((l,c)=>i.jsx("path",{d:l,fill:s.labelFill},c))]})}const ta=2800,Fd=600,d3=2400,o1=ta+Fd+d3,qA=1e3,XA=8,JA=55,QA=.15,eT=.18,tT=.04,s1=["individual","entity","non_profit"],nT={individual:{x:122,y:118,rx:56,ry:40},entity:{x:508,y:85,rx:56,ry:40},non_profit:{x:505,y:355,rx:56,ry:40}},rT=[{cx:105.891,cy:335},{cx:122.596,cy:118},{cx:505.312,cy:355},{cx:507.952,cy:90}],oT={pulseNeutral:"#737373",pulseOpacity:.4,destGlowRadius:38,glowIntensityMultiplier:.5,yunoTopFaceFill:"black"},sT={pulseNeutral:"#3E4FE0",pulseOpacity:.25,destGlowRadius:32,glowIntensityMultiplier:.3,yunoTopFaceFill:"white"};function aT({className:e,alt:t}){const n=zn(),r=C.useId(),o=C.useRef(null),s=n?oT:sT,a=l=>`${r}-${l}`;return ar(o,l=>{const c=k=>l.querySelector(`[data-anim="${k}"]`),u=k=>Array.from(l.querySelectorAll(`[data-anim="${k}"]`)),f={individual:c("pathYunoToIndividual"),entity:c("pathYunoToEntity"),non_profit:c("pathYunoToNonProfit")},d=c("pathMerchantToYuno"),p={individual:f.individual.getTotalLength(),entity:f.entity.getTotalLength(),non_profit:f.non_profit.getTotalLength()},h=d.getTotalLength(),m=[{el:c("gl_merchant"),x:106,y:320,r:45},{el:c("gl_individual"),x:122,y:105,r:s.destGlowRadius},{el:c("gl_entity"),x:508,y:78,r:s.destGlowRadius},{el:c("gl_non_profit"),x:505,y:340,r:s.destGlowRadius}],x=rT.map((k,I)=>({...k,scale:1,el:u("cube")[I]})),y=u("pSlot").map(k=>({el:k,active:!1,born:0,dest:"individual"}));let b=0,S="";function w(){let k;do k=s1[Math.floor(Math.random()*s1.length)];while(k===S);return S=k,k}function E(k,I){const F=Math.abs(k.x-I.x),U=Math.abs(k.y-I.y);return F<I.rx*.6&&U<I.ry*.6?0:1}function N(k){m.forEach(I=>{let F=0;k.forEach(U=>{const O=Math.hypot(U.x-I.x,U.y-I.y),R=Math.max(0,1-O/I.r);R>F&&(F=R)}),I.el.setAttribute("opacity",(F*F*s.glowIntensityMultiplier).toFixed(3))})}function _(k){x.forEach(I=>{let F=1;k.forEach(O=>{const R=Math.hypot(O.x-I.cx,O.y-I.cy),L=Math.max(0,1-R/JA),V=1+L*L*QA;V>F&&(F=V)});const U=F>I.scale?eT:tT;I.scale+=(F-I.scale)*U,I.el.setAttribute("transform",`translate(${I.cx},${I.cy}) scale(${I.scale.toFixed(4)}) translate(${-I.cx},${-I.cy})`)})}return k=>{if(k>=b){const F=y.find(U=>!U.active||k-U.born>o1);F&&(F.active=!0,F.born=k,F.dest=w(),b=k+qA)}const I=[];for(const F of y){if(!F.active){F.el.setAttribute("opacity","0");continue}const U=k-F.born;if(U>o1){F.active=!1,F.el.setAttribute("opacity","0");continue}let O,R;if(U<ta){const L=U/ta,V=Ve(L),D=Math.min(1,L/.05),$=L>.85?Math.max(0,(1-L)/.15):1;R=D*$,O=Ae(d,h,V),I.push(O)}else if(U<ta+Fd)R=0,O={x:296,y:209};else{const L=(U-ta-Fd)/d3,V=Ve(L),D=Math.min(1,L/.08),$=nT[F.dest];O=Ae(f[F.dest],p[F.dest],V),R=D*E(O,$),I.push(O)}R>.001?ye(F.el,O,R):F.el.setAttribute("opacity","0")}I.length>0?N(I):m.forEach(F=>F.el.setAttribute("opacity","0")),_(I)}},[n]),i.jsxs(Wn,{ref:o,maskSrc:sr.recipients[n?"dark":"light"],alt:t,variant:"recipients",className:e,children:[i.jsx("defs",{children:i.jsx("clipPath",{id:a("clip_yuno_dots"),children:i.jsx("rect",{width:"38.194",height:"38.2849",fill:"white",transform:"matrix(0.83205 -0.5547 0.830139 0.557556 264.324 209.133)"})})}),i.jsx("path",{"data-anim":"pathMerchantToYuno",d:"M142.898,302.823 L207.029,266.085 L296,209",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathYunoToIndividual",d:"M296,209 L211.953,177.082 L151.047,141.918",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathYunoToEntity",d:"M296,209 L377.976,174.957 L480.024,116.04",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathYunoToNonProfit",d:"M296,209 L375.976,270.031 L473.731,326.47",fill:"none",stroke:"none"}),i.jsx("path",{d:"M142.898,302.823 L207.029,266.085",fill:"none",stroke:s.pulseNeutral,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity,className:"app-scene-pulse-line",style:{animationDuration:"4.4s"}}),i.jsx("path",{d:"M151.047 141.918L211.953 177.082",fill:"none",stroke:s.pulseNeutral,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity,className:"app-scene-pulse-line",style:{animationDuration:"5s",animationDelay:".3s"}}),i.jsx("path",{d:"M377.976 174.957L480.024 116.04",fill:"none",stroke:s.pulseNeutral,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity,className:"app-scene-pulse-line",style:{animationDuration:"5.2s",animationDelay:".6s"}}),i.jsx("path",{d:"M375.976 270.031L473.731 326.47",fill:"none",stroke:s.pulseNeutral,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity,className:"app-scene-pulse-line",style:{animationDuration:"5s",animationDelay:".9s"}}),i.jsx("g",{"data-anim":"cube",children:i.jsx("rect",{x:"39",y:"282",width:"134",height:"102",fill:"none",stroke:"none"})}),i.jsx("g",{"data-anim":"cube",children:i.jsx("rect",{x:"66",y:"72",width:"113",height:"87",fill:"none",stroke:"none"})}),i.jsx("g",{"data-anim":"cube",children:i.jsx("rect",{x:"449",y:"308",width:"113",height:"87",fill:"none",stroke:"none"})}),i.jsx("g",{"data-anim":"cube",children:i.jsx("rect",{x:"451",y:"44",width:"113",height:"87",fill:"none",stroke:"none"})}),i.jsx("circle",{"data-anim":"gl_merchant",cx:"106",cy:"320",r:"45",fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"}),i.jsx("circle",{"data-anim":"gl_individual",cx:"122",cy:"105",r:s.destGlowRadius,fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"}),i.jsx("circle",{"data-anim":"gl_entity",cx:"508",cy:"78",r:s.destGlowRadius,fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"}),i.jsx("circle",{"data-anim":"gl_non_profit",cx:"505",cy:"340",r:s.destGlowRadius,fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"}),Array.from({length:XA},(l,c)=>i.jsxs("g",{"data-anim":"pSlot",opacity:"0",children:[i.jsx("polygon",{points:"0,-6 6.2,-3 0,0 -6.2,-3",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-6.2,-3 0,0 0,4 -6.2,1",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 6.2,-3 6.2,1 0,4",fill:"#5A6BFF"})]},c)),i.jsx(ks,{topFaceFill:s.yunoTopFaceFill,clipId:a("clip_yuno_dots")})]})}const Lu={f1:"#3E4FE0",f2:"#0617A9",f3:"#5A6BFF"},Bi={f1:"#FACC15",f2:"#CA8A04",f3:"#FDE047"},a1={f1:"#22C55E",f2:"#06A541",f3:"#44ED82"},Iu=8500,iT=1500,lT=8,zi=120,i1={x:389.5,y:158.73},l1={x:499,y:104.23},Wi={x:470,y:67,rx:56,ry:43},cT=55,uT=.15,dT=.18,fT=.04,pT={pulseBlue:"#3E4FE0",pulseOpacity:.35,autoRenewStroke:"#737373",yunoTopFaceFill:"black"},hT={pulseBlue:"#3E4FE0",pulseOpacity:.25,autoRenewStroke:"#3E4FE0",yunoTopFaceFill:"white"},gT=[{d:"M236.521 284.708L148.188 335.705C146.727 336.549 144.347 336.531 142.924 335.665L122.5 323.23",duration:"5s"},{d:"M236.521 284.708L210 268.73",duration:"4.4s",delay:".2s"},{d:"M236.521 284.708L331.521 229.86L301 212.23",duration:"5.2s",delay:".4s"},{d:"M331.521 229.86L422.021 177.609L389.5 158.73",duration:"5s",delay:".6s"},{d:"M422.021 177.609L520.936 119.73C522.355 118.9 522.347 117.565 520.919 116.74L506.75 108.56L499 104.23",duration:"5.4s",delay:".8s"}],c1=[{cx:115,cy:290},{cx:204,cy:235},{cx:293,cy:180},{cx:384,cy:125},{cx:470,cy:67}],u1=[{cx:115,cy:290,r:45},{cx:204,cy:235,r:40},{cx:293,cy:180,r:40},{cx:384,cy:125,r:40},{cx:470,cy:67,r:40}];function mT({className:e,alt:t}){const n=zn(),r=C.useId(),o=C.useRef(null),s=n?pT:hT,a=l=>`${r}-${l}`;return ar(o,l=>{const c=w=>l.querySelector(`[data-anim="${w}"]`),u=w=>Array.from(l.querySelectorAll(`[data-anim="${w}"]`)),f=c("pathFull"),d=f.getTotalLength(),p=u1.map((w,E)=>({...w,el:u("glow")[E]})),h=c1.map((w,E)=>({...w,scale:1,el:u("cube")[E]})),x=u("pSlot").map(w=>({el:w,active:!1,born:0,hitPaused:!1,hitCompleted:!1,yellowBlend:0,greenBlend:0}));let v=0;function y(w){const E=Math.abs(w.x-Wi.x),N=Math.abs(w.y-Wi.y);return E<Wi.rx*.6&&N<Wi.ry*.6?0:1}function b(w){p.forEach(E=>{let N=0;w.forEach(_=>{const k=Math.hypot(_.x-E.cx,_.y-E.cy),I=Math.max(0,1-k/E.r);I>N&&(N=I)}),E.el.setAttribute("opacity",(N*N*.3).toFixed(3))})}function S(w){h.forEach(E=>{let N=1;w.forEach(k=>{const I=Math.hypot(k.x-E.cx,k.y-E.cy),F=Math.max(0,1-I/cT),U=1+F*F*uT;U>N&&(N=U)});const _=N>E.scale?dT:fT;E.scale+=(N-E.scale)*_,E.el.setAttribute("transform",`translate(${E.cx},${E.cy}) scale(${E.scale.toFixed(4)}) translate(${-E.cx},${-E.cy})`)})}return w=>{if(w>=v){const N=x.find(_=>!_.active||w-_.born>Iu);N&&(N.active=!0,N.born=w,N.hitPaused=!1,N.hitCompleted=!1,N.yellowBlend=0,N.greenBlend=0,v=w+iT)}const E=[];for(const N of x){if(!N.active){N.el.setAttribute("opacity","0");continue}const _=w-N.born;if(_>Iu){N.active=!1,N.el.setAttribute("opacity","0");continue}const k=_/Iu,I=Ve(k),F=f.getPointAtLength(I*d),U=Math.hypot(F.x-i1.x,F.y-i1.y),O=Math.hypot(F.x-l1.x,F.y-l1.y);let R=Lu;if(!N.hitPaused){if(U<30)N.hitPaused=!0;else if(U<zi){const $=1-U/zi;R=to(Lu,Bi,$*$)}}if(N.hitPaused&&!N.hitCompleted){if(N.yellowBlend=Math.min(1,N.yellowBlend+.15),R=to(Lu,Bi,N.yellowBlend),O<30)N.hitCompleted=!0;else if(O<zi){const $=1-O/zi;R=to(Bi,a1,$*$)}}N.hitCompleted&&(N.greenBlend=Math.min(1,N.greenBlend+.15),R=to(Bi,a1,N.greenBlend)),Be(N.el,R);const L=Math.min(1,k/.03),V=k>.85?Math.max(0,(1-k)/.15):1,D=L*V*y(F);D>.001?ye(N.el,F,D):N.el.setAttribute("opacity","0"),E.push(F)}E.length>0?b(E):p.forEach(N=>N.el.setAttribute("opacity","0")),S(E)}}),i.jsxs(Wn,{ref:o,maskSrc:sr.subscriptions[n?"dark":"light"],alt:t,variant:"subscriptions",className:e,children:[i.jsx("defs",{children:i.jsx("clipPath",{id:a("clip_yuno_dots"),children:i.jsx("rect",{width:"38.194",height:"38.2849",fill:"white",transform:"matrix(0.83205 -0.5547 0.830139 0.557556 390.893 336.133)"})})}),i.jsx("path",{"data-anim":"pathFull",d:`M348,297 L282,258.5 L236.521,284.708 L148.188,335.705 C146.727,336.549 144.347,336.531 142.924,335.665 L122.5,323.23
|
|
52
|
+
L447,286 C400,330 200,330 145,286`,fill:"none",stroke:"none"}),i.jsx("path",{d:"M103.507,262.346 L15.783,211.699 L103.507,161.051",fill:"none",stroke:s.pulseColor,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity,className:"app-scene-pulse-line",style:{animationDuration:"4.4s"}}),i.jsx("path",{d:"M208.456,101.504 L296.181,50.856 L383.905,101.504",fill:"none",stroke:s.pulseColor,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity,className:"app-scene-pulse-line",style:{animationDuration:"5s",animationDelay:".6s"}}),i.jsx("path",{d:"M491.226,161.051 L578.95,211.699 L491.226,262.346",fill:"none",stroke:s.pulseColor,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity,className:"app-scene-pulse-line",style:{animationDuration:"4.4s",animationDelay:"1.2s"}}),n1.map(l=>i.jsx("g",{"data-anim":"cube",children:i.jsx("rect",{x:l.x,y:l.y,width:l.w,height:l.h,fill:"none",stroke:"none"})},l.name)),r1.map((l,c)=>i.jsx("circle",{"data-anim":"glow",cx:l.cx,cy:l.cy,r:l.r,fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"},c)),i.jsx(ks,{cx:297.151,cy:193.937,topFaceFill:s.yunoTopFaceFill,clipId:a("dotClip")}),i.jsx("path",{"data-anim":"shimmerFace",d:"M156.319 89.1367L100.369 121.44L156.319 153.743L212.27 121.44L156.319 89.1367Z",fill:`url(#${a("shimmerGrad")})`,opacity:"0"}),i.jsxs("g",{"data-anim":"part",opacity:"0",children:[i.jsx("polygon",{points:"0,-6 6.2,-3 0,0 -6.2,-3",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-6.2,-3 0,0 0,4 -6.2,1",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 6.2,-3 6.2,1 0,4",fill:"#5A6BFF"})]}),i.jsxs("g",{"data-anim":"trail1",opacity:"0",children:[i.jsx("polygon",{points:"0,-3.5 3.6,-1.7 0,0 -3.6,-1.7",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-3.6,-1.7 0,0 0,2.3 -3.6,.6",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 3.6,-1.7 3.6,.6 0,2.3",fill:"#5A6BFF"})]}),i.jsxs("g",{"data-anim":"trail2",opacity:"0",children:[i.jsx("polygon",{points:"0,-2.5 2.6,-1.2 0,0 -2.6,-1.2",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-2.6,-1.2 0,0 0,1.6 -2.6,.4",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 2.6,-1.2 2.6,.4 0,1.6",fill:"#5A6BFF"})]}),XA.map((l,c)=>i.jsx("path",{d:l,fill:s.labelFill},c))]})}const ta=2800,Fd=600,f3=2400,o1=ta+Fd+f3,QA=1e3,eP=8,tP=55,nP=.15,rP=.18,oP=.04,s1=["individual","entity","non_profit"],sP={individual:{x:122,y:118,rx:56,ry:40},entity:{x:508,y:85,rx:56,ry:40},non_profit:{x:505,y:355,rx:56,ry:40}},aP=[{cx:105.891,cy:335},{cx:122.596,cy:118},{cx:505.312,cy:355},{cx:507.952,cy:90}],iP={pulseNeutral:"#737373",pulseOpacity:.4,destGlowRadius:38,glowIntensityMultiplier:.5,yunoTopFaceFill:"black"},lP={pulseNeutral:"#3E4FE0",pulseOpacity:.25,destGlowRadius:32,glowIntensityMultiplier:.3,yunoTopFaceFill:"white"};function cP({className:e,alt:t}){const n=zn(),r=C.useId(),o=C.useRef(null),s=n?iP:lP,a=l=>`${r}-${l}`;return ar(o,l=>{const c=k=>l.querySelector(`[data-anim="${k}"]`),u=k=>Array.from(l.querySelectorAll(`[data-anim="${k}"]`)),f={individual:c("pathYunoToIndividual"),entity:c("pathYunoToEntity"),non_profit:c("pathYunoToNonProfit")},d=c("pathMerchantToYuno"),p={individual:f.individual.getTotalLength(),entity:f.entity.getTotalLength(),non_profit:f.non_profit.getTotalLength()},h=d.getTotalLength(),g=[{el:c("gl_merchant"),x:106,y:320,r:45},{el:c("gl_individual"),x:122,y:105,r:s.destGlowRadius},{el:c("gl_entity"),x:508,y:78,r:s.destGlowRadius},{el:c("gl_non_profit"),x:505,y:340,r:s.destGlowRadius}],x=aP.map((k,I)=>({...k,scale:1,el:u("cube")[I]})),y=u("pSlot").map(k=>({el:k,active:!1,born:0,dest:"individual"}));let b=0,S="";function w(){let k;do k=s1[Math.floor(Math.random()*s1.length)];while(k===S);return S=k,k}function E(k,I){const F=Math.abs(k.x-I.x),U=Math.abs(k.y-I.y);return F<I.rx*.6&&U<I.ry*.6?0:1}function N(k){g.forEach(I=>{let F=0;k.forEach(U=>{const O=Math.hypot(U.x-I.x,U.y-I.y),R=Math.max(0,1-O/I.r);R>F&&(F=R)}),I.el.setAttribute("opacity",(F*F*s.glowIntensityMultiplier).toFixed(3))})}function _(k){x.forEach(I=>{let F=1;k.forEach(O=>{const R=Math.hypot(O.x-I.cx,O.y-I.cy),L=Math.max(0,1-R/tP),V=1+L*L*nP;V>F&&(F=V)});const U=F>I.scale?rP:oP;I.scale+=(F-I.scale)*U,I.el.setAttribute("transform",`translate(${I.cx},${I.cy}) scale(${I.scale.toFixed(4)}) translate(${-I.cx},${-I.cy})`)})}return k=>{if(k>=b){const F=y.find(U=>!U.active||k-U.born>o1);F&&(F.active=!0,F.born=k,F.dest=w(),b=k+QA)}const I=[];for(const F of y){if(!F.active){F.el.setAttribute("opacity","0");continue}const U=k-F.born;if(U>o1){F.active=!1,F.el.setAttribute("opacity","0");continue}let O,R;if(U<ta){const L=U/ta,V=Ve(L),D=Math.min(1,L/.05),$=L>.85?Math.max(0,(1-L)/.15):1;R=D*$,O=Ae(d,h,V),I.push(O)}else if(U<ta+Fd)R=0,O={x:296,y:209};else{const L=(U-ta-Fd)/f3,V=Ve(L),D=Math.min(1,L/.08),$=sP[F.dest];O=Ae(f[F.dest],p[F.dest],V),R=D*E(O,$),I.push(O)}R>.001?ye(F.el,O,R):F.el.setAttribute("opacity","0")}I.length>0?N(I):g.forEach(F=>F.el.setAttribute("opacity","0")),_(I)}},[n]),i.jsxs(Wn,{ref:o,maskSrc:sr.recipients[n?"dark":"light"],alt:t,variant:"recipients",className:e,children:[i.jsx("defs",{children:i.jsx("clipPath",{id:a("clip_yuno_dots"),children:i.jsx("rect",{width:"38.194",height:"38.2849",fill:"white",transform:"matrix(0.83205 -0.5547 0.830139 0.557556 264.324 209.133)"})})}),i.jsx("path",{"data-anim":"pathMerchantToYuno",d:"M142.898,302.823 L207.029,266.085 L296,209",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathYunoToIndividual",d:"M296,209 L211.953,177.082 L151.047,141.918",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathYunoToEntity",d:"M296,209 L377.976,174.957 L480.024,116.04",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathYunoToNonProfit",d:"M296,209 L375.976,270.031 L473.731,326.47",fill:"none",stroke:"none"}),i.jsx("path",{d:"M142.898,302.823 L207.029,266.085",fill:"none",stroke:s.pulseNeutral,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity,className:"app-scene-pulse-line",style:{animationDuration:"4.4s"}}),i.jsx("path",{d:"M151.047 141.918L211.953 177.082",fill:"none",stroke:s.pulseNeutral,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity,className:"app-scene-pulse-line",style:{animationDuration:"5s",animationDelay:".3s"}}),i.jsx("path",{d:"M377.976 174.957L480.024 116.04",fill:"none",stroke:s.pulseNeutral,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity,className:"app-scene-pulse-line",style:{animationDuration:"5.2s",animationDelay:".6s"}}),i.jsx("path",{d:"M375.976 270.031L473.731 326.47",fill:"none",stroke:s.pulseNeutral,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity,className:"app-scene-pulse-line",style:{animationDuration:"5s",animationDelay:".9s"}}),i.jsx("g",{"data-anim":"cube",children:i.jsx("rect",{x:"39",y:"282",width:"134",height:"102",fill:"none",stroke:"none"})}),i.jsx("g",{"data-anim":"cube",children:i.jsx("rect",{x:"66",y:"72",width:"113",height:"87",fill:"none",stroke:"none"})}),i.jsx("g",{"data-anim":"cube",children:i.jsx("rect",{x:"449",y:"308",width:"113",height:"87",fill:"none",stroke:"none"})}),i.jsx("g",{"data-anim":"cube",children:i.jsx("rect",{x:"451",y:"44",width:"113",height:"87",fill:"none",stroke:"none"})}),i.jsx("circle",{"data-anim":"gl_merchant",cx:"106",cy:"320",r:"45",fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"}),i.jsx("circle",{"data-anim":"gl_individual",cx:"122",cy:"105",r:s.destGlowRadius,fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"}),i.jsx("circle",{"data-anim":"gl_entity",cx:"508",cy:"78",r:s.destGlowRadius,fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"}),i.jsx("circle",{"data-anim":"gl_non_profit",cx:"505",cy:"340",r:s.destGlowRadius,fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"}),Array.from({length:eP},(l,c)=>i.jsxs("g",{"data-anim":"pSlot",opacity:"0",children:[i.jsx("polygon",{points:"0,-6 6.2,-3 0,0 -6.2,-3",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-6.2,-3 0,0 0,4 -6.2,1",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 6.2,-3 6.2,1 0,4",fill:"#5A6BFF"})]},c)),i.jsx(ks,{topFaceFill:s.yunoTopFaceFill,clipId:a("clip_yuno_dots")})]})}const Lu={f1:"#3E4FE0",f2:"#0617A9",f3:"#5A6BFF"},Bi={f1:"#FACC15",f2:"#CA8A04",f3:"#FDE047"},a1={f1:"#22C55E",f2:"#06A541",f3:"#44ED82"},Iu=8500,uP=1500,dP=8,zi=120,i1={x:389.5,y:158.73},l1={x:499,y:104.23},Wi={x:470,y:67,rx:56,ry:43},fP=55,pP=.15,hP=.18,mP=.04,gP={pulseBlue:"#3E4FE0",pulseOpacity:.35,autoRenewStroke:"#737373",yunoTopFaceFill:"black"},xP={pulseBlue:"#3E4FE0",pulseOpacity:.25,autoRenewStroke:"#3E4FE0",yunoTopFaceFill:"white"},vP=[{d:"M236.521 284.708L148.188 335.705C146.727 336.549 144.347 336.531 142.924 335.665L122.5 323.23",duration:"5s"},{d:"M236.521 284.708L210 268.73",duration:"4.4s",delay:".2s"},{d:"M236.521 284.708L331.521 229.86L301 212.23",duration:"5.2s",delay:".4s"},{d:"M331.521 229.86L422.021 177.609L389.5 158.73",duration:"5s",delay:".6s"},{d:"M422.021 177.609L520.936 119.73C522.355 118.9 522.347 117.565 520.919 116.74L506.75 108.56L499 104.23",duration:"5.4s",delay:".8s"}],c1=[{cx:115,cy:290},{cx:204,cy:235},{cx:293,cy:180},{cx:384,cy:125},{cx:470,cy:67}],u1=[{cx:115,cy:290,r:45},{cx:204,cy:235,r:40},{cx:293,cy:180,r:40},{cx:384,cy:125,r:40},{cx:470,cy:67,r:40}];function yP({className:e,alt:t}){const n=zn(),r=C.useId(),o=C.useRef(null),s=n?gP:xP,a=l=>`${r}-${l}`;return ar(o,l=>{const c=w=>l.querySelector(`[data-anim="${w}"]`),u=w=>Array.from(l.querySelectorAll(`[data-anim="${w}"]`)),f=c("pathFull"),d=f.getTotalLength(),p=u1.map((w,E)=>({...w,el:u("glow")[E]})),h=c1.map((w,E)=>({...w,scale:1,el:u("cube")[E]})),x=u("pSlot").map(w=>({el:w,active:!1,born:0,hitPaused:!1,hitCompleted:!1,yellowBlend:0,greenBlend:0}));let v=0;function y(w){const E=Math.abs(w.x-Wi.x),N=Math.abs(w.y-Wi.y);return E<Wi.rx*.6&&N<Wi.ry*.6?0:1}function b(w){p.forEach(E=>{let N=0;w.forEach(_=>{const k=Math.hypot(_.x-E.cx,_.y-E.cy),I=Math.max(0,1-k/E.r);I>N&&(N=I)}),E.el.setAttribute("opacity",(N*N*.3).toFixed(3))})}function S(w){h.forEach(E=>{let N=1;w.forEach(k=>{const I=Math.hypot(k.x-E.cx,k.y-E.cy),F=Math.max(0,1-I/fP),U=1+F*F*pP;U>N&&(N=U)});const _=N>E.scale?hP:mP;E.scale+=(N-E.scale)*_,E.el.setAttribute("transform",`translate(${E.cx},${E.cy}) scale(${E.scale.toFixed(4)}) translate(${-E.cx},${-E.cy})`)})}return w=>{if(w>=v){const N=x.find(_=>!_.active||w-_.born>Iu);N&&(N.active=!0,N.born=w,N.hitPaused=!1,N.hitCompleted=!1,N.yellowBlend=0,N.greenBlend=0,v=w+uP)}const E=[];for(const N of x){if(!N.active){N.el.setAttribute("opacity","0");continue}const _=w-N.born;if(_>Iu){N.active=!1,N.el.setAttribute("opacity","0");continue}const k=_/Iu,I=Ve(k),F=f.getPointAtLength(I*d),U=Math.hypot(F.x-i1.x,F.y-i1.y),O=Math.hypot(F.x-l1.x,F.y-l1.y);let R=Lu;if(!N.hitPaused){if(U<30)N.hitPaused=!0;else if(U<zi){const $=1-U/zi;R=to(Lu,Bi,$*$)}}if(N.hitPaused&&!N.hitCompleted){if(N.yellowBlend=Math.min(1,N.yellowBlend+.15),R=to(Lu,Bi,N.yellowBlend),O<30)N.hitCompleted=!0;else if(O<zi){const $=1-O/zi;R=to(Bi,a1,$*$)}}N.hitCompleted&&(N.greenBlend=Math.min(1,N.greenBlend+.15),R=to(Bi,a1,N.greenBlend)),Be(N.el,R);const L=Math.min(1,k/.03),V=k>.85?Math.max(0,(1-k)/.15):1,D=L*V*y(F);D>.001?ye(N.el,F,D):N.el.setAttribute("opacity","0"),E.push(F)}E.length>0?b(E):p.forEach(N=>N.el.setAttribute("opacity","0")),S(E)}}),i.jsxs(Wn,{ref:o,maskSrc:sr.subscriptions[n?"dark":"light"],alt:t,variant:"subscriptions",className:e,children:[i.jsx("defs",{children:i.jsx("clipPath",{id:a("clip_yuno_dots"),children:i.jsx("rect",{width:"38.194",height:"38.2849",fill:"white",transform:"matrix(0.83205 -0.5547 0.830139 0.557556 390.893 336.133)"})})}),i.jsx("path",{"data-anim":"pathFull",d:`M348,297 L282,258.5 L236.521,284.708 L148.188,335.705 C146.727,336.549 144.347,336.531 142.924,335.665 L122.5,323.23
|
|
53
53
|
L142.924,335.665 C144.347,336.531 146.727,336.549 148.188,335.705 L236.521,284.708 L210,268.73
|
|
54
54
|
L236.521,284.708 L331.521,229.86 L301,212.23 L331.521,229.86
|
|
55
55
|
L422.021,177.609 L389.5,158.73 L422.021,177.609
|
|
56
|
-
L520.936,119.73 C522.355,118.9 522.347,117.565 520.919,116.74 L506.75,108.56 L499,104.23`,fill:"none",stroke:"none"}),
|
|
56
|
+
L520.936,119.73 C522.355,118.9 522.347,117.565 520.919,116.74 L506.75,108.56 L499,104.23`,fill:"none",stroke:"none"}),vP.map((l,c)=>i.jsx("path",{d:l.d,fill:"none",stroke:s.pulseBlue,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity,className:"app-scene-pulse-line",style:{animationDuration:l.duration,animationDelay:l.delay}},c)),i.jsx("path",{d:"M282 258.5L348 297",fill:"none",stroke:s.autoRenewStroke,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:s.pulseOpacity,className:"app-scene-pulse-line",style:{animationDuration:"4s",animationDelay:".3s"}}),c1.map((l,c)=>i.jsx("g",{"data-anim":"cube",children:i.jsx("rect",{x:l.cx-53,y:l.cy-38.5,width:"106",height:"77",fill:"none",stroke:"none"})},c)),u1.map((l,c)=>i.jsx("circle",{"data-anim":"glow",cx:l.cx,cy:l.cy,r:l.r,fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"},c)),Array.from({length:dP},(l,c)=>i.jsxs("g",{"data-anim":"pSlot",opacity:"0",children:[i.jsx("polygon",{points:"0,-6 6.2,-3 0,0 -6.2,-3",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-6.2,-3 0,0 0,4 -6.2,1",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 6.2,-3 6.2,1 0,4",fill:"#5A6BFF"})]},c)),i.jsx(ks,{cx:422.569,cy:336,topFaceFill:s.yunoTopFaceFill,clipId:a("clip_yuno_dots")})]})}const bP=55,d1=.15,wP=.18,CP=.04,f1=8e3,SP=1800,EP=1250,p1=.76,NP={particle:{f1:"#3E4FE0",f2:"#2A3AB0",f3:"#5A6BF0"},shimmerColor:"#93C5FD",shimmerOpacity:.22,cubeNeutralFill:"black",cubeNeutralStroke:"#A3A3A3",cubeAuthorized:["#0E133D","#161D61"],authorizedTopGrad:["#161D61","#2531A0"],glowIntensity:.18},_P={particle:{f1:"#3E4FE0",f2:"#0617A9",f3:"#5A6BFF"},shimmerColor:"#3E4FE0",shimmerOpacity:.15,cubeNeutralFill:"white",cubeNeutralStroke:"#737373",cubeAuthorized:["#C3C9FA","#EBECF9"],authorizedTopGrad:["#F3F4FF","white"],glowIntensity:.12},jP=[{cx:156.319,cy:132.2},{cx:436.278,cy:132.2},{cx:447.3,cy:301.8}],h1=[{cx:145,cy:286,r:40},{cx:156,cy:121,r:35},{cx:436,cy:121,r:35},{cx:447,cy:286,r:40}];function kP({className:e,alt:t}){const n=zn(),r=C.useId(),o=C.useRef(null),s=n?NP:_P,a=C.useRef(s);a.current=s;const l=c=>`${r}-${c}`;return ar(o,c=>{const u=V=>c.querySelector(`[data-anim="${V}"]`),f=V=>Array.from(c.querySelectorAll(`[data-anim="${V}"]`)),d=u("orbit"),p=d.getTotalLength(),h=u("part"),g=u("trail1"),x=u("trail2"),v=u("shimmerFace"),y=u("shimmerGrad"),b=h1.map((V,D)=>({...V,el:f("glow")[D]})),S=jP.map((V,D)=>({...V,scale:1,el:f("cube")[D]}));function w(V){const D=Math.max(0,Math.min(V,1))*p;return d.getPointAtLength(D)}function E(V,D){let $=1/0,z=0;for(let T=0;T<=500;T++){const M=T/500,G=d.getPointAtLength(M*p),A=Math.hypot(G.x-V,G.y-D);A<$&&($=A,z=M)}return z}const N=E(156,121),_=N/p1,k=Math.round(_*f1),I=SP,F=f1-k,U=EP,O=k+I+F+U;function R(V,D){S.forEach(($,z)=>{let T=1;if(V){const G=Math.hypot(V.x-$.cx,V.y-$.cy),A=Math.max(0,1-G/bP);T=1+A*A*d1}z===0&&D>=0&&(T=1+d1);const M=T>$.scale?wP:CP;$.scale+=(T-$.scale)*M,$.el.setAttribute("transform",`translate(${$.cx},${$.cy}) scale(${$.scale.toFixed(4)}) translate(${-$.cx},${-$.cy})`)})}function L(){h.setAttribute("opacity","0"),g.setAttribute("opacity","0"),x.setAttribute("opacity","0"),v.setAttribute("opacity","0"),b.forEach(V=>V.el.setAttribute("opacity","0"))}return V=>{const D=V%O;let $=null,z=-1;const T=a.current.glowIntensity;if(Be(h,a.current.particle),Be(g,a.current.particle),Be(x,a.current.particle),D<k){const M=D/k,G=Ve(M)*N,A=Math.min(1,M/.05),W=w(G);ye(h,W,A),$=W,ye(g,w(Math.max(0,G-.012)),A*.45),ye(x,w(Math.max(0,G-.025)),A*.2),b.forEach(H=>{const P=Math.hypot(W.x-H.cx,W.y-H.cy),B=Math.max(0,1-P/H.r);H.el.setAttribute("opacity",(B*B*T).toFixed(3))})}else if(D<k+I){const M=(D-k)/I;z=M;const G=w(N);ye(h,G,1),$=G,ye(g,G,Math.max(0,.45*(1-M*3))),ye(x,G,Math.max(0,.2*(1-M*3))),b.forEach(B=>B.el.setAttribute("opacity","0"));const A=Math.min(1,M/.12),W=M>.8?(1-M)/.2:1;v.setAttribute("opacity",(A*W).toFixed(3));let H;M<.1?H=0:M<.5?H=Ve((M-.1)/.4):M<.9?H=1-Ve((M-.5)/.4):H=0;const P=40+H*190;y.setAttribute("x1",(P-20).toFixed(1)),y.setAttribute("x2",(P+20).toFixed(1))}else if(D<k+I+F){const M=(D-k-I)/F,G=N+Ve(M)*(p1-N),A=Math.max(0,1-M*10);v.setAttribute("opacity",A.toFixed(3));const W=M>.88?Math.max(0,(1-M)/.12):1,H=w(G);ye(h,H,W),$=H,ye(g,w(Math.max(0,G-.012)),W*.45),ye(x,w(Math.max(0,G-.025)),W*.2),b.forEach(P=>{const B=Math.hypot(H.x-P.cx,H.y-P.cy),Y=Math.max(0,1-B/P.r);P.el.setAttribute("opacity",(Y*Y*T).toFixed(3))})}else L();R($,z)}}),i.jsxs(Wn,{ref:o,maskSrc:sr.rules[n?"dark":"light"],alt:t,variant:"rules",className:e,children:[i.jsxs("defs",{children:[i.jsxs("linearGradient",{id:l("shimmerGrad"),"data-anim":"shimmerGrad",gradientUnits:"userSpaceOnUse",x1:"60",y1:"0",x2:"100",y2:"0",children:[i.jsx("stop",{offset:"0",stopColor:s.shimmerColor,stopOpacity:"0"}),i.jsx("stop",{offset:"0.5",stopColor:s.shimmerColor,stopOpacity:s.shimmerOpacity}),i.jsx("stop",{offset:"1",stopColor:s.shimmerColor,stopOpacity:"0"})]}),i.jsxs("linearGradient",{id:l("authorizedTopGrad"),x1:"488.744",y1:"309.772",x2:"447.3",y2:"237.989",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:s.authorizedTopGrad[0]}),i.jsx("stop",{offset:"1",stopColor:s.authorizedTopGrad[1]})]})]}),i.jsx("path",{"data-anim":"orbit",d:`M145,286 L103.507,262.346 L15.783,211.699 L103.507,161.051 L156,121
|
|
57
57
|
L208.456,101.508 L296.181,50.86 L383.905,101.508 L436,121
|
|
58
58
|
L491.226,161.051 L578.95,211.699 L491.226,262.346 L447,286
|
|
59
|
-
C400,330 200,330 145,286`,fill:"none",stroke:"none"}),i.jsx("path",{d:"M103.507,262.346 L15.783,211.699 L103.507,161.051",fill:"none",stroke:"#3E4FE0",strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:"0.3",className:"app-scene-pulse-line",style:{animationDuration:"4.4s"}}),i.jsx("path",{d:"M208.456,101.508 L296.181,50.86 L383.905,101.508",fill:"none",stroke:"#3E4FE0",strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:"0.3",className:"app-scene-pulse-line",style:{animationDuration:"5s",animationDelay:".6s"}}),i.jsx("path",{d:"M491.226,161.051 L578.95,211.699 L491.226,262.346",fill:"none",stroke:"#3E4FE0",strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:"0.3",className:"app-scene-pulse-line",style:{animationDuration:"4.4s",animationDelay:"1.2s"}}),i.jsx("path",{d:"M447,286 C400,330 200,330 145,286",fill:"none",stroke:"#3E4FE0",strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:"0.2",className:"app-scene-pulse-line",style:{animationDuration:"5.6s",animationDelay:"1.8s"}}),i.jsxs("g",{"data-anim":"cube",children:[i.jsx("path",{d:"M212.27 121.438L156.319 153.74V175.276L212.27 142.973V121.438Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke}),i.jsx("path",{d:"M100.369 121.44L156.319 153.743V175.276L100.369 142.973V121.44Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke}),i.jsx("path",{d:"M156.319 89.137L100.369 121.44L156.319 153.743L212.269 121.44Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke}),i.jsx("path",{"data-anim":"shimmerFace",d:"M156.319 89.137L100.369 121.44L156.319 153.743L212.269 121.44Z",fill:`url(#${l("shimmerGrad")})`,opacity:"0"})]}),i.jsxs("g",{"data-anim":"cube",children:[i.jsx("path",{d:"M492.228 121.438L436.278 153.74V175.276L492.228 142.973V121.438Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke}),i.jsx("path",{d:"M380.328 121.44L436.278 153.743V175.276L380.328 142.973V121.44Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke}),i.jsx("path",{d:"M436.278 89.137L380.328 121.44L436.278 153.743L492.228 121.44Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke})]}),i.jsxs("g",{"data-anim":"cube",children:[i.jsx("path",{d:"M530.189 285.844L447.3 333.7V365.604L530.189 317.748V285.844Z",fill:s.cubeAuthorized[0],stroke:"#3E4FE0"}),i.jsx("path",{d:"M364.411 285.844L447.3 333.7V365.604L364.411 317.748V285.844Z",fill:s.cubeAuthorized[1],stroke:"#3E4FE0"}),i.jsx("path",{d:"M447.3 237.988L364.411 285.844L447.3 333.701L530.189 285.844Z",fill:`url(#${l("authorizedTopGrad")})`,stroke:"#3E4FE0"})]}),h1.map((c,u)=>i.jsx("circle",{"data-anim":"glow",cx:c.cx,cy:c.cy,r:c.r,fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"},u)),i.jsxs("g",{"data-anim":"part",opacity:"0",children:[i.jsx("polygon",{points:"0,-6 6.2,-3 0,0 -6.2,-3",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-6.2,-3 0,0 0,4 -6.2,1",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 6.2,-3 6.2,1 0,4",fill:"#5A6BFF"})]}),i.jsxs("g",{"data-anim":"trail1",opacity:"0",children:[i.jsx("polygon",{points:"0,-3.5 3.6,-1.7 0,0 -3.6,-1.7",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-3.6,-1.7 0,0 0,2.3 -3.6,.6",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 3.6,-1.7 3.6,.6 0,2.3",fill:"#5A6BFF"})]}),i.jsxs("g",{"data-anim":"trail2",opacity:"0",children:[i.jsx("polygon",{points:"0,-2.5 2.6,-1.2 0,0 -2.6,-1.2",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-2.6,-1.2 0,0 0,1.6 -2.6,.4",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 2.6,-1.2 2.6,.4 0,1.6",fill:"#5A6BFF"})]})]})}const g1=8e3,_T=1200,jT=8,kT=55,RT=.15,MT=.18,DT=.04,AT=3,m1=.05,x1={x:403.5,y:123},TT=.2,PT={blue:{f1:"#3E4FE0",f2:"#2A3AB0",f3:"#5A6BF0"},red:{f1:"#DC2626",f2:"#991B1B",f3:"#EF4444"},glowFactor:.18,cubeNeutralFill:"black",cubeNeutralStroke:"#A3A3A3",cubeApproved:["#0E133D","#161D61"],approvedTopGrad:["#161D61","#2531A0"],blockedAccent:"#DC2626"},OT={blue:{f1:"#3E4FE0",f2:"#C3C9FA",f3:"#EBECF9"},red:{f1:"#EF4444",f2:"#AA0707",f3:"#FF5E5E"},glowFactor:.12,cubeNeutralFill:"white",cubeNeutralStroke:"#737373",cubeApproved:["#C3C9FA","#EBECF9"],approvedTopGrad:["#F3F4FF","white"],blockedAccent:"#EF4444"},v1=["#EF4444","#AA0707"],y1=["#EF4444","#FF5E5E"];function LT(e,t,n){return{f1:ns(e.f1,t.f1,n),f2:ns(e.f2,t.f2,n),f3:ns(e.f3,t.f3,n)}}function IT({className:e,alt:t}){const n=zn(),r=C.useId(),o=C.useRef(null),s=n?PT:OT,a=c=>`${r}-${c}`;ar(o,c=>{const u=(I,F=c)=>F.querySelector(`[data-anim="${I}"]`),f=I=>Array.from(c.querySelectorAll(`[data-anim="${I}"]`)),d=u("pathApproved"),p=u("pathBlocked"),h=d.getTotalLength(),m=p.getTotalLength(),x=[{el:u("gl_payment"),x:118,y:108,r:35},{el:u("gl_approved"),x:445,y:323,r:40},{el:u("gl_blocked"),x:148,y:308,r:40}],v=[{el:u("cube_payment"),cx:117.983,cy:108.4,scale:1,shakeable:!1},{el:u("cube_approved"),cx:444.963,cy:323,scale:1,shakeable:!1},{el:u("cube_blocked"),cx:147.987,cy:308,scale:1,shakeable:!0}];function y(I,F){let U=1/0,O=.5;for(let R=0;R<=200;R++){const L=R/200,V=I.getPointAtLength(L*F),D=Math.hypot(V.x-x1.x,V.y-x1.y);D<U&&(U=D,O=L)}return O}const b=y(d,h),S=y(p,m),E=f("particle").map(I=>({main:u("main",I),t1:u("t1",I),t2:u("t2",I),active:!1,birthTime:0,isBlocked:!1,decisionRatio:0}));function N(I,F){for(const U of[I.main,I.t1,I.t2]){const O=U.querySelectorAll("polygon");O[0]?.setAttribute("fill",F.f1),O[1]?.setAttribute("fill",F.f2),O[2]?.setAttribute("fill",F.f3)}}let _=0;function k(I){const F=E.find(U=>!U.active);return F?(F.active=!0,F.birthTime=I,F.isBlocked=Math.random()<TT,F.decisionRatio=F.isBlocked?S:b,N(F,s.blue),!0):!1}return I=>{I>=_&&k(I)&&(_=I+_T);const F=x.map(()=>0),U=v.map(()=>0),O=v.map(()=>0);for(const R of E){if(!R.active){R.main.setAttribute("opacity","0"),R.t1.setAttribute("opacity","0"),R.t2.setAttribute("opacity","0");continue}const L=I-R.birthTime;if(L>=g1){R.active=!1,R.main.setAttribute("opacity","0"),R.t1.setAttribute("opacity","0"),R.t2.setAttribute("opacity","0");continue}const V=L/g1,D=Ve(V),$=Math.min(1,V/.03),z=V>.92?Math.max(0,(1-V)/.08):1,P=$*z;if(R.isBlocked&&D>R.decisionRatio){const W=Vl((D-R.decisionRatio)/.08);N(R,LT(s.blue,s.red,W))}const M=R.isBlocked?p:d,G=R.isBlocked?m:h,A=Ae(M,G,D);ye(R.main,A,P),ye(R.t1,Ae(M,G,Math.max(0,D-.012)),P*.45),ye(R.t2,Ae(M,G,Math.max(0,D-.025)),P*.2),x.forEach((W,H)=>{const T=Math.hypot(A.x-W.x,A.y-W.y),B=Math.max(0,1-T/W.r);F[H]=Math.max(F[H],B*B)}),v.forEach((W,H)=>{const T=Math.hypot(A.x-W.cx,A.y-W.cy),B=Math.max(0,1-T/kT);B>U[H]&&(U[H]=B),W.shakeable&&R.isBlocked&&B>O[H]&&(O[H]=B)})}x.forEach((R,L)=>R.el.setAttribute("opacity",(F[L]*s.glowFactor).toFixed(3))),v.forEach((R,L)=>{const V=1+U[L]*U[L]*RT,D=V>R.scale?MT:DT;R.scale+=(V-R.scale)*D;let $=0,z=0;if(R.shakeable&&O[L]>0){const P=O[L]*O[L]*AT;$=Math.sin(I*m1)*P,z=Math.cos(I*m1*.7)*P*.6}R.el.setAttribute("transform",`translate(${R.cx+$},${R.cy+z}) scale(${R.scale.toFixed(4)}) translate(${-R.cx},${-R.cy})`)})}},[n]);const l=c=>i.jsxs("g",{"data-anim":"particle",children:[i.jsxs("g",{"data-anim":"main",opacity:"0",children:[i.jsx("polygon",{points:"0,-6 6.2,-3 0,0 -6.2,-3",fill:s.blue.f1}),i.jsx("polygon",{points:"-6.2,-3 0,0 0,4 -6.2,1",fill:s.blue.f2}),i.jsx("polygon",{points:"0,0 6.2,-3 6.2,1 0,4",fill:s.blue.f3})]}),i.jsxs("g",{"data-anim":"t1",opacity:"0",children:[i.jsx("polygon",{points:"0,-3.5 3.6,-1.7 0,0 -3.6,-1.7",fill:s.blue.f1}),i.jsx("polygon",{points:"-3.6,-1.7 0,0 0,2.3 -3.6,.6",fill:s.blue.f2}),i.jsx("polygon",{points:"0,0 3.6,-1.7 3.6,.6 0,2.3",fill:s.blue.f3})]}),i.jsxs("g",{"data-anim":"t2",opacity:"0",children:[i.jsx("polygon",{points:"0,-2.5 2.6,-1.2 0,0 -2.6,-1.2",fill:s.blue.f1}),i.jsx("polygon",{points:"-2.6,-1.2 0,0 0,1.6 -2.6,.4",fill:s.blue.f2}),i.jsx("polygon",{points:"0,0 2.6,-1.2 2.6,.4 0,1.6",fill:s.blue.f3})]})]},c);return i.jsxs(Wn,{ref:o,maskSrc:sr.blocklists[n?"dark":"light"],alt:t,variant:"blocklists",className:e,children:[i.jsxs("defs",{children:[i.jsx("clipPath",{id:a("pClip"),children:i.jsx("path",{clipRule:"evenodd",d:"M0 0h592v444H0Z M332.24 81.927C371.58 59.259 435.458 59.259 474.798 81.927C514.139 104.596 514.139 141.404 474.798 164.072C435.458 186.74 371.58 186.74 332.24 164.072C292.899 141.404 292.899 104.596 332.24 81.927Z"})}),i.jsxs("linearGradient",{id:a("approvedTopGrad"),x1:"486.408",y1:"330.924",x2:"444.964",y2:"259.141",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:s.approvedTopGrad[0]}),i.jsx("stop",{offset:"1",stopColor:s.approvedTopGrad[1]})]}),i.jsxs("linearGradient",{id:a("blockedSide1Grad"),x1:"197.557",y1:"343.549",x2:"180.083",y2:"323.295",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:v1[0]}),i.jsx("stop",{offset:"1",stopColor:v1[1]})]}),i.jsxs("linearGradient",{id:a("blockedSide1Stroke"),x1:"229.026",y1:"309.15",x2:"149.838",y2:"309.15",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"white",stopOpacity:"0"}),i.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0.4"})]}),i.jsxs("linearGradient",{id:a("blockedSide2Stroke"),x1:"93.5752",y1:"15.9521",x2:"2.13717",y2:"15.9521",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"white",stopOpacity:"0"}),i.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0.4"})]}),i.jsxs("linearGradient",{id:a("blockedTopGrad"),x1:"183.88",y1:"271.407",x2:"147.987",y2:"333.574",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:y1[0]}),i.jsx("stop",{offset:"1",stopColor:y1[1]})]}),i.jsxs("linearGradient",{id:a("blockedTopStroke"),x1:"106.54",y1:"268.197",x2:"147.99",y2:"339.992",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"white",stopOpacity:"0"}),i.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0.4"})]})]}),i.jsx("path",{"data-anim":"pathApproved",d:"M118,97.6 L151.12,84.66 L238.844,34.012 L326.569,84.66 L403.5,123 L488.889,182.203 L576.614,232.851 L488.889,283.499 L445,307",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathBlocked",d:"M118,97.6 L151.12,84.66 L238.844,34.012 L326.569,84.66 L403.5,123 L330.105,186.645 L189.038,268.09 L148,292",fill:"none",stroke:"none"}),i.jsx("path",{d:"M151.12,84.66 L238.844,34.012 L326.569,84.66",fill:"none",stroke:"#3E4FE0",strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:"0.3",className:"app-scene-pulse-line",style:{animationDuration:"5s"}}),i.jsx("path",{d:"M330.105,186.645 L189.038,268.09",fill:"none",stroke:s.blockedAccent,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:"0.25",className:"app-scene-pulse-line",style:{animationDuration:"4.4s",animationDelay:".6s"}}),i.jsx("path",{d:"M488.889,182.203 L576.614,232.851 L488.889,283.499",fill:"none",stroke:"#3E4FE0",strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:"0.25",className:"app-scene-pulse-line",style:{animationDuration:"4.4s",animationDelay:"1.2s"}}),i.jsxs("g",{"data-anim":"cube_payment",children:[i.jsx("path",{d:"M173.933 97.5898L117.983 129.893V151.428L173.933 119.125V97.5898Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke}),i.jsx("path",{d:"M62.033 97.592L117.983 129.895V151.428L62.033 119.125V97.592Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke}),i.jsx("path",{d:"M117.983 65.2891L62.0326 97.592L117.983 129.895L173.933 97.592Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke})]}),i.jsxs("g",{"data-anim":"cube_blocked",children:[i.jsx("path",{d:"M230.876 292.129L147.987 339.985V371.889L230.876 324.033V292.129Z",fill:`url(#${a("blockedSide1Grad")})`,stroke:`url(#${a("blockedSide1Stroke")})`}),i.jsx("path",{d:"M65.097 292.132L147.987 339.988V371.892L65.097 324.036V292.132Z",fill:"#EF4444",stroke:`url(#${a("blockedSide2Stroke")})`}),i.jsx("path",{d:"M147.987 244.273L65.098 292.13L147.987 339.986L230.877 292.13Z",fill:`url(#${a("blockedTopGrad")})`,stroke:`url(#${a("blockedTopStroke")})`})]}),i.jsxs("g",{"data-anim":"cube_approved",children:[i.jsx("path",{d:"M527.853 306.996L444.963 354.852V386.756L527.853 338.9V306.996Z",fill:s.cubeApproved[0],stroke:"#3E4FE0"}),i.jsx("path",{d:"M362.073 306.999L444.963 354.855V386.759L362.073 338.903V306.999Z",fill:s.cubeApproved[1],stroke:"#3E4FE0"}),i.jsx("path",{d:"M444.963 259.141L362.074 306.997L444.963 354.853L527.853 306.997Z",fill:`url(#${a("approvedTopGrad")})`,stroke:"#3E4FE0"})]}),i.jsx("circle",{"data-anim":"gl_payment",cx:"118",cy:"108",r:"26",fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"}),i.jsx("circle",{"data-anim":"gl_approved",cx:"445",cy:"323",r:"32",fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"}),i.jsx("circle",{"data-anim":"gl_blocked",cx:"148",cy:"308",r:"32",fill:s.blockedAccent,opacity:"0",className:"app-scene-glow"}),i.jsx("g",{clipPath:`url(#${a("pClip")})`,children:Array.from({length:jT},(c,u)=>l(u))})]})}const Hi={f1:"#3E4FE0",f2:"#2A3AB0",f3:"#5A6BF0"},Us={f1:"#FACC15",f2:"#CA8A04",f3:"#FDE047"},FT=8e3,$T=1200,b1=8,VT=6e3,BT=1e3,w1=4,C1=.5,S1=.08,E1={x:403.5,y:122},zT=55,WT=.15,HT=.18,GT=.04,UT={pulsePaymentStroke:"#A3A3A3",cubePaymentFill:"black",cubePaymentStroke:"#A3A3A3",cubeUnderreviewFills:["#FDE047","#FEF08A"],underreviewTopGrad:["#E3C72F","#171717"],approvedTopGradStop1:"#39DD75",glApprovedFill:"#16A34A",glowOpacityMultiplier:.18,green:{f1:"#16A34A",f2:"#15803D",f3:"#4ADE80"},pathSecondStep:"M148,291 L191.953,353.294 L285.35,407.216 L378.746,353.294 L445,306",pulseSecondStep:"M191.953,353.294 L285.35,407.216 L378.746,353.294"},YT={pulsePaymentStroke:"#3E4FE0",cubePaymentFill:"white",cubePaymentStroke:"#737373",cubeUnderreviewFills:["#FEF08A","#FEF9C3"],underreviewTopGrad:["#FFFDE8","white"],approvedTopGradStop1:"#36C76E",glApprovedFill:"#22C55E",glowOpacityMultiplier:.12,green:{f1:"#22C55E",f2:"#06A541",f3:"#44ED82"},pathSecondStep:"M148,291 L191.953,353.294 L270.641,398.724 C278.765,403.414 291.935,403.414 300.058,398.724 L378.746,353.294 L445,306",pulseSecondStep:"M191.953,353.294 L270.641,398.724 C278.765,403.414 291.935,403.414 300.058,398.724 L378.746,353.294"},KT="M118,96.6 L151.119,83.66 L238.844,33.012 L326.568,83.66 L403.5,122 L330.106,185.645 L189.038,267.09 L148,291",ZT="M118,96.6 L151.119,83.66 L238.844,33.012 L326.568,83.66 L403.5,122 L488.889,181.203 L576.614,231.851 L488.889,282.499 L445,306";function N1(e,t){let n=1/0,r=.5;for(let o=0;o<=200;o++){const s=o/200,a=e.getPointAtLength(s*t),l=Math.hypot(a.x-E1.x,a.y-E1.y);l<n&&(n=l,r=s)}return r}function qT({className:e,alt:t}){const n=zn(),r=C.useId(),o=C.useRef(null),s=n?UT:YT,a=u=>`${r}-${u}`;ar(o,u=>{const f=M=>u.querySelector(`[data-anim="${M}"]`),d=M=>Array.from(u.querySelectorAll(`[data-anim="${M}"]`)),p=f("pathStandard"),h=f("pathVIP"),m=f("pathSecondStep"),x=p.getTotalLength(),v=h.getTotalLength(),y=m.getTotalLength(),b=[{el:f("gl_payment"),x:118,y:108,r:35,maxI:0},{el:f("gl_underreview"),x:148,y:308,r:40,maxI:0},{el:f("gl_approved"),x:445,y:323,r:40,maxI:0}],S=[{el:f("cube_payment"),cx:117.982,cy:107.4,scale:1,maxProx:0},{el:f("cube_underreview"),cx:147.987,cy:307,scale:1,maxProx:0},{el:f("cube_approved"),cx:444.963,cy:322,scale:1,maxProx:0}],w=N1(p,x),E=N1(h,v);function N(M,G,A,W,H){return{main:M[W],t1:G[W],t2:A[W],active:!1,birthTime:0,isVIP:!1,isSecondStep:H,path:null,pathLen:0,decisionRatio:0}}const _=d("poolMain"),k=d("poolT1"),I=d("poolT2"),F=d("ssMain"),U=d("ssT1"),O=d("ssT2"),R=Array.from({length:b1},(M,G)=>N(_,k,I,G,!1)),L=Array.from({length:w1},(M,G)=>N(F,U,O,G,!0));let V=0;const D=[];function $(M){M.main.setAttribute("opacity","0"),M.t1.setAttribute("opacity","0"),M.t2.setAttribute("opacity","0")}function z(M){const G=R.find(A=>!A.active);return G?(G.active=!0,G.birthTime=M,G.isVIP=Math.random()<.3,G.path=G.isVIP?h:p,G.pathLen=G.isVIP?v:x,G.decisionRatio=G.isVIP?E:w,Be(G.main,Hi),Be(G.t1,Hi),Be(G.t2,Hi),!0):!1}function P(M){const G=L.find(A=>!A.active);return G?(G.active=!0,G.birthTime=M,G.path=m,G.pathLen=y,Be(G.main,Us),Be(G.t1,Us),Be(G.t2,Us),!0):!1}return M=>{M>=V&&z(M)&&(V=M+$T);for(let A=D.length-1;A>=0;A--)M>=D[A]&&P(M)&&D.splice(A,1);b.forEach(A=>A.maxI=0),S.forEach(A=>A.maxProx=0);function G(A,W){if(!A.active||!A.path){$(A);return}const H=M-A.birthTime;if(H>=W){!A.isSecondStep&&!A.isVIP&&D.push(M+BT),A.active=!1,$(A);return}const T=H/W,B=Ve(T),Y=Math.min(1,T/.03),Z=T>.92?Math.max(0,(1-T)/.08):1,q=Y*Z;if(A.isSecondStep){if(B>C1){const ne=to(Us,s.green,Vl((B-C1)/S1));Be(A.main,ne),Be(A.t1,ne),Be(A.t2,ne)}}else if(B>A.decisionRatio){const ne=Vl((B-A.decisionRatio)/S1),le=to(Hi,A.isVIP?s.green:Us,ne);Be(A.main,le),Be(A.t1,le),Be(A.t2,le)}const oe=Ae(A.path,A.pathLen,B);ye(A.main,oe,q),ye(A.t1,Ae(A.path,A.pathLen,Math.max(0,B-.012)),q*.45),ye(A.t2,Ae(A.path,A.pathLen,Math.max(0,B-.025)),q*.2),b.forEach(ne=>{const le=Math.hypot(oe.x-ne.x,oe.y-ne.y),Ee=Math.max(0,1-le/ne.r);ne.maxI=Math.max(ne.maxI,Ee*Ee)}),S.forEach(ne=>{const le=Math.hypot(oe.x-ne.cx,oe.y-ne.cy),Ee=Math.max(0,1-le/zT);Ee>ne.maxProx&&(ne.maxProx=Ee)})}R.forEach(A=>G(A,FT)),L.forEach(A=>G(A,VT)),b.forEach(A=>{A.el.setAttribute("opacity",(A.maxI*s.glowOpacityMultiplier).toFixed(3))}),S.forEach(A=>{const W=1+A.maxProx*A.maxProx*WT,H=W>A.scale?HT:GT;A.scale+=(W-A.scale)*H,A.el.setAttribute("transform",`translate(${A.cx},${A.cy}) scale(${A.scale.toFixed(4)}) translate(${-A.cx},${-A.cy})`)})}},[n]);const l=u=>({main:["0,-6 6.2,-3 0,0 -6.2,-3","-6.2,-3 0,0 0,4 -6.2,1","0,0 6.2,-3 6.2,1 0,4"],t1:["0,-3.5 3.6,-1.7 0,0 -3.6,-1.7","-3.6,-1.7 0,0 0,2.3 -3.6,.6","0,0 3.6,-1.7 3.6,.6 0,2.3"],t2:["0,-2.5 2.6,-1.2 0,0 -2.6,-1.2","-2.6,-1.2 0,0 0,1.6 -2.6,.4","0,0 2.6,-1.2 2.6,.4 0,1.6"]})[u],c=(u,f)=>i.jsxs(i.Fragment,{children:[i.jsx("g",{"data-anim":`${u}Main`,opacity:"0",children:l("main").map((d,p)=>i.jsx("polygon",{points:d,fill:"#3E4FE0"},p))},`${f}-main`),i.jsx("g",{"data-anim":`${u}T1`,opacity:"0",children:l("t1").map((d,p)=>i.jsx("polygon",{points:d,fill:"#3E4FE0"},p))},`${f}-t1`),i.jsx("g",{"data-anim":`${u}T2`,opacity:"0",children:l("t2").map((d,p)=>i.jsx("polygon",{points:d,fill:"#3E4FE0"},p))},`${f}-t2`)]});return i.jsxs(Wn,{ref:o,maskSrc:sr.allowlists[n?"dark":"light"],alt:t,variant:"allowlists",className:e,children:[i.jsxs("defs",{children:[i.jsx("clipPath",{id:a("pClip"),children:i.jsx("path",{clipRule:"evenodd",d:"M0 0h592v444H0Z M332.24 80.927C371.58 58.259 435.458 58.259 474.798 80.927C514.139 103.596 514.139 140.404 474.798 163.072C435.458 185.74 371.58 185.74 332.24 163.072C292.899 140.404 292.899 103.596 332.24 80.927Z"})}),i.jsxs("linearGradient",{id:a("paint0"),x1:"494.533",y1:"357.416",x2:"477.059",y2:"337.162",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"#22C55E"}),i.jsx("stop",{offset:"1",stopColor:"#06A541"})]}),i.jsxs("linearGradient",{id:a("paint1"),x1:"526.002",y1:"323.017",x2:"446.814",y2:"323.017",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"white",stopOpacity:"0"}),i.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0.4"})]}),i.jsxs("linearGradient",{id:a("paint2"),x1:"93.5752",y1:"15.9521",x2:"2.13717",y2:"15.9521",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"white",stopOpacity:"0"}),i.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0.4"})]}),i.jsxs("linearGradient",{id:a("paint3"),x1:"480.855",y1:"285.274",x2:"444.963",y2:"347.441",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"#22C55E"}),i.jsx("stop",{offset:"1",stopColor:s.approvedTopGradStop1})]}),i.jsxs("linearGradient",{id:a("paint4"),x1:"403.515",y1:"282.064",x2:"444.966",y2:"353.859",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"white",stopOpacity:"0"}),i.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0.4"})]}),i.jsxs("linearGradient",{id:a("paint5"),x1:"189.431",y1:"315.057",x2:"147.987",y2:"243.274",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:s.underreviewTopGrad[0]}),i.jsx("stop",{offset:"1",stopColor:s.underreviewTopGrad[1]})]})]}),i.jsx("path",{"data-anim":"pathStandard",d:KT,fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathVIP",d:ZT,fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathSecondStep",d:s.pathSecondStep,fill:"none",stroke:"none"}),i.jsx("path",{d:"M151.119,83.66 L238.844,33.012 L326.568,83.66",fill:"none",stroke:s.pulsePaymentStroke,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:"0.3",className:"app-scene-pulse-line",style:{animationDuration:"5s"}}),i.jsx("path",{d:"M330.106,185.645 L189.038,267.09",fill:"none",stroke:"#FACC15",strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:"0.25",className:"app-scene-pulse-line",style:{animationDuration:"4.4s",animationDelay:".6s"}}),i.jsx("path",{d:"M488.889,181.203 L576.614,231.851 L488.889,282.499",fill:"none",stroke:"#22C55E",strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:"0.25",className:"app-scene-pulse-line",style:{animationDuration:"4.4s",animationDelay:"1.2s"}}),i.jsx("path",{d:s.pulseSecondStep,fill:"none",stroke:"#FACC15",strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:"0.2",className:"app-scene-pulse-line",style:{animationDuration:"5.6s",animationDelay:"1.8s"}}),i.jsxs("g",{"data-anim":"cube_payment",children:[i.jsx("path",{d:"M173.933 96.59L117.982 128.893V150.428L173.933 118.125V96.59Z",fill:s.cubePaymentFill,stroke:s.cubePaymentStroke}),i.jsx("path",{d:"M62.031 96.592L117.982 128.895V150.43L62.031 118.127V96.592Z",fill:s.cubePaymentFill,stroke:s.cubePaymentStroke}),i.jsx("path",{d:"M117.982 64.289L62.032 96.592L117.982 128.895L173.933 96.592Z",fill:s.cubePaymentFill,stroke:s.cubePaymentStroke})]}),i.jsxs("g",{"data-anim":"cube_underreview",children:[i.jsx("path",{d:"M230.876 291.129L147.987 338.985V370.889L230.876 323.033V291.129Z",fill:s.cubeUnderreviewFills[0],stroke:"#FACC15"}),i.jsx("path",{d:"M65.097 291.132L147.987 338.988V370.892L65.097 323.036V291.132Z",fill:s.cubeUnderreviewFills[1],stroke:"#FACC15"}),i.jsx("path",{d:"M147.987 243.273L65.098 291.13L147.987 338.986L230.876 291.13Z",fill:`url(#${a("paint5")})`,stroke:"#FACC15"})]}),i.jsxs("g",{"data-anim":"cube_approved",children:[i.jsx("path",{d:"M527.853 305.996L444.963 353.852V385.756L527.853 337.9V305.996Z",fill:`url(#${a("paint0")})`,stroke:`url(#${a("paint1")})`}),i.jsx("path",{d:"M362.073 305.999L444.963 353.855V385.759L362.073 337.903V305.999Z",fill:"#22C55E",stroke:`url(#${a("paint2")})`}),i.jsx("path",{d:"M444.963 258.141L362.074 305.997L444.963 353.853L527.852 305.997Z",fill:`url(#${a("paint3")})`,stroke:`url(#${a("paint4")})`})]}),i.jsx("circle",{"data-anim":"gl_payment",cx:"118",cy:"108",r:"26",fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"}),i.jsx("circle",{"data-anim":"gl_underreview",cx:"148",cy:"308",r:"32",fill:"#FACC15",opacity:"0",className:"app-scene-glow"}),i.jsx("circle",{"data-anim":"gl_approved",cx:"445",cy:"323",r:"32",fill:s.glApprovedFill,opacity:"0",className:"app-scene-glow"}),i.jsxs("g",{clipPath:`url(#${a("pClip")})`,children:[Array.from({length:b1},(u,f)=>i.jsx("g",{children:c("pool",`pool-${f}`)},f)),Array.from({length:w1},(u,f)=>i.jsx("g",{children:c("ss",`ss-${f}`)},f))]})]})}const XT={payments:gA,chargebacks:MA,installments:$A,paymentLinks:ZA,recipients:aT,subscriptions:mT,rules:NT,blocklists:IT,allowlists:qT};function f3({variant:e,className:t,alt:n}){const r=XT[e];return i.jsx(r,{className:j("w-full max-w-[592px] h-auto select-none",t),alt:n})}const p3=C.forwardRef(({variant:e,tagline:t,title:n,description:r,cta:o,onDismiss:s,dismissLabel:a,illustration:l,className:c},u)=>{const f=()=>{o.onClick(),s?.()};return i.jsxs("div",{ref:u,"data-variant":e,className:j("app-animated-empty","flex flex-col md:flex-row items-center gap-8","bg-card rounded-lg p-8 md:p-12","animate-fade-in duration-500",c),children:[i.jsx("div",{className:"hidden md:block app-animated-empty-illustration bg-muted rounded-lg overflow-hidden flex-shrink-0",children:l??i.jsx(f3,{variant:e})}),i.jsxs("div",{className:"flex flex-col gap-4 items-start w-full",children:[t&&i.jsx("p",{className:"text-muted-foreground uppercase tracking-wide text-xs font-semibold",children:t}),i.jsx("h3",{className:"text-2xl font-semibold leading-tight",children:n}),i.jsx("p",{className:"text-muted-foreground text-sm",children:r}),i.jsxs("div",{className:"flex gap-3 items-center mt-2",children:[i.jsx(ot,{variant:"default",size:"default",onClick:f,disabled:o.disabled,children:o.label}),s&&a&&i.jsx(ot,{variant:"ghost",size:"default",onClick:s,children:a})]})]})]})});p3.displayName="AnimatedEmpty";const h3=C.forwardRef(({logo:e,fallbackLogo:t,name:n,subtitle:r,badge:o,status:s,actionLabel:a,onAction:l,footer:c,className:u},f)=>{const[d,p]=C.useState(!1),[h,m]=C.useState(!1),[x,v]=C.useState(!1),y=()=>e&&typeof e!="string"?e:!h&&typeof e=="string"?i.jsx("img",{src:e,alt:n,loading:"lazy",className:"w-10 h-10 shrink-0 rounded-md",onError:()=>m(!0)}):!x&&t?i.jsx("img",{src:t,alt:n,loading:"lazy",className:"w-10 h-10 shrink-0 rounded-md",onError:()=>v(!0)}):i.jsx("div",{className:"w-10 h-10 shrink-0 rounded-md bg-muted flex items-center justify-center",children:i.jsx("span",{className:"text-sm font-semibold text-muted-foreground",children:n?.charAt(0)?.toUpperCase()||"?"})});return i.jsxs(Ss,{ref:f,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),className:j("flex flex-col bg-card transition-all overflow-hidden",d?"border-primary shadow-lg":"",u),children:[i.jsxs(Sc,{className:"flex flex-col gap-4",children:[i.jsx("div",{className:"flex items-start gap-6",children:y()}),i.jsxs("div",{className:"flex flex-col gap-1.5",children:[i.jsx("span",{className:"text-base font-semibold leading-none text-card-foreground tracking-tight",children:n}),r&&i.jsx("span",{className:"text-sm text-muted-foreground",children:r})]})]}),c!==void 0?c:i.jsxs(Ec,{className:"justify-between border-t border-border px-6 py-4",children:[s??o,l&&a&&i.jsx(ot,{size:"sm",onClick:l,className:d?"":"opacity-50",children:a})]})]})});h3.displayName="ProviderCard";function JT(e){const t=e.split(",").map(o=>o.trim().replace(/^\./,"").toUpperCase()).filter(Boolean);if(t.length===0)return"";if(t.length===1)return`Supports: ${t[0]} format`;const n=t[t.length-1];return`Supports: ${t.slice(0,-1).join(", ")} or ${n} format`}function QT(e){if(e>=1024*1024*1024){const n=e/1073741824;return`${Number.isInteger(n)?n:n.toFixed(1)} GB max file size.`}if(e>=1024*1024){const n=e/1048576;return`${Number.isInteger(n)?n:n.toFixed(1)} MB max file size.`}const t=e/1024;return`${Number.isInteger(t)?t:t.toFixed(1)} KB max file size.`}const eP={pdf:"FilePdf",doc:"FileDoc",docx:"FileDoc",txt:"FileTxt",csv:"FileCsv",xls:"FileXls",xlsx:"FileXls",zip:"FileZip",rar:"FileArchive","7z":"FileArchive",png:"FilePng",jpg:"FileJpg",jpeg:"FileJpg",ppt:"FilePpt",pptx:"FilePpt"};function tP(e){const t=e.split(".").pop()?.toLowerCase()||"";return eP[t]||"File"}function nP(e){return e.status?e.status:e.progress!==void 0&&e.progress<100?"uploading":"uploaded"}function rP({isDragActive:e,disabled:t,acceptText:n,maxSizeText:r,dropzoneText:o,image:s,onClick:a,onDragEnter:l,onDragOver:c,onDragLeave:u,onDrop:f}){return i.jsxs("button",{type:"button",disabled:t,onClick:a,onDragEnter:l,onDragOver:c,onDragLeave:u,onDrop:f,"aria-label":"File upload dropzone",className:j("flex w-full flex-col items-center justify-center gap-2 rounded-lg border bg-muted/40 px-6 py-6 transition-colors cursor-pointer","border-border hover:border-primary/50",e&&"border-primary bg-primary/5",t&&"opacity-50 cursor-not-allowed pointer-events-none"),children:[s?i.jsx("img",{src:s,alt:"",width:100,height:82,className:"object-contain","aria-hidden":"true"}):i.jsx(X,{name:"UploadSimple",size:"xl",className:"text-muted-foreground"}),i.jsxs("p",{className:"text-sm text-center text-foreground font-semibold",children:[i.jsx("span",{className:"text-primary cursor-pointer",children:"Select"})," ",o]}),(n||r)&&i.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[n&&i.jsx("p",{className:"text-xs text-muted-foreground",children:n}),r&&i.jsx("p",{className:"text-xs text-muted-foreground",children:r})]})]})}function oP({file:e,onRemove:t,disabled:n}){const r=nP(e),o=tP(e.name);return i.jsxs("div",{className:j("flex items-center gap-3 rounded-lg border px-3 py-2.5",r==="error"&&"border-destructive/50 bg-destructive/5"),children:[i.jsx(X,{name:o,size:"lg",className:j("shrink-0 text-muted-foreground",r==="error"&&"text-destructive")}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("p",{className:"text-sm font-medium truncate",children:e.name}),r==="uploading"&&i.jsx("div",{className:"flex items-center gap-2 mt-1",children:i.jsx(Pp,{value:e.progress??0,className:"h-1.5 flex-1"})}),r==="uploaded"&&i.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Uploaded"}),r==="error"&&i.jsx("p",{className:"text-xs text-destructive mt-0.5",children:e.errorMessage||"Upload failed"})]}),i.jsx("button",{type:"button",onClick:()=>t?.(e.id),disabled:n,className:"shrink-0 flex items-center justify-center cursor-pointer text-muted-foreground","aria-label":`Remove ${e.name}`,children:i.jsx(X,{name:"X",size:"sm"})})]})}const g3=C.forwardRef(({value:e=[],onFilesAdded:t,onRemove:n,accept:r,maxSize:o,maxFiles:s,multiple:a=!0,label:l,info:c,requiredIndicator:u,required:f,disabled:d,error:p,className:h,dropzoneText:m="a file or drag it here",image:x="https://dashboard-assets.y.uno/batch-refunds/upload_media.png"},v)=>{const y=C.useRef(null),b=C.useRef(0),[S,w]=C.useState(!1),E=C.useCallback(D=>{y.current=D,typeof v=="function"?v(D):v&&(v.current=D)},[v]),N=r?JT(r):"",_=o?QT(o):"",k=C.useCallback(D=>{let $=D;if(r){const z=r.split(",").map(P=>P.trim().toLowerCase());$=$.filter(P=>{const M="."+(P.name.split(".").pop()?.toLowerCase()||""),G=P.type.toLowerCase();return z.some(A=>A.startsWith(".")?M===A:G===A)})}if(o&&($=$.filter(z=>z.size<=o)),s){const z=s-(e?.length||0);$=$.slice(0,Math.max(0,z))}a||($=$.slice(0,1)),$.length>0&&t?.($)},[r,o,s,a,e,t]),I=C.useCallback(()=>{d||y.current?.click()},[d]),F=C.useCallback(D=>{const $=Array.from(D.target.files||[]);k($),D.target.value=""},[k]),U=C.useCallback(D=>{D.preventDefault(),D.stopPropagation(),b.current++,!d&&D.dataTransfer.items&&D.dataTransfer.items.length>0&&w(!0)},[d]),O=C.useCallback(D=>{D.preventDefault(),D.stopPropagation()},[]),R=C.useCallback(D=>{D.preventDefault(),D.stopPropagation(),b.current--,b.current===0&&w(!1)},[]),L=C.useCallback(D=>{if(D.preventDefault(),D.stopPropagation(),w(!1),b.current=0,d)return;const $=Array.from(D.dataTransfer.files);k($)},[d,k]),V=!!p;return i.jsxs("div",{className:j("flex flex-col gap-2 w-full",h),children:[(l||c||u)&&i.jsx(Wt,{info:c,requiredIndicator:u,required:f,disabled:d,children:l}),i.jsx("input",{ref:E,type:"file",className:"sr-only",accept:r,multiple:a,disabled:d,onChange:F,tabIndex:-1,"aria-hidden":"true"}),i.jsx(rP,{isDragActive:S,disabled:d,acceptText:N,maxSizeText:_,dropzoneText:m,image:x,onClick:I,onDragEnter:U,onDragOver:O,onDragLeave:R,onDrop:L}),e.length>0&&i.jsx("div",{className:"flex flex-col gap-2",children:e.map(D=>i.jsx(oP,{file:D,onRemove:n,disabled:d},D.id))}),V&&i.jsx(Dr,{children:p})]})});g3.displayName="FileUpload";const sP={completed:"font-bold text-foreground",active:"font-bold text-foreground",error:"font-bold text-destructive"},aP=(e,t,n)=>e.status==="error"?"inactive":t<(n??0)?"completed":t===n?"active":"inactive";function iP(e,t,n){return e.status==="error"?"error":t<n?"completed":t===n?"active":"inactive"}const lP=({index:e,state:t})=>{const n=j("flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-xs font-bold",(t==="completed"||t==="active")&&"bg-primary text-primary-foreground",t==="inactive"&&"bg-border text-muted-foreground",t==="error"&&"bg-destructive text-destructive-foreground"),r=()=>t==="completed"?i.jsx(X,{name:"Check",size:"xs",className:"text-primary-foreground"}):t==="error"?i.jsx(X,{name:"X",size:"xs",className:"text-destructive-foreground"}):i.jsx("span",{children:e+1});return i.jsx("div",{className:n,children:r()})},cP=({state:e,orientation:t})=>{const n=e==="completed"||e==="active";return t==="vertical"?i.jsx("div",{className:j("w-0.5 h-6 ml-3 my-1",n?"bg-primary":"bg-border")}):i.jsx("div",{className:j("mx-2 h-0.5 flex-1 rounded-sm",n?"bg-primary":"bg-border")})},m3=C.forwardRef(({activeStep:e,steps:t,orientation:n="horizontal",onStepClick:r,className:o,...s},a)=>{const l=n==="vertical";return i.jsx("div",{ref:a,className:j(l?"flex flex-col w-full":"flex w-full items-center",o),...s,children:t.map((c,u)=>{const f=iP(c,u,e),d=aP(c,u,e),p=j("text-xs",sP[f]??"font-normal text-muted-foreground"),h=r!=null&&f!=="active";return i.jsxs(C.Fragment,{children:[i.jsxs("div",{className:j("flex flex-row gap-2",l?"items-start":"items-center",h&&"cursor-pointer hover:opacity-80"),"aria-current":f==="active"?"step":void 0,...h?{role:"button",tabIndex:0,onClick:()=>r(u),onKeyDown:m=>m.key==="Enter"&&r(u)}:{},children:[i.jsx(lP,{index:u,state:f}),i.jsxs("div",{className:"flex flex-col",children:[i.jsx("span",{className:p,children:c.label}),c.description&&i.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:c.description})]})]}),u<t.length-1&&i.jsx(cP,{state:d,orientation:n})]},c.key)})})});m3.displayName="Stepper";function zc(e){const t=g.useRef({value:e,previous:e});return g.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Wc="Checkbox",[uP]=St(Wc),[dP,Gp]=uP(Wc);function fP(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:a,name:l,onCheckedChange:c,required:u,value:f="on",internal_do_not_use_render:d}=e,[p,h]=gt({prop:n,defaultProp:o??!1,onChange:c,caller:Wc}),[m,x]=g.useState(null),[v,y]=g.useState(null),b=g.useRef(!1),S=m?!!a||!!m.closest("form"):!0,w={checked:p,disabled:s,setChecked:h,control:m,setControl:x,name:l,form:a,value:f,hasConsumerStoppedPropagationRef:b,required:u,defaultChecked:wr(o)?!1:o,isFormControl:S,bubbleInput:v,setBubbleInput:y};return i.jsx(dP,{scope:t,...w,children:pP(d)?d(w):r})}var x3="CheckboxTrigger",v3=g.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:a,disabled:l,checked:c,required:u,setControl:f,setChecked:d,hasConsumerStoppedPropagationRef:p,isFormControl:h,bubbleInput:m}=Gp(x3,e),x=Se(o,f),v=g.useRef(c);return g.useEffect(()=>{const y=s?.form;if(y){const b=()=>d(v.current);return y.addEventListener("reset",b),()=>y.removeEventListener("reset",b)}},[s,d]),i.jsx(ue.button,{type:"button",role:"checkbox","aria-checked":wr(c)?"mixed":c,"aria-required":u,"data-state":E3(c),"data-disabled":l?"":void 0,disabled:l,value:a,...r,ref:x,onKeyDown:te(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:te(n,y=>{d(b=>wr(b)?!0:!b),m&&h&&(p.current=y.isPropagationStopped(),p.current||y.stopPropagation())})})});v3.displayName=x3;var y3=g.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:a,disabled:l,value:c,onCheckedChange:u,form:f,...d}=e;return i.jsx(fP,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:l,required:a,onCheckedChange:u,name:r,form:f,value:c,internal_do_not_use_render:({isFormControl:p})=>i.jsxs(i.Fragment,{children:[i.jsx(v3,{...d,ref:t,__scopeCheckbox:n}),p&&i.jsx(S3,{__scopeCheckbox:n})]})})});y3.displayName=Wc;var b3="CheckboxIndicator",w3=g.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=Gp(b3,n);return i.jsx(Tt,{present:r||wr(s.checked)||s.checked===!0,children:i.jsx(ue.span,{"data-state":E3(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});w3.displayName=b3;var C3="CheckboxBubbleInput",S3=g.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:a,required:l,disabled:c,name:u,value:f,form:d,bubbleInput:p,setBubbleInput:h}=Gp(C3,e),m=Se(n,h),x=zc(s),v=pc(r);g.useEffect(()=>{const b=p;if(!b)return;const S=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(S,"checked").set,N=!o.current;if(x!==s&&E){const _=new Event("click",{bubbles:N});b.indeterminate=wr(s),E.call(b,wr(s)?!1:s),b.dispatchEvent(_)}},[p,x,s,o]);const y=g.useRef(wr(s)?!1:s);return i.jsx(ue.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??y.current,required:l,disabled:c,name:u,value:f,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});S3.displayName=C3;function pP(e){return typeof e=="function"}function wr(e){return e==="indeterminate"}function E3(e){return wr(e)?"indeterminate":e?"checked":"unchecked"}function N3({className:e,...t}){return i.jsx(y3,{"data-slot":"checkbox",className:j("peer bg-background border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-sm border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:i.jsx(w3,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:i.jsx(X,{name:t.checked==="indeterminate"?"Minus":"Check",className:"size-3.5"})})})}const Oa=C.forwardRef(({label:e,description:t,id:n,name:r,disabled:o,onChange:s,className:a,labelClassName:l,info:c,...u},f)=>{const d=C.useId(),p=n||r||d,h=x=>{if(!s)return;s({target:{name:r||p,checked:x,type:"checkbox",value:x?"on":"off"},currentTarget:{name:r||p,checked:x,type:"checkbox",value:x?"on":"off"},preventDefault:()=>{},stopPropagation:()=>{}})},m=i.jsx(N3,{ref:f,id:p,name:r,disabled:o,onCheckedChange:h,...u,className:j("cursor-pointer",a)});return e?i.jsxs("div",{className:"flex items-start gap-2",children:[m,i.jsxs("div",{className:"flex flex-col gap-1.5",children:[i.jsx(Wt,{htmlFor:p,info:c,className:j("text-sm leading-none cursor-pointer",o&&"text-muted-foreground",l),children:e}),t&&i.jsx("p",{className:j("text-sm text-muted-foreground",o&&"opacity-50"),children:t})]})]}):m});Oa.displayName="Checkbox";var Hc="Switch",[hP]=St(Hc),[gP,mP]=hP(Hc),_3=g.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:s,required:a,disabled:l,value:c="on",onCheckedChange:u,form:f,...d}=e,[p,h]=g.useState(null),m=Se(t,S=>h(S)),x=g.useRef(!1),v=p?f||!!p.closest("form"):!0,[y,b]=gt({prop:o,defaultProp:s??!1,onChange:u,caller:Hc});return i.jsxs(gP,{scope:n,checked:y,disabled:l,children:[i.jsx(ue.button,{type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":M3(y),"data-disabled":l?"":void 0,disabled:l,value:c,...d,ref:m,onClick:te(e.onClick,S=>{b(w=>!w),v&&(x.current=S.isPropagationStopped(),x.current||S.stopPropagation())})}),v&&i.jsx(R3,{control:p,bubbles:!x.current,name:r,value:c,checked:y,required:a,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});_3.displayName=Hc;var j3="SwitchThumb",k3=g.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=mP(j3,n);return i.jsx(ue.span,{"data-state":M3(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});k3.displayName=j3;var xP="SwitchBubbleInput",R3=g.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const a=g.useRef(null),l=Se(a,s),c=zc(n),u=pc(t);return g.useEffect(()=>{const f=a.current;if(!f)return;const d=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(d,"checked").set;if(c!==n&&h){const m=new Event("click",{bubbles:r});h.call(f,n),f.dispatchEvent(m)}},[c,n,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:l,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});R3.displayName=xP;function M3(e){return e?"checked":"unchecked"}var vP=_3,yP=k3;function bP({className:e,...t}){return i.jsx(vP,{"data-slot":"switch",className:j("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:i.jsx(yP,{"data-slot":"switch-thumb",className:j("bg-input dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:ltr:translate-x-[calc(100%-2px)] data-[state=checked]:rtl:-translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}const Up=C.forwardRef(({label:e,description:t,side:n="left",variant:r="default",id:o,name:s,onChange:a,className:l,switchClassName:c,info:u,labelClassName:f,...d},p)=>{const h=C.useId(),m=o||s||h,x=b=>{if(!a)return;a({target:{name:s||m,checked:b,type:"checkbox",value:b?"on":"off"},currentTarget:{name:s||m,checked:b,type:"checkbox",value:b?"on":"off"},preventDefault:()=>{},stopPropagation:()=>{}})},v=i.jsx(bP,{ref:p,id:m,name:s,className:j("cursor-pointer",c),onCheckedChange:x,...d}),y=j("flex gap-2 items-start",{"flex-row-reverse":n==="right","bg-input box-border justify-start p-4 rounded-lg border shadow-xs":r==="box"},l);return i.jsxs("div",{className:y,children:[v,i.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[i.jsx("div",{className:"flex items-center gap-2",children:i.jsx(Wt,{htmlFor:m,info:u,className:j("text-sm leading-[18.39px] cursor-pointer",f),children:e})}),t&&i.jsx("p",{className:"text-sm text-muted-foreground",children:t})]})]})});Up.displayName="Switch";const Yp=g.forwardRef(({className:e,...t},n)=>i.jsx("textarea",{ref:n,"data-slot":"textarea",className:j("font-normal placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex min-h-[80px] w-full min-w-0 rounded-md border bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","resize-none",e),...t}));Yp.displayName="Textarea";const wP=Ge("flex gap-2 w-full",{variants:{layout:{vertical:"flex-col",horizontal:"flex-row items-start gap-4"}},defaultVariants:{layout:"vertical"}}),CP=Ge("text-sm",{variants:{layout:{vertical:"",horizontal:"mt-2"}},defaultVariants:{layout:"vertical"}}),D3=C.forwardRef(({className:e,layout:t,label:n,description:r,error:o,id:s,disabled:a,textareaProps:l,...c},u)=>{const f=C.useId(),d=s||l?.id||f,p=!!o;return i.jsxs("div",{className:j(wP({layout:t}),e),children:[n&&i.jsx(Wt,{htmlFor:d,className:j(CP({layout:t})),children:n}),i.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[i.jsx(Yp,{ref:u,disabled:a,className:j(p&&"border-destructive focus-visible:border-destructive",l?.className),"aria-invalid":p,"aria-describedby":r||o?`${d}-description`:void 0,...c,...l,id:d}),(r||o)&&i.jsx("p",{id:`${d}-description`,className:j("text-sm",o?"text-destructive":"text-muted-foreground"),children:o||r})]})]})});D3.displayName="Textarea";var SP=Object.defineProperty,EP=Object.defineProperties,NP=Object.getOwnPropertyDescriptors,Bl=Object.getOwnPropertySymbols,A3=Object.prototype.hasOwnProperty,T3=Object.prototype.propertyIsEnumerable,_1=(e,t,n)=>t in e?SP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_P=(e,t)=>{for(var n in t||(t={}))A3.call(t,n)&&_1(e,n,t[n]);if(Bl)for(var n of Bl(t))T3.call(t,n)&&_1(e,n,t[n]);return e},jP=(e,t)=>EP(e,NP(t)),kP=(e,t)=>{var n={};for(var r in e)A3.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Bl)for(var r of Bl(e))t.indexOf(r)<0&&T3.call(e,r)&&(n[r]=e[r]);return n};function RP(e){let t=setTimeout(e,0),n=setTimeout(e,10),r=setTimeout(e,50);return[t,n,r]}function MP(e){let t=g.useRef();return g.useEffect(()=>{t.current=e}),t.current}var DP=18,P3=40,AP=`${P3}px`,TP=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function PP({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[o,s]=g.useState(!1),[a,l]=g.useState(!1),[c,u]=g.useState(!1),f=g.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&o&&a,[o,a,n]),d=g.useCallback(()=>{let p=e.current,h=t.current;if(!p||!h||c||n==="none")return;let m=p,x=m.getBoundingClientRect().left+m.offsetWidth,v=m.getBoundingClientRect().top+m.offsetHeight/2,y=x-DP,b=v;document.querySelectorAll(TP).length===0&&document.elementFromPoint(y,b)===p||(s(!0),u(!0))},[e,t,c,n]);return g.useEffect(()=>{let p=e.current;if(!p||n==="none")return;function h(){let x=window.innerWidth-p.getBoundingClientRect().right;l(x>=P3)}h();let m=setInterval(h,1e3);return()=>{clearInterval(m)}},[e,n]),g.useEffect(()=>{let p=r||document.activeElement===t.current;if(n==="none"||!p)return;let h=setTimeout(d,0),m=setTimeout(d,2e3),x=setTimeout(d,5e3),v=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(h),clearTimeout(m),clearTimeout(x),clearTimeout(v)}},[t,r,n,d]),{hasPWMBadge:o,willPushPWMBadge:f,PWM_BADGE_SPACE_WIDTH:AP}}var O3=g.createContext({}),L3=g.forwardRef((e,t)=>{var n=e,{value:r,onChange:o,maxLength:s,textAlign:a="left",pattern:l,placeholder:c,inputMode:u="numeric",onComplete:f,pushPasswordManagerStrategy:d="increase-width",pasteTransformer:p,containerClassName:h,noScriptCSSFallback:m=OP,render:x,children:v}=n,y=kP(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),b,S,w,E,N;let[_,k]=g.useState(typeof y.defaultValue=="string"?y.defaultValue:""),I=r??_,F=MP(I),U=g.useCallback(re=>{o?.(re),k(re)},[o]),O=g.useMemo(()=>l?typeof l=="string"?new RegExp(l):l:null,[l]),R=g.useRef(null),L=g.useRef(null),V=g.useRef({value:I,onChange:U,isIOS:typeof window<"u"&&((S=(b=window?.CSS)==null?void 0:b.supports)==null?void 0:S.call(b,"-webkit-touch-callout","none"))}),D=g.useRef({prev:[(w=R.current)==null?void 0:w.selectionStart,(E=R.current)==null?void 0:E.selectionEnd,(N=R.current)==null?void 0:N.selectionDirection]});g.useImperativeHandle(t,()=>R.current,[]),g.useEffect(()=>{let re=R.current,ce=L.current;if(!re||!ce)return;V.current.value!==re.value&&V.current.onChange(re.value),D.current.prev=[re.selectionStart,re.selectionEnd,re.selectionDirection];function K(){if(document.activeElement!==re){A(null),H(null);return}let J=re.selectionStart,be=re.selectionEnd,me=re.selectionDirection,fe=re.maxLength,Pe=re.value,Te=D.current.prev,We=-1,nt=-1,dt;if(Pe.length!==0&&J!==null&&be!==null){let je=J===be,Me=J===Pe.length&&Pe.length<fe;if(je&&!Me){let Ue=J;if(Ue===0)We=0,nt=1,dt="forward";else if(Ue===fe)We=Ue-1,nt=Ue,dt="backward";else if(fe>1&&Pe.length>1){let Lt=0;if(Te[0]!==null&&Te[1]!==null){dt=Ue<Te[1]?"backward":"forward";let Gt=Te[0]===Te[1]&&Te[0]<fe;dt==="backward"&&!Gt&&(Lt=-1)}We=Lt+Ue,nt=Lt+Ue+1}}We!==-1&&nt!==-1&&We!==nt&&R.current.setSelectionRange(We,nt,dt)}let fn=We!==-1?We:J,Ot=nt!==-1?nt:be,Nt=dt??me;A(fn),H(Ot),D.current.prev=[fn,Ot,Nt]}if(document.addEventListener("selectionchange",K,{capture:!0}),K(),document.activeElement===re&&M(!0),!document.getElementById("input-otp-style")){let J=document.createElement("style");if(J.id="input-otp-style",document.head.appendChild(J),J.sheet){let be="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Ys(J.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Ys(J.sheet,`[data-input-otp]:autofill { ${be} }`),Ys(J.sheet,`[data-input-otp]:-webkit-autofill { ${be} }`),Ys(J.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Ys(J.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let Q=()=>{ce&&ce.style.setProperty("--root-height",`${re.clientHeight}px`)};Q();let ae=new ResizeObserver(Q);return ae.observe(re),()=>{document.removeEventListener("selectionchange",K,{capture:!0}),ae.disconnect()}},[]);let[$,z]=g.useState(!1),[P,M]=g.useState(!1),[G,A]=g.useState(null),[W,H]=g.useState(null);g.useEffect(()=>{RP(()=>{var re,ce,K,Q;(re=R.current)==null||re.dispatchEvent(new Event("input"));let ae=(ce=R.current)==null?void 0:ce.selectionStart,J=(K=R.current)==null?void 0:K.selectionEnd,be=(Q=R.current)==null?void 0:Q.selectionDirection;ae!==null&&J!==null&&(A(ae),H(J),D.current.prev=[ae,J,be])})},[I,P]),g.useEffect(()=>{F!==void 0&&I!==F&&F.length<s&&I.length===s&&f?.(I)},[s,f,F,I]);let T=PP({containerRef:L,inputRef:R,pushPasswordManagerStrategy:d,isFocused:P}),B=g.useCallback(re=>{let ce=re.currentTarget.value.slice(0,s);if(ce.length>0&&O&&!O.test(ce)){re.preventDefault();return}typeof F=="string"&&ce.length<F.length&&document.dispatchEvent(new Event("selectionchange")),U(ce)},[s,U,F,O]),Y=g.useCallback(()=>{var re;if(R.current){let ce=Math.min(R.current.value.length,s-1),K=R.current.value.length;(re=R.current)==null||re.setSelectionRange(ce,K),A(ce),H(K)}M(!0)},[s]),Z=g.useCallback(re=>{var ce,K;let Q=R.current;if(!p&&(!V.current.isIOS||!re.clipboardData||!Q))return;let ae=re.clipboardData.getData("text/plain"),J=p?p(ae):ae;re.preventDefault();let be=(ce=R.current)==null?void 0:ce.selectionStart,me=(K=R.current)==null?void 0:K.selectionEnd,fe=(be!==me?I.slice(0,be)+J+I.slice(me):I.slice(0,be)+J+I.slice(be)).slice(0,s);if(fe.length>0&&O&&!O.test(fe))return;Q.value=fe,U(fe);let Pe=Math.min(fe.length,s-1),Te=fe.length;Q.setSelectionRange(Pe,Te),A(Pe),H(Te)},[s,U,O,I]),q=g.useMemo(()=>({position:"relative",cursor:y.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[y.disabled]),oe=g.useMemo(()=>({position:"absolute",inset:0,width:T.willPushPWMBadge?`calc(100% + ${T.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:T.willPushPWMBadge?`inset(0 ${T.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:a,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[T.PWM_BADGE_SPACE_WIDTH,T.willPushPWMBadge,a]),ne=g.useMemo(()=>g.createElement("input",jP(_P({autoComplete:y.autoComplete||"one-time-code"},y),{"data-input-otp":!0,"data-input-otp-placeholder-shown":I.length===0||void 0,"data-input-otp-mss":G,"data-input-otp-mse":W,inputMode:u,pattern:O?.source,"aria-placeholder":c,style:oe,maxLength:s,value:I,ref:R,onPaste:re=>{var ce;Z(re),(ce=y.onPaste)==null||ce.call(y,re)},onChange:B,onMouseOver:re=>{var ce;z(!0),(ce=y.onMouseOver)==null||ce.call(y,re)},onMouseLeave:re=>{var ce;z(!1),(ce=y.onMouseLeave)==null||ce.call(y,re)},onFocus:re=>{var ce;Y(),(ce=y.onFocus)==null||ce.call(y,re)},onBlur:re=>{var ce;M(!1),(ce=y.onBlur)==null||ce.call(y,re)}})),[B,Y,Z,u,oe,s,W,G,y,O?.source,I]),le=g.useMemo(()=>({slots:Array.from({length:s}).map((re,ce)=>{var K;let Q=P&&G!==null&&W!==null&&(G===W&&ce===G||ce>=G&&ce<W),ae=I[ce]!==void 0?I[ce]:null,J=I[0]!==void 0?null:(K=c?.[ce])!=null?K:null;return{char:ae,placeholderChar:J,isActive:Q,hasFakeCaret:Q&&ae===null}}),isFocused:P,isHovering:!y.disabled&&$}),[P,$,s,W,G,y.disabled,I]),Ee=g.useMemo(()=>x?x(le):g.createElement(O3.Provider,{value:le},v),[v,le,x]);return g.createElement(g.Fragment,null,m!==null&&g.createElement("noscript",null,g.createElement("style",null,m)),g.createElement("div",{ref:L,"data-input-otp-container":!0,style:q,className:h},Ee,g.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},ne)))});L3.displayName="Input";function Ys(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var OP=`
|
|
59
|
+
C400,330 200,330 145,286`,fill:"none",stroke:"none"}),i.jsx("path",{d:"M103.507,262.346 L15.783,211.699 L103.507,161.051",fill:"none",stroke:"#3E4FE0",strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:"0.3",className:"app-scene-pulse-line",style:{animationDuration:"4.4s"}}),i.jsx("path",{d:"M208.456,101.508 L296.181,50.86 L383.905,101.508",fill:"none",stroke:"#3E4FE0",strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:"0.3",className:"app-scene-pulse-line",style:{animationDuration:"5s",animationDelay:".6s"}}),i.jsx("path",{d:"M491.226,161.051 L578.95,211.699 L491.226,262.346",fill:"none",stroke:"#3E4FE0",strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:"0.3",className:"app-scene-pulse-line",style:{animationDuration:"4.4s",animationDelay:"1.2s"}}),i.jsx("path",{d:"M447,286 C400,330 200,330 145,286",fill:"none",stroke:"#3E4FE0",strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:"0.2",className:"app-scene-pulse-line",style:{animationDuration:"5.6s",animationDelay:"1.8s"}}),i.jsxs("g",{"data-anim":"cube",children:[i.jsx("path",{d:"M212.27 121.438L156.319 153.74V175.276L212.27 142.973V121.438Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke}),i.jsx("path",{d:"M100.369 121.44L156.319 153.743V175.276L100.369 142.973V121.44Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke}),i.jsx("path",{d:"M156.319 89.137L100.369 121.44L156.319 153.743L212.269 121.44Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke}),i.jsx("path",{"data-anim":"shimmerFace",d:"M156.319 89.137L100.369 121.44L156.319 153.743L212.269 121.44Z",fill:`url(#${l("shimmerGrad")})`,opacity:"0"})]}),i.jsxs("g",{"data-anim":"cube",children:[i.jsx("path",{d:"M492.228 121.438L436.278 153.74V175.276L492.228 142.973V121.438Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke}),i.jsx("path",{d:"M380.328 121.44L436.278 153.743V175.276L380.328 142.973V121.44Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke}),i.jsx("path",{d:"M436.278 89.137L380.328 121.44L436.278 153.743L492.228 121.44Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke})]}),i.jsxs("g",{"data-anim":"cube",children:[i.jsx("path",{d:"M530.189 285.844L447.3 333.7V365.604L530.189 317.748V285.844Z",fill:s.cubeAuthorized[0],stroke:"#3E4FE0"}),i.jsx("path",{d:"M364.411 285.844L447.3 333.7V365.604L364.411 317.748V285.844Z",fill:s.cubeAuthorized[1],stroke:"#3E4FE0"}),i.jsx("path",{d:"M447.3 237.988L364.411 285.844L447.3 333.701L530.189 285.844Z",fill:`url(#${l("authorizedTopGrad")})`,stroke:"#3E4FE0"})]}),h1.map((c,u)=>i.jsx("circle",{"data-anim":"glow",cx:c.cx,cy:c.cy,r:c.r,fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"},u)),i.jsxs("g",{"data-anim":"part",opacity:"0",children:[i.jsx("polygon",{points:"0,-6 6.2,-3 0,0 -6.2,-3",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-6.2,-3 0,0 0,4 -6.2,1",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 6.2,-3 6.2,1 0,4",fill:"#5A6BFF"})]}),i.jsxs("g",{"data-anim":"trail1",opacity:"0",children:[i.jsx("polygon",{points:"0,-3.5 3.6,-1.7 0,0 -3.6,-1.7",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-3.6,-1.7 0,0 0,2.3 -3.6,.6",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 3.6,-1.7 3.6,.6 0,2.3",fill:"#5A6BFF"})]}),i.jsxs("g",{"data-anim":"trail2",opacity:"0",children:[i.jsx("polygon",{points:"0,-2.5 2.6,-1.2 0,0 -2.6,-1.2",fill:"#3E4FE0"}),i.jsx("polygon",{points:"-2.6,-1.2 0,0 0,1.6 -2.6,.4",fill:"#0617A9"}),i.jsx("polygon",{points:"0,0 2.6,-1.2 2.6,.4 0,1.6",fill:"#5A6BFF"})]})]})}const m1=8e3,RP=1200,MP=8,DP=55,AP=.15,PP=.18,TP=.04,OP=3,g1=.05,x1={x:403.5,y:123},LP=.2,IP={blue:{f1:"#3E4FE0",f2:"#2A3AB0",f3:"#5A6BF0"},red:{f1:"#DC2626",f2:"#991B1B",f3:"#EF4444"},glowFactor:.18,cubeNeutralFill:"black",cubeNeutralStroke:"#A3A3A3",cubeApproved:["#0E133D","#161D61"],approvedTopGrad:["#161D61","#2531A0"],blockedAccent:"#DC2626"},FP={blue:{f1:"#3E4FE0",f2:"#C3C9FA",f3:"#EBECF9"},red:{f1:"#EF4444",f2:"#AA0707",f3:"#FF5E5E"},glowFactor:.12,cubeNeutralFill:"white",cubeNeutralStroke:"#737373",cubeApproved:["#C3C9FA","#EBECF9"],approvedTopGrad:["#F3F4FF","white"],blockedAccent:"#EF4444"},v1=["#EF4444","#AA0707"],y1=["#EF4444","#FF5E5E"];function $P(e,t,n){return{f1:ns(e.f1,t.f1,n),f2:ns(e.f2,t.f2,n),f3:ns(e.f3,t.f3,n)}}function VP({className:e,alt:t}){const n=zn(),r=C.useId(),o=C.useRef(null),s=n?IP:FP,a=c=>`${r}-${c}`;ar(o,c=>{const u=(I,F=c)=>F.querySelector(`[data-anim="${I}"]`),f=I=>Array.from(c.querySelectorAll(`[data-anim="${I}"]`)),d=u("pathApproved"),p=u("pathBlocked"),h=d.getTotalLength(),g=p.getTotalLength(),x=[{el:u("gl_payment"),x:118,y:108,r:35},{el:u("gl_approved"),x:445,y:323,r:40},{el:u("gl_blocked"),x:148,y:308,r:40}],v=[{el:u("cube_payment"),cx:117.983,cy:108.4,scale:1,shakeable:!1},{el:u("cube_approved"),cx:444.963,cy:323,scale:1,shakeable:!1},{el:u("cube_blocked"),cx:147.987,cy:308,scale:1,shakeable:!0}];function y(I,F){let U=1/0,O=.5;for(let R=0;R<=200;R++){const L=R/200,V=I.getPointAtLength(L*F),D=Math.hypot(V.x-x1.x,V.y-x1.y);D<U&&(U=D,O=L)}return O}const b=y(d,h),S=y(p,g),E=f("particle").map(I=>({main:u("main",I),t1:u("t1",I),t2:u("t2",I),active:!1,birthTime:0,isBlocked:!1,decisionRatio:0}));function N(I,F){for(const U of[I.main,I.t1,I.t2]){const O=U.querySelectorAll("polygon");O[0]?.setAttribute("fill",F.f1),O[1]?.setAttribute("fill",F.f2),O[2]?.setAttribute("fill",F.f3)}}let _=0;function k(I){const F=E.find(U=>!U.active);return F?(F.active=!0,F.birthTime=I,F.isBlocked=Math.random()<LP,F.decisionRatio=F.isBlocked?S:b,N(F,s.blue),!0):!1}return I=>{I>=_&&k(I)&&(_=I+RP);const F=x.map(()=>0),U=v.map(()=>0),O=v.map(()=>0);for(const R of E){if(!R.active){R.main.setAttribute("opacity","0"),R.t1.setAttribute("opacity","0"),R.t2.setAttribute("opacity","0");continue}const L=I-R.birthTime;if(L>=m1){R.active=!1,R.main.setAttribute("opacity","0"),R.t1.setAttribute("opacity","0"),R.t2.setAttribute("opacity","0");continue}const V=L/m1,D=Ve(V),$=Math.min(1,V/.03),z=V>.92?Math.max(0,(1-V)/.08):1,T=$*z;if(R.isBlocked&&D>R.decisionRatio){const W=Vl((D-R.decisionRatio)/.08);N(R,$P(s.blue,s.red,W))}const M=R.isBlocked?p:d,G=R.isBlocked?g:h,A=Ae(M,G,D);ye(R.main,A,T),ye(R.t1,Ae(M,G,Math.max(0,D-.012)),T*.45),ye(R.t2,Ae(M,G,Math.max(0,D-.025)),T*.2),x.forEach((W,H)=>{const P=Math.hypot(A.x-W.x,A.y-W.y),B=Math.max(0,1-P/W.r);F[H]=Math.max(F[H],B*B)}),v.forEach((W,H)=>{const P=Math.hypot(A.x-W.cx,A.y-W.cy),B=Math.max(0,1-P/DP);B>U[H]&&(U[H]=B),W.shakeable&&R.isBlocked&&B>O[H]&&(O[H]=B)})}x.forEach((R,L)=>R.el.setAttribute("opacity",(F[L]*s.glowFactor).toFixed(3))),v.forEach((R,L)=>{const V=1+U[L]*U[L]*AP,D=V>R.scale?PP:TP;R.scale+=(V-R.scale)*D;let $=0,z=0;if(R.shakeable&&O[L]>0){const T=O[L]*O[L]*OP;$=Math.sin(I*g1)*T,z=Math.cos(I*g1*.7)*T*.6}R.el.setAttribute("transform",`translate(${R.cx+$},${R.cy+z}) scale(${R.scale.toFixed(4)}) translate(${-R.cx},${-R.cy})`)})}},[n]);const l=c=>i.jsxs("g",{"data-anim":"particle",children:[i.jsxs("g",{"data-anim":"main",opacity:"0",children:[i.jsx("polygon",{points:"0,-6 6.2,-3 0,0 -6.2,-3",fill:s.blue.f1}),i.jsx("polygon",{points:"-6.2,-3 0,0 0,4 -6.2,1",fill:s.blue.f2}),i.jsx("polygon",{points:"0,0 6.2,-3 6.2,1 0,4",fill:s.blue.f3})]}),i.jsxs("g",{"data-anim":"t1",opacity:"0",children:[i.jsx("polygon",{points:"0,-3.5 3.6,-1.7 0,0 -3.6,-1.7",fill:s.blue.f1}),i.jsx("polygon",{points:"-3.6,-1.7 0,0 0,2.3 -3.6,.6",fill:s.blue.f2}),i.jsx("polygon",{points:"0,0 3.6,-1.7 3.6,.6 0,2.3",fill:s.blue.f3})]}),i.jsxs("g",{"data-anim":"t2",opacity:"0",children:[i.jsx("polygon",{points:"0,-2.5 2.6,-1.2 0,0 -2.6,-1.2",fill:s.blue.f1}),i.jsx("polygon",{points:"-2.6,-1.2 0,0 0,1.6 -2.6,.4",fill:s.blue.f2}),i.jsx("polygon",{points:"0,0 2.6,-1.2 2.6,.4 0,1.6",fill:s.blue.f3})]})]},c);return i.jsxs(Wn,{ref:o,maskSrc:sr.blocklists[n?"dark":"light"],alt:t,variant:"blocklists",className:e,children:[i.jsxs("defs",{children:[i.jsx("clipPath",{id:a("pClip"),children:i.jsx("path",{clipRule:"evenodd",d:"M0 0h592v444H0Z M332.24 81.927C371.58 59.259 435.458 59.259 474.798 81.927C514.139 104.596 514.139 141.404 474.798 164.072C435.458 186.74 371.58 186.74 332.24 164.072C292.899 141.404 292.899 104.596 332.24 81.927Z"})}),i.jsxs("linearGradient",{id:a("approvedTopGrad"),x1:"486.408",y1:"330.924",x2:"444.964",y2:"259.141",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:s.approvedTopGrad[0]}),i.jsx("stop",{offset:"1",stopColor:s.approvedTopGrad[1]})]}),i.jsxs("linearGradient",{id:a("blockedSide1Grad"),x1:"197.557",y1:"343.549",x2:"180.083",y2:"323.295",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:v1[0]}),i.jsx("stop",{offset:"1",stopColor:v1[1]})]}),i.jsxs("linearGradient",{id:a("blockedSide1Stroke"),x1:"229.026",y1:"309.15",x2:"149.838",y2:"309.15",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"white",stopOpacity:"0"}),i.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0.4"})]}),i.jsxs("linearGradient",{id:a("blockedSide2Stroke"),x1:"93.5752",y1:"15.9521",x2:"2.13717",y2:"15.9521",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"white",stopOpacity:"0"}),i.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0.4"})]}),i.jsxs("linearGradient",{id:a("blockedTopGrad"),x1:"183.88",y1:"271.407",x2:"147.987",y2:"333.574",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:y1[0]}),i.jsx("stop",{offset:"1",stopColor:y1[1]})]}),i.jsxs("linearGradient",{id:a("blockedTopStroke"),x1:"106.54",y1:"268.197",x2:"147.99",y2:"339.992",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"white",stopOpacity:"0"}),i.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0.4"})]})]}),i.jsx("path",{"data-anim":"pathApproved",d:"M118,97.6 L151.12,84.66 L238.844,34.012 L326.569,84.66 L403.5,123 L488.889,182.203 L576.614,232.851 L488.889,283.499 L445,307",fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathBlocked",d:"M118,97.6 L151.12,84.66 L238.844,34.012 L326.569,84.66 L403.5,123 L330.105,186.645 L189.038,268.09 L148,292",fill:"none",stroke:"none"}),i.jsx("path",{d:"M151.12,84.66 L238.844,34.012 L326.569,84.66",fill:"none",stroke:"#3E4FE0",strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:"0.3",className:"app-scene-pulse-line",style:{animationDuration:"5s"}}),i.jsx("path",{d:"M330.105,186.645 L189.038,268.09",fill:"none",stroke:s.blockedAccent,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:"0.25",className:"app-scene-pulse-line",style:{animationDuration:"4.4s",animationDelay:".6s"}}),i.jsx("path",{d:"M488.889,182.203 L576.614,232.851 L488.889,283.499",fill:"none",stroke:"#3E4FE0",strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:"0.25",className:"app-scene-pulse-line",style:{animationDuration:"4.4s",animationDelay:"1.2s"}}),i.jsxs("g",{"data-anim":"cube_payment",children:[i.jsx("path",{d:"M173.933 97.5898L117.983 129.893V151.428L173.933 119.125V97.5898Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke}),i.jsx("path",{d:"M62.033 97.592L117.983 129.895V151.428L62.033 119.125V97.592Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke}),i.jsx("path",{d:"M117.983 65.2891L62.0326 97.592L117.983 129.895L173.933 97.592Z",fill:s.cubeNeutralFill,stroke:s.cubeNeutralStroke})]}),i.jsxs("g",{"data-anim":"cube_blocked",children:[i.jsx("path",{d:"M230.876 292.129L147.987 339.985V371.889L230.876 324.033V292.129Z",fill:`url(#${a("blockedSide1Grad")})`,stroke:`url(#${a("blockedSide1Stroke")})`}),i.jsx("path",{d:"M65.097 292.132L147.987 339.988V371.892L65.097 324.036V292.132Z",fill:"#EF4444",stroke:`url(#${a("blockedSide2Stroke")})`}),i.jsx("path",{d:"M147.987 244.273L65.098 292.13L147.987 339.986L230.877 292.13Z",fill:`url(#${a("blockedTopGrad")})`,stroke:`url(#${a("blockedTopStroke")})`})]}),i.jsxs("g",{"data-anim":"cube_approved",children:[i.jsx("path",{d:"M527.853 306.996L444.963 354.852V386.756L527.853 338.9V306.996Z",fill:s.cubeApproved[0],stroke:"#3E4FE0"}),i.jsx("path",{d:"M362.073 306.999L444.963 354.855V386.759L362.073 338.903V306.999Z",fill:s.cubeApproved[1],stroke:"#3E4FE0"}),i.jsx("path",{d:"M444.963 259.141L362.074 306.997L444.963 354.853L527.853 306.997Z",fill:`url(#${a("approvedTopGrad")})`,stroke:"#3E4FE0"})]}),i.jsx("circle",{"data-anim":"gl_payment",cx:"118",cy:"108",r:"26",fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"}),i.jsx("circle",{"data-anim":"gl_approved",cx:"445",cy:"323",r:"32",fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"}),i.jsx("circle",{"data-anim":"gl_blocked",cx:"148",cy:"308",r:"32",fill:s.blockedAccent,opacity:"0",className:"app-scene-glow"}),i.jsx("g",{clipPath:`url(#${a("pClip")})`,children:Array.from({length:MP},(c,u)=>l(u))})]})}const Hi={f1:"#3E4FE0",f2:"#2A3AB0",f3:"#5A6BF0"},Us={f1:"#FACC15",f2:"#CA8A04",f3:"#FDE047"},BP=8e3,zP=1200,b1=8,WP=6e3,HP=1e3,w1=4,C1=.5,S1=.08,E1={x:403.5,y:122},GP=55,UP=.15,YP=.18,KP=.04,ZP={pulsePaymentStroke:"#A3A3A3",cubePaymentFill:"black",cubePaymentStroke:"#A3A3A3",cubeUnderreviewFills:["#FDE047","#FEF08A"],underreviewTopGrad:["#E3C72F","#171717"],approvedTopGradStop1:"#39DD75",glApprovedFill:"#16A34A",glowOpacityMultiplier:.18,green:{f1:"#16A34A",f2:"#15803D",f3:"#4ADE80"},pathSecondStep:"M148,291 L191.953,353.294 L285.35,407.216 L378.746,353.294 L445,306",pulseSecondStep:"M191.953,353.294 L285.35,407.216 L378.746,353.294"},qP={pulsePaymentStroke:"#3E4FE0",cubePaymentFill:"white",cubePaymentStroke:"#737373",cubeUnderreviewFills:["#FEF08A","#FEF9C3"],underreviewTopGrad:["#FFFDE8","white"],approvedTopGradStop1:"#36C76E",glApprovedFill:"#22C55E",glowOpacityMultiplier:.12,green:{f1:"#22C55E",f2:"#06A541",f3:"#44ED82"},pathSecondStep:"M148,291 L191.953,353.294 L270.641,398.724 C278.765,403.414 291.935,403.414 300.058,398.724 L378.746,353.294 L445,306",pulseSecondStep:"M191.953,353.294 L270.641,398.724 C278.765,403.414 291.935,403.414 300.058,398.724 L378.746,353.294"},XP="M118,96.6 L151.119,83.66 L238.844,33.012 L326.568,83.66 L403.5,122 L330.106,185.645 L189.038,267.09 L148,291",JP="M118,96.6 L151.119,83.66 L238.844,33.012 L326.568,83.66 L403.5,122 L488.889,181.203 L576.614,231.851 L488.889,282.499 L445,306";function N1(e,t){let n=1/0,r=.5;for(let o=0;o<=200;o++){const s=o/200,a=e.getPointAtLength(s*t),l=Math.hypot(a.x-E1.x,a.y-E1.y);l<n&&(n=l,r=s)}return r}function QP({className:e,alt:t}){const n=zn(),r=C.useId(),o=C.useRef(null),s=n?ZP:qP,a=u=>`${r}-${u}`;ar(o,u=>{const f=M=>u.querySelector(`[data-anim="${M}"]`),d=M=>Array.from(u.querySelectorAll(`[data-anim="${M}"]`)),p=f("pathStandard"),h=f("pathVIP"),g=f("pathSecondStep"),x=p.getTotalLength(),v=h.getTotalLength(),y=g.getTotalLength(),b=[{el:f("gl_payment"),x:118,y:108,r:35,maxI:0},{el:f("gl_underreview"),x:148,y:308,r:40,maxI:0},{el:f("gl_approved"),x:445,y:323,r:40,maxI:0}],S=[{el:f("cube_payment"),cx:117.982,cy:107.4,scale:1,maxProx:0},{el:f("cube_underreview"),cx:147.987,cy:307,scale:1,maxProx:0},{el:f("cube_approved"),cx:444.963,cy:322,scale:1,maxProx:0}],w=N1(p,x),E=N1(h,v);function N(M,G,A,W,H){return{main:M[W],t1:G[W],t2:A[W],active:!1,birthTime:0,isVIP:!1,isSecondStep:H,path:null,pathLen:0,decisionRatio:0}}const _=d("poolMain"),k=d("poolT1"),I=d("poolT2"),F=d("ssMain"),U=d("ssT1"),O=d("ssT2"),R=Array.from({length:b1},(M,G)=>N(_,k,I,G,!1)),L=Array.from({length:w1},(M,G)=>N(F,U,O,G,!0));let V=0;const D=[];function $(M){M.main.setAttribute("opacity","0"),M.t1.setAttribute("opacity","0"),M.t2.setAttribute("opacity","0")}function z(M){const G=R.find(A=>!A.active);return G?(G.active=!0,G.birthTime=M,G.isVIP=Math.random()<.3,G.path=G.isVIP?h:p,G.pathLen=G.isVIP?v:x,G.decisionRatio=G.isVIP?E:w,Be(G.main,Hi),Be(G.t1,Hi),Be(G.t2,Hi),!0):!1}function T(M){const G=L.find(A=>!A.active);return G?(G.active=!0,G.birthTime=M,G.path=g,G.pathLen=y,Be(G.main,Us),Be(G.t1,Us),Be(G.t2,Us),!0):!1}return M=>{M>=V&&z(M)&&(V=M+zP);for(let A=D.length-1;A>=0;A--)M>=D[A]&&T(M)&&D.splice(A,1);b.forEach(A=>A.maxI=0),S.forEach(A=>A.maxProx=0);function G(A,W){if(!A.active||!A.path){$(A);return}const H=M-A.birthTime;if(H>=W){!A.isSecondStep&&!A.isVIP&&D.push(M+HP),A.active=!1,$(A);return}const P=H/W,B=Ve(P),Y=Math.min(1,P/.03),Z=P>.92?Math.max(0,(1-P)/.08):1,q=Y*Z;if(A.isSecondStep){if(B>C1){const ne=to(Us,s.green,Vl((B-C1)/S1));Be(A.main,ne),Be(A.t1,ne),Be(A.t2,ne)}}else if(B>A.decisionRatio){const ne=Vl((B-A.decisionRatio)/S1),le=to(Hi,A.isVIP?s.green:Us,ne);Be(A.main,le),Be(A.t1,le),Be(A.t2,le)}const oe=Ae(A.path,A.pathLen,B);ye(A.main,oe,q),ye(A.t1,Ae(A.path,A.pathLen,Math.max(0,B-.012)),q*.45),ye(A.t2,Ae(A.path,A.pathLen,Math.max(0,B-.025)),q*.2),b.forEach(ne=>{const le=Math.hypot(oe.x-ne.x,oe.y-ne.y),Ee=Math.max(0,1-le/ne.r);ne.maxI=Math.max(ne.maxI,Ee*Ee)}),S.forEach(ne=>{const le=Math.hypot(oe.x-ne.cx,oe.y-ne.cy),Ee=Math.max(0,1-le/GP);Ee>ne.maxProx&&(ne.maxProx=Ee)})}R.forEach(A=>G(A,BP)),L.forEach(A=>G(A,WP)),b.forEach(A=>{A.el.setAttribute("opacity",(A.maxI*s.glowOpacityMultiplier).toFixed(3))}),S.forEach(A=>{const W=1+A.maxProx*A.maxProx*UP,H=W>A.scale?YP:KP;A.scale+=(W-A.scale)*H,A.el.setAttribute("transform",`translate(${A.cx},${A.cy}) scale(${A.scale.toFixed(4)}) translate(${-A.cx},${-A.cy})`)})}},[n]);const l=u=>({main:["0,-6 6.2,-3 0,0 -6.2,-3","-6.2,-3 0,0 0,4 -6.2,1","0,0 6.2,-3 6.2,1 0,4"],t1:["0,-3.5 3.6,-1.7 0,0 -3.6,-1.7","-3.6,-1.7 0,0 0,2.3 -3.6,.6","0,0 3.6,-1.7 3.6,.6 0,2.3"],t2:["0,-2.5 2.6,-1.2 0,0 -2.6,-1.2","-2.6,-1.2 0,0 0,1.6 -2.6,.4","0,0 2.6,-1.2 2.6,.4 0,1.6"]})[u],c=(u,f)=>i.jsxs(i.Fragment,{children:[i.jsx("g",{"data-anim":`${u}Main`,opacity:"0",children:l("main").map((d,p)=>i.jsx("polygon",{points:d,fill:"#3E4FE0"},p))},`${f}-main`),i.jsx("g",{"data-anim":`${u}T1`,opacity:"0",children:l("t1").map((d,p)=>i.jsx("polygon",{points:d,fill:"#3E4FE0"},p))},`${f}-t1`),i.jsx("g",{"data-anim":`${u}T2`,opacity:"0",children:l("t2").map((d,p)=>i.jsx("polygon",{points:d,fill:"#3E4FE0"},p))},`${f}-t2`)]});return i.jsxs(Wn,{ref:o,maskSrc:sr.allowlists[n?"dark":"light"],alt:t,variant:"allowlists",className:e,children:[i.jsxs("defs",{children:[i.jsx("clipPath",{id:a("pClip"),children:i.jsx("path",{clipRule:"evenodd",d:"M0 0h592v444H0Z M332.24 80.927C371.58 58.259 435.458 58.259 474.798 80.927C514.139 103.596 514.139 140.404 474.798 163.072C435.458 185.74 371.58 185.74 332.24 163.072C292.899 140.404 292.899 103.596 332.24 80.927Z"})}),i.jsxs("linearGradient",{id:a("paint0"),x1:"494.533",y1:"357.416",x2:"477.059",y2:"337.162",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"#22C55E"}),i.jsx("stop",{offset:"1",stopColor:"#06A541"})]}),i.jsxs("linearGradient",{id:a("paint1"),x1:"526.002",y1:"323.017",x2:"446.814",y2:"323.017",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"white",stopOpacity:"0"}),i.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0.4"})]}),i.jsxs("linearGradient",{id:a("paint2"),x1:"93.5752",y1:"15.9521",x2:"2.13717",y2:"15.9521",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"white",stopOpacity:"0"}),i.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0.4"})]}),i.jsxs("linearGradient",{id:a("paint3"),x1:"480.855",y1:"285.274",x2:"444.963",y2:"347.441",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"#22C55E"}),i.jsx("stop",{offset:"1",stopColor:s.approvedTopGradStop1})]}),i.jsxs("linearGradient",{id:a("paint4"),x1:"403.515",y1:"282.064",x2:"444.966",y2:"353.859",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:"white",stopOpacity:"0"}),i.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0.4"})]}),i.jsxs("linearGradient",{id:a("paint5"),x1:"189.431",y1:"315.057",x2:"147.987",y2:"243.274",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{stopColor:s.underreviewTopGrad[0]}),i.jsx("stop",{offset:"1",stopColor:s.underreviewTopGrad[1]})]})]}),i.jsx("path",{"data-anim":"pathStandard",d:XP,fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathVIP",d:JP,fill:"none",stroke:"none"}),i.jsx("path",{"data-anim":"pathSecondStep",d:s.pathSecondStep,fill:"none",stroke:"none"}),i.jsx("path",{d:"M151.119,83.66 L238.844,33.012 L326.568,83.66",fill:"none",stroke:s.pulsePaymentStroke,strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:"0.3",className:"app-scene-pulse-line",style:{animationDuration:"5s"}}),i.jsx("path",{d:"M330.106,185.645 L189.038,267.09",fill:"none",stroke:"#FACC15",strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:"0.25",className:"app-scene-pulse-line",style:{animationDuration:"4.4s",animationDelay:".6s"}}),i.jsx("path",{d:"M488.889,181.203 L576.614,231.851 L488.889,282.499",fill:"none",stroke:"#22C55E",strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:"0.25",className:"app-scene-pulse-line",style:{animationDuration:"4.4s",animationDelay:"1.2s"}}),i.jsx("path",{d:s.pulseSecondStep,fill:"none",stroke:"#FACC15",strokeWidth:"2.8",strokeDasharray:"6 36",strokeLinecap:"round",opacity:"0.2",className:"app-scene-pulse-line",style:{animationDuration:"5.6s",animationDelay:"1.8s"}}),i.jsxs("g",{"data-anim":"cube_payment",children:[i.jsx("path",{d:"M173.933 96.59L117.982 128.893V150.428L173.933 118.125V96.59Z",fill:s.cubePaymentFill,stroke:s.cubePaymentStroke}),i.jsx("path",{d:"M62.031 96.592L117.982 128.895V150.43L62.031 118.127V96.592Z",fill:s.cubePaymentFill,stroke:s.cubePaymentStroke}),i.jsx("path",{d:"M117.982 64.289L62.032 96.592L117.982 128.895L173.933 96.592Z",fill:s.cubePaymentFill,stroke:s.cubePaymentStroke})]}),i.jsxs("g",{"data-anim":"cube_underreview",children:[i.jsx("path",{d:"M230.876 291.129L147.987 338.985V370.889L230.876 323.033V291.129Z",fill:s.cubeUnderreviewFills[0],stroke:"#FACC15"}),i.jsx("path",{d:"M65.097 291.132L147.987 338.988V370.892L65.097 323.036V291.132Z",fill:s.cubeUnderreviewFills[1],stroke:"#FACC15"}),i.jsx("path",{d:"M147.987 243.273L65.098 291.13L147.987 338.986L230.876 291.13Z",fill:`url(#${a("paint5")})`,stroke:"#FACC15"})]}),i.jsxs("g",{"data-anim":"cube_approved",children:[i.jsx("path",{d:"M527.853 305.996L444.963 353.852V385.756L527.853 337.9V305.996Z",fill:`url(#${a("paint0")})`,stroke:`url(#${a("paint1")})`}),i.jsx("path",{d:"M362.073 305.999L444.963 353.855V385.759L362.073 337.903V305.999Z",fill:"#22C55E",stroke:`url(#${a("paint2")})`}),i.jsx("path",{d:"M444.963 258.141L362.074 305.997L444.963 353.853L527.852 305.997Z",fill:`url(#${a("paint3")})`,stroke:`url(#${a("paint4")})`})]}),i.jsx("circle",{"data-anim":"gl_payment",cx:"118",cy:"108",r:"26",fill:"#3E4FE0",opacity:"0",className:"app-scene-glow"}),i.jsx("circle",{"data-anim":"gl_underreview",cx:"148",cy:"308",r:"32",fill:"#FACC15",opacity:"0",className:"app-scene-glow"}),i.jsx("circle",{"data-anim":"gl_approved",cx:"445",cy:"323",r:"32",fill:s.glApprovedFill,opacity:"0",className:"app-scene-glow"}),i.jsxs("g",{clipPath:`url(#${a("pClip")})`,children:[Array.from({length:b1},(u,f)=>i.jsx("g",{children:c("pool",`pool-${f}`)},f)),Array.from({length:w1},(u,f)=>i.jsx("g",{children:c("ss",`ss-${f}`)},f))]})]})}const eT={payments:vA,chargebacks:PA,installments:zA,paymentLinks:JA,recipients:cP,subscriptions:yP,rules:kP,blocklists:VP,allowlists:QP};function p3({variant:e,className:t,alt:n}){const r=eT[e];return i.jsx(r,{className:j("w-full max-w-[592px] h-auto select-none",t),alt:n})}const h3=C.forwardRef(({variant:e,tagline:t,title:n,description:r,cta:o,onDismiss:s,dismissLabel:a,illustration:l,className:c},u)=>{const f=()=>{o.onClick(),s?.()};return i.jsxs("div",{ref:u,"data-variant":e,className:j("app-animated-empty","flex flex-col md:flex-row items-center gap-8","bg-card rounded-lg p-8 md:p-12","animate-fade-in duration-500",c),children:[i.jsx("div",{className:"hidden md:block app-animated-empty-illustration bg-muted rounded-lg overflow-hidden flex-shrink-0",children:l??i.jsx(p3,{variant:e})}),i.jsxs("div",{className:"flex flex-col gap-4 items-start w-full",children:[t&&i.jsx("p",{className:"text-muted-foreground uppercase tracking-wide text-xs font-semibold",children:t}),i.jsx("h3",{className:"text-2xl font-semibold leading-tight",children:n}),i.jsx("p",{className:"text-muted-foreground text-sm",children:r}),i.jsxs("div",{className:"flex gap-3 items-center mt-2",children:[i.jsx(ot,{variant:"default",size:"default",onClick:f,disabled:o.disabled,children:o.label}),s&&a&&i.jsx(ot,{variant:"ghost",size:"default",onClick:s,children:a})]})]})]})});h3.displayName="AnimatedEmpty";const m3=C.forwardRef(({logo:e,fallbackLogo:t,name:n,subtitle:r,badge:o,status:s,actionLabel:a,onAction:l,footer:c,className:u},f)=>{const[d,p]=C.useState(!1),[h,g]=C.useState(!1),[x,v]=C.useState(!1),y=()=>e&&typeof e!="string"?e:!h&&typeof e=="string"?i.jsx("img",{src:e,alt:n,loading:"lazy",className:"w-10 h-10 shrink-0 rounded-md",onError:()=>g(!0)}):!x&&t?i.jsx("img",{src:t,alt:n,loading:"lazy",className:"w-10 h-10 shrink-0 rounded-md",onError:()=>v(!0)}):i.jsx("div",{className:"w-10 h-10 shrink-0 rounded-md bg-muted flex items-center justify-center",children:i.jsx("span",{className:"text-sm font-semibold text-muted-foreground",children:n?.charAt(0)?.toUpperCase()||"?"})});return i.jsxs(Ss,{ref:f,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),className:j("flex flex-col bg-card transition-all overflow-hidden",d?"border-primary shadow-lg":"",u),children:[i.jsxs(Sc,{className:"flex flex-col gap-4",children:[i.jsx("div",{className:"flex items-start gap-6",children:y()}),i.jsxs("div",{className:"flex flex-col gap-1.5",children:[i.jsx("span",{className:"text-base font-semibold leading-none text-card-foreground tracking-tight",children:n}),r&&i.jsx("span",{className:"text-sm text-muted-foreground",children:r})]})]}),c!==void 0?c:i.jsxs(Ec,{className:"justify-between border-t border-border px-6 py-4",children:[s??o,l&&a&&i.jsx(ot,{size:"sm",onClick:l,className:d?"":"opacity-50",children:a})]})]})});m3.displayName="ProviderCard";function tT(e){const t=e.split(",").map(o=>o.trim().replace(/^\./,"").toUpperCase()).filter(Boolean);if(t.length===0)return"";if(t.length===1)return`Supports: ${t[0]} format`;const n=t[t.length-1];return`Supports: ${t.slice(0,-1).join(", ")} or ${n} format`}function nT(e){if(e>=1024*1024*1024){const n=e/1073741824;return`${Number.isInteger(n)?n:n.toFixed(1)} GB max file size.`}if(e>=1024*1024){const n=e/1048576;return`${Number.isInteger(n)?n:n.toFixed(1)} MB max file size.`}const t=e/1024;return`${Number.isInteger(t)?t:t.toFixed(1)} KB max file size.`}const rT={pdf:"FilePdf",doc:"FileDoc",docx:"FileDoc",txt:"FileTxt",csv:"FileCsv",xls:"FileXls",xlsx:"FileXls",zip:"FileZip",rar:"FileArchive","7z":"FileArchive",png:"FilePng",jpg:"FileJpg",jpeg:"FileJpg",ppt:"FilePpt",pptx:"FilePpt"};function oT(e){const t=e.split(".").pop()?.toLowerCase()||"";return rT[t]||"File"}function sT(e){return e.status?e.status:e.progress!==void 0&&e.progress<100?"uploading":"uploaded"}function aT({isDragActive:e,disabled:t,acceptText:n,maxSizeText:r,dropzoneText:o,image:s,onClick:a,onDragEnter:l,onDragOver:c,onDragLeave:u,onDrop:f}){return i.jsxs("button",{type:"button",disabled:t,onClick:a,onDragEnter:l,onDragOver:c,onDragLeave:u,onDrop:f,"aria-label":"File upload dropzone",className:j("flex w-full flex-col items-center justify-center gap-2 rounded-lg border bg-muted/40 px-6 py-6 transition-colors cursor-pointer","border-border hover:border-primary/50",e&&"border-primary bg-primary/5",t&&"opacity-50 cursor-not-allowed pointer-events-none"),children:[s?i.jsx("img",{src:s,alt:"",width:100,height:82,className:"object-contain","aria-hidden":"true"}):i.jsx(X,{name:"UploadSimple",size:"xl",className:"text-muted-foreground"}),i.jsxs("p",{className:"text-sm text-center text-foreground font-semibold",children:[i.jsx("span",{className:"text-primary cursor-pointer",children:"Select"})," ",o]}),(n||r)&&i.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[n&&i.jsx("p",{className:"text-xs text-muted-foreground",children:n}),r&&i.jsx("p",{className:"text-xs text-muted-foreground",children:r})]})]})}function iT({file:e,onRemove:t,disabled:n}){const r=sT(e),o=oT(e.name);return i.jsxs("div",{className:j("flex items-center gap-3 rounded-lg border px-3 py-2.5",r==="error"&&"border-destructive/50 bg-destructive/5"),children:[i.jsx(X,{name:o,size:"lg",className:j("shrink-0 text-muted-foreground",r==="error"&&"text-destructive")}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("p",{className:"text-sm font-medium truncate",children:e.name}),r==="uploading"&&i.jsx("div",{className:"flex items-center gap-2 mt-1",children:i.jsx(Tp,{value:e.progress??0,className:"h-1.5 flex-1"})}),r==="uploaded"&&i.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Uploaded"}),r==="error"&&i.jsx("p",{className:"text-xs text-destructive mt-0.5",children:e.errorMessage||"Upload failed"})]}),i.jsx("button",{type:"button",onClick:()=>t?.(e.id),disabled:n,className:"shrink-0 flex items-center justify-center cursor-pointer text-muted-foreground","aria-label":`Remove ${e.name}`,children:i.jsx(X,{name:"X",size:"sm"})})]})}const g3=C.forwardRef(({value:e=[],onFilesAdded:t,onRemove:n,accept:r,maxSize:o,maxFiles:s,multiple:a=!0,label:l,info:c,requiredIndicator:u,required:f,disabled:d,error:p,className:h,dropzoneText:g="a file or drag it here",image:x="https://dashboard-assets.y.uno/batch-refunds/upload_media.png"},v)=>{const y=C.useRef(null),b=C.useRef(0),[S,w]=C.useState(!1),E=C.useCallback(D=>{y.current=D,typeof v=="function"?v(D):v&&(v.current=D)},[v]),N=r?tT(r):"",_=o?nT(o):"",k=C.useCallback(D=>{let $=D;if(r){const z=r.split(",").map(T=>T.trim().toLowerCase());$=$.filter(T=>{const M="."+(T.name.split(".").pop()?.toLowerCase()||""),G=T.type.toLowerCase();return z.some(A=>A.startsWith(".")?M===A:G===A)})}if(o&&($=$.filter(z=>z.size<=o)),s){const z=s-(e?.length||0);$=$.slice(0,Math.max(0,z))}a||($=$.slice(0,1)),$.length>0&&t?.($)},[r,o,s,a,e,t]),I=C.useCallback(()=>{d||y.current?.click()},[d]),F=C.useCallback(D=>{const $=Array.from(D.target.files||[]);k($),D.target.value=""},[k]),U=C.useCallback(D=>{D.preventDefault(),D.stopPropagation(),b.current++,!d&&D.dataTransfer.items&&D.dataTransfer.items.length>0&&w(!0)},[d]),O=C.useCallback(D=>{D.preventDefault(),D.stopPropagation()},[]),R=C.useCallback(D=>{D.preventDefault(),D.stopPropagation(),b.current--,b.current===0&&w(!1)},[]),L=C.useCallback(D=>{if(D.preventDefault(),D.stopPropagation(),w(!1),b.current=0,d)return;const $=Array.from(D.dataTransfer.files);k($)},[d,k]),V=!!p;return i.jsxs("div",{className:j("flex flex-col gap-2 w-full",h),children:[(l||c||u)&&i.jsx(Wt,{info:c,requiredIndicator:u,required:f,disabled:d,children:l}),i.jsx("input",{ref:E,type:"file",className:"sr-only",accept:r,multiple:a,disabled:d,onChange:F,tabIndex:-1,"aria-hidden":"true"}),i.jsx(aT,{isDragActive:S,disabled:d,acceptText:N,maxSizeText:_,dropzoneText:g,image:x,onClick:I,onDragEnter:U,onDragOver:O,onDragLeave:R,onDrop:L}),e.length>0&&i.jsx("div",{className:"flex flex-col gap-2",children:e.map(D=>i.jsx(iT,{file:D,onRemove:n,disabled:d},D.id))}),V&&i.jsx(Dr,{children:p})]})});g3.displayName="FileUpload";const lT={completed:"font-bold text-foreground",active:"font-bold text-foreground",error:"font-bold text-destructive"},cT=(e,t,n)=>e.status==="error"?"inactive":t<(n??0)?"completed":t===n?"active":"inactive";function uT(e,t,n){return e.status==="error"?"error":t<n?"completed":t===n?"active":"inactive"}const dT=({index:e,state:t})=>{const n=j("flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-xs font-bold",(t==="completed"||t==="active")&&"bg-primary text-primary-foreground",t==="inactive"&&"bg-border text-muted-foreground",t==="error"&&"bg-destructive text-destructive-foreground"),r=()=>t==="completed"?i.jsx(X,{name:"Check",size:"xs",className:"text-primary-foreground"}):t==="error"?i.jsx(X,{name:"X",size:"xs",className:"text-destructive-foreground"}):i.jsx("span",{children:e+1});return i.jsx("div",{className:n,children:r()})},fT=({state:e,orientation:t})=>{const n=e==="completed"||e==="active";return t==="vertical"?i.jsx("div",{className:j("w-0.5 h-6 ml-3 my-1",n?"bg-primary":"bg-border")}):i.jsx("div",{className:j("mx-2 h-0.5 flex-1 rounded-sm",n?"bg-primary":"bg-border")})},x3=C.forwardRef(({activeStep:e,steps:t,orientation:n="horizontal",onStepClick:r,className:o,...s},a)=>{const l=n==="vertical";return i.jsx("div",{ref:a,className:j(l?"flex flex-col w-full":"flex w-full items-center",o),...s,children:t.map((c,u)=>{const f=uT(c,u,e),d=cT(c,u,e),p=j("text-xs",lT[f]??"font-normal text-muted-foreground"),h=r!=null&&f!=="active";return i.jsxs(C.Fragment,{children:[i.jsxs("div",{className:j("flex flex-row gap-2",l?"items-start":"items-center",h&&"cursor-pointer hover:opacity-80"),"aria-current":f==="active"?"step":void 0,...h?{role:"button",tabIndex:0,onClick:()=>r(u),onKeyDown:g=>g.key==="Enter"&&r(u)}:{},children:[i.jsx(dT,{index:u,state:f}),i.jsxs("div",{className:"flex flex-col",children:[i.jsx("span",{className:p,children:c.label}),c.description&&i.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:c.description})]})]}),u<t.length-1&&i.jsx(fT,{state:d,orientation:n})]},c.key)})})});x3.displayName="Stepper";function zc(e){const t=m.useRef({value:e,previous:e});return m.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Wc="Checkbox",[pT]=St(Wc),[hT,Gp]=pT(Wc);function mT(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:a,name:l,onCheckedChange:c,required:u,value:f="on",internal_do_not_use_render:d}=e,[p,h]=mt({prop:n,defaultProp:o??!1,onChange:c,caller:Wc}),[g,x]=m.useState(null),[v,y]=m.useState(null),b=m.useRef(!1),S=g?!!a||!!g.closest("form"):!0,w={checked:p,disabled:s,setChecked:h,control:g,setControl:x,name:l,form:a,value:f,hasConsumerStoppedPropagationRef:b,required:u,defaultChecked:wr(o)?!1:o,isFormControl:S,bubbleInput:v,setBubbleInput:y};return i.jsx(hT,{scope:t,...w,children:gT(d)?d(w):r})}var v3="CheckboxTrigger",y3=m.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:a,disabled:l,checked:c,required:u,setControl:f,setChecked:d,hasConsumerStoppedPropagationRef:p,isFormControl:h,bubbleInput:g}=Gp(v3,e),x=Se(o,f),v=m.useRef(c);return m.useEffect(()=>{const y=s?.form;if(y){const b=()=>d(v.current);return y.addEventListener("reset",b),()=>y.removeEventListener("reset",b)}},[s,d]),i.jsx(ue.button,{type:"button",role:"checkbox","aria-checked":wr(c)?"mixed":c,"aria-required":u,"data-state":N3(c),"data-disabled":l?"":void 0,disabled:l,value:a,...r,ref:x,onKeyDown:te(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:te(n,y=>{d(b=>wr(b)?!0:!b),g&&h&&(p.current=y.isPropagationStopped(),p.current||y.stopPropagation())})})});y3.displayName=v3;var b3=m.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:a,disabled:l,value:c,onCheckedChange:u,form:f,...d}=e;return i.jsx(mT,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:l,required:a,onCheckedChange:u,name:r,form:f,value:c,internal_do_not_use_render:({isFormControl:p})=>i.jsxs(i.Fragment,{children:[i.jsx(y3,{...d,ref:t,__scopeCheckbox:n}),p&&i.jsx(E3,{__scopeCheckbox:n})]})})});b3.displayName=Wc;var w3="CheckboxIndicator",C3=m.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=Gp(w3,n);return i.jsx(Pt,{present:r||wr(s.checked)||s.checked===!0,children:i.jsx(ue.span,{"data-state":N3(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});C3.displayName=w3;var S3="CheckboxBubbleInput",E3=m.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:a,required:l,disabled:c,name:u,value:f,form:d,bubbleInput:p,setBubbleInput:h}=Gp(S3,e),g=Se(n,h),x=zc(s),v=pc(r);m.useEffect(()=>{const b=p;if(!b)return;const S=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(S,"checked").set,N=!o.current;if(x!==s&&E){const _=new Event("click",{bubbles:N});b.indeterminate=wr(s),E.call(b,wr(s)?!1:s),b.dispatchEvent(_)}},[p,x,s,o]);const y=m.useRef(wr(s)?!1:s);return i.jsx(ue.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??y.current,required:l,disabled:c,name:u,value:f,form:d,...t,tabIndex:-1,ref:g,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});E3.displayName=S3;function gT(e){return typeof e=="function"}function wr(e){return e==="indeterminate"}function N3(e){return wr(e)?"indeterminate":e?"checked":"unchecked"}function _3({className:e,...t}){return i.jsx(b3,{"data-slot":"checkbox",className:j("peer bg-background border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-sm border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:i.jsx(C3,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:i.jsx(X,{name:t.checked==="indeterminate"?"Minus":"Check",className:"size-3.5"})})})}const Oa=C.forwardRef(({label:e,description:t,id:n,name:r,disabled:o,onChange:s,className:a,labelClassName:l,info:c,...u},f)=>{const d=C.useId(),p=n||r||d,h=x=>{if(!s)return;s({target:{name:r||p,checked:x,type:"checkbox",value:x?"on":"off"},currentTarget:{name:r||p,checked:x,type:"checkbox",value:x?"on":"off"},preventDefault:()=>{},stopPropagation:()=>{}})},g=i.jsx(_3,{ref:f,id:p,name:r,disabled:o,onCheckedChange:h,...u,className:j("cursor-pointer",a)});return e?i.jsxs("div",{className:"flex items-start gap-2",children:[g,i.jsxs("div",{className:"flex flex-col gap-1.5",children:[i.jsx(Wt,{htmlFor:p,info:c,className:j("text-sm leading-none cursor-pointer",o&&"text-muted-foreground",l),children:e}),t&&i.jsx("p",{className:j("text-sm text-muted-foreground",o&&"opacity-50"),children:t})]})]}):g});Oa.displayName="Checkbox";var Hc="Switch",[xT]=St(Hc),[vT,yT]=xT(Hc),j3=m.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:s,required:a,disabled:l,value:c="on",onCheckedChange:u,form:f,...d}=e,[p,h]=m.useState(null),g=Se(t,S=>h(S)),x=m.useRef(!1),v=p?f||!!p.closest("form"):!0,[y,b]=mt({prop:o,defaultProp:s??!1,onChange:u,caller:Hc});return i.jsxs(vT,{scope:n,checked:y,disabled:l,children:[i.jsx(ue.button,{type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":D3(y),"data-disabled":l?"":void 0,disabled:l,value:c,...d,ref:g,onClick:te(e.onClick,S=>{b(w=>!w),v&&(x.current=S.isPropagationStopped(),x.current||S.stopPropagation())})}),v&&i.jsx(M3,{control:p,bubbles:!x.current,name:r,value:c,checked:y,required:a,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});j3.displayName=Hc;var k3="SwitchThumb",R3=m.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=yT(k3,n);return i.jsx(ue.span,{"data-state":D3(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});R3.displayName=k3;var bT="SwitchBubbleInput",M3=m.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const a=m.useRef(null),l=Se(a,s),c=zc(n),u=pc(t);return m.useEffect(()=>{const f=a.current;if(!f)return;const d=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(d,"checked").set;if(c!==n&&h){const g=new Event("click",{bubbles:r});h.call(f,n),f.dispatchEvent(g)}},[c,n,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:l,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});M3.displayName=bT;function D3(e){return e?"checked":"unchecked"}var wT=j3,CT=R3;function ST({className:e,...t}){return i.jsx(wT,{"data-slot":"switch",className:j("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:i.jsx(CT,{"data-slot":"switch-thumb",className:j("bg-input dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:ltr:translate-x-[calc(100%-2px)] data-[state=checked]:rtl:-translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}const Up=C.forwardRef(({label:e,description:t,side:n="left",variant:r="default",id:o,name:s,onChange:a,className:l,switchClassName:c,info:u,labelClassName:f,...d},p)=>{const h=C.useId(),g=o||s||h,x=b=>{if(!a)return;a({target:{name:s||g,checked:b,type:"checkbox",value:b?"on":"off"},currentTarget:{name:s||g,checked:b,type:"checkbox",value:b?"on":"off"},preventDefault:()=>{},stopPropagation:()=>{}})},v=i.jsx(ST,{ref:p,id:g,name:s,className:j("cursor-pointer",c),onCheckedChange:x,...d}),y=j("flex gap-2 items-start",{"flex-row-reverse":n==="right","bg-input box-border justify-start p-4 rounded-lg border shadow-xs":r==="box"},l);return i.jsxs("div",{className:y,children:[v,i.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[i.jsx("div",{className:"flex items-center gap-2",children:i.jsx(Wt,{htmlFor:g,info:u,className:j("text-sm leading-[18.39px] cursor-pointer",f),children:e})}),t&&i.jsx("p",{className:"text-sm text-muted-foreground",children:t})]})]})});Up.displayName="Switch";const Yp=m.forwardRef(({className:e,...t},n)=>i.jsx("textarea",{ref:n,"data-slot":"textarea",className:j("font-normal placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex min-h-[80px] w-full min-w-0 rounded-md border bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","resize-none",e),...t}));Yp.displayName="Textarea";const ET=Ge("flex gap-2 w-full",{variants:{layout:{vertical:"flex-col",horizontal:"flex-row items-start gap-4"}},defaultVariants:{layout:"vertical"}}),NT=Ge("text-sm",{variants:{layout:{vertical:"",horizontal:"mt-2"}},defaultVariants:{layout:"vertical"}}),A3=C.forwardRef(({className:e,layout:t,label:n,description:r,error:o,id:s,disabled:a,textareaProps:l,...c},u)=>{const f=C.useId(),d=s||l?.id||f,p=!!o;return i.jsxs("div",{className:j(ET({layout:t}),e),children:[n&&i.jsx(Wt,{htmlFor:d,className:j(NT({layout:t})),children:n}),i.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[i.jsx(Yp,{ref:u,disabled:a,className:j(p&&"border-destructive focus-visible:border-destructive",l?.className),"aria-invalid":p,"aria-describedby":r||o?`${d}-description`:void 0,...c,...l,id:d}),(r||o)&&i.jsx("p",{id:`${d}-description`,className:j("text-sm",o?"text-destructive":"text-muted-foreground"),children:o||r})]})]})});A3.displayName="Textarea";var _T=Object.defineProperty,jT=Object.defineProperties,kT=Object.getOwnPropertyDescriptors,Bl=Object.getOwnPropertySymbols,P3=Object.prototype.hasOwnProperty,T3=Object.prototype.propertyIsEnumerable,_1=(e,t,n)=>t in e?_T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,RT=(e,t)=>{for(var n in t||(t={}))P3.call(t,n)&&_1(e,n,t[n]);if(Bl)for(var n of Bl(t))T3.call(t,n)&&_1(e,n,t[n]);return e},MT=(e,t)=>jT(e,kT(t)),DT=(e,t)=>{var n={};for(var r in e)P3.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Bl)for(var r of Bl(e))t.indexOf(r)<0&&T3.call(e,r)&&(n[r]=e[r]);return n};function AT(e){let t=setTimeout(e,0),n=setTimeout(e,10),r=setTimeout(e,50);return[t,n,r]}function PT(e){let t=m.useRef();return m.useEffect(()=>{t.current=e}),t.current}var TT=18,O3=40,OT=`${O3}px`,LT=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function IT({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[o,s]=m.useState(!1),[a,l]=m.useState(!1),[c,u]=m.useState(!1),f=m.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&o&&a,[o,a,n]),d=m.useCallback(()=>{let p=e.current,h=t.current;if(!p||!h||c||n==="none")return;let g=p,x=g.getBoundingClientRect().left+g.offsetWidth,v=g.getBoundingClientRect().top+g.offsetHeight/2,y=x-TT,b=v;document.querySelectorAll(LT).length===0&&document.elementFromPoint(y,b)===p||(s(!0),u(!0))},[e,t,c,n]);return m.useEffect(()=>{let p=e.current;if(!p||n==="none")return;function h(){let x=window.innerWidth-p.getBoundingClientRect().right;l(x>=O3)}h();let g=setInterval(h,1e3);return()=>{clearInterval(g)}},[e,n]),m.useEffect(()=>{let p=r||document.activeElement===t.current;if(n==="none"||!p)return;let h=setTimeout(d,0),g=setTimeout(d,2e3),x=setTimeout(d,5e3),v=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(h),clearTimeout(g),clearTimeout(x),clearTimeout(v)}},[t,r,n,d]),{hasPWMBadge:o,willPushPWMBadge:f,PWM_BADGE_SPACE_WIDTH:OT}}var L3=m.createContext({}),I3=m.forwardRef((e,t)=>{var n=e,{value:r,onChange:o,maxLength:s,textAlign:a="left",pattern:l,placeholder:c,inputMode:u="numeric",onComplete:f,pushPasswordManagerStrategy:d="increase-width",pasteTransformer:p,containerClassName:h,noScriptCSSFallback:g=FT,render:x,children:v}=n,y=DT(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),b,S,w,E,N;let[_,k]=m.useState(typeof y.defaultValue=="string"?y.defaultValue:""),I=r??_,F=PT(I),U=m.useCallback(re=>{o?.(re),k(re)},[o]),O=m.useMemo(()=>l?typeof l=="string"?new RegExp(l):l:null,[l]),R=m.useRef(null),L=m.useRef(null),V=m.useRef({value:I,onChange:U,isIOS:typeof window<"u"&&((S=(b=window?.CSS)==null?void 0:b.supports)==null?void 0:S.call(b,"-webkit-touch-callout","none"))}),D=m.useRef({prev:[(w=R.current)==null?void 0:w.selectionStart,(E=R.current)==null?void 0:E.selectionEnd,(N=R.current)==null?void 0:N.selectionDirection]});m.useImperativeHandle(t,()=>R.current,[]),m.useEffect(()=>{let re=R.current,ce=L.current;if(!re||!ce)return;V.current.value!==re.value&&V.current.onChange(re.value),D.current.prev=[re.selectionStart,re.selectionEnd,re.selectionDirection];function K(){if(document.activeElement!==re){A(null),H(null);return}let J=re.selectionStart,be=re.selectionEnd,ge=re.selectionDirection,fe=re.maxLength,Te=re.value,Pe=D.current.prev,We=-1,nt=-1,dt;if(Te.length!==0&&J!==null&&be!==null){let je=J===be,Me=J===Te.length&&Te.length<fe;if(je&&!Me){let Ue=J;if(Ue===0)We=0,nt=1,dt="forward";else if(Ue===fe)We=Ue-1,nt=Ue,dt="backward";else if(fe>1&&Te.length>1){let Lt=0;if(Pe[0]!==null&&Pe[1]!==null){dt=Ue<Pe[1]?"backward":"forward";let Gt=Pe[0]===Pe[1]&&Pe[0]<fe;dt==="backward"&&!Gt&&(Lt=-1)}We=Lt+Ue,nt=Lt+Ue+1}}We!==-1&&nt!==-1&&We!==nt&&R.current.setSelectionRange(We,nt,dt)}let fn=We!==-1?We:J,Ot=nt!==-1?nt:be,Nt=dt??ge;A(fn),H(Ot),D.current.prev=[fn,Ot,Nt]}if(document.addEventListener("selectionchange",K,{capture:!0}),K(),document.activeElement===re&&M(!0),!document.getElementById("input-otp-style")){let J=document.createElement("style");if(J.id="input-otp-style",document.head.appendChild(J),J.sheet){let be="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Ys(J.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Ys(J.sheet,`[data-input-otp]:autofill { ${be} }`),Ys(J.sheet,`[data-input-otp]:-webkit-autofill { ${be} }`),Ys(J.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Ys(J.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let Q=()=>{ce&&ce.style.setProperty("--root-height",`${re.clientHeight}px`)};Q();let ae=new ResizeObserver(Q);return ae.observe(re),()=>{document.removeEventListener("selectionchange",K,{capture:!0}),ae.disconnect()}},[]);let[$,z]=m.useState(!1),[T,M]=m.useState(!1),[G,A]=m.useState(null),[W,H]=m.useState(null);m.useEffect(()=>{AT(()=>{var re,ce,K,Q;(re=R.current)==null||re.dispatchEvent(new Event("input"));let ae=(ce=R.current)==null?void 0:ce.selectionStart,J=(K=R.current)==null?void 0:K.selectionEnd,be=(Q=R.current)==null?void 0:Q.selectionDirection;ae!==null&&J!==null&&(A(ae),H(J),D.current.prev=[ae,J,be])})},[I,T]),m.useEffect(()=>{F!==void 0&&I!==F&&F.length<s&&I.length===s&&f?.(I)},[s,f,F,I]);let P=IT({containerRef:L,inputRef:R,pushPasswordManagerStrategy:d,isFocused:T}),B=m.useCallback(re=>{let ce=re.currentTarget.value.slice(0,s);if(ce.length>0&&O&&!O.test(ce)){re.preventDefault();return}typeof F=="string"&&ce.length<F.length&&document.dispatchEvent(new Event("selectionchange")),U(ce)},[s,U,F,O]),Y=m.useCallback(()=>{var re;if(R.current){let ce=Math.min(R.current.value.length,s-1),K=R.current.value.length;(re=R.current)==null||re.setSelectionRange(ce,K),A(ce),H(K)}M(!0)},[s]),Z=m.useCallback(re=>{var ce,K;let Q=R.current;if(!p&&(!V.current.isIOS||!re.clipboardData||!Q))return;let ae=re.clipboardData.getData("text/plain"),J=p?p(ae):ae;re.preventDefault();let be=(ce=R.current)==null?void 0:ce.selectionStart,ge=(K=R.current)==null?void 0:K.selectionEnd,fe=(be!==ge?I.slice(0,be)+J+I.slice(ge):I.slice(0,be)+J+I.slice(be)).slice(0,s);if(fe.length>0&&O&&!O.test(fe))return;Q.value=fe,U(fe);let Te=Math.min(fe.length,s-1),Pe=fe.length;Q.setSelectionRange(Te,Pe),A(Te),H(Pe)},[s,U,O,I]),q=m.useMemo(()=>({position:"relative",cursor:y.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[y.disabled]),oe=m.useMemo(()=>({position:"absolute",inset:0,width:P.willPushPWMBadge?`calc(100% + ${P.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:P.willPushPWMBadge?`inset(0 ${P.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:a,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[P.PWM_BADGE_SPACE_WIDTH,P.willPushPWMBadge,a]),ne=m.useMemo(()=>m.createElement("input",MT(RT({autoComplete:y.autoComplete||"one-time-code"},y),{"data-input-otp":!0,"data-input-otp-placeholder-shown":I.length===0||void 0,"data-input-otp-mss":G,"data-input-otp-mse":W,inputMode:u,pattern:O?.source,"aria-placeholder":c,style:oe,maxLength:s,value:I,ref:R,onPaste:re=>{var ce;Z(re),(ce=y.onPaste)==null||ce.call(y,re)},onChange:B,onMouseOver:re=>{var ce;z(!0),(ce=y.onMouseOver)==null||ce.call(y,re)},onMouseLeave:re=>{var ce;z(!1),(ce=y.onMouseLeave)==null||ce.call(y,re)},onFocus:re=>{var ce;Y(),(ce=y.onFocus)==null||ce.call(y,re)},onBlur:re=>{var ce;M(!1),(ce=y.onBlur)==null||ce.call(y,re)}})),[B,Y,Z,u,oe,s,W,G,y,O?.source,I]),le=m.useMemo(()=>({slots:Array.from({length:s}).map((re,ce)=>{var K;let Q=T&&G!==null&&W!==null&&(G===W&&ce===G||ce>=G&&ce<W),ae=I[ce]!==void 0?I[ce]:null,J=I[0]!==void 0?null:(K=c?.[ce])!=null?K:null;return{char:ae,placeholderChar:J,isActive:Q,hasFakeCaret:Q&&ae===null}}),isFocused:T,isHovering:!y.disabled&&$}),[T,$,s,W,G,y.disabled,I]),Ee=m.useMemo(()=>x?x(le):m.createElement(L3.Provider,{value:le},v),[v,le,x]);return m.createElement(m.Fragment,null,g!==null&&m.createElement("noscript",null,m.createElement("style",null,g)),m.createElement("div",{ref:L,"data-input-otp-container":!0,style:q,className:h},Ee,m.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},ne)))});I3.displayName="Input";function Ys(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var FT=`
|
|
60
60
|
[data-input-otp] {
|
|
61
61
|
--nojs-bg: white !important;
|
|
62
62
|
--nojs-fg: black !important;
|
|
@@ -75,21 +75,21 @@ Defaulting to \`null\`.`}var Iy=Ty,tM=Oy;const Fy=g.forwardRef(({className:e,val
|
|
|
75
75
|
--nojs-bg: black !important;
|
|
76
76
|
--nojs-fg: white !important;
|
|
77
77
|
}
|
|
78
|
-
}`;function LP({className:e,containerClassName:t,...n}){return i.jsx(L3,{"data-slot":"input-otp",containerClassName:j("flex items-center gap-2 has-disabled:opacity-50",t),className:j("disabled:cursor-not-allowed",e),...n})}function IP({className:e,...t}){return i.jsx("div",{"data-slot":"input-otp-group",className:j("flex items-center",e),...t})}function FP({index:e,className:t,...n}){const r=g.useContext(O3),{char:o,hasFakeCaret:s,isActive:a}=r?.slots[e]??{};return i.jsxs("div",{"data-slot":"input-otp-slot","data-active":a,className:j("data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",t),...n,children:[o,s&&i.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:i.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}const I3=C.forwardRef(({maxLength:e=6,className:t,containerClassName:n,label:r,error:o,id:s,...a},l)=>{const c=C.useId(),u=s||c,f=!!o;return i.jsxs(xo,{orientation:"vertical","data-invalid":f,className:j(t),children:[r&&i.jsx(Ns,{htmlFor:u,children:r}),i.jsx(LP,{ref:l,maxLength:e,containerClassName:j(n),"aria-invalid":f?!0:void 0,"aria-describedby":o?`${u}-description`:void 0,...a,children:Array.from({length:e}).map((d,p)=>i.jsx(g.Fragment,{children:i.jsx(IP,{children:i.jsx(FP,{index:p,"aria-invalid":f?!0:void 0})})},p))}),o&&i.jsx(Dr,{id:`${u}-description`,className:"text-left",children:o})]})});I3.displayName="OTPField";const $P=/[\u00AD\u061C\u180E\u200B\u200E\u200F\u202A-\u202E\u2060-\u2064\u2066-\u2069\uFEFF]/g,VP=/[\u00A0\u202F]/g,Gc=e=>typeof e!="string"?e:e.replace($P,"").replace(VP," "),ut=e=>typeof e!="string"?e:Gc(e).trim(),Kp=C.forwardRef(({value:e=[],onChange:t,label:n,description:r,error:o,placeholder:s="Type and press Enter...",disabled:a=!1,id:l,name:c,triggerKeys:u=["Enter","Tab","Comma","Space"],addOnBlur:f=!0,allowDuplicates:d=!1,maxItems:p,validate:h,badgeVariant:m="outline",orientation:x="vertical",className:v,deleteAll:y,"aria-label":b,"aria-labelledby":S},w)=>{const E=C.useId(),N=l||E,_=!!o,[k,I]=C.useState(""),[F,U]=C.useState(!1),[O,R]=C.useState(""),L=H=>{const T=ut(H);if(T!==""){if(p&&e.length>=p){R(`Maximum ${p} items allowed`);return}if(!d&&e.includes(T)){R("Duplicate values are not allowed");return}if(h){const B=h(T);if(B!==!0){R(typeof B=="string"?B:"Invalid value");return}}R(""),t([...e,T]),I("")}},V=H=>{t(e.filter(T=>T!==H)),R("")},D=H=>{const T=H.currentTarget.value;H.key==="Enter"&&u.includes("Enter")?(H.preventDefault(),L(T)):H.key==="Tab"&&u.includes("Tab")?T.trim()!==""&&(H.preventDefault(),L(T)):(H.key===","||H.key===",")&&u.includes("Comma")||H.key===" "&&u.includes("Space")?(H.preventDefault(),L(T)):H.key==="Backspace"&&T===""&&e.length>0&&t(e.slice(0,-1))},$=H=>{I(H.target.value),R("")},z=()=>{U(!0)},P=()=>{U(!1),f&&k.trim()!==""&&L(k)},M=H=>{const T=Gc(H.clipboardData?.getData("text")??""),B=[];if(u.includes("Comma")&&B.push(","),u.includes("Space")&&B.push(" "),B.length===0)return;const Y=new RegExp(`[${B.join("")}]+`);if(!Y.test(T))return;H.preventDefault();const q=T.split(Y).map(le=>ut(le)).filter(le=>le!=="");if(q.length===0)return;const oe=[];let ne=[...e];for(const le of q){if(p&&ne.length>=p){R(`Maximum ${p} items allowed`);break}!d&&ne.includes(le)||h&&h(le)!==!0||(oe.push(le),ne=[...ne,le])}oe.length>0&&(R(""),t([...e,...oe]),I(""))},G=(H,T)=>{H.preventDefault(),H.stopPropagation(),V(T)},A=()=>{a||!y?.onClick||y.onClick()},W=o||O;return i.jsxs(xo,{orientation:x,"data-invalid":_,className:j("w-full",v),children:[n&&i.jsx(Ns,{htmlFor:N,children:n}),i.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[i.jsxs("div",{className:j("font-normal file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex min-h-9 w-full min-w-0 rounded-md border bg-input px-3 py-1.5 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 text-sm","flex-wrap gap-1.5 items-center",F&&"border-ring ring-ring/50 ring-[3px]",(_||O)&&"border-destructive ring-destructive/20 dark:ring-destructive/40",a&&"opacity-50 cursor-not-allowed"),onClick:()=>{a||document.getElementById(N)?.focus()},children:[(()=>{const H=y&&!a&&e.length>=y.length;return i.jsxs(i.Fragment,{children:[H&&i.jsx("div",{onClick:T=>{T.preventDefault(),T.stopPropagation(),A()},children:i.jsx(Ze,{variant:"secondary",className:"gap-1 cursor-pointer flex items-center",children:y.label||"Delete all"})}),e.map((T,B)=>i.jsxs(Ze,{variant:m,children:[T,i.jsx("button",{type:"button","aria-label":`Remove ${T}`,disabled:a,onClick:Y=>G(Y,T),children:i.jsx(X,{name:"X",className:"h-3 w-3"})})]},`${T}-${B}`))]})})(),i.jsx("input",{ref:w,id:N,name:c,type:"text",value:k,onChange:$,onKeyDown:D,onFocus:z,onBlur:P,onPaste:M,placeholder:e.length===0?s:"",disabled:a,className:j("flex-1 min-w-[120px] outline-none bg-transparent border-none shadow-none p-0 h-6","placeholder:text-muted-foreground","disabled:cursor-not-allowed"),"aria-label":b,"aria-labelledby":S,"aria-invalid":_||!!O,"aria-describedby":r||W?`${N}-description`:void 0})]}),r&&!W&&i.jsx(_s,{id:`${N}-description`,children:r}),W&&i.jsx(Dr,{id:`${N}-description`,children:W})]})]})});Kp.displayName="MultiValuesField";var Zp="Radio",[BP,F3]=St(Zp),[zP,WP]=BP(Zp),$3=g.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:s,disabled:a,value:l="on",onCheck:c,form:u,...f}=e,[d,p]=g.useState(null),h=Se(t,v=>p(v)),m=g.useRef(!1),x=d?u||!!d.closest("form"):!0;return i.jsxs(zP,{scope:n,checked:o,disabled:a,children:[i.jsx(ue.button,{type:"button",role:"radio","aria-checked":o,"data-state":W3(o),"data-disabled":a?"":void 0,disabled:a,value:l,...f,ref:h,onClick:te(e.onClick,v=>{o||c?.(),x&&(m.current=v.isPropagationStopped(),m.current||v.stopPropagation())})}),x&&i.jsx(z3,{control:d,bubbles:!m.current,name:r,value:l,checked:o,required:s,disabled:a,form:u,style:{transform:"translateX(-100%)"}})]})});$3.displayName=Zp;var V3="RadioIndicator",B3=g.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,s=WP(V3,n);return i.jsx(Tt,{present:r||s.checked,children:i.jsx(ue.span,{"data-state":W3(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});B3.displayName=V3;var HP="RadioBubbleInput",z3=g.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const a=g.useRef(null),l=Se(a,s),c=zc(n),u=pc(t);return g.useEffect(()=>{const f=a.current;if(!f)return;const d=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(d,"checked").set;if(c!==n&&h){const m=new Event("click",{bubbles:r});h.call(f,n),f.dispatchEvent(m)}},[c,n,r]),i.jsx(ue.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:l,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});z3.displayName=HP;function W3(e){return e?"checked":"unchecked"}var GP=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Uc="RadioGroup",[UP]=St(Uc,[js,F3]),H3=js(),G3=F3(),[YP,KP]=UP(Uc),U3=g.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:s,required:a=!1,disabled:l=!1,orientation:c,dir:u,loop:f=!0,onValueChange:d,...p}=e,h=H3(n),m=Cs(u),[x,v]=gt({prop:s,defaultProp:o??null,onChange:d,caller:Uc});return i.jsx(YP,{scope:n,name:r,required:a,disabled:l,value:x,onValueChange:v,children:i.jsx(vp,{asChild:!0,...h,orientation:c,dir:m,loop:f,children:i.jsx(ue.div,{role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":l?"":void 0,dir:m,...p,ref:t})})})});U3.displayName=Uc;var Y3="RadioGroupItem",K3=g.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,s=KP(Y3,n),a=s.disabled||r,l=H3(n),c=G3(n),u=g.useRef(null),f=Se(t,u),d=s.value===o.value,p=g.useRef(!1);return g.useEffect(()=>{const h=x=>{GP.includes(x.key)&&(p.current=!0)},m=()=>p.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",m)}},[]),i.jsx(yp,{asChild:!0,...l,focusable:!a,active:d,children:i.jsx($3,{disabled:a,required:s.required,checked:d,...c,...o,name:s.name,ref:f,onCheck:()=>s.onValueChange(o.value),onKeyDown:te(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:te(o.onFocus,()=>{p.current&&u.current?.click()})})})});K3.displayName=Y3;var ZP="RadioGroupIndicator",Z3=g.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=G3(n);return i.jsx(B3,{...o,...r,ref:t})});Z3.displayName=ZP;var qP=U3,XP=K3,JP=Z3;function Yc({className:e,...t}){return i.jsx(qP,{"data-slot":"radio-group",className:j("grid gap-4",e),...t})}function Kc({className:e,...t}){return i.jsx(XP,{"data-slot":"radio-group-item",className:j("border-border text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:i.jsx(JP,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:i.jsx("span",{className:"size-2 rounded-full bg-primary"})})})}const q3=({option:e,radioId:t,isInlineLayout:n=!1})=>i.jsxs("div",{className:n?"flex items-center gap-3":"flex items-start gap-3",children:[i.jsx(Kc,{value:e.value,id:t,disabled:e.disabled,className:"cursor-pointer mt-0.5"}),n?i.jsxs(i.Fragment,{children:[i.jsx(Wt,{htmlFor:t,className:j("cursor-pointer",e.disabled&&"text-muted-foreground"),children:e.label}),e.description&&i.jsx("p",{className:"text-sm text-muted-foreground ms-auto",children:e.description})]}):i.jsxs("div",{className:"flex flex-col gap-1.5 flex-1",children:[i.jsx(Wt,{htmlFor:t,className:j("cursor-pointer",e.disabled&&"text-muted-foreground"),children:e.label}),e.description&&i.jsx("p",{className:"text-sm text-muted-foreground",children:e.description})]})]}),X3=C.forwardRef(({options:e,name:t,label:n,orientation:r="vertical",layout:o="stacked",onChange:s,"aria-labelledby":a,...l},c)=>{const u=o==="inline",f=r==="horizontal",d=`${C.useId()}-label`,p=a??(n!=null?d:void 0),h=i.jsx(Yc,{ref:c,className:f?"flex flex-row flex-wrap gap-6":"flex flex-col gap-3",onValueChange:s,"aria-labelledby":p,...l,children:e.map(m=>{const x=`${t}-${m.value}`;return i.jsx(q3,{option:m,radioId:x,isInlineLayout:u},m.value)})});return n==null?h:i.jsxs("div",{className:"flex flex-col gap-3",children:[i.jsx("span",{id:d,className:"text-sm font-medium text-foreground",children:n}),h]})});X3.displayName="RadioGroup";const J3=g.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:j("flex min-w-0 w-full rounded-md border border-input bg-background overflow-hidden","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]","has-[[data-slot=input-group-control][aria-invalid='true']]:border-destructive has-[[data-slot=input-group-control][aria-invalid='true']]:ring-destructive/20 dark:has-[[data-slot=input-group-control][aria-invalid='true']]:ring-destructive/40",e),...t}));J3.displayName="InputGroup";const $d=g.forwardRef(({className:e,align:t="inline-start",...n},r)=>i.jsx("div",{ref:r,className:j("flex items-center gap-1.5 h-9 shrink-0",t==="inline-start"&&"order-first ps-3",t==="inline-end"&&"order-last pe-3",t==="block-start"&&"order-first flex-col w-full pb-1.5 px-0 h-auto",t==="block-end"&&"order-last flex-col w-full pt-1.5 px-0 h-auto",e),...n}));$d.displayName="InputGroupAddon";const Q3=g.forwardRef(({className:e,...t},n)=>i.jsx(fi,{ref:n,"data-slot":"input-group-control",className:j("flex-1 min-w-0 border-0 shadow-none rounded-none bg-transparent","focus-visible:ring-0 focus-visible:border-0","aria-invalid:border-0 aria-invalid:ring-0",e),...t}));Q3.displayName="InputGroupInput";const QP=g.forwardRef(({className:e,...t},n)=>i.jsx(Yp,{ref:n,"data-slot":"input-group-control",className:j("flex-1 min-w-0 border-0 shadow-none rounded-none bg-transparent","focus-visible:ring-0 focus-visible:border-0",e),...t}));QP.displayName="InputGroupTextarea";const eO=g.forwardRef(({className:e,...t},n)=>i.jsx("span",{ref:n,className:j("text-sm text-muted-foreground whitespace-nowrap",e),...t}));eO.displayName="InputGroupText";const tO=Ge("shrink-0",{variants:{size:{xs:"h-7 px-2 text-xs",sm:"h-8 px-3 text-sm","icon-xs":"size-7","icon-sm":"size-8"}},defaultVariants:{size:"sm"}}),nO=g.forwardRef(({className:e,size:t,...n},r)=>i.jsx(wt,{ref:r,className:j(tO({size:t}),e),...n}));nO.displayName="InputGroupButton";const ds=C.forwardRef(({className:e,orientation:t="vertical",label:n,description:r,error:o,info:s,requiredIndicator:a,required:l,id:c,button:u,disabled:f,startIcon:d,startIconProps:p,endIcon:h,endIconProps:m,inputProps:x,...v},y)=>{const b=C.useId(),S=c||x?.id||b,w=!!o;return i.jsxs(xo,{orientation:t,"data-invalid":w,className:j("w-full",e),children:[(n||s||a)&&i.jsx(Wt,{htmlFor:S,info:s,requiredIndicator:a,required:l,disabled:f,children:n}),i.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[i.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsxs(J3,{className:"flex-1",children:[d&&i.jsx($d,{align:"inline-start",children:i.jsx(X,{name:p?.name||d,size:"sm",...p,className:j("cursor-default text-muted-foreground",p?.className)})}),i.jsx(Q3,{ref:y,disabled:f,required:l,className:j(w&&"border-destructive focus-visible:border-destructive",x?.className),"aria-invalid":w?!0:void 0,"aria-describedby":r||o?`${S}-description`:void 0,...v,...x,id:S}),h&&i.jsx($d,{align:"inline-end",children:i.jsx(X,{name:m?.name||h,size:"sm",...m,className:j("cursor-default text-muted-foreground",m?.className)})})]}),u&&i.jsx(ot,{disabled:f,...u})]}),r&&!o&&i.jsx(_s,{id:`${S}-description`,children:r}),o&&i.jsx(Dr,{id:`${S}-description`,children:o})]})]})});ds.displayName="Field";const eb=g.forwardRef(({className:e,value:t,...n},r)=>i.jsx(fi,{ref:r,type:"time",step:"1",value:t,className:j("h-9",e),...n}));eb.displayName="TimePicker";const rO=Array.from({length:12},(e,t)=>t+1),oO=Array.from({length:24},(e,t)=>t),sO=["AM","PM"],aO=e=>{if(e===0)return Array.from({length:60},(n,r)=>r);const t=60/e;return Array.from({length:t},(n,r)=>r*e)},fr=e=>e.toString().padStart(2,"0"),iO=e=>{const t=e>=12?"PM":"AM",n=e>12?e-12:e;return{hour:e===0?12:n,meridiem:t}},lO=(e,t)=>e===12?t==="AM"?0:12:t==="PM"?e+12:e,zl=g.forwardRef(({className:e,label:t,error:n,description:r,orientation:o="vertical",id:s,onChange:a,mode:l="native",divisorMinutes:c=0,width:u=140,value:f,disabled:d,use24Hour:p=!1,...h},m)=>{const x=C.useId(),v=s||x,y=!!n;if(l==="native"){const b=i.jsx(eb,{ref:m,id:v,value:f,disabled:d,className:j(y&&"border-destructive focus-visible:border-destructive",!(t||n||r)&&e),"aria-invalid":y?!0:void 0,"aria-describedby":r||n?`${v}-description`:void 0,...h,onChange:S=>{a?.(S.target.value)}});return t||n||r?i.jsxs(xo,{orientation:o,"data-invalid":y,className:j("w-full",e),children:[t&&i.jsx(Ns,{htmlFor:v,children:t}),i.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[b,r&&!n&&i.jsx(_s,{id:`${v}-description`,children:r}),n&&i.jsx(Dr,{id:`${v}-description`,children:n})]})]}):b}return i.jsx(cO,{value:f||(p?"00:00":"12:00"),onChange:a,divisorMinutes:c,width:u,label:t,error:n,description:r,disabled:d,className:e,use24Hour:p})});zl.displayName="TimePicker";const cO=({value:e,onChange:t,divisorMinutes:n,width:r,label:o,error:s,description:a,disabled:l,className:c,use24Hour:u=!1})=>{const[f,d]=C.useState(!1),p=C.useRef(null),h=C.useRef(null),m=$=>{const[z,P]=$.split(":"),M=parseInt(z,10)||0,G=parseInt(P,10)||0;if(u)return{hour24:M,minute:G,hour:M,meridiem:"AM"};const{hour:A,meridiem:W}=iO(M);return{hour24:M,minute:G,hour:A,meridiem:W}},{hour:x,hour24:v,minute:y,meridiem:b}=m(e),[S,w]=C.useState(u?v:x),[E,N]=C.useState(y),[_,k]=C.useState(b),I=aO(n),F=($,z,P)=>{let M;u?M=$:M=lO($,P);const G=`${fr(M)}:${fr(z)}`;t?.(G)},U=$=>{w($),F($,E,_)},O=$=>{N($),F(S,$,_)},R=$=>{k($),F(S,E,$)};C.useEffect(()=>{const $=z=>{h.current&&!h.current.contains(z.target)&&d(!1)};if(f)return document.addEventListener("mousedown",$),()=>document.removeEventListener("mousedown",$)},[f]);const L=u?`${fr(S)}:${fr(E)}`:`${fr(S)}:${fr(E)} ${_}`,V=u?oO:rO,D=i.jsxs("div",{ref:h,className:j("relative inline-block",c),style:{width:typeof r=="number"?`${r}px`:r},children:[i.jsxs("button",{type:"button",disabled:l,onClick:()=>!l&&d(!f),className:j("flex items-center justify-between w-full h-9 px-3 py-2","text-sm rounded-md border border-input bg-input","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50",s&&"border-destructive"),children:[i.jsx("span",{children:L}),i.jsx(X,{name:f?"CaretUp":"CaretDown",size:"sm",className:"ml-2"})]}),f&&i.jsxs("div",{ref:p,className:j("absolute z-popover mt-1 bg-popover border border-border rounded-md shadow-lg","flex divide-x divide-border"),style:{width:"fit-content",minWidth:u?"140px":"200px"},children:[i.jsx("div",{className:"flex flex-col overflow-y-auto max-h-[200px] min-w-[60px]",children:V.map($=>i.jsx("button",{type:"button",onClick:()=>U($),className:j("px-3 py-2 text-sm text-left hover:bg-accent",S===$&&"bg-primary text-primary-foreground hover:bg-primary"),children:fr($)},$))}),i.jsx("div",{className:"flex flex-col overflow-y-auto max-h-[200px] min-w-[60px]",children:I.map($=>i.jsx("button",{type:"button",onClick:()=>O($),className:j("px-3 py-2 text-sm text-left hover:bg-accent",E===$&&"bg-primary text-primary-foreground hover:bg-primary"),children:fr($)},$))}),!u&&i.jsx("div",{className:"flex flex-col min-w-[60px]",children:sO.map($=>i.jsx("button",{type:"button",onClick:()=>R($),className:j("px-3 py-2 text-sm text-left hover:bg-accent",_===$&&"bg-primary text-primary-foreground hover:bg-primary"),children:$},$))})]})]});return o||s||a?i.jsxs(xo,{orientation:"vertical",className:j("w-full",c),children:[o&&i.jsx(Ns,{children:o}),i.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[D,a&&!s&&i.jsx(_s,{children:a}),s&&i.jsx(Dr,{children:s})]})]}):D},uO=Ge("flex gap-2 w-full",{variants:{layout:{vertical:"flex-col",horizontal:"flex-row items-start gap-4"}},defaultVariants:{layout:"vertical"}}),dO=Ge("text-sm",{variants:{layout:{vertical:"",horizontal:"mt-2"}},defaultVariants:{layout:"vertical"}}),Zc=C.forwardRef(({placeholder:e="Search",onSearch:t,limitSearch:n=10,persistKey:r="",value:o="",searchOnChange:s=!0,enableHistory:a=!0,label:l,description:c,error:u,id:f,disabled:d,layout:p="vertical",className:h,inputProps:m,actionName:x,...v},y)=>{const b=C.useId(),S=f||m?.id||b,w=!!u,[E,N]=C.useState(ut(o)),[_,k]=C.useState(()=>{if(!r)return[];try{const T=JSON.parse(localStorage.getItem(`${r}_searchfield`)??"null");if(!Array.isArray(T))return[];const B=new Set;return T.reduce((Y,Z)=>{const q=ut(Z?.value??"");return!q||B.has(q)||(B.add(q),Y.push({...Z,label:q,value:q})),Y},[])}catch{return[]}}),[I,F]=C.useState([]),[U,O]=C.useState(!1),[R,L]=C.useState(!1),V=C.useRef(null),D=C.useRef(null),$=T=>{const B=T.target.value;N(B),(B===""||s)&&t(ut(B))},z=T=>{const B=T.currentTarget,Y=T.clipboardData.getData("text"),Z=B.selectionStart??E.length,q=B.selectionEnd??E.length,oe=E.slice(0,Z)+Y+E.slice(q),ne=ut(oe);ne!==oe&&(T.preventDefault(),N(ne),(ne===""||s)&&t(ne))},P=T=>{T.key==="Enter"&&E!==""&&M()},M=()=>{const T=ut(E);if(T){if(T!==E&&N(T),a){const B={label:T,value:T},Y=_.filter(q=>q.value!==T),Z=_.length<n?[B,...Y]:[B,...Y.slice(0,n-1)];k(Z),r&&localStorage.setItem(`${r}_searchfield`,JSON.stringify(Z))}t(T)}},G=()=>{N(""),t(""),V.current?.focus()},A=T=>{const B=ut(T);N(B),t(B),O(!1),V.current?.focus()},W=()=>{O(!0)},H=()=>{R||O(!1)};return C.useEffect(()=>{const T=ut(o);N(T),T!==o&&t(T)},[o]),C.useEffect(()=>{const T=_.map(B=>({...B,isSelected:B.value===E})).filter(B=>E===""?!0:B.label.toLowerCase().includes(E.toLowerCase()));F(T)},[E,_]),i.jsxs("div",{"data-action-name":x,className:j(uO({layout:p}),h),children:[l&&i.jsx(Wt,{htmlFor:S,className:j(dO({layout:p})),children:l}),i.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[i.jsxs("div",{className:"relative",children:[i.jsxs("div",{className:"relative flex",children:[i.jsx(fi,{ref:T=>{typeof y=="function"?y(T):y&&(y.current=T),T&&(V.current=T)},type:"text",value:E,onChange:$,onPaste:z,onKeyDown:P,onFocus:W,onBlur:H,placeholder:e,disabled:d,autoComplete:"off","aria-invalid":w,"aria-describedby":c||u?`${S}-description`:void 0,...v,...m,id:S,className:j(w&&"border-destructive focus-visible:border-destructive","!px-9",m?.className)}),i.jsx("button",{type:"button","aria-label":"Search",onClick:M,disabled:d,className:j("absolute start-3 top-1/2 -translate-y-1/2 inline-flex items-center text-muted-foreground dark:text-foreground",!d&&"cursor-pointer hover:text-foreground transition-colors"),children:i.jsx(X,{name:"MagnifyingGlass",size:"sm"})}),E&&i.jsx("button",{type:"button","aria-label":"Clear search",onClick:G,disabled:d,className:j("absolute end-3 top-1/2 -translate-y-1/2 inline-flex items-center text-muted-foreground",!d&&"cursor-pointer hover:text-foreground transition-colors"),children:i.jsx(X,{name:"XCircle",size:"sm",weight:"fill"})})]}),a&&I.length>0&&U&&i.jsx("div",{ref:D,onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),className:j("absolute z-popover w-full mt-1 rounded-md border bg-popover text-popover-foreground shadow-md","max-h-[300px] overflow-y-auto"),children:i.jsx("div",{className:"py-1",children:I.map((T,B)=>i.jsx("button",{type:"button",onClick:()=>A(T.value),className:j("w-full text-left px-4 py-2 text-sm hover:bg-accent hover:text-accent-foreground transition-colors cursor-pointer",T.isSelected&&"bg-accent text-accent-foreground"),children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(X,{name:"ClockCounterClockwise",size:"sm",className:"text-muted-foreground"}),i.jsx("span",{className:"truncate",children:T.label})]})},`${T.value}-${B}`))})})]}),(c||u)&&i.jsx("p",{id:`${S}-description`,className:j("text-sm",u?"text-destructive":"text-muted-foreground"),children:u||c})]})]})});Zc.displayName="SearchField";const fO=({allowed:e,children:t,message:n="You don't have permission to perform this action"})=>e?i.jsx(i.Fragment,{children:t}):i.jsx(zt,{content:n,show:!e,children:i.jsx("span",{className:"block w-full",children:t})}),tb=({options:e,icon:t=null,ariaLabel:n="more",className:r,disabled:o=!1,marginBottom:s})=>{const[a,l]=g.useState(!1),c=d=>{l(d)},u=d=>{d.allowed&&d.handleClick&&d.handleClick(e),l(!1)};if(!e.actions||e.actions.length===0)return null;const f={};return s!==void 0&&(f.marginBottom=`${s}px`),i.jsx("div",{className:j("inline-flex relative",r),style:f,children:i.jsxs(Lc,{open:a,onOpenChange:c,children:[i.jsx(Ic,{asChild:!0,disabled:o,children:i.jsx(ot,{disabled:o,variant:"ghost",size:"icon",className:"h-8 w-8 p-1","aria-label":n,"aria-controls":a?"dots-menu":void 0,"aria-expanded":a,"aria-haspopup":"true",children:i.jsx(X,{name:t||"DotsThreeOutline",weight:t?"light":"fill",size:"sm",className:j("transition-colors",a?"text-primary":"text-muted-foreground")})})}),i.jsx(Fc,{id:"dots-menu",align:"end",className:j("max-h-[216px] overflow-y-auto"),children:e.actions.map(d=>i.jsx(fO,{allowed:d.allowed??!0,message:d.message,children:i.jsxs(xn,{onClick:()=>u(d),disabled:!d.allowed,"data-action-name":d.dataActionName,className:j("flex items-center gap-3.5 cursor-pointer",d.variant==="destructive"&&"text-destructive focus:text-destructive"),children:[i.jsx(X,{name:d.icon,size:"sm",className:"shrink-0"}),i.jsx("span",{className:j(d.variant==="success"&&"text-success"),children:d.name||String(d.key)})]})},d.key))})]})})};tb.displayName="DotsMenu";const nb=C.forwardRef(({defaultVisible:e=!1,label:t,forgotPasswordLinkProps:n,...r},o)=>{const[s,a]=C.useState(e),l=()=>{a(c=>!c)};return n&&t?i.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(Wt,{className:"text-sm",children:t}),i.jsx(Mp,{className:j("text-muted-foreground",n?.className),...n,children:n.children||"Forgot password?"})]}),i.jsx(ds,{ref:o,type:s?"text":"password",endIcon:s?"EyeClosed":"Eye",endIconProps:{onClick:l,className:"cursor-pointer",tooltip:s?"Hide password":"Show password"},...r})]}):i.jsx(ds,{ref:o,label:t,type:s?"text":"password",endIcon:s?"EyeClosed":"Eye",endIconProps:{onClick:l,className:"cursor-pointer",tooltip:s?"Hide password":"Show password"},...r})});nb.displayName="PasswordField";function j1(e,[t,n]){return Math.min(n,Math.max(t,e))}function pO(e){const t=hO(e),n=g.forwardRef((r,o)=>{const{children:s,...a}=r,l=g.Children.toArray(s),c=l.find(mO);if(c){const u=c.props.children,f=l.map(d=>d===c?g.Children.count(u)>1?g.Children.only(null):g.isValidElement(u)?u.props.children:null:d);return i.jsx(t,{...a,ref:o,children:g.isValidElement(u)?g.cloneElement(u,void 0,f):null})}return i.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function hO(e){const t=g.forwardRef((n,r)=>{const{children:o,...s}=n;if(g.isValidElement(o)){const a=vO(o),l=xO(s,o.props);return o.type!==g.Fragment&&(l.ref=r?At(r,a):a),g.cloneElement(o,l)}return g.Children.count(o)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var gO=Symbol("radix.slottable");function mO(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===gO}function xO(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...l)=>{const c=s(...l);return o(...l),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function vO(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var yO=[" ","Enter","ArrowUp","ArrowDown"],bO=[" ","Enter"],ao="Select",[qc,Xc,wO]=vc(ao),[Rs]=St(ao,[wO,Rr]),Jc=Rr(),[CO,Pr]=Rs(ao),[SO,EO]=Rs(ao),rb=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:a,defaultValue:l,onValueChange:c,dir:u,name:f,autoComplete:d,disabled:p,required:h,form:m}=e,x=Jc(t),[v,y]=g.useState(null),[b,S]=g.useState(null),[w,E]=g.useState(!1),N=Cs(u),[_,k]=gt({prop:r,defaultProp:o??!1,onChange:s,caller:ao}),[I,F]=gt({prop:a,defaultProp:l,onChange:c,caller:ao}),U=g.useRef(null),O=v?m||!!v.closest("form"):!0,[R,L]=g.useState(new Set),V=Array.from(R).map(D=>D.props.value).join(";");return i.jsx(Xa,{...x,children:i.jsxs(CO,{required:h,scope:t,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:S,valueNodeHasChildren:w,onValueNodeHasChildrenChange:E,contentId:tt(),value:I,onValueChange:F,open:_,onOpenChange:k,dir:N,triggerPointerDownPosRef:U,disabled:p,children:[i.jsx(qc.Provider,{scope:t,children:i.jsx(SO,{scope:e.__scopeSelect,onNativeOptionAdd:g.useCallback(D=>{L($=>new Set($).add(D))},[]),onNativeOptionRemove:g.useCallback(D=>{L($=>{const z=new Set($);return z.delete(D),z})},[]),children:n})}),O?i.jsxs(kb,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:d,value:I,onChange:D=>F(D.target.value),disabled:p,form:m,children:[I===void 0?i.jsx("option",{value:""}):null,Array.from(R)]},V):null]})})};rb.displayName=ao;var ob="SelectTrigger",sb=g.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=Jc(n),a=Pr(ob,n),l=a.disabled||r,c=Se(t,a.onTriggerChange),u=Xc(n),f=g.useRef("touch"),[d,p,h]=Mb(x=>{const v=u().filter(S=>!S.disabled),y=v.find(S=>S.value===a.value),b=Db(v,x,y);b!==void 0&&a.onValueChange(b.value)}),m=x=>{l||(a.onOpenChange(!0),h()),x&&(a.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)})};return i.jsx(Ja,{asChild:!0,...s,children:i.jsx(ue.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Rb(a.value)?"":void 0,...o,ref:c,onClick:te(o.onClick,x=>{x.currentTarget.focus(),f.current!=="mouse"&&m(x)}),onPointerDown:te(o.onPointerDown,x=>{f.current=x.pointerType;const v=x.target;v.hasPointerCapture(x.pointerId)&&v.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&x.pointerType==="mouse"&&(m(x),x.preventDefault())}),onKeyDown:te(o.onKeyDown,x=>{const v=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&p(x.key),!(v&&x.key===" ")&&yO.includes(x.key)&&(m(),x.preventDefault())})})})});sb.displayName=ob;var ab="SelectValue",ib=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:a="",...l}=e,c=Pr(ab,n),{onValueNodeHasChildrenChange:u}=c,f=s!==void 0,d=Se(t,c.onValueNodeChange);return at(()=>{u(f)},[u,f]),i.jsx(ue.span,{...l,ref:d,style:{pointerEvents:"none"},children:Rb(c.value)?i.jsx(i.Fragment,{children:a}):s})});ib.displayName=ab;var NO="SelectIcon",lb=g.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return i.jsx(ue.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});lb.displayName=NO;var _O="SelectPortal",cb=e=>i.jsx(ws,{asChild:!0,...e});cb.displayName=_O;var io="SelectContent",ub=g.forwardRef((e,t)=>{const n=Pr(io,e.__scopeSelect),[r,o]=g.useState();if(at(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?lc.createPortal(i.jsx(db,{scope:e.__scopeSelect,children:i.jsx(qc.Slot,{scope:e.__scopeSelect,children:i.jsx("div",{children:e.children})})}),s):null}return i.jsx(fb,{...e,ref:t})});ub.displayName=io;var mn=10,[db,Or]=Rs(io),jO="SelectContentImpl",kO=pO("SelectContent.RemoveScroll"),fb=g.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:a,side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:p,collisionPadding:h,sticky:m,hideWhenDetached:x,avoidCollisions:v,...y}=e,b=Pr(io,n),[S,w]=g.useState(null),[E,N]=g.useState(null),_=Se(t,Y=>w(Y)),[k,I]=g.useState(null),[F,U]=g.useState(null),O=Xc(n),[R,L]=g.useState(!1),V=g.useRef(!1);g.useEffect(()=>{if(S)return kc(S)},[S]),jc();const D=g.useCallback(Y=>{const[Z,...q]=O().map(le=>le.ref.current),[oe]=q.slice(-1),ne=document.activeElement;for(const le of Y)if(le===ne||(le?.scrollIntoView({block:"nearest"}),le===Z&&E&&(E.scrollTop=0),le===oe&&E&&(E.scrollTop=E.scrollHeight),le?.focus(),document.activeElement!==ne))return},[O,E]),$=g.useCallback(()=>D([k,S]),[D,k,S]);g.useEffect(()=>{R&&$()},[R,$]);const{onOpenChange:z,triggerPointerDownPosRef:P}=b;g.useEffect(()=>{if(S){let Y={x:0,y:0};const Z=oe=>{Y={x:Math.abs(Math.round(oe.pageX)-(P.current?.x??0)),y:Math.abs(Math.round(oe.pageY)-(P.current?.y??0))}},q=oe=>{Y.x<=10&&Y.y<=10?oe.preventDefault():S.contains(oe.target)||z(!1),document.removeEventListener("pointermove",Z),P.current=null};return P.current!==null&&(document.addEventListener("pointermove",Z),document.addEventListener("pointerup",q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",q,{capture:!0})}}},[S,z,P]),g.useEffect(()=>{const Y=()=>z(!1);return window.addEventListener("blur",Y),window.addEventListener("resize",Y),()=>{window.removeEventListener("blur",Y),window.removeEventListener("resize",Y)}},[z]);const[M,G]=Mb(Y=>{const Z=O().filter(ne=>!ne.disabled),q=Z.find(ne=>ne.ref.current===document.activeElement),oe=Db(Z,Y,q);oe&&setTimeout(()=>oe.ref.current.focus())}),A=g.useCallback((Y,Z,q)=>{const oe=!V.current&&!q;(b.value!==void 0&&b.value===Z||oe)&&(I(Y),oe&&(V.current=!0))},[b.value]),W=g.useCallback(()=>S?.focus(),[S]),H=g.useCallback((Y,Z,q)=>{const oe=!V.current&&!q;(b.value!==void 0&&b.value===Z||oe)&&U(Y)},[b.value]),T=r==="popper"?Vd:pb,B=T===Vd?{side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:p,collisionPadding:h,sticky:m,hideWhenDetached:x,avoidCollisions:v}:{};return i.jsx(db,{scope:n,content:S,viewport:E,onViewportChange:N,itemRefCallback:A,selectedItem:k,onItemLeave:W,itemTextRefCallback:H,focusSelectedItem:$,selectedItemText:F,position:r,isPositioned:R,searchRef:M,children:i.jsx(si,{as:kO,allowPinchZoom:!0,children:i.jsx(oi,{asChild:!0,trapped:b.open,onMountAutoFocus:Y=>{Y.preventDefault()},onUnmountAutoFocus:te(o,Y=>{b.trigger?.focus({preventScroll:!0}),Y.preventDefault()}),children:i.jsx(vs,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:Y=>Y.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:i.jsx(T,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:Y=>Y.preventDefault(),...y,...B,onPlaced:()=>L(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:te(y.onKeyDown,Y=>{const Z=Y.ctrlKey||Y.altKey||Y.metaKey;if(Y.key==="Tab"&&Y.preventDefault(),!Z&&Y.key.length===1&&G(Y.key),["ArrowUp","ArrowDown","Home","End"].includes(Y.key)){let oe=O().filter(ne=>!ne.disabled).map(ne=>ne.ref.current);if(["ArrowUp","End"].includes(Y.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(Y.key)){const ne=Y.target,le=oe.indexOf(ne);oe=oe.slice(le+1)}setTimeout(()=>D(oe)),Y.preventDefault()}})})})})})})});fb.displayName=jO;var RO="SelectItemAlignedPosition",pb=g.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=Pr(io,n),a=Or(io,n),[l,c]=g.useState(null),[u,f]=g.useState(null),d=Se(t,_=>f(_)),p=Xc(n),h=g.useRef(!1),m=g.useRef(!0),{viewport:x,selectedItem:v,selectedItemText:y,focusSelectedItem:b}=a,S=g.useCallback(()=>{if(s.trigger&&s.valueNode&&l&&u&&x&&v&&y){const _=s.trigger.getBoundingClientRect(),k=u.getBoundingClientRect(),I=s.valueNode.getBoundingClientRect(),F=y.getBoundingClientRect();if(s.dir!=="rtl"){const ne=F.left-k.left,le=I.left-ne,Ee=_.left-le,re=_.width+Ee,ce=Math.max(re,k.width),K=window.innerWidth-mn,Q=j1(le,[mn,Math.max(mn,K-ce)]);l.style.minWidth=re+"px",l.style.left=Q+"px"}else{const ne=k.right-F.right,le=window.innerWidth-I.right-ne,Ee=window.innerWidth-_.right-le,re=_.width+Ee,ce=Math.max(re,k.width),K=window.innerWidth-mn,Q=j1(le,[mn,Math.max(mn,K-ce)]);l.style.minWidth=re+"px",l.style.right=Q+"px"}const U=p(),O=window.innerHeight-mn*2,R=x.scrollHeight,L=window.getComputedStyle(u),V=parseInt(L.borderTopWidth,10),D=parseInt(L.paddingTop,10),$=parseInt(L.borderBottomWidth,10),z=parseInt(L.paddingBottom,10),P=V+D+R+z+$,M=Math.min(v.offsetHeight*5,P),G=window.getComputedStyle(x),A=parseInt(G.paddingTop,10),W=parseInt(G.paddingBottom,10),H=_.top+_.height/2-mn,T=O-H,B=v.offsetHeight/2,Y=v.offsetTop+B,Z=V+D+Y,q=P-Z;if(Z<=H){const ne=U.length>0&&v===U[U.length-1].ref.current;l.style.bottom="0px";const le=u.clientHeight-x.offsetTop-x.offsetHeight,Ee=Math.max(T,B+(ne?W:0)+le+$),re=Z+Ee;l.style.height=re+"px"}else{const ne=U.length>0&&v===U[0].ref.current;l.style.top="0px";const Ee=Math.max(H,V+x.offsetTop+(ne?A:0)+B)+q;l.style.height=Ee+"px",x.scrollTop=Z-H+x.offsetTop}l.style.margin=`${mn}px 0`,l.style.minHeight=M+"px",l.style.maxHeight=O+"px",r?.(),requestAnimationFrame(()=>h.current=!0)}},[p,s.trigger,s.valueNode,l,u,x,v,y,s.dir,r]);at(()=>S(),[S]);const[w,E]=g.useState();at(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const N=g.useCallback(_=>{_&&m.current===!0&&(S(),b?.(),m.current=!1)},[S,b]);return i.jsx(DO,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:h,onScrollButtonChange:N,children:i.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:i.jsx(ue.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});pb.displayName=RO;var MO="SelectPopperPosition",Vd=g.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=mn,...s}=e,a=Jc(n);return i.jsx(hc,{...a,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Vd.displayName=MO;var[DO,qp]=Rs(io,{}),Bd="SelectViewport",hb=g.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=Or(Bd,n),a=qp(Bd,n),l=Se(t,s.onViewportChange),c=g.useRef(0);return i.jsxs(i.Fragment,{children:[i.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),i.jsx(qc.Slot,{scope:n,children:i.jsx(ue.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:te(o.onScroll,u=>{const f=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:p}=a;if(p?.current&&d){const h=Math.abs(c.current-f.scrollTop);if(h>0){const m=window.innerHeight-mn*2,x=parseFloat(d.style.minHeight),v=parseFloat(d.style.height),y=Math.max(x,v);if(y<m){const b=y+h,S=Math.min(m,b),w=b-S;d.style.height=S+"px",d.style.bottom==="0px"&&(f.scrollTop=w>0?w:0,d.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});hb.displayName=Bd;var gb="SelectGroup",[AO,TO]=Rs(gb),mb=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=tt();return i.jsx(AO,{scope:n,id:o,children:i.jsx(ue.div,{role:"group","aria-labelledby":o,...r,ref:t})})});mb.displayName=gb;var xb="SelectLabel",vb=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=TO(xb,n);return i.jsx(ue.div,{id:o.id,...r,ref:t})});vb.displayName=xb;var Wl="SelectItem",[PO,yb]=Rs(Wl),bb=g.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...a}=e,l=Pr(Wl,n),c=Or(Wl,n),u=l.value===r,[f,d]=g.useState(s??""),[p,h]=g.useState(!1),m=Se(t,b=>c.itemRefCallback?.(b,r,o)),x=tt(),v=g.useRef("touch"),y=()=>{o||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return i.jsx(PO,{scope:n,value:r,disabled:o,textId:x,isSelected:u,onItemTextChange:g.useCallback(b=>{d(S=>S||(b?.textContent??"").trim())},[]),children:i.jsx(qc.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:i.jsx(ue.div,{role:"option","aria-labelledby":x,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...a,ref:m,onFocus:te(a.onFocus,()=>h(!0)),onBlur:te(a.onBlur,()=>h(!1)),onClick:te(a.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:te(a.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:te(a.onPointerDown,b=>{v.current=b.pointerType}),onPointerMove:te(a.onPointerMove,b=>{v.current=b.pointerType,o?c.onItemLeave?.():v.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:te(a.onPointerLeave,b=>{b.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:te(a.onKeyDown,b=>{c.searchRef?.current!==""&&b.key===" "||(bO.includes(b.key)&&y(),b.key===" "&&b.preventDefault())})})})})});bb.displayName=Wl;var na="SelectItemText",wb=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,a=Pr(na,n),l=Or(na,n),c=yb(na,n),u=EO(na,n),[f,d]=g.useState(null),p=Se(t,y=>d(y),c.onItemTextChange,y=>l.itemTextRefCallback?.(y,c.value,c.disabled)),h=f?.textContent,m=g.useMemo(()=>i.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:x,onNativeOptionRemove:v}=u;return at(()=>(x(m),()=>v(m)),[x,v,m]),i.jsxs(i.Fragment,{children:[i.jsx(ue.span,{id:c.textId,...s,ref:p}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?lc.createPortal(s.children,a.valueNode):null]})});wb.displayName=na;var Cb="SelectItemIndicator",Sb=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return yb(Cb,n).isSelected?i.jsx(ue.span,{"aria-hidden":!0,...r,ref:t}):null});Sb.displayName=Cb;var zd="SelectScrollUpButton",Eb=g.forwardRef((e,t)=>{const n=Or(zd,e.__scopeSelect),r=qp(zd,e.__scopeSelect),[o,s]=g.useState(!1),a=Se(t,r.onScrollButtonChange);return at(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollTop>0;s(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?i.jsx(_b,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});Eb.displayName=zd;var Wd="SelectScrollDownButton",Nb=g.forwardRef((e,t)=>{const n=Or(Wd,e.__scopeSelect),r=qp(Wd,e.__scopeSelect),[o,s]=g.useState(!1),a=Se(t,r.onScrollButtonChange);return at(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<u;s(f)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?i.jsx(_b,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});Nb.displayName=Wd;var _b=g.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=Or("SelectScrollButton",n),a=g.useRef(null),l=Xc(n),c=g.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return g.useEffect(()=>()=>c(),[c]),at(()=>{l().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),i.jsx(ue.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:te(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:te(o.onPointerMove,()=>{s.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:te(o.onPointerLeave,()=>{c()})})}),OO="SelectSeparator",jb=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return i.jsx(ue.div,{"aria-hidden":!0,...r,ref:t})});jb.displayName=OO;var Hd="SelectArrow",LO=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Jc(n),s=Pr(Hd,n),a=Or(Hd,n);return s.open&&a.position==="popper"?i.jsx(gc,{...o,...r,ref:t}):null});LO.displayName=Hd;var IO="SelectBubbleInput",kb=g.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=g.useRef(null),s=Se(r,o),a=zc(t);return g.useEffect(()=>{const l=o.current;if(!l)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==t&&f){const d=new Event("change",{bubbles:!0});f.call(l,t),l.dispatchEvent(d)}},[a,t]),i.jsx(ue.select,{...n,style:{...l2,...n.style},ref:s,defaultValue:t})});kb.displayName=IO;function Rb(e){return e===""||e===void 0}function Mb(e){const t=dn(e),n=g.useRef(""),r=g.useRef(0),o=g.useCallback(a=>{const l=n.current+a;t(l),(function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(l)},[t]),s=g.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Db(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=FO(e,Math.max(s,0));o.length===1&&(a=a.filter(u=>u!==n));const c=a.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function FO(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var $O=rb,Ab=sb,VO=ib,BO=lb,zO=cb,Tb=ub,WO=hb,HO=mb,Pb=vb,Ob=bb,GO=wb,UO=Sb,Lb=Eb,Ib=Nb,Fb=jb;const YO=({dir:e,...t})=>i.jsx($O,{dir:e??mo(),...t}),KO=HO,ZO=VO,$b=g.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(Ab,{ref:r,className:j("flex h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-input 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]:min-w-0 [&>span]:truncate",e),...n,children:[t,i.jsx(BO,{asChild:!0,children:i.jsx(X,{name:"CaretDown",size:"sm",className:"opacity-50 shrink-0"})})]}));$b.displayName=Ab.displayName;const Vb=g.forwardRef(({className:e,...t},n)=>i.jsx(Lb,{ref:n,className:j("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(X,{name:"CaretUp",size:"sm"})}));Vb.displayName=Lb.displayName;const Bb=g.forwardRef(({className:e,...t},n)=>i.jsx(Ib,{ref:n,className:j("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(X,{name:"CaretDown",size:"sm"})}));Bb.displayName=Ib.displayName;const zb=g.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>i.jsx(zO,{children:i.jsxs(Tb,{ref:o,className:j("relative z-select max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-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",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:[i.jsx(Vb,{}),i.jsx(WO,{className:j("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),i.jsx(Bb,{})]})}));zb.displayName=Tb.displayName;const Wb=g.forwardRef(({className:e,...t},n)=>i.jsx(Pb,{ref:n,className:j("px-2 py-1.5 text-xs font-medium text-muted-foreground",e),...t}));Wb.displayName=Pb.displayName;const Gd=g.forwardRef(({className:e,children:t,badge:n,...r},o)=>i.jsxs(Ob,{ref:o,className:j("relative flex w-full cursor-default select-none items-center rounded-xs py-1.5 ps-2 pe-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[i.jsx("span",{className:"absolute end-2 flex h-4 w-4 items-center justify-center",children:i.jsx(UO,{children:i.jsx(X,{name:"Check",size:"sm"})})}),i.jsx(GO,{children:t}),n&&i.jsx("span",{className:"ms-2 inline-flex items-center",children:n})]}));Gd.displayName=Ob.displayName;const qO=g.forwardRef(({className:e,...t},n)=>i.jsx(Fb,{ref:n,className:j("-mx-1 my-1 h-px bg-muted",e),...t}));qO.displayName=Fb.displayName;const Hb=g.forwardRef(({label:e,description:t,error:n,info:r,requiredIndicator:o,required:s=!1,optional:a=!1,placeholder:l="Select an option",value:c,defaultValue:u,onChange:f,disabled:d=!1,options:p=[],groups:h=[],className:m,id:x,"aria-label":v},y)=>{const b=h.length>0,S=p.length>0;return i.jsxs("div",{className:j("w-full",m),children:[(e||r||o)&&i.jsxs("div",{className:"mb-2",children:[i.jsx(Wt,{htmlFor:x,info:r,requiredIndicator:o,required:s,disabled:d,children:e}),a&&!o&&i.jsx("p",{className:"text-sm font-medium leading-none text-muted-foreground",children:"(Optional)"})]}),t&&!n&&i.jsx("p",{className:j("text-sm font-medium leading-none",j("text-muted-foreground mb-2",d&&"opacity-50")),children:t}),i.jsxs(YO,{value:c,defaultValue:u,onValueChange:f,disabled:d,children:[i.jsx($b,{ref:y,id:x,"aria-label":v,className:j(n&&"border-destructive"),children:i.jsx(ZO,{placeholder:l})}),i.jsxs(zb,{children:[b&&h.map((w,E)=>i.jsxs(KO,{children:[w.label&&i.jsx(Wb,{children:w.label}),w.options.map(N=>i.jsxs(Gd,{value:N.value,badge:N.badge&&i.jsx(Ze,{variant:"info",children:N.badge}),children:[N.icon&&i.jsx("span",{className:"me-2 inline-flex items-center",children:N.icon}),N.label]},N.value))]},E)),!b&&S&&p.map(w=>i.jsx(Gd,{value:w.value,badge:w.badge&&i.jsx(Ze,{variant:"info",children:w.badge}),children:i.jsxs("span",{className:"flex items-center",children:[w.icon&&i.jsx("span",{className:"me-2 inline-flex items-center",children:w.icon}),w.label]})},w.value))]})]}),n&&i.jsx("p",{className:"text-sm font-medium leading-none text-destructive mt-2",children:n})]})});Hb.displayName="Select";const Gb=nv,Ub=rv,Xp=g.forwardRef(({className:e,align:t="start",sideOffset:n=4,...r},o)=>i.jsx(ov,{children:i.jsx(Dc,{ref:o,align:t,sideOffset:n,className:j("z-popover w-[var(--radix-popover-trigger-width)] rounded-md border bg-popover p-0 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),role:"combobox",...r})}));Xp.displayName=Dc.displayName;var k1=1,XO=.9,JO=.8,QO=.17,Fu=.1,$u=.999,eL=.9999,tL=.99,nL=/[\\\/_+.#"@\[\(\{&]/,rL=/[\\\/_+.#"@\[\(\{&]/g,oL=/[\s-]/,Yb=/[\s-]/g;function Ud(e,t,n,r,o,s,a){if(s===t.length)return o===e.length?k1:tL;var l=`${o},${s}`;if(a[l]!==void 0)return a[l];for(var c=r.charAt(s),u=n.indexOf(c,o),f=0,d,p,h,m;u>=0;)d=Ud(e,t,n,r,u+1,s+1,a),d>f&&(u===o?d*=k1:nL.test(e.charAt(u-1))?(d*=JO,h=e.slice(o,u-1).match(rL),h&&o>0&&(d*=Math.pow($u,h.length))):oL.test(e.charAt(u-1))?(d*=XO,m=e.slice(o,u-1).match(Yb),m&&o>0&&(d*=Math.pow($u,m.length))):(d*=QO,o>0&&(d*=Math.pow($u,u-o))),e.charAt(u)!==t.charAt(s)&&(d*=eL)),(d<Fu&&n.charAt(u-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(u-1)!==r.charAt(s))&&(p=Ud(e,t,n,r,u+1,s+2,a),p*Fu>d&&(d=p*Fu)),d>f&&(f=d),u=n.indexOf(c,u+1);return a[l]=f,f}function R1(e){return e.toLowerCase().replace(Yb," ")}function sL(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Ud(e,t,R1(e),R1(t),0,0,{})}function aL(e){const t=iL(e),n=g.forwardRef((r,o)=>{const{children:s,...a}=r,l=g.Children.toArray(s),c=l.find(cL);if(c){const u=c.props.children,f=l.map(d=>d===c?g.Children.count(u)>1?g.Children.only(null):g.isValidElement(u)?u.props.children:null:d);return i.jsx(t,{...a,ref:o,children:g.isValidElement(u)?g.cloneElement(u,void 0,f):null})}return i.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function iL(e){const t=g.forwardRef((n,r)=>{const{children:o,...s}=n;if(g.isValidElement(o)){const a=dL(o),l=uL(s,o.props);return o.type!==g.Fragment&&(l.ref=r?At(r,a):a),g.cloneElement(o,l)}return g.Children.count(o)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var lL=Symbol("radix.slottable");function cL(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===lL}function uL(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...l)=>{const c=s(...l);return o(...l),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function dL(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Qc="Dialog",[Kb]=St(Qc),[fL,Nn]=Kb(Qc),Zb=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,l=g.useRef(null),c=g.useRef(null),[u,f]=gt({prop:r,defaultProp:o??!1,onChange:s,caller:Qc});return i.jsx(fL,{scope:t,triggerRef:l,contentRef:c,contentId:tt(),titleId:tt(),descriptionId:tt(),open:u,onOpenChange:f,onOpenToggle:g.useCallback(()=>f(d=>!d),[f]),modal:a,children:n})};Zb.displayName=Qc;var qb="DialogTrigger",pL=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Nn(qb,n),s=Se(t,o.triggerRef);return i.jsx(ue.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":eh(o.open),...r,ref:s,onClick:te(e.onClick,o.onOpenToggle)})});pL.displayName=qb;var Jp="DialogPortal",[hL,Xb]=Kb(Jp,{forceMount:void 0}),Jb=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=Nn(Jp,t);return i.jsx(hL,{scope:t,forceMount:n,children:g.Children.map(r,a=>i.jsx(Tt,{present:n||s.open,children:i.jsx(ws,{asChild:!0,container:o,children:a})}))})};Jb.displayName=Jp;var Hl="DialogOverlay",Qb=g.forwardRef((e,t)=>{const n=Xb(Hl,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Nn(Hl,e.__scopeDialog);return s.modal?i.jsx(Tt,{present:r||s.open,children:i.jsx(mL,{...o,ref:t})}):null});Qb.displayName=Hl;var gL=aL("DialogOverlay.RemoveScroll"),mL=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Nn(Hl,n);return i.jsx(si,{as:gL,allowPinchZoom:!0,shards:[o.contentRef],children:i.jsx(ue.div,{"data-state":eh(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),lo="DialogContent",e5=g.forwardRef((e,t)=>{const n=Xb(lo,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Nn(lo,e.__scopeDialog);return i.jsx(Tt,{present:r||s.open,children:s.modal?i.jsx(xL,{...o,ref:t}):i.jsx(vL,{...o,ref:t})})});e5.displayName=lo;var xL=g.forwardRef((e,t)=>{const n=Nn(lo,e.__scopeDialog),r=g.useRef(null),o=Se(t,n.contentRef,r);return g.useEffect(()=>{const s=r.current;if(s)return kc(s)},[]),i.jsx(t5,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:te(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:te(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&s.preventDefault()}),onFocusOutside:te(e.onFocusOutside,s=>s.preventDefault())})}),vL=g.forwardRef((e,t)=>{const n=Nn(lo,e.__scopeDialog),r=g.useRef(!1),o=g.useRef(!1);return i.jsx(t5,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),t5=g.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...a}=e,l=Nn(lo,n),c=g.useRef(null),u=Se(t,c);return jc(),i.jsxs(i.Fragment,{children:[i.jsx(oi,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:i.jsx(vs,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":eh(l.open),...a,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(CL,{titleId:l.titleId}),i.jsx(EL,{contentRef:c,descriptionId:l.descriptionId})]})]})}),Qp="DialogTitle",yL=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Nn(Qp,n);return i.jsx(ue.h2,{id:o.titleId,...r,ref:t})});yL.displayName=Qp;var n5="DialogDescription",bL=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Nn(n5,n);return i.jsx(ue.p,{id:o.descriptionId,...r,ref:t})});bL.displayName=n5;var r5="DialogClose",wL=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Nn(r5,n);return i.jsx(ue.button,{type:"button",...r,ref:t,onClick:te(e.onClick,()=>o.onOpenChange(!1))})});wL.displayName=r5;function eh(e){return e?"open":"closed"}var o5="DialogTitleWarning",[Bz,s5]=JC(o5,{contentName:lo,titleName:Qp,docsSlug:"dialog"}),CL=({titleId:e})=>{const t=s5(o5),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
78
|
+
}`;function $T({className:e,containerClassName:t,...n}){return i.jsx(I3,{"data-slot":"input-otp",containerClassName:j("flex items-center gap-2 has-disabled:opacity-50",t),className:j("disabled:cursor-not-allowed",e),...n})}function VT({className:e,...t}){return i.jsx("div",{"data-slot":"input-otp-group",className:j("flex items-center",e),...t})}function BT({index:e,className:t,...n}){const r=m.useContext(L3),{char:o,hasFakeCaret:s,isActive:a}=r?.slots[e]??{};return i.jsxs("div",{"data-slot":"input-otp-slot","data-active":a,className:j("data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",t),...n,children:[o,s&&i.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:i.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}const F3=C.forwardRef(({maxLength:e=6,className:t,containerClassName:n,label:r,error:o,id:s,...a},l)=>{const c=C.useId(),u=s||c,f=!!o;return i.jsxs(xo,{orientation:"vertical","data-invalid":f,className:j(t),children:[r&&i.jsx(Ns,{htmlFor:u,children:r}),i.jsx($T,{ref:l,maxLength:e,containerClassName:j(n),"aria-invalid":f?!0:void 0,"aria-describedby":o?`${u}-description`:void 0,...a,children:Array.from({length:e}).map((d,p)=>i.jsx(m.Fragment,{children:i.jsx(VT,{children:i.jsx(BT,{index:p,"aria-invalid":f?!0:void 0})})},p))}),o&&i.jsx(Dr,{id:`${u}-description`,className:"text-left",children:o})]})});F3.displayName="OTPField";const zT=/[\u00AD\u061C\u180E\u200B\u200E\u200F\u202A-\u202E\u2060-\u2064\u2066-\u2069\uFEFF]/g,WT=/[\u00A0\u202F]/g,Gc=e=>typeof e!="string"?e:e.replace(zT,"").replace(WT," "),ut=e=>typeof e!="string"?e:Gc(e).trim(),Kp=C.forwardRef(({value:e=[],onChange:t,label:n,description:r,error:o,placeholder:s="Type and press Enter...",disabled:a=!1,id:l,name:c,triggerKeys:u=["Enter","Tab","Comma","Space"],addOnBlur:f=!0,allowDuplicates:d=!1,maxItems:p,validate:h,badgeVariant:g="outline",orientation:x="vertical",className:v,deleteAll:y,"aria-label":b,"aria-labelledby":S},w)=>{const E=C.useId(),N=l||E,_=!!o,[k,I]=C.useState(""),[F,U]=C.useState(!1),[O,R]=C.useState(""),L=H=>{const P=ut(H);if(P!==""){if(p&&e.length>=p){R(`Maximum ${p} items allowed`);return}if(!d&&e.includes(P)){R("Duplicate values are not allowed");return}if(h){const B=h(P);if(B!==!0){R(typeof B=="string"?B:"Invalid value");return}}R(""),t([...e,P]),I("")}},V=H=>{t(e.filter(P=>P!==H)),R("")},D=H=>{const P=H.currentTarget.value;H.key==="Enter"&&u.includes("Enter")?(H.preventDefault(),L(P)):H.key==="Tab"&&u.includes("Tab")?P.trim()!==""&&(H.preventDefault(),L(P)):(H.key===","||H.key===",")&&u.includes("Comma")||H.key===" "&&u.includes("Space")?(H.preventDefault(),L(P)):H.key==="Backspace"&&P===""&&e.length>0&&t(e.slice(0,-1))},$=H=>{I(H.target.value),R("")},z=()=>{U(!0)},T=()=>{U(!1),f&&k.trim()!==""&&L(k)},M=H=>{const P=Gc(H.clipboardData?.getData("text")??""),B=[];if(u.includes("Comma")&&B.push(","),u.includes("Space")&&B.push(" "),B.length===0)return;const Y=new RegExp(`[${B.join("")}]+`);if(!Y.test(P))return;H.preventDefault();const q=P.split(Y).map(le=>ut(le)).filter(le=>le!=="");if(q.length===0)return;const oe=[];let ne=[...e];for(const le of q){if(p&&ne.length>=p){R(`Maximum ${p} items allowed`);break}!d&&ne.includes(le)||h&&h(le)!==!0||(oe.push(le),ne=[...ne,le])}oe.length>0&&(R(""),t([...e,...oe]),I(""))},G=(H,P)=>{H.preventDefault(),H.stopPropagation(),V(P)},A=()=>{a||!y?.onClick||y.onClick()},W=o||O;return i.jsxs(xo,{orientation:x,"data-invalid":_,className:j("w-full",v),children:[n&&i.jsx(Ns,{htmlFor:N,children:n}),i.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[i.jsxs("div",{className:j("font-normal file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex min-h-9 w-full min-w-0 rounded-md border bg-input px-3 py-1.5 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 text-sm","flex-wrap gap-1.5 items-center",F&&"border-ring ring-ring/50 ring-[3px]",(_||O)&&"border-destructive ring-destructive/20 dark:ring-destructive/40",a&&"opacity-50 cursor-not-allowed"),onClick:()=>{a||document.getElementById(N)?.focus()},children:[(()=>{const H=y&&!a&&e.length>=y.length;return i.jsxs(i.Fragment,{children:[H&&i.jsx("div",{onClick:P=>{P.preventDefault(),P.stopPropagation(),A()},children:i.jsx(Ze,{variant:"secondary",className:"gap-1 cursor-pointer flex items-center",children:y.label||"Delete all"})}),e.map((P,B)=>i.jsxs(Ze,{variant:g,children:[P,i.jsx("button",{type:"button","aria-label":`Remove ${P}`,disabled:a,onClick:Y=>G(Y,P),children:i.jsx(X,{name:"X",className:"h-3 w-3"})})]},`${P}-${B}`))]})})(),i.jsx("input",{ref:w,id:N,name:c,type:"text",value:k,onChange:$,onKeyDown:D,onFocus:z,onBlur:T,onPaste:M,placeholder:e.length===0?s:"",disabled:a,className:j("flex-1 min-w-[120px] outline-none bg-transparent border-none shadow-none p-0 h-6","placeholder:text-muted-foreground","disabled:cursor-not-allowed"),"aria-label":b,"aria-labelledby":S,"aria-invalid":_||!!O,"aria-describedby":r||W?`${N}-description`:void 0})]}),r&&!W&&i.jsx(_s,{id:`${N}-description`,children:r}),W&&i.jsx(Dr,{id:`${N}-description`,children:W})]})]})});Kp.displayName="MultiValuesField";var Zp="Radio",[HT,$3]=St(Zp),[GT,UT]=HT(Zp),V3=m.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:s,disabled:a,value:l="on",onCheck:c,form:u,...f}=e,[d,p]=m.useState(null),h=Se(t,v=>p(v)),g=m.useRef(!1),x=d?u||!!d.closest("form"):!0;return i.jsxs(GT,{scope:n,checked:o,disabled:a,children:[i.jsx(ue.button,{type:"button",role:"radio","aria-checked":o,"data-state":H3(o),"data-disabled":a?"":void 0,disabled:a,value:l,...f,ref:h,onClick:te(e.onClick,v=>{o||c?.(),x&&(g.current=v.isPropagationStopped(),g.current||v.stopPropagation())})}),x&&i.jsx(W3,{control:d,bubbles:!g.current,name:r,value:l,checked:o,required:s,disabled:a,form:u,style:{transform:"translateX(-100%)"}})]})});V3.displayName=Zp;var B3="RadioIndicator",z3=m.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,s=UT(B3,n);return i.jsx(Pt,{present:r||s.checked,children:i.jsx(ue.span,{"data-state":H3(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});z3.displayName=B3;var YT="RadioBubbleInput",W3=m.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const a=m.useRef(null),l=Se(a,s),c=zc(n),u=pc(t);return m.useEffect(()=>{const f=a.current;if(!f)return;const d=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(d,"checked").set;if(c!==n&&h){const g=new Event("click",{bubbles:r});h.call(f,n),f.dispatchEvent(g)}},[c,n,r]),i.jsx(ue.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:l,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});W3.displayName=YT;function H3(e){return e?"checked":"unchecked"}var KT=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Uc="RadioGroup",[ZT]=St(Uc,[js,$3]),G3=js(),U3=$3(),[qT,XT]=ZT(Uc),Y3=m.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:s,required:a=!1,disabled:l=!1,orientation:c,dir:u,loop:f=!0,onValueChange:d,...p}=e,h=G3(n),g=Cs(u),[x,v]=mt({prop:s,defaultProp:o??null,onChange:d,caller:Uc});return i.jsx(qT,{scope:n,name:r,required:a,disabled:l,value:x,onValueChange:v,children:i.jsx(vp,{asChild:!0,...h,orientation:c,dir:g,loop:f,children:i.jsx(ue.div,{role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":l?"":void 0,dir:g,...p,ref:t})})})});Y3.displayName=Uc;var K3="RadioGroupItem",Z3=m.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,s=XT(K3,n),a=s.disabled||r,l=G3(n),c=U3(n),u=m.useRef(null),f=Se(t,u),d=s.value===o.value,p=m.useRef(!1);return m.useEffect(()=>{const h=x=>{KT.includes(x.key)&&(p.current=!0)},g=()=>p.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",g)}},[]),i.jsx(yp,{asChild:!0,...l,focusable:!a,active:d,children:i.jsx(V3,{disabled:a,required:s.required,checked:d,...c,...o,name:s.name,ref:f,onCheck:()=>s.onValueChange(o.value),onKeyDown:te(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:te(o.onFocus,()=>{p.current&&u.current?.click()})})})});Z3.displayName=K3;var JT="RadioGroupIndicator",q3=m.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=U3(n);return i.jsx(z3,{...o,...r,ref:t})});q3.displayName=JT;var QT=Y3,eO=Z3,tO=q3;function Yc({className:e,...t}){return i.jsx(QT,{"data-slot":"radio-group",className:j("grid gap-4",e),...t})}function Kc({className:e,...t}){return i.jsx(eO,{"data-slot":"radio-group-item",className:j("border-border text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:i.jsx(tO,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:i.jsx("span",{className:"size-2 rounded-full bg-primary"})})})}const X3=({option:e,radioId:t,isInlineLayout:n=!1})=>i.jsxs("div",{className:n?"flex items-center gap-3":"flex items-start gap-3",children:[i.jsx(Kc,{value:e.value,id:t,disabled:e.disabled,className:"cursor-pointer mt-0.5"}),n?i.jsxs(i.Fragment,{children:[i.jsx(Wt,{htmlFor:t,className:j("cursor-pointer",e.disabled&&"text-muted-foreground"),children:e.label}),e.description&&i.jsx("p",{className:"text-sm text-muted-foreground ms-auto",children:e.description})]}):i.jsxs("div",{className:"flex flex-col gap-1.5 flex-1",children:[i.jsx(Wt,{htmlFor:t,className:j("cursor-pointer",e.disabled&&"text-muted-foreground"),children:e.label}),e.description&&i.jsx("p",{className:"text-sm text-muted-foreground",children:e.description})]})]}),J3=C.forwardRef(({options:e,name:t,label:n,orientation:r="vertical",layout:o="stacked",onChange:s,"aria-labelledby":a,...l},c)=>{const u=o==="inline",f=r==="horizontal",d=`${C.useId()}-label`,p=a??(n!=null?d:void 0),h=i.jsx(Yc,{ref:c,className:f?"flex flex-row flex-wrap gap-6":"flex flex-col gap-3",onValueChange:s,"aria-labelledby":p,...l,children:e.map(g=>{const x=`${t}-${g.value}`;return i.jsx(X3,{option:g,radioId:x,isInlineLayout:u},g.value)})});return n==null?h:i.jsxs("div",{className:"flex flex-col gap-3",children:[i.jsx("span",{id:d,className:"text-sm font-medium text-foreground",children:n}),h]})});J3.displayName="RadioGroup";const Q3=m.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:j("flex min-w-0 w-full rounded-md border border-input bg-background overflow-hidden","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]","has-[[data-slot=input-group-control][aria-invalid='true']]:border-destructive has-[[data-slot=input-group-control][aria-invalid='true']]:ring-destructive/20 dark:has-[[data-slot=input-group-control][aria-invalid='true']]:ring-destructive/40",e),...t}));Q3.displayName="InputGroup";const $d=m.forwardRef(({className:e,align:t="inline-start",...n},r)=>i.jsx("div",{ref:r,className:j("flex items-center gap-1.5 h-9 shrink-0",t==="inline-start"&&"order-first ps-3",t==="inline-end"&&"order-last pe-3",t==="block-start"&&"order-first flex-col w-full pb-1.5 px-0 h-auto",t==="block-end"&&"order-last flex-col w-full pt-1.5 px-0 h-auto",e),...n}));$d.displayName="InputGroupAddon";const eb=m.forwardRef(({className:e,...t},n)=>i.jsx(fi,{ref:n,"data-slot":"input-group-control",className:j("flex-1 min-w-0 border-0 shadow-none rounded-none bg-transparent","focus-visible:ring-0 focus-visible:border-0","aria-invalid:border-0 aria-invalid:ring-0",e),...t}));eb.displayName="InputGroupInput";const nO=m.forwardRef(({className:e,...t},n)=>i.jsx(Yp,{ref:n,"data-slot":"input-group-control",className:j("flex-1 min-w-0 border-0 shadow-none rounded-none bg-transparent","focus-visible:ring-0 focus-visible:border-0",e),...t}));nO.displayName="InputGroupTextarea";const rO=m.forwardRef(({className:e,...t},n)=>i.jsx("span",{ref:n,className:j("text-sm text-muted-foreground whitespace-nowrap",e),...t}));rO.displayName="InputGroupText";const oO=Ge("shrink-0",{variants:{size:{xs:"h-7 px-2 text-xs",sm:"h-8 px-3 text-sm","icon-xs":"size-7","icon-sm":"size-8"}},defaultVariants:{size:"sm"}}),sO=m.forwardRef(({className:e,size:t,...n},r)=>i.jsx(wt,{ref:r,className:j(oO({size:t}),e),...n}));sO.displayName="InputGroupButton";const ds=C.forwardRef(({className:e,orientation:t="vertical",label:n,description:r,error:o,info:s,requiredIndicator:a,required:l,id:c,button:u,disabled:f,startIcon:d,startIconProps:p,endIcon:h,endIconProps:g,inputProps:x,...v},y)=>{const b=C.useId(),S=c||x?.id||b,w=!!o;return i.jsxs(xo,{orientation:t,"data-invalid":w,className:j("w-full",e),children:[(n||s||a)&&i.jsx(Wt,{htmlFor:S,info:s,requiredIndicator:a,required:l,disabled:f,children:n}),i.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[i.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsxs(Q3,{className:"flex-1",children:[d&&i.jsx($d,{align:"inline-start",children:i.jsx(X,{name:p?.name||d,size:"sm",...p,className:j("cursor-default text-muted-foreground",p?.className)})}),i.jsx(eb,{ref:y,disabled:f,required:l,className:j(w&&"border-destructive focus-visible:border-destructive",x?.className),"aria-invalid":w?!0:void 0,"aria-describedby":r||o?`${S}-description`:void 0,...v,...x,id:S}),h&&i.jsx($d,{align:"inline-end",children:i.jsx(X,{name:g?.name||h,size:"sm",...g,className:j("cursor-default text-muted-foreground",g?.className)})})]}),u&&i.jsx(ot,{disabled:f,...u})]}),r&&!o&&i.jsx(_s,{id:`${S}-description`,children:r}),o&&i.jsx(Dr,{id:`${S}-description`,children:o})]})]})});ds.displayName="Field";const tb=m.forwardRef(({className:e,value:t,...n},r)=>i.jsx(fi,{ref:r,type:"time",step:"1",value:t,className:j("h-9",e),...n}));tb.displayName="TimePicker";const aO=Array.from({length:12},(e,t)=>t+1),iO=Array.from({length:24},(e,t)=>t),lO=["AM","PM"],cO=e=>{if(e===0)return Array.from({length:60},(n,r)=>r);const t=60/e;return Array.from({length:t},(n,r)=>r*e)},fr=e=>e.toString().padStart(2,"0"),uO=e=>{const t=e>=12?"PM":"AM",n=e>12?e-12:e;return{hour:e===0?12:n,meridiem:t}},dO=(e,t)=>e===12?t==="AM"?0:12:t==="PM"?e+12:e,zl=m.forwardRef(({className:e,label:t,error:n,description:r,orientation:o="vertical",id:s,onChange:a,mode:l="native",divisorMinutes:c=0,width:u=140,value:f,disabled:d,use24Hour:p=!1,...h},g)=>{const x=C.useId(),v=s||x,y=!!n;if(l==="native"){const b=i.jsx(tb,{ref:g,id:v,value:f,disabled:d,className:j(y&&"border-destructive focus-visible:border-destructive",!(t||n||r)&&e),"aria-invalid":y?!0:void 0,"aria-describedby":r||n?`${v}-description`:void 0,...h,onChange:S=>{a?.(S.target.value)}});return t||n||r?i.jsxs(xo,{orientation:o,"data-invalid":y,className:j("w-full",e),children:[t&&i.jsx(Ns,{htmlFor:v,children:t}),i.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[b,r&&!n&&i.jsx(_s,{id:`${v}-description`,children:r}),n&&i.jsx(Dr,{id:`${v}-description`,children:n})]})]}):b}return i.jsx(fO,{value:f||(p?"00:00":"12:00"),onChange:a,divisorMinutes:c,width:u,label:t,error:n,description:r,disabled:d,className:e,use24Hour:p})});zl.displayName="TimePicker";const fO=({value:e,onChange:t,divisorMinutes:n,width:r,label:o,error:s,description:a,disabled:l,className:c,use24Hour:u=!1})=>{const[f,d]=C.useState(!1),p=C.useRef(null),h=C.useRef(null),g=$=>{const[z,T]=$.split(":"),M=parseInt(z,10)||0,G=parseInt(T,10)||0;if(u)return{hour24:M,minute:G,hour:M,meridiem:"AM"};const{hour:A,meridiem:W}=uO(M);return{hour24:M,minute:G,hour:A,meridiem:W}},{hour:x,hour24:v,minute:y,meridiem:b}=g(e),[S,w]=C.useState(u?v:x),[E,N]=C.useState(y),[_,k]=C.useState(b),I=cO(n),F=($,z,T)=>{let M;u?M=$:M=dO($,T);const G=`${fr(M)}:${fr(z)}`;t?.(G)},U=$=>{w($),F($,E,_)},O=$=>{N($),F(S,$,_)},R=$=>{k($),F(S,E,$)};C.useEffect(()=>{const $=z=>{h.current&&!h.current.contains(z.target)&&d(!1)};if(f)return document.addEventListener("mousedown",$),()=>document.removeEventListener("mousedown",$)},[f]);const L=u?`${fr(S)}:${fr(E)}`:`${fr(S)}:${fr(E)} ${_}`,V=u?iO:aO,D=i.jsxs("div",{ref:h,className:j("relative inline-block",c),style:{width:typeof r=="number"?`${r}px`:r},children:[i.jsxs("button",{type:"button",disabled:l,onClick:()=>!l&&d(!f),className:j("flex items-center justify-between w-full h-9 px-3 py-2","text-sm rounded-md border border-input bg-input","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50",s&&"border-destructive"),children:[i.jsx("span",{children:L}),i.jsx(X,{name:f?"CaretUp":"CaretDown",size:"sm",className:"ml-2"})]}),f&&i.jsxs("div",{ref:p,className:j("absolute z-popover mt-1 bg-popover border border-border rounded-md shadow-lg","flex divide-x divide-border"),style:{width:"fit-content",minWidth:u?"140px":"200px"},children:[i.jsx("div",{className:"flex flex-col overflow-y-auto max-h-[200px] min-w-[60px]",children:V.map($=>i.jsx("button",{type:"button",onClick:()=>U($),className:j("px-3 py-2 text-sm text-left hover:bg-accent",S===$&&"bg-primary text-primary-foreground hover:bg-primary"),children:fr($)},$))}),i.jsx("div",{className:"flex flex-col overflow-y-auto max-h-[200px] min-w-[60px]",children:I.map($=>i.jsx("button",{type:"button",onClick:()=>O($),className:j("px-3 py-2 text-sm text-left hover:bg-accent",E===$&&"bg-primary text-primary-foreground hover:bg-primary"),children:fr($)},$))}),!u&&i.jsx("div",{className:"flex flex-col min-w-[60px]",children:lO.map($=>i.jsx("button",{type:"button",onClick:()=>R($),className:j("px-3 py-2 text-sm text-left hover:bg-accent",_===$&&"bg-primary text-primary-foreground hover:bg-primary"),children:$},$))})]})]});return o||s||a?i.jsxs(xo,{orientation:"vertical",className:j("w-full",c),children:[o&&i.jsx(Ns,{children:o}),i.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[D,a&&!s&&i.jsx(_s,{children:a}),s&&i.jsx(Dr,{children:s})]})]}):D},pO=Ge("flex gap-2 w-full",{variants:{layout:{vertical:"flex-col",horizontal:"flex-row items-start gap-4"}},defaultVariants:{layout:"vertical"}}),hO=Ge("text-sm",{variants:{layout:{vertical:"",horizontal:"mt-2"}},defaultVariants:{layout:"vertical"}}),Zc=C.forwardRef(({placeholder:e="Search",onSearch:t,limitSearch:n=10,persistKey:r="",value:o="",searchOnChange:s=!0,enableHistory:a=!0,label:l,description:c,error:u,id:f,disabled:d,layout:p="vertical",className:h,inputProps:g,actionName:x,...v},y)=>{const b=C.useId(),S=f||g?.id||b,w=!!u,[E,N]=C.useState(ut(o)),[_,k]=C.useState(()=>{if(!r)return[];try{const P=JSON.parse(localStorage.getItem(`${r}_searchfield`)??"null");if(!Array.isArray(P))return[];const B=new Set;return P.reduce((Y,Z)=>{const q=ut(Z?.value??"");return!q||B.has(q)||(B.add(q),Y.push({...Z,label:q,value:q})),Y},[])}catch{return[]}}),[I,F]=C.useState([]),[U,O]=C.useState(!1),[R,L]=C.useState(!1),V=C.useRef(null),D=C.useRef(null),$=P=>{const B=P.target.value;N(B),(B===""||s)&&t(ut(B))},z=P=>{const B=P.currentTarget,Y=P.clipboardData.getData("text"),Z=B.selectionStart??E.length,q=B.selectionEnd??E.length,oe=E.slice(0,Z)+Y+E.slice(q),ne=ut(oe);ne!==oe&&(P.preventDefault(),N(ne),(ne===""||s)&&t(ne))},T=P=>{P.key==="Enter"&&E!==""&&M()},M=()=>{const P=ut(E);if(P){if(P!==E&&N(P),a){const B={label:P,value:P},Y=_.filter(q=>q.value!==P),Z=_.length<n?[B,...Y]:[B,...Y.slice(0,n-1)];k(Z),r&&localStorage.setItem(`${r}_searchfield`,JSON.stringify(Z))}t(P)}},G=()=>{N(""),t(""),V.current?.focus()},A=P=>{const B=ut(P);N(B),t(B),O(!1),V.current?.focus()},W=()=>{O(!0)},H=()=>{R||O(!1)};return C.useEffect(()=>{const P=ut(o);N(P),P!==o&&t(P)},[o]),C.useEffect(()=>{const P=_.map(B=>({...B,isSelected:B.value===E})).filter(B=>E===""?!0:B.label.toLowerCase().includes(E.toLowerCase()));F(P)},[E,_]),i.jsxs("div",{"data-action-name":x,className:j(pO({layout:p}),h),children:[l&&i.jsx(Wt,{htmlFor:S,className:j(hO({layout:p})),children:l}),i.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[i.jsxs("div",{className:"relative",children:[i.jsxs("div",{className:"relative flex",children:[i.jsx(fi,{ref:P=>{typeof y=="function"?y(P):y&&(y.current=P),P&&(V.current=P)},type:"text",value:E,onChange:$,onPaste:z,onKeyDown:T,onFocus:W,onBlur:H,placeholder:e,disabled:d,autoComplete:"off","aria-invalid":w,"aria-describedby":c||u?`${S}-description`:void 0,...v,...g,id:S,className:j(w&&"border-destructive focus-visible:border-destructive","!px-9",g?.className)}),i.jsx("button",{type:"button","aria-label":"Search",onClick:M,disabled:d,className:j("absolute start-3 top-1/2 -translate-y-1/2 inline-flex items-center text-muted-foreground dark:text-foreground",!d&&"cursor-pointer hover:text-foreground transition-colors"),children:i.jsx(X,{name:"MagnifyingGlass",size:"sm"})}),E&&i.jsx("button",{type:"button","aria-label":"Clear search",onClick:G,disabled:d,className:j("absolute end-3 top-1/2 -translate-y-1/2 inline-flex items-center text-muted-foreground",!d&&"cursor-pointer hover:text-foreground transition-colors"),children:i.jsx(X,{name:"XCircle",size:"sm",weight:"fill"})})]}),a&&I.length>0&&U&&i.jsx("div",{ref:D,onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),className:j("absolute z-popover w-full mt-1 rounded-md border bg-popover text-popover-foreground shadow-md","max-h-[300px] overflow-y-auto"),children:i.jsx("div",{className:"py-1",children:I.map((P,B)=>i.jsx("button",{type:"button",onClick:()=>A(P.value),className:j("w-full text-left px-4 py-2 text-sm hover:bg-accent hover:text-accent-foreground transition-colors cursor-pointer",P.isSelected&&"bg-accent text-accent-foreground"),children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(X,{name:"ClockCounterClockwise",size:"sm",className:"text-muted-foreground"}),i.jsx("span",{className:"truncate",children:P.label})]})},`${P.value}-${B}`))})})]}),(c||u)&&i.jsx("p",{id:`${S}-description`,className:j("text-sm",u?"text-destructive":"text-muted-foreground"),children:u||c})]})]})});Zc.displayName="SearchField";const mO=({allowed:e,children:t,message:n="You don't have permission to perform this action"})=>e?i.jsx(i.Fragment,{children:t}):i.jsx(zt,{content:n,show:!e,children:i.jsx("span",{className:"block w-full",children:t})}),nb=({options:e,icon:t=null,ariaLabel:n="more",className:r,disabled:o=!1,marginBottom:s})=>{const[a,l]=m.useState(!1),c=d=>{l(d)},u=d=>{d.allowed&&d.handleClick&&d.handleClick(e),l(!1)};if(!e.actions||e.actions.length===0)return null;const f={};return s!==void 0&&(f.marginBottom=`${s}px`),i.jsx("div",{className:j("inline-flex relative",r),style:f,children:i.jsxs(Lc,{open:a,onOpenChange:c,children:[i.jsx(Ic,{asChild:!0,disabled:o,children:i.jsx(ot,{disabled:o,variant:"ghost",size:"icon",className:"h-8 w-8 p-1","aria-label":n,"aria-controls":a?"dots-menu":void 0,"aria-expanded":a,"aria-haspopup":"true",children:i.jsx(X,{name:t||"DotsThreeOutline",weight:t?"light":"fill",size:"sm",className:j("transition-colors",a?"text-primary":"text-muted-foreground")})})}),i.jsx(Fc,{id:"dots-menu",align:"end",className:j("max-h-[216px] overflow-y-auto"),children:e.actions.map(d=>i.jsx(mO,{allowed:d.allowed??!0,message:d.message,children:i.jsxs(xn,{onClick:()=>u(d),disabled:!d.allowed,"data-action-name":d.dataActionName,className:j("flex items-center gap-3.5 cursor-pointer",d.variant==="destructive"&&"text-destructive focus:text-destructive"),children:[i.jsx(X,{name:d.icon,size:"sm",className:"shrink-0"}),i.jsx("span",{className:j(d.variant==="success"&&"text-success"),children:d.name||String(d.key)})]})},d.key))})]})})};nb.displayName="DotsMenu";const rb=C.forwardRef(({defaultVisible:e=!1,label:t,forgotPasswordLinkProps:n,...r},o)=>{const[s,a]=C.useState(e),l=()=>{a(c=>!c)};return n&&t?i.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(Wt,{className:"text-sm",children:t}),i.jsx(Mp,{className:j("text-muted-foreground",n?.className),...n,children:n.children||"Forgot password?"})]}),i.jsx(ds,{ref:o,type:s?"text":"password",endIcon:s?"EyeClosed":"Eye",endIconProps:{onClick:l,className:"cursor-pointer",tooltip:s?"Hide password":"Show password"},...r})]}):i.jsx(ds,{ref:o,label:t,type:s?"text":"password",endIcon:s?"EyeClosed":"Eye",endIconProps:{onClick:l,className:"cursor-pointer",tooltip:s?"Hide password":"Show password"},...r})});rb.displayName="PasswordField";function j1(e,[t,n]){return Math.min(n,Math.max(t,e))}function gO(e){const t=xO(e),n=m.forwardRef((r,o)=>{const{children:s,...a}=r,l=m.Children.toArray(s),c=l.find(yO);if(c){const u=c.props.children,f=l.map(d=>d===c?m.Children.count(u)>1?m.Children.only(null):m.isValidElement(u)?u.props.children:null:d);return i.jsx(t,{...a,ref:o,children:m.isValidElement(u)?m.cloneElement(u,void 0,f):null})}return i.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function xO(e){const t=m.forwardRef((n,r)=>{const{children:o,...s}=n;if(m.isValidElement(o)){const a=wO(o),l=bO(s,o.props);return o.type!==m.Fragment&&(l.ref=r?At(r,a):a),m.cloneElement(o,l)}return m.Children.count(o)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var vO=Symbol("radix.slottable");function yO(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===vO}function bO(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...l)=>{const c=s(...l);return o(...l),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function wO(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var CO=[" ","Enter","ArrowUp","ArrowDown"],SO=[" ","Enter"],ao="Select",[qc,Xc,EO]=vc(ao),[Rs]=St(ao,[EO,Rr]),Jc=Rr(),[NO,Tr]=Rs(ao),[_O,jO]=Rs(ao),ob=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:a,defaultValue:l,onValueChange:c,dir:u,name:f,autoComplete:d,disabled:p,required:h,form:g}=e,x=Jc(t),[v,y]=m.useState(null),[b,S]=m.useState(null),[w,E]=m.useState(!1),N=Cs(u),[_,k]=mt({prop:r,defaultProp:o??!1,onChange:s,caller:ao}),[I,F]=mt({prop:a,defaultProp:l,onChange:c,caller:ao}),U=m.useRef(null),O=v?g||!!v.closest("form"):!0,[R,L]=m.useState(new Set),V=Array.from(R).map(D=>D.props.value).join(";");return i.jsx(Xa,{...x,children:i.jsxs(NO,{required:h,scope:t,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:S,valueNodeHasChildren:w,onValueNodeHasChildrenChange:E,contentId:tt(),value:I,onValueChange:F,open:_,onOpenChange:k,dir:N,triggerPointerDownPosRef:U,disabled:p,children:[i.jsx(qc.Provider,{scope:t,children:i.jsx(_O,{scope:e.__scopeSelect,onNativeOptionAdd:m.useCallback(D=>{L($=>new Set($).add(D))},[]),onNativeOptionRemove:m.useCallback(D=>{L($=>{const z=new Set($);return z.delete(D),z})},[]),children:n})}),O?i.jsxs(Rb,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:d,value:I,onChange:D=>F(D.target.value),disabled:p,form:g,children:[I===void 0?i.jsx("option",{value:""}):null,Array.from(R)]},V):null]})})};ob.displayName=ao;var sb="SelectTrigger",ab=m.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=Jc(n),a=Tr(sb,n),l=a.disabled||r,c=Se(t,a.onTriggerChange),u=Xc(n),f=m.useRef("touch"),[d,p,h]=Db(x=>{const v=u().filter(S=>!S.disabled),y=v.find(S=>S.value===a.value),b=Ab(v,x,y);b!==void 0&&a.onValueChange(b.value)}),g=x=>{l||(a.onOpenChange(!0),h()),x&&(a.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)})};return i.jsx(Ja,{asChild:!0,...s,children:i.jsx(ue.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Mb(a.value)?"":void 0,...o,ref:c,onClick:te(o.onClick,x=>{x.currentTarget.focus(),f.current!=="mouse"&&g(x)}),onPointerDown:te(o.onPointerDown,x=>{f.current=x.pointerType;const v=x.target;v.hasPointerCapture(x.pointerId)&&v.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&x.pointerType==="mouse"&&(g(x),x.preventDefault())}),onKeyDown:te(o.onKeyDown,x=>{const v=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&p(x.key),!(v&&x.key===" ")&&CO.includes(x.key)&&(g(),x.preventDefault())})})})});ab.displayName=sb;var ib="SelectValue",lb=m.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:a="",...l}=e,c=Tr(ib,n),{onValueNodeHasChildrenChange:u}=c,f=s!==void 0,d=Se(t,c.onValueNodeChange);return at(()=>{u(f)},[u,f]),i.jsx(ue.span,{...l,ref:d,style:{pointerEvents:"none"},children:Mb(c.value)?i.jsx(i.Fragment,{children:a}):s})});lb.displayName=ib;var kO="SelectIcon",cb=m.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return i.jsx(ue.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});cb.displayName=kO;var RO="SelectPortal",ub=e=>i.jsx(ws,{asChild:!0,...e});ub.displayName=RO;var io="SelectContent",db=m.forwardRef((e,t)=>{const n=Tr(io,e.__scopeSelect),[r,o]=m.useState();if(at(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?lc.createPortal(i.jsx(fb,{scope:e.__scopeSelect,children:i.jsx(qc.Slot,{scope:e.__scopeSelect,children:i.jsx("div",{children:e.children})})}),s):null}return i.jsx(pb,{...e,ref:t})});db.displayName=io;var gn=10,[fb,Or]=Rs(io),MO="SelectContentImpl",DO=gO("SelectContent.RemoveScroll"),pb=m.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:a,side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:p,collisionPadding:h,sticky:g,hideWhenDetached:x,avoidCollisions:v,...y}=e,b=Tr(io,n),[S,w]=m.useState(null),[E,N]=m.useState(null),_=Se(t,Y=>w(Y)),[k,I]=m.useState(null),[F,U]=m.useState(null),O=Xc(n),[R,L]=m.useState(!1),V=m.useRef(!1);m.useEffect(()=>{if(S)return kc(S)},[S]),jc();const D=m.useCallback(Y=>{const[Z,...q]=O().map(le=>le.ref.current),[oe]=q.slice(-1),ne=document.activeElement;for(const le of Y)if(le===ne||(le?.scrollIntoView({block:"nearest"}),le===Z&&E&&(E.scrollTop=0),le===oe&&E&&(E.scrollTop=E.scrollHeight),le?.focus(),document.activeElement!==ne))return},[O,E]),$=m.useCallback(()=>D([k,S]),[D,k,S]);m.useEffect(()=>{R&&$()},[R,$]);const{onOpenChange:z,triggerPointerDownPosRef:T}=b;m.useEffect(()=>{if(S){let Y={x:0,y:0};const Z=oe=>{Y={x:Math.abs(Math.round(oe.pageX)-(T.current?.x??0)),y:Math.abs(Math.round(oe.pageY)-(T.current?.y??0))}},q=oe=>{Y.x<=10&&Y.y<=10?oe.preventDefault():S.contains(oe.target)||z(!1),document.removeEventListener("pointermove",Z),T.current=null};return T.current!==null&&(document.addEventListener("pointermove",Z),document.addEventListener("pointerup",q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",q,{capture:!0})}}},[S,z,T]),m.useEffect(()=>{const Y=()=>z(!1);return window.addEventListener("blur",Y),window.addEventListener("resize",Y),()=>{window.removeEventListener("blur",Y),window.removeEventListener("resize",Y)}},[z]);const[M,G]=Db(Y=>{const Z=O().filter(ne=>!ne.disabled),q=Z.find(ne=>ne.ref.current===document.activeElement),oe=Ab(Z,Y,q);oe&&setTimeout(()=>oe.ref.current.focus())}),A=m.useCallback((Y,Z,q)=>{const oe=!V.current&&!q;(b.value!==void 0&&b.value===Z||oe)&&(I(Y),oe&&(V.current=!0))},[b.value]),W=m.useCallback(()=>S?.focus(),[S]),H=m.useCallback((Y,Z,q)=>{const oe=!V.current&&!q;(b.value!==void 0&&b.value===Z||oe)&&U(Y)},[b.value]),P=r==="popper"?Vd:hb,B=P===Vd?{side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:p,collisionPadding:h,sticky:g,hideWhenDetached:x,avoidCollisions:v}:{};return i.jsx(fb,{scope:n,content:S,viewport:E,onViewportChange:N,itemRefCallback:A,selectedItem:k,onItemLeave:W,itemTextRefCallback:H,focusSelectedItem:$,selectedItemText:F,position:r,isPositioned:R,searchRef:M,children:i.jsx(si,{as:DO,allowPinchZoom:!0,children:i.jsx(oi,{asChild:!0,trapped:b.open,onMountAutoFocus:Y=>{Y.preventDefault()},onUnmountAutoFocus:te(o,Y=>{b.trigger?.focus({preventScroll:!0}),Y.preventDefault()}),children:i.jsx(vs,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:Y=>Y.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:i.jsx(P,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:Y=>Y.preventDefault(),...y,...B,onPlaced:()=>L(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:te(y.onKeyDown,Y=>{const Z=Y.ctrlKey||Y.altKey||Y.metaKey;if(Y.key==="Tab"&&Y.preventDefault(),!Z&&Y.key.length===1&&G(Y.key),["ArrowUp","ArrowDown","Home","End"].includes(Y.key)){let oe=O().filter(ne=>!ne.disabled).map(ne=>ne.ref.current);if(["ArrowUp","End"].includes(Y.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(Y.key)){const ne=Y.target,le=oe.indexOf(ne);oe=oe.slice(le+1)}setTimeout(()=>D(oe)),Y.preventDefault()}})})})})})})});pb.displayName=MO;var AO="SelectItemAlignedPosition",hb=m.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=Tr(io,n),a=Or(io,n),[l,c]=m.useState(null),[u,f]=m.useState(null),d=Se(t,_=>f(_)),p=Xc(n),h=m.useRef(!1),g=m.useRef(!0),{viewport:x,selectedItem:v,selectedItemText:y,focusSelectedItem:b}=a,S=m.useCallback(()=>{if(s.trigger&&s.valueNode&&l&&u&&x&&v&&y){const _=s.trigger.getBoundingClientRect(),k=u.getBoundingClientRect(),I=s.valueNode.getBoundingClientRect(),F=y.getBoundingClientRect();if(s.dir!=="rtl"){const ne=F.left-k.left,le=I.left-ne,Ee=_.left-le,re=_.width+Ee,ce=Math.max(re,k.width),K=window.innerWidth-gn,Q=j1(le,[gn,Math.max(gn,K-ce)]);l.style.minWidth=re+"px",l.style.left=Q+"px"}else{const ne=k.right-F.right,le=window.innerWidth-I.right-ne,Ee=window.innerWidth-_.right-le,re=_.width+Ee,ce=Math.max(re,k.width),K=window.innerWidth-gn,Q=j1(le,[gn,Math.max(gn,K-ce)]);l.style.minWidth=re+"px",l.style.right=Q+"px"}const U=p(),O=window.innerHeight-gn*2,R=x.scrollHeight,L=window.getComputedStyle(u),V=parseInt(L.borderTopWidth,10),D=parseInt(L.paddingTop,10),$=parseInt(L.borderBottomWidth,10),z=parseInt(L.paddingBottom,10),T=V+D+R+z+$,M=Math.min(v.offsetHeight*5,T),G=window.getComputedStyle(x),A=parseInt(G.paddingTop,10),W=parseInt(G.paddingBottom,10),H=_.top+_.height/2-gn,P=O-H,B=v.offsetHeight/2,Y=v.offsetTop+B,Z=V+D+Y,q=T-Z;if(Z<=H){const ne=U.length>0&&v===U[U.length-1].ref.current;l.style.bottom="0px";const le=u.clientHeight-x.offsetTop-x.offsetHeight,Ee=Math.max(P,B+(ne?W:0)+le+$),re=Z+Ee;l.style.height=re+"px"}else{const ne=U.length>0&&v===U[0].ref.current;l.style.top="0px";const Ee=Math.max(H,V+x.offsetTop+(ne?A:0)+B)+q;l.style.height=Ee+"px",x.scrollTop=Z-H+x.offsetTop}l.style.margin=`${gn}px 0`,l.style.minHeight=M+"px",l.style.maxHeight=O+"px",r?.(),requestAnimationFrame(()=>h.current=!0)}},[p,s.trigger,s.valueNode,l,u,x,v,y,s.dir,r]);at(()=>S(),[S]);const[w,E]=m.useState();at(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const N=m.useCallback(_=>{_&&g.current===!0&&(S(),b?.(),g.current=!1)},[S,b]);return i.jsx(TO,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:h,onScrollButtonChange:N,children:i.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:i.jsx(ue.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});hb.displayName=AO;var PO="SelectPopperPosition",Vd=m.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=gn,...s}=e,a=Jc(n);return i.jsx(hc,{...a,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Vd.displayName=PO;var[TO,qp]=Rs(io,{}),Bd="SelectViewport",mb=m.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=Or(Bd,n),a=qp(Bd,n),l=Se(t,s.onViewportChange),c=m.useRef(0);return i.jsxs(i.Fragment,{children:[i.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),i.jsx(qc.Slot,{scope:n,children:i.jsx(ue.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:te(o.onScroll,u=>{const f=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:p}=a;if(p?.current&&d){const h=Math.abs(c.current-f.scrollTop);if(h>0){const g=window.innerHeight-gn*2,x=parseFloat(d.style.minHeight),v=parseFloat(d.style.height),y=Math.max(x,v);if(y<g){const b=y+h,S=Math.min(g,b),w=b-S;d.style.height=S+"px",d.style.bottom==="0px"&&(f.scrollTop=w>0?w:0,d.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});mb.displayName=Bd;var gb="SelectGroup",[OO,LO]=Rs(gb),xb=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=tt();return i.jsx(OO,{scope:n,id:o,children:i.jsx(ue.div,{role:"group","aria-labelledby":o,...r,ref:t})})});xb.displayName=gb;var vb="SelectLabel",yb=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=LO(vb,n);return i.jsx(ue.div,{id:o.id,...r,ref:t})});yb.displayName=vb;var Wl="SelectItem",[IO,bb]=Rs(Wl),wb=m.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...a}=e,l=Tr(Wl,n),c=Or(Wl,n),u=l.value===r,[f,d]=m.useState(s??""),[p,h]=m.useState(!1),g=Se(t,b=>c.itemRefCallback?.(b,r,o)),x=tt(),v=m.useRef("touch"),y=()=>{o||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return i.jsx(IO,{scope:n,value:r,disabled:o,textId:x,isSelected:u,onItemTextChange:m.useCallback(b=>{d(S=>S||(b?.textContent??"").trim())},[]),children:i.jsx(qc.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:i.jsx(ue.div,{role:"option","aria-labelledby":x,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...a,ref:g,onFocus:te(a.onFocus,()=>h(!0)),onBlur:te(a.onBlur,()=>h(!1)),onClick:te(a.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:te(a.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:te(a.onPointerDown,b=>{v.current=b.pointerType}),onPointerMove:te(a.onPointerMove,b=>{v.current=b.pointerType,o?c.onItemLeave?.():v.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:te(a.onPointerLeave,b=>{b.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:te(a.onKeyDown,b=>{c.searchRef?.current!==""&&b.key===" "||(SO.includes(b.key)&&y(),b.key===" "&&b.preventDefault())})})})})});wb.displayName=Wl;var na="SelectItemText",Cb=m.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,a=Tr(na,n),l=Or(na,n),c=bb(na,n),u=jO(na,n),[f,d]=m.useState(null),p=Se(t,y=>d(y),c.onItemTextChange,y=>l.itemTextRefCallback?.(y,c.value,c.disabled)),h=f?.textContent,g=m.useMemo(()=>i.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:x,onNativeOptionRemove:v}=u;return at(()=>(x(g),()=>v(g)),[x,v,g]),i.jsxs(i.Fragment,{children:[i.jsx(ue.span,{id:c.textId,...s,ref:p}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?lc.createPortal(s.children,a.valueNode):null]})});Cb.displayName=na;var Sb="SelectItemIndicator",Eb=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return bb(Sb,n).isSelected?i.jsx(ue.span,{"aria-hidden":!0,...r,ref:t}):null});Eb.displayName=Sb;var zd="SelectScrollUpButton",Nb=m.forwardRef((e,t)=>{const n=Or(zd,e.__scopeSelect),r=qp(zd,e.__scopeSelect),[o,s]=m.useState(!1),a=Se(t,r.onScrollButtonChange);return at(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollTop>0;s(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?i.jsx(jb,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});Nb.displayName=zd;var Wd="SelectScrollDownButton",_b=m.forwardRef((e,t)=>{const n=Or(Wd,e.__scopeSelect),r=qp(Wd,e.__scopeSelect),[o,s]=m.useState(!1),a=Se(t,r.onScrollButtonChange);return at(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<u;s(f)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?i.jsx(jb,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});_b.displayName=Wd;var jb=m.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=Or("SelectScrollButton",n),a=m.useRef(null),l=Xc(n),c=m.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return m.useEffect(()=>()=>c(),[c]),at(()=>{l().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),i.jsx(ue.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:te(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:te(o.onPointerMove,()=>{s.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:te(o.onPointerLeave,()=>{c()})})}),FO="SelectSeparator",kb=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return i.jsx(ue.div,{"aria-hidden":!0,...r,ref:t})});kb.displayName=FO;var Hd="SelectArrow",$O=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Jc(n),s=Tr(Hd,n),a=Or(Hd,n);return s.open&&a.position==="popper"?i.jsx(mc,{...o,...r,ref:t}):null});$O.displayName=Hd;var VO="SelectBubbleInput",Rb=m.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=m.useRef(null),s=Se(r,o),a=zc(t);return m.useEffect(()=>{const l=o.current;if(!l)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==t&&f){const d=new Event("change",{bubbles:!0});f.call(l,t),l.dispatchEvent(d)}},[a,t]),i.jsx(ue.select,{...n,style:{...lx,...n.style},ref:s,defaultValue:t})});Rb.displayName=VO;function Mb(e){return e===""||e===void 0}function Db(e){const t=dn(e),n=m.useRef(""),r=m.useRef(0),o=m.useCallback(a=>{const l=n.current+a;t(l),(function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(l)},[t]),s=m.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Ab(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=BO(e,Math.max(s,0));o.length===1&&(a=a.filter(u=>u!==n));const c=a.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function BO(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var zO=ob,Pb=ab,WO=lb,HO=cb,GO=ub,Tb=db,UO=mb,YO=xb,Ob=yb,Lb=wb,KO=Cb,ZO=Eb,Ib=Nb,Fb=_b,$b=kb;const qO=({dir:e,...t})=>i.jsx(zO,{dir:e??go(),...t}),XO=YO,JO=WO,Vb=m.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(Pb,{ref:r,className:j("flex h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-input 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]:min-w-0 [&>span]:truncate",e),...n,children:[t,i.jsx(HO,{asChild:!0,children:i.jsx(X,{name:"CaretDown",size:"sm",className:"opacity-50 shrink-0"})})]}));Vb.displayName=Pb.displayName;const Bb=m.forwardRef(({className:e,...t},n)=>i.jsx(Ib,{ref:n,className:j("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(X,{name:"CaretUp",size:"sm"})}));Bb.displayName=Ib.displayName;const zb=m.forwardRef(({className:e,...t},n)=>i.jsx(Fb,{ref:n,className:j("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(X,{name:"CaretDown",size:"sm"})}));zb.displayName=Fb.displayName;const Wb=m.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>i.jsx(GO,{children:i.jsxs(Tb,{ref:o,className:j("relative z-select max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-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",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:[i.jsx(Bb,{}),i.jsx(UO,{className:j("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),i.jsx(zb,{})]})}));Wb.displayName=Tb.displayName;const Hb=m.forwardRef(({className:e,...t},n)=>i.jsx(Ob,{ref:n,className:j("px-2 py-1.5 text-xs font-medium text-muted-foreground",e),...t}));Hb.displayName=Ob.displayName;const Gd=m.forwardRef(({className:e,children:t,badge:n,...r},o)=>i.jsxs(Lb,{ref:o,className:j("relative flex w-full cursor-default select-none items-center rounded-xs py-1.5 ps-2 pe-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[i.jsx("span",{className:"absolute end-2 flex h-4 w-4 items-center justify-center",children:i.jsx(ZO,{children:i.jsx(X,{name:"Check",size:"sm"})})}),i.jsx(KO,{children:t}),n&&i.jsx("span",{className:"ms-2 inline-flex items-center",children:n})]}));Gd.displayName=Lb.displayName;const QO=m.forwardRef(({className:e,...t},n)=>i.jsx($b,{ref:n,className:j("-mx-1 my-1 h-px bg-muted",e),...t}));QO.displayName=$b.displayName;const Gb=m.forwardRef(({label:e,description:t,error:n,info:r,requiredIndicator:o,required:s=!1,optional:a=!1,placeholder:l="Select an option",value:c,defaultValue:u,onChange:f,disabled:d=!1,options:p=[],groups:h=[],className:g,id:x,"aria-label":v},y)=>{const b=h.length>0,S=p.length>0;return i.jsxs("div",{className:j("w-full",g),children:[(e||r||o)&&i.jsxs("div",{className:"mb-2",children:[i.jsx(Wt,{htmlFor:x,info:r,requiredIndicator:o,required:s,disabled:d,children:e}),a&&!o&&i.jsx("p",{className:"text-sm font-medium leading-none text-muted-foreground",children:"(Optional)"})]}),t&&!n&&i.jsx("p",{className:j("text-sm font-medium leading-none",j("text-muted-foreground mb-2",d&&"opacity-50")),children:t}),i.jsxs(qO,{value:c,defaultValue:u,onValueChange:f,disabled:d,children:[i.jsx(Vb,{ref:y,id:x,"aria-label":v,className:j(n&&"border-destructive"),children:i.jsx(JO,{placeholder:l})}),i.jsxs(Wb,{children:[b&&h.map((w,E)=>i.jsxs(XO,{children:[w.label&&i.jsx(Hb,{children:w.label}),w.options.map(N=>i.jsxs(Gd,{value:N.value,badge:N.badge&&i.jsx(Ze,{variant:"info",children:N.badge}),children:[N.icon&&i.jsx("span",{className:"me-2 inline-flex items-center",children:N.icon}),N.label]},N.value))]},E)),!b&&S&&p.map(w=>i.jsx(Gd,{value:w.value,badge:w.badge&&i.jsx(Ze,{variant:"info",children:w.badge}),children:i.jsxs("span",{className:"flex items-center",children:[w.icon&&i.jsx("span",{className:"me-2 inline-flex items-center",children:w.icon}),w.label]})},w.value))]})]}),n&&i.jsx("p",{className:"text-sm font-medium leading-none text-destructive mt-2",children:n})]})});Gb.displayName="Select";const Ub=rv,Yb=ov,Xp=m.forwardRef(({className:e,align:t="start",sideOffset:n=4,...r},o)=>i.jsx(sv,{children:i.jsx(Dc,{ref:o,align:t,sideOffset:n,className:j("z-popover w-[var(--radix-popover-trigger-width)] rounded-md border bg-popover p-0 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),role:"combobox",...r})}));Xp.displayName=Dc.displayName;var k1=1,eL=.9,tL=.8,nL=.17,Fu=.1,$u=.999,rL=.9999,oL=.99,sL=/[\\\/_+.#"@\[\(\{&]/,aL=/[\\\/_+.#"@\[\(\{&]/g,iL=/[\s-]/,Kb=/[\s-]/g;function Ud(e,t,n,r,o,s,a){if(s===t.length)return o===e.length?k1:oL;var l=`${o},${s}`;if(a[l]!==void 0)return a[l];for(var c=r.charAt(s),u=n.indexOf(c,o),f=0,d,p,h,g;u>=0;)d=Ud(e,t,n,r,u+1,s+1,a),d>f&&(u===o?d*=k1:sL.test(e.charAt(u-1))?(d*=tL,h=e.slice(o,u-1).match(aL),h&&o>0&&(d*=Math.pow($u,h.length))):iL.test(e.charAt(u-1))?(d*=eL,g=e.slice(o,u-1).match(Kb),g&&o>0&&(d*=Math.pow($u,g.length))):(d*=nL,o>0&&(d*=Math.pow($u,u-o))),e.charAt(u)!==t.charAt(s)&&(d*=rL)),(d<Fu&&n.charAt(u-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(u-1)!==r.charAt(s))&&(p=Ud(e,t,n,r,u+1,s+2,a),p*Fu>d&&(d=p*Fu)),d>f&&(f=d),u=n.indexOf(c,u+1);return a[l]=f,f}function R1(e){return e.toLowerCase().replace(Kb," ")}function lL(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Ud(e,t,R1(e),R1(t),0,0,{})}function cL(e){const t=uL(e),n=m.forwardRef((r,o)=>{const{children:s,...a}=r,l=m.Children.toArray(s),c=l.find(fL);if(c){const u=c.props.children,f=l.map(d=>d===c?m.Children.count(u)>1?m.Children.only(null):m.isValidElement(u)?u.props.children:null:d);return i.jsx(t,{...a,ref:o,children:m.isValidElement(u)?m.cloneElement(u,void 0,f):null})}return i.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function uL(e){const t=m.forwardRef((n,r)=>{const{children:o,...s}=n;if(m.isValidElement(o)){const a=hL(o),l=pL(s,o.props);return o.type!==m.Fragment&&(l.ref=r?At(r,a):a),m.cloneElement(o,l)}return m.Children.count(o)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var dL=Symbol("radix.slottable");function fL(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===dL}function pL(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...l)=>{const c=s(...l);return o(...l),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function hL(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Qc="Dialog",[Zb]=St(Qc),[mL,Nn]=Zb(Qc),qb=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,l=m.useRef(null),c=m.useRef(null),[u,f]=mt({prop:r,defaultProp:o??!1,onChange:s,caller:Qc});return i.jsx(mL,{scope:t,triggerRef:l,contentRef:c,contentId:tt(),titleId:tt(),descriptionId:tt(),open:u,onOpenChange:f,onOpenToggle:m.useCallback(()=>f(d=>!d),[f]),modal:a,children:n})};qb.displayName=Qc;var Xb="DialogTrigger",gL=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Nn(Xb,n),s=Se(t,o.triggerRef);return i.jsx(ue.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":eh(o.open),...r,ref:s,onClick:te(e.onClick,o.onOpenToggle)})});gL.displayName=Xb;var Jp="DialogPortal",[xL,Jb]=Zb(Jp,{forceMount:void 0}),Qb=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=Nn(Jp,t);return i.jsx(xL,{scope:t,forceMount:n,children:m.Children.map(r,a=>i.jsx(Pt,{present:n||s.open,children:i.jsx(ws,{asChild:!0,container:o,children:a})}))})};Qb.displayName=Jp;var Hl="DialogOverlay",e5=m.forwardRef((e,t)=>{const n=Jb(Hl,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Nn(Hl,e.__scopeDialog);return s.modal?i.jsx(Pt,{present:r||s.open,children:i.jsx(yL,{...o,ref:t})}):null});e5.displayName=Hl;var vL=cL("DialogOverlay.RemoveScroll"),yL=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Nn(Hl,n);return i.jsx(si,{as:vL,allowPinchZoom:!0,shards:[o.contentRef],children:i.jsx(ue.div,{"data-state":eh(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),lo="DialogContent",t5=m.forwardRef((e,t)=>{const n=Jb(lo,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Nn(lo,e.__scopeDialog);return i.jsx(Pt,{present:r||s.open,children:s.modal?i.jsx(bL,{...o,ref:t}):i.jsx(wL,{...o,ref:t})})});t5.displayName=lo;var bL=m.forwardRef((e,t)=>{const n=Nn(lo,e.__scopeDialog),r=m.useRef(null),o=Se(t,n.contentRef,r);return m.useEffect(()=>{const s=r.current;if(s)return kc(s)},[]),i.jsx(n5,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:te(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:te(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&s.preventDefault()}),onFocusOutside:te(e.onFocusOutside,s=>s.preventDefault())})}),wL=m.forwardRef((e,t)=>{const n=Nn(lo,e.__scopeDialog),r=m.useRef(!1),o=m.useRef(!1);return i.jsx(n5,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),n5=m.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...a}=e,l=Nn(lo,n),c=m.useRef(null),u=Se(t,c);return jc(),i.jsxs(i.Fragment,{children:[i.jsx(oi,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:i.jsx(vs,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":eh(l.open),...a,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(NL,{titleId:l.titleId}),i.jsx(jL,{contentRef:c,descriptionId:l.descriptionId})]})]})}),Qp="DialogTitle",CL=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Nn(Qp,n);return i.jsx(ue.h2,{id:o.titleId,...r,ref:t})});CL.displayName=Qp;var r5="DialogDescription",SL=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Nn(r5,n);return i.jsx(ue.p,{id:o.descriptionId,...r,ref:t})});SL.displayName=r5;var o5="DialogClose",EL=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Nn(o5,n);return i.jsx(ue.button,{type:"button",...r,ref:t,onClick:te(e.onClick,()=>o.onOpenChange(!1))})});EL.displayName=o5;function eh(e){return e?"open":"closed"}var s5="DialogTitleWarning",[Hz,a5]=QC(s5,{contentName:lo,titleName:Qp,docsSlug:"dialog"}),NL=({titleId:e})=>{const t=a5(s5),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
79
79
|
|
|
80
80
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
81
81
|
|
|
82
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},SL="DialogDescriptionWarning",EL=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${s5(SL).contentName}}.`;return g.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},NL=Zb,_L=Jb,jL=Qb,kL=e5,Ks='[cmdk-group=""]',Vu='[cmdk-group-items=""]',RL='[cmdk-group-heading=""]',a5='[cmdk-item=""]',M1=`${a5}:not([aria-disabled="true"])`,Yd="cmdk-item-select",Wo="data-value",ML=(e,t,n)=>sL(e,t,n),i5=g.createContext(void 0),hi=()=>g.useContext(i5),l5=g.createContext(void 0),th=()=>g.useContext(l5),c5=g.createContext(void 0),u5=g.forwardRef((e,t)=>{let n=Ho(()=>{var A,W;return{search:"",value:(W=(A=e.value)!=null?A:e.defaultValue)!=null?W:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Ho(()=>new Set),o=Ho(()=>new Map),s=Ho(()=>new Map),a=Ho(()=>new Set),l=d5(e),{label:c,children:u,value:f,onValueChange:d,filter:p,shouldFilter:h,loop:m,disablePointerSelection:x=!1,vimBindings:v=!0,...y}=e,b=tt(),S=tt(),w=tt(),E=g.useRef(null),N=BL();co(()=>{if(f!==void 0){let A=f.trim();n.current.value=A,_.emit()}},[f]),co(()=>{N(6,R)},[]);let _=g.useMemo(()=>({subscribe:A=>(a.current.add(A),()=>a.current.delete(A)),snapshot:()=>n.current,setState:(A,W,H)=>{var T,B,Y,Z;if(!Object.is(n.current[A],W)){if(n.current[A]=W,A==="search")O(),F(),N(1,U);else if(A==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let q=document.getElementById(w);q?q.focus():(T=document.getElementById(b))==null||T.focus()}if(N(7,()=>{var q;n.current.selectedItemId=(q=L())==null?void 0:q.id,_.emit()}),H||N(5,R),((B=l.current)==null?void 0:B.value)!==void 0){let q=W??"";(Z=(Y=l.current).onValueChange)==null||Z.call(Y,q);return}}_.emit()}},emit:()=>{a.current.forEach(A=>A())}}),[]),k=g.useMemo(()=>({value:(A,W,H)=>{var T;W!==((T=s.current.get(A))==null?void 0:T.value)&&(s.current.set(A,{value:W,keywords:H}),n.current.filtered.items.set(A,I(W,H)),N(2,()=>{F(),_.emit()}))},item:(A,W)=>(r.current.add(A),W&&(o.current.has(W)?o.current.get(W).add(A):o.current.set(W,new Set([A]))),N(3,()=>{O(),F(),n.current.value||U(),_.emit()}),()=>{s.current.delete(A),r.current.delete(A),n.current.filtered.items.delete(A);let H=L();N(4,()=>{O(),H?.getAttribute("id")===A&&U(),_.emit()})}),group:A=>(o.current.has(A)||o.current.set(A,new Set),()=>{s.current.delete(A),o.current.delete(A)}),filter:()=>l.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:b,inputId:w,labelId:S,listInnerRef:E}),[]);function I(A,W){var H,T;let B=(T=(H=l.current)==null?void 0:H.filter)!=null?T:ML;return A?B(A,n.current.search,W):0}function F(){if(!n.current.search||l.current.shouldFilter===!1)return;let A=n.current.filtered.items,W=[];n.current.filtered.groups.forEach(T=>{let B=o.current.get(T),Y=0;B.forEach(Z=>{let q=A.get(Z);Y=Math.max(q,Y)}),W.push([T,Y])});let H=E.current;V().sort((T,B)=>{var Y,Z;let q=T.getAttribute("id"),oe=B.getAttribute("id");return((Y=A.get(oe))!=null?Y:0)-((Z=A.get(q))!=null?Z:0)}).forEach(T=>{let B=T.closest(Vu);B?B.appendChild(T.parentElement===B?T:T.closest(`${Vu} > *`)):H.appendChild(T.parentElement===H?T:T.closest(`${Vu} > *`))}),W.sort((T,B)=>B[1]-T[1]).forEach(T=>{var B;let Y=(B=E.current)==null?void 0:B.querySelector(`${Ks}[${Wo}="${encodeURIComponent(T[0])}"]`);Y?.parentElement.appendChild(Y)})}function U(){let A=V().find(H=>H.getAttribute("aria-disabled")!=="true"),W=A?.getAttribute(Wo);_.setState("value",W||void 0)}function O(){var A,W,H,T;if(!n.current.search||l.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let B=0;for(let Y of r.current){let Z=(W=(A=s.current.get(Y))==null?void 0:A.value)!=null?W:"",q=(T=(H=s.current.get(Y))==null?void 0:H.keywords)!=null?T:[],oe=I(Z,q);n.current.filtered.items.set(Y,oe),oe>0&&B++}for(let[Y,Z]of o.current)for(let q of Z)if(n.current.filtered.items.get(q)>0){n.current.filtered.groups.add(Y);break}n.current.filtered.count=B}function R(){var A,W,H;let T=L();T&&(((A=T.parentElement)==null?void 0:A.firstChild)===T&&((H=(W=T.closest(Ks))==null?void 0:W.querySelector(RL))==null||H.scrollIntoView({block:"nearest"})),T.scrollIntoView({block:"nearest"}))}function L(){var A;return(A=E.current)==null?void 0:A.querySelector(`${a5}[aria-selected="true"]`)}function V(){var A;return Array.from(((A=E.current)==null?void 0:A.querySelectorAll(M1))||[])}function D(A){let W=V()[A];W&&_.setState("value",W.getAttribute(Wo))}function $(A){var W;let H=L(),T=V(),B=T.findIndex(Z=>Z===H),Y=T[B+A];(W=l.current)!=null&&W.loop&&(Y=B+A<0?T[T.length-1]:B+A===T.length?T[0]:T[B+A]),Y&&_.setState("value",Y.getAttribute(Wo))}function z(A){let W=L(),H=W?.closest(Ks),T;for(;H&&!T;)H=A>0?$L(H,Ks):VL(H,Ks),T=H?.querySelector(M1);T?_.setState("value",T.getAttribute(Wo)):$(A)}let P=()=>D(V().length-1),M=A=>{A.preventDefault(),A.metaKey?P():A.altKey?z(1):$(1)},G=A=>{A.preventDefault(),A.metaKey?D(0):A.altKey?z(-1):$(-1)};return g.createElement(ue.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:A=>{var W;(W=y.onKeyDown)==null||W.call(y,A);let H=A.nativeEvent.isComposing||A.keyCode===229;if(!(A.defaultPrevented||H))switch(A.key){case"n":case"j":{v&&A.ctrlKey&&M(A);break}case"ArrowDown":{M(A);break}case"p":case"k":{v&&A.ctrlKey&&G(A);break}case"ArrowUp":{G(A);break}case"Home":{A.preventDefault(),D(0);break}case"End":{A.preventDefault(),P();break}case"Enter":{A.preventDefault();let T=L();if(T){let B=new Event(Yd);T.dispatchEvent(B)}}}}},g.createElement("label",{"cmdk-label":"",htmlFor:k.inputId,id:k.labelId,style:WL},c),eu(e,A=>g.createElement(l5.Provider,{value:_},g.createElement(i5.Provider,{value:k},A))))}),DL=g.forwardRef((e,t)=>{var n,r;let o=tt(),s=g.useRef(null),a=g.useContext(c5),l=hi(),c=d5(e),u=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:a?.forceMount;co(()=>{if(!u)return l.item(o,a?.id)},[u]);let f=f5(o,s,[e.value,e.children,s],e.keywords),d=th(),p=_r(N=>N.value&&N.value===f.current),h=_r(N=>u||l.filter()===!1?!0:N.search?N.filtered.items.get(o)>0:!0);g.useEffect(()=>{let N=s.current;if(!(!N||e.disabled))return N.addEventListener(Yd,m),()=>N.removeEventListener(Yd,m)},[h,e.onSelect,e.disabled]);function m(){var N,_;x(),(_=(N=c.current).onSelect)==null||_.call(N,f.current)}function x(){d.setState("value",f.current,!0)}if(!h)return null;let{disabled:v,value:y,onSelect:b,forceMount:S,keywords:w,...E}=e;return g.createElement(ue.div,{ref:At(s,t),...E,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!p,"data-disabled":!!v,"data-selected":!!p,onPointerMove:v||l.getDisablePointerSelection()?void 0:x,onClick:v?void 0:m},e.children)}),AL=g.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...s}=e,a=tt(),l=g.useRef(null),c=g.useRef(null),u=tt(),f=hi(),d=_r(h=>o||f.filter()===!1?!0:h.search?h.filtered.groups.has(a):!0);co(()=>f.group(a),[]),f5(a,l,[e.value,e.heading,c]);let p=g.useMemo(()=>({id:a,forceMount:o}),[o]);return g.createElement(ue.div,{ref:At(l,t),...s,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&g.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),eu(e,h=>g.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},g.createElement(c5.Provider,{value:p},h))))}),TL=g.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=g.useRef(null),s=_r(a=>!a.search);return!n&&!s?null:g.createElement(ue.div,{ref:At(o,t),...r,"cmdk-separator":"",role:"separator"})}),PL=g.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,s=th(),a=_r(u=>u.search),l=_r(u=>u.selectedItemId),c=hi();return g.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),g.createElement(ue.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":l,id:c.inputId,type:"text",value:o?e.value:a,onChange:u=>{o||s.setState("search",u.target.value),n?.(u.target.value)}})}),OL=g.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,s=g.useRef(null),a=g.useRef(null),l=_r(u=>u.selectedItemId),c=hi();return g.useEffect(()=>{if(a.current&&s.current){let u=a.current,f=s.current,d,p=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let h=u.offsetHeight;f.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(d),p.unobserve(u)}}},[]),g.createElement(ue.div,{ref:At(s,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":r,id:c.listId},eu(e,u=>g.createElement("div",{ref:At(a,c.listInnerRef),"cmdk-list-sizer":""},u)))}),LL=g.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:s,container:a,...l}=e;return g.createElement(NL,{open:n,onOpenChange:r},g.createElement(_L,{container:a},g.createElement(jL,{"cmdk-overlay":"",className:o}),g.createElement(kL,{"aria-label":e.label,"cmdk-dialog":"",className:s},g.createElement(u5,{ref:t,...l}))))}),IL=g.forwardRef((e,t)=>_r(n=>n.filtered.count===0)?g.createElement(ue.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),FL=g.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...s}=e;return g.createElement(ue.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},eu(e,a=>g.createElement("div",{"aria-hidden":!0},a)))}),Ms=Object.assign(u5,{List:OL,Item:DL,Input:PL,Group:AL,Separator:TL,Dialog:LL,Empty:IL,Loading:FL});function $L(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function VL(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function d5(e){let t=g.useRef(e);return co(()=>{t.current=e}),t}var co=typeof window>"u"?g.useEffect:g.useLayoutEffect;function Ho(e){let t=g.useRef();return t.current===void 0&&(t.current=e()),t}function _r(e){let t=th(),n=()=>e(t.snapshot());return g.useSyncExternalStore(t.subscribe,n,n)}function f5(e,t,n,r=[]){let o=g.useRef(),s=hi();return co(()=>{var a;let l=(()=>{var u;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(u=f.current.textContent)==null?void 0:u.trim():o.current}})(),c=r.map(u=>u.trim());s.value(e,l,c),(a=t.current)==null||a.setAttribute(Wo,l),o.current=l}),o}var BL=()=>{let[e,t]=g.useState(),n=Ho(()=>new Map);return co(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function zL(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function eu({asChild:e,children:t},n){return e&&g.isValidElement(t)?g.cloneElement(zL(t),{ref:t.ref},n(t.props.children)):n(t)}var WL={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function p5({className:e,...t}){return i.jsx(Ms,{"data-slot":"command",className:j("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function h5({className:e,...t}){return i.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[i.jsx(X,{name:"MagnifyingGlass",className:"size-4 shrink-0 opacity-50"}),i.jsx(Ms.Input,{"data-slot":"command-input",className:j("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function g5({className:e,...t}){return i.jsx(Ms.List,{"data-slot":"command-list",className:j("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function m5({...e}){return i.jsx(Ms.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function x5({className:e,...t}){return i.jsx(Ms.Group,{"data-slot":"command-group",className:j("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function Kd({className:e,...t}){return i.jsx(Ms.Item,{"data-slot":"command-item",className:j("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}const D1="__yuno_search_select_no_highlight__",HL="end",v5=g.forwardRef(({label:e,description:t,error:n,optional:r=!1,placeholder:o="Select an option",value:s,defaultValue:a,onChange:l,disabled:c=!1,options:u=[],groups:f=[],className:d,id:p,searchPlaceholder:h="Search",maxHeight:m=300,actionName:x,showItemValue:v=!1,showItemValueCopy:y=!0,showSelectedCheck:b=!0,contentWidth:S,"aria-label":w,"aria-labelledby":E,footer:N},_)=>{const[k,I]=g.useState(!1),[F,U]=g.useState(""),[O,R]=g.useState(D1),L=g.useCallback(B=>{R(D1),I(B)},[]),V=f.length>0,D=u.length>0,$=g.useCallback(()=>{if(!s)return null;if(V)for(const B of f){const Y=B.options.find(Z=>Z.value===s);if(Y)return Y.label}else if(D){const B=u.find(Y=>Y.value===s);if(B)return B.label}return null},[s,f,u,V,D]),z=g.useCallback(B=>{if(!B)return{filteredOptions:u,filteredGroups:f};const Y=B.toLowerCase();if(V){const Z=f.map(q=>({...q,options:q.options.filter(oe=>ut(oe.label).toLowerCase().includes(Y))})).filter(q=>q.options.length>0);return{filteredOptions:[],filteredGroups:Z}}else return{filteredOptions:u.filter(q=>ut(q.label).toLowerCase().includes(Y)),filteredGroups:[]}},[u,f,V]),{filteredOptions:P,filteredGroups:M}=z(ut(F));g.useEffect(()=>{k&&setTimeout(()=>{document.querySelector('[data-slot="command-input"]')?.focus()},0)},[k]),g.useEffect(()=>{if(!k||!s)return;const B=setTimeout(()=>{document.querySelector('[data-slot="command-list"] [data-selected-option="true"]')?.scrollIntoView({block:HL})},0);return()=>clearTimeout(B)},[k,s]),g.useEffect(()=>{k||U("")},[k]),g.useEffect(()=>{a&&!s&&l?.(a)},[a,s,l]);const G=B=>{c||(l?.(B),I(!1))},A=(B,Y)=>{B.stopPropagation(),B.preventDefault(),navigator.clipboard?.writeText(Y)},W=B=>v&&B?i.jsxs("span",{className:"flex items-center justify-between gap-2 text-xs text-muted-foreground",children:[i.jsx("span",{className:"truncate",children:B}),y&&i.jsx("button",{type:"button","aria-label":"Copy value",onPointerDown:Y=>Y.stopPropagation(),onClick:Y=>A(Y,B),className:"shrink-0 text-muted-foreground hover:text-foreground",children:i.jsx(X,{name:"Copy",size:"sm"})})]}):null,H=B=>i.jsxs("span",{className:"flex items-center justify-between gap-2",children:[i.jsxs("span",{className:"flex min-w-0 items-center",children:[B.icon&&i.jsx("span",{className:"mr-2 inline-flex items-center",children:B.icon}),i.jsx("span",{className:"truncate",children:B.label})]}),B.badge&&i.jsx(Ze,{variant:"info",children:B.badge})]}),T=$();return i.jsxs("div",{dir:mo(),className:j("w-full",d),children:[e&&i.jsxs("div",{className:"flex items-center gap-1 mb-2",children:[i.jsx(Ns,{htmlFor:p,className:j(c&&"text-muted-foreground"),children:e}),r&&i.jsx("p",{className:"text-sm font-medium leading-none text-muted-foreground",children:"(Optional)"})]}),t&&!n&&i.jsx("p",{className:j("text-sm font-medium leading-none",j("text-muted-foreground mb-2",c&&"text-muted-")),children:t}),i.jsxs(Gb,{open:k,onOpenChange:L,children:[i.jsx(Ub,{asChild:!0,children:i.jsxs("button",{ref:_,id:p,type:"button",disabled:c,role:"combobox","aria-expanded":k,"aria-haspopup":"listbox","aria-label":w,"aria-labelledby":E,"data-action-name":x,className:j("flex h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-input 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:text-muted- shadow-xs [&>span]:min-w-0 [&>span]:truncate",n&&"border-destructive"),children:[i.jsx("span",{className:j("truncate",!T&&"text-muted-foreground"),children:T||o}),i.jsx(X,{name:"CaretDown",size:"sm",className:"text-muted- shrink-0"})]})}),i.jsx(Xp,{className:"p-0",align:"start",style:S?{width:S}:void 0,children:i.jsxs(p5,{shouldFilter:!1,value:O,onValueChange:R,children:[i.jsx(h5,{placeholder:h,"aria-label":h,value:F,onValueChange:U}),i.jsxs(g5,{style:{maxHeight:m},children:[i.jsx(m5,{children:i.jsx("p",{className:"text-sm font-medium leading-none text-muted-foreground py-6 text-center",children:"No results found."})}),V?M.map((B,Y)=>i.jsxs(x5,{children:[B.label&&i.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:B.label}),B.options.map(Z=>i.jsxs(Kd,{value:Z.value,onSelect:()=>G(Z.value),"data-selected-option":s===Z.value?!0:void 0,className:j("cursor-pointer rounded-none",s===Z.value&&"bg-accent"),children:[i.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-2",children:[H(Z),W(Z.value)]}),b&&s===Z.value&&i.jsx(X,{name:"Check",size:"sm",className:"ml-auto"})]},Z.value))]},Y)):P.map(B=>i.jsxs(Kd,{value:B.value,onSelect:()=>G(B.value),"data-selected-option":s===B.value?!0:void 0,className:j("cursor-pointer rounded-none",s===B.value&&"bg-accent"),children:[i.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-2",children:[H(B),W(B.value)]}),b&&s===B.value&&i.jsx(X,{name:"Check",size:"sm",className:"ml-auto"})]},B.value))]}),N]})})]}),n&&i.jsx("p",{className:"text-sm font-medium leading-none text-destructive mt-2",children:n})]})});v5.displayName="SearchSelect";const y5=C.forwardRef(({value:e,variant:t="info",startIcon:n,emptyState:r="-",className:o},s)=>e?i.jsx(Ze,{ref:s,variant:t,startIcon:n,className:o,children:e}):i.jsx(i.Fragment,{children:r}));y5.displayName="DataTableBadgeCell";const GL=e=>!!(e==null||typeof e=="string"&&e.trim()===""||Array.isArray(e)&&e.length===0),b5=C.forwardRef(({value:e,children:t,emptyState:n="-"},r)=>GL(e)?i.jsx("span",{ref:r,children:n}):i.jsx(i.Fragment,{children:t}));b5.displayName="DataTableCellWrapper";const w5=C.forwardRef(({value:e,formatFn:t,tooltip:n,emptyState:r="-",className:o},s)=>{if(!e)return i.jsx(i.Fragment,{children:r});const a=t?t(e):e,l=n===!1?null:n??a;return l?i.jsx(Mt,{children:i.jsxs(Vt,{children:[i.jsx(Bt,{asChild:!0,children:i.jsx("div",{ref:s,className:j("truncate text-sm",o),children:a})}),i.jsx(Dt,{children:i.jsx("p",{children:l})})]})}):i.jsx("div",{ref:s,className:j("truncate text-sm",o),children:a})});w5.displayName="DataTableTextCell";const C5=e=>({copyToClipboard:C.useCallback(async n=>{const r=e?.successMessage??"Copied to clipboard",o=e?.errorMessage??"Failed to copy to clipboard";try{await navigator.clipboard.writeText(n),Kn.success(r),e?.onSuccess?.()}catch{try{const s=document.createElement("textarea");s.value=n,s.style.position="fixed",s.style.opacity="0",s.style.pointerEvents="none",document.body.appendChild(s);let a;try{s.focus(),s.select(),a=document.execCommand("copy")}finally{document.body.removeChild(s)}if(a)Kn.success(r),e?.onSuccess?.();else throw new Error("Copy command failed")}catch{Kn.error(o),e?.onError?.()}}},[e])}),S5=C.forwardRef(({value:e,linkTo:t,startIcon:n,startIconTooltip:r,copyTooltip:o="Copy",onCopySuccess:s,onCopyError:a,emptyState:l="-",className:c},u)=>{const{copyToClipboard:f}=C5({onSuccess:s,onError:a});if(!e)return i.jsx(i.Fragment,{children:l});const d=p=>{p.stopPropagation(),f(e)};return i.jsxs("div",{ref:u,className:j("flex items-center gap-2 w-full",c),children:[n&&i.jsx(Mt,{children:i.jsxs(Vt,{children:[i.jsx(Bt,{asChild:!0,children:i.jsx("span",{className:"shrink-0 inline-flex",children:i.jsx(X,{name:n,weight:"fill",size:"sm",className:"text-primary"})})}),r&&i.jsx(Dt,{children:i.jsx("p",{children:r})})]})}),i.jsx(Mt,{children:i.jsxs(Vt,{children:[i.jsx(Bt,{asChild:!0,children:i.jsx("span",{className:"truncate text-sm",children:t?i.jsx("a",{href:t,className:"text-primary hover:underline",onClick:p=>p.stopPropagation(),children:e}):e})}),i.jsx(Dt,{children:i.jsx("p",{children:e})})]})}),i.jsx(Mt,{children:i.jsxs(Vt,{children:[i.jsx(Bt,{asChild:!0,children:i.jsx("button",{type:"button","aria-label":o,className:"shrink-0 p-1 hover:bg-muted rounded",onClick:d,children:i.jsx(X,{name:"CopySimple",size:"sm",className:"text-muted-foreground"})})}),i.jsx(Dt,{children:i.jsx("p",{children:o})})]})})]})});S5.displayName="DataTableCopyCell";const UL=e=>{if(!e)return e;const t=e.replace(/[_.]/g," ").toLowerCase();return t.charAt(0).toUpperCase()+t.slice(1)},E5=C.forwardRef(({status:e,statusMap:t,formatLabel:n=UL,emptyState:r="-",className:o},s)=>{if(!e)return i.jsx(i.Fragment,{children:r});const a=t?.[e]??t?.[e.toUpperCase()];return a?i.jsx("div",{ref:s,className:j(o),children:i.jsx(Ze,{startIcon:a.icon??"Info",variant:a.variant,children:a.label})}):i.jsx("div",{ref:s,className:j(o),children:i.jsx(Ze,{startIcon:"Info",variant:"info",children:n(e)})})});E5.displayName="DataTableStatusCell";const N5=C.forwardRef(({value:e,currency:t="USD",locales:n,size:r="xs",showCurrencyCode:o=!0,emptyState:s="-",className:a},l)=>e==null||Number.isNaN(e)?i.jsx(i.Fragment,{children:s}):i.jsx("div",{ref:l,className:j("flex",a),children:i.jsx(ip,{value:e,currency:t,locales:n,size:r,showCurrencyCode:o})}));N5.displayName="DataTableAmountCell";const YL=e=>{try{const t=typeof e=="string"?new Date(e):e;return new Intl.DateTimeFormat("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(t)}catch{return String(e)}},_5=C.forwardRef(({value:e,formatFn:t,emptyState:n="-",className:r},o)=>{if(!e)return i.jsx(i.Fragment,{children:n});const a=(t??YL)(e);return i.jsx(Mt,{children:i.jsxs(Vt,{children:[i.jsx(Bt,{asChild:!0,children:i.jsx("div",{ref:o,className:j("truncate text-sm",r),children:a})}),i.jsx(Dt,{children:i.jsx("p",{children:a})})]})})});_5.displayName="DataTableDateCell";const KL=e=>{if(typeof e!="string")return"";const t=e.trim().toUpperCase();return/^[A-Z]{2}$/.test(t)?String.fromCodePoint(...[...t].map(n=>n.charCodeAt(0)+127397)):""},j5=C.forwardRef(({code:e,showFlag:t=!0,showName:n=!1,getCountryName:r,emptyState:o="-",className:s},a)=>{if(!e)return i.jsx(i.Fragment,{children:o});const l=t?KL(e):null,c=r?r(e):null,u=n&&c?c:e.toUpperCase(),f=c??e.toUpperCase();return i.jsx(Mt,{children:i.jsxs(Vt,{children:[i.jsx(Bt,{asChild:!0,children:i.jsxs("div",{ref:a,className:j("flex items-center gap-1 truncate text-sm",s),children:[l&&i.jsx("span",{className:"shrink-0",children:l}),i.jsx("span",{className:"truncate",children:u})]})}),i.jsx(Dt,{children:i.jsxs("p",{children:[l&&`${l} `,f]})})]})})});j5.displayName="DataTableCountryCell";const k5=C.forwardRef(({value:e,decimals:t=2,showProgressBar:n=!1,emptyState:r="-",className:o},s)=>{if(e==null)return i.jsx(i.Fragment,{children:r});const a=e*100,l=new Intl.NumberFormat("en-US",{minimumFractionDigits:0,maximumFractionDigits:t}).format(a);return i.jsxs("div",{ref:s,className:j("flex items-center gap-3",o),children:[n&&i.jsx("div",{className:"h-1.5 flex-1 min-w-[50px] rounded-full bg-muted overflow-hidden",children:i.jsx("div",{className:"h-full rounded-full bg-primary transition-all",style:{width:`${Math.min(a,100)}%`}})}),i.jsxs("span",{className:"text-sm whitespace-nowrap",children:[l,"%"]})]})});k5.displayName="DataTablePercentageCell";const R5=C.forwardRef(({tags:e,maxVisible:t=2,variant:n="outline",emptyState:r="-",className:o},s)=>{if(!e||e.length===0)return i.jsx(i.Fragment,{children:r});const a=e.slice(0,t),l=e.slice(t);return i.jsxs("div",{ref:s,className:j("flex items-center gap-1 flex-wrap",o),children:[a.map(c=>i.jsx(Ze,{variant:n,className:"text-xs",children:c},c)),l.length>0&&i.jsx(Mt,{delayDuration:0,children:i.jsxs(Vt,{children:[i.jsx(Bt,{children:i.jsxs(Ze,{variant:"outline",className:"text-xs cursor-pointer hover:border-primary hover:text-primary",children:["+",l.length]})}),i.jsx(Dt,{className:"p-2",children:i.jsx("div",{className:"space-y-1",children:l.map(c=>i.jsx("p",{className:"text-sm",children:c},c))})})]})})]})});R5.displayName="DataTableTagsCell";const M5=C.forwardRef(({items:e,maxVisible:t=1,emptyState:n="-",className:r},o)=>{if(!e||e.length===0)return i.jsx(i.Fragment,{children:n});const s=new Set,a=e.filter(u=>!u.name||s.has(u.name)?!1:(s.add(u.name),!0));if(a.length===0)return i.jsx(i.Fragment,{children:n});const l=a.slice(0,t),c=a.slice(t);return i.jsxs("div",{ref:o,className:j("flex items-center gap-2",r),children:[l.map(u=>i.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[u.src&&i.jsx("img",{src:u.src,alt:u.name,className:"h-4 w-4 shrink-0 object-contain",onError:f=>{f.currentTarget.style.display="none"}}),!u.src&&u.iconName&&i.jsx(X,{name:u.iconName,size:"sm",className:"shrink-0"}),i.jsx(Mt,{children:i.jsxs(Vt,{children:[i.jsx(Bt,{asChild:!0,children:i.jsx("span",{className:"truncate text-sm",children:u.name})}),i.jsx(Dt,{children:i.jsx("p",{children:u.name})})]})})]},u.name)),c.length>0&&i.jsx(Mt,{delayDuration:0,children:i.jsxs(Vt,{children:[i.jsx(Bt,{className:"shrink-0",children:i.jsxs(Ze,{variant:"outline",className:"text-xs cursor-pointer hover:border-primary hover:text-primary",children:["+",c.length]})}),i.jsx(Dt,{className:"p-2",children:i.jsx("div",{className:"space-y-2",children:c.map(u=>i.jsxs("div",{className:"flex items-center gap-3",children:[u.src&&i.jsx("img",{src:u.src,alt:u.name,className:"h-4 w-4 object-contain",onError:f=>{f.currentTarget.style.display="none"}}),!u.src&&u.iconName&&i.jsx(X,{name:u.iconName,size:"sm"}),i.jsx("span",{className:"text-sm",children:u.name})]},u.name))})})]})})]})});M5.displayName="DataTableIconTextCell";const D5=C.forwardRef(({items:e,maxVisible:t=4,emptyState:n="-",className:r},o)=>{if(!e||e.length===0)return i.jsx(i.Fragment,{children:n});const s=new Set,a=e.filter(f=>!f.name||s.has(f.name)?!1:(s.add(f.name),!0));if(a.length===0)return i.jsx(i.Fragment,{children:n});const l=a.slice(0,t),c=a.slice(t),u=f=>f.src?i.jsx("img",{src:f.src,alt:f.name,className:"h-5 w-5 shrink-0 object-contain",onError:d=>{d.currentTarget.style.display="none"}}):f.iconName?i.jsx(X,{name:f.iconName,size:"sm",className:"shrink-0"}):null;return i.jsxs("div",{ref:o,className:j("flex items-center gap-1.5",r),children:[l.map(f=>i.jsx(Mt,{children:i.jsxs(Vt,{children:[i.jsx(Bt,{asChild:!0,children:i.jsx("span",{className:"inline-flex shrink-0",children:u(f)})}),i.jsx(Dt,{children:i.jsx("p",{children:f.name})})]})},f.name)),c.length>0&&i.jsx(Mt,{delayDuration:0,children:i.jsxs(Vt,{children:[i.jsx(Bt,{className:"shrink-0",children:i.jsxs(Ze,{variant:"outline",className:"text-xs cursor-pointer hover:border-primary hover:text-primary",children:["+",c.length]})}),i.jsx(Dt,{className:"p-2",children:i.jsx("div",{className:"space-y-1",children:c.map(f=>i.jsx("div",{className:"text-sm",children:f.name},f.name))})})]})})]})});D5.displayName="DataTableIconCell";function xr(e,t){return typeof e=="function"?e(t):e}function Xt(e,t){return n=>{t.setState(r=>({...r,[e]:xr(n,r[e])}))}}function tu(e){return e instanceof Function}function ZL(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function qL(e,t){const n=[],r=o=>{o.forEach(s=>{n.push(s);const a=t(s);a!=null&&a.length&&r(a)})};return r(e),n}function he(e,t,n){let r=[],o;return s=>{let a;n.key&&n.debug&&(a=Date.now());const l=e(s);if(!(l.length!==r.length||l.some((f,d)=>r[d]!==f)))return o;r=l;let u;if(n.key&&n.debug&&(u=Date.now()),o=t(...l),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const f=Math.round((Date.now()-a)*100)/100,d=Math.round((Date.now()-u)*100)/100,p=d/16,h=(m,x)=>{for(m=String(m);m.length<x;)m=" "+m;return m};console.info(`%c⏱ ${h(d,5)} /${h(f,5)} ms`,`
|
|
82
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return m.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},_L="DialogDescriptionWarning",jL=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${a5(_L).contentName}}.`;return m.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},kL=qb,RL=Qb,ML=e5,DL=t5,Ks='[cmdk-group=""]',Vu='[cmdk-group-items=""]',AL='[cmdk-group-heading=""]',i5='[cmdk-item=""]',M1=`${i5}:not([aria-disabled="true"])`,Yd="cmdk-item-select",Wo="data-value",PL=(e,t,n)=>lL(e,t,n),l5=m.createContext(void 0),hi=()=>m.useContext(l5),c5=m.createContext(void 0),th=()=>m.useContext(c5),u5=m.createContext(void 0),d5=m.forwardRef((e,t)=>{let n=Ho(()=>{var A,W;return{search:"",value:(W=(A=e.value)!=null?A:e.defaultValue)!=null?W:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Ho(()=>new Set),o=Ho(()=>new Map),s=Ho(()=>new Map),a=Ho(()=>new Set),l=f5(e),{label:c,children:u,value:f,onValueChange:d,filter:p,shouldFilter:h,loop:g,disablePointerSelection:x=!1,vimBindings:v=!0,...y}=e,b=tt(),S=tt(),w=tt(),E=m.useRef(null),N=HL();co(()=>{if(f!==void 0){let A=f.trim();n.current.value=A,_.emit()}},[f]),co(()=>{N(6,R)},[]);let _=m.useMemo(()=>({subscribe:A=>(a.current.add(A),()=>a.current.delete(A)),snapshot:()=>n.current,setState:(A,W,H)=>{var P,B,Y,Z;if(!Object.is(n.current[A],W)){if(n.current[A]=W,A==="search")O(),F(),N(1,U);else if(A==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let q=document.getElementById(w);q?q.focus():(P=document.getElementById(b))==null||P.focus()}if(N(7,()=>{var q;n.current.selectedItemId=(q=L())==null?void 0:q.id,_.emit()}),H||N(5,R),((B=l.current)==null?void 0:B.value)!==void 0){let q=W??"";(Z=(Y=l.current).onValueChange)==null||Z.call(Y,q);return}}_.emit()}},emit:()=>{a.current.forEach(A=>A())}}),[]),k=m.useMemo(()=>({value:(A,W,H)=>{var P;W!==((P=s.current.get(A))==null?void 0:P.value)&&(s.current.set(A,{value:W,keywords:H}),n.current.filtered.items.set(A,I(W,H)),N(2,()=>{F(),_.emit()}))},item:(A,W)=>(r.current.add(A),W&&(o.current.has(W)?o.current.get(W).add(A):o.current.set(W,new Set([A]))),N(3,()=>{O(),F(),n.current.value||U(),_.emit()}),()=>{s.current.delete(A),r.current.delete(A),n.current.filtered.items.delete(A);let H=L();N(4,()=>{O(),H?.getAttribute("id")===A&&U(),_.emit()})}),group:A=>(o.current.has(A)||o.current.set(A,new Set),()=>{s.current.delete(A),o.current.delete(A)}),filter:()=>l.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:b,inputId:w,labelId:S,listInnerRef:E}),[]);function I(A,W){var H,P;let B=(P=(H=l.current)==null?void 0:H.filter)!=null?P:PL;return A?B(A,n.current.search,W):0}function F(){if(!n.current.search||l.current.shouldFilter===!1)return;let A=n.current.filtered.items,W=[];n.current.filtered.groups.forEach(P=>{let B=o.current.get(P),Y=0;B.forEach(Z=>{let q=A.get(Z);Y=Math.max(q,Y)}),W.push([P,Y])});let H=E.current;V().sort((P,B)=>{var Y,Z;let q=P.getAttribute("id"),oe=B.getAttribute("id");return((Y=A.get(oe))!=null?Y:0)-((Z=A.get(q))!=null?Z:0)}).forEach(P=>{let B=P.closest(Vu);B?B.appendChild(P.parentElement===B?P:P.closest(`${Vu} > *`)):H.appendChild(P.parentElement===H?P:P.closest(`${Vu} > *`))}),W.sort((P,B)=>B[1]-P[1]).forEach(P=>{var B;let Y=(B=E.current)==null?void 0:B.querySelector(`${Ks}[${Wo}="${encodeURIComponent(P[0])}"]`);Y?.parentElement.appendChild(Y)})}function U(){let A=V().find(H=>H.getAttribute("aria-disabled")!=="true"),W=A?.getAttribute(Wo);_.setState("value",W||void 0)}function O(){var A,W,H,P;if(!n.current.search||l.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let B=0;for(let Y of r.current){let Z=(W=(A=s.current.get(Y))==null?void 0:A.value)!=null?W:"",q=(P=(H=s.current.get(Y))==null?void 0:H.keywords)!=null?P:[],oe=I(Z,q);n.current.filtered.items.set(Y,oe),oe>0&&B++}for(let[Y,Z]of o.current)for(let q of Z)if(n.current.filtered.items.get(q)>0){n.current.filtered.groups.add(Y);break}n.current.filtered.count=B}function R(){var A,W,H;let P=L();P&&(((A=P.parentElement)==null?void 0:A.firstChild)===P&&((H=(W=P.closest(Ks))==null?void 0:W.querySelector(AL))==null||H.scrollIntoView({block:"nearest"})),P.scrollIntoView({block:"nearest"}))}function L(){var A;return(A=E.current)==null?void 0:A.querySelector(`${i5}[aria-selected="true"]`)}function V(){var A;return Array.from(((A=E.current)==null?void 0:A.querySelectorAll(M1))||[])}function D(A){let W=V()[A];W&&_.setState("value",W.getAttribute(Wo))}function $(A){var W;let H=L(),P=V(),B=P.findIndex(Z=>Z===H),Y=P[B+A];(W=l.current)!=null&&W.loop&&(Y=B+A<0?P[P.length-1]:B+A===P.length?P[0]:P[B+A]),Y&&_.setState("value",Y.getAttribute(Wo))}function z(A){let W=L(),H=W?.closest(Ks),P;for(;H&&!P;)H=A>0?zL(H,Ks):WL(H,Ks),P=H?.querySelector(M1);P?_.setState("value",P.getAttribute(Wo)):$(A)}let T=()=>D(V().length-1),M=A=>{A.preventDefault(),A.metaKey?T():A.altKey?z(1):$(1)},G=A=>{A.preventDefault(),A.metaKey?D(0):A.altKey?z(-1):$(-1)};return m.createElement(ue.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:A=>{var W;(W=y.onKeyDown)==null||W.call(y,A);let H=A.nativeEvent.isComposing||A.keyCode===229;if(!(A.defaultPrevented||H))switch(A.key){case"n":case"j":{v&&A.ctrlKey&&M(A);break}case"ArrowDown":{M(A);break}case"p":case"k":{v&&A.ctrlKey&&G(A);break}case"ArrowUp":{G(A);break}case"Home":{A.preventDefault(),D(0);break}case"End":{A.preventDefault(),T();break}case"Enter":{A.preventDefault();let P=L();if(P){let B=new Event(Yd);P.dispatchEvent(B)}}}}},m.createElement("label",{"cmdk-label":"",htmlFor:k.inputId,id:k.labelId,style:UL},c),eu(e,A=>m.createElement(c5.Provider,{value:_},m.createElement(l5.Provider,{value:k},A))))}),TL=m.forwardRef((e,t)=>{var n,r;let o=tt(),s=m.useRef(null),a=m.useContext(u5),l=hi(),c=f5(e),u=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:a?.forceMount;co(()=>{if(!u)return l.item(o,a?.id)},[u]);let f=p5(o,s,[e.value,e.children,s],e.keywords),d=th(),p=_r(N=>N.value&&N.value===f.current),h=_r(N=>u||l.filter()===!1?!0:N.search?N.filtered.items.get(o)>0:!0);m.useEffect(()=>{let N=s.current;if(!(!N||e.disabled))return N.addEventListener(Yd,g),()=>N.removeEventListener(Yd,g)},[h,e.onSelect,e.disabled]);function g(){var N,_;x(),(_=(N=c.current).onSelect)==null||_.call(N,f.current)}function x(){d.setState("value",f.current,!0)}if(!h)return null;let{disabled:v,value:y,onSelect:b,forceMount:S,keywords:w,...E}=e;return m.createElement(ue.div,{ref:At(s,t),...E,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!p,"data-disabled":!!v,"data-selected":!!p,onPointerMove:v||l.getDisablePointerSelection()?void 0:x,onClick:v?void 0:g},e.children)}),OL=m.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...s}=e,a=tt(),l=m.useRef(null),c=m.useRef(null),u=tt(),f=hi(),d=_r(h=>o||f.filter()===!1?!0:h.search?h.filtered.groups.has(a):!0);co(()=>f.group(a),[]),p5(a,l,[e.value,e.heading,c]);let p=m.useMemo(()=>({id:a,forceMount:o}),[o]);return m.createElement(ue.div,{ref:At(l,t),...s,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&m.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),eu(e,h=>m.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},m.createElement(u5.Provider,{value:p},h))))}),LL=m.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=m.useRef(null),s=_r(a=>!a.search);return!n&&!s?null:m.createElement(ue.div,{ref:At(o,t),...r,"cmdk-separator":"",role:"separator"})}),IL=m.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,s=th(),a=_r(u=>u.search),l=_r(u=>u.selectedItemId),c=hi();return m.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),m.createElement(ue.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":l,id:c.inputId,type:"text",value:o?e.value:a,onChange:u=>{o||s.setState("search",u.target.value),n?.(u.target.value)}})}),FL=m.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,s=m.useRef(null),a=m.useRef(null),l=_r(u=>u.selectedItemId),c=hi();return m.useEffect(()=>{if(a.current&&s.current){let u=a.current,f=s.current,d,p=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let h=u.offsetHeight;f.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(d),p.unobserve(u)}}},[]),m.createElement(ue.div,{ref:At(s,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":r,id:c.listId},eu(e,u=>m.createElement("div",{ref:At(a,c.listInnerRef),"cmdk-list-sizer":""},u)))}),$L=m.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:s,container:a,...l}=e;return m.createElement(kL,{open:n,onOpenChange:r},m.createElement(RL,{container:a},m.createElement(ML,{"cmdk-overlay":"",className:o}),m.createElement(DL,{"aria-label":e.label,"cmdk-dialog":"",className:s},m.createElement(d5,{ref:t,...l}))))}),VL=m.forwardRef((e,t)=>_r(n=>n.filtered.count===0)?m.createElement(ue.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),BL=m.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...s}=e;return m.createElement(ue.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},eu(e,a=>m.createElement("div",{"aria-hidden":!0},a)))}),Ms=Object.assign(d5,{List:FL,Item:TL,Input:IL,Group:OL,Separator:LL,Dialog:$L,Empty:VL,Loading:BL});function zL(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function WL(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function f5(e){let t=m.useRef(e);return co(()=>{t.current=e}),t}var co=typeof window>"u"?m.useEffect:m.useLayoutEffect;function Ho(e){let t=m.useRef();return t.current===void 0&&(t.current=e()),t}function _r(e){let t=th(),n=()=>e(t.snapshot());return m.useSyncExternalStore(t.subscribe,n,n)}function p5(e,t,n,r=[]){let o=m.useRef(),s=hi();return co(()=>{var a;let l=(()=>{var u;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(u=f.current.textContent)==null?void 0:u.trim():o.current}})(),c=r.map(u=>u.trim());s.value(e,l,c),(a=t.current)==null||a.setAttribute(Wo,l),o.current=l}),o}var HL=()=>{let[e,t]=m.useState(),n=Ho(()=>new Map);return co(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function GL(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function eu({asChild:e,children:t},n){return e&&m.isValidElement(t)?m.cloneElement(GL(t),{ref:t.ref},n(t.props.children)):n(t)}var UL={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function h5({className:e,...t}){return i.jsx(Ms,{"data-slot":"command",className:j("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function m5({className:e,...t}){return i.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[i.jsx(X,{name:"MagnifyingGlass",className:"size-4 shrink-0 opacity-50"}),i.jsx(Ms.Input,{"data-slot":"command-input",className:j("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function g5({className:e,...t}){return i.jsx(Ms.List,{"data-slot":"command-list",className:j("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function x5({...e}){return i.jsx(Ms.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function v5({className:e,...t}){return i.jsx(Ms.Group,{"data-slot":"command-group",className:j("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function Kd({className:e,...t}){return i.jsx(Ms.Item,{"data-slot":"command-item",className:j("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}const D1="__yuno_search_select_no_highlight__",YL="end",y5=m.forwardRef(({label:e,description:t,error:n,optional:r=!1,placeholder:o="Select an option",value:s,defaultValue:a,onChange:l,disabled:c=!1,options:u=[],groups:f=[],className:d,id:p,searchPlaceholder:h="Search",maxHeight:g=300,actionName:x,showItemValue:v=!1,showItemValueCopy:y=!0,showSelectedCheck:b=!0,contentWidth:S,"aria-label":w,"aria-labelledby":E,footer:N},_)=>{const[k,I]=m.useState(!1),[F,U]=m.useState(""),[O,R]=m.useState(D1),L=m.useCallback(B=>{R(D1),I(B)},[]),V=f.length>0,D=u.length>0,$=m.useCallback(()=>{if(!s)return null;if(V)for(const B of f){const Y=B.options.find(Z=>Z.value===s);if(Y)return Y.label}else if(D){const B=u.find(Y=>Y.value===s);if(B)return B.label}return null},[s,f,u,V,D]),z=m.useCallback(B=>{if(!B)return{filteredOptions:u,filteredGroups:f};const Y=B.toLowerCase();if(V){const Z=f.map(q=>({...q,options:q.options.filter(oe=>ut(oe.label).toLowerCase().includes(Y))})).filter(q=>q.options.length>0);return{filteredOptions:[],filteredGroups:Z}}else return{filteredOptions:u.filter(q=>ut(q.label).toLowerCase().includes(Y)),filteredGroups:[]}},[u,f,V]),{filteredOptions:T,filteredGroups:M}=z(ut(F));m.useEffect(()=>{k&&setTimeout(()=>{document.querySelector('[data-slot="command-input"]')?.focus()},0)},[k]),m.useEffect(()=>{if(!k||!s)return;const B=setTimeout(()=>{document.querySelector('[data-slot="command-list"] [data-selected-option="true"]')?.scrollIntoView({block:YL})},0);return()=>clearTimeout(B)},[k,s]),m.useEffect(()=>{k||U("")},[k]),m.useEffect(()=>{a&&!s&&l?.(a)},[a,s,l]);const G=B=>{c||(l?.(B),I(!1))},A=(B,Y)=>{B.stopPropagation(),B.preventDefault(),navigator.clipboard?.writeText(Y)},W=B=>v&&B?i.jsxs("span",{className:"flex items-center justify-between gap-2 text-xs text-muted-foreground",children:[i.jsx("span",{className:"truncate",children:B}),y&&i.jsx("button",{type:"button","aria-label":"Copy value",onPointerDown:Y=>Y.stopPropagation(),onClick:Y=>A(Y,B),className:"shrink-0 text-muted-foreground hover:text-foreground",children:i.jsx(X,{name:"Copy",size:"sm"})})]}):null,H=B=>i.jsxs("span",{className:"flex items-center justify-between gap-2",children:[i.jsxs("span",{className:"flex min-w-0 items-center",children:[B.icon&&i.jsx("span",{className:"mr-2 inline-flex items-center",children:B.icon}),i.jsx("span",{className:"truncate",children:B.label})]}),B.badge&&i.jsx(Ze,{variant:"info",children:B.badge})]}),P=$();return i.jsxs("div",{dir:go(),className:j("w-full",d),children:[e&&i.jsxs("div",{className:"flex items-center gap-1 mb-2",children:[i.jsx(Ns,{htmlFor:p,className:j(c&&"text-muted-foreground"),children:e}),r&&i.jsx("p",{className:"text-sm font-medium leading-none text-muted-foreground",children:"(Optional)"})]}),t&&!n&&i.jsx("p",{className:j("text-sm font-medium leading-none",j("text-muted-foreground mb-2",c&&"text-muted-")),children:t}),i.jsxs(Ub,{open:k,onOpenChange:L,children:[i.jsx(Yb,{asChild:!0,children:i.jsxs("button",{ref:_,id:p,type:"button",disabled:c,role:"combobox","aria-expanded":k,"aria-haspopup":"listbox","aria-label":w,"aria-labelledby":E,"data-action-name":x,className:j("flex h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-input 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:text-muted- shadow-xs [&>span]:min-w-0 [&>span]:truncate",n&&"border-destructive"),children:[i.jsx("span",{className:j("truncate",!P&&"text-muted-foreground"),children:P||o}),i.jsx(X,{name:"CaretDown",size:"sm",className:"text-muted- shrink-0"})]})}),i.jsx(Xp,{className:"p-0",align:"start",style:S?{width:S}:void 0,children:i.jsxs(h5,{shouldFilter:!1,value:O,onValueChange:R,children:[i.jsx(m5,{placeholder:h,"aria-label":h,value:F,onValueChange:U}),i.jsxs(g5,{style:{maxHeight:g},children:[i.jsx(x5,{children:i.jsx("p",{className:"text-sm font-medium leading-none text-muted-foreground py-6 text-center",children:"No results found."})}),V?M.map((B,Y)=>i.jsxs(v5,{children:[B.label&&i.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:B.label}),B.options.map(Z=>i.jsxs(Kd,{value:Z.value,onSelect:()=>G(Z.value),"data-selected-option":s===Z.value?!0:void 0,className:j("cursor-pointer rounded-none",s===Z.value&&"bg-accent"),children:[i.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-2",children:[H(Z),W(Z.value)]}),b&&s===Z.value&&i.jsx(X,{name:"Check",size:"sm",className:"ml-auto"})]},Z.value))]},Y)):T.map(B=>i.jsxs(Kd,{value:B.value,onSelect:()=>G(B.value),"data-selected-option":s===B.value?!0:void 0,className:j("cursor-pointer rounded-none",s===B.value&&"bg-accent"),children:[i.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-2",children:[H(B),W(B.value)]}),b&&s===B.value&&i.jsx(X,{name:"Check",size:"sm",className:"ml-auto"})]},B.value))]}),N]})})]}),n&&i.jsx("p",{className:"text-sm font-medium leading-none text-destructive mt-2",children:n})]})});y5.displayName="SearchSelect";const b5=C.forwardRef(({value:e,variant:t="info",startIcon:n,emptyState:r="-",className:o},s)=>e?i.jsx(Ze,{ref:s,variant:t,startIcon:n,className:o,children:e}):i.jsx(i.Fragment,{children:r}));b5.displayName="DataTableBadgeCell";const KL=e=>!!(e==null||typeof e=="string"&&e.trim()===""||Array.isArray(e)&&e.length===0),w5=C.forwardRef(({value:e,children:t,emptyState:n="-"},r)=>KL(e)?i.jsx("span",{ref:r,children:n}):i.jsx(i.Fragment,{children:t}));w5.displayName="DataTableCellWrapper";const C5=C.forwardRef(({value:e,formatFn:t,tooltip:n,emptyState:r="-",className:o},s)=>{if(!e)return i.jsx(i.Fragment,{children:r});const a=t?t(e):e,l=n===!1?null:n??a;return l?i.jsx(Mt,{children:i.jsxs(Vt,{children:[i.jsx(Bt,{asChild:!0,children:i.jsx("div",{ref:s,className:j("truncate text-sm",o),children:a})}),i.jsx(Dt,{children:i.jsx("p",{children:l})})]})}):i.jsx("div",{ref:s,className:j("truncate text-sm",o),children:a})});C5.displayName="DataTableTextCell";const S5=e=>({copyToClipboard:C.useCallback(async n=>{const r=e?.successMessage??"Copied to clipboard",o=e?.errorMessage??"Failed to copy to clipboard";try{await navigator.clipboard.writeText(n),Kn.success(r),e?.onSuccess?.()}catch{try{const s=document.createElement("textarea");s.value=n,s.style.position="fixed",s.style.opacity="0",s.style.pointerEvents="none",document.body.appendChild(s);let a;try{s.focus(),s.select(),a=document.execCommand("copy")}finally{document.body.removeChild(s)}if(a)Kn.success(r),e?.onSuccess?.();else throw new Error("Copy command failed")}catch{Kn.error(o),e?.onError?.()}}},[e])}),E5=C.forwardRef(({value:e,linkTo:t,startIcon:n,startIconTooltip:r,copyTooltip:o="Copy",onCopySuccess:s,onCopyError:a,emptyState:l="-",className:c},u)=>{const{copyToClipboard:f}=S5({onSuccess:s,onError:a});if(!e)return i.jsx(i.Fragment,{children:l});const d=p=>{p.stopPropagation(),f(e)};return i.jsxs("div",{ref:u,className:j("flex items-center gap-2 w-full",c),children:[n&&i.jsx(Mt,{children:i.jsxs(Vt,{children:[i.jsx(Bt,{asChild:!0,children:i.jsx("span",{className:"shrink-0 inline-flex",children:i.jsx(X,{name:n,weight:"fill",size:"sm",className:"text-primary"})})}),r&&i.jsx(Dt,{children:i.jsx("p",{children:r})})]})}),i.jsx(Mt,{children:i.jsxs(Vt,{children:[i.jsx(Bt,{asChild:!0,children:i.jsx("span",{className:"truncate text-sm",children:t?i.jsx("a",{href:t,className:"text-primary hover:underline",onClick:p=>p.stopPropagation(),children:e}):e})}),i.jsx(Dt,{children:i.jsx("p",{children:e})})]})}),i.jsx(Mt,{children:i.jsxs(Vt,{children:[i.jsx(Bt,{asChild:!0,children:i.jsx("button",{type:"button","aria-label":o,className:"shrink-0 p-1 hover:bg-muted rounded",onClick:d,children:i.jsx(X,{name:"CopySimple",size:"sm",className:"text-muted-foreground"})})}),i.jsx(Dt,{children:i.jsx("p",{children:o})})]})})]})});E5.displayName="DataTableCopyCell";const ZL=e=>{if(!e)return e;const t=e.replace(/[_.]/g," ").toLowerCase();return t.charAt(0).toUpperCase()+t.slice(1)},N5=C.forwardRef(({status:e,statusMap:t,formatLabel:n=ZL,emptyState:r="-",className:o},s)=>{if(!e)return i.jsx(i.Fragment,{children:r});const a=t?.[e]??t?.[e.toUpperCase()];return a?i.jsx("div",{ref:s,className:j(o),children:i.jsx(Ze,{startIcon:a.icon??"Info",variant:a.variant,children:a.label})}):i.jsx("div",{ref:s,className:j(o),children:i.jsx(Ze,{startIcon:"Info",variant:"info",children:n(e)})})});N5.displayName="DataTableStatusCell";const _5=C.forwardRef(({value:e,currency:t="USD",locales:n,size:r="xs",showCurrencyCode:o=!0,emptyState:s="-",className:a},l)=>e==null||Number.isNaN(e)?i.jsx(i.Fragment,{children:s}):i.jsx("div",{ref:l,className:j("flex",a),children:i.jsx(ip,{value:e,currency:t,locales:n,size:r,showCurrencyCode:o})}));_5.displayName="DataTableAmountCell";const qL=e=>{try{const t=typeof e=="string"?new Date(e):e;return new Intl.DateTimeFormat("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(t)}catch{return String(e)}},j5=C.forwardRef(({value:e,formatFn:t,emptyState:n="-",className:r},o)=>{if(!e)return i.jsx(i.Fragment,{children:n});const a=(t??qL)(e);return i.jsx(Mt,{children:i.jsxs(Vt,{children:[i.jsx(Bt,{asChild:!0,children:i.jsx("div",{ref:o,className:j("truncate text-sm",r),children:a})}),i.jsx(Dt,{children:i.jsx("p",{children:a})})]})})});j5.displayName="DataTableDateCell";const XL=e=>{if(typeof e!="string")return"";const t=e.trim().toUpperCase();return/^[A-Z]{2}$/.test(t)?String.fromCodePoint(...[...t].map(n=>n.charCodeAt(0)+127397)):""},k5=C.forwardRef(({code:e,showFlag:t=!0,showName:n=!1,getCountryName:r,emptyState:o="-",className:s},a)=>{if(!e)return i.jsx(i.Fragment,{children:o});const l=t?XL(e):null,c=r?r(e):null,u=n&&c?c:e.toUpperCase(),f=c??e.toUpperCase();return i.jsx(Mt,{children:i.jsxs(Vt,{children:[i.jsx(Bt,{asChild:!0,children:i.jsxs("div",{ref:a,className:j("flex items-center gap-1 truncate text-sm",s),children:[l&&i.jsx("span",{className:"shrink-0",children:l}),i.jsx("span",{className:"truncate",children:u})]})}),i.jsx(Dt,{children:i.jsxs("p",{children:[l&&`${l} `,f]})})]})})});k5.displayName="DataTableCountryCell";const R5=C.forwardRef(({value:e,decimals:t=2,showProgressBar:n=!1,emptyState:r="-",className:o},s)=>{if(e==null)return i.jsx(i.Fragment,{children:r});const a=e*100,l=new Intl.NumberFormat("en-US",{minimumFractionDigits:0,maximumFractionDigits:t}).format(a);return i.jsxs("div",{ref:s,className:j("flex items-center gap-3",o),children:[n&&i.jsx("div",{className:"h-1.5 flex-1 min-w-[50px] rounded-full bg-muted overflow-hidden",children:i.jsx("div",{className:"h-full rounded-full bg-primary transition-all",style:{width:`${Math.min(a,100)}%`}})}),i.jsxs("span",{className:"text-sm whitespace-nowrap",children:[l,"%"]})]})});R5.displayName="DataTablePercentageCell";const M5=C.forwardRef(({tags:e,maxVisible:t=2,variant:n="outline",emptyState:r="-",className:o},s)=>{if(!e||e.length===0)return i.jsx(i.Fragment,{children:r});const a=e.slice(0,t),l=e.slice(t);return i.jsxs("div",{ref:s,className:j("flex items-center gap-1 flex-wrap",o),children:[a.map(c=>i.jsx(Ze,{variant:n,className:"text-xs",children:c},c)),l.length>0&&i.jsx(Mt,{delayDuration:0,children:i.jsxs(Vt,{children:[i.jsx(Bt,{children:i.jsxs(Ze,{variant:"outline",className:"text-xs cursor-pointer hover:border-primary hover:text-primary",children:["+",l.length]})}),i.jsx(Dt,{className:"p-2",children:i.jsx("div",{className:"space-y-1",children:l.map(c=>i.jsx("p",{className:"text-sm",children:c},c))})})]})})]})});M5.displayName="DataTableTagsCell";const D5=C.forwardRef(({items:e,maxVisible:t=1,emptyState:n="-",className:r},o)=>{if(!e||e.length===0)return i.jsx(i.Fragment,{children:n});const s=new Set,a=e.filter(u=>!u.name||s.has(u.name)?!1:(s.add(u.name),!0));if(a.length===0)return i.jsx(i.Fragment,{children:n});const l=a.slice(0,t),c=a.slice(t);return i.jsxs("div",{ref:o,className:j("flex items-center gap-2",r),children:[l.map(u=>i.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[u.src&&i.jsx("img",{src:u.src,alt:u.name,className:"h-4 w-4 shrink-0 object-contain",onError:f=>{f.currentTarget.style.display="none"}}),!u.src&&u.iconName&&i.jsx(X,{name:u.iconName,size:"sm",className:"shrink-0"}),i.jsx(Mt,{children:i.jsxs(Vt,{children:[i.jsx(Bt,{asChild:!0,children:i.jsx("span",{className:"truncate text-sm",children:u.name})}),i.jsx(Dt,{children:i.jsx("p",{children:u.name})})]})})]},u.name)),c.length>0&&i.jsx(Mt,{delayDuration:0,children:i.jsxs(Vt,{children:[i.jsx(Bt,{className:"shrink-0",children:i.jsxs(Ze,{variant:"outline",className:"text-xs cursor-pointer hover:border-primary hover:text-primary",children:["+",c.length]})}),i.jsx(Dt,{className:"p-2",children:i.jsx("div",{className:"space-y-2",children:c.map(u=>i.jsxs("div",{className:"flex items-center gap-3",children:[u.src&&i.jsx("img",{src:u.src,alt:u.name,className:"h-4 w-4 object-contain",onError:f=>{f.currentTarget.style.display="none"}}),!u.src&&u.iconName&&i.jsx(X,{name:u.iconName,size:"sm"}),i.jsx("span",{className:"text-sm",children:u.name})]},u.name))})})]})})]})});D5.displayName="DataTableIconTextCell";const A5=C.forwardRef(({items:e,maxVisible:t=4,emptyState:n="-",className:r},o)=>{if(!e||e.length===0)return i.jsx(i.Fragment,{children:n});const s=new Set,a=e.filter(f=>!f.name||s.has(f.name)?!1:(s.add(f.name),!0));if(a.length===0)return i.jsx(i.Fragment,{children:n});const l=a.slice(0,t),c=a.slice(t),u=f=>f.src?i.jsx("img",{src:f.src,alt:f.name,className:"h-5 w-5 shrink-0 object-contain",onError:d=>{d.currentTarget.style.display="none"}}):f.iconName?i.jsx(X,{name:f.iconName,size:"sm",className:"shrink-0"}):null;return i.jsxs("div",{ref:o,className:j("flex items-center gap-1.5",r),children:[l.map(f=>i.jsx(Mt,{children:i.jsxs(Vt,{children:[i.jsx(Bt,{asChild:!0,children:i.jsx("span",{className:"inline-flex shrink-0",children:u(f)})}),i.jsx(Dt,{children:i.jsx("p",{children:f.name})})]})},f.name)),c.length>0&&i.jsx(Mt,{delayDuration:0,children:i.jsxs(Vt,{children:[i.jsx(Bt,{className:"shrink-0",children:i.jsxs(Ze,{variant:"outline",className:"text-xs cursor-pointer hover:border-primary hover:text-primary",children:["+",c.length]})}),i.jsx(Dt,{className:"p-2",children:i.jsx("div",{className:"space-y-1",children:c.map(f=>i.jsx("div",{className:"text-sm",children:f.name},f.name))})})]})})]})});A5.displayName="DataTableIconCell";function xr(e,t){return typeof e=="function"?e(t):e}function Xt(e,t){return n=>{t.setState(r=>({...r,[e]:xr(n,r[e])}))}}function tu(e){return e instanceof Function}function JL(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function QL(e,t){const n=[],r=o=>{o.forEach(s=>{n.push(s);const a=t(s);a!=null&&a.length&&r(a)})};return r(e),n}function he(e,t,n){let r=[],o;return s=>{let a;n.key&&n.debug&&(a=Date.now());const l=e(s);if(!(l.length!==r.length||l.some((f,d)=>r[d]!==f)))return o;r=l;let u;if(n.key&&n.debug&&(u=Date.now()),o=t(...l),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const f=Math.round((Date.now()-a)*100)/100,d=Math.round((Date.now()-u)*100)/100,p=d/16,h=(g,x)=>{for(g=String(g);g.length<x;)g=" "+g;return g};console.info(`%c⏱ ${h(d,5)} /${h(f,5)} ms`,`
|
|
83
83
|
font-size: .6rem;
|
|
84
84
|
font-weight: bold;
|
|
85
|
-
color: hsl(${Math.max(0,Math.min(120-120*p,120))}deg 100% 31%);`,n?.key)}return o}}function ge(e,t,n,r){return{debug:()=>{var o;return(o=e?.debugAll)!=null?o:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:r}}function XL(e,t,n,r){const o=()=>{var a;return(a=s.getValue())!=null?a:e.options.renderFallbackValue},s={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:o,getContext:he(()=>[e,n,t,s],(a,l,c,u)=>({table:a,column:l,row:c,cell:u,getValue:u.getValue,renderValue:u.renderValue}),ge(e.options,"debugCells","cell.getContext"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(s,n,t,e)},{}),s}function JL(e,t,n,r){var o,s;const l={...e._getDefaultColumnDef(),...t},c=l.accessorKey;let u=(o=(s=l.id)!=null?s:c?typeof String.prototype.replaceAll=="function"?c.replaceAll(".","_"):c.replace(/\./g,"_"):void 0)!=null?o:typeof l.header=="string"?l.header:void 0,f;if(l.accessorFn?f=l.accessorFn:c&&(c.includes(".")?f=p=>{let h=p;for(const x of c.split(".")){var m;h=(m=h)==null?void 0:m[x],process.env.NODE_ENV!=="production"&&h===void 0&&console.warn(`"${x}" in deeply nested key "${c}" returned undefined.`)}return h}:f=p=>p[l.accessorKey]),!u)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 d={id:`${String(u)}`,accessorFn:f,parent:r,depth:n,columnDef:l,columns:[],getFlatColumns:he(()=>[!0],()=>{var p;return[d,...(p=d.columns)==null?void 0:p.flatMap(h=>h.getFlatColumns())]},ge(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:he(()=>[e._getOrderColumnsFn()],p=>{var h;if((h=d.columns)!=null&&h.length){let m=d.columns.flatMap(x=>x.getLeafColumns());return p(m)}return[d]},ge(e.options,"debugColumns","column.getLeafColumns"))};for(const p of e._features)p.createColumn==null||p.createColumn(d,e);return d}const xt="debugHeaders";function A1(e,t,n){var r;let s={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 a=[],l=c=>{c.subHeaders&&c.subHeaders.length&&c.subHeaders.map(l),a.push(c)};return l(s),a},getContext:()=>({table:e,header:s,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(s,e)}),s}const QL={createTable:e=>{e.getHeaderGroups=he(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var s,a;const l=(s=r?.map(d=>n.find(p=>p.id===d)).filter(Boolean))!=null?s:[],c=(a=o?.map(d=>n.find(p=>p.id===d)).filter(Boolean))!=null?a:[],u=n.filter(d=>!(r!=null&&r.includes(d.id))&&!(o!=null&&o.includes(d.id)));return Gi(t,[...l,...u,...c],e)},ge(e.options,xt,"getHeaderGroups")),e.getCenterHeaderGroups=he(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>(n=n.filter(s=>!(r!=null&&r.includes(s.id))&&!(o!=null&&o.includes(s.id))),Gi(t,n,e,"center")),ge(e.options,xt,"getCenterHeaderGroups")),e.getLeftHeaderGroups=he(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;const s=(o=r?.map(a=>n.find(l=>l.id===a)).filter(Boolean))!=null?o:[];return Gi(t,s,e,"left")},ge(e.options,xt,"getLeftHeaderGroups")),e.getRightHeaderGroups=he(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;const s=(o=r?.map(a=>n.find(l=>l.id===a)).filter(Boolean))!=null?o:[];return Gi(t,s,e,"right")},ge(e.options,xt,"getRightHeaderGroups")),e.getFooterGroups=he(()=>[e.getHeaderGroups()],t=>[...t].reverse(),ge(e.options,xt,"getFooterGroups")),e.getLeftFooterGroups=he(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),ge(e.options,xt,"getLeftFooterGroups")),e.getCenterFooterGroups=he(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),ge(e.options,xt,"getCenterFooterGroups")),e.getRightFooterGroups=he(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),ge(e.options,xt,"getRightFooterGroups")),e.getFlatHeaders=he(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),ge(e.options,xt,"getFlatHeaders")),e.getLeftFlatHeaders=he(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),ge(e.options,xt,"getLeftFlatHeaders")),e.getCenterFlatHeaders=he(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),ge(e.options,xt,"getCenterFlatHeaders")),e.getRightFlatHeaders=he(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),ge(e.options,xt,"getRightFlatHeaders")),e.getCenterLeafHeaders=he(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),ge(e.options,xt,"getCenterLeafHeaders")),e.getLeftLeafHeaders=he(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),ge(e.options,xt,"getLeftLeafHeaders")),e.getRightLeafHeaders=he(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),ge(e.options,xt,"getRightLeafHeaders")),e.getLeafHeaders=he(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var o,s,a,l,c,u;return[...(o=(s=t[0])==null?void 0:s.headers)!=null?o:[],...(a=(l=n[0])==null?void 0:l.headers)!=null?a:[],...(c=(u=r[0])==null?void 0:u.headers)!=null?c:[]].map(f=>f.getLeafHeaders()).flat()},ge(e.options,xt,"getLeafHeaders"))}};function Gi(e,t,n,r){var o,s;let a=0;const l=function(p,h){h===void 0&&(h=1),a=Math.max(a,h),p.filter(m=>m.getIsVisible()).forEach(m=>{var x;(x=m.columns)!=null&&x.length&&l(m.columns,h+1)},0)};l(e);let c=[];const u=(p,h)=>{const m={depth:h,id:[r,`${h}`].filter(Boolean).join("_"),headers:[]},x=[];p.forEach(v=>{const y=[...x].reverse()[0],b=v.column.depth===m.depth;let S,w=!1;if(b&&v.column.parent?S=v.column.parent:(S=v.column,w=!0),y&&y?.column===S)y.subHeaders.push(v);else{const E=A1(n,S,{id:[r,h,S.id,v?.id].filter(Boolean).join("_"),isPlaceholder:w,placeholderId:w?`${x.filter(N=>N.column===S).length}`:void 0,depth:h,index:x.length});E.subHeaders.push(v),x.push(E)}m.headers.push(v),v.headerGroup=m}),c.push(m),h>0&&u(x,h-1)},f=t.map((p,h)=>A1(n,p,{depth:a,index:h}));u(f,a-1),c.reverse();const d=p=>p.filter(m=>m.column.getIsVisible()).map(m=>{let x=0,v=0,y=[0];m.subHeaders&&m.subHeaders.length?(y=[],d(m.subHeaders).forEach(S=>{let{colSpan:w,rowSpan:E}=S;x+=w,y.push(E)})):x=1;const b=Math.min(...y);return v=v+b,m.colSpan=x,m.rowSpan=v,{colSpan:x,rowSpan:v}});return d((o=(s=c[0])==null?void 0:s.headers)!=null?o:[]),c}const nh=(e,t,n,r,o,s,a)=>{let l={id:t,index:r,original:n,depth:o,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:c=>{if(l._valuesCache.hasOwnProperty(c))return l._valuesCache[c];const u=e.getColumn(c);if(u!=null&&u.accessorFn)return l._valuesCache[c]=u.accessorFn(l.original,r),l._valuesCache[c]},getUniqueValues:c=>{if(l._uniqueValuesCache.hasOwnProperty(c))return l._uniqueValuesCache[c];const u=e.getColumn(c);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(l._uniqueValuesCache[c]=u.columnDef.getUniqueValues(l.original,r),l._uniqueValuesCache[c]):(l._uniqueValuesCache[c]=[l.getValue(c)],l._uniqueValuesCache[c])},renderValue:c=>{var u;return(u=l.getValue(c))!=null?u:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>qL(l.subRows,c=>c.subRows),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let c=[],u=l;for(;;){const f=u.getParentRow();if(!f)break;c.push(f),u=f}return c.reverse()},getAllCells:he(()=>[e.getAllLeafColumns()],c=>c.map(u=>XL(e,l,u,u.id)),ge(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:he(()=>[l.getAllCells()],c=>c.reduce((u,f)=>(u[f.column.id]=f,u),{}),ge(e.options,"debugRows","getAllCellsByColumnId"))};for(let c=0;c<e._features.length;c++){const u=e._features[c];u==null||u.createRow==null||u.createRow(l,e)}return l},eI={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()}}},A5=(e,t,n)=>{var r,o;const s=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((o=e.getValue(t))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(s))};A5.autoRemove=e=>bn(e);const T5=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};T5.autoRemove=e=>bn(e);const P5=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};P5.autoRemove=e=>bn(e);const O5=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};O5.autoRemove=e=>bn(e);const L5=(e,t,n)=>!n.some(r=>{var o;return!((o=e.getValue(t))!=null&&o.includes(r))});L5.autoRemove=e=>bn(e)||!(e!=null&&e.length);const I5=(e,t,n)=>n.some(r=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)});I5.autoRemove=e=>bn(e)||!(e!=null&&e.length);const F5=(e,t,n)=>e.getValue(t)===n;F5.autoRemove=e=>bn(e);const $5=(e,t,n)=>e.getValue(t)==n;$5.autoRemove=e=>bn(e);const rh=(e,t,n)=>{let[r,o]=n;const s=e.getValue(t);return s>=r&&s<=o};rh.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,s=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(o)?1/0:o;if(s>a){const l=s;s=a,a=l}return[s,a]};rh.autoRemove=e=>bn(e)||bn(e[0])&&bn(e[1]);const Un={includesString:A5,includesStringSensitive:T5,equalsString:P5,arrIncludes:O5,arrIncludesAll:L5,arrIncludesSome:I5,equals:F5,weakEquals:$5,inNumberRange:rh};function bn(e){return e==null||e===""}const tI={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Xt("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?Un.includesString:typeof r=="number"?Un.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Un.equals:Array.isArray(r)?Un.arrIncludes:Un.weakEquals},e.getFilterFn=()=>{var n,r;return tu(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:Un[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!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(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const o=e.getFilterFn(),s=r?.find(f=>f.id===e.id),a=xr(n,s?s.value:void 0);if(T1(o,a,e)){var l;return(l=r?.filter(f=>f.id!==e.id))!=null?l:[]}const c={id:e.id,value:a};if(s){var u;return(u=r?.map(f=>f.id===e.id?c:f))!=null?u:[]}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=o=>{var s;return(s=xr(t,o))==null?void 0:s.filter(a=>{const l=n.find(c=>c.id===a.id);if(l){const c=l.getFilterFn();if(T1(c,a.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 T1(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const nI=(e,t,n)=>n.reduce((r,o)=>{const s=o.getValue(e);return r+(typeof s=="number"?s:0)},0),rI=(e,t,n)=>{let r;return n.forEach(o=>{const s=o.getValue(e);s!=null&&(r>s||r===void 0&&s>=s)&&(r=s)}),r},oI=(e,t,n)=>{let r;return n.forEach(o=>{const s=o.getValue(e);s!=null&&(r<s||r===void 0&&s>=s)&&(r=s)}),r},sI=(e,t,n)=>{let r,o;return n.forEach(s=>{const a=s.getValue(e);a!=null&&(r===void 0?a>=a&&(r=o=a):(r>a&&(r=a),o<a&&(o=a)))}),[r,o]},aI=(e,t)=>{let n=0,r=0;if(t.forEach(o=>{let s=o.getValue(e);s!=null&&(s=+s)>=s&&(++n,r+=s)}),n)return r/n},iI=(e,t)=>{if(!t.length)return;const n=t.map(s=>s.getValue(e));if(!ZL(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((s,a)=>s-a);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},lI=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),cI=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,uI=(e,t)=>t.length,Bu={sum:nI,min:rI,max:oI,extent:sI,mean:aI,median:iI,unique:lI,uniqueCount:cI,count:uI},dI={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:Xt("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?.getValue(e.id);if(typeof r=="number")return Bu.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Bu.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return tu(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:Bu[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 o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function fI(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(s=>!t.includes(s.id));return n==="remove"?r:[...t.map(s=>e.find(a=>a.id===s)).filter(Boolean),...r]}const pI={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Xt("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=he(n=>[ba(t,n)],n=>n.findIndex(r=>r.id===e.id),ge(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return((r=ba(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=ba(t,n);return((r=o[o.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=he(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>o=>{let s=[];if(!(t!=null&&t.length))s=o;else{const a=[...t],l=[...o];for(;l.length&&a.length;){const c=a.shift(),u=l.findIndex(f=>f.id===c);u>-1&&s.push(l.splice(u,1)[0])}s=[...s,...l]}return fI(s,n,r)},ge(e.options,"debugTable","_getOrderColumnsFn"))}},zu=()=>({left:[],right:[]}),hI={getInitialState:e=>({columnPinning:zu(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Xt("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var s,a;if(n==="right"){var l,c;return{left:((l=o?.left)!=null?l:[]).filter(d=>!(r!=null&&r.includes(d))),right:[...((c=o?.right)!=null?c:[]).filter(d=>!(r!=null&&r.includes(d))),...r]}}if(n==="left"){var u,f;return{left:[...((u=o?.left)!=null?u:[]).filter(d=>!(r!=null&&r.includes(d))),...r],right:((f=o?.right)!=null?f:[]).filter(d=>!(r!=null&&r.includes(d)))}}return{left:((s=o?.left)!=null?s:[]).filter(d=>!(r!=null&&r.includes(d))),right:((a=o?.right)!=null?a:[]).filter(d=>!(r!=null&&r.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,s,a;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((s=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?s:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(l=>l.id),{left:r,right:o}=t.getState().columnPinning,s=n.some(l=>r?.includes(l)),a=n.some(l=>o?.includes(l));return s?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?(n=(r=t.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=he(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,o)=>{const s=[...r??[],...o??[]];return n.filter(a=>!s.includes(a.column.id))},ge(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=he(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(s=>n.find(a=>a.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),ge(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=he(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(s=>n.find(a=>a.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),ge(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?zu():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:zu())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var o,s;return!!((o=r.left)!=null&&o.length||(s=r.right)!=null&&s.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=he(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),ge(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=he(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),ge(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=he(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const o=[...n??[],...r??[]];return t.filter(s=>!o.includes(s.id))},ge(e.options,"debugColumns","getCenterLeafColumns"))}};function gI(e){return e||(typeof document<"u"?document:null)}const Ui={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Wu=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),mI={getDefaultColumnDef:()=>Ui,getInitialState:e=>({columnSizing:{},columnSizingInfo:Wu(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Xt("columnSizing",e),onColumnSizingInfoChange:Xt("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const s=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Ui.minSize,(r=s??e.columnDef.size)!=null?r:Ui.size),(o=e.columnDef.maxSize)!=null?o:Ui.maxSize)},e.getStart=he(n=>[n,ba(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((o,s)=>o+s.getSize(),0),ge(t.options,"debugColumns","getStart")),e.getAfter=he(n=>[n,ba(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((o,s)=>o+s.getSize(),0),ge(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...o}=n;return o})},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=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var s;n+=(s=o.column.getSize())!=null?s: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),o=r?.getCanResize();return s=>{if(!r||!o||(s.persist==null||s.persist(),Hu(s)&&s.touches&&s.touches.length>1))return;const a=e.getSize(),l=e?e.getLeafHeaders().map(y=>[y.column.id,y.column.getSize()]):[[r.id,r.getSize()]],c=Hu(s)?Math.round(s.touches[0].clientX):s.clientX,u={},f=(y,b)=>{typeof b=="number"&&(t.setColumnSizingInfo(S=>{var w,E;const N=t.options.columnResizeDirection==="rtl"?-1:1,_=(b-((w=S?.startOffset)!=null?w:0))*N,k=Math.max(_/((E=S?.startSize)!=null?E:0),-.999999);return S.columnSizingStart.forEach(I=>{let[F,U]=I;u[F]=Math.round(Math.max(U+U*k,0)*100)/100}),{...S,deltaOffset:_,deltaPercentage:k}}),(t.options.columnResizeMode==="onChange"||y==="end")&&t.setColumnSizing(S=>({...S,...u})))},d=y=>f("move",y),p=y=>{f("end",y),t.setColumnSizingInfo(b=>({...b,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=gI(n),m={moveHandler:y=>d(y.clientX),upHandler:y=>{h?.removeEventListener("mousemove",m.moveHandler),h?.removeEventListener("mouseup",m.upHandler),p(y.clientX)}},x={moveHandler:y=>(y.cancelable&&(y.preventDefault(),y.stopPropagation()),d(y.touches[0].clientX),!1),upHandler:y=>{var b;h?.removeEventListener("touchmove",x.moveHandler),h?.removeEventListener("touchend",x.upHandler),y.cancelable&&(y.preventDefault(),y.stopPropagation()),p((b=y.touches[0])==null?void 0:b.clientX)}},v=xI()?{passive:!1}:!1;Hu(s)?(h?.addEventListener("touchmove",x.moveHandler,v),h?.addEventListener("touchend",x.upHandler,v)):(h?.addEventListener("mousemove",m.moveHandler,v),h?.addEventListener("mouseup",m.upHandler,v)),t.setColumnSizingInfo(y=>({...y,startOffset:c,startSize:a,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?Wu():(n=e.initialState.columnSizingInfo)!=null?n:Wu())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0}}};let Yi=null;function xI(){if(typeof Yi=="boolean")return Yi;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 Yi=e,Yi}function Hu(e){return e.type==="touchstart"}const vI={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Xt("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 o=e.columns;return(n=o.length?o.some(s=>s.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=he(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),ge(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=he(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],ge(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,r)=>he(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),ge(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((o,s)=>({...o,[s.id]:n||!(s.getCanHide!=null&&s.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 ba(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const yI={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()}}},bI={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Xt("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,o,s;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&((s=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?s:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Un.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return tu(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Un[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},wI={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Xt("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o: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 o,s;e.setExpanded(r?{}:(o=(s=e.initialState)==null?void 0:s.expanded)!=null?o:{})},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(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(s=>{const a=s.split(".");r=Math.max(r,a.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 o;const s=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(l=>{a[l]=!0}):a=r,n=(o=n)!=null?o:!s,!s&&n)return{...a,[e.id]:!0};if(s&&!n){const{[e.id]:l,...c}=a;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?.[e.id])},e.getCanExpand=()=>{var n,r,o;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.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()}}}},Zd=0,qd=10,Gu=()=>({pageIndex:Zd,pageSize:qd}),CI={getInitialState:e=>({...e,pagination:{...Gu(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Xt("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const o=s=>xr(r,s);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?Gu():(o=e.initialState.pagination)!=null?o:Gu())},e.setPageIndex=r=>{e.setPagination(o=>{let s=xr(r,o.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return s=Math.max(0,Math.min(s,a)),{...o,pageIndex:s}})},e.resetPageIndex=r=>{var o,s;e.setPageIndex(r?Zd:(o=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?o:Zd)},e.resetPageSize=r=>{var o,s;e.setPageSize(r?qd:(o=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?o:qd)},e.setPageSize=r=>{e.setPagination(o=>{const s=Math.max(1,xr(r,o.pageSize)),a=o.pageSize*o.pageIndex,l=Math.floor(a/s);return{...o,pageIndex:l,pageSize:s}})},e.setPageCount=r=>e.setPagination(o=>{var s;let a=xr(r,(s=e.options.pageCount)!=null?s:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...o,pageCount:a}}),e.getPageOptions=he(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((s,a)=>a)),o},ge(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:r<o-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}}},Uu=()=>({top:[],bottom:[]}),SI={getInitialState:e=>({rowPinning:Uu(),...e}),getDefaultOptions:e=>({onRowPinningChange:Xt("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const s=r?e.getLeafRows().map(c=>{let{id:u}=c;return u}):[],a=o?e.getParentRows().map(c=>{let{id:u}=c;return u}):[],l=new Set([...a,e.id,...s]);t.setRowPinning(c=>{var u,f;if(n==="bottom"){var d,p;return{top:((d=c?.top)!=null?d:[]).filter(x=>!(l!=null&&l.has(x))),bottom:[...((p=c?.bottom)!=null?p:[]).filter(x=>!(l!=null&&l.has(x))),...Array.from(l)]}}if(n==="top"){var h,m;return{top:[...((h=c?.top)!=null?h:[]).filter(x=>!(l!=null&&l.has(x))),...Array.from(l)],bottom:((m=c?.bottom)!=null?m:[]).filter(x=>!(l!=null&&l.has(x)))}}return{top:((u=c?.top)!=null?u:[]).filter(x=>!(l!=null&&l.has(x))),bottom:((f=c?.bottom)!=null?f:[]).filter(x=>!(l!=null&&l.has(x)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return typeof r=="function"?r(e):(n=r??o)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,s=n.some(l=>r?.includes(l)),a=n.some(l=>o?.includes(l));return s?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const s=(n=o==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:l}=a;return l});return(r=s?.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?Uu():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:Uu())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var o,s;return!!((o=r.top)!=null&&o.length||(s=r.bottom)!=null&&s.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(n??[]).map(a=>{const l=e.getRow(a,!0);return l.getIsAllParentsExpanded()?l:null}):(n??[]).map(a=>t.find(l=>l.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=he(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),ge(e.options,"debugRows","getTopRows")),e.getBottomRows=he(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),ge(e.options,"debugRows","getBottomRows")),e.getCenterRows=he(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const o=new Set([...n??[],...r??[]]);return t.filter(s=>!o.has(s.id))},ge(e.options,"debugRows","getCenterRows"))}},EI={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Xt("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},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(s=>{s.getCanSelect()&&(r[s.id]=!0)}):o.forEach(s=>{delete r[s.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(s=>{Xd(o,s.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=he(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Yu(e,n):{rows:[],flatRows:[],rowsById:{}},ge(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=he(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Yu(e,n):{rows:[],flatRows:[],rowsById:{}},ge(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=he(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Yu(e,n):{rows:[],flatRows:[],rowsById:{}},ge(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(o=>o.getCanSelect()&&!n[o.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(o=>!n[o.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 o=e.getIsSelected();t.setRowSelection(s=>{var a;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return s;const l={...s};return Xd(l,e.id,n,(a=r?.selectChildren)!=null?a:!0,t),l})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return oh(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Jd(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Jd(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 o;n&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},Xd=(e,t,n,r,o)=>{var s;const a=o.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(l=>delete e[l]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(s=a.subRows)!=null&&s.length&&a.getCanSelectSubRows()&&a.subRows.forEach(l=>Xd(e,l.id,n,r,o))};function Yu(e,t){const n=e.getState().rowSelection,r=[],o={},s=function(a,l){return a.map(c=>{var u;const f=oh(c,n);if(f&&(r.push(c),o[c.id]=c),(u=c.subRows)!=null&&u.length&&(c={...c,subRows:s(c.subRows)}),f)return c}).filter(Boolean)};return{rows:s(t.rows),flatRows:r,rowsById:o}}function oh(e,t){var n;return(n=t[e.id])!=null?n:!1}function Jd(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let o=!0,s=!1;return e.subRows.forEach(a=>{if(!(s&&!o)&&(a.getCanSelect()&&(oh(a,t)?s=!0:o=!1),a.subRows&&a.subRows.length)){const l=Jd(a,t);l==="all"?s=!0:(l==="some"&&(s=!0),o=!1)}}),o?"all":s?"some":!1}const Qd=/([0-9]+)/gm,NI=(e,t,n)=>V5(jr(e.getValue(n)).toLowerCase(),jr(t.getValue(n)).toLowerCase()),_I=(e,t,n)=>V5(jr(e.getValue(n)),jr(t.getValue(n))),jI=(e,t,n)=>sh(jr(e.getValue(n)).toLowerCase(),jr(t.getValue(n)).toLowerCase()),kI=(e,t,n)=>sh(jr(e.getValue(n)),jr(t.getValue(n))),RI=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},MI=(e,t,n)=>sh(e.getValue(n),t.getValue(n));function sh(e,t){return e===t?0:e>t?1:-1}function jr(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function V5(e,t){const n=e.split(Qd).filter(Boolean),r=t.split(Qd).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),s=r.shift(),a=parseInt(o,10),l=parseInt(s,10),c=[a,l].sort();if(isNaN(c[0])){if(o>s)return 1;if(s>o)return-1;continue}if(isNaN(c[1]))return isNaN(a)?-1:1;if(a>l)return 1;if(l>a)return-1}return n.length-r.length}const Zs={alphanumeric:NI,alphanumericCaseSensitive:_I,text:jI,textCaseSensitive:kI,datetime:RI,basic:MI},DI={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Xt("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of n){const s=o?.getValue(e.id);if(Object.prototype.toString.call(s)==="[object Date]")return Zs.datetime;if(typeof s=="string"&&(r=!0,s.split(Qd).length>1))return Zs.alphanumeric}return r?Zs.text:Zs.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return tu(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:Zs[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),s=typeof n<"u"&&n!==null;t.setSorting(a=>{const l=a?.find(h=>h.id===e.id),c=a?.findIndex(h=>h.id===e.id);let u=[],f,d=s?n:o==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?l?f="toggle":f="add":a!=null&&a.length&&c!==a.length-1?f="replace":l?f="toggle":f="replace",f==="toggle"&&(s||o||(f="remove")),f==="add"){var p;u=[...a,{id:e.id,desc:d}],u.splice(0,u.length-((p=t.options.maxMultiSortColCount)!=null?p:Number.MAX_SAFE_INTEGER))}else f==="toggle"?u=a.map(h=>h.id===e.id?{...h,desc:d}:h):f==="remove"?u=a.filter(h=>h.id!==e.id):u=[{id:e.id,desc:d}];return u})},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,o;const s=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==s&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?!1:a==="desc"?"asc":"desc":s},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(o=>o.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(o=>o.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())}},AI=[QL,vI,pI,hI,eI,tI,yI,bI,DI,dI,wI,CI,SI,EI,mI];function TI(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...AI,...(t=e._features)!=null?t:[]];let o={_features:r};const s=o._features.reduce((p,h)=>Object.assign(p,h.getDefaultOptions==null?void 0:h.getDefaultOptions(o)),{}),a=p=>o.options.mergeOptions?o.options.mergeOptions(s,p):{...s,...p};let c={...{},...(n=e.initialState)!=null?n:{}};o._features.forEach(p=>{var h;c=(h=p.getInitialState==null?void 0:p.getInitialState(c))!=null?h:c});const u=[];let f=!1;const d={_features:r,options:{...s,...e},initialState:c,_queue:p=>{u.push(p),f||(f=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();f=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{o.setState(o.initialState)},setOptions:p=>{const h=xr(p,o.options);o.options=a(h)},getState:()=>o.options.state,setState:p=>{o.options.onStateChange==null||o.options.onStateChange(p)},_getRowId:(p,h,m)=>{var x;return(x=o.options.getRowId==null?void 0:o.options.getRowId(p,h,m))!=null?x:`${m?[m.id,h].join("."):h}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(p,h)=>{let m=(h?o.getPrePaginationRowModel():o.getRowModel()).rowsById[p];if(!m&&(m=o.getCoreRowModel().rowsById[p],!m))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${p}`):new Error;return m},_getDefaultColumnDef:he(()=>[o.options.defaultColumn],p=>{var h;return p=(h=p)!=null?h:{},{header:m=>{const x=m.header.column.columnDef;return x.accessorKey?x.accessorKey:x.accessorFn?x.id:null},cell:m=>{var x,v;return(x=(v=m.renderValue())==null||v.toString==null?void 0:v.toString())!=null?x:null},...o._features.reduce((m,x)=>Object.assign(m,x.getDefaultColumnDef==null?void 0:x.getDefaultColumnDef()),{}),...p}},ge(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>o.options.columns,getAllColumns:he(()=>[o._getColumnDefs()],p=>{const h=function(m,x,v){return v===void 0&&(v=0),m.map(y=>{const b=JL(o,y,v,x),S=y;return b.columns=S.columns?h(S.columns,b,v+1):[],b})};return h(p)},ge(e,"debugColumns","getAllColumns")),getAllFlatColumns:he(()=>[o.getAllColumns()],p=>p.flatMap(h=>h.getFlatColumns()),ge(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:he(()=>[o.getAllFlatColumns()],p=>p.reduce((h,m)=>(h[m.id]=m,h),{}),ge(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:he(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(p,h)=>{let m=p.flatMap(x=>x.getLeafColumns());return h(m)},ge(e,"debugColumns","getAllLeafColumns")),getColumn:p=>{const h=o._getAllFlatColumnsById()[p];return process.env.NODE_ENV!=="production"&&!h&&console.error(`[Table] Column with id '${p}' does not exist.`),h}};Object.assign(o,d);for(let p=0;p<o._features.length;p++){const h=o._features[p];h==null||h.createTable==null||h.createTable(o)}return o}function B5(){return e=>he(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,s,a){s===void 0&&(s=0);const l=[];for(let u=0;u<o.length;u++){const f=nh(e,e._getRowId(o[u],u,a),o[u],u,s,void 0,a?.id);if(n.flatRows.push(f),n.rowsById[f.id]=f,l.push(f),e.options.getSubRows){var c;f.originalSubRows=e.options.getSubRows(o[u],u),(c=f.originalSubRows)!=null&&c.length&&(f.subRows=r(f.originalSubRows,s+1,f))}}return l};return n.rows=r(t),n},ge(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function PI(e,t,n){return n.options.filterFromLeafRows?OI(e,t,n):LI(e,t,n)}function OI(e,t,n){var r;const o=[],s={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,l=function(c,u){u===void 0&&(u=0);const f=[];for(let p=0;p<c.length;p++){var d;let h=c[p];const m=nh(n,h.id,h.original,h.index,h.depth,void 0,h.parentId);if(m.columnFilters=h.columnFilters,(d=h.subRows)!=null&&d.length&&u<a){if(m.subRows=l(h.subRows,u+1),h=m,t(h)&&!m.subRows.length){f.push(h),s[h.id]=h,o.push(h);continue}if(t(h)||m.subRows.length){f.push(h),s[h.id]=h,o.push(h);continue}}else h=m,t(h)&&(f.push(h),s[h.id]=h,o.push(h))}return f};return{rows:l(e),flatRows:o,rowsById:s}}function LI(e,t,n){var r;const o=[],s={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,l=function(c,u){u===void 0&&(u=0);const f=[];for(let p=0;p<c.length;p++){let h=c[p];if(t(h)){var d;if((d=h.subRows)!=null&&d.length&&u<a){const x=nh(n,h.id,h.original,h.index,h.depth,void 0,h.parentId);x.subRows=l(h.subRows,u+1),h=x}f.push(h),o.push(h),s[h.id]=h}}return f};return{rows:l(e),flatRows:o,rowsById:s}}function II(){return e=>he(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let p=0;p<t.flatRows.length;p++)t.flatRows[p].columnFilters={},t.flatRows[p].columnFiltersMeta={};return t}const o=[],s=[];(n??[]).forEach(p=>{var h;const m=e.getColumn(p.id);if(!m)return;const x=m.getFilterFn();if(!x){process.env.NODE_ENV!=="production"&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${m.id}.`);return}o.push({id:p.id,filterFn:x,resolvedValue:(h=x.resolveFilterValue==null?void 0:x.resolveFilterValue(p.value))!=null?h:p.value})});const a=(n??[]).map(p=>p.id),l=e.getGlobalFilterFn(),c=e.getAllLeafColumns().filter(p=>p.getCanGlobalFilter());r&&l&&c.length&&(a.push("__global__"),c.forEach(p=>{var h;s.push({id:p.id,filterFn:l,resolvedValue:(h=l.resolveFilterValue==null?void 0:l.resolveFilterValue(r))!=null?h:r})}));let u,f;for(let p=0;p<t.flatRows.length;p++){const h=t.flatRows[p];if(h.columnFilters={},o.length)for(let m=0;m<o.length;m++){u=o[m];const x=u.id;h.columnFilters[x]=u.filterFn(h,x,u.resolvedValue,v=>{h.columnFiltersMeta[x]=v})}if(s.length){for(let m=0;m<s.length;m++){f=s[m];const x=f.id;if(f.filterFn(h,x,f.resolvedValue,v=>{h.columnFiltersMeta[x]=v})){h.columnFilters.__global__=!0;break}}h.columnFilters.__global__!==!0&&(h.columnFilters.__global__=!1)}}const d=p=>{for(let h=0;h<a.length;h++)if(p.columnFilters[a[h]]===!1)return!1;return!0};return PI(t.rows,d,e)},ge(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function FI(){return e=>he(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,o=[],s=r.filter(c=>{var u;return(u=e.getColumn(c.id))==null?void 0:u.getCanSort()}),a={};s.forEach(c=>{const u=e.getColumn(c.id);u&&(a[c.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});const l=c=>{const u=c.map(f=>({...f}));return u.sort((f,d)=>{for(let h=0;h<s.length;h+=1){var p;const m=s[h],x=a[m.id],v=x.sortUndefined,y=(p=m?.desc)!=null?p:!1;let b=0;if(v){const S=f.getValue(m.id),w=d.getValue(m.id),E=S===void 0,N=w===void 0;if(E||N){if(v==="first")return E?-1:1;if(v==="last")return E?1:-1;b=E&&N?0:E?v:-v}}if(b===0&&(b=x.sortingFn(f,d,m.id)),b!==0)return y&&(b*=-1),x.invertSorting&&(b*=-1),b}return f.index-d.index}),u.forEach(f=>{var d;o.push(f),(d=f.subRows)!=null&&d.length&&(f.subRows=l(f.subRows))}),u};return{rows:l(n.rows),flatRows:o,rowsById:n.rowsById}},ge(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function La(e,t){return e?$I(e)?g.createElement(e,t):e:null}function $I(e){return VI(e)||typeof e=="function"||BI(e)}function VI(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function BI(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function z5(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=g.useState(()=>({current:TI(t)})),[r,o]=g.useState(()=>n.current.initialState);return n.current.setOptions(s=>({...s,...e,state:{...r,...e.state},onStateChange:a=>{o(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}const ah=g.forwardRef(({className:e,...t},n)=>i.jsx("div",{className:"relative w-full overflow-auto",children:i.jsx("table",{ref:n,className:j("app-table","w-full caption-bottom text-sm",e),...t})}));ah.displayName="Table";const Ia=g.forwardRef(({className:e,...t},n)=>i.jsx("thead",{ref:n,className:j("app-table-header","[&_tr]:border-b",e),...t}));Ia.displayName="TableHeader";const nu=g.forwardRef(({className:e,...t},n)=>i.jsx("tbody",{ref:n,className:j("app-table-body","[&_tr:last-child]:border-0",e),...t}));nu.displayName="TableBody";const W5=g.forwardRef(({className:e,...t},n)=>i.jsx("tfoot",{ref:n,className:j("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));W5.displayName="TableFooter";const In=g.forwardRef(({className:e,...t},n)=>i.jsx("tr",{ref:n,className:j("app-table-row","border-b transition-colors bg-background hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));In.displayName="TableRow";const gi=g.forwardRef(({className:e,...t},n)=>i.jsx("th",{ref:n,className:j("app-table-head","relative h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pe-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));gi.displayName="TableHead";const fs=g.forwardRef(({className:e,...t},n)=>i.jsx("td",{ref:n,className:j("app-table-cell","p-2 align-middle overflow-x-hidden [&:has([role=checkbox])]:pe-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));fs.displayName="TableCell";const zI=g.forwardRef(({className:e,...t},n)=>i.jsx("caption",{ref:n,className:j("mt-4 text-sm text-muted-foreground",e),...t}));zI.displayName="TableCaption";const H5=e=>{const t=e.reduce((n,r)=>{const o=Number(r);return n+(isNaN(o)?0:o)},0);return Math.round(t*100)/100},G5=e=>{const t=e.filter(r=>r!=null&&!isNaN(Number(r)));return t.length===0?0:t.reduce((r,o)=>r+Number(o),0)/t.length},U5=e=>e.filter(t=>t!=null&&t!=="").length,Y5=e=>{const t=e.map(n=>Number(n)).filter(n=>!isNaN(n));return t.length>0?Math.min(...t):0},K5=e=>{const t=e.map(n=>Number(n)).filter(n=>!isNaN(n));return t.length>0?Math.max(...t):0},Z5="__AGGREGATION_TOTALS_ROW__",WI={sum:H5,avg:G5,size:U5,min:Y5,max:K5},HI=e=>"accessorKey"in e&&typeof e.accessorKey=="string"?e.accessorKey:e.id,GI=e=>e.meta?.isActions===!0,UI=({rows:e,columns:t,aggregationLabel:n})=>{const r=e;return t.reduce((o,s,a)=>{const l=HI(s);if(!l)return o;if(a===0&&!s.aggregationFn)return o[l]=n,o;if(!s.aggregationFn)return o;const c=r.map(f=>f[l]);let u;if(typeof s.aggregationFn=="function")u=s.aggregationFn({values:c,field:l});else{const f=WI[s.aggregationFn];u=f?f(c):0}return o[l]=s.aggregationCell?s.aggregationCell(u):u,o},{id:Z5})};function YI({rows:e,columns:t,aggregationLabel:n="Total",onRowClick:r,className:o,...s},a){const l=C.useMemo(()=>t.some(d=>d.aggregationFn),[t]),c=C.useMemo(()=>l?UI({rows:e,columns:t,aggregationLabel:n}):null,[e,t,n,l]),u=z5({data:e,columns:t,getCoreRowModel:B5()}),f=C.useCallback((d,p)=>{p.target.closest('[data-column="actions"]')||r?.(d)},[r]);return i.jsx("div",{ref:a,className:j("h-full rounded-lg border border-border overflow-auto",o),...s,children:i.jsxs("table",{className:"w-full h-full border-collapse",children:[i.jsx(Ia,{className:"sticky top-0 z-10",children:u.getHeaderGroups().map(d=>i.jsx(In,{className:"border-b border-border bg-muted hover:bg-muted",children:d.headers.map((p,h)=>{const m=p.column.columnDef.meta,x=m?.isActions;return i.jsx(gi,{className:j("h-12 px-4 text-sm font-medium text-muted-foreground bg-muted",h===0&&"ps-6",m?.headerAlign==="right"&&"text-right",x&&"sticky end-0 px-0"),style:{minWidth:p.column.columnDef.minSize,width:p.column.columnDef.size},children:p.isPlaceholder?null:La(p.column.columnDef.header,p.getContext())},p.id)})},d.id))}),i.jsxs(nu,{children:[u.getRowModel().rows.map(d=>i.jsx(In,{className:j("h-12 border-b border-border bg-card text-foreground","hover:bg-muted",r&&"cursor-pointer"),onClick:r?p=>f(d.original,p):void 0,children:d.getVisibleCells().map((p,h)=>{const m=p.column.columnDef.meta,x=m?.isActions;return i.jsx(fs,{className:j("px-4 text-sm",h===0&&"ps-6",m?.headerAlign==="right"&&"text-right",x&&"sticky end-0 bg-card px-0"),...x?{"data-column":"actions"}:{},children:La(p.column.columnDef.cell,p.getContext())},p.id)})},d.id)),i.jsx("tr",{"aria-hidden":"true"})]}),c&&i.jsx(W5,{className:"sticky bottom-0 z-10 bg-muted",children:i.jsx(In,{className:"h-12 bg-muted text-foreground hover:bg-muted",children:t.map((d,p)=>{const h=GI(d),m=("accessorKey"in d&&typeof d.accessorKey=="string"?d.accessorKey:d.id)||String(p),x=h?null:c[m],v=d.meta;return i.jsx(fs,{className:j("px-4 text-sm font-bold bg-muted",p===0&&"ps-6",v?.headerAlign==="right"&&"text-right",h&&"sticky end-0 px-0"),children:x??""},m)})})})]})})}const q5=C.forwardRef(YI);q5.displayName="AggregatedTable";const X5=C.forwardRef(({open:e,label:t,clearLabel:n,onClear:r,children:o,className:s,...a},l)=>i.jsxs("div",{ref:l,role:"region","aria-label":a["aria-label"]??(typeof t=="string"?t:void 0),className:j("bg-popover border-border fixed bottom-6 left-1/2 z-50 flex max-w-[540px] -translate-x-1/2 items-center gap-6 rounded-md border px-6 py-4 shadow-lg transition-all duration-300",e?"translate-y-0 opacity-100":"pointer-events-none translate-y-4 opacity-0",s),...a,children:[i.jsx("span",{className:"text-popover-foreground text-sm whitespace-nowrap",children:t}),i.jsx("div",{className:"h-5",children:i.jsx(Ta,{orientation:"vertical",className:"h-full"})}),i.jsx("div",{className:"flex items-center gap-4",children:o}),i.jsx("div",{className:"h-5",children:i.jsx(Ta,{orientation:"vertical",className:"h-full"})}),i.jsx(ot,{variant:"ghost",size:"icon",onClick:r,"aria-label":n,children:i.jsx(X,{name:"XCircle",size:"md",weight:"fill",className:"text-foreground"})})]}));X5.displayName="BulkActionBar";var KI=Symbol.for("preact-signals");function ru(){if(Jn>1)Jn--;else{var e,t=!1;for((function(){var o=Ul;for(Ul=void 0;o!==void 0;)o.S.v===o.v&&(o.S.i=o.i),o=o.o})();wa!==void 0;){var n=wa;for(wa=void 0,Gl++;n!==void 0;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&Q5(n))try{n.c()}catch(o){t||(e=o,t=!0)}n=r}}if(Gl=0,Jn--,t)throw e}}function Je(e){if(Jn>0)return e();ef=++ZI,Jn++;try{return e()}finally{ru()}}var Oe=void 0;function Le(e){var t=Oe;Oe=void 0;try{return e()}finally{Oe=t}}var wa=void 0,Jn=0,Gl=0,ZI=0,ef=0,Ul=void 0,Yl=0;function J5(e){if(Oe!==void 0){var t=e.n;if(t===void 0||t.t!==Oe)return t={i:0,S:e,p:Oe.s,n:void 0,t:Oe,e:void 0,x:void 0,r:t},Oe.s!==void 0&&(Oe.s.n=t),Oe.s=t,e.n=t,32&Oe.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Oe.s,t.n=void 0,Oe.s.n=t,Oe.s=t),t}}function Pt(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}Pt.prototype.brand=KI;Pt.prototype.h=function(){return!0};Pt.prototype.S=function(e){var t=this,n=this.t;n!==e&&e.e===void 0&&(e.x=n,this.t=e,n!==void 0?n.e=e:Le(function(){var r;(r=t.W)==null||r.call(t)}))};Pt.prototype.U=function(e){var t=this;if(this.t!==void 0){var n=e.e,r=e.x;n!==void 0&&(n.x=r,e.e=void 0),r!==void 0&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,r===void 0&&Le(function(){var o;(o=t.Z)==null||o.call(t)}))}};Pt.prototype.subscribe=function(e){var t=this;return Ht(function(){var n=t.value,r=Oe;Oe=void 0;try{e(n)}finally{Oe=r}},{name:"sub"})};Pt.prototype.valueOf=function(){return this.value};Pt.prototype.toString=function(){return this.value+""};Pt.prototype.toJSON=function(){return this.value};Pt.prototype.peek=function(){var e=Oe;Oe=void 0;try{return this.value}finally{Oe=e}};Object.defineProperty(Pt.prototype,"value",{get:function(){var e=J5(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Gl>100)throw new Error("Cycle detected");(function(n){Jn!==0&&Gl===0&&n.l!==ef&&(n.l=ef,Ul={S:n,v:n.v,i:n.i,o:Ul})})(this),this.v=e,this.i++,Yl++,Jn++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{ru()}}}});function mi(e,t){return new Pt(e,t)}function Q5(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function e4(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function t4(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function yo(e,t){Pt.call(this,void 0),this.x=e,this.s=void 0,this.g=Yl-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}yo.prototype=new Pt;yo.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Yl))return!0;if(this.g=Yl,this.f|=1,this.i>0&&!Q5(this))return this.f&=-2,!0;var e=Oe;try{e4(this),Oe=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return Oe=e,t4(this),this.f&=-2,!0};yo.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}Pt.prototype.S.call(this,e)};yo.prototype.U=function(e){if(this.t!==void 0&&(Pt.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};yo.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(yo.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=J5(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function P1(e,t){return new yo(e,t)}function n4(e){var t=e.m;if(e.m=void 0,typeof t=="function"){Jn++;var n=Oe;Oe=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,ih(e),r}finally{Oe=n,ru()}}}function ih(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,n4(e)}function qI(e){if(Oe!==this)throw new Error("Out-of-order effect");t4(this),Oe=e,this.f&=-2,8&this.f&&ih(this),ru()}function Ds(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name}Ds.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.m=t)}finally{e()}};Ds.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,n4(this),e4(this),Jn++;var e=Oe;return Oe=this,qI.bind(this,e)};Ds.prototype.N=function(){2&this.f||(this.f|=2,this.u=wa,wa=this)};Ds.prototype.d=function(){this.f|=8,1&this.f||ih(this)};Ds.prototype.dispose=function(){this.d()};function Ht(e,t){var n=new Ds(e,t);try{n.c()}catch(o){throw n.d(),o}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}var XI=Object.create,lh=Object.defineProperty,JI=Object.defineProperties,QI=Object.getOwnPropertyDescriptor,eF=Object.getOwnPropertyDescriptors,O1=Object.getOwnPropertySymbols,tF=Object.prototype.hasOwnProperty,nF=Object.prototype.propertyIsEnumerable,rF=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),As=e=>{throw TypeError(e)},tf=(e,t,n)=>t in e?lh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oF=(e,t)=>{for(var n in t||(t={}))tF.call(t,n)&&tf(e,n,t[n]);if(O1)for(var n of O1(t))nF.call(t,n)&&tf(e,n,t[n]);return e},sF=(e,t)=>JI(e,eF(t)),L1=(e,t)=>lh(e,"name",{value:t,configurable:!0}),aF=e=>{var t;return[,,,XI((t=void 0)!=null?t:null)]},r4=["class","method","getter","setter","accessor","field","value","get","set"],ra=e=>e!==void 0&&typeof e!="function"?As("Function expected"):e,iF=(e,t,n,r,o)=>({kind:r4[e],name:t,metadata:r,addInitializer:s=>n._?As("Already initialized"):o.push(ra(s||null))}),o4=(e,t)=>tf(t,rF("metadata"),e[3]),zr=(e,t,n,r)=>{for(var o=0,s=e[t>>1],a=s&&s.length;o<a;o++)t&1?s[o].call(n):r=s[o].call(n,r);return r},Ts=(e,t,n,r,o,s)=>{var a,l,c,u,f,d=t&7,p=!!(t&8),h=!!(t&16),m=d>3?e.length+1:d?p?1:2:0,x=r4[d+5],v=d>3&&(e[m-1]=[]),y=e[m]||(e[m]=[]),b=d&&(!h&&!p&&(o=o.prototype),d<5&&(d>3||!h)&&QI(d<4?o:{get[n](){return on(this,s)},set[n](w){return mr(this,s,w)}},n));d?h&&d<4&&L1(s,(d>2?"set ":d>1?"get ":"")+n):L1(o,n);for(var S=r.length-1;S>=0;S--)u=iF(d,n,c={},e[3],y),d&&(u.static=p,u.private=h,f=u.access={has:h?w=>lF(o,w):w=>n in w},d^3&&(f.get=h?w=>(d^1?on:cF)(w,o,d^4?s:b.get):w=>w[n]),d>2&&(f.set=h?(w,E)=>mr(w,o,E,d^4?s:b.set):(w,E)=>w[n]=E)),l=(0,r[S])(d?d<4?h?s:b[x]:d>4?void 0:{get:b.get,set:b.set}:o,u),c._=1,d^4||l===void 0?ra(l)&&(d>4?v.unshift(l):d?h?s=l:b[x]=l:o=l):typeof l!="object"||l===null?As("Object expected"):(ra(a=l.get)&&(b.get=a),ra(a=l.set)&&(b.set=a),ra(a=l.init)&&v.unshift(a));return d||o4(e,o),b&&lh(o,n,b),h?d^4?s:b:o},ch=(e,t,n)=>t.has(e)||As("Cannot "+n),lF=(e,t)=>Object(t)!==t?As('Cannot use the "in" operator on this value'):e.has(t),on=(e,t,n)=>(ch(e,t,"read from private field"),n?n.call(e):t.get(e)),oa=(e,t,n)=>t.has(e)?As("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),mr=(e,t,n,r)=>(ch(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),cF=(e,t,n)=>(ch(e,t,"access private method"),n);function Fa(e,t){if(t){let n;return P1(()=>{const r=e();return r&&n&&t(n,r)?n:(n=r,r)})}return P1(e)}function Cr(e,t){if(Object.is(e,t))return!0;if(e===null||t===null)return!1;if(typeof e=="function"&&typeof t=="function")return e===t;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:!e.some((r,o)=>!Cr(r,t[o]));if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:!n.some(s=>!Cr(e[s],t[s]))}return!1}function Re({get:e},t){return{init(n){return mi(n)},get(){return e.call(this).value},set(n){const r=e.call(this);r.peek()!==n&&(r.value=n)}}}function Qe(e,t){const n=new WeakMap;return function(){let r=n.get(this);return r||(r=Fa(e.bind(this)),n.set(this,r)),r.value}}function Ku(e=!0){return function(t,n){n.addInitializer(function(){const r=n.kind==="field"?this:n.static?this:Object.getPrototypeOf(this),o=Object.getOwnPropertyDescriptor(r,n.name);o&&Object.defineProperty(r,n.name,sF(oF({},o),{enumerable:e}))})}}function xi(...e){const t=e.map(n=>Ht(n));return()=>t.forEach(n=>n())}var s4,a4,i4,l4,c4,u4,jt,uh,Zu,nf,rf,vt,dh,qu,d4,of,fh,Xu,sf,af;u4=[Re],c4=[Re],l4=[Re],i4=[Ku()],a4=[Ku()],s4=[Ku()];var bo=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,zr(jt,5,this),oa(this,vt),oa(this,uh,zr(jt,8,this)),zr(jt,11,this),oa(this,dh,zr(jt,12,this)),zr(jt,15,this),oa(this,fh,zr(jt,16,this)),zr(jt,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return on(this,vt,sf)}get initial(){return on(this,vt,nf)}get previous(){return on(this,vt,d4)}set current(e){const t=Le(()=>on(this,vt,sf));e&&t&&this.equals(t,e)||Je(()=>{on(this,vt,nf)||mr(this,vt,e,rf),mr(this,vt,t,of),mr(this,vt,e,af)})}reset(e=this.defaultValue){Je(()=>{mr(this,vt,void 0,of),mr(this,vt,e,rf),mr(this,vt,e,af)})}};jt=aF();uh=new WeakMap;vt=new WeakSet;dh=new WeakMap;fh=new WeakMap;Zu=Ts(jt,20,"#initial",u4,vt,uh),nf=Zu.get,rf=Zu.set;qu=Ts(jt,20,"#previous",c4,vt,dh),d4=qu.get,of=qu.set;Xu=Ts(jt,20,"#current",l4,vt,fh),sf=Xu.get,af=Xu.set;Ts(jt,2,"current",i4,bo);Ts(jt,2,"initial",a4,bo);Ts(jt,2,"previous",s4,bo);o4(jt,bo);function Ju(e){return Le(()=>{const t={};for(const n in e)t[n]=e[n];return t})}var Ur,uF=class{constructor(){oa(this,Ur,new WeakMap)}get(e,t){var n;return e?(n=on(this,Ur).get(e))==null?void 0:n.get(t):void 0}set(e,t,n){var r;if(e)return on(this,Ur).has(e)||on(this,Ur).set(e,new Map),(r=on(this,Ur).get(e))==null?void 0:r.set(t,n)}clear(e){var t;return e?(t=on(this,Ur).get(e))==null?void 0:t.clear():void 0}};Ur=new WeakMap;var dF=Object.create,f4=Object.defineProperty,fF=Object.getOwnPropertyDescriptor,I1=Object.getOwnPropertySymbols,pF=Object.prototype.hasOwnProperty,hF=Object.prototype.propertyIsEnumerable,p4=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),ou=e=>{throw TypeError(e)},F1=Math.pow,lf=(e,t,n)=>t in e?f4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gF=(e,t)=>{for(var n in t||(t={}))pF.call(t,n)&&lf(e,n,t[n]);if(I1)for(var n of I1(t))hF.call(t,n)&&lf(e,n,t[n]);return e},mF=e=>{var t;return[,,,dF((t=e?.[p4("metadata")])!=null?t:null)]},h4=["class","method","getter","setter","accessor","field","value","get","set"],g4=e=>e!==void 0&&typeof e!="function"?ou("Function expected"):e,xF=(e,t,n,r,o)=>({kind:h4[e],name:t,metadata:r,addInitializer:s=>n._?ou("Already initialized"):o.push(g4(s||null))}),vF=(e,t)=>lf(t,p4("metadata"),e[3]),yF=(e,t,n,r)=>{for(var o=0,s=e[t>>1],a=s&&s.length;o<a;o++)s[o].call(n);return r},m4=(e,t,n,r,o,s)=>{for(var a,l,c,u,f=t&7,d=!1,p=!1,h=2,m=h4[f+5],x=e[h]||(e[h]=[]),v=(o=o.prototype,fF(o,n)),y=r.length-1;y>=0;y--)c=xF(f,n,l={},e[3],x),c.static=d,c.private=p,u=c.access={has:b=>n in b},u.get=b=>b[n],a=(0,r[y])(v[m],c),l._=1,g4(a)&&(v[m]=a);return v&&f4(o,n,v),o},x4=(e,t,n)=>t.has(e)||ou("Cannot "+n),bF=(e,t,n)=>(x4(e,t,"read from private field"),t.get(e)),wF=(e,t,n)=>t.has(e)?ou("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),CF=(e,t,n,r)=>(x4(e,t,"write to private field"),t.set(e,n),n),sn=class cf{constructor(t,n){this.x=t,this.y=n}static delta(t,n){return new cf(t.x-n.x,t.y-n.y)}static distance(t,n){return Math.hypot(t.x-n.x,t.y-n.y)}static equals(t,n){return t.x===n.x&&t.y===n.y}static from({x:t,y:n}){return new cf(t,n)}},rr=class Yr{constructor(t,n,r,o){this.left=t,this.top=n,this.width=r,this.height=o,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(t,n){const{top:r,left:o,width:s,height:a,scale:l}=this,c=new Yr(o+t,r+n,s,a);return c.scale=gF({},l),c}get boundingRectangle(){const{width:t,height:n,left:r,top:o,right:s,bottom:a}=this;return{width:t,height:n,left:r,top:o,right:s,bottom:a}}get center(){const{left:t,top:n,right:r,bottom:o}=this;return new sn((t+r)/2,(n+o)/2)}get area(){const{width:t,height:n}=this;return t*n}equals(t){if(!(t instanceof Yr))return!1;const{left:n,top:r,width:o,height:s}=this;return n===t.left&&r===t.top&&o===t.width&&s===t.height}containsPoint(t){const{top:n,left:r,bottom:o,right:s}=this;return n<=t.y&&t.y<=o&&r<=t.x&&t.x<=s}intersectionArea(t){return t instanceof Yr?SF(this,t):0}intersectionRatio(t){const{area:n}=this,r=this.intersectionArea(t);return r/(t.area+n-r)}get bottom(){const{top:t,height:n}=this;return t+n}get right(){const{left:t,width:n}=this;return t+n}get aspectRatio(){const{width:t,height:n}=this;return t/n}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:t,left:n,width:r,height:o}){return new Yr(n,t,r,o)}static delta(t,n,r={x:"center",y:"center"}){const o=(s,a)=>{const l=r[a],c=a==="x"?s.left:s.top,u=a==="x"?s.width:s.height;return l=="start"?c:l=="end"?c+u:c+u/2};return sn.delta({x:o(t,"x"),y:o(t,"y")},{x:o(n,"x"),y:o(n,"y")})}static intersectionRatio(t,n){return Yr.from(t).intersectionRatio(Yr.from(n))}};function SF(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),a=o-r,l=s-n;return r<o&&n<s?a*l:0}var v4,y4,uf,dl,vi,su=class extends(uf=bo,y4=[Qe],v4=[Qe],uf){constructor(t){const n=sn.from(t);super(n,(r,o)=>sn.equals(r,o)),yF(vi,5,this),wF(this,dl,0),this.velocity={x:0,y:0}}get delta(){return sn.delta(this.current,this.initial)}get direction(){const{current:t,previous:n}=this;if(!n)return null;const r={x:t.x-n.x,y:t.y-n.y};return!r.x&&!r.y?null:Math.abs(r.x)>Math.abs(r.y)?r.x>0?"right":"left":r.y>0?"down":"up"}get current(){return super.current}set current(t){const{current:n}=this,r=sn.from(t),o={x:r.x-n.x,y:r.y-n.y},s=Date.now(),a=s-bF(this,dl),l=c=>Math.round(c/a*100);Je(()=>{CF(this,dl,s),this.velocity={x:l(o.x),y:l(o.y)},super.current=r})}reset(t=this.defaultValue){super.reset(sn.from(t)),this.velocity={x:0,y:0}}};vi=mF(uf);dl=new WeakMap;m4(vi,2,"delta",y4,su);m4(vi,2,"direction",v4,su);vF(vi,su);function df({x:e,y:t},n){const r=Math.abs(e),o=Math.abs(t);return typeof n=="number"?Math.sqrt(F1(r,2)+F1(o,2))>n:"x"in n&&"y"in n?r>n.x&&o>n.y:"x"in n?r>n.x:"y"in n?o>n.y:!1}var b4=(e=>(e.Horizontal="x",e.Vertical="y",e))(b4||{}),w4=Object.values(b4),EF=Object.create,ph=Object.defineProperty,NF=Object.defineProperties,_F=Object.getOwnPropertyDescriptor,jF=Object.getOwnPropertyDescriptors,Kl=Object.getOwnPropertySymbols,C4=Object.prototype.hasOwnProperty,S4=Object.prototype.propertyIsEnumerable,E4=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Ps=e=>{throw TypeError(e)},ff=(e,t,n)=>t in e?ph(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,N4=(e,t)=>{for(var n in t||(t={}))C4.call(t,n)&&ff(e,n,t[n]);if(Kl)for(var n of Kl(t))S4.call(t,n)&&ff(e,n,t[n]);return e},_4=(e,t)=>NF(e,jF(t)),$1=(e,t)=>ph(e,"name",{value:t,configurable:!0}),j4=(e,t)=>{var n={};for(var r in e)C4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Kl)for(var r of Kl(e))t.indexOf(r)<0&&S4.call(e,r)&&(n[r]=e[r]);return n},Os=e=>{var t;return[,,,EF((t=e?.[E4("metadata")])!=null?t:null)]},k4=["class","method","getter","setter","accessor","field","value","get","set"],sa=e=>e!==void 0&&typeof e!="function"?Ps("Function expected"):e,kF=(e,t,n,r,o)=>({kind:k4[e],name:t,metadata:r,addInitializer:s=>n._?Ps("Already initialized"):o.push(sa(s||null))}),wo=(e,t)=>ff(t,E4("metadata"),e[3]),we=(e,t,n,r)=>{for(var o=0,s=e[t>>1],a=s&&s.length;o<a;o++)t&1?s[o].call(n):r=s[o].call(n,r);return r},De=(e,t,n,r,o,s)=>{var a,l,c,u,f,d=t&7,p=!!(t&8),h=!!(t&16),m=d>3?e.length+1:d?p?1:2:0,x=k4[d+5],v=d>3&&(e[m-1]=[]),y=e[m]||(e[m]=[]),b=d&&(!h&&!p&&(o=o.prototype),d<5&&(d>3||!h)&&_F(d<4?o:{get[n](){return pt(this,s)},set[n](w){return an(this,s,w)}},n));d?h&&d<4&&$1(s,(d>2?"set ":d>1?"get ":"")+n):$1(o,n);for(var S=r.length-1;S>=0;S--)u=kF(d,n,c={},e[3],y),d&&(u.static=p,u.private=h,f=u.access={has:h?w=>RF(o,w):w=>n in w},d^3&&(f.get=h?w=>(d^1?pt:MF)(w,o,d^4?s:b.get):w=>w[n]),d>2&&(f.set=h?(w,E)=>an(w,o,E,d^4?s:b.set):(w,E)=>w[n]=E)),l=(0,r[S])(d?d<4?h?s:b[x]:d>4?void 0:{get:b.get,set:b.set}:o,u),c._=1,d^4||l===void 0?sa(l)&&(d>4?v.unshift(l):d?h?s=l:b[x]=l:o=l):typeof l!="object"||l===null?Ps("Object expected"):(sa(a=l.get)&&(b.get=a),sa(a=l.set)&&(b.set=a),sa(a=l.init)&&v.unshift(a));return d||wo(e,o),b&&ph(o,n,b),h?d^4?s:b:o},hh=(e,t,n)=>t.has(e)||Ps("Cannot "+n),RF=(e,t)=>Object(t)!==t?Ps('Cannot use the "in" operator on this value'):e.has(t),pt=(e,t,n)=>(hh(e,t,"read from private field"),n?n.call(e):t.get(e)),Fe=(e,t,n)=>t.has(e)?Ps("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),an=(e,t,n,r)=>(hh(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),MF=(e,t,n)=>(hh(e,t,"access private method"),n);function R4(e,t){return{plugin:e,options:t}}function gh(e){return t=>R4(e,t)}function mh(e){return typeof e=="function"?{plugin:e,options:void 0}:e}var M4,$a,xh,fl;M4=[Re];var Ct=class{constructor(e,t){this.manager=e,this.options=t,Fe(this,xh,we($a,8,this,!1)),we($a,11,this),Fe(this,fl,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return Le(()=>this.disabled)}configure(e){this.options=e}registerEffect(e){const t=Ht(e.bind(this));return pt(this,fl).add(t),t}destroy(){pt(this,fl).forEach(e=>e())}static configure(e){return R4(this,e)}};$a=Os(null);xh=new WeakMap;fl=new WeakMap;De($a,4,"disabled",M4,Ct,xh);wo($a,Ct);var yi=class extends Ct{},pl,Qu=class{constructor(e){this.manager=e,this.instances=new Map,Fe(this,pl,[])}get values(){return Array.from(this.instances.values())}set values(e){const t=e.map(mh).reduceRight((r,o)=>r.some(({plugin:s})=>s===o.plugin)?r:[o,...r],[]),n=t.map(({plugin:r})=>r);for(const r of pt(this,pl))if(!n.includes(r)){if(r.prototype instanceof yi)continue;this.unregister(r)}for(const{plugin:r,options:o}of t)this.register(r,o);an(this,pl,n)}get(e){return this.instances.get(e)}register(e,t){const n=this.instances.get(e);if(n)return n.options!==t&&(n.options=t),n;const r=new e(this.manager,t);return this.instances.set(e,r),r}unregister(e){const t=this.instances.get(e);t&&(t.destroy(),this.instances.delete(e))}destroy(){for(const e of this.instances.values())e.destroy();this.instances.clear()}};pl=new WeakMap;function DF(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}var Ki=[],Go,Uo,AF=class extends Ct{constructor(e){super(e),Fe(this,Go),Fe(this,Uo),this.computeCollisions=this.computeCollisions.bind(this),an(this,Uo,mi(Ki)),this.destroy=xi(()=>{const t=this.computeCollisions(),n=Le(()=>this.manager.dragOperation.position.current);if(t!==Ki){const r=pt(this,Go);if(an(this,Go,n),r&&n.x==r.x&&n.y==r.y)return}else an(this,Go,void 0);pt(this,Uo).value=t},()=>{const{dragOperation:t}=this.manager;t.status.initialized&&this.forceUpdate()})}forceUpdate(e=!0){Le(()=>{e?pt(this,Uo).value=this.computeCollisions():an(this,Go,void 0)})}computeCollisions(e,t){const{registry:n,dragOperation:r}=this.manager,{source:o,shape:s,status:a}=r;if(!a.initialized||!s)return Ki;const l=[],c=[];for(const u of e??n.droppables){if(u.disabled||o&&!u.accepts(o))continue;const f=t??u.collisionDetector;if(!f)continue;c.push(u),u.shape;const d=Le(()=>f({droppable:u,dragOperation:r}));d&&(u.collisionPriority!=null&&(d.priority=u.collisionPriority),l.push(d))}return c.length===0?Ki:(l.sort(DF),l)}get collisions(){return pt(this,Uo).value}};Go=new WeakMap;Uo=new WeakMap;var TF=class{constructor(){this.registry=new Map}addEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));return r.add(t),n.set(e,r),()=>this.removeEventListener(e,t)}removeEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));r.delete(t),n.set(e,r)}dispatch(e,...t){const{registry:n}=this,r=n.get(e);if(r)for(const o of r)o(...t)}},PF=class extends TF{constructor(e){super(),this.manager=e}dispatch(e,t){const n=[t,this.manager];super.dispatch(e,...n)}};function hl(e,t=!0){let n=!1;return _4(N4({},e),{cancelable:t,get defaultPrevented(){return n},preventDefault(){t&&(n=!0)}})}var OF=class extends yi{constructor(e){super(e);const t=(r,o)=>r.map(({id:s})=>s).join("")===o.map(({id:s})=>s).join("");let n=[];this.destroy=xi(()=>{const{dragOperation:r,collisionObserver:o}=e;r.status.initializing&&(n=[],o.enable())},()=>{const{collisionObserver:r,monitor:o}=e,{collisions:s}=r;if(r.isDisabled())return;const a=hl({collisions:s});if(o.dispatch("collision",a),a.defaultPrevented||t(s,n))return;n=s;const[l]=s;Le(()=>{var c;l?.id!==((c=e.dragOperation.target)==null?void 0:c.id)&&(r.disable(),e.actions.setDropTarget(l?.id).then(()=>{r.enable()}))})})}},Ls=(e=>(e[e.Lowest=0]="Lowest",e[e.Low=1]="Low",e[e.Normal=2]="Normal",e[e.High=3]="High",e[e.Highest=4]="Highest",e))(Ls||{}),Is=(e=>(e[e.Collision=0]="Collision",e[e.ShapeIntersection=1]="ShapeIntersection",e[e.PointerIntersection=2]="PointerIntersection",e))(Is||{}),D4,A4,T4,P4,O4,L4,I4,un,vh;I4=[Re],L4=[Qe],O4=[Qe],P4=[Qe],T4=[Qe],A4=[Qe],D4=[Qe];var ir=class{constructor(){we(un,5,this),Fe(this,vh,we(un,8,this,"idle")),we(un,11,this)}get current(){return this.value}get idle(){return this.value==="idle"}get initializing(){return this.value==="initializing"}get initialized(){const{value:e}=this;return e!=="idle"&&e!=="initialization-pending"}get dragging(){return this.value==="dragging"}get dropped(){return this.value==="dropped"}set(e){this.value=e}};un=Os(null);vh=new WeakMap;De(un,4,"value",I4,ir,vh);De(un,2,"current",L4,ir);De(un,2,"idle",O4,ir);De(un,2,"initializing",P4,ir);De(un,2,"initialized",T4,ir);De(un,2,"dragging",A4,ir);De(un,2,"dropped",D4,ir);wo(un,ir);var LF=class{constructor(e){this.manager=e}setDragSource(e){const{dragOperation:t}=this.manager;t.sourceIdentifier=typeof e=="string"||typeof e=="number"?e:e.id}setDropTarget(e){return Le(()=>{const{dragOperation:t}=this.manager,n=e??null;if(t.targetIdentifier===n)return Promise.resolve(!1);t.targetIdentifier=n;const r=hl({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch("dragover",r),this.manager.renderer.rendering.then(()=>r.defaultPrevented)})}start(e){return Le(()=>{const{dragOperation:t}=this.manager;if(e.source!=null&&this.setDragSource(e.source),!t.source)throw new Error("Cannot start a drag operation without a drag source");if(!t.status.idle)throw new Error("Cannot start a drag operation while another is active");const r=new AbortController,{event:o,coordinates:s}=e;Je(()=>{t.status.set("initialization-pending"),t.shape=null,t.canceled=!1,t.activatorEvent=o??null,t.position.reset(s)});const a=hl({operation:t.snapshot()});return this.manager.monitor.dispatch("beforedragstart",a),a.defaultPrevented?(t.reset(),r.abort(),r):(t.status.set("initializing"),t.controller=r,this.manager.renderer.rendering.then(()=>{if(r.signal.aborted)return;const{status:l}=t;l.current==="initializing"&&(t.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:o,operation:t.snapshot(),cancelable:!1}))}),r)})}move(e){return Le(()=>{var t,n;const{dragOperation:r}=this.manager,{status:o,controller:s}=r;if(!o.dragging||!s||s.signal.aborted)return;const a=hl({nativeEvent:e.event,operation:r.snapshot(),by:e.by,to:e.to},(t=e.cancelable)!=null?t:!0);((n=e.propagate)==null||n)&&this.manager.monitor.dispatch("dragmove",a),queueMicrotask(()=>{var l,c,u,f,d;if(a.defaultPrevented)return;const p=(d=e.to)!=null?d:{x:r.position.current.x+((c=(l=e.by)==null?void 0:l.x)!=null?c:0),y:r.position.current.y+((f=(u=e.by)==null?void 0:u.y)!=null?f:0)};r.position.current=p})})}stop(e={}){return Le(()=>{var t,n;const{dragOperation:r}=this.manager,{controller:o}=r;if(!o||o.signal.aborted)return;let s;const a=()=>{const c={resume:()=>{},abort:()=>{}};return s=new Promise((u,f)=>{c.resume=u,c.abort=f}),c};o.abort();const l=()=>{this.manager.renderer.rendering.then(()=>{r.status.set("dropped");const c=Le(()=>{var f;return((f=r.source)==null?void 0:f.status)==="dropping"}),u=()=>{r.controller===o&&(r.controller=void 0),r.reset()};if(c){const{source:f}=r,d=Ht(()=>{f?.status==="idle"&&(d(),u())})}else this.manager.renderer.rendering.then(u)})};r.canceled=(t=e.canceled)!=null?t:!1,this.manager.monitor.dispatch("dragend",{nativeEvent:e.event,operation:r.snapshot(),canceled:(n=e.canceled)!=null?n:!1,suspend:a}),s?s.then(l).catch(()=>r.reset()):l()})}},F4,$4,V4,B4,$t,yh,bh,wh,Ch;B4=[Re],V4=[Re],$4=[Re],F4=[Re];var Lr=class{constructor(e,t){Fe(this,yh,we($t,8,this)),we($t,11,this),Fe(this,bh,we($t,12,this)),we($t,15,this),Fe(this,wh,we($t,16,this)),we($t,19,this),Fe(this,Ch,we($t,20,this)),we($t,23,this);const{effects:n,id:r,data:o={},disabled:s=!1,register:a=!0}=e;let l=r;this.manager=t,this.id=r,this.data=o,this.disabled=s,this.effects=()=>{var c;return[()=>{const{id:u,manager:f}=this;if(u!==l)return f?.registry.register(this),()=>f?.registry.unregister(this)},...(c=n?.())!=null?c:[]]},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),t&&a&&queueMicrotask(this.register)}register(){var e;return(e=this.manager)==null?void 0:e.registry.register(this)}unregister(){var e;(e=this.manager)==null||e.registry.unregister(this)}destroy(){var e;(e=this.manager)==null||e.registry.unregister(this)}};$t=Os(null);yh=new WeakMap;bh=new WeakMap;wh=new WeakMap;Ch=new WeakMap;De($t,4,"manager",B4,Lr,yh);De($t,4,"id",V4,Lr,bh);De($t,4,"data",$4,Lr,wh);De($t,4,"disabled",F4,Lr,Ch);wo($t,Lr);var V1=class{constructor(){this.map=mi(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{const n=this.map.peek(),r=n.get(e),o=()=>this.unregister(e,t);if(r===t)return o;if(r){const l=this.cleanupFunctions.get(r);l?.(),this.cleanupFunctions.delete(r)}const s=new Map(n);s.set(e,t),this.map.value=s;const a=xi(...t.effects());return this.cleanupFunctions.set(t,a),o},this.unregister=(e,t)=>{const n=this.map.peek();if(n.get(e)!==t)return;const r=this.cleanupFunctions.get(t);r?.(),this.cleanupFunctions.delete(t);const o=new Map(n);o.delete(e),this.map.value=o}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(e){return this.map.value.has(e)}get(e){return this.map.value.get(e)}destroy(){for(const e of this){const t=this.cleanupFunctions.get(e);t?.(),e.destroy()}this.map.value=new Map}},z4,W4,H4,G4,U4,Y4,pf,kt,Sh,Eh,Nh,Fn=class extends(pf=Lr,Y4=[Re],U4=[Re],G4=[Re],H4=[Qe],W4=[Qe],z4=[Qe],pf){constructor(t,n){var r=t,{modifiers:o,type:s,sensors:a}=r,l=j4(r,["modifiers","type","sensors"]);super(l,n),we(kt,5,this),Fe(this,Sh,we(kt,8,this)),we(kt,11,this),Fe(this,Eh,we(kt,12,this)),we(kt,15,this),Fe(this,Nh,we(kt,16,this,this.isDragSource?"dragging":"idle")),we(kt,19,this),this.type=s,this.sensors=a,this.modifiers=o,this.alignment=l.alignment}get isDropping(){return this.status==="dropping"&&this.isDragSource}get isDragging(){return this.status==="dragging"&&this.isDragSource}get isDragSource(){var t,n;return((n=(t=this.manager)==null?void 0:t.dragOperation.source)==null?void 0:n.id)===this.id}};kt=Os(pf);Sh=new WeakMap;Eh=new WeakMap;Nh=new WeakMap;De(kt,4,"type",Y4,Fn,Sh);De(kt,4,"modifiers",U4,Fn,Eh);De(kt,4,"status",G4,Fn,Nh);De(kt,2,"isDropping",H4,Fn);De(kt,2,"isDragging",W4,Fn);De(kt,2,"isDragSource",z4,Fn);wo(kt,Fn);var K4,Z4,q4,X4,J4,Q4,hf,ct,_h,jh,kh,Rh,Mh,$n=class extends(hf=Lr,Q4=[Re],J4=[Re],X4=[Re],q4=[Re],Z4=[Re],K4=[Qe],hf){constructor(t,n){var r=t,{accept:o,collisionDetector:s,collisionPriority:a,type:l}=r,c=j4(r,["accept","collisionDetector","collisionPriority","type"]);super(c,n),we(ct,5,this),Fe(this,_h,we(ct,8,this)),we(ct,11,this),Fe(this,jh,we(ct,12,this)),we(ct,15,this),Fe(this,kh,we(ct,16,this)),we(ct,19,this),Fe(this,Rh,we(ct,20,this)),we(ct,23,this),Fe(this,Mh,we(ct,24,this)),we(ct,27,this),this.accept=o,this.collisionDetector=s,this.collisionPriority=a,this.type=l}accepts(t){const{accept:n}=this;return n?typeof n=="function"?n(t):t.type?Array.isArray(n)?n.includes(t.type):t.type===n:!1:!0}get isDropTarget(){var t,n;return((n=(t=this.manager)==null?void 0:t.dragOperation.target)==null?void 0:n.id)===this.id}};ct=Os(hf);_h=new WeakMap;jh=new WeakMap;kh=new WeakMap;Rh=new WeakMap;Mh=new WeakMap;De(ct,4,"accept",Q4,$n,_h);De(ct,4,"type",J4,$n,jh);De(ct,4,"collisionDetector",X4,$n,kh);De(ct,4,"collisionPriority",q4,$n,Rh);De(ct,4,"shape",Z4,$n,Mh);De(ct,2,"isDropTarget",K4,$n);wo(ct,$n);var ps=class extends Ct{constructor(e,t){super(e,t),this.manager=e,this.options=t}},IF=class extends AbortController{constructor(e,t){super(),this.constraints=e,this.onActivate=t,this.activated=!1;for(const n of e??[])n.controller=this}onEvent(e){var t;if(!this.activated)if((t=this.constraints)!=null&&t.length)for(const n of this.constraints)n.onEvent(e);else this.activate(e)}activate(e){this.activated||(this.activated=!0,this.onActivate(e))}abort(e){this.activated=!1,super.abort(e)}},gl,ew=class{constructor(e){this.options=e,Fe(this,gl)}set controller(e){an(this,gl,e),e.signal.addEventListener("abort",()=>this.abort())}activate(e){var t;(t=pt(this,gl))==null||t.activate(e)}};gl=new WeakMap;var B1=class extends Ct{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},FF=class{constructor(e){this.draggables=new V1,this.droppables=new V1,this.plugins=new Qu(e),this.sensors=new Qu(e),this.modifiers=new Qu(e)}register(e,t){if(e instanceof Fn)return this.draggables.register(e.id,e);if(e instanceof $n)return this.droppables.register(e.id,e);if(e.prototype instanceof B1)return this.modifiers.register(e,t);if(e.prototype instanceof ps)return this.sensors.register(e,t);if(e.prototype instanceof Ct)return this.plugins.register(e,t);throw new Error("Invalid instance type")}unregister(e){if(e instanceof Lr)return e instanceof Fn?this.draggables.unregister(e.id,e):e instanceof $n?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof B1)return this.modifiers.unregister(e);if(e.prototype instanceof ps)return this.sensors.unregister(e);if(e.prototype instanceof Ct)return this.plugins.unregister(e);throw new Error("Invalid instance type")}destroy(){this.draggables.destroy(),this.droppables.destroy(),this.plugins.destroy(),this.sensors.destroy(),this.modifiers.destroy()}},tw,nw,rw,ow,sw,aw,iw,lw,cw,aa,ml,Yo,Ke,Dh,Ah,Th,Ph,Oh,ia;cw=[Qe],lw=[Re],iw=[Re],aw=[Re],sw=[Re],ow=[Re],rw=[Qe],nw=[Qe],tw=[Qe];var _n=class{constructor(e){we(Ke,5,this),Fe(this,aa),Fe(this,ml),Fe(this,Yo,new bo(void 0,(t,n)=>t&&n?t.equals(n):t===n)),this.status=new ir,Fe(this,Dh,we(Ke,8,this,!1)),we(Ke,11,this),Fe(this,Ah,we(Ke,12,this,null)),we(Ke,15,this),Fe(this,Th,we(Ke,16,this,null)),we(Ke,19,this),Fe(this,Ph,we(Ke,20,this,null)),we(Ke,23,this),Fe(this,Oh,we(Ke,24,this,[])),we(Ke,27,this),this.position=new su({x:0,y:0}),Fe(this,ia,{x:0,y:0}),an(this,aa,e)}get shape(){const{current:e,initial:t,previous:n}=pt(this,Yo);return!e||!t?null:{current:e,initial:t,previous:n}}set shape(e){e?pt(this,Yo).current=e:pt(this,Yo).reset()}get source(){var e;const t=this.sourceIdentifier;if(t==null)return null;const n=pt(this,aa).registry.draggables.get(t);return n&&an(this,ml,n),(e=n??pt(this,ml))!=null?e:null}get target(){var e;const t=this.targetIdentifier;return t!=null&&(e=pt(this,aa).registry.droppables.get(t))!=null?e:null}get transform(){const{x:e,y:t}=this.position.delta;let n={x:e,y:t};for(const r of this.modifiers)n=r.apply(_4(N4({},this.snapshot()),{transform:n}));return an(this,ia,n),n}snapshot(){return Le(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:pt(this,ia),shape:this.shape?Ju(this.shape):null,position:Ju(this.position),status:Ju(this.status),canceled:this.canceled}))}reset(){Je(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,pt(this,Yo).reset(),this.position.reset({x:0,y:0}),an(this,ia,{x:0,y:0}),this.modifiers=[]})}};Ke=Os(null);aa=new WeakMap;ml=new WeakMap;Yo=new WeakMap;Dh=new WeakMap;Ah=new WeakMap;Th=new WeakMap;Ph=new WeakMap;Oh=new WeakMap;ia=new WeakMap;De(Ke,2,"shape",cw,_n);De(Ke,4,"canceled",lw,_n,Dh);De(Ke,4,"activatorEvent",iw,_n,Ah);De(Ke,4,"sourceIdentifier",aw,_n,Th);De(Ke,4,"targetIdentifier",sw,_n,Ph);De(Ke,4,"modifiers",ow,_n,Oh);De(Ke,2,"source",rw,_n);De(Ke,2,"target",nw,_n);De(Ke,2,"transform",tw,_n);wo(Ke,_n);var $F={get rendering(){return Promise.resolve()}};function Qn(e,t){return typeof e=="function"?e(t):e??t}var VF=class{constructor(t){this.destroy=()=>{this.dragOperation.status.idle||this.actions.stop({canceled:!0}),this.dragOperation.modifiers.forEach(p=>p.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};var n;const r=t??{},o=Qn(r.plugins,[]),s=Qn(r.sensors,[]),a=Qn(r.modifiers,[]),l=(n=r.renderer)!=null?n:$F,c=new PF(this),u=new FF(this);this.registry=u,this.monitor=c,this.renderer=l,this.actions=new LF(this),this.dragOperation=new _n(this),this.collisionObserver=new AF(this),this.plugins=[OF,...o],this.modifiers=a,this.sensors=s;const{destroy:f}=this,d=xi(()=>{var p,h,m;const x=Le(()=>this.dragOperation.modifiers),v=this.modifiers;for(const y of x)v.includes(y)||y.destroy();this.dragOperation.modifiers=(m=(h=(p=this.dragOperation.source)==null?void 0:p.modifiers)==null?void 0:h.map(y=>{const{plugin:b,options:S}=mh(y);return new b(this,S)}))!=null?m:v});this.destroy=()=>{d(),f()}}get plugins(){return this.registry.plugins.values}set plugins(t){this.registry.plugins.values=t}get modifiers(){return this.registry.modifiers.values}set modifiers(t){this.registry.modifiers.values=t}get sensors(){return this.registry.sensors.values}set sensors(t){this.registry.sensors.values=t}},uw=e=>{throw TypeError(e)},Lh=(e,t,n)=>t.has(e)||uw("Cannot "+n),Ce=(e,t,n)=>(Lh(e,t,"read from private field"),t.get(e)),Ft=(e,t,n)=>t.has(e)?uw("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Yt=(e,t,n,r)=>(Lh(e,t,"write to private field"),t.set(e,n),n),dw=(e,t,n)=>(Lh(e,t,"access private method"),n);function au(e){return e?e instanceof KeyframeEffect?!0:"getKeyframes"in e&&typeof e.getKeyframes=="function":!1}function fw(e,t){const n=e.getAnimations();if(n.length>0)for(const r of n){if(r.playState!=="running")continue;const{effect:o}=r,a=(au(o)?o.getKeyframes():[]).filter(t);if(a.length>0)return[a[a.length-1],r]}return null}function iu(e){const{width:t,height:n,top:r,left:o,bottom:s,right:a}=e.getBoundingClientRect();return{width:t,height:n,top:r,left:o,bottom:s,right:a}}function Ih(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function bi(e){return"nodeType"in e}function Jt(e){var t,n,r;return e?Ih(e)?e:bi(e)?"defaultView"in e?(t=e.defaultView)!=null?t:window:(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window:window:window}function Fh(e){const{Document:t}=Jt(e);return e instanceof t||"nodeType"in e&&e.nodeType===Node.DOCUMENT_NODE}function uo(e){return!e||Ih(e)?!1:e instanceof Jt(e).HTMLElement||"namespaceURI"in e&&typeof e.namespaceURI=="string"&&e.namespaceURI.endsWith("html")}function pw(e){return e instanceof Jt(e).SVGElement||"namespaceURI"in e&&typeof e.namespaceURI=="string"&&e.namespaceURI.endsWith("svg")}function Co(e){return e?Ih(e)?e.document:bi(e)?Fh(e)?e:uo(e)||pw(e)?e.ownerDocument:document:document:document}function BF(e){var t,n,r,o;const{documentElement:s}=Co(e),a=Jt(e).visualViewport,l=(t=a?.width)!=null?t:s.clientWidth,c=(n=a?.height)!=null?n:s.clientHeight,u=(r=a?.offsetTop)!=null?r:0,f=(o=a?.offsetLeft)!=null?o:0;return{top:u,left:f,right:f+l,bottom:u+c,width:l,height:c}}function zF(e,t){if(WF(e)&&e.open===!1)return!1;const{overflow:n,overflowX:r,overflowY:o}=getComputedStyle(e);return n==="visible"&&r==="visible"&&o==="visible"}function WF(e){return e.tagName==="DETAILS"}function Va(e,t=e.getBoundingClientRect(),n=0){var r,o,s,a,l;let c=t;const{ownerDocument:u}=e,f=(r=u.defaultView)!=null?r:window;let d=e.parentElement;for(;d&&d!==u.documentElement;){if(!zF(d)){const S=d.getBoundingClientRect(),w=n*(S.bottom-S.top),E=n*(S.right-S.left),N=n*(S.bottom-S.top),_=n*(S.right-S.left);c={top:Math.max(c.top,S.top-w),right:Math.min(c.right,S.right+E),bottom:Math.min(c.bottom,S.bottom+N),left:Math.max(c.left,S.left-_),width:0,height:0},c.width=c.right-c.left,c.height=c.bottom-c.top}d=d.parentElement}const p=f.visualViewport,h=(o=p?.offsetTop)!=null?o:0,m=(s=p?.offsetLeft)!=null?s:0,x=(a=p?.width)!=null?a:f.innerWidth,v=(l=p?.height)!=null?l:f.innerHeight,y=n*v,b=n*x;return c={top:Math.max(c.top,h-y),right:Math.min(c.right,m+x+b),bottom:Math.min(c.bottom,h+v+y),left:Math.max(c.left,m-b),width:0,height:0},c.width=c.right-c.left,c.height=c.bottom-c.top,c.width<0&&(c.width=0),c.height<0&&(c.height=0),c}function hs(e){return{x:e.clientX,y:e.clientY}}var hw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function gf(e=document,t=new Set){if(t.has(e))return[];t.add(e);const n=[e];for(const r of Array.from(e.querySelectorAll("iframe, frame")))try{const o=r.contentDocument;o&&!t.has(o)&&n.push(...gf(o,t))}catch{}try{const r=e.defaultView;if(r&&r!==window.top){const o=r.parent;o&&o.document&&o.document!==e&&n.push(...gf(o.document,t))}}catch{}return n}function $h(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function gw(){var e,t;const n=$h()?window.visualViewport:null;return{x:(e=n?.offsetLeft)!=null?e:0,y:(t=n?.offsetTop)!=null?t:0}}function Vh(e){return!e||!bi(e)?!1:e instanceof Jt(e).ShadowRoot}function Zl(e){if(e&&bi(e)){let t=e.getRootNode();if(Vh(t))return t;if(t instanceof Document)return t}return Co(e)}function Bh(e){return e.matchMedia("(prefers-reduced-motion: reduce)").matches}function HF(e){const t="input, textarea, select, canvas, [contenteditable]",n=e.cloneNode(!0),r=Array.from(e.querySelectorAll(t));return Array.from(n.querySelectorAll(t)).forEach((s,a)=>{const l=r[a];if(z1(s)&&z1(l)&&(s.type!=="file"&&(s.value=l.value),s.type==="radio"&&s.name&&(s.name=`Cloned__${s.name}`)),W1(s)&&W1(l)&&l.width>0&&l.height>0){const c=s.getContext("2d");c?.drawImage(l,0,0)}}),n}function z1(e){return"value"in e}function W1(e){return e.tagName==="CANVAS"}function mw(e,{x:t,y:n}){const r=e.elementFromPoint(t,n);if(GF(r)){const{contentDocument:o}=r;if(o){const{left:s,top:a}=r.getBoundingClientRect();return mw(o,{x:t-s,y:n-a})}}return r}function GF(e){return e?.tagName==="IFRAME"}var mf=new WeakMap;function UF(e){return!!e.closest(`
|
|
85
|
+
color: hsl(${Math.max(0,Math.min(120-120*p,120))}deg 100% 31%);`,n?.key)}return o}}function me(e,t,n,r){return{debug:()=>{var o;return(o=e?.debugAll)!=null?o:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:r}}function eI(e,t,n,r){const o=()=>{var a;return(a=s.getValue())!=null?a:e.options.renderFallbackValue},s={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:o,getContext:he(()=>[e,n,t,s],(a,l,c,u)=>({table:a,column:l,row:c,cell:u,getValue:u.getValue,renderValue:u.renderValue}),me(e.options,"debugCells","cell.getContext"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(s,n,t,e)},{}),s}function tI(e,t,n,r){var o,s;const l={...e._getDefaultColumnDef(),...t},c=l.accessorKey;let u=(o=(s=l.id)!=null?s:c?typeof String.prototype.replaceAll=="function"?c.replaceAll(".","_"):c.replace(/\./g,"_"):void 0)!=null?o:typeof l.header=="string"?l.header:void 0,f;if(l.accessorFn?f=l.accessorFn:c&&(c.includes(".")?f=p=>{let h=p;for(const x of c.split(".")){var g;h=(g=h)==null?void 0:g[x],process.env.NODE_ENV!=="production"&&h===void 0&&console.warn(`"${x}" in deeply nested key "${c}" returned undefined.`)}return h}:f=p=>p[l.accessorKey]),!u)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 d={id:`${String(u)}`,accessorFn:f,parent:r,depth:n,columnDef:l,columns:[],getFlatColumns:he(()=>[!0],()=>{var p;return[d,...(p=d.columns)==null?void 0:p.flatMap(h=>h.getFlatColumns())]},me(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:he(()=>[e._getOrderColumnsFn()],p=>{var h;if((h=d.columns)!=null&&h.length){let g=d.columns.flatMap(x=>x.getLeafColumns());return p(g)}return[d]},me(e.options,"debugColumns","column.getLeafColumns"))};for(const p of e._features)p.createColumn==null||p.createColumn(d,e);return d}const xt="debugHeaders";function A1(e,t,n){var r;let s={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 a=[],l=c=>{c.subHeaders&&c.subHeaders.length&&c.subHeaders.map(l),a.push(c)};return l(s),a},getContext:()=>({table:e,header:s,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(s,e)}),s}const nI={createTable:e=>{e.getHeaderGroups=he(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var s,a;const l=(s=r?.map(d=>n.find(p=>p.id===d)).filter(Boolean))!=null?s:[],c=(a=o?.map(d=>n.find(p=>p.id===d)).filter(Boolean))!=null?a:[],u=n.filter(d=>!(r!=null&&r.includes(d.id))&&!(o!=null&&o.includes(d.id)));return Gi(t,[...l,...u,...c],e)},me(e.options,xt,"getHeaderGroups")),e.getCenterHeaderGroups=he(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>(n=n.filter(s=>!(r!=null&&r.includes(s.id))&&!(o!=null&&o.includes(s.id))),Gi(t,n,e,"center")),me(e.options,xt,"getCenterHeaderGroups")),e.getLeftHeaderGroups=he(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;const s=(o=r?.map(a=>n.find(l=>l.id===a)).filter(Boolean))!=null?o:[];return Gi(t,s,e,"left")},me(e.options,xt,"getLeftHeaderGroups")),e.getRightHeaderGroups=he(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;const s=(o=r?.map(a=>n.find(l=>l.id===a)).filter(Boolean))!=null?o:[];return Gi(t,s,e,"right")},me(e.options,xt,"getRightHeaderGroups")),e.getFooterGroups=he(()=>[e.getHeaderGroups()],t=>[...t].reverse(),me(e.options,xt,"getFooterGroups")),e.getLeftFooterGroups=he(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),me(e.options,xt,"getLeftFooterGroups")),e.getCenterFooterGroups=he(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),me(e.options,xt,"getCenterFooterGroups")),e.getRightFooterGroups=he(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),me(e.options,xt,"getRightFooterGroups")),e.getFlatHeaders=he(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),me(e.options,xt,"getFlatHeaders")),e.getLeftFlatHeaders=he(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),me(e.options,xt,"getLeftFlatHeaders")),e.getCenterFlatHeaders=he(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),me(e.options,xt,"getCenterFlatHeaders")),e.getRightFlatHeaders=he(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),me(e.options,xt,"getRightFlatHeaders")),e.getCenterLeafHeaders=he(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),me(e.options,xt,"getCenterLeafHeaders")),e.getLeftLeafHeaders=he(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),me(e.options,xt,"getLeftLeafHeaders")),e.getRightLeafHeaders=he(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),me(e.options,xt,"getRightLeafHeaders")),e.getLeafHeaders=he(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var o,s,a,l,c,u;return[...(o=(s=t[0])==null?void 0:s.headers)!=null?o:[],...(a=(l=n[0])==null?void 0:l.headers)!=null?a:[],...(c=(u=r[0])==null?void 0:u.headers)!=null?c:[]].map(f=>f.getLeafHeaders()).flat()},me(e.options,xt,"getLeafHeaders"))}};function Gi(e,t,n,r){var o,s;let a=0;const l=function(p,h){h===void 0&&(h=1),a=Math.max(a,h),p.filter(g=>g.getIsVisible()).forEach(g=>{var x;(x=g.columns)!=null&&x.length&&l(g.columns,h+1)},0)};l(e);let c=[];const u=(p,h)=>{const g={depth:h,id:[r,`${h}`].filter(Boolean).join("_"),headers:[]},x=[];p.forEach(v=>{const y=[...x].reverse()[0],b=v.column.depth===g.depth;let S,w=!1;if(b&&v.column.parent?S=v.column.parent:(S=v.column,w=!0),y&&y?.column===S)y.subHeaders.push(v);else{const E=A1(n,S,{id:[r,h,S.id,v?.id].filter(Boolean).join("_"),isPlaceholder:w,placeholderId:w?`${x.filter(N=>N.column===S).length}`:void 0,depth:h,index:x.length});E.subHeaders.push(v),x.push(E)}g.headers.push(v),v.headerGroup=g}),c.push(g),h>0&&u(x,h-1)},f=t.map((p,h)=>A1(n,p,{depth:a,index:h}));u(f,a-1),c.reverse();const d=p=>p.filter(g=>g.column.getIsVisible()).map(g=>{let x=0,v=0,y=[0];g.subHeaders&&g.subHeaders.length?(y=[],d(g.subHeaders).forEach(S=>{let{colSpan:w,rowSpan:E}=S;x+=w,y.push(E)})):x=1;const b=Math.min(...y);return v=v+b,g.colSpan=x,g.rowSpan=v,{colSpan:x,rowSpan:v}});return d((o=(s=c[0])==null?void 0:s.headers)!=null?o:[]),c}const nh=(e,t,n,r,o,s,a)=>{let l={id:t,index:r,original:n,depth:o,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:c=>{if(l._valuesCache.hasOwnProperty(c))return l._valuesCache[c];const u=e.getColumn(c);if(u!=null&&u.accessorFn)return l._valuesCache[c]=u.accessorFn(l.original,r),l._valuesCache[c]},getUniqueValues:c=>{if(l._uniqueValuesCache.hasOwnProperty(c))return l._uniqueValuesCache[c];const u=e.getColumn(c);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(l._uniqueValuesCache[c]=u.columnDef.getUniqueValues(l.original,r),l._uniqueValuesCache[c]):(l._uniqueValuesCache[c]=[l.getValue(c)],l._uniqueValuesCache[c])},renderValue:c=>{var u;return(u=l.getValue(c))!=null?u:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>QL(l.subRows,c=>c.subRows),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let c=[],u=l;for(;;){const f=u.getParentRow();if(!f)break;c.push(f),u=f}return c.reverse()},getAllCells:he(()=>[e.getAllLeafColumns()],c=>c.map(u=>eI(e,l,u,u.id)),me(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:he(()=>[l.getAllCells()],c=>c.reduce((u,f)=>(u[f.column.id]=f,u),{}),me(e.options,"debugRows","getAllCellsByColumnId"))};for(let c=0;c<e._features.length;c++){const u=e._features[c];u==null||u.createRow==null||u.createRow(l,e)}return l},rI={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()}}},P5=(e,t,n)=>{var r,o;const s=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((o=e.getValue(t))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(s))};P5.autoRemove=e=>bn(e);const T5=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};T5.autoRemove=e=>bn(e);const O5=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};O5.autoRemove=e=>bn(e);const L5=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};L5.autoRemove=e=>bn(e);const I5=(e,t,n)=>!n.some(r=>{var o;return!((o=e.getValue(t))!=null&&o.includes(r))});I5.autoRemove=e=>bn(e)||!(e!=null&&e.length);const F5=(e,t,n)=>n.some(r=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)});F5.autoRemove=e=>bn(e)||!(e!=null&&e.length);const $5=(e,t,n)=>e.getValue(t)===n;$5.autoRemove=e=>bn(e);const V5=(e,t,n)=>e.getValue(t)==n;V5.autoRemove=e=>bn(e);const rh=(e,t,n)=>{let[r,o]=n;const s=e.getValue(t);return s>=r&&s<=o};rh.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,s=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(o)?1/0:o;if(s>a){const l=s;s=a,a=l}return[s,a]};rh.autoRemove=e=>bn(e)||bn(e[0])&&bn(e[1]);const Un={includesString:P5,includesStringSensitive:T5,equalsString:O5,arrIncludes:L5,arrIncludesAll:I5,arrIncludesSome:F5,equals:$5,weakEquals:V5,inNumberRange:rh};function bn(e){return e==null||e===""}const oI={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Xt("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?Un.includesString:typeof r=="number"?Un.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Un.equals:Array.isArray(r)?Un.arrIncludes:Un.weakEquals},e.getFilterFn=()=>{var n,r;return tu(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:Un[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!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(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const o=e.getFilterFn(),s=r?.find(f=>f.id===e.id),a=xr(n,s?s.value:void 0);if(P1(o,a,e)){var l;return(l=r?.filter(f=>f.id!==e.id))!=null?l:[]}const c={id:e.id,value:a};if(s){var u;return(u=r?.map(f=>f.id===e.id?c:f))!=null?u:[]}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=o=>{var s;return(s=xr(t,o))==null?void 0:s.filter(a=>{const l=n.find(c=>c.id===a.id);if(l){const c=l.getFilterFn();if(P1(c,a.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 P1(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const sI=(e,t,n)=>n.reduce((r,o)=>{const s=o.getValue(e);return r+(typeof s=="number"?s:0)},0),aI=(e,t,n)=>{let r;return n.forEach(o=>{const s=o.getValue(e);s!=null&&(r>s||r===void 0&&s>=s)&&(r=s)}),r},iI=(e,t,n)=>{let r;return n.forEach(o=>{const s=o.getValue(e);s!=null&&(r<s||r===void 0&&s>=s)&&(r=s)}),r},lI=(e,t,n)=>{let r,o;return n.forEach(s=>{const a=s.getValue(e);a!=null&&(r===void 0?a>=a&&(r=o=a):(r>a&&(r=a),o<a&&(o=a)))}),[r,o]},cI=(e,t)=>{let n=0,r=0;if(t.forEach(o=>{let s=o.getValue(e);s!=null&&(s=+s)>=s&&(++n,r+=s)}),n)return r/n},uI=(e,t)=>{if(!t.length)return;const n=t.map(s=>s.getValue(e));if(!JL(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((s,a)=>s-a);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},dI=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),fI=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,pI=(e,t)=>t.length,Bu={sum:sI,min:aI,max:iI,extent:lI,mean:cI,median:uI,unique:dI,uniqueCount:fI,count:pI},hI={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:Xt("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?.getValue(e.id);if(typeof r=="number")return Bu.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Bu.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return tu(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:Bu[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 o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function mI(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(s=>!t.includes(s.id));return n==="remove"?r:[...t.map(s=>e.find(a=>a.id===s)).filter(Boolean),...r]}const gI={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Xt("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=he(n=>[ba(t,n)],n=>n.findIndex(r=>r.id===e.id),me(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return((r=ba(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=ba(t,n);return((r=o[o.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=he(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>o=>{let s=[];if(!(t!=null&&t.length))s=o;else{const a=[...t],l=[...o];for(;l.length&&a.length;){const c=a.shift(),u=l.findIndex(f=>f.id===c);u>-1&&s.push(l.splice(u,1)[0])}s=[...s,...l]}return mI(s,n,r)},me(e.options,"debugTable","_getOrderColumnsFn"))}},zu=()=>({left:[],right:[]}),xI={getInitialState:e=>({columnPinning:zu(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Xt("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var s,a;if(n==="right"){var l,c;return{left:((l=o?.left)!=null?l:[]).filter(d=>!(r!=null&&r.includes(d))),right:[...((c=o?.right)!=null?c:[]).filter(d=>!(r!=null&&r.includes(d))),...r]}}if(n==="left"){var u,f;return{left:[...((u=o?.left)!=null?u:[]).filter(d=>!(r!=null&&r.includes(d))),...r],right:((f=o?.right)!=null?f:[]).filter(d=>!(r!=null&&r.includes(d)))}}return{left:((s=o?.left)!=null?s:[]).filter(d=>!(r!=null&&r.includes(d))),right:((a=o?.right)!=null?a:[]).filter(d=>!(r!=null&&r.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,s,a;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((s=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?s:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(l=>l.id),{left:r,right:o}=t.getState().columnPinning,s=n.some(l=>r?.includes(l)),a=n.some(l=>o?.includes(l));return s?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?(n=(r=t.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=he(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,o)=>{const s=[...r??[],...o??[]];return n.filter(a=>!s.includes(a.column.id))},me(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=he(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(s=>n.find(a=>a.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),me(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=he(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(s=>n.find(a=>a.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),me(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?zu():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:zu())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var o,s;return!!((o=r.left)!=null&&o.length||(s=r.right)!=null&&s.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=he(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),me(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=he(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),me(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=he(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const o=[...n??[],...r??[]];return t.filter(s=>!o.includes(s.id))},me(e.options,"debugColumns","getCenterLeafColumns"))}};function vI(e){return e||(typeof document<"u"?document:null)}const Ui={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Wu=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),yI={getDefaultColumnDef:()=>Ui,getInitialState:e=>({columnSizing:{},columnSizingInfo:Wu(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Xt("columnSizing",e),onColumnSizingInfoChange:Xt("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const s=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Ui.minSize,(r=s??e.columnDef.size)!=null?r:Ui.size),(o=e.columnDef.maxSize)!=null?o:Ui.maxSize)},e.getStart=he(n=>[n,ba(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((o,s)=>o+s.getSize(),0),me(t.options,"debugColumns","getStart")),e.getAfter=he(n=>[n,ba(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((o,s)=>o+s.getSize(),0),me(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...o}=n;return o})},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=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var s;n+=(s=o.column.getSize())!=null?s: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),o=r?.getCanResize();return s=>{if(!r||!o||(s.persist==null||s.persist(),Hu(s)&&s.touches&&s.touches.length>1))return;const a=e.getSize(),l=e?e.getLeafHeaders().map(y=>[y.column.id,y.column.getSize()]):[[r.id,r.getSize()]],c=Hu(s)?Math.round(s.touches[0].clientX):s.clientX,u={},f=(y,b)=>{typeof b=="number"&&(t.setColumnSizingInfo(S=>{var w,E;const N=t.options.columnResizeDirection==="rtl"?-1:1,_=(b-((w=S?.startOffset)!=null?w:0))*N,k=Math.max(_/((E=S?.startSize)!=null?E:0),-.999999);return S.columnSizingStart.forEach(I=>{let[F,U]=I;u[F]=Math.round(Math.max(U+U*k,0)*100)/100}),{...S,deltaOffset:_,deltaPercentage:k}}),(t.options.columnResizeMode==="onChange"||y==="end")&&t.setColumnSizing(S=>({...S,...u})))},d=y=>f("move",y),p=y=>{f("end",y),t.setColumnSizingInfo(b=>({...b,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=vI(n),g={moveHandler:y=>d(y.clientX),upHandler:y=>{h?.removeEventListener("mousemove",g.moveHandler),h?.removeEventListener("mouseup",g.upHandler),p(y.clientX)}},x={moveHandler:y=>(y.cancelable&&(y.preventDefault(),y.stopPropagation()),d(y.touches[0].clientX),!1),upHandler:y=>{var b;h?.removeEventListener("touchmove",x.moveHandler),h?.removeEventListener("touchend",x.upHandler),y.cancelable&&(y.preventDefault(),y.stopPropagation()),p((b=y.touches[0])==null?void 0:b.clientX)}},v=bI()?{passive:!1}:!1;Hu(s)?(h?.addEventListener("touchmove",x.moveHandler,v),h?.addEventListener("touchend",x.upHandler,v)):(h?.addEventListener("mousemove",g.moveHandler,v),h?.addEventListener("mouseup",g.upHandler,v)),t.setColumnSizingInfo(y=>({...y,startOffset:c,startSize:a,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?Wu():(n=e.initialState.columnSizingInfo)!=null?n:Wu())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0}}};let Yi=null;function bI(){if(typeof Yi=="boolean")return Yi;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 Yi=e,Yi}function Hu(e){return e.type==="touchstart"}const wI={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Xt("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 o=e.columns;return(n=o.length?o.some(s=>s.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=he(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),me(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=he(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],me(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,r)=>he(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),me(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((o,s)=>({...o,[s.id]:n||!(s.getCanHide!=null&&s.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 ba(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const CI={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()}}},SI={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Xt("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,o,s;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&((s=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?s:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Un.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return tu(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Un[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},EI={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Xt("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o: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 o,s;e.setExpanded(r?{}:(o=(s=e.initialState)==null?void 0:s.expanded)!=null?o:{})},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(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(s=>{const a=s.split(".");r=Math.max(r,a.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 o;const s=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(l=>{a[l]=!0}):a=r,n=(o=n)!=null?o:!s,!s&&n)return{...a,[e.id]:!0};if(s&&!n){const{[e.id]:l,...c}=a;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?.[e.id])},e.getCanExpand=()=>{var n,r,o;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.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()}}}},Zd=0,qd=10,Gu=()=>({pageIndex:Zd,pageSize:qd}),NI={getInitialState:e=>({...e,pagination:{...Gu(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Xt("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const o=s=>xr(r,s);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?Gu():(o=e.initialState.pagination)!=null?o:Gu())},e.setPageIndex=r=>{e.setPagination(o=>{let s=xr(r,o.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return s=Math.max(0,Math.min(s,a)),{...o,pageIndex:s}})},e.resetPageIndex=r=>{var o,s;e.setPageIndex(r?Zd:(o=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?o:Zd)},e.resetPageSize=r=>{var o,s;e.setPageSize(r?qd:(o=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?o:qd)},e.setPageSize=r=>{e.setPagination(o=>{const s=Math.max(1,xr(r,o.pageSize)),a=o.pageSize*o.pageIndex,l=Math.floor(a/s);return{...o,pageIndex:l,pageSize:s}})},e.setPageCount=r=>e.setPagination(o=>{var s;let a=xr(r,(s=e.options.pageCount)!=null?s:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...o,pageCount:a}}),e.getPageOptions=he(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((s,a)=>a)),o},me(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:r<o-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}}},Uu=()=>({top:[],bottom:[]}),_I={getInitialState:e=>({rowPinning:Uu(),...e}),getDefaultOptions:e=>({onRowPinningChange:Xt("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const s=r?e.getLeafRows().map(c=>{let{id:u}=c;return u}):[],a=o?e.getParentRows().map(c=>{let{id:u}=c;return u}):[],l=new Set([...a,e.id,...s]);t.setRowPinning(c=>{var u,f;if(n==="bottom"){var d,p;return{top:((d=c?.top)!=null?d:[]).filter(x=>!(l!=null&&l.has(x))),bottom:[...((p=c?.bottom)!=null?p:[]).filter(x=>!(l!=null&&l.has(x))),...Array.from(l)]}}if(n==="top"){var h,g;return{top:[...((h=c?.top)!=null?h:[]).filter(x=>!(l!=null&&l.has(x))),...Array.from(l)],bottom:((g=c?.bottom)!=null?g:[]).filter(x=>!(l!=null&&l.has(x)))}}return{top:((u=c?.top)!=null?u:[]).filter(x=>!(l!=null&&l.has(x))),bottom:((f=c?.bottom)!=null?f:[]).filter(x=>!(l!=null&&l.has(x)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return typeof r=="function"?r(e):(n=r??o)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,s=n.some(l=>r?.includes(l)),a=n.some(l=>o?.includes(l));return s?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const s=(n=o==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:l}=a;return l});return(r=s?.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?Uu():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:Uu())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var o,s;return!!((o=r.top)!=null&&o.length||(s=r.bottom)!=null&&s.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(n??[]).map(a=>{const l=e.getRow(a,!0);return l.getIsAllParentsExpanded()?l:null}):(n??[]).map(a=>t.find(l=>l.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=he(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),me(e.options,"debugRows","getTopRows")),e.getBottomRows=he(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),me(e.options,"debugRows","getBottomRows")),e.getCenterRows=he(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const o=new Set([...n??[],...r??[]]);return t.filter(s=>!o.has(s.id))},me(e.options,"debugRows","getCenterRows"))}},jI={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Xt("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},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(s=>{s.getCanSelect()&&(r[s.id]=!0)}):o.forEach(s=>{delete r[s.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(s=>{Xd(o,s.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=he(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Yu(e,n):{rows:[],flatRows:[],rowsById:{}},me(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=he(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Yu(e,n):{rows:[],flatRows:[],rowsById:{}},me(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=he(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Yu(e,n):{rows:[],flatRows:[],rowsById:{}},me(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(o=>o.getCanSelect()&&!n[o.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(o=>!n[o.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 o=e.getIsSelected();t.setRowSelection(s=>{var a;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return s;const l={...s};return Xd(l,e.id,n,(a=r?.selectChildren)!=null?a:!0,t),l})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return oh(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Jd(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Jd(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 o;n&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},Xd=(e,t,n,r,o)=>{var s;const a=o.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(l=>delete e[l]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(s=a.subRows)!=null&&s.length&&a.getCanSelectSubRows()&&a.subRows.forEach(l=>Xd(e,l.id,n,r,o))};function Yu(e,t){const n=e.getState().rowSelection,r=[],o={},s=function(a,l){return a.map(c=>{var u;const f=oh(c,n);if(f&&(r.push(c),o[c.id]=c),(u=c.subRows)!=null&&u.length&&(c={...c,subRows:s(c.subRows)}),f)return c}).filter(Boolean)};return{rows:s(t.rows),flatRows:r,rowsById:o}}function oh(e,t){var n;return(n=t[e.id])!=null?n:!1}function Jd(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let o=!0,s=!1;return e.subRows.forEach(a=>{if(!(s&&!o)&&(a.getCanSelect()&&(oh(a,t)?s=!0:o=!1),a.subRows&&a.subRows.length)){const l=Jd(a,t);l==="all"?s=!0:(l==="some"&&(s=!0),o=!1)}}),o?"all":s?"some":!1}const Qd=/([0-9]+)/gm,kI=(e,t,n)=>B5(jr(e.getValue(n)).toLowerCase(),jr(t.getValue(n)).toLowerCase()),RI=(e,t,n)=>B5(jr(e.getValue(n)),jr(t.getValue(n))),MI=(e,t,n)=>sh(jr(e.getValue(n)).toLowerCase(),jr(t.getValue(n)).toLowerCase()),DI=(e,t,n)=>sh(jr(e.getValue(n)),jr(t.getValue(n))),AI=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},PI=(e,t,n)=>sh(e.getValue(n),t.getValue(n));function sh(e,t){return e===t?0:e>t?1:-1}function jr(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function B5(e,t){const n=e.split(Qd).filter(Boolean),r=t.split(Qd).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),s=r.shift(),a=parseInt(o,10),l=parseInt(s,10),c=[a,l].sort();if(isNaN(c[0])){if(o>s)return 1;if(s>o)return-1;continue}if(isNaN(c[1]))return isNaN(a)?-1:1;if(a>l)return 1;if(l>a)return-1}return n.length-r.length}const Zs={alphanumeric:kI,alphanumericCaseSensitive:RI,text:MI,textCaseSensitive:DI,datetime:AI,basic:PI},TI={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Xt("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of n){const s=o?.getValue(e.id);if(Object.prototype.toString.call(s)==="[object Date]")return Zs.datetime;if(typeof s=="string"&&(r=!0,s.split(Qd).length>1))return Zs.alphanumeric}return r?Zs.text:Zs.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return tu(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:Zs[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),s=typeof n<"u"&&n!==null;t.setSorting(a=>{const l=a?.find(h=>h.id===e.id),c=a?.findIndex(h=>h.id===e.id);let u=[],f,d=s?n:o==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?l?f="toggle":f="add":a!=null&&a.length&&c!==a.length-1?f="replace":l?f="toggle":f="replace",f==="toggle"&&(s||o||(f="remove")),f==="add"){var p;u=[...a,{id:e.id,desc:d}],u.splice(0,u.length-((p=t.options.maxMultiSortColCount)!=null?p:Number.MAX_SAFE_INTEGER))}else f==="toggle"?u=a.map(h=>h.id===e.id?{...h,desc:d}:h):f==="remove"?u=a.filter(h=>h.id!==e.id):u=[{id:e.id,desc:d}];return u})},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,o;const s=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==s&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?!1:a==="desc"?"asc":"desc":s},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(o=>o.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(o=>o.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())}},OI=[nI,wI,gI,xI,rI,oI,CI,SI,TI,hI,EI,NI,_I,jI,yI];function LI(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...OI,...(t=e._features)!=null?t:[]];let o={_features:r};const s=o._features.reduce((p,h)=>Object.assign(p,h.getDefaultOptions==null?void 0:h.getDefaultOptions(o)),{}),a=p=>o.options.mergeOptions?o.options.mergeOptions(s,p):{...s,...p};let c={...{},...(n=e.initialState)!=null?n:{}};o._features.forEach(p=>{var h;c=(h=p.getInitialState==null?void 0:p.getInitialState(c))!=null?h:c});const u=[];let f=!1;const d={_features:r,options:{...s,...e},initialState:c,_queue:p=>{u.push(p),f||(f=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();f=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{o.setState(o.initialState)},setOptions:p=>{const h=xr(p,o.options);o.options=a(h)},getState:()=>o.options.state,setState:p=>{o.options.onStateChange==null||o.options.onStateChange(p)},_getRowId:(p,h,g)=>{var x;return(x=o.options.getRowId==null?void 0:o.options.getRowId(p,h,g))!=null?x:`${g?[g.id,h].join("."):h}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(p,h)=>{let g=(h?o.getPrePaginationRowModel():o.getRowModel()).rowsById[p];if(!g&&(g=o.getCoreRowModel().rowsById[p],!g))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${p}`):new Error;return g},_getDefaultColumnDef:he(()=>[o.options.defaultColumn],p=>{var h;return p=(h=p)!=null?h:{},{header:g=>{const x=g.header.column.columnDef;return x.accessorKey?x.accessorKey:x.accessorFn?x.id:null},cell:g=>{var x,v;return(x=(v=g.renderValue())==null||v.toString==null?void 0:v.toString())!=null?x:null},...o._features.reduce((g,x)=>Object.assign(g,x.getDefaultColumnDef==null?void 0:x.getDefaultColumnDef()),{}),...p}},me(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>o.options.columns,getAllColumns:he(()=>[o._getColumnDefs()],p=>{const h=function(g,x,v){return v===void 0&&(v=0),g.map(y=>{const b=tI(o,y,v,x),S=y;return b.columns=S.columns?h(S.columns,b,v+1):[],b})};return h(p)},me(e,"debugColumns","getAllColumns")),getAllFlatColumns:he(()=>[o.getAllColumns()],p=>p.flatMap(h=>h.getFlatColumns()),me(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:he(()=>[o.getAllFlatColumns()],p=>p.reduce((h,g)=>(h[g.id]=g,h),{}),me(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:he(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(p,h)=>{let g=p.flatMap(x=>x.getLeafColumns());return h(g)},me(e,"debugColumns","getAllLeafColumns")),getColumn:p=>{const h=o._getAllFlatColumnsById()[p];return process.env.NODE_ENV!=="production"&&!h&&console.error(`[Table] Column with id '${p}' does not exist.`),h}};Object.assign(o,d);for(let p=0;p<o._features.length;p++){const h=o._features[p];h==null||h.createTable==null||h.createTable(o)}return o}function z5(){return e=>he(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,s,a){s===void 0&&(s=0);const l=[];for(let u=0;u<o.length;u++){const f=nh(e,e._getRowId(o[u],u,a),o[u],u,s,void 0,a?.id);if(n.flatRows.push(f),n.rowsById[f.id]=f,l.push(f),e.options.getSubRows){var c;f.originalSubRows=e.options.getSubRows(o[u],u),(c=f.originalSubRows)!=null&&c.length&&(f.subRows=r(f.originalSubRows,s+1,f))}}return l};return n.rows=r(t),n},me(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function II(e,t,n){return n.options.filterFromLeafRows?FI(e,t,n):$I(e,t,n)}function FI(e,t,n){var r;const o=[],s={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,l=function(c,u){u===void 0&&(u=0);const f=[];for(let p=0;p<c.length;p++){var d;let h=c[p];const g=nh(n,h.id,h.original,h.index,h.depth,void 0,h.parentId);if(g.columnFilters=h.columnFilters,(d=h.subRows)!=null&&d.length&&u<a){if(g.subRows=l(h.subRows,u+1),h=g,t(h)&&!g.subRows.length){f.push(h),s[h.id]=h,o.push(h);continue}if(t(h)||g.subRows.length){f.push(h),s[h.id]=h,o.push(h);continue}}else h=g,t(h)&&(f.push(h),s[h.id]=h,o.push(h))}return f};return{rows:l(e),flatRows:o,rowsById:s}}function $I(e,t,n){var r;const o=[],s={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,l=function(c,u){u===void 0&&(u=0);const f=[];for(let p=0;p<c.length;p++){let h=c[p];if(t(h)){var d;if((d=h.subRows)!=null&&d.length&&u<a){const x=nh(n,h.id,h.original,h.index,h.depth,void 0,h.parentId);x.subRows=l(h.subRows,u+1),h=x}f.push(h),o.push(h),s[h.id]=h}}return f};return{rows:l(e),flatRows:o,rowsById:s}}function VI(){return e=>he(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let p=0;p<t.flatRows.length;p++)t.flatRows[p].columnFilters={},t.flatRows[p].columnFiltersMeta={};return t}const o=[],s=[];(n??[]).forEach(p=>{var h;const g=e.getColumn(p.id);if(!g)return;const x=g.getFilterFn();if(!x){process.env.NODE_ENV!=="production"&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${g.id}.`);return}o.push({id:p.id,filterFn:x,resolvedValue:(h=x.resolveFilterValue==null?void 0:x.resolveFilterValue(p.value))!=null?h:p.value})});const a=(n??[]).map(p=>p.id),l=e.getGlobalFilterFn(),c=e.getAllLeafColumns().filter(p=>p.getCanGlobalFilter());r&&l&&c.length&&(a.push("__global__"),c.forEach(p=>{var h;s.push({id:p.id,filterFn:l,resolvedValue:(h=l.resolveFilterValue==null?void 0:l.resolveFilterValue(r))!=null?h:r})}));let u,f;for(let p=0;p<t.flatRows.length;p++){const h=t.flatRows[p];if(h.columnFilters={},o.length)for(let g=0;g<o.length;g++){u=o[g];const x=u.id;h.columnFilters[x]=u.filterFn(h,x,u.resolvedValue,v=>{h.columnFiltersMeta[x]=v})}if(s.length){for(let g=0;g<s.length;g++){f=s[g];const x=f.id;if(f.filterFn(h,x,f.resolvedValue,v=>{h.columnFiltersMeta[x]=v})){h.columnFilters.__global__=!0;break}}h.columnFilters.__global__!==!0&&(h.columnFilters.__global__=!1)}}const d=p=>{for(let h=0;h<a.length;h++)if(p.columnFilters[a[h]]===!1)return!1;return!0};return II(t.rows,d,e)},me(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function BI(){return e=>he(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,o=[],s=r.filter(c=>{var u;return(u=e.getColumn(c.id))==null?void 0:u.getCanSort()}),a={};s.forEach(c=>{const u=e.getColumn(c.id);u&&(a[c.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});const l=c=>{const u=c.map(f=>({...f}));return u.sort((f,d)=>{for(let h=0;h<s.length;h+=1){var p;const g=s[h],x=a[g.id],v=x.sortUndefined,y=(p=g?.desc)!=null?p:!1;let b=0;if(v){const S=f.getValue(g.id),w=d.getValue(g.id),E=S===void 0,N=w===void 0;if(E||N){if(v==="first")return E?-1:1;if(v==="last")return E?1:-1;b=E&&N?0:E?v:-v}}if(b===0&&(b=x.sortingFn(f,d,g.id)),b!==0)return y&&(b*=-1),x.invertSorting&&(b*=-1),b}return f.index-d.index}),u.forEach(f=>{var d;o.push(f),(d=f.subRows)!=null&&d.length&&(f.subRows=l(f.subRows))}),u};return{rows:l(n.rows),flatRows:o,rowsById:n.rowsById}},me(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function La(e,t){return e?zI(e)?m.createElement(e,t):e:null}function zI(e){return WI(e)||typeof e=="function"||HI(e)}function WI(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function HI(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function W5(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=m.useState(()=>({current:LI(t)})),[r,o]=m.useState(()=>n.current.initialState);return n.current.setOptions(s=>({...s,...e,state:{...r,...e.state},onStateChange:a=>{o(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}const ah=m.forwardRef(({className:e,...t},n)=>i.jsx("div",{className:"relative w-full overflow-auto",children:i.jsx("table",{ref:n,className:j("app-table","w-full caption-bottom text-sm",e),...t})}));ah.displayName="Table";const Ia=m.forwardRef(({className:e,...t},n)=>i.jsx("thead",{ref:n,className:j("app-table-header","[&_tr]:border-b",e),...t}));Ia.displayName="TableHeader";const nu=m.forwardRef(({className:e,...t},n)=>i.jsx("tbody",{ref:n,className:j("app-table-body","[&_tr:last-child]:border-0",e),...t}));nu.displayName="TableBody";const H5=m.forwardRef(({className:e,...t},n)=>i.jsx("tfoot",{ref:n,className:j("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));H5.displayName="TableFooter";const In=m.forwardRef(({className:e,...t},n)=>i.jsx("tr",{ref:n,className:j("app-table-row","border-b transition-colors bg-background hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));In.displayName="TableRow";const mi=m.forwardRef(({className:e,...t},n)=>i.jsx("th",{ref:n,className:j("app-table-head","relative h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pe-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));mi.displayName="TableHead";const fs=m.forwardRef(({className:e,...t},n)=>i.jsx("td",{ref:n,className:j("app-table-cell","p-2 align-middle overflow-x-hidden [&:has([role=checkbox])]:pe-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));fs.displayName="TableCell";const GI=m.forwardRef(({className:e,...t},n)=>i.jsx("caption",{ref:n,className:j("mt-4 text-sm text-muted-foreground",e),...t}));GI.displayName="TableCaption";const G5=e=>{const t=e.reduce((n,r)=>{const o=Number(r);return n+(isNaN(o)?0:o)},0);return Math.round(t*100)/100},U5=e=>{const t=e.filter(r=>r!=null&&!isNaN(Number(r)));return t.length===0?0:t.reduce((r,o)=>r+Number(o),0)/t.length},Y5=e=>e.filter(t=>t!=null&&t!=="").length,K5=e=>{const t=e.map(n=>Number(n)).filter(n=>!isNaN(n));return t.length>0?Math.min(...t):0},Z5=e=>{const t=e.map(n=>Number(n)).filter(n=>!isNaN(n));return t.length>0?Math.max(...t):0},q5="__AGGREGATION_TOTALS_ROW__",UI={sum:G5,avg:U5,size:Y5,min:K5,max:Z5},YI=e=>"accessorKey"in e&&typeof e.accessorKey=="string"?e.accessorKey:e.id,KI=e=>e.meta?.isActions===!0,ZI=({rows:e,columns:t,aggregationLabel:n})=>{const r=e;return t.reduce((o,s,a)=>{const l=YI(s);if(!l)return o;if(a===0&&!s.aggregationFn)return o[l]=n,o;if(!s.aggregationFn)return o;const c=r.map(f=>f[l]);let u;if(typeof s.aggregationFn=="function")u=s.aggregationFn({values:c,field:l});else{const f=UI[s.aggregationFn];u=f?f(c):0}return o[l]=s.aggregationCell?s.aggregationCell(u):u,o},{id:q5})};function qI({rows:e,columns:t,aggregationLabel:n="Total",onRowClick:r,className:o,...s},a){const l=C.useMemo(()=>t.some(d=>d.aggregationFn),[t]),c=C.useMemo(()=>l?ZI({rows:e,columns:t,aggregationLabel:n}):null,[e,t,n,l]),u=W5({data:e,columns:t,getCoreRowModel:z5()}),f=C.useCallback((d,p)=>{p.target.closest('[data-column="actions"]')||r?.(d)},[r]);return i.jsx("div",{ref:a,className:j("h-full rounded-lg border border-border overflow-auto",o),...s,children:i.jsxs("table",{className:"w-full h-full border-collapse",children:[i.jsx(Ia,{className:"sticky top-0 z-10",children:u.getHeaderGroups().map(d=>i.jsx(In,{className:"border-b border-border bg-muted hover:bg-muted",children:d.headers.map((p,h)=>{const g=p.column.columnDef.meta,x=g?.isActions;return i.jsx(mi,{className:j("h-12 px-4 text-sm font-medium text-muted-foreground bg-muted",h===0&&"ps-6",g?.headerAlign==="right"&&"text-right",x&&"sticky end-0 px-0"),style:{minWidth:p.column.columnDef.minSize,width:p.column.columnDef.size},children:p.isPlaceholder?null:La(p.column.columnDef.header,p.getContext())},p.id)})},d.id))}),i.jsxs(nu,{children:[u.getRowModel().rows.map(d=>i.jsx(In,{className:j("h-12 border-b border-border bg-card text-foreground","hover:bg-muted",r&&"cursor-pointer"),onClick:r?p=>f(d.original,p):void 0,children:d.getVisibleCells().map((p,h)=>{const g=p.column.columnDef.meta,x=g?.isActions;return i.jsx(fs,{className:j("px-4 text-sm",h===0&&"ps-6",g?.headerAlign==="right"&&"text-right",x&&"sticky end-0 bg-card px-0"),...x?{"data-column":"actions"}:{},children:La(p.column.columnDef.cell,p.getContext())},p.id)})},d.id)),i.jsx("tr",{"aria-hidden":"true"})]}),c&&i.jsx(H5,{className:"sticky bottom-0 z-10 bg-muted",children:i.jsx(In,{className:"h-12 bg-muted text-foreground hover:bg-muted",children:t.map((d,p)=>{const h=KI(d),g=("accessorKey"in d&&typeof d.accessorKey=="string"?d.accessorKey:d.id)||String(p),x=h?null:c[g],v=d.meta;return i.jsx(fs,{className:j("px-4 text-sm font-bold bg-muted",p===0&&"ps-6",v?.headerAlign==="right"&&"text-right",h&&"sticky end-0 px-0"),children:x??""},g)})})})]})})}const X5=C.forwardRef(qI);X5.displayName="AggregatedTable";const J5=C.forwardRef(({open:e,label:t,clearLabel:n,onClear:r,children:o,className:s,...a},l)=>i.jsxs("div",{ref:l,role:"region","aria-label":a["aria-label"]??(typeof t=="string"?t:void 0),className:j("bg-popover border-border fixed bottom-6 left-1/2 z-50 flex max-w-[540px] -translate-x-1/2 items-center gap-6 rounded-md border px-6 py-4 shadow-lg transition-all duration-300",e?"translate-y-0 opacity-100":"pointer-events-none translate-y-4 opacity-0",s),...a,children:[i.jsx("span",{className:"text-popover-foreground text-sm whitespace-nowrap",children:t}),i.jsx("div",{className:"h-5",children:i.jsx(Pa,{orientation:"vertical",className:"h-full"})}),i.jsx("div",{className:"flex items-center gap-4",children:o}),i.jsx("div",{className:"h-5",children:i.jsx(Pa,{orientation:"vertical",className:"h-full"})}),i.jsx(ot,{variant:"ghost",size:"icon",onClick:r,"aria-label":n,children:i.jsx(X,{name:"XCircle",size:"md",weight:"fill",className:"text-foreground"})})]}));J5.displayName="BulkActionBar";var XI=Symbol.for("preact-signals");function ru(){if(Jn>1)Jn--;else{var e,t=!1;for((function(){var o=Ul;for(Ul=void 0;o!==void 0;)o.S.v===o.v&&(o.S.i=o.i),o=o.o})();wa!==void 0;){var n=wa;for(wa=void 0,Gl++;n!==void 0;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&e4(n))try{n.c()}catch(o){t||(e=o,t=!0)}n=r}}if(Gl=0,Jn--,t)throw e}}function Je(e){if(Jn>0)return e();ef=++JI,Jn++;try{return e()}finally{ru()}}var Oe=void 0;function Le(e){var t=Oe;Oe=void 0;try{return e()}finally{Oe=t}}var wa=void 0,Jn=0,Gl=0,JI=0,ef=0,Ul=void 0,Yl=0;function Q5(e){if(Oe!==void 0){var t=e.n;if(t===void 0||t.t!==Oe)return t={i:0,S:e,p:Oe.s,n:void 0,t:Oe,e:void 0,x:void 0,r:t},Oe.s!==void 0&&(Oe.s.n=t),Oe.s=t,e.n=t,32&Oe.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Oe.s,t.n=void 0,Oe.s.n=t,Oe.s=t),t}}function Tt(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}Tt.prototype.brand=XI;Tt.prototype.h=function(){return!0};Tt.prototype.S=function(e){var t=this,n=this.t;n!==e&&e.e===void 0&&(e.x=n,this.t=e,n!==void 0?n.e=e:Le(function(){var r;(r=t.W)==null||r.call(t)}))};Tt.prototype.U=function(e){var t=this;if(this.t!==void 0){var n=e.e,r=e.x;n!==void 0&&(n.x=r,e.e=void 0),r!==void 0&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,r===void 0&&Le(function(){var o;(o=t.Z)==null||o.call(t)}))}};Tt.prototype.subscribe=function(e){var t=this;return Ht(function(){var n=t.value,r=Oe;Oe=void 0;try{e(n)}finally{Oe=r}},{name:"sub"})};Tt.prototype.valueOf=function(){return this.value};Tt.prototype.toString=function(){return this.value+""};Tt.prototype.toJSON=function(){return this.value};Tt.prototype.peek=function(){var e=Oe;Oe=void 0;try{return this.value}finally{Oe=e}};Object.defineProperty(Tt.prototype,"value",{get:function(){var e=Q5(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Gl>100)throw new Error("Cycle detected");(function(n){Jn!==0&&Gl===0&&n.l!==ef&&(n.l=ef,Ul={S:n,v:n.v,i:n.i,o:Ul})})(this),this.v=e,this.i++,Yl++,Jn++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{ru()}}}});function gi(e,t){return new Tt(e,t)}function e4(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function t4(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function n4(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function yo(e,t){Tt.call(this,void 0),this.x=e,this.s=void 0,this.g=Yl-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}yo.prototype=new Tt;yo.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Yl))return!0;if(this.g=Yl,this.f|=1,this.i>0&&!e4(this))return this.f&=-2,!0;var e=Oe;try{t4(this),Oe=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return Oe=e,n4(this),this.f&=-2,!0};yo.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}Tt.prototype.S.call(this,e)};yo.prototype.U=function(e){if(this.t!==void 0&&(Tt.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};yo.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(yo.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=Q5(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function T1(e,t){return new yo(e,t)}function r4(e){var t=e.m;if(e.m=void 0,typeof t=="function"){Jn++;var n=Oe;Oe=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,ih(e),r}finally{Oe=n,ru()}}}function ih(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,r4(e)}function QI(e){if(Oe!==this)throw new Error("Out-of-order effect");n4(this),Oe=e,this.f&=-2,8&this.f&&ih(this),ru()}function Ds(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name}Ds.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.m=t)}finally{e()}};Ds.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,r4(this),t4(this),Jn++;var e=Oe;return Oe=this,QI.bind(this,e)};Ds.prototype.N=function(){2&this.f||(this.f|=2,this.u=wa,wa=this)};Ds.prototype.d=function(){this.f|=8,1&this.f||ih(this)};Ds.prototype.dispose=function(){this.d()};function Ht(e,t){var n=new Ds(e,t);try{n.c()}catch(o){throw n.d(),o}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}var eF=Object.create,lh=Object.defineProperty,tF=Object.defineProperties,nF=Object.getOwnPropertyDescriptor,rF=Object.getOwnPropertyDescriptors,O1=Object.getOwnPropertySymbols,oF=Object.prototype.hasOwnProperty,sF=Object.prototype.propertyIsEnumerable,aF=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),As=e=>{throw TypeError(e)},tf=(e,t,n)=>t in e?lh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,iF=(e,t)=>{for(var n in t||(t={}))oF.call(t,n)&&tf(e,n,t[n]);if(O1)for(var n of O1(t))sF.call(t,n)&&tf(e,n,t[n]);return e},lF=(e,t)=>tF(e,rF(t)),L1=(e,t)=>lh(e,"name",{value:t,configurable:!0}),cF=e=>{var t;return[,,,eF((t=void 0)!=null?t:null)]},o4=["class","method","getter","setter","accessor","field","value","get","set"],ra=e=>e!==void 0&&typeof e!="function"?As("Function expected"):e,uF=(e,t,n,r,o)=>({kind:o4[e],name:t,metadata:r,addInitializer:s=>n._?As("Already initialized"):o.push(ra(s||null))}),s4=(e,t)=>tf(t,aF("metadata"),e[3]),zr=(e,t,n,r)=>{for(var o=0,s=e[t>>1],a=s&&s.length;o<a;o++)t&1?s[o].call(n):r=s[o].call(n,r);return r},Ps=(e,t,n,r,o,s)=>{var a,l,c,u,f,d=t&7,p=!!(t&8),h=!!(t&16),g=d>3?e.length+1:d?p?1:2:0,x=o4[d+5],v=d>3&&(e[g-1]=[]),y=e[g]||(e[g]=[]),b=d&&(!h&&!p&&(o=o.prototype),d<5&&(d>3||!h)&&nF(d<4?o:{get[n](){return on(this,s)},set[n](w){return gr(this,s,w)}},n));d?h&&d<4&&L1(s,(d>2?"set ":d>1?"get ":"")+n):L1(o,n);for(var S=r.length-1;S>=0;S--)u=uF(d,n,c={},e[3],y),d&&(u.static=p,u.private=h,f=u.access={has:h?w=>dF(o,w):w=>n in w},d^3&&(f.get=h?w=>(d^1?on:fF)(w,o,d^4?s:b.get):w=>w[n]),d>2&&(f.set=h?(w,E)=>gr(w,o,E,d^4?s:b.set):(w,E)=>w[n]=E)),l=(0,r[S])(d?d<4?h?s:b[x]:d>4?void 0:{get:b.get,set:b.set}:o,u),c._=1,d^4||l===void 0?ra(l)&&(d>4?v.unshift(l):d?h?s=l:b[x]=l:o=l):typeof l!="object"||l===null?As("Object expected"):(ra(a=l.get)&&(b.get=a),ra(a=l.set)&&(b.set=a),ra(a=l.init)&&v.unshift(a));return d||s4(e,o),b&&lh(o,n,b),h?d^4?s:b:o},ch=(e,t,n)=>t.has(e)||As("Cannot "+n),dF=(e,t)=>Object(t)!==t?As('Cannot use the "in" operator on this value'):e.has(t),on=(e,t,n)=>(ch(e,t,"read from private field"),n?n.call(e):t.get(e)),oa=(e,t,n)=>t.has(e)?As("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),gr=(e,t,n,r)=>(ch(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),fF=(e,t,n)=>(ch(e,t,"access private method"),n);function Fa(e,t){if(t){let n;return T1(()=>{const r=e();return r&&n&&t(n,r)?n:(n=r,r)})}return T1(e)}function Cr(e,t){if(Object.is(e,t))return!0;if(e===null||t===null)return!1;if(typeof e=="function"&&typeof t=="function")return e===t;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:!e.some((r,o)=>!Cr(r,t[o]));if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:!n.some(s=>!Cr(e[s],t[s]))}return!1}function Re({get:e},t){return{init(n){return gi(n)},get(){return e.call(this).value},set(n){const r=e.call(this);r.peek()!==n&&(r.value=n)}}}function Qe(e,t){const n=new WeakMap;return function(){let r=n.get(this);return r||(r=Fa(e.bind(this)),n.set(this,r)),r.value}}function Ku(e=!0){return function(t,n){n.addInitializer(function(){const r=n.kind==="field"?this:n.static?this:Object.getPrototypeOf(this),o=Object.getOwnPropertyDescriptor(r,n.name);o&&Object.defineProperty(r,n.name,lF(iF({},o),{enumerable:e}))})}}function xi(...e){const t=e.map(n=>Ht(n));return()=>t.forEach(n=>n())}var a4,i4,l4,c4,u4,d4,jt,uh,Zu,nf,rf,vt,dh,qu,f4,of,fh,Xu,sf,af;d4=[Re],u4=[Re],c4=[Re],l4=[Ku()],i4=[Ku()],a4=[Ku()];var bo=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,zr(jt,5,this),oa(this,vt),oa(this,uh,zr(jt,8,this)),zr(jt,11,this),oa(this,dh,zr(jt,12,this)),zr(jt,15,this),oa(this,fh,zr(jt,16,this)),zr(jt,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return on(this,vt,sf)}get initial(){return on(this,vt,nf)}get previous(){return on(this,vt,f4)}set current(e){const t=Le(()=>on(this,vt,sf));e&&t&&this.equals(t,e)||Je(()=>{on(this,vt,nf)||gr(this,vt,e,rf),gr(this,vt,t,of),gr(this,vt,e,af)})}reset(e=this.defaultValue){Je(()=>{gr(this,vt,void 0,of),gr(this,vt,e,rf),gr(this,vt,e,af)})}};jt=cF();uh=new WeakMap;vt=new WeakSet;dh=new WeakMap;fh=new WeakMap;Zu=Ps(jt,20,"#initial",d4,vt,uh),nf=Zu.get,rf=Zu.set;qu=Ps(jt,20,"#previous",u4,vt,dh),f4=qu.get,of=qu.set;Xu=Ps(jt,20,"#current",c4,vt,fh),sf=Xu.get,af=Xu.set;Ps(jt,2,"current",l4,bo);Ps(jt,2,"initial",i4,bo);Ps(jt,2,"previous",a4,bo);s4(jt,bo);function Ju(e){return Le(()=>{const t={};for(const n in e)t[n]=e[n];return t})}var Ur,pF=class{constructor(){oa(this,Ur,new WeakMap)}get(e,t){var n;return e?(n=on(this,Ur).get(e))==null?void 0:n.get(t):void 0}set(e,t,n){var r;if(e)return on(this,Ur).has(e)||on(this,Ur).set(e,new Map),(r=on(this,Ur).get(e))==null?void 0:r.set(t,n)}clear(e){var t;return e?(t=on(this,Ur).get(e))==null?void 0:t.clear():void 0}};Ur=new WeakMap;var hF=Object.create,p4=Object.defineProperty,mF=Object.getOwnPropertyDescriptor,I1=Object.getOwnPropertySymbols,gF=Object.prototype.hasOwnProperty,xF=Object.prototype.propertyIsEnumerable,h4=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),ou=e=>{throw TypeError(e)},F1=Math.pow,lf=(e,t,n)=>t in e?p4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vF=(e,t)=>{for(var n in t||(t={}))gF.call(t,n)&&lf(e,n,t[n]);if(I1)for(var n of I1(t))xF.call(t,n)&&lf(e,n,t[n]);return e},yF=e=>{var t;return[,,,hF((t=e?.[h4("metadata")])!=null?t:null)]},m4=["class","method","getter","setter","accessor","field","value","get","set"],g4=e=>e!==void 0&&typeof e!="function"?ou("Function expected"):e,bF=(e,t,n,r,o)=>({kind:m4[e],name:t,metadata:r,addInitializer:s=>n._?ou("Already initialized"):o.push(g4(s||null))}),wF=(e,t)=>lf(t,h4("metadata"),e[3]),CF=(e,t,n,r)=>{for(var o=0,s=e[t>>1],a=s&&s.length;o<a;o++)s[o].call(n);return r},x4=(e,t,n,r,o,s)=>{for(var a,l,c,u,f=t&7,d=!1,p=!1,h=2,g=m4[f+5],x=e[h]||(e[h]=[]),v=(o=o.prototype,mF(o,n)),y=r.length-1;y>=0;y--)c=bF(f,n,l={},e[3],x),c.static=d,c.private=p,u=c.access={has:b=>n in b},u.get=b=>b[n],a=(0,r[y])(v[g],c),l._=1,g4(a)&&(v[g]=a);return v&&p4(o,n,v),o},v4=(e,t,n)=>t.has(e)||ou("Cannot "+n),SF=(e,t,n)=>(v4(e,t,"read from private field"),t.get(e)),EF=(e,t,n)=>t.has(e)?ou("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),NF=(e,t,n,r)=>(v4(e,t,"write to private field"),t.set(e,n),n),sn=class cf{constructor(t,n){this.x=t,this.y=n}static delta(t,n){return new cf(t.x-n.x,t.y-n.y)}static distance(t,n){return Math.hypot(t.x-n.x,t.y-n.y)}static equals(t,n){return t.x===n.x&&t.y===n.y}static from({x:t,y:n}){return new cf(t,n)}},rr=class Yr{constructor(t,n,r,o){this.left=t,this.top=n,this.width=r,this.height=o,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(t,n){const{top:r,left:o,width:s,height:a,scale:l}=this,c=new Yr(o+t,r+n,s,a);return c.scale=vF({},l),c}get boundingRectangle(){const{width:t,height:n,left:r,top:o,right:s,bottom:a}=this;return{width:t,height:n,left:r,top:o,right:s,bottom:a}}get center(){const{left:t,top:n,right:r,bottom:o}=this;return new sn((t+r)/2,(n+o)/2)}get area(){const{width:t,height:n}=this;return t*n}equals(t){if(!(t instanceof Yr))return!1;const{left:n,top:r,width:o,height:s}=this;return n===t.left&&r===t.top&&o===t.width&&s===t.height}containsPoint(t){const{top:n,left:r,bottom:o,right:s}=this;return n<=t.y&&t.y<=o&&r<=t.x&&t.x<=s}intersectionArea(t){return t instanceof Yr?_F(this,t):0}intersectionRatio(t){const{area:n}=this,r=this.intersectionArea(t);return r/(t.area+n-r)}get bottom(){const{top:t,height:n}=this;return t+n}get right(){const{left:t,width:n}=this;return t+n}get aspectRatio(){const{width:t,height:n}=this;return t/n}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:t,left:n,width:r,height:o}){return new Yr(n,t,r,o)}static delta(t,n,r={x:"center",y:"center"}){const o=(s,a)=>{const l=r[a],c=a==="x"?s.left:s.top,u=a==="x"?s.width:s.height;return l=="start"?c:l=="end"?c+u:c+u/2};return sn.delta({x:o(t,"x"),y:o(t,"y")},{x:o(n,"x"),y:o(n,"y")})}static intersectionRatio(t,n){return Yr.from(t).intersectionRatio(Yr.from(n))}};function _F(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),a=o-r,l=s-n;return r<o&&n<s?a*l:0}var y4,b4,uf,dl,vi,su=class extends(uf=bo,b4=[Qe],y4=[Qe],uf){constructor(t){const n=sn.from(t);super(n,(r,o)=>sn.equals(r,o)),CF(vi,5,this),EF(this,dl,0),this.velocity={x:0,y:0}}get delta(){return sn.delta(this.current,this.initial)}get direction(){const{current:t,previous:n}=this;if(!n)return null;const r={x:t.x-n.x,y:t.y-n.y};return!r.x&&!r.y?null:Math.abs(r.x)>Math.abs(r.y)?r.x>0?"right":"left":r.y>0?"down":"up"}get current(){return super.current}set current(t){const{current:n}=this,r=sn.from(t),o={x:r.x-n.x,y:r.y-n.y},s=Date.now(),a=s-SF(this,dl),l=c=>Math.round(c/a*100);Je(()=>{NF(this,dl,s),this.velocity={x:l(o.x),y:l(o.y)},super.current=r})}reset(t=this.defaultValue){super.reset(sn.from(t)),this.velocity={x:0,y:0}}};vi=yF(uf);dl=new WeakMap;x4(vi,2,"delta",b4,su);x4(vi,2,"direction",y4,su);wF(vi,su);function df({x:e,y:t},n){const r=Math.abs(e),o=Math.abs(t);return typeof n=="number"?Math.sqrt(F1(r,2)+F1(o,2))>n:"x"in n&&"y"in n?r>n.x&&o>n.y:"x"in n?r>n.x:"y"in n?o>n.y:!1}var w4=(e=>(e.Horizontal="x",e.Vertical="y",e))(w4||{}),C4=Object.values(w4),jF=Object.create,ph=Object.defineProperty,kF=Object.defineProperties,RF=Object.getOwnPropertyDescriptor,MF=Object.getOwnPropertyDescriptors,Kl=Object.getOwnPropertySymbols,S4=Object.prototype.hasOwnProperty,E4=Object.prototype.propertyIsEnumerable,N4=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Ts=e=>{throw TypeError(e)},ff=(e,t,n)=>t in e?ph(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_4=(e,t)=>{for(var n in t||(t={}))S4.call(t,n)&&ff(e,n,t[n]);if(Kl)for(var n of Kl(t))E4.call(t,n)&&ff(e,n,t[n]);return e},j4=(e,t)=>kF(e,MF(t)),$1=(e,t)=>ph(e,"name",{value:t,configurable:!0}),k4=(e,t)=>{var n={};for(var r in e)S4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Kl)for(var r of Kl(e))t.indexOf(r)<0&&E4.call(e,r)&&(n[r]=e[r]);return n},Os=e=>{var t;return[,,,jF((t=e?.[N4("metadata")])!=null?t:null)]},R4=["class","method","getter","setter","accessor","field","value","get","set"],sa=e=>e!==void 0&&typeof e!="function"?Ts("Function expected"):e,DF=(e,t,n,r,o)=>({kind:R4[e],name:t,metadata:r,addInitializer:s=>n._?Ts("Already initialized"):o.push(sa(s||null))}),wo=(e,t)=>ff(t,N4("metadata"),e[3]),we=(e,t,n,r)=>{for(var o=0,s=e[t>>1],a=s&&s.length;o<a;o++)t&1?s[o].call(n):r=s[o].call(n,r);return r},De=(e,t,n,r,o,s)=>{var a,l,c,u,f,d=t&7,p=!!(t&8),h=!!(t&16),g=d>3?e.length+1:d?p?1:2:0,x=R4[d+5],v=d>3&&(e[g-1]=[]),y=e[g]||(e[g]=[]),b=d&&(!h&&!p&&(o=o.prototype),d<5&&(d>3||!h)&&RF(d<4?o:{get[n](){return pt(this,s)},set[n](w){return an(this,s,w)}},n));d?h&&d<4&&$1(s,(d>2?"set ":d>1?"get ":"")+n):$1(o,n);for(var S=r.length-1;S>=0;S--)u=DF(d,n,c={},e[3],y),d&&(u.static=p,u.private=h,f=u.access={has:h?w=>AF(o,w):w=>n in w},d^3&&(f.get=h?w=>(d^1?pt:PF)(w,o,d^4?s:b.get):w=>w[n]),d>2&&(f.set=h?(w,E)=>an(w,o,E,d^4?s:b.set):(w,E)=>w[n]=E)),l=(0,r[S])(d?d<4?h?s:b[x]:d>4?void 0:{get:b.get,set:b.set}:o,u),c._=1,d^4||l===void 0?sa(l)&&(d>4?v.unshift(l):d?h?s=l:b[x]=l:o=l):typeof l!="object"||l===null?Ts("Object expected"):(sa(a=l.get)&&(b.get=a),sa(a=l.set)&&(b.set=a),sa(a=l.init)&&v.unshift(a));return d||wo(e,o),b&&ph(o,n,b),h?d^4?s:b:o},hh=(e,t,n)=>t.has(e)||Ts("Cannot "+n),AF=(e,t)=>Object(t)!==t?Ts('Cannot use the "in" operator on this value'):e.has(t),pt=(e,t,n)=>(hh(e,t,"read from private field"),n?n.call(e):t.get(e)),Fe=(e,t,n)=>t.has(e)?Ts("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),an=(e,t,n,r)=>(hh(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),PF=(e,t,n)=>(hh(e,t,"access private method"),n);function M4(e,t){return{plugin:e,options:t}}function mh(e){return t=>M4(e,t)}function gh(e){return typeof e=="function"?{plugin:e,options:void 0}:e}var D4,$a,xh,fl;D4=[Re];var Ct=class{constructor(e,t){this.manager=e,this.options=t,Fe(this,xh,we($a,8,this,!1)),we($a,11,this),Fe(this,fl,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return Le(()=>this.disabled)}configure(e){this.options=e}registerEffect(e){const t=Ht(e.bind(this));return pt(this,fl).add(t),t}destroy(){pt(this,fl).forEach(e=>e())}static configure(e){return M4(this,e)}};$a=Os(null);xh=new WeakMap;fl=new WeakMap;De($a,4,"disabled",D4,Ct,xh);wo($a,Ct);var yi=class extends Ct{},pl,Qu=class{constructor(e){this.manager=e,this.instances=new Map,Fe(this,pl,[])}get values(){return Array.from(this.instances.values())}set values(e){const t=e.map(gh).reduceRight((r,o)=>r.some(({plugin:s})=>s===o.plugin)?r:[o,...r],[]),n=t.map(({plugin:r})=>r);for(const r of pt(this,pl))if(!n.includes(r)){if(r.prototype instanceof yi)continue;this.unregister(r)}for(const{plugin:r,options:o}of t)this.register(r,o);an(this,pl,n)}get(e){return this.instances.get(e)}register(e,t){const n=this.instances.get(e);if(n)return n.options!==t&&(n.options=t),n;const r=new e(this.manager,t);return this.instances.set(e,r),r}unregister(e){const t=this.instances.get(e);t&&(t.destroy(),this.instances.delete(e))}destroy(){for(const e of this.instances.values())e.destroy();this.instances.clear()}};pl=new WeakMap;function TF(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}var Ki=[],Go,Uo,OF=class extends Ct{constructor(e){super(e),Fe(this,Go),Fe(this,Uo),this.computeCollisions=this.computeCollisions.bind(this),an(this,Uo,gi(Ki)),this.destroy=xi(()=>{const t=this.computeCollisions(),n=Le(()=>this.manager.dragOperation.position.current);if(t!==Ki){const r=pt(this,Go);if(an(this,Go,n),r&&n.x==r.x&&n.y==r.y)return}else an(this,Go,void 0);pt(this,Uo).value=t},()=>{const{dragOperation:t}=this.manager;t.status.initialized&&this.forceUpdate()})}forceUpdate(e=!0){Le(()=>{e?pt(this,Uo).value=this.computeCollisions():an(this,Go,void 0)})}computeCollisions(e,t){const{registry:n,dragOperation:r}=this.manager,{source:o,shape:s,status:a}=r;if(!a.initialized||!s)return Ki;const l=[],c=[];for(const u of e??n.droppables){if(u.disabled||o&&!u.accepts(o))continue;const f=t??u.collisionDetector;if(!f)continue;c.push(u),u.shape;const d=Le(()=>f({droppable:u,dragOperation:r}));d&&(u.collisionPriority!=null&&(d.priority=u.collisionPriority),l.push(d))}return c.length===0?Ki:(l.sort(TF),l)}get collisions(){return pt(this,Uo).value}};Go=new WeakMap;Uo=new WeakMap;var LF=class{constructor(){this.registry=new Map}addEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));return r.add(t),n.set(e,r),()=>this.removeEventListener(e,t)}removeEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));r.delete(t),n.set(e,r)}dispatch(e,...t){const{registry:n}=this,r=n.get(e);if(r)for(const o of r)o(...t)}},IF=class extends LF{constructor(e){super(),this.manager=e}dispatch(e,t){const n=[t,this.manager];super.dispatch(e,...n)}};function hl(e,t=!0){let n=!1;return j4(_4({},e),{cancelable:t,get defaultPrevented(){return n},preventDefault(){t&&(n=!0)}})}var FF=class extends yi{constructor(e){super(e);const t=(r,o)=>r.map(({id:s})=>s).join("")===o.map(({id:s})=>s).join("");let n=[];this.destroy=xi(()=>{const{dragOperation:r,collisionObserver:o}=e;r.status.initializing&&(n=[],o.enable())},()=>{const{collisionObserver:r,monitor:o}=e,{collisions:s}=r;if(r.isDisabled())return;const a=hl({collisions:s});if(o.dispatch("collision",a),a.defaultPrevented||t(s,n))return;n=s;const[l]=s;Le(()=>{var c;l?.id!==((c=e.dragOperation.target)==null?void 0:c.id)&&(r.disable(),e.actions.setDropTarget(l?.id).then(()=>{r.enable()}))})})}},Ls=(e=>(e[e.Lowest=0]="Lowest",e[e.Low=1]="Low",e[e.Normal=2]="Normal",e[e.High=3]="High",e[e.Highest=4]="Highest",e))(Ls||{}),Is=(e=>(e[e.Collision=0]="Collision",e[e.ShapeIntersection=1]="ShapeIntersection",e[e.PointerIntersection=2]="PointerIntersection",e))(Is||{}),A4,P4,T4,O4,L4,I4,F4,un,vh;F4=[Re],I4=[Qe],L4=[Qe],O4=[Qe],T4=[Qe],P4=[Qe],A4=[Qe];var ir=class{constructor(){we(un,5,this),Fe(this,vh,we(un,8,this,"idle")),we(un,11,this)}get current(){return this.value}get idle(){return this.value==="idle"}get initializing(){return this.value==="initializing"}get initialized(){const{value:e}=this;return e!=="idle"&&e!=="initialization-pending"}get dragging(){return this.value==="dragging"}get dropped(){return this.value==="dropped"}set(e){this.value=e}};un=Os(null);vh=new WeakMap;De(un,4,"value",F4,ir,vh);De(un,2,"current",I4,ir);De(un,2,"idle",L4,ir);De(un,2,"initializing",O4,ir);De(un,2,"initialized",T4,ir);De(un,2,"dragging",P4,ir);De(un,2,"dropped",A4,ir);wo(un,ir);var $F=class{constructor(e){this.manager=e}setDragSource(e){const{dragOperation:t}=this.manager;t.sourceIdentifier=typeof e=="string"||typeof e=="number"?e:e.id}setDropTarget(e){return Le(()=>{const{dragOperation:t}=this.manager,n=e??null;if(t.targetIdentifier===n)return Promise.resolve(!1);t.targetIdentifier=n;const r=hl({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch("dragover",r),this.manager.renderer.rendering.then(()=>r.defaultPrevented)})}start(e){return Le(()=>{const{dragOperation:t}=this.manager;if(e.source!=null&&this.setDragSource(e.source),!t.source)throw new Error("Cannot start a drag operation without a drag source");if(!t.status.idle)throw new Error("Cannot start a drag operation while another is active");const r=new AbortController,{event:o,coordinates:s}=e;Je(()=>{t.status.set("initialization-pending"),t.shape=null,t.canceled=!1,t.activatorEvent=o??null,t.position.reset(s)});const a=hl({operation:t.snapshot()});return this.manager.monitor.dispatch("beforedragstart",a),a.defaultPrevented?(t.reset(),r.abort(),r):(t.status.set("initializing"),t.controller=r,this.manager.renderer.rendering.then(()=>{if(r.signal.aborted)return;const{status:l}=t;l.current==="initializing"&&(t.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:o,operation:t.snapshot(),cancelable:!1}))}),r)})}move(e){return Le(()=>{var t,n;const{dragOperation:r}=this.manager,{status:o,controller:s}=r;if(!o.dragging||!s||s.signal.aborted)return;const a=hl({nativeEvent:e.event,operation:r.snapshot(),by:e.by,to:e.to},(t=e.cancelable)!=null?t:!0);((n=e.propagate)==null||n)&&this.manager.monitor.dispatch("dragmove",a),queueMicrotask(()=>{var l,c,u,f,d;if(a.defaultPrevented)return;const p=(d=e.to)!=null?d:{x:r.position.current.x+((c=(l=e.by)==null?void 0:l.x)!=null?c:0),y:r.position.current.y+((f=(u=e.by)==null?void 0:u.y)!=null?f:0)};r.position.current=p})})}stop(e={}){return Le(()=>{var t,n;const{dragOperation:r}=this.manager,{controller:o}=r;if(!o||o.signal.aborted)return;let s;const a=()=>{const c={resume:()=>{},abort:()=>{}};return s=new Promise((u,f)=>{c.resume=u,c.abort=f}),c};o.abort();const l=()=>{this.manager.renderer.rendering.then(()=>{r.status.set("dropped");const c=Le(()=>{var f;return((f=r.source)==null?void 0:f.status)==="dropping"}),u=()=>{r.controller===o&&(r.controller=void 0),r.reset()};if(c){const{source:f}=r,d=Ht(()=>{f?.status==="idle"&&(d(),u())})}else this.manager.renderer.rendering.then(u)})};r.canceled=(t=e.canceled)!=null?t:!1,this.manager.monitor.dispatch("dragend",{nativeEvent:e.event,operation:r.snapshot(),canceled:(n=e.canceled)!=null?n:!1,suspend:a}),s?s.then(l).catch(()=>r.reset()):l()})}},$4,V4,B4,z4,$t,yh,bh,wh,Ch;z4=[Re],B4=[Re],V4=[Re],$4=[Re];var Lr=class{constructor(e,t){Fe(this,yh,we($t,8,this)),we($t,11,this),Fe(this,bh,we($t,12,this)),we($t,15,this),Fe(this,wh,we($t,16,this)),we($t,19,this),Fe(this,Ch,we($t,20,this)),we($t,23,this);const{effects:n,id:r,data:o={},disabled:s=!1,register:a=!0}=e;let l=r;this.manager=t,this.id=r,this.data=o,this.disabled=s,this.effects=()=>{var c;return[()=>{const{id:u,manager:f}=this;if(u!==l)return f?.registry.register(this),()=>f?.registry.unregister(this)},...(c=n?.())!=null?c:[]]},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),t&&a&&queueMicrotask(this.register)}register(){var e;return(e=this.manager)==null?void 0:e.registry.register(this)}unregister(){var e;(e=this.manager)==null||e.registry.unregister(this)}destroy(){var e;(e=this.manager)==null||e.registry.unregister(this)}};$t=Os(null);yh=new WeakMap;bh=new WeakMap;wh=new WeakMap;Ch=new WeakMap;De($t,4,"manager",z4,Lr,yh);De($t,4,"id",B4,Lr,bh);De($t,4,"data",V4,Lr,wh);De($t,4,"disabled",$4,Lr,Ch);wo($t,Lr);var V1=class{constructor(){this.map=gi(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{const n=this.map.peek(),r=n.get(e),o=()=>this.unregister(e,t);if(r===t)return o;if(r){const l=this.cleanupFunctions.get(r);l?.(),this.cleanupFunctions.delete(r)}const s=new Map(n);s.set(e,t),this.map.value=s;const a=xi(...t.effects());return this.cleanupFunctions.set(t,a),o},this.unregister=(e,t)=>{const n=this.map.peek();if(n.get(e)!==t)return;const r=this.cleanupFunctions.get(t);r?.(),this.cleanupFunctions.delete(t);const o=new Map(n);o.delete(e),this.map.value=o}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(e){return this.map.value.has(e)}get(e){return this.map.value.get(e)}destroy(){for(const e of this){const t=this.cleanupFunctions.get(e);t?.(),e.destroy()}this.map.value=new Map}},W4,H4,G4,U4,Y4,K4,pf,kt,Sh,Eh,Nh,Fn=class extends(pf=Lr,K4=[Re],Y4=[Re],U4=[Re],G4=[Qe],H4=[Qe],W4=[Qe],pf){constructor(t,n){var r=t,{modifiers:o,type:s,sensors:a}=r,l=k4(r,["modifiers","type","sensors"]);super(l,n),we(kt,5,this),Fe(this,Sh,we(kt,8,this)),we(kt,11,this),Fe(this,Eh,we(kt,12,this)),we(kt,15,this),Fe(this,Nh,we(kt,16,this,this.isDragSource?"dragging":"idle")),we(kt,19,this),this.type=s,this.sensors=a,this.modifiers=o,this.alignment=l.alignment}get isDropping(){return this.status==="dropping"&&this.isDragSource}get isDragging(){return this.status==="dragging"&&this.isDragSource}get isDragSource(){var t,n;return((n=(t=this.manager)==null?void 0:t.dragOperation.source)==null?void 0:n.id)===this.id}};kt=Os(pf);Sh=new WeakMap;Eh=new WeakMap;Nh=new WeakMap;De(kt,4,"type",K4,Fn,Sh);De(kt,4,"modifiers",Y4,Fn,Eh);De(kt,4,"status",U4,Fn,Nh);De(kt,2,"isDropping",G4,Fn);De(kt,2,"isDragging",H4,Fn);De(kt,2,"isDragSource",W4,Fn);wo(kt,Fn);var Z4,q4,X4,J4,Q4,ew,hf,ct,_h,jh,kh,Rh,Mh,$n=class extends(hf=Lr,ew=[Re],Q4=[Re],J4=[Re],X4=[Re],q4=[Re],Z4=[Qe],hf){constructor(t,n){var r=t,{accept:o,collisionDetector:s,collisionPriority:a,type:l}=r,c=k4(r,["accept","collisionDetector","collisionPriority","type"]);super(c,n),we(ct,5,this),Fe(this,_h,we(ct,8,this)),we(ct,11,this),Fe(this,jh,we(ct,12,this)),we(ct,15,this),Fe(this,kh,we(ct,16,this)),we(ct,19,this),Fe(this,Rh,we(ct,20,this)),we(ct,23,this),Fe(this,Mh,we(ct,24,this)),we(ct,27,this),this.accept=o,this.collisionDetector=s,this.collisionPriority=a,this.type=l}accepts(t){const{accept:n}=this;return n?typeof n=="function"?n(t):t.type?Array.isArray(n)?n.includes(t.type):t.type===n:!1:!0}get isDropTarget(){var t,n;return((n=(t=this.manager)==null?void 0:t.dragOperation.target)==null?void 0:n.id)===this.id}};ct=Os(hf);_h=new WeakMap;jh=new WeakMap;kh=new WeakMap;Rh=new WeakMap;Mh=new WeakMap;De(ct,4,"accept",ew,$n,_h);De(ct,4,"type",Q4,$n,jh);De(ct,4,"collisionDetector",J4,$n,kh);De(ct,4,"collisionPriority",X4,$n,Rh);De(ct,4,"shape",q4,$n,Mh);De(ct,2,"isDropTarget",Z4,$n);wo(ct,$n);var ps=class extends Ct{constructor(e,t){super(e,t),this.manager=e,this.options=t}},VF=class extends AbortController{constructor(e,t){super(),this.constraints=e,this.onActivate=t,this.activated=!1;for(const n of e??[])n.controller=this}onEvent(e){var t;if(!this.activated)if((t=this.constraints)!=null&&t.length)for(const n of this.constraints)n.onEvent(e);else this.activate(e)}activate(e){this.activated||(this.activated=!0,this.onActivate(e))}abort(e){this.activated=!1,super.abort(e)}},ml,tw=class{constructor(e){this.options=e,Fe(this,ml)}set controller(e){an(this,ml,e),e.signal.addEventListener("abort",()=>this.abort())}activate(e){var t;(t=pt(this,ml))==null||t.activate(e)}};ml=new WeakMap;var B1=class extends Ct{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},BF=class{constructor(e){this.draggables=new V1,this.droppables=new V1,this.plugins=new Qu(e),this.sensors=new Qu(e),this.modifiers=new Qu(e)}register(e,t){if(e instanceof Fn)return this.draggables.register(e.id,e);if(e instanceof $n)return this.droppables.register(e.id,e);if(e.prototype instanceof B1)return this.modifiers.register(e,t);if(e.prototype instanceof ps)return this.sensors.register(e,t);if(e.prototype instanceof Ct)return this.plugins.register(e,t);throw new Error("Invalid instance type")}unregister(e){if(e instanceof Lr)return e instanceof Fn?this.draggables.unregister(e.id,e):e instanceof $n?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof B1)return this.modifiers.unregister(e);if(e.prototype instanceof ps)return this.sensors.unregister(e);if(e.prototype instanceof Ct)return this.plugins.unregister(e);throw new Error("Invalid instance type")}destroy(){this.draggables.destroy(),this.droppables.destroy(),this.plugins.destroy(),this.sensors.destroy(),this.modifiers.destroy()}},nw,rw,ow,sw,aw,iw,lw,cw,uw,aa,gl,Yo,Ke,Dh,Ah,Ph,Th,Oh,ia;uw=[Qe],cw=[Re],lw=[Re],iw=[Re],aw=[Re],sw=[Re],ow=[Qe],rw=[Qe],nw=[Qe];var _n=class{constructor(e){we(Ke,5,this),Fe(this,aa),Fe(this,gl),Fe(this,Yo,new bo(void 0,(t,n)=>t&&n?t.equals(n):t===n)),this.status=new ir,Fe(this,Dh,we(Ke,8,this,!1)),we(Ke,11,this),Fe(this,Ah,we(Ke,12,this,null)),we(Ke,15,this),Fe(this,Ph,we(Ke,16,this,null)),we(Ke,19,this),Fe(this,Th,we(Ke,20,this,null)),we(Ke,23,this),Fe(this,Oh,we(Ke,24,this,[])),we(Ke,27,this),this.position=new su({x:0,y:0}),Fe(this,ia,{x:0,y:0}),an(this,aa,e)}get shape(){const{current:e,initial:t,previous:n}=pt(this,Yo);return!e||!t?null:{current:e,initial:t,previous:n}}set shape(e){e?pt(this,Yo).current=e:pt(this,Yo).reset()}get source(){var e;const t=this.sourceIdentifier;if(t==null)return null;const n=pt(this,aa).registry.draggables.get(t);return n&&an(this,gl,n),(e=n??pt(this,gl))!=null?e:null}get target(){var e;const t=this.targetIdentifier;return t!=null&&(e=pt(this,aa).registry.droppables.get(t))!=null?e:null}get transform(){const{x:e,y:t}=this.position.delta;let n={x:e,y:t};for(const r of this.modifiers)n=r.apply(j4(_4({},this.snapshot()),{transform:n}));return an(this,ia,n),n}snapshot(){return Le(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:pt(this,ia),shape:this.shape?Ju(this.shape):null,position:Ju(this.position),status:Ju(this.status),canceled:this.canceled}))}reset(){Je(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,pt(this,Yo).reset(),this.position.reset({x:0,y:0}),an(this,ia,{x:0,y:0}),this.modifiers=[]})}};Ke=Os(null);aa=new WeakMap;gl=new WeakMap;Yo=new WeakMap;Dh=new WeakMap;Ah=new WeakMap;Ph=new WeakMap;Th=new WeakMap;Oh=new WeakMap;ia=new WeakMap;De(Ke,2,"shape",uw,_n);De(Ke,4,"canceled",cw,_n,Dh);De(Ke,4,"activatorEvent",lw,_n,Ah);De(Ke,4,"sourceIdentifier",iw,_n,Ph);De(Ke,4,"targetIdentifier",aw,_n,Th);De(Ke,4,"modifiers",sw,_n,Oh);De(Ke,2,"source",ow,_n);De(Ke,2,"target",rw,_n);De(Ke,2,"transform",nw,_n);wo(Ke,_n);var zF={get rendering(){return Promise.resolve()}};function Qn(e,t){return typeof e=="function"?e(t):e??t}var WF=class{constructor(t){this.destroy=()=>{this.dragOperation.status.idle||this.actions.stop({canceled:!0}),this.dragOperation.modifiers.forEach(p=>p.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};var n;const r=t??{},o=Qn(r.plugins,[]),s=Qn(r.sensors,[]),a=Qn(r.modifiers,[]),l=(n=r.renderer)!=null?n:zF,c=new IF(this),u=new BF(this);this.registry=u,this.monitor=c,this.renderer=l,this.actions=new $F(this),this.dragOperation=new _n(this),this.collisionObserver=new OF(this),this.plugins=[FF,...o],this.modifiers=a,this.sensors=s;const{destroy:f}=this,d=xi(()=>{var p,h,g;const x=Le(()=>this.dragOperation.modifiers),v=this.modifiers;for(const y of x)v.includes(y)||y.destroy();this.dragOperation.modifiers=(g=(h=(p=this.dragOperation.source)==null?void 0:p.modifiers)==null?void 0:h.map(y=>{const{plugin:b,options:S}=gh(y);return new b(this,S)}))!=null?g:v});this.destroy=()=>{d(),f()}}get plugins(){return this.registry.plugins.values}set plugins(t){this.registry.plugins.values=t}get modifiers(){return this.registry.modifiers.values}set modifiers(t){this.registry.modifiers.values=t}get sensors(){return this.registry.sensors.values}set sensors(t){this.registry.sensors.values=t}},dw=e=>{throw TypeError(e)},Lh=(e,t,n)=>t.has(e)||dw("Cannot "+n),Ce=(e,t,n)=>(Lh(e,t,"read from private field"),t.get(e)),Ft=(e,t,n)=>t.has(e)?dw("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Yt=(e,t,n,r)=>(Lh(e,t,"write to private field"),t.set(e,n),n),fw=(e,t,n)=>(Lh(e,t,"access private method"),n);function au(e){return e?e instanceof KeyframeEffect?!0:"getKeyframes"in e&&typeof e.getKeyframes=="function":!1}function pw(e,t){const n=e.getAnimations();if(n.length>0)for(const r of n){if(r.playState!=="running")continue;const{effect:o}=r,a=(au(o)?o.getKeyframes():[]).filter(t);if(a.length>0)return[a[a.length-1],r]}return null}function iu(e){const{width:t,height:n,top:r,left:o,bottom:s,right:a}=e.getBoundingClientRect();return{width:t,height:n,top:r,left:o,bottom:s,right:a}}function Ih(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function bi(e){return"nodeType"in e}function Jt(e){var t,n,r;return e?Ih(e)?e:bi(e)?"defaultView"in e?(t=e.defaultView)!=null?t:window:(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window:window:window}function Fh(e){const{Document:t}=Jt(e);return e instanceof t||"nodeType"in e&&e.nodeType===Node.DOCUMENT_NODE}function uo(e){return!e||Ih(e)?!1:e instanceof Jt(e).HTMLElement||"namespaceURI"in e&&typeof e.namespaceURI=="string"&&e.namespaceURI.endsWith("html")}function hw(e){return e instanceof Jt(e).SVGElement||"namespaceURI"in e&&typeof e.namespaceURI=="string"&&e.namespaceURI.endsWith("svg")}function Co(e){return e?Ih(e)?e.document:bi(e)?Fh(e)?e:uo(e)||hw(e)?e.ownerDocument:document:document:document}function HF(e){var t,n,r,o;const{documentElement:s}=Co(e),a=Jt(e).visualViewport,l=(t=a?.width)!=null?t:s.clientWidth,c=(n=a?.height)!=null?n:s.clientHeight,u=(r=a?.offsetTop)!=null?r:0,f=(o=a?.offsetLeft)!=null?o:0;return{top:u,left:f,right:f+l,bottom:u+c,width:l,height:c}}function GF(e,t){if(UF(e)&&e.open===!1)return!1;const{overflow:n,overflowX:r,overflowY:o}=getComputedStyle(e);return n==="visible"&&r==="visible"&&o==="visible"}function UF(e){return e.tagName==="DETAILS"}function Va(e,t=e.getBoundingClientRect(),n=0){var r,o,s,a,l;let c=t;const{ownerDocument:u}=e,f=(r=u.defaultView)!=null?r:window;let d=e.parentElement;for(;d&&d!==u.documentElement;){if(!GF(d)){const S=d.getBoundingClientRect(),w=n*(S.bottom-S.top),E=n*(S.right-S.left),N=n*(S.bottom-S.top),_=n*(S.right-S.left);c={top:Math.max(c.top,S.top-w),right:Math.min(c.right,S.right+E),bottom:Math.min(c.bottom,S.bottom+N),left:Math.max(c.left,S.left-_),width:0,height:0},c.width=c.right-c.left,c.height=c.bottom-c.top}d=d.parentElement}const p=f.visualViewport,h=(o=p?.offsetTop)!=null?o:0,g=(s=p?.offsetLeft)!=null?s:0,x=(a=p?.width)!=null?a:f.innerWidth,v=(l=p?.height)!=null?l:f.innerHeight,y=n*v,b=n*x;return c={top:Math.max(c.top,h-y),right:Math.min(c.right,g+x+b),bottom:Math.min(c.bottom,h+v+y),left:Math.max(c.left,g-b),width:0,height:0},c.width=c.right-c.left,c.height=c.bottom-c.top,c.width<0&&(c.width=0),c.height<0&&(c.height=0),c}function hs(e){return{x:e.clientX,y:e.clientY}}var mw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function mf(e=document,t=new Set){if(t.has(e))return[];t.add(e);const n=[e];for(const r of Array.from(e.querySelectorAll("iframe, frame")))try{const o=r.contentDocument;o&&!t.has(o)&&n.push(...mf(o,t))}catch{}try{const r=e.defaultView;if(r&&r!==window.top){const o=r.parent;o&&o.document&&o.document!==e&&n.push(...mf(o.document,t))}}catch{}return n}function $h(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function gw(){var e,t;const n=$h()?window.visualViewport:null;return{x:(e=n?.offsetLeft)!=null?e:0,y:(t=n?.offsetTop)!=null?t:0}}function Vh(e){return!e||!bi(e)?!1:e instanceof Jt(e).ShadowRoot}function Zl(e){if(e&&bi(e)){let t=e.getRootNode();if(Vh(t))return t;if(t instanceof Document)return t}return Co(e)}function Bh(e){return e.matchMedia("(prefers-reduced-motion: reduce)").matches}function YF(e){const t="input, textarea, select, canvas, [contenteditable]",n=e.cloneNode(!0),r=Array.from(e.querySelectorAll(t));return Array.from(n.querySelectorAll(t)).forEach((s,a)=>{const l=r[a];if(z1(s)&&z1(l)&&(s.type!=="file"&&(s.value=l.value),s.type==="radio"&&s.name&&(s.name=`Cloned__${s.name}`)),W1(s)&&W1(l)&&l.width>0&&l.height>0){const c=s.getContext("2d");c?.drawImage(l,0,0)}}),n}function z1(e){return"value"in e}function W1(e){return e.tagName==="CANVAS"}function xw(e,{x:t,y:n}){const r=e.elementFromPoint(t,n);if(KF(r)){const{contentDocument:o}=r;if(o){const{left:s,top:a}=r.getBoundingClientRect();return xw(o,{x:t-s,y:n-a})}}return r}function KF(e){return e?.tagName==="IFRAME"}var gf=new WeakMap;function ZF(e){return!!e.closest(`
|
|
86
86
|
input:not([disabled]),
|
|
87
87
|
select:not([disabled]),
|
|
88
88
|
textarea:not([disabled]),
|
|
89
89
|
button:not([disabled]),
|
|
90
90
|
a[href],
|
|
91
91
|
[contenteditable]:not([contenteditable="false"])
|
|
92
|
-
`)}var xw=class{constructor(){this.entries=new Set,this.clear=()=>{for(const e of this.entries){const[t,{type:n,listener:r,options:o}]=e;t.removeEventListener(n,r,o)}this.entries.clear()}}bind(e,t){const n=Array.isArray(e)?e:[e],r=Array.isArray(t)?t:[t],o=[];for(const s of n)for(const a of r){const{type:l,listener:c,options:u}=a,f=[s,a];s.addEventListener(l,c,u),this.entries.add(f),o.push(f)}return function(){for(const[a,{type:l,listener:c,options:u}]of o)a.removeEventListener(l,c,u)}}};function gs(e){const t=e?.ownerDocument.defaultView;if(t&&t.self!==t.parent)return t.frameElement}function YF(e){const t=new Set;let n=gs(e);for(;n;)t.add(n),n=gs(n);return t}function KF(e,t){const n=setTimeout(e,t);return()=>clearTimeout(n)}function vw(e,t){const n=()=>performance.now();let r,o;return function(...s){const a=this;o?(r?.(),r=KF(()=>{e.apply(a,s),o=n()},t-(n()-o))):(e.apply(a,s),o=n())}}function ZF(e,t){return e===t?!0:!e||!t?!1:e.top==t.top&&e.left==t.left&&e.right==t.right&&e.bottom==t.bottom}function qF(e,t=e.getBoundingClientRect()){const{width:n,height:r}=Va(e,t);return n>0&&r>0}var XF=hw?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},xl,JF=class extends XF{constructor(e){super(t=>{if(!Ce(this,xl)){Yt(this,xl,!0);return}e(t,this)}),Ft(this,xl,!1)}};xl=new WeakMap;var H1=Array.from({length:100},(e,t)=>t/100),yw=75,Kr,ql,hr,Zr,la,ht,Ca,ca,Xl,bw,ww,Cw=class{constructor(e,t,n={debug:!1,skipInitial:!1}){this.element=e,this.callback=t,Ft(this,Xl),this.disconnect=()=>{var s,a,l;Yt(this,Ca,!0),(s=Ce(this,hr))==null||s.disconnect(),(a=Ce(this,Zr))==null||a.disconnect(),Ce(this,la).disconnect(),(l=Ce(this,ht))==null||l.remove()},Ft(this,Kr,!0),Ft(this,ql),Ft(this,hr),Ft(this,Zr),Ft(this,la),Ft(this,ht),Ft(this,Ca,!1),Ft(this,ca,vw(()=>{var s,a,l;const{element:c}=this;if((s=Ce(this,Zr))==null||s.disconnect(),Ce(this,Ca)||!Ce(this,Kr)||!c.isConnected)return;const u=(a=c.ownerDocument)!=null?a:document,{innerHeight:f,innerWidth:d}=(l=u.defaultView)!=null?l:window,p=c.getBoundingClientRect(),h=Va(c,p),{top:m,left:x,bottom:v,right:y}=h,b=-Math.floor(m),S=-Math.floor(x),w=-Math.floor(d-y),E=-Math.floor(f-v),N=`${b}px ${w}px ${E}px ${S}px`;this.boundingClientRect=p,Yt(this,Zr,new IntersectionObserver(_=>{const[k]=_,{intersectionRect:I}=k;(k.intersectionRatio!==1?k.intersectionRatio:rr.intersectionRatio(I,Va(c)))!==1&&Ce(this,ca).call(this)},{threshold:H1,rootMargin:N,root:u})),Ce(this,Zr).observe(c),dw(this,Xl,bw).call(this)},yw)),this.boundingClientRect=e.getBoundingClientRect(),Yt(this,Kr,qF(e,this.boundingClientRect));let r=!0;this.callback=s=>{r&&(r=!1,n.skipInitial)||t(s)};const o=e.ownerDocument;n?.debug&&(Yt(this,ht,document.createElement("div")),Ce(this,ht).style.background="rgba(0,0,0,0.15)",Ce(this,ht).style.position="fixed",Ce(this,ht).style.pointerEvents="none",o.body.appendChild(Ce(this,ht))),Yt(this,la,new IntersectionObserver(s=>{var a,l;const c=s[s.length-1],{boundingClientRect:u,isIntersecting:f}=c,{width:d,height:p}=u,h=Ce(this,Kr);Yt(this,Kr,f),!(!d&&!p)&&(h&&!f?((a=Ce(this,Zr))==null||a.disconnect(),this.callback(null),(l=Ce(this,hr))==null||l.disconnect(),Yt(this,hr,void 0),Ce(this,ht)&&(Ce(this,ht).style.visibility="hidden")):Ce(this,ca).call(this),f&&!Ce(this,hr)&&(Yt(this,hr,new JF(Ce(this,ca))),Ce(this,hr).observe(e)))},{threshold:H1,root:o})),Ce(this,Kr)&&!n.skipInitial&&this.callback(this.boundingClientRect),Ce(this,la).observe(e)}};Kr=new WeakMap;ql=new WeakMap;hr=new WeakMap;Zr=new WeakMap;la=new WeakMap;ht=new WeakMap;Ca=new WeakMap;ca=new WeakMap;Xl=new WeakSet;bw=function(){Ce(this,Ca)||(dw(this,Xl,ww).call(this),!ZF(this.boundingClientRect,Ce(this,ql))&&(this.callback(this.boundingClientRect),Yt(this,ql,this.boundingClientRect)))};ww=function(){if(Ce(this,ht)){const{top:e,left:t,width:n,height:r}=Va(this.element);Ce(this,ht).style.overflow="hidden",Ce(this,ht).style.visibility="visible",Ce(this,ht).style.top=`${Math.floor(e)}px`,Ce(this,ht).style.left=`${Math.floor(t)}px`,Ce(this,ht).style.width=`${Math.floor(n)}px`,Ce(this,ht).style.height=`${Math.floor(r)}px`}};var Zi=new WeakMap,qi=new WeakMap;function QF(e,t){let n=Zi.get(e);return n||(n={disconnect:new Cw(e,o=>{const s=Zi.get(e);s&&s.callbacks.forEach(a=>a(o))},{skipInitial:!0}).disconnect,callbacks:new Set}),n.callbacks.add(t),Zi.set(e,n),()=>{n.callbacks.delete(t),n.callbacks.size===0&&(Zi.delete(e),n.disconnect())}}function e$(e,t){const n=new Set;for(const r of e){const o=QF(r,t);n.add(o)}return()=>n.forEach(r=>r())}function t$(e,t){var n;const r=e.ownerDocument;if(!qi.has(r)){const a=new AbortController,l=new Set;document.addEventListener("scroll",c=>l.forEach(u=>u(c)),{capture:!0,passive:!0,signal:a.signal}),qi.set(r,{disconnect:()=>a.abort(),listeners:l})}const{listeners:o,disconnect:s}=(n=qi.get(r))!=null?n:{};return!o||!s?()=>{}:(o.add(t),()=>{o.delete(t),o.size===0&&(s(),qi.delete(r))})}var ua,da,vl,xf,n$=class{constructor(e,t,n){this.callback=t,Ft(this,ua),Ft(this,da,!1),Ft(this,vl),Ft(this,xf,vw(a=>{if(!Ce(this,da)&&a.target&&"contains"in a.target&&typeof a.target.contains=="function"){for(const l of Ce(this,vl))if(a.target.contains(l)){this.callback(Ce(this,ua).boundingClientRect);break}}},yw));const r=YF(e),o=e$(r,t),s=t$(e,Ce(this,xf));Yt(this,vl,r),Yt(this,ua,new Cw(e,t,n)),this.disconnect=()=>{Ce(this,da)||(Yt(this,da,!0),o(),s(),Ce(this,ua).disconnect())}}};ua=new WeakMap;da=new WeakMap;vl=new WeakMap;xf=new WeakMap;function vf(e){return"showPopover"in e&&"hidePopover"in e&&typeof e.showPopover=="function"&&typeof e.hidePopover=="function"}function Ba(e){try{vf(e)&&e.isConnected&&e.hasAttribute("popover")&&!e.matches(":popover-open")&&e.showPopover()}catch{}}function G1(e){return!hw||!e?!1:e===Co(e).scrollingElement}function Sw(e){var t,n;const r=Jt(e),o=G1(e)?BF(e):iu(e),s=r.visualViewport,a=G1(e)?{height:(t=s?.height)!=null?t:r.innerHeight,width:(n=s?.width)!=null?n:r.innerWidth}:{height:e.clientHeight,width:e.clientWidth},l={current:{x:e.scrollLeft,y:e.scrollTop},max:{x:e.scrollWidth-a.width,y:e.scrollHeight-a.height}},c=l.current.y<=0,u=l.current.x<=0,f=l.current.y>=l.max.y,d=l.current.x>=l.max.x;return{rect:o,position:l,isTop:c,isLeft:u,isBottom:f,isRight:d}}function r$(e,t){const{isTop:n,isBottom:r,isLeft:o,isRight:s,position:a}=Sw(e),{x:l,y:c}=t??{x:0,y:0},u=!n&&a.current.y+c>0,f=!r&&a.current.y+c<a.max.y,d=!o&&a.current.x+l>0,p=!s&&a.current.x+l<a.max.x;return{top:u,bottom:f,left:d,right:p,x:d||p,y:u||f}}var zh=class{constructor(t){this.scheduler=t,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{const{tasks:n,resolvers:r}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(const o of n)o();for(const o of r)o()}}schedule(t){return this.tasks.add(t),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(n=>this.resolvers.add(n))}},Jl=new zh(e=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(e):e()}),o$=new zh(e=>setTimeout(e,50)),Ql=new Map,s$=Ql.clear.bind(Ql);function jn(e,t=!1){if(!t)return U1(e);let n=Ql.get(e);return n||(n=U1(e),Ql.set(e,n),o$.schedule(s$),n)}function U1(e){return Jt(e).getComputedStyle(e)}function a$(e,t=jn(e,!0)){return t.position==="fixed"||t.position==="sticky"}function i$(e,t=jn(e,!0)){const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const s=t[o];return typeof s=="string"?n.test(s):!1})}var l$={excludeElement:!0,escapeShadowDOM:!0};function yf(e,t=l$){const{limit:n,excludeElement:r,escapeShadowDOM:o}=t,s=new Set;function a(l){if(n!=null&&s.size>=n||!l)return s;if(Fh(l)&&l.scrollingElement!=null&&!s.has(l.scrollingElement))return s.add(l.scrollingElement),s;if(o&&Vh(l))return a(l.host);if(!uo(l))return pw(l)?a(l.parentElement):s;if(s.has(l))return s;const c=jn(l,!0);if(r&&l===e||i$(l,c)&&s.add(l),a$(l,c)){const{scrollingElement:u}=l.ownerDocument;return u&&s.add(u),s}return a(l.parentNode)}return e?a(e):s}function c$(e){const[t]=yf(e,{limit:1});return t??null}function ms(e,t=window.frameElement){const n={x:0,y:0,scaleX:1,scaleY:1};if(!e)return n;let r=gs(e);for(;r;){if(r===t)return n;const o=iu(r),{x:s,y:a}=u$(r,o);n.x=n.x+o.left,n.y=n.y+o.top,n.scaleX=n.scaleX*s,n.scaleY=n.scaleY*a,r=gs(r)}return n}function u$(e,t=iu(e)){const n=Math.round(t.width),r=Math.round(t.height);if(uo(e))return{x:n/e.offsetWidth,y:r/e.offsetHeight};const o=jn(e,!0);return{x:(parseFloat(o.width)||n)/n,y:(parseFloat(o.height)||r)/r}}function d$(e){if(e==="none")return null;const t=e.split(" "),n=parseFloat(t[0]),r=parseFloat(t[1]);return isNaN(n)&&isNaN(r)?null:{x:isNaN(n)?r:n,y:isNaN(r)?n:r}}function za(e){if(e==="none")return null;const[t,n,r="0"]=e.split(" "),o={x:parseFloat(t),y:parseFloat(n),z:parseInt(r,10)};return isNaN(o.x)&&isNaN(o.y)?null:{x:isNaN(o.x)?0:o.x,y:isNaN(o.y)?0:o.y,z:isNaN(o.z)?0:o.z}}function Wh(e){var t,n,r,o,s,a,l,c,u;const{scale:f,transform:d,translate:p}=e,h=d$(f),m=za(p),x=f$(d);if(!x&&!h&&!m)return null;const v={x:(t=h?.x)!=null?t:1,y:(n=h?.y)!=null?n:1},y={x:(r=m?.x)!=null?r:0,y:(o=m?.y)!=null?o:0},b={x:(s=x?.x)!=null?s:0,y:(a=x?.y)!=null?a:0,scaleX:(l=x?.scaleX)!=null?l:1,scaleY:(c=x?.scaleY)!=null?c:1};return{x:y.x+b.x,y:y.y+b.y,z:(u=m?.z)!=null?u:0,scaleX:v.x*b.scaleX,scaleY:v.y*b.scaleY}}function f$(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}var ln=(e=>(e[e.Idle=0]="Idle",e[e.Forward=1]="Forward",e[e.Reverse=-1]="Reverse",e))(ln||{}),p$={x:.2,y:.2},h$={x:10,y:10};function g$(e,t,n,r=25,o=p$,s=h$){const{x:a,y:l}=t,{rect:c,isTop:u,isBottom:f,isLeft:d,isRight:p}=Sw(e),h=ms(e),m=jn(e,!0),x=Wh(m),v=x!==null?x?.scaleX<0:!1,y=x!==null?x?.scaleY<0:!1,b=new rr(c.left*h.scaleX+h.x,c.top*h.scaleY+h.y,c.width*h.scaleX,c.height*h.scaleY),S={x:0,y:0},w={x:0,y:0},E={height:b.height*o.y,width:b.width*o.x};return(!u||y&&!f)&&l<=b.top+E.height&&n?.y!==1&&a>=b.left-s.x&&a<=b.right+s.x?(S.y=y?1:-1,w.y=r*Math.abs((b.top+E.height-l)/E.height)):(!f||y&&!u)&&l>=b.bottom-E.height&&n?.y!==-1&&a>=b.left-s.x&&a<=b.right+s.x&&(S.y=y?-1:1,w.y=r*Math.abs((b.bottom-E.height-l)/E.height)),(!p||v&&!d)&&a>=b.right-E.width&&n?.x!==-1&&l>=b.top-s.y&&l<=b.bottom+s.y?(S.x=v?-1:1,w.x=r*Math.abs((b.right-E.width-a)/E.width)):(!d||v&&!p)&&a<=b.left+E.width&&n?.x!==1&&l>=b.top-s.y&&l<=b.bottom+s.y&&(S.x=v?1:-1,w.x=r*Math.abs((b.left+E.width-a)/E.width)),{direction:S,speed:w}}function m$(e){return"scrollIntoViewIfNeeded"in e&&typeof e.scrollIntoViewIfNeeded=="function"}function Ew(e,t=!1){if(m$(e)){e.scrollIntoViewIfNeeded(t);return}if(!uo(e))return e.scrollIntoView();var n=c$(e);if(!uo(n))return;const r=jn(n,!0),o=parseInt(r.getPropertyValue("border-top-width")),s=parseInt(r.getPropertyValue("border-left-width")),a=e.offsetTop-n.offsetTop<n.scrollTop,l=e.offsetTop-n.offsetTop+e.clientHeight-o>n.scrollTop+n.clientHeight,c=e.offsetLeft-n.offsetLeft<n.scrollLeft,u=e.offsetLeft-n.offsetLeft+e.clientWidth-s>n.scrollLeft+n.clientWidth,f=a&&!l;(a||l)&&t&&(n.scrollTop=e.offsetTop-n.offsetTop-n.clientHeight/2-o+e.clientHeight/2),(c||u)&&t&&(n.scrollLeft=e.offsetLeft-n.offsetLeft-n.clientWidth/2-s+e.clientWidth/2),(a||l||c||u)&&!t&&e.scrollIntoView(f)}function x$(e,t,n){const{scaleX:r,scaleY:o,x:s,y:a}=t,l=e.left+s+(1-r)*parseFloat(n),c=e.top+a+(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),u=r?e.width*r:e.width,f=o?e.height*o:e.height;return{width:u,height:f,top:c,right:l+u,bottom:c+f,left:l}}function v$(e,t,n){const{scaleX:r,scaleY:o,x:s,y:a}=t,l=e.left-s-(1-r)*parseFloat(n),c=e.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),u=r?e.width/r:e.width,f=o?e.height/o:e.height;return{width:u,height:f,top:c,right:l+u,bottom:c+f,left:l}}function Nw({element:e,keyframes:t,options:n}){return e.animate(t,n).finished}function Y1(e,t=jn(e).translate,n=!0){if(n){const r=fw(e,o=>"translate"in o);if(r){const{translate:o=""}=r[0];if(typeof o=="string"){const s=za(o);if(s)return s}}}if(t){const r=za(t);if(r)return r}return{x:0,y:0,z:0}}var y$=new zh(e=>setTimeout(e,0)),Sa=new Map,b$=Sa.clear.bind(Sa);function w$(e){const t=e.ownerDocument;let n=Sa.get(t);if(n)return n;n=t.getAnimations(),Sa.set(t,n),y$.schedule(b$);const r=n.filter(o=>au(o.effect)&&o.effect.target===e);return Sa.set(e,r),n}function C$(e,t){const n=w$(e).filter(r=>{var o,s;if(au(r.effect)){const{target:a}=r.effect;if((s=a&&((o=t.isValidTarget)==null?void 0:o.call(t,a)))!=null?s:!0)return r.effect.getKeyframes().some(c=>{for(const u of t.properties)if(c[u])return!0})}}).map(r=>{const{effect:o,currentTime:s}=r,a=o?.getComputedTiming().duration;if(!(r.pending||r.playState==="finished")&&typeof a=="number"&&typeof s=="number"&&s<a)return r.currentTime=a,()=>{r.currentTime=s}});if(n.length>0)return()=>n.forEach(r=>r?.())}var wn=class extends rr{constructor(e,t={}){var n,r,o,s;const{frameTransform:a=ms(e),ignoreTransforms:l,getBoundingClientRect:c=iu}=t,u=C$(e,{properties:["transform","translate","scale","width","height"],isValidTarget:E=>(E!==e||$h())&&E.contains(e)}),f=c(e);let{top:d,left:p,width:h,height:m}=f,x;const v=jn(e),y=Wh(v),b={x:(n=y?.scaleX)!=null?n:1,y:(r=y?.scaleY)!=null?r:1},S=S$(e,v);u?.(),y&&(x=v$(f,y,v.transformOrigin),(l||S)&&(d=x.top,p=x.left,h=x.width,m=x.height));const w={width:(o=x?.width)!=null?o:h,height:(s=x?.height)!=null?s:m};if(S&&!l&&x){const E=x$(x,S,v.transformOrigin);d=E.top,p=E.left,h=E.width,m=E.height,b.x=S.scaleX,b.y=S.scaleY}a&&(l||(p*=a.scaleX,h*=a.scaleX,d*=a.scaleY,m*=a.scaleY),p+=a.x,d+=a.y),super(p,d,h,m),this.scale=b,this.intrinsicWidth=w.width,this.intrinsicHeight=w.height}};function S$(e,t){var n;const r=e.getAnimations();let o=null;if(!r.length)return null;for(const s of r){if(s.playState!=="running")continue;const a=au(s.effect)?s.effect.getKeyframes():[],l=a[a.length-1];if(!l)continue;const{transform:c,translate:u,scale:f}=l;if(c||u||f){const d=Wh({transform:typeof c=="string"&&c?c:t.transform,translate:typeof u=="string"&&u?u:t.translate,scale:typeof f=="string"&&f?f:t.scale});d&&(o=o?{x:o.x+d.x,y:o.y+d.y,z:(n=o.z)!=null?n:d.z,scaleX:o.scaleX*d.scaleX,scaleY:o.scaleY*d.scaleY}:d)}}return o}function Ea(e){return"style"in e&&typeof e.style=="object"&&e.style!==null&&"setProperty"in e.style&&"removeProperty"in e.style&&typeof e.style.setProperty=="function"&&typeof e.style.removeProperty=="function"}var E$=class{constructor(e){this.element=e,this.initial=new Map}set(e,t=""){const{element:n}=this;if(Ea(n))for(const[r,o]of Object.entries(e)){const s=`${t}${r}`;this.initial.has(s)||this.initial.set(s,n.style.getPropertyValue(s)),n.style.setProperty(s,typeof o=="string"?o:`${o}px`)}}remove(e,t=""){const{element:n}=this;if(Ea(n))for(const r of e){const o=`${t}${r}`;n.style.removeProperty(o)}}reset(){const{element:e}=this;if(Ea(e)){for(const[t,n]of this.initial)e.style.setProperty(t,n);e.getAttribute("style")===""&&e.removeAttribute("style")}}};function fo(e){return e?e instanceof Jt(e).Element||bi(e)&&e.nodeType===Node.ELEMENT_NODE:!1}function Wa(e){if(!e)return!1;const{KeyboardEvent:t}=Jt(e.target);return e instanceof t}function N$(e){if(!e)return!1;const{PointerEvent:t}=Jt(e.target);return e instanceof t}function _$(e){if(!fo(e))return!1;const{tagName:t}=e;return t==="INPUT"||t==="TEXTAREA"||j$(e)}function j$(e){return e.hasAttribute("contenteditable")&&e.getAttribute("contenteditable")!=="false"}var ed={};function bf(e){const t=ed[e]==null?0:ed[e]+1;return ed[e]=t,`${e}-${t}`}var k$=({dragOperation:e,droppable:t})=>{const n=e.position.current;if(!n)return null;const{id:r}=t;if(!t.shape)return null;if(t.shape.containsPoint(n)){const o=sn.distance(t.shape.center,n);return{id:r,value:1/o,type:Is.PointerIntersection,priority:Ls.High}}return null},R$=({dragOperation:e,droppable:t})=>{const{shape:n}=e;if(!t.shape||!n?.current)return null;const r=n.current.intersectionArea(t.shape);if(r){const{position:o}=e,s=sn.distance(t.shape.center,o.current),l=r/(n.current.area+t.shape.area-r)/s;return{id:t.id,value:l,type:Is.ShapeIntersection,priority:Ls.Normal}}return null},_w=e=>{var t;return(t=k$(e))!=null?t:R$(e)},M$=e=>{const{dragOperation:t,droppable:n}=e,{shape:r,position:o}=t;if(!n.shape)return null;const s=r?rr.from(r.current.boundingRectangle).corners:void 0,l=rr.from(n.shape.boundingRectangle).corners.reduce((c,u,f)=>{var d;return c+sn.distance(sn.from(u),(d=s?.[f])!=null?d:o.current)},0)/4;return{id:n.id,value:1/l,type:Is.Collision,priority:Ls.Normal}},D$=Object.create,Hh=Object.defineProperty,A$=Object.defineProperties,T$=Object.getOwnPropertyDescriptor,P$=Object.getOwnPropertyDescriptors,ec=Object.getOwnPropertySymbols,jw=Object.prototype.hasOwnProperty,kw=Object.prototype.propertyIsEnumerable,Rw=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Fs=e=>{throw TypeError(e)},wf=(e,t,n)=>t in e?Hh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ha=(e,t)=>{for(var n in t||(t={}))jw.call(t,n)&&wf(e,n,t[n]);if(ec)for(var n of ec(t))kw.call(t,n)&&wf(e,n,t[n]);return e},Gh=(e,t)=>A$(e,P$(t)),K1=(e,t)=>Hh(e,"name",{value:t,configurable:!0}),Mw=(e,t)=>{var n={};for(var r in e)jw.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ec)for(var r of ec(e))t.indexOf(r)<0&&kw.call(e,r)&&(n[r]=e[r]);return n},$s=e=>{var t;return[,,,D$((t=e?.[Rw("metadata")])!=null?t:null)]},Dw=["class","method","getter","setter","accessor","field","value","get","set"],fa=e=>e!==void 0&&typeof e!="function"?Fs("Function expected"):e,O$=(e,t,n,r,o)=>({kind:Dw[e],name:t,metadata:r,addInitializer:s=>n._?Fs("Already initialized"):o.push(fa(s||null))}),So=(e,t)=>wf(t,Rw("metadata"),e[3]),et=(e,t,n,r)=>{for(var o=0,s=e[t>>1],a=s&&s.length;o<a;o++)t&1?s[o].call(n):r=s[o].call(n,r);return r},Qt=(e,t,n,r,o,s)=>{var a,l,c,u,f,d=t&7,p=!!(t&8),h=!!(t&16),m=d>3?e.length+1:d?p?1:2:0,x=Dw[d+5],v=d>3&&(e[m-1]=[]),y=e[m]||(e[m]=[]),b=d&&(!h&&!p&&(o=o.prototype),d<5&&(d>3||!h)&&T$(d<4?o:{get[n](){return ze(this,s)},set[n](w){return Rt(this,s,w)}},n));d?h&&d<4&&K1(s,(d>2?"set ":d>1?"get ":"")+n):K1(o,n);for(var S=r.length-1;S>=0;S--)u=O$(d,n,c={},e[3],y),d&&(u.static=p,u.private=h,f=u.access={has:h?w=>L$(o,w):w=>n in w},d^3&&(f.get=h?w=>(d^1?ze:po)(w,o,d^4?s:b.get):w=>w[n]),d>2&&(f.set=h?(w,E)=>Rt(w,o,E,d^4?s:b.set):(w,E)=>w[n]=E)),l=(0,r[S])(d?d<4?h?s:b[x]:d>4?void 0:{get:b.get,set:b.set}:o,u),c._=1,d^4||l===void 0?fa(l)&&(d>4?v.unshift(l):d?h?s=l:b[x]=l:o=l):typeof l!="object"||l===null?Fs("Object expected"):(fa(a=l.get)&&(b.get=a),fa(a=l.set)&&(b.set=a),fa(a=l.init)&&v.unshift(a));return d||So(e,o),b&&Hh(o,n,b),h?d^4?s:b:o},Uh=(e,t,n)=>t.has(e)||Fs("Cannot "+n),L$=(e,t)=>Object(t)!==t?Fs('Cannot use the "in" operator on this value'):e.has(t),ze=(e,t,n)=>(Uh(e,t,"read from private field"),n?n.call(e):t.get(e)),qe=(e,t,n)=>t.has(e)?Fs("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Rt=(e,t,n,r)=>(Uh(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),po=(e,t,n)=>(Uh(e,t,"access private method"),n),Z1={role:"button",roleDescription:"draggable"},I$="dnd-kit-description",F$="dnd-kit-announcement",$$={draggable:"To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item in a given direction. Press space again to drop the item in its new position, or press escape to cancel."},V$={dragstart({operation:{source:e}}){if(e)return`Picked up draggable item ${e.id}.`},dragover({operation:{source:e,target:t}}){if(!(!e||e.id===t?.id))return t?`Draggable item ${e.id} was moved over droppable target ${t.id}.`:`Draggable item ${e.id} is no longer over a droppable target.`},dragend({operation:{source:e,target:t},canceled:n}){if(e)return n?`Dragging was cancelled. Draggable item ${e.id} was dropped.`:t?`Draggable item ${e.id} was dropped over droppable target ${t.id}`:`Draggable item ${e.id} was dropped.`}};function B$(e){const t=e.tagName.toLowerCase();return["input","select","textarea","a","button"].includes(t)}function z$(e,t){const n=document.createElement("div");return n.id=e,n.style.setProperty("display","none"),n.textContent=t,n}function W$(e){const t=document.createElement("div");return t.id=e,t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.style.setProperty("position","fixed"),t.style.setProperty("width","1px"),t.style.setProperty("height","1px"),t.style.setProperty("margin","-1px"),t.style.setProperty("border","0"),t.style.setProperty("padding","0"),t.style.setProperty("overflow","hidden"),t.style.setProperty("clip","rect(0 0 0 0)"),t.style.setProperty("clip-path","inset(100%)"),t.style.setProperty("white-space","nowrap"),t}var H$=["dragover","dragmove"],G$=class extends Ct{constructor(e,t){super(e);const{id:n,idPrefix:{description:r=I$,announcement:o=F$}={},announcements:s=V$,screenReaderInstructions:a=$$,debounce:l=500}=t??{},c=n?`${r}-${n}`:bf(r),u=n?`${o}-${n}`:bf(o);let f,d,p,h;const m=(E=h)=>{!p||!E||p?.nodeValue!==E&&(p.nodeValue=E)},x=()=>Jl.schedule(m),v=U$(x,l),y=Object.entries(s).map(([E,N])=>this.manager.monitor.addEventListener(E,(_,k)=>{const I=p;if(!I)return;const F=N?.(_,k);F&&I.nodeValue!==F&&(h=F,H$.includes(E)?v():(x(),v.cancel()))})),b=()=>{let E=[];f?.isConnected||(f=z$(c,a.draggable),E.push(f)),d?.isConnected||(d=W$(u),p=document.createTextNode(""),d.appendChild(p),E.push(d)),E.length>0&&document.body.append(...E)},S=new Set;function w(){for(const E of S)E()}this.registerEffect(()=>{var E;S.clear();for(const N of this.manager.registry.draggables.value){const _=(E=N.handle)!=null?E:N.element;if(_){(!f||!d)&&S.add(b),(!B$(_)||$h())&&!_.hasAttribute("tabindex")&&S.add(()=>_.setAttribute("tabindex","0")),!_.hasAttribute("role")&&_.tagName.toLowerCase()!=="button"&&S.add(()=>_.setAttribute("role",Z1.role)),_.hasAttribute("aria-roledescription")||S.add(()=>_.setAttribute("aria-roledescription",Z1.roleDescription)),_.hasAttribute("aria-describedby")||S.add(()=>_.setAttribute("aria-describedby",c));for(const I of["aria-pressed","aria-grabbed"]){const F=String(N.isDragging);_.getAttribute(I)!==F&&S.add(()=>_.setAttribute(I,F))}const k=String(N.disabled);_.getAttribute("aria-disabled")!==k&&S.add(()=>_.setAttribute("aria-disabled",k))}}S.size>0&&Jl.schedule(w)}),this.destroy=()=>{super.destroy(),f?.remove(),d?.remove(),y.forEach(E=>E())}}};function U$(e,t){let n;const r=()=>{clearTimeout(n),n=setTimeout(e,t)};return r.cancel=()=>clearTimeout(n),r}var Y$=class extends Ct{constructor(e,t){super(e,t),this.manager=e;const n=Fa(()=>{var r;return Co((r=this.manager.dragOperation.source)==null?void 0:r.element)});this.destroy=Ht(()=>{var r;const{dragOperation:o}=this.manager,{cursor:s="grabbing",nonce:a}=(r=this.options)!=null?r:{};if(o.status.initialized){const l=n.value,c=l.createElement("style");return a&&c.setAttribute("nonce",a),c.textContent=`* { cursor: ${s} !important; }`,l.head.appendChild(c),()=>c.remove()}})}},tc=new Map,Aw,Tw,Pw,Ow,Cf,Na,er,Yh,xs,Lw,Iw,Fw,$w,Eo=class extends(Cf=yi,Ow=[Re],Pw=[Qe],Tw=[Qe],Aw=[Qe],Cf){constructor(e){super(e),et(er,5,this),qe(this,xs),qe(this,Na,new Set),qe(this,Yh,et(er,8,this,new Set)),et(er,11,this),this.registerEffect(po(this,xs,Lw))}register(e){return ze(this,Na).add(e),()=>{ze(this,Na).delete(e)}}addRoot(e){return Le(()=>{const t=new Set(this.additionalRoots);t.add(e),this.additionalRoots=t}),()=>{Le(()=>{const t=new Set(this.additionalRoots);t.delete(e),this.additionalRoots=t})}}get sourceRoot(){var e;const{source:t}=this.manager.dragOperation;return Zl((e=t?.element)!=null?e:null)}get targetRoot(){var e;const{target:t}=this.manager.dragOperation;return Zl((e=t?.element)!=null?e:null)}get roots(){const{status:e}=this.manager.dragOperation;if(e.initializing||e.initialized){const t=[this.sourceRoot,this.targetRoot].filter(n=>n!=null);return new Set([...t,...this.additionalRoots])}return new Set}};er=$s(Cf);Na=new WeakMap;Yh=new WeakMap;xs=new WeakSet;Lw=function(){const{roots:e}=this,t=[];for(const n of e)for(const r of ze(this,Na))t.push(po(this,xs,Iw).call(this,n,r));return()=>{for(const n of t)n()}};Iw=function(e,t){let n=tc.get(e);n||(n=new Map,tc.set(e,n));let r=n.get(t);if(!r){const s=Fh(e)?po(this,xs,Fw).call(this,e,n,t):po(this,xs,$w).call(this,e,n,t);if(!s)return()=>{};r=s,n.set(t,r)}r.refCount++;let o=!1;return()=>{o||(o=!0,r.refCount--,r.refCount===0&&r.cleanup())}};Fw=function(e,t,n){const r=e.createElement("style");r.textContent=n,e.head.prepend(r);const o=new MutationObserver(s=>{for(const a of s)for(const l of Array.from(a.removedNodes))if(l===r){e.head.prepend(r);return}});return o.observe(e.head,{childList:!0}),{refCount:0,cleanup:()=>{o.disconnect(),r.remove(),t.delete(n),t.size===0&&tc.delete(e)}}};$w=function(e,t,n){!("adoptedStyleSheets"in e&&Array.isArray(e.adoptedStyleSheets))&&process.env.NODE_ENV!=="production"&&console.error("Cannot inject styles: This browser doesn't support adoptedStyleSheets");const r=e.ownerDocument.defaultView,{CSSStyleSheet:o}=r??{};if(!o)return process.env.NODE_ENV!=="production"&&console.error("Cannot inject styles: CSSStyleSheet constructor not available"),null;const s=new o;return s.replaceSync(n),e.adoptedStyleSheets.push(s),{refCount:0,cleanup:()=>{var a;if(Vh(e)&&((a=e.host)!=null&&a.isConnected)){const l=e.adoptedStyleSheets.indexOf(s);l!==-1&&e.adoptedStyleSheets.splice(l,1)}t.delete(n),t.size===0&&tc.delete(e)}}};Qt(er,4,"additionalRoots",Ow,Eo,Yh);Qt(er,2,"sourceRoot",Pw,Eo);Qt(er,2,"targetRoot",Tw,Eo);Qt(er,2,"roots",Aw,Eo);So(er,Eo);var wi="data-dnd-",Sf=`${wi}dropping`,yt="--dnd-",Mn=`${wi}dragging`,nc=`${wi}placeholder`,K$=[Mn,nc,"popover","aria-pressed","aria-grabbing"],Z$=["view-transition-name"],q$=`
|
|
92
|
+
`)}var vw=class{constructor(){this.entries=new Set,this.clear=()=>{for(const e of this.entries){const[t,{type:n,listener:r,options:o}]=e;t.removeEventListener(n,r,o)}this.entries.clear()}}bind(e,t){const n=Array.isArray(e)?e:[e],r=Array.isArray(t)?t:[t],o=[];for(const s of n)for(const a of r){const{type:l,listener:c,options:u}=a,f=[s,a];s.addEventListener(l,c,u),this.entries.add(f),o.push(f)}return function(){for(const[a,{type:l,listener:c,options:u}]of o)a.removeEventListener(l,c,u)}}};function ms(e){const t=e?.ownerDocument.defaultView;if(t&&t.self!==t.parent)return t.frameElement}function qF(e){const t=new Set;let n=ms(e);for(;n;)t.add(n),n=ms(n);return t}function XF(e,t){const n=setTimeout(e,t);return()=>clearTimeout(n)}function yw(e,t){const n=()=>performance.now();let r,o;return function(...s){const a=this;o?(r?.(),r=XF(()=>{e.apply(a,s),o=n()},t-(n()-o))):(e.apply(a,s),o=n())}}function JF(e,t){return e===t?!0:!e||!t?!1:e.top==t.top&&e.left==t.left&&e.right==t.right&&e.bottom==t.bottom}function QF(e,t=e.getBoundingClientRect()){const{width:n,height:r}=Va(e,t);return n>0&&r>0}var e$=mw?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},xl,t$=class extends e${constructor(e){super(t=>{if(!Ce(this,xl)){Yt(this,xl,!0);return}e(t,this)}),Ft(this,xl,!1)}};xl=new WeakMap;var H1=Array.from({length:100},(e,t)=>t/100),bw=75,Kr,ql,hr,Zr,la,ht,Ca,ca,Xl,ww,Cw,Sw=class{constructor(e,t,n={debug:!1,skipInitial:!1}){this.element=e,this.callback=t,Ft(this,Xl),this.disconnect=()=>{var s,a,l;Yt(this,Ca,!0),(s=Ce(this,hr))==null||s.disconnect(),(a=Ce(this,Zr))==null||a.disconnect(),Ce(this,la).disconnect(),(l=Ce(this,ht))==null||l.remove()},Ft(this,Kr,!0),Ft(this,ql),Ft(this,hr),Ft(this,Zr),Ft(this,la),Ft(this,ht),Ft(this,Ca,!1),Ft(this,ca,yw(()=>{var s,a,l;const{element:c}=this;if((s=Ce(this,Zr))==null||s.disconnect(),Ce(this,Ca)||!Ce(this,Kr)||!c.isConnected)return;const u=(a=c.ownerDocument)!=null?a:document,{innerHeight:f,innerWidth:d}=(l=u.defaultView)!=null?l:window,p=c.getBoundingClientRect(),h=Va(c,p),{top:g,left:x,bottom:v,right:y}=h,b=-Math.floor(g),S=-Math.floor(x),w=-Math.floor(d-y),E=-Math.floor(f-v),N=`${b}px ${w}px ${E}px ${S}px`;this.boundingClientRect=p,Yt(this,Zr,new IntersectionObserver(_=>{const[k]=_,{intersectionRect:I}=k;(k.intersectionRatio!==1?k.intersectionRatio:rr.intersectionRatio(I,Va(c)))!==1&&Ce(this,ca).call(this)},{threshold:H1,rootMargin:N,root:u})),Ce(this,Zr).observe(c),fw(this,Xl,ww).call(this)},bw)),this.boundingClientRect=e.getBoundingClientRect(),Yt(this,Kr,QF(e,this.boundingClientRect));let r=!0;this.callback=s=>{r&&(r=!1,n.skipInitial)||t(s)};const o=e.ownerDocument;n?.debug&&(Yt(this,ht,document.createElement("div")),Ce(this,ht).style.background="rgba(0,0,0,0.15)",Ce(this,ht).style.position="fixed",Ce(this,ht).style.pointerEvents="none",o.body.appendChild(Ce(this,ht))),Yt(this,la,new IntersectionObserver(s=>{var a,l;const c=s[s.length-1],{boundingClientRect:u,isIntersecting:f}=c,{width:d,height:p}=u,h=Ce(this,Kr);Yt(this,Kr,f),!(!d&&!p)&&(h&&!f?((a=Ce(this,Zr))==null||a.disconnect(),this.callback(null),(l=Ce(this,hr))==null||l.disconnect(),Yt(this,hr,void 0),Ce(this,ht)&&(Ce(this,ht).style.visibility="hidden")):Ce(this,ca).call(this),f&&!Ce(this,hr)&&(Yt(this,hr,new t$(Ce(this,ca))),Ce(this,hr).observe(e)))},{threshold:H1,root:o})),Ce(this,Kr)&&!n.skipInitial&&this.callback(this.boundingClientRect),Ce(this,la).observe(e)}};Kr=new WeakMap;ql=new WeakMap;hr=new WeakMap;Zr=new WeakMap;la=new WeakMap;ht=new WeakMap;Ca=new WeakMap;ca=new WeakMap;Xl=new WeakSet;ww=function(){Ce(this,Ca)||(fw(this,Xl,Cw).call(this),!JF(this.boundingClientRect,Ce(this,ql))&&(this.callback(this.boundingClientRect),Yt(this,ql,this.boundingClientRect)))};Cw=function(){if(Ce(this,ht)){const{top:e,left:t,width:n,height:r}=Va(this.element);Ce(this,ht).style.overflow="hidden",Ce(this,ht).style.visibility="visible",Ce(this,ht).style.top=`${Math.floor(e)}px`,Ce(this,ht).style.left=`${Math.floor(t)}px`,Ce(this,ht).style.width=`${Math.floor(n)}px`,Ce(this,ht).style.height=`${Math.floor(r)}px`}};var Zi=new WeakMap,qi=new WeakMap;function n$(e,t){let n=Zi.get(e);return n||(n={disconnect:new Sw(e,o=>{const s=Zi.get(e);s&&s.callbacks.forEach(a=>a(o))},{skipInitial:!0}).disconnect,callbacks:new Set}),n.callbacks.add(t),Zi.set(e,n),()=>{n.callbacks.delete(t),n.callbacks.size===0&&(Zi.delete(e),n.disconnect())}}function r$(e,t){const n=new Set;for(const r of e){const o=n$(r,t);n.add(o)}return()=>n.forEach(r=>r())}function o$(e,t){var n;const r=e.ownerDocument;if(!qi.has(r)){const a=new AbortController,l=new Set;document.addEventListener("scroll",c=>l.forEach(u=>u(c)),{capture:!0,passive:!0,signal:a.signal}),qi.set(r,{disconnect:()=>a.abort(),listeners:l})}const{listeners:o,disconnect:s}=(n=qi.get(r))!=null?n:{};return!o||!s?()=>{}:(o.add(t),()=>{o.delete(t),o.size===0&&(s(),qi.delete(r))})}var ua,da,vl,xf,s$=class{constructor(e,t,n){this.callback=t,Ft(this,ua),Ft(this,da,!1),Ft(this,vl),Ft(this,xf,yw(a=>{if(!Ce(this,da)&&a.target&&"contains"in a.target&&typeof a.target.contains=="function"){for(const l of Ce(this,vl))if(a.target.contains(l)){this.callback(Ce(this,ua).boundingClientRect);break}}},bw));const r=qF(e),o=r$(r,t),s=o$(e,Ce(this,xf));Yt(this,vl,r),Yt(this,ua,new Sw(e,t,n)),this.disconnect=()=>{Ce(this,da)||(Yt(this,da,!0),o(),s(),Ce(this,ua).disconnect())}}};ua=new WeakMap;da=new WeakMap;vl=new WeakMap;xf=new WeakMap;function vf(e){return"showPopover"in e&&"hidePopover"in e&&typeof e.showPopover=="function"&&typeof e.hidePopover=="function"}function Ba(e){try{vf(e)&&e.isConnected&&e.hasAttribute("popover")&&!e.matches(":popover-open")&&e.showPopover()}catch{}}function G1(e){return!mw||!e?!1:e===Co(e).scrollingElement}function Ew(e){var t,n;const r=Jt(e),o=G1(e)?HF(e):iu(e),s=r.visualViewport,a=G1(e)?{height:(t=s?.height)!=null?t:r.innerHeight,width:(n=s?.width)!=null?n:r.innerWidth}:{height:e.clientHeight,width:e.clientWidth},l={current:{x:e.scrollLeft,y:e.scrollTop},max:{x:e.scrollWidth-a.width,y:e.scrollHeight-a.height}},c=l.current.y<=0,u=l.current.x<=0,f=l.current.y>=l.max.y,d=l.current.x>=l.max.x;return{rect:o,position:l,isTop:c,isLeft:u,isBottom:f,isRight:d}}function a$(e,t){const{isTop:n,isBottom:r,isLeft:o,isRight:s,position:a}=Ew(e),{x:l,y:c}=t??{x:0,y:0},u=!n&&a.current.y+c>0,f=!r&&a.current.y+c<a.max.y,d=!o&&a.current.x+l>0,p=!s&&a.current.x+l<a.max.x;return{top:u,bottom:f,left:d,right:p,x:d||p,y:u||f}}var zh=class{constructor(t){this.scheduler=t,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{const{tasks:n,resolvers:r}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(const o of n)o();for(const o of r)o()}}schedule(t){return this.tasks.add(t),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(n=>this.resolvers.add(n))}},Jl=new zh(e=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(e):e()}),i$=new zh(e=>setTimeout(e,50)),Ql=new Map,l$=Ql.clear.bind(Ql);function jn(e,t=!1){if(!t)return U1(e);let n=Ql.get(e);return n||(n=U1(e),Ql.set(e,n),i$.schedule(l$),n)}function U1(e){return Jt(e).getComputedStyle(e)}function c$(e,t=jn(e,!0)){return t.position==="fixed"||t.position==="sticky"}function u$(e,t=jn(e,!0)){const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const s=t[o];return typeof s=="string"?n.test(s):!1})}var d$={excludeElement:!0,escapeShadowDOM:!0};function yf(e,t=d$){const{limit:n,excludeElement:r,escapeShadowDOM:o}=t,s=new Set;function a(l){if(n!=null&&s.size>=n||!l)return s;if(Fh(l)&&l.scrollingElement!=null&&!s.has(l.scrollingElement))return s.add(l.scrollingElement),s;if(o&&Vh(l))return a(l.host);if(!uo(l))return hw(l)?a(l.parentElement):s;if(s.has(l))return s;const c=jn(l,!0);if(r&&l===e||u$(l,c)&&s.add(l),c$(l,c)){const{scrollingElement:u}=l.ownerDocument;return u&&s.add(u),s}return a(l.parentNode)}return e?a(e):s}function f$(e){const[t]=yf(e,{limit:1});return t??null}function gs(e,t=window.frameElement){const n={x:0,y:0,scaleX:1,scaleY:1};if(!e)return n;let r=ms(e);for(;r;){if(r===t)return n;const o=iu(r),{x:s,y:a}=p$(r,o);n.x=n.x+o.left,n.y=n.y+o.top,n.scaleX=n.scaleX*s,n.scaleY=n.scaleY*a,r=ms(r)}return n}function p$(e,t=iu(e)){const n=Math.round(t.width),r=Math.round(t.height);if(uo(e))return{x:n/e.offsetWidth,y:r/e.offsetHeight};const o=jn(e,!0);return{x:(parseFloat(o.width)||n)/n,y:(parseFloat(o.height)||r)/r}}function h$(e){if(e==="none")return null;const t=e.split(" "),n=parseFloat(t[0]),r=parseFloat(t[1]);return isNaN(n)&&isNaN(r)?null:{x:isNaN(n)?r:n,y:isNaN(r)?n:r}}function za(e){if(e==="none")return null;const[t,n,r="0"]=e.split(" "),o={x:parseFloat(t),y:parseFloat(n),z:parseInt(r,10)};return isNaN(o.x)&&isNaN(o.y)?null:{x:isNaN(o.x)?0:o.x,y:isNaN(o.y)?0:o.y,z:isNaN(o.z)?0:o.z}}function Wh(e){var t,n,r,o,s,a,l,c,u;const{scale:f,transform:d,translate:p}=e,h=h$(f),g=za(p),x=m$(d);if(!x&&!h&&!g)return null;const v={x:(t=h?.x)!=null?t:1,y:(n=h?.y)!=null?n:1},y={x:(r=g?.x)!=null?r:0,y:(o=g?.y)!=null?o:0},b={x:(s=x?.x)!=null?s:0,y:(a=x?.y)!=null?a:0,scaleX:(l=x?.scaleX)!=null?l:1,scaleY:(c=x?.scaleY)!=null?c:1};return{x:y.x+b.x,y:y.y+b.y,z:(u=g?.z)!=null?u:0,scaleX:v.x*b.scaleX,scaleY:v.y*b.scaleY}}function m$(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}var ln=(e=>(e[e.Idle=0]="Idle",e[e.Forward=1]="Forward",e[e.Reverse=-1]="Reverse",e))(ln||{}),g$={x:.2,y:.2},x$={x:10,y:10};function v$(e,t,n,r=25,o=g$,s=x$){const{x:a,y:l}=t,{rect:c,isTop:u,isBottom:f,isLeft:d,isRight:p}=Ew(e),h=gs(e),g=jn(e,!0),x=Wh(g),v=x!==null?x?.scaleX<0:!1,y=x!==null?x?.scaleY<0:!1,b=new rr(c.left*h.scaleX+h.x,c.top*h.scaleY+h.y,c.width*h.scaleX,c.height*h.scaleY),S={x:0,y:0},w={x:0,y:0},E={height:b.height*o.y,width:b.width*o.x};return(!u||y&&!f)&&l<=b.top+E.height&&n?.y!==1&&a>=b.left-s.x&&a<=b.right+s.x?(S.y=y?1:-1,w.y=r*Math.abs((b.top+E.height-l)/E.height)):(!f||y&&!u)&&l>=b.bottom-E.height&&n?.y!==-1&&a>=b.left-s.x&&a<=b.right+s.x&&(S.y=y?-1:1,w.y=r*Math.abs((b.bottom-E.height-l)/E.height)),(!p||v&&!d)&&a>=b.right-E.width&&n?.x!==-1&&l>=b.top-s.y&&l<=b.bottom+s.y?(S.x=v?-1:1,w.x=r*Math.abs((b.right-E.width-a)/E.width)):(!d||v&&!p)&&a<=b.left+E.width&&n?.x!==1&&l>=b.top-s.y&&l<=b.bottom+s.y&&(S.x=v?1:-1,w.x=r*Math.abs((b.left+E.width-a)/E.width)),{direction:S,speed:w}}function y$(e){return"scrollIntoViewIfNeeded"in e&&typeof e.scrollIntoViewIfNeeded=="function"}function Nw(e,t=!1){if(y$(e)){e.scrollIntoViewIfNeeded(t);return}if(!uo(e))return e.scrollIntoView();var n=f$(e);if(!uo(n))return;const r=jn(n,!0),o=parseInt(r.getPropertyValue("border-top-width")),s=parseInt(r.getPropertyValue("border-left-width")),a=e.offsetTop-n.offsetTop<n.scrollTop,l=e.offsetTop-n.offsetTop+e.clientHeight-o>n.scrollTop+n.clientHeight,c=e.offsetLeft-n.offsetLeft<n.scrollLeft,u=e.offsetLeft-n.offsetLeft+e.clientWidth-s>n.scrollLeft+n.clientWidth,f=a&&!l;(a||l)&&t&&(n.scrollTop=e.offsetTop-n.offsetTop-n.clientHeight/2-o+e.clientHeight/2),(c||u)&&t&&(n.scrollLeft=e.offsetLeft-n.offsetLeft-n.clientWidth/2-s+e.clientWidth/2),(a||l||c||u)&&!t&&e.scrollIntoView(f)}function b$(e,t,n){const{scaleX:r,scaleY:o,x:s,y:a}=t,l=e.left+s+(1-r)*parseFloat(n),c=e.top+a+(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),u=r?e.width*r:e.width,f=o?e.height*o:e.height;return{width:u,height:f,top:c,right:l+u,bottom:c+f,left:l}}function w$(e,t,n){const{scaleX:r,scaleY:o,x:s,y:a}=t,l=e.left-s-(1-r)*parseFloat(n),c=e.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),u=r?e.width/r:e.width,f=o?e.height/o:e.height;return{width:u,height:f,top:c,right:l+u,bottom:c+f,left:l}}function _w({element:e,keyframes:t,options:n}){return e.animate(t,n).finished}function Y1(e,t=jn(e).translate,n=!0){if(n){const r=pw(e,o=>"translate"in o);if(r){const{translate:o=""}=r[0];if(typeof o=="string"){const s=za(o);if(s)return s}}}if(t){const r=za(t);if(r)return r}return{x:0,y:0,z:0}}var C$=new zh(e=>setTimeout(e,0)),Sa=new Map,S$=Sa.clear.bind(Sa);function E$(e){const t=e.ownerDocument;let n=Sa.get(t);if(n)return n;n=t.getAnimations(),Sa.set(t,n),C$.schedule(S$);const r=n.filter(o=>au(o.effect)&&o.effect.target===e);return Sa.set(e,r),n}function N$(e,t){const n=E$(e).filter(r=>{var o,s;if(au(r.effect)){const{target:a}=r.effect;if((s=a&&((o=t.isValidTarget)==null?void 0:o.call(t,a)))!=null?s:!0)return r.effect.getKeyframes().some(c=>{for(const u of t.properties)if(c[u])return!0})}}).map(r=>{const{effect:o,currentTime:s}=r,a=o?.getComputedTiming().duration;if(!(r.pending||r.playState==="finished")&&typeof a=="number"&&typeof s=="number"&&s<a)return r.currentTime=a,()=>{r.currentTime=s}});if(n.length>0)return()=>n.forEach(r=>r?.())}var wn=class extends rr{constructor(e,t={}){var n,r,o,s;const{frameTransform:a=gs(e),ignoreTransforms:l,getBoundingClientRect:c=iu}=t,u=N$(e,{properties:["transform","translate","scale","width","height"],isValidTarget:E=>(E!==e||$h())&&E.contains(e)}),f=c(e);let{top:d,left:p,width:h,height:g}=f,x;const v=jn(e),y=Wh(v),b={x:(n=y?.scaleX)!=null?n:1,y:(r=y?.scaleY)!=null?r:1},S=_$(e,v);u?.(),y&&(x=w$(f,y,v.transformOrigin),(l||S)&&(d=x.top,p=x.left,h=x.width,g=x.height));const w={width:(o=x?.width)!=null?o:h,height:(s=x?.height)!=null?s:g};if(S&&!l&&x){const E=b$(x,S,v.transformOrigin);d=E.top,p=E.left,h=E.width,g=E.height,b.x=S.scaleX,b.y=S.scaleY}a&&(l||(p*=a.scaleX,h*=a.scaleX,d*=a.scaleY,g*=a.scaleY),p+=a.x,d+=a.y),super(p,d,h,g),this.scale=b,this.intrinsicWidth=w.width,this.intrinsicHeight=w.height}};function _$(e,t){var n;const r=e.getAnimations();let o=null;if(!r.length)return null;for(const s of r){if(s.playState!=="running")continue;const a=au(s.effect)?s.effect.getKeyframes():[],l=a[a.length-1];if(!l)continue;const{transform:c,translate:u,scale:f}=l;if(c||u||f){const d=Wh({transform:typeof c=="string"&&c?c:t.transform,translate:typeof u=="string"&&u?u:t.translate,scale:typeof f=="string"&&f?f:t.scale});d&&(o=o?{x:o.x+d.x,y:o.y+d.y,z:(n=o.z)!=null?n:d.z,scaleX:o.scaleX*d.scaleX,scaleY:o.scaleY*d.scaleY}:d)}}return o}function Ea(e){return"style"in e&&typeof e.style=="object"&&e.style!==null&&"setProperty"in e.style&&"removeProperty"in e.style&&typeof e.style.setProperty=="function"&&typeof e.style.removeProperty=="function"}var j$=class{constructor(e){this.element=e,this.initial=new Map}set(e,t=""){const{element:n}=this;if(Ea(n))for(const[r,o]of Object.entries(e)){const s=`${t}${r}`;this.initial.has(s)||this.initial.set(s,n.style.getPropertyValue(s)),n.style.setProperty(s,typeof o=="string"?o:`${o}px`)}}remove(e,t=""){const{element:n}=this;if(Ea(n))for(const r of e){const o=`${t}${r}`;n.style.removeProperty(o)}}reset(){const{element:e}=this;if(Ea(e)){for(const[t,n]of this.initial)e.style.setProperty(t,n);e.getAttribute("style")===""&&e.removeAttribute("style")}}};function fo(e){return e?e instanceof Jt(e).Element||bi(e)&&e.nodeType===Node.ELEMENT_NODE:!1}function Wa(e){if(!e)return!1;const{KeyboardEvent:t}=Jt(e.target);return e instanceof t}function k$(e){if(!e)return!1;const{PointerEvent:t}=Jt(e.target);return e instanceof t}function R$(e){if(!fo(e))return!1;const{tagName:t}=e;return t==="INPUT"||t==="TEXTAREA"||M$(e)}function M$(e){return e.hasAttribute("contenteditable")&&e.getAttribute("contenteditable")!=="false"}var ed={};function bf(e){const t=ed[e]==null?0:ed[e]+1;return ed[e]=t,`${e}-${t}`}var D$=({dragOperation:e,droppable:t})=>{const n=e.position.current;if(!n)return null;const{id:r}=t;if(!t.shape)return null;if(t.shape.containsPoint(n)){const o=sn.distance(t.shape.center,n);return{id:r,value:1/o,type:Is.PointerIntersection,priority:Ls.High}}return null},A$=({dragOperation:e,droppable:t})=>{const{shape:n}=e;if(!t.shape||!n?.current)return null;const r=n.current.intersectionArea(t.shape);if(r){const{position:o}=e,s=sn.distance(t.shape.center,o.current),l=r/(n.current.area+t.shape.area-r)/s;return{id:t.id,value:l,type:Is.ShapeIntersection,priority:Ls.Normal}}return null},jw=e=>{var t;return(t=D$(e))!=null?t:A$(e)},P$=e=>{const{dragOperation:t,droppable:n}=e,{shape:r,position:o}=t;if(!n.shape)return null;const s=r?rr.from(r.current.boundingRectangle).corners:void 0,l=rr.from(n.shape.boundingRectangle).corners.reduce((c,u,f)=>{var d;return c+sn.distance(sn.from(u),(d=s?.[f])!=null?d:o.current)},0)/4;return{id:n.id,value:1/l,type:Is.Collision,priority:Ls.Normal}},T$=Object.create,Hh=Object.defineProperty,O$=Object.defineProperties,L$=Object.getOwnPropertyDescriptor,I$=Object.getOwnPropertyDescriptors,ec=Object.getOwnPropertySymbols,kw=Object.prototype.hasOwnProperty,Rw=Object.prototype.propertyIsEnumerable,Mw=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Fs=e=>{throw TypeError(e)},wf=(e,t,n)=>t in e?Hh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ha=(e,t)=>{for(var n in t||(t={}))kw.call(t,n)&&wf(e,n,t[n]);if(ec)for(var n of ec(t))Rw.call(t,n)&&wf(e,n,t[n]);return e},Gh=(e,t)=>O$(e,I$(t)),K1=(e,t)=>Hh(e,"name",{value:t,configurable:!0}),Dw=(e,t)=>{var n={};for(var r in e)kw.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ec)for(var r of ec(e))t.indexOf(r)<0&&Rw.call(e,r)&&(n[r]=e[r]);return n},$s=e=>{var t;return[,,,T$((t=e?.[Mw("metadata")])!=null?t:null)]},Aw=["class","method","getter","setter","accessor","field","value","get","set"],fa=e=>e!==void 0&&typeof e!="function"?Fs("Function expected"):e,F$=(e,t,n,r,o)=>({kind:Aw[e],name:t,metadata:r,addInitializer:s=>n._?Fs("Already initialized"):o.push(fa(s||null))}),So=(e,t)=>wf(t,Mw("metadata"),e[3]),et=(e,t,n,r)=>{for(var o=0,s=e[t>>1],a=s&&s.length;o<a;o++)t&1?s[o].call(n):r=s[o].call(n,r);return r},Qt=(e,t,n,r,o,s)=>{var a,l,c,u,f,d=t&7,p=!!(t&8),h=!!(t&16),g=d>3?e.length+1:d?p?1:2:0,x=Aw[d+5],v=d>3&&(e[g-1]=[]),y=e[g]||(e[g]=[]),b=d&&(!h&&!p&&(o=o.prototype),d<5&&(d>3||!h)&&L$(d<4?o:{get[n](){return ze(this,s)},set[n](w){return Rt(this,s,w)}},n));d?h&&d<4&&K1(s,(d>2?"set ":d>1?"get ":"")+n):K1(o,n);for(var S=r.length-1;S>=0;S--)u=F$(d,n,c={},e[3],y),d&&(u.static=p,u.private=h,f=u.access={has:h?w=>$$(o,w):w=>n in w},d^3&&(f.get=h?w=>(d^1?ze:po)(w,o,d^4?s:b.get):w=>w[n]),d>2&&(f.set=h?(w,E)=>Rt(w,o,E,d^4?s:b.set):(w,E)=>w[n]=E)),l=(0,r[S])(d?d<4?h?s:b[x]:d>4?void 0:{get:b.get,set:b.set}:o,u),c._=1,d^4||l===void 0?fa(l)&&(d>4?v.unshift(l):d?h?s=l:b[x]=l:o=l):typeof l!="object"||l===null?Fs("Object expected"):(fa(a=l.get)&&(b.get=a),fa(a=l.set)&&(b.set=a),fa(a=l.init)&&v.unshift(a));return d||So(e,o),b&&Hh(o,n,b),h?d^4?s:b:o},Uh=(e,t,n)=>t.has(e)||Fs("Cannot "+n),$$=(e,t)=>Object(t)!==t?Fs('Cannot use the "in" operator on this value'):e.has(t),ze=(e,t,n)=>(Uh(e,t,"read from private field"),n?n.call(e):t.get(e)),qe=(e,t,n)=>t.has(e)?Fs("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Rt=(e,t,n,r)=>(Uh(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),po=(e,t,n)=>(Uh(e,t,"access private method"),n),Z1={role:"button",roleDescription:"draggable"},V$="dnd-kit-description",B$="dnd-kit-announcement",z$={draggable:"To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item in a given direction. Press space again to drop the item in its new position, or press escape to cancel."},W$={dragstart({operation:{source:e}}){if(e)return`Picked up draggable item ${e.id}.`},dragover({operation:{source:e,target:t}}){if(!(!e||e.id===t?.id))return t?`Draggable item ${e.id} was moved over droppable target ${t.id}.`:`Draggable item ${e.id} is no longer over a droppable target.`},dragend({operation:{source:e,target:t},canceled:n}){if(e)return n?`Dragging was cancelled. Draggable item ${e.id} was dropped.`:t?`Draggable item ${e.id} was dropped over droppable target ${t.id}`:`Draggable item ${e.id} was dropped.`}};function H$(e){const t=e.tagName.toLowerCase();return["input","select","textarea","a","button"].includes(t)}function G$(e,t){const n=document.createElement("div");return n.id=e,n.style.setProperty("display","none"),n.textContent=t,n}function U$(e){const t=document.createElement("div");return t.id=e,t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.style.setProperty("position","fixed"),t.style.setProperty("width","1px"),t.style.setProperty("height","1px"),t.style.setProperty("margin","-1px"),t.style.setProperty("border","0"),t.style.setProperty("padding","0"),t.style.setProperty("overflow","hidden"),t.style.setProperty("clip","rect(0 0 0 0)"),t.style.setProperty("clip-path","inset(100%)"),t.style.setProperty("white-space","nowrap"),t}var Y$=["dragover","dragmove"],K$=class extends Ct{constructor(e,t){super(e);const{id:n,idPrefix:{description:r=V$,announcement:o=B$}={},announcements:s=W$,screenReaderInstructions:a=z$,debounce:l=500}=t??{},c=n?`${r}-${n}`:bf(r),u=n?`${o}-${n}`:bf(o);let f,d,p,h;const g=(E=h)=>{!p||!E||p?.nodeValue!==E&&(p.nodeValue=E)},x=()=>Jl.schedule(g),v=Z$(x,l),y=Object.entries(s).map(([E,N])=>this.manager.monitor.addEventListener(E,(_,k)=>{const I=p;if(!I)return;const F=N?.(_,k);F&&I.nodeValue!==F&&(h=F,Y$.includes(E)?v():(x(),v.cancel()))})),b=()=>{let E=[];f?.isConnected||(f=G$(c,a.draggable),E.push(f)),d?.isConnected||(d=U$(u),p=document.createTextNode(""),d.appendChild(p),E.push(d)),E.length>0&&document.body.append(...E)},S=new Set;function w(){for(const E of S)E()}this.registerEffect(()=>{var E;S.clear();for(const N of this.manager.registry.draggables.value){const _=(E=N.handle)!=null?E:N.element;if(_){(!f||!d)&&S.add(b),(!H$(_)||$h())&&!_.hasAttribute("tabindex")&&S.add(()=>_.setAttribute("tabindex","0")),!_.hasAttribute("role")&&_.tagName.toLowerCase()!=="button"&&S.add(()=>_.setAttribute("role",Z1.role)),_.hasAttribute("aria-roledescription")||S.add(()=>_.setAttribute("aria-roledescription",Z1.roleDescription)),_.hasAttribute("aria-describedby")||S.add(()=>_.setAttribute("aria-describedby",c));for(const I of["aria-pressed","aria-grabbed"]){const F=String(N.isDragging);_.getAttribute(I)!==F&&S.add(()=>_.setAttribute(I,F))}const k=String(N.disabled);_.getAttribute("aria-disabled")!==k&&S.add(()=>_.setAttribute("aria-disabled",k))}}S.size>0&&Jl.schedule(w)}),this.destroy=()=>{super.destroy(),f?.remove(),d?.remove(),y.forEach(E=>E())}}};function Z$(e,t){let n;const r=()=>{clearTimeout(n),n=setTimeout(e,t)};return r.cancel=()=>clearTimeout(n),r}var q$=class extends Ct{constructor(e,t){super(e,t),this.manager=e;const n=Fa(()=>{var r;return Co((r=this.manager.dragOperation.source)==null?void 0:r.element)});this.destroy=Ht(()=>{var r;const{dragOperation:o}=this.manager,{cursor:s="grabbing",nonce:a}=(r=this.options)!=null?r:{};if(o.status.initialized){const l=n.value,c=l.createElement("style");return a&&c.setAttribute("nonce",a),c.textContent=`* { cursor: ${s} !important; }`,l.head.appendChild(c),()=>c.remove()}})}},tc=new Map,Pw,Tw,Ow,Lw,Cf,Na,er,Yh,xs,Iw,Fw,$w,Vw,Eo=class extends(Cf=yi,Lw=[Re],Ow=[Qe],Tw=[Qe],Pw=[Qe],Cf){constructor(e){super(e),et(er,5,this),qe(this,xs),qe(this,Na,new Set),qe(this,Yh,et(er,8,this,new Set)),et(er,11,this),this.registerEffect(po(this,xs,Iw))}register(e){return ze(this,Na).add(e),()=>{ze(this,Na).delete(e)}}addRoot(e){return Le(()=>{const t=new Set(this.additionalRoots);t.add(e),this.additionalRoots=t}),()=>{Le(()=>{const t=new Set(this.additionalRoots);t.delete(e),this.additionalRoots=t})}}get sourceRoot(){var e;const{source:t}=this.manager.dragOperation;return Zl((e=t?.element)!=null?e:null)}get targetRoot(){var e;const{target:t}=this.manager.dragOperation;return Zl((e=t?.element)!=null?e:null)}get roots(){const{status:e}=this.manager.dragOperation;if(e.initializing||e.initialized){const t=[this.sourceRoot,this.targetRoot].filter(n=>n!=null);return new Set([...t,...this.additionalRoots])}return new Set}};er=$s(Cf);Na=new WeakMap;Yh=new WeakMap;xs=new WeakSet;Iw=function(){const{roots:e}=this,t=[];for(const n of e)for(const r of ze(this,Na))t.push(po(this,xs,Fw).call(this,n,r));return()=>{for(const n of t)n()}};Fw=function(e,t){let n=tc.get(e);n||(n=new Map,tc.set(e,n));let r=n.get(t);if(!r){const s=Fh(e)?po(this,xs,$w).call(this,e,n,t):po(this,xs,Vw).call(this,e,n,t);if(!s)return()=>{};r=s,n.set(t,r)}r.refCount++;let o=!1;return()=>{o||(o=!0,r.refCount--,r.refCount===0&&r.cleanup())}};$w=function(e,t,n){const r=e.createElement("style");r.textContent=n,e.head.prepend(r);const o=new MutationObserver(s=>{for(const a of s)for(const l of Array.from(a.removedNodes))if(l===r){e.head.prepend(r);return}});return o.observe(e.head,{childList:!0}),{refCount:0,cleanup:()=>{o.disconnect(),r.remove(),t.delete(n),t.size===0&&tc.delete(e)}}};Vw=function(e,t,n){!("adoptedStyleSheets"in e&&Array.isArray(e.adoptedStyleSheets))&&process.env.NODE_ENV!=="production"&&console.error("Cannot inject styles: This browser doesn't support adoptedStyleSheets");const r=e.ownerDocument.defaultView,{CSSStyleSheet:o}=r??{};if(!o)return process.env.NODE_ENV!=="production"&&console.error("Cannot inject styles: CSSStyleSheet constructor not available"),null;const s=new o;return s.replaceSync(n),e.adoptedStyleSheets.push(s),{refCount:0,cleanup:()=>{var a;if(Vh(e)&&((a=e.host)!=null&&a.isConnected)){const l=e.adoptedStyleSheets.indexOf(s);l!==-1&&e.adoptedStyleSheets.splice(l,1)}t.delete(n),t.size===0&&tc.delete(e)}}};Qt(er,4,"additionalRoots",Lw,Eo,Yh);Qt(er,2,"sourceRoot",Ow,Eo);Qt(er,2,"targetRoot",Tw,Eo);Qt(er,2,"roots",Pw,Eo);So(er,Eo);var wi="data-dnd-",Sf=`${wi}dropping`,yt="--dnd-",Mn=`${wi}dragging`,nc=`${wi}placeholder`,X$=[Mn,nc,"popover","aria-pressed","aria-grabbing"],J$=["view-transition-name"],Q$=`
|
|
93
93
|
:is(:root,:host) [${Mn}] {
|
|
94
94
|
position: fixed !important;
|
|
95
95
|
pointer-events: none !important;
|
|
@@ -147,8 +147,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
147
147
|
display: none;
|
|
148
148
|
visibility: hidden;
|
|
149
149
|
}
|
|
150
|
-
`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function X$(e,t="hidden"){return Le(()=>{const{element:n,manager:r}=e;if(!n||!r)return;const o=J$(n,r.registry.droppables),s=[],a=HF(n),{remove:l}=a;return Q$(o,a,s),eV(a,t),a.remove=()=>{s.forEach(c=>c()),l.call(a)},a})}function J$(e,t){const n=new Map;for(const r of t)if(r.element&&(e===r.element||e.contains(r.element))){const o=`${wi}${bf("dom-id")}`;r.element.setAttribute(o,""),n.set(r,o)}return n}function Q$(e,t,n){for(const[r,o]of e){if(!r.element)continue;const s=`[${o}]`,a=t.matches(s)?t:t.querySelector(s);if(r.element.removeAttribute(o),!a)continue;const l=r.element;r.proxy=a,a.removeAttribute(o),mf.set(l,a),n.push(()=>{mf.delete(l),r.proxy=void 0})}}function eV(e,t="hidden"){e.setAttribute("inert","true"),e.setAttribute("tab-index","-1"),e.setAttribute("aria-hidden","true"),e.setAttribute(nc,t)}function Vw(e,t){return e===t?!0:gs(e)===gs(t)}function q1(e){const{target:t}=e;"newState"in e&&e.newState==="closed"&&fo(t)&&t.hasAttribute("popover")&&requestAnimationFrame(()=>Ba(t))}function Ef(e){return e.tagName==="TR"}function tV(e,t,n){const r=new MutationObserver(o=>{let s=!1;for(const a of o){if(a.target!==e){s=!0;continue}if(a.type!=="attributes")continue;const l=a.attributeName;if(l.startsWith("aria-")||K$.includes(l))continue;const c=e.getAttribute(l);if(l==="style"){if(Ea(e)&&Ea(t)){const u=e.style;for(const f of Array.from(t.style))u.getPropertyValue(f)===""&&t.style.removeProperty(f);for(const f of Array.from(u)){if(Z$.includes(f)||f.startsWith(yt))continue;const d=u.getPropertyValue(f);t.style.setProperty(f,d)}}}else c!==null?t.setAttribute(l,c):t.removeAttribute(l)}s&&n&&(t.innerHTML=e.innerHTML)});return r.observe(e,{attributes:!0,subtree:!0,childList:!0}),r}function nV(e,t,n){const r=new MutationObserver(o=>{for(const s of o)if(s.addedNodes.length!==0)for(const a of Array.from(s.addedNodes)){if(a.contains(e)&&e.nextElementSibling!==t){e.insertAdjacentElement("afterend",t),Ba(n);return}if(a.contains(t)&&t.previousElementSibling!==e){t.insertAdjacentElement("beforebegin",e),Ba(n);return}}});return r.observe(e.ownerDocument.body,{childList:!0,subtree:!0}),r}function rV(e){return new ResizeObserver(()=>{var t,n;const r=new wn(e.placeholder,{frameTransform:e.frameTransform,ignoreTransforms:!0}),o=(t=e.transformOrigin)!=null?t:{x:1,y:1},s=(e.width-r.width)*o.x+e.delta.x,a=(e.height-r.height)*o.y+e.delta.y,l=gw();if(e.styles.set({width:r.width-e.widthOffset,height:r.height-e.heightOffset,top:e.top+a+l.y,left:e.left+s+l.x},yt),(n=e.getElementMutationObserver())==null||n.takeRecords(),Ef(e.element)&&Ef(e.placeholder)){const c=Array.from(e.element.cells),u=Array.from(e.placeholder.cells);e.getSavedCellWidths()||e.setSavedCellWidths(c.map(f=>f.style.width));for(const[f,d]of c.entries()){const p=u[f];d.style.width=`${p.getBoundingClientRect().width}px`}}e.dragOperation.shape=new wn(e.feedbackElement)})}var oV=250,sV="ease";function aV(e){var t,n,r,o;const{animation:s}=e;if(typeof s=="function"){const b=s({element:e.element,feedbackElement:e.feedbackElement,placeholder:e.placeholder,translate:e.translate,moved:e.moved});Promise.resolve(b).then(()=>{e.cleanup(),requestAnimationFrame(e.restoreFocus)});return}const{duration:a=oV,easing:l=sV}=s??{};Ba(e.feedbackElement);const[,c]=(t=fw(e.feedbackElement,b=>"translate"in b))!=null?t:[];c?.pause();const u=(n=e.placeholder)!=null?n:e.element,f={frameTransform:Vw(e.feedbackElement,u)?null:void 0},d=new wn(e.feedbackElement,f),p=(r=za(jn(e.feedbackElement).translate))!=null?r:e.translate,h=new wn(u,f),m=rr.delta(d,h,e.alignment),x={x:p.x-m.x,y:p.y-m.y},v=Math.round(d.intrinsicHeight)!==Math.round(h.intrinsicHeight)?{minHeight:[`${d.intrinsicHeight}px`,`${h.intrinsicHeight}px`],maxHeight:[`${d.intrinsicHeight}px`,`${h.intrinsicHeight}px`]}:{},y=Math.round(d.intrinsicWidth)!==Math.round(h.intrinsicWidth)?{minWidth:[`${d.intrinsicWidth}px`,`${h.intrinsicWidth}px`],maxWidth:[`${d.intrinsicWidth}px`,`${h.intrinsicWidth}px`]}:{};e.styles.set({transition:e.transition},yt),e.feedbackElement.setAttribute(Sf,""),(o=e.getElementMutationObserver())==null||o.takeRecords(),Nw({element:e.feedbackElement,keyframes:Gh(Ha(Ha({},v),y),{translate:[`${p.x}px ${p.y}px 0`,`${x.x}px ${x.y}px 0`]}),options:{duration:Bh(Jt(e.feedbackElement))?0:e.moved||e.feedbackElement!==e.element?a:0,easing:l}}).then(()=>{e.feedbackElement.removeAttribute(Sf),c?.finish(),e.cleanup(),requestAnimationFrame(e.restoreFocus)})}var Bw,Nf,Ga,Kh,yl,zw,Ww,Ua=class extends(Nf=Ct,Bw=[Re],Nf){constructor(t,n){super(t,n),qe(this,yl),qe(this,Kh,et(Ga,8,this)),et(Ga,11,this),this.state={initial:{},current:{}};const r=t.registry.plugins.get(Eo),o=r?.register(q$);if(o){const s=this.destroy.bind(this);this.destroy=()=>{o(),s()}}this.registerEffect(po(this,yl,zw).bind(this,r)),this.registerEffect(po(this,yl,Ww))}};Ga=$s(Nf);Kh=new WeakMap;yl=new WeakSet;zw=function(e){const{overlay:t}=this;if(!t||!e)return;const n=Zl(t);if(n)return e.addRoot(n)};Ww=function(){var e,t,n;const{state:r,manager:o,options:s}=this,{dragOperation:a}=o,{position:l,source:c,status:u}=a;if(u.idle){r.current={},r.initial={};return}if(!c)return;const{element:f,feedback:d}=c;if(!f||d==="none"||!u.initialized||u.initializing)return;const{initial:p}=r,h=(e=this.overlay)!=null?e:f,m=ms(h),x=ms(f),v=!Vw(f,h),y=new wn(f,{frameTransform:v?x:null,ignoreTransforms:!v}),b={x:x.scaleX/m.scaleX,y:x.scaleY/m.scaleY};let{width:S,height:w,top:E,left:N}=y;v&&(S=S/b.x,w=w/b.y);const _=new E$(h),{transition:k,translate:I,boxSizing:F,paddingBlockStart:U,paddingBlockEnd:O,paddingInlineStart:R,paddingInlineEnd:L,borderInlineStartWidth:V,borderInlineEndWidth:D,borderBlockStartWidth:$,borderBlockEndWidth:z}=jn(f),P=d==="clone",M=F==="content-box",G=M?parseInt(R)+parseInt(L)+parseInt(V)+parseInt(D):0,A=M?parseInt(U)+parseInt(O)+parseInt($)+parseInt(z):0,W=d!=="move"&&!this.overlay?X$(c,P?"clone":"hidden"):null,H=Le(()=>Wa(o.dragOperation.activatorEvent));if(I!=="none"){const je=za(I);je&&!p.translate&&(p.translate=je)}if(!p.transformOrigin){const je=Le(()=>l.current);p.transformOrigin={x:(je.x-N*m.scaleX-m.x)/(S*m.scaleX),y:(je.y-E*m.scaleY-m.y)/(w*m.scaleY)}}const{transformOrigin:T}=p,B=E*m.scaleY+m.y,Y=N*m.scaleX+m.x;if(!p.coordinates&&(p.coordinates={x:Y,y:B},b.x!==1||b.y!==1)){const{scaleX:je,scaleY:Me}=x,{x:Ue,y:Lt}=T;p.coordinates.x+=(S*je-S)*Ue,p.coordinates.y+=(w*Me-w)*Lt}p.dimensions||(p.dimensions={width:S,height:w}),p.frameTransform||(p.frameTransform=m);const Z={x:p.coordinates.x-Y,y:p.coordinates.y-B},q={width:(p.dimensions.width*p.frameTransform.scaleX-S*m.scaleX)*T.x,height:(p.dimensions.height*p.frameTransform.scaleY-w*m.scaleY)*T.y},oe={x:Z.x/m.scaleX+q.width,y:Z.y/m.scaleY+q.height},ne={left:N+oe.x,top:E+oe.y};h.setAttribute(Mn,"true");const le=Le(()=>a.transform),Ee=(t=p.translate)!=null?t:{x:0,y:0},re=le.x*m.scaleX+Ee.x,ce=le.y*m.scaleY+Ee.y,K=gw();_.set({width:S-G,height:w-A,top:ne.top+K.y,left:ne.left+K.x,translate:`${re}px ${ce}px 0`,transition:k?`${k}, translate 0ms linear`:"",scale:v?`${b.x} ${b.y}`:"","transform-origin":`${T.x*100}% ${T.y*100}%`},yt),W&&(f.insertAdjacentElement("afterend",W),s?.rootElement&&(typeof s.rootElement=="function"?s.rootElement(c):s.rootElement).appendChild(f)),vf(h)&&(h.hasAttribute("popover")||h.setAttribute("popover","manual"),Ba(h),h.addEventListener("beforetoggle",q1));let Q,ae,J;const be=rV({placeholder:W,element:f,feedbackElement:h,frameTransform:m,transformOrigin:T,width:S,height:w,top:E,left:N,widthOffset:G,heightOffset:A,delta:oe,styles:_,dragOperation:a,getElementMutationObserver:()=>Q,getSavedCellWidths:()=>J,setSavedCellWidths:je=>{J=je}}),me=new wn(h);Le(()=>a.shape=me);const fe=Jt(h),Pe=je=>{this.manager.actions.stop({event:je})},Te=Bh(fe);H&&fe.addEventListener("resize",Pe),Le(()=>c.status)==="idle"&&requestAnimationFrame(()=>c.status="dragging"),W&&(be.observe(W),Q=tV(f,W,P),ae=nV(f,W,h));const We=(n=o.dragOperation.source)==null?void 0:n.id,nt=()=>{var je;if(!H||We==null)return;const Me=o.registry.draggables.get(We),Ue=(je=Me?.handle)!=null?je:Me?.element;uo(Ue)&&Ue.focus()},dt=()=>{var je;if(Q?.disconnect(),ae?.disconnect(),be.disconnect(),fe.removeEventListener("resize",Pe),vf(h)&&(h.removeEventListener("beforetoggle",q1),h.removeAttribute("popover")),h.removeAttribute(Mn),_.reset(),J&&Ef(f)){const Ue=Array.from(f.cells);for(const[Lt,Gt]of Ue.entries())Gt.style.width=(je=J[Lt])!=null?je:""}c.status="idle";const Me=r.current.translate!=null;W&&(Me||W.parentElement!==h.parentElement)&&h.isConnected&&W.replaceWith(h),W?.remove()},fn=s?.dropAnimation,Ot=this,Nt=xi(()=>{var je;const{transform:Me,status:Ue}=a;if(!(!Me.x&&!Me.y&&!r.current.translate)&&Ue.dragging){const Lt=(je=p.translate)!=null?je:{x:0,y:0},Gt={x:Me.x/m.scaleX+Lt.x,y:Me.y/m.scaleY+Lt.y},Ir=r.current.translate,_o=Le(()=>a.modifiers),Hn=Le(()=>{var _e;return(_e=a.shape)==null?void 0:_e.current}),pe=H&&!Te?"250ms cubic-bezier(0.25, 1, 0.5, 1)":"0ms linear";if(_.set({transition:`${k}, translate ${pe}`,translate:`${Gt.x}px ${Gt.y}px 0`},yt),Q?.takeRecords(),Hn&&Hn!==me&&Ir&&!_o.length){const _e=sn.delta(Gt,Ir);a.shape=rr.from(Hn.boundingRectangle).translate(_e.x*m.scaleX,_e.y*m.scaleY)}else a.shape=new wn(h);r.current.translate=Gt}},function(){if(a.status.dropped){this.dispose(),c.status="dropping";const je=Ot.dropAnimation!==void 0?Ot.dropAnimation:fn;let Me=r.current.translate;const Ue=Me!=null;if(!Me&&f!==h&&(Me={x:0,y:0}),!Me||je===null){dt();return}o.renderer.rendering.then(()=>{aV({element:f,feedbackElement:h,placeholder:W,translate:Me,moved:Ue,transition:k,alignment:c.alignment,styles:_,animation:je??void 0,getElementMutationObserver:()=>Q,cleanup:dt,restoreFocus:nt})})}});return()=>{dt(),Nt()}};Qt(Ga,4,"overlay",Bw,Ua,Kh);So(Ga,Ua);Ua.configure=gh(Ua);var _f=Ua,qs=!0,iV=!1,Hw,Gw,Uw,Yw,vr,Zh,qh;Yw=(Uw=[Re],ln.Forward),Gw=(Hw=[Re],ln.Reverse);var Ya=class{constructor(){qe(this,Zh,et(vr,8,this,qs)),et(vr,11,this),qe(this,qh,et(vr,12,this,qs)),et(vr,15,this)}isLocked(e){return e===ln.Idle?!1:e==null?this[ln.Forward]===qs&&this[ln.Reverse]===qs:this[e]===qs}unlock(e){e!==ln.Idle&&(this[e]=iV)}};vr=$s(null);Zh=new WeakMap;qh=new WeakMap;Qt(vr,4,Yw,Uw,Ya,Zh);Qt(vr,4,Gw,Hw,Ya,qh);So(vr,Ya);var lV=[ln.Forward,ln.Reverse],X1=class{constructor(){this.x=new Ya,this.y=new Ya}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},cV=class extends Ct{constructor(e){super(e);const t=mi(new X1);let n=null;this.signal=t,Ht(()=>{const{status:r}=e.dragOperation;if(!r.initialized){n=null,t.value=new X1;return}const{delta:o}=e.dragOperation.position;if(n){const s={x:J1(o.x,n.x),y:J1(o.y,n.y)},a=t.peek();Je(()=>{for(const l of w4)for(const c of lV)s[l]===c&&a[l].unlock(c);t.value=a})}n=o})}get current(){return this.signal.peek()}};function J1(e,t){return Math.sign(e-t)}var Kw,jf,Ka,Xh,gr,kf,Ci=class extends(jf=yi,Kw=[Re],jf){constructor(e){super(e),qe(this,Xh,et(Ka,8,this,!1)),et(Ka,11,this),qe(this,gr),qe(this,kf,()=>{if(!ze(this,gr))return;const{element:s,by:a}=ze(this,gr);a.y&&(s.scrollTop+=a.y),a.x&&(s.scrollLeft+=a.x)}),this.scroll=s=>{var a;if(this.disabled)return!1;const l=this.getScrollableElements();if(!l)return Rt(this,gr,void 0),!1;const{position:c}=this.manager.dragOperation,u=c?.current;if(u){const{by:f}=s??{},d=f?{x:Q1(f.x),y:Q1(f.y)}:void 0,p=d?void 0:this.scrollIntentTracker.current;if(p?.isLocked())return!1;for(const h of l){const m=r$(h,f);if(m.x||m.y){const{speed:x,direction:v}=g$(h,u,d);if(p)for(const y of w4)p[y].isLocked(v[y])&&(x[y]=0,v[y]=0);if(v.x||v.y){const{x:y,y:b}=f??v,S=y*x.x,w=b*x.y;if(S||w){const E=(a=ze(this,gr))==null?void 0:a.by;if(this.autoScrolling&&E&&(E.x&&!S||E.y&&!w))continue;return Rt(this,gr,{element:h,by:{x:S,y:w}}),Jl.schedule(ze(this,kf)),!0}}}}}return Rt(this,gr,void 0),!1};let t=null,n=null;const r=Fa(()=>{const{position:s,source:a}=e.dragOperation;if(!s)return null;const l=mw(Zl(a?.element),s.current);return l&&(t=l),l??t}),o=Fa(()=>{const s=r.value,{documentElement:a}=Co(s);if(!s||s===a){const{target:l}=e.dragOperation,c=l?.element;if(c){const u=yf(c,{excludeElement:!1});return n=u,u}}if(s){const l=yf(s,{excludeElement:!1});return this.autoScrolling&&n&&l.size<n?.size?n:(n=l,l)}return n=null,null},Cr);this.getScrollableElements=()=>o.value,this.scrollIntentTracker=new cV(e),this.destroy=e.monitor.addEventListener("dragmove",s=>{this.disabled||s.defaultPrevented||!Wa(e.dragOperation.activatorEvent)||!s.by||this.scroll({by:s.by})&&s.preventDefault()})}};Ka=$s(jf);Xh=new WeakMap;gr=new WeakMap;kf=new WeakMap;Qt(Ka,4,"autoScrolling",Kw,Ci,Xh);So(Ka,Ci);function Q1(e){return e>0?ln.Forward:e<0?ln.Reverse:ln.Idle}var uV=class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{const{tasks:t,resolvers:n}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(const r of t)r();for(const r of n)r()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(t=>this.resolvers.add(t))}},dV=new uV(e=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(e):e()}),fV=10,Zw=class extends Ct{constructor(e,t){super(e);const n=e.registry.plugins.get(Ci);if(!n)throw new Error("AutoScroller plugin depends on Scroller plugin");this.destroy=Ht(()=>{if(this.disabled)return;const{position:r,status:o}=e.dragOperation;if(o.dragging)if(n.scroll()){n.autoScrolling=!0;const a=setInterval(()=>dV.schedule(n.scroll),fV);return()=>{clearInterval(a)}}else n.autoScrolling=!1})}},e0={capture:!0,passive:!0},pa,pV=class extends yi{constructor(e){super(e),qe(this,pa),this.handleScroll=()=>{ze(this,pa)==null&&Rt(this,pa,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),Rt(this,pa,void 0)},50))};const{dragOperation:t}=this.manager;this.destroy=Ht(()=>{var n,r,o;if(t.status.dragging){const a=(o=(r=(n=t.source)==null?void 0:n.element)==null?void 0:r.ownerDocument)!=null?o:document;return a.addEventListener("scroll",this.handleScroll,e0),()=>{a.removeEventListener("scroll",this.handleScroll,e0)}}})}};pa=new WeakMap;var hV=class extends Ct{constructor(e,t){super(e,t),this.manager=e,this.destroy=Ht(()=>{var n;const{dragOperation:r}=this.manager,{nonce:o}=(n=this.options)!=null?n:{};if(r.status.initialized){const s=document.createElement("style");return o&&s.setAttribute("nonce",o),s.textContent="* { user-select: none !important; -webkit-user-select: none !important; }",document.head.appendChild(s),td(),document.addEventListener("selectionchange",td,{capture:!0}),()=>{document.removeEventListener("selectionchange",td,{capture:!0}),s.remove()}}})}};function td(){var e;(e=document.getSelection())==null||e.removeAllRanges()}var ha=Object.freeze({offset:10,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter","Tab"],up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]},preventActivation(e,t){var n;const r=(n=t.handle)!=null?n:t.element;return e.target!==r}}),Ko,rc=class extends ps{constructor(t,n){super(t),this.manager=t,this.options=n,qe(this,Ko,[]),this.listeners=new xw,this.handleSourceKeyDown=(r,o,s)=>{if(this.disabled||r.defaultPrevented||!fo(r.target)||o.disabled)return;const{keyboardCodes:a=ha.keyboardCodes,preventActivation:l=ha.preventActivation}=s??{};a.start.includes(r.code)&&this.manager.dragOperation.status.idle&&(l?.(r,o)||this.handleStart(r,o,s))}}bind(t,n=this.options){return Ht(()=>{var o;const s=(o=t.handle)!=null?o:t.element,a=l=>{Wa(l)&&this.handleSourceKeyDown(l,t,n)};if(s)return s.addEventListener("keydown",a),()=>{s.removeEventListener("keydown",a)}})}handleStart(t,n,r){const{element:o}=n;if(!o)throw new Error("Source draggable does not have an associated element");t.preventDefault(),t.stopImmediatePropagation(),Ew(o);const{center:s}=new wn(o);if(this.manager.actions.start({event:t,coordinates:{x:s.x,y:s.y},source:n}).signal.aborted)return this.cleanup();this.sideEffects();const l=Co(o),c=[this.listeners.bind(l,[{type:"keydown",listener:u=>this.handleKeyDown(u,n,r),options:{capture:!0}}])];ze(this,Ko).push(...c)}handleKeyDown(t,n,r){const{keyboardCodes:o=ha.keyboardCodes}=r??{};if(Lo(t,[...o.end,...o.cancel])){t.preventDefault();const s=Lo(t,o.cancel);this.handleEnd(t,s);return}Lo(t,o.up)?this.handleMove("up",t):Lo(t,o.down)&&this.handleMove("down",t),Lo(t,o.left)?this.handleMove("left",t):Lo(t,o.right)&&this.handleMove("right",t)}handleEnd(t,n){this.manager.actions.stop({event:t,canceled:n}),this.cleanup()}handleMove(t,n){var r,o;const{shape:s}=this.manager.dragOperation,a=n.shiftKey?5:1;let l={x:0,y:0},c=(o=(r=this.options)==null?void 0:r.offset)!=null?o:ha.offset;if(typeof c=="number"&&(c={x:c,y:c}),!!s){switch(t){case"up":l={x:0,y:-c.y*a};break;case"down":l={x:0,y:c.y*a};break;case"left":l={x:-c.x*a,y:0};break;case"right":l={x:c.x*a,y:0};break}(l.x||l.y)&&(n.preventDefault(),this.manager.actions.move({event:n,by:l}))}}sideEffects(){const t=this.manager.registry.plugins.get(Zw);t?.disabled===!1&&(t.disable(),ze(this,Ko).push(()=>{t.enable()}))}cleanup(){ze(this,Ko).forEach(t=>t()),Rt(this,Ko,[])}destroy(){this.cleanup(),this.listeners.clear()}};Ko=new WeakMap;rc.configure=gh(rc);rc.defaults=ha;var gV=rc;function Lo(e,t){return t.includes(e.code)}var qr,mV=class extends ew{constructor(){super(...arguments),qe(this,qr)}onEvent(e){switch(e.type){case"pointerdown":Rt(this,qr,hs(e));break;case"pointermove":if(!ze(this,qr))return;const{x:t,y:n}=hs(e),r={x:t-ze(this,qr).x,y:n-ze(this,qr).y},{tolerance:o}=this.options;if(o&&df(r,o)){this.abort();return}df(r,this.options.value)&&this.activate(e);break;case"pointerup":this.abort();break}}abort(){Rt(this,qr,void 0)}};qr=new WeakMap;var Zo,Xr,xV=class extends ew{constructor(){super(...arguments),qe(this,Zo),qe(this,Xr)}onEvent(e){switch(e.type){case"pointerdown":Rt(this,Xr,hs(e)),Rt(this,Zo,setTimeout(()=>this.activate(e),this.options.value));break;case"pointermove":if(!ze(this,Xr))return;const{x:t,y:n}=hs(e),r={x:t-ze(this,Xr).x,y:n-ze(this,Xr).y};df(r,this.options.tolerance)&&this.abort();break;case"pointerup":this.abort();break}}abort(){ze(this,Zo)&&(clearTimeout(ze(this,Zo)),Rt(this,Xr,void 0),Rt(this,Zo,void 0))}};Zo=new WeakMap;Xr=new WeakMap;var Jo=class{};Jo.Delay=xV;Jo.Distance=mV;var Rf=Object.freeze({activationConstraints(e,t){var n;const{pointerType:r,target:o}=e;if(!(r==="mouse"&&fo(o)&&(t.handle===o||(n=t.handle)!=null&&n.contains(o))))return r==="touch"?[new Jo.Delay({value:250,tolerance:5})]:_$(o)&&!e.defaultPrevented?[new Jo.Delay({value:200,tolerance:0})]:[new Jo.Delay({value:200,tolerance:10}),new Jo.Distance({value:5})]},preventActivation(e,t){var n;const{target:r}=e;return r===t.element||r===t.handle||!fo(r)||(n=t.handle)!=null&&n.contains(r)?!1:UF(r)}}),qo,oc=class extends ps{constructor(t,n){super(t),this.manager=t,this.options=n,qe(this,qo,new Set),this.listeners=new xw,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{const{event:r,coordinates:o}=this.latest;!r||!o||this.manager.actions.move({event:r,to:o})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(t,n,r=this.options){const{activationConstraints:o=Rf.activationConstraints}=r??{};return typeof o=="function"?o(t,n):o}bind(t,n=this.options){return Ht(()=>{var o;const s=new AbortController,{signal:a}=s,l=u=>{N$(u)&&this.handlePointerDown(u,t,n)};let c=[(o=t.handle)!=null?o:t.element];n?.activatorElements&&(Array.isArray(n.activatorElements)?c=n.activatorElements:c=n.activatorElements(t));for(const u of c)u&&(wV(u.ownerDocument.defaultView),u.addEventListener("pointerdown",l,{signal:a}));return()=>s.abort()})}handlePointerDown(t,n,r){if(this.disabled||!t.isPrimary||t.button!==0||!fo(t.target)||n.disabled||yV(t)||!this.manager.dragOperation.status.idle)return;const{preventActivation:o=Rf.preventActivation}=r??{};if(o?.(t,n))return;const{target:s}=t,a=uo(s)&&s.draggable&&s.getAttribute("draggable")==="true",l=ms(n.element),{x:c,y:u}=hs(t);this.initialCoordinates={x:c*l.scaleX+l.x,y:u*l.scaleY+l.y};const f=this.activationConstraints(t,n,r);t.sensor=this;const d=new IF(f,x=>this.handleStart(n,x));d.signal.onabort=()=>this.handleCancel(t),d.onEvent(t),this.controller=d;const p=gf(),h=this.listeners.bind(p,[{type:"pointermove",listener:x=>this.handlePointerMove(x,n)},{type:"pointerup",listener:this.handlePointerUp,options:{capture:!0}},{type:"pointercancel",listener:this.handleCancel},{type:"dragstart",listener:a?this.handleCancel:Xi,options:{capture:!0}}]),m=()=>{h(),this.initialCoordinates=void 0};ze(this,qo).add(m)}handlePointerMove(t,n){var r,o;if(((r=this.controller)==null?void 0:r.activated)===!1){(o=this.controller)==null||o.onEvent(t);return}if(this.manager.dragOperation.status.dragging){const s=hs(t),a=ms(n.element);s.x=s.x*a.scaleX+a.x,s.y=s.y*a.scaleY+a.y,t.preventDefault(),t.stopPropagation(),this.latest.event=t,this.latest.coordinates=s,Jl.schedule(this.handleMove)}}handlePointerUp(t){const{status:n}=this.manager.dragOperation;if(!n.idle){t.preventDefault(),t.stopPropagation();const r=!n.initialized;this.manager.actions.stop({event:t,canceled:r})}this.cleanup()}handleKeyDown(t){t.key==="Escape"&&(t.preventDefault(),this.handleCancel(t))}handleStart(t,n){const{manager:r,initialCoordinates:o}=this;if(!o||!r.dragOperation.status.idle||n.defaultPrevented)return;if(r.actions.start({coordinates:o,event:n,source:t}).signal.aborted)return this.cleanup();n.preventDefault();const l=Co(n.target).body;l.setPointerCapture(n.pointerId);const c=fo(n.target)?[n.target,l]:l,u=this.listeners.bind(c,[{type:"touchmove",listener:Xi,options:{passive:!1}},{type:"click",listener:Xi},{type:"contextmenu",listener:Xi},{type:"keydown",listener:this.handleKeyDown}]);ze(this,qo).add(u)}handleCancel(t){const{dragOperation:n}=this.manager;n.status.initialized&&this.manager.actions.stop({event:t,canceled:!0}),this.cleanup()}cleanup(){this.latest={event:void 0,coordinates:void 0},ze(this,qo).forEach(t=>t()),ze(this,qo).clear()}destroy(){this.cleanup(),this.listeners.clear()}};qo=new WeakMap;oc.configure=gh(oc);oc.defaults=Rf;var vV=oc;function yV(e){return"sensor"in e}function Xi(e){e.preventDefault()}function bV(){}var t0=new WeakSet;function wV(e){!e||t0.has(e)||(e.addEventListener("touchmove",bV,{capture:!1,passive:!1}),t0.add(e))}var rs={modifiers:[],plugins:[G$,Zw,Y$,_f,hV],sensors:[vV,gV]},qw=class extends VF{constructor(e={}){const t=Qn(e.plugins,rs.plugins),n=Qn(e.sensors,rs.sensors),r=Qn(e.modifiers,rs.modifiers);super(Gh(Ha({},e),{plugins:[pV,Ci,Eo,...t],sensors:n,modifiers:r}))}},Xw,Jw,Qw,Mf,vn,Jh,Qh,eg,Si=class extends(Mf=Fn,Qw=[Re],Jw=[Re],Xw=[Re],Mf){constructor(e,t){var n=e,{element:r,effects:o=()=>[],handle:s,feedback:a="default"}=n,l=Mw(n,["element","effects","handle","feedback"]);super(Ha({effects:()=>[...o(),()=>{var c,u;const{manager:f}=this;if(!f)return;const p=((u=(c=this.sensors)==null?void 0:c.map(mh))!=null?u:[...f.sensors]).map(h=>{const m=h instanceof ps?h:f.registry.register(h.plugin),x=h instanceof ps?void 0:h.options;return m.bind(this,x)});return function(){p.forEach(m=>m())}}]},l),t),qe(this,Jh,et(vn,8,this)),et(vn,11,this),qe(this,Qh,et(vn,12,this)),et(vn,15,this),qe(this,eg,et(vn,16,this)),et(vn,19,this),this.element=r,this.handle=s,this.feedback=a}};vn=$s(Mf);Jh=new WeakMap;Qh=new WeakMap;eg=new WeakMap;Qt(vn,4,"handle",Qw,Si,Jh);Qt(vn,4,"element",Jw,Si,Qh);Qt(vn,4,"feedback",Xw,Si,eg);So(vn,Si);var e6,t6,Df,yr,tg,nd,n6,r6,_a,ng,lu=class extends(Df=$n,t6=[Re],e6=[Re],Df){constructor(e,t){var n=e,{element:r,effects:o=()=>[]}=n,s=Mw(n,["element","effects"]);const{collisionDetector:a=_w}=s,l=u=>{const{manager:f,element:d}=this;if(!d||u===null){this.shape=void 0;return}if(!f)return;const p=new wn(d),h=Le(()=>this.shape);return p&&h?.equals(p)?h:(this.shape=p,p)},c=mi(!1);super(Gh(Ha({},s),{collisionDetector:a,effects:()=>[...o(),()=>{const{element:u,manager:f}=this;if(!f)return;const{dragOperation:d}=f,{source:p}=d;c.value=!!(p&&d.status.initialized&&u&&!this.disabled&&this.accepts(p))},()=>{const{element:u}=this;if(c.value&&u){const f=new n$(u,l);return()=>{f.disconnect(),this.shape=void 0}}},()=>{var u;if((u=this.manager)!=null&&u.dragOperation.status.initialized)return()=>{this.shape=void 0}}]}),t),qe(this,_a),qe(this,tg,et(yr,8,this)),et(yr,11,this),qe(this,ng,et(yr,12,this)),et(yr,15,this),this.element=r,this.refreshShape=()=>l()}set element(e){Rt(this,_a,e,r6)}get element(){var e;return(e=this.proxy)!=null?e:ze(this,_a,n6)}};yr=$s(Df);tg=new WeakMap;_a=new WeakSet;ng=new WeakMap;nd=Qt(yr,20,"#element",t6,_a,tg),n6=nd.get,r6=nd.set;Qt(yr,4,"proxy",e6,lu,ng);So(yr,lu);function CV(e){return e!=null&&typeof e=="object"&&"current"in e}function os(e){var t;if(e!=null)return CV(e)?(t=e.current)!=null?t:void 0:e}var SV=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",No=SV?C.useLayoutEffect:C.useEffect;function o6(){const e=C.useState(0)[1];return C.useCallback(()=>{e(t=>t+1)},[e])}function EV(e,t=!1){const n=C.useRef(e.peek()),r=C.useRef(!1),o=o6();return No(()=>Ht(()=>{const s=n.current,a=e.value;if(s!==a){if(n.current=a,!r.current)return;t?ho.flushSync(o):o()}}),[e,t,o]),{get value(){return r.current=!0,e.peek()}}}function NV(e,t=[],n=!1){const r=C.useRef(e);return r.current=e,EV(C.useMemo(()=>Fa(()=>r.current()),t),n)}function rg(e,t){const n=C.useRef(new Map),r=o6();return No(()=>{if(!e){n.current.clear();return}return Ht(()=>{var o;let s=!1,a=!1;for(const l of n.current){const[c]=l,u=Le(()=>l[1]),f=e[c];u!==f&&(s=!0,n.current.set(c,f),a=(o=t?.(c,u,f))!=null?o:!1)}s&&(a?ho.flushSync(r):r())})},[e]),C.useMemo(()=>e&&new Proxy(e,{get(o,s){const a=o[s];return n.current.set(s,a),a}}),[e])}function _V(e,t){e()}function Io(e){const t=C.useRef(e);return No(()=>{t.current=e},[e]),t}function Ye(e,t,n=C.useEffect,r=Object.is){const o=C.useRef(e);n(()=>{const s=o.current;r(e,s)||(o.current=e,t(e,s))},[t,e])}function bl(e,t){const n=C.useRef(os(e));No(()=>{const r=os(e);r!==n.current&&(n.current=r,t(r))})}var jV=Object.defineProperty,kV=Object.defineProperties,RV=Object.getOwnPropertyDescriptors,sc=Object.getOwnPropertySymbols,s6=Object.prototype.hasOwnProperty,a6=Object.prototype.propertyIsEnumerable,n0=(e,t,n)=>t in e?jV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,MV=(e,t)=>{for(var n in t||(t={}))s6.call(t,n)&&n0(e,n,t[n]);if(sc)for(var n of sc(t))a6.call(t,n)&&n0(e,n,t[n]);return e},DV=(e,t)=>kV(e,RV(t)),AV=(e,t)=>{var n={};for(var r in e)s6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&sc)for(var r of sc(e))t.indexOf(r)<0&&a6.call(e,r)&&(n[r]=e[r]);return n},TV=new qw,og=C.createContext(TV),PV=C.memo(C.forwardRef(({children:e},t)=>{const[n,r]=C.useState(0),o=C.useRef(null),s=C.useRef(null),a=C.useMemo(()=>({renderer:{get rendering(){var l;return(l=o.current)!=null?l:Promise.resolve()}},trackRendering(l){o.current||(o.current=new Promise(c=>{s.current=c})),C.startTransition(()=>{l(),r(c=>c+1)})}}),[]);return No(()=>{var l;(l=s.current)==null||l.call(s),o.current=null},[e,n]),C.useImperativeHandle(t,()=>a),null})),rd=[void 0,Cr];function i6(e){var t=e,{children:n,onCollision:r,onBeforeDragStart:o,onDragStart:s,onDragMove:a,onDragOver:l,onDragEnd:c}=t,u=AV(t,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);const f=C.useRef(null),{plugins:d,modifiers:p,sensors:h}=u,m=Qn(d,rs.plugins),x=Qn(h,rs.sensors),v=Qn(p,rs.modifiers),y=Io(o),b=Io(s),S=Io(l),w=Io(a),E=Io(c),N=Io(r),_=OV(()=>{var k;return(k=u.manager)!=null?k:new qw(u)});return C.useEffect(()=>{if(!f.current)throw new Error("Renderer not found");const{renderer:k,trackRendering:I}=f.current,{monitor:F}=_;_.renderer=k;const U=[F.addEventListener("beforedragstart",O=>{const R=y.current;R&&I(()=>R(O,_))}),F.addEventListener("dragstart",O=>{var R;return(R=b.current)==null?void 0:R.call(b,O,_)}),F.addEventListener("dragover",O=>{const R=S.current;R&&I(()=>R(O,_))}),F.addEventListener("dragmove",O=>{const R=w.current;R&&I(()=>R(O,_))}),F.addEventListener("dragend",O=>{const R=E.current;R&&I(()=>R(O,_))}),F.addEventListener("collision",O=>{var R;return(R=N.current)==null?void 0:R.call(N,O,_)})];return()=>U.forEach(O=>O())},[_]),Ye(m,()=>_&&(_.plugins=m),...rd),Ye(x,()=>_&&(_.sensors=x),...rd),Ye(v,()=>_&&(_.modifiers=v),...rd),i.jsxs(og.Provider,{value:_,children:[i.jsx(PV,{ref:f,children:n}),n]})}function OV(e){const t=C.useRef(null);return t.current||(t.current=e()),C.useInsertionEffect(()=>()=>{var n;return(n=t.current)==null?void 0:n.destroy()},[]),t.current}function l6(){return C.useContext(og)}function c6(e){var t;const n=(t=l6())!=null?t:void 0,[r]=C.useState(()=>e(n));return r.manager!==n&&(r.manager=n),No(r.register,[n,r]),r}function LV({children:e,className:t,dropAnimation:n,style:r,tag:o,disabled:s}){var a;const l=C.useRef(null),c=l6(),u=(a=NV(()=>c?.dragOperation.source,[c]).value)!=null?a:null,f=typeof s=="function"?s(u):s;C.useEffect(()=>{if(!l.current||!c||f)return;const h=c.plugins.find(m=>m instanceof _f);if(h)return h.overlay=l.current,()=>{h.overlay=void 0}},[c,f]),C.useEffect(()=>{if(!c)return;const h=c.plugins.find(m=>m instanceof _f);if(h)return h.dropAnimation=n,()=>{h.dropAnimation=void 0}},[c,n]);const d=C.useMemo(()=>{if(!c)return null;const h=new Proxy(c.registry,{get(m,x){return x==="register"||x==="unregister"?IV:m[x]}});return new Proxy(c,{get(m,x){return x==="registry"?h:m[x]}})},[c]);return i.jsx(og.Provider,{value:d,children:C.createElement(o||"div",{ref:l,className:t,style:r,"data-dnd-overlay":!0},p())});function p(){return!u||f?null:typeof e=="function"?i.jsx(FV,{source:u,children:e}):e}}function IV(){return()=>{}}function FV({children:e,source:t}){return e(rg(t))}var $V=Object.create,u6=Object.defineProperty,VV=Object.getOwnPropertyDescriptor,d6=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),cu=e=>{throw TypeError(e)},BV=(e,t,n)=>t in e?u6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zV=e=>{var t;return[,,,$V((t=e?.[d6("metadata")])!=null?t:null)]},f6=["class","method","getter","setter","accessor","field","value","get","set"],p6=e=>e!==void 0&&typeof e!="function"?cu("Function expected"):e,WV=(e,t,n,r,o)=>({kind:f6[e],name:t,metadata:r,addInitializer:s=>n._?cu("Already initialized"):o.push(p6(s||null))}),HV=(e,t)=>BV(t,d6("metadata"),e[3]),GV=(e,t,n,r)=>{for(var o=0,s=e[t>>1],a=s&&s.length;o<a;o++)s[o].call(n);return r},h6=(e,t,n,r,o,s)=>{for(var a,l,c,u,f=t&7,d=!1,p=!1,h=2,m=f6[f+5],x=e[h]||(e[h]=[]),v=(o=o.prototype,VV(o,n)),y=r.length-1;y>=0;y--)c=WV(f,n,l={},e[3],x),c.static=d,c.private=p,u=c.access={has:b=>n in b},u.get=b=>b[n],a=(0,r[y])(v[m],c),l._=1,p6(a)&&(v[m]=a);return v&&u6(o,n,v),o},g6=(e,t,n)=>t.has(e)||cu("Cannot "+n),UV=(e,t,n)=>(g6(e,t,"read from private field"),t.get(e)),YV=(e,t,n)=>t.has(e)?cu("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),KV=(e,t,n,r)=>(g6(e,t,"write to private field"),t.set(e,n),n),Qr=class Af{constructor(t,n){this.x=t,this.y=n}static delta(t,n){return new Af(t.x-n.x,t.y-n.y)}static distance(t,n){return Math.hypot(t.x-n.x,t.y-n.y)}static equals(t,n){return t.x===n.x&&t.y===n.y}static from({x:t,y:n}){return new Af(t,n)}},m6,x6,Tf,wl,Ei,sg=class extends(Tf=bo,x6=[Qe],m6=[Qe],Tf){constructor(e){const t=Qr.from(e);super(t,(n,r)=>Qr.equals(n,r)),GV(Ei,5,this),YV(this,wl,0),this.velocity={x:0,y:0}}get delta(){return Qr.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const n={x:e.x-t.x,y:e.y-t.y};return!n.x&&!n.y?null:Math.abs(n.x)>Math.abs(n.y)?n.x>0?"right":"left":n.y>0?"down":"up"}get current(){return super.current}set current(e){const{current:t}=this,n=Qr.from(e),r={x:n.x-t.x,y:n.y-t.y},o=Date.now(),s=o-UV(this,wl),a=l=>Math.round(l/s*100);Je(()=>{KV(this,wl,o),this.velocity={x:a(r.x),y:a(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(Qr.from(e)),this.velocity={x:0,y:0}}};Ei=zV(Tf);wl=new WeakMap;h6(Ei,2,"delta",x6,sg);h6(Ei,2,"direction",m6,sg);HV(Ei,sg);var v6=(e=>(e.Horizontal="x",e.Vertical="y",e))(v6||{});Object.values(v6);var ZV=({dragOperation:e,droppable:t})=>{const n=e.position.current;if(!n)return null;const{id:r}=t;if(!t.shape)return null;if(t.shape.containsPoint(n)){const o=Qr.distance(t.shape.center,n);return{id:r,value:1/o,type:Is.PointerIntersection,priority:Ls.High}}return null},qV=({dragOperation:e,droppable:t})=>{const{shape:n}=e;if(!t.shape||!n?.current)return null;const r=n.current.intersectionArea(t.shape);if(r){const{position:o}=e,s=Qr.distance(t.shape.center,o.current),l=r/(n.current.area+t.shape.area-r)/s;return{id:t.id,value:l,type:Is.ShapeIntersection,priority:Ls.Normal}}return null},XV=e=>{var t;return(t=ZV(e))!=null?t:qV(e)};function JV(e){const{collisionDetector:t,data:n,disabled:r,element:o,id:s,accept:a,type:l}=e,c=c6(f=>new lu(DV(MV({},e),{register:!1,element:os(o)}),f)),u=rg(c);return Ye(s,()=>c.id=s),bl(o,f=>c.element=f),Ye(a,()=>c.accept=a,void 0,Cr),Ye(t,()=>c.collisionDetector=t??XV),Ye(n,()=>n&&(c.data=n)),Ye(r,()=>c.disabled=r===!0),Ye(l,()=>c.type=l),{droppable:u,get isDropTarget(){return u.isDropTarget},ref:C.useCallback(f=>{var d,p;!f&&((d=c.element)!=null&&d.isConnected)&&!((p=c.manager)!=null&&p.dragOperation.status.idle)||(c.element=f??void 0)},[c])}}var QV=Object.defineProperty,eB=Object.defineProperties,tB=Object.getOwnPropertyDescriptors,r0=Object.getOwnPropertySymbols,nB=Object.prototype.hasOwnProperty,rB=Object.prototype.propertyIsEnumerable,o0=(e,t,n)=>t in e?QV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fo=(e,t)=>{for(var n in t||(t={}))nB.call(t,n)&&o0(e,n,t[n]);if(r0)for(var n of r0(t))rB.call(t,n)&&o0(e,n,t[n]);return e},$o=(e,t)=>eB(e,tB(t));function oB(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function od(e){return"initialIndex"in e&&typeof e.initialIndex=="number"&&"index"in e&&typeof e.index=="number"}function sB(e,t,n){var r,o,s;const{source:a,target:l,canceled:c}=t.operation;if(!a||!l||c)return"preventDefault"in t&&t.preventDefault(),e;const u=(w,E)=>w===E||typeof w=="object"&&"id"in w&&w.id===E;if(Array.isArray(e)){const w=e.findIndex(N=>u(N,a.id)),E=e.findIndex(N=>u(N,l.id));if(w===-1||E===-1){if(od(a)){const N=a.initialIndex,_=a.index;return N===_||N<0||N>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,N,_)}return e}if(!c&&"index"in a&&typeof a.index=="number"){const N=a.index;if(N!==w)return n(e,w,N)}return n(e,w,E)}const f=Object.entries(e);let d=-1,p,h=-1,m;for(const[w,E]of f)if(d===-1&&(d=E.findIndex(N=>u(N,a.id)),d!==-1&&(p=w)),h===-1&&(h=E.findIndex(N=>u(N,l.id)),h!==-1&&(m=w)),d!==-1&&h!==-1)break;if(d===-1&&od(a)){const w=a.initialGroup,E=a.initialIndex,N=a.group,_=a.index;if(w==null||N==null||!(w in e)||!(N in e)||w===N&&E===_)return"preventDefault"in t&&t.preventDefault(),e;if(w===N)return $o(Fo({},e),{[w]:n(e[w],E,_)});const k=e[w][E];return $o(Fo({},e),{[w]:[...e[w].slice(0,E),...e[w].slice(E+1)],[N]:[...e[N].slice(0,_),k,...e[N].slice(_)]})}if(!a.manager)return e;const{dragOperation:x}=a.manager,v=(o=(r=x.shape)==null?void 0:r.current.center)!=null?o:x.position.current;if(m==null&&l.id in e){const w=l.shape&&v.y>l.shape.center.y?e[l.id].length:0;m=l.id,h=w}if(p==null||m==null||p===m&&d===h){if(p!=null&&p===m&&d===h&&od(a)){const w=a.group!=null&&a.group!==p,E=a.index!==d;if(w||E){const N=(s=a.group)!=null?s:p;if(N in e){if(p===N)return $o(Fo({},e),{[p]:n(e[p],d,a.index)});const _=e[p][d];return $o(Fo({},e),{[p]:[...e[p].slice(0,d),...e[p].slice(d+1)],[N]:[...e[N].slice(0,a.index),_,...e[N].slice(a.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(p===m)return $o(Fo({},e),{[p]:n(e[p],d,h)});const b=l.shape&&Math.round(v.y)>Math.round(l.shape.center.y)?1:0,S=e[p][d];return $o(Fo({},e),{[p]:[...e[p].slice(0,d),...e[p].slice(d+1)],[m]:[...e[m].slice(0,h+b),S,...e[m].slice(h+b)]})}function y6(e,t){return sB(e,t,oB)}const uu={ascending:"Ascending",descending:"Descending",clearSorting:"Clear sorting",pinToLeft:"Pin to the left",pinToRight:"Pin to the right",unpin:"Unpin",hide:"Hide",lastColumn:"(Last column)",manageColumns:"Manage columns",hideAll:"Hide all",showAll:"Show all",searchColumns:"Search columns...",noColumnsFound:"No columns found",noResults:"No results",noDataAvailable:"No data available",sortAscending:"Sort ascending",sortDescending:"Sort descending",pinnedColumn:"Pinned column",menu:"Menu",actions:"Actions",selectAll:"Select all",selectRow:"Select row",expandRow:"Row {{row}} details"},b6={en:uu,es:{ascending:"Ascendente",descending:"Descendente",clearSorting:"Quitar orden",pinToLeft:"Fijar a la izquierda",pinToRight:"Fijar a la derecha",unpin:"Desfijar",hide:"Ocultar",lastColumn:"(Última columna)",manageColumns:"Gestionar columnas",hideAll:"Ocultar todo",showAll:"Mostrar todo",searchColumns:"Buscar columnas...",noColumnsFound:"No se encontraron columnas",noResults:"Sin resultados",noDataAvailable:"No hay datos disponibles",sortAscending:"Ordenar ascendente",sortDescending:"Ordenar descendente",pinnedColumn:"Columna fijada",menu:"Menú",actions:"Acciones",selectAll:"Seleccionar todo",selectRow:"Seleccionar fila",expandRow:"Detalle de la fila {{row}}"},ja:{ascending:"昇順",descending:"降順",clearSorting:"並び替えを解除",pinToLeft:"左に固定",pinToRight:"右に固定",unpin:"固定解除",hide:"非表示",lastColumn:"(最後の列)",manageColumns:"列の管理",hideAll:"すべて非表示",showAll:"すべて表示",searchColumns:"列を検索...",noColumnsFound:"列が見つかりません",noResults:"結果なし",noDataAvailable:"データがありません",sortAscending:"昇順で並び替え",sortDescending:"降順で並び替え",pinnedColumn:"固定された列",menu:"メニュー",actions:"アクション",selectAll:"すべて選択",selectRow:"行を選択",expandRow:"{{row}} 行目の詳細"},ar:{ascending:"تصاعدي",descending:"تنازلي",clearSorting:"مسح الترتيب",pinToLeft:"تثبيت لليسار",pinToRight:"تثبيت لليمين",unpin:"إلغاء التثبيت",hide:"إخفاء",lastColumn:"(آخر عمود)",manageColumns:"إدارة الأعمدة",hideAll:"إخفاء الكل",showAll:"إظهار الكل",searchColumns:"البحث في الأعمدة...",noColumnsFound:"لم يتم العثور على أعمدة",noResults:"لا توجد نتائج",noDataAvailable:"لا توجد بيانات",sortAscending:"ترتيب تصاعدي",sortDescending:"ترتيب تنازلي",pinnedColumn:"عمود مثبت",menu:"القائمة",actions:"الإجراءات",selectAll:"تحديد الكل",selectRow:"تحديد الصف",expandRow:"تفاصيل الصف {{row}}"},fr:{ascending:"Croissant",descending:"Décroissant",clearSorting:"Effacer le tri",pinToLeft:"Épingler à gauche",pinToRight:"Épingler à droite",unpin:"Désépingler",hide:"Masquer",lastColumn:"(Dernière colonne)",manageColumns:"Gérer les colonnes",hideAll:"Tout masquer",showAll:"Tout afficher",searchColumns:"Rechercher des colonnes...",noColumnsFound:"Aucune colonne trouvée",noResults:"Aucun résultat",noDataAvailable:"Aucune donnée disponible",sortAscending:"Trier par ordre croissant",sortDescending:"Trier par ordre décroissant",pinnedColumn:"Colonne épinglée",menu:"Menu",actions:"Actions",selectAll:"Tout sélectionner",selectRow:"Sélectionner la ligne",expandRow:"Détails de la ligne {{row}}"},pt:{ascending:"Crescente",descending:"Decrescente",clearSorting:"Limpar ordenação",pinToLeft:"Fixar à esquerda",pinToRight:"Fixar à direita",unpin:"Desfixar",hide:"Ocultar",lastColumn:"(Última coluna)",manageColumns:"Gerenciar colunas",hideAll:"Ocultar tudo",showAll:"Mostrar tudo",searchColumns:"Pesquisar colunas...",noColumnsFound:"Nenhuma coluna encontrada",noResults:"Sem resultados",noDataAvailable:"Nenhum dado disponível",sortAscending:"Ordenar crescente",sortDescending:"Ordenar decrescente",pinnedColumn:"Coluna fixada",menu:"Menu",actions:"Ações",selectAll:"Selecionar tudo",selectRow:"Selecionar linha",expandRow:"Detalhes da linha {{row}}"},tr:{ascending:"Artan",descending:"Azalan",clearSorting:"Sıralamayı temizle",pinToLeft:"Sola sabitle",pinToRight:"Sağa sabitle",unpin:"Sabitlemeyi kaldır",hide:"Gizle",lastColumn:"(Son sütun)",manageColumns:"Sütunları yönet",hideAll:"Tümünü gizle",showAll:"Tümünü göster",searchColumns:"Sütunları ara...",noColumnsFound:"Sütun bulunamadı",noResults:"Sonuç yok",noDataAvailable:"Veri mevcut değil",sortAscending:"Artan sırala",sortDescending:"Azalan sırala",pinnedColumn:"Sabitlenmiş sütun",menu:"Menü",actions:"Eylemler",selectAll:"Tümünü seç",selectRow:"Satır seç",expandRow:"{{row}}. satırın ayrıntıları"},ru:{ascending:"По возрастанию",descending:"По убыванию",clearSorting:"Сбросить сортировку",pinToLeft:"Закрепить слева",pinToRight:"Закрепить справа",unpin:"Открепить",hide:"Скрыть",lastColumn:"(Последняя колонка)",manageColumns:"Управление колонками",hideAll:"Скрыть все",showAll:"Показать все",searchColumns:"Поиск колонок...",noColumnsFound:"Колонки не найдены",noResults:"Нет результатов",noDataAvailable:"Данные недоступны",sortAscending:"Сортировать по возрастанию",sortDescending:"Сортировать по убыванию",pinnedColumn:"Закреплённая колонка",menu:"Меню",actions:"Действия",selectAll:"Выбрать все",selectRow:"Выбрать строку",expandRow:"Сведения о строке {{row}}"},de:{ascending:"Aufsteigend",descending:"Absteigend",clearSorting:"Sortierung löschen",pinToLeft:"Links fixieren",pinToRight:"Rechts fixieren",unpin:"Fixierung aufheben",hide:"Ausblenden",lastColumn:"(Letzte Spalte)",manageColumns:"Spalten verwalten",hideAll:"Alle ausblenden",showAll:"Alle anzeigen",searchColumns:"Spalten suchen...",noColumnsFound:"Keine Spalten gefunden",noResults:"Keine Ergebnisse",noDataAvailable:"Keine Daten verfügbar",sortAscending:"Aufsteigend sortieren",sortDescending:"Absteigend sortieren",pinnedColumn:"Fixierte Spalte",menu:"Menü",actions:"Aktionen",selectAll:"Alle auswählen",selectRow:"Zeile auswählen",expandRow:"Details der Zeile {{row}}"},zh:{ascending:"升序",descending:"降序",clearSorting:"清除排序",pinToLeft:"固定到左侧",pinToRight:"固定到右侧",unpin:"取消固定",hide:"隐藏",lastColumn:"(最后一列)",manageColumns:"管理列",hideAll:"全部隐藏",showAll:"全部显示",searchColumns:"搜索列...",noColumnsFound:"未找到列",noResults:"无结果",noDataAvailable:"无数据",sortAscending:"升序排序",sortDescending:"降序排序",pinnedColumn:"已固定列",menu:"菜单",actions:"操作",selectAll:"全选",selectRow:"选择行",expandRow:"第 {{row}} 行详情"}};function w6(e){const t=e??Za();return b6[t]??uu}function aB(e){return typeof e=="object"&&e!==null&&"title"in e&&typeof e.title=="string"}function iB(e){const{header:t}=e;return typeof t=="string"?t:aB(t)?t.title:null}function lB({columns:e,rowsCount:t=5,checkboxSelection:n=!1,actions:r,rowHeight:o}){const s=[];return n&&s.push(null),e.forEach(a=>{s.push(iB(a))}),r&&s.push("Actions"),i.jsx("div",{className:"space-y-4",children:i.jsx("div",{className:"rounded-md border",children:i.jsxs(ah,{children:[i.jsx(Ia,{children:i.jsx(In,{className:"bg-muted",children:s.map((a,l)=>i.jsx(gi,{children:a?i.jsx("div",{className:"text-xs font-medium",children:a}):i.jsx(Ln,{className:"h-4 w-4"})},l))})}),i.jsx(nu,{children:Array.from({length:t}).map((a,l)=>i.jsx(In,{style:{height:o?`${o}px`:void 0},children:s.map((c,u)=>i.jsx(fs,{children:i.jsx(Ln,{className:"h-4 w-[80px]"})},u))},l))})]})})})}function C6(e){return typeof e=="object"&&e!==null&&"title"in e&&typeof e.title=="string"}function s0(e){const t=e.columnDef.header;return typeof t=="string"?t:C6(t)?t.title:e.id}function cB(e,t,n,r){return e?{position:"sticky",insetInlineStart:e==="left"?`${t("left")}px`:void 0,insetInlineEnd:e==="right"?`${n("right")}px`:void 0,zIndex:10,backgroundColor:r}:{}}const Xs={height:"h-8",gap:"gap-1.5",roundedClass:"rounded-md",fontSize:"text-sm",fontWeight:"font-medium"},sd={width:"w-2",lineHeight:"h-5",lineWidth:"w-[1px]"},ad={size:50,minSize:50,maxSize:50},a0={size:40,labeledSize:170},id={size:50,minSize:50,maxSize:50},ag={header:"var(--muted)",body:"var(--background)"},uB=66,dB=50,fB="shadow-[-4px_0_4px_-2px_rgba(0,0,0,0.1)]";function pB(e,t,n,r){return e?{width:"auto",minWidth:0}:t?{width:"auto",minWidth:`${r}px`}:n?{width:`${r}px`,minWidth:`${r}px`,maxWidth:`${r}px`}:{width:`${r}px`}}function ig(e,t,n){const r=e.getIsPinned(),o=e.getSize(),s=e.id==="_spacer",a=e.columnDef.flex===!0&&!s,l=e.columnDef.enableResizing===!1&&!s;return{style:{...pB(s,a,l,o),...cB(r,c=>e.getStart(c),c=>e.getAfter(c),n)},className:j(t,r&&fB,l&&"data-table-fixed-column",s&&"data-table-spacer")}}function S6({onMouseDown:e,onTouchStart:t}){const n=o=>{o.stopPropagation(),e(o)},r=o=>{o.stopPropagation(),t(o)};return i.jsx("div",{onMouseDown:n,onTouchStart:r,onPointerDown:o=>o.stopPropagation(),className:`absolute right-0 top-0 h-full ${sd.width} cursor-col-resize select-none touch-none flex items-center justify-center hover:bg-neutral-100`,children:i.jsx("div",{className:`${sd.lineHeight} ${sd.lineWidth} bg-neutral-300`})})}function i0({header:e,enableColumnResizing:t}){const{style:n,className:r}=ig(e.column,t,ag.header);return i.jsxs(gi,{style:n,className:r,children:[i.jsx("div",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:e.isPlaceholder?null:La(e.column.columnDef.header,e.getContext())}),t&&e.column.getCanResize()&&i.jsx(S6,{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler()})]},e.id)}var hB=Object.create,E6=Object.defineProperty,gB=Object.defineProperties,mB=Object.getOwnPropertyDescriptor,xB=Object.getOwnPropertyDescriptors,ac=Object.getOwnPropertySymbols,N6=Object.prototype.hasOwnProperty,_6=Object.prototype.propertyIsEnumerable,vB=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Ni=e=>{throw TypeError(e)},Pf=(e,t,n)=>t in e?E6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,l0=(e,t)=>{for(var n in t||(t={}))N6.call(t,n)&&Pf(e,n,t[n]);if(ac)for(var n of ac(t))_6.call(t,n)&&Pf(e,n,t[n]);return e},c0=(e,t)=>gB(e,xB(t)),yB=(e,t)=>{var n={};for(var r in e)N6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ac)for(var r of ac(e))t.indexOf(r)<0&&_6.call(e,r)&&(n[r]=e[r]);return n},bB=e=>{var t;return[,,,hB((t=void 0)!=null?t:null)]},j6=["class","method","getter","setter","accessor","field","value","get","set"],ga=e=>e!==void 0&&typeof e!="function"?Ni("Function expected"):e,wB=(e,t,n,r,o)=>({kind:j6[e],name:t,metadata:r,addInitializer:s=>n._?Ni("Already initialized"):o.push(ga(s||null))}),CB=(e,t)=>Pf(t,vB("metadata"),e[3]),Ji=(e,t,n,r)=>{for(var o=0,s=e[t>>1],a=s&&s.length;o<a;o++)t&1?s[o].call(n):r=s[o].call(n,r);return r},k6=(e,t,n,r,o,s)=>{for(var a,l,c,u,f,d=t&7,p=!1,h=!1,m=e.length+1,x=j6[d+5],v=e[m-1]=[],y=e[m]||(e[m]=[]),b=(o=o.prototype,mB({get[n](){return ma(this,s)},set[n](w){return Jr(this,s,w)}},n)),S=r.length-1;S>=0;S--)u=wB(d,n,c={},e[3],y),u.static=p,u.private=h,f=u.access={has:w=>n in w},f.get=w=>w[n],f.set=(w,E)=>w[n]=E,l=(0,r[S])({get:b.get,set:b.set},u),c._=1,l===void 0?ga(l)&&(b[x]=l):typeof l!="object"||l===null?Ni("Object expected"):(ga(a=l.get)&&(b.get=a),ga(a=l.set)&&(b.set=a),ga(a=l.init)&&v.unshift(a));return b&&E6(o,n,b),o},R6=(e,t,n)=>t.has(e)||Ni("Cannot "+n),ma=(e,t,n)=>(R6(e,t,"read from private field"),t.get(e)),Js=(e,t,n)=>t.has(e)?Ni("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Jr=(e,t,n,r)=>(R6(e,t,"write to private field"),t.set(e,n),n);function no(e){return e instanceof ug||e instanceof T6}var Qi=10,SB=class extends Ct{constructor(e){super(e);const t=Ht(()=>{const{dragOperation:r}=e;if(Wa(r.activatorEvent)&&no(r.source)&&r.status.initialized){const o=e.registry.plugins.get(Ci);if(o)return o.disable(),()=>o.enable()}}),n=e.monitor.addEventListener("dragmove",(r,o)=>{queueMicrotask(()=>{if(this.disabled||r.defaultPrevented||!r.nativeEvent)return;const{dragOperation:s}=o;if(!Wa(r.nativeEvent)||!no(s.source)||!s.shape)return;const{actions:a,collisionObserver:l,registry:c}=o,{by:u}=r;if(!u)return;const f=EB(u),{source:d,target:p}=s,{center:h}=s.shape.current,m=[],x=[];Je(()=>{for(const E of c.droppables){const{id:N}=E;if(!E.accepts(d)||N===p?.id&&no(E)||!E.element)continue;let _=E.shape;const k=new wn(E.element,{getBoundingClientRect:I=>Va(I,void 0,.2)});!k.height||!k.width||(f=="down"&&h.y+Qi<k.center.y||f=="up"&&h.y-Qi>k.center.y||f=="left"&&h.x-Qi>k.center.x||f=="right"&&h.x+Qi<k.center.x)&&(m.push(E),E.shape=k,x.push(()=>E.shape=_))}}),r.preventDefault(),l.disable();const v=l.computeCollisions(m,M$);Je(()=>x.forEach(E=>E()));const[y]=v;if(!y)return;const{id:b}=y,{index:S,group:w}=d.sortable;a.setDropTarget(b).then(()=>{const{source:E,target:N,shape:_}=s;if(!E||!no(E)||!_)return;const{index:k,group:I,target:F}=E.sortable,U=S!==k||w!==I,O=U?F:N?.element;if(!O)return;Ew(O);const R=new wn(O);if(!R)return;const L=rr.delta(R,rr.from(_.current.boundingRectangle),E.alignment);a.move({by:L}),U?a.setDropTarget(E.id).then(()=>l.enable()):l.enable()})})});this.destroy=()=>{n(),t()}}};function EB(e){const{x:t,y:n}=e;if(t>0)return"right";if(t<0)return"left";if(n>0)return"down";if(n<0)return"up"}var NB=Object.defineProperty,_B=Object.defineProperties,jB=Object.getOwnPropertyDescriptors,u0=Object.getOwnPropertySymbols,kB=Object.prototype.hasOwnProperty,RB=Object.prototype.propertyIsEnumerable,d0=(e,t,n)=>t in e?NB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vo=(e,t)=>{for(var n in t||(t={}))kB.call(t,n)&&d0(e,n,t[n]);if(u0)for(var n of u0(t))RB.call(t,n)&&d0(e,n,t[n]);return e},Bo=(e,t)=>_B(e,jB(t));function MB(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function ld(e){return"initialIndex"in e&&typeof e.initialIndex=="number"&&"index"in e&&typeof e.index=="number"}function DB(e,t,n){var r,o,s;const{source:a,target:l,canceled:c}=t.operation;if(!a||!l||c)return"preventDefault"in t&&t.preventDefault(),e;const u=(w,E)=>w===E||typeof w=="object"&&"id"in w&&w.id===E;if(Array.isArray(e)){const w=e.findIndex(N=>u(N,a.id)),E=e.findIndex(N=>u(N,l.id));if(w===-1||E===-1){if(ld(a)){const N=a.initialIndex,_=a.index;return N===_||N<0||N>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,N,_)}return e}if(!c&&"index"in a&&typeof a.index=="number"){const N=a.index;if(N!==w)return n(e,w,N)}return n(e,w,E)}const f=Object.entries(e);let d=-1,p,h=-1,m;for(const[w,E]of f)if(d===-1&&(d=E.findIndex(N=>u(N,a.id)),d!==-1&&(p=w)),h===-1&&(h=E.findIndex(N=>u(N,l.id)),h!==-1&&(m=w)),d!==-1&&h!==-1)break;if(d===-1&&ld(a)){const w=a.initialGroup,E=a.initialIndex,N=a.group,_=a.index;if(w==null||N==null||!(w in e)||!(N in e)||w===N&&E===_)return"preventDefault"in t&&t.preventDefault(),e;if(w===N)return Bo(Vo({},e),{[w]:n(e[w],E,_)});const k=e[w][E];return Bo(Vo({},e),{[w]:[...e[w].slice(0,E),...e[w].slice(E+1)],[N]:[...e[N].slice(0,_),k,...e[N].slice(_)]})}if(!a.manager)return e;const{dragOperation:x}=a.manager,v=(o=(r=x.shape)==null?void 0:r.current.center)!=null?o:x.position.current;if(m==null&&l.id in e){const w=l.shape&&v.y>l.shape.center.y?e[l.id].length:0;m=l.id,h=w}if(p==null||m==null||p===m&&d===h){if(p!=null&&p===m&&d===h&&ld(a)){const w=a.group!=null&&a.group!==p,E=a.index!==d;if(w||E){const N=(s=a.group)!=null?s:p;if(N in e){if(p===N)return Bo(Vo({},e),{[p]:n(e[p],d,a.index)});const _=e[p][d];return Bo(Vo({},e),{[p]:[...e[p].slice(0,d),...e[p].slice(d+1)],[N]:[...e[N].slice(0,a.index),_,...e[N].slice(a.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(p===m)return Bo(Vo({},e),{[p]:n(e[p],d,h)});const b=l.shape&&Math.round(v.y)>Math.round(l.shape.center.y)?1:0,S=e[p][d];return Bo(Vo({},e),{[p]:[...e[p].slice(0,d),...e[p].slice(d+1)],[m]:[...e[m].slice(0,h+b),S,...e[m].slice(h+b)]})}function AB(e,t){return DB(e,t,MB)}var f0="__default__",TB=class extends Ct{constructor(e){super(e);const t=()=>{const r=new Map;for(const o of e.registry.droppables)if(o instanceof ug){const{sortable:s}=o,{group:a}=s;let l=r.get(a);l||(l=new Set,r.set(a,l)),l.add(s)}for(const[o,s]of r)r.set(o,new Set(el(s)));return r},n=[e.monitor.addEventListener("dragover",(r,o)=>{if(this.disabled)return;const{dragOperation:s}=o,{source:a,target:l}=s;if(!no(a)||!no(l)||a.sortable===l.sortable)return;const c=t(),u=a.sortable.group===l.sortable.group,f=c.get(a.sortable.group),d=u?f:c.get(l.sortable.group);!f||!d||queueMicrotask(()=>{r.defaultPrevented||o.renderer.rendering.then(()=>{var p,h,m;const x=t();for(const[F,U]of c.entries()){const O=Array.from(U).entries();for(const[R,L]of O)if(L.index!==R||L.group!==F||!((p=x.get(F))!=null&&p.has(L)))return}const v=a.sortable.element,y=l.sortable.element;if(!y||!v||!u&&l.id===a.sortable.group)return;const b=el(f),S=u?b:el(d),w=(h=a.sortable.group)!=null?h:f0,E=(m=l.sortable.group)!=null?m:f0,N={[w]:b,[E]:S},_=AB(N,r);if(N===_)return;const k=_[E].indexOf(a.sortable),I=_[E].indexOf(l.sortable);o.collisionObserver.disable(),p0(v,k,y,I),Je(()=>{for(const[F,U]of _[w].entries())U.index=F;if(!u)for(const[F,U]of _[E].entries())U.group=l.sortable.group,U.index=F}),o.actions.setDropTarget(a.id).then(()=>o.collisionObserver.enable())})})}),e.monitor.addEventListener("dragend",(r,o)=>{if(!r.canceled)return;const{dragOperation:s}=o,{source:a}=s;no(a)&&(a.sortable.initialIndex===a.sortable.index&&a.sortable.initialGroup===a.sortable.group||queueMicrotask(()=>{const l=t(),c=l.get(a.sortable.initialGroup);c&&o.renderer.rendering.then(()=>{for(const[h,m]of l.entries()){const x=Array.from(m).entries();for(const[v,y]of x)if(y.index!==v||y.group!==h)return}const u=el(c),f=a.sortable.element,d=u[a.sortable.initialIndex],p=d?.element;!d||!p||!f||(p0(f,d.index,p,a.index),Je(()=>{for(const[h,m]of l.entries()){const x=Array.from(m).values();for(const v of x)v.index=v.initialIndex,v.group=v.initialGroup}}))})}))})];this.destroy=()=>{for(const r of n)r()}}};function p0(e,t,n,r){const o=r<t?"afterend":"beforebegin";n.insertAdjacentElement(o,e)}function PB(e,t){return e.index-t.index}function el(e){return Array.from(e).sort(PB)}var OB=[SB,TB],M6={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1},tl=new uF,D6,A6,br,lg,xa,va,cg,Xo;A6=[Re],D6=[Re];var du=class{constructor(e,t){Js(this,lg,Ji(br,8,this)),Ji(br,11,this),Js(this,xa),Js(this,va),Js(this,cg,Ji(br,12,this)),Ji(br,15,this),Js(this,Xo),this.register=()=>(Je(()=>{var d,p;(d=this.manager)==null||d.registry.register(this.droppable),(p=this.manager)==null||p.registry.register(this.draggable)}),()=>this.unregister()),this.unregister=()=>{Je(()=>{var d,p;(d=this.manager)==null||d.registry.unregister(this.droppable),(p=this.manager)==null||p.registry.unregister(this.draggable)})},this.destroy=()=>{Je(()=>{this.droppable.destroy(),this.draggable.destroy()})};var n=e,{effects:r=()=>[],group:o,index:s,sensors:a,type:l,transition:c=M6,plugins:u=OB}=n,f=yB(n,["effects","group","index","sensors","type","transition","plugins"]);this.droppable=new ug(f,t,this),this.draggable=new T6(c0(l0({},f),{effects:()=>[()=>{var d,p,h;const m=(d=this.manager)==null?void 0:d.dragOperation.status;m?.initializing&&this.id===((h=(p=this.manager)==null?void 0:p.dragOperation.source)==null?void 0:h.id)&&tl.clear(this.manager),m?.dragging&&tl.set(this.manager,this.id,Le(()=>({initialIndex:this.index,initialGroup:this.group})))},()=>{const{index:d,group:p,manager:h}=this,m=ma(this,va),x=ma(this,xa);(d!==m||p!==x)&&(Jr(this,va,d),Jr(this,xa,p),this.animate())},()=>{const{target:d}=this,{feedback:p,isDragSource:h}=this.draggable;p=="move"&&h&&(this.droppable.disabled=!d)},()=>{const{manager:d}=this;for(const p of u)d?.registry.register(p)},...r()],type:l,sensors:a}),t,this),Jr(this,Xo,f.element),this.manager=t,this.index=s,Jr(this,va,s),this.group=o,Jr(this,xa,o),this.type=l,this.transition=c}get initialIndex(){var e,t;return(t=(e=tl.get(this.manager,this.id))==null?void 0:e.initialIndex)!=null?t:this.index}get initialGroup(){var e,t;return(t=(e=tl.get(this.manager,this.id))==null?void 0:e.initialGroup)!=null?t:this.group}animate(){Le(()=>{const{manager:e,transition:t}=this,{shape:n}=this.droppable;if(!e)return;const{idle:r}=e.dragOperation.status;!n||!t||r&&!t.idle||e.renderer.rendering.then(()=>{const{element:o}=this;if(!o)return;const s=this.refreshShape();if(!s)return;const a={x:n.boundingRectangle.left-s.boundingRectangle.left,y:n.boundingRectangle.top-s.boundingRectangle.top},{translate:l}=jn(o),c=Y1(o,l,!1),u=Y1(o,l);if(a.x||a.y){const f=Bh(Jt(o))?c0(l0({},t),{duration:0}):t;Nw({element:o,keyframes:{translate:[`${c.x+a.x}px ${c.y+a.y}px ${c.z}`,`${u.x}px ${u.y}px ${u.z}`]},options:f}).then(()=>{e.dragOperation.status.dragging||(this.droppable.shape=void 0)})}})})}get manager(){return this.draggable.manager}set manager(e){Je(()=>{this.draggable.manager=e,this.droppable.manager=e})}set element(e){Je(()=>{const t=ma(this,Xo),n=this.droppable.element,r=this.draggable.element;(!n||n===t)&&(this.droppable.element=e),(!r||r===t)&&(this.draggable.element=e),Jr(this,Xo,e)})}get element(){var e,t;const n=ma(this,Xo);if(n)return(t=(e=mf.get(n))!=null?e:n)!=null?t:this.droppable.element}set target(e){this.droppable.element=e}get target(){return this.droppable.element}set source(e){this.draggable.element=e}get source(){return this.draggable.element}get disabled(){return this.draggable.disabled&&this.droppable.disabled}set feedback(e){this.draggable.feedback=e}set disabled(e){Je(()=>{this.droppable.disabled=e,this.draggable.disabled=e})}set data(e){Je(()=>{this.droppable.data=e,this.draggable.data=e})}set handle(e){this.draggable.handle=e}set id(e){Je(()=>{this.droppable.id=e,this.draggable.id=e})}get id(){return this.droppable.id}set sensors(e){this.draggable.sensors=e}set modifiers(e){this.draggable.modifiers=e}set collisionPriority(e){this.droppable.collisionPriority=e}set collisionDetector(e){this.droppable.collisionDetector=e??_w}set alignment(e){this.draggable.alignment=e}get alignment(){return this.draggable.alignment}set type(e){Je(()=>{this.droppable.type=e,this.draggable.type=e})}get type(){return this.draggable.type}set accept(e){this.droppable.accept=e}get accept(){return this.droppable.accept}get isDropTarget(){return this.droppable.isDropTarget}get isDragSource(){return this.draggable.isDragSource}get isDragging(){return this.draggable.isDragging}get isDropping(){return this.draggable.isDropping}get status(){return this.draggable.status}refreshShape(){return this.droppable.refreshShape()}accepts(e){return this.droppable.accepts(e)}};br=bB();lg=new WeakMap;xa=new WeakMap;va=new WeakMap;cg=new WeakMap;Xo=new WeakMap;k6(br,4,"index",A6,du,lg);k6(br,4,"group",D6,du,cg);CB(br,du);var T6=class extends Si{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get initialIndex(){return this.sortable.initialIndex}get group(){return this.sortable.group}get initialGroup(){return this.sortable.initialGroup}},ug=class extends lu{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get group(){return this.sortable.group}},LB=Object.defineProperty,IB=Object.defineProperties,FB=Object.getOwnPropertyDescriptors,h0=Object.getOwnPropertySymbols,$B=Object.prototype.hasOwnProperty,VB=Object.prototype.propertyIsEnumerable,g0=(e,t,n)=>t in e?LB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cd=(e,t)=>{for(var n in t||(t={}))$B.call(t,n)&&g0(e,n,t[n]);if(h0)for(var n of h0(t))VB.call(t,n)&&g0(e,n,t[n]);return e},BB=(e,t)=>IB(e,FB(t));function P6(e){const{accept:t,collisionDetector:n,collisionPriority:r,id:o,data:s,element:a,handle:l,index:c,group:u,disabled:f,feedback:d,modifiers:p,sensors:h,target:m,type:x}=e,v=cd(cd({},M6),e.transition),y=c6(S=>new du(BB(cd({},e),{transition:v,register:!1,handle:os(l),element:os(a),target:os(m),feedback:d}),S)),b=rg(y,zB);return Ye(o,()=>y.id=o),No(()=>{Je(()=>{y.group=u,y.index=c})},[y,u,c]),Ye(x,()=>y.type=x),Ye(t,()=>y.accept=t,void 0,Cr),Ye(s,()=>s&&(y.data=s)),Ye(c,()=>{var S;(S=y.manager)!=null&&S.dragOperation.status.idle&&v?.idle&&y.refreshShape()},_V),bl(l,S=>y.handle=S),bl(a,S=>y.element=S),bl(m,S=>y.target=S),Ye(f,()=>y.disabled=f===!0),Ye(h,()=>y.sensors=h),Ye(n,()=>y.collisionDetector=n),Ye(r,()=>y.collisionPriority=r),Ye(d,()=>y.feedback=d??"default"),Ye(v,()=>y.transition=v,void 0,Cr),Ye(p,()=>y.modifiers=p,void 0,Cr),Ye(e.alignment,()=>y.alignment=e.alignment),{sortable:b,get isDragging(){return b.isDragging},get isDropping(){return b.isDropping},get isDragSource(){return b.isDragSource},get isDropTarget(){return b.isDropTarget},handleRef:C.useCallback(S=>{y.handle=S??void 0},[y]),ref:C.useCallback(S=>{var w,E;!S&&((w=y.element)!=null&&w.isConnected)&&!((E=y.manager)!=null&&E.dragOperation.status.idle)||(y.element=S??void 0)},[y]),sourceRef:C.useCallback(S=>{var w,E;!S&&((w=y.source)!=null&&w.isConnected)&&!((E=y.manager)!=null&&E.dragOperation.status.idle)||(y.source=S??void 0)},[y]),targetRef:C.useCallback(S=>{var w,E;!S&&((w=y.target)!=null&&w.isConnected)&&!((E=y.manager)!=null&&E.dragOperation.status.idle)||(y.target=S??void 0)},[y])}}function zB(e,t,n){return!!(e==="isDragSource"&&!n&&t)}function WB({header:e,index:t,enableColumnResizing:n}){const{style:r,className:o}=ig(e.column,n,ag.header),{ref:s,isDragging:a}=P6({id:e.column.id,index:t,group:"columns"}),l={...r,opacity:a?.5:1,zIndex:a?1:void 0,position:a?"relative":r?.position,cursor:"grab"};return i.jsxs(gi,{ref:s,style:l,className:j(o,a&&"bg-muted/80"),children:[i.jsx("div",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:e.isPlaceholder?null:La(e.column.columnDef.header,e.getContext())}),n&&e.column.getCanResize()&&i.jsx(S6,{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler()})]},e.id)}function HB({table:e,enableColumnResizing:t,enableColumnDragDrop:n=!1}){return n?i.jsx(Ia,{children:e.getHeaderGroups().map(r=>i.jsx(In,{className:"bg-muted",children:r.headers.map((o,s)=>o.column.id==="select"||o.column.id==="actions"||o.column.id==="_expander"||o.column.id==="_spacer"?i.jsx(i0,{header:o,enableColumnResizing:t??!1},o.id):i.jsx(WB,{header:o,index:s,enableColumnResizing:t??!1},o.id))},r.id))}):i.jsx(Ia,{children:e.getHeaderGroups().map(r=>i.jsx(In,{className:"bg-muted",children:r.headers.map(o=>i.jsx(i0,{header:o,enableColumnResizing:t??!1},o.id))},r.id))})}function GB({cell:e,enableColumnResizing:t}){const{style:n,className:r}=ig(e.column,t,ag.body);return i.jsx(fs,{style:n,className:r,children:La(e.column.columnDef.cell,e.getContext())},e.id)}function UB({table:e,enableColumnResizing:t,onRowClick:n,onRowMouseEnter:r,onRowMouseLeave:o,rowHeight:s,getRowClassName:a,renderSubComponent:l}){const c=e.getRowModel().rows,u=f=>f===c.length-1;return i.jsx(nu,{children:c.map((f,d)=>{const p=!n&&f.getCanExpand();return i.jsxs(C.Fragment,{children:[i.jsx(In,{"data-state":f.getIsSelected()&&"selected",onClick:h=>{n?n(f.original,h):p&&f.toggleExpanded()},onMouseEnter:()=>r?.(f.original),onMouseLeave:()=>o?.(f.original),className:j((n||p)&&"cursor-pointer hover:bg-muted",u(d)&&"border-b-0",a?.(f.original)),style:{height:s?`${s}px`:void 0},children:f.getVisibleCells().map(h=>i.jsx(GB,{cell:h,enableColumnResizing:t??!1},h.id))}),l&&f.getIsExpanded()&&i.jsx(In,{className:"bg-muted/30 hover:bg-transparent","data-testid":"data-table-expanded-row",children:i.jsx(fs,{colSpan:f.getVisibleCells().length,className:"p-0",children:l(f.original)})})]},f.id)})})}function YB(e,t){const[n,r]=C.useState(!1),[o,s]=C.useState(!1),[a,l]=C.useState(!1),c=e.getIsPinned(),u=e.getCanPin(),f=e.getCanSort(),d=e.getIsSorted(),p=t.getAllColumns().filter(v=>typeof v.accessorFn<"u"&&v.getCanHide()),h=p.filter(v=>v.getIsVisible()).length,m=h===1&&e.getIsVisible();return{isHovered:n,setIsHovered:r,isMenuOpen:o,setIsMenuOpen:s,isManageColumnsOpen:a,setIsManageColumnsOpen:l,isPinned:c,canPin:u,canSort:f,isSorted:d,toggleableColumns:p,visibleColumnsCount:h,isLastVisibleColumn:m,handleManageColumnsClick:()=>{s(!1),l(!0)}}}function KB({column:e,isLastVisibleColumn:t,onManageColumnsClick:n,translations:r}){const o=e.getCanSort(),s=e.getCanPin(),a=e.getCanHide(),l=e.getIsPinned(),c=e.getIsSorted();return i.jsxs(Fc,{align:"start",children:[o&&i.jsxs(i.Fragment,{children:[i.jsxs(xn,{onClick:()=>e.toggleSorting(!1),children:[i.jsx(X,{name:"ArrowUp",size:"sm"}),r.ascending]}),i.jsxs(xn,{onClick:()=>e.toggleSorting(!0),children:[i.jsx(X,{name:"ArrowDown",size:"sm"}),r.descending]}),c&&i.jsxs(xn,{onClick:()=>e.clearSorting(),children:[i.jsx(X,{name:"X",size:"sm"}),r.clearSorting]}),i.jsx(Dl,{})]}),s&&i.jsxs(i.Fragment,{children:[i.jsxs(xn,{onClick:()=>e.pin("left"),disabled:l==="left",children:[i.jsx(X,{name:"PushPinSimple",size:"sm"}),r.pinToLeft]}),i.jsxs(xn,{onClick:()=>e.pin("right"),disabled:l==="right",children:[i.jsx(X,{name:"PushPinSimple",size:"sm"}),r.pinToRight]}),l&&i.jsxs(xn,{onClick:()=>e.pin(!1),children:[i.jsx(X,{name:"PushPinSimpleSlash",size:"sm"}),r.unpin]}),i.jsx(Dl,{})]}),a&&i.jsxs(xn,{onClick:()=>e.toggleVisibility(!1),disabled:t,children:[i.jsx(X,{name:"EyeSlash",size:"sm"}),r.hide,t&&i.jsx("span",{className:"ml-auto text-xs text-muted-foreground",children:r.lastColumn})]}),i.jsxs(xn,{onClick:n,children:[i.jsx(X,{name:"Columns",size:"sm"}),r.manageColumns]})]})}let nl=0,m0="",x0="";function dg(e){C.useEffect(()=>{if(e){if(nl===0){m0=document.body.style.overflow,x0=document.body.style.paddingRight;const t=window.innerWidth-document.documentElement.clientWidth;document.body.style.overflow="hidden",t>0&&(document.body.style.paddingRight=`${t}px`)}return nl++,()=>{nl--,nl===0&&(document.body.style.overflow=m0,document.body.style.paddingRight=x0)}}},[e])}function fg(e,t){C.useEffect(()=>{if(!e)return;const n=r=>{r.key==="Escape"&&t()};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[e,t])}const O6="yuno-overlay";let rl=0;function v0(e){typeof window>"u"||window.dispatchEvent(new CustomEvent(O6,{detail:{open:e}}))}function pg(e){C.useEffect(()=>{if(e)return rl===0&&v0(!0),rl++,()=>{rl--,rl===0&&v0(!1)}},[e])}const ZB=Ge("fixed flex items-center justify-center p-4",{variants:{verticalAlign:{start:"items-start pt-20",center:"items-center",end:"items-end pb-20"},inset:{viewport:"inset-0",content:"inset-y-0 right-0 left-[var(--app-content-left,0px)]"}},defaultVariants:{verticalAlign:"center",inset:"content"}}),qB=Ge("relative bg-background rounded-lg shadow-lg border border-border max-h-[90vh] overflow-hidden flex flex-col",{variants:{size:{default:"w-full max-w-md",sm:"w-full max-w-sm",lg:"w-full max-w-lg",xl:"w-full max-w-xl",fullscreen:"w-full h-full max-w-none max-h-none rounded-none"}},defaultVariants:{size:"default"}}),fu=g.forwardRef(({className:e,verticalAlign:t,title:n,open:r,closeIcon:o,buttons:s=[],widthContainer:a,heightContainer:l,backButtonAction:c,showActions:u=!0,otherActions:f,withHeader:d=!0,showCloseButton:p=!0,children:h,headerClassName:m,contentClassName:x,footerClassName:v,zIndex:y,...b},S)=>{const w=g.useId(),E=d&&!!n,N=p!==!1,_=g.useRef(!1),[k,I]=g.useState(!1),[F,U]=g.useState(r),[O,R]=g.useState(!1);if(g.useEffect(()=>{const z=()=>{I(window.innerWidth<=599)};return z(),window.addEventListener("resize",z),()=>window.removeEventListener("resize",z)},[]),g.useEffect(()=>{let z,P;return r?(U(!0),z=setTimeout(()=>R(!0),10)):F&&(R(!1),P=setTimeout(()=>{U(!1)},600)),()=>{z&&clearTimeout(z),P&&clearTimeout(P)}},[r,F]),dg(r),pg(r),fg(r,o),!F)return null;const L={width:a&&!k?ss(a):void 0,height:l&&!k?ss(l):void 0},V=y!==void 0?{zIndex:y}:void 0,D=y===void 0?"z-dialog":void 0,$=i.jsxs(i.Fragment,{children:[i.jsx("div",{className:j("fixed inset-0 bg-black/25 transition-opacity duration-600 ease-out",D,O?"opacity-100":"opacity-0"),style:V,onClick:N?o:void 0,"aria-hidden":"true"}),i.jsx("div",{className:j(ZB({verticalAlign:t,inset:k?"viewport":"content"}),D),style:V,onMouseDown:z=>{_.current=z.target===z.currentTarget},onClick:z=>{N&&z.target===z.currentTarget&&_.current&&o()},children:i.jsxs("div",{ref:S,className:j("app-dialog",qB({size:k?"fullscreen":"default"}),"transition-all duration-600 ease-out",O?"opacity-100 scale-100 translate-y-0":"opacity-0 scale-98 -translate-y-2",a&&!k&&"max-w-none",e),style:L,role:"dialog","aria-modal":"true","aria-labelledby":E?w:void 0,"aria-label":E?void 0:"Dialog",...b,children:[d&&i.jsx(Vp,{title:n,titleId:w,onClose:o,onBack:c,otherActions:f,showCloseButton:p,className:m}),i.jsx(Bp,{className:x,children:h}),u&&i.jsx(zp,{buttons:s,className:v})]})})]});return ho.createPortal($,document.body)});fu.displayName="Dialog";function XB({isOpen:e,onOpenChange:t,toggleableColumns:n,visibleColumnsCount:r,translations:o}){const[s,a]=C.useState(""),l=()=>{a(""),t(!1)},c=n.filter(h=>s0(h).toLowerCase().includes(s.toLowerCase())),u=()=>{n.forEach(h=>h.toggleVisibility(!0))},f=()=>{const h=n.filter(m=>m.getIsVisible());h.length<=1||h.slice(1).forEach(m=>m.toggleVisibility(!1))},d=n.every(h=>h.getIsVisible()),p=r<=1;return i.jsx(fu,{open:e,closeIcon:l,title:o.manageColumns,widthContainer:400,buttons:[{children:o.hideAll,variant:"link",onClick:f,disabled:p},{children:o.showAll,variant:"link",onClick:u,disabled:d}],children:i.jsxs("div",{className:"space-y-4",children:[i.jsx(Zc,{placeholder:o.searchColumns,value:s,onSearch:a,className:"mb-6"}),i.jsx("div",{className:"space-y-4 max-h-[300px] overflow-y-auto",children:c.length===0?i.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:o.noColumnsFound}):c.map(h=>{const m=s0(h),x=r===1&&h.getIsVisible();return i.jsx(Up,{id:`column-${h.id}`,checked:h.getIsVisible(),disabled:x,label:`${m}${x?` ${o.lastColumn}`:""}`,onChange:v=>h.toggleVisibility(v.target.checked)},h.id)})})]})})}function L6({canSort:e,sortDirection:t}){if(!e||!t)return null;const r={asc:{name:"ArrowUp",tooltip:"Sort ascending"},desc:{name:"ArrowDown",tooltip:"Sort descending"}}[t];return i.jsx(X,{name:r.name,size:"sm",tooltip:r.tooltip})}function JB({title:e,info:t,isPinned:n,canSort:r,sortDirection:o,isHovered:s,isMenuOpen:a,onMouseEnter:l,onMouseLeave:c}){return i.jsxs("div",{className:j(`w-full data-[state=open]:bg-accent flex ${Xs.height} items-center ${Xs.gap} ${Xs.roundedClass} ${Xs.fontSize} ${Xs.fontWeight} outline-none transition-all`,"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]"),onMouseEnter:l,onMouseLeave:c,children:[t&&i.jsx(X,{name:"Info",size:"sm",className:"text-muted-foreground",tooltip:t}),n&&i.jsx(X,{name:"PushPinSimple",size:"sm",tooltip:"Pinned column"}),i.jsx(L6,{canSort:r,sortDirection:o}),i.jsx("span",{className:"flex-1 text-left",children:e}),(s||a)&&i.jsx(Ic,{asChild:!0,children:i.jsx("button",{type:"button","aria-label":"Column options",className:"inline-flex cursor-pointer items-center justify-center",children:i.jsx(X,{name:"DotsThreeVertical",size:"sm"})})})]})}function Of({column:e,table:t,title:n,className:r,info:o}){const{isHovered:s,setIsHovered:a,isMenuOpen:l,setIsMenuOpen:c,isManageColumnsOpen:u,setIsManageColumnsOpen:f,isPinned:d,canPin:p,canSort:h,isSorted:m,toggleableColumns:x,visibleColumnsCount:v,isLastVisibleColumn:y,handleManageColumnsClick:b}=YB(e,t),S=t.options.meta?.translations??uu;return!h&&!p?i.jsxs("div",{className:j("flex items-center gap-2",r),children:[o&&i.jsx(X,{name:"Info",size:"sm",className:"text-muted-foreground",tooltip:o}),i.jsx("span",{children:n})]}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:j("flex items-center gap-2",r),children:i.jsxs(Lc,{open:l,onOpenChange:c,children:[i.jsx(JB,{title:n,info:o,isPinned:d,canSort:h,sortDirection:m,isHovered:s,isMenuOpen:l,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1)}),i.jsx(KB,{column:e,isLastVisibleColumn:y,onManageColumnsClick:b,translations:S})]})}),i.jsx(XB,{isOpen:u,onOpenChange:f,toggleableColumns:x,visibleColumnsCount:v,translations:S})]})}function QB({columns:e,checkboxSelection:t=!1,actions:n,getRowCanExpand:r,expanderPosition:o="left",expandRowLabel:s="Row {{row}} details",getRowExpandLabel:a,expanderHeader:l}){return g.useMemo(()=>{let c=e.map(p=>{const{header:h,enablePinning:m=!0,...x}=p,v=x.size!==void 0?{...x,minSize:x.minSize??dB}:x;return typeof h=="string"?{...v,enablePinning:m,header:({column:y,table:b})=>i.jsx(Of,{column:y,table:b,title:h})}:C6(h)?{...v,enablePinning:m,header:({column:y,table:b})=>i.jsx(Of,{column:y,table:b,title:h.title,info:h.info,className:h.className})}:{...v,header:h,enablePinning:m}});const u=l?a0.labeledSize:a0.size,f=r?{id:"_expander",header:l??"",cell:({row:p})=>{if(!p.getCanExpand())return null;const h=a?.(p.original)??s.replace("{{row}}",String(p.index+1));return i.jsx("span",{onClick:m=>m.stopPropagation(),children:i.jsx(zt,{content:h,children:i.jsx(ot,{variant:"ghost",size:"icon",startIcon:p.getIsExpanded()?"CaretUp":"CaretDown",startIconProps:{size:"md",weight:"bold"},className:"border-border text-muted-foreground size-7 rounded-md border","aria-label":h,"aria-expanded":p.getIsExpanded(),onClick:p.getToggleExpandedHandler()})})})},enableSorting:!1,enableHiding:!1,enablePinning:!1,enableResizing:!1,size:u,minSize:u,maxSize:u}:null;if(f&&o==="left"&&(c=[f,...c]),t&&(c=[{id:"select",header:({table:h})=>i.jsx(Oa,{checked:h.getIsAllPageRowsSelected()||(h.getIsSomePageRowsSelected()?"indeterminate":!1),onChange:m=>h.toggleAllPageRowsSelected(m.target.checked),"aria-label":"Select all"}),cell:({row:h})=>i.jsx("span",{onClick:m=>m.stopPropagation(),children:i.jsx(Oa,{checked:h.getIsSelected(),disabled:!h.getCanSelect(),onChange:m=>h.toggleSelected(m.target.checked),"aria-label":"Select row"})}),enableSorting:!1,enableHiding:!1,enablePinning:!1,enableResizing:!1,size:ad.size,minSize:ad.minSize,maxSize:ad.maxSize},...c]),n){const p={id:"actions",header:"",cell:({row:h})=>n.render?i.jsx(i.Fragment,{children:n.render(h.original)}):i.jsx(ot,{variant:"ghost",size:"icon",startIcon:"Eye","aria-label":"Actions",onClick:m=>{m.stopPropagation(),n.onClick?.(h.original)}}),enableSorting:!1,enableHiding:!1,enablePinning:!1,enableResizing:!1,size:id.size,minSize:id.minSize,maxSize:id.maxSize};c=[...c,p]}if(f&&o==="right"&&(c=[...c,f]),e.some(p=>p.flex))return c;const d={id:"_spacer",header:"",cell:()=>null,enableSorting:!1,enableHiding:!1,enablePinning:!1,enableResizing:!1,size:100,minSize:0};return c=[...c,d],c},[t,n,e,r,o,s,a,l])}const ez=["actions","_expander"];function tz({persistKey:e,hasActions:t=!1,hasExpanderRight:n=!1,externalSorting:r,onExternalSortingChange:o,externalRowSelection:s,initialSettings:a,onUpdate:l,enableColumnDragDrop:c=!1}){const u=g.useMemo(()=>[...t?["actions"]:[],...n?["_expander"]:[]],[t,n]),f=g.useCallback(L=>[...L.filter(V=>!ez.includes(V)),...u],[u]),[d,p]=g.useState([]),[h,m]=g.useState([]),[x,v]=g.useState({}),[y,b]=g.useState({}),[S,w]=g.useState(()=>({left:[],right:f([])})),[E,N]=g.useState([]),_=r??d,k=o??p,I=s??y,F=b,U=g.useRef(!1);g.useEffect(()=>{if(!(!a||U.current)){if(U.current=!0,a.hide||a.show){const L={};a.hide?.forEach(V=>{L[V]=!1}),v(L)}a.pinnedColumns&&w({left:a.pinnedColumns.left||[],right:f(a.pinnedColumns.right||[])}),!o&&a.sorting&&p(a.sorting),c&&a.order&&N(a.order)}},[a,f,o,c]),g.useEffect(()=>{if(!e)return;const L=localStorage.getItem(`datatable-${e}`);if(L)try{const V=JSON.parse(L);V.columnVisibility&&v(V.columnVisibility),V.columnPinning&&w({left:V.columnPinning.left||[],right:f(V.columnPinning.right||[])}),!o&&V.sorting&&p(V.sorting),c&&V.columnOrder&&N(V.columnOrder)}catch(V){console.error("Failed to load table state",V)}},[e,f,o,c]);const O=g.useRef(l);O.current=l,g.useEffect(()=>{const L=Object.entries(x).filter(([,D])=>!D).map(([D])=>D),V={hide:L.length>0?L:void 0,pinnedColumns:{left:S.left||[],right:S.right||[]},...!o&&d.length>0&&{sorting:d},...c&&E.length>0&&{order:E}};if(e){const D={columnVisibility:x,columnPinning:S,...!o&&{sorting:d},...c&&E.length>0&&{columnOrder:E}};localStorage.setItem(`datatable-${e}`,JSON.stringify(D))}O.current&&O.current(V)},[x,S,d,E,e,o,c]);const R=g.useCallback(L=>{w(V=>{const D=typeof L=="function"?L(V):L,$=Array.isArray(D.left)?D.left:[],z=Array.isArray(D.right)?D.right:[];return{left:$,right:f(z)}})},[f]);return{sorting:_,setSorting:k,columnFilters:h,setColumnFilters:m,columnVisibility:x,setColumnVisibility:v,rowSelection:I,setRowSelection:F,columnPinning:S,handleColumnPinningChange:R,columnOrder:E,setColumnOrder:N}}function nz({columns:e,data:t,isLoading:n=!1,empty:r,checkboxSelection:o=!1,isRowSelectable:s,rowSelection:a,onRowSelectionChange:l,enableSorting:c=!0,manualSorting:u=!1,sorting:f,onSortingChange:d,enableColumnFilters:p=!1,enableColumnResizing:h=!0,columnResizeMode:m="onChange",enableColumnPinning:x=!0,onRowClick:v,onRowMouseEnter:y,onRowMouseLeave:b,getRowClassName:S,getRowCanExpand:w,renderSubComponent:E,getRowExpandLabel:N,expanderPosition:_="left",expanderHeader:k,actions:I,height:F,rowHeight:U=uB,className:O,persistKey:R,initialSettings:L,onUpdate:V,enableColumnDragDrop:D=!1,lang:$,translations:z}){const P=g.useMemo(()=>({...w6($),...z}),[$,z]),[M,G]=g.useState({}),A=QB({columns:e,checkboxSelection:o,actions:I,getRowCanExpand:w,expanderPosition:_,expandRowLabel:P.expandRow,getRowExpandLabel:N,expanderHeader:k}),{sorting:W,setSorting:H,columnFilters:T,setColumnFilters:B,columnVisibility:Y,setColumnVisibility:Z,rowSelection:q,setRowSelection:oe,columnPinning:ne,handleColumnPinningChange:le,columnOrder:Ee,setColumnOrder:re}=tz({persistKey:R,hasActions:!!I,hasExpanderRight:!!w&&_==="right",externalSorting:f,onExternalSortingChange:d,externalRowSelection:a,initialSettings:L,onUpdate:V,enableColumnDragDrop:D}),ce=z5({data:t,columns:A,getCoreRowModel:B5(),enableColumnResizing:h,columnResizeMode:m,enableColumnPinning:x,...w&&{getRowCanExpand:me=>w(me.original),onExpandedChange:G},...s&&{enableRowSelection:me=>s(me.original)},meta:{translations:P},defaultColumn:{enableSorting:!1,minSize:50},...c&&{onSortingChange:me=>{H(typeof me=="function"?me(W):me)},getSortedRowModel:FI(),manualSorting:u},...p&&{onColumnFiltersChange:B,getFilteredRowModel:II()},onColumnVisibilityChange:Z,onRowSelectionChange:me=>{const fe=typeof me=="function"?me(q):me;if(oe(fe),l&&a!==void 0){const Pe=Object.keys(fe).filter(Te=>fe[Te]).map(Te=>t[parseInt(Te)]).filter(Boolean);l(fe,Pe)}},onColumnPinningChange:le,onColumnOrderChange:re,state:{sorting:W,columnFilters:T,columnVisibility:Y,rowSelection:q,columnPinning:ne,columnOrder:Ee,...w&&{expanded:M}}});g.useEffect(()=>{if(l&&a===void 0){const me=Object.keys(q).filter(fe=>q[fe]).map(fe=>t[parseInt(fe)]).filter(Boolean);l(q,me)}},[q,l,t,a]);const K=g.useRef([]),Q=g.useCallback(()=>{K.current=Ee.length>0?[...Ee]:ce.getAllLeafColumns().map(me=>me.id)},[Ee,ce]),ae=g.useCallback(me=>{re(fe=>{const Pe=fe.length>0?fe:ce.getAllLeafColumns().map(We=>We.id);return y6({columns:Pe},me).columns})},[ce,re]),J=g.useCallback(me=>{me.operation.canceled&&re(K.current)},[re]);if(n)return i.jsx(lB,{columns:e,checkboxSelection:o,actions:I,rowHeight:U});if(t.length===0){const me=r||{},{title:fe,description:Pe,media:Te,actions:We}=me;return i.jsx(Bc,{media:Te,title:fe??P.noResults,description:Pe??P.noDataAvailable,actions:We})}const be=i.jsx("div",{className:j("app-data-table space-y-4",O),children:i.jsx("div",{className:"app-data-table rounded-md border overflow-x-auto",style:{height:F||"auto"},children:i.jsxs(ah,{className:j("table-fixed"),style:ce.getAllLeafColumns().some(me=>me.columnDef.flex)?{minWidth:ce.getTotalSize()}:void 0,children:[i.jsx("colgroup",{children:ce.getHeaderGroups()[0]?.headers.map(me=>{const fe=me.column.columnDef.enableResizing===!1,Pe=me.column.id==="_spacer",Te=me.column.getSize();return Pe?i.jsx("col",{style:{width:"auto"}},me.id):i.jsx("col",{style:{width:fe?`${Te}px`:"auto",minWidth:fe?`${Te}px`:void 0,maxWidth:fe?`${Te}px`:void 0}},me.id)})}),i.jsx(HB,{table:ce,enableColumnResizing:h,enableColumnDragDrop:D}),i.jsx(UB,{table:ce,enableColumnResizing:h,onRowClick:v,onRowMouseEnter:y,onRowMouseLeave:b,rowHeight:U,getRowClassName:S,renderSubComponent:E})]})})});return D?i.jsx(i6,{onDragStart:Q,onDragOver:ae,onDragEnd:J,children:be}):be}const I6=C.forwardRef(({items:e,maxLength:t=7,showRemainingCount:n=!0,className:r},o)=>{if(!e||e.length===0)return null;const s=e[0],a=e.slice(1),l=s.name.length>t&&t>0,c=l?`${s.name.slice(0,t)}...`:s.name;return i.jsxs("div",{ref:o,className:j("flex items-center gap-2 h-[46px]",r),children:[s.icon&&i.jsx("img",{src:s.icon,alt:s.name,className:"h-4 w-4 object-contain",onError:u=>{u.currentTarget.style.display="none"}}),i.jsx("div",{className:"flex items-center gap-1",children:l?i.jsx(Mt,{children:i.jsxs(Vt,{children:[i.jsx(Bt,{asChild:!0,children:i.jsx("span",{className:"text-sm cursor-help",children:c})}),i.jsx(Dt,{children:i.jsx("p",{children:s.name})})]})}):i.jsx("span",{className:"text-sm",children:s.name})}),a.length>0&&n&&i.jsx(Mt,{children:i.jsxs(Vt,{children:[i.jsx(Bt,{asChild:!0,children:i.jsxs(Ze,{variant:"outline",className:"h-3 px-1 text-xs leading-none cursor-pointer hover:border-primary hover:text-primary",children:["+",a.length]})}),i.jsx(Dt,{className:"p-2",children:i.jsx("div",{className:"space-y-2",children:a.map((u,f)=>i.jsxs("div",{className:"flex items-center gap-3",children:[u.icon&&i.jsx("img",{src:u.icon,alt:u.name,className:"h-4 w-4 object-contain",onError:d=>{d.currentTarget.style.display="none"}}),i.jsx("span",{className:"text-sm text-foreground",children:u.name})]},`${u.name}-${f}`))})})]})})]})});I6.displayName="DataTableListCell";const rz=Ge("fixed z-sheet bg-background shadow-lg transition-transform duration-300 ease-in-out",{variants:{side:{top:"inset-x-0 top-0 border-b",bottom:"inset-x-0 bottom-0 border-t",left:"inset-y-0 left-0 border-r w-3/4 sm:max-w-sm",right:"inset-y-0 right-0 border-l w-3/4 sm:max-w-lg"},isOpen:{true:"",false:""}},compoundVariants:[{side:"right",isOpen:!1,class:"translate-x-full"},{side:"right",isOpen:!0,class:"translate-x-0"},{side:"left",isOpen:!1,class:"-translate-x-full"},{side:"left",isOpen:!0,class:"translate-x-0"},{side:"top",isOpen:!1,class:"-translate-y-full"},{side:"top",isOpen:!0,class:"translate-y-0"},{side:"bottom",isOpen:!1,class:"translate-y-full"},{side:"bottom",isOpen:!0,class:"translate-y-0"}],defaultVariants:{side:"right",isOpen:!1}}),oz=Ge("fixed inset-0 z-sheet bg-black/50 transition-opacity duration-300",{variants:{isOpen:{true:"opacity-100",false:"opacity-0"}},defaultVariants:{isOpen:!1}}),hg=g.forwardRef(({className:e,side:t="right",title:n,description:r,open:o,onClose:s,buttons:a=[],width:l,height:c,showHeader:u=!0,showFooter:f=!0,children:d,headerClassName:p,contentClassName:h,footerClassName:m,loading:x=!1,...v},y)=>{const[b,S]=g.useState(!1),[w,E]=g.useState(!1);if(dg(o),pg(o),fg(o,s),g.useEffect(()=>{if(o){S(!0);const F=setTimeout(()=>E(!0),10);return()=>clearTimeout(F)}else{E(!1);const F=setTimeout(()=>S(!1),300);return()=>clearTimeout(F)}},[o]),!b)return null;const N=ss(l),_=ss(c),k={...N&&(t==="left"||t==="right")?{width:N,maxWidth:N}:{},..._&&(t==="top"||t==="bottom")?{height:_,maxHeight:_}:{}},I=i.jsxs(i.Fragment,{children:[i.jsx("div",{className:oz({isOpen:w}),onClick:s,"aria-hidden":"true"}),i.jsx("div",{ref:y,className:j(rz({side:t,isOpen:w}),e),style:k,role:"dialog","aria-modal":"true","aria-labelledby":n?"sheet-title":void 0,"aria-describedby":r?"sheet-description":void 0,...v,children:i.jsxs("div",{className:"flex h-full flex-col",children:[u&&i.jsxs("div",{className:j("flex items-center justify-between border-b border-border p-6",p),children:[i.jsxs("div",{className:"flex flex-col gap-1",children:[n&&i.jsx("h2",{id:"sheet-title",className:"scroll-m-20 text-2xl tracking-tight font-semibold",children:n}),r&&i.jsx("p",{id:"sheet-description",className:"text-muted-foreground text-sm",children:r})]}),i.jsx(ot,{variant:"ghost",size:"icon",onClick:s,"aria-label":"Close",className:"h-6 w-6",children:i.jsx(X,{name:"X",size:"md"})})]}),i.jsx("div",{className:j("flex-1 overflow-y-auto p-6",h),children:d}),f&&a.length>0&&i.jsx("div",{className:j("flex items-center justify-end gap-3 border-t border-border p-6",m),children:a.map((F,U)=>i.jsx(ot,{disabled:x||F.disabled,...F},U))})]})})]});return ho.createPortal(I,document.body)});hg.displayName="Sheet";const F6=({open:e,onClose:t,onConfirm:n,title:r,description:o,confirmLabel:s="Confirm",cancelLabel:a="Cancel",variant:l="default",isLoading:c=!1,confirmDisabled:u=!1,children:f})=>{const d=[{children:a,variant:"outline",onClick:t,disabled:c,"data-action-name":"dialog.cancel"},{children:s,variant:l==="destructive"?"destructive":"default",onClick:n,loading:c,disabled:u,"data-action-name":"dialog.confirm"}];return i.jsx(fu,{open:e,closeIcon:t,title:r,buttons:d,children:i.jsxs("div",{className:"flex flex-col gap-4",children:[o&&i.jsx("p",{className:"text-sm text-muted-foreground",children:o}),f]})})};F6.displayName="ConfirmationDialog";const sz={1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"},$6=C.forwardRef(({title:e,id:t,description:n,actions:r,columns:o=2,items:s,children:a,className:l,cardClassName:c,...u},f)=>{const d=e||r||n;return i.jsxs("section",{ref:f,id:t,"data-testid":"detail-section",className:j("flex scroll-mt-24 flex-col gap-4",l),...u,children:[d&&i.jsxs("div",{className:"flex flex-col gap-1",children:[(e||r)&&i.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e&&i.jsx("h3",{className:"text-xl font-semibold tracking-tight text-foreground",children:e}),r&&i.jsx("div",{className:"flex items-center gap-2",children:r})]}),n&&i.jsx("p",{className:"text-sm text-muted-foreground",children:n})]}),i.jsx(Ss,{className:j("p-6",c),children:a??i.jsx("div",{className:j("grid gap-x-8 gap-y-6",sz[o]),children:s?.map((p,h)=>i.jsx(pi,{...p},h))})})]})});$6.displayName="DetailSection";const az=()=>i.jsx("div",{"data-testid":"detail-drawer-skeleton",className:"flex flex-col gap-4",children:Array.from({length:5}).map((e,t)=>i.jsxs("div",{className:"flex flex-col gap-2",children:[i.jsx(Ln,{className:"h-4 w-24"}),i.jsx(Ln,{className:"h-5 w-48"})]},t))}),V6=({open:e,onClose:t,title:n,description:r,width:o=480,items:s,footer:a,loading:l=!1,children:c})=>i.jsx(hg,{open:e,onClose:t,title:n,description:r,width:o,buttons:a??[],showFooter:!!a?.length,children:l?i.jsx(az,{}):i.jsxs("div",{className:"flex flex-col gap-6",children:[s&&s.length>0&&i.jsx("div",{className:"flex flex-col gap-4",children:s.map((u,f)=>i.jsx(pi,{orientation:"horizontal",labelWidth:180,...u},f))}),c]})});V6.displayName="DetailDrawer";const gg=C.forwardRef(({title:e,description:t,actions:n,className:r,...o},s)=>i.jsxs("div",{ref:s,"data-testid":"list-page-header",className:j("flex items-center justify-between gap-4",r),...o,children:[i.jsxs("div",{className:"flex flex-col gap-1",children:[i.jsx(Dp,{children:e}),t&&i.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),n&&i.jsx("div",{className:"flex shrink-0 items-center gap-3",children:n})]}));gg.displayName="ListPageHeader";const mg=C.forwardRef(({search:e,actions:t,filters:n,sticky:r=!1,className:o,...s},a)=>{const l=!!(e||t);return i.jsxs("div",{ref:a,"data-testid":"list-filter-toolbar",className:j("flex w-full flex-col items-start gap-6",r&&"sticky-filters",o),...s,children:[l&&i.jsxs("div",{className:"flex w-full items-center justify-between gap-3",children:[i.jsx("div",{className:"flex items-center gap-2",children:e}),t&&i.jsx("div",{className:"flex items-center gap-2",children:t})]}),n]})});mg.displayName="ListFilterToolbar";const iz=()=>i.jsxs("div",{"data-testid":"list-page-skeleton",className:"flex flex-col gap-3",children:[i.jsx(Ln,{className:"h-10 w-full"}),Array.from({length:6}).map((e,t)=>i.jsx(Ln,{className:"h-12 w-full"},t))]}),B6=C.forwardRef(({title:e,description:t,actions:n,search:r,filters:o,toolbarActions:s,stickyToolbar:a=!1,loading:l=!1,loadingFallback:c,empty:u=!1,emptyState:f,children:d,pagination:p,className:h,...m},x)=>{const v=!!(r||o||s);let y;return l?y=c??i.jsx(iz,{}):u?y=f??i.jsx(Bc,{title:"No results found"}):y=d,i.jsxs("div",{ref:x,"data-testid":"list-page-layout",className:j("flex flex-col gap-6",h),...m,children:[i.jsx(gg,{title:e,description:t,actions:n}),v&&i.jsx(mg,{search:r,filters:o,actions:s,sticky:a}),y,!l&&!u&&p]})});B6.displayName="ListPageLayout";const lz=()=>i.jsxs("div",{"data-testid":"detail-page-skeleton",className:"flex flex-col gap-6",children:[i.jsx(Ln,{className:"h-8 w-48"}),i.jsx(Ln,{className:"h-[180px] w-full"}),i.jsx(Ln,{className:"h-[280px] w-full"})]}),z6=C.forwardRef(({header:e,tabs:t,defaultTab:n=0,onTabChange:r,loading:o=!1,loadingFallback:s,children:a,className:l,...c},u)=>i.jsx("div",{ref:u,"data-testid":"detail-page-layout",className:j("flex flex-col gap-6",l),...c,children:o?s??i.jsx(lz,{}):i.jsxs(i.Fragment,{children:[e,t&&t.length>0?i.jsx(Wp,{tabs:t,defaultTab:n,onChange:r}):a]})}));z6.displayName="DetailPageLayout";const W6=C.forwardRef(({title:e,status:t,actions:n,items:r,children:o,className:s,cardClassName:a,...l},c)=>i.jsx("div",{ref:c,"data-testid":"detail-page-header",className:s,...l,children:i.jsxs(Ss,{className:j("flex flex-col gap-6 p-6",a),children:[i.jsxs("div",{className:"flex items-center justify-between gap-4",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("h2",{className:"text-2xl font-bold text-foreground",children:e}),t]}),n&&i.jsx("div",{className:"flex shrink-0 items-center gap-2",children:n})]}),r&&r.length>0&&i.jsx("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-4",children:r.map((u,f)=>i.jsxs(C.Fragment,{children:[i.jsx(pi,{...u}),f<r.length-1&&i.jsx(Ta,{orientation:"vertical",className:"h-10 self-center"})]},f))}),o]})}));W6.displayName="DetailPageHeader";const H6=C.forwardRef(({items:e,activeId:t,onSelect:n,spy:r=!1,sticky:o=!1,className:s,...a},l)=>{const[c,u]=C.useState(e[0]?.id),f=t??c;C.useEffect(()=>{if(!r||typeof IntersectionObserver>"u")return;const p=new IntersectionObserver(h=>{const m=h.filter(x=>x.isIntersecting).sort((x,v)=>x.boundingClientRect.top-v.boundingClientRect.top)[0];m?.target.id&&u(m.target.id)},{rootMargin:"0px 0px -70% 0px",threshold:0});return e.forEach(h=>{const m=document.getElementById(h.id);m&&p.observe(m)}),()=>p.disconnect()},[r,e]);const d=p=>{u(p),n?.(p),document.getElementById(p)?.scrollIntoView?.({behavior:"smooth",block:"start"})};return i.jsx("nav",{ref:l,"data-testid":"section-nav",role:"tablist",className:j("flex gap-0",o&&"sticky top-0 z-10 bg-background",s),...a,children:e.map(p=>i.jsx($c,{role:"tab",current:f===p.id,"aria-selected":f===p.id,badge:p.badge,onClick:h=>{h.preventDefault(),d(p.id)},children:p.label},p.id))})});H6.displayName="SectionNav";const G6=C.forwardRef(({continuous:e,step:t,closeProps:n,primaryProps:r,tooltipProps:o,withTag:s=!1,tagLabel:a,buttonGroup:l=[],width:c,skipProps:u,index:f,size:d,closeLabel:p},h)=>{const m=v=>{n?.onClick?.(v)},x=(v,y)=>{y(),m(v)};return i.jsxs(i.Fragment,{children:[i.jsx("style",{children:`
|
|
150
|
+
`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function eV(e,t="hidden"){return Le(()=>{const{element:n,manager:r}=e;if(!n||!r)return;const o=tV(n,r.registry.droppables),s=[],a=YF(n),{remove:l}=a;return nV(o,a,s),rV(a,t),a.remove=()=>{s.forEach(c=>c()),l.call(a)},a})}function tV(e,t){const n=new Map;for(const r of t)if(r.element&&(e===r.element||e.contains(r.element))){const o=`${wi}${bf("dom-id")}`;r.element.setAttribute(o,""),n.set(r,o)}return n}function nV(e,t,n){for(const[r,o]of e){if(!r.element)continue;const s=`[${o}]`,a=t.matches(s)?t:t.querySelector(s);if(r.element.removeAttribute(o),!a)continue;const l=r.element;r.proxy=a,a.removeAttribute(o),gf.set(l,a),n.push(()=>{gf.delete(l),r.proxy=void 0})}}function rV(e,t="hidden"){e.setAttribute("inert","true"),e.setAttribute("tab-index","-1"),e.setAttribute("aria-hidden","true"),e.setAttribute(nc,t)}function Bw(e,t){return e===t?!0:ms(e)===ms(t)}function q1(e){const{target:t}=e;"newState"in e&&e.newState==="closed"&&fo(t)&&t.hasAttribute("popover")&&requestAnimationFrame(()=>Ba(t))}function Ef(e){return e.tagName==="TR"}function oV(e,t,n){const r=new MutationObserver(o=>{let s=!1;for(const a of o){if(a.target!==e){s=!0;continue}if(a.type!=="attributes")continue;const l=a.attributeName;if(l.startsWith("aria-")||X$.includes(l))continue;const c=e.getAttribute(l);if(l==="style"){if(Ea(e)&&Ea(t)){const u=e.style;for(const f of Array.from(t.style))u.getPropertyValue(f)===""&&t.style.removeProperty(f);for(const f of Array.from(u)){if(J$.includes(f)||f.startsWith(yt))continue;const d=u.getPropertyValue(f);t.style.setProperty(f,d)}}}else c!==null?t.setAttribute(l,c):t.removeAttribute(l)}s&&n&&(t.innerHTML=e.innerHTML)});return r.observe(e,{attributes:!0,subtree:!0,childList:!0}),r}function sV(e,t,n){const r=new MutationObserver(o=>{for(const s of o)if(s.addedNodes.length!==0)for(const a of Array.from(s.addedNodes)){if(a.contains(e)&&e.nextElementSibling!==t){e.insertAdjacentElement("afterend",t),Ba(n);return}if(a.contains(t)&&t.previousElementSibling!==e){t.insertAdjacentElement("beforebegin",e),Ba(n);return}}});return r.observe(e.ownerDocument.body,{childList:!0,subtree:!0}),r}function aV(e){return new ResizeObserver(()=>{var t,n;const r=new wn(e.placeholder,{frameTransform:e.frameTransform,ignoreTransforms:!0}),o=(t=e.transformOrigin)!=null?t:{x:1,y:1},s=(e.width-r.width)*o.x+e.delta.x,a=(e.height-r.height)*o.y+e.delta.y,l=gw();if(e.styles.set({width:r.width-e.widthOffset,height:r.height-e.heightOffset,top:e.top+a+l.y,left:e.left+s+l.x},yt),(n=e.getElementMutationObserver())==null||n.takeRecords(),Ef(e.element)&&Ef(e.placeholder)){const c=Array.from(e.element.cells),u=Array.from(e.placeholder.cells);e.getSavedCellWidths()||e.setSavedCellWidths(c.map(f=>f.style.width));for(const[f,d]of c.entries()){const p=u[f];d.style.width=`${p.getBoundingClientRect().width}px`}}e.dragOperation.shape=new wn(e.feedbackElement)})}var iV=250,lV="ease";function cV(e){var t,n,r,o;const{animation:s}=e;if(typeof s=="function"){const b=s({element:e.element,feedbackElement:e.feedbackElement,placeholder:e.placeholder,translate:e.translate,moved:e.moved});Promise.resolve(b).then(()=>{e.cleanup(),requestAnimationFrame(e.restoreFocus)});return}const{duration:a=iV,easing:l=lV}=s??{};Ba(e.feedbackElement);const[,c]=(t=pw(e.feedbackElement,b=>"translate"in b))!=null?t:[];c?.pause();const u=(n=e.placeholder)!=null?n:e.element,f={frameTransform:Bw(e.feedbackElement,u)?null:void 0},d=new wn(e.feedbackElement,f),p=(r=za(jn(e.feedbackElement).translate))!=null?r:e.translate,h=new wn(u,f),g=rr.delta(d,h,e.alignment),x={x:p.x-g.x,y:p.y-g.y},v=Math.round(d.intrinsicHeight)!==Math.round(h.intrinsicHeight)?{minHeight:[`${d.intrinsicHeight}px`,`${h.intrinsicHeight}px`],maxHeight:[`${d.intrinsicHeight}px`,`${h.intrinsicHeight}px`]}:{},y=Math.round(d.intrinsicWidth)!==Math.round(h.intrinsicWidth)?{minWidth:[`${d.intrinsicWidth}px`,`${h.intrinsicWidth}px`],maxWidth:[`${d.intrinsicWidth}px`,`${h.intrinsicWidth}px`]}:{};e.styles.set({transition:e.transition},yt),e.feedbackElement.setAttribute(Sf,""),(o=e.getElementMutationObserver())==null||o.takeRecords(),_w({element:e.feedbackElement,keyframes:Gh(Ha(Ha({},v),y),{translate:[`${p.x}px ${p.y}px 0`,`${x.x}px ${x.y}px 0`]}),options:{duration:Bh(Jt(e.feedbackElement))?0:e.moved||e.feedbackElement!==e.element?a:0,easing:l}}).then(()=>{e.feedbackElement.removeAttribute(Sf),c?.finish(),e.cleanup(),requestAnimationFrame(e.restoreFocus)})}var zw,Nf,Ga,Kh,yl,Ww,Hw,Ua=class extends(Nf=Ct,zw=[Re],Nf){constructor(t,n){super(t,n),qe(this,yl),qe(this,Kh,et(Ga,8,this)),et(Ga,11,this),this.state={initial:{},current:{}};const r=t.registry.plugins.get(Eo),o=r?.register(Q$);if(o){const s=this.destroy.bind(this);this.destroy=()=>{o(),s()}}this.registerEffect(po(this,yl,Ww).bind(this,r)),this.registerEffect(po(this,yl,Hw))}};Ga=$s(Nf);Kh=new WeakMap;yl=new WeakSet;Ww=function(e){const{overlay:t}=this;if(!t||!e)return;const n=Zl(t);if(n)return e.addRoot(n)};Hw=function(){var e,t,n;const{state:r,manager:o,options:s}=this,{dragOperation:a}=o,{position:l,source:c,status:u}=a;if(u.idle){r.current={},r.initial={};return}if(!c)return;const{element:f,feedback:d}=c;if(!f||d==="none"||!u.initialized||u.initializing)return;const{initial:p}=r,h=(e=this.overlay)!=null?e:f,g=gs(h),x=gs(f),v=!Bw(f,h),y=new wn(f,{frameTransform:v?x:null,ignoreTransforms:!v}),b={x:x.scaleX/g.scaleX,y:x.scaleY/g.scaleY};let{width:S,height:w,top:E,left:N}=y;v&&(S=S/b.x,w=w/b.y);const _=new j$(h),{transition:k,translate:I,boxSizing:F,paddingBlockStart:U,paddingBlockEnd:O,paddingInlineStart:R,paddingInlineEnd:L,borderInlineStartWidth:V,borderInlineEndWidth:D,borderBlockStartWidth:$,borderBlockEndWidth:z}=jn(f),T=d==="clone",M=F==="content-box",G=M?parseInt(R)+parseInt(L)+parseInt(V)+parseInt(D):0,A=M?parseInt(U)+parseInt(O)+parseInt($)+parseInt(z):0,W=d!=="move"&&!this.overlay?eV(c,T?"clone":"hidden"):null,H=Le(()=>Wa(o.dragOperation.activatorEvent));if(I!=="none"){const je=za(I);je&&!p.translate&&(p.translate=je)}if(!p.transformOrigin){const je=Le(()=>l.current);p.transformOrigin={x:(je.x-N*g.scaleX-g.x)/(S*g.scaleX),y:(je.y-E*g.scaleY-g.y)/(w*g.scaleY)}}const{transformOrigin:P}=p,B=E*g.scaleY+g.y,Y=N*g.scaleX+g.x;if(!p.coordinates&&(p.coordinates={x:Y,y:B},b.x!==1||b.y!==1)){const{scaleX:je,scaleY:Me}=x,{x:Ue,y:Lt}=P;p.coordinates.x+=(S*je-S)*Ue,p.coordinates.y+=(w*Me-w)*Lt}p.dimensions||(p.dimensions={width:S,height:w}),p.frameTransform||(p.frameTransform=g);const Z={x:p.coordinates.x-Y,y:p.coordinates.y-B},q={width:(p.dimensions.width*p.frameTransform.scaleX-S*g.scaleX)*P.x,height:(p.dimensions.height*p.frameTransform.scaleY-w*g.scaleY)*P.y},oe={x:Z.x/g.scaleX+q.width,y:Z.y/g.scaleY+q.height},ne={left:N+oe.x,top:E+oe.y};h.setAttribute(Mn,"true");const le=Le(()=>a.transform),Ee=(t=p.translate)!=null?t:{x:0,y:0},re=le.x*g.scaleX+Ee.x,ce=le.y*g.scaleY+Ee.y,K=gw();_.set({width:S-G,height:w-A,top:ne.top+K.y,left:ne.left+K.x,translate:`${re}px ${ce}px 0`,transition:k?`${k}, translate 0ms linear`:"",scale:v?`${b.x} ${b.y}`:"","transform-origin":`${P.x*100}% ${P.y*100}%`},yt),W&&(f.insertAdjacentElement("afterend",W),s?.rootElement&&(typeof s.rootElement=="function"?s.rootElement(c):s.rootElement).appendChild(f)),vf(h)&&(h.hasAttribute("popover")||h.setAttribute("popover","manual"),Ba(h),h.addEventListener("beforetoggle",q1));let Q,ae,J;const be=aV({placeholder:W,element:f,feedbackElement:h,frameTransform:g,transformOrigin:P,width:S,height:w,top:E,left:N,widthOffset:G,heightOffset:A,delta:oe,styles:_,dragOperation:a,getElementMutationObserver:()=>Q,getSavedCellWidths:()=>J,setSavedCellWidths:je=>{J=je}}),ge=new wn(h);Le(()=>a.shape=ge);const fe=Jt(h),Te=je=>{this.manager.actions.stop({event:je})},Pe=Bh(fe);H&&fe.addEventListener("resize",Te),Le(()=>c.status)==="idle"&&requestAnimationFrame(()=>c.status="dragging"),W&&(be.observe(W),Q=oV(f,W,T),ae=sV(f,W,h));const We=(n=o.dragOperation.source)==null?void 0:n.id,nt=()=>{var je;if(!H||We==null)return;const Me=o.registry.draggables.get(We),Ue=(je=Me?.handle)!=null?je:Me?.element;uo(Ue)&&Ue.focus()},dt=()=>{var je;if(Q?.disconnect(),ae?.disconnect(),be.disconnect(),fe.removeEventListener("resize",Te),vf(h)&&(h.removeEventListener("beforetoggle",q1),h.removeAttribute("popover")),h.removeAttribute(Mn),_.reset(),J&&Ef(f)){const Ue=Array.from(f.cells);for(const[Lt,Gt]of Ue.entries())Gt.style.width=(je=J[Lt])!=null?je:""}c.status="idle";const Me=r.current.translate!=null;W&&(Me||W.parentElement!==h.parentElement)&&h.isConnected&&W.replaceWith(h),W?.remove()},fn=s?.dropAnimation,Ot=this,Nt=xi(()=>{var je;const{transform:Me,status:Ue}=a;if(!(!Me.x&&!Me.y&&!r.current.translate)&&Ue.dragging){const Lt=(je=p.translate)!=null?je:{x:0,y:0},Gt={x:Me.x/g.scaleX+Lt.x,y:Me.y/g.scaleY+Lt.y},Ir=r.current.translate,_o=Le(()=>a.modifiers),Hn=Le(()=>{var _e;return(_e=a.shape)==null?void 0:_e.current}),pe=H&&!Pe?"250ms cubic-bezier(0.25, 1, 0.5, 1)":"0ms linear";if(_.set({transition:`${k}, translate ${pe}`,translate:`${Gt.x}px ${Gt.y}px 0`},yt),Q?.takeRecords(),Hn&&Hn!==ge&&Ir&&!_o.length){const _e=sn.delta(Gt,Ir);a.shape=rr.from(Hn.boundingRectangle).translate(_e.x*g.scaleX,_e.y*g.scaleY)}else a.shape=new wn(h);r.current.translate=Gt}},function(){if(a.status.dropped){this.dispose(),c.status="dropping";const je=Ot.dropAnimation!==void 0?Ot.dropAnimation:fn;let Me=r.current.translate;const Ue=Me!=null;if(!Me&&f!==h&&(Me={x:0,y:0}),!Me||je===null){dt();return}o.renderer.rendering.then(()=>{cV({element:f,feedbackElement:h,placeholder:W,translate:Me,moved:Ue,transition:k,alignment:c.alignment,styles:_,animation:je??void 0,getElementMutationObserver:()=>Q,cleanup:dt,restoreFocus:nt})})}});return()=>{dt(),Nt()}};Qt(Ga,4,"overlay",zw,Ua,Kh);So(Ga,Ua);Ua.configure=mh(Ua);var _f=Ua,qs=!0,uV=!1,Gw,Uw,Yw,Kw,vr,Zh,qh;Kw=(Yw=[Re],ln.Forward),Uw=(Gw=[Re],ln.Reverse);var Ya=class{constructor(){qe(this,Zh,et(vr,8,this,qs)),et(vr,11,this),qe(this,qh,et(vr,12,this,qs)),et(vr,15,this)}isLocked(e){return e===ln.Idle?!1:e==null?this[ln.Forward]===qs&&this[ln.Reverse]===qs:this[e]===qs}unlock(e){e!==ln.Idle&&(this[e]=uV)}};vr=$s(null);Zh=new WeakMap;qh=new WeakMap;Qt(vr,4,Kw,Yw,Ya,Zh);Qt(vr,4,Uw,Gw,Ya,qh);So(vr,Ya);var dV=[ln.Forward,ln.Reverse],X1=class{constructor(){this.x=new Ya,this.y=new Ya}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},fV=class extends Ct{constructor(e){super(e);const t=gi(new X1);let n=null;this.signal=t,Ht(()=>{const{status:r}=e.dragOperation;if(!r.initialized){n=null,t.value=new X1;return}const{delta:o}=e.dragOperation.position;if(n){const s={x:J1(o.x,n.x),y:J1(o.y,n.y)},a=t.peek();Je(()=>{for(const l of C4)for(const c of dV)s[l]===c&&a[l].unlock(c);t.value=a})}n=o})}get current(){return this.signal.peek()}};function J1(e,t){return Math.sign(e-t)}var Zw,jf,Ka,Xh,mr,kf,Ci=class extends(jf=yi,Zw=[Re],jf){constructor(e){super(e),qe(this,Xh,et(Ka,8,this,!1)),et(Ka,11,this),qe(this,mr),qe(this,kf,()=>{if(!ze(this,mr))return;const{element:s,by:a}=ze(this,mr);a.y&&(s.scrollTop+=a.y),a.x&&(s.scrollLeft+=a.x)}),this.scroll=s=>{var a;if(this.disabled)return!1;const l=this.getScrollableElements();if(!l)return Rt(this,mr,void 0),!1;const{position:c}=this.manager.dragOperation,u=c?.current;if(u){const{by:f}=s??{},d=f?{x:Q1(f.x),y:Q1(f.y)}:void 0,p=d?void 0:this.scrollIntentTracker.current;if(p?.isLocked())return!1;for(const h of l){const g=a$(h,f);if(g.x||g.y){const{speed:x,direction:v}=v$(h,u,d);if(p)for(const y of C4)p[y].isLocked(v[y])&&(x[y]=0,v[y]=0);if(v.x||v.y){const{x:y,y:b}=f??v,S=y*x.x,w=b*x.y;if(S||w){const E=(a=ze(this,mr))==null?void 0:a.by;if(this.autoScrolling&&E&&(E.x&&!S||E.y&&!w))continue;return Rt(this,mr,{element:h,by:{x:S,y:w}}),Jl.schedule(ze(this,kf)),!0}}}}}return Rt(this,mr,void 0),!1};let t=null,n=null;const r=Fa(()=>{const{position:s,source:a}=e.dragOperation;if(!s)return null;const l=xw(Zl(a?.element),s.current);return l&&(t=l),l??t}),o=Fa(()=>{const s=r.value,{documentElement:a}=Co(s);if(!s||s===a){const{target:l}=e.dragOperation,c=l?.element;if(c){const u=yf(c,{excludeElement:!1});return n=u,u}}if(s){const l=yf(s,{excludeElement:!1});return this.autoScrolling&&n&&l.size<n?.size?n:(n=l,l)}return n=null,null},Cr);this.getScrollableElements=()=>o.value,this.scrollIntentTracker=new fV(e),this.destroy=e.monitor.addEventListener("dragmove",s=>{this.disabled||s.defaultPrevented||!Wa(e.dragOperation.activatorEvent)||!s.by||this.scroll({by:s.by})&&s.preventDefault()})}};Ka=$s(jf);Xh=new WeakMap;mr=new WeakMap;kf=new WeakMap;Qt(Ka,4,"autoScrolling",Zw,Ci,Xh);So(Ka,Ci);function Q1(e){return e>0?ln.Forward:e<0?ln.Reverse:ln.Idle}var pV=class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{const{tasks:t,resolvers:n}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(const r of t)r();for(const r of n)r()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(t=>this.resolvers.add(t))}},hV=new pV(e=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(e):e()}),mV=10,qw=class extends Ct{constructor(e,t){super(e);const n=e.registry.plugins.get(Ci);if(!n)throw new Error("AutoScroller plugin depends on Scroller plugin");this.destroy=Ht(()=>{if(this.disabled)return;const{position:r,status:o}=e.dragOperation;if(o.dragging)if(n.scroll()){n.autoScrolling=!0;const a=setInterval(()=>hV.schedule(n.scroll),mV);return()=>{clearInterval(a)}}else n.autoScrolling=!1})}},e0={capture:!0,passive:!0},pa,gV=class extends yi{constructor(e){super(e),qe(this,pa),this.handleScroll=()=>{ze(this,pa)==null&&Rt(this,pa,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),Rt(this,pa,void 0)},50))};const{dragOperation:t}=this.manager;this.destroy=Ht(()=>{var n,r,o;if(t.status.dragging){const a=(o=(r=(n=t.source)==null?void 0:n.element)==null?void 0:r.ownerDocument)!=null?o:document;return a.addEventListener("scroll",this.handleScroll,e0),()=>{a.removeEventListener("scroll",this.handleScroll,e0)}}})}};pa=new WeakMap;var xV=class extends Ct{constructor(e,t){super(e,t),this.manager=e,this.destroy=Ht(()=>{var n;const{dragOperation:r}=this.manager,{nonce:o}=(n=this.options)!=null?n:{};if(r.status.initialized){const s=document.createElement("style");return o&&s.setAttribute("nonce",o),s.textContent="* { user-select: none !important; -webkit-user-select: none !important; }",document.head.appendChild(s),td(),document.addEventListener("selectionchange",td,{capture:!0}),()=>{document.removeEventListener("selectionchange",td,{capture:!0}),s.remove()}}})}};function td(){var e;(e=document.getSelection())==null||e.removeAllRanges()}var ha=Object.freeze({offset:10,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter","Tab"],up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]},preventActivation(e,t){var n;const r=(n=t.handle)!=null?n:t.element;return e.target!==r}}),Ko,rc=class extends ps{constructor(t,n){super(t),this.manager=t,this.options=n,qe(this,Ko,[]),this.listeners=new vw,this.handleSourceKeyDown=(r,o,s)=>{if(this.disabled||r.defaultPrevented||!fo(r.target)||o.disabled)return;const{keyboardCodes:a=ha.keyboardCodes,preventActivation:l=ha.preventActivation}=s??{};a.start.includes(r.code)&&this.manager.dragOperation.status.idle&&(l?.(r,o)||this.handleStart(r,o,s))}}bind(t,n=this.options){return Ht(()=>{var o;const s=(o=t.handle)!=null?o:t.element,a=l=>{Wa(l)&&this.handleSourceKeyDown(l,t,n)};if(s)return s.addEventListener("keydown",a),()=>{s.removeEventListener("keydown",a)}})}handleStart(t,n,r){const{element:o}=n;if(!o)throw new Error("Source draggable does not have an associated element");t.preventDefault(),t.stopImmediatePropagation(),Nw(o);const{center:s}=new wn(o);if(this.manager.actions.start({event:t,coordinates:{x:s.x,y:s.y},source:n}).signal.aborted)return this.cleanup();this.sideEffects();const l=Co(o),c=[this.listeners.bind(l,[{type:"keydown",listener:u=>this.handleKeyDown(u,n,r),options:{capture:!0}}])];ze(this,Ko).push(...c)}handleKeyDown(t,n,r){const{keyboardCodes:o=ha.keyboardCodes}=r??{};if(Lo(t,[...o.end,...o.cancel])){t.preventDefault();const s=Lo(t,o.cancel);this.handleEnd(t,s);return}Lo(t,o.up)?this.handleMove("up",t):Lo(t,o.down)&&this.handleMove("down",t),Lo(t,o.left)?this.handleMove("left",t):Lo(t,o.right)&&this.handleMove("right",t)}handleEnd(t,n){this.manager.actions.stop({event:t,canceled:n}),this.cleanup()}handleMove(t,n){var r,o;const{shape:s}=this.manager.dragOperation,a=n.shiftKey?5:1;let l={x:0,y:0},c=(o=(r=this.options)==null?void 0:r.offset)!=null?o:ha.offset;if(typeof c=="number"&&(c={x:c,y:c}),!!s){switch(t){case"up":l={x:0,y:-c.y*a};break;case"down":l={x:0,y:c.y*a};break;case"left":l={x:-c.x*a,y:0};break;case"right":l={x:c.x*a,y:0};break}(l.x||l.y)&&(n.preventDefault(),this.manager.actions.move({event:n,by:l}))}}sideEffects(){const t=this.manager.registry.plugins.get(qw);t?.disabled===!1&&(t.disable(),ze(this,Ko).push(()=>{t.enable()}))}cleanup(){ze(this,Ko).forEach(t=>t()),Rt(this,Ko,[])}destroy(){this.cleanup(),this.listeners.clear()}};Ko=new WeakMap;rc.configure=mh(rc);rc.defaults=ha;var vV=rc;function Lo(e,t){return t.includes(e.code)}var qr,yV=class extends tw{constructor(){super(...arguments),qe(this,qr)}onEvent(e){switch(e.type){case"pointerdown":Rt(this,qr,hs(e));break;case"pointermove":if(!ze(this,qr))return;const{x:t,y:n}=hs(e),r={x:t-ze(this,qr).x,y:n-ze(this,qr).y},{tolerance:o}=this.options;if(o&&df(r,o)){this.abort();return}df(r,this.options.value)&&this.activate(e);break;case"pointerup":this.abort();break}}abort(){Rt(this,qr,void 0)}};qr=new WeakMap;var Zo,Xr,bV=class extends tw{constructor(){super(...arguments),qe(this,Zo),qe(this,Xr)}onEvent(e){switch(e.type){case"pointerdown":Rt(this,Xr,hs(e)),Rt(this,Zo,setTimeout(()=>this.activate(e),this.options.value));break;case"pointermove":if(!ze(this,Xr))return;const{x:t,y:n}=hs(e),r={x:t-ze(this,Xr).x,y:n-ze(this,Xr).y};df(r,this.options.tolerance)&&this.abort();break;case"pointerup":this.abort();break}}abort(){ze(this,Zo)&&(clearTimeout(ze(this,Zo)),Rt(this,Xr,void 0),Rt(this,Zo,void 0))}};Zo=new WeakMap;Xr=new WeakMap;var Jo=class{};Jo.Delay=bV;Jo.Distance=yV;var Rf=Object.freeze({activationConstraints(e,t){var n;const{pointerType:r,target:o}=e;if(!(r==="mouse"&&fo(o)&&(t.handle===o||(n=t.handle)!=null&&n.contains(o))))return r==="touch"?[new Jo.Delay({value:250,tolerance:5})]:R$(o)&&!e.defaultPrevented?[new Jo.Delay({value:200,tolerance:0})]:[new Jo.Delay({value:200,tolerance:10}),new Jo.Distance({value:5})]},preventActivation(e,t){var n;const{target:r}=e;return r===t.element||r===t.handle||!fo(r)||(n=t.handle)!=null&&n.contains(r)?!1:ZF(r)}}),qo,oc=class extends ps{constructor(t,n){super(t),this.manager=t,this.options=n,qe(this,qo,new Set),this.listeners=new vw,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{const{event:r,coordinates:o}=this.latest;!r||!o||this.manager.actions.move({event:r,to:o})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(t,n,r=this.options){const{activationConstraints:o=Rf.activationConstraints}=r??{};return typeof o=="function"?o(t,n):o}bind(t,n=this.options){return Ht(()=>{var o;const s=new AbortController,{signal:a}=s,l=u=>{k$(u)&&this.handlePointerDown(u,t,n)};let c=[(o=t.handle)!=null?o:t.element];n?.activatorElements&&(Array.isArray(n.activatorElements)?c=n.activatorElements:c=n.activatorElements(t));for(const u of c)u&&(EV(u.ownerDocument.defaultView),u.addEventListener("pointerdown",l,{signal:a}));return()=>s.abort()})}handlePointerDown(t,n,r){if(this.disabled||!t.isPrimary||t.button!==0||!fo(t.target)||n.disabled||CV(t)||!this.manager.dragOperation.status.idle)return;const{preventActivation:o=Rf.preventActivation}=r??{};if(o?.(t,n))return;const{target:s}=t,a=uo(s)&&s.draggable&&s.getAttribute("draggable")==="true",l=gs(n.element),{x:c,y:u}=hs(t);this.initialCoordinates={x:c*l.scaleX+l.x,y:u*l.scaleY+l.y};const f=this.activationConstraints(t,n,r);t.sensor=this;const d=new VF(f,x=>this.handleStart(n,x));d.signal.onabort=()=>this.handleCancel(t),d.onEvent(t),this.controller=d;const p=mf(),h=this.listeners.bind(p,[{type:"pointermove",listener:x=>this.handlePointerMove(x,n)},{type:"pointerup",listener:this.handlePointerUp,options:{capture:!0}},{type:"pointercancel",listener:this.handleCancel},{type:"dragstart",listener:a?this.handleCancel:Xi,options:{capture:!0}}]),g=()=>{h(),this.initialCoordinates=void 0};ze(this,qo).add(g)}handlePointerMove(t,n){var r,o;if(((r=this.controller)==null?void 0:r.activated)===!1){(o=this.controller)==null||o.onEvent(t);return}if(this.manager.dragOperation.status.dragging){const s=hs(t),a=gs(n.element);s.x=s.x*a.scaleX+a.x,s.y=s.y*a.scaleY+a.y,t.preventDefault(),t.stopPropagation(),this.latest.event=t,this.latest.coordinates=s,Jl.schedule(this.handleMove)}}handlePointerUp(t){const{status:n}=this.manager.dragOperation;if(!n.idle){t.preventDefault(),t.stopPropagation();const r=!n.initialized;this.manager.actions.stop({event:t,canceled:r})}this.cleanup()}handleKeyDown(t){t.key==="Escape"&&(t.preventDefault(),this.handleCancel(t))}handleStart(t,n){const{manager:r,initialCoordinates:o}=this;if(!o||!r.dragOperation.status.idle||n.defaultPrevented)return;if(r.actions.start({coordinates:o,event:n,source:t}).signal.aborted)return this.cleanup();n.preventDefault();const l=Co(n.target).body;l.setPointerCapture(n.pointerId);const c=fo(n.target)?[n.target,l]:l,u=this.listeners.bind(c,[{type:"touchmove",listener:Xi,options:{passive:!1}},{type:"click",listener:Xi},{type:"contextmenu",listener:Xi},{type:"keydown",listener:this.handleKeyDown}]);ze(this,qo).add(u)}handleCancel(t){const{dragOperation:n}=this.manager;n.status.initialized&&this.manager.actions.stop({event:t,canceled:!0}),this.cleanup()}cleanup(){this.latest={event:void 0,coordinates:void 0},ze(this,qo).forEach(t=>t()),ze(this,qo).clear()}destroy(){this.cleanup(),this.listeners.clear()}};qo=new WeakMap;oc.configure=mh(oc);oc.defaults=Rf;var wV=oc;function CV(e){return"sensor"in e}function Xi(e){e.preventDefault()}function SV(){}var t0=new WeakSet;function EV(e){!e||t0.has(e)||(e.addEventListener("touchmove",SV,{capture:!1,passive:!1}),t0.add(e))}var rs={modifiers:[],plugins:[K$,qw,q$,_f,xV],sensors:[wV,vV]},Xw=class extends WF{constructor(e={}){const t=Qn(e.plugins,rs.plugins),n=Qn(e.sensors,rs.sensors),r=Qn(e.modifiers,rs.modifiers);super(Gh(Ha({},e),{plugins:[gV,Ci,Eo,...t],sensors:n,modifiers:r}))}},Jw,Qw,e6,Mf,vn,Jh,Qh,em,Si=class extends(Mf=Fn,e6=[Re],Qw=[Re],Jw=[Re],Mf){constructor(e,t){var n=e,{element:r,effects:o=()=>[],handle:s,feedback:a="default"}=n,l=Dw(n,["element","effects","handle","feedback"]);super(Ha({effects:()=>[...o(),()=>{var c,u;const{manager:f}=this;if(!f)return;const p=((u=(c=this.sensors)==null?void 0:c.map(gh))!=null?u:[...f.sensors]).map(h=>{const g=h instanceof ps?h:f.registry.register(h.plugin),x=h instanceof ps?void 0:h.options;return g.bind(this,x)});return function(){p.forEach(g=>g())}}]},l),t),qe(this,Jh,et(vn,8,this)),et(vn,11,this),qe(this,Qh,et(vn,12,this)),et(vn,15,this),qe(this,em,et(vn,16,this)),et(vn,19,this),this.element=r,this.handle=s,this.feedback=a}};vn=$s(Mf);Jh=new WeakMap;Qh=new WeakMap;em=new WeakMap;Qt(vn,4,"handle",e6,Si,Jh);Qt(vn,4,"element",Qw,Si,Qh);Qt(vn,4,"feedback",Jw,Si,em);So(vn,Si);var t6,n6,Df,yr,tm,nd,r6,o6,_a,nm,lu=class extends(Df=$n,n6=[Re],t6=[Re],Df){constructor(e,t){var n=e,{element:r,effects:o=()=>[]}=n,s=Dw(n,["element","effects"]);const{collisionDetector:a=jw}=s,l=u=>{const{manager:f,element:d}=this;if(!d||u===null){this.shape=void 0;return}if(!f)return;const p=new wn(d),h=Le(()=>this.shape);return p&&h?.equals(p)?h:(this.shape=p,p)},c=gi(!1);super(Gh(Ha({},s),{collisionDetector:a,effects:()=>[...o(),()=>{const{element:u,manager:f}=this;if(!f)return;const{dragOperation:d}=f,{source:p}=d;c.value=!!(p&&d.status.initialized&&u&&!this.disabled&&this.accepts(p))},()=>{const{element:u}=this;if(c.value&&u){const f=new s$(u,l);return()=>{f.disconnect(),this.shape=void 0}}},()=>{var u;if((u=this.manager)!=null&&u.dragOperation.status.initialized)return()=>{this.shape=void 0}}]}),t),qe(this,_a),qe(this,tm,et(yr,8,this)),et(yr,11,this),qe(this,nm,et(yr,12,this)),et(yr,15,this),this.element=r,this.refreshShape=()=>l()}set element(e){Rt(this,_a,e,o6)}get element(){var e;return(e=this.proxy)!=null?e:ze(this,_a,r6)}};yr=$s(Df);tm=new WeakMap;_a=new WeakSet;nm=new WeakMap;nd=Qt(yr,20,"#element",n6,_a,tm),r6=nd.get,o6=nd.set;Qt(yr,4,"proxy",t6,lu,nm);So(yr,lu);function NV(e){return e!=null&&typeof e=="object"&&"current"in e}function os(e){var t;if(e!=null)return NV(e)?(t=e.current)!=null?t:void 0:e}var _V=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",No=_V?C.useLayoutEffect:C.useEffect;function s6(){const e=C.useState(0)[1];return C.useCallback(()=>{e(t=>t+1)},[e])}function jV(e,t=!1){const n=C.useRef(e.peek()),r=C.useRef(!1),o=s6();return No(()=>Ht(()=>{const s=n.current,a=e.value;if(s!==a){if(n.current=a,!r.current)return;t?ho.flushSync(o):o()}}),[e,t,o]),{get value(){return r.current=!0,e.peek()}}}function kV(e,t=[],n=!1){const r=C.useRef(e);return r.current=e,jV(C.useMemo(()=>Fa(()=>r.current()),t),n)}function rm(e,t){const n=C.useRef(new Map),r=s6();return No(()=>{if(!e){n.current.clear();return}return Ht(()=>{var o;let s=!1,a=!1;for(const l of n.current){const[c]=l,u=Le(()=>l[1]),f=e[c];u!==f&&(s=!0,n.current.set(c,f),a=(o=t?.(c,u,f))!=null?o:!1)}s&&(a?ho.flushSync(r):r())})},[e]),C.useMemo(()=>e&&new Proxy(e,{get(o,s){const a=o[s];return n.current.set(s,a),a}}),[e])}function RV(e,t){e()}function Io(e){const t=C.useRef(e);return No(()=>{t.current=e},[e]),t}function Ye(e,t,n=C.useEffect,r=Object.is){const o=C.useRef(e);n(()=>{const s=o.current;r(e,s)||(o.current=e,t(e,s))},[t,e])}function bl(e,t){const n=C.useRef(os(e));No(()=>{const r=os(e);r!==n.current&&(n.current=r,t(r))})}var MV=Object.defineProperty,DV=Object.defineProperties,AV=Object.getOwnPropertyDescriptors,sc=Object.getOwnPropertySymbols,a6=Object.prototype.hasOwnProperty,i6=Object.prototype.propertyIsEnumerable,n0=(e,t,n)=>t in e?MV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,PV=(e,t)=>{for(var n in t||(t={}))a6.call(t,n)&&n0(e,n,t[n]);if(sc)for(var n of sc(t))i6.call(t,n)&&n0(e,n,t[n]);return e},TV=(e,t)=>DV(e,AV(t)),OV=(e,t)=>{var n={};for(var r in e)a6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&sc)for(var r of sc(e))t.indexOf(r)<0&&i6.call(e,r)&&(n[r]=e[r]);return n},LV=new Xw,om=C.createContext(LV),IV=C.memo(C.forwardRef(({children:e},t)=>{const[n,r]=C.useState(0),o=C.useRef(null),s=C.useRef(null),a=C.useMemo(()=>({renderer:{get rendering(){var l;return(l=o.current)!=null?l:Promise.resolve()}},trackRendering(l){o.current||(o.current=new Promise(c=>{s.current=c})),C.startTransition(()=>{l(),r(c=>c+1)})}}),[]);return No(()=>{var l;(l=s.current)==null||l.call(s),o.current=null},[e,n]),C.useImperativeHandle(t,()=>a),null})),rd=[void 0,Cr];function l6(e){var t=e,{children:n,onCollision:r,onBeforeDragStart:o,onDragStart:s,onDragMove:a,onDragOver:l,onDragEnd:c}=t,u=OV(t,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);const f=C.useRef(null),{plugins:d,modifiers:p,sensors:h}=u,g=Qn(d,rs.plugins),x=Qn(h,rs.sensors),v=Qn(p,rs.modifiers),y=Io(o),b=Io(s),S=Io(l),w=Io(a),E=Io(c),N=Io(r),_=FV(()=>{var k;return(k=u.manager)!=null?k:new Xw(u)});return C.useEffect(()=>{if(!f.current)throw new Error("Renderer not found");const{renderer:k,trackRendering:I}=f.current,{monitor:F}=_;_.renderer=k;const U=[F.addEventListener("beforedragstart",O=>{const R=y.current;R&&I(()=>R(O,_))}),F.addEventListener("dragstart",O=>{var R;return(R=b.current)==null?void 0:R.call(b,O,_)}),F.addEventListener("dragover",O=>{const R=S.current;R&&I(()=>R(O,_))}),F.addEventListener("dragmove",O=>{const R=w.current;R&&I(()=>R(O,_))}),F.addEventListener("dragend",O=>{const R=E.current;R&&I(()=>R(O,_))}),F.addEventListener("collision",O=>{var R;return(R=N.current)==null?void 0:R.call(N,O,_)})];return()=>U.forEach(O=>O())},[_]),Ye(g,()=>_&&(_.plugins=g),...rd),Ye(x,()=>_&&(_.sensors=x),...rd),Ye(v,()=>_&&(_.modifiers=v),...rd),i.jsxs(om.Provider,{value:_,children:[i.jsx(IV,{ref:f,children:n}),n]})}function FV(e){const t=C.useRef(null);return t.current||(t.current=e()),C.useInsertionEffect(()=>()=>{var n;return(n=t.current)==null?void 0:n.destroy()},[]),t.current}function c6(){return C.useContext(om)}function u6(e){var t;const n=(t=c6())!=null?t:void 0,[r]=C.useState(()=>e(n));return r.manager!==n&&(r.manager=n),No(r.register,[n,r]),r}function $V({children:e,className:t,dropAnimation:n,style:r,tag:o,disabled:s}){var a;const l=C.useRef(null),c=c6(),u=(a=kV(()=>c?.dragOperation.source,[c]).value)!=null?a:null,f=typeof s=="function"?s(u):s;C.useEffect(()=>{if(!l.current||!c||f)return;const h=c.plugins.find(g=>g instanceof _f);if(h)return h.overlay=l.current,()=>{h.overlay=void 0}},[c,f]),C.useEffect(()=>{if(!c)return;const h=c.plugins.find(g=>g instanceof _f);if(h)return h.dropAnimation=n,()=>{h.dropAnimation=void 0}},[c,n]);const d=C.useMemo(()=>{if(!c)return null;const h=new Proxy(c.registry,{get(g,x){return x==="register"||x==="unregister"?VV:g[x]}});return new Proxy(c,{get(g,x){return x==="registry"?h:g[x]}})},[c]);return i.jsx(om.Provider,{value:d,children:C.createElement(o||"div",{ref:l,className:t,style:r,"data-dnd-overlay":!0},p())});function p(){return!u||f?null:typeof e=="function"?i.jsx(BV,{source:u,children:e}):e}}function VV(){return()=>{}}function BV({children:e,source:t}){return e(rm(t))}var zV=Object.create,d6=Object.defineProperty,WV=Object.getOwnPropertyDescriptor,f6=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),cu=e=>{throw TypeError(e)},HV=(e,t,n)=>t in e?d6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,GV=e=>{var t;return[,,,zV((t=e?.[f6("metadata")])!=null?t:null)]},p6=["class","method","getter","setter","accessor","field","value","get","set"],h6=e=>e!==void 0&&typeof e!="function"?cu("Function expected"):e,UV=(e,t,n,r,o)=>({kind:p6[e],name:t,metadata:r,addInitializer:s=>n._?cu("Already initialized"):o.push(h6(s||null))}),YV=(e,t)=>HV(t,f6("metadata"),e[3]),KV=(e,t,n,r)=>{for(var o=0,s=e[t>>1],a=s&&s.length;o<a;o++)s[o].call(n);return r},m6=(e,t,n,r,o,s)=>{for(var a,l,c,u,f=t&7,d=!1,p=!1,h=2,g=p6[f+5],x=e[h]||(e[h]=[]),v=(o=o.prototype,WV(o,n)),y=r.length-1;y>=0;y--)c=UV(f,n,l={},e[3],x),c.static=d,c.private=p,u=c.access={has:b=>n in b},u.get=b=>b[n],a=(0,r[y])(v[g],c),l._=1,h6(a)&&(v[g]=a);return v&&d6(o,n,v),o},g6=(e,t,n)=>t.has(e)||cu("Cannot "+n),ZV=(e,t,n)=>(g6(e,t,"read from private field"),t.get(e)),qV=(e,t,n)=>t.has(e)?cu("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),XV=(e,t,n,r)=>(g6(e,t,"write to private field"),t.set(e,n),n),Qr=class Af{constructor(t,n){this.x=t,this.y=n}static delta(t,n){return new Af(t.x-n.x,t.y-n.y)}static distance(t,n){return Math.hypot(t.x-n.x,t.y-n.y)}static equals(t,n){return t.x===n.x&&t.y===n.y}static from({x:t,y:n}){return new Af(t,n)}},x6,v6,Pf,wl,Ei,sm=class extends(Pf=bo,v6=[Qe],x6=[Qe],Pf){constructor(e){const t=Qr.from(e);super(t,(n,r)=>Qr.equals(n,r)),KV(Ei,5,this),qV(this,wl,0),this.velocity={x:0,y:0}}get delta(){return Qr.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const n={x:e.x-t.x,y:e.y-t.y};return!n.x&&!n.y?null:Math.abs(n.x)>Math.abs(n.y)?n.x>0?"right":"left":n.y>0?"down":"up"}get current(){return super.current}set current(e){const{current:t}=this,n=Qr.from(e),r={x:n.x-t.x,y:n.y-t.y},o=Date.now(),s=o-ZV(this,wl),a=l=>Math.round(l/s*100);Je(()=>{XV(this,wl,o),this.velocity={x:a(r.x),y:a(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(Qr.from(e)),this.velocity={x:0,y:0}}};Ei=GV(Pf);wl=new WeakMap;m6(Ei,2,"delta",v6,sm);m6(Ei,2,"direction",x6,sm);YV(Ei,sm);var y6=(e=>(e.Horizontal="x",e.Vertical="y",e))(y6||{});Object.values(y6);var JV=({dragOperation:e,droppable:t})=>{const n=e.position.current;if(!n)return null;const{id:r}=t;if(!t.shape)return null;if(t.shape.containsPoint(n)){const o=Qr.distance(t.shape.center,n);return{id:r,value:1/o,type:Is.PointerIntersection,priority:Ls.High}}return null},QV=({dragOperation:e,droppable:t})=>{const{shape:n}=e;if(!t.shape||!n?.current)return null;const r=n.current.intersectionArea(t.shape);if(r){const{position:o}=e,s=Qr.distance(t.shape.center,o.current),l=r/(n.current.area+t.shape.area-r)/s;return{id:t.id,value:l,type:Is.ShapeIntersection,priority:Ls.Normal}}return null},eB=e=>{var t;return(t=JV(e))!=null?t:QV(e)};function tB(e){const{collisionDetector:t,data:n,disabled:r,element:o,id:s,accept:a,type:l}=e,c=u6(f=>new lu(TV(PV({},e),{register:!1,element:os(o)}),f)),u=rm(c);return Ye(s,()=>c.id=s),bl(o,f=>c.element=f),Ye(a,()=>c.accept=a,void 0,Cr),Ye(t,()=>c.collisionDetector=t??eB),Ye(n,()=>n&&(c.data=n)),Ye(r,()=>c.disabled=r===!0),Ye(l,()=>c.type=l),{droppable:u,get isDropTarget(){return u.isDropTarget},ref:C.useCallback(f=>{var d,p;!f&&((d=c.element)!=null&&d.isConnected)&&!((p=c.manager)!=null&&p.dragOperation.status.idle)||(c.element=f??void 0)},[c])}}var nB=Object.defineProperty,rB=Object.defineProperties,oB=Object.getOwnPropertyDescriptors,r0=Object.getOwnPropertySymbols,sB=Object.prototype.hasOwnProperty,aB=Object.prototype.propertyIsEnumerable,o0=(e,t,n)=>t in e?nB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fo=(e,t)=>{for(var n in t||(t={}))sB.call(t,n)&&o0(e,n,t[n]);if(r0)for(var n of r0(t))aB.call(t,n)&&o0(e,n,t[n]);return e},$o=(e,t)=>rB(e,oB(t));function iB(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function od(e){return"initialIndex"in e&&typeof e.initialIndex=="number"&&"index"in e&&typeof e.index=="number"}function lB(e,t,n){var r,o,s;const{source:a,target:l,canceled:c}=t.operation;if(!a||!l||c)return"preventDefault"in t&&t.preventDefault(),e;const u=(w,E)=>w===E||typeof w=="object"&&"id"in w&&w.id===E;if(Array.isArray(e)){const w=e.findIndex(N=>u(N,a.id)),E=e.findIndex(N=>u(N,l.id));if(w===-1||E===-1){if(od(a)){const N=a.initialIndex,_=a.index;return N===_||N<0||N>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,N,_)}return e}if(!c&&"index"in a&&typeof a.index=="number"){const N=a.index;if(N!==w)return n(e,w,N)}return n(e,w,E)}const f=Object.entries(e);let d=-1,p,h=-1,g;for(const[w,E]of f)if(d===-1&&(d=E.findIndex(N=>u(N,a.id)),d!==-1&&(p=w)),h===-1&&(h=E.findIndex(N=>u(N,l.id)),h!==-1&&(g=w)),d!==-1&&h!==-1)break;if(d===-1&&od(a)){const w=a.initialGroup,E=a.initialIndex,N=a.group,_=a.index;if(w==null||N==null||!(w in e)||!(N in e)||w===N&&E===_)return"preventDefault"in t&&t.preventDefault(),e;if(w===N)return $o(Fo({},e),{[w]:n(e[w],E,_)});const k=e[w][E];return $o(Fo({},e),{[w]:[...e[w].slice(0,E),...e[w].slice(E+1)],[N]:[...e[N].slice(0,_),k,...e[N].slice(_)]})}if(!a.manager)return e;const{dragOperation:x}=a.manager,v=(o=(r=x.shape)==null?void 0:r.current.center)!=null?o:x.position.current;if(g==null&&l.id in e){const w=l.shape&&v.y>l.shape.center.y?e[l.id].length:0;g=l.id,h=w}if(p==null||g==null||p===g&&d===h){if(p!=null&&p===g&&d===h&&od(a)){const w=a.group!=null&&a.group!==p,E=a.index!==d;if(w||E){const N=(s=a.group)!=null?s:p;if(N in e){if(p===N)return $o(Fo({},e),{[p]:n(e[p],d,a.index)});const _=e[p][d];return $o(Fo({},e),{[p]:[...e[p].slice(0,d),...e[p].slice(d+1)],[N]:[...e[N].slice(0,a.index),_,...e[N].slice(a.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(p===g)return $o(Fo({},e),{[p]:n(e[p],d,h)});const b=l.shape&&Math.round(v.y)>Math.round(l.shape.center.y)?1:0,S=e[p][d];return $o(Fo({},e),{[p]:[...e[p].slice(0,d),...e[p].slice(d+1)],[g]:[...e[g].slice(0,h+b),S,...e[g].slice(h+b)]})}function b6(e,t){return lB(e,t,iB)}const uu={ascending:"Ascending",descending:"Descending",clearSorting:"Clear sorting",pinToLeft:"Pin to the left",pinToRight:"Pin to the right",unpin:"Unpin",hide:"Hide",lastColumn:"(Last column)",manageColumns:"Manage columns",hideAll:"Hide all",showAll:"Show all",searchColumns:"Search columns...",noColumnsFound:"No columns found",noResults:"No results",noDataAvailable:"No data available",sortAscending:"Sort ascending",sortDescending:"Sort descending",pinnedColumn:"Pinned column",menu:"Menu",actions:"Actions",selectAll:"Select all",selectRow:"Select row",expandRow:"Row {{row}} details"},w6={en:uu,es:{ascending:"Ascendente",descending:"Descendente",clearSorting:"Quitar orden",pinToLeft:"Fijar a la izquierda",pinToRight:"Fijar a la derecha",unpin:"Desfijar",hide:"Ocultar",lastColumn:"(Última columna)",manageColumns:"Gestionar columnas",hideAll:"Ocultar todo",showAll:"Mostrar todo",searchColumns:"Buscar columnas...",noColumnsFound:"No se encontraron columnas",noResults:"Sin resultados",noDataAvailable:"No hay datos disponibles",sortAscending:"Ordenar ascendente",sortDescending:"Ordenar descendente",pinnedColumn:"Columna fijada",menu:"Menú",actions:"Acciones",selectAll:"Seleccionar todo",selectRow:"Seleccionar fila",expandRow:"Detalle de la fila {{row}}"},ja:{ascending:"昇順",descending:"降順",clearSorting:"並び替えを解除",pinToLeft:"左に固定",pinToRight:"右に固定",unpin:"固定解除",hide:"非表示",lastColumn:"(最後の列)",manageColumns:"列の管理",hideAll:"すべて非表示",showAll:"すべて表示",searchColumns:"列を検索...",noColumnsFound:"列が見つかりません",noResults:"結果なし",noDataAvailable:"データがありません",sortAscending:"昇順で並び替え",sortDescending:"降順で並び替え",pinnedColumn:"固定された列",menu:"メニュー",actions:"アクション",selectAll:"すべて選択",selectRow:"行を選択",expandRow:"{{row}} 行目の詳細"},ar:{ascending:"تصاعدي",descending:"تنازلي",clearSorting:"مسح الترتيب",pinToLeft:"تثبيت لليسار",pinToRight:"تثبيت لليمين",unpin:"إلغاء التثبيت",hide:"إخفاء",lastColumn:"(آخر عمود)",manageColumns:"إدارة الأعمدة",hideAll:"إخفاء الكل",showAll:"إظهار الكل",searchColumns:"البحث في الأعمدة...",noColumnsFound:"لم يتم العثور على أعمدة",noResults:"لا توجد نتائج",noDataAvailable:"لا توجد بيانات",sortAscending:"ترتيب تصاعدي",sortDescending:"ترتيب تنازلي",pinnedColumn:"عمود مثبت",menu:"القائمة",actions:"الإجراءات",selectAll:"تحديد الكل",selectRow:"تحديد الصف",expandRow:"تفاصيل الصف {{row}}"},fr:{ascending:"Croissant",descending:"Décroissant",clearSorting:"Effacer le tri",pinToLeft:"Épingler à gauche",pinToRight:"Épingler à droite",unpin:"Désépingler",hide:"Masquer",lastColumn:"(Dernière colonne)",manageColumns:"Gérer les colonnes",hideAll:"Tout masquer",showAll:"Tout afficher",searchColumns:"Rechercher des colonnes...",noColumnsFound:"Aucune colonne trouvée",noResults:"Aucun résultat",noDataAvailable:"Aucune donnée disponible",sortAscending:"Trier par ordre croissant",sortDescending:"Trier par ordre décroissant",pinnedColumn:"Colonne épinglée",menu:"Menu",actions:"Actions",selectAll:"Tout sélectionner",selectRow:"Sélectionner la ligne",expandRow:"Détails de la ligne {{row}}"},pt:{ascending:"Crescente",descending:"Decrescente",clearSorting:"Limpar ordenação",pinToLeft:"Fixar à esquerda",pinToRight:"Fixar à direita",unpin:"Desfixar",hide:"Ocultar",lastColumn:"(Última coluna)",manageColumns:"Gerenciar colunas",hideAll:"Ocultar tudo",showAll:"Mostrar tudo",searchColumns:"Pesquisar colunas...",noColumnsFound:"Nenhuma coluna encontrada",noResults:"Sem resultados",noDataAvailable:"Nenhum dado disponível",sortAscending:"Ordenar crescente",sortDescending:"Ordenar decrescente",pinnedColumn:"Coluna fixada",menu:"Menu",actions:"Ações",selectAll:"Selecionar tudo",selectRow:"Selecionar linha",expandRow:"Detalhes da linha {{row}}"},tr:{ascending:"Artan",descending:"Azalan",clearSorting:"Sıralamayı temizle",pinToLeft:"Sola sabitle",pinToRight:"Sağa sabitle",unpin:"Sabitlemeyi kaldır",hide:"Gizle",lastColumn:"(Son sütun)",manageColumns:"Sütunları yönet",hideAll:"Tümünü gizle",showAll:"Tümünü göster",searchColumns:"Sütunları ara...",noColumnsFound:"Sütun bulunamadı",noResults:"Sonuç yok",noDataAvailable:"Veri mevcut değil",sortAscending:"Artan sırala",sortDescending:"Azalan sırala",pinnedColumn:"Sabitlenmiş sütun",menu:"Menü",actions:"Eylemler",selectAll:"Tümünü seç",selectRow:"Satır seç",expandRow:"{{row}}. satırın ayrıntıları"},ru:{ascending:"По возрастанию",descending:"По убыванию",clearSorting:"Сбросить сортировку",pinToLeft:"Закрепить слева",pinToRight:"Закрепить справа",unpin:"Открепить",hide:"Скрыть",lastColumn:"(Последняя колонка)",manageColumns:"Управление колонками",hideAll:"Скрыть все",showAll:"Показать все",searchColumns:"Поиск колонок...",noColumnsFound:"Колонки не найдены",noResults:"Нет результатов",noDataAvailable:"Данные недоступны",sortAscending:"Сортировать по возрастанию",sortDescending:"Сортировать по убыванию",pinnedColumn:"Закреплённая колонка",menu:"Меню",actions:"Действия",selectAll:"Выбрать все",selectRow:"Выбрать строку",expandRow:"Сведения о строке {{row}}"},de:{ascending:"Aufsteigend",descending:"Absteigend",clearSorting:"Sortierung löschen",pinToLeft:"Links fixieren",pinToRight:"Rechts fixieren",unpin:"Fixierung aufheben",hide:"Ausblenden",lastColumn:"(Letzte Spalte)",manageColumns:"Spalten verwalten",hideAll:"Alle ausblenden",showAll:"Alle anzeigen",searchColumns:"Spalten suchen...",noColumnsFound:"Keine Spalten gefunden",noResults:"Keine Ergebnisse",noDataAvailable:"Keine Daten verfügbar",sortAscending:"Aufsteigend sortieren",sortDescending:"Absteigend sortieren",pinnedColumn:"Fixierte Spalte",menu:"Menü",actions:"Aktionen",selectAll:"Alle auswählen",selectRow:"Zeile auswählen",expandRow:"Details der Zeile {{row}}"},zh:{ascending:"升序",descending:"降序",clearSorting:"清除排序",pinToLeft:"固定到左侧",pinToRight:"固定到右侧",unpin:"取消固定",hide:"隐藏",lastColumn:"(最后一列)",manageColumns:"管理列",hideAll:"全部隐藏",showAll:"全部显示",searchColumns:"搜索列...",noColumnsFound:"未找到列",noResults:"无结果",noDataAvailable:"无数据",sortAscending:"升序排序",sortDescending:"降序排序",pinnedColumn:"已固定列",menu:"菜单",actions:"操作",selectAll:"全选",selectRow:"选择行",expandRow:"第 {{row}} 行详情"}};function C6(e){const t=e??Za();return w6[t]??uu}function cB(e){return typeof e=="object"&&e!==null&&"title"in e&&typeof e.title=="string"}function uB(e){const{header:t}=e;return typeof t=="string"?t:cB(t)?t.title:null}function dB({columns:e,rowsCount:t=5,checkboxSelection:n=!1,actions:r,rowHeight:o}){const s=[];return n&&s.push(null),e.forEach(a=>{s.push(uB(a))}),r&&s.push("Actions"),i.jsx("div",{className:"space-y-4",children:i.jsx("div",{className:"rounded-md border",children:i.jsxs(ah,{children:[i.jsx(Ia,{children:i.jsx(In,{className:"bg-muted",children:s.map((a,l)=>i.jsx(mi,{children:a?i.jsx("div",{className:"text-xs font-medium",children:a}):i.jsx(Ln,{className:"h-4 w-4"})},l))})}),i.jsx(nu,{children:Array.from({length:t}).map((a,l)=>i.jsx(In,{style:{height:o?`${o}px`:void 0},children:s.map((c,u)=>i.jsx(fs,{children:i.jsx(Ln,{className:"h-4 w-[80px]"})},u))},l))})]})})})}function S6(e){return typeof e=="object"&&e!==null&&"title"in e&&typeof e.title=="string"}function s0(e){const t=e.columnDef.header;return typeof t=="string"?t:S6(t)?t.title:e.id}function fB(e,t,n,r){return e?{position:"sticky",insetInlineStart:e==="left"?`${t("left")}px`:void 0,insetInlineEnd:e==="right"?`${n("right")}px`:void 0,zIndex:10,backgroundColor:r}:{}}const Xs={height:"h-8",gap:"gap-1.5",roundedClass:"rounded-md",fontSize:"text-sm",fontWeight:"font-medium"},sd={width:"w-2",lineHeight:"h-5",lineWidth:"w-[1px]"},ad={size:50,minSize:50,maxSize:50},a0={size:40,labeledSize:170},id={size:50,minSize:50,maxSize:50},am={header:"var(--muted)",body:"var(--background)"},pB=66,hB=50,mB="shadow-[-4px_0_4px_-2px_rgba(0,0,0,0.1)]";function gB(e,t,n,r){return e?{width:"auto",minWidth:0}:t?{width:"auto",minWidth:`${r}px`}:n?{width:`${r}px`,minWidth:`${r}px`,maxWidth:`${r}px`}:{width:`${r}px`}}function im(e,t,n){const r=e.getIsPinned(),o=e.getSize(),s=e.id==="_spacer",a=e.columnDef.flex===!0&&!s,l=e.columnDef.enableResizing===!1&&!s;return{style:{...gB(s,a,l,o),...fB(r,c=>e.getStart(c),c=>e.getAfter(c),n)},className:j(t,r&&mB,l&&"data-table-fixed-column",s&&"data-table-spacer")}}function E6({onMouseDown:e,onTouchStart:t}){const n=o=>{o.stopPropagation(),e(o)},r=o=>{o.stopPropagation(),t(o)};return i.jsx("div",{onMouseDown:n,onTouchStart:r,onPointerDown:o=>o.stopPropagation(),className:`absolute right-0 top-0 h-full ${sd.width} cursor-col-resize select-none touch-none flex items-center justify-center hover:bg-neutral-100`,children:i.jsx("div",{className:`${sd.lineHeight} ${sd.lineWidth} bg-neutral-300`})})}function i0({header:e,enableColumnResizing:t}){const{style:n,className:r}=im(e.column,t,am.header);return i.jsxs(mi,{style:n,className:r,children:[i.jsx("div",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:e.isPlaceholder?null:La(e.column.columnDef.header,e.getContext())}),t&&e.column.getCanResize()&&i.jsx(E6,{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler()})]},e.id)}var xB=Object.create,N6=Object.defineProperty,vB=Object.defineProperties,yB=Object.getOwnPropertyDescriptor,bB=Object.getOwnPropertyDescriptors,ac=Object.getOwnPropertySymbols,_6=Object.prototype.hasOwnProperty,j6=Object.prototype.propertyIsEnumerable,wB=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Ni=e=>{throw TypeError(e)},Tf=(e,t,n)=>t in e?N6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,l0=(e,t)=>{for(var n in t||(t={}))_6.call(t,n)&&Tf(e,n,t[n]);if(ac)for(var n of ac(t))j6.call(t,n)&&Tf(e,n,t[n]);return e},c0=(e,t)=>vB(e,bB(t)),CB=(e,t)=>{var n={};for(var r in e)_6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ac)for(var r of ac(e))t.indexOf(r)<0&&j6.call(e,r)&&(n[r]=e[r]);return n},SB=e=>{var t;return[,,,xB((t=void 0)!=null?t:null)]},k6=["class","method","getter","setter","accessor","field","value","get","set"],ma=e=>e!==void 0&&typeof e!="function"?Ni("Function expected"):e,EB=(e,t,n,r,o)=>({kind:k6[e],name:t,metadata:r,addInitializer:s=>n._?Ni("Already initialized"):o.push(ma(s||null))}),NB=(e,t)=>Tf(t,wB("metadata"),e[3]),Ji=(e,t,n,r)=>{for(var o=0,s=e[t>>1],a=s&&s.length;o<a;o++)t&1?s[o].call(n):r=s[o].call(n,r);return r},R6=(e,t,n,r,o,s)=>{for(var a,l,c,u,f,d=t&7,p=!1,h=!1,g=e.length+1,x=k6[d+5],v=e[g-1]=[],y=e[g]||(e[g]=[]),b=(o=o.prototype,yB({get[n](){return ga(this,s)},set[n](w){return Jr(this,s,w)}},n)),S=r.length-1;S>=0;S--)u=EB(d,n,c={},e[3],y),u.static=p,u.private=h,f=u.access={has:w=>n in w},f.get=w=>w[n],f.set=(w,E)=>w[n]=E,l=(0,r[S])({get:b.get,set:b.set},u),c._=1,l===void 0?ma(l)&&(b[x]=l):typeof l!="object"||l===null?Ni("Object expected"):(ma(a=l.get)&&(b.get=a),ma(a=l.set)&&(b.set=a),ma(a=l.init)&&v.unshift(a));return b&&N6(o,n,b),o},M6=(e,t,n)=>t.has(e)||Ni("Cannot "+n),ga=(e,t,n)=>(M6(e,t,"read from private field"),t.get(e)),Js=(e,t,n)=>t.has(e)?Ni("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Jr=(e,t,n,r)=>(M6(e,t,"write to private field"),t.set(e,n),n);function no(e){return e instanceof um||e instanceof T6}var Qi=10,_B=class extends Ct{constructor(e){super(e);const t=Ht(()=>{const{dragOperation:r}=e;if(Wa(r.activatorEvent)&&no(r.source)&&r.status.initialized){const o=e.registry.plugins.get(Ci);if(o)return o.disable(),()=>o.enable()}}),n=e.monitor.addEventListener("dragmove",(r,o)=>{queueMicrotask(()=>{if(this.disabled||r.defaultPrevented||!r.nativeEvent)return;const{dragOperation:s}=o;if(!Wa(r.nativeEvent)||!no(s.source)||!s.shape)return;const{actions:a,collisionObserver:l,registry:c}=o,{by:u}=r;if(!u)return;const f=jB(u),{source:d,target:p}=s,{center:h}=s.shape.current,g=[],x=[];Je(()=>{for(const E of c.droppables){const{id:N}=E;if(!E.accepts(d)||N===p?.id&&no(E)||!E.element)continue;let _=E.shape;const k=new wn(E.element,{getBoundingClientRect:I=>Va(I,void 0,.2)});!k.height||!k.width||(f=="down"&&h.y+Qi<k.center.y||f=="up"&&h.y-Qi>k.center.y||f=="left"&&h.x-Qi>k.center.x||f=="right"&&h.x+Qi<k.center.x)&&(g.push(E),E.shape=k,x.push(()=>E.shape=_))}}),r.preventDefault(),l.disable();const v=l.computeCollisions(g,P$);Je(()=>x.forEach(E=>E()));const[y]=v;if(!y)return;const{id:b}=y,{index:S,group:w}=d.sortable;a.setDropTarget(b).then(()=>{const{source:E,target:N,shape:_}=s;if(!E||!no(E)||!_)return;const{index:k,group:I,target:F}=E.sortable,U=S!==k||w!==I,O=U?F:N?.element;if(!O)return;Nw(O);const R=new wn(O);if(!R)return;const L=rr.delta(R,rr.from(_.current.boundingRectangle),E.alignment);a.move({by:L}),U?a.setDropTarget(E.id).then(()=>l.enable()):l.enable()})})});this.destroy=()=>{n(),t()}}};function jB(e){const{x:t,y:n}=e;if(t>0)return"right";if(t<0)return"left";if(n>0)return"down";if(n<0)return"up"}var kB=Object.defineProperty,RB=Object.defineProperties,MB=Object.getOwnPropertyDescriptors,u0=Object.getOwnPropertySymbols,DB=Object.prototype.hasOwnProperty,AB=Object.prototype.propertyIsEnumerable,d0=(e,t,n)=>t in e?kB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vo=(e,t)=>{for(var n in t||(t={}))DB.call(t,n)&&d0(e,n,t[n]);if(u0)for(var n of u0(t))AB.call(t,n)&&d0(e,n,t[n]);return e},Bo=(e,t)=>RB(e,MB(t));function PB(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function ld(e){return"initialIndex"in e&&typeof e.initialIndex=="number"&&"index"in e&&typeof e.index=="number"}function TB(e,t,n){var r,o,s;const{source:a,target:l,canceled:c}=t.operation;if(!a||!l||c)return"preventDefault"in t&&t.preventDefault(),e;const u=(w,E)=>w===E||typeof w=="object"&&"id"in w&&w.id===E;if(Array.isArray(e)){const w=e.findIndex(N=>u(N,a.id)),E=e.findIndex(N=>u(N,l.id));if(w===-1||E===-1){if(ld(a)){const N=a.initialIndex,_=a.index;return N===_||N<0||N>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,N,_)}return e}if(!c&&"index"in a&&typeof a.index=="number"){const N=a.index;if(N!==w)return n(e,w,N)}return n(e,w,E)}const f=Object.entries(e);let d=-1,p,h=-1,g;for(const[w,E]of f)if(d===-1&&(d=E.findIndex(N=>u(N,a.id)),d!==-1&&(p=w)),h===-1&&(h=E.findIndex(N=>u(N,l.id)),h!==-1&&(g=w)),d!==-1&&h!==-1)break;if(d===-1&&ld(a)){const w=a.initialGroup,E=a.initialIndex,N=a.group,_=a.index;if(w==null||N==null||!(w in e)||!(N in e)||w===N&&E===_)return"preventDefault"in t&&t.preventDefault(),e;if(w===N)return Bo(Vo({},e),{[w]:n(e[w],E,_)});const k=e[w][E];return Bo(Vo({},e),{[w]:[...e[w].slice(0,E),...e[w].slice(E+1)],[N]:[...e[N].slice(0,_),k,...e[N].slice(_)]})}if(!a.manager)return e;const{dragOperation:x}=a.manager,v=(o=(r=x.shape)==null?void 0:r.current.center)!=null?o:x.position.current;if(g==null&&l.id in e){const w=l.shape&&v.y>l.shape.center.y?e[l.id].length:0;g=l.id,h=w}if(p==null||g==null||p===g&&d===h){if(p!=null&&p===g&&d===h&&ld(a)){const w=a.group!=null&&a.group!==p,E=a.index!==d;if(w||E){const N=(s=a.group)!=null?s:p;if(N in e){if(p===N)return Bo(Vo({},e),{[p]:n(e[p],d,a.index)});const _=e[p][d];return Bo(Vo({},e),{[p]:[...e[p].slice(0,d),...e[p].slice(d+1)],[N]:[...e[N].slice(0,a.index),_,...e[N].slice(a.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(p===g)return Bo(Vo({},e),{[p]:n(e[p],d,h)});const b=l.shape&&Math.round(v.y)>Math.round(l.shape.center.y)?1:0,S=e[p][d];return Bo(Vo({},e),{[p]:[...e[p].slice(0,d),...e[p].slice(d+1)],[g]:[...e[g].slice(0,h+b),S,...e[g].slice(h+b)]})}function OB(e,t){return TB(e,t,PB)}var f0="__default__",LB=class extends Ct{constructor(e){super(e);const t=()=>{const r=new Map;for(const o of e.registry.droppables)if(o instanceof um){const{sortable:s}=o,{group:a}=s;let l=r.get(a);l||(l=new Set,r.set(a,l)),l.add(s)}for(const[o,s]of r)r.set(o,new Set(el(s)));return r},n=[e.monitor.addEventListener("dragover",(r,o)=>{if(this.disabled)return;const{dragOperation:s}=o,{source:a,target:l}=s;if(!no(a)||!no(l)||a.sortable===l.sortable)return;const c=t(),u=a.sortable.group===l.sortable.group,f=c.get(a.sortable.group),d=u?f:c.get(l.sortable.group);!f||!d||queueMicrotask(()=>{r.defaultPrevented||o.renderer.rendering.then(()=>{var p,h,g;const x=t();for(const[F,U]of c.entries()){const O=Array.from(U).entries();for(const[R,L]of O)if(L.index!==R||L.group!==F||!((p=x.get(F))!=null&&p.has(L)))return}const v=a.sortable.element,y=l.sortable.element;if(!y||!v||!u&&l.id===a.sortable.group)return;const b=el(f),S=u?b:el(d),w=(h=a.sortable.group)!=null?h:f0,E=(g=l.sortable.group)!=null?g:f0,N={[w]:b,[E]:S},_=OB(N,r);if(N===_)return;const k=_[E].indexOf(a.sortable),I=_[E].indexOf(l.sortable);o.collisionObserver.disable(),p0(v,k,y,I),Je(()=>{for(const[F,U]of _[w].entries())U.index=F;if(!u)for(const[F,U]of _[E].entries())U.group=l.sortable.group,U.index=F}),o.actions.setDropTarget(a.id).then(()=>o.collisionObserver.enable())})})}),e.monitor.addEventListener("dragend",(r,o)=>{if(!r.canceled)return;const{dragOperation:s}=o,{source:a}=s;no(a)&&(a.sortable.initialIndex===a.sortable.index&&a.sortable.initialGroup===a.sortable.group||queueMicrotask(()=>{const l=t(),c=l.get(a.sortable.initialGroup);c&&o.renderer.rendering.then(()=>{for(const[h,g]of l.entries()){const x=Array.from(g).entries();for(const[v,y]of x)if(y.index!==v||y.group!==h)return}const u=el(c),f=a.sortable.element,d=u[a.sortable.initialIndex],p=d?.element;!d||!p||!f||(p0(f,d.index,p,a.index),Je(()=>{for(const[h,g]of l.entries()){const x=Array.from(g).values();for(const v of x)v.index=v.initialIndex,v.group=v.initialGroup}}))})}))})];this.destroy=()=>{for(const r of n)r()}}};function p0(e,t,n,r){const o=r<t?"afterend":"beforebegin";n.insertAdjacentElement(o,e)}function IB(e,t){return e.index-t.index}function el(e){return Array.from(e).sort(IB)}var FB=[_B,LB],D6={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1},tl=new pF,A6,P6,br,lm,xa,va,cm,Xo;P6=[Re],A6=[Re];var du=class{constructor(e,t){Js(this,lm,Ji(br,8,this)),Ji(br,11,this),Js(this,xa),Js(this,va),Js(this,cm,Ji(br,12,this)),Ji(br,15,this),Js(this,Xo),this.register=()=>(Je(()=>{var d,p;(d=this.manager)==null||d.registry.register(this.droppable),(p=this.manager)==null||p.registry.register(this.draggable)}),()=>this.unregister()),this.unregister=()=>{Je(()=>{var d,p;(d=this.manager)==null||d.registry.unregister(this.droppable),(p=this.manager)==null||p.registry.unregister(this.draggable)})},this.destroy=()=>{Je(()=>{this.droppable.destroy(),this.draggable.destroy()})};var n=e,{effects:r=()=>[],group:o,index:s,sensors:a,type:l,transition:c=D6,plugins:u=FB}=n,f=CB(n,["effects","group","index","sensors","type","transition","plugins"]);this.droppable=new um(f,t,this),this.draggable=new T6(c0(l0({},f),{effects:()=>[()=>{var d,p,h;const g=(d=this.manager)==null?void 0:d.dragOperation.status;g?.initializing&&this.id===((h=(p=this.manager)==null?void 0:p.dragOperation.source)==null?void 0:h.id)&&tl.clear(this.manager),g?.dragging&&tl.set(this.manager,this.id,Le(()=>({initialIndex:this.index,initialGroup:this.group})))},()=>{const{index:d,group:p,manager:h}=this,g=ga(this,va),x=ga(this,xa);(d!==g||p!==x)&&(Jr(this,va,d),Jr(this,xa,p),this.animate())},()=>{const{target:d}=this,{feedback:p,isDragSource:h}=this.draggable;p=="move"&&h&&(this.droppable.disabled=!d)},()=>{const{manager:d}=this;for(const p of u)d?.registry.register(p)},...r()],type:l,sensors:a}),t,this),Jr(this,Xo,f.element),this.manager=t,this.index=s,Jr(this,va,s),this.group=o,Jr(this,xa,o),this.type=l,this.transition=c}get initialIndex(){var e,t;return(t=(e=tl.get(this.manager,this.id))==null?void 0:e.initialIndex)!=null?t:this.index}get initialGroup(){var e,t;return(t=(e=tl.get(this.manager,this.id))==null?void 0:e.initialGroup)!=null?t:this.group}animate(){Le(()=>{const{manager:e,transition:t}=this,{shape:n}=this.droppable;if(!e)return;const{idle:r}=e.dragOperation.status;!n||!t||r&&!t.idle||e.renderer.rendering.then(()=>{const{element:o}=this;if(!o)return;const s=this.refreshShape();if(!s)return;const a={x:n.boundingRectangle.left-s.boundingRectangle.left,y:n.boundingRectangle.top-s.boundingRectangle.top},{translate:l}=jn(o),c=Y1(o,l,!1),u=Y1(o,l);if(a.x||a.y){const f=Bh(Jt(o))?c0(l0({},t),{duration:0}):t;_w({element:o,keyframes:{translate:[`${c.x+a.x}px ${c.y+a.y}px ${c.z}`,`${u.x}px ${u.y}px ${u.z}`]},options:f}).then(()=>{e.dragOperation.status.dragging||(this.droppable.shape=void 0)})}})})}get manager(){return this.draggable.manager}set manager(e){Je(()=>{this.draggable.manager=e,this.droppable.manager=e})}set element(e){Je(()=>{const t=ga(this,Xo),n=this.droppable.element,r=this.draggable.element;(!n||n===t)&&(this.droppable.element=e),(!r||r===t)&&(this.draggable.element=e),Jr(this,Xo,e)})}get element(){var e,t;const n=ga(this,Xo);if(n)return(t=(e=gf.get(n))!=null?e:n)!=null?t:this.droppable.element}set target(e){this.droppable.element=e}get target(){return this.droppable.element}set source(e){this.draggable.element=e}get source(){return this.draggable.element}get disabled(){return this.draggable.disabled&&this.droppable.disabled}set feedback(e){this.draggable.feedback=e}set disabled(e){Je(()=>{this.droppable.disabled=e,this.draggable.disabled=e})}set data(e){Je(()=>{this.droppable.data=e,this.draggable.data=e})}set handle(e){this.draggable.handle=e}set id(e){Je(()=>{this.droppable.id=e,this.draggable.id=e})}get id(){return this.droppable.id}set sensors(e){this.draggable.sensors=e}set modifiers(e){this.draggable.modifiers=e}set collisionPriority(e){this.droppable.collisionPriority=e}set collisionDetector(e){this.droppable.collisionDetector=e??jw}set alignment(e){this.draggable.alignment=e}get alignment(){return this.draggable.alignment}set type(e){Je(()=>{this.droppable.type=e,this.draggable.type=e})}get type(){return this.draggable.type}set accept(e){this.droppable.accept=e}get accept(){return this.droppable.accept}get isDropTarget(){return this.droppable.isDropTarget}get isDragSource(){return this.draggable.isDragSource}get isDragging(){return this.draggable.isDragging}get isDropping(){return this.draggable.isDropping}get status(){return this.draggable.status}refreshShape(){return this.droppable.refreshShape()}accepts(e){return this.droppable.accepts(e)}};br=SB();lm=new WeakMap;xa=new WeakMap;va=new WeakMap;cm=new WeakMap;Xo=new WeakMap;R6(br,4,"index",P6,du,lm);R6(br,4,"group",A6,du,cm);NB(br,du);var T6=class extends Si{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get initialIndex(){return this.sortable.initialIndex}get group(){return this.sortable.group}get initialGroup(){return this.sortable.initialGroup}},um=class extends lu{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get group(){return this.sortable.group}},$B=Object.defineProperty,VB=Object.defineProperties,BB=Object.getOwnPropertyDescriptors,h0=Object.getOwnPropertySymbols,zB=Object.prototype.hasOwnProperty,WB=Object.prototype.propertyIsEnumerable,m0=(e,t,n)=>t in e?$B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cd=(e,t)=>{for(var n in t||(t={}))zB.call(t,n)&&m0(e,n,t[n]);if(h0)for(var n of h0(t))WB.call(t,n)&&m0(e,n,t[n]);return e},HB=(e,t)=>VB(e,BB(t));function O6(e){const{accept:t,collisionDetector:n,collisionPriority:r,id:o,data:s,element:a,handle:l,index:c,group:u,disabled:f,feedback:d,modifiers:p,sensors:h,target:g,type:x}=e,v=cd(cd({},D6),e.transition),y=u6(S=>new du(HB(cd({},e),{transition:v,register:!1,handle:os(l),element:os(a),target:os(g),feedback:d}),S)),b=rm(y,GB);return Ye(o,()=>y.id=o),No(()=>{Je(()=>{y.group=u,y.index=c})},[y,u,c]),Ye(x,()=>y.type=x),Ye(t,()=>y.accept=t,void 0,Cr),Ye(s,()=>s&&(y.data=s)),Ye(c,()=>{var S;(S=y.manager)!=null&&S.dragOperation.status.idle&&v?.idle&&y.refreshShape()},RV),bl(l,S=>y.handle=S),bl(a,S=>y.element=S),bl(g,S=>y.target=S),Ye(f,()=>y.disabled=f===!0),Ye(h,()=>y.sensors=h),Ye(n,()=>y.collisionDetector=n),Ye(r,()=>y.collisionPriority=r),Ye(d,()=>y.feedback=d??"default"),Ye(v,()=>y.transition=v,void 0,Cr),Ye(p,()=>y.modifiers=p,void 0,Cr),Ye(e.alignment,()=>y.alignment=e.alignment),{sortable:b,get isDragging(){return b.isDragging},get isDropping(){return b.isDropping},get isDragSource(){return b.isDragSource},get isDropTarget(){return b.isDropTarget},handleRef:C.useCallback(S=>{y.handle=S??void 0},[y]),ref:C.useCallback(S=>{var w,E;!S&&((w=y.element)!=null&&w.isConnected)&&!((E=y.manager)!=null&&E.dragOperation.status.idle)||(y.element=S??void 0)},[y]),sourceRef:C.useCallback(S=>{var w,E;!S&&((w=y.source)!=null&&w.isConnected)&&!((E=y.manager)!=null&&E.dragOperation.status.idle)||(y.source=S??void 0)},[y]),targetRef:C.useCallback(S=>{var w,E;!S&&((w=y.target)!=null&&w.isConnected)&&!((E=y.manager)!=null&&E.dragOperation.status.idle)||(y.target=S??void 0)},[y])}}function GB(e,t,n){return!!(e==="isDragSource"&&!n&&t)}function UB({header:e,index:t,enableColumnResizing:n}){const{style:r,className:o}=im(e.column,n,am.header),{ref:s,isDragging:a}=O6({id:e.column.id,index:t,group:"columns"}),l={...r,opacity:a?.5:1,zIndex:a?1:void 0,position:a?"relative":r?.position,cursor:"grab"};return i.jsxs(mi,{ref:s,style:l,className:j(o,a&&"bg-muted/80"),children:[i.jsx("div",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:e.isPlaceholder?null:La(e.column.columnDef.header,e.getContext())}),n&&e.column.getCanResize()&&i.jsx(E6,{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler()})]},e.id)}function YB({table:e,enableColumnResizing:t,enableColumnDragDrop:n=!1}){return n?i.jsx(Ia,{children:e.getHeaderGroups().map(r=>i.jsx(In,{className:"bg-muted",children:r.headers.map((o,s)=>o.column.id==="select"||o.column.id==="actions"||o.column.id==="_expander"||o.column.id==="_spacer"?i.jsx(i0,{header:o,enableColumnResizing:t??!1},o.id):i.jsx(UB,{header:o,index:s,enableColumnResizing:t??!1},o.id))},r.id))}):i.jsx(Ia,{children:e.getHeaderGroups().map(r=>i.jsx(In,{className:"bg-muted",children:r.headers.map(o=>i.jsx(i0,{header:o,enableColumnResizing:t??!1},o.id))},r.id))})}function KB({cell:e,enableColumnResizing:t}){const{style:n,className:r}=im(e.column,t,am.body);return i.jsx(fs,{style:n,className:r,children:La(e.column.columnDef.cell,e.getContext())},e.id)}function ZB({table:e,enableColumnResizing:t,onRowClick:n,onRowMouseEnter:r,onRowMouseLeave:o,rowHeight:s,getRowClassName:a,renderSubComponent:l}){const c=e.getRowModel().rows,u=f=>f===c.length-1;return i.jsx(nu,{children:c.map((f,d)=>{const p=!n&&f.getCanExpand();return i.jsxs(C.Fragment,{children:[i.jsx(In,{"data-state":f.getIsSelected()&&"selected",onClick:h=>{n?n(f.original,h):p&&f.toggleExpanded()},onMouseEnter:()=>r?.(f.original),onMouseLeave:()=>o?.(f.original),className:j((n||p)&&"cursor-pointer hover:bg-muted",u(d)&&"border-b-0",a?.(f.original)),style:{height:s?`${s}px`:void 0},children:f.getVisibleCells().map(h=>i.jsx(KB,{cell:h,enableColumnResizing:t??!1},h.id))}),l&&f.getIsExpanded()&&i.jsx(In,{className:"bg-muted/30 hover:bg-transparent","data-testid":"data-table-expanded-row",children:i.jsx(fs,{colSpan:f.getVisibleCells().length,className:"p-0",children:l(f.original)})})]},f.id)})})}function qB(e,t){const[n,r]=C.useState(!1),[o,s]=C.useState(!1),[a,l]=C.useState(!1),c=e.getIsPinned(),u=e.getCanPin(),f=e.getCanSort(),d=e.getIsSorted(),p=t.getAllColumns().filter(v=>typeof v.accessorFn<"u"&&v.getCanHide()),h=p.filter(v=>v.getIsVisible()).length,g=h===1&&e.getIsVisible();return{isHovered:n,setIsHovered:r,isMenuOpen:o,setIsMenuOpen:s,isManageColumnsOpen:a,setIsManageColumnsOpen:l,isPinned:c,canPin:u,canSort:f,isSorted:d,toggleableColumns:p,visibleColumnsCount:h,isLastVisibleColumn:g,handleManageColumnsClick:()=>{s(!1),l(!0)}}}function XB({column:e,isLastVisibleColumn:t,onManageColumnsClick:n,translations:r}){const o=e.getCanSort(),s=e.getCanPin(),a=e.getCanHide(),l=e.getIsPinned(),c=e.getIsSorted();return i.jsxs(Fc,{align:"start",children:[o&&i.jsxs(i.Fragment,{children:[i.jsxs(xn,{onClick:()=>e.toggleSorting(!1),children:[i.jsx(X,{name:"ArrowUp",size:"sm"}),r.ascending]}),i.jsxs(xn,{onClick:()=>e.toggleSorting(!0),children:[i.jsx(X,{name:"ArrowDown",size:"sm"}),r.descending]}),c&&i.jsxs(xn,{onClick:()=>e.clearSorting(),children:[i.jsx(X,{name:"X",size:"sm"}),r.clearSorting]}),i.jsx(Dl,{})]}),s&&i.jsxs(i.Fragment,{children:[i.jsxs(xn,{onClick:()=>e.pin("left"),disabled:l==="left",children:[i.jsx(X,{name:"PushPinSimple",size:"sm"}),r.pinToLeft]}),i.jsxs(xn,{onClick:()=>e.pin("right"),disabled:l==="right",children:[i.jsx(X,{name:"PushPinSimple",size:"sm"}),r.pinToRight]}),l&&i.jsxs(xn,{onClick:()=>e.pin(!1),children:[i.jsx(X,{name:"PushPinSimpleSlash",size:"sm"}),r.unpin]}),i.jsx(Dl,{})]}),a&&i.jsxs(xn,{onClick:()=>e.toggleVisibility(!1),disabled:t,children:[i.jsx(X,{name:"EyeSlash",size:"sm"}),r.hide,t&&i.jsx("span",{className:"ml-auto text-xs text-muted-foreground",children:r.lastColumn})]}),i.jsxs(xn,{onClick:n,children:[i.jsx(X,{name:"Columns",size:"sm"}),r.manageColumns]})]})}let nl=0,g0="",x0="";function dm(e){C.useEffect(()=>{if(e){if(nl===0){g0=document.body.style.overflow,x0=document.body.style.paddingRight;const t=window.innerWidth-document.documentElement.clientWidth;document.body.style.overflow="hidden",t>0&&(document.body.style.paddingRight=`${t}px`)}return nl++,()=>{nl--,nl===0&&(document.body.style.overflow=g0,document.body.style.paddingRight=x0)}}},[e])}function fm(e,t){C.useEffect(()=>{if(!e)return;const n=r=>{r.key==="Escape"&&t()};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[e,t])}const L6="yuno-overlay";let rl=0;function v0(e){typeof window>"u"||window.dispatchEvent(new CustomEvent(L6,{detail:{open:e}}))}function pm(e){C.useEffect(()=>{if(e)return rl===0&&v0(!0),rl++,()=>{rl--,rl===0&&v0(!1)}},[e])}const JB=Ge("fixed flex items-center justify-center p-4",{variants:{verticalAlign:{start:"items-start pt-20",center:"items-center",end:"items-end pb-20"},inset:{viewport:"inset-0",content:"inset-y-0 right-0 left-[var(--app-content-left,0px)]"}},defaultVariants:{verticalAlign:"center",inset:"content"}}),QB=Ge("relative bg-background rounded-lg shadow-lg border border-border max-h-[90vh] overflow-hidden flex flex-col",{variants:{size:{default:"w-full max-w-md",sm:"w-full max-w-sm",lg:"w-full max-w-lg",xl:"w-full max-w-xl",fullscreen:"w-full h-full max-w-none max-h-none rounded-none"}},defaultVariants:{size:"default"}}),fu=m.forwardRef(({className:e,verticalAlign:t,title:n,open:r,closeIcon:o,buttons:s=[],widthContainer:a,heightContainer:l,backButtonAction:c,showActions:u=!0,otherActions:f,withHeader:d=!0,showCloseButton:p=!0,children:h,headerClassName:g,contentClassName:x,footerClassName:v,zIndex:y,...b},S)=>{const w=m.useId(),E=d&&!!n,N=p!==!1,_=m.useRef(!1),[k,I]=m.useState(!1),[F,U]=m.useState(r),[O,R]=m.useState(!1);if(m.useEffect(()=>{const z=()=>{I(window.innerWidth<=599)};return z(),window.addEventListener("resize",z),()=>window.removeEventListener("resize",z)},[]),m.useEffect(()=>{let z,T;return r?(U(!0),z=setTimeout(()=>R(!0),10)):F&&(R(!1),T=setTimeout(()=>{U(!1)},600)),()=>{z&&clearTimeout(z),T&&clearTimeout(T)}},[r,F]),dm(r),pm(r),fm(r,o),!F)return null;const L={width:a&&!k?ss(a):void 0,height:l&&!k?ss(l):void 0},V=y!==void 0?{zIndex:y}:void 0,D=y===void 0?"z-dialog":void 0,$=i.jsxs(i.Fragment,{children:[i.jsx("div",{className:j("fixed inset-0 bg-black/25 transition-opacity duration-600 ease-out",D,O?"opacity-100":"opacity-0"),style:V,onClick:N?o:void 0,"aria-hidden":"true"}),i.jsx("div",{className:j(JB({verticalAlign:t,inset:k?"viewport":"content"}),D),style:V,onMouseDown:z=>{_.current=z.target===z.currentTarget},onClick:z=>{N&&z.target===z.currentTarget&&_.current&&o()},children:i.jsxs("div",{ref:S,className:j("app-dialog",QB({size:k?"fullscreen":"default"}),"transition-all duration-600 ease-out",O?"opacity-100 scale-100 translate-y-0":"opacity-0 scale-98 -translate-y-2",a&&!k&&"max-w-none",e),style:L,role:"dialog","aria-modal":"true","aria-labelledby":E?w:void 0,"aria-label":E?void 0:"Dialog",...b,children:[d&&i.jsx(Vp,{title:n,titleId:w,onClose:o,onBack:c,otherActions:f,showCloseButton:p,className:g}),i.jsx(Bp,{className:x,children:h}),u&&i.jsx(zp,{buttons:s,className:v})]})})]});return ho.createPortal($,document.body)});fu.displayName="Dialog";function ez({isOpen:e,onOpenChange:t,toggleableColumns:n,visibleColumnsCount:r,translations:o}){const[s,a]=C.useState(""),l=()=>{a(""),t(!1)},c=n.filter(h=>s0(h).toLowerCase().includes(s.toLowerCase())),u=()=>{n.forEach(h=>h.toggleVisibility(!0))},f=()=>{const h=n.filter(g=>g.getIsVisible());h.length<=1||h.slice(1).forEach(g=>g.toggleVisibility(!1))},d=n.every(h=>h.getIsVisible()),p=r<=1;return i.jsx(fu,{open:e,closeIcon:l,title:o.manageColumns,widthContainer:400,buttons:[{children:o.hideAll,variant:"link",onClick:f,disabled:p},{children:o.showAll,variant:"link",onClick:u,disabled:d}],children:i.jsxs("div",{className:"space-y-4",children:[i.jsx(Zc,{placeholder:o.searchColumns,value:s,onSearch:a,className:"mb-6"}),i.jsx("div",{className:"space-y-4 max-h-[300px] overflow-y-auto",children:c.length===0?i.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:o.noColumnsFound}):c.map(h=>{const g=s0(h),x=r===1&&h.getIsVisible();return i.jsx(Up,{id:`column-${h.id}`,checked:h.getIsVisible(),disabled:x,label:`${g}${x?` ${o.lastColumn}`:""}`,onChange:v=>h.toggleVisibility(v.target.checked)},h.id)})})]})})}function I6({canSort:e,sortDirection:t}){if(!e||!t)return null;const r={asc:{name:"ArrowUp",tooltip:"Sort ascending"},desc:{name:"ArrowDown",tooltip:"Sort descending"}}[t];return i.jsx(X,{name:r.name,size:"sm",tooltip:r.tooltip})}function tz({title:e,info:t,isPinned:n,canSort:r,sortDirection:o,isHovered:s,isMenuOpen:a,onMouseEnter:l,onMouseLeave:c}){return i.jsxs("div",{className:j(`w-full data-[state=open]:bg-accent flex ${Xs.height} items-center ${Xs.gap} ${Xs.roundedClass} ${Xs.fontSize} ${Xs.fontWeight} outline-none transition-all`,"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]"),onMouseEnter:l,onMouseLeave:c,children:[t&&i.jsx(X,{name:"Info",size:"sm",className:"text-muted-foreground",tooltip:t}),n&&i.jsx(X,{name:"PushPinSimple",size:"sm",tooltip:"Pinned column"}),i.jsx(I6,{canSort:r,sortDirection:o}),i.jsx("span",{className:"flex-1 text-left",children:e}),(s||a)&&i.jsx(Ic,{asChild:!0,children:i.jsx("button",{type:"button","aria-label":"Column options",className:"inline-flex cursor-pointer items-center justify-center",children:i.jsx(X,{name:"DotsThreeVertical",size:"sm"})})})]})}function Of({column:e,table:t,title:n,className:r,info:o}){const{isHovered:s,setIsHovered:a,isMenuOpen:l,setIsMenuOpen:c,isManageColumnsOpen:u,setIsManageColumnsOpen:f,isPinned:d,canPin:p,canSort:h,isSorted:g,toggleableColumns:x,visibleColumnsCount:v,isLastVisibleColumn:y,handleManageColumnsClick:b}=qB(e,t),S=t.options.meta?.translations??uu;return!h&&!p?i.jsxs("div",{className:j("flex items-center gap-2",r),children:[o&&i.jsx(X,{name:"Info",size:"sm",className:"text-muted-foreground",tooltip:o}),i.jsx("span",{children:n})]}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:j("flex items-center gap-2",r),children:i.jsxs(Lc,{open:l,onOpenChange:c,children:[i.jsx(tz,{title:n,info:o,isPinned:d,canSort:h,sortDirection:g,isHovered:s,isMenuOpen:l,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1)}),i.jsx(XB,{column:e,isLastVisibleColumn:y,onManageColumnsClick:b,translations:S})]})}),i.jsx(ez,{isOpen:u,onOpenChange:f,toggleableColumns:x,visibleColumnsCount:v,translations:S})]})}function nz({columns:e,checkboxSelection:t=!1,actions:n,getRowCanExpand:r,expanderPosition:o="left",expandRowLabel:s="Row {{row}} details",getRowExpandLabel:a,expanderHeader:l}){return m.useMemo(()=>{let c=e.map(p=>{const{header:h,enablePinning:g=!0,...x}=p,v=x.size!==void 0?{...x,minSize:x.minSize??hB}:x;return typeof h=="string"?{...v,enablePinning:g,header:({column:y,table:b})=>i.jsx(Of,{column:y,table:b,title:h})}:S6(h)?{...v,enablePinning:g,header:({column:y,table:b})=>i.jsx(Of,{column:y,table:b,title:h.title,info:h.info,className:h.className})}:{...v,header:h,enablePinning:g}});const u=l?a0.labeledSize:a0.size,f=r?{id:"_expander",header:l??"",cell:({row:p})=>{if(!p.getCanExpand())return null;const h=a?.(p.original)??s.replace("{{row}}",String(p.index+1));return i.jsx("span",{onClick:g=>g.stopPropagation(),children:i.jsx(zt,{content:h,children:i.jsx(ot,{variant:"ghost",size:"icon",startIcon:p.getIsExpanded()?"CaretUp":"CaretDown",startIconProps:{size:"md",weight:"bold"},className:"border-border text-muted-foreground size-7 rounded-md border","aria-label":h,"aria-expanded":p.getIsExpanded(),onClick:p.getToggleExpandedHandler()})})})},enableSorting:!1,enableHiding:!1,enablePinning:!1,enableResizing:!1,size:u,minSize:u,maxSize:u}:null;if(f&&o==="left"&&(c=[f,...c]),t&&(c=[{id:"select",header:({table:h})=>i.jsx(Oa,{checked:h.getIsAllPageRowsSelected()||(h.getIsSomePageRowsSelected()?"indeterminate":!1),onChange:g=>h.toggleAllPageRowsSelected(g.target.checked),"aria-label":"Select all"}),cell:({row:h})=>i.jsx("span",{onClick:g=>g.stopPropagation(),children:i.jsx(Oa,{checked:h.getIsSelected(),disabled:!h.getCanSelect(),onChange:g=>h.toggleSelected(g.target.checked),"aria-label":"Select row"})}),enableSorting:!1,enableHiding:!1,enablePinning:!1,enableResizing:!1,size:ad.size,minSize:ad.minSize,maxSize:ad.maxSize},...c]),n){const p={id:"actions",header:"",cell:({row:h})=>n.render?i.jsx(i.Fragment,{children:n.render(h.original)}):i.jsx(ot,{variant:"ghost",size:"icon",startIcon:"Eye","aria-label":"Actions",onClick:g=>{g.stopPropagation(),n.onClick?.(h.original)}}),enableSorting:!1,enableHiding:!1,enablePinning:!1,enableResizing:!1,size:id.size,minSize:id.minSize,maxSize:id.maxSize};c=[...c,p]}if(f&&o==="right"&&(c=[...c,f]),e.some(p=>p.flex))return c;const d={id:"_spacer",header:"",cell:()=>null,enableSorting:!1,enableHiding:!1,enablePinning:!1,enableResizing:!1,size:100,minSize:0};return c=[...c,d],c},[t,n,e,r,o,s,a,l])}const rz=["actions","_expander"];function oz({persistKey:e,hasActions:t=!1,hasExpanderRight:n=!1,externalSorting:r,onExternalSortingChange:o,externalRowSelection:s,initialSettings:a,onUpdate:l,enableColumnDragDrop:c=!1}){const u=m.useMemo(()=>[...t?["actions"]:[],...n?["_expander"]:[]],[t,n]),f=m.useCallback(L=>[...L.filter(V=>!rz.includes(V)),...u],[u]),[d,p]=m.useState([]),[h,g]=m.useState([]),[x,v]=m.useState({}),[y,b]=m.useState({}),[S,w]=m.useState(()=>({left:[],right:f([])})),[E,N]=m.useState([]),_=r??d,k=o??p,I=s??y,F=b,U=m.useRef(!1);m.useEffect(()=>{if(!(!a||U.current)){if(U.current=!0,a.hide||a.show){const L={};a.hide?.forEach(V=>{L[V]=!1}),v(L)}a.pinnedColumns&&w({left:a.pinnedColumns.left||[],right:f(a.pinnedColumns.right||[])}),!o&&a.sorting&&p(a.sorting),c&&a.order&&N(a.order)}},[a,f,o,c]),m.useEffect(()=>{if(!e)return;const L=localStorage.getItem(`datatable-${e}`);if(L)try{const V=JSON.parse(L);V.columnVisibility&&v(V.columnVisibility),V.columnPinning&&w({left:V.columnPinning.left||[],right:f(V.columnPinning.right||[])}),!o&&V.sorting&&p(V.sorting),c&&V.columnOrder&&N(V.columnOrder)}catch(V){console.error("Failed to load table state",V)}},[e,f,o,c]);const O=m.useRef(l);O.current=l,m.useEffect(()=>{const L=Object.entries(x).filter(([,D])=>!D).map(([D])=>D),V={hide:L.length>0?L:void 0,pinnedColumns:{left:S.left||[],right:S.right||[]},...!o&&d.length>0&&{sorting:d},...c&&E.length>0&&{order:E}};if(e){const D={columnVisibility:x,columnPinning:S,...!o&&{sorting:d},...c&&E.length>0&&{columnOrder:E}};localStorage.setItem(`datatable-${e}`,JSON.stringify(D))}O.current&&O.current(V)},[x,S,d,E,e,o,c]);const R=m.useCallback(L=>{w(V=>{const D=typeof L=="function"?L(V):L,$=Array.isArray(D.left)?D.left:[],z=Array.isArray(D.right)?D.right:[];return{left:$,right:f(z)}})},[f]);return{sorting:_,setSorting:k,columnFilters:h,setColumnFilters:g,columnVisibility:x,setColumnVisibility:v,rowSelection:I,setRowSelection:F,columnPinning:S,handleColumnPinningChange:R,columnOrder:E,setColumnOrder:N}}function sz({columns:e,data:t,isLoading:n=!1,empty:r,checkboxSelection:o=!1,isRowSelectable:s,rowSelection:a,onRowSelectionChange:l,enableSorting:c=!0,manualSorting:u=!1,sorting:f,onSortingChange:d,enableColumnFilters:p=!1,enableColumnResizing:h=!0,columnResizeMode:g="onChange",enableColumnPinning:x=!0,onRowClick:v,onRowMouseEnter:y,onRowMouseLeave:b,getRowClassName:S,getRowCanExpand:w,renderSubComponent:E,getRowExpandLabel:N,expanderPosition:_="left",expanderHeader:k,actions:I,height:F,rowHeight:U=pB,className:O,persistKey:R,initialSettings:L,onUpdate:V,enableColumnDragDrop:D=!1,lang:$,translations:z}){const T=m.useMemo(()=>({...C6($),...z}),[$,z]),[M,G]=m.useState({}),A=nz({columns:e,checkboxSelection:o,actions:I,getRowCanExpand:w,expanderPosition:_,expandRowLabel:T.expandRow,getRowExpandLabel:N,expanderHeader:k}),{sorting:W,setSorting:H,columnFilters:P,setColumnFilters:B,columnVisibility:Y,setColumnVisibility:Z,rowSelection:q,setRowSelection:oe,columnPinning:ne,handleColumnPinningChange:le,columnOrder:Ee,setColumnOrder:re}=oz({persistKey:R,hasActions:!!I,hasExpanderRight:!!w&&_==="right",externalSorting:f,onExternalSortingChange:d,externalRowSelection:a,initialSettings:L,onUpdate:V,enableColumnDragDrop:D}),ce=W5({data:t,columns:A,getCoreRowModel:z5(),enableColumnResizing:h,columnResizeMode:g,enableColumnPinning:x,...w&&{getRowCanExpand:ge=>w(ge.original),onExpandedChange:G},...s&&{enableRowSelection:ge=>s(ge.original)},meta:{translations:T},defaultColumn:{enableSorting:!1,minSize:50},...c&&{onSortingChange:ge=>{H(typeof ge=="function"?ge(W):ge)},getSortedRowModel:BI(),manualSorting:u},...p&&{onColumnFiltersChange:B,getFilteredRowModel:VI()},onColumnVisibilityChange:Z,onRowSelectionChange:ge=>{const fe=typeof ge=="function"?ge(q):ge;if(oe(fe),l&&a!==void 0){const Te=Object.keys(fe).filter(Pe=>fe[Pe]).map(Pe=>t[parseInt(Pe)]).filter(Boolean);l(fe,Te)}},onColumnPinningChange:le,onColumnOrderChange:re,state:{sorting:W,columnFilters:P,columnVisibility:Y,rowSelection:q,columnPinning:ne,columnOrder:Ee,...w&&{expanded:M}}});m.useEffect(()=>{if(l&&a===void 0){const ge=Object.keys(q).filter(fe=>q[fe]).map(fe=>t[parseInt(fe)]).filter(Boolean);l(q,ge)}},[q,l,t,a]);const K=m.useRef([]),Q=m.useCallback(()=>{K.current=Ee.length>0?[...Ee]:ce.getAllLeafColumns().map(ge=>ge.id)},[Ee,ce]),ae=m.useCallback(ge=>{re(fe=>{const Te=fe.length>0?fe:ce.getAllLeafColumns().map(We=>We.id);return b6({columns:Te},ge).columns})},[ce,re]),J=m.useCallback(ge=>{ge.operation.canceled&&re(K.current)},[re]);if(n)return i.jsx(dB,{columns:e,checkboxSelection:o,actions:I,rowHeight:U});if(t.length===0){const ge=r||{},{title:fe,description:Te,media:Pe,actions:We}=ge;return i.jsx(Bc,{media:Pe,title:fe??T.noResults,description:Te??T.noDataAvailable,actions:We})}const be=i.jsx("div",{className:j("app-data-table space-y-4",O),children:i.jsx("div",{className:"app-data-table rounded-md border overflow-x-auto",style:{height:F||"auto"},children:i.jsxs(ah,{className:j("table-fixed"),style:ce.getAllLeafColumns().some(ge=>ge.columnDef.flex)?{minWidth:ce.getTotalSize()}:void 0,children:[i.jsx("colgroup",{children:ce.getHeaderGroups()[0]?.headers.map(ge=>{const fe=ge.column.columnDef.enableResizing===!1,Te=ge.column.id==="_spacer",Pe=ge.column.getSize();return Te?i.jsx("col",{style:{width:"auto"}},ge.id):i.jsx("col",{style:{width:fe?`${Pe}px`:"auto",minWidth:fe?`${Pe}px`:void 0,maxWidth:fe?`${Pe}px`:void 0}},ge.id)})}),i.jsx(YB,{table:ce,enableColumnResizing:h,enableColumnDragDrop:D}),i.jsx(ZB,{table:ce,enableColumnResizing:h,onRowClick:v,onRowMouseEnter:y,onRowMouseLeave:b,rowHeight:U,getRowClassName:S,renderSubComponent:E})]})})});return D?i.jsx(l6,{onDragStart:Q,onDragOver:ae,onDragEnd:J,children:be}):be}const F6=C.forwardRef(({items:e,maxLength:t=7,showRemainingCount:n=!0,className:r},o)=>{if(!e||e.length===0)return null;const s=e[0],a=e.slice(1),l=s.name.length>t&&t>0,c=l?`${s.name.slice(0,t)}...`:s.name;return i.jsxs("div",{ref:o,className:j("flex items-center gap-2 h-[46px]",r),children:[s.icon&&i.jsx("img",{src:s.icon,alt:s.name,className:"h-4 w-4 object-contain",onError:u=>{u.currentTarget.style.display="none"}}),i.jsx("div",{className:"flex items-center gap-1",children:l?i.jsx(Mt,{children:i.jsxs(Vt,{children:[i.jsx(Bt,{asChild:!0,children:i.jsx("span",{className:"text-sm cursor-help",children:c})}),i.jsx(Dt,{children:i.jsx("p",{children:s.name})})]})}):i.jsx("span",{className:"text-sm",children:s.name})}),a.length>0&&n&&i.jsx(Mt,{children:i.jsxs(Vt,{children:[i.jsx(Bt,{asChild:!0,children:i.jsxs(Ze,{variant:"outline",className:"h-3 px-1 text-xs leading-none cursor-pointer hover:border-primary hover:text-primary",children:["+",a.length]})}),i.jsx(Dt,{className:"p-2",children:i.jsx("div",{className:"space-y-2",children:a.map((u,f)=>i.jsxs("div",{className:"flex items-center gap-3",children:[u.icon&&i.jsx("img",{src:u.icon,alt:u.name,className:"h-4 w-4 object-contain",onError:d=>{d.currentTarget.style.display="none"}}),i.jsx("span",{className:"text-sm text-foreground",children:u.name})]},`${u.name}-${f}`))})})]})})]})});F6.displayName="DataTableListCell";const az=Ge("fixed z-sheet bg-background shadow-lg transition-transform duration-300 ease-in-out",{variants:{side:{top:"inset-x-0 top-0 border-b",bottom:"inset-x-0 bottom-0 border-t",left:"inset-y-0 left-0 border-r w-3/4 sm:max-w-sm",right:"inset-y-0 right-0 border-l w-3/4 sm:max-w-lg"},isOpen:{true:"",false:""}},compoundVariants:[{side:"right",isOpen:!1,class:"translate-x-full"},{side:"right",isOpen:!0,class:"translate-x-0"},{side:"left",isOpen:!1,class:"-translate-x-full"},{side:"left",isOpen:!0,class:"translate-x-0"},{side:"top",isOpen:!1,class:"-translate-y-full"},{side:"top",isOpen:!0,class:"translate-y-0"},{side:"bottom",isOpen:!1,class:"translate-y-full"},{side:"bottom",isOpen:!0,class:"translate-y-0"}],defaultVariants:{side:"right",isOpen:!1}}),iz=Ge("fixed inset-0 z-sheet bg-black/50 transition-opacity duration-300",{variants:{isOpen:{true:"opacity-100",false:"opacity-0"}},defaultVariants:{isOpen:!1}}),hm=m.forwardRef(({className:e,side:t="right",title:n,description:r,open:o,onClose:s,buttons:a=[],width:l,height:c,showHeader:u=!0,showFooter:f=!0,children:d,headerClassName:p,contentClassName:h,footerClassName:g,loading:x=!1,...v},y)=>{const[b,S]=m.useState(!1),[w,E]=m.useState(!1);if(dm(o),pm(o),fm(o,s),m.useEffect(()=>{if(o){S(!0);const F=setTimeout(()=>E(!0),10);return()=>clearTimeout(F)}else{E(!1);const F=setTimeout(()=>S(!1),300);return()=>clearTimeout(F)}},[o]),!b)return null;const N=ss(l),_=ss(c),k={...N&&(t==="left"||t==="right")?{width:N,maxWidth:N}:{},..._&&(t==="top"||t==="bottom")?{height:_,maxHeight:_}:{}},I=i.jsxs(i.Fragment,{children:[i.jsx("div",{className:iz({isOpen:w}),onClick:s,"aria-hidden":"true"}),i.jsx("div",{ref:y,className:j(az({side:t,isOpen:w}),e),style:k,role:"dialog","aria-modal":"true","aria-labelledby":n?"sheet-title":void 0,"aria-describedby":r?"sheet-description":void 0,...v,children:i.jsxs("div",{className:"flex h-full flex-col",children:[u&&i.jsxs("div",{className:j("flex items-center justify-between border-b border-border p-6",p),children:[i.jsxs("div",{className:"flex flex-col gap-1",children:[n&&i.jsx("h2",{id:"sheet-title",className:"scroll-m-20 text-2xl tracking-tight font-semibold",children:n}),r&&i.jsx("p",{id:"sheet-description",className:"text-muted-foreground text-sm",children:r})]}),i.jsx(ot,{variant:"ghost",size:"icon",onClick:s,"aria-label":"Close",className:"h-6 w-6",children:i.jsx(X,{name:"X",size:"md"})})]}),i.jsx("div",{className:j("flex-1 overflow-y-auto p-6",h),children:d}),f&&a.length>0&&i.jsx("div",{className:j("flex items-center justify-end gap-3 border-t border-border p-6",g),children:a.map((F,U)=>i.jsx(ot,{disabled:x||F.disabled,...F},U))})]})})]});return ho.createPortal(I,document.body)});hm.displayName="Sheet";const $6=({open:e,onClose:t,onConfirm:n,title:r,description:o,confirmLabel:s="Confirm",cancelLabel:a="Cancel",variant:l="default",isLoading:c=!1,confirmDisabled:u=!1,children:f})=>{const d=[{children:a,variant:"outline",onClick:t,disabled:c,"data-action-name":"dialog.cancel"},{children:s,variant:l==="destructive"?"destructive":"default",onClick:n,loading:c,disabled:u,"data-action-name":"dialog.confirm"}];return i.jsx(fu,{open:e,closeIcon:t,title:r,buttons:d,children:i.jsxs("div",{className:"flex flex-col gap-4",children:[o&&i.jsx("p",{className:"text-sm text-muted-foreground",children:o}),f]})})};$6.displayName="ConfirmationDialog";const lz={1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"},V6=C.forwardRef(({title:e,id:t,description:n,actions:r,columns:o=2,items:s,children:a,className:l,cardClassName:c,...u},f)=>{const d=e||r||n;return i.jsxs("section",{ref:f,id:t,"data-testid":"detail-section",className:j("flex scroll-mt-24 flex-col gap-4",l),...u,children:[d&&i.jsxs("div",{className:"flex flex-col gap-1",children:[(e||r)&&i.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e&&i.jsx("h3",{className:"text-xl font-semibold tracking-tight text-foreground",children:e}),r&&i.jsx("div",{className:"flex items-center gap-2",children:r})]}),n&&i.jsx("p",{className:"text-sm text-muted-foreground",children:n})]}),i.jsx(Ss,{className:j("p-6",c),children:a??i.jsx("div",{className:j("grid gap-x-8 gap-y-6",lz[o]),children:s?.map((p,h)=>i.jsx(pi,{...p},h))})})]})});V6.displayName="DetailSection";const cz=()=>i.jsx("div",{"data-testid":"detail-drawer-skeleton",className:"flex flex-col gap-4",children:Array.from({length:5}).map((e,t)=>i.jsxs("div",{className:"flex flex-col gap-2",children:[i.jsx(Ln,{className:"h-4 w-24"}),i.jsx(Ln,{className:"h-5 w-48"})]},t))}),B6=({open:e,onClose:t,title:n,description:r,width:o=480,items:s,footer:a,loading:l=!1,children:c})=>i.jsx(hm,{open:e,onClose:t,title:n,description:r,width:o,buttons:a??[],showFooter:!!a?.length,children:l?i.jsx(cz,{}):i.jsxs("div",{className:"flex flex-col gap-6",children:[s&&s.length>0&&i.jsx("div",{className:"flex flex-col gap-4",children:s.map((u,f)=>i.jsx(pi,{orientation:"horizontal",labelWidth:180,...u},f))}),c]})});B6.displayName="DetailDrawer";const mm=C.forwardRef(({title:e,description:t,actions:n,className:r,...o},s)=>i.jsxs("div",{ref:s,"data-testid":"list-page-header",className:j("flex items-center justify-between gap-4",r),...o,children:[i.jsxs("div",{className:"flex flex-col gap-1",children:[i.jsx(Dp,{children:e}),t&&i.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),n&&i.jsx("div",{className:"flex shrink-0 items-center gap-3",children:n})]}));mm.displayName="ListPageHeader";const gm=C.forwardRef(({search:e,actions:t,filters:n,sticky:r=!1,className:o,...s},a)=>{const l=!!(e||t);return i.jsxs("div",{ref:a,"data-testid":"list-filter-toolbar",className:j("flex w-full flex-col items-start gap-6",r&&"sticky-filters",o),...s,children:[l&&i.jsxs("div",{className:"flex w-full items-center justify-between gap-3",children:[i.jsx("div",{className:"flex items-center gap-2",children:e}),t&&i.jsx("div",{className:"flex items-center gap-2",children:t})]}),n]})});gm.displayName="ListFilterToolbar";const uz=()=>i.jsxs("div",{"data-testid":"list-page-skeleton",className:"flex flex-col gap-3",children:[i.jsx(Ln,{className:"h-10 w-full"}),Array.from({length:6}).map((e,t)=>i.jsx(Ln,{className:"h-12 w-full"},t))]}),z6=C.forwardRef(({title:e,description:t,actions:n,search:r,filters:o,toolbarActions:s,stickyToolbar:a=!1,loading:l=!1,loadingFallback:c,empty:u=!1,emptyState:f,children:d,pagination:p,className:h,...g},x)=>{const v=!!(r||o||s);let y;return l?y=c??i.jsx(uz,{}):u?y=f??i.jsx(Bc,{title:"No results found"}):y=d,i.jsxs("div",{ref:x,"data-testid":"list-page-layout",className:j("flex flex-col gap-6",h),...g,children:[i.jsx(mm,{title:e,description:t,actions:n}),v&&i.jsx(gm,{search:r,filters:o,actions:s,sticky:a}),y,!l&&!u&&p]})});z6.displayName="ListPageLayout";const dz=()=>i.jsxs("div",{"data-testid":"detail-page-skeleton",className:"flex flex-col gap-6",children:[i.jsx(Ln,{className:"h-8 w-48"}),i.jsx(Ln,{className:"h-[180px] w-full"}),i.jsx(Ln,{className:"h-[280px] w-full"})]}),W6=C.forwardRef(({header:e,tabs:t,defaultTab:n=0,onTabChange:r,loading:o=!1,loadingFallback:s,children:a,className:l,...c},u)=>i.jsx("div",{ref:u,"data-testid":"detail-page-layout",className:j("flex flex-col gap-6",l),...c,children:o?s??i.jsx(dz,{}):i.jsxs(i.Fragment,{children:[e,t&&t.length>0?i.jsx(Wp,{tabs:t,defaultTab:n,onChange:r}):a]})}));W6.displayName="DetailPageLayout";const H6=C.forwardRef(({title:e,status:t,actions:n,items:r,children:o,className:s,cardClassName:a,...l},c)=>i.jsx("div",{ref:c,"data-testid":"detail-page-header",className:s,...l,children:i.jsxs(Ss,{className:j("flex flex-col gap-6 p-6",a),children:[i.jsxs("div",{className:"flex items-center justify-between gap-4",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("h2",{className:"text-2xl font-bold text-foreground",children:e}),t]}),n&&i.jsx("div",{className:"flex shrink-0 items-center gap-2",children:n})]}),r&&r.length>0&&i.jsx("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-4",children:r.map((u,f)=>i.jsxs(C.Fragment,{children:[i.jsx(pi,{...u}),f<r.length-1&&i.jsx(Pa,{orientation:"vertical",className:"h-10 self-center"})]},f))}),o]})}));H6.displayName="DetailPageHeader";const G6=C.forwardRef(({items:e,activeId:t,onSelect:n,spy:r=!1,sticky:o=!1,className:s,...a},l)=>{const[c,u]=C.useState(e[0]?.id),f=t??c;C.useEffect(()=>{if(!r||typeof IntersectionObserver>"u")return;const p=new IntersectionObserver(h=>{const g=h.filter(x=>x.isIntersecting).sort((x,v)=>x.boundingClientRect.top-v.boundingClientRect.top)[0];g?.target.id&&u(g.target.id)},{rootMargin:"0px 0px -70% 0px",threshold:0});return e.forEach(h=>{const g=document.getElementById(h.id);g&&p.observe(g)}),()=>p.disconnect()},[r,e]);const d=p=>{u(p),n?.(p),document.getElementById(p)?.scrollIntoView?.({behavior:"smooth",block:"start"})};return i.jsx("nav",{ref:l,"data-testid":"section-nav",role:"tablist",className:j("flex gap-0",o&&"sticky top-0 z-10 bg-background",s),...a,children:e.map(p=>i.jsx($c,{role:"tab",current:f===p.id,"aria-selected":f===p.id,badge:p.badge,onClick:h=>{h.preventDefault(),d(p.id)},children:p.label},p.id))})});G6.displayName="SectionNav";const U6=C.forwardRef(({continuous:e,step:t,closeProps:n,primaryProps:r,tooltipProps:o,withTag:s=!1,tagLabel:a,buttonGroup:l=[],width:c,skipProps:u,index:f,size:d,closeLabel:p},h)=>{const g=v=>{n?.onClick?.(v)},x=(v,y)=>{y(),g(v)};return i.jsxs(i.Fragment,{children:[i.jsx("style",{children:`
|
|
151
151
|
.react-joyride__spotlight {
|
|
152
152
|
border-radius: 8px !important;
|
|
153
153
|
}
|
|
154
|
-
`}),i.jsxs("div",{...o,ref:h,className:j("bg-popover rounded-md border border-border shadow-md p-4","max-w-[368px]",c&&`max-w-[${c}px]`),style:c?{maxWidth:`${c}px`}:void 0,children:[i.jsxs("div",{className:"flex items-start justify-between gap-4 mb-2",children:[i.jsx("div",{className:"flex-1",children:t.title&&i.jsx("h4",{className:"scroll-m-20 tracking-tight text-base font-medium leading-none",children:t.title})}),!t.hideCloseButton&&i.jsx(ot,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0","aria-label":p??"Close",onClick:n?.onClick,children:i.jsx(X,{name:"X",size:"sm"})})]}),i.jsx("div",{className:"mb-6",children:i.jsx("p",{className:"text-sm text-muted-foreground font-normal leading-normal",children:t.content})}),i.jsxs("div",{className:"flex items-center justify-between gap-3",children:[u&&f!==(d??0)-1&&i.jsx(ot,{variant:"outline",size:"default",...u,onClick:n?.onClick,children:u.title}),(d??0)>1&&i.jsxs("p",{className:"text-sm font-medium leading-none text-muted-foreground",children:["Step ",(f??0)+1," of ",d]}),e&&r&&i.jsx(ot,{size:"default",...r,children:r.title})]}),!e&&l.length>0&&i.jsxs("div",{className:j("flex items-center mt-6 gap-3",l.length>1?"justify-between":"justify-end"),children:[s&&a&&i.jsx(Ze,{variant:"default",className:"bg-green-100 text-green-800",children:a}),l.map((v,y)=>i.jsx(ot,{variant:v.variant||"default",size:v.size||"default",loading:v.loading,disabled:v.disabled,onClick:b=>x(b,v.event),children:v.label},y))]})]})]})});G6.displayName="Tutorial";const cz=({item:e,onMove:t,moveIconName:n="PlusCircle",moveLabel:r,isSelected:o=!1})=>i.jsxs("div",{className:"flex items-center py-1.5 px-2 bg-muted border border-border rounded gap-2 cursor-grabbing",role:"option","aria-selected":o,tabIndex:-1,children:[i.jsx("span",{className:"flex items-center shrink-0",children:i.jsx(X,{name:"DotsSixVertical",className:"text-muted-foreground"})}),i.jsxs("span",{className:"text-xs text-foreground flex-1 flex flex-col gap-0.5",children:[i.jsx("span",{children:e.label}),e.description&&i.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:e.description})]}),e.actions,t&&i.jsx(ot,{variant:"ghost",size:"icon","aria-label":r?`${r} ${e.label}`:void 0,onClick:s=>s.stopPropagation(),children:i.jsx(X,{name:n,className:"text-muted-foreground"})})]}),uz=({item:e,index:t,group:n,onMove:r,moveIconName:o="PlusCircle",moveLabel:s,isSelected:a=!1})=>{const{ref:l,isDragging:c}=P6({id:e.id,index:t,group:n});return i.jsxs("div",{ref:l,className:j("flex items-center py-1.5 px-2 bg-muted border border-border rounded gap-2 cursor-grab",c&&"opacity-50 cursor-grabbing"),role:"option","aria-selected":a,tabIndex:0,onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&r&&(u.preventDefault(),r(e))},children:[i.jsx("span",{className:"flex items-center shrink-0",children:i.jsx(X,{name:"DotsSixVertical",className:"text-muted-foreground"})}),i.jsxs("span",{className:"text-xs text-foreground flex-1 flex flex-col gap-0.5",children:[i.jsx("span",{children:e.label}),e.description&&i.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:e.description})]}),e.actions,r&&i.jsx(ot,{variant:"ghost",size:"icon","aria-label":s?`${s} ${e.label}`:void 0,onClick:u=>{u.stopPropagation(),r(e)},children:i.jsx(X,{name:o,className:"text-muted-foreground"})})]})},U6=({title:e="No items",description:t="No items available",iconName:n="TextColumns"})=>i.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 border border-border rounded-lg p-4 bg-muted",children:[i.jsx(X,{name:n,className:"text-muted-foreground",size:"xl"}),i.jsx("p",{className:"text-base text-center text-foreground font-bold",children:e}),i.jsx("p",{className:"text-xs text-center text-muted-foreground",children:t})]}),dz=1,y0=({id:e,title:t,items:n,height:r,showSearch:o,search:s,searchPlaceholder:a,onSearchChange:l,onMove:c,moveIconName:u,moveLabel:f,emptyState:d,isSelected:p=!1})=>{const h=`${e}-title`,m=n.length===0,{ref:x}=JV({id:e,collisionPriority:dz}),v=d??i.jsx(U6,{});return i.jsxs("div",{className:"border border-border rounded-lg p-4 w-full flex flex-col gap-2",style:{height:r},children:[i.jsx("p",{id:h,className:"text-sm text-foreground mb-2",children:t}),o&&(!m||s.length>0)&&i.jsx(ds,{placeholder:a,value:s,onChange:y=>l(y.target.value),"aria-label":`${t} search`}),i.jsx("div",{ref:x,className:"h-full overflow-auto w-full flex flex-col gap-2",role:"listbox","aria-labelledby":h,"aria-multiselectable":!0,children:m?v:n.map((y,b)=>i.jsx(uz,{item:y,index:b,group:e,onMove:c,moveIconName:u,moveLabel:f,isSelected:p},y.id))})]})},Y6=C.forwardRef(({left:e,right:t,onChange:n,leftTitle:r="Available",rightTitle:o="Chosen",height:s=420,showSearch:a=!0,searchPlaceholder:l="Search",emptyState:c,leftEmptyState:u,className:f,...d},p)=>{const[h,m]=C.useState(""),[x,v]=C.useState(""),[y,b]=C.useState({left:e,right:t}),S=C.useRef(y),w=C.useRef(!1),E=C.useRef({left:e,right:t});C.useEffect(()=>{if(!w.current){const R={left:e,right:t};b(R),S.current=R}},[e,t]);const N=C.useMemo(()=>{const R=ut(h).toLowerCase();return R?y.left.filter(L=>ut(L.label).toLowerCase().includes(R)):y.left},[y.left,h]),_=C.useMemo(()=>{const R=ut(x).toLowerCase();return R?y.right.filter(L=>ut(L.label).toLowerCase().includes(R)):y.right},[y.right,x]),k=()=>{w.current=!0,E.current=S.current},I=R=>{h.length>0||x.length>0||b(L=>{const V=y6(L,R);return S.current=V,V})},F=R=>{if(w.current=!1,R.canceled||h.length>0||x.length>0){b(E.current),S.current=E.current;return}n(S.current.left,S.current.right)},U=R=>{n(e.filter(L=>L.id!==R.id),[...t,R])},O=R=>{n([...e,R],t.filter(L=>L.id!==R.id))};return i.jsxs(i6,{onDragStart:k,onDragOver:I,onDragEnd:F,children:[i.jsxs("div",{ref:p,className:j("flex flex-col md:flex-row gap-4",f),...d,children:[i.jsx(y0,{id:"left",title:r,items:N,height:s,showSearch:a,searchPlaceholder:l,search:h,onSearchChange:m,onMove:U,moveIconName:"PlusCircle",moveLabel:"Add",isSelected:!1,emptyState:u}),i.jsx(y0,{id:"right",title:o,items:_,height:s,showSearch:a,searchPlaceholder:l,search:x,onSearchChange:v,onMove:O,moveIconName:"MinusCircle",moveLabel:"Remove",emptyState:c,isSelected:!0})]}),i.jsx(LV,{children:R=>{const L=S.current.left.concat(S.current.right).find(V=>V.id===R.id);return L?i.jsx(cz,{item:L}):null}})]})});Y6.displayName="TransferList";const fz=({message:e="No results"})=>i.jsx("div",{className:"p-4 text-center",children:i.jsx("p",{className:"text-sm font-medium leading-none text-muted-foreground",children:e})}),K6=C.forwardRef(({value:e,options:t,selectPlaceholder:n="Select",searchPlaceholder:r="Search",onChange:o,onCloseChip:s,valueProp:a="value",fullWidth:l=!1,disabled:c=!1,withSearch:u=!0,limitTags:f=10,maxHeightList:d=320,emptyState:p=i.jsx(fz,{}),label:h,description:m,error:x,deleteAll:v,className:y,id:b,renderOption:S,renderChip:w,"aria-label":E,"aria-labelledby":N},_)=>{const[k,I]=C.useState(!1),[F,U]=C.useState(""),[O,R]=C.useState(t),L=C.useRef(null);C.useEffect(()=>{R(t)},[t]),C.useEffect(()=>{k&&L.current&&u&&setTimeout(()=>{L.current?.focus()},0)},[k,u]);const V=T=>{const B=T.label||T[a];return String(B)},D=T=>{const B=T.target.value;if(U(B),B==="")R(t);else{const Y=t.filter(Z=>V(Z).toLowerCase().includes(B.toLowerCase()));R(Y)}},$=T=>{if(c)return;const B=e.includes(T)?e.filter(Y=>Y!==T):[...e,T];o(B)},z=T=>{if(!c)if(s)s(T);else{const B=e.filter(Y=>Y!==T);o(B)}},P=()=>{c||!v?.onClick||v.onClick()},M=(T,B)=>T?.length<=B?T:T?.substring(0,B)+"...",G=e.map(T=>t.find(B=>B[a]===T)).filter(Boolean),A=v&&!c&&e.length>=v.length,W=G.slice(0,f),H=G.length-f;return i.jsxs("div",{className:j("w-full",l&&"w-full",y),children:[h&&i.jsx(Wt,{htmlFor:b,className:j("mb-2 block",c&&"opacity-50"),children:h}),m&&!x&&i.jsx("p",{className:j("text-sm font-medium leading-none",j("text-muted-foreground mb-2",c&&"opacity-50")),children:m}),i.jsxs(Gb,{open:k,onOpenChange:I,children:[i.jsx(Ub,{asChild:!0,children:i.jsxs("button",{ref:_,id:b,type:"button",disabled:c,role:"combobox","aria-expanded":k,"aria-haspopup":"listbox","aria-controls":k?`${b}-listbox`:void 0,"aria-label":E,"aria-labelledby":N,className:j("flex h-auto min-h-[38px] w-full items-center justify-between gap-2 rounded-md border border-input bg-input px-3 py-1.5 text-sm shadow-xs 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",x&&"border-destructive",l&&"w-full"),children:[i.jsx("div",{className:"flex flex-wrap gap-1 flex-1 items-center",children:e.length===0?i.jsx("span",{className:"text-muted-foreground",children:n}):i.jsxs(i.Fragment,{children:[A&&i.jsx("div",{onClick:T=>{T.preventDefault(),T.stopPropagation(),P()},children:i.jsx(Ze,{variant:"secondary",className:"gap-1 cursor-pointer flex items-center",children:v.label||"Delete all"})}),W.map(T=>i.jsx("div",{onClick:B=>{s&&!c&&(B.preventDefault(),B.stopPropagation(),z(T[a]))},children:w?w(T):i.jsx(Ze,{variant:"outline",className:"gap-1 flex items-center",endIcon:s&&!c?"X":void 0,children:M(V(T),8)})},T[a])),H>0&&i.jsx(Ze,{variant:"outline",className:"flex items-center",children:`+${H}`})]})}),i.jsx(X,{name:"CaretUpDown",size:"sm",className:j("opacity-50 transition-transform",k&&"transform rotate-180")})]})}),i.jsx(Xp,{className:"p-0",align:"start",style:{maxHeight:d},id:b?`${b}-listbox`:void 0,role:"listbox",children:i.jsxs("div",{className:"flex flex-col",children:[u&&t.length>0&&i.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b",children:[i.jsx(X,{name:"MagnifyingGlass",size:"sm",className:"text-muted-foreground"}),i.jsx("input",{ref:L,type:"text",placeholder:r,value:F,onChange:D,onKeyDown:T=>{T.stopPropagation(),T.key==="Escape"&&I(!1)},className:"flex-1 outline-none bg-transparent text-sm placeholder:text-muted-foreground","aria-label":r})]}),i.jsx("div",{className:"overflow-y-auto",style:{maxHeight:u?d-48:d},children:O.length>0?O.map(T=>i.jsx("div",{role:"option","aria-selected":e.includes(T[a]),className:"flex items-center gap-2 px-3 py-2 cursor-pointer hover:bg-accent transition-colors",onClick:()=>$(T[a]),onKeyDown:B=>{(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),$(T[a]))},children:S?S(T,e.includes(T[a])):i.jsxs(i.Fragment,{children:[i.jsx(Oa,{checked:e.includes(T[a]),onChange:()=>$(T[a]),onClick:B=>B.stopPropagation()}),i.jsx("span",{className:"text-sm flex-1",children:V(T)})]})},T[a])):p})]})})]}),x&&i.jsx("p",{className:"text-sm font-medium leading-none text-destructive mt-2",children:x})]})});K6.displayName="Combobox";const Z6=g.forwardRef(({options:e,value:t=[],onChange:n,placeholder:r="Select items...",searchPlaceholder:o="Search",emptyMessage:s="No results found.",disabled:a=!1,label:l,description:c,error:u,maxDisplay:f=3,className:d,showBadges:p=!0,allowClear:h=!0,"aria-label":m},x)=>{const v=g.useId(),[y,b]=g.useState(!1),[S,w]=g.useState(""),E=O=>{const R=t.includes(O)?t.filter(L=>L!==O):[...t,O];n?.(R)},N=(O,R)=>{R?.preventDefault(),R?.stopPropagation();const L=t.filter(V=>V!==O);n?.(L)},_=O=>{O.preventDefault(),O.stopPropagation(),n?.([])},k=t.map(O=>e.find(R=>R.value===O)).filter(Boolean),I=p?k.slice(0,f):[],F=k.length>f?k.length-f:0,U=()=>t.length===0?i.jsx("span",{children:r}):p?i.jsxs(i.Fragment,{children:[I.map(O=>i.jsxs("span",{className:"inline-flex items-center mr-1 px-2 py-0.5 h-6 text-xs font-normal rounded-md border border-border bg-secondary text-secondary-foreground",children:[O.icon&&i.jsx("img",{src:O.icon,alt:"",className:"mr-1 h-3.5 w-3.5 shrink-0 rounded-full object-cover",onError:R=>{R.currentTarget.style.display="none"}}),i.jsx("span",{className:"max-w-[150px] truncate",children:O.label}),i.jsx("button",{type:"button","aria-label":`Remove ${O.label}`,className:"ml-1 rounded-full outline-hidden hover:bg-muted-foreground/20",onClick:R=>N(O.value,R),children:i.jsx(X,{name:"X",className:"h-3 w-3"})})]},O.value)),F>0&&i.jsxs("span",{className:"inline-flex items-center px-2 py-0.5 h-6 text-xs font-normal rounded-md border border-border bg-secondary text-secondary-foreground",children:["+",F," more"]})]}):i.jsxs("span",{className:"text-sm",children:[k.length," selected"]});return i.jsxs("div",{className:"w-full",children:[l&&i.jsx("label",{htmlFor:v,className:"text-sm font-medium text-foreground mb-1.5 block",children:l}),c&&i.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:c}),i.jsxs(Ac,{open:y,onOpenChange:b,children:[i.jsx(Tc,{asChild:!0,children:i.jsxs(wt,{ref:x,id:v,variant:"outline",role:"combobox","aria-expanded":y,"aria-label":m,disabled:a,className:j("w-full justify-between h-auto min-h-9 py-2",u&&"border-destructive",!t.length&&"text-muted-foreground",d),children:[i.jsx("div",{className:"flex flex-wrap gap-1 items-center flex-1",children:U()}),i.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[h&&t.length>0&&i.jsx("button",{type:"button","aria-label":"Clear selection",onClick:_,className:"h-4 w-4 rounded-full hover:bg-muted p-0.5",children:i.jsx(X,{name:"X",className:"h-3 w-3"})}),i.jsx("svg",{className:"h-4 w-4 shrink-0 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]})}),i.jsx(ii,{className:"w-[var(--radix-popover-trigger-width)] p-0",children:i.jsxs(p5,{shouldFilter:!1,children:[i.jsx(h5,{placeholder:o,"aria-label":o,value:S,onValueChange:w}),i.jsx(m5,{children:s}),i.jsx(g5,{children:i.jsx(x5,{children:e.filter(O=>O.label.toLowerCase().includes(S.toLowerCase())).map(O=>i.jsxs(Kd,{value:O.value,onSelect:()=>{E(O.value)},children:[i.jsx(X,{name:"Check",className:j("mr-2 h-4 w-4",t.includes(O.value)?"opacity-100":"opacity-0")}),O.icon&&i.jsx("img",{src:O.icon,alt:"",className:"mr-2 h-4 w-4 shrink-0 rounded-full object-cover",onError:R=>{R.currentTarget.style.display="none"}}),O.label]},O.value))})})]})})]}),u&&i.jsx("p",{className:"text-sm text-destructive mt-1.5",children:u})]})});Z6.displayName="MultiSelect";const q6={addFilter:"Add filter",clearFilters:"Clear filters",noFiltersApplied:"No filters applied",moreFilters:"+{count} more",selectAll:"Select all",inverse:"Inverse",none:"None",search:"Search",typeToSearch:"Type to search",moreResults:"{count} more results — refine your search",moreOptions:"{count} more — type to search",showMore:"Show more",typeAndPressEnter:"Type and press Enter...",onlyNumericAllowed:"Only numeric values are allowed",clearAll:"Clear all",custom:"Custom",today:"Today",last3Days:"Last 3 days",last7Days:"Last 7 days",last30Days:"Last 30 days",thisMonth:"This month",allTime:"All time",startDate:"Start date",endDate:"End date",selectDate:"Select date",sunday:"Sunday",monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday",jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"},pz={addFilter:"Agregar filtro",clearFilters:"Limpiar filtros",noFiltersApplied:"Sin filtros aplicados",moreFilters:"+{count} más",selectAll:"Seleccionar todo",inverse:"Invertir",none:"Ninguno",search:"Buscar",typeToSearch:"Escribe para buscar",moreResults:"{count} resultados más — refina tu búsqueda",moreOptions:"{count} más — escribe para buscar",showMore:"Mostrar más",typeAndPressEnter:"Escribe y presiona Enter...",onlyNumericAllowed:"Solo se permiten valores numéricos",clearAll:"Limpiar todo",custom:"Personalizado",today:"Hoy",last3Days:"Últimos 3 días",last7Days:"Últimos 7 días",last30Days:"Últimos 30 días",thisMonth:"Este mes",allTime:"Todo el tiempo",startDate:"Fecha inicio",endDate:"Fecha fin",selectDate:"Seleccionar fecha",sunday:"Domingo",monday:"Lunes",tuesday:"Martes",wednesday:"Miércoles",thursday:"Jueves",friday:"Viernes",saturday:"Sábado",jan:"Ene",feb:"Feb",mar:"Mar",apr:"Abr",may:"May",jun:"Jun",jul:"Jul",aug:"Ago",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dic"},hz={addFilter:"フィルターを追加",clearFilters:"フィルターをクリア",noFiltersApplied:"フィルターが適用されていません",moreFilters:"+{count}件",selectAll:"すべて選択",inverse:"反転",none:"なし",search:"検索",typeToSearch:"入力して検索",moreResults:"他{count}件 — 検索条件を絞ってください",moreOptions:"他{count}件 — 入力して検索",showMore:"もっと見る",typeAndPressEnter:"入力してEnterを押す...",onlyNumericAllowed:"数値のみ入力可能です",clearAll:"すべてクリア",custom:"カスタム",today:"今日",last3Days:"過去3日間",last7Days:"過去7日間",last30Days:"過去30日間",thisMonth:"今月",allTime:"全期間",startDate:"開始日",endDate:"終了日",selectDate:"日付を選択",sunday:"日曜日",monday:"月曜日",tuesday:"火曜日",wednesday:"水曜日",thursday:"木曜日",friday:"金曜日",saturday:"土曜日",jan:"1月",feb:"2月",mar:"3月",apr:"4月",may:"5月",jun:"6月",jul:"7月",aug:"8月",sep:"9月",oct:"10月",nov:"11月",dec:"12月"},gz={addFilter:"إضافة فلتر",clearFilters:"مسح الفلاتر",noFiltersApplied:"لم يتم تطبيق فلاتر",moreFilters:"+{count} أخرى",selectAll:"تحديد الكل",inverse:"عكس",none:"لا شيء",search:"بحث",typeToSearch:"اكتب للبحث",moreResults:"{count} نتيجة أخرى — حسّن بحثك",moreOptions:"{count} أخرى — اكتب للبحث",showMore:"عرض المزيد",typeAndPressEnter:"اكتب واضغط Enter...",onlyNumericAllowed:"مسموح بالقيم الرقمية فقط",clearAll:"مسح الكل",custom:"مخصص",today:"اليوم",last3Days:"آخر 3 أيام",last7Days:"آخر 7 أيام",last30Days:"آخر 30 يوماً",thisMonth:"هذا الشهر",allTime:"كل الوقت",startDate:"تاريخ البدء",endDate:"تاريخ الانتهاء",selectDate:"اختر التاريخ",sunday:"الأحد",monday:"الاثنين",tuesday:"الثلاثاء",wednesday:"الأربعاء",thursday:"الخميس",friday:"الجمعة",saturday:"السبت",jan:"يناير",feb:"فبراير",mar:"مارس",apr:"أبريل",may:"مايو",jun:"يونيو",jul:"يوليو",aug:"أغسطس",sep:"سبتمبر",oct:"أكتوبر",nov:"نوفمبر",dec:"ديسمبر"},mz={addFilter:"Ajouter un filtre",clearFilters:"Effacer les filtres",noFiltersApplied:"Aucun filtre appliqué",moreFilters:"+{count} autres",selectAll:"Tout sélectionner",inverse:"Inverser",none:"Aucun",search:"Rechercher",typeToSearch:"Tapez pour rechercher",moreResults:"{count} résultats supplémentaires — affinez votre recherche",moreOptions:"{count} autres — tapez pour rechercher",showMore:"Afficher plus",typeAndPressEnter:"Tapez et appuyez sur Entrée...",onlyNumericAllowed:"Seules les valeurs numériques sont autorisées",clearAll:"Tout effacer",custom:"Personnalisé",today:"Aujourd'hui",last3Days:"3 derniers jours",last7Days:"7 derniers jours",last30Days:"30 derniers jours",thisMonth:"Ce mois-ci",allTime:"Tout le temps",startDate:"Date de début",endDate:"Date de fin",selectDate:"Sélectionner une date",sunday:"Dimanche",monday:"Lundi",tuesday:"Mardi",wednesday:"Mercredi",thursday:"Jeudi",friday:"Vendredi",saturday:"Samedi",jan:"Janv",feb:"Févr",mar:"Mars",apr:"Avr",may:"Mai",jun:"Juin",jul:"Juil",aug:"Août",sep:"Sept",oct:"Oct",nov:"Nov",dec:"Déc"},xz={addFilter:"Adicionar filtro",clearFilters:"Limpar filtros",noFiltersApplied:"Nenhum filtro aplicado",moreFilters:"+{count} mais",selectAll:"Selecionar tudo",inverse:"Inverter",none:"Nenhum",search:"Pesquisar",typeToSearch:"Digite para pesquisar",moreResults:"Mais {count} resultados — refine sua pesquisa",moreOptions:"Mais {count} — digite para pesquisar",showMore:"Mostrar mais",typeAndPressEnter:"Digite e pressione Enter...",onlyNumericAllowed:"Apenas valores numéricos são permitidos",clearAll:"Limpar tudo",custom:"Personalizado",today:"Hoje",last3Days:"Últimos 3 dias",last7Days:"Últimos 7 dias",last30Days:"Últimos 30 dias",thisMonth:"Este mês",allTime:"Todo o período",startDate:"Data inicial",endDate:"Data final",selectDate:"Selecionar data",sunday:"Domingo",monday:"Segunda-feira",tuesday:"Terça-feira",wednesday:"Quarta-feira",thursday:"Quinta-feira",friday:"Sexta-feira",saturday:"Sábado",jan:"Jan",feb:"Fev",mar:"Mar",apr:"Abr",may:"Mai",jun:"Jun",jul:"Jul",aug:"Ago",sep:"Set",oct:"Out",nov:"Nov",dec:"Dez"},vz={addFilter:"Filtre ekle",clearFilters:"Filtreleri temizle",noFiltersApplied:"Uygulanan filtre yok",moreFilters:"+{count} daha",selectAll:"Tümünü seç",inverse:"Tersine çevir",none:"Hiçbiri",search:"Ara",typeToSearch:"Aramak için yazın",moreResults:"{count} sonuç daha — aramanızı daraltın",moreOptions:"{count} daha — aramak için yazın",showMore:"Daha fazla göster",typeAndPressEnter:"Yazın ve Enter'a basın...",onlyNumericAllowed:"Yalnızca sayısal değerlere izin verilir",clearAll:"Tümünü temizle",custom:"Özel",today:"Bugün",last3Days:"Son 3 gün",last7Days:"Son 7 gün",last30Days:"Son 30 gün",thisMonth:"Bu ay",allTime:"Tüm zamanlar",startDate:"Başlangıç tarihi",endDate:"Bitiş tarihi",selectDate:"Tarih seçin",sunday:"Pazar",monday:"Pazartesi",tuesday:"Salı",wednesday:"Çarşamba",thursday:"Perşembe",friday:"Cuma",saturday:"Cumartesi",jan:"Oca",feb:"Şub",mar:"Mar",apr:"Nis",may:"May",jun:"Haz",jul:"Tem",aug:"Ağu",sep:"Eyl",oct:"Eki",nov:"Kas",dec:"Ara"},yz={addFilter:"Добавить фильтр",clearFilters:"Очистить фильтры",noFiltersApplied:"Фильтры не применены",moreFilters:"+{count} ещё",selectAll:"Выбрать все",inverse:"Инвертировать",none:"Ничего",search:"Поиск",typeToSearch:"Введите текст для поиска",moreResults:"Ещё {count} результатов — уточните поиск",moreOptions:"Ещё {count} — введите текст для поиска",showMore:"Показать ещё",typeAndPressEnter:"Введите и нажмите Enter...",onlyNumericAllowed:"Допускаются только числовые значения",clearAll:"Очистить все",custom:"Произвольный",today:"Сегодня",last3Days:"Последние 3 дня",last7Days:"Последние 7 дней",last30Days:"Последние 30 дней",thisMonth:"Этот месяц",allTime:"Все время",startDate:"Дата начала",endDate:"Дата окончания",selectDate:"Выберите дату",sunday:"Воскресенье",monday:"Понедельник",tuesday:"Вторник",wednesday:"Среда",thursday:"Четверг",friday:"Пятница",saturday:"Суббота",jan:"Янв",feb:"Фев",mar:"Мар",apr:"Апр",may:"Май",jun:"Июн",jul:"Июл",aug:"Авг",sep:"Сен",oct:"Окт",nov:"Ноя",dec:"Дек"},bz={addFilter:"Filter hinzufügen",clearFilters:"Filter löschen",noFiltersApplied:"Keine Filter angewendet",moreFilters:"+{count} weitere",selectAll:"Alle auswählen",inverse:"Umkehren",none:"Keine",search:"Suchen",typeToSearch:"Zum Suchen tippen",moreResults:"{count} weitere Ergebnisse — Suche verfeinern",moreOptions:"{count} weitere — zum Suchen tippen",showMore:"Mehr anzeigen",typeAndPressEnter:"Eingeben und Enter drücken...",onlyNumericAllowed:"Nur numerische Werte sind erlaubt",clearAll:"Alle löschen",custom:"Benutzerdefiniert",today:"Heute",last3Days:"Letzte 3 Tage",last7Days:"Letzte 7 Tage",last30Days:"Letzte 30 Tage",thisMonth:"Dieser Monat",allTime:"Gesamter Zeitraum",startDate:"Startdatum",endDate:"Enddatum",selectDate:"Datum auswählen",sunday:"Sonntag",monday:"Montag",tuesday:"Dienstag",wednesday:"Mittwoch",thursday:"Donnerstag",friday:"Freitag",saturday:"Samstag",jan:"Jan",feb:"Feb",mar:"Mär",apr:"Apr",may:"Mai",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Okt",nov:"Nov",dec:"Dez"},wz={addFilter:"添加筛选",clearFilters:"清除筛选",noFiltersApplied:"未应用筛选",moreFilters:"+{count}个",selectAll:"全选",inverse:"反选",none:"清空",search:"搜索",typeToSearch:"输入以搜索",moreResults:"还有{count}个结果 — 请细化搜索",moreOptions:"还有{count}个 — 输入以搜索",showMore:"显示更多",typeAndPressEnter:"输入并按回车...",onlyNumericAllowed:"仅允许输入数字",clearAll:"清除全部",custom:"自定义",today:"今天",last3Days:"最近3天",last7Days:"最近7天",last30Days:"最近30天",thisMonth:"本月",allTime:"全部时间",startDate:"开始日期",endDate:"结束日期",selectDate:"选择日期",sunday:"星期日",monday:"星期一",tuesday:"星期二",wednesday:"星期三",thursday:"星期四",friday:"星期五",saturday:"星期六",jan:"1月",feb:"2月",mar:"3月",apr:"4月",may:"5月",jun:"6月",jul:"7月",aug:"8月",sep:"9月",oct:"10月",nov:"11月",dec:"12月"},Cz={en:q6,es:pz,ja:hz,ar:gz,fr:mz,pt:xz,tr:vz,ru:yz,de:bz,zh:wz},Sz=q6;function Vs(e){const t=e??Za();return Cz[t]??Sz}function Ez(e){return[e.sunday,e.monday,e.tuesday,e.wednesday,e.thursday,e.friday,e.saturday]}function Nz(e){return[e.jan,e.feb,e.mar,e.apr,e.may,e.jun,e.jul,e.aug,e.sep,e.oct,e.nov,e.dec]}function X6(e,t){return e.moreFilters.replace("{count}",String(t))}function _z(e,t){return e.moreResults.replace("{count}",String(t))}function jz(e,t){return e.moreOptions.replace("{count}",String(t))}const kz=e=>Array.isArray(e)?e:e?[e]:[],xg=C.forwardRef(({label:e,onRemove:t,className:n,...r},o)=>i.jsxs(rp,{ref:o,variant:"secondary",className:j("h-8 gap-2 px-3 py-2 shadow-xs",n),...r,children:[i.jsx("span",{className:"text-xs font-medium leading-none",children:e}),t&&i.jsx("button",{onClick:t,className:"inline-flex items-center justify-center","aria-label":`Remove ${e} filter`,children:i.jsx(X,{name:"X",className:"size-4"})})]}));xg.displayName="FilterTag";const J6=C.forwardRef(({appliedFilters:e=[],onRemoveFilter:t,onClearAll:n,maxVisibleTags:r=4,className:o,lang:s,translations:a,...l},c)=>{const u=C.useMemo(()=>{const h=Vs(s);return a?{...h,...a}:h},[s,a]),f=e.length>0,d=e.slice(0,r),p=e.length-r;return i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsxs(wt,{ref:c,variant:"outline",size:"sm",className:j("h-8 gap-2 px-3 py-2",o),...l,children:[i.jsx(X,{name:"FunnelSimple",className:"size-4"}),i.jsx("span",{className:"text-xs font-medium leading-none",children:u.addFilter})]}),f&&i.jsxs(i.Fragment,{children:[i.jsx(Nr,{orientation:"vertical",className:"h-5"}),i.jsxs("div",{className:"flex items-center gap-2",children:[d.map(h=>i.jsx(xg,{label:h.label,onRemove:()=>t?.(h.id)},h.id)),p>0&&i.jsx(rp,{variant:"default",className:"h-8 px-3 py-2 shadow-xs",children:i.jsx("span",{className:"text-xs font-medium leading-none",children:X6(u,p)})}),n&&i.jsx(wt,{variant:"ghost",size:"sm",onClick:n,className:"h-8 px-3 py-2",children:i.jsx("span",{className:"text-xs font-medium leading-none text-primary",children:u.clearFilters})})]})]}),!f&&i.jsxs(i.Fragment,{children:[i.jsx(Nr,{orientation:"vertical",className:"h-5"}),i.jsx("span",{className:"text-sm font-normal text-muted-foreground",children:u.noFiltersApplied})]})]})});J6.displayName="FilterButton";const ol=1e3,ic=C.forwardRef((e,t)=>{const{title:n,items:r,className:o,searchable:s=!1,searchPlaceholder:a,showActions:l=!1,enableSelectAll:c=!0,enableInverse:u=!0,enableNone:f=!0,description:d,footer:p,lang:h,translations:m}=e,x=C.useMemo(()=>{const P=Vs(h);return m?{...P,...m}:P},[h,m]),v=e.type||"checkbox",y=v==="radio",b=v==="checkbox"||!e.type,[S,w]=C.useState(""),[E,N]=C.useState(ol),_=C.useMemo(()=>{const P=ut(S).toLowerCase();return P?r.filter(M=>ut(M.label).toLowerCase().includes(P)):r},[r,S]),k=r.length>ol,I=s||k,F=k&&!S,U="selectedValues"in e?e.selectedValues:e.selectedValue,{visibleItems:O,hiddenMatchCount:R}=C.useMemo(()=>{if(!k)return{visibleItems:_,hiddenMatchCount:0};if(!S){const P=new Set(kz(U)),M=r.filter(W=>P.has(W.value)),G=r.filter(W=>!P.has(W.value)).slice(0,E),A=[...M,...G];return{visibleItems:A,hiddenMatchCount:r.length-A.length}}return{visibleItems:_.slice(0,E),hiddenMatchCount:Math.max(0,_.length-E)}},[k,S,r,_,U,E]),L=()=>{if(v==="checkbox"&&"selectedValues"in e){const P=_.map(G=>G.value),M=S?[...new Set([...e.selectedValues,...P])]:P;e.onChange(M)}},V=()=>{if(v==="checkbox"&&"selectedValues"in e)if(S){const P=new Set(_.map(A=>A.value)),M=e.selectedValues.filter(A=>!P.has(A)),G=_.filter(A=>!e.selectedValues.includes(A.value)).map(A=>A.value);e.onChange([...M,...G])}else{const P=r.filter(M=>!e.selectedValues.includes(M.value)).map(M=>M.value);e.onChange(P)}},D=()=>{if(v==="checkbox"&&"selectedValues"in e)if(S){const P=new Set(_.map(G=>G.value)),M=e.selectedValues.filter(G=>!P.has(G));e.onChange(M)}else e.onChange([]);else v==="radio"&&"selectedValue"in e&&e.onChange("")},$=(P,M)=>{if(v==="checkbox"&&"selectedValues"in e){const G=M?[...e.selectedValues,P]:e.selectedValues.filter(A=>A!==P);e.onChange(G)}},z=R>0&&i.jsx(wt,{variant:"link",size:"sm",onClick:()=>N(P=>P+ol),className:"col-span-2 h-auto justify-self-start p-0 text-xs font-medium text-primary hover:text-primary/80",children:x.showMore});return i.jsxs("div",{ref:t,dir:mo(h),className:j("flex flex-col",p?"min-h-full":"h-full",o),children:[I&&i.jsx(Zc,{placeholder:a??(k?x.typeToSearch:x.search),value:S,onSearch:P=>{w(P),N(ol)},enableHistory:!1,className:"mb-4"}),d&&i.jsx("div",{className:"text-xs font-normal text-muted-foreground mb-4",children:d}),i.jsxs("div",{className:"flex items-center justify-between mb-1",children:[i.jsx("span",{className:"text-sm font-normal text-foreground",children:n}),l&&v==="checkbox"&&i.jsxs("div",{className:"flex items-center justify-end gap-4",children:[c&&!F&&i.jsxs(wt,{variant:"link",size:"sm",onClick:L,className:"h-auto p-0 text-xs font-medium text-primary hover:text-primary/80",children:[x.selectAll," (",_.length,")"]}),u&&!F&&i.jsx(wt,{variant:"link",size:"sm",onClick:V,className:"h-auto p-0 text-xs font-medium text-primary hover:text-primary/80",children:x.inverse}),f&&i.jsx(wt,{variant:"link",size:"sm",onClick:D,className:"h-auto p-0 text-xs font-medium text-primary hover:text-primary/80",children:x.none})]})]}),i.jsx(Nr,{className:"w-full mb-6"}),y&&"selectedValue"in e&&i.jsxs(Yc,{value:e.selectedValue,onValueChange:e.onChange,className:"grid grid-cols-2 gap-x-4 gap-y-5 overflow-y-auto",children:[O.map(P=>i.jsx(yg,{label:P.label,value:P.value,description:P.description},P.value)),z]}),!y&&b&&"selectedValues"in e&&i.jsxs("div",{className:j("grid grid-cols-2 gap-x-4 gap-y-5",!p&&"overflow-y-auto"),children:[O.map(P=>i.jsx(vg,{label:P.label,description:P.description,icon:P.icon,checked:e.selectedValues.includes(P.value),onCheckedChange:M=>$(P.value,M)},P.value)),z]}),R>0&&i.jsxs(i.Fragment,{children:[i.jsx(Nr,{className:"w-full my-4"}),i.jsx("p",{className:"text-xs font-normal text-muted-foreground",children:S?_z(x,R):jz(x,R)})]}),p&&i.jsx("div",{className:"mt-6",children:p})]})});ic.displayName="FilterSection";const vg=C.forwardRef(({label:e,checked:t,onCheckedChange:n,description:r,className:o,icon:s},a)=>i.jsxs("label",{className:j("flex items-start gap-2 cursor-pointer",o),children:[i.jsx(N3,{ref:a,checked:t,onCheckedChange:n}),s&&i.jsx("img",{src:s,alt:"",className:"size-4 object-contain shrink-0",onError:l=>{l.currentTarget.style.display="none"}}),i.jsxs("div",{className:"flex flex-col gap-0.5 min-w-0",children:[i.jsx(zt,{content:e,triggerProps:{className:"w-fit"},children:i.jsx("p",{className:"text-sm font-medium leading-4 truncate max-w-[165px]",children:e})}),r&&i.jsx(zt,{content:r,triggerProps:{className:"w-fit mt-2"},children:i.jsx("p",{className:"text-sm font-normal leading-5 text-muted-foreground truncate max-w-[165px]",children:r})})]})]}));vg.displayName="FilterCheckboxOption";const yg=C.forwardRef(({label:e,value:t,description:n,className:r},o)=>i.jsxs("div",{className:j("flex items-start gap-3",r),children:[i.jsx(Kc,{ref:o,value:t,id:`radio-${t}`}),i.jsxs("label",{htmlFor:`radio-${t}`,className:"flex flex-col gap-0.5 cursor-pointer min-w-0 truncate",children:[i.jsx(zt,{content:e,triggerProps:{className:"w-fit"},children:i.jsx("p",{className:"text-sm font-medium leading-4 truncate max-w-[165px]",children:e})}),n&&i.jsx(zt,{content:n,triggerProps:{className:"w-fit mt-2"},children:i.jsx("p",{className:"w-fittext-sm font-normal leading-4 text-muted-foreground truncate max-w-[165px]",children:n})})]})]}));yg.displayName="FilterRadioOption";const Q6=C.forwardRef(({children:e,showSearch:t=!1,searchPlaceholder:n,searchValue:r,onSearchChange:o,className:s,lang:a,translations:l},c)=>{const u=C.useMemo(()=>{const f=Vs(a);return l?{...f,...l}:f},[a,l]);return i.jsxs("div",{ref:c,dir:mo(a),className:j("flex flex-col gap-6 bg-input rounded-md p-6 min-w-[448px]",s),children:[t&&i.jsx("div",{className:"flex flex-col gap-2",children:i.jsxs("div",{className:"relative",children:[i.jsx(X,{name:"MagnifyingGlass",className:"absolute start-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground"}),i.jsx(ds,{placeholder:n??u.search,value:r,onChange:f=>o?.(Gc(f.target.value)),className:"ps-9"})]})}),i.jsx("div",{className:"flex flex-col gap-6",children:e})]})});Q6.displayName="FilterContent";const rn={CUSTOM:"CUSTOM",TODAY:"TODAY",LAST_3_DAYS:"LAST_3_DAYS",LAST_7_DAYS:"LAST_7_DAYS",LAST_30_DAYS:"LAST_30_DAYS",THIS_MONTH:"THIS_MONTH",ALL_TIME:"ALL_TIME"},Wr=(e,t)=>{const n=e.getDate();return`${t[e.getMonth()]} ${n}`},Rz=(e,t)=>{const n=t[e.getMonth()],r=e.getFullYear();return`${n} ${r}`},Mz=(e,t)=>t[e.getDay()],Dz=(e,t)=>{const n=new Date;n.setHours(0,0,0,0);const r=`${Mz(n,e)}, ${Wr(n,t)}`,o=new Date(n);o.setDate(o.getDate()-2);const s=`${Wr(o,t)} - ${Wr(n,t)}`,a=new Date(n);a.setDate(a.getDate()-6);const l=`${Wr(a,t)} - ${Wr(n,t)}`,c=new Date(n);c.setDate(c.getDate()-29);const u=`${Wr(c,t)} - ${Wr(n,t)}`,f=Rz(n,t);return{today:r,last3Days:s,last7Days:l,last30Days:u,thisMonth:f}},Yn=C.forwardRef(({label:e,description:t,value:n,className:r,...o},s)=>{const a=`date-range-${n}`;return i.jsxs("div",{className:"flex items-start gap-4 w-full py-1",children:[i.jsxs("label",{ref:s,className:j("flex-1 flex items-start gap-3 cursor-pointer",r),...o,children:[i.jsx(Kc,{id:a,value:n,className:"mt-px"}),i.jsx("div",{className:"flex flex-col gap-1.5 items-start justify-center pb-0 pt-px px-0",children:i.jsx("span",{className:"text-sm font-medium leading-none text-foreground",children:e})})]}),t&&i.jsx("div",{className:"flex items-center gap-2",children:i.jsx("span",{className:"text-xs font-normal leading-none text-muted-foreground whitespace-nowrap",children:t})})]})});Yn.displayName="FilterDateRangeOption";const bg=C.forwardRef(({showCustomFields:e=!1,onCustomFieldsChange:t,startDate:n,endDate:r,startTime:o="",endTime:s="",onStartDateChange:a,onEndDateChange:l,onStartTimeChange:c,onEndTimeChange:u,mode:f="range",singleDayLabel:d,showAllTime:p=!1,className:h,value:m,onValueChange:x,announcement:v,dateError:y,labels:b,lang:S,translations:w,...E},N)=>{const _=C.useMemo(()=>{const D=Vs(S);return w?{...D,...w}:D},[S,w]),k=C.useMemo(()=>Ez(_),[_]),I=C.useMemo(()=>Nz(_),[_]),F=C.useMemo(()=>Dz(k,I),[k,I]),U=new Date().getFullYear(),O=U-20,R=U+1,L=D=>{x?.(D),t?.(D===rn.CUSTOM)},V=D=>{if(D){const $=new Date(D);$.setHours(0,0,0,0);const z=new Date(D);z.setHours(23,59,59,999),a?.($),l?.(z)}else a?.(void 0),l?.(void 0)};return i.jsxs("div",{ref:N,dir:mo(S),className:j("flex flex-col gap-4 w-full",h),children:[v&&(typeof v=="string"?i.jsx(Kf,{icon:"Info",description:v}):v),i.jsxs(Yc,{value:m,onValueChange:L,className:"gap-2",...E,children:[i.jsx(Yn,{label:b?.custom??_.custom,value:rn.CUSTOM}),e&&i.jsxs("div",{className:"flex flex-col gap-4 ps-7 mb-2",children:[f==="single"?i.jsx("div",{className:"flex flex-col gap-3",children:i.jsx(cl,{date:n,onChange:V,placeholder:d??_.selectDate,className:"h-9",iconPosition:"none",captionLayout:"dropdown",fromYear:O,toYear:R})}):i.jsxs("div",{className:"flex gap-4 items-start w-full",children:[i.jsx("div",{className:"flex-1 flex flex-col gap-3",children:i.jsx(cl,{date:n,onChange:a,placeholder:b?.startDate??_.startDate,className:"h-9",iconPosition:"none",captionLayout:"dropdown",fromYear:O,toYear:R})}),i.jsx("div",{className:"flex-1 flex flex-col gap-3",children:i.jsx(zt,{content:y,triggerProps:{className:"w-full"},children:i.jsx(cl,{date:r,onChange:l,placeholder:b?.endDate??_.endDate,error:y,className:"h-9",iconPosition:"none",captionLayout:"dropdown",fromYear:O,toYear:R})})})]}),i.jsxs("div",{className:"flex gap-4 items-start w-full",children:[i.jsx("div",{className:"flex-1 flex flex-col gap-3",children:i.jsx(zl,{value:o,onChange:c,mode:"dropdown",use24Hour:!0,width:"100%"})}),i.jsx("div",{className:"flex-1 flex flex-col gap-3",children:i.jsx(zl,{value:s,onChange:u,mode:"dropdown",use24Hour:!0,width:"100%"})})]})]}),i.jsxs("div",{className:"flex flex-col gap-2",children:[i.jsx(Yn,{label:b?.today??_.today,value:rn.TODAY,description:F.today}),i.jsx(Yn,{label:b?.last3Days??_.last3Days,value:rn.LAST_3_DAYS,description:F.last3Days}),i.jsx(Yn,{label:b?.last7Days??_.last7Days,value:rn.LAST_7_DAYS,description:F.last7Days}),i.jsx(Yn,{label:b?.last30Days??_.last30Days,value:rn.LAST_30_DAYS,description:F.last30Days}),i.jsx(Yn,{label:b?.thisMonth??_.thisMonth,value:rn.THIS_MONTH,description:F.thisMonth}),p&&i.jsx(Yn,{label:b?.allTime??_.allTime,value:rn.ALL_TIME})]})]})]})});bg.displayName="FilterDateRange";const eC=C.forwardRef(({title:e,value:t,onChange:n,placeholder:r,description:o,error:s,numericOnly:a=!1,maxItems:l,disabled:c=!1,className:u,allowDuplicates:f=!1,lang:d,translations:p},h)=>{const m=C.useMemo(()=>{const v=Vs(d);return p?{...v,...p}:v},[d,p]),x=a?v=>/^\d+$/.test(v)?!0:m.onlyNumericAllowed:void 0;return i.jsxs("div",{ref:h,className:j("flex flex-col h-full",u),children:[i.jsx("div",{className:"flex items-center justify-between mb-1",children:i.jsx("span",{className:"text-sm font-normal text-foreground",children:e})}),i.jsx(Nr,{className:"w-full mb-6"}),i.jsx(Kp,{value:t,onChange:n,placeholder:r??m.typeAndPressEnter,description:o,error:s,disabled:c,maxItems:l,allowDuplicates:f,validate:x,triggerKeys:["Enter","Tab","Comma"],deleteAll:t.length>0?{label:m.clearAll,length:1,onClick:()=>n([])}:void 0})]})});eC.displayName="FilterMultiInput";const wg=C.forwardRef(({icon:e,label:t,isActive:n=!1,showChevron:r=!1,className:o,...s},a)=>i.jsxs("button",{ref:a,className:j("flex items-center gap-2 h-8 px-2 rounded-md w-full transition-colors shrink-0 hover:bg-secondary",o),...s,children:[e&&i.jsx(X,{name:e,className:j("size-4 shrink-0",n?"text-primary":"text-foreground")}),i.jsx("span",{className:j("flex-1 text-sm font-normal text-left truncate",n?"text-primary":"text-foreground"),children:t}),(n||r)&&i.jsx(X,{name:"CaretRight",className:j("size-4 shrink-0",n?"text-primary":"text-foreground")})]}));wg.displayName="FilterMenuItem";const Cg=C.forwardRef(({items:e,activeItemId:t,onItemClick:n,className:r},o)=>i.jsx("div",{ref:o,className:j("flex flex-col gap-2 w-64 h-full p-2 bg-muted border border-border rounded-md overflow-y-auto",r),children:e.map(s=>i.jsx(wg,{icon:s.icon,label:s.label,isActive:t===s.id,showChevron:s.showChevron,onClick:()=>n?.(s.id)},s.id))}));Cg.displayName="FilterMenu";const tC=C.forwardRef(({filters:e,buttonText:t,appliedFilters:n=[],onRemoveFilter:r,onClearAllFilters:o,onOpenChange:s,maxVisibleTags:a=4,className:l,actionName:c,disabled:u=!1,applyOnClose:f=!1,lang:d,translations:p},h)=>{const m=C.useMemo(()=>{const K=Vs(d);return p?{...K,...p}:K},[d,p]),[x,v]=C.useState(!1),[y,b]=C.useState({}),S=C.useRef({}),w=C.useRef(e),E=C.useCallback(K=>{b(Q=>{const ae=typeof K=="function"?K(Q):K;return S.current=ae,ae})},[]);C.useEffect(()=>{w.current=e},[e]);const N=C.useCallback(()=>{if(!f)return;const K=S.current,Q=w.current;Object.entries(K).forEach(([ae,J])=>{const be=Q.find(me=>me.id===ae);if(be)switch(J.type){case"checkbox":J.checkboxValues!==void 0&&be.onChange?.(J.checkboxValues);break;case"radio":J.radioValue!==void 0&&be.onValueChange?.(J.radioValue);break;case"date":J.dateValue!==void 0&&be.onDateValueChange?.(J.dateValue),J.dateInit!==void 0&&be.onDateInitChange?.(J.dateInit),J.dateEnd!==void 0&&be.onDateEndChange?.(J.dateEnd),J.startTime!==void 0&&be.onStartTimeChange?.(J.startTime),J.endTime!==void 0&&be.onEndTimeChange?.(J.endTime);break;case"custom":J.customValue!==void 0&&be.onCustomChange?.(J.customValue);break}}),E({})},[f,E]),_=C.useCallback(K=>{if(!K&&x&&f){s?.(K),N(),v(K);return}K&&!x&&f&&E({}),v(K),s?.(K)},[s,x,f,N,E]),[k,I]=C.useState(e.length>0&&e[0]?.id||""),F=C.useRef(null),U=C.useCallback(K=>{F.current=K,typeof h=="function"?h(K):h&&(h.current=K)},[h]);C.useEffect(()=>{if(!x)return;const K=J=>{const be=J.target;F.current?.contains(be)||be.closest?.("[data-radix-popper-content-wrapper], [data-radix-portal]")||be.closest?.(".rdp, .rdp-root, [data-calendar]")||_(!1)},Q=J=>{J.key==="Escape"&&_(!1)},ae=setTimeout(()=>{document.addEventListener("mousedown",K),document.addEventListener("keydown",Q)},0);return()=>{clearTimeout(ae),document.removeEventListener("mousedown",K),document.removeEventListener("keydown",Q)}},[x,_]);const O=n.length>0,R=n.slice(0,a),L=n.length-a,V=K=>{if(e.find(J=>J.id===K))return K;const ae=K.split("-");if(ae.length>1){const J=ae[0];if(e.find(me=>me.id===J))return J}return K},D=K=>{const Q=V(K);return e.find(J=>J.id===Q)?.clearable!==!1},$=K=>{const Q=K.sectionId??V(K.id);I(Q),_(!0)},z=n.some(K=>D(K.id)),P=e.map(K=>({id:K.id,icon:K.icon,label:K.label})),M=e.find(K=>K.id===k),G=(K,Q)=>f?y[K]?.checkboxValues??Q:Q,A=(K,Q)=>f?y[K]?.radioValue??Q:Q,W=(K,Q)=>f?y[K]?.dateValue??Q:Q,H=(K,Q)=>f?y[K]?.dateInit??Q:Q,T=(K,Q)=>f?y[K]?.dateEnd??Q:Q,B=(K,Q)=>f?y[K]?.startTime??Q:Q,Y=(K,Q)=>f?y[K]?.endTime??Q:Q,Z=(K,Q,ae)=>J=>{ae!==void 0&&ae>0&&J.length<ae||(f?E(be=>({...be,[K]:{...be[K],type:"checkbox",checkboxValues:J}})):Q?.(J))},q=(K,Q)=>ae=>{f?E(J=>({...J,[K]:{...J[K],type:"radio",radioValue:ae}})):Q?.(ae)},oe=(K,Q)=>ae=>{f?E(J=>({...J,[K]:{...J[K],type:"date",dateValue:ae}})):Q?.(ae)},ne=(K,Q)=>ae=>{f?E(J=>({...J,[K]:{...J[K],type:"date",dateInit:ae}})):Q?.(ae)},le=(K,Q)=>ae=>{f?E(J=>({...J,[K]:{...J[K],type:"date",dateEnd:ae}})):Q?.(ae)},Ee=(K,Q)=>ae=>{f?E(J=>({...J,[K]:{...J[K],type:"date",startTime:ae}})):Q?.(ae)},re=(K,Q)=>ae=>{f?E(J=>({...J,[K]:{...J[K],type:"date",endTime:ae}})):Q?.(ae)},ce=()=>{if(!M)return null;switch(M.type){case"checkbox":{const K=G(M.id,M.selectedValues||[]),Q=M.description&&(M.descriptionMinSelection===void 0||K.length>=M.descriptionMinSelection);return i.jsx(ic,{title:M.label,items:M.items||[],selectedValues:K,onChange:Z(M.id,M.onChange,M.minSelection),searchable:M.searchable,searchPlaceholder:M.searchPlaceholder,showActions:M.showActions,enableSelectAll:M.enableSelectAll,enableInverse:M.enableInverse,enableNone:M.enableNone,description:Q?M.description:void 0,footer:M.footer,lang:d,translations:p})}case"radio":return i.jsx(ic,{type:"radio",title:M.label,items:M.items||[],selectedValue:A(M.id,M.selectedValue||""),onChange:q(M.id,M.onValueChange),searchable:M.searchable,searchPlaceholder:M.searchPlaceholder,showActions:M.showActions,enableSelectAll:M.enableSelectAll,enableInverse:M.enableInverse,enableNone:M.enableNone,description:M.description,lang:d,translations:p});case"date":{const K=W(M.id,M.dateValue||rn.LAST_7_DAYS),Q=H(M.id,M.dateInit),ae=T(M.id,M.dateEnd),J=B(M.id,M.startTime||""),be=Y(M.id,M.endTime||""),me=f&&y[M.id]?.dateInit!==void 0,fe=f&&y[M.id]?.dateEnd!==void 0,Pe=oe(M.id,M.onDateValueChange),Te=ne(M.id,M.onDateInitChange),We=le(M.id,M.onDateEndChange),nt=Ee(M.id,M.onStartTimeChange),dt=re(M.id,M.onEndTimeChange),fn=Ot=>{if(Pe(Ot),Ot===rn.CUSTOM&&!me&&!fe){const Nt=new Date,je=new Date(Nt);je.setHours(23,59,59,999);const Me=new Date(Nt);Me.setHours(0,0,0,0),Te(Me),We(je),nt("00:00:00"),dt("23:59:59")}};return i.jsx(bg,{value:K,onValueChange:fn,showCustomFields:K===rn.CUSTOM,startDate:Q,endDate:ae,startTime:J,endTime:be,mode:M.dateMode||"range",singleDayLabel:M.singleDayLabel,showAllTime:M.showAllTime,onStartDateChange:Te,onEndDateChange:We,onStartTimeChange:nt,onEndTimeChange:dt,announcement:M.description,dateError:M.dateError,labels:M.dateLabels,lang:d,translations:p})}case"custom":{const K=f?{bufferedValue:y[M.id]?.customValue,onDeferredChange:Q=>{E(ae=>({...ae,[M.id]:{...ae[M.id],type:"custom",customValue:Q}}))},isDeferred:!0}:void 0;return M.renderContent?.(K)}default:return null}};return i.jsxs("div",{ref:U,className:j("flex flex-col gap-1 relative",l),"data-action-name":c,children:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsxs(wt,{variant:"outline",size:"sm",className:"gap-2",onClick:()=>_(!x),disabled:u,children:[i.jsx(X,{name:"FunnelSimple",className:"size-4"}),t??m.addFilter]}),O?i.jsxs(i.Fragment,{children:[i.jsx(Nr,{orientation:"vertical",className:"h-5"}),i.jsxs("div",{className:"flex items-center gap-2",children:[R.map(K=>{const Q=D(K.id);return i.jsxs("div",{className:j(es({variant:"secondary",size:"sm"}),"gap-2",K.className),children:[i.jsxs("button",{type:"button",onClick:()=>$(K),className:"inline-flex items-center gap-2 bg-transparent",children:[K.icon&&i.jsx(X,{name:K.icon,size:"xs"}),K.label]}),r&&Q&&i.jsx("button",{type:"button",onClick:ae=>{ae.stopPropagation(),r(K.id)},className:"inline-flex items-center justify-center","aria-label":`Remove ${K.label} filter`,children:i.jsx(X,{name:"X",className:"size-4"})})]},K.id)}),L>0&&i.jsx(wt,{onClick:()=>_(!0),children:X6(m,L)}),o&&z&&i.jsx(wt,{variant:"ghost",size:"sm",className:"h-8 px-3 py-2",onClick:o,children:i.jsx("span",{className:"text-xs font-medium leading-none text-primary",children:m.clearFilters})})]})]}):i.jsxs(i.Fragment,{children:[i.jsx(Nr,{orientation:"vertical",className:"h-5"}),i.jsx("span",{className:"text-sm font-normal text-muted-foreground",children:m.noFiltersApplied})]})]}),x&&i.jsxs("div",{className:j("z-popover shadow-lg","absolute top-full start-0 mt-1","flex flex-row gap-2","w-[728px] h-[448px]","bg-popover border border-border rounded-md p-2"),children:[i.jsx(Cg,{items:P,activeItemId:k,onItemClick:I}),i.jsx("div",{className:"flex flex-col gap-4 p-6 bg-popover w-[448px] h-full rounded-md overflow-y-auto",children:ce()})]})]})});tC.displayName="FilterDropdown";function Az(e,t=!1){const[n,r]=C.useState(()=>typeof window>"u"?t:window.matchMedia(e).matches);return C.useEffect(()=>{if(typeof window>"u")return;const o=window.matchMedia(e);r(o.matches);const s=a=>{r(a.matches)};return o.addEventListener?(o.addEventListener("change",s),()=>{o.removeEventListener("change",s)}):(o.addListener(s),()=>{o.removeListener(s)})},[e]),n}function Tz(e){return mo(e)}const Pz={success:"CheckCircle",error:"WarningCircle",warning:"Warning",info:"Info"},Oz={success:"var(--color-success)",error:"var(--color-destructive)",warning:"var(--color-warning)",info:"var(--color-info)"},Lz={success:"default",error:"destructive",warning:"default",info:"default"},Iz=()=>i.jsx("div",{className:"w-full h-1 bg-border rounded-full overflow-hidden mt-3",children:i.jsx("div",{className:"h-full bg-primary animate-progress-indeterminate"})}),Fz=({mode:e,title:t,message:n,primaryActionLabel:r,onAction:o,timeToLive:s=5e3,withCloseButton:a=!0,withProgress:l=!1})=>{const c=Pz[e],u=!!t,f=!!(r&&o),d=i.jsx(X,{name:c,className:"size-4",weight:"fill",style:{color:Oz[e]}}),p=i.jsxs("div",{className:"flex flex-col gap-0 w-full",children:[i.jsx("div",{className:"flex items-start gap-2",children:i.jsx("div",{className:"flex-1 min-w-0",children:i.jsx("p",{className:u?"text-sm font-semibold":"text-sm",children:u?t:n})})}),u&&i.jsx("div",{className:"mt-1",children:i.jsx("p",{className:"text-sm text-muted-foreground",children:n})}),l&&i.jsx(Iz,{}),f&&i.jsx("div",{className:"mt-3",children:i.jsx(ot,{variant:Lz[e],size:"sm",onClick:()=>{o(),Kn.dismiss()},children:r})})]}),h={duration:s,closeButton:a,icon:d,position:"top-right",classNames:{toast:`notification-alert-toast notification-alert-${e}`}};switch(e){case"success":return Kn.success(p,h);case"error":return Kn.error(p,h);case"warning":return Kn.warning(p,h);case"info":return Kn.info(p,h)}};exports.AccessDeniedAlert=G2;exports.Accordion=B2;exports.AccordionContent=H2;exports.AccordionItem=z2;exports.AccordionTrigger=W2;exports.AggregatedTable=q5;exports.Alert=Kf;exports.AnimatedEmpty=p3;exports.AnimatedEmptyIllustration=f3;exports.Avatar=Q2;exports.Badge=Ze;exports.Breadcrumb=Vy;exports.BulkActionBar=X5;exports.Button=ot;exports.Card=ax;exports.CardBase=Ss;exports.CardContent=Sc;exports.CardDescription=ap;exports.CardFooter=Ec;exports.CardHeader=op;exports.CardTitle=sp;exports.Checkbox=Oa;exports.Combobox=K6;exports.ConfirmationDialog=F6;exports.CurrencyField=ip;exports.DATA_TABLE_TRANSLATIONS=b6;exports.DEFAULT_DATA_TABLE_TRANSLATIONS=uu;exports.DataFreshnessBadge=t3;exports.DataItem=pi;exports.DataTable=nz;exports.DataTableAmountCell=N5;exports.DataTableBadgeCell=y5;exports.DataTableCellWrapper=b5;exports.DataTableColumnHeader=Of;exports.DataTableCopyCell=S5;exports.DataTableCountryCell=j5;exports.DataTableDateCell=_5;exports.DataTableIconCell=D5;exports.DataTableIconTextCell=M5;exports.DataTableListCell=I6;exports.DataTablePercentageCell=k5;exports.DataTableSortIndicator=L6;exports.DataTableStatusCell=E5;exports.DataTableTagsCell=R5;exports.DataTableTextCell=w5;exports.DatePicker=cl;exports.DateRangePicker=Vj;exports.DetailDrawer=V6;exports.DetailPageHeader=W6;exports.DetailPageLayout=z6;exports.DetailSection=$6;exports.Dialog=fu;exports.DialogContent=Bp;exports.DialogFooter=zp;exports.DialogHeader=Vp;exports.DotsMenu=tb;exports.DropdownMenu=Lc;exports.DropdownMenuCheckboxItem=oy;exports.DropdownMenuContent=Fc;exports.DropdownMenuGroup=ny;exports.DropdownMenuItem=xn;exports.DropdownMenuLabel=ry;exports.DropdownMenuPortal=ty;exports.DropdownMenuRadioGroup=sy;exports.DropdownMenuRadioItem=ay;exports.DropdownMenuSeparator=Dl;exports.DropdownMenuShortcut=iy;exports.DropdownMenuSub=ly;exports.DropdownMenuSubContent=uy;exports.DropdownMenuSubTrigger=cy;exports.DropdownMenuTrigger=Ic;exports.Empty=Bc;exports.EmptyIcon=sA;exports.Field=ds;exports.FileUpload=g3;exports.FilterButton=J6;exports.FilterCheckboxOption=vg;exports.FilterContent=Q6;exports.FilterDateRange=bg;exports.FilterDateRangeOption=Yn;exports.FilterDateRangeValue=rn;exports.FilterDropdown=tC;exports.FilterMenu=Cg;exports.FilterMenuItem=wg;exports.FilterMultiInput=eC;exports.FilterRadioOption=yg;exports.FilterSection=ic;exports.FilterTag=xg;exports.HighlightBanner=n3;exports.ICON_NAMES=m9;exports.Icon=X;exports.LANGUAGE_STORAGE_KEY=I0;exports.Label=Wt;exports.Link=Mp;exports.ListFilterToolbar=mg;exports.ListPageHeader=gg;exports.ListPageLayout=B6;exports.Loading=Dy;exports.MultiSelect=Z6;exports.MultiValuesField=Kp;exports.NavLink=$c;exports.NavTabs=Wp;exports.OTPField=I3;exports.OVERLAY_EVENT=O6;exports.PageTitle=Dp;exports.Pagination=$p;exports.PaginationContent=Op;exports.PaginationEllipsis=Fp;exports.PaginationItem=ro;exports.PaginationLink=us;exports.PaginationNext=Ip;exports.PaginationPrevious=Lp;exports.PaginationRoot=$p;exports.PasswordField=nb;exports.Popover=jy;exports.PopoverContent=Ry;exports.PopoverTrigger=ky;exports.Progress=Pp;exports.ProtectedField=GR;exports.ProviderCard=h3;exports.RadioGroup=X3;exports.RadioGroupBase=Yc;exports.RadioGroupItem=Kc;exports.RadioGroupOption=q3;exports.SearchField=Zc;exports.SearchSelect=v5;exports.SectionNav=H6;exports.Select=Hb;exports.Separator=Ta;exports.Sheet=hg;exports.Skeleton=Ln;exports.Stepper=m3;exports.Switch=Up;exports.TOTALS_ROW_ID=Z5;exports.Textarea=D3;exports.ThemedImage=$y;exports.TimePicker=zl;exports.Toaster=RM;exports.ToggleGroup=Ny;exports.ToggleGroupItem=_y;exports.Tooltip=zt;exports.TooltipProvider=Mt;exports.TransferList=Y6;exports.TransferListEmptyState=U6;exports.Tutorial=G6;exports.avgAggregation=G5;exports.cn=j;exports.getDataTableTranslations=w6;exports.getDefaultLanguage=Za;exports.maxAggregation=K5;exports.minAggregation=Y5;exports.normalizeDimension=ss;exports.sanitizeSearchValue=ut;exports.showNotificationAlert=Fz;exports.sizeAggregation=U5;exports.stripInvisibleCharacters=Gc;exports.sumAggregation=H5;exports.toast=Kn;exports.useBodyScrollLock=dg;exports.useCopyToClipboard=C5;exports.useDirection=Tz;exports.useEscapeKey=fg;exports.useMediaQuery=Az;exports.useOverlayPresence=pg;
|
|
154
|
+
`}),i.jsxs("div",{...o,ref:h,className:j("bg-popover rounded-md border border-border shadow-md p-4","max-w-[368px]",c&&`max-w-[${c}px]`),style:c?{maxWidth:`${c}px`}:void 0,children:[i.jsxs("div",{className:"flex items-start justify-between gap-4 mb-2",children:[i.jsx("div",{className:"flex-1",children:t.title&&i.jsx("h4",{className:"scroll-m-20 tracking-tight text-base font-medium leading-none",children:t.title})}),!t.hideCloseButton&&i.jsx(ot,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0","aria-label":p??"Close",onClick:n?.onClick,children:i.jsx(X,{name:"X",size:"sm"})})]}),i.jsx("div",{className:"mb-6",children:i.jsx("p",{className:"text-sm text-muted-foreground font-normal leading-normal",children:t.content})}),i.jsxs("div",{className:"flex items-center justify-between gap-3",children:[u&&f!==(d??0)-1&&i.jsx(ot,{variant:"outline",size:"default",...u,onClick:n?.onClick,children:u.title}),(d??0)>1&&i.jsxs("p",{className:"text-sm font-medium leading-none text-muted-foreground",children:["Step ",(f??0)+1," of ",d]}),e&&r&&i.jsx(ot,{size:"default",...r,children:r.title})]}),!e&&l.length>0&&i.jsxs("div",{className:j("flex items-center mt-6 gap-3",l.length>1?"justify-between":"justify-end"),children:[s&&a&&i.jsx(Ze,{variant:"default",className:"bg-green-100 text-green-800",children:a}),l.map((v,y)=>i.jsx(ot,{variant:v.variant||"default",size:v.size||"default",loading:v.loading,disabled:v.disabled,onClick:b=>x(b,v.event),children:v.label},y))]})]})]})});U6.displayName="Tutorial";const fz=({item:e,onMove:t,moveIconName:n="PlusCircle",moveLabel:r,isSelected:o=!1})=>i.jsxs("div",{className:"flex items-center py-1.5 px-2 bg-muted border border-border rounded gap-2 cursor-grabbing",role:"option","aria-selected":o,tabIndex:-1,children:[i.jsx("span",{className:"flex items-center shrink-0",children:i.jsx(X,{name:"DotsSixVertical",className:"text-muted-foreground"})}),i.jsxs("span",{className:"text-xs text-foreground flex-1 flex flex-col gap-0.5",children:[i.jsx("span",{children:e.label}),e.description&&i.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:e.description})]}),e.actions,t&&i.jsx(ot,{variant:"ghost",size:"icon","aria-label":r?`${r} ${e.label}`:void 0,onClick:s=>s.stopPropagation(),children:i.jsx(X,{name:n,className:"text-muted-foreground"})})]}),pz=({item:e,index:t,group:n,onMove:r,moveIconName:o="PlusCircle",moveLabel:s,isSelected:a=!1})=>{const{ref:l,isDragging:c}=O6({id:e.id,index:t,group:n});return i.jsxs("div",{ref:l,className:j("flex items-center py-1.5 px-2 bg-muted border border-border rounded gap-2 cursor-grab",c&&"opacity-50 cursor-grabbing"),role:"option","aria-selected":a,tabIndex:0,onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&r&&(u.preventDefault(),r(e))},children:[i.jsx("span",{className:"flex items-center shrink-0",children:i.jsx(X,{name:"DotsSixVertical",className:"text-muted-foreground"})}),i.jsxs("span",{className:"text-xs text-foreground flex-1 flex flex-col gap-0.5",children:[i.jsx("span",{children:e.label}),e.description&&i.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:e.description})]}),e.actions,r&&i.jsx(ot,{variant:"ghost",size:"icon","aria-label":s?`${s} ${e.label}`:void 0,onClick:u=>{u.stopPropagation(),r(e)},children:i.jsx(X,{name:o,className:"text-muted-foreground"})})]})},Y6=({title:e="No items",description:t="No items available",iconName:n="TextColumns"})=>i.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 border border-border rounded-lg p-4 bg-muted",children:[i.jsx(X,{name:n,className:"text-muted-foreground",size:"xl"}),i.jsx("p",{className:"text-base text-center text-foreground font-bold",children:e}),i.jsx("p",{className:"text-xs text-center text-muted-foreground",children:t})]}),hz=1,y0=({id:e,title:t,items:n,height:r,showSearch:o,search:s,searchPlaceholder:a,onSearchChange:l,onMove:c,moveIconName:u,moveLabel:f,emptyState:d,isSelected:p=!1})=>{const h=`${e}-title`,g=n.length===0,{ref:x}=tB({id:e,collisionPriority:hz}),v=d??i.jsx(Y6,{});return i.jsxs("div",{className:"border border-border rounded-lg p-4 w-full flex flex-col gap-2",style:{height:r},children:[i.jsx("p",{id:h,className:"text-sm text-foreground mb-2",children:t}),o&&(!g||s.length>0)&&i.jsx(ds,{placeholder:a,value:s,onChange:y=>l(y.target.value),"aria-label":`${t} search`}),i.jsx("div",{ref:x,className:"h-full overflow-auto w-full flex flex-col gap-2",role:"listbox","aria-labelledby":h,"aria-multiselectable":!0,children:g?v:n.map((y,b)=>i.jsx(pz,{item:y,index:b,group:e,onMove:c,moveIconName:u,moveLabel:f,isSelected:p},y.id))})]})},K6=C.forwardRef(({left:e,right:t,onChange:n,leftTitle:r="Available",rightTitle:o="Chosen",height:s=420,showSearch:a=!0,searchPlaceholder:l="Search",emptyState:c,leftEmptyState:u,className:f,...d},p)=>{const[h,g]=C.useState(""),[x,v]=C.useState(""),[y,b]=C.useState({left:e,right:t}),S=C.useRef(y),w=C.useRef(!1),E=C.useRef({left:e,right:t});C.useEffect(()=>{if(!w.current){const R={left:e,right:t};b(R),S.current=R}},[e,t]);const N=C.useMemo(()=>{const R=ut(h).toLowerCase();return R?y.left.filter(L=>ut(L.label).toLowerCase().includes(R)):y.left},[y.left,h]),_=C.useMemo(()=>{const R=ut(x).toLowerCase();return R?y.right.filter(L=>ut(L.label).toLowerCase().includes(R)):y.right},[y.right,x]),k=()=>{w.current=!0,E.current=S.current},I=R=>{h.length>0||x.length>0||b(L=>{const V=b6(L,R);return S.current=V,V})},F=R=>{if(w.current=!1,R.canceled||h.length>0||x.length>0){b(E.current),S.current=E.current;return}n(S.current.left,S.current.right)},U=R=>{n(e.filter(L=>L.id!==R.id),[...t,R])},O=R=>{n([...e,R],t.filter(L=>L.id!==R.id))};return i.jsxs(l6,{onDragStart:k,onDragOver:I,onDragEnd:F,children:[i.jsxs("div",{ref:p,className:j("flex flex-col md:flex-row gap-4",f),...d,children:[i.jsx(y0,{id:"left",title:r,items:N,height:s,showSearch:a,searchPlaceholder:l,search:h,onSearchChange:g,onMove:U,moveIconName:"PlusCircle",moveLabel:"Add",isSelected:!1,emptyState:u}),i.jsx(y0,{id:"right",title:o,items:_,height:s,showSearch:a,searchPlaceholder:l,search:x,onSearchChange:v,onMove:O,moveIconName:"MinusCircle",moveLabel:"Remove",emptyState:c,isSelected:!0})]}),i.jsx($V,{children:R=>{const L=S.current.left.concat(S.current.right).find(V=>V.id===R.id);return L?i.jsx(fz,{item:L}):null}})]})});K6.displayName="TransferList";const mz=({message:e="No results"})=>i.jsx("div",{className:"p-4 text-center",children:i.jsx("p",{className:"text-sm font-medium leading-none text-muted-foreground",children:e})}),Z6=C.forwardRef(({value:e,options:t,selectPlaceholder:n="Select",searchPlaceholder:r="Search",onChange:o,onCloseChip:s,valueProp:a="value",fullWidth:l=!1,disabled:c=!1,withSearch:u=!0,limitTags:f=10,maxHeightList:d=320,emptyState:p=i.jsx(mz,{}),label:h,description:g,error:x,deleteAll:v,className:y,id:b,renderOption:S,renderChip:w,"aria-label":E,"aria-labelledby":N},_)=>{const[k,I]=C.useState(!1),[F,U]=C.useState(""),[O,R]=C.useState(t),L=C.useRef(null);C.useEffect(()=>{R(t)},[t]),C.useEffect(()=>{k&&L.current&&u&&setTimeout(()=>{L.current?.focus()},0)},[k,u]);const V=P=>{const B=P.label||P[a];return String(B)},D=P=>{const B=P.target.value;if(U(B),B==="")R(t);else{const Y=t.filter(Z=>V(Z).toLowerCase().includes(B.toLowerCase()));R(Y)}},$=P=>{if(c)return;const B=e.includes(P)?e.filter(Y=>Y!==P):[...e,P];o(B)},z=P=>{if(!c)if(s)s(P);else{const B=e.filter(Y=>Y!==P);o(B)}},T=()=>{c||!v?.onClick||v.onClick()},M=(P,B)=>P?.length<=B?P:P?.substring(0,B)+"...",G=e.map(P=>t.find(B=>B[a]===P)).filter(Boolean),A=v&&!c&&e.length>=v.length,W=G.slice(0,f),H=G.length-f;return i.jsxs("div",{className:j("w-full",l&&"w-full",y),children:[h&&i.jsx(Wt,{htmlFor:b,className:j("mb-2 block",c&&"opacity-50"),children:h}),g&&!x&&i.jsx("p",{className:j("text-sm font-medium leading-none",j("text-muted-foreground mb-2",c&&"opacity-50")),children:g}),i.jsxs(Ub,{open:k,onOpenChange:I,children:[i.jsx(Yb,{asChild:!0,children:i.jsxs("button",{ref:_,id:b,type:"button",disabled:c,role:"combobox","aria-expanded":k,"aria-haspopup":"listbox","aria-controls":k?`${b}-listbox`:void 0,"aria-label":E,"aria-labelledby":N,className:j("flex h-auto min-h-[38px] w-full items-center justify-between gap-2 rounded-md border border-input bg-input px-3 py-1.5 text-sm shadow-xs 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",x&&"border-destructive",l&&"w-full"),children:[i.jsx("div",{className:"flex flex-wrap gap-1 flex-1 items-center",children:e.length===0?i.jsx("span",{className:"text-muted-foreground",children:n}):i.jsxs(i.Fragment,{children:[A&&i.jsx("div",{onClick:P=>{P.preventDefault(),P.stopPropagation(),T()},children:i.jsx(Ze,{variant:"secondary",className:"gap-1 cursor-pointer flex items-center",children:v.label||"Delete all"})}),W.map(P=>i.jsx("div",{onClick:B=>{s&&!c&&(B.preventDefault(),B.stopPropagation(),z(P[a]))},children:w?w(P):i.jsx(Ze,{variant:"outline",className:"gap-1 flex items-center",endIcon:s&&!c?"X":void 0,children:M(V(P),8)})},P[a])),H>0&&i.jsx(Ze,{variant:"outline",className:"flex items-center",children:`+${H}`})]})}),i.jsx(X,{name:"CaretUpDown",size:"sm",className:j("opacity-50 transition-transform",k&&"transform rotate-180")})]})}),i.jsx(Xp,{className:"p-0",align:"start",style:{maxHeight:d},id:b?`${b}-listbox`:void 0,role:"listbox",children:i.jsxs("div",{className:"flex flex-col",children:[u&&t.length>0&&i.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b",children:[i.jsx(X,{name:"MagnifyingGlass",size:"sm",className:"text-muted-foreground"}),i.jsx("input",{ref:L,type:"text",placeholder:r,value:F,onChange:D,onKeyDown:P=>{P.stopPropagation(),P.key==="Escape"&&I(!1)},className:"flex-1 outline-none bg-transparent text-sm placeholder:text-muted-foreground","aria-label":r})]}),i.jsx("div",{className:"overflow-y-auto",style:{maxHeight:u?d-48:d},children:O.length>0?O.map(P=>i.jsx("div",{role:"option","aria-selected":e.includes(P[a]),className:"flex items-center gap-2 px-3 py-2 cursor-pointer hover:bg-accent transition-colors",onClick:()=>$(P[a]),onKeyDown:B=>{(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),$(P[a]))},children:S?S(P,e.includes(P[a])):i.jsxs(i.Fragment,{children:[i.jsx(Oa,{checked:e.includes(P[a]),onChange:()=>$(P[a]),onClick:B=>B.stopPropagation()}),i.jsx("span",{className:"text-sm flex-1",children:V(P)})]})},P[a])):p})]})})]}),x&&i.jsx("p",{className:"text-sm font-medium leading-none text-destructive mt-2",children:x})]})});Z6.displayName="Combobox";const q6=m.forwardRef(({options:e,value:t=[],onChange:n,placeholder:r="Select items...",searchPlaceholder:o="Search",emptyMessage:s="No results found.",disabled:a=!1,label:l,description:c,error:u,maxDisplay:f=3,className:d,showBadges:p=!0,allowClear:h=!0,"aria-label":g},x)=>{const v=m.useId(),[y,b]=m.useState(!1),[S,w]=m.useState(""),E=O=>{const R=t.includes(O)?t.filter(L=>L!==O):[...t,O];n?.(R)},N=(O,R)=>{R?.preventDefault(),R?.stopPropagation();const L=t.filter(V=>V!==O);n?.(L)},_=O=>{O.preventDefault(),O.stopPropagation(),n?.([])},k=t.map(O=>e.find(R=>R.value===O)).filter(Boolean),I=p?k.slice(0,f):[],F=k.length>f?k.length-f:0,U=()=>t.length===0?i.jsx("span",{children:r}):p?i.jsxs(i.Fragment,{children:[I.map(O=>i.jsxs("span",{className:"inline-flex items-center mr-1 px-2 py-0.5 h-6 text-xs font-normal rounded-md border border-border bg-secondary text-secondary-foreground",children:[O.icon&&i.jsx("img",{src:O.icon,alt:"",className:"mr-1 h-3.5 w-3.5 shrink-0 rounded-full object-cover",onError:R=>{R.currentTarget.style.display="none"}}),i.jsx("span",{className:"max-w-[150px] truncate",children:O.label}),i.jsx("button",{type:"button","aria-label":`Remove ${O.label}`,className:"ml-1 rounded-full outline-hidden hover:bg-muted-foreground/20",onClick:R=>N(O.value,R),children:i.jsx(X,{name:"X",className:"h-3 w-3"})})]},O.value)),F>0&&i.jsxs("span",{className:"inline-flex items-center px-2 py-0.5 h-6 text-xs font-normal rounded-md border border-border bg-secondary text-secondary-foreground",children:["+",F," more"]})]}):i.jsxs("span",{className:"text-sm",children:[k.length," selected"]});return i.jsxs("div",{className:"w-full",children:[l&&i.jsx("label",{htmlFor:v,className:"text-sm font-medium text-foreground mb-1.5 block",children:l}),c&&i.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:c}),i.jsxs(Ac,{open:y,onOpenChange:b,children:[i.jsx(Pc,{asChild:!0,children:i.jsxs(wt,{ref:x,id:v,variant:"outline",role:"combobox","aria-expanded":y,"aria-label":g,disabled:a,className:j("w-full justify-between h-auto min-h-9 py-2",u&&"border-destructive",!t.length&&"text-muted-foreground",d),children:[i.jsx("div",{className:"flex flex-wrap gap-1 items-center flex-1",children:U()}),i.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[h&&t.length>0&&i.jsx("button",{type:"button","aria-label":"Clear selection",onClick:_,className:"h-4 w-4 rounded-full hover:bg-muted p-0.5",children:i.jsx(X,{name:"X",className:"h-3 w-3"})}),i.jsx("svg",{className:"h-4 w-4 shrink-0 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]})}),i.jsx(ii,{className:"w-[var(--radix-popover-trigger-width)] p-0",children:i.jsxs(h5,{shouldFilter:!1,children:[i.jsx(m5,{placeholder:o,"aria-label":o,value:S,onValueChange:w}),i.jsx(x5,{children:s}),i.jsx(g5,{children:i.jsx(v5,{children:e.filter(O=>O.label.toLowerCase().includes(S.toLowerCase())).map(O=>i.jsxs(Kd,{value:O.value,onSelect:()=>{E(O.value)},children:[i.jsx(X,{name:"Check",className:j("mr-2 h-4 w-4",t.includes(O.value)?"opacity-100":"opacity-0")}),O.icon&&i.jsx("img",{src:O.icon,alt:"",className:"mr-2 h-4 w-4 shrink-0 rounded-full object-cover",onError:R=>{R.currentTarget.style.display="none"}}),O.label]},O.value))})})]})})]}),u&&i.jsx("p",{className:"text-sm text-destructive mt-1.5",children:u})]})});q6.displayName="MultiSelect";const X6={addFilter:"Add filter",clearFilters:"Clear filters",noFiltersApplied:"No filters applied",moreFilters:"+{count} more",selectAll:"Select all",inverse:"Inverse",none:"None",search:"Search",typeToSearch:"Type to search",moreResults:"{count} more results — refine your search",moreOptions:"{count} more — type to search",showMore:"Show more",typeAndPressEnter:"Type and press Enter...",onlyNumericAllowed:"Only numeric values are allowed",clearAll:"Clear all",custom:"Custom",today:"Today",last3Days:"Last 3 days",last7Days:"Last 7 days",last30Days:"Last 30 days",thisMonth:"This month",allTime:"All time",startDate:"Start date",endDate:"End date",selectDate:"Select date",sunday:"Sunday",monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday",jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"},gz={addFilter:"Agregar filtro",clearFilters:"Limpiar filtros",noFiltersApplied:"Sin filtros aplicados",moreFilters:"+{count} más",selectAll:"Seleccionar todo",inverse:"Invertir",none:"Ninguno",search:"Buscar",typeToSearch:"Escribe para buscar",moreResults:"{count} resultados más — refina tu búsqueda",moreOptions:"{count} más — escribe para buscar",showMore:"Mostrar más",typeAndPressEnter:"Escribe y presiona Enter...",onlyNumericAllowed:"Solo se permiten valores numéricos",clearAll:"Limpiar todo",custom:"Personalizado",today:"Hoy",last3Days:"Últimos 3 días",last7Days:"Últimos 7 días",last30Days:"Últimos 30 días",thisMonth:"Este mes",allTime:"Todo el tiempo",startDate:"Fecha inicio",endDate:"Fecha fin",selectDate:"Seleccionar fecha",sunday:"Domingo",monday:"Lunes",tuesday:"Martes",wednesday:"Miércoles",thursday:"Jueves",friday:"Viernes",saturday:"Sábado",jan:"Ene",feb:"Feb",mar:"Mar",apr:"Abr",may:"May",jun:"Jun",jul:"Jul",aug:"Ago",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dic"},xz={addFilter:"フィルターを追加",clearFilters:"フィルターをクリア",noFiltersApplied:"フィルターが適用されていません",moreFilters:"+{count}件",selectAll:"すべて選択",inverse:"反転",none:"なし",search:"検索",typeToSearch:"入力して検索",moreResults:"他{count}件 — 検索条件を絞ってください",moreOptions:"他{count}件 — 入力して検索",showMore:"もっと見る",typeAndPressEnter:"入力してEnterを押す...",onlyNumericAllowed:"数値のみ入力可能です",clearAll:"すべてクリア",custom:"カスタム",today:"今日",last3Days:"過去3日間",last7Days:"過去7日間",last30Days:"過去30日間",thisMonth:"今月",allTime:"全期間",startDate:"開始日",endDate:"終了日",selectDate:"日付を選択",sunday:"日曜日",monday:"月曜日",tuesday:"火曜日",wednesday:"水曜日",thursday:"木曜日",friday:"金曜日",saturday:"土曜日",jan:"1月",feb:"2月",mar:"3月",apr:"4月",may:"5月",jun:"6月",jul:"7月",aug:"8月",sep:"9月",oct:"10月",nov:"11月",dec:"12月"},vz={addFilter:"إضافة فلتر",clearFilters:"مسح الفلاتر",noFiltersApplied:"لم يتم تطبيق فلاتر",moreFilters:"+{count} أخرى",selectAll:"تحديد الكل",inverse:"عكس",none:"لا شيء",search:"بحث",typeToSearch:"اكتب للبحث",moreResults:"{count} نتيجة أخرى — حسّن بحثك",moreOptions:"{count} أخرى — اكتب للبحث",showMore:"عرض المزيد",typeAndPressEnter:"اكتب واضغط Enter...",onlyNumericAllowed:"مسموح بالقيم الرقمية فقط",clearAll:"مسح الكل",custom:"مخصص",today:"اليوم",last3Days:"آخر 3 أيام",last7Days:"آخر 7 أيام",last30Days:"آخر 30 يوماً",thisMonth:"هذا الشهر",allTime:"كل الوقت",startDate:"تاريخ البدء",endDate:"تاريخ الانتهاء",selectDate:"اختر التاريخ",sunday:"الأحد",monday:"الاثنين",tuesday:"الثلاثاء",wednesday:"الأربعاء",thursday:"الخميس",friday:"الجمعة",saturday:"السبت",jan:"يناير",feb:"فبراير",mar:"مارس",apr:"أبريل",may:"مايو",jun:"يونيو",jul:"يوليو",aug:"أغسطس",sep:"سبتمبر",oct:"أكتوبر",nov:"نوفمبر",dec:"ديسمبر"},yz={addFilter:"Ajouter un filtre",clearFilters:"Effacer les filtres",noFiltersApplied:"Aucun filtre appliqué",moreFilters:"+{count} autres",selectAll:"Tout sélectionner",inverse:"Inverser",none:"Aucun",search:"Rechercher",typeToSearch:"Tapez pour rechercher",moreResults:"{count} résultats supplémentaires — affinez votre recherche",moreOptions:"{count} autres — tapez pour rechercher",showMore:"Afficher plus",typeAndPressEnter:"Tapez et appuyez sur Entrée...",onlyNumericAllowed:"Seules les valeurs numériques sont autorisées",clearAll:"Tout effacer",custom:"Personnalisé",today:"Aujourd'hui",last3Days:"3 derniers jours",last7Days:"7 derniers jours",last30Days:"30 derniers jours",thisMonth:"Ce mois-ci",allTime:"Tout le temps",startDate:"Date de début",endDate:"Date de fin",selectDate:"Sélectionner une date",sunday:"Dimanche",monday:"Lundi",tuesday:"Mardi",wednesday:"Mercredi",thursday:"Jeudi",friday:"Vendredi",saturday:"Samedi",jan:"Janv",feb:"Févr",mar:"Mars",apr:"Avr",may:"Mai",jun:"Juin",jul:"Juil",aug:"Août",sep:"Sept",oct:"Oct",nov:"Nov",dec:"Déc"},bz={addFilter:"Adicionar filtro",clearFilters:"Limpar filtros",noFiltersApplied:"Nenhum filtro aplicado",moreFilters:"+{count} mais",selectAll:"Selecionar tudo",inverse:"Inverter",none:"Nenhum",search:"Pesquisar",typeToSearch:"Digite para pesquisar",moreResults:"Mais {count} resultados — refine sua pesquisa",moreOptions:"Mais {count} — digite para pesquisar",showMore:"Mostrar mais",typeAndPressEnter:"Digite e pressione Enter...",onlyNumericAllowed:"Apenas valores numéricos são permitidos",clearAll:"Limpar tudo",custom:"Personalizado",today:"Hoje",last3Days:"Últimos 3 dias",last7Days:"Últimos 7 dias",last30Days:"Últimos 30 dias",thisMonth:"Este mês",allTime:"Todo o período",startDate:"Data inicial",endDate:"Data final",selectDate:"Selecionar data",sunday:"Domingo",monday:"Segunda-feira",tuesday:"Terça-feira",wednesday:"Quarta-feira",thursday:"Quinta-feira",friday:"Sexta-feira",saturday:"Sábado",jan:"Jan",feb:"Fev",mar:"Mar",apr:"Abr",may:"Mai",jun:"Jun",jul:"Jul",aug:"Ago",sep:"Set",oct:"Out",nov:"Nov",dec:"Dez"},wz={addFilter:"Filtre ekle",clearFilters:"Filtreleri temizle",noFiltersApplied:"Uygulanan filtre yok",moreFilters:"+{count} daha",selectAll:"Tümünü seç",inverse:"Tersine çevir",none:"Hiçbiri",search:"Ara",typeToSearch:"Aramak için yazın",moreResults:"{count} sonuç daha — aramanızı daraltın",moreOptions:"{count} daha — aramak için yazın",showMore:"Daha fazla göster",typeAndPressEnter:"Yazın ve Enter'a basın...",onlyNumericAllowed:"Yalnızca sayısal değerlere izin verilir",clearAll:"Tümünü temizle",custom:"Özel",today:"Bugün",last3Days:"Son 3 gün",last7Days:"Son 7 gün",last30Days:"Son 30 gün",thisMonth:"Bu ay",allTime:"Tüm zamanlar",startDate:"Başlangıç tarihi",endDate:"Bitiş tarihi",selectDate:"Tarih seçin",sunday:"Pazar",monday:"Pazartesi",tuesday:"Salı",wednesday:"Çarşamba",thursday:"Perşembe",friday:"Cuma",saturday:"Cumartesi",jan:"Oca",feb:"Şub",mar:"Mar",apr:"Nis",may:"May",jun:"Haz",jul:"Tem",aug:"Ağu",sep:"Eyl",oct:"Eki",nov:"Kas",dec:"Ara"},Cz={addFilter:"Добавить фильтр",clearFilters:"Очистить фильтры",noFiltersApplied:"Фильтры не применены",moreFilters:"+{count} ещё",selectAll:"Выбрать все",inverse:"Инвертировать",none:"Ничего",search:"Поиск",typeToSearch:"Введите текст для поиска",moreResults:"Ещё {count} результатов — уточните поиск",moreOptions:"Ещё {count} — введите текст для поиска",showMore:"Показать ещё",typeAndPressEnter:"Введите и нажмите Enter...",onlyNumericAllowed:"Допускаются только числовые значения",clearAll:"Очистить все",custom:"Произвольный",today:"Сегодня",last3Days:"Последние 3 дня",last7Days:"Последние 7 дней",last30Days:"Последние 30 дней",thisMonth:"Этот месяц",allTime:"Все время",startDate:"Дата начала",endDate:"Дата окончания",selectDate:"Выберите дату",sunday:"Воскресенье",monday:"Понедельник",tuesday:"Вторник",wednesday:"Среда",thursday:"Четверг",friday:"Пятница",saturday:"Суббота",jan:"Янв",feb:"Фев",mar:"Мар",apr:"Апр",may:"Май",jun:"Июн",jul:"Июл",aug:"Авг",sep:"Сен",oct:"Окт",nov:"Ноя",dec:"Дек"},Sz={addFilter:"Filter hinzufügen",clearFilters:"Filter löschen",noFiltersApplied:"Keine Filter angewendet",moreFilters:"+{count} weitere",selectAll:"Alle auswählen",inverse:"Umkehren",none:"Keine",search:"Suchen",typeToSearch:"Zum Suchen tippen",moreResults:"{count} weitere Ergebnisse — Suche verfeinern",moreOptions:"{count} weitere — zum Suchen tippen",showMore:"Mehr anzeigen",typeAndPressEnter:"Eingeben und Enter drücken...",onlyNumericAllowed:"Nur numerische Werte sind erlaubt",clearAll:"Alle löschen",custom:"Benutzerdefiniert",today:"Heute",last3Days:"Letzte 3 Tage",last7Days:"Letzte 7 Tage",last30Days:"Letzte 30 Tage",thisMonth:"Dieser Monat",allTime:"Gesamter Zeitraum",startDate:"Startdatum",endDate:"Enddatum",selectDate:"Datum auswählen",sunday:"Sonntag",monday:"Montag",tuesday:"Dienstag",wednesday:"Mittwoch",thursday:"Donnerstag",friday:"Freitag",saturday:"Samstag",jan:"Jan",feb:"Feb",mar:"Mär",apr:"Apr",may:"Mai",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Okt",nov:"Nov",dec:"Dez"},Ez={addFilter:"添加筛选",clearFilters:"清除筛选",noFiltersApplied:"未应用筛选",moreFilters:"+{count}个",selectAll:"全选",inverse:"反选",none:"清空",search:"搜索",typeToSearch:"输入以搜索",moreResults:"还有{count}个结果 — 请细化搜索",moreOptions:"还有{count}个 — 输入以搜索",showMore:"显示更多",typeAndPressEnter:"输入并按回车...",onlyNumericAllowed:"仅允许输入数字",clearAll:"清除全部",custom:"自定义",today:"今天",last3Days:"最近3天",last7Days:"最近7天",last30Days:"最近30天",thisMonth:"本月",allTime:"全部时间",startDate:"开始日期",endDate:"结束日期",selectDate:"选择日期",sunday:"星期日",monday:"星期一",tuesday:"星期二",wednesday:"星期三",thursday:"星期四",friday:"星期五",saturday:"星期六",jan:"1月",feb:"2月",mar:"3月",apr:"4月",may:"5月",jun:"6月",jul:"7月",aug:"8月",sep:"9月",oct:"10月",nov:"11月",dec:"12月"},Nz={en:X6,es:gz,ja:xz,ar:vz,fr:yz,pt:bz,tr:wz,ru:Cz,de:Sz,zh:Ez},_z=X6;function Vs(e){const t=e??Za();return Nz[t]??_z}function jz(e){return[e.sunday,e.monday,e.tuesday,e.wednesday,e.thursday,e.friday,e.saturday]}function kz(e){return[e.jan,e.feb,e.mar,e.apr,e.may,e.jun,e.jul,e.aug,e.sep,e.oct,e.nov,e.dec]}function J6(e,t){return e.moreFilters.replace("{count}",String(t))}function Rz(e,t){return e.moreResults.replace("{count}",String(t))}function Mz(e,t){return e.moreOptions.replace("{count}",String(t))}const Dz=e=>Array.isArray(e)?e:e?[e]:[],xm=C.forwardRef(({label:e,onRemove:t,className:n,...r},o)=>i.jsxs(rp,{ref:o,variant:"secondary",className:j("h-8 gap-2 px-3 py-2 shadow-xs",n),...r,children:[i.jsx("span",{className:"text-xs font-medium leading-none",children:e}),t&&i.jsx("button",{onClick:t,className:"inline-flex items-center justify-center","aria-label":`Remove ${e} filter`,children:i.jsx(X,{name:"X",className:"size-4"})})]}));xm.displayName="FilterTag";const Q6=C.forwardRef(({appliedFilters:e=[],onRemoveFilter:t,onClearAll:n,maxVisibleTags:r=4,className:o,lang:s,translations:a,...l},c)=>{const u=C.useMemo(()=>{const h=Vs(s);return a?{...h,...a}:h},[s,a]),f=e.length>0,d=e.slice(0,r),p=e.length-r;return i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsxs(wt,{ref:c,variant:"outline",size:"sm",className:j("h-8 gap-2 px-3 py-2",o),...l,children:[i.jsx(X,{name:"FunnelSimple",className:"size-4"}),i.jsx("span",{className:"text-xs font-medium leading-none",children:u.addFilter})]}),f&&i.jsxs(i.Fragment,{children:[i.jsx(Nr,{orientation:"vertical",className:"h-5"}),i.jsxs("div",{className:"flex items-center gap-2",children:[d.map(h=>i.jsx(xm,{label:h.label,onRemove:()=>t?.(h.id)},h.id)),p>0&&i.jsx(rp,{variant:"default",className:"h-8 px-3 py-2 shadow-xs",children:i.jsx("span",{className:"text-xs font-medium leading-none",children:J6(u,p)})}),n&&i.jsx(wt,{variant:"ghost",size:"sm",onClick:n,className:"h-8 px-3 py-2",children:i.jsx("span",{className:"text-xs font-medium leading-none text-primary",children:u.clearFilters})})]})]}),!f&&i.jsxs(i.Fragment,{children:[i.jsx(Nr,{orientation:"vertical",className:"h-5"}),i.jsx("span",{className:"text-sm font-normal text-muted-foreground",children:u.noFiltersApplied})]})]})});Q6.displayName="FilterButton";const ol=1e3,ic=C.forwardRef((e,t)=>{const{title:n,items:r,className:o,searchable:s=!1,searchPlaceholder:a,showActions:l=!1,enableSelectAll:c=!0,enableInverse:u=!0,enableNone:f=!0,description:d,footer:p,lang:h,translations:g}=e,x=C.useMemo(()=>{const T=Vs(h);return g?{...T,...g}:T},[h,g]),v=e.type||"checkbox",y=v==="radio",b=v==="checkbox"||!e.type,[S,w]=C.useState(""),[E,N]=C.useState(ol),_=C.useMemo(()=>{const T=ut(S).toLowerCase();return T?r.filter(M=>ut(M.label).toLowerCase().includes(T)):r},[r,S]),k=r.length>ol,I=s||k,F=k&&!S,U="selectedValues"in e?e.selectedValues:e.selectedValue,{visibleItems:O,hiddenMatchCount:R}=C.useMemo(()=>{if(!k)return{visibleItems:_,hiddenMatchCount:0};if(!S){const T=new Set(Dz(U)),M=r.filter(W=>T.has(W.value)),G=r.filter(W=>!T.has(W.value)).slice(0,E),A=[...M,...G];return{visibleItems:A,hiddenMatchCount:r.length-A.length}}return{visibleItems:_.slice(0,E),hiddenMatchCount:Math.max(0,_.length-E)}},[k,S,r,_,U,E]),L=()=>{if(v==="checkbox"&&"selectedValues"in e){const T=_.map(G=>G.value),M=S?[...new Set([...e.selectedValues,...T])]:T;e.onChange(M)}},V=()=>{if(v==="checkbox"&&"selectedValues"in e)if(S){const T=new Set(_.map(A=>A.value)),M=e.selectedValues.filter(A=>!T.has(A)),G=_.filter(A=>!e.selectedValues.includes(A.value)).map(A=>A.value);e.onChange([...M,...G])}else{const T=r.filter(M=>!e.selectedValues.includes(M.value)).map(M=>M.value);e.onChange(T)}},D=()=>{if(v==="checkbox"&&"selectedValues"in e)if(S){const T=new Set(_.map(G=>G.value)),M=e.selectedValues.filter(G=>!T.has(G));e.onChange(M)}else e.onChange([]);else v==="radio"&&"selectedValue"in e&&e.onChange("")},$=(T,M)=>{if(v==="checkbox"&&"selectedValues"in e){const G=M?[...e.selectedValues,T]:e.selectedValues.filter(A=>A!==T);e.onChange(G)}},z=R>0&&i.jsx(wt,{variant:"link",size:"sm",onClick:()=>N(T=>T+ol),className:"col-span-2 h-auto justify-self-start p-0 text-xs font-medium text-primary hover:text-primary/80",children:x.showMore});return i.jsxs("div",{ref:t,dir:go(h),className:j("flex flex-col",p?"min-h-full":"h-full",o),children:[I&&i.jsx(Zc,{placeholder:a??(k?x.typeToSearch:x.search),value:S,onSearch:T=>{w(T),N(ol)},enableHistory:!1,className:"mb-4"}),d&&i.jsx("div",{className:"text-xs font-normal text-muted-foreground mb-4",children:d}),i.jsxs("div",{className:"flex items-center justify-between mb-1",children:[i.jsx("span",{className:"text-sm font-normal text-foreground",children:n}),l&&v==="checkbox"&&i.jsxs("div",{className:"flex items-center justify-end gap-4",children:[c&&!F&&i.jsxs(wt,{variant:"link",size:"sm",onClick:L,className:"h-auto p-0 text-xs font-medium text-primary hover:text-primary/80",children:[x.selectAll," (",_.length,")"]}),u&&!F&&i.jsx(wt,{variant:"link",size:"sm",onClick:V,className:"h-auto p-0 text-xs font-medium text-primary hover:text-primary/80",children:x.inverse}),f&&i.jsx(wt,{variant:"link",size:"sm",onClick:D,className:"h-auto p-0 text-xs font-medium text-primary hover:text-primary/80",children:x.none})]})]}),i.jsx(Nr,{className:"w-full mb-6"}),y&&"selectedValue"in e&&i.jsxs(Yc,{value:e.selectedValue,onValueChange:e.onChange,className:"grid grid-cols-2 gap-x-4 gap-y-5 overflow-y-auto",children:[O.map(T=>i.jsx(ym,{label:T.label,value:T.value,description:T.description},T.value)),z]}),!y&&b&&"selectedValues"in e&&i.jsxs("div",{className:j("grid grid-cols-2 gap-x-4 gap-y-5",!p&&"overflow-y-auto"),children:[O.map(T=>i.jsx(vm,{label:T.label,description:T.description,icon:T.icon,checked:e.selectedValues.includes(T.value),onCheckedChange:M=>$(T.value,M)},T.value)),z]}),R>0&&i.jsxs(i.Fragment,{children:[i.jsx(Nr,{className:"w-full my-4"}),i.jsx("p",{className:"text-xs font-normal text-muted-foreground",children:S?Rz(x,R):Mz(x,R)})]}),p&&i.jsx("div",{className:"mt-6",children:p})]})});ic.displayName="FilterSection";const vm=C.forwardRef(({label:e,checked:t,onCheckedChange:n,description:r,className:o,icon:s},a)=>i.jsxs("label",{className:j("flex items-start gap-2 cursor-pointer",o),children:[i.jsx(_3,{ref:a,checked:t,onCheckedChange:n}),s&&i.jsx("img",{src:s,alt:"",className:"size-4 object-contain shrink-0",onError:l=>{l.currentTarget.style.display="none"}}),i.jsxs("div",{className:"flex flex-col gap-0.5 min-w-0",children:[i.jsx(zt,{content:e,triggerProps:{className:"w-fit"},children:i.jsx("p",{className:"text-sm font-medium leading-4 truncate max-w-[165px]",children:e})}),r&&i.jsx(zt,{content:r,triggerProps:{className:"w-fit mt-2"},children:i.jsx("p",{className:"text-sm font-normal leading-5 text-muted-foreground truncate max-w-[165px]",children:r})})]})]}));vm.displayName="FilterCheckboxOption";const ym=C.forwardRef(({label:e,value:t,description:n,className:r},o)=>i.jsxs("div",{className:j("flex items-start gap-3",r),children:[i.jsx(Kc,{ref:o,value:t,id:`radio-${t}`}),i.jsxs("label",{htmlFor:`radio-${t}`,className:"flex flex-col gap-0.5 cursor-pointer min-w-0 truncate",children:[i.jsx(zt,{content:e,triggerProps:{className:"w-fit"},children:i.jsx("p",{className:"text-sm font-medium leading-4 truncate max-w-[165px]",children:e})}),n&&i.jsx(zt,{content:n,triggerProps:{className:"w-fit mt-2"},children:i.jsx("p",{className:"w-fittext-sm font-normal leading-4 text-muted-foreground truncate max-w-[165px]",children:n})})]})]}));ym.displayName="FilterRadioOption";const eC=C.forwardRef(({children:e,showSearch:t=!1,searchPlaceholder:n,searchValue:r,onSearchChange:o,className:s,lang:a,translations:l},c)=>{const u=C.useMemo(()=>{const f=Vs(a);return l?{...f,...l}:f},[a,l]);return i.jsxs("div",{ref:c,dir:go(a),className:j("flex flex-col gap-6 bg-input rounded-md p-6 min-w-[448px]",s),children:[t&&i.jsx("div",{className:"flex flex-col gap-2",children:i.jsxs("div",{className:"relative",children:[i.jsx(X,{name:"MagnifyingGlass",className:"absolute start-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground"}),i.jsx(ds,{placeholder:n??u.search,value:r,onChange:f=>o?.(Gc(f.target.value)),className:"ps-9"})]})}),i.jsx("div",{className:"flex flex-col gap-6",children:e})]})});eC.displayName="FilterContent";const rn={CUSTOM:"CUSTOM",TODAY:"TODAY",LAST_3_DAYS:"LAST_3_DAYS",LAST_7_DAYS:"LAST_7_DAYS",LAST_30_DAYS:"LAST_30_DAYS",THIS_MONTH:"THIS_MONTH",ALL_TIME:"ALL_TIME"},Wr=(e,t)=>{const n=e.getDate();return`${t[e.getMonth()]} ${n}`},Az=(e,t)=>{const n=t[e.getMonth()],r=e.getFullYear();return`${n} ${r}`},Pz=(e,t)=>t[e.getDay()],Tz=(e,t)=>{const n=new Date;n.setHours(0,0,0,0);const r=`${Pz(n,e)}, ${Wr(n,t)}`,o=new Date(n);o.setDate(o.getDate()-2);const s=`${Wr(o,t)} - ${Wr(n,t)}`,a=new Date(n);a.setDate(a.getDate()-6);const l=`${Wr(a,t)} - ${Wr(n,t)}`,c=new Date(n);c.setDate(c.getDate()-29);const u=`${Wr(c,t)} - ${Wr(n,t)}`,f=Az(n,t);return{today:r,last3Days:s,last7Days:l,last30Days:u,thisMonth:f}},Yn=C.forwardRef(({label:e,description:t,value:n,className:r,...o},s)=>{const a=`date-range-${n}`;return i.jsxs("div",{className:"flex items-start gap-4 w-full py-1",children:[i.jsxs("label",{ref:s,className:j("flex-1 flex items-start gap-3 cursor-pointer",r),...o,children:[i.jsx(Kc,{id:a,value:n,className:"mt-px"}),i.jsx("div",{className:"flex flex-col gap-1.5 items-start justify-center pb-0 pt-px px-0",children:i.jsx("span",{className:"text-sm font-medium leading-none text-foreground",children:e})})]}),t&&i.jsx("div",{className:"flex items-center gap-2",children:i.jsx("span",{className:"text-xs font-normal leading-none text-muted-foreground whitespace-nowrap",children:t})})]})});Yn.displayName="FilterDateRangeOption";const bm=C.forwardRef(({showCustomFields:e=!1,onCustomFieldsChange:t,startDate:n,endDate:r,startTime:o="",endTime:s="",onStartDateChange:a,onEndDateChange:l,onStartTimeChange:c,onEndTimeChange:u,mode:f="range",singleDayLabel:d,showAllTime:p=!1,className:h,value:g,onValueChange:x,announcement:v,dateError:y,labels:b,lang:S,translations:w,...E},N)=>{const _=C.useMemo(()=>{const D=Vs(S);return w?{...D,...w}:D},[S,w]),k=C.useMemo(()=>jz(_),[_]),I=C.useMemo(()=>kz(_),[_]),F=C.useMemo(()=>Tz(k,I),[k,I]),U=new Date().getFullYear(),O=U-20,R=U+1,L=D=>{x?.(D),t?.(D===rn.CUSTOM)},V=D=>{if(D){const $=new Date(D);$.setHours(0,0,0,0);const z=new Date(D);z.setHours(23,59,59,999),a?.($),l?.(z)}else a?.(void 0),l?.(void 0)};return i.jsxs("div",{ref:N,dir:go(S),className:j("flex flex-col gap-4 w-full",h),children:[v&&(typeof v=="string"?i.jsx(Kf,{icon:"Info",description:v}):v),i.jsxs(Yc,{value:g,onValueChange:L,className:"gap-2",...E,children:[i.jsx(Yn,{label:b?.custom??_.custom,value:rn.CUSTOM}),e&&i.jsxs("div",{className:"flex flex-col gap-4 ps-7 mb-2",children:[f==="single"?i.jsx("div",{className:"flex flex-col gap-3",children:i.jsx(cl,{date:n,onChange:V,placeholder:d??_.selectDate,className:"h-9",iconPosition:"none",captionLayout:"dropdown",fromYear:O,toYear:R})}):i.jsxs("div",{className:"flex gap-4 items-start w-full",children:[i.jsx("div",{className:"flex-1 flex flex-col gap-3",children:i.jsx(cl,{date:n,onChange:a,placeholder:b?.startDate??_.startDate,className:"h-9",iconPosition:"none",captionLayout:"dropdown",fromYear:O,toYear:R})}),i.jsx("div",{className:"flex-1 flex flex-col gap-3",children:i.jsx(zt,{content:y,triggerProps:{className:"w-full"},children:i.jsx(cl,{date:r,onChange:l,placeholder:b?.endDate??_.endDate,error:y,className:"h-9",iconPosition:"none",captionLayout:"dropdown",fromYear:O,toYear:R})})})]}),i.jsxs("div",{className:"flex gap-4 items-start w-full",children:[i.jsx("div",{className:"flex-1 flex flex-col gap-3",children:i.jsx(zl,{value:o,onChange:c,mode:"dropdown",use24Hour:!0,width:"100%"})}),i.jsx("div",{className:"flex-1 flex flex-col gap-3",children:i.jsx(zl,{value:s,onChange:u,mode:"dropdown",use24Hour:!0,width:"100%"})})]})]}),i.jsxs("div",{className:"flex flex-col gap-2",children:[i.jsx(Yn,{label:b?.today??_.today,value:rn.TODAY,description:F.today}),i.jsx(Yn,{label:b?.last3Days??_.last3Days,value:rn.LAST_3_DAYS,description:F.last3Days}),i.jsx(Yn,{label:b?.last7Days??_.last7Days,value:rn.LAST_7_DAYS,description:F.last7Days}),i.jsx(Yn,{label:b?.last30Days??_.last30Days,value:rn.LAST_30_DAYS,description:F.last30Days}),i.jsx(Yn,{label:b?.thisMonth??_.thisMonth,value:rn.THIS_MONTH,description:F.thisMonth}),p&&i.jsx(Yn,{label:b?.allTime??_.allTime,value:rn.ALL_TIME})]})]})]})});bm.displayName="FilterDateRange";const tC=C.forwardRef(({title:e,value:t,onChange:n,placeholder:r,description:o,error:s,numericOnly:a=!1,maxItems:l,disabled:c=!1,className:u,allowDuplicates:f=!1,lang:d,translations:p},h)=>{const g=C.useMemo(()=>{const v=Vs(d);return p?{...v,...p}:v},[d,p]),x=a?v=>/^\d+$/.test(v)?!0:g.onlyNumericAllowed:void 0;return i.jsxs("div",{ref:h,className:j("flex flex-col h-full",u),children:[i.jsx("div",{className:"flex items-center justify-between mb-1",children:i.jsx("span",{className:"text-sm font-normal text-foreground",children:e})}),i.jsx(Nr,{className:"w-full mb-6"}),i.jsx(Kp,{value:t,onChange:n,placeholder:r??g.typeAndPressEnter,description:o,error:s,disabled:c,maxItems:l,allowDuplicates:f,validate:x,triggerKeys:["Enter","Tab","Comma"],deleteAll:t.length>0?{label:g.clearAll,length:1,onClick:()=>n([])}:void 0})]})});tC.displayName="FilterMultiInput";const wm=C.forwardRef(({icon:e,label:t,isActive:n=!1,showChevron:r=!1,className:o,...s},a)=>i.jsxs("button",{ref:a,className:j("flex items-center gap-2 h-8 px-2 rounded-md w-full transition-colors shrink-0 hover:bg-secondary",o),...s,children:[e&&i.jsx(X,{name:e,className:j("size-4 shrink-0",n?"text-primary":"text-foreground")}),i.jsx("span",{className:j("flex-1 text-sm font-normal text-left truncate",n?"text-primary":"text-foreground"),children:t}),(n||r)&&i.jsx(X,{name:"CaretRight",className:j("size-4 shrink-0",n?"text-primary":"text-foreground")})]}));wm.displayName="FilterMenuItem";const Cm=C.forwardRef(({items:e,activeItemId:t,onItemClick:n,className:r},o)=>i.jsx("div",{ref:o,className:j("flex flex-col gap-2 w-64 h-full p-2 bg-muted border border-border rounded-md overflow-y-auto",r),children:e.map(s=>i.jsx(wm,{icon:s.icon,label:s.label,isActive:t===s.id,showChevron:s.showChevron,onClick:()=>n?.(s.id)},s.id))}));Cm.displayName="FilterMenu";const nC=C.forwardRef(({filters:e,buttonText:t,appliedFilters:n=[],onRemoveFilter:r,onClearAllFilters:o,onOpenChange:s,maxVisibleTags:a=4,className:l,actionName:c,disabled:u=!1,applyOnClose:f=!1,lang:d,translations:p},h)=>{const g=C.useMemo(()=>{const K=Vs(d);return p?{...K,...p}:K},[d,p]),[x,v]=C.useState(!1),[y,b]=C.useState({}),S=C.useRef({}),w=C.useRef(e),E=C.useCallback(K=>{b(Q=>{const ae=typeof K=="function"?K(Q):K;return S.current=ae,ae})},[]);C.useEffect(()=>{w.current=e},[e]);const N=C.useCallback(()=>{if(!f)return;const K=S.current,Q=w.current;Object.entries(K).forEach(([ae,J])=>{const be=Q.find(ge=>ge.id===ae);if(be)switch(J.type){case"checkbox":J.checkboxValues!==void 0&&be.onChange?.(J.checkboxValues);break;case"radio":J.radioValue!==void 0&&be.onValueChange?.(J.radioValue);break;case"date":J.dateValue!==void 0&&be.onDateValueChange?.(J.dateValue),J.dateInit!==void 0&&be.onDateInitChange?.(J.dateInit),J.dateEnd!==void 0&&be.onDateEndChange?.(J.dateEnd),J.startTime!==void 0&&be.onStartTimeChange?.(J.startTime),J.endTime!==void 0&&be.onEndTimeChange?.(J.endTime);break;case"custom":J.customValue!==void 0&&be.onCustomChange?.(J.customValue);break}}),E({})},[f,E]),_=C.useCallback(K=>{if(!K&&x&&f){s?.(K),N(),v(K);return}K&&!x&&f&&E({}),v(K),s?.(K)},[s,x,f,N,E]),[k,I]=C.useState(e.length>0&&e[0]?.id||""),F=C.useRef(null),U=C.useCallback(K=>{F.current=K,typeof h=="function"?h(K):h&&(h.current=K)},[h]);C.useEffect(()=>{if(!x)return;const K=J=>{const be=J.target;F.current?.contains(be)||be.closest?.("[data-radix-popper-content-wrapper], [data-radix-portal]")||be.closest?.(".rdp, .rdp-root, [data-calendar]")||_(!1)},Q=J=>{J.key==="Escape"&&_(!1)},ae=setTimeout(()=>{document.addEventListener("mousedown",K),document.addEventListener("keydown",Q)},0);return()=>{clearTimeout(ae),document.removeEventListener("mousedown",K),document.removeEventListener("keydown",Q)}},[x,_]);const O=n.length>0,R=n.slice(0,a),L=n.length-a,V=K=>{if(e.find(J=>J.id===K))return K;const ae=K.split("-");if(ae.length>1){const J=ae[0];if(e.find(ge=>ge.id===J))return J}return K},D=K=>{const Q=V(K);return e.find(J=>J.id===Q)?.clearable!==!1},$=K=>{const Q=K.sectionId??V(K.id);I(Q),_(!0)},z=n.some(K=>D(K.id)),T=e.map(K=>({id:K.id,icon:K.icon,label:K.label})),M=e.find(K=>K.id===k),G=(K,Q)=>f?y[K]?.checkboxValues??Q:Q,A=(K,Q)=>f?y[K]?.radioValue??Q:Q,W=(K,Q)=>f?y[K]?.dateValue??Q:Q,H=(K,Q)=>f?y[K]?.dateInit??Q:Q,P=(K,Q)=>f?y[K]?.dateEnd??Q:Q,B=(K,Q)=>f?y[K]?.startTime??Q:Q,Y=(K,Q)=>f?y[K]?.endTime??Q:Q,Z=(K,Q,ae)=>J=>{ae!==void 0&&ae>0&&J.length<ae||(f?E(be=>({...be,[K]:{...be[K],type:"checkbox",checkboxValues:J}})):Q?.(J))},q=(K,Q)=>ae=>{f?E(J=>({...J,[K]:{...J[K],type:"radio",radioValue:ae}})):Q?.(ae)},oe=(K,Q)=>ae=>{f?E(J=>({...J,[K]:{...J[K],type:"date",dateValue:ae}})):Q?.(ae)},ne=(K,Q)=>ae=>{f?E(J=>({...J,[K]:{...J[K],type:"date",dateInit:ae}})):Q?.(ae)},le=(K,Q)=>ae=>{f?E(J=>({...J,[K]:{...J[K],type:"date",dateEnd:ae}})):Q?.(ae)},Ee=(K,Q)=>ae=>{f?E(J=>({...J,[K]:{...J[K],type:"date",startTime:ae}})):Q?.(ae)},re=(K,Q)=>ae=>{f?E(J=>({...J,[K]:{...J[K],type:"date",endTime:ae}})):Q?.(ae)},ce=()=>{if(!M)return null;switch(M.type){case"checkbox":{const K=G(M.id,M.selectedValues||[]),Q=M.description&&(M.descriptionMinSelection===void 0||K.length>=M.descriptionMinSelection);return i.jsx(ic,{title:M.label,items:M.items||[],selectedValues:K,onChange:Z(M.id,M.onChange,M.minSelection),searchable:M.searchable,searchPlaceholder:M.searchPlaceholder,showActions:M.showActions,enableSelectAll:M.enableSelectAll,enableInverse:M.enableInverse,enableNone:M.enableNone,description:Q?M.description:void 0,footer:M.footer,lang:d,translations:p})}case"radio":return i.jsx(ic,{type:"radio",title:M.label,items:M.items||[],selectedValue:A(M.id,M.selectedValue||""),onChange:q(M.id,M.onValueChange),searchable:M.searchable,searchPlaceholder:M.searchPlaceholder,showActions:M.showActions,enableSelectAll:M.enableSelectAll,enableInverse:M.enableInverse,enableNone:M.enableNone,description:M.description,lang:d,translations:p});case"date":{const K=W(M.id,M.dateValue||rn.LAST_7_DAYS),Q=H(M.id,M.dateInit),ae=P(M.id,M.dateEnd),J=B(M.id,M.startTime||""),be=Y(M.id,M.endTime||""),ge=f&&y[M.id]?.dateInit!==void 0,fe=f&&y[M.id]?.dateEnd!==void 0,Te=oe(M.id,M.onDateValueChange),Pe=ne(M.id,M.onDateInitChange),We=le(M.id,M.onDateEndChange),nt=Ee(M.id,M.onStartTimeChange),dt=re(M.id,M.onEndTimeChange),fn=Ot=>{if(Te(Ot),Ot===rn.CUSTOM&&!ge&&!fe){const Nt=new Date,je=new Date(Nt);je.setHours(23,59,59,999);const Me=new Date(Nt);Me.setHours(0,0,0,0),Pe(Me),We(je),nt("00:00:00"),dt("23:59:59")}};return i.jsx(bm,{value:K,onValueChange:fn,showCustomFields:K===rn.CUSTOM,startDate:Q,endDate:ae,startTime:J,endTime:be,mode:M.dateMode||"range",singleDayLabel:M.singleDayLabel,showAllTime:M.showAllTime,onStartDateChange:Pe,onEndDateChange:We,onStartTimeChange:nt,onEndTimeChange:dt,announcement:M.description,dateError:M.dateError,labels:M.dateLabels,lang:d,translations:p})}case"custom":{const K=f?{bufferedValue:y[M.id]?.customValue,onDeferredChange:Q=>{E(ae=>({...ae,[M.id]:{...ae[M.id],type:"custom",customValue:Q}}))},isDeferred:!0}:void 0;return M.renderContent?.(K)}default:return null}};return i.jsxs("div",{ref:U,className:j("flex flex-col gap-1 relative",l),"data-action-name":c,children:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsxs(wt,{variant:"outline",size:"sm",className:"gap-2",onClick:()=>_(!x),disabled:u,children:[i.jsx(X,{name:"FunnelSimple",className:"size-4"}),t??g.addFilter]}),O?i.jsxs(i.Fragment,{children:[i.jsx(Nr,{orientation:"vertical",className:"h-5"}),i.jsxs("div",{className:"flex items-center gap-2",children:[R.map(K=>{const Q=D(K.id);return i.jsxs("div",{className:j(es({variant:"secondary",size:"sm"}),"gap-2",K.className),children:[i.jsxs("button",{type:"button",onClick:()=>$(K),className:"inline-flex items-center gap-2 bg-transparent",children:[K.icon&&i.jsx(X,{name:K.icon,size:"xs"}),K.label]}),r&&Q&&i.jsx("button",{type:"button",onClick:ae=>{ae.stopPropagation(),r(K.id)},className:"inline-flex items-center justify-center","aria-label":`Remove ${K.label} filter`,children:i.jsx(X,{name:"X",className:"size-4"})})]},K.id)}),L>0&&i.jsx(wt,{onClick:()=>_(!0),children:J6(g,L)}),o&&z&&i.jsx(wt,{variant:"ghost",size:"sm",className:"h-8 px-3 py-2",onClick:o,children:i.jsx("span",{className:"text-xs font-medium leading-none text-primary",children:g.clearFilters})})]})]}):i.jsxs(i.Fragment,{children:[i.jsx(Nr,{orientation:"vertical",className:"h-5"}),i.jsx("span",{className:"text-sm font-normal text-muted-foreground",children:g.noFiltersApplied})]})]}),x&&i.jsxs("div",{className:j("z-popover shadow-lg","absolute top-full start-0 mt-1","flex flex-row gap-2","w-[728px] h-[448px]","bg-popover border border-border rounded-md p-2"),children:[i.jsx(Cm,{items:T,activeItemId:k,onItemClick:I}),i.jsx("div",{className:"flex flex-col gap-4 p-6 bg-popover w-[448px] h-full rounded-md overflow-y-auto",children:ce()})]})]})});nC.displayName="FilterDropdown";function Oz(e,t=!1){const[n,r]=C.useState(()=>typeof window>"u"?t:window.matchMedia(e).matches);return C.useEffect(()=>{if(typeof window>"u")return;const o=window.matchMedia(e);r(o.matches);const s=a=>{r(a.matches)};return o.addEventListener?(o.addEventListener("change",s),()=>{o.removeEventListener("change",s)}):(o.addListener(s),()=>{o.removeListener(s)})},[e]),n}function Lz(e){return go(e)}const Iz={success:"CheckCircle",error:"WarningCircle",warning:"Warning",info:"Info"},Fz={success:"var(--color-success)",error:"var(--color-destructive)",warning:"var(--color-warning)",info:"var(--color-info)"},$z={success:"default",error:"destructive",warning:"default",info:"default"},Vz=()=>i.jsx("div",{className:"w-full h-1 bg-border rounded-full overflow-hidden mt-3",children:i.jsx("div",{className:"h-full bg-primary animate-progress-indeterminate"})}),Bz=({mode:e,title:t,message:n,primaryActionLabel:r,onAction:o,timeToLive:s=5e3,withCloseButton:a=!0,withProgress:l=!1})=>{const c=Iz[e],u=!!t,f=!!(r&&o),d=i.jsx(X,{name:c,className:"size-4",weight:"fill",style:{color:Fz[e]}}),p=i.jsxs("div",{className:"flex flex-col gap-0 w-full",children:[i.jsx("div",{className:"flex items-start gap-2",children:i.jsx("div",{className:"flex-1 min-w-0",children:i.jsx("p",{className:u?"text-sm font-semibold":"text-sm",children:u?t:n})})}),u&&i.jsx("div",{className:"mt-1",children:i.jsx("p",{className:"text-sm text-muted-foreground",children:n})}),l&&i.jsx(Vz,{}),f&&i.jsx("div",{className:"mt-3",children:i.jsx(ot,{variant:$z[e],size:"sm",onClick:()=>{o(),Kn.dismiss()},children:r})})]}),h={duration:s,closeButton:a,icon:d,position:"top-right",classNames:{toast:`notification-alert-toast notification-alert-${e}`}};switch(e){case"success":return Kn.success(p,h);case"error":return Kn.error(p,h);case"warning":return Kn.warning(p,h);case"info":return Kn.info(p,h)}};exports.AccessDeniedAlert=Gx;exports.Accordion=Bx;exports.AccordionContent=Hx;exports.AccordionItem=zx;exports.AccordionTrigger=Wx;exports.AggregatedTable=X5;exports.Alert=Kf;exports.AnimatedEmpty=h3;exports.AnimatedEmptyIllustration=p3;exports.Avatar=Qx;exports.Badge=Ze;exports.Breadcrumb=By;exports.BulkActionBar=J5;exports.Button=ot;exports.Card=a2;exports.CardBase=Ss;exports.CardContent=Sc;exports.CardDescription=ap;exports.CardFooter=Ec;exports.CardHeader=op;exports.CardTitle=sp;exports.Checkbox=Oa;exports.Combobox=Z6;exports.ConfirmationDialog=$6;exports.CurrencyField=ip;exports.DATA_TABLE_TRANSLATIONS=w6;exports.DEFAULT_DATA_TABLE_TRANSLATIONS=uu;exports.DataFreshnessBadge=n3;exports.DataItem=pi;exports.DataTable=sz;exports.DataTableAmountCell=_5;exports.DataTableBadgeCell=b5;exports.DataTableCellWrapper=w5;exports.DataTableColumnHeader=Of;exports.DataTableCopyCell=E5;exports.DataTableCountryCell=k5;exports.DataTableDateCell=j5;exports.DataTableIconCell=A5;exports.DataTableIconTextCell=D5;exports.DataTableListCell=F6;exports.DataTablePercentageCell=R5;exports.DataTableSortIndicator=I6;exports.DataTableStatusCell=N5;exports.DataTableTagsCell=M5;exports.DataTableTextCell=C5;exports.DatePicker=cl;exports.DateRangePicker=zj;exports.DetailDrawer=B6;exports.DetailPageHeader=H6;exports.DetailPageLayout=W6;exports.DetailSection=V6;exports.Dialog=fu;exports.DialogContent=Bp;exports.DialogFooter=zp;exports.DialogHeader=Vp;exports.DotsMenu=nb;exports.DropdownMenu=Lc;exports.DropdownMenuCheckboxItem=sy;exports.DropdownMenuContent=Fc;exports.DropdownMenuGroup=ry;exports.DropdownMenuItem=xn;exports.DropdownMenuLabel=oy;exports.DropdownMenuPortal=ny;exports.DropdownMenuRadioGroup=ay;exports.DropdownMenuRadioItem=iy;exports.DropdownMenuSeparator=Dl;exports.DropdownMenuShortcut=ly;exports.DropdownMenuSub=cy;exports.DropdownMenuSubContent=dy;exports.DropdownMenuSubTrigger=uy;exports.DropdownMenuTrigger=Ic;exports.Empty=Bc;exports.EmptyIcon=lA;exports.Field=ds;exports.FileUpload=g3;exports.FilterButton=Q6;exports.FilterCheckboxOption=vm;exports.FilterContent=eC;exports.FilterDateRange=bm;exports.FilterDateRangeOption=Yn;exports.FilterDateRangeValue=rn;exports.FilterDropdown=nC;exports.FilterMenu=Cm;exports.FilterMenuItem=wm;exports.FilterMultiInput=tC;exports.FilterRadioOption=ym;exports.FilterSection=ic;exports.FilterTag=xm;exports.HighlightBanner=r3;exports.ICON_NAMES=x9;exports.Icon=X;exports.LANGUAGE_STORAGE_KEY=I0;exports.Label=Wt;exports.Link=Mp;exports.ListFilterToolbar=gm;exports.ListPageHeader=mm;exports.ListPageLayout=z6;exports.Loading=Ay;exports.MultiSelect=q6;exports.MultiValuesField=Kp;exports.NavLink=$c;exports.NavTabs=Wp;exports.OTPField=F3;exports.OVERLAY_EVENT=L6;exports.PageTitle=Dp;exports.Pagination=$p;exports.PaginationContent=Op;exports.PaginationEllipsis=Fp;exports.PaginationItem=ro;exports.PaginationLink=us;exports.PaginationNext=Ip;exports.PaginationPrevious=Lp;exports.PaginationRoot=$p;exports.PasswordField=rb;exports.Popover=ky;exports.PopoverAnchor=$R;exports.PopoverContent=My;exports.PopoverTrigger=Ry;exports.Progress=Tp;exports.ProtectedField=KR;exports.ProviderCard=m3;exports.RadioGroup=J3;exports.RadioGroupBase=Yc;exports.RadioGroupItem=Kc;exports.RadioGroupOption=X3;exports.SearchField=Zc;exports.SearchSelect=y5;exports.SectionNav=G6;exports.Select=Gb;exports.Separator=Pa;exports.Sheet=hm;exports.Skeleton=Ln;exports.Stepper=x3;exports.Switch=Up;exports.TOTALS_ROW_ID=q5;exports.Textarea=A3;exports.ThemedImage=Vy;exports.TimePicker=zl;exports.Toaster=AM;exports.ToggleGroup=_y;exports.ToggleGroupItem=jy;exports.Tooltip=zt;exports.TooltipProvider=Mt;exports.TransferList=K6;exports.TransferListEmptyState=Y6;exports.Tutorial=U6;exports.avgAggregation=U5;exports.cn=j;exports.getDataTableTranslations=C6;exports.getDefaultLanguage=Za;exports.maxAggregation=Z5;exports.minAggregation=K5;exports.normalizeDimension=ss;exports.sanitizeSearchValue=ut;exports.showNotificationAlert=Bz;exports.sizeAggregation=Y5;exports.stripInvisibleCharacters=Gc;exports.sumAggregation=G5;exports.toast=Kn;exports.useBodyScrollLock=dm;exports.useCopyToClipboard=S5;exports.useDirection=Lz;exports.useEscapeKey=fm;exports.useMediaQuery=Oz;exports.useOverlayPresence=pm;
|