@jiin.seok/formkit-react
Version:
A powerful React form library with Compound Component Pattern, built-in validation, and TypeScript support
1 lines • 139 kB
JavaScript
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),r=require("react-dom");function n(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)}const o=n(t),s=n(r);function i(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=i(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}const a=e=>{const t=d(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{const r=e.split("-");return""===r[0]&&1!==r.length&&r.shift(),l(r,t)||u(e)},getConflictingClassGroupIds:(e,t)=>{const o=r[e]||[];return t&&n[e]?[...o,...n[e]]:o}}},l=(e,t)=>{if(0===e.length)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?l(e.slice(1),n):void 0;if(o)return o;if(0===t.validators.length)return;const s=e.join("-");return t.validators.find(({validator:e})=>e(s))?.classGroupId},c=/^\[(.+)\]$/,u=e=>{if(c.test(e)){const t=c.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},d=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const o in r)f(r[o],n,o,t);return n},f=(e,t,r,n)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:m(t,e)).classGroupId=r)}if("function"==typeof e)return p(e)?void f(e(n),t,r,n):void t.validators.push({validator:e,classGroupId:r});Object.entries(e).forEach(([e,o])=>{f(o,m(t,e),r,n)})})},m=(e,t)=>{let r=e;return t.split("-").forEach(e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r},p=e=>e.isThemeGetter,h=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(o,s)=>{r.set(o,s),t++,t>e&&(t=0,n=r,r=new Map)};return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=n.get(e))?(o(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):o(e,t)}}},g=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=e=>{const t=[];let r,n=0,o=0,s=0;for(let l=0;l<e.length;l++){let i=e[l];if(0===n&&0===o){if(":"===i){t.push(e.slice(s,l)),s=l+1;continue}if("/"===i){r=l;continue}}"["===i?n++:"]"===i?n--:"("===i?o++:")"===i&&o--}const i=0===t.length?e:e.substring(s),a=v(i);return{modifiers:t,hasImportantModifier:a!==i,baseClassName:a,maybePostfixModifierPosition:r&&r>s?r-s:void 0}};if(t){const e=t+":",r=n;n=t=>t.startsWith(e)?r(t.substring(e.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:t,maybePostfixModifierPosition:void 0}}if(r){const e=n;n=t=>r({className:t,parseClassName:e})}return n},v=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,y=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(e=>[e,!0]));return e=>{if(e.length<=1)return e;const r=[];let n=[];return e.forEach(e=>{"["===e[0]||t[e]?(r.push(...n.sort(),e),n=[]):n.push(e)}),r.push(...n.sort()),r}},b=/\s+/;function w(){let e,t,r=0,n="";for(;r<arguments.length;)(e=arguments[r++])&&(t=x(e))&&(n&&(n+=" "),n+=t);return n}const x=e=>{if("string"==typeof e)return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=x(e[n]))&&(r&&(r+=" "),r+=t);return r};function k(e,...t){let r,n,o,s=function(l){const c=t.reduce((e,t)=>t(e),e());return r=(e=>({cache:h(e.cacheSize),parseClassName:g(e),sortModifiers:y(e),...a(e)}))(c),n=r.cache.get,o=r.cache.set,s=i,i(l)};function i(e){const t=n(e);if(t)return t;const s=((e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(b);let l="";for(let c=a.length-1;c>=0;c-=1){const e=a[c],{isExternal:t,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:m}=r(e);if(t){l=e+(l.length>0?" "+l:l);continue}let p=!!m,h=n(p?f.substring(0,m):f);if(!h){if(!p){l=e+(l.length>0?" "+l:l);continue}if(h=n(f),!h){l=e+(l.length>0?" "+l:l);continue}p=!1}const g=s(u).join(":"),v=d?g+"!":g,y=v+h;if(i.includes(y))continue;i.push(y);const b=o(h,p);for(let r=0;r<b.length;++r){const e=b[r];i.push(v+e)}l=e+(l.length>0?" "+l:l)}return l})(e,r);return o(e,s),s}return function(){return s(w.apply(null,arguments))}}const S=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},E=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,C=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_=/^\d+\/\d+$/,j=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,A=/\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$/,N=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,P=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,R=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,V=e=>_.test(e),D=e=>!!e&&!Number.isNaN(Number(e)),F=e=>!!e&&Number.isInteger(Number(e)),O=e=>e.endsWith("%")&&D(e.slice(0,-1)),T=e=>j.test(e),L=()=>!0,M=e=>A.test(e)&&!N.test(e),z=()=>!1,I=e=>P.test(e),W=e=>R.test(e),B=e=>!$(e)&&!X(e),H=e=>ne(e,ae,z),$=e=>E.test(e),U=e=>ne(e,le,M),q=e=>ne(e,ce,D),K=e=>ne(e,se,z),G=e=>ne(e,ie,W),Y=e=>ne(e,de,I),X=e=>C.test(e),Z=e=>oe(e,le),J=e=>oe(e,ue),Q=e=>oe(e,se),ee=e=>oe(e,ae),te=e=>oe(e,ie),re=e=>oe(e,de,!0),ne=(e,t,r)=>{const n=E.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},oe=(e,t,r=!1)=>{const n=C.exec(e);return!!n&&(n[1]?t(n[1]):r)},se=e=>"position"===e||"percentage"===e,ie=e=>"image"===e||"url"===e,ae=e=>"length"===e||"size"===e||"bg-size"===e,le=e=>"length"===e,ce=e=>"number"===e,ue=e=>"family-name"===e,de=e=>"shadow"===e,fe=k(()=>{const e=S("color"),t=S("font"),r=S("text"),n=S("font-weight"),o=S("tracking"),s=S("leading"),i=S("breakpoint"),a=S("container"),l=S("spacing"),c=S("radius"),u=S("shadow"),d=S("inset-shadow"),f=S("text-shadow"),m=S("drop-shadow"),p=S("blur"),h=S("perspective"),g=S("aspect"),v=S("ease"),y=S("animate"),b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",X,$],w=()=>[X,$,l],x=()=>[V,"full","auto",...w()],k=()=>[F,"none","subgrid",X,$],E=()=>["auto",{span:["full",F,X,$]},F,X,$],C=()=>[F,"auto",X,$],_=()=>["auto","min","max","fr",X,$],j=()=>["auto",...w()],A=()=>[V,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],N=()=>[e,X,$],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Q,K,{position:[X,$]}],R=()=>["auto","cover","contain",ee,H,{size:[X,$]}],M=()=>[O,Z,U],z=()=>["","none","full",c,X,$],I=()=>["",D,Z,U],W=()=>[D,O,Q,K],ne=()=>["","none",p,X,$],oe=()=>["none",D,X,$],se=()=>["none",D,X,$],ie=()=>[D,X,$],ae=()=>[V,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[T],breakpoint:[T],color:[L],container:[T],"drop-shadow":[T],ease:["in","out","in-out"],font:[B],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[T],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[T],shadow:[T],spacing:["px",D],text:[T],"text-shadow":[T],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",V,$,X,g]}],container:["container"],columns:[{columns:[D,$,X,a]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"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:b()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:x()}],"inset-x":[{"inset-x":x()}],"inset-y":[{"inset-y":x()}],start:[{start:x()}],end:[{end:x()}],top:[{top:x()}],right:[{right:x()}],bottom:[{bottom:x()}],left:[{left:x()}],visibility:["visible","invisible","collapse"],z:[{z:[F,"auto",X,$]}],basis:[{basis:[V,"full","auto",a,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[D,V,"auto","initial","none",$]}],grow:[{grow:["",D,X,$]}],shrink:[{shrink:["",D,X,$]}],order:[{order:[F,"first","last","none",X,$]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:E()}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:E()}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":_()}],"auto-rows":[{"auto-rows":_()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:A()}],w:[{w:[a,"screen",...A()]}],"min-w":[{"min-w":[a,"screen","none",...A()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...A()]}],h:[{h:["screen","lh",...A()]}],"min-h":[{"min-h":["screen","lh","none",...A()]}],"max-h":[{"max-h":["screen","lh",...A()]}],"font-size":[{text:["base",r,Z,U]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,X,q]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",O,$]}],"font-family":[{font:[J,$,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,X,$]}],"line-clamp":[{"line-clamp":[D,"none",X,q]}],leading:[{leading:[s,...w()]}],"list-image":[{"list-image":["none",X,$]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",X,$]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[D,"from-font","auto",X,U]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[D,"auto",X,$]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",X,$]}],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",X,$]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:R()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},F,X,$],radial:["",X,$],conic:[F,X,$]},te,G]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:M()}],"gradient-via-pos":[{via:M()}],"gradient-to-pos":[{to:M()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":I()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[D,X,$]}],"outline-w":[{outline:["",D,Z,U]}],"outline-color":[{outline:N()}],shadow:[{shadow:["","none",u,re,Y]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",d,re,Y]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[D,U]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":["none",f,re,Y]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[D,X,$]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"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":[D]}],"mask-image-linear-from-pos":[{"mask-linear-from":W()}],"mask-image-linear-to-pos":[{"mask-linear-to":W()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":W()}],"mask-image-t-to-pos":[{"mask-t-to":W()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":W()}],"mask-image-r-to-pos":[{"mask-r-to":W()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":W()}],"mask-image-b-to-pos":[{"mask-b-to":W()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":W()}],"mask-image-l-to-pos":[{"mask-l-to":W()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":W()}],"mask-image-x-to-pos":[{"mask-x-to":W()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":W()}],"mask-image-y-to-pos":[{"mask-y-to":W()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[X,$]}],"mask-image-radial-from-pos":[{"mask-radial-from":W()}],"mask-image-radial-to-pos":[{"mask-radial-to":W()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"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":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[D]}],"mask-image-conic-from-pos":[{"mask-conic-from":W()}],"mask-image-conic-to-pos":[{"mask-conic-to":W()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:R()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",X,$]}],filter:[{filter:["","none",X,$]}],blur:[{blur:ne()}],brightness:[{brightness:[D,X,$]}],contrast:[{contrast:[D,X,$]}],"drop-shadow":[{"drop-shadow":["","none",m,re,Y]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:["",D,X,$]}],"hue-rotate":[{"hue-rotate":[D,X,$]}],invert:[{invert:["",D,X,$]}],saturate:[{saturate:[D,X,$]}],sepia:[{sepia:["",D,X,$]}],"backdrop-filter":[{"backdrop-filter":["","none",X,$]}],"backdrop-blur":[{"backdrop-blur":ne()}],"backdrop-brightness":[{"backdrop-brightness":[D,X,$]}],"backdrop-contrast":[{"backdrop-contrast":[D,X,$]}],"backdrop-grayscale":[{"backdrop-grayscale":["",D,X,$]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[D,X,$]}],"backdrop-invert":[{"backdrop-invert":["",D,X,$]}],"backdrop-opacity":[{"backdrop-opacity":[D,X,$]}],"backdrop-saturate":[{"backdrop-saturate":[D,X,$]}],"backdrop-sepia":[{"backdrop-sepia":["",D,X,$]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",X,$]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[D,"initial",X,$]}],ease:[{ease:["linear","initial",v,X,$]}],delay:[{delay:[D,X,$]}],animate:[{animate:["none",y,X,$]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,X,$]}],"perspective-origin":[{"perspective-origin":b()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":["scale-3d"],skew:[{skew:ie()}],"skew-x":[{"skew-x":ie()}],"skew-y":[{"skew-y":ie()}],transform:[{transform:[X,$,"","none","gpu","cpu"]}],"transform-origin":[{origin:b()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ae()}],"translate-x":[{"translate-x":ae()}],"translate-y":[{"translate-y":ae()}],"translate-z":[{"translate-z":ae()}],"translate-none":["translate-none"],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"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",X,$]}],"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":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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",X,$]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[D,Z,U,q]}],stroke:[{stroke:["none",...N()]}],"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"]}});function me(...e){return fe(function(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=i(e))&&(n&&(n+=" "),n+=t);return n}(e))}const pe=o.forwardRef(({className:t,variant:r="default",size:n="default",...o},s)=>e.jsx("button",{className:me("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"}[r],{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}[n],t),ref:s,...o}));function he(e,[t,r]){return Math.min(r,Math.max(t,e))}function ge(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function ve(t,r=[]){let n=[];const s=()=>{const e=n.map(e=>o.createContext(e));return function(r){const n=r?.[t]||e;return o.useMemo(()=>({[`__scope${t}`]:{...r,[t]:n}}),[r,n])}};return s.scopeName=t,[function(r,s){const i=o.createContext(s),a=n.length;n=[...n,s];const l=r=>{const{scope:n,children:s,...l}=r,c=n?.[t]?.[a]||i,u=o.useMemo(()=>l,Object.values(l));return e.jsx(c.Provider,{value:u,children:s})};return l.displayName=r+"Provider",[l,function(e,n){const l=n?.[t]?.[a]||i,c=o.useContext(l);if(c)return c;if(void 0!==s)return s;throw new Error(`\`${e}\` must be used within \`${r}\``)}]},ye(s,...r)]}function ye(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const n=r.reduce((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]}),{});return o.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}function be(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function we(...e){return t=>{let r=!1;const n=e.map(e=>{const n=be(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){const r=n[t];"function"==typeof r?r():be(e[t],null)}}}}function xe(...e){return o.useCallback(we(...e),e)}function ke(t){const r=Se(t),n=o.forwardRef((t,n)=>{const{children:s,...i}=t,a=o.Children.toArray(s),l=a.find(Ce);if(l){const t=l.props.children,s=a.map(e=>e===l?o.Children.count(t)>1?o.Children.only(null):o.isValidElement(t)?t.props.children:null:e);return e.jsx(r,{...i,ref:n,children:o.isValidElement(t)?o.cloneElement(t,void 0,s):null})}return e.jsx(r,{...i,ref:n,children:s})});return n.displayName=`${t}.Slot`,n}function Se(e){const t=o.forwardRef((e,t)=>{const{children:r,...n}=e;if(o.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r),s=function(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...e)=>{const t=s(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...s}:"className"===n&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==o.Fragment&&(s.ref=t?we(t,e):e),o.cloneElement(r,s)}return o.Children.count(r)>1?o.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}pe.displayName="Button";var Ee=Symbol("radix.slottable");function Ce(e){return o.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Ee}var _e=o.createContext(void 0);var je=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,r)=>{const n=ke(`Primitive.${r}`),s=o.forwardRef((t,o)=>{const{asChild:s,...i}=t,a=s?n:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e.jsx(a,{...i,ref:o})});return s.displayName=`Primitive.${r}`,{...t,[r]:s}},{});function Ae(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>(...e)=>t.current?.(...e),[])}var Ne,Pe="dismissableLayer.update",Re="dismissableLayer.pointerDownOutside",Ve="dismissableLayer.focusOutside",De=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Fe=o.forwardRef((t,r)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:c,...u}=t,d=o.useContext(De),[f,m]=o.useState(null),p=f?.ownerDocument??globalThis?.document,[,h]=o.useState({}),g=xe(r,e=>m(e)),v=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(y),w=f?v.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,k=w>=b,S=function(e,t=globalThis?.document){const r=Ae(e),n=o.useRef(!1),s=o.useRef(()=>{});return o.useEffect(()=>{const e=e=>{if(e.target&&!n.current){let n=function(){Te(Re,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",s.current),s.current=n,t.addEventListener("click",s.current,{once:!0})):n()}else t.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}(e=>{const t=e.target,r=[...d.branches].some(e=>e.contains(t));k&&!r&&(i?.(e),l?.(e),e.defaultPrevented||c?.())},p),E=function(e,t=globalThis?.document){const r=Ae(e),n=o.useRef(!1);return o.useEffect(()=>{const e=e=>{if(e.target&&!n.current){Te(Ve,r,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}(e=>{const t=e.target;[...d.branches].some(e=>e.contains(t))||(a?.(e),l?.(e),e.defaultPrevented||c?.())},p);return function(e,t=globalThis?.document){const r=Ae(e);o.useEffect(()=>{const e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{w===d.layers.size-1&&(s?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))},p),o.useEffect(()=>{if(f)return n&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(Ne=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Oe(),()=>{n&&1===d.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=Ne)}},[f,p,n,d]),o.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Oe())},[f,d]),o.useEffect(()=>{const e=()=>h({});return document.addEventListener(Pe,e),()=>document.removeEventListener(Pe,e)},[]),e.jsx(je.div,{...u,ref:g,style:{pointerEvents:x?k?"auto":"none":void 0,...t.style},onFocusCapture:ge(t.onFocusCapture,E.onFocusCapture),onBlurCapture:ge(t.onBlurCapture,E.onBlurCapture),onPointerDownCapture:ge(t.onPointerDownCapture,S.onPointerDownCapture)})});Fe.displayName="DismissableLayer";function Oe(){const e=new CustomEvent(Pe);document.dispatchEvent(e)}function Te(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?function(e,t){e&&s.flushSync(()=>e.dispatchEvent(t))}(o,i):o.dispatchEvent(i)}o.forwardRef((t,r)=>{const n=o.useContext(De),s=o.useRef(null),i=xe(r,s);return o.useEffect(()=>{const e=s.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),e.jsx(je.div,{...t,ref:i})}).displayName="DismissableLayerBranch";var Le=0;function Me(){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 ze="focusScope.autoFocusOnMount",Ie="focusScope.autoFocusOnUnmount",We={bubbles:!1,cancelable:!0},Be=o.forwardRef((t,r)=>{const{loop:n=!1,trapped:s=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...l}=t,[c,u]=o.useState(null),d=Ae(i),f=Ae(a),m=o.useRef(null),p=xe(r,e=>u(e)),h=o.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;o.useEffect(()=>{if(s){let e=function(e){if(h.paused||!c)return;const t=e.target;c.contains(t)?m.current=t:qe(m.current,{select:!0})},t=function(e){if(h.paused||!c)return;const t=e.relatedTarget;null!==t&&(c.contains(t)||qe(m.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&qe(c)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const n=new MutationObserver(r);return c&&n.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[s,c,h.paused]),o.useEffect(()=>{if(c){Ke.add(h);const t=document.activeElement;if(!c.contains(t)){const r=new CustomEvent(ze,We);c.addEventListener(ze,d),c.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(qe(n,{select:t}),document.activeElement!==r)return}((e=He(c),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&qe(c))}return()=>{c.removeEventListener(ze,d),setTimeout(()=>{const e=new CustomEvent(Ie,We);c.addEventListener(Ie,f),c.dispatchEvent(e),e.defaultPrevented||qe(t??document.body,{select:!0}),c.removeEventListener(Ie,f),Ke.remove(h)},0)}}var e},[c,d,f,h]);const g=o.useCallback(e=>{if(!n&&!s)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){const t=e.currentTarget,[o,s]=function(e){const t=He(e),r=$e(t,e),n=$e(t.reverse(),e);return[r,n]}(t);o&&s?e.shiftKey||r!==s?e.shiftKey&&r===o&&(e.preventDefault(),n&&qe(s,{select:!0})):(e.preventDefault(),n&&qe(o,{select:!0})):r===t&&e.preventDefault()}},[n,s,h.paused]);return e.jsx(je.div,{tabIndex:-1,...l,ref:p,onKeyDown:g})});function He(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function $e(e,t){for(const r of e)if(!Ue(r,{upTo:t}))return r}function Ue(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function qe(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}Be.displayName="FocusScope";var Ke=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=Ge(e,t),e.unshift(t)},remove(t){e=Ge(e,t),e[0]?.resume()}}}();function Ge(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}var Ye=globalThis?.document?o.useLayoutEffect:()=>{},Xe=o[" useId ".trim().toString()]||(()=>{}),Ze=0;function Je(e){const[t,r]=o.useState(Xe());return Ye(()=>{r(e=>e??String(Ze++))},[e]),t?`radix-${t}`:""}const Qe=["top","right","bottom","left"],et=Math.min,tt=Math.max,rt=Math.round,nt=Math.floor,ot=e=>({x:e,y:e}),st={left:"right",right:"left",bottom:"top",top:"bottom"},it={start:"end",end:"start"};function at(e,t,r){return tt(e,et(t,r))}function lt(e,t){return"function"==typeof e?e(t):e}function ct(e){return e.split("-")[0]}function ut(e){return e.split("-")[1]}function dt(e){return"x"===e?"y":"x"}function ft(e){return"y"===e?"height":"width"}const mt=new Set(["top","bottom"]);function pt(e){return mt.has(ct(e))?"y":"x"}function ht(e){return dt(pt(e))}function gt(e){return e.replace(/start|end/g,e=>it[e])}const vt=["left","right"],yt=["right","left"],bt=["top","bottom"],wt=["bottom","top"];function xt(e,t,r,n){const o=ut(e);let s=function(e,t,r){switch(e){case"top":case"bottom":return r?t?yt:vt:t?vt:yt;case"left":case"right":return t?bt:wt;default:return[]}}(ct(e),"start"===r,n);return o&&(s=s.map(e=>e+"-"+o),t&&(s=s.concat(s.map(gt)))),s}function kt(e){return e.replace(/left|right|bottom|top/g,e=>st[e])}function St(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Et(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function Ct(e,t,r){let{reference:n,floating:o}=e;const s=pt(t),i=ht(t),a=ft(i),l=ct(t),c="y"===s,u=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,f=n[a]/2-o[a]/2;let m;switch(l){case"top":m={x:u,y:n.y-o.height};break;case"bottom":m={x:u,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:d};break;case"left":m={x:n.x-o.width,y:d};break;default:m={x:n.x,y:n.y}}switch(ut(t)){case"start":m[i]-=f*(r&&c?-1:1);break;case"end":m[i]+=f*(r&&c?-1:1)}return m}async function _t(e,t){var r;void 0===t&&(t={});const{x:n,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:m=0}=lt(t,e),p=St(m),h=a[f?"floating"===d?"reference":"floating":d],g=Et(await s.getClippingRect({element:null==(r=await(null==s.isElement?void 0:s.isElement(h)))||r?h:h.contextElement||await(null==s.getDocumentElement?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,y=await(null==s.getOffsetParent?void 0:s.getOffsetParent(a.floating)),b=await(null==s.isElement?void 0:s.isElement(y))&&await(null==s.getScale?void 0:s.getScale(y))||{x:1,y:1},w=Et(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:y,strategy:l}):v);return{top:(g.top-w.top+p.top)/b.y,bottom:(w.bottom-g.bottom+p.bottom)/b.y,left:(g.left-w.left+p.left)/b.x,right:(w.right-g.right+p.right)/b.x}}function jt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function At(e){return Qe.some(t=>e[t]>=0)}const Nt=new Set(["left","top"]);function Pt(){return"undefined"!=typeof window}function Rt(e){return Ft(e)?(e.nodeName||"").toLowerCase():"#document"}function Vt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Dt(e){var t;return null==(t=(Ft(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Ft(e){return!!Pt()&&(e instanceof Node||e instanceof Vt(e).Node)}function Ot(e){return!!Pt()&&(e instanceof Element||e instanceof Vt(e).Element)}function Tt(e){return!!Pt()&&(e instanceof HTMLElement||e instanceof Vt(e).HTMLElement)}function Lt(e){return!(!Pt()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Vt(e).ShadowRoot)}const Mt=new Set(["inline","contents"]);function zt(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Zt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Mt.has(o)}const It=new Set(["table","td","th"]);function Wt(e){return It.has(Rt(e))}const Bt=[":popover-open",":modal"];function Ht(e){return Bt.some(t=>{try{return e.matches(t)}catch(r){return!1}})}const $t=["transform","translate","scale","rotate","perspective"],Ut=["transform","translate","scale","rotate","perspective","filter"],qt=["paint","layout","strict","content"];function Kt(e){const t=Gt(),r=Ot(e)?Zt(e):e;return $t.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||Ut.some(e=>(r.willChange||"").includes(e))||qt.some(e=>(r.contain||"").includes(e))}function Gt(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Yt=new Set(["html","body","#document"]);function Xt(e){return Yt.has(Rt(e))}function Zt(e){return Vt(e).getComputedStyle(e)}function Jt(e){return Ot(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qt(e){if("html"===Rt(e))return e;const t=e.assignedSlot||e.parentNode||Lt(e)&&e.host||Dt(e);return Lt(t)?t.host:t}function er(e){const t=Qt(e);return Xt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Tt(t)&&zt(t)?t:er(t)}function tr(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const o=er(e),s=o===(null==(n=e.ownerDocument)?void 0:n.body),i=Vt(o);if(s){const e=rr(i);return t.concat(i,i.visualViewport||[],zt(o)?o:[],e&&r?tr(e):[])}return t.concat(o,tr(o,[],r))}function rr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nr(e){const t=Zt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Tt(e),s=o?e.offsetWidth:r,i=o?e.offsetHeight:n,a=rt(r)!==s||rt(n)!==i;return a&&(r=s,n=i),{width:r,height:n,$:a}}function or(e){return Ot(e)?e:e.contextElement}function sr(e){const t=or(e);if(!Tt(t))return ot(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=nr(t);let i=(s?rt(r.width):r.width)/n,a=(s?rt(r.height):r.height)/o;return i&&Number.isFinite(i)||(i=1),a&&Number.isFinite(a)||(a=1),{x:i,y:a}}const ir=ot(0);function ar(e){const t=Vt(e);return Gt()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ir}function lr(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const o=e.getBoundingClientRect(),s=or(e);let i=ot(1);t&&(n?Ot(n)&&(i=sr(n)):i=sr(e));const a=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==Vt(e))&&t}(s,r,n)?ar(s):ot(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){const e=Vt(s),t=n&&Ot(n)?Vt(n):n;let r=e,o=rr(r);for(;o&&n&&t!==r;){const e=sr(o),t=o.getBoundingClientRect(),n=Zt(o),s=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=s,c+=i,r=Vt(o),o=rr(r)}}return Et({width:u,height:d,x:l,y:c})}function cr(e,t){const r=Jt(e).scrollLeft;return t?t.left+r:lr(Dt(e)).left+r}function ur(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-cr(e,r),y:r.top+t.scrollTop}}const dr=new Set(["absolute","fixed"]);function fr(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=Vt(e),n=Dt(e),o=r.visualViewport;let s=n.clientWidth,i=n.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const e=Gt();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}const c=cr(n);if(c<=0){const e=n.ownerDocument,t=e.body,r=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,i=Math.abs(n.clientWidth-t.clientWidth-o);i<=25&&(s-=i)}else c<=25&&(s+=c);return{width:s,height:i,x:a,y:l}}(e,r);else if("document"===t)n=function(e){const t=Dt(e),r=Jt(e),n=e.ownerDocument.body,o=tt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=tt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+cr(e);const a=-r.scrollTop;return"rtl"===Zt(n).direction&&(i+=tt(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:i,y:a}}(Dt(e));else if(Ot(t))n=function(e,t){const r=lr(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=Tt(e)?sr(e):ot(1);return{width:e.clientWidth*s.x,height:e.clientHeight*s.y,x:o*s.x,y:n*s.y}}(t,r);else{const r=ar(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Et(n)}function mr(e,t){const r=Qt(e);return!(r===t||!Ot(r)||Xt(r))&&("fixed"===Zt(r).position||mr(r,t))}function pr(e,t,r){const n=Tt(t),o=Dt(t),s="fixed"===r,i=lr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=ot(0);function c(){l.x=cr(o)}if(n||!n&&!s)if(("body"!==Rt(t)||zt(o))&&(a=Jt(t)),n){const e=lr(t,!0,s,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();s&&!n&&o&&c();const u=!o||n||s?ot(0):ur(o,a);return{x:i.left+a.scrollLeft-l.x-u.x,y:i.top+a.scrollTop-l.y-u.y,width:i.width,height:i.height}}function hr(e){return"static"===Zt(e).position}function gr(e,t){if(!Tt(e)||"fixed"===Zt(e).position)return null;if(t)return t(e);let r=e.offsetParent;return Dt(e)===r&&(r=r.ownerDocument.body),r}function vr(e,t){const r=Vt(e);if(Ht(e))return r;if(!Tt(e)){let t=Qt(e);for(;t&&!Xt(t);){if(Ot(t)&&!hr(t))return t;t=Qt(t)}return r}let n=gr(e,t);for(;n&&Wt(n)&&hr(n);)n=gr(n,t);return n&&Xt(n)&&hr(n)&&!Kt(n)?r:n||function(e){let t=Qt(e);for(;Tt(t)&&!Xt(t);){if(Kt(t))return t;if(Ht(t))return null;t=Qt(t)}return null}(e)||r}const yr={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s="fixed"===o,i=Dt(n),a=!!t&&Ht(t.floating);if(n===i||a&&s)return r;let l={scrollLeft:0,scrollTop:0},c=ot(1);const u=ot(0),d=Tt(n);if((d||!d&&!s)&&(("body"!==Rt(n)||zt(i))&&(l=Jt(n)),Tt(n))){const e=lr(n);c=sr(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}const f=!i||d||s?ot(0):ur(i,l);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:r.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:Dt,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[..."clippingAncestors"===r?Ht(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=tr(e,[],!1).filter(e=>Ot(e)&&"body"!==Rt(e)),o=null;const s="fixed"===Zt(e).position;let i=s?Qt(e):e;for(;Ot(i)&&!Xt(i);){const t=Zt(i),r=Kt(i);r||"fixed"!==t.position||(o=null),(s?!r&&!o:!r&&"static"===t.position&&o&&dr.has(o.position)||zt(i)&&!r&&mr(e,i))?n=n.filter(e=>e!==i):o=t,i=Qt(i)}return t.set(e,n),n}(t,this._c):[].concat(r),n],i=s[0],a=s.reduce((e,r)=>{const n=fr(t,r,o);return e.top=tt(n.top,e.top),e.right=et(n.right,e.right),e.bottom=et(n.bottom,e.bottom),e.left=tt(n.left,e.left),e},fr(t,i,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:vr,getElementRects:async function(e){const t=this.getOffsetParent||vr,r=this.getDimensions,n=await r(e.floating);return{reference:pr(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=nr(e);return{width:t,height:r}},getScale:sr,isElement:Ot,isRTL:function(e){return"rtl"===Zt(e).direction}};function br(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function wr(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=n,c=or(e),u=o||s?[...c?tr(c):[],...tr(t)]:[];u.forEach(e=>{o&&e.addEventListener("scroll",r,{passive:!0}),s&&e.addEventListener("resize",r)});const d=c&&a?function(e,t){let r,n=null;const o=Dt(e);function s(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function i(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),s();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:m}=c;if(a||t(),!f||!m)return;const p={rootMargin:-nt(d)+"px "+-nt(o.clientWidth-(u+f))+"px "+-nt(o.clientHeight-(d+m))+"px "+-nt(u)+"px",threshold:tt(0,et(1,l))||1};let h=!0;function g(t){const n=t[0].intersectionRatio;if(n!==l){if(!h)return i();n?i(!1,n):r=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==n||br(c,e.getBoundingClientRect())||i(),h=!1}try{n=new IntersectionObserver(g,{...p,root:o.ownerDocument})}catch(v){n=new IntersectionObserver(g,p)}n.observe(e)}(!0),s}(c,r):null;let f,m=-1,p=null;i&&(p=new ResizeObserver(e=>{let[n]=e;n&&n.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),r()}),c&&!l&&p.observe(c),p.observe(t));let h=l?lr(e):null;return l&&function