@desafio-design-system_/reflow-ui 0.5.0 → 0.5.2
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 +85 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4647 -578
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,86 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react/jsx-runtime");function ve(e){var r,o,t="";if(typeof e=="string"||typeof e=="number")t+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(r=0;r<l;r++)e[r]&&(o=ve(e[r]))&&(t&&(t+=" "),t+=o)}else for(o in e)e[o]&&(t&&(t+=" "),t+=o);return t}function ze(){for(var e,r,o=0,t="",l=arguments.length;o<l;o++)(e=arguments[o])&&(r=ve(e))&&(t&&(t+=" "),t+=r);return t}const Ve=(e,r)=>{const o=new Array(e.length+r.length);for(let t=0;t<e.length;t++)o[t]=e[t];for(let t=0;t<r.length;t++)o[e.length+t]=r[t];return o},Le=(e,r)=>({classGroupId:e,validator:r}),Ce=(e=new Map,r=null,o)=>({nextPart:e,validators:r,classGroupId:o}),Z="-",be=[],Ee="arbitrary..",Be=e=>{const r=Fe(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:t}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return _e(a);const u=a.split(Z),c=u[0]===""&&u.length>1?1:0;return Se(u,c,r)},getConflictingClassGroupIds:(a,u)=>{if(u){const c=t[a],f=o[a];return c?f?Ve(f,c):c:f||be}return o[a]||be}}},Se=(e,r,o)=>{if(e.length-r===0)return o.classGroupId;const l=e[r],i=o.nextPart.get(l);if(i){const f=Se(e,r+1,i);if(f)return f}const a=o.validators;if(a===null)return;const u=r===0?e.join(Z):e.slice(r).join(Z),c=a.length;for(let f=0;f<c;f++){const b=a[f];if(b.validator(u))return b.classGroupId}},_e=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=e.slice(1,-1),o=r.indexOf(":"),t=r.slice(0,o);return t?Ee+t:void 0})(),Fe=e=>{const{theme:r,classGroups:o}=e;return We(o,r)},We=(e,r)=>{const o=Ce();for(const t in e){const l=e[t];ae(l,o,t,r)}return o},ae=(e,r,o,t)=>{const l=e.length;for(let i=0;i<l;i++){const a=e[i];$e(a,r,o,t)}},$e=(e,r,o,t)=>{if(typeof e=="string"){Ue(e,r,o);return}if(typeof e=="function"){De(e,r,o,t);return}Ye(e,r,o,t)},Ue=(e,r,o)=>{const t=e===""?r:Ae(r,e);t.classGroupId=o},De=(e,r,o,t)=>{if(qe(e)){ae(e(t),r,o,t);return}r.validators===null&&(r.validators=[]),r.validators.push(Le(o,e))},Ye=(e,r,o,t)=>{const l=Object.entries(e),i=l.length;for(let a=0;a<i;a++){const[u,c]=l[a];ae(c,Ae(r,u),o,t)}},Ae=(e,r)=>{let o=e;const t=r.split(Z),l=t.length;for(let i=0;i<l;i++){const a=t[i];let u=o.nextPart.get(a);u||(u=Ce(),o.nextPart.set(a,u)),o=u}return o},qe=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Xe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,o=Object.create(null),t=Object.create(null);const l=(i,a)=>{o[i]=a,r++,r>e&&(r=0,t=o,o=Object.create(null))};return{get(i){let a=o[i];if(a!==void 0)return a;if((a=t[i])!==void 0)return l(i,a),a},set(i,a){i in o?o[i]=a:l(i,a)}}},se="!",ge=":",Je=[],he=(e,r,o,t,l)=>({modifiers:e,hasImportantModifier:r,baseClassName:o,maybePostfixModifierPosition:t,isExternal:l}),Ke=e=>{const{prefix:r,experimentalParseClassName:o}=e;let t=l=>{const i=[];let a=0,u=0,c=0,f;const b=l.length;for(let v=0;v<b;v++){const k=l[v];if(a===0&&u===0){if(k===ge){i.push(l.slice(c,v)),c=v+1;continue}if(k==="/"){f=v;continue}}k==="["?a++:k==="]"?a--:k==="("?u++:k===")"&&u--}const x=i.length===0?l:l.slice(c);let y=x,C=!1;x.endsWith(se)?(y=x.slice(0,-1),C=!0):x.startsWith(se)&&(y=x.slice(1),C=!0);const S=f&&f>c?f-c:void 0;return he(i,C,y,S)};if(r){const l=r+ge,i=t;t=a=>a.startsWith(l)?i(a.slice(l.length)):he(Je,!1,a,void 0,!0)}if(o){const l=t;t=i=>o({className:i,parseClassName:l})}return t},He=e=>{const r=new Map;return e.orderSensitiveModifiers.forEach((o,t)=>{r.set(o,1e6+t)}),o=>{const t=[];let l=[];for(let i=0;i<o.length;i++){const a=o[i],u=a[0]==="[",c=r.has(a);u||c?(l.length>0&&(l.sort(),t.push(...l),l=[]),t.push(a)):l.push(a)}return l.length>0&&(l.sort(),t.push(...l)),t}},Qe=e=>({cache:Xe(e.cacheSize),parseClassName:Ke(e),sortModifiers:He(e),...Be(e)}),Ze=/\s+/,eo=(e,r)=>{const{parseClassName:o,getClassGroupId:t,getConflictingClassGroupIds:l,sortModifiers:i}=r,a=[],u=e.trim().split(Ze);let c="";for(let f=u.length-1;f>=0;f-=1){const b=u[f],{isExternal:x,modifiers:y,hasImportantModifier:C,baseClassName:S,maybePostfixModifierPosition:v}=o(b);if(x){c=b+(c.length>0?" "+c:c);continue}let k=!!v,I=t(k?S.substring(0,v):S);if(!I){if(!k){c=b+(c.length>0?" "+c:c);continue}if(I=t(S),!I){c=b+(c.length>0?" "+c:c);continue}k=!1}const D=y.length===0?"":y.length===1?y[0]:i(y).join(":"),W=C?D+se:D,V=W+I;if(a.indexOf(V)>-1)continue;a.push(V);const L=l(I,k);for(let P=0;P<L.length;++P){const $=L[P];a.push(W+$)}c=b+(c.length>0?" "+c:c)}return c},oo=(...e)=>{let r=0,o,t,l="";for(;r<e.length;)(o=e[r++])&&(t=Re(o))&&(l&&(l+=" "),l+=t);return l},Re=e=>{if(typeof e=="string")return e;let r,o="";for(let t=0;t<e.length;t++)e[t]&&(r=Re(e[t]))&&(o&&(o+=" "),o+=r);return o},to=(e,...r)=>{let o,t,l,i;const a=c=>{const f=r.reduce((b,x)=>x(b),e());return o=Qe(f),t=o.cache.get,l=o.cache.set,i=u,u(c)},u=c=>{const f=t(c);if(f)return f;const b=eo(c,o);return l(c,b),b};return i=a,(...c)=>i(oo(...c))},ro=[],g=e=>{const r=o=>o[e]||ro;return r.isThemeGetter=!0,r},Ne=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,je=/^\((?:(\w[\w-]*):)?(.+)\)$/i,no=/^\d+\/\d+$/,so=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ao=/\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$/,lo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,io=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,co=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,B=e=>no.test(e),p=e=>!!e&&!Number.isNaN(Number(e)),M=e=>!!e&&Number.isInteger(Number(e)),re=e=>e.endsWith("%")&&p(e.slice(0,-1)),N=e=>so.test(e),mo=()=>!0,uo=e=>ao.test(e)&&!lo.test(e),Me=()=>!1,po=e=>io.test(e),fo=e=>co.test(e),bo=e=>!n(e)&&!s(e),go=e=>_(e,Pe,Me),n=e=>Ne.test(e),G=e=>_(e,Oe,uo),ne=e=>_(e,wo,p),xe=e=>_(e,Te,Me),ho=e=>_(e,Ie,fo),H=e=>_(e,Ge,po),s=e=>je.test(e),U=e=>F(e,Oe),xo=e=>F(e,vo),ye=e=>F(e,Te),yo=e=>F(e,Pe),ko=e=>F(e,Ie),Q=e=>F(e,Ge,!0),_=(e,r,o)=>{const t=Ne.exec(e);return t?t[1]?r(t[1]):o(t[2]):!1},F=(e,r,o=!1)=>{const t=je.exec(e);return t?t[1]?r(t[1]):o:!1},Te=e=>e==="position"||e==="percentage",Ie=e=>e==="image"||e==="url",Pe=e=>e==="length"||e==="size"||e==="bg-size",Oe=e=>e==="length",wo=e=>e==="number",vo=e=>e==="family-name",Ge=e=>e==="shadow",zo=()=>{const e=g("color"),r=g("font"),o=g("text"),t=g("font-weight"),l=g("tracking"),i=g("leading"),a=g("breakpoint"),u=g("container"),c=g("spacing"),f=g("radius"),b=g("shadow"),x=g("inset-shadow"),y=g("text-shadow"),C=g("drop-shadow"),S=g("blur"),v=g("perspective"),k=g("aspect"),I=g("ease"),D=g("animate"),W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...V(),s,n],P=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto","contain","none"],m=()=>[s,n,c],A=()=>[B,"full","auto",...m()],le=()=>[M,"none","subgrid",s,n],ie=()=>["auto",{span:["full",M,s,n]},M,s,n],Y=()=>[M,"auto",s,n],ce=()=>["auto","min","max","fr",s,n],ee=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],E=()=>["start","end","center","stretch","center-safe","end-safe"],R=()=>["auto",...m()],O=()=>[B,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...m()],d=()=>[e,s,n],de=()=>[...V(),ye,xe,{position:[s,n]}],me=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ue=()=>["auto","cover","contain",yo,go,{size:[s,n]}],oe=()=>[re,U,G],w=()=>["","none","full",f,s,n],z=()=>["",p,U,G],q=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],h=()=>[p,re,ye,xe],fe=()=>["","none",S,s,n],X=()=>["none",p,s,n],J=()=>["none",p,s,n],te=()=>[p,s,n],K=()=>[B,"full",...m()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[N],breakpoint:[N],color:[mo],container:[N],"drop-shadow":[N],ease:["in","out","in-out"],font:[bo],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[N],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[N],shadow:[N],spacing:["px",p],text:[N],"text-shadow":[N],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",B,n,s,k]}],container:["container"],columns:[{columns:[p,n,s,u]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:L()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[M,"auto",s,n]}],basis:[{basis:[B,"full","auto",u,...m()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[p,B,"auto","initial","none",n]}],grow:[{grow:["",p,s,n]}],shrink:[{shrink:["",p,s,n]}],order:[{order:[M,"first","last","none",s,n]}],"grid-cols":[{"grid-cols":le()}],"col-start-end":[{col:ie()}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":le()}],"row-start-end":[{row:ie()}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ce()}],"auto-rows":[{"auto-rows":ce()}],gap:[{gap:m()}],"gap-x":[{"gap-x":m()}],"gap-y":[{"gap-y":m()}],"justify-content":[{justify:[...ee(),"normal"]}],"justify-items":[{"justify-items":[...E(),"normal"]}],"justify-self":[{"justify-self":["auto",...E()]}],"align-content":[{content:["normal",...ee()]}],"align-items":[{items:[...E(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...E(),{baseline:["","last"]}]}],"place-content":[{"place-content":ee()}],"place-items":[{"place-items":[...E(),"baseline"]}],"place-self":[{"place-self":["auto",...E()]}],p:[{p:m()}],px:[{px:m()}],py:[{py:m()}],ps:[{ps:m()}],pe:[{pe:m()}],pt:[{pt:m()}],pr:[{pr:m()}],pb:[{pb:m()}],pl:[{pl:m()}],m:[{m:R()}],mx:[{mx:R()}],my:[{my:R()}],ms:[{ms:R()}],me:[{me:R()}],mt:[{mt:R()}],mr:[{mr:R()}],mb:[{mb:R()}],ml:[{ml:R()}],"space-x":[{"space-x":m()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":m()}],"space-y-reverse":["space-y-reverse"],size:[{size:O()}],w:[{w:[u,"screen",...O()]}],"min-w":[{"min-w":[u,"screen","none",...O()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[a]},...O()]}],h:[{h:["screen","lh",...O()]}],"min-h":[{"min-h":["screen","lh","none",...O()]}],"max-h":[{"max-h":["screen","lh",...O()]}],"font-size":[{text:["base",o,U,G]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[t,s,ne]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",re,n]}],"font-family":[{font:[xo,n,r]}],"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:[l,s,n]}],"line-clamp":[{"line-clamp":[p,"none",s,ne]}],leading:[{leading:[i,...m()]}],"list-image":[{"list-image":["none",s,n]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",s,n]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:d()}],"text-color":[{text:d()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:[p,"from-font","auto",s,G]}],"text-decoration-color":[{decoration:d()}],"underline-offset":[{"underline-offset":[p,"auto",s,n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:m()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",s,n]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",s,n]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:de()}],"bg-repeat":[{bg:me()}],"bg-size":[{bg:ue()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},M,s,n],radial:["",s,n],conic:[M,s,n]},ko,ho]}],"bg-color":[{bg:d()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:d()}],"gradient-via":[{via:d()}],"gradient-to":[{to:d()}],rounded:[{rounded:w()}],"rounded-s":[{"rounded-s":w()}],"rounded-e":[{"rounded-e":w()}],"rounded-t":[{"rounded-t":w()}],"rounded-r":[{"rounded-r":w()}],"rounded-b":[{"rounded-b":w()}],"rounded-l":[{"rounded-l":w()}],"rounded-ss":[{"rounded-ss":w()}],"rounded-se":[{"rounded-se":w()}],"rounded-ee":[{"rounded-ee":w()}],"rounded-es":[{"rounded-es":w()}],"rounded-tl":[{"rounded-tl":w()}],"rounded-tr":[{"rounded-tr":w()}],"rounded-br":[{"rounded-br":w()}],"rounded-bl":[{"rounded-bl":w()}],"border-w":[{border:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...q(),"hidden","none"]}],"divide-style":[{divide:[...q(),"hidden","none"]}],"border-color":[{border:d()}],"border-color-x":[{"border-x":d()}],"border-color-y":[{"border-y":d()}],"border-color-s":[{"border-s":d()}],"border-color-e":[{"border-e":d()}],"border-color-t":[{"border-t":d()}],"border-color-r":[{"border-r":d()}],"border-color-b":[{"border-b":d()}],"border-color-l":[{"border-l":d()}],"divide-color":[{divide:d()}],"outline-style":[{outline:[...q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[p,s,n]}],"outline-w":[{outline:["",p,U,G]}],"outline-color":[{outline:d()}],shadow:[{shadow:["","none",b,Q,H]}],"shadow-color":[{shadow:d()}],"inset-shadow":[{"inset-shadow":["none",x,Q,H]}],"inset-shadow-color":[{"inset-shadow":d()}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:d()}],"ring-offset-w":[{"ring-offset":[p,G]}],"ring-offset-color":[{"ring-offset":d()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":d()}],"text-shadow":[{"text-shadow":["none",y,Q,H]}],"text-shadow-color":[{"text-shadow":d()}],opacity:[{opacity:[p,s,n]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[p]}],"mask-image-linear-from-pos":[{"mask-linear-from":h()}],"mask-image-linear-to-pos":[{"mask-linear-to":h()}],"mask-image-linear-from-color":[{"mask-linear-from":d()}],"mask-image-linear-to-color":[{"mask-linear-to":d()}],"mask-image-t-from-pos":[{"mask-t-from":h()}],"mask-image-t-to-pos":[{"mask-t-to":h()}],"mask-image-t-from-color":[{"mask-t-from":d()}],"mask-image-t-to-color":[{"mask-t-to":d()}],"mask-image-r-from-pos":[{"mask-r-from":h()}],"mask-image-r-to-pos":[{"mask-r-to":h()}],"mask-image-r-from-color":[{"mask-r-from":d()}],"mask-image-r-to-color":[{"mask-r-to":d()}],"mask-image-b-from-pos":[{"mask-b-from":h()}],"mask-image-b-to-pos":[{"mask-b-to":h()}],"mask-image-b-from-color":[{"mask-b-from":d()}],"mask-image-b-to-color":[{"mask-b-to":d()}],"mask-image-l-from-pos":[{"mask-l-from":h()}],"mask-image-l-to-pos":[{"mask-l-to":h()}],"mask-image-l-from-color":[{"mask-l-from":d()}],"mask-image-l-to-color":[{"mask-l-to":d()}],"mask-image-x-from-pos":[{"mask-x-from":h()}],"mask-image-x-to-pos":[{"mask-x-to":h()}],"mask-image-x-from-color":[{"mask-x-from":d()}],"mask-image-x-to-color":[{"mask-x-to":d()}],"mask-image-y-from-pos":[{"mask-y-from":h()}],"mask-image-y-to-pos":[{"mask-y-to":h()}],"mask-image-y-from-color":[{"mask-y-from":d()}],"mask-image-y-to-color":[{"mask-y-to":d()}],"mask-image-radial":[{"mask-radial":[s,n]}],"mask-image-radial-from-pos":[{"mask-radial-from":h()}],"mask-image-radial-to-pos":[{"mask-radial-to":h()}],"mask-image-radial-from-color":[{"mask-radial-from":d()}],"mask-image-radial-to-color":[{"mask-radial-to":d()}],"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":V()}],"mask-image-conic-pos":[{"mask-conic":[p]}],"mask-image-conic-from-pos":[{"mask-conic-from":h()}],"mask-image-conic-to-pos":[{"mask-conic-to":h()}],"mask-image-conic-from-color":[{"mask-conic-from":d()}],"mask-image-conic-to-color":[{"mask-conic-to":d()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:de()}],"mask-repeat":[{mask:me()}],"mask-size":[{mask:ue()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",s,n]}],filter:[{filter:["","none",s,n]}],blur:[{blur:fe()}],brightness:[{brightness:[p,s,n]}],contrast:[{contrast:[p,s,n]}],"drop-shadow":[{"drop-shadow":["","none",C,Q,H]}],"drop-shadow-color":[{"drop-shadow":d()}],grayscale:[{grayscale:["",p,s,n]}],"hue-rotate":[{"hue-rotate":[p,s,n]}],invert:[{invert:["",p,s,n]}],saturate:[{saturate:[p,s,n]}],sepia:[{sepia:["",p,s,n]}],"backdrop-filter":[{"backdrop-filter":["","none",s,n]}],"backdrop-blur":[{"backdrop-blur":fe()}],"backdrop-brightness":[{"backdrop-brightness":[p,s,n]}],"backdrop-contrast":[{"backdrop-contrast":[p,s,n]}],"backdrop-grayscale":[{"backdrop-grayscale":["",p,s,n]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p,s,n]}],"backdrop-invert":[{"backdrop-invert":["",p,s,n]}],"backdrop-opacity":[{"backdrop-opacity":[p,s,n]}],"backdrop-saturate":[{"backdrop-saturate":[p,s,n]}],"backdrop-sepia":[{"backdrop-sepia":["",p,s,n]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":m()}],"border-spacing-x":[{"border-spacing-x":m()}],"border-spacing-y":[{"border-spacing-y":m()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",s,n]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[p,"initial",s,n]}],ease:[{ease:["linear","initial",I,s,n]}],delay:[{delay:[p,s,n]}],animate:[{animate:["none",D,s,n]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,s,n]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:X()}],"rotate-x":[{"rotate-x":X()}],"rotate-y":[{"rotate-y":X()}],"rotate-z":[{"rotate-z":X()}],scale:[{scale:J()}],"scale-x":[{"scale-x":J()}],"scale-y":[{"scale-y":J()}],"scale-z":[{"scale-z":J()}],"scale-3d":["scale-3d"],skew:[{skew:te()}],"skew-x":[{"skew-x":te()}],"skew-y":[{"skew-y":te()}],transform:[{transform:[s,n,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:K()}],"translate-x":[{"translate-x":K()}],"translate-y":[{"translate-y":K()}],"translate-z":[{"translate-z":K()}],"translate-none":["translate-none"],accent:[{accent:d()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:d()}],"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",s,n]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":m()}],"scroll-mx":[{"scroll-mx":m()}],"scroll-my":[{"scroll-my":m()}],"scroll-ms":[{"scroll-ms":m()}],"scroll-me":[{"scroll-me":m()}],"scroll-mt":[{"scroll-mt":m()}],"scroll-mr":[{"scroll-mr":m()}],"scroll-mb":[{"scroll-mb":m()}],"scroll-ml":[{"scroll-ml":m()}],"scroll-p":[{"scroll-p":m()}],"scroll-px":[{"scroll-px":m()}],"scroll-py":[{"scroll-py":m()}],"scroll-ps":[{"scroll-ps":m()}],"scroll-pe":[{"scroll-pe":m()}],"scroll-pt":[{"scroll-pt":m()}],"scroll-pr":[{"scroll-pr":m()}],"scroll-pb":[{"scroll-pb":m()}],"scroll-pl":[{"scroll-pl":m()}],"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",s,n]}],fill:[{fill:["none",...d()]}],"stroke-w":[{stroke:[p,U,G,ne]}],stroke:[{stroke:["none",...d()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},T=to(zo);function Co(...e){return T(ze(e))}function So({title:e,description:r,icon:o,className:t,button:l,textarea:i,...a}){const u={md:"font-medium text-sm font-inter",lg:"font-extrabold text-3xl leading-relaxed text-typography-title"};return j.jsxs("div",{className:"flex flex-row",children:[o&&j.jsx("div",{className:T("p-3 text-primary-base",t),children:o}),j.jsxs("div",{className:"flex flex-col",children:[e&&j.jsx("h2",{className:T(u.lg),children:e}),a.header&&j.jsx("h4",{className:T("",u.md),children:a.header}),r&&j.jsx("p",{className:T("text-sm font-inter text-typography-body ml-1",u.md),children:r})]})]})}const ke=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,we=ze,Ao=(e,r)=>o=>{var t;if((r==null?void 0:r.variants)==null)return we(e,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:l,defaultVariants:i}=r,a=Object.keys(l).map(f=>{const b=o==null?void 0:o[f],x=i==null?void 0:i[f];if(b===null)return null;const y=ke(b)||ke(x);return l[f][y]}),u=o&&Object.entries(o).reduce((f,b)=>{let[x,y]=b;return y===void 0||(f[x]=y),f},{}),c=r==null||(t=r.compoundVariants)===null||t===void 0?void 0:t.reduce((f,b)=>{let{class:x,className:y,...C}=b;return Object.entries(C).every(S=>{let[v,k]=S;return Array.isArray(k)?k.includes({...i,...u}[v]):{...i,...u}[v]===k})?[...f,x,y]:f},[]);return we(e,a,c,o==null?void 0:o.class,o==null?void 0:o.className)},Ro=Ao("button-config",{variants:{textColor:{primary:"text-darker",secondary:"text-fg",bright:"text-typography-ice"},backgroundType:{light:"bg-primary-base",dark:"bg-secondary-default"},textOnly:{primary:"flex flex-row items-center"},both:{primary:"flex flex-row items-center justify-center"},size:{primaryTextonly:"pl-4 pr-4 font-inter h-9 min-w-36",secondaryTextonly:"h-9 w-24",primaryBoth:"gap-2 h-9 min-w-44 pt-2 pb-2 pl-4 pr-4",secondaryBoth:"w-24 h-7"},fontSize:{small:"text-sm",medium:"text-md",large:"text-lg"},fontWeight:{medium:"font-normal",bold:"font-bold"},gap:{small:"gap-1",medium:"gap-2",large:"gap-3"}}});function No({icon:e,label:r,onClick:o,...t}){return j.jsxs("button",{onClick:o,className:T("rounded-md leading-none",t.className,Ro({textColor:t.textColor,backgroundType:t.backgroundType,both:t.both,size:t.size,textOnly:t.textOnly,fontSize:t.fontSize,gap:t.gap})),children:[e&&j.jsx("span",{className:T(t.iconClassName),children:e}),r&&j.jsx("span",{className:T(t.labelClassName),children:r})]})}exports.Button=No;exports.ContentBlock=So;exports.cn=Co;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),K=require("react"),Et=require("@radix-ui/react-slot"),dr=require("react-dom");function fr(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 l=fr(K),mr=fr(dr);function pr(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=pr(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function gr(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=pr(e))&&(r&&(r+=" "),r+=t);return r}const fs=(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},ms=(e,t)=>({classGroupId:e,validator:t}),hr=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),vt="-",On=[],ps="arbitrary..",gs=e=>{const t=vs(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return hs(i);const a=i.split(vt),u=a[0]===""&&a.length>1?1:0;return vr(a,u,t)},getConflictingClassGroupIds:(i,a)=>{if(a){const u=r[i],c=n[i];return u?c?fs(c,u):u:c||On}return n[i]||On}}},vr=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const c=vr(e,t+1,s);if(c)return c}const i=n.validators;if(i===null)return;const a=t===0?e.join(vt):e.slice(t).join(vt),u=i.length;for(let c=0;c<u;c++){const d=i[c];if(d.validator(a))return d.classGroupId}},hs=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?ps+r:void 0})(),vs=e=>{const{theme:t,classGroups:n}=e;return bs(n,t)},bs=(e,t)=>{const n=hr();for(const r in e){const o=e[r];an(o,n,r,t)}return n},an=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const i=e[s];ys(i,t,n,r)}},ys=(e,t,n,r)=>{if(typeof e=="string"){xs(e,t,n);return}if(typeof e=="function"){ws(e,t,n,r);return}Cs(e,t,n,r)},xs=(e,t,n)=>{const r=e===""?t:br(t,e);r.classGroupId=n},ws=(e,t,n,r)=>{if(Es(e)){an(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(ms(n,e))},Cs=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let i=0;i<s;i++){const[a,u]=o[i];an(u,br(t,a),n,r)}},br=(e,t)=>{let n=e;const r=t.split(vt),o=r.length;for(let s=0;s<o;s++){const i=r[s];let a=n.nextPart.get(i);a||(a=hr(),n.nextPart.set(i,a)),n=a}return n},Es=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Ss=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,i)=>{n[s]=i,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let i=n[s];if(i!==void 0)return i;if((i=r[s])!==void 0)return o(s,i),i},set(s,i){s in n?n[s]=i:o(s,i)}}},Zt="!",Mn=":",ks=[],jn=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),As=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,a=0,u=0,c;const d=o.length;for(let g=0;g<d;g++){const b=o[g];if(i===0&&a===0){if(b===Mn){s.push(o.slice(u,g)),u=g+1;continue}if(b==="/"){c=g;continue}}b==="["?i++:b==="]"?i--:b==="("?a++:b===")"&&a--}const f=s.length===0?o:o.slice(u);let m=f,h=!1;f.endsWith(Zt)?(m=f.slice(0,-1),h=!0):f.startsWith(Zt)&&(m=f.slice(1),h=!0);const v=c&&c>u?c-u:void 0;return jn(s,h,m,v)};if(t){const o=t+Mn,s=r;r=i=>i.startsWith(o)?s(i.slice(o.length)):jn(ks,!1,i,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},Rs=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 i=n[s],a=i[0]==="[",u=t.has(i);a||u?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(i)):o.push(i)}return o.length>0&&(o.sort(),r.push(...o)),r}},Ps=e=>({cache:Ss(e.cacheSize),parseClassName:As(e),sortModifiers:Rs(e),...gs(e)}),Ns=/\s+/,Os=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(Ns);let u="";for(let c=a.length-1;c>=0;c-=1){const d=a[c],{isExternal:f,modifiers:m,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:g}=n(d);if(f){u=d+(u.length>0?" "+u:u);continue}let b=!!g,y=r(b?v.substring(0,g):v);if(!y){if(!b){u=d+(u.length>0?" "+u:u);continue}if(y=r(v),!y){u=d+(u.length>0?" "+u:u);continue}b=!1}const A=m.length===0?"":m.length===1?m[0]:s(m).join(":"),w=h?A+Zt:A,E=w+y;if(i.indexOf(E)>-1)continue;i.push(E);const S=o(y,b);for(let P=0;P<S.length;++P){const k=S[P];i.push(w+k)}u=d+(u.length>0?" "+u:u)}return u},Ms=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=yr(n))&&(o&&(o+=" "),o+=r);return o},yr=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=yr(e[r]))&&(n&&(n+=" "),n+=t);return n},js=(e,...t)=>{let n,r,o,s;const i=u=>{const c=t.reduce((d,f)=>f(d),e());return n=Ps(c),r=n.cache.get,o=n.cache.set,s=a,a(u)},a=u=>{const c=r(u);if(c)return c;const d=Os(u,n);return o(u,d),d};return s=i,(...u)=>s(Ms(...u))},Ts=[],q=e=>{const t=n=>n[e]||Ts;return t.isThemeGetter=!0,t},xr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,wr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ds=/^\d+\/\d+$/,Is=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_s=/\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$/,Ls=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Fs=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zs=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Te=e=>Ds.test(e),I=e=>!!e&&!Number.isNaN(Number(e)),xe=e=>!!e&&Number.isInteger(Number(e)),Tt=e=>e.endsWith("%")&&I(e.slice(0,-1)),ve=e=>Is.test(e),Vs=()=>!0,$s=e=>_s.test(e)&&!Ls.test(e),Cr=()=>!1,Ws=e=>Fs.test(e),Bs=e=>zs.test(e),Hs=e=>!N(e)&&!O(e),Us=e=>Ue(e,kr,Cr),N=e=>xr.test(e),Pe=e=>Ue(e,Ar,$s),Dt=e=>Ue(e,Xs,I),Tn=e=>Ue(e,Er,Cr),Gs=e=>Ue(e,Sr,Bs),it=e=>Ue(e,Rr,Ws),O=e=>wr.test(e),qe=e=>Ge(e,Ar),Zs=e=>Ge(e,qs),Dn=e=>Ge(e,Er),Ys=e=>Ge(e,kr),Ks=e=>Ge(e,Sr),at=e=>Ge(e,Rr,!0),Ue=(e,t,n)=>{const r=xr.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Ge=(e,t,n=!1)=>{const r=wr.exec(e);return r?r[1]?t(r[1]):n:!1},Er=e=>e==="position"||e==="percentage",Sr=e=>e==="image"||e==="url",kr=e=>e==="length"||e==="size"||e==="bg-size",Ar=e=>e==="length",Xs=e=>e==="number",qs=e=>e==="family-name",Rr=e=>e==="shadow",Qs=()=>{const e=q("color"),t=q("font"),n=q("text"),r=q("font-weight"),o=q("tracking"),s=q("leading"),i=q("breakpoint"),a=q("container"),u=q("spacing"),c=q("radius"),d=q("shadow"),f=q("inset-shadow"),m=q("text-shadow"),h=q("drop-shadow"),v=q("blur"),g=q("perspective"),b=q("aspect"),y=q("ease"),A=q("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...E(),O,N],P=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],R=()=>[O,N,u],_=()=>[Te,"full","auto",...R()],V=()=>[xe,"none","subgrid",O,N],W=()=>["auto",{span:["full",xe,O,N]},xe,O,N],B=()=>[xe,"auto",O,N],U=()=>["auto","min","max","fr",O,N],F=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],H=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...R()],$=()=>[Te,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],C=()=>[e,O,N],Z=()=>[...E(),Dn,Tn,{position:[O,N]}],J=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ue=()=>["auto","cover","contain",Ys,Us,{size:[O,N]}],x=()=>[Tt,qe,Pe],M=()=>["","none","full",c,O,N],T=()=>["",I,qe,Pe],j=()=>["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"],D=()=>[I,Tt,Dn,Tn],X=()=>["","none",v,O,N],G=()=>["none",I,O,N],se=()=>["none",I,O,N],je=()=>[I,O,N],Re=()=>[Te,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ve],breakpoint:[ve],color:[Vs],container:[ve],"drop-shadow":[ve],ease:["in","out","in-out"],font:[Hs],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ve],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ve],shadow:[ve],spacing:["px",I],text:[ve],"text-shadow":[ve],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Te,N,O,b]}],container:["container"],columns:[{columns:[I,N,O,a]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:_()}],"inset-x":[{"inset-x":_()}],"inset-y":[{"inset-y":_()}],start:[{start:_()}],end:[{end:_()}],top:[{top:_()}],right:[{right:_()}],bottom:[{bottom:_()}],left:[{left:_()}],visibility:["visible","invisible","collapse"],z:[{z:[xe,"auto",O,N]}],basis:[{basis:[Te,"full","auto",a,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[I,Te,"auto","initial","none",N]}],grow:[{grow:["",I,O,N]}],shrink:[{shrink:["",I,O,N]}],order:[{order:[xe,"first","last","none",O,N]}],"grid-cols":[{"grid-cols":V()}],"col-start-end":[{col:W()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":V()}],"row-start-end":[{row:W()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...F(),"normal"]}],"justify-items":[{"justify-items":[...H(),"normal"]}],"justify-self":[{"justify-self":["auto",...H()]}],"align-content":[{content:["normal",...F()]}],"align-items":[{items:[...H(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...H(),{baseline:["","last"]}]}],"place-content":[{"place-content":F()}],"place-items":[{"place-items":[...H(),"baseline"]}],"place-self":[{"place-self":["auto",...H()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],w:[{w:[a,"screen",...$()]}],"min-w":[{"min-w":[a,"screen","none",...$()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",n,qe,Pe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,O,Dt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Tt,N]}],"font-family":[{font:[Zs,N,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,O,N]}],"line-clamp":[{"line-clamp":[I,"none",O,Dt]}],leading:[{leading:[s,...R()]}],"list-image":[{"list-image":["none",O,N]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",O,N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...j(),"wavy"]}],"text-decoration-thickness":[{decoration:[I,"from-font","auto",O,Pe]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[I,"auto",O,N]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",O,N]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",O,N]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Z()}],"bg-repeat":[{bg:J()}],"bg-size":[{bg:ue()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},xe,O,N],radial:["",O,N],conic:[xe,O,N]},Ks,Gs]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:x()}],"gradient-via-pos":[{via:x()}],"gradient-to-pos":[{to:x()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:M()}],"rounded-s":[{"rounded-s":M()}],"rounded-e":[{"rounded-e":M()}],"rounded-t":[{"rounded-t":M()}],"rounded-r":[{"rounded-r":M()}],"rounded-b":[{"rounded-b":M()}],"rounded-l":[{"rounded-l":M()}],"rounded-ss":[{"rounded-ss":M()}],"rounded-se":[{"rounded-se":M()}],"rounded-ee":[{"rounded-ee":M()}],"rounded-es":[{"rounded-es":M()}],"rounded-tl":[{"rounded-tl":M()}],"rounded-tr":[{"rounded-tr":M()}],"rounded-br":[{"rounded-br":M()}],"rounded-bl":[{"rounded-bl":M()}],"border-w":[{border:T()}],"border-w-x":[{"border-x":T()}],"border-w-y":[{"border-y":T()}],"border-w-s":[{"border-s":T()}],"border-w-e":[{"border-e":T()}],"border-w-t":[{"border-t":T()}],"border-w-r":[{"border-r":T()}],"border-w-b":[{"border-b":T()}],"border-w-l":[{"border-l":T()}],"divide-x":[{"divide-x":T()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":T()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...j(),"hidden","none"]}],"divide-style":[{divide:[...j(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...j(),"none","hidden"]}],"outline-offset":[{"outline-offset":[I,O,N]}],"outline-w":[{outline:["",I,qe,Pe]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",d,at,it]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",f,at,it]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:T()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[I,Pe]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":T()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",m,at,it]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[I,O,N]}],"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":[I]}],"mask-image-linear-from-pos":[{"mask-linear-from":D()}],"mask-image-linear-to-pos":[{"mask-linear-to":D()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":D()}],"mask-image-t-to-pos":[{"mask-t-to":D()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":D()}],"mask-image-r-to-pos":[{"mask-r-to":D()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":D()}],"mask-image-b-to-pos":[{"mask-b-to":D()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":D()}],"mask-image-l-to-pos":[{"mask-l-to":D()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":D()}],"mask-image-x-to-pos":[{"mask-x-to":D()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":D()}],"mask-image-y-to-pos":[{"mask-y-to":D()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[O,N]}],"mask-image-radial-from-pos":[{"mask-radial-from":D()}],"mask-image-radial-to-pos":[{"mask-radial-to":D()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"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":E()}],"mask-image-conic-pos":[{"mask-conic":[I]}],"mask-image-conic-from-pos":[{"mask-conic-from":D()}],"mask-image-conic-to-pos":[{"mask-conic-to":D()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Z()}],"mask-repeat":[{mask:J()}],"mask-size":[{mask:ue()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",O,N]}],filter:[{filter:["","none",O,N]}],blur:[{blur:X()}],brightness:[{brightness:[I,O,N]}],contrast:[{contrast:[I,O,N]}],"drop-shadow":[{"drop-shadow":["","none",h,at,it]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",I,O,N]}],"hue-rotate":[{"hue-rotate":[I,O,N]}],invert:[{invert:["",I,O,N]}],saturate:[{saturate:[I,O,N]}],sepia:[{sepia:["",I,O,N]}],"backdrop-filter":[{"backdrop-filter":["","none",O,N]}],"backdrop-blur":[{"backdrop-blur":X()}],"backdrop-brightness":[{"backdrop-brightness":[I,O,N]}],"backdrop-contrast":[{"backdrop-contrast":[I,O,N]}],"backdrop-grayscale":[{"backdrop-grayscale":["",I,O,N]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[I,O,N]}],"backdrop-invert":[{"backdrop-invert":["",I,O,N]}],"backdrop-opacity":[{"backdrop-opacity":[I,O,N]}],"backdrop-saturate":[{"backdrop-saturate":[I,O,N]}],"backdrop-sepia":[{"backdrop-sepia":["",I,O,N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",O,N]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[I,"initial",O,N]}],ease:[{ease:["linear","initial",y,O,N]}],delay:[{delay:[I,O,N]}],animate:[{animate:["none",A,O,N]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,O,N]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:G()}],"rotate-x":[{"rotate-x":G()}],"rotate-y":[{"rotate-y":G()}],"rotate-z":[{"rotate-z":G()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":["scale-3d"],skew:[{skew:je()}],"skew-x":[{"skew-x":je()}],"skew-y":[{"skew-y":je()}],transform:[{transform:[O,N,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"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:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",O,N]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",O,N]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[I,qe,Pe,Dt]}],stroke:[{stroke:["none",...C()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},ne=js(Qs);function Q(...e){return ne(gr(e))}function Js({title:e,description:t,icon:n,className:r,button:o,textarea:s,...i}){const a={md:"font-medium text-sm font-inter",lg:"font-extrabold text-3xl leading-relaxed text-typography-title"};return p.jsxs("div",{className:"flex flex-row",children:[n&&p.jsx("div",{className:ne("p-3 text-primary-base",r),children:n}),p.jsxs("div",{className:"flex flex-col",children:[e&&p.jsx("h2",{className:ne(a.lg),children:e}),i.header&&p.jsx("h4",{className:ne("",a.md),children:i.header}),t&&p.jsx("p",{className:ne("text-sm font-inter text-typography-body ml-1",a.md),children:t})]})]})}const In=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,_n=gr,tt=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return _n(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(c=>{const d=n==null?void 0:n[c],f=s==null?void 0:s[c];if(d===null)return null;const m=In(d)||In(f);return o[c][m]}),a=n&&Object.entries(n).reduce((c,d)=>{let[f,m]=d;return m===void 0||(c[f]=m),c},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:f,className:m,...h}=d;return Object.entries(h).every(v=>{let[g,b]=v;return Array.isArray(b)?b.includes({...s,...a}[g]):{...s,...a}[g]===b})?[...c,f,m]:c},[]);return _n(e,i,u,n==null?void 0:n.class,n==null?void 0:n.className)},ei=tt("button-config",{variants:{textColor:{primary:"text-darker",secondary:"text-fg",bright:"text-typography-ice"},backgroundType:{light:"bg-primary-base",dark:"bg-secondary-default"},textOnly:{primary:"flex flex-row items-center"},both:{primary:"flex flex-row items-center justify-center"},size:{primaryTextonly:"pl-4 pr-4 font-inter h-9 min-w-36",secondaryTextonly:"h-9 w-24",primaryBoth:"gap-2 h-9 min-w-44 pt-2 pb-2 pl-4 pr-4",secondaryBoth:"w-24 h-7"},fontSize:{small:"text-sm",medium:"text-md",large:"text-lg"},fontWeight:{medium:"font-normal",bold:"font-bold"},gap:{small:"gap-1",medium:"gap-2",large:"gap-3"}}});function Pr({icon:e,label:t,onClick:n,...r}){return p.jsxs("button",{onClick:n,className:ne("rounded-md leading-none",r.className,ei({textColor:r.textColor,backgroundType:r.backgroundType,both:r.both,size:r.size,textOnly:r.textOnly,fontSize:r.fontSize,gap:r.gap})),children:[e&&p.jsx("span",{className:ne(r.iconClassName),children:e}),t&&p.jsx("span",{className:ne(r.labelClassName),children:t})]})}const ti=tt("flex flex-row items-center justify-center rounded-full font-medium font-family-lato pt-0.25 pt-2 pb-1 pl-2 gap-1 min-w-16 min-h-5 text-caption-semibold",{variants:{variant:{default:"border-transparent bg-gray-700 font-family-lato text-primary-foreground <min-w-16></min-w-16> h-5 pt-0.5 pr-2 pb-1 pl-2 gap-0.5",prospect:"border-transparent bg-green-soft text-glowing-green dark:bg-green-950 dark:text-green-300 minw-16 h-5 pt-0.5 pr-2 pb-1 pl-2 gap-0.5",buyer:"border-transparent bg-badge-buyer text-typography-glowingPurple min-w-16 h-5 pt-0.5 pr-2 pb-1 pl-2 gap-0.5",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80 w-16 h-5 pt-0.5 pr-2 pb-0.5 pl-2 gap-0.5",standby:"border-transparent bg-badge-standby text-typography-glowingYellow min-w-16 h-5 pt-0.5 pr-2 pb-1 pl-2 gap-0.5",active:"bg-blue-soft border-transparent text-glowing-blue min-w-16 h-5 pt-0.5 pr-2 pb-1 pl-2 gap-0.5",lost:"border-transparent bg-red-soft text-glowing-red min-w-16 h-5 pt-0.5 pr-2 pb-1 pl-2 gap-0.5 ",outline:"text-foreground",multiSelect:"bg-badge-secondary border-transparent font-family-lato text-primary-foreground <min-w-16></min-w-16> h-5 pt-0.5 pr-2 pb-1 pl-2 gap-0.5"}},defaultVariants:{variant:"default"}});function Yt({className:e,variant:t,reference:n,...r}){return p.jsx("div",{ref:n,className:Q(ti({variant:t}),e),...r})}function Kt({value:e,className:t,variant:n,justify:r}){return p.jsx("div",{className:`flex w-full flex-wrap gap-2 justify-${r}`,children:p.jsx(Yt,{variant:n,className:t,children:e})})}const ni=tt("user-profile-config",{variants:{rounded:{yes:"rounded-full",no:"rounded"},fontWeight:{normal:"font-normal",medium:"font-md"}}});function Xt({icon:e,username:t,...n}){return p.jsxs("div",{className:ne("flex flex-row items-center gap-2 pr-3 pl-3 text-typography-ice"),children:[p.jsx("img",{className:ne("w-5 h-5",ni({rounded:n.rounded})),src:e,alt:"user photo"}),p.jsx("span",{className:ne("font-inter, text-small",n.fontWeight,n.classname),children:t})]})}const ri=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),l.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z"}))]]),oi=K.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),Nr=l.forwardRef((e,t)=>{const{alt:n,color:r,size:o,weight:s,mirrored:i,children:a,weights:u,...c}=e,{color:d="currentColor",size:f,weight:m="regular",mirrored:h=!1,...v}=l.useContext(oi);return l.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:o??f,height:o??f,fill:r??d,viewBox:"0 0 256 256",transform:i||h?"scale(-1, 1)":void 0,...v,...c},!!n&&l.createElement("title",null,n),a,u.get(s??m))});Nr.displayName="IconBase";const Or=l.forwardRef((e,t)=>l.createElement(Nr,{ref:t,...e,weights:ri}));Or.displayName="TrashIcon";function si({headers:e,rows:t,className:n,...r}){const o=["default","prospect","buyer","secondary","standby","active","lost","outline","multiSelect"];return p.jsx("div",{className:"overflow-x-auto",children:p.jsxs("table",{className:"table-fixed border-collapse",children:[p.jsx("thead",{className:"bg-secondary-table text-typography-table-header",children:p.jsx("tr",{className:"",children:e.map((s,i)=>s===r.stickyColumn?p.jsx("th",{className:"bg-secondary-table sticky right-0 z-20 border-b-2 shadow-[-8px_0_12px_-4px_rgba(0,0,0,0.3)] border-table-line pl-2 pr-2 text-left w-44 h-9 font-medium text-xs",children:s},i):p.jsx("th",{className:"border-r-2 border-b-2 border-table-line pl-2 pr-2 text-left w-44 h-9 font-medium text-xs",children:s},i))})}),p.jsx("tbody",{children:t.map((s,i)=>p.jsx("tr",{children:Object.values(s).map((a,u)=>p.jsx("td",{className:`border-r-2 border-b-2 border-table-line bg-primary-container pl-3 pr-3 h-11 ${u===e.length-1?"shadow-[-8px_0_12px_-4px_rgba(0,0,0,0.3)] z-10 sticky right-0 border-r-2 border-b-2 border-table-line bg-primary-container pl-3 pr-3 h-11":""}`,children:u==0||u==6?u==0?p.jsx(Xt,{icon:a.icon,username:a.name,rounded:"no",fontWeight:"normal",classname:"text-xs"},a.id):p.jsx(Xt,{icon:a.icon,username:a.name,rounded:"yes",fontWeight:"medium",classname:"text-xs"},a.id):u==5?p.jsx("span",{className:"flex flex-row items-center justify-between gap-1",children:a.map((c,d)=>p.jsx(p.Fragment,{children:p.jsx(Kt,{value:c,variant:"default"},d)}))}):u===e.length-1?p.jsx("div",{className:"border border-table-line rounded-sm w-24 lex flex-row justify-center items-center ",children:p.jsx(Pr,{icon:p.jsx(Or,{size:16}),label:"Delete",onClick:()=>{var c;return(c=r.handleDelete)==null?void 0:c.call(r,s.cnpj)},backgroundType:"dark",textColor:"bright",size:"secondaryBoth",both:"primary",fontSize:"small",gap:"medium"})}):p.jsx("span",{className:"h-full",children:p.jsx(Kt,{value:a,variant:o.includes(a.toLowerCase().replace(/\s+/g,""))?a.toLowerCase().replace(/\s+/g,""):"default"})})},u))},i))}),p.jsx("tfoot",{})]})})}/**
|
|
2
|
+
* @license lucide-react v0.562.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const ii=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ai=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Ln=e=>{const t=ai(e);return t.charAt(0).toUpperCase()+t.slice(1)},Mr=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),li=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
7
|
+
* @license lucide-react v0.562.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/var ci={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
12
|
+
* @license lucide-react v0.562.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const ui=K.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},u)=>K.createElement("svg",{ref:u,...ci,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Mr("lucide",o),...!s&&!li(a)&&{"aria-hidden":"true"},...a},[...i.map(([c,d])=>K.createElement(c,d)),...Array.isArray(s)?s:[s]]));/**
|
|
17
|
+
* @license lucide-react v0.562.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const St=(e,t)=>{const n=K.forwardRef(({className:r,...o},s)=>K.createElement(ui,{ref:s,iconNode:t,className:Mr(`lucide-${ii(Ln(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Ln(e),n};/**
|
|
22
|
+
* @license lucide-react v0.562.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/const di=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],fi=St("check",di);/**
|
|
27
|
+
* @license lucide-react v0.562.0 - ISC
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the ISC license.
|
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/const mi=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],pi=St("chevrons-up-down",mi);/**
|
|
32
|
+
* @license lucide-react v0.562.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/const gi=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],hi=St("search",gi);/**
|
|
37
|
+
* @license lucide-react v0.562.0 - ISC
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the ISC license.
|
|
40
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/const vi=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],jr=St("x",vi),bi=tt("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Tr=l.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const i=r?Et.Slot:"button";return p.jsx(i,{className:Q(bi({variant:t,size:n,className:e})),ref:s,...o})});Tr.displayName="Button";var Fn=1,yi=.9,xi=.8,wi=.17,It=.1,_t=.999,Ci=.9999,Ei=.99,Si=/[\\\/_+.#"@\[\(\{&]/,ki=/[\\\/_+.#"@\[\(\{&]/g,Ai=/[\s-]/,Dr=/[\s-]/g;function qt(e,t,n,r,o,s,i){if(s===t.length)return o===e.length?Fn:Ei;var a=`${o},${s}`;if(i[a]!==void 0)return i[a];for(var u=r.charAt(s),c=n.indexOf(u,o),d=0,f,m,h,v;c>=0;)f=qt(e,t,n,r,c+1,s+1,i),f>d&&(c===o?f*=Fn:Si.test(e.charAt(c-1))?(f*=xi,h=e.slice(o,c-1).match(ki),h&&o>0&&(f*=Math.pow(_t,h.length))):Ai.test(e.charAt(c-1))?(f*=yi,v=e.slice(o,c-1).match(Dr),v&&o>0&&(f*=Math.pow(_t,v.length))):(f*=wi,o>0&&(f*=Math.pow(_t,c-o))),e.charAt(c)!==t.charAt(s)&&(f*=Ci)),(f<It&&n.charAt(c-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(c-1)!==r.charAt(s))&&(m=qt(e,t,n,r,c+1,s+2,i),m*It>f&&(f=m*It)),f>d&&(d=f),c=n.indexOf(u,c+1);return i[a]=d,d}function zn(e){return e.toLowerCase().replace(Dr," ")}function Ri(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,qt(e,t,zn(e),zn(t),0,0,{})}function re(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Vn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function $e(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Vn(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():Vn(e[o],null)}}}}function le(...e){return l.useCallback($e(...e),e)}function Pi(e,t){const n=l.createContext(t),r=s=>{const{children:i,...a}=s,u=l.useMemo(()=>a,Object.values(a));return p.jsx(n.Provider,{value:u,children:i})};r.displayName=e+"Provider";function o(s){const i=l.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function ln(e,t=[]){let n=[];function r(s,i){const a=l.createContext(i),u=n.length;n=[...n,i];const c=f=>{var y;const{scope:m,children:h,...v}=f,g=((y=m==null?void 0:m[e])==null?void 0:y[u])||a,b=l.useMemo(()=>v,Object.values(v));return p.jsx(g.Provider,{value:b,children:h})};c.displayName=s+"Provider";function d(f,m){var g;const h=((g=m==null?void 0:m[e])==null?void 0:g[u])||a,v=l.useContext(h);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[c,d]}const o=()=>{const s=n.map(i=>l.createContext(i));return function(a){const u=(a==null?void 0:a[e])||s;return l.useMemo(()=>({[`__scope${e}`]:{...a,[e]:u}}),[a,u])}};return o.scopeName=e,[r,Ni(o,...t)]}function Ni(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:u,scopeName:c})=>{const f=u(s)[`__scope${c}`];return{...a,...f}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Ce=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},Oi=l[" useId ".trim().toString()]||(()=>{}),Mi=0;function me(e){const[t,n]=l.useState(Oi());return Ce(()=>{n(r=>r??String(Mi++))},[e]),t?`radix-${t}`:""}var ji=l[" useInsertionEffect ".trim().toString()]||Ce;function Ir({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=Ti({defaultProp:t,onChange:n}),a=e!==void 0,u=a?e:o;{const d=l.useRef(e!==void 0);l.useEffect(()=>{const f=d.current;f!==a&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,r])}const c=l.useCallback(d=>{var f;if(a){const m=Di(d)?d(e):d;m!==e&&((f=i.current)==null||f.call(i,m))}else s(d)},[a,e,s,i]);return[u,c]}function Ti({defaultProp:e,onChange:t}){const[n,r]=l.useState(e),o=l.useRef(n),s=l.useRef(t);return ji(()=>{s.current=t},[t]),l.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}function Di(e){return typeof e=="function"}var Ii=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Y=Ii.reduce((e,t)=>{const n=Et.createSlot(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...a}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(u,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function _i(e,t){e&&mr.flushSync(()=>e.dispatchEvent(t))}function We(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Li(e,t=globalThis==null?void 0:globalThis.document){const n=We(e);l.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 Fi="DismissableLayer",Qt="dismissableLayer.update",zi="dismissableLayer.pointerDownOutside",Vi="dismissableLayer.focusOutside",$n,_r=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),cn=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...u}=e,c=l.useContext(_r),[d,f]=l.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=l.useState({}),v=le(t,k=>f(k)),g=Array.from(c.layers),[b]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(b),A=d?g.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,E=A>=y,S=Bi(k=>{const R=k.target,_=[...c.branches].some(V=>V.contains(R));!E||_||(o==null||o(k),i==null||i(k),k.defaultPrevented||a==null||a())},m),P=Hi(k=>{const R=k.target;[...c.branches].some(V=>V.contains(R))||(s==null||s(k),i==null||i(k),k.defaultPrevented||a==null||a())},m);return Li(k=>{A===c.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},m),l.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&($n=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),Wn(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=$n)}},[d,m,n,c]),l.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),Wn())},[d,c]),l.useEffect(()=>{const k=()=>h({});return document.addEventListener(Qt,k),()=>document.removeEventListener(Qt,k)},[]),p.jsx(Y.div,{...u,ref:v,style:{pointerEvents:w?E?"auto":"none":void 0,...e.style},onFocusCapture:re(e.onFocusCapture,P.onFocusCapture),onBlurCapture:re(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:re(e.onPointerDownCapture,S.onPointerDownCapture)})});cn.displayName=Fi;var $i="DismissableLayerBranch",Wi=l.forwardRef((e,t)=>{const n=l.useContext(_r),r=l.useRef(null),o=le(t,r);return l.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(Y.div,{...e,ref:o})});Wi.displayName=$i;function Bi(e,t=globalThis==null?void 0:globalThis.document){const n=We(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let u=function(){Lr(zi,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Hi(e,t=globalThis==null?void 0:globalThis.document){const n=We(e),r=l.useRef(!1);return l.useEffect(()=>{const o=s=>{s.target&&!r.current&&Lr(Vi,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 Wn(){const e=new CustomEvent(Qt);document.dispatchEvent(e)}function Lr(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?_i(o,s):o.dispatchEvent(s)}var Lt="focusScope.autoFocusOnMount",Ft="focusScope.autoFocusOnUnmount",Bn={bubbles:!1,cancelable:!0},Ui="FocusScope",un=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,u]=l.useState(null),c=We(o),d=We(s),f=l.useRef(null),m=le(t,g=>u(g)),h=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let g=function(w){if(h.paused||!a)return;const E=w.target;a.contains(E)?f.current=E:we(f.current,{select:!0})},b=function(w){if(h.paused||!a)return;const E=w.relatedTarget;E!==null&&(a.contains(E)||we(f.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const S of w)S.removedNodes.length>0&&we(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",b);const A=new MutationObserver(y);return a&&A.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",b),A.disconnect()}}},[r,a,h.paused]),l.useEffect(()=>{if(a){Un.add(h);const g=document.activeElement;if(!a.contains(g)){const y=new CustomEvent(Lt,Bn);a.addEventListener(Lt,c),a.dispatchEvent(y),y.defaultPrevented||(Gi(qi(Fr(a)),{select:!0}),document.activeElement===g&&we(a))}return()=>{a.removeEventListener(Lt,c),setTimeout(()=>{const y=new CustomEvent(Ft,Bn);a.addEventListener(Ft,d),a.dispatchEvent(y),y.defaultPrevented||we(g??document.body,{select:!0}),a.removeEventListener(Ft,d),Un.remove(h)},0)}}},[a,c,d,h]);const v=l.useCallback(g=>{if(!n&&!r||h.paused)return;const b=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(b&&y){const A=g.currentTarget,[w,E]=Zi(A);w&&E?!g.shiftKey&&y===E?(g.preventDefault(),n&&we(w,{select:!0})):g.shiftKey&&y===w&&(g.preventDefault(),n&&we(E,{select:!0})):y===A&&g.preventDefault()}},[n,r,h.paused]);return p.jsx(Y.div,{tabIndex:-1,...i,ref:m,onKeyDown:v})});un.displayName=Ui;function Gi(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(we(r,{select:t}),document.activeElement!==n)return}function Zi(e){const t=Fr(e),n=Hn(t,e),r=Hn(t.reverse(),e);return[n,r]}function Fr(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 Hn(e,t){for(const n of e)if(!Yi(n,{upTo:t}))return n}function Yi(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 Ki(e){return e instanceof HTMLInputElement&&"select"in e}function we(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ki(e)&&t&&e.select()}}var Un=Xi();function Xi(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Gn(e,t),e.unshift(t)},remove(t){var n;e=Gn(e,t),(n=e[0])==null||n.resume()}}}function Gn(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function qi(e){return e.filter(t=>t.tagName!=="A")}var Qi="Portal",dn=l.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=l.useState(!1);Ce(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?dr.createPortal(p.jsx(Y.div,{...r,ref:t}),i):null});dn.displayName=Qi;function Ji(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Ze=e=>{const{present:t,children:n}=e,r=ea(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),s=le(r.ref,ta(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:s}):null};Ze.displayName="Presence";function ea(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),s=l.useRef("none"),i=e?"mounted":"unmounted",[a,u]=Ji(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const c=lt(r.current);s.current=a==="mounted"?c:"none"},[a]),Ce(()=>{const c=r.current,d=o.current;if(d!==e){const m=s.current,h=lt(c);e?u("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(d&&m!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Ce(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,f=h=>{const g=lt(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&g&&(u("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},m=h=>{h.target===t&&(s.current=lt(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:l.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function lt(e){return(e==null?void 0:e.animationName)||"none"}function ta(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var zt=0;function zr(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Zn()),document.body.insertAdjacentElement("beforeend",e[1]??Zn()),zt++,()=>{zt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),zt--}},[])}function Zn(){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 de=function(){return de=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},de.apply(this,arguments)};function Vr(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 na(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 pt="right-scroll-bar-position",gt="width-before-scroll-bar",ra="with-scroll-bars-hidden",oa="--removed-body-scroll-bar-size";function Vt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function sa(e,t){var n=K.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 ia=typeof window<"u"?l.useLayoutEffect:l.useEffect,Yn=new WeakMap;function aa(e,t){var n=sa(null,function(r){return e.forEach(function(o){return Vt(o,r)})});return ia(function(){var r=Yn.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Vt(a,null)}),s.forEach(function(a){o.has(a)||Vt(a,i)})}Yn.set(n,e)},[e]),n}function la(e){return e}function ca(e,t){t===void 0&&(t=la);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 i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var u=function(){var d=i;i=[],d.forEach(s)},c=function(){return Promise.resolve().then(u)};c(),n={push:function(d){i.push(d),c()},filter:function(d){return i=i.filter(d),n}}}};return o}function ua(e){e===void 0&&(e={});var t=ca(null);return t.options=de({async:!0,ssr:!1},e),t}var $r=function(e){var t=e.sideCar,n=Vr(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 l.createElement(r,de({},n))};$r.isSideCarExport=!0;function da(e,t){return e.useMedium(t),$r}var Wr=ua(),$t=function(){},kt=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:$t,onWheelCapture:$t,onTouchMoveCapture:$t}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,u=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,h=e.noRelative,v=e.noIsolation,g=e.inert,b=e.allowPinchZoom,y=e.as,A=y===void 0?"div":y,w=e.gapMode,E=Vr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=m,P=aa([n,t]),k=de(de({},E),o);return l.createElement(l.Fragment,null,d&&l.createElement(S,{sideCar:Wr,removeScrollBar:c,shards:f,noRelative:h,noIsolation:v,inert:g,setCallbacks:s,allowPinchZoom:!!b,lockRef:n,gapMode:w}),i?l.cloneElement(l.Children.only(a),de(de({},k),{ref:P})):l.createElement(A,de({},k,{className:u,ref:P}),a))});kt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};kt.classNames={fullWidth:gt,zeroRight:pt};var fa=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ma(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=fa();return t&&e.setAttribute("nonce",t),e}function pa(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ga(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ha=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ma())&&(pa(t,n),ga(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},va=function(){var e=ha();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Br=function(){var e=va(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},ba={left:0,top:0,right:0,gap:0},Wt=function(e){return parseInt(e||"",10)||0},ya=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[Wt(n),Wt(r),Wt(o)]},xa=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ba;var t=ya(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])}},wa=Br(),ze="data-scroll-locked",Ca=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
42
|
+
.`.concat(ra,` {
|
|
43
|
+
overflow: hidden `).concat(r,`;
|
|
44
|
+
padding-right: `).concat(a,"px ").concat(r,`;
|
|
45
|
+
}
|
|
46
|
+
body[`).concat(ze,`] {
|
|
47
|
+
overflow: hidden `).concat(r,`;
|
|
48
|
+
overscroll-behavior: contain;
|
|
49
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
50
|
+
padding-left: `.concat(o,`px;
|
|
51
|
+
padding-top: `).concat(s,`px;
|
|
52
|
+
padding-right: `).concat(i,`px;
|
|
53
|
+
margin-left:0;
|
|
54
|
+
margin-top:0;
|
|
55
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
56
|
+
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.`).concat(pt,` {
|
|
60
|
+
right: `).concat(a,"px ").concat(r,`;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.`).concat(gt,` {
|
|
64
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.`).concat(pt," .").concat(pt,` {
|
|
68
|
+
right: 0 `).concat(r,`;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.`).concat(gt," .").concat(gt,` {
|
|
72
|
+
margin-right: 0 `).concat(r,`;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
body[`).concat(ze,`] {
|
|
76
|
+
`).concat(oa,": ").concat(a,`px;
|
|
77
|
+
}
|
|
78
|
+
`)},Kn=function(){var e=parseInt(document.body.getAttribute(ze)||"0",10);return isFinite(e)?e:0},Ea=function(){l.useEffect(function(){return document.body.setAttribute(ze,(Kn()+1).toString()),function(){var e=Kn()-1;e<=0?document.body.removeAttribute(ze):document.body.setAttribute(ze,e.toString())}},[])},Sa=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Ea();var s=l.useMemo(function(){return xa(o)},[o]);return l.createElement(wa,{styles:Ca(s,!t,o,n?"":"!important")})},Jt=!1;if(typeof window<"u")try{var ct=Object.defineProperty({},"passive",{get:function(){return Jt=!0,!0}});window.addEventListener("test",ct,ct),window.removeEventListener("test",ct,ct)}catch{Jt=!1}var De=Jt?{passive:!1}:!1,ka=function(e){return e.tagName==="TEXTAREA"},Hr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ka(e)&&n[t]==="visible")},Aa=function(e){return Hr(e,"overflowY")},Ra=function(e){return Hr(e,"overflowX")},Xn=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ur(e,r);if(o){var s=Gr(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Pa=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Na=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ur=function(e,t){return e==="v"?Aa(t):Ra(t)},Gr=function(e,t){return e==="v"?Pa(t):Na(t)},Oa=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ma=function(e,t,n,r,o){var s=Oa(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,u=t.contains(a),c=!1,d=i>0,f=0,m=0;do{if(!a)break;var h=Gr(e,a),v=h[0],g=h[1],b=h[2],y=g-b-s*v;(v||y)&&Ur(e,a)&&(f+=y,m+=v);var A=a.parentNode;a=A&&A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?A.host:A}while(!u&&a!==document.body||u&&(t.contains(a)||t===a));return(d&&Math.abs(f)<1||!d&&Math.abs(m)<1)&&(c=!0),c},ut=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},qn=function(e){return[e.deltaX,e.deltaY]},Qn=function(e){return e&&"current"in e?e.current:e},ja=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ta=function(e){return`
|
|
79
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
80
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
81
|
+
`)},Da=0,Ie=[];function Ia(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),o=l.useState(Da++)[0],s=l.useState(Br)[0],i=l.useRef(e);l.useEffect(function(){i.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=na([e.lockRef.current],(e.shards||[]).map(Qn),!0).filter(Boolean);return g.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=l.useCallback(function(g,b){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var y=ut(g),A=n.current,w="deltaX"in g?g.deltaX:A[0]-y[0],E="deltaY"in g?g.deltaY:A[1]-y[1],S,P=g.target,k=Math.abs(w)>Math.abs(E)?"h":"v";if("touches"in g&&k==="h"&&P.type==="range")return!1;var R=window.getSelection(),_=R&&R.anchorNode,V=_?_===P||_.contains(P):!1;if(V)return!1;var W=Xn(k,P);if(!W)return!0;if(W?S=k:(S=k==="v"?"h":"v",W=Xn(k,P)),!W)return!1;if(!r.current&&"changedTouches"in g&&(w||E)&&(r.current=S),!S)return!0;var B=r.current||S;return Ma(B,b,g,B==="h"?w:E)},[]),u=l.useCallback(function(g){var b=g;if(!(!Ie.length||Ie[Ie.length-1]!==s)){var y="deltaY"in b?qn(b):ut(b),A=t.current.filter(function(S){return S.name===b.type&&(S.target===b.target||b.target===S.shadowParent)&&ja(S.delta,y)})[0];if(A&&A.should){b.cancelable&&b.preventDefault();return}if(!A){var w=(i.current.shards||[]).map(Qn).filter(Boolean).filter(function(S){return S.contains(b.target)}),E=w.length>0?a(b,w[0]):!i.current.noIsolation;E&&b.cancelable&&b.preventDefault()}}},[]),c=l.useCallback(function(g,b,y,A){var w={name:g,delta:b,target:y,should:A,shadowParent:_a(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(E){return E!==w})},1)},[]),d=l.useCallback(function(g){n.current=ut(g),r.current=void 0},[]),f=l.useCallback(function(g){c(g.type,qn(g),g.target,a(g,e.lockRef.current))},[]),m=l.useCallback(function(g){c(g.type,ut(g),g.target,a(g,e.lockRef.current))},[]);l.useEffect(function(){return Ie.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",u,De),document.addEventListener("touchmove",u,De),document.addEventListener("touchstart",d,De),function(){Ie=Ie.filter(function(g){return g!==s}),document.removeEventListener("wheel",u,De),document.removeEventListener("touchmove",u,De),document.removeEventListener("touchstart",d,De)}},[]);var h=e.removeScrollBar,v=e.inert;return l.createElement(l.Fragment,null,v?l.createElement(s,{styles:Ta(o)}):null,h?l.createElement(Sa,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function _a(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const La=da(Wr,Ia);var fn=l.forwardRef(function(e,t){return l.createElement(kt,de({},e,{ref:t,sideCar:La}))});fn.classNames=kt.classNames;var Fa=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_e=new WeakMap,dt=new WeakMap,ft={},Bt=0,Zr=function(e){return e&&(e.host||Zr(e.parentNode))},za=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Zr(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})},Va=function(e,t,n,r){var o=za(t,Array.isArray(e)?e:[e]);ft[n]||(ft[n]=new WeakMap);var s=ft[n],i=[],a=new Set,u=new Set(o),c=function(f){!f||a.has(f)||(a.add(f),c(f.parentNode))};o.forEach(c);var d=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(m){if(a.has(m))d(m);else try{var h=m.getAttribute(r),v=h!==null&&h!=="false",g=(_e.get(m)||0)+1,b=(s.get(m)||0)+1;_e.set(m,g),s.set(m,b),i.push(m),g===1&&v&&dt.set(m,!0),b===1&&m.setAttribute(n,"true"),v||m.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",m,y)}})};return d(t),a.clear(),Bt++,function(){i.forEach(function(f){var m=_e.get(f)-1,h=s.get(f)-1;_e.set(f,m),s.set(f,h),m||(dt.has(f)||f.removeAttribute(r),dt.delete(f)),h||f.removeAttribute(n)}),Bt--,Bt||(_e=new WeakMap,_e=new WeakMap,dt=new WeakMap,ft={})}},Yr=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Fa(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Va(r,o,n,"aria-hidden")):function(){return null}},At="Dialog",[Kr]=ln(At),[$a,ce]=Kr(At),Xr=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=l.useRef(null),u=l.useRef(null),[c,d]=Ir({prop:r,defaultProp:o??!1,onChange:s,caller:At});return p.jsx($a,{scope:t,triggerRef:a,contentRef:u,contentId:me(),titleId:me(),descriptionId:me(),open:c,onOpenChange:d,onOpenToggle:l.useCallback(()=>d(f=>!f),[d]),modal:i,children:n})};Xr.displayName=At;var qr="DialogTrigger",Wa=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ce(qr,n),s=le(t,o.triggerRef);return p.jsx(Y.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":gn(o.open),...r,ref:s,onClick:re(e.onClick,o.onOpenToggle)})});Wa.displayName=qr;var mn="DialogPortal",[Ba,Qr]=Kr(mn,{forceMount:void 0}),Jr=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=ce(mn,t);return p.jsx(Ba,{scope:t,forceMount:n,children:l.Children.map(r,i=>p.jsx(Ze,{present:n||s.open,children:p.jsx(dn,{asChild:!0,container:o,children:i})}))})};Jr.displayName=mn;var bt="DialogOverlay",eo=l.forwardRef((e,t)=>{const n=Qr(bt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=ce(bt,e.__scopeDialog);return s.modal?p.jsx(Ze,{present:r||s.open,children:p.jsx(Ua,{...o,ref:t})}):null});eo.displayName=bt;var Ha=Et.createSlot("DialogOverlay.RemoveScroll"),Ua=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ce(bt,n);return p.jsx(fn,{as:Ha,allowPinchZoom:!0,shards:[o.contentRef],children:p.jsx(Y.div,{"data-state":gn(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ne="DialogContent",to=l.forwardRef((e,t)=>{const n=Qr(Ne,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=ce(Ne,e.__scopeDialog);return p.jsx(Ze,{present:r||s.open,children:s.modal?p.jsx(Ga,{...o,ref:t}):p.jsx(Za,{...o,ref:t})})});to.displayName=Ne;var Ga=l.forwardRef((e,t)=>{const n=ce(Ne,e.__scopeDialog),r=l.useRef(null),o=le(t,n.contentRef,r);return l.useEffect(()=>{const s=r.current;if(s)return Yr(s)},[]),p.jsx(no,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:re(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:re(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:re(e.onFocusOutside,s=>s.preventDefault())})}),Za=l.forwardRef((e,t)=>{const n=ce(Ne,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return p.jsx(no,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var u,c;(u=e.onInteractOutside)==null||u.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((c=n.triggerRef.current)==null?void 0:c.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),no=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,a=ce(Ne,n),u=l.useRef(null),c=le(t,u);return zr(),p.jsxs(p.Fragment,{children:[p.jsx(un,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:p.jsx(cn,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":gn(a.open),...i,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(Ya,{titleId:a.titleId}),p.jsx(Xa,{contentRef:u,descriptionId:a.descriptionId})]})]})}),pn="DialogTitle",ro=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ce(pn,n);return p.jsx(Y.h2,{id:o.titleId,...r,ref:t})});ro.displayName=pn;var oo="DialogDescription",so=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ce(oo,n);return p.jsx(Y.p,{id:o.descriptionId,...r,ref:t})});so.displayName=oo;var io="DialogClose",ao=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ce(io,n);return p.jsx(Y.button,{type:"button",...r,ref:t,onClick:re(e.onClick,()=>o.onOpenChange(!1))})});ao.displayName=io;function gn(e){return e?"open":"closed"}var lo="DialogTitleWarning",[fu,co]=Pi(lo,{contentName:Ne,titleName:pn,docsSlug:"dialog"}),Ya=({titleId:e})=>{const t=co(lo),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
82
|
+
|
|
83
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
84
|
+
|
|
85
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Ka="DialogDescriptionWarning",Xa=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${co(Ka).contentName}}.`;return l.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},qa=Xr,uo=Jr,hn=eo,vn=to,fo=ro,mo=so,Qa=ao,Qe='[cmdk-group=""]',Ht='[cmdk-group-items=""]',Ja='[cmdk-group-heading=""]',po='[cmdk-item=""]',Jn=`${po}:not([aria-disabled="true"])`,en="cmdk-item-select",Le="data-value",el=(e,t,n)=>Ri(e,t,n),go=l.createContext(void 0),nt=()=>l.useContext(go),ho=l.createContext(void 0),bn=()=>l.useContext(ho),vo=l.createContext(void 0),bo=l.forwardRef((e,t)=>{let n=Fe(()=>{var x,M;return{search:"",value:(M=(x=e.value)!=null?x:e.defaultValue)!=null?M:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Fe(()=>new Set),o=Fe(()=>new Map),s=Fe(()=>new Map),i=Fe(()=>new Set),a=yo(e),{label:u,children:c,value:d,onValueChange:f,filter:m,shouldFilter:h,loop:v,disablePointerSelection:g=!1,vimBindings:b=!0,...y}=e,A=me(),w=me(),E=me(),S=l.useRef(null),P=dl();Oe(()=>{if(d!==void 0){let x=d.trim();n.current.value=x,k.emit()}},[d]),Oe(()=>{P(6,U)},[]);let k=l.useMemo(()=>({subscribe:x=>(i.current.add(x),()=>i.current.delete(x)),snapshot:()=>n.current,setState:(x,M,T)=>{var j,z,D,X;if(!Object.is(n.current[x],M)){if(n.current[x]=M,x==="search")B(),V(),P(1,W);else if(x==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let G=document.getElementById(E);G?G.focus():(j=document.getElementById(A))==null||j.focus()}if(P(7,()=>{var G;n.current.selectedItemId=(G=F())==null?void 0:G.id,k.emit()}),T||P(5,U),((z=a.current)==null?void 0:z.value)!==void 0){let G=M??"";(X=(D=a.current).onValueChange)==null||X.call(D,G);return}}k.emit()}},emit:()=>{i.current.forEach(x=>x())}}),[]),R=l.useMemo(()=>({value:(x,M,T)=>{var j;M!==((j=s.current.get(x))==null?void 0:j.value)&&(s.current.set(x,{value:M,keywords:T}),n.current.filtered.items.set(x,_(M,T)),P(2,()=>{V(),k.emit()}))},item:(x,M)=>(r.current.add(x),M&&(o.current.has(M)?o.current.get(M).add(x):o.current.set(M,new Set([x]))),P(3,()=>{B(),V(),n.current.value||W(),k.emit()}),()=>{s.current.delete(x),r.current.delete(x),n.current.filtered.items.delete(x);let T=F();P(4,()=>{B(),(T==null?void 0:T.getAttribute("id"))===x&&W(),k.emit()})}),group:x=>(o.current.has(x)||o.current.set(x,new Set),()=>{s.current.delete(x),o.current.delete(x)}),filter:()=>a.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:A,inputId:E,labelId:w,listInnerRef:S}),[]);function _(x,M){var T,j;let z=(j=(T=a.current)==null?void 0:T.filter)!=null?j:el;return x?z(x,n.current.search,M):0}function V(){if(!n.current.search||a.current.shouldFilter===!1)return;let x=n.current.filtered.items,M=[];n.current.filtered.groups.forEach(j=>{let z=o.current.get(j),D=0;z.forEach(X=>{let G=x.get(X);D=Math.max(G,D)}),M.push([j,D])});let T=S.current;H().sort((j,z)=>{var D,X;let G=j.getAttribute("id"),se=z.getAttribute("id");return((D=x.get(se))!=null?D:0)-((X=x.get(G))!=null?X:0)}).forEach(j=>{let z=j.closest(Ht);z?z.appendChild(j.parentElement===z?j:j.closest(`${Ht} > *`)):T.appendChild(j.parentElement===T?j:j.closest(`${Ht} > *`))}),M.sort((j,z)=>z[1]-j[1]).forEach(j=>{var z;let D=(z=S.current)==null?void 0:z.querySelector(`${Qe}[${Le}="${encodeURIComponent(j[0])}"]`);D==null||D.parentElement.appendChild(D)})}function W(){let x=H().find(T=>T.getAttribute("aria-disabled")!=="true"),M=x==null?void 0:x.getAttribute(Le);k.setState("value",M||void 0)}function B(){var x,M,T,j;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let z=0;for(let D of r.current){let X=(M=(x=s.current.get(D))==null?void 0:x.value)!=null?M:"",G=(j=(T=s.current.get(D))==null?void 0:T.keywords)!=null?j:[],se=_(X,G);n.current.filtered.items.set(D,se),se>0&&z++}for(let[D,X]of o.current)for(let G of X)if(n.current.filtered.items.get(G)>0){n.current.filtered.groups.add(D);break}n.current.filtered.count=z}function U(){var x,M,T;let j=F();j&&(((x=j.parentElement)==null?void 0:x.firstChild)===j&&((T=(M=j.closest(Qe))==null?void 0:M.querySelector(Ja))==null||T.scrollIntoView({block:"nearest"})),j.scrollIntoView({block:"nearest"}))}function F(){var x;return(x=S.current)==null?void 0:x.querySelector(`${po}[aria-selected="true"]`)}function H(){var x;return Array.from(((x=S.current)==null?void 0:x.querySelectorAll(Jn))||[])}function L(x){let M=H()[x];M&&k.setState("value",M.getAttribute(Le))}function $(x){var M;let T=F(),j=H(),z=j.findIndex(X=>X===T),D=j[z+x];(M=a.current)!=null&&M.loop&&(D=z+x<0?j[j.length-1]:z+x===j.length?j[0]:j[z+x]),D&&k.setState("value",D.getAttribute(Le))}function C(x){let M=F(),T=M==null?void 0:M.closest(Qe),j;for(;T&&!j;)T=x>0?cl(T,Qe):ul(T,Qe),j=T==null?void 0:T.querySelector(Jn);j?k.setState("value",j.getAttribute(Le)):$(x)}let Z=()=>L(H().length-1),J=x=>{x.preventDefault(),x.metaKey?Z():x.altKey?C(1):$(1)},ue=x=>{x.preventDefault(),x.metaKey?L(0):x.altKey?C(-1):$(-1)};return l.createElement(Y.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:x=>{var M;(M=y.onKeyDown)==null||M.call(y,x);let T=x.nativeEvent.isComposing||x.keyCode===229;if(!(x.defaultPrevented||T))switch(x.key){case"n":case"j":{b&&x.ctrlKey&&J(x);break}case"ArrowDown":{J(x);break}case"p":case"k":{b&&x.ctrlKey&&ue(x);break}case"ArrowUp":{ue(x);break}case"Home":{x.preventDefault(),L(0);break}case"End":{x.preventDefault(),Z();break}case"Enter":{x.preventDefault();let j=F();if(j){let z=new Event(en);j.dispatchEvent(z)}}}}},l.createElement("label",{"cmdk-label":"",htmlFor:R.inputId,id:R.labelId,style:ml},u),Rt(e,x=>l.createElement(ho.Provider,{value:k},l.createElement(go.Provider,{value:R},x))))}),tl=l.forwardRef((e,t)=>{var n,r;let o=me(),s=l.useRef(null),i=l.useContext(vo),a=nt(),u=yo(e),c=(r=(n=u.current)==null?void 0:n.forceMount)!=null?r:i==null?void 0:i.forceMount;Oe(()=>{if(!c)return a.item(o,i==null?void 0:i.id)},[c]);let d=xo(o,s,[e.value,e.children,s],e.keywords),f=bn(),m=Ee(P=>P.value&&P.value===d.current),h=Ee(P=>c||a.filter()===!1?!0:P.search?P.filtered.items.get(o)>0:!0);l.useEffect(()=>{let P=s.current;if(!(!P||e.disabled))return P.addEventListener(en,v),()=>P.removeEventListener(en,v)},[h,e.onSelect,e.disabled]);function v(){var P,k;g(),(k=(P=u.current).onSelect)==null||k.call(P,d.current)}function g(){f.setState("value",d.current,!0)}if(!h)return null;let{disabled:b,value:y,onSelect:A,forceMount:w,keywords:E,...S}=e;return l.createElement(Y.div,{ref:$e(s,t),...S,id:o,"cmdk-item":"",role:"option","aria-disabled":!!b,"aria-selected":!!m,"data-disabled":!!b,"data-selected":!!m,onPointerMove:b||a.getDisablePointerSelection()?void 0:g,onClick:b?void 0:v},e.children)}),nl=l.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...s}=e,i=me(),a=l.useRef(null),u=l.useRef(null),c=me(),d=nt(),f=Ee(h=>o||d.filter()===!1?!0:h.search?h.filtered.groups.has(i):!0);Oe(()=>d.group(i),[]),xo(i,a,[e.value,e.heading,u]);let m=l.useMemo(()=>({id:i,forceMount:o}),[o]);return l.createElement(Y.div,{ref:$e(a,t),...s,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},n&&l.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:c},n),Rt(e,h=>l.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?c:void 0},l.createElement(vo.Provider,{value:m},h))))}),rl=l.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=l.useRef(null),s=Ee(i=>!i.search);return!n&&!s?null:l.createElement(Y.div,{ref:$e(o,t),...r,"cmdk-separator":"",role:"separator"})}),ol=l.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,s=bn(),i=Ee(c=>c.search),a=Ee(c=>c.selectedItemId),u=nt();return l.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),l.createElement(Y.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":a,id:u.inputId,type:"text",value:o?e.value:i,onChange:c=>{o||s.setState("search",c.target.value),n==null||n(c.target.value)}})}),sl=l.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,s=l.useRef(null),i=l.useRef(null),a=Ee(c=>c.selectedItemId),u=nt();return l.useEffect(()=>{if(i.current&&s.current){let c=i.current,d=s.current,f,m=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let h=c.offsetHeight;d.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return m.observe(c),()=>{cancelAnimationFrame(f),m.unobserve(c)}}},[]),l.createElement(Y.div,{ref:$e(s,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":r,id:u.listId},Rt(e,c=>l.createElement("div",{ref:$e(i,u.listInnerRef),"cmdk-list-sizer":""},c)))}),il=l.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:s,container:i,...a}=e;return l.createElement(qa,{open:n,onOpenChange:r},l.createElement(uo,{container:i},l.createElement(hn,{"cmdk-overlay":"",className:o}),l.createElement(vn,{"aria-label":e.label,"cmdk-dialog":"",className:s},l.createElement(bo,{ref:t,...a}))))}),al=l.forwardRef((e,t)=>Ee(n=>n.filtered.count===0)?l.createElement(Y.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),ll=l.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...s}=e;return l.createElement(Y.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Rt(e,i=>l.createElement("div",{"aria-hidden":!0},i)))}),ee=Object.assign(bo,{List:sl,Item:tl,Input:ol,Group:nl,Separator:rl,Dialog:il,Empty:al,Loading:ll});function cl(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function ul(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function yo(e){let t=l.useRef(e);return Oe(()=>{t.current=e}),t}var Oe=typeof window>"u"?l.useEffect:l.useLayoutEffect;function Fe(e){let t=l.useRef();return t.current===void 0&&(t.current=e()),t}function Ee(e){let t=bn(),n=()=>e(t.snapshot());return l.useSyncExternalStore(t.subscribe,n,n)}function xo(e,t,n,r=[]){let o=l.useRef(),s=nt();return Oe(()=>{var i;let a=(()=>{var c;for(let d of n){if(typeof d=="string")return d.trim();if(typeof d=="object"&&"current"in d)return d.current?(c=d.current.textContent)==null?void 0:c.trim():o.current}})(),u=r.map(c=>c.trim());s.value(e,a,u),(i=t.current)==null||i.setAttribute(Le,a),o.current=a}),o}var dl=()=>{let[e,t]=l.useState(),n=Fe(()=>new Map);return Oe(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function fl(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Rt({asChild:e,children:t},n){return e&&l.isValidElement(t)?l.cloneElement(fl(t),{ref:t.ref},n(t.props.children)):n(t)}var ml={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const pl=uo,wo=l.forwardRef(({className:e,...t},n)=>p.jsx(hn,{ref:n,className:Q("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));wo.displayName=hn.displayName;const gl=l.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(pl,{children:[p.jsx(wo,{}),p.jsxs(vn,{ref:r,className:Q("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,p.jsxs(Qa,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[p.jsx(jr,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));gl.displayName=vn.displayName;const hl=l.forwardRef(({className:e,...t},n)=>p.jsx(fo,{ref:n,className:Q("text-lg font-semibold leading-none tracking-tight",e),...t}));hl.displayName=fo.displayName;const vl=l.forwardRef(({className:e,...t},n)=>p.jsx(mo,{ref:n,className:Q("text-sm text-muted-foreground",e),...t}));vl.displayName=mo.displayName;const tn=l.forwardRef(({className:e,...t},n)=>p.jsx(ee,{ref:n,className:Q("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));tn.displayName=ee.displayName;const Co=l.forwardRef(({className:e,...t},n)=>p.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[p.jsx(hi,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),p.jsx(ee.Input,{ref:n,className:Q("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Co.displayName=ee.Input.displayName;const nn=l.forwardRef(({className:e,...t},n)=>p.jsx(ee.List,{ref:n,className:Q("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));nn.displayName=ee.List.displayName;const Eo=l.forwardRef((e,t)=>p.jsx(ee.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Eo.displayName=ee.Empty.displayName;const So=l.forwardRef(({className:e,...t},n)=>p.jsx(ee.Group,{ref:n,className:Q("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));So.displayName=ee.Group.displayName;const bl=l.forwardRef(({className:e,...t},n)=>p.jsx(ee.Separator,{ref:n,className:Q("-mx-1 h-px bg-border",e),...t}));bl.displayName=ee.Separator.displayName;const ko=l.forwardRef(({className:e,...t},n)=>p.jsx(ee.Item,{ref:n,className:Q("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));ko.displayName=ee.Item.displayName;const yl=["top","right","bottom","left"],Se=Math.min,te=Math.max,yt=Math.round,mt=Math.floor,pe=e=>({x:e,y:e}),xl={left:"right",right:"left",bottom:"top",top:"bottom"},wl={start:"end",end:"start"};function rn(e,t,n){return te(e,Se(t,n))}function be(e,t){return typeof e=="function"?e(t):e}function ye(e){return e.split("-")[0]}function Ye(e){return e.split("-")[1]}function yn(e){return e==="x"?"y":"x"}function xn(e){return e==="y"?"height":"width"}const Cl=new Set(["top","bottom"]);function fe(e){return Cl.has(ye(e))?"y":"x"}function wn(e){return yn(fe(e))}function El(e,t,n){n===void 0&&(n=!1);const r=Ye(e),o=wn(e),s=xn(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=xt(i)),[i,xt(i)]}function Sl(e){const t=xt(e);return[on(e),t,on(t)]}function on(e){return e.replace(/start|end/g,t=>wl[t])}const er=["left","right"],tr=["right","left"],kl=["top","bottom"],Al=["bottom","top"];function Rl(e,t,n){switch(e){case"top":case"bottom":return n?t?tr:er:t?er:tr;case"left":case"right":return t?kl:Al;default:return[]}}function Pl(e,t,n,r){const o=Ye(e);let s=Rl(ye(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(on)))),s}function xt(e){return e.replace(/left|right|bottom|top/g,t=>xl[t])}function Nl(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ao(e){return typeof e!="number"?Nl(e):{top:e,right:e,bottom:e,left:e}}function wt(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 nr(e,t,n){let{reference:r,floating:o}=e;const s=fe(t),i=wn(t),a=xn(i),u=ye(t),c=s==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,m=r[a]/2-o[a]/2;let h;switch(u){case"top":h={x:d,y:r.y-o.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(Ye(t)){case"start":h[i]-=m*(n&&c?-1:1);break;case"end":h[i]+=m*(n&&c?-1:1);break}return h}const Ol=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),u=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=nr(c,r,u),m=r,h={},v=0;for(let g=0;g<a.length;g++){const{name:b,fn:y}=a[g],{x:A,y:w,data:E,reset:S}=await y({x:d,y:f,initialPlacement:r,placement:m,strategy:o,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});d=A??d,f=w??f,h={...h,[b]:{...h[b],...E}},S&&v<=50&&(v++,typeof S=="object"&&(S.placement&&(m=S.placement),S.rects&&(c=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:d,y:f}=nr(c,m,u)),g=-1)}return{x:d,y:f,placement:m,strategy:o,middlewareData:h}};async function Je(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:h=0}=be(t,e),v=Ao(h),b=a[m?f==="floating"?"reference":"floating":f],y=wt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:u})),A=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),E=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},S=wt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:A,offsetParent:w,strategy:u}):A);return{top:(y.top-S.top+v.top)/E.y,bottom:(S.bottom-y.bottom+v.bottom)/E.y,left:(y.left-S.left+v.left)/E.x,right:(S.right-y.right+v.right)/E.x}}const Ml=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:u}=t,{element:c,padding:d=0}=be(e,t)||{};if(c==null)return{};const f=Ao(d),m={x:n,y:r},h=wn(o),v=xn(h),g=await i.getDimensions(c),b=h==="y",y=b?"top":"left",A=b?"bottom":"right",w=b?"clientHeight":"clientWidth",E=s.reference[v]+s.reference[h]-m[h]-s.floating[v],S=m[h]-s.reference[h],P=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let k=P?P[w]:0;(!k||!await(i.isElement==null?void 0:i.isElement(P)))&&(k=a.floating[w]||s.floating[v]);const R=E/2-S/2,_=k/2-g[v]/2-1,V=Se(f[y],_),W=Se(f[A],_),B=V,U=k-g[v]-W,F=k/2-g[v]/2+R,H=rn(B,F,U),L=!u.arrow&&Ye(o)!=null&&F!==H&&s.reference[v]/2-(F<B?V:W)-g[v]/2<0,$=L?F<B?F-B:F-U:0;return{[h]:m[h]+$,data:{[h]:H,centerOffset:F-H-$,...L&&{alignmentOffset:$}},reset:L}}}),jl=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:u,elements:c}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...b}=be(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=ye(o),A=fe(a),w=ye(a)===a,E=await(u.isRTL==null?void 0:u.isRTL(c.floating)),S=m||(w||!g?[xt(a)]:Sl(a)),P=v!=="none";!m&&P&&S.push(...Pl(a,g,v,E));const k=[a,...S],R=await Je(t,b),_=[];let V=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&_.push(R[y]),f){const F=El(o,i,E);_.push(R[F[0]],R[F[1]])}if(V=[...V,{placement:o,overflows:_}],!_.every(F=>F<=0)){var W,B;const F=(((W=s.flip)==null?void 0:W.index)||0)+1,H=k[F];if(H&&(!(f==="alignment"?A!==fe(H):!1)||V.every(C=>fe(C.placement)===A?C.overflows[0]>0:!0)))return{data:{index:F,overflows:V},reset:{placement:H}};let L=(B=V.filter($=>$.overflows[0]<=0).sort(($,C)=>$.overflows[1]-C.overflows[1])[0])==null?void 0:B.placement;if(!L)switch(h){case"bestFit":{var U;const $=(U=V.filter(C=>{if(P){const Z=fe(C.placement);return Z===A||Z==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(Z=>Z>0).reduce((Z,J)=>Z+J,0)]).sort((C,Z)=>C[1]-Z[1])[0])==null?void 0:U[0];$&&(L=$);break}case"initialPlacement":L=a;break}if(o!==L)return{reset:{placement:L}}}return{}}}};function rr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function or(e){return yl.some(t=>e[t]>=0)}const Tl=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=be(e,t);switch(r){case"referenceHidden":{const s=await Je(t,{...o,elementContext:"reference"}),i=rr(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:or(i)}}}case"escaped":{const s=await Je(t,{...o,altBoundary:!0}),i=rr(s,n.floating);return{data:{escapedOffsets:i,escaped:or(i)}}}default:return{}}}}},Ro=new Set(["left","top"]);async function Dl(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=ye(n),a=Ye(n),u=fe(n)==="y",c=Ro.has(i)?-1:1,d=s&&u?-1:1,f=be(t,e);let{mainAxis:m,crossAxis:h,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof v=="number"&&(h=a==="end"?v*-1:v),u?{x:h*d,y:m*c}:{x:m*c,y:h*d}}const Il=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,u=await Dl(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:s+u.y,data:{...u,placement:i}}}}},_l=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:b=>{let{x:y,y:A}=b;return{x:y,y:A}}},...u}=be(e,t),c={x:n,y:r},d=await Je(t,u),f=fe(ye(o)),m=yn(f);let h=c[m],v=c[f];if(s){const b=m==="y"?"top":"left",y=m==="y"?"bottom":"right",A=h+d[b],w=h-d[y];h=rn(A,h,w)}if(i){const b=f==="y"?"top":"left",y=f==="y"?"bottom":"right",A=v+d[b],w=v-d[y];v=rn(A,v,w)}const g=a.fn({...t,[m]:h,[f]:v});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[m]:s,[f]:i}}}}}},Ll=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:u=!0,crossAxis:c=!0}=be(e,t),d={x:n,y:r},f=fe(o),m=yn(f);let h=d[m],v=d[f];const g=be(a,t),b=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(u){const w=m==="y"?"height":"width",E=s.reference[m]-s.floating[w]+b.mainAxis,S=s.reference[m]+s.reference[w]-b.mainAxis;h<E?h=E:h>S&&(h=S)}if(c){var y,A;const w=m==="y"?"width":"height",E=Ro.has(ye(o)),S=s.reference[f]-s.floating[w]+(E&&((y=i.offset)==null?void 0:y[f])||0)+(E?0:b.crossAxis),P=s.reference[f]+s.reference[w]+(E?0:((A=i.offset)==null?void 0:A[f])||0)-(E?b.crossAxis:0);v<S?v=S:v>P&&(v=P)}return{[m]:h,[f]:v}}}},Fl=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:u=()=>{},...c}=be(e,t),d=await Je(t,c),f=ye(o),m=Ye(o),h=fe(o)==="y",{width:v,height:g}=s.floating;let b,y;f==="top"||f==="bottom"?(b=f,y=m===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(y=f,b=m==="end"?"top":"bottom");const A=g-d.top-d.bottom,w=v-d.left-d.right,E=Se(g-d[b],A),S=Se(v-d[y],w),P=!t.middlewareData.shift;let k=E,R=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=A),P&&!m){const V=te(d.left,0),W=te(d.right,0),B=te(d.top,0),U=te(d.bottom,0);h?R=v-2*(V!==0||W!==0?V+W:te(d.left,d.right)):k=g-2*(B!==0||U!==0?B+U:te(d.top,d.bottom))}await u({...t,availableWidth:R,availableHeight:k});const _=await i.getDimensions(a.floating);return v!==_.width||g!==_.height?{reset:{rects:!0}}:{}}}};function Pt(){return typeof window<"u"}function Ke(e){return Po(e)?(e.nodeName||"").toLowerCase():"#document"}function oe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function he(e){var t;return(t=(Po(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Po(e){return Pt()?e instanceof Node||e instanceof oe(e).Node:!1}function ie(e){return Pt()?e instanceof Element||e instanceof oe(e).Element:!1}function ge(e){return Pt()?e instanceof HTMLElement||e instanceof oe(e).HTMLElement:!1}function sr(e){return!Pt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof oe(e).ShadowRoot}const zl=new Set(["inline","contents"]);function rt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ae(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!zl.has(o)}const Vl=new Set(["table","td","th"]);function $l(e){return Vl.has(Ke(e))}const Wl=[":popover-open",":modal"];function Nt(e){return Wl.some(t=>{try{return e.matches(t)}catch{return!1}})}const Bl=["transform","translate","scale","rotate","perspective"],Hl=["transform","translate","scale","rotate","perspective","filter"],Ul=["paint","layout","strict","content"];function Cn(e){const t=En(),n=ie(e)?ae(e):e;return Bl.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Hl.some(r=>(n.willChange||"").includes(r))||Ul.some(r=>(n.contain||"").includes(r))}function Gl(e){let t=ke(e);for(;ge(t)&&!Be(t);){if(Cn(t))return t;if(Nt(t))return null;t=ke(t)}return null}function En(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Zl=new Set(["html","body","#document"]);function Be(e){return Zl.has(Ke(e))}function ae(e){return oe(e).getComputedStyle(e)}function Ot(e){return ie(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ke(e){if(Ke(e)==="html")return e;const t=e.assignedSlot||e.parentNode||sr(e)&&e.host||he(e);return sr(t)?t.host:t}function No(e){const t=ke(e);return Be(t)?e.ownerDocument?e.ownerDocument.body:e.body:ge(t)&&rt(t)?t:No(t)}function et(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=No(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=oe(o);if(s){const a=sn(i);return t.concat(i,i.visualViewport||[],rt(o)?o:[],a&&n?et(a):[])}return t.concat(o,et(o,[],n))}function sn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Oo(e){const t=ae(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ge(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=yt(n)!==s||yt(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Sn(e){return ie(e)?e:e.contextElement}function Ve(e){const t=Sn(e);if(!ge(t))return pe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Oo(t);let i=(s?yt(n.width):n.width)/r,a=(s?yt(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Yl=pe(0);function Mo(e){const t=oe(e);return!En()||!t.visualViewport?Yl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Kl(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==oe(e)?!1:t}function Me(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Sn(e);let i=pe(1);t&&(r?ie(r)&&(i=Ve(r)):i=Ve(e));const a=Kl(s,n,r)?Mo(s):pe(0);let u=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(s){const m=oe(s),h=r&&ie(r)?oe(r):r;let v=m,g=sn(v);for(;g&&r&&h!==v;){const b=Ve(g),y=g.getBoundingClientRect(),A=ae(g),w=y.left+(g.clientLeft+parseFloat(A.paddingLeft))*b.x,E=y.top+(g.clientTop+parseFloat(A.paddingTop))*b.y;u*=b.x,c*=b.y,d*=b.x,f*=b.y,u+=w,c+=E,v=oe(g),g=sn(v)}}return wt({width:d,height:f,x:u,y:c})}function Mt(e,t){const n=Ot(e).scrollLeft;return t?t.left+n:Me(he(e)).left+n}function jo(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Mt(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Xl(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=he(r),a=t?Nt(t.floating):!1;if(r===i||a&&s)return n;let u={scrollLeft:0,scrollTop:0},c=pe(1);const d=pe(0),f=ge(r);if((f||!f&&!s)&&((Ke(r)!=="body"||rt(i))&&(u=Ot(r)),ge(r))){const h=Me(r);c=Ve(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}const m=i&&!f&&!s?jo(i,u):pe(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+d.x+m.x,y:n.y*c.y-u.scrollTop*c.y+d.y+m.y}}function ql(e){return Array.from(e.getClientRects())}function Ql(e){const t=he(e),n=Ot(e),r=e.ownerDocument.body,o=te(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=te(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Mt(e);const a=-n.scrollTop;return ae(r).direction==="rtl"&&(i+=te(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const ir=25;function Jl(e,t){const n=oe(e),r=he(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,u=0;if(o){s=o.width,i=o.height;const d=En();(!d||d&&t==="fixed")&&(a=o.offsetLeft,u=o.offsetTop)}const c=Mt(r);if(c<=0){const d=r.ownerDocument,f=d.body,m=getComputedStyle(f),h=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,v=Math.abs(r.clientWidth-f.clientWidth-h);v<=ir&&(s-=v)}else c<=ir&&(s+=c);return{width:s,height:i,x:a,y:u}}const ec=new Set(["absolute","fixed"]);function tc(e,t){const n=Me(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ge(e)?Ve(e):pe(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,u=o*s.x,c=r*s.y;return{width:i,height:a,x:u,y:c}}function ar(e,t,n){let r;if(t==="viewport")r=Jl(e,n);else if(t==="document")r=Ql(he(e));else if(ie(t))r=tc(t,n);else{const o=Mo(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return wt(r)}function To(e,t){const n=ke(e);return n===t||!ie(n)||Be(n)?!1:ae(n).position==="fixed"||To(n,t)}function nc(e,t){const n=t.get(e);if(n)return n;let r=et(e,[],!1).filter(a=>ie(a)&&Ke(a)!=="body"),o=null;const s=ae(e).position==="fixed";let i=s?ke(e):e;for(;ie(i)&&!Be(i);){const a=ae(i),u=Cn(i);!u&&a.position==="fixed"&&(o=null),(s?!u&&!o:!u&&a.position==="static"&&!!o&&ec.has(o.position)||rt(i)&&!u&&To(e,i))?r=r.filter(d=>d!==i):o=a,i=ke(i)}return t.set(e,r),r}function rc(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Nt(t)?[]:nc(t,this._c):[].concat(n),r],a=i[0],u=i.reduce((c,d)=>{const f=ar(t,d,o);return c.top=te(f.top,c.top),c.right=Se(f.right,c.right),c.bottom=Se(f.bottom,c.bottom),c.left=te(f.left,c.left),c},ar(t,a,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function oc(e){const{width:t,height:n}=Oo(e);return{width:t,height:n}}function sc(e,t,n){const r=ge(t),o=he(t),s=n==="fixed",i=Me(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const u=pe(0);function c(){u.x=Mt(o)}if(r||!r&&!s)if((Ke(t)!=="body"||rt(o))&&(a=Ot(t)),r){const h=Me(t,!0,s,t);u.x=h.x+t.clientLeft,u.y=h.y+t.clientTop}else o&&c();s&&!r&&o&&c();const d=o&&!r&&!s?jo(o,a):pe(0),f=i.left+a.scrollLeft-u.x-d.x,m=i.top+a.scrollTop-u.y-d.y;return{x:f,y:m,width:i.width,height:i.height}}function Ut(e){return ae(e).position==="static"}function lr(e,t){if(!ge(e)||ae(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return he(e)===n&&(n=n.ownerDocument.body),n}function Do(e,t){const n=oe(e);if(Nt(e))return n;if(!ge(e)){let o=ke(e);for(;o&&!Be(o);){if(ie(o)&&!Ut(o))return o;o=ke(o)}return n}let r=lr(e,t);for(;r&&$l(r)&&Ut(r);)r=lr(r,t);return r&&Be(r)&&Ut(r)&&!Cn(r)?n:r||Gl(e)||n}const ic=async function(e){const t=this.getOffsetParent||Do,n=this.getDimensions,r=await n(e.floating);return{reference:sc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ac(e){return ae(e).direction==="rtl"}const lc={convertOffsetParentRelativeRectToViewportRelativeRect:Xl,getDocumentElement:he,getClippingRect:rc,getOffsetParent:Do,getElementRects:ic,getClientRects:ql,getDimensions:oc,getScale:Ve,isElement:ie,isRTL:ac};function Io(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function cc(e,t){let n=null,r;const o=he(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),s();const c=e.getBoundingClientRect(),{left:d,top:f,width:m,height:h}=c;if(a||t(),!m||!h)return;const v=mt(f),g=mt(o.clientWidth-(d+m)),b=mt(o.clientHeight-(f+h)),y=mt(d),w={rootMargin:-v+"px "+-g+"px "+-b+"px "+-y+"px",threshold:te(0,Se(1,u))||1};let E=!0;function S(P){const k=P[0].intersectionRatio;if(k!==u){if(!E)return i();k?i(!1,k):r=setTimeout(()=>{i(!1,1e-7)},1e3)}k===1&&!Io(c,e.getBoundingClientRect())&&i(),E=!1}try{n=new IntersectionObserver(S,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(e)}return i(!0),s}function uc(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=Sn(e),d=o||s?[...c?et(c):[],...et(t)]:[];d.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const f=c&&a?cc(c,n):null;let m=-1,h=null;i&&(h=new ResizeObserver(y=>{let[A]=y;A&&A.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),c&&!u&&h.observe(c),h.observe(t));let v,g=u?Me(e):null;u&&b();function b(){const y=Me(e);g&&!Io(g,y)&&n(),g=y,v=requestAnimationFrame(b)}return n(),()=>{var y;d.forEach(A=>{o&&A.removeEventListener("scroll",n),s&&A.removeEventListener("resize",n)}),f==null||f(),(y=h)==null||y.disconnect(),h=null,u&&cancelAnimationFrame(v)}}const dc=Il,fc=_l,mc=jl,pc=Fl,gc=Tl,cr=Ml,hc=Ll,vc=(e,t,n)=>{const r=new Map,o={platform:lc,...n},s={...o.platform,_c:r};return Ol(e,t,{...o,platform:s})};var bc=typeof document<"u",yc=function(){},ht=bc?K.useLayoutEffect:yc;function Ct(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(!Ct(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)&&!Ct(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function _o(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ur(e,t){const n=_o(e);return Math.round(t*n)/n}function Gt(e){const t=l.useRef(e);return ht(()=>{t.current=e}),t}function xc(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:u,open:c}=e,[d,f]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=l.useState(r);Ct(m,r)||h(r);const[v,g]=l.useState(null),[b,y]=l.useState(null),A=l.useCallback(C=>{C!==P.current&&(P.current=C,g(C))},[]),w=l.useCallback(C=>{C!==k.current&&(k.current=C,y(C))},[]),E=s||v,S=i||b,P=l.useRef(null),k=l.useRef(null),R=l.useRef(d),_=u!=null,V=Gt(u),W=Gt(o),B=Gt(c),U=l.useCallback(()=>{if(!P.current||!k.current)return;const C={placement:t,strategy:n,middleware:m};W.current&&(C.platform=W.current),vc(P.current,k.current,C).then(Z=>{const J={...Z,isPositioned:B.current!==!1};F.current&&!Ct(R.current,J)&&(R.current=J,mr.flushSync(()=>{f(J)}))})},[m,t,n,W,B]);ht(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(C=>({...C,isPositioned:!1})))},[c]);const F=l.useRef(!1);ht(()=>(F.current=!0,()=>{F.current=!1}),[]),ht(()=>{if(E&&(P.current=E),S&&(k.current=S),E&&S){if(V.current)return V.current(E,S,U);U()}},[E,S,U,V,_]);const H=l.useMemo(()=>({reference:P,floating:k,setReference:A,setFloating:w}),[A,w]),L=l.useMemo(()=>({reference:E,floating:S}),[E,S]),$=l.useMemo(()=>{const C={position:n,left:0,top:0};if(!L.floating)return C;const Z=ur(L.floating,d.x),J=ur(L.floating,d.y);return a?{...C,transform:"translate("+Z+"px, "+J+"px)",..._o(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Z,top:J}},[n,a,L.floating,d.x,d.y]);return l.useMemo(()=>({...d,update:U,refs:H,elements:L,floatingStyles:$}),[d,U,H,L,$])}const wc=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?cr({element:r.current,padding:o}).fn(n):{}:r?cr({element:r,padding:o}).fn(n):{}}}},Cc=(e,t)=>({...dc(e),options:[e,t]}),Ec=(e,t)=>({...fc(e),options:[e,t]}),Sc=(e,t)=>({...hc(e),options:[e,t]}),kc=(e,t)=>({...mc(e),options:[e,t]}),Ac=(e,t)=>({...pc(e),options:[e,t]}),Rc=(e,t)=>({...gc(e),options:[e,t]}),Pc=(e,t)=>({...wc(e),options:[e,t]});var Nc="Arrow",Lo=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return p.jsx(Y.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Lo.displayName=Nc;var Oc=Lo;function Mc(e){const[t,n]=l.useState(void 0);return Ce(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const u=s.borderBoxSize,c=Array.isArray(u)?u[0]:u;i=c.inlineSize,a=c.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var kn="Popper",[Fo,zo]=ln(kn),[jc,Vo]=Fo(kn),$o=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return p.jsx(jc,{scope:t,anchor:r,onAnchorChange:o,children:n})};$o.displayName=kn;var Wo="PopperAnchor",Bo=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Vo(Wo,n),i=l.useRef(null),a=le(t,i),u=l.useRef(null);return l.useEffect(()=>{const c=u.current;u.current=(r==null?void 0:r.current)||i.current,c!==u.current&&s.onAnchorChange(u.current)}),r?null:p.jsx(Y.div,{...o,ref:a})});Bo.displayName=Wo;var An="PopperContent",[Tc,Dc]=Fo(An),Ho=l.forwardRef((e,t)=>{var D,X,G,se,je,Re;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:u=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:h="optimized",onPlaced:v,...g}=e,b=Vo(An,n),[y,A]=l.useState(null),w=le(t,Xe=>A(Xe)),[E,S]=l.useState(null),P=Mc(E),k=(P==null?void 0:P.width)??0,R=(P==null?void 0:P.height)??0,_=r+(s!=="center"?"-"+s:""),V=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},W=Array.isArray(c)?c:[c],B=W.length>0,U={padding:V,boundary:W.filter(_c),altBoundary:B},{refs:F,floatingStyles:H,placement:L,isPositioned:$,middlewareData:C}=xc({strategy:"fixed",placement:_,whileElementsMounted:(...Xe)=>uc(...Xe,{animationFrame:h==="always"}),elements:{reference:b.anchor},middleware:[Cc({mainAxis:o+R,alignmentAxis:i}),u&&Ec({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Sc():void 0,...U}),u&&kc({...U}),Ac({...U,apply:({elements:Xe,rects:Nn,availableWidth:ls,availableHeight:cs})=>{const{width:us,height:ds}=Nn.reference,st=Xe.floating.style;st.setProperty("--radix-popper-available-width",`${ls}px`),st.setProperty("--radix-popper-available-height",`${cs}px`),st.setProperty("--radix-popper-anchor-width",`${us}px`),st.setProperty("--radix-popper-anchor-height",`${ds}px`)}}),E&&Pc({element:E,padding:a}),Lc({arrowWidth:k,arrowHeight:R}),m&&Rc({strategy:"referenceHidden",...U})]}),[Z,J]=Zo(L),ue=We(v);Ce(()=>{$&&(ue==null||ue())},[$,ue]);const x=(D=C.arrow)==null?void 0:D.x,M=(X=C.arrow)==null?void 0:X.y,T=((G=C.arrow)==null?void 0:G.centerOffset)!==0,[j,z]=l.useState();return Ce(()=>{y&&z(window.getComputedStyle(y).zIndex)},[y]),p.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:$?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:j,"--radix-popper-transform-origin":[(se=C.transformOrigin)==null?void 0:se.x,(je=C.transformOrigin)==null?void 0:je.y].join(" "),...((Re=C.hide)==null?void 0:Re.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Tc,{scope:n,placedSide:Z,onArrowChange:S,arrowX:x,arrowY:M,shouldHideArrow:T,children:p.jsx(Y.div,{"data-side":Z,"data-align":J,...g,ref:w,style:{...g.style,animation:$?void 0:"none"}})})})});Ho.displayName=An;var Uo="PopperArrow",Ic={top:"bottom",right:"left",bottom:"top",left:"right"},Go=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Dc(Uo,r),i=Ic[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:p.jsx(Oc,{...o,ref:n,style:{...o.style,display:"block"}})})});Go.displayName=Uo;function _c(e){return e!==null}var Lc=e=>({name:"transformOrigin",options:e,fn(t){var b,y,A;const{placement:n,rects:r,middlewareData:o}=t,i=((b=o.arrow)==null?void 0:b.centerOffset)!==0,a=i?0:e.arrowWidth,u=i?0:e.arrowHeight,[c,d]=Zo(n),f={start:"0%",center:"50%",end:"100%"}[d],m=(((y=o.arrow)==null?void 0:y.x)??0)+a/2,h=(((A=o.arrow)==null?void 0:A.y)??0)+u/2;let v="",g="";return c==="bottom"?(v=i?f:`${m}px`,g=`${-u}px`):c==="top"?(v=i?f:`${m}px`,g=`${r.floating.height+u}px`):c==="right"?(v=`${-u}px`,g=i?f:`${h}px`):c==="left"&&(v=`${r.floating.width+u}px`,g=i?f:`${h}px`),{data:{x:v,y:g}}}});function Zo(e){const[t,n="center"]=e.split("-");return[t,n]}var Fc=$o,Yo=Bo,zc=Ho,Vc=Go,jt="Popover",[Ko]=ln(jt,[zo]),ot=zo(),[$c,Ae]=Ko(jt),Xo=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=ot(t),u=l.useRef(null),[c,d]=l.useState(!1),[f,m]=Ir({prop:r,defaultProp:o??!1,onChange:s,caller:jt});return p.jsx(Fc,{...a,children:p.jsx($c,{scope:t,contentId:me(),triggerRef:u,open:f,onOpenChange:m,onOpenToggle:l.useCallback(()=>m(h=>!h),[m]),hasCustomAnchor:c,onCustomAnchorAdd:l.useCallback(()=>d(!0),[]),onCustomAnchorRemove:l.useCallback(()=>d(!1),[]),modal:i,children:n})})};Xo.displayName=jt;var qo="PopoverAnchor",Wc=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ae(qo,n),s=ot(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return l.useEffect(()=>(i(),()=>a()),[i,a]),p.jsx(Yo,{...s,...r,ref:t})});Wc.displayName=qo;var Qo="PopoverTrigger",Jo=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ae(Qo,n),s=ot(n),i=le(t,o.triggerRef),a=p.jsx(Y.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":os(o.open),...r,ref:i,onClick:re(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:p.jsx(Yo,{asChild:!0,...s,children:a})});Jo.displayName=Qo;var Rn="PopoverPortal",[Bc,Hc]=Ko(Rn,{forceMount:void 0}),es=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=Ae(Rn,t);return p.jsx(Bc,{scope:t,forceMount:n,children:p.jsx(Ze,{present:n||s.open,children:p.jsx(dn,{asChild:!0,container:o,children:r})})})};es.displayName=Rn;var He="PopoverContent",ts=l.forwardRef((e,t)=>{const n=Hc(He,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=Ae(He,e.__scopePopover);return p.jsx(Ze,{present:r||s.open,children:s.modal?p.jsx(Gc,{...o,ref:t}):p.jsx(Zc,{...o,ref:t})})});ts.displayName=He;var Uc=Et.createSlot("PopoverContent.RemoveScroll"),Gc=l.forwardRef((e,t)=>{const n=Ae(He,e.__scopePopover),r=l.useRef(null),o=le(t,r),s=l.useRef(!1);return l.useEffect(()=>{const i=r.current;if(i)return Yr(i)},[]),p.jsx(fn,{as:Uc,allowPinchZoom:!0,children:p.jsx(ns,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:re(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),s.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:re(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0,c=a.button===2||u;s.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:re(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Zc=l.forwardRef((e,t)=>{const n=Ae(He,e.__scopePopover),r=l.useRef(!1),o=l.useRef(!1);return p.jsx(ns,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var u,c;(u=e.onInteractOutside)==null||u.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((c=n.triggerRef.current)==null?void 0:c.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),ns=l.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:d,...f}=e,m=Ae(He,n),h=ot(n);return zr(),p.jsx(un,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:p.jsx(cn,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:d,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:c,onDismiss:()=>m.onOpenChange(!1),children:p.jsx(zc,{"data-state":os(m.open),role:"dialog",id:m.contentId,...h,...f,ref:t,style:{...f.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)"}})})})}),rs="PopoverClose",Yc=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ae(rs,n);return p.jsx(Y.button,{type:"button",...r,ref:t,onClick:re(e.onClick,()=>o.onOpenChange(!1))})});Yc.displayName=rs;var Kc="PopoverArrow",Xc=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ot(n);return p.jsx(Vc,{...o,...r,ref:t})});Xc.displayName=Kc;function os(e){return e?"open":"closed"}var qc=Xo,Qc=Jo,Jc=es,ss=ts;const eu=qc,tu=Qc,is=l.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>p.jsx(Jc,{children:p.jsx(ss,{ref:o,align:t,sideOffset:n,className:Q("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",e),...r})}));is.displayName=ss.displayName;const as=K.createContext(null);function nu({children:e,values:t,defaultValues:n,onValuesChange:r,single:o=!1}){const[s,i]=K.useState(!1),[a,u]=K.useState(new Set(t??n)),c=t?new Set(t):a,[d,f]=K.useState(new Map);function m(v){const g=b=>{if(o)return b.has(v)?new Set:new Set([v]);const y=new Set(b);return y.has(v)?y.delete(v):y.add(v),y};u(g),r==null||r([...g(c)]),o&&i(!1)}const h=K.useCallback((v,g)=>{f(b=>b.get(v)===g?b:new Map(b).set(v,g))},[]);return p.jsx(as.Provider,{value:{open:s,setOpen:i,selectedValues:c,single:o,toggleValue:m,items:d,onItemAdded:h},children:p.jsx(eu,{open:s,onOpenChange:i,modal:!0,children:e})})}const ru=tt("flex items-center justify-between gap-2 overflow-hidden whitespace-nowrap rounded-md border text-sm outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{sizeVariance:{singleSmall:"bg-primary-container border-outline-medium w-117 h-10",singleMd:"bg-primary-container border-outline-medium w-238 h-12",singleLarge:"bg-transparent border-outline-medium w-242 h-12 "}},defaultVariants:{sizeVariance:"singleMd"}});function ou({className:e,sizeVariance:t,children:n,...r}){const{open:o}=Pn();return p.jsx(tu,{asChild:!0,children:p.jsxs(Tr,{...r,variant:r.variant??"outline",role:r.role??"combobox","aria-expanded":r["aria-expanded"]??o,className:Q(ru({sizeVariance:t}),e),children:[n,p.jsx(pi,{className:"size-4 shrink-0 opacity-50"})]})})}function su({placeholder:e,clickToRemove:t=!0,className:n,badgeVariant:r,badgeClassName:o,overflowBehavior:s="wrap-when-open",...i}){const{selectedValues:a,toggleValue:u,items:c,open:d,single:f}=Pn(),[m,h]=K.useState(0),v=K.useRef(null),g=K.useRef(null),b=s==="wrap"||s==="wrap-when-open"&&d,y=K.useCallback(()=>{if(v.current==null)return;const w=v.current,E=g.current,S=w.querySelectorAll("[data-selected-item]");E!=null&&(E.style.display="none"),S.forEach(k=>k.style.removeProperty("display"));let P=0;for(let k=S.length-1;k>=0;k--){const R=S[k];if(w.scrollWidth<=w.clientWidth)break;P=S.length-k,R.style.display="none",E==null||E.style.removeProperty("display")}h(P)},[]),A=K.useCallback(w=>{if(!w){v.current=null;return}v.current=w;const E=new MutationObserver(y),S=new ResizeObserver(cu(y,100));return E.observe(w,{childList:!0,attributes:!0,attributeFilter:["class","style"]}),S.observe(w),()=>{S.disconnect(),E.disconnect(),v.current=null}},[y]);return a.size===0&&e?p.jsx("span",{className:"min-w-0 overflow-hidden font-normal text-muted-foreground",children:e}):f&&a.size>0?p.jsx("span",{className:"min-w-0 overflow-hidden",children:c.get([...a][0])}):p.jsxs("div",{...i,ref:A,className:Q("flex w-full gap-1.5 overflow-hidden",b&&"h-full flex-wrap",n),children:[[...a].filter(w=>c.has(w)).map(w=>p.jsxs(Yt,{variant:r,"data-selected-item":!0,className:Q("group flex items-center gap-1",o),onClick:t?E=>{E.stopPropagation(),u(w)}:void 0,children:[c.get(w),t&&p.jsx(jr,{className:"size-2 text-muted-foreground"})]},w)),p.jsxs(Yt,{style:{display:m>0&&!b?"block":"none"},variant:r,className:o,reference:g,children:["+",m]})]})}function iu({search:e=!0,children:t,...n}){const r=typeof e=="object"?!0:e;return p.jsxs(p.Fragment,{children:[p.jsx("div",{style:{display:"none"},children:p.jsx(tn,{children:p.jsx(nn,{children:t})})}),p.jsx(is,{className:"min-w-[var(--radix-popover-trigger-width)] p-0",side:"bottom",align:"start",children:p.jsxs(tn,{...n,children:[r?p.jsx(Co,{placeholder:typeof e=="object"?e.placeholder:void 0}):p.jsx("button",{autoFocus:!0,className:"sr-only"}),p.jsxs(nn,{children:[r&&p.jsx(Eo,{children:typeof e=="object"?e.emptyMessage:void 0}),t]})]})})]})}function au({value:e,children:t,badgeLabel:n,onSelect:r,...o}){const{toggleValue:s,selectedValues:i,onItemAdded:a}=Pn(),u=i.has(e);return K.useEffect(()=>{a(e,n??t)},[e,t,a,n]),p.jsxs(ko,{...o,onSelect:()=>{s(e),r==null||r(e)},children:[p.jsx(fi,{className:Q("mr-2 size-4",u?"opacity-100":"opacity-0")}),t]})}function lu(e){return p.jsx(So,{...e})}function Pn(){const e=K.useContext(as);if(e==null)throw new Error("useMultiSelectContext must be used within a MultiSelectContext");return e}function cu(e,t){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}}function uu({single:e,items:t}){return p.jsxs(nu,{single:e,children:[p.jsx(ou,{className:"h-",children:p.jsx(su,{placeholder:"Select frameworks..."})}),p.jsx(iu,{children:p.jsx(lu,{children:t.map((n,r)=>p.jsx(au,{value:n,children:n},r))})})]})}function du({icon:e,placeholder:t,className:n,handleSearchChange:r,...o}){const s=i=>i.preventDefault();return p.jsx("header",{children:p.jsx("form",{onSubmit:s,children:p.jsxs("div",{className:ne("relative flex items-center gap-2 align-middle pt-0 pr-3 pb-0 pl-3"),children:[e&&p.jsx("span",{className:"pr-3 pl-3 absolute text-gray-500",children:e}),p.jsx("input",{className:ne("bg-table-line pt-0 pr-3 pl-10 pb-0 gap-2 border-2 border-outline-medium rounded-md outline-blue-800 caret-blue-800 text-gray-400",n),value:o.value,onChange:r,type:"text",id:"search",placeholder:t})]})})})}exports.BadgeUi=Kt;exports.BasicMultiSelect=uu;exports.Button=Pr;exports.ContentBlock=Js;exports.Input=du;exports.Table=si;exports.UserProfile=Xt;exports.cn=Q;
|
|
2
86
|
//# sourceMappingURL=index.cjs.map
|