@murabei-data-science/pumpwood-ui 1.3.2 → 1.3.3
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/README.md +2 -2
- package/dist/components.d.ts +1 -1
- package/dist/components.esm.js +1 -1
- package/dist/components.js +1 -1
- package/dist/design-system.d.ts +3 -37
- package/dist/design-system.esm.js +5 -5
- package/dist/design-system.js +5 -5
- package/dist/index.css +1 -1
- package/dist/types/components/DownloadButton/index.d.ts +1 -1
- package/dist/types/design-system/index.d.ts +0 -1
- package/dist/types/index.d.ts +0 -1
- package/package.json +1 -1
- package/dist/index.d.ts +0 -1599
- package/dist/index.esm.js +0 -39
- package/dist/index.js +0 -40
- package/dist/types/components/M2MTable/index.d.ts +0 -35
- package/dist/types/design-system/M2MTable/index.d.ts +0 -35
package/dist/index.esm.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import*as e from"react";import t,{forwardRef as n,useMemo as o,useRef as r,useReducer as a,useEffect as i,useCallback as s,useImperativeHandle as l,Fragment as c,useState as d,createElement as u,isValidElement as p,createContext as f,useContext as m,useLayoutEffect as h,useId as g}from"react";import{jsx as v,jsxs as y,Fragment as b}from"react/jsx-runtime";import*as x from"react-dom";import w from"react-dom";import k from"swr";function N(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function C(...e){return t=>{let n=!1;const o=e.map(e=>{const o=N(e,t);return n||"function"!=typeof o||(n=!0),o});if(n)return()=>{for(let t=0;t<o.length;t++){const n=o[t];"function"==typeof n?n():N(e[t],null)}}}}function _(...t){return e.useCallback(C(...t),t)}var D=Symbol.for("react.lazy"),S=e[" use ".trim().toString()];function E(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===D&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function M(t){const n=T(t),o=e.forwardRef((t,o)=>{let{children:r,...a}=t;E(r)&&"function"==typeof S&&(r=S(r._payload));const i=e.Children.toArray(r),s=i.find(P);if(s){const t=s.props.children,r=i.map(n=>n===s?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n);return v(n,{...a,ref:o,children:e.isValidElement(t)?e.cloneElement(t,void 0,r):null})}return v(n,{...a,ref:o,children:r})});return o.displayName=`${t}.Slot`,o}var O=M("Slot");function T(t){const n=e.forwardRef((t,n)=>{let{children:o,...r}=t;if(E(o)&&"function"==typeof S&&(o=S(o._payload)),e.isValidElement(o)){const t=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(o),a=function(e,t){const n={...t};for(const o in t){const r=e[o],a=t[o];/^on[A-Z]/.test(o)?r&&a?n[o]=(...e)=>{const t=a(...e);return r(...e),t}:r&&(n[o]=r):"style"===o?n[o]={...r,...a}:"className"===o&&(n[o]=[r,a].filter(Boolean).join(" "))}return{...e,...n}}(r,o.props);return o.type!==e.Fragment&&(a.ref=n?C(n,t):t),e.cloneElement(o,a)}return e.Children.count(o)>1?e.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var R=Symbol("radix.slottable");function P(t){return e.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===R}function A(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=A(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function I(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=A(e))&&(o&&(o+=" "),o+=t);return o}const j=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,F=I,L=(e,t)=>n=>{var o;if(null==(null==t?void 0:t.variants))return F(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:r,defaultVariants:a}=t,i=Object.keys(r).map(e=>{const t=null==n?void 0:n[e],o=null==a?void 0:a[e];if(null===t)return null;const i=j(t)||j(o);return r[e][i]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,o]=t;return void 0===o||(e[n]=o),e},{}),l=null==t||null===(o=t.compoundVariants)||void 0===o?void 0:o.reduce((e,t)=>{let{class:n,className:o,...r}=t;return Object.entries(r).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...s}[t]):{...a,...s}[t]===n})?[...e,n,o]:e},[]);return F(e,i,l,null==n?void 0:n.class,null==n?void 0:n.className)},z=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),W="-",$=[],B=e=>{const t=Y(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return H(e);const n=e.split(W),o=""===n[0]&&n.length>1?1:0;return q(n,o,t)},getConflictingClassGroupIds:(e,t)=>{if(t){const t=o[e],r=n[e];return t?r?((e,t)=>{const n=new Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let o=0;o<t.length;o++)n[e.length+o]=t[o];return n})(r,t):t:r||$}return n[e]||$}}},q=(e,t,n)=>{if(0===e.length-t)return n.classGroupId;const o=e[t],r=n.nextPart.get(o);if(r){const n=q(e,t+1,r);if(n)return n}const a=n.validators;if(null===a)return;const i=0===t?e.join(W):e.slice(t).join(W),s=a.length;for(let e=0;e<s;e++){const t=a[e];if(t.validator(i))return t.classGroupId}},H=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),o=t.slice(0,n);return o?"arbitrary.."+o:void 0})(),Y=e=>{const{theme:t,classGroups:n}=e;return V(n,t)},V=(e,t)=>{const n=z();for(const o in e){const r=e[o];U(r,n,o,t)}return n},U=(e,t,n,o)=>{const r=e.length;for(let a=0;a<r;a++){const r=e[a];K(r,t,n,o)}},K=(e,t,n,o)=>{"string"!=typeof e?"function"!=typeof e?X(e,t,n,o):Z(e,t,n,o):G(e,t,n)},G=(e,t,n)=>{(""===e?t:Q(t,e)).classGroupId=n},Z=(e,t,n,o)=>{J(e)?U(e(o),t,n,o):(null===t.validators&&(t.validators=[]),t.validators.push(((e,t)=>({classGroupId:e,validator:t}))(n,e)))},X=(e,t,n,o)=>{const r=Object.entries(e),a=r.length;for(let e=0;e<a;e++){const[a,i]=r[e];U(i,Q(t,a),n,o)}},Q=(e,t)=>{let n=e;const o=t.split(W),r=o.length;for(let e=0;e<r;e++){const t=o[e];let r=n.nextPart.get(t);r||(r=z(),n.nextPart.set(t,r)),n=r}return n},J=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,ee=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),o=Object.create(null);const r=(r,a)=>{n[r]=a,t++,t>e&&(t=0,o=n,n=Object.create(null))};return{get(e){let t=n[e];return void 0!==t?t:void 0!==(t=o[e])?(r(e,t),t):void 0},set(e,t){e in n?n[e]=t:r(e,t)}}},te=[],ne=(e,t,n,o,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:o,isExternal:r}),oe=e=>{const{prefix:t,experimentalParseClassName:n}=e;let o=e=>{const t=[];let n,o=0,r=0,a=0;const i=e.length;for(let s=0;s<i;s++){const i=e[s];if(0===o&&0===r){if(":"===i){t.push(e.slice(a,s)),a=s+1;continue}if("/"===i){n=s;continue}}"["===i?o++:"]"===i?o--:"("===i?r++:")"===i&&r--}const s=0===t.length?e:e.slice(a);let l=s,c=!1;s.endsWith("!")?(l=s.slice(0,-1),c=!0):s.startsWith("!")&&(l=s.slice(1),c=!0);return ne(t,c,l,n&&n>a?n-a:void 0)};if(t){const e=t+":",n=o;o=t=>t.startsWith(e)?n(t.slice(e.length)):ne(te,!1,t,void 0,!0)}if(n){const e=o;o=t=>n({className:t,parseClassName:e})}return o},re=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{const n=[];let o=[];for(let r=0;r<e.length;r++){const a=e[r],i="["===a[0],s=t.has(a);i||s?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(a)):o.push(a)}return o.length>0&&(o.sort(),n.push(...o)),n}},ae=/\s+/,ie=e=>{if("string"==typeof e)return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=ie(e[o]))&&(n&&(n+=" "),n+=t);return n},se=(e,...t)=>{let n,o,r,a;const i=e=>{const t=o(e);if(t)return t;const a=((e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:r,sortModifiers:a}=t,i=[],s=e.trim().split(ae);let l="";for(let e=s.length-1;e>=0;e-=1){const t=s[e],{isExternal:c,modifiers:d,hasImportantModifier:u,baseClassName:p,maybePostfixModifierPosition:f}=n(t);if(c){l=t+(l.length>0?" "+l:l);continue}let m=!!f,h=o(m?p.substring(0,f):p);if(!h){if(!m){l=t+(l.length>0?" "+l:l);continue}if(h=o(p),!h){l=t+(l.length>0?" "+l:l);continue}m=!1}const g=0===d.length?"":1===d.length?d[0]:a(d).join(":"),v=u?g+"!":g,y=v+h;if(i.indexOf(y)>-1)continue;i.push(y);const b=r(h,m);for(let e=0;e<b.length;++e){const t=b[e];i.push(v+t)}l=t+(l.length>0?" "+l:l)}return l})(e,n);return r(e,a),a};return a=s=>{const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:ee(e.cacheSize),parseClassName:oe(e),sortModifiers:re(e),...B(e)}))(l),o=n.cache.get,r=n.cache.set,a=i,i(s)},(...e)=>a(((...e)=>{let t,n,o=0,r="";for(;o<e.length;)(t=e[o++])&&(n=ie(t))&&(r&&(r+=" "),r+=n);return r})(...e))},le=[],ce=e=>{const t=t=>t[e]||le;return t.isThemeGetter=!0,t},de=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ue=/^\((?:(\w[\w-]*):)?(.+)\)$/i,pe=/^\d+\/\d+$/,fe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,me=/\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$/,he=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ge=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ve=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ye=e=>pe.test(e),be=e=>!!e&&!Number.isNaN(Number(e)),xe=e=>!!e&&Number.isInteger(Number(e)),we=e=>e.endsWith("%")&&be(e.slice(0,-1)),ke=e=>fe.test(e),Ne=()=>!0,Ce=e=>me.test(e)&&!he.test(e),_e=()=>!1,De=e=>ge.test(e),Se=e=>ve.test(e),Ee=e=>!Oe(e)&&!je(e),Me=e=>qe(e,Ue,_e),Oe=e=>de.test(e),Te=e=>qe(e,Ke,Ce),Re=e=>qe(e,Ge,be),Pe=e=>qe(e,Ye,_e),Ae=e=>qe(e,Ve,Se),Ie=e=>qe(e,Xe,De),je=e=>ue.test(e),Fe=e=>He(e,Ke),Le=e=>He(e,Ze),ze=e=>He(e,Ye),We=e=>He(e,Ue),$e=e=>He(e,Ve),Be=e=>He(e,Xe,!0),qe=(e,t,n)=>{const o=de.exec(e);return!!o&&(o[1]?t(o[1]):n(o[2]))},He=(e,t,n=!1)=>{const o=ue.exec(e);return!!o&&(o[1]?t(o[1]):n)},Ye=e=>"position"===e||"percentage"===e,Ve=e=>"image"===e||"url"===e,Ue=e=>"length"===e||"size"===e||"bg-size"===e,Ke=e=>"length"===e,Ge=e=>"number"===e,Ze=e=>"family-name"===e,Xe=e=>"shadow"===e,Qe=se(()=>{const e=ce("color"),t=ce("font"),n=ce("text"),o=ce("font-weight"),r=ce("tracking"),a=ce("leading"),i=ce("breakpoint"),s=ce("container"),l=ce("spacing"),c=ce("radius"),d=ce("shadow"),u=ce("inset-shadow"),p=ce("text-shadow"),f=ce("drop-shadow"),m=ce("blur"),h=ce("perspective"),g=ce("aspect"),v=ce("ease"),y=ce("animate"),b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",je,Oe],x=()=>[je,Oe,l],w=()=>[ye,"full","auto",...x()],k=()=>[xe,"none","subgrid",je,Oe],N=()=>["auto",{span:["full",xe,je,Oe]},xe,je,Oe],C=()=>[xe,"auto",je,Oe],_=()=>["auto","min","max","fr",je,Oe],D=()=>["auto",...x()],S=()=>[ye,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],E=()=>[e,je,Oe],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",ze,Pe,{position:[je,Oe]}],O=()=>["auto","cover","contain",We,Me,{size:[je,Oe]}],T=()=>[we,Fe,Te],R=()=>["","none","full",c,je,Oe],P=()=>["",be,Fe,Te],A=()=>[be,we,ze,Pe],I=()=>["","none",m,je,Oe],j=()=>["none",be,je,Oe],F=()=>["none",be,je,Oe],L=()=>[be,je,Oe],z=()=>[ye,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ke],breakpoint:[ke],color:[Ne],container:[ke],"drop-shadow":[ke],ease:["in","out","in-out"],font:[Ee],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ke],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ke],shadow:[ke],spacing:["px",be],text:[ke],"text-shadow":[ke],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ye,Oe,je,g]}],container:["container"],columns:[{columns:[be,Oe,je,s]}],"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:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{start:w()}],end:[{end:w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:["visible","invisible","collapse"],z:[{z:[xe,"auto",je,Oe]}],basis:[{basis:[ye,"full","auto",s,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[be,ye,"auto","initial","none",Oe]}],grow:[{grow:["",be,je,Oe]}],shrink:[{shrink:["",be,je,Oe]}],order:[{order:[xe,"first","last","none",je,Oe]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:N()}],"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:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"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:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:S()}],w:[{w:[s,"screen",...S()]}],"min-w":[{"min-w":[s,"screen","none",...S()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...S()]}],h:[{h:["screen","lh",...S()]}],"min-h":[{"min-h":["screen","lh","none",...S()]}],"max-h":[{"max-h":["screen","lh",...S()]}],"font-size":[{text:["base",n,Fe,Te]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,je,Re]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",we,Oe]}],"font-family":[{font:[Le,Oe,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:[r,je,Oe]}],"line-clamp":[{"line-clamp":[be,"none",je,Re]}],leading:[{leading:[a,...x()]}],"list-image":[{"list-image":["none",je,Oe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",je,Oe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[be,"from-font","auto",je,Te]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[be,"auto",je,Oe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",je,Oe]}],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",je,Oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:O()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},xe,je,Oe],radial:["",je,Oe],conic:[xe,je,Oe]},$e,Ae]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:T()}],"gradient-via-pos":[{via:T()}],"gradient-to-pos":[{to:T()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:R()}],"rounded-s":[{"rounded-s":R()}],"rounded-e":[{"rounded-e":R()}],"rounded-t":[{"rounded-t":R()}],"rounded-r":[{"rounded-r":R()}],"rounded-b":[{"rounded-b":R()}],"rounded-l":[{"rounded-l":R()}],"rounded-ss":[{"rounded-ss":R()}],"rounded-se":[{"rounded-se":R()}],"rounded-ee":[{"rounded-ee":R()}],"rounded-es":[{"rounded-es":R()}],"rounded-tl":[{"rounded-tl":R()}],"rounded-tr":[{"rounded-tr":R()}],"rounded-br":[{"rounded-br":R()}],"rounded-bl":[{"rounded-bl":R()}],"border-w":[{border:P()}],"border-w-x":[{"border-x":P()}],"border-w-y":[{"border-y":P()}],"border-w-s":[{"border-s":P()}],"border-w-e":[{"border-e":P()}],"border-w-t":[{"border-t":P()}],"border-w-r":[{"border-r":P()}],"border-w-b":[{"border-b":P()}],"border-w-l":[{"border-l":P()}],"divide-x":[{"divide-x":P()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":P()}],"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:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[be,je,Oe]}],"outline-w":[{outline:["",be,Fe,Te]}],"outline-color":[{outline:E()}],shadow:[{shadow:["","none",d,Be,Ie]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":["none",u,Be,Ie]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[be,Te]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":P()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":["none",p,Be,Ie]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[be,je,Oe]}],"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":[be]}],"mask-image-linear-from-pos":[{"mask-linear-from":A()}],"mask-image-linear-to-pos":[{"mask-linear-to":A()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":A()}],"mask-image-t-to-pos":[{"mask-t-to":A()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":A()}],"mask-image-r-to-pos":[{"mask-r-to":A()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":A()}],"mask-image-b-to-pos":[{"mask-b-to":A()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":A()}],"mask-image-l-to-pos":[{"mask-l-to":A()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":A()}],"mask-image-x-to-pos":[{"mask-x-to":A()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":A()}],"mask-image-y-to-pos":[{"mask-y-to":A()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[je,Oe]}],"mask-image-radial-from-pos":[{"mask-radial-from":A()}],"mask-image-radial-to-pos":[{"mask-radial-to":A()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"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":[be]}],"mask-image-conic-from-pos":[{"mask-conic-from":A()}],"mask-image-conic-to-pos":[{"mask-conic-to":A()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:O()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",je,Oe]}],filter:[{filter:["","none",je,Oe]}],blur:[{blur:I()}],brightness:[{brightness:[be,je,Oe]}],contrast:[{contrast:[be,je,Oe]}],"drop-shadow":[{"drop-shadow":["","none",f,Be,Ie]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:["",be,je,Oe]}],"hue-rotate":[{"hue-rotate":[be,je,Oe]}],invert:[{invert:["",be,je,Oe]}],saturate:[{saturate:[be,je,Oe]}],sepia:[{sepia:["",be,je,Oe]}],"backdrop-filter":[{"backdrop-filter":["","none",je,Oe]}],"backdrop-blur":[{"backdrop-blur":I()}],"backdrop-brightness":[{"backdrop-brightness":[be,je,Oe]}],"backdrop-contrast":[{"backdrop-contrast":[be,je,Oe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",be,je,Oe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[be,je,Oe]}],"backdrop-invert":[{"backdrop-invert":["",be,je,Oe]}],"backdrop-opacity":[{"backdrop-opacity":[be,je,Oe]}],"backdrop-saturate":[{"backdrop-saturate":[be,je,Oe]}],"backdrop-sepia":[{"backdrop-sepia":["",be,je,Oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",je,Oe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[be,"initial",je,Oe]}],ease:[{ease:["linear","initial",v,je,Oe]}],delay:[{delay:[be,je,Oe]}],animate:[{animate:["none",y,je,Oe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,je,Oe]}],"perspective-origin":[{"perspective-origin":b()}],rotate:[{rotate:j()}],"rotate-x":[{"rotate-x":j()}],"rotate-y":[{"rotate-y":j()}],"rotate-z":[{"rotate-z":j()}],scale:[{scale:F()}],"scale-x":[{"scale-x":F()}],"scale-y":[{"scale-y":F()}],"scale-z":[{"scale-z":F()}],"scale-3d":["scale-3d"],skew:[{skew:L()}],"skew-x":[{"skew-x":L()}],"skew-y":[{"skew-y":L()}],transform:[{transform:[je,Oe,"","none","gpu","cpu"]}],"transform-origin":[{origin:b()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:z()}],"translate-x":[{"translate-x":z()}],"translate-y":[{"translate-y":z()}],"translate-z":[{"translate-z":z()}],"translate-none":["translate-none"],accent:[{accent:E()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:E()}],"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",je,Oe]}],"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":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"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",je,Oe]}],fill:[{fill:["none",...E()]}],"stroke-w":[{stroke:[be,Fe,Te,Re]}],stroke:[{stroke:["none",...E()]}],"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 Je(...e){return Qe(I(e))}const et=L("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive hover:cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}}),tt=e.forwardRef(({className:e,variant:t,size:n,asChild:o=!1,icon:r,label:a,iconPosition:i="end",children:s,...l},c)=>{const d=null!=r||null!=a;return v(o?O:"button",{ref:c,"data-slot":"button",className:Je(et({variant:t,size:n,className:e})),...l,children:d?y(b,{children:["start"===i&&r,null!=a&&v("span",{"data-slot":"button-label",children:a}),"end"===i&&r]}):s})});tt.displayName="Button";const nt="flex h-10 w-full items-center rounded-md border border-input bg-background px-3 text-sm font-normal shadow-none hover:bg-[hsl(var(--hover-ring))] hover:border-[hsl(var(--focus-ring))] focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",ot="text-muted-foreground",rt="size-4 shrink-0 text-muted-foreground opacity-50",at="data-[selected=true]:bg-secondary data-[selected=true]:text-secondary-foreground",it=nt+" file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground",st=nt+" gap-2 focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",lt=n(({className:e,icon:t,type:n,...o},r)=>t?y("div",{"data-slot":"input-icon-wrapper",className:st,children:[v("span",{"data-slot":"input-icon",className:"pointer-events-none flex shrink-0 items-center text-muted-foreground",children:t}),v("input",{"data-slot":"input",type:n,className:Je("min-h-0 min-w-0 w-auto flex-1 rounded-none border-0 bg-transparent p-0 text-sm shadow-none placeholder:text-muted-foreground focus:outline-none focus-visible:outline-none focus-visible:ring-0 disabled:cursor-not-allowed disabled:opacity-50 file:border-0 file:bg-transparent file:text-sm file:font-medium",e),ref:r,...o})]}):v("input",{"data-slot":"input",type:n,className:Je(it,e),ref:r,...o}));lt.displayName="Input";const ct=e.forwardRef(({className:e,...t},n)=>v("textarea",{"data-slot":"textarea",className:Je("flex min-h-[80px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));function dt({children:e,onClick:t,direction:n,gap:o,className:r,...a}){return v("div",{...t?{role:"button",tabIndex:0,onClick:t,onKeyDown:e=>{!t||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t())}}:{},className:Je(`${"row"===n?"flex flex-row":"flex flex-col"} ${o?`gap-${o}`:"gap-0"}`,r),...a,children:e})}function ut(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}ct.displayName="Textarea";var pt,ft={exports:{}},mt={exports:{}},ht={};var gt,vt,yt,bt,xt,wt,kt,Nt,Ct,_t,Dt,St,Et,Mt,Ot,Tt={};
|
|
2
|
-
/** @license React v16.13.1
|
|
3
|
-
* react-is.development.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/function Rt(){return vt||(vt=1,"production"===process.env.NODE_ENV?mt.exports=function(){if(pt)return ht;pt=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case l:case c:case o:case a:case r:case u:return e;default:switch(e=e&&e.$$typeof){case s:case d:case m:case f:case i:return e;default:return p}}case n:return p}}}function x(e){return b(e)===c}return ht.AsyncMode=l,ht.ConcurrentMode=c,ht.ContextConsumer=s,ht.ContextProvider=i,ht.Element=t,ht.ForwardRef=d,ht.Fragment=o,ht.Lazy=m,ht.Memo=f,ht.Portal=n,ht.Profiler=a,ht.StrictMode=r,ht.Suspense=u,ht.isAsyncMode=function(e){return x(e)||b(e)===l},ht.isConcurrentMode=x,ht.isContextConsumer=function(e){return b(e)===s},ht.isContextProvider=function(e){return b(e)===i},ht.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ht.isForwardRef=function(e){return b(e)===d},ht.isFragment=function(e){return b(e)===o},ht.isLazy=function(e){return b(e)===m},ht.isMemo=function(e){return b(e)===f},ht.isPortal=function(e){return b(e)===n},ht.isProfiler=function(e){return b(e)===a},ht.isStrictMode=function(e){return b(e)===r},ht.isSuspense=function(e){return b(e)===u},ht.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===c||e===a||e===r||e===u||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===f||e.$$typeof===i||e.$$typeof===s||e.$$typeof===d||e.$$typeof===g||e.$$typeof===v||e.$$typeof===y||e.$$typeof===h)},ht.typeOf=b,ht}():mt.exports=(gt||(gt=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:var h=e.type;switch(h){case l:case c:case o:case a:case r:case u:return h;default:var g=h&&h.$$typeof;switch(g){case s:case d:case m:case f:case i:return g;default:return p}}case n:return p}}}var x=l,w=c,k=s,N=i,C=t,_=d,D=o,S=m,E=f,M=n,O=a,T=r,R=u,P=!1;function A(e){return b(e)===c}Tt.AsyncMode=x,Tt.ConcurrentMode=w,Tt.ContextConsumer=k,Tt.ContextProvider=N,Tt.Element=C,Tt.ForwardRef=_,Tt.Fragment=D,Tt.Lazy=S,Tt.Memo=E,Tt.Portal=M,Tt.Profiler=O,Tt.StrictMode=T,Tt.Suspense=R,Tt.isAsyncMode=function(e){return P||(P=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),A(e)||b(e)===l},Tt.isConcurrentMode=A,Tt.isContextConsumer=function(e){return b(e)===s},Tt.isContextProvider=function(e){return b(e)===i},Tt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Tt.isForwardRef=function(e){return b(e)===d},Tt.isFragment=function(e){return b(e)===o},Tt.isLazy=function(e){return b(e)===m},Tt.isMemo=function(e){return b(e)===f},Tt.isPortal=function(e){return b(e)===n},Tt.isProfiler=function(e){return b(e)===a},Tt.isStrictMode=function(e){return b(e)===r},Tt.isSuspense=function(e){return b(e)===u},Tt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===c||e===a||e===r||e===u||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===f||e.$$typeof===i||e.$$typeof===s||e.$$typeof===d||e.$$typeof===g||e.$$typeof===v||e.$$typeof===y||e.$$typeof===h)},Tt.typeOf=b}()),Tt)),mt.exports}
|
|
10
|
-
/*
|
|
11
|
-
object-assign
|
|
12
|
-
(c) Sindre Sorhus
|
|
13
|
-
@license MIT
|
|
14
|
-
*/function Pt(){if(bt)return yt;bt=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return yt=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(o,r){for(var a,i,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(o),l=1;l<arguments.length;l++){for(var c in a=Object(arguments[l]))t.call(a,c)&&(s[c]=a[c]);if(e){i=e(a);for(var d=0;d<i.length;d++)n.call(a,i[d])&&(s[i[d]]=a[i[d]])}}return s},yt}function At(){if(wt)return xt;wt=1;return xt="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function It(){return Nt?kt:(Nt=1,kt=Function.call.bind(Object.prototype.hasOwnProperty))}function jt(){if(_t)return Ct;_t=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=At(),n={},o=It();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function r(r,a,i,s,l){if("production"!==process.env.NODE_ENV)for(var c in r)if(o(r,c)){var d;try{if("function"!=typeof r[c]){var u=Error((s||"React class")+": "+i+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}d=r[c](a,c,s,i,null,t)}catch(e){d=e}if(!d||d instanceof Error||e((s||"React class")+": type specification of "+i+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var p=l?l():"";e("Failed "+i+" type: "+d.message+(null!=p?p:""))}}}return r.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},Ct=r}function Ft(){if(St)return Dt;St=1;var e=Rt(),t=Pt(),n=At(),o=It(),r=jt(),a=function(){};function i(){return null}return"production"!==process.env.NODE_ENV&&(a=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),Dt=function(s,l){var c="function"==typeof Symbol&&Symbol.iterator;var d="<<anonymous>>",u={array:h("array"),bigint:h("bigint"),bool:h("boolean"),func:h("function"),number:h("number"),object:h("object"),string:h("string"),symbol:h("symbol"),any:m(i),arrayOf:function(e){return m(function(t,o,r,a,i){if("function"!=typeof e)return new f("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[o];if(!Array.isArray(s))return new f("Invalid "+a+" `"+i+"` of type `"+y(s)+"` supplied to `"+r+"`, expected an array.");for(var l=0;l<s.length;l++){var c=e(s,l,r,a,i+"["+l+"]",n);if(c instanceof Error)return c}return null})},element:m(function(e,t,n,o,r){var a=e[t];return s(a)?null:new f("Invalid "+o+" `"+r+"` of type `"+y(a)+"` supplied to `"+n+"`, expected a single ReactElement.")}),elementType:m(function(t,n,o,r,a){var i=t[n];return e.isValidElementType(i)?null:new f("Invalid "+r+" `"+a+"` of type `"+y(i)+"` supplied to `"+o+"`, expected a single ReactElement type.")}),instanceOf:function(e){return m(function(t,n,o,r,a){if(!(t[n]instanceof e)){var i=e.name||d;return new f("Invalid "+r+" `"+a+"` of type `"+(((s=t[n]).constructor&&s.constructor.name?s.constructor.name:d)+"` supplied to `")+o+"`, expected instance of `"+i+"`.")}var s;return null})},node:m(function(e,t,n,o,r){return v(e[t])?null:new f("Invalid "+o+" `"+r+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return m(function(t,r,a,i,s){if("function"!=typeof e)return new f("Property `"+s+"` of component `"+a+"` has invalid PropType notation inside objectOf.");var l=t[r],c=y(l);if("object"!==c)return new f("Invalid "+i+" `"+s+"` of type `"+c+"` supplied to `"+a+"`, expected an object.");for(var d in l)if(o(l,d)){var u=e(l,d,a,i,s+"."+d,n);if(u instanceof Error)return u}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&a(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),i;return m(function(t,n,o,r,a){for(var i=t[n],s=0;s<e.length;s++)if(p(i,e[s]))return null;var l=JSON.stringify(e,function(e,t){return"symbol"===b(t)?String(t):t});return new f("Invalid "+r+" `"+a+"` of value `"+String(i)+"` supplied to `"+o+"`, expected one of "+l+".")})},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var t=0;t<e.length;t++){var r=e[t];if("function"!=typeof r)return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+x(r)+" at index "+t+"."),i}return m(function(t,r,a,i,s){for(var l=[],c=0;c<e.length;c++){var d=(0,e[c])(t,r,a,i,s,n);if(null==d)return null;d.data&&o(d.data,"expectedType")&&l.push(d.data.expectedType)}return new f("Invalid "+i+" `"+s+"` supplied to `"+a+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return m(function(t,o,r,a,i){var s=t[o],l=y(s);if("object"!==l)return new f("Invalid "+a+" `"+i+"` of type `"+l+"` supplied to `"+r+"`, expected `object`.");for(var c in e){var d=e[c];if("function"!=typeof d)return g(r,a,i,c,b(d));var u=d(s,c,r,a,i+"."+c,n);if(u)return u}return null})},exact:function(e){return m(function(r,a,i,s,l){var c=r[a],d=y(c);if("object"!==d)return new f("Invalid "+s+" `"+l+"` of type `"+d+"` supplied to `"+i+"`, expected `object`.");var u=t({},r[a],e);for(var p in u){var m=e[p];if(o(e,p)&&"function"!=typeof m)return g(i,s,l,p,b(m));if(!m)return new f("Invalid "+s+" `"+l+"` key `"+p+"` supplied to `"+i+"`.\nBad object: "+JSON.stringify(r[a],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var h=m(c,p,i,s,l+"."+p,n);if(h)return h}return null})}};function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function m(e){if("production"!==process.env.NODE_ENV)var t={},o=0;function r(r,i,s,c,u,p,m){if(c=c||d,p=p||s,m!==n){if(l){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=c+":"+s;!t[g]&&o<3&&(a("You are manually calling a React.PropTypes validation function for the `"+p+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[g]=!0,o++)}}return null==i[s]?r?null===i[s]?new f("The "+u+" `"+p+"` is marked as required in `"+c+"`, but its value is `null`."):new f("The "+u+" `"+p+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(i,s,c,u,p)}var i=r.bind(null,!1);return i.isRequired=r.bind(null,!0),i}function h(e){return m(function(t,n,o,r,a,i){var s=t[n];return y(s)!==e?new f("Invalid "+r+" `"+a+"` of type `"+b(s)+"` supplied to `"+o+"`, expected `"+e+"`.",{expectedType:e}):null})}function g(e,t,n,o,r){return new f((e||"React class")+": "+t+" type `"+n+"."+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+r+"`.")}function v(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(v);if(null===e||s(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,o=t.call(e);if(t!==e.entries){for(;!(n=o.next()).done;)if(!v(n.value))return!1}else for(;!(n=o.next()).done;){var r=n.value;if(r&&!v(r[1]))return!1}return!0;default:return!1}}function y(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function b(e){if(null==e)return""+e;var t=y(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function x(e){var t=b(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return f.prototype=Error.prototype,u.checkPropTypes=r,u.resetWarningCache=r.resetWarningCache,u.PropTypes=u,u},Dt}function Lt(){if(Mt)return Et;Mt=1;var e=At();function t(){}function n(){}return n.resetWarningCache=t,Et=function(){function o(t,n,o,r,a,i){if(i!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function r(){return o}o.isRequired=o;var a={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:r,element:o,elementType:o,instanceOf:r,node:o,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a}}function zt(){if(Ot)return ft.exports;if(Ot=1,"production"!==process.env.NODE_ENV){var e=Rt();ft.exports=Ft()(e.isElement,true)}else ft.exports=Lt()();return ft.exports}var Wt=ut(zt()),$t=function(){return $t=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},$t.apply(this,arguments)};function Bt(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}function qt(e,t,n,o){return new(n||(n=Promise))(function(r,a){function i(e){try{l(o.next(e))}catch(e){a(e)}}function s(e){try{l(o.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,s)}l((o=o.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const Ht=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Yt(e,t,n){const o=function(e){const{name:t}=e;if(t&&-1!==t.lastIndexOf(".")&&!e.type){const n=t.split(".").pop().toLowerCase(),o=Ht.get(n);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}(e),{webkitRelativePath:r}=e,a="string"==typeof t?t:"string"==typeof r&&r.length>0?r:`./${e.name}`;return"string"!=typeof o.path&&Vt(o,"path",a),Vt(o,"relativePath",a),o}function Vt(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const Ut=[".DS_Store","Thumbs.db"];function Kt(e){return"object"==typeof e&&null!==e}function Gt(e){return e.filter(e=>-1===Ut.indexOf(e.name))}function Zt(e){if(null===e)return[];const t=[];for(let n=0;n<e.length;n++){const o=e[n];t.push(o)}return t}function Xt(e){if("function"!=typeof e.webkitGetAsEntry)return Jt(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?tn(t):Jt(e,t)}function Qt(e){return e.reduce((e,t)=>[...e,...Array.isArray(t)?Qt(t):[t]],[])}function Jt(e,t){return qt(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&"function"==typeof e.getAsFileSystemHandle){const t=yield e.getAsFileSystemHandle();if(null===t)throw new Error(`${e} is not a File`);if(void 0!==t){const e=yield t.getFile();return e.handle=t,Yt(e)}}const o=e.getAsFile();if(!o)throw new Error(`${e} is not a File`);return Yt(o,null!==(n=null==t?void 0:t.fullPath)&&void 0!==n?n:void 0)})}function en(e){return qt(this,void 0,void 0,function*(){return e.isDirectory?tn(e):function(e){return qt(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(n=>{const o=Yt(n,e.fullPath);t(o)},e=>{n(e)})})})}(e)})}function tn(e){const t=e.createReader();return new Promise((e,n)=>{const o=[];!function r(){t.readEntries(t=>qt(this,void 0,void 0,function*(){if(t.length){const e=Promise.all(t.map(en));o.push(e),r()}else try{const t=yield Promise.all(o);e(t)}catch(e){n(e)}}),e=>{n(e)})}()})}var nn,on={};var rn=ut((nn||(nn=1,on.__esModule=!0,on.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(0===n.length)return!0;var o=e.name||"",r=(e.type||"").toLowerCase(),a=r.replace(/\/.*$/,"");return n.some(function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?o.toLowerCase().endsWith(t):t.endsWith("/*")?a===t.replace(/\/.*$/,""):r===t})}return!0}),on));function an(e){return function(e){if(Array.isArray(e))return pn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||un(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function ln(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sn(Object(n),!0).forEach(function(t){cn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var o,r,a=[],i=!0,s=!1;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(a.push(o.value),!t||a.length!==t);i=!0);}catch(e){s=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(s)throw r}}return a}(e,t)||un(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function un(e,t){if(e){if("string"==typeof e)return pn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pn(e,t):void 0}}function pn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var fn="function"==typeof rn?rn:rn.default,mn=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(","),t=e.length>1?"one of ".concat(e.join(", ")):e[0];return{code:"file-invalid-type",message:"File type must be ".concat(t)}},hn=function(e){return{code:"file-too-large",message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},gn=function(e){return{code:"file-too-small",message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},vn={code:"too-many-files",message:"Too many files"};function yn(e,t){var n="application/x-moz-file"===e.type||fn(e,t);return[n,n?null:mn(t)]}function bn(e,t,n){if(xn(e.size))if(xn(t)&&xn(n)){if(e.size>n)return[!1,hn(n)];if(e.size<t)return[!1,gn(t)]}else{if(xn(t)&&e.size<t)return[!1,gn(t)];if(xn(n)&&e.size>n)return[!1,hn(n)]}return[!0,null]}function xn(e){return null!=e}function wn(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function kn(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(e){return"Files"===e||"application/x-moz-file"===e}):!!e.target&&!!e.target.files}function Nn(e){e.preventDefault()}function Cn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return t.some(function(t){return!wn(e)&&t&&t.apply(void 0,[e].concat(o)),wn(e)})}}function _n(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||"application/*"===e||/\w+\/[-+.\w]+/g.test(e)}function Dn(e){return/^.*\.[\w]+$/.test(e)}var Sn=["children"],En=["open"],Mn=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],On=["refKey","onChange","onClick"];function Tn(e){return function(e){if(Array.isArray(e))return An(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Pn(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var o,r,a=[],i=!0,s=!1;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(a.push(o.value),!t||a.length!==t);i=!0);}catch(e){s=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(s)throw r}}return a}(e,t)||Pn(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pn(e,t){if(e){if("string"==typeof e)return An(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?An(e,t):void 0}}function An(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function In(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function jn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?In(Object(n),!0).forEach(function(t){Fn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):In(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Fn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ln(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var zn=n(function(e,n){var o=e.children,r=Bn(Ln(e,Sn)),a=r.open,i=Ln(r,En);return l(n,function(){return{open:a}},[a]),t.createElement(c,null,o(jn(jn({},i),{},{open:a})))});zn.displayName="Dropzone";var Wn={disabled:!1,getFilesFromEvent:function(e){return qt(this,void 0,void 0,function*(){return Kt(e)&&Kt(e.dataTransfer)?function(e,t){return qt(this,void 0,void 0,function*(){if(e.items){const n=Zt(e.items).filter(e=>"file"===e.kind);if("drop"!==t)return n;return Gt(Qt(yield Promise.all(n.map(Xt))))}return Gt(Zt(e.files).map(e=>Yt(e)))})}(e.dataTransfer,e.type):function(e){return Kt(e)&&Kt(e.target)}(e)?function(e){return Zt(e.target.files).map(e=>Yt(e))}(e):Array.isArray(e)&&e.every(e=>"getFile"in e&&"function"==typeof e.getFile)?function(e){return qt(this,void 0,void 0,function*(){return(yield Promise.all(e.map(e=>e.getFile()))).map(e=>Yt(e))})}(e):[]})},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};zn.defaultProps=Wn,zn.propTypes={children:Wt.func,accept:Wt.objectOf(Wt.arrayOf(Wt.string)),multiple:Wt.bool,preventDropOnDocument:Wt.bool,noClick:Wt.bool,noKeyboard:Wt.bool,noDrag:Wt.bool,noDragEventsBubbling:Wt.bool,minSize:Wt.number,maxSize:Wt.number,maxFiles:Wt.number,disabled:Wt.bool,getFilesFromEvent:Wt.func,onFileDialogCancel:Wt.func,onFileDialogOpen:Wt.func,useFsAccessApi:Wt.bool,autoFocus:Wt.bool,onDragEnter:Wt.func,onDragLeave:Wt.func,onDragOver:Wt.func,onDrop:Wt.func,onDropAccepted:Wt.func,onDropRejected:Wt.func,onError:Wt.func,validator:Wt.func};var $n={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Bn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=jn(jn({},Wn),e),n=t.accept,l=t.disabled,c=t.getFilesFromEvent,d=t.maxSize,u=t.minSize,p=t.multiple,f=t.maxFiles,m=t.onDragEnter,h=t.onDragLeave,g=t.onDragOver,v=t.onDrop,y=t.onDropAccepted,b=t.onDropRejected,x=t.onFileDialogCancel,w=t.onFileDialogOpen,k=t.useFsAccessApi,N=t.autoFocus,C=t.preventDropOnDocument,_=t.noClick,D=t.noKeyboard,S=t.noDrag,E=t.noDragEventsBubbling,M=t.onError,O=t.validator,T=o(function(){return function(e){if(xn(e))return Object.entries(e).reduce(function(e,t){var n=dn(t,2),o=n[0],r=n[1];return[].concat(an(e),[o],an(r))},[]).filter(function(e){return _n(e)||Dn(e)}).join(",")}(n)},[n]),R=o(function(){return function(e){return xn(e)?[{description:"Files",accept:Object.entries(e).filter(function(e){var t=dn(e,2),n=t[0],o=t[1],r=!0;return _n(n)||(console.warn('Skipped "'.concat(n,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),r=!1),Array.isArray(o)&&o.every(Dn)||(console.warn('Skipped "'.concat(n,'" because an invalid file extension was provided.')),r=!1),r}).reduce(function(e,t){var n=dn(t,2),o=n[0],r=n[1];return ln(ln({},e),{},cn({},o,r))},{})}]:e}(n)},[n]),P=o(function(){return"function"==typeof w?w:Hn},[w]),A=o(function(){return"function"==typeof x?x:Hn},[x]),I=r(null),j=r(null),F=Rn(a(qn,$n),2),L=F[0],z=F[1],W=L.isFocused,$=L.isFileDialogActive,B=r("undefined"!=typeof window&&window.isSecureContext&&k&&"showOpenFilePicker"in window),q=function(){!B.current&&$&&setTimeout(function(){j.current&&(j.current.files.length||(z({type:"closeDialog"}),A()))},300)};i(function(){return window.addEventListener("focus",q,!1),function(){window.removeEventListener("focus",q,!1)}},[j,$,A,B]);var H=r([]),Y=function(e){I.current&&I.current.contains(e.target)||(e.preventDefault(),H.current=[])};i(function(){return C&&(document.addEventListener("dragover",Nn,!1),document.addEventListener("drop",Y,!1)),function(){C&&(document.removeEventListener("dragover",Nn),document.removeEventListener("drop",Y))}},[I,C]),i(function(){return!l&&N&&I.current&&I.current.focus(),function(){}},[I,N,l]);var V=s(function(e){M?M(e):console.error(e)},[M]),U=s(function(e){e.preventDefault(),e.persist(),ie(e),H.current=[].concat(Tn(H.current),[e.target]),kn(e)&&Promise.resolve(c(e)).then(function(t){if(!wn(e)||E){var n=t.length,o=n>0&&function(e){var t=e.files,n=e.accept,o=e.minSize,r=e.maxSize,a=e.multiple,i=e.maxFiles,s=e.validator;return!(!a&&t.length>1||a&&i>=1&&t.length>i)&&t.every(function(e){var t=dn(yn(e,n),1)[0],a=dn(bn(e,o,r),1)[0],i=s?s(e):null;return t&&a&&!i})}({files:t,accept:T,minSize:u,maxSize:d,multiple:p,maxFiles:f,validator:O});z({isDragAccept:o,isDragReject:n>0&&!o,isDragActive:!0,type:"setDraggedFiles"}),m&&m(e)}}).catch(function(e){return V(e)})},[c,m,V,E,T,u,d,p,f,O]),K=s(function(e){e.preventDefault(),e.persist(),ie(e);var t=kn(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return t&&g&&g(e),!1},[g,E]),G=s(function(e){e.preventDefault(),e.persist(),ie(e);var t=H.current.filter(function(e){return I.current&&I.current.contains(e)}),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),H.current=t,t.length>0||(z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),kn(e)&&h&&h(e))},[I,h,E]),Z=s(function(e,t){var n=[],o=[];e.forEach(function(e){var t=Rn(yn(e,T),2),r=t[0],a=t[1],i=Rn(bn(e,u,d),2),s=i[0],l=i[1],c=O?O(e):null;if(r&&s&&!c)n.push(e);else{var p=[a,l];c&&(p=p.concat(c)),o.push({file:e,errors:p.filter(function(e){return e})})}}),(!p&&n.length>1||p&&f>=1&&n.length>f)&&(n.forEach(function(e){o.push({file:e,errors:[vn]})}),n.splice(0)),z({acceptedFiles:n,fileRejections:o,isDragReject:o.length>0,type:"setFiles"}),v&&v(n,o,t),o.length>0&&b&&b(o,t),n.length>0&&y&&y(n,t)},[z,p,T,u,d,f,v,y,b,O]),X=s(function(e){e.preventDefault(),e.persist(),ie(e),H.current=[],kn(e)&&Promise.resolve(c(e)).then(function(t){wn(e)&&!E||Z(t,e)}).catch(function(e){return V(e)}),z({type:"reset"})},[c,Z,V,E]),Q=s(function(){if(B.current){z({type:"openDialog"}),P();var e={multiple:p,types:R};window.showOpenFilePicker(e).then(function(e){return c(e)}).then(function(e){Z(e,null),z({type:"closeDialog"})}).catch(function(e){var t;(t=e)instanceof DOMException&&("AbortError"===t.name||t.code===t.ABORT_ERR)?(A(e),z({type:"closeDialog"})):!function(e){return e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)}(e)?V(e):(B.current=!1,j.current?(j.current.value=null,j.current.click()):V(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided.")))})}else j.current&&(z({type:"openDialog"}),P(),j.current.value=null,j.current.click())},[z,P,A,k,Z,V,R,p]),J=s(function(e){I.current&&I.current.isEqualNode(e.target)&&(" "!==e.key&&"Enter"!==e.key&&32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),Q()))},[I,Q]),ee=s(function(){z({type:"focus"})},[]),te=s(function(){z({type:"blur"})},[]),ne=s(function(){_||(!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}(e)||function(e){return-1!==e.indexOf("Edge/")}(e)}()?Q():setTimeout(Q,0))},[_,Q]),oe=function(e){return l?null:e},re=function(e){return D?null:oe(e)},ae=function(e){return S?null:oe(e)},ie=function(e){E&&e.stopPropagation()},se=o(function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,o=e.role,r=e.onKeyDown,a=e.onFocus,i=e.onBlur,s=e.onClick,c=e.onDragEnter,d=e.onDragOver,u=e.onDragLeave,p=e.onDrop,f=Ln(e,Mn);return jn(jn(Fn({onKeyDown:re(Cn(r,J)),onFocus:re(Cn(a,ee)),onBlur:re(Cn(i,te)),onClick:oe(Cn(s,ne)),onDragEnter:ae(Cn(c,U)),onDragOver:ae(Cn(d,K)),onDragLeave:ae(Cn(u,G)),onDrop:ae(Cn(p,X)),role:"string"==typeof o&&""!==o?o:"presentation"},n,I),l||D?{}:{tabIndex:0}),f)}},[I,J,ee,te,ne,U,K,G,X,D,S,l]),le=s(function(e){e.stopPropagation()},[]),ce=o(function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,o=e.onChange,r=e.onClick,a=Ln(e,On);return jn(jn({},Fn({accept:T,multiple:p,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:oe(Cn(o,X)),onClick:oe(Cn(r,le)),tabIndex:-1},n,j)),a)}},[j,n,p,X,l]);return jn(jn({},L),{},{isFocused:W&&!l,getRootProps:se,getInputProps:ce,rootRef:I,inputRef:j,open:oe(Q)})}function qn(e,t){switch(t.type){case"focus":return jn(jn({},e),{},{isFocused:!0});case"blur":return jn(jn({},e),{},{isFocused:!1});case"openDialog":return jn(jn({},$n),{},{isFileDialogActive:!0});case"closeDialog":return jn(jn({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return jn(jn({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return jn(jn({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return jn({},$n);default:return e}}function Hn(){}function Yn({children:e,maxFiles:t=1,maxSize:n=5242880,accept:o={"text/csv":[".csv"]},onFilesAccepted:r}){const[a,i]=d([]),[l,c]=d([]),u=s((e,t)=>{const n=t.map(({file:e})=>e);i(n),e.length>0&&(c(e),r(e))},[r]),{getRootProps:p,getInputProps:f,isDragActive:m}=Bn({onDrop:u,maxFiles:t,maxSize:n,accept:o,multiple:t>1});return y("div",{className:"space-y-4",children:[y("div",{...p(),className:"border-2 border-dashed rounded-lg text-center cursor-pointer transition-colors "+(m?"border-blue-500 bg-blue-50":"border-gray-300 hover:border-gray-400"),children:[v("input",{...f()}),y("div",{className:Je(l.length>0?"p-6 bg-green-100":"p-6","flex flex-col items-center justify-center gap-2"),children:[m&&v("p",{className:"font-medium text-blue-500",children:"Clique para selecionar os arquivos ou arraste-os aqui"}),!m&&l.length>0&&l.map(e=>v(dt,{children:y("p",{className:"font-medium",children:[v("b",{children:"Nome do arquivo:"})," ",e.name]})},e.name)),!m&&0===l.length&&y(b,{children:[v("p",{className:"font-medium",children:"Clique para selecionar os arquivos ou arraste-os aqui"}),y("p",{className:"text-sm text-gray-500",children:[n/1024/1024,"MB"]})]})]})]}),l.length>0&&v("div",{className:"w-full",children:e}),a.length>0&&y("div",{className:"text-sm text-red-600",children:[v("h4",{className:"font-medium mb-2",children:"Rejected files:"}),v("ul",{className:"space-y-1",children:a.map(e=>y("li",{className:"flex items-center justify-between",children:[y("span",{children:[e.name," (",(e.size/1024).toFixed(2)," KB)"]}),v("button",{type:"button",onClick:()=>{return t=e.name,void i(e=>e.filter(e=>e.name!==t));var t},className:"text-red-800 hover:text-red-900",children:"×"})]},e.name))}),y("p",{className:"mt-1",children:["File must be ",n/1024/1024,"MB or smaller."]})]})]})}function Vn(t,n=[]){let o=[];const r=()=>{const n=o.map(t=>e.createContext(t));return function(o){const r=o?.[t]||n;return e.useMemo(()=>({[`__scope${t}`]:{...o,[t]:r}}),[o,r])}};return r.scopeName=t,[function(n,r){const a=e.createContext(r),i=o.length;o=[...o,r];const s=n=>{const{scope:o,children:r,...s}=n,l=o?.[t]?.[i]||a,c=e.useMemo(()=>s,Object.values(s));return v(l.Provider,{value:c,children:r})};return s.displayName=n+"Provider",[s,function(o,s){const l=s?.[t]?.[i]||a,c=e.useContext(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${o}\` must be used within \`${n}\``)}]},Un(r,...n)]}function Un(...t){const n=t[0];if(1===t.length)return n;const o=()=>{const o=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){const r=o.reduce((e,{useScope:n,scopeName:o})=>({...e,...n(t)[`__scope${o}`]}),{});return e.useMemo(()=>({[`__scope${n.scopeName}`]:r}),[r])}};return o.scopeName=n.scopeName,o}function Kn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),!1===n||!o.defaultPrevented)return t?.(o)}}var Gn=globalThis?.document?e.useLayoutEffect:()=>{},Zn=e[" useId ".trim().toString()]||(()=>{}),Xn=0;function Qn(t){const[n,o]=e.useState(Zn());return Gn(()=>{o(e=>e??String(Xn++))},[t]),n?`radix-${n}`:""}var Jn=e[" useInsertionEffect ".trim().toString()]||Gn;function eo({prop:t,defaultProp:n,onChange:o=()=>{},caller:r}){const[a,i,s]=function({defaultProp:t,onChange:n}){const[o,r]=e.useState(t),a=e.useRef(o),i=e.useRef(n);return Jn(()=>{i.current=n},[n]),e.useEffect(()=>{a.current!==o&&(i.current?.(o),a.current=o)},[o,a]),[o,r,i]}({defaultProp:n,onChange:o}),l=void 0!==t,c=l?t:a;{const n=e.useRef(void 0!==t);e.useEffect(()=>{const e=n.current;if(e!==l){const t=e?"controlled":"uncontrolled",n=l?"controlled":"uncontrolled";console.warn(`${r} is changing from ${t} to ${n}. 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.`)}n.current=l},[l,r])}const d=e.useCallback(e=>{if(l){const n=function(e){return"function"==typeof e}(e)?e(t):e;n!==t&&s.current?.(n)}else i(e)},[l,t,i,s]);return[c,d]}function to(t){const n=no(t),o=e.forwardRef((t,o)=>{const{children:r,...a}=t,i=e.Children.toArray(r),s=i.find(ro);if(s){const t=s.props.children,r=i.map(n=>n===s?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n);return v(n,{...a,ref:o,children:e.isValidElement(t)?e.cloneElement(t,void 0,r):null})}return v(n,{...a,ref:o,children:r})});return o.displayName=`${t}.Slot`,o}function no(t){const n=e.forwardRef((t,n)=>{const{children:o,...r}=t;if(e.isValidElement(o)){const t=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(o),a=function(e,t){const n={...t};for(const o in t){const r=e[o],a=t[o];/^on[A-Z]/.test(o)?r&&a?n[o]=(...e)=>{const t=a(...e);return r(...e),t}:r&&(n[o]=r):"style"===o?n[o]={...r,...a}:"className"===o&&(n[o]=[r,a].filter(Boolean).join(" "))}return{...e,...n}}(r,o.props);return o.type!==e.Fragment&&(a.ref=n?C(n,t):t),e.cloneElement(o,a)}return e.Children.count(o)>1?e.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var oo=Symbol("radix.slottable");function ro(t){return e.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===oo}var ao=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,n)=>{const o=to(`Primitive.${n}`),r=e.forwardRef((e,t)=>{const{asChild:r,...a}=e,i=r?o:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),v(i,{...a,ref:t})});return r.displayName=`Primitive.${n}`,{...t,[n]:r}},{});function io(t){const n=e.useRef(t);return e.useEffect(()=>{n.current=t}),e.useMemo(()=>(...e)=>n.current?.(...e),[])}var so,lo="dismissableLayer.update",co="dismissableLayer.pointerDownOutside",uo="dismissableLayer.focusOutside",po=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),fo=e.forwardRef((t,n)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:s,onDismiss:l,...c}=t,d=e.useContext(po),[u,p]=e.useState(null),f=u?.ownerDocument??globalThis?.document,[,m]=e.useState({}),h=_(n,e=>p(e)),g=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(y),x=u?g.indexOf(u):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,k=x>=b,N=function(t,n=globalThis?.document){const o=io(t),r=e.useRef(!1),a=e.useRef(()=>{});return e.useEffect(()=>{const e=e=>{if(e.target&&!r.current){let t=function(){ho(co,o,r,{discrete:!0})};const r={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",a.current),a.current=t,n.addEventListener("click",a.current,{once:!0})):t()}else n.removeEventListener("click",a.current);r.current=!1},t=window.setTimeout(()=>{n.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",a.current)}},[n,o]),{onPointerDownCapture:()=>r.current=!0}}(e=>{const t=e.target,n=[...d.branches].some(e=>e.contains(t));k&&!n&&(a?.(e),s?.(e),e.defaultPrevented||l?.())},f),C=function(t,n=globalThis?.document){const o=io(t),r=e.useRef(!1);return e.useEffect(()=>{const e=e=>{if(e.target&&!r.current){ho(uo,o,{originalEvent:e},{discrete:!1})}};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)},[n,o]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{const t=e.target;[...d.branches].some(e=>e.contains(t))||(i?.(e),s?.(e),e.defaultPrevented||l?.())},f);return function(t,n=globalThis?.document){const o=io(t);e.useEffect(()=>{const e=e=>{"Escape"===e.key&&o(e)};return n.addEventListener("keydown",e,{capture:!0}),()=>n.removeEventListener("keydown",e,{capture:!0})},[o,n])}(e=>{x===d.layers.size-1&&(r?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},f),e.useEffect(()=>{if(u)return o&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(so=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),mo(),()=>{o&&1===d.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=so)}},[u,f,o,d]),e.useEffect(()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),mo())},[u,d]),e.useEffect(()=>{const e=()=>m({});return document.addEventListener(lo,e),()=>document.removeEventListener(lo,e)},[]),v(ao.div,{...c,ref:h,style:{pointerEvents:w?k?"auto":"none":void 0,...t.style},onFocusCapture:Kn(t.onFocusCapture,C.onFocusCapture),onBlurCapture:Kn(t.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Kn(t.onPointerDownCapture,N.onPointerDownCapture)})});fo.displayName="DismissableLayer";function mo(){const e=new CustomEvent(lo);document.dispatchEvent(e)}function ho(e,t,n,{discrete:o}){const r=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?function(e,t){e&&x.flushSync(()=>e.dispatchEvent(t))}(r,a):r.dispatchEvent(a)}e.forwardRef((t,n)=>{const o=e.useContext(po),r=e.useRef(null),a=_(n,r);return e.useEffect(()=>{const e=r.current;if(e)return o.branches.add(e),()=>{o.branches.delete(e)}},[o.branches]),v(ao.div,{...t,ref:a})}).displayName="DismissableLayerBranch";var go="focusScope.autoFocusOnMount",vo="focusScope.autoFocusOnUnmount",yo={bubbles:!1,cancelable:!0},bo=e.forwardRef((t,n)=>{const{loop:o=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...s}=t,[l,c]=e.useState(null),d=io(a),u=io(i),p=e.useRef(null),f=_(n,e=>c(e)),m=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect(()=>{if(r){let e=function(e){if(m.paused||!l)return;const t=e.target;l.contains(t)?p.current=t:No(p.current,{select:!0})},t=function(e){if(m.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||No(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&No(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const o=new MutationObserver(n);return l&&o.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),o.disconnect()}}},[r,l,m.paused]),e.useEffect(()=>{if(l){Co.add(m);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(go,yo);l.addEventListener(go,d),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(No(o,{select:t}),document.activeElement!==n)return}((e=xo(l),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&No(l))}return()=>{l.removeEventListener(go,d),setTimeout(()=>{const e=new CustomEvent(vo,yo);l.addEventListener(vo,u),l.dispatchEvent(e),e.defaultPrevented||No(t??document.body,{select:!0}),l.removeEventListener(vo,u),Co.remove(m)},0)}}var e},[l,d,u,m]);const h=e.useCallback(e=>{if(!o&&!r)return;if(m.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[r,a]=function(e){const t=xo(e),n=wo(t,e),o=wo(t.reverse(),e);return[n,o]}(t);r&&a?e.shiftKey||n!==a?e.shiftKey&&n===r&&(e.preventDefault(),o&&No(a,{select:!0})):(e.preventDefault(),o&&No(r,{select:!0})):n===t&&e.preventDefault()}},[o,r,m.paused]);return v(ao.div,{tabIndex:-1,...s,ref:f,onKeyDown:h})});function xo(e){const t=[],n=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(;n.nextNode();)t.push(n.currentNode);return t}function wo(e,t){for(const n of e)if(!ko(n,{upTo:t}))return n}function ko(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 No(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}bo.displayName="FocusScope";var Co=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=_o(e,t),e.unshift(t)},remove(t){e=_o(e,t),e[0]?.resume()}}}();function _o(e,t){const n=[...e],o=n.indexOf(t);return-1!==o&&n.splice(o,1),n}var Do=e.forwardRef((t,n)=>{const{container:o,...r}=t,[a,i]=e.useState(!1);Gn(()=>i(!0),[]);const s=o||a&&globalThis?.document?.body;return s?w.createPortal(v(ao.div,{...r,ref:n}),s):null});Do.displayName="Portal";var So=t=>{const{present:n,children:o}=t,r=function(t){const[n,o]=e.useState(),r=e.useRef(null),a=e.useRef(t),i=e.useRef("none"),s=t?"mounted":"unmounted",[l,c]=function(t,n){return e.useReducer((e,t)=>n[e][t]??e,t)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect(()=>{const e=Eo(r.current);i.current="mounted"===l?e:"none"},[l]),Gn(()=>{const e=r.current,n=a.current;if(n!==t){const o=i.current,r=Eo(e);if(t)c("MOUNT");else if("none"===r||"none"===e?.display)c("UNMOUNT");else{c(n&&o!==r?"ANIMATION_OUT":"UNMOUNT")}a.current=t}},[t,c]),Gn(()=>{if(n){let e;const t=n.ownerDocument.defaultView??window,o=o=>{const i=Eo(r.current).includes(CSS.escape(o.animationName));if(o.target===n&&i&&(c("ANIMATION_END"),!a.current)){const o=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=o)})}},s=e=>{e.target===n&&(i.current=Eo(r.current))};return n.addEventListener("animationstart",s),n.addEventListener("animationcancel",o),n.addEventListener("animationend",o),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",s),n.removeEventListener("animationcancel",o),n.removeEventListener("animationend",o)}}c("ANIMATION_END")},[n,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:e.useCallback(e=>{r.current=e?getComputedStyle(e):null,o(e)},[])}}(n),a="function"==typeof o?o({present:r.isPresent}):e.Children.only(o),i=_(r.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(a));return"function"==typeof o||r.isPresent?e.cloneElement(a,{ref:i}):null};function Eo(e){return e?.animationName||"none"}So.displayName="Presence";var Mo=0;function Oo(){e.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??To()),document.body.insertAdjacentElement("beforeend",e[1]??To()),Mo++,()=>{1===Mo&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Mo--}},[])}function To(){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 Ro="right-scroll-bar-position",Po="width-before-scroll-bar";function Ao(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Io="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,jo=new WeakMap;function Fo(e,t){var n,o,r,a=(n=null,o=function(t){return e.forEach(function(e){return Ao(e,t)})},(r=d(function(){return{value:n,callback:o,facade:{get current(){return r.value},set current(e){var t=r.value;t!==e&&(r.value=e,r.callback(e,t))}}}})[0]).callback=o,r.facade);return Io(function(){var t=jo.get(a);if(t){var n=new Set(t),o=new Set(e),r=a.current;n.forEach(function(e){o.has(e)||Ao(e,null)}),o.forEach(function(e){n.has(e)||Ao(e,r)})}jo.set(a,e)},[e]),a}function Lo(e){return e}var zo=function(t){var n=t.sideCar,o=Bt(t,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=n.read();if(!r)throw new Error("Sidecar medium not found");return e.createElement(r,$t({},o))};zo.isSideCarExport=!0;var Wo=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Lo);var n=[],o=!1;return{read:function(){if(o)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(e){var r=t(e,o);return n.push(r),function(){n=n.filter(function(e){return e!==r})}},assignSyncMedium:function(e){for(o=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){o=!0;var t=[];if(n.length){var r=n;n=[],r.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),n={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=$t({async:!0,ssr:!1},e),t}(),$o=function(){},Bo=e.forwardRef(function(t,n){var o=e.useRef(null),r=e.useState({onScrollCapture:$o,onWheelCapture:$o,onTouchMoveCapture:$o}),a=r[0],i=r[1],s=t.forwardProps,l=t.children,c=t.className,d=t.removeScrollBar,u=t.enabled,p=t.shards,f=t.sideCar,m=t.noRelative,h=t.noIsolation,g=t.inert,v=t.allowPinchZoom,y=t.as,b=void 0===y?"div":y,x=t.gapMode,w=Bt(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=f,N=Fo([o,n]),C=$t($t({},w),a);return e.createElement(e.Fragment,null,u&&e.createElement(k,{sideCar:Wo,removeScrollBar:d,shards:p,noRelative:m,noIsolation:h,inert:g,setCallbacks:i,allowPinchZoom:!!v,lockRef:o,gapMode:x}),s?e.cloneElement(e.Children.only(l),$t($t({},C),{ref:N})):e.createElement(b,$t({},C,{className:c,ref:N}),l))});Bo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Bo.classNames={fullWidth:Po,zeroRight:Ro};function qo(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var Ho=function(){var e=0,t=null;return{add:function(n){var o,r;0==e&&(t=qo())&&(r=n,(o=t).styleSheet?o.styleSheet.cssText=r:o.appendChild(document.createTextNode(r)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Yo=function(){var t,n=(t=Ho(),function(n,o){e.useEffect(function(){return t.add(n),function(){t.remove()}},[n&&o])});return function(e){var t=e.styles,o=e.dynamic;return n(t,o),null}},Vo={left:0,top:0,right:0,gap:0},Uo=function(e){return parseInt(e||"",10)||0},Ko=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Vo;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],o=t["padding"===e?"paddingTop":"marginTop"],r=t["padding"===e?"paddingRight":"marginRight"];return[Uo(n),Uo(o),Uo(r)]}(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Go=Yo(),Zo="data-scroll-locked",Xo=function(e,t,n,o){var r=e.left,a=e.top,i=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(o,";\n padding-right: ").concat(s,"px ").concat(o,";\n }\n body[").concat(Zo,"] {\n overflow: hidden ").concat(o,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(o,";"),"margin"===n&&"\n padding-left: ".concat(r,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(o,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(o,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Ro," {\n right: ").concat(s,"px ").concat(o,";\n }\n \n .").concat(Po," {\n margin-right: ").concat(s,"px ").concat(o,";\n }\n \n .").concat(Ro," .").concat(Ro," {\n right: 0 ").concat(o,";\n }\n \n .").concat(Po," .").concat(Po," {\n margin-right: 0 ").concat(o,";\n }\n \n body[").concat(Zo,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},Qo=function(){var e=parseInt(document.body.getAttribute(Zo)||"0",10);return isFinite(e)?e:0},Jo=function(t){var n=t.noRelative,o=t.noImportant,r=t.gapMode,a=void 0===r?"margin":r;e.useEffect(function(){return document.body.setAttribute(Zo,(Qo()+1).toString()),function(){var e=Qo()-1;e<=0?document.body.removeAttribute(Zo):document.body.setAttribute(Zo,e.toString())}},[]);var i=e.useMemo(function(){return Ko(a)},[a]);return e.createElement(Go,{styles:Xo(i,!n,a,o?"":"!important")})},er=!1;if("undefined"!=typeof window)try{var tr=Object.defineProperty({},"passive",{get:function(){return er=!0,!0}});window.addEventListener("test",tr,tr),window.removeEventListener("test",tr,tr)}catch(e){er=!1}var nr=!!er&&{passive:!1},or=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},rr=function(e,t){var n=t.ownerDocument,o=t;do{if("undefined"!=typeof ShadowRoot&&o instanceof ShadowRoot&&(o=o.host),ar(e,o)){var r=ir(e,o);if(r[1]>r[2])return!0}o=o.parentNode}while(o&&o!==n.body);return!1},ar=function(e,t){return"v"===e?function(e){return or(e,"overflowY")}(t):function(e){return or(e,"overflowX")}(t)},ir=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},sr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},lr=function(e){return[e.deltaX,e.deltaY]},cr=function(e){return e&&"current"in e?e.current:e},dr=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},ur=0,pr=[];function fr(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var mr,hr=(mr=function(t){var n=e.useRef([]),o=e.useRef([0,0]),r=e.useRef(),a=e.useState(ur++)[0],i=e.useState(Yo)[0],s=e.useRef(t);e.useEffect(function(){s.current=t},[t]),e.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(a));var e=function(e,t,n){if(n||2===arguments.length)for(var o,r=0,a=t.length;r<a;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}([t.lockRef.current],(t.shards||[]).map(cr),!0).filter(Boolean);return e.forEach(function(e){return e.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),e.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(a))})}}},[t.inert,t.lockRef.current,t.shards]);var l=e.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var n,a=sr(e),i=o.current,l="deltaX"in e?e.deltaX:i[0]-a[0],c="deltaY"in e?e.deltaY:i[1]-a[1],d=e.target,u=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===u&&"range"===d.type)return!1;var p=window.getSelection(),f=p&&p.anchorNode;if(f&&(f===d||f.contains(d)))return!1;var m=rr(u,d);if(!m)return!0;if(m?n=u:(n="v"===u?"h":"v",m=rr(u,d)),!m)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=n),!n)return!0;var h=r.current||n;return function(e,t,n,o){var r=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=r*o,i=n.target,s=t.contains(i),l=!1,c=a>0,d=0,u=0;do{if(!i)break;var p=ir(e,i),f=p[0],m=p[1]-p[2]-r*f;(f||m)&&ar(e,i)&&(d+=m,u+=f);var h=i.parentNode;i=h&&h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?h.host:h}while(!s&&i!==document.body||s&&(t.contains(i)||t===i));return(c&&Math.abs(d)<1||!c&&Math.abs(u)<1)&&(l=!0),l}(h,t,e,"h"===h?l:c)},[]),c=e.useCallback(function(e){var t=e;if(pr.length&&pr[pr.length-1]===i){var o="deltaY"in t?lr(t):sr(t),r=n.current.filter(function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,o)})[0];if(r&&r.should)t.cancelable&&t.preventDefault();else if(!r){var a=(s.current.shards||[]).map(cr).filter(Boolean).filter(function(e){return e.contains(t.target)});(a.length>0?l(t,a[0]):!s.current.noIsolation)&&t.cancelable&&t.preventDefault()}}},[]),d=e.useCallback(function(e,t,o,r){var a={name:e,delta:t,target:o,should:r,shadowParent:fr(o)};n.current.push(a),setTimeout(function(){n.current=n.current.filter(function(e){return e!==a})},1)},[]),u=e.useCallback(function(e){o.current=sr(e),r.current=void 0},[]),p=e.useCallback(function(e){d(e.type,lr(e),e.target,l(e,t.lockRef.current))},[]),f=e.useCallback(function(e){d(e.type,sr(e),e.target,l(e,t.lockRef.current))},[]);e.useEffect(function(){return pr.push(i),t.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:f}),document.addEventListener("wheel",c,nr),document.addEventListener("touchmove",c,nr),document.addEventListener("touchstart",u,nr),function(){pr=pr.filter(function(e){return e!==i}),document.removeEventListener("wheel",c,nr),document.removeEventListener("touchmove",c,nr),document.removeEventListener("touchstart",u,nr)}},[]);var m=t.removeScrollBar,h=t.inert;return e.createElement(e.Fragment,null,h?e.createElement(i,{styles:dr(a)}):null,m?e.createElement(Jo,{noRelative:t.noRelative,gapMode:t.gapMode}):null)},Wo.useMedium(mr),zo),gr=e.forwardRef(function(t,n){return e.createElement(Bo,$t({},t,{ref:n,sideCar:hr}))});gr.classNames=Bo.classNames;var vr=new WeakMap,yr=new WeakMap,br={},xr=0,wr=function(e){return e&&(e.host||wr(e.parentNode))},kr=function(e,t,n,o){var r=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=wr(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);br[n]||(br[n]=new WeakMap);var a=br[n],i=[],s=new Set,l=new Set(r),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};r.forEach(c);var d=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))d(e);else try{var t=e.getAttribute(o),r=null!==t&&"false"!==t,l=(vr.get(e)||0)+1,c=(a.get(e)||0)+1;vr.set(e,l),a.set(e,c),i.push(e),1===l&&r&&yr.set(e,!0),1===c&&e.setAttribute(n,"true"),r||e.setAttribute(o,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return d(t),s.clear(),xr++,function(){i.forEach(function(e){var t=vr.get(e)-1,r=a.get(e)-1;vr.set(e,t),a.set(e,r),t||(yr.has(e)||e.removeAttribute(o),yr.delete(e)),r||e.removeAttribute(n)}),--xr||(vr=new WeakMap,vr=new WeakMap,yr=new WeakMap,br={})}},Nr=function(e,t,n){void 0===n&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),kr(o,r,n,"aria-hidden")):function(){return null}},Cr="Dialog",[_r,Dr]=Vn(Cr),[Sr,Er]=_r(Cr),Mr=t=>{const{__scopeDialog:n,children:o,open:r,defaultOpen:a,onOpenChange:i,modal:s=!0}=t,l=e.useRef(null),c=e.useRef(null),[d,u]=eo({prop:r,defaultProp:a??!1,onChange:i,caller:Cr});return v(Sr,{scope:n,triggerRef:l,contentRef:c,contentId:Qn(),titleId:Qn(),descriptionId:Qn(),open:d,onOpenChange:u,onOpenToggle:e.useCallback(()=>u(e=>!e),[u]),modal:s,children:o})};Mr.displayName=Cr;var Or="DialogTrigger",Tr=e.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=Er(Or,n),a=_(t,r.triggerRef);return v(ao.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Xr(r.open),...o,ref:a,onClick:Kn(e.onClick,r.onOpenToggle)})});Tr.displayName=Or;var Rr="DialogPortal",[Pr,Ar]=_r(Rr,{forceMount:void 0}),Ir=t=>{const{__scopeDialog:n,forceMount:o,children:r,container:a}=t,i=Er(Rr,n);return v(Pr,{scope:n,forceMount:o,children:e.Children.map(r,e=>v(So,{present:o||i.open,children:v(Do,{asChild:!0,container:a,children:e})}))})};Ir.displayName=Rr;var jr="DialogOverlay",Fr=e.forwardRef((e,t)=>{const n=Ar(jr,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,a=Er(jr,e.__scopeDialog);return a.modal?v(So,{present:o||a.open,children:v(zr,{...r,ref:t})}):null});Fr.displayName=jr;var Lr=to("DialogOverlay.RemoveScroll"),zr=e.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=Er(jr,n);return v(gr,{as:Lr,allowPinchZoom:!0,shards:[r.contentRef],children:v(ao.div,{"data-state":Xr(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Wr="DialogContent",$r=e.forwardRef((e,t)=>{const n=Ar(Wr,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,a=Er(Wr,e.__scopeDialog);return v(So,{present:o||a.open,children:a.modal?v(Br,{...r,ref:t}):v(qr,{...r,ref:t})})});$r.displayName=Wr;var Br=e.forwardRef((t,n)=>{const o=Er(Wr,t.__scopeDialog),r=e.useRef(null),a=_(n,o.contentRef,r);return e.useEffect(()=>{const e=r.current;if(e)return Nr(e)},[]),v(Hr,{...t,ref:a,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Kn(t.onCloseAutoFocus,e=>{e.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:Kn(t.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:Kn(t.onFocusOutside,e=>e.preventDefault())})}),qr=e.forwardRef((t,n)=>{const o=Er(Wr,t.__scopeDialog),r=e.useRef(!1),a=e.useRef(!1);return v(Hr,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(r.current||o.triggerRef.current?.focus(),e.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(r.current=!0,"pointerdown"===e.detail.originalEvent.type&&(a.current=!0));const n=e.target,i=o.triggerRef.current?.contains(n);i&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&a.current&&e.preventDefault()}})}),Hr=e.forwardRef((t,n)=>{const{__scopeDialog:o,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,...s}=t,l=Er(Wr,o),c=e.useRef(null),d=_(n,c);return Oo(),y(b,{children:[v(bo,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:i,children:v(fo,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Xr(l.open),...s,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),y(b,{children:[v(ta,{titleId:l.titleId}),v(na,{contentRef:c,descriptionId:l.descriptionId})]})]})}),Yr="DialogTitle",Vr=e.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=Er(Yr,n);return v(ao.h2,{id:r.titleId,...o,ref:t})});Vr.displayName=Yr;var Ur="DialogDescription",Kr=e.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=Er(Ur,n);return v(ao.p,{id:r.descriptionId,...o,ref:t})});Kr.displayName=Ur;var Gr="DialogClose",Zr=e.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=Er(Gr,n);return v(ao.button,{type:"button",...o,ref:t,onClick:Kn(e.onClick,()=>r.onOpenChange(!1))})});function Xr(e){return e?"open":"closed"}Zr.displayName=Gr;var Qr="DialogTitleWarning",[Jr,ea]=function(t,n){const o=e.createContext(n),r=t=>{const{children:n,...r}=t,a=e.useMemo(()=>r,Object.values(r));return v(o.Provider,{value:a,children:n})};return r.displayName=t+"Provider",[r,function(r){const a=e.useContext(o);if(a)return a;if(void 0!==n)return n;throw new Error(`\`${r}\` must be used within \`${t}\``)}]}(Qr,{contentName:Wr,titleName:Yr,docsSlug:"dialog"}),ta=({titleId:t})=>{const n=ea(Qr),o=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return e.useEffect(()=>{if(t){document.getElementById(t)||console.error(o)}},[o,t]),null},na=({contentRef:t,descriptionId:n})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ea("DialogDescriptionWarning").contentName}}.`;return e.useEffect(()=>{const e=t.current?.getAttribute("aria-describedby");if(n&&e){document.getElementById(n)||console.warn(o)}},[o,t,n]),null},oa=Mr,ra=Tr,aa=Ir,ia=Fr,sa=$r,la=Vr,ca=Kr,da=Zr,ua="AlertDialog",[pa]=Vn(ua,[Dr]),fa=Dr(),ma=e=>{const{__scopeAlertDialog:t,...n}=e,o=fa(t);return v(oa,{...o,...n,modal:!0})};ma.displayName=ua;var ha=e.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=fa(n);return v(ra,{...r,...o,ref:t})});ha.displayName="AlertDialogTrigger";var ga=e=>{const{__scopeAlertDialog:t,...n}=e,o=fa(t);return v(aa,{...o,...n})};ga.displayName="AlertDialogPortal";var va=e.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=fa(n);return v(ia,{...r,...o,ref:t})});va.displayName="AlertDialogOverlay";var ya="AlertDialogContent",[ba,xa]=pa(ya),wa=function(e){const t=({children:e})=>v(b,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=oo,t}("AlertDialogContent"),ka=e.forwardRef((t,n)=>{const{__scopeAlertDialog:o,children:r,...a}=t,i=fa(o),s=e.useRef(null),l=_(n,s),c=e.useRef(null);return v(Jr,{contentName:ya,titleName:Na,docsSlug:"alert-dialog",children:v(ba,{scope:o,cancelRef:c,children:y(sa,{role:"alertdialog",...i,...a,ref:l,onOpenAutoFocus:Kn(a.onOpenAutoFocus,e=>{e.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[v(wa,{children:r}),v(Oa,{contentRef:s})]})})})});ka.displayName=ya;var Na="AlertDialogTitle",Ca=e.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=fa(n);return v(la,{...r,...o,ref:t})});Ca.displayName=Na;var _a="AlertDialogDescription",Da=e.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=fa(n);return v(ca,{...r,...o,ref:t})});Da.displayName=_a;var Sa=e.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=fa(n);return v(da,{...r,...o,ref:t})});Sa.displayName="AlertDialogAction";var Ea="AlertDialogCancel",Ma=e.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,{cancelRef:r}=xa(Ea,n),a=fa(n),i=_(t,r);return v(da,{...a,...o,ref:i})});Ma.displayName=Ea;var Oa=({contentRef:t})=>{const n=`\`${ya}\` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the \`${ya}\` by passing a \`${_a}\` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${ya}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return e.useEffect(()=>{document.getElementById(t.current?.getAttribute("aria-describedby"))||console.warn(n)},[n,t]),null},Ta=ma,Ra=ha,Pa=ga,Aa=va,Ia=ka,ja=Sa,Fa=Ma,La=Ca,za=Da;function Wa({...e}){return v(Ta,{"data-slot":"alert-dialog",...e})}function $a({...e}){return v(Ra,{"data-slot":"alert-dialog-trigger",...e})}function Ba({...e}){return v(Pa,{"data-slot":"alert-dialog-portal",...e})}function qa({className:e,...t}){return v(Aa,{"data-slot":"alert-dialog-overlay",className:Je("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function Ha({className:e,...t}){return y(Ba,{children:[v(qa,{}),v(Ia,{"data-slot":"alert-dialog-content",className:Je("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...t})]})}function Ya({className:e,...t}){return v("div",{"data-slot":"alert-dialog-header",className:Je("flex flex-col gap-2 text-center sm:text-left",e),...t})}function Va({className:e,...t}){return v("div",{"data-slot":"alert-dialog-footer",className:Je("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function Ua({className:e,...t}){return v(La,{"data-slot":"alert-dialog-title",className:Je("text-lg font-semibold",e),...t})}function Ka({className:e,...t}){return v(za,{"data-slot":"alert-dialog-description",className:Je("text-muted-foreground text-sm",e),...t})}function Ga({className:e,...t}){return v(ja,{className:Je(et(),e),...t})}function Za({className:e,...t}){return v(Fa,{className:Je(et({variant:"outline"}),e),...t})}const Xa={Root:function({open:e,onOpenChange:t,children:n}){return v(Wa,{open:e,onOpenChange:t,children:n})},Content:function({children:e,className:t}){return v(Ha,{className:Je("bg-white",t),children:e})},Header:function({children:e}){return v(Ya,{children:e})},Title:function({children:e}){return v(Ua,{children:e})},Description:function({children:e}){return v(Ka,{children:e})},Footer:function({children:e}){return v(Va,{children:e})},Action:function({children:e,onClick:t,variant:n="default",className:o=""}){return v(Ga,{onClick:t,className:Je("bg-[#026CB6] text-[#FFFFFF]",`${"destructive"===n?"bg-destructive text-destructive-foreground hover:bg-destructive/90":""} ${o}`.trim()),children:e})},Cancel:function({children:e,onClick:t,className:n}){return v(Za,{onClick:t,className:Je("bg-[#D1D5DB] text-[#3F3F46]",n),children:e})}};const Qa={H1:function({children:e,className:t,...n}){return v("h1",{className:Je(t),...n,children:e})},Muted:function({children:e,className:t,...n}){return v("p",{className:Je("text-muted-foreground",t),...n,children:e})}},Ja=e.forwardRef(({className:e,...t},n)=>v("div",{ref:n,className:Je("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Ja.displayName="Card";const ei=e.forwardRef(({className:e,...t},n)=>v("div",{ref:n,className:Je("flex flex-col space-y-1.5 p-6",e),...t}));ei.displayName="CardHeader";const ti=e.forwardRef(({className:e,...t},n)=>v("div",{ref:n,className:Je("font-semibold leading-none tracking-tight",e),...t}));ti.displayName="CardTitle";const ni=e.forwardRef(({className:e,...t},n)=>v("div",{ref:n,className:Je("text-sm text-muted-foreground",e),...t}));ni.displayName="CardDescription";const oi=e.forwardRef(({className:e,...t},n)=>v("div",{ref:n,className:Je("p-6 pt-0",e),...t}));oi.displayName="CardContent";const ri=e.forwardRef(({className:e,...t},n)=>v("div",{ref:n,className:Je("flex items-center p-6 pt-0",e),...t}));ri.displayName="CardFooter";const ai={Root:Ja,Content:oi,Header:ei,Title:ti,Description:ni},ii=L("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground",success:"border-transparent bg-green-100 text-green-800 hover:bg-green-200",warning:"border-transparent bg-yellow-100 text-yellow-800 hover:bg-yellow-200",info:"border-transparent bg-blue-100 text-blue-800 hover:bg-blue-200"}},defaultVariants:{variant:"default"}});function si({className:e,variant:t,...n}){return v("div",{"data-slot":"badge",className:Je(ii({variant:t}),e),...n})}const li=L("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs transition-colors",{variants:{variant:{primary:"bg-primary text-primary-foreground",secondary:"bg-[#DCFCE7] text-[#15803D]",warning:"bg-[#FEF3C7] text-[#B45309]",destructive:"bg-[#FEE2E2] text-[#B91C1C]",muted:"bg-[#F1F5F9] text-[#334155]"},size:{default:"",sm:"text-[12px] font-bold",lg:"text-[14px] font-normal"}},defaultVariants:{variant:"primary",size:"default"}});function ci({className:e,variant:t,size:n,...o}){const r=Je(li({variant:t,size:n}),e);return v("div",{className:r,...o})}
|
|
15
|
-
/**
|
|
16
|
-
* @license lucide-react v0.562.0 - ISC
|
|
17
|
-
*
|
|
18
|
-
* This source code is licensed under the ISC license.
|
|
19
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
20
|
-
*/const di=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},ui=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),pi=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};
|
|
21
|
-
/**
|
|
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
|
-
*/
|
|
27
|
-
var fi={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"};
|
|
28
|
-
/**
|
|
29
|
-
* @license lucide-react v0.562.0 - ISC
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the ISC license.
|
|
32
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/const mi=n(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:r="",children:a,iconNode:i,...s},l)=>u("svg",{ref:l,...fi,width:t,height:t,stroke:e,strokeWidth:o?24*Number(n)/Number(t):n,className:ui("lucide",r),...!a&&!pi(s)&&{"aria-hidden":"true"},...s},[...i.map(([e,t])=>u(e,t)),...Array.isArray(a)?a:[a]])),hi=(e,t)=>{const o=n(({className:n,...o},r)=>{return u(mi,{ref:r,iconNode:t,className:ui(`lucide-${a=di(e),a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...o});var a});return o.displayName=di(e),o},gi=hi("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]),vi=hi("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),yi=hi("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),bi=hi("badge-info",[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["line",{x1:"12",x2:"12",y1:"16",y2:"12",key:"1y1yb1"}],["line",{x1:"12",x2:"12.01",y1:"8",y2:"8",key:"110wyk"}]]),xi=hi("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),wi=hi("chart-no-axes-gantt",[["path",{d:"M6 5h12",key:"fvfigv"}],["path",{d:"M4 12h10",key:"oujl3d"}],["path",{d:"M12 19h8",key:"baeox8"}]]),ki=hi("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Ni=hi("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Ci=hi("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),_i=hi("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Di=hi("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),Si=hi("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),Ei=hi("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),Mi=hi("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),Oi=hi("clipboard",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]]),Ti=hi("cloud-upload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]),Ri=hi("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),Pi=hi("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]),Ai=hi("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]),Ii=hi("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),ji=hi("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]),Fi=hi("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]),Li=hi("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),zi=hi("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]),Wi=hi("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]),$i=hi("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),Bi=hi("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),qi=hi("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]),Hi=hi("trash",[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]),Yi=hi("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);
|
|
34
|
-
/**
|
|
35
|
-
* @license lucide-react v0.562.0 - ISC
|
|
36
|
-
*
|
|
37
|
-
* This source code is licensed under the ISC license.
|
|
38
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
39
|
-
*/!function(e){if("undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}(':root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n');var Vi=e=>"number"==typeof e&&!isNaN(e),Ui=e=>"string"==typeof e,Ki=e=>"function"==typeof e,Gi=1,Zi=()=>""+Gi++,Xi=new Map,Qi=[],Ji=new Set,es=()=>Xi.size>0;function ts(e){if(es()){if(null==e||(e=>Ui(e)||Vi(e))(e))Xi.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=Xi.get(e.containerId);t?t.removeToast(e.id):Xi.forEach(t=>{t.removeToast(e.id)})}}else Qi=Qi.filter(t=>null!=e&&t.options.toastId!==e)}function ns(e,t){(e=>p(e)||Ui(e)||Ki(e)||Vi(e))(e)&&(es()||Qi.push({content:e,options:t}),Xi.forEach(n=>{n.buildToast(e,t)}))}function os(e,t){Xi.forEach(n=>{(null==t||null==t||!t.containerId||(null==t?void 0:t.containerId)===n.id)&&n.toggle(e,null==t?void 0:t.id)})}function rs(e){return e&&(Ui(e.toastId)||Vi(e.toastId))?e.toastId:Zi()}function as(e,t){return ns(e,t),t.toastId}function is(e,t){return{...t,type:t&&t.type||e,toastId:rs(t)}}function ss(e){return(t,n)=>as(t,is(e,n))}function ls(e,t){return as(e,is("default",t))}ls.loading=(e,t)=>as(e,is("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),ls.promise=function(e,{pending:t,error:n,success:o},r){let a;t&&(a=Ui(t)?ls.loading(t,r):ls.loading(t.render,{...r,...t}));let i={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},s=(e,t,n)=>{if(null==t)return void ls.dismiss(a);let o={type:e,...i,...r,data:n},s=Ui(t)?{render:t}:t;return a?ls.update(a,{...o,...s}):ls(s.render,{...o,...s}),n},l=Ki(e)?e():e;return l.then(e=>s("success",o,e)).catch(e=>s("error",n,e)),l},ls.success=ss("success"),ls.info=ss("info"),ls.error=ss("error"),ls.warning=ss("warning"),ls.warn=ls.warning,ls.dark=(e,t)=>as(e,is("default",{theme:"dark",...t})),ls.dismiss=function(e){ts(e)},ls.clearWaitingQueue=(e={})=>{Xi.forEach(t=>{t.props.limit&&(!e.containerId||t.id===e.containerId)&&t.clearQueue()})},ls.isActive=function(e,t){var n;if(t)return!(null==(n=Xi.get(t))||!n.isToastActive(e));let o=!1;return Xi.forEach(t=>{t.isToastActive(e)&&(o=!0)}),o},ls.update=(e,t={})=>{let n=((e,{containerId:t})=>{var n;return null==(n=Xi.get(t||1))?void 0:n.toasts.get(e)})(e,t);if(n){let{props:o,content:r}=n,a={delay:100,...o,...t,toastId:t.toastId||e,updateId:Zi()};a.toastId!==e&&(a.staleId=e);let i=a.render||r;delete a.render,as(i,a)}},ls.done=e=>{ls.update(e,{progress:1})},ls.onChange=function(e){return Ji.add(e),()=>{Ji.delete(e)}},ls.play=e=>os(!0,e),ls.pause=e=>os(!1,e);const cs={"application/pdf":[".pdf"],"application/msword":[".doc"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/vnd.ms-excel":[".xls"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":[".xlsx"],"application/vnd.ms-powerpoint":[".ppt"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":[".pptx"],"image/jpeg":[".jpg",".jpeg"],"image/png":[".png"],"video/mp4":[".mp4"]};function ds({onFileSelected:e,onFileDeleted:t,acceptExtensions:n,accept:r,maxSizeMB:a=25}){const[i,l]=d(null),c=1024*a*1024,u=o(()=>r||(n?.length?ps(n):cs),[r,n]),p=o(()=>Object.values(u).reduce((e,t)=>e.concat(t),[]).join(","),[u]),f=s((t,o)=>{if(o.length>0){const{errors:e}=o[0],t=e[0];return void("file-too-large"===t.code?ls.error(`File size must be under ${a} MB`):"file-invalid-type"===t.code?ls.error(`Invalid file type. Allowed: ${n}`):ls.error(t.message))}const r=t[0];r&&(l(r),e(new File([r],r.name,{type:r.type,lastModified:r.lastModified})),ls.success(`File "${r.name}" selected successfully!`))},[e,a,n]),{getRootProps:m,getInputProps:h,isDragActive:g}=Bn({onDrop:f,maxFiles:1,maxSize:c,accept:u,multiple:!1});return y("div",{className:"space-y-2",children:[y("p",{className:"font-bold",children:["Envie um arquivo com até ",a," MB."]}),y("div",i?{className:"flex items-center justify-between border rounded-md px-3 py-2 bg-white",children:[y("div",{className:"flex items-center gap-2",children:[v(Ii,{className:"h-4 w-4 text-gray-600"}),v("span",{className:"text-sm",children:i.name})]}),y("div",{className:"flex items-center gap-1",children:[v("button",{onClick:()=>{const t=document.createElement("input");t.type="file",t.accept=p,t.onchange=t=>{const n=t.target.files?.[0];if(!n)return;const o=Object.values(u).reduce((e,t)=>e.concat(t),[]);o.some(e=>n.name.toLowerCase().endsWith(e.toLowerCase()))?n.size>c?ls.error(`File size must be under ${a} MB`):(l(n),e(n),ls.success(`File "${n.name}" selected successfully!`)):ls.error(`Invalid file type. Allowed: ${o.join(", ")}`)},t.click()},className:"p-1 hover:bg-gray-100 rounded",children:v($i,{className:"h-4 w-4"})}),v("button",{onClick:()=>{l(null),t?.(),ls.success("File removed")},className:"p-1 hover:bg-red-50 rounded",children:v(qi,{className:"h-4 w-4 text-red-600"})})]})]}:{...m(),className:"border rounded-lg text-center cursor-pointer transition-colors h-[300px] "+(g?"border-blue-500 bg-blue-50":"border-gray-300 hover:border-gray-400"),children:[v("input",{...h()}),y("div",{className:"py-16 px-6 flex flex-col items-center",children:[v(Ti,{strokeWidth:1,className:"size-[80px] text-[#026CB6]"}),v("p",{className:"text-muted",children:"Arraste e solte ou selecione um arquivo."}),y("p",{className:"text-muted",children:["Arquivos aceitos:",n]})]})]})]})}const us=e=>e.map(e=>e.startsWith(".")?e.toLowerCase():`.${e.toLowerCase()}`),ps=e=>({"application/octet-stream":us(e)});function fs({initialCollapsed:e=!1,onPersist:t}={}){const[n,o]=d(e),[r,a]=d(!1),i=s(()=>{a(!0),o(e=>{const n=!e;return t?.(n),n})},[t]),l=s(()=>{a(!0),o(!1),t?.(!1)},[t]),c=s(()=>{a(!1)},[]),[u,p]=d({}),f=s(e=>{if(n)return l(),void p({[e]:!0});p(t=>({...t,[e]:!t[e]}))},[n,l]),m=s(()=>{p({})},[]);return{isCollapsed:n,isCollapsing:r,expandedItems:u,setExpandedItems:p,toggleCollapse:i,expand:l,handleTransitionEnd:c,toggleExpanded:f,setExpandedOnCollapse:m}}const ms=f(void 0);function hs(){const e=m(ms);if(!e)throw new Error("Sidebar components must be used within a Sidebar.Root");return e}const gs={Root:function({children:e,isCollapsed:t,isCollapsing:n=!1,onToggleCollapse:o,onTransitionEnd:r,className:a}){const i=t?"smaller:w-20 w-20":"smaller:w-[232px] w-[232px]";return v(ms.Provider,{value:{isCollapsed:t,isCollapsing:n,onToggleCollapse:o},children:v("nav",{className:Je(i,"smaller:p-3 px-2 py-6 flex flex-col items-center bg-primary mb-2 rounded-lg transition-all duration-300 ease-in-out h-full min-h-0",a),onTransitionEnd:r,children:e})})},Header:function({children:e,className:t}){return v("div",{className:Je("w-full flex justify-between items-center mb-8 gap-4",t),children:e})},Content:function({children:e,className:t}){return v(dt,{className:Je("w-full flex-1 min-h-0 items-stretch gap-1 overflow-y-auto",t),children:e})},Footer:function({children:e,className:t}){return v("div",{className:Je("mt-auto w-full",t),children:e})},Toggle:function({className:e}){const{isCollapsed:t,onToggleCollapse:n}=hs();return v("div",{className:Je("w-full flex transition-all duration-300 ease-in-out",t?"justify-center":"justify-end",e),children:v(tt,{title:"Recolher Barra Lateral",className:Je("size-[40px] bg-transparent rounded-full hover:bg-white/5 transition-all duration-300 ease-in-out",t?"justify-center":"justify-end"),onClick:n,children:v(t?Wi:wi,{className:"size-[32px] text-white"})})})},Logo:function({src:e,alt:t,width:n=200,height:o=40,className:r,ImageComponent:a=({src:e,alt:t,...n})=>v("img",{src:e,alt:t,...n})}){const{isCollapsed:i}=hs();return v(dt,{className:Je("py-2",r),children:v(a,{className:Je("transition-opacity duration-300 ease-in-out",i?"opacity-0 invisible":"opacity-100"),src:e,width:n,height:o,alt:t})})},Link:function({icon:e,children:t,href:n,active:o,className:r,LinkComponent:a=({children:e,...t})=>v("a",{...t,children:e})}){const{isCollapsed:i,isCollapsing:s}=hs();return v(a,{href:n,title:"string"==typeof t?t:void 0,className:Je("w-full h-[48px] smaller:p-3 p-4 font-bold text-white rounded-md overflow-hidden transition-all duration-300 ease-in-out hover:bg-white/5 justify-start",o?"bg-white/5":"",r),children:y(dt,{direction:"row",gap:2,children:[v(e,{className:"size-6"}),!i&&!s&&v("span",{className:"transition-opacity duration-300 ease-in-out opacity-100",children:t})]})})},NavGroup:function({icon:e,title:t,isExpanded:n,isActive:o=!1,onToggle:r,children:a,className:i}){const{isCollapsed:s,isCollapsing:l}=hs();return y(dt,{className:Je("w-full gap-0",i),children:[y(tt,{type:"button",title:t,onClick:r,variant:"ghost",className:Je("w-full h-[48px] smaller:p-3 p-4 font-bold text-white hover:bg-white/5 hover:text-white justify-start rounded-md transition-all duration-300 ease-in-out",o?"bg-white/5":""),children:[v(e,{className:"!size-6 shrink-0"}),!s&&!l&&y(b,{children:[v("span",{className:"flex-1 text-left transition-opacity duration-300 ease-in-out opacity-100 text-base",children:t}),v(Ni,{width:20,height:20,className:Je("shrink-0 transition-transform duration-300 ease-in-out",n?"rotate-180":"")})]})]}),!s&&!l&&v("div",{className:Je("overflow-hidden transition-all duration-300 ease-in-out",n?"max-h-96 opacity-100 mt-1":"max-h-0 opacity-0"),children:v(dt,{className:"ml-6 gap-1",children:a})})]})},NavSubLink:function({title:e,href:t,active:n=!1,className:o,LinkComponent:r=({children:e,...t})=>v("a",{...t,children:e})}){return v(r,{href:t,title:e,className:Je("block w-full px-4 py-3 text-sm text-white rounded-md transition-all duration-200 ease-in-out hover:bg-white/5 hover:translate-x-1",n?"bg-white/10 font-semibold":"",o),children:e})},Action:function({icon:e,label:t,onClick:n,className:o}){const{isCollapsed:r,isCollapsing:a}=hs();return v(tt,{title:t,onClick:n,variant:"ghost",className:Je("w-full h-[48px] smaller:p-3 p-4 font-bold text-white hover:bg-transparent hover:text-white/80 transition-all duration-300 ease-in-out justify-start",o),children:y(dt,{direction:"row",gap:2,children:[v(e,{width:24,height:24}),!r&&!a&&v("span",{className:"transition-opacity duration-300 ease-in-out opacity-100",children:t})]})})}};function vs({links:e,iconMap:t,pathname:n,isSidebarCollapsedFromQuery:o=!1,logo:r,onLogout:a,logoutIcon:s=zi,logoutLabel:l="Logout",LinkComponent:c,ImageComponent:d}){const u=n.split("/")[2]??"",{isCollapsed:p,isCollapsing:f,expandedItems:m,setExpandedItems:h,toggleCollapse:g,toggleExpanded:b,handleTransitionEnd:x,setExpandedOnCollapse:w}=fs({initialCollapsed:o,onPersist:e=>{const t=new URLSearchParams;t.set("sidebar-collapsed",String(e)),window.history.replaceState({},"",`${window.location.pathname}?${t}`)}});i(()=>{if(!o){const t={};e.forEach(e=>{if(e.subItems){e.subItems.some(e=>n===e.href)&&(t[e.title]=!0)}}),h(t)}},[o,e,n,h]);return y(gs.Root,{isCollapsed:p,isCollapsing:f,onToggleCollapse:()=>{p||w(),g()},onTransitionEnd:x,className:"h-full",children:[v(gs.Toggle,{}),v(gs.Logo,{src:r.src,width:r.width,height:r.height,alt:r.alt,ImageComponent:d}),v(gs.Content,{className:"mt-8",children:e.map(e=>{const o=t[e.icon];if(!!e.subItems?.length){const t=e.subItems?.some(e=>n===e.href||u===e.href.split("/")[2]);return v(gs.NavGroup,{icon:o,title:e.title,isExpanded:!!m[e.title],isActive:!!t,onToggle:()=>b(e.title),children:e.subItems?.map(e=>{const t=n===e.href;return v(gs.NavSubLink,{title:e.title,href:{pathname:e.href,query:{"sidebar-collapsed":p}},active:t,LinkComponent:c},e.href)})},e.title)}const r=e.href?.split("/")[2]??"";return v(gs.Link,{icon:o,href:{pathname:e.href,query:{"sidebar-collapsed":p}},active:u===r,LinkComponent:c,children:e.title},e.href)})}),v(gs.Footer,{children:v(gs.Action,{icon:s,label:l,onClick:async()=>{await a()}})})]})}var ys=e.createContext(void 0);function bs(t){const n=e.useContext(ys);return t||n||"ltr"}var xs="rovingFocusGroup.onEntryFocus",ws={bubbles:!1,cancelable:!0},ks="RovingFocusGroup",[Ns,Cs,_s]=function(e){const n=e+"CollectionProvider",[o,r]=Vn(n),[a,i]=o(n,{collectionRef:{current:null},itemMap:new Map}),s=e=>{const{scope:n,children:o}=e,r=t.useRef(null),i=t.useRef(new Map).current;return v(a,{scope:n,itemMap:i,collectionRef:r,children:o})};s.displayName=n;const l=e+"CollectionSlot",c=to(l),d=t.forwardRef((e,t)=>{const{scope:n,children:o}=e,r=_(t,i(l,n).collectionRef);return v(c,{ref:r,children:o})});d.displayName=l;const u=e+"CollectionItemSlot",p="data-radix-collection-item",f=to(u),m=t.forwardRef((e,n)=>{const{scope:o,children:r,...a}=e,s=t.useRef(null),l=_(n,s),c=i(u,o);return t.useEffect(()=>(c.itemMap.set(s,{ref:s,...a}),()=>{c.itemMap.delete(s)})),v(f,{[p]:"",ref:l,children:r})});return m.displayName=u,[{Provider:s,Slot:d,ItemSlot:m},function(n){const o=i(e+"CollectionConsumer",n);return t.useCallback(()=>{const e=o.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(o.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[o.collectionRef,o.itemMap])},r]}(ks),[Ds,Ss]=Vn(ks,[_s]),[Es,Ms]=Ds(ks),Os=e.forwardRef((e,t)=>v(Ns.Provider,{scope:e.__scopeRovingFocusGroup,children:v(Ns.Slot,{scope:e.__scopeRovingFocusGroup,children:v(Ts,{...e,ref:t})})}));Os.displayName=ks;var Ts=e.forwardRef((t,n)=>{const{__scopeRovingFocusGroup:o,orientation:r,loop:a=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:u=!1,...p}=t,f=e.useRef(null),m=_(n,f),h=bs(i),[g,y]=eo({prop:s,defaultProp:l??null,onChange:c,caller:ks}),[b,x]=e.useState(!1),w=io(d),k=Cs(o),N=e.useRef(!1),[C,D]=e.useState(0);return e.useEffect(()=>{const e=f.current;if(e)return e.addEventListener(xs,w),()=>e.removeEventListener(xs,w)},[w]),v(Es,{scope:o,orientation:r,dir:h,loop:a,currentTabStopId:g,onItemFocus:e.useCallback(e=>y(e),[y]),onItemShiftTab:e.useCallback(()=>x(!0),[]),onFocusableItemAdd:e.useCallback(()=>D(e=>e+1),[]),onFocusableItemRemove:e.useCallback(()=>D(e=>e-1),[]),children:v(ao.div,{tabIndex:b||0===C?-1:0,"data-orientation":r,...p,ref:m,style:{outline:"none",...t.style},onMouseDown:Kn(t.onMouseDown,()=>{N.current=!0}),onFocus:Kn(t.onFocus,e=>{const t=!N.current;if(e.target===e.currentTarget&&t&&!b){const t=new CustomEvent(xs,ws);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=k().filter(e=>e.focusable);Is([e.find(e=>e.active),e.find(e=>e.id===g),...e].filter(Boolean).map(e=>e.ref.current),u)}}N.current=!1}),onBlur:Kn(t.onBlur,()=>x(!1))})})}),Rs="RovingFocusGroupItem",Ps=e.forwardRef((t,n)=>{const{__scopeRovingFocusGroup:o,focusable:r=!0,active:a=!1,tabStopId:i,children:s,...l}=t,c=Qn(),d=i||c,u=Ms(Rs,o),p=u.currentTabStopId===d,f=Cs(o),{onFocusableItemAdd:m,onFocusableItemRemove:h,currentTabStopId:g}=u;return e.useEffect(()=>{if(r)return m(),()=>h()},[r,m,h]),v(Ns.ItemSlot,{scope:o,id:d,focusable:r,active:a,children:v(ao.span,{tabIndex:p?0:-1,"data-orientation":u.orientation,...l,ref:n,onMouseDown:Kn(t.onMouseDown,e=>{r?u.onItemFocus(d):e.preventDefault()}),onFocus:Kn(t.onFocus,()=>u.onItemFocus(d)),onKeyDown:Kn(t.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const o=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(o)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(o)?void 0:As[o]}(e,u.orientation,u.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let r=f().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)r.reverse();else if("prev"===t||"next"===t){"prev"===t&&r.reverse();const a=r.indexOf(e.currentTarget);r=u.loop?(o=a+1,(n=r).map((e,t)=>n[(o+t)%n.length])):r.slice(a+1)}setTimeout(()=>Is(r))}var n,o}),children:"function"==typeof s?s({isCurrentTabStop:p,hasTabStop:null!=g}):s})})});Ps.displayName=Rs;var As={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Is(e,t=!1){const n=document.activeElement;for(const o of e){if(o===n)return;if(o.focus({preventScroll:t}),document.activeElement!==n)return}}var js=Os,Fs=Ps,Ls="Tabs",[zs]=Vn(Ls,[Ss]),Ws=Ss(),[$s,Bs]=zs(Ls),qs=e.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:r,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:l="automatic",...c}=e,d=bs(s),[u,p]=eo({prop:o,onChange:r,defaultProp:a??"",caller:Ls});return v($s,{scope:n,baseId:Qn(),value:u,onValueChange:p,orientation:i,dir:d,activationMode:l,children:v(ao.div,{dir:d,"data-orientation":i,...c,ref:t})})});qs.displayName=Ls;var Hs="TabsList",Ys=e.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...r}=e,a=Bs(Hs,n),i=Ws(n);return v(js,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:o,children:v(ao.div,{role:"tablist","aria-orientation":a.orientation,...r,ref:t})})});Ys.displayName=Hs;var Vs="TabsTrigger",Us=e.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:r=!1,...a}=e,i=Bs(Vs,n),s=Ws(n),l=Zs(i.baseId,o),c=Xs(i.baseId,o),d=o===i.value;return v(Fs,{asChild:!0,...s,focusable:!r,active:d,children:v(ao.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":c,"data-state":d?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...a,ref:t,onMouseDown:Kn(e.onMouseDown,e=>{r||0!==e.button||!1!==e.ctrlKey?e.preventDefault():i.onValueChange(o)}),onKeyDown:Kn(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&i.onValueChange(o)}),onFocus:Kn(e.onFocus,()=>{const e="manual"!==i.activationMode;d||r||!e||i.onValueChange(o)})})})});Us.displayName=Vs;var Ks="TabsContent",Gs=e.forwardRef((t,n)=>{const{__scopeTabs:o,value:r,forceMount:a,children:i,...s}=t,l=Bs(Ks,o),c=Zs(l.baseId,r),d=Xs(l.baseId,r),u=r===l.value,p=e.useRef(u);return e.useEffect(()=>{const e=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(e)},[]),v(So,{present:a||u,children:({present:e})=>v(ao.div,{"data-state":u?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!e,id:d,tabIndex:0,...s,ref:n,style:{...t.style,animationDuration:p.current?"0s":void 0},children:e&&i})})});function Zs(e,t){return`${e}-trigger-${t}`}function Xs(e,t){return`${e}-content-${t}`}Gs.displayName=Ks;var Qs=Ys,Js=Us,el=Gs;const tl=qs,nl=e.forwardRef(({className:e,...t},n)=>v(Qs,{ref:n,className:Je("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));nl.displayName=Qs.displayName;const ol=e.forwardRef(({className:e,...t},n)=>v(Js,{ref:n,className:Je("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-[#0E2B63] data-[state=active]:text-[#FFFFFF] data-[state=active]:shadow",e),...t}));ol.displayName=Js.displayName;const rl=e.forwardRef(({className:e,...t},n)=>v(el,{ref:n,className:Je("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));function al(t,n=[]){let o=[];const r=()=>{const n=o.map(t=>e.createContext(t));return function(o){const r=o?.[t]||n;return e.useMemo(()=>({[`__scope${t}`]:{...o,[t]:r}}),[o,r])}};return r.scopeName=t,[function(n,r){const a=e.createContext(r);a.displayName=n+"Context";const i=o.length;o=[...o,r];const s=n=>{const{scope:o,children:r,...s}=n,l=o?.[t]?.[i]||a,c=e.useMemo(()=>s,Object.values(s));return v(l.Provider,{value:c,children:r})};return s.displayName=n+"Provider",[s,function(o,s){const l=s?.[t]?.[i]||a,c=e.useContext(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${o}\` must be used within \`${n}\``)}]},il(r,...n)]}function il(...t){const n=t[0];if(1===t.length)return n;const o=()=>{const o=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){const r=o.reduce((e,{useScope:n,scopeName:o})=>({...e,...n(t)[`__scope${o}`]}),{});return e.useMemo(()=>({[`__scope${n.scopeName}`]:r}),[r])}};return o.scopeName=n.scopeName,o}function sl(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function ll(...e){return t=>{let n=!1;const o=e.map(e=>{const o=sl(e,t);return n||"function"!=typeof o||(n=!0),o});if(n)return()=>{for(let t=0;t<o.length;t++){const n=o[t];"function"==typeof n?n():sl(e[t],null)}}}}function cl(...t){return e.useCallback(ll(...t),t)}function dl(t){const n=e.forwardRef((n,o)=>{let{children:r,...a}=n,i=null,s=!1;const l=[];ml(r)&&"function"==typeof vl&&(r=vl(r._payload)),e.Children.forEach(r,t=>{if(n=t,e.isValidElement(n)&&"function"==typeof n.type&&"__radixId"in n.type&&n.type.__radixId===ul){s=!0;const e=t;let n="child"in e.props?e.props.child:e.props.children;ml(n)&&"function"==typeof vl&&(n=vl(n._payload)),i=pl(e,n),l.push(i?.props?.children)}else l.push(t);var n}),i?i=e.cloneElement(i,void 0,l):!s&&1===e.Children.count(r)&&e.isValidElement(r)&&(i=r);const c=i?function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(i):void 0,d=cl(o,c);if(!i){if(r||0===r)throw new Error(s?gl(t):hl(t));return r}const u=function(e,t){const n={...t};for(const o in t){const r=e[o],a=t[o];/^on[A-Z]/.test(o)?r&&a?n[o]=(...e)=>{const t=a(...e);return r(...e),t}:r&&(n[o]=r):"style"===o?n[o]={...r,...a}:"className"===o&&(n[o]=[r,a].filter(Boolean).join(" "))}return{...e,...n}}(a,i.props??{});return i.type!==e.Fragment&&(u.ref=o?d:c),e.cloneElement(i,u)});return n.displayName=`${t}.Slot`,n}rl.displayName=el.displayName;var ul=Symbol.for("radix.slottable");var pl=(t,n)=>{if("child"in t.props){const n=t.props.child;return e.isValidElement(n)?e.cloneElement(n,void 0,t.props.children(n.props.children)):null}return e.isValidElement(n)?n:null};var fl=Symbol.for("react.lazy");function ml(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===fl&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}var hl=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,gl=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,vl=e[" use ".trim().toString()];function yl(t){const n=t+"CollectionProvider",[o,r]=al(n),[a,i]=o(n,{collectionRef:{current:null},itemMap:new Map}),s=t=>{const{scope:n,children:o}=t,r=e.useRef(null),i=e.useRef(new Map).current;return v(a,{scope:n,itemMap:i,collectionRef:r,children:o})};s.displayName=n;const l=t+"CollectionSlot",c=dl(l),d=e.forwardRef((e,t)=>{const{scope:n,children:o}=e,r=cl(t,i(l,n).collectionRef);return v(c,{ref:r,children:o})});d.displayName=l;const u=t+"CollectionItemSlot",p="data-radix-collection-item",f=dl(u),m=e.forwardRef((t,n)=>{const{scope:o,children:r,...a}=t,s=e.useRef(null),l=cl(n,s),c=i(u,o);return e.useEffect(()=>(c.itemMap.set(s,{ref:s,...a}),()=>{c.itemMap.delete(s)})),v(f,{[p]:"",ref:l,children:r})});return m.displayName=u,[{Provider:s,Slot:d,ItemSlot:m},function(n){const o=i(t+"CollectionConsumer",n);return e.useCallback(()=>{const e=o.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(o.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[o.collectionRef,o.itemMap])},r]}function bl(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),!1===n||!o.defaultPrevented)return t?.(o)}}var xl=globalThis?.document?e.useLayoutEffect:()=>{},wl=e[" useInsertionEffect ".trim().toString()]||xl;function kl({prop:t,defaultProp:n,onChange:o=()=>{},caller:r}){const[a,i,s]=function({defaultProp:t,onChange:n}){const[o,r]=e.useState(t),a=e.useRef(o),i=e.useRef(n);return wl(()=>{i.current=n},[n]),e.useEffect(()=>{a.current!==o&&(i.current?.(o),a.current=o)},[o,a]),[o,r,i]}({defaultProp:n,onChange:o}),l=void 0!==t,c=l?t:a;{const n=e.useRef(void 0!==t);e.useEffect(()=>{const e=n.current;if(e!==l){const t=e?"controlled":"uncontrolled",n=l?"controlled":"uncontrolled";console.warn(`${r} is changing from ${t} to ${n}. 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.`)}n.current=l},[l,r])}const d=e.useCallback(e=>{if(l){const n=function(e){return"function"==typeof e}(e)?e(t):e;n!==t&&s.current?.(n)}else i(e)},[l,t,i,s]);return[c,d]}var Nl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,n)=>{const o=dl(`Primitive.${n}`),r=e.forwardRef((e,t)=>{const{asChild:r,...a}=e,i=r?o:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),v(i,{...a,ref:t})});return r.displayName=`Primitive.${n}`,{...t,[n]:r}},{});function Cl(e,t){e&&x.flushSync(()=>e.dispatchEvent(t))}var _l=t=>{const{present:n,children:o}=t,r=function(t){const[n,o]=e.useState(),r=e.useRef(null),a=e.useRef(t),i=e.useRef("none"),s=t?"mounted":"unmounted",[l,c]=function(t,n){return e.useReducer((e,t)=>n[e][t]??e,t)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect(()=>{const e=Sl(r.current);i.current="mounted"===l?e:"none"},[l]),xl(()=>{const e=r.current,n=a.current;if(n!==t){const o=i.current,r=Sl(e);if(t)c("MOUNT");else if("none"===r||"none"===e?.display)c("UNMOUNT");else{c(n&&o!==r?"ANIMATION_OUT":"UNMOUNT")}a.current=t}},[t,c]),xl(()=>{if(n){let e;const t=n.ownerDocument.defaultView??window,o=o=>{const i=Sl(r.current).includes(CSS.escape(o.animationName));if(o.target===n&&i&&(c("ANIMATION_END"),!a.current)){const o=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=o)})}},s=e=>{e.target===n&&(i.current=Sl(r.current))};return n.addEventListener("animationstart",s),n.addEventListener("animationcancel",o),n.addEventListener("animationend",o),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",s),n.removeEventListener("animationcancel",o),n.removeEventListener("animationend",o)}}c("ANIMATION_END")},[n,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:e.useCallback(e=>{r.current=e?getComputedStyle(e):null,o(e)},[])}}(n),a="function"==typeof o?o({present:r.isPresent}):e.Children.only(o),i=function(...t){const n=e.useRef(t);return n.current=t,e.useCallback(e=>{const t=n.current;let o=!1;const r=t.map(t=>{const n=Dl(t,e);return o||"function"!=typeof n||(o=!0),n});if(o)return()=>{for(let e=0;e<r.length;e++){const n=r[e];"function"==typeof n?n():Dl(t[e],null)}}},[])}(r.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(a));return"function"==typeof o||r.isPresent?e.cloneElement(a,{ref:i}):null};function Dl(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Sl(e){return e?.animationName||"none"}_l.displayName="Presence";var El=e[" useId ".trim().toString()]||(()=>{}),Ml=0;function Ol(t){const[n,o]=e.useState(El());return xl(()=>{o(e=>e??String(Ml++))},[t]),n?`radix-${n}`:""}var Tl="Collapsible",[Rl,Pl]=al(Tl),[Al,Il]=Rl(Tl),jl=e.forwardRef((t,n)=>{const{__scopeCollapsible:o,open:r,defaultOpen:a,disabled:i,onOpenChange:s,...l}=t,[c,d]=kl({prop:r,defaultProp:a??!1,onChange:s,caller:Tl});return v(Al,{scope:o,disabled:i,contentId:Ol(),open:c,onOpenToggle:e.useCallback(()=>d(e=>!e),[d]),children:v(Nl.div,{"data-state":Bl(c),"data-disabled":i?"":void 0,...l,ref:n})})});jl.displayName=Tl;var Fl="CollapsibleTrigger",Ll=e.forwardRef((e,t)=>{const{__scopeCollapsible:n,...o}=e,r=Il(Fl,n);return v(Nl.button,{type:"button","aria-controls":r.open?r.contentId:void 0,"aria-expanded":r.open||!1,"data-state":Bl(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...o,ref:t,onClick:bl(e.onClick,r.onOpenToggle)})});Ll.displayName=Fl;var zl="CollapsibleContent",Wl=e.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=Il(zl,e.__scopeCollapsible);return v(_l,{present:n||r.open,children:({present:e})=>v($l,{...o,ref:t,present:e})})});Wl.displayName=zl;var $l=e.forwardRef((t,n)=>{const{__scopeCollapsible:o,present:r,children:a,...i}=t,s=Il(zl,o),[l,c]=e.useState(r),d=e.useRef(null),u=cl(n,d),p=e.useRef(0),f=p.current,m=e.useRef(0),h=m.current,g=s.open||l,y=e.useRef(g),b=e.useRef(void 0);return e.useEffect(()=>{const e=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(e)},[]),xl(()=>{const e=d.current;if(e){b.current=b.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();p.current=t.height,m.current=t.width,y.current||(e.style.transitionDuration=b.current.transitionDuration,e.style.animationName=b.current.animationName),c(r)}},[s.open,r]),v(Nl.div,{"data-state":Bl(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!g,...i,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...t.style},children:g&&a})});function Bl(e){return e?"open":"closed"}var ql=jl,Hl=Ll,Yl=Wl,Vl=e.createContext(void 0);function Ul(t){const n=e.useContext(Vl);return t||n||"ltr"}var Kl="Accordion",Gl=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Zl,Xl,Ql]=yl(Kl),[Jl]=al(Kl,[Ql,Pl]),ec=Pl(),tc=e.forwardRef((e,t)=>{const{type:n,...o}=e,r=o,a=o;return v(Zl.Provider,{scope:e.__scopeAccordion,children:"multiple"===n?v(sc,{...a,ref:t}):v(ic,{...r,ref:t})})});tc.displayName=Kl;var[nc,oc]=Jl(Kl),[rc,ac]=Jl(Kl,{collapsible:!1}),ic=e.forwardRef((t,n)=>{const{value:o,defaultValue:r,onValueChange:a=()=>{},collapsible:i=!1,...s}=t,[l,c]=kl({prop:o,defaultProp:r??"",onChange:a,caller:Kl});return v(nc,{scope:t.__scopeAccordion,value:e.useMemo(()=>l?[l]:[],[l]),onItemOpen:c,onItemClose:e.useCallback(()=>i&&c(""),[i,c]),children:v(rc,{scope:t.__scopeAccordion,collapsible:i,children:v(dc,{...s,ref:n})})})}),sc=e.forwardRef((t,n)=>{const{value:o,defaultValue:r,onValueChange:a=()=>{},...i}=t,[s,l]=kl({prop:o,defaultProp:r??[],onChange:a,caller:Kl}),c=e.useCallback(e=>l((t=[])=>[...t,e]),[l]),d=e.useCallback(e=>l((t=[])=>t.filter(t=>t!==e)),[l]);return v(nc,{scope:t.__scopeAccordion,value:s,onItemOpen:c,onItemClose:d,children:v(rc,{scope:t.__scopeAccordion,collapsible:!0,children:v(dc,{...i,ref:n})})})}),[lc,cc]=Jl(Kl),dc=e.forwardRef((t,n)=>{const{__scopeAccordion:o,disabled:r,dir:a,orientation:i="vertical",...s}=t,l=cl(e.useRef(null),n),c=Xl(o),d="ltr"===Ul(a),u=bl(t.onKeyDown,e=>{if(!Gl.includes(e.key))return;const t=e.target,n=c().filter(e=>!e.ref.current?.disabled),o=n.findIndex(e=>e.ref.current===t),r=n.length;if(-1===o)return;e.preventDefault();let a=o;const s=r-1,l=()=>{a=o+1,a>s&&(a=0)},u=()=>{a=o-1,a<0&&(a=s)};switch(e.key){case"Home":a=0;break;case"End":a=s;break;case"ArrowRight":"horizontal"===i&&(d?l():u());break;case"ArrowDown":"vertical"===i&&l();break;case"ArrowLeft":"horizontal"===i&&(d?u():l());break;case"ArrowUp":"vertical"===i&&u()}const p=a%r;n[p].ref.current?.focus()});return v(lc,{scope:o,disabled:r,direction:a,orientation:i,children:v(Zl.Slot,{scope:o,children:v(Nl.div,{...s,"data-orientation":i,ref:l,onKeyDown:r?void 0:u})})})}),uc="AccordionItem",[pc,fc]=Jl(uc),mc=e.forwardRef((e,t)=>{const{__scopeAccordion:n,value:o,...r}=e,a=cc(uc,n),i=oc(uc,n),s=ec(n),l=Ol(),c=o&&i.value.includes(o)||!1,d=a.disabled||e.disabled;return v(pc,{scope:n,open:c,disabled:d,triggerId:l,children:v(ql,{"data-orientation":a.orientation,"data-state":wc(c),...s,...r,ref:t,disabled:d,open:c,onOpenChange:e=>{e?i.onItemOpen(o):i.onItemClose(o)}})})});mc.displayName=uc;var hc="AccordionHeader",gc=e.forwardRef((e,t)=>{const{__scopeAccordion:n,...o}=e,r=cc(Kl,n),a=fc(hc,n);return v(Nl.h3,{"data-orientation":r.orientation,"data-state":wc(a.open),"data-disabled":a.disabled?"":void 0,...o,ref:t})});gc.displayName=hc;var vc="AccordionTrigger",yc=e.forwardRef((e,t)=>{const{__scopeAccordion:n,...o}=e,r=cc(Kl,n),a=fc(vc,n),i=ac(vc,n),s=ec(n);return v(Zl.ItemSlot,{scope:n,children:v(Hl,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":r.orientation,id:a.triggerId,...s,...o,ref:t})})});yc.displayName=vc;var bc="AccordionContent",xc=e.forwardRef((e,t)=>{const{__scopeAccordion:n,...o}=e,r=cc(Kl,n),a=fc(bc,n),i=ec(n);return v(Yl,{role:"region","aria-labelledby":a.triggerId,"data-orientation":r.orientation,...i,...o,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});function wc(e){return e?"open":"closed"}xc.displayName=bc;var kc=mc,Nc=gc,Cc=yc,_c=xc;const Dc=tc,Sc=e.forwardRef(({className:e,...t},n)=>v(kc,{ref:n,className:Je("border-b",e),...t}));Sc.displayName="AccordionItem";const Ec=e.forwardRef(({className:e,children:t,...n},o)=>v(Nc,{className:"flex",children:y(Cc,{ref:o,className:Je("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,v(Ni,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));Ec.displayName=Cc.displayName;const Mc=e.forwardRef(({className:e,children:t,...n},o)=>v(_c,{ref:o,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:v("div",{className:Je("pb-4 pt-0",e),children:t})}));function Oc({className:e,...t}){return v("div",{"data-slot":"empty",className:Je("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 text-balance rounded-lg border-dashed p-6 text-center md:p-12",e),...t})}function Tc({className:e,...t}){return v("div",{"data-slot":"empty-header",className:Je("flex max-w-sm flex-col items-center gap-2 text-center",e),...t})}Mc.displayName=_c.displayName;const Rc=L("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6"}},defaultVariants:{variant:"default"}});function Pc({className:e,variant:t="default",...n}){return v("div",{"data-slot":"empty-icon","data-variant":t,className:Je(Rc({variant:t,className:e})),...n})}function Ac({className:e,...t}){return v("div",{"data-slot":"empty-title",className:Je("text-lg font-medium tracking-tight",e),...t})}function Ic({className:e,...t}){return v("div",{"data-slot":"empty-description",className:Je("text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4",e),...t})}function jc({className:e,...t}){return v("div",{"data-slot":"empty-content",className:Je("flex w-full min-w-0 max-w-sm flex-col items-center gap-4 text-balance text-sm",e),...t})}function Fc({title:e,description:t}){return v(Oc,{children:y(Tc,{className:"w-[250px]",children:[v(Pc,{children:v(bi,{})}),v(Ac,{children:e}),v(Ic,{children:t})]})})}const Lc=6048e5,zc=Symbol.for("constructDateFrom");function Wc(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&zc in e?e[zc](t):e instanceof Date?new e.constructor(t):new Date(t)}function $c(e,t){return Wc(t||e,e)}function Bc(e,t,n){const o=$c(e,n?.in);return isNaN(t)?Wc(e,NaN):t?(o.setDate(o.getDate()+t),o):o}function qc(e,t,n){const o=$c(e,n?.in);if(isNaN(t))return Wc(e,NaN);if(!t)return o;const r=o.getDate(),a=Wc(e,o.getTime());a.setMonth(o.getMonth()+t+1,0);return r>=a.getDate()?a:(o.setFullYear(a.getFullYear(),a.getMonth(),r),o)}let Hc={};function Yc(){return Hc}function Vc(e,t){const n=Yc(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=$c(e,t?.in),a=r.getDay(),i=(a<o?7:0)+a-o;return r.setDate(r.getDate()-i),r.setHours(0,0,0,0),r}function Uc(e,t){return Vc(e,{...t,weekStartsOn:1})}function Kc(e,t){const n=$c(e,t?.in),o=n.getFullYear(),r=Wc(n,0);r.setFullYear(o+1,0,4),r.setHours(0,0,0,0);const a=Uc(r),i=Wc(n,0);i.setFullYear(o,0,4),i.setHours(0,0,0,0);const s=Uc(i);return n.getTime()>=a.getTime()?o+1:n.getTime()>=s.getTime()?o:o-1}function Gc(e){const t=$c(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Zc(e,...t){const n=Wc.bind(null,t.find(e=>"object"==typeof e));return t.map(n)}function Xc(e,t){const n=$c(e,t?.in);return n.setHours(0,0,0,0),n}function Qc(e,t,n){const[o,r]=Zc(0,e,t),a=Xc(o),i=Xc(r),s=+a-Gc(a),l=+i-Gc(i);return Math.round((s-l)/864e5)}function Jc(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function ed(e,t,n){const[o,r]=Zc(0,e,t);return 12*(o.getFullYear()-r.getFullYear())+(o.getMonth()-r.getMonth())}function td(e,t){const[n,o]=Zc(0,t.start,t.end);return{start:n,end:o}}function nd(e,t){const n=$c(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function od(e,t){const n=Yc(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=$c(e,t?.in),a=r.getDay(),i=6+(a<o?-7:0)-(a-o);return r.setDate(r.getDate()+i),r.setHours(23,59,59,999),r}const rd={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function ad(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const id={date:ad({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ad({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ad({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},sd={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function ld(e){return(t,n)=>{let o;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;o=e.formattingValues[r]||e.formattingValues[t]}else{const t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;o=e.values[r]||e.values[t]}return o[e.argumentCallback?e.argumentCallback(t):t]}}const cd={ordinalNumber:(e,t)=>{const n=Number(e),o=n%100;if(o>20||o<10)switch(o%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:ld({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:ld({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:ld({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:ld({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:ld({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function dd(e){return(t,n={})=>{const o=n.width,r=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],a=t.match(r);if(!a)return null;const i=a[0],s=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(s,e=>e.test(i)):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(s,e=>e.test(i));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;return{value:c,rest:t.slice(i.length)}}}const ud={ordinalNumber:(pd={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(pd.matchPattern);if(!n)return null;const o=n[0],r=e.match(pd.parsePattern);if(!r)return null;let a=pd.valueCallback?pd.valueCallback(r[0]):r[0];return a=t.valueCallback?t.valueCallback(a):a,{value:a,rest:e.slice(o.length)}}),era:dd({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:dd({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:dd({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:dd({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:dd({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var pd;const fd={code:"en-US",formatDistance:(e,t,n)=>{let o;const r=rd[e];return o="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+o:o+" ago":o},formatLong:id,formatRelative:(e,t,n,o)=>sd[e],localize:cd,match:ud,options:{weekStartsOn:0,firstWeekContainsDate:1}};function md(e,t){const n=$c(e,t?.in),o=+Uc(n)-+function(e,t){const n=Kc(e,t),o=Wc(e,0);return o.setFullYear(n,0,4),o.setHours(0,0,0,0),Uc(o)}(n);return Math.round(o/Lc)+1}function hd(e,t){const n=$c(e,t?.in),o=n.getFullYear(),r=Yc(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=Wc(t?.in||e,0);i.setFullYear(o+1,0,a),i.setHours(0,0,0,0);const s=Vc(i,t),l=Wc(t?.in||e,0);l.setFullYear(o,0,a),l.setHours(0,0,0,0);const c=Vc(l,t);return+n>=+s?o+1:+n>=+c?o:o-1}function gd(e,t){const n=$c(e,t?.in),o=+Vc(n,t)-+function(e,t){const n=Yc(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,r=hd(e,t),a=Wc(t?.in||e,0);return a.setFullYear(r,0,o),a.setHours(0,0,0,0),Vc(a,t)}(n,t);return Math.round(o/Lc)+1}function vd(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const yd={y(e,t){const n=e.getFullYear(),o=n>0?n:1-n;return vd("yy"===t?o%100:o,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):vd(n+1,2)},d:(e,t)=>vd(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>vd(e.getHours()%12||12,t.length),H:(e,t)=>vd(e.getHours(),t.length),m:(e,t)=>vd(e.getMinutes(),t.length),s:(e,t)=>vd(e.getSeconds(),t.length),S(e,t){const n=t.length,o=e.getMilliseconds();return vd(Math.trunc(o*Math.pow(10,n-3)),t.length)}},bd="midnight",xd="noon",wd="morning",kd="afternoon",Nd="evening",Cd="night",_d={G:function(e,t,n){const o=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(o,{width:"abbreviated"});case"GGGGG":return n.era(o,{width:"narrow"});default:return n.era(o,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),o=t>0?t:1-t;return n.ordinalNumber(o,{unit:"year"})}return yd.y(e,t)},Y:function(e,t,n,o){const r=hd(e,o),a=r>0?r:1-r;if("YY"===t){return vd(a%100,2)}return"Yo"===t?n.ordinalNumber(a,{unit:"year"}):vd(a,t.length)},R:function(e,t){return vd(Kc(e),t.length)},u:function(e,t){return vd(e.getFullYear(),t.length)},Q:function(e,t,n){const o=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return vd(o,2);case"Qo":return n.ordinalNumber(o,{unit:"quarter"});case"QQQ":return n.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(o,{width:"narrow",context:"formatting"});default:return n.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,n){const o=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return vd(o,2);case"qo":return n.ordinalNumber(o,{unit:"quarter"});case"qqq":return n.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(o,{width:"narrow",context:"standalone"});default:return n.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,n){const o=e.getMonth();switch(t){case"M":case"MM":return yd.M(e,t);case"Mo":return n.ordinalNumber(o+1,{unit:"month"});case"MMM":return n.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(o,{width:"narrow",context:"formatting"});default:return n.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,n){const o=e.getMonth();switch(t){case"L":return String(o+1);case"LL":return vd(o+1,2);case"Lo":return n.ordinalNumber(o+1,{unit:"month"});case"LLL":return n.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(o,{width:"narrow",context:"standalone"});default:return n.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,n,o){const r=gd(e,o);return"wo"===t?n.ordinalNumber(r,{unit:"week"}):vd(r,t.length)},I:function(e,t,n){const o=md(e);return"Io"===t?n.ordinalNumber(o,{unit:"week"}):vd(o,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):yd.d(e,t)},D:function(e,t,n){const o=function(e,t){const n=$c(e,t?.in);return Qc(n,nd(n))+1}(e);return"Do"===t?n.ordinalNumber(o,{unit:"dayOfYear"}):vd(o,t.length)},E:function(e,t,n){const o=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,n,o){const r=e.getDay(),a=(r-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return vd(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(e,t,n,o){const r=e.getDay(),a=(r-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return vd(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,n){const o=e.getDay(),r=0===o?7:o;switch(t){case"i":return String(r);case"ii":return vd(r,t.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const o=e.getHours();let r;switch(r=12===o?xd:0===o?bd:o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){const o=e.getHours();let r;switch(r=o>=17?Nd:o>=12?kd:o>=4?wd:Cd,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return yd.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):yd.H(e,t)},K:function(e,t,n){const o=e.getHours()%12;return"Ko"===t?n.ordinalNumber(o,{unit:"hour"}):vd(o,t.length)},k:function(e,t,n){let o=e.getHours();return 0===o&&(o=24),"ko"===t?n.ordinalNumber(o,{unit:"hour"}):vd(o,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):yd.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):yd.s(e,t)},S:function(e,t){return yd.S(e,t)},X:function(e,t,n){const o=e.getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return Sd(o);case"XXXX":case"XX":return Ed(o);default:return Ed(o,":")}},x:function(e,t,n){const o=e.getTimezoneOffset();switch(t){case"x":return Sd(o);case"xxxx":case"xx":return Ed(o);default:return Ed(o,":")}},O:function(e,t,n){const o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Dd(o,":");default:return"GMT"+Ed(o,":")}},z:function(e,t,n){const o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Dd(o,":");default:return"GMT"+Ed(o,":")}},t:function(e,t,n){return vd(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return vd(+e,t.length)}};function Dd(e,t=""){const n=e>0?"-":"+",o=Math.abs(e),r=Math.trunc(o/60),a=o%60;return 0===a?n+String(r):n+String(r)+t+vd(a,2)}function Sd(e,t){if(e%60==0){return(e>0?"-":"+")+vd(Math.abs(e)/60,2)}return Ed(e,t)}function Ed(e,t=""){const n=e>0?"-":"+",o=Math.abs(e);return n+vd(Math.trunc(o/60),2)+t+vd(o%60,2)}const Md=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Od=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Td={p:Od,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],o=n[1],r=n[2];if(!r)return Md(e,t);let a;switch(o){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"})}return a.replace("{{date}}",Md(o,t)).replace("{{time}}",Od(r,t))}},Rd=/^D+$/,Pd=/^Y+$/,Ad=["D","DD","YY","YYYY"];const Id=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,jd=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Fd=/^'([^]*?)'?$/,Ld=/''/g,zd=/[a-zA-Z]/;function Wd(e,t,n){const o=Yc(),r=n?.locale??o.locale??fd,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,s=$c(e,n?.in);if(!function(e){return!(!Jc(e)&&"number"!=typeof e||isNaN(+$c(e)))}(s))throw new RangeError("Invalid time value");let l=t.match(jd).map(e=>{const t=e[0];if("p"===t||"P"===t){return(0,Td[t])(e,r.formatLong)}return e}).join("").match(Id).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:$d(e)};if(_d[t])return{isToken:!0,value:e};if(t.match(zd))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});r.localize.preprocessor&&(l=r.localize.preprocessor(s,l));const c={firstWeekContainsDate:a,weekStartsOn:i,locale:r};return l.map(o=>{if(!o.isToken)return o.value;const a=o.value;(!n?.useAdditionalWeekYearTokens&&function(e){return Pd.test(e)}(a)||!n?.useAdditionalDayOfYearTokens&&function(e){return Rd.test(e)}(a))&&function(e,t,n){const o=function(e,t,n){const o="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${o} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(o),Ad.includes(e))throw new RangeError(o)}(a,t,String(e));return(0,_d[a[0]])(s,a,r.localize,c)}).join("")}function $d(e){const t=e.match(Fd);return t?t[1].replace(Ld,"'"):e}function Bd(e,t,n){const o=$c(e,n?.in),r=o.getFullYear(),a=o.getDate(),i=Wc(e,0);i.setFullYear(r,t,15),i.setHours(0,0,0,0);const s=function(e,t){const n=$c(e,t?.in),o=n.getFullYear(),r=n.getMonth(),a=Wc(n,0);return a.setFullYear(o,r+1,0),a.setHours(0,0,0,0),a.getDate()}(i);return o.setMonth(t,Math.min(a,s)),o}const qd={},Hd={};function Yd(e,t){try{const n=(qd[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return n in Hd?Hd[n]:Ud(n,n.split(":"))}catch{if(e in Hd)return Hd[e];const t=e?.match(Vd);return t?Ud(e,t.slice(1)):NaN}}const Vd=/([+-]\d\d):?(\d\d)?/;function Ud(e,t){const n=+(t[0]||0),o=+(t[1]||0),r=+(t[2]||0)/60;return Hd[e]=60*n+o>0?60*n+o+r:60*n-o-r}class Kd extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(Yd(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),Xd(this),Zd(this)):this.setTime(Date.now())}static tz(e,...t){return t.length?new Kd(...t,e):new Kd(Date.now(),e)}withTimeZone(e){return new Kd(+this,e)}getTimezoneOffset(){const e=-Yd(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),Zd(this),+this}[Symbol.for("constructDateFrom")](e){return new Kd(+new Date(e),this.timeZone)}}const Gd=/^(get|set)(?!UTC)/;function Zd(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(60*-Yd(e.timeZone,e)))}function Xd(e){const t=Yd(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),o=new Date(+e);o.setUTCHours(o.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),a=r- -new Date(+o).getTimezoneOffset(),i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const s=r-n;s&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+s);const l=new Date(+e);l.setUTCSeconds(0);const c=r>0?l.getSeconds():(l.getSeconds()-60)%60,d=Math.round(-60*Yd(e.timeZone,e))%60;(d||c)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+d),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+d+c));const u=Yd(e.timeZone,e),p=u>0?Math.floor(u):Math.ceil(u),f=-new Date(+e).getTimezoneOffset()-p-s;if(p!==n&&f){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+f);const t=Yd(e.timeZone,e),n=p-(t>0?Math.floor(t):Math.ceil(t));n&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+n),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+n))}}Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Gd.test(e))return;const t=e.replace(Gd,"$1UTC");Kd.prototype[t]&&(e.startsWith("get")?Kd.prototype[e]=function(){return this.internal[t]()}:(Kd.prototype[e]=function(){var e;return Date.prototype[t].apply(this.internal,arguments),e=this,Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),Xd(e),+this},Kd.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Zd(this),+this}))});class Qd extends Kd{static tz(e,...t){return t.length?new Qd(...t,e):new Qd(Date.now(),e)}toISOString(){const[e,t,n]=this.tzComponents(),o=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[e,t,n,o]=this.internal.toUTCString().split(" ");return`${e?.slice(0,-1)} ${n} ${t} ${o}`}toTimeString(){const e=this.internal.toUTCString().split(" ")[4],[t,n,o]=this.tzComponents();return`${e} GMT${t}${n}${o} (${function(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){const e=this.getTimezoneOffset();return[e>0?"-":"+",String(Math.floor(Math.abs(e)/60)).padStart(2,"0"),String(Math.abs(e)%60).padStart(2,"0")]}withTimeZone(e){return new Qd(+this,e)}[Symbol.for("constructDateFrom")](e){return new Qd(+new Date(e),this.timeZone)}}function Jd(e,t){const n=t.startOfMonth(e),o=n.getDay();return 1===o?n:0===o?t.addDays(n,-6):t.addDays(n,-1*(o-1))}const eu={...fd,labels:{labelDayButton:(e,t,n,o)=>{let r;r=o&&"function"==typeof o.format?o.format.bind(o):(e,t)=>Wd(e,t,{locale:fd,...n});let a=r(e,"PPPP");return t.today&&(a=`Today, ${a}`),t.selected&&(a=`${a}, selected`),a},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let o;return o=n&&"function"==typeof n.format?n.format.bind(n):(e,n)=>Wd(e,n,{locale:fd,...t}),o(e,"LLLL yyyy")},labelGridcell:(e,t,n,o)=>{let r;r=o&&"function"==typeof o.format?o.format.bind(o):(e,t)=>Wd(e,t,{locale:fd,...n});let a=r(e,"PPPP");return t?.today&&(a=`Today, ${a}`),a},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let o;return o=n&&"function"==typeof n.format?n.format.bind(n):(e,n)=>Wd(e,n,{locale:fd,...t}),o(e,"cccc")}}};class tu{constructor(e,t){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?Qd.tz(this.options.timeZone):new this.Date,this.newDate=(e,t,n)=>this.overrides?.newDate?this.overrides.newDate(e,t,n):this.options.timeZone?new Qd(e,t,n,this.options.timeZone):new Date(e,t,n),this.addDays=(e,t)=>this.overrides?.addDays?this.overrides.addDays(e,t):Bc(e,t),this.addMonths=(e,t)=>this.overrides?.addMonths?this.overrides.addMonths(e,t):qc(e,t),this.addWeeks=(e,t)=>this.overrides?.addWeeks?this.overrides.addWeeks(e,t):function(e,t,n){return Bc(e,7*t,n)}(e,t),this.addYears=(e,t)=>this.overrides?.addYears?this.overrides.addYears(e,t):function(e,t,n){return qc(e,12*t,n)}(e,t),this.differenceInCalendarDays=(e,t)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,t):Qc(e,t),this.differenceInCalendarMonths=(e,t)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,t):ed(e,t),this.eachMonthOfInterval=e=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(e):function(e){const{start:t,end:n}=td(0,e);let o=+t>+n;const r=o?+t:+n,a=o?n:t;a.setHours(0,0,0,0),a.setDate(1);const i=[];for(;+a<=r;)i.push(Wc(t,a)),a.setMonth(a.getMonth()+1);return o?i.reverse():i}(e),this.eachYearOfInterval=e=>{const t=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(e):function(e){const{start:t,end:n}=td(0,e);let o=+t>+n;const r=o?+t:+n,a=o?n:t;a.setHours(0,0,0,0),a.setMonth(0,1);const i=[];for(;+a<=r;)i.push(Wc(t,a)),a.setFullYear(a.getFullYear()+1);return o?i.reverse():i}(e),n=new Set(t.map(e=>this.getYear(e)));if(n.size===t.length)return t;const o=[];return n.forEach(e=>{o.push(new Date(e,0,1))}),o},this.endOfBroadcastWeek=e=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(e):function(e,t){const n=Jd(e,t),o=function(e,t){const n=t.startOfMonth(e),o=n.getDay()>0?n.getDay():7,r=t.addDays(e,1-o),a=t.addDays(r,34);return t.getMonth(e)===t.getMonth(a)?5:4}(e,t);return t.addDays(n,7*o-1)}(e,this),this.endOfISOWeek=e=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(e):function(e,t){return od(e,{...t,weekStartsOn:1})}(e),this.endOfMonth=e=>this.overrides?.endOfMonth?this.overrides.endOfMonth(e):function(e,t){const n=$c(e,t?.in),o=n.getMonth();return n.setFullYear(n.getFullYear(),o+1,0),n.setHours(23,59,59,999),n}(e),this.endOfWeek=(e,t)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(e,t):od(e,this.options),this.endOfYear=e=>this.overrides?.endOfYear?this.overrides.endOfYear(e):function(e,t){const n=$c(e,t?.in),o=n.getFullYear();return n.setFullYear(o+1,0,0),n.setHours(23,59,59,999),n}(e),this.format=(e,t,n)=>{const o=this.overrides?.format?this.overrides.format(e,t,this.options):Wd(e,t,this.options);return this.options.numerals&&"latn"!==this.options.numerals?this.replaceDigits(o):o},this.getISOWeek=e=>this.overrides?.getISOWeek?this.overrides.getISOWeek(e):md(e),this.getMonth=(e,t)=>this.overrides?.getMonth?this.overrides.getMonth(e,this.options):function(e,t){return $c(e,t?.in).getMonth()}(e,this.options),this.getYear=(e,t)=>this.overrides?.getYear?this.overrides.getYear(e,this.options):function(e,t){return $c(e,t?.in).getFullYear()}(e,this.options),this.getWeek=(e,t)=>this.overrides?.getWeek?this.overrides.getWeek(e,this.options):gd(e,this.options),this.isAfter=(e,t)=>this.overrides?.isAfter?this.overrides.isAfter(e,t):function(e,t){return+$c(e)>+$c(t)}(e,t),this.isBefore=(e,t)=>this.overrides?.isBefore?this.overrides.isBefore(e,t):function(e,t){return+$c(e)<+$c(t)}(e,t),this.isDate=e=>this.overrides?.isDate?this.overrides.isDate(e):Jc(e),this.isSameDay=(e,t)=>this.overrides?.isSameDay?this.overrides.isSameDay(e,t):function(e,t){const[n,o]=Zc(0,e,t);return+Xc(n)===+Xc(o)}(e,t),this.isSameMonth=(e,t)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(e,t):function(e,t){const[n,o]=Zc(0,e,t);return n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()}(e,t),this.isSameYear=(e,t)=>this.overrides?.isSameYear?this.overrides.isSameYear(e,t):function(e,t){const[n,o]=Zc(0,e,t);return n.getFullYear()===o.getFullYear()}(e,t),this.max=e=>this.overrides?.max?this.overrides.max(e):function(e,t){let n,o=t?.in;return e.forEach(e=>{o||"object"!=typeof e||(o=Wc.bind(null,e));const t=$c(e,o);(!n||n<t||isNaN(+t))&&(n=t)}),Wc(o,n||NaN)}(e),this.min=e=>this.overrides?.min?this.overrides.min(e):function(e,t){let n,o=t?.in;return e.forEach(e=>{o||"object"!=typeof e||(o=Wc.bind(null,e));const t=$c(e,o);(!n||n>t||isNaN(+t))&&(n=t)}),Wc(o,n||NaN)}(e),this.setMonth=(e,t)=>this.overrides?.setMonth?this.overrides.setMonth(e,t):Bd(e,t),this.setYear=(e,t)=>this.overrides?.setYear?this.overrides.setYear(e,t):function(e,t,n){const o=$c(e,n?.in);return isNaN(+o)?Wc(e,NaN):(o.setFullYear(t),o)}(e,t),this.startOfBroadcastWeek=(e,t)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(e,this):Jd(e,this),this.startOfDay=e=>this.overrides?.startOfDay?this.overrides.startOfDay(e):Xc(e),this.startOfISOWeek=e=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(e):Uc(e),this.startOfMonth=e=>this.overrides?.startOfMonth?this.overrides.startOfMonth(e):function(e,t){const n=$c(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}(e),this.startOfWeek=(e,t)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(e,this.options):Vc(e,this.options),this.startOfYear=e=>this.overrides?.startOfYear?this.overrides.startOfYear(e):nd(e),this.options={locale:eu,...e},this.overrides=t}getDigitMap(){const{numerals:e="latn"}=this.options,t=new Intl.NumberFormat("en-US",{numberingSystem:e}),n={};for(let e=0;e<10;e++)n[e.toString()]=t.format(e);return n}replaceDigits(e){const t=this.getDigitMap();return e.replace(/\d/g,e=>t[e]||e)}formatNumber(e){return this.replaceDigits(e.toString())}getMonthYearOrder(){const e=this.options.locale?.code;return e&&tu.yearFirstLocales.has(e)?"year-first":"month-first"}formatMonthYear(e){const{locale:t,timeZone:n,numerals:o}=this.options,r=t?.code;if(r&&tu.yearFirstLocales.has(r))try{const t=new Intl.DateTimeFormat(r,{month:"long",year:"numeric",timeZone:n,numberingSystem:o});return t.format(e)}catch{}const a="year-first"===this.getMonthYearOrder()?"y LLLL":"LLLL y";return this.format(e,a)}}tu.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const nu=new tu;class ou{constructor(e,t,n=nu){this.date=e,this.displayMonth=t,this.outside=Boolean(t&&!n.isSameMonth(e,t)),this.dateLib=n,this.isoDate=n.format(e,"yyyy-MM-dd"),this.displayMonthId=n.format(t,"yyyy-MM"),this.dateMonthId=n.format(e,"yyyy-MM")}isEqualTo(e){return this.dateLib.isSameDay(e.date,this.date)&&this.dateLib.isSameMonth(e.displayMonth,this.displayMonth)}}class ru{constructor(e,t){this.date=e,this.weeks=t}}class au{constructor(e,t){this.days=t,this.weekNumber=e}}var iu,su,lu,cu;!function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"}(iu||(iu={})),function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"}(su||(su={})),function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"}(lu||(lu={})),function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"}(cu||(cu={}));const du=f(void 0);function uu(){const e=m(du);if(void 0===e)throw new Error("useDayPicker() must be used within a custom component.");return e}var pu=Object.freeze({__proto__:null,Button:function(e){return t.createElement("button",{...e})},CaptionLabel:function(e){return t.createElement("span",{...e})},Chevron:function(e){const{size:n=24,orientation:o="left",className:r}=e;return t.createElement("svg",{className:r,width:n,height:n,viewBox:"0 0 24 24"},"up"===o&&t.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),"down"===o&&t.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),"left"===o&&t.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),"right"===o&&t.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))},Day:function(e){const{day:n,modifiers:o,...r}=e;return t.createElement("td",{...r})},DayButton:function(e){const{day:n,modifiers:o,...r}=e,a=t.useRef(null);return t.useEffect(()=>{o.focused&&a.current?.focus()},[o.focused]),t.createElement("button",{ref:a,...r})},Dropdown:function(e){const{options:n,className:o,components:r,classNames:a,...i}=e,s=[a[iu.Dropdown],o].join(" "),l=n?.find(({value:e})=>e===i.value);return t.createElement("span",{"data-disabled":i.disabled,className:a[iu.DropdownRoot]},t.createElement(r.Select,{className:s,...i},n?.map(({value:e,label:n,disabled:o})=>t.createElement(r.Option,{key:e,value:e,disabled:o},n))),t.createElement("span",{className:a[iu.CaptionLabel],"aria-hidden":!0},l?.label,t.createElement(r.Chevron,{orientation:"down",size:18,className:a[iu.Chevron]})))},DropdownNav:function(e){return t.createElement("div",{...e})},Footer:function(e){return t.createElement("div",{...e})},Month:function(e){const{calendarMonth:n,displayIndex:o,...r}=e;return t.createElement("div",{...r},e.children)},MonthCaption:function(e){const{calendarMonth:n,displayIndex:o,...r}=e;return t.createElement("div",{...r})},MonthGrid:function(e){return t.createElement("table",{...e})},Months:function(e){return t.createElement("div",{...e})},MonthsDropdown:function(e){const{components:n}=uu();return t.createElement(n.Dropdown,{...e})},Nav:function(e){const{onPreviousClick:n,onNextClick:o,previousMonth:r,nextMonth:a,...i}=e,{components:l,classNames:c,labels:{labelPrevious:d,labelNext:u}}=uu(),p=s(e=>{a&&o?.(e)},[a,o]),f=s(e=>{r&&n?.(e)},[r,n]);return t.createElement("nav",{...i},t.createElement(l.PreviousMonthButton,{type:"button",className:c[iu.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":!r||void 0,"aria-label":d(r),onClick:f},t.createElement(l.Chevron,{disabled:!r||void 0,className:c[iu.Chevron],orientation:"left"})),t.createElement(l.NextMonthButton,{type:"button",className:c[iu.NextMonthButton],tabIndex:a?void 0:-1,"aria-disabled":!a||void 0,"aria-label":u(a),onClick:p},t.createElement(l.Chevron,{disabled:!a||void 0,orientation:"right",className:c[iu.Chevron]})))},NextMonthButton:function(e){const{components:n}=uu();return t.createElement(n.Button,{...e})},Option:function(e){return t.createElement("option",{...e})},PreviousMonthButton:function(e){const{components:n}=uu();return t.createElement(n.Button,{...e})},Root:function(e){const{rootRef:n,...o}=e;return t.createElement("div",{...o,ref:n})},Select:function(e){return t.createElement("select",{...e})},Week:function(e){const{week:n,...o}=e;return t.createElement("tr",{...o})},WeekNumber:function(e){const{week:n,...o}=e;return t.createElement("th",{...o})},WeekNumberHeader:function(e){return t.createElement("th",{...e})},Weekday:function(e){return t.createElement("th",{...e})},Weekdays:function(e){return t.createElement("thead",{"aria-hidden":!0},t.createElement("tr",{...e}))},Weeks:function(e){return t.createElement("tbody",{...e})},YearsDropdown:function(e){const{components:n}=uu();return t.createElement(n.Dropdown,{...e})}});function fu(e,t,n=!1,o=nu){let{from:r,to:a}=e;const{differenceInCalendarDays:i,isSameDay:s}=o;if(r&&a){i(a,r)<0&&([r,a]=[a,r]);return i(t,r)>=(n?1:0)&&i(a,t)>=(n?1:0)}return!n&&a?s(a,t):!(n||!r)&&s(r,t)}function mu(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}function hu(e){return Boolean(e&&"object"==typeof e&&"from"in e)}function gu(e){return Boolean(e&&"object"==typeof e&&"after"in e)}function vu(e){return Boolean(e&&"object"==typeof e&&"before"in e)}function yu(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}function bu(e,t){return Array.isArray(e)&&e.every(t.isDate)}function xu(e,t,n=nu){const o=Array.isArray(t)?t:[t],{isSameDay:r,differenceInCalendarDays:a,isAfter:i}=n;return o.some(t=>{if("boolean"==typeof t)return t;if(n.isDate(t))return r(e,t);if(bu(t,n))return t.some(t=>r(e,t));if(hu(t))return fu(t,e,!1,n);if(yu(t))return Array.isArray(t.dayOfWeek)?t.dayOfWeek.includes(e.getDay()):t.dayOfWeek===e.getDay();if(mu(t)){const n=a(t.before,e)>0,o=a(t.after,e)<0;return i(t.before,t.after)?o&&n:n||o}return gu(t)?a(e,t.after)>0:vu(t)?a(t.before,e)>0:"function"==typeof t&&t(e)})}function wu(e){return{...pu,...e}}function ku(){const e={};for(const t in iu)e[iu[t]]=`rdp-${iu[t]}`;for(const t in su)e[su[t]]=`rdp-${su[t]}`;for(const t in lu)e[lu[t]]=`rdp-${lu[t]}`;for(const t in cu)e[cu[t]]=`rdp-${cu[t]}`;return e}function Nu(e,t,n){return(n??new tu(t)).formatMonthYear(e)}const Cu=Nu;function _u(e,t=nu){return t.format(e,"yyyy")}const Du=_u;var Su=Object.freeze({__proto__:null,formatCaption:Nu,formatDay:function(e,t,n){return(n??new tu(t)).format(e,"d")},formatMonthCaption:Cu,formatMonthDropdown:function(e,t=nu){return t.format(e,"LLLL")},formatWeekNumber:function(e,t=nu){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)},formatWeekNumberHeader:function(){return""},formatWeekdayName:function(e,t,n){return(n??new tu(t)).format(e,"cccccc")},formatYearCaption:Du,formatYearDropdown:_u});function Eu(e,t,n,o){let r=(o??new tu(n)).format(e,"PPPP");return t.today&&(r=`Today, ${r}`),t.selected&&(r=`${r}, selected`),r}const Mu=Eu;function Ou(e,t,n){return(n??new tu(t)).formatMonthYear(e)}const Tu=Ou;function Ru(e,t,n,o){let r=(o??new tu(n)).format(e,"PPPP");return t?.today&&(r=`Today, ${r}`),r}function Pu(e){return"Choose the Month"}function Au(){return""}function Iu(e,t){return"Go to the Next Month"}function ju(e){return"Go to the Previous Month"}function Fu(e,t,n){return(n??new tu(t)).format(e,"cccc")}function Lu(e,t){return`Week ${e}`}function zu(e){return"Week Number"}function Wu(e){return"Choose the Year"}var $u=Object.freeze({__proto__:null,labelCaption:Tu,labelDay:Mu,labelDayButton:Eu,labelGrid:Ou,labelGridcell:Ru,labelMonthDropdown:Pu,labelNav:Au,labelNext:Iu,labelPrevious:ju,labelWeekNumber:Lu,labelWeekNumberHeader:zu,labelWeekday:Fu,labelYearDropdown:Wu});const Bu=(e,t,n)=>t||(n?"function"==typeof n?n:(...e)=>n:e);function qu(e,t){const n=t.locale?.labels??{};return{...$u,...e??{},labelDayButton:Bu(Eu,e?.labelDayButton,n.labelDayButton),labelMonthDropdown:Bu(Pu,e?.labelMonthDropdown,n.labelMonthDropdown),labelNext:Bu(Iu,e?.labelNext,n.labelNext),labelPrevious:Bu(ju,e?.labelPrevious,n.labelPrevious),labelWeekNumber:Bu(Lu,e?.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:Bu(Wu,e?.labelYearDropdown,n.labelYearDropdown),labelGrid:Bu(Ou,e?.labelGrid,n.labelGrid),labelGridcell:Bu(Ru,e?.labelGridcell,n.labelGridcell),labelNav:Bu(Au,e?.labelNav,n.labelNav),labelWeekNumberHeader:Bu(zu,e?.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:Bu(Fu,e?.labelWeekday,n.labelWeekday)}}function Hu(e,t,n,o,r){const{startOfMonth:a,startOfYear:i,endOfYear:s,eachMonthOfInterval:l,getMonth:c}=r;return l({start:i(e),end:s(e)}).map(e=>{const i=o.formatMonthDropdown(e,r);return{value:c(e),label:i,disabled:t&&e<a(t)||n&&e>a(n)||!1}})}function Yu(e,t,n,o,r=!1){if(!e)return;if(!t)return;const{startOfYear:a,endOfYear:i,eachYearOfInterval:s,getYear:l}=o,c=s({start:a(e),end:i(t)});return r&&c.reverse(),c.map(e=>{const t=n.formatYearDropdown(e,o);return{value:l(e),label:t,disabled:!1}})}const Vu=e=>e instanceof HTMLElement?e:null,Uu=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Ku=e=>Vu(e.querySelector("[data-animated-caption]")),Gu=e=>Vu(e.querySelector("[data-animated-weeks]"));function Zu(e,t,{classNames:n,months:o,focused:a,dateLib:i}){const s=r(null),l=r(o),c=r(!1);h(()=>{const r=l.current;if(l.current=o,!(t&&e.current&&e.current instanceof HTMLElement&&0!==o.length&&0!==r.length&&o.length===r.length))return;const d=i.isSameMonth(o[0].date,r[0].date),u=i.isAfter(o[0].date,r[0].date),p=u?n[cu.caption_after_enter]:n[cu.caption_before_enter],f=u?n[cu.weeks_after_enter]:n[cu.weeks_before_enter],m=s.current,h=e.current.cloneNode(!0);if(h instanceof HTMLElement){Uu(h).forEach(e=>{if(!(e instanceof HTMLElement))return;const t=Vu(e.querySelector("[data-animated-month]"));t&&e.contains(t)&&e.removeChild(t);const n=Ku(e);n&&n.classList.remove(p);const o=Gu(e);o&&o.classList.remove(f)}),s.current=h}else s.current=null;if(c.current||d||a)return;const g=m instanceof HTMLElement?Uu(m):[],v=Uu(e.current);if(v?.every(e=>e instanceof HTMLElement)&&g&&g.every(e=>e instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const t=(y=e.current,Vu(y.querySelector("[data-animated-nav]")));t&&(t.style.zIndex="1"),v.forEach((o,r)=>{const a=g[r];if(!a)return;o.style.position="relative",o.style.overflow="hidden";const i=Ku(o);i&&i.classList.add(p);const s=Gu(o);s&&s.classList.add(f);const l=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),t&&(t.style.zIndex=""),i&&i.classList.remove(p),s&&s.classList.remove(f),o.style.position="",o.style.overflow="",o.contains(a)&&o.removeChild(a)};a.style.pointerEvents="none",a.style.position="absolute",a.style.overflow="hidden",a.setAttribute("aria-hidden","true");const d=(e=>Vu(e.querySelector("[data-animated-weekdays]")))(a);d&&(d.style.opacity="0");const m=Ku(a);m&&(m.classList.add(u?n[cu.caption_before_exit]:n[cu.caption_after_exit]),m.addEventListener("animationend",l));const h=Gu(a);h&&h.classList.add(u?n[cu.weeks_before_exit]:n[cu.weeks_after_exit]),o.insertBefore(a,o.firstChild)})}var y})}function Xu(e,t,n,o){const{month:r,defaultMonth:a,today:i=o.today(),numberOfMonths:s=1}=e;let l=r||a||i;const{differenceInCalendarMonths:c,addMonths:d,startOfMonth:u}=o;if(n&&c(n,l)<s-1){l=d(n,-1*(s-1))}return t&&c(l,t)<0&&(l=t),u(l)}function Qu(e,t){const[n,o]=d(e);return[void 0===t?n:t,o]}function Ju(e,t){const[n,r]=function(e,t){let{startMonth:n,endMonth:o}=e;const{startOfYear:r,startOfDay:a,startOfMonth:i,endOfMonth:s,addYears:l,endOfYear:c,newDate:d,today:u}=t,{fromYear:p,toYear:f,fromMonth:m,toMonth:h}=e;!n&&m&&(n=m),!n&&p&&(n=t.newDate(p,0,1)),!o&&h&&(o=h),!o&&f&&(o=d(f,11,31));const g="dropdown"===e.captionLayout||"dropdown-years"===e.captionLayout;return n?n=i(n):p?n=d(p,0,1):!n&&g&&(n=r(l(e.today??u(),-100))),o?o=s(o):f?o=d(f,11,31):!o&&g&&(o=c(e.today??u())),[n?a(n):n,o?a(o):o]}(e,t),{startOfMonth:a,endOfMonth:s}=t,l=Xu(e,n,r,t),[c,d]=Qu(l,e.month?l:void 0);i(()=>{const o=Xu(e,n,r,t);d(o)},[e.timeZone]);const{months:u,weeks:p,days:f,previousMonth:m,nextMonth:h}=o(()=>{const o=function(e,t,n,o){const{numberOfMonths:r=1}=n,a=[];for(let n=0;n<r;n++){const r=o.addMonths(e,n);if(t&&r>t)break;a.push(r)}return a}(c,r,{numberOfMonths:e.numberOfMonths},t),a=function(e,t,n,o){const r=e[0],a=e[e.length-1],{ISOWeek:i,fixedWeeks:s,broadcastCalendar:l}=n??{},{addDays:c,differenceInCalendarDays:d,differenceInCalendarMonths:u,endOfBroadcastWeek:p,endOfISOWeek:f,endOfMonth:m,endOfWeek:h,isAfter:g,startOfBroadcastWeek:v,startOfISOWeek:y,startOfWeek:b}=o,x=l?v(r,o):i?y(r):b(r),w=l?p(a):i?f(m(a)):h(m(a)),k=t&&(l?p(t):i?f(t):h(t)),N=d(k&&g(w,k)?k:w,x),C=u(a,r)+1,_=[];for(let e=0;e<=N;e++){const t=c(x,e);_.push(t)}const D=(l?35:42)*C;if(s&&_.length<D){const e=D-_.length;for(let t=0;t<e;t++){const e=c(_[_.length-1],1);_.push(e)}}return _}(o,e.endMonth?s(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),i=function(e,t,n,o){const{addDays:r,endOfBroadcastWeek:a,endOfISOWeek:i,endOfMonth:s,endOfWeek:l,getISOWeek:c,getWeek:d,startOfBroadcastWeek:u,startOfISOWeek:p,startOfWeek:f}=o,m=e.reduce((e,m)=>{const h=n.broadcastCalendar?u(m,o):n.ISOWeek?p(m):f(m),g=n.broadcastCalendar?a(m):n.ISOWeek?i(s(m)):l(s(m)),v=t.filter(e=>e>=h&&e<=g),y=n.broadcastCalendar?35:42;if(n.fixedWeeks&&v.length<y){const e=t.filter(e=>{const t=y-v.length;return e>g&&e<=r(g,t)});v.push(...e)}const b=v.reduce((e,t)=>{const r=n.ISOWeek?c(t):d(t),a=e.find(e=>e.weekNumber===r),i=new ou(t,m,o);return a?a.days.push(i):e.push(new au(r,[i])),e},[]),x=new ru(m,b);return e.push(x),e},[]);return n.reverseMonths?m.reverse():m}(o,a,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),l=function(e){return e.reduce((e,t)=>e.concat(t.weeks.slice()),[].slice())}(i),d=function(e){const t=[];return e.reduce((e,n)=>{const o=n.weeks.reduce((e,t)=>e.concat(t.days.slice()),t.slice());return e.concat(o.slice())},t.slice())}(i),u=function(e,t,n,o){if(n.disableNavigation)return;const{pagedNavigation:r,numberOfMonths:a}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:l}=o,c=r?a??1:1,d=i(e);return t&&l(d,t)<=0?void 0:s(d,-c)}(c,n,e,t),p=function(e,t,n,o){if(n.disableNavigation)return;const{pagedNavigation:r,numberOfMonths:a=1}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:l}=o,c=r?a:1,d=i(e);return t&&l(t,e)<a?void 0:s(d,c)}(c,r,e,t);return{months:i,weeks:l,days:d,previousMonth:u,nextMonth:p}},[t,c.getTime(),r?.getTime(),n?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:g,onMonthChange:v}=e,y=e=>{if(g)return;let t=a(e);n&&t<a(n)&&(t=a(n)),r&&t>a(r)&&(t=a(r)),d(t),v?.(t)};return{months:u,weeks:p,days:f,navStart:n,navEnd:r,previousMonth:m,nextMonth:h,goToMonth:y,goToDay:e=>{(e=>p.some(t=>t.days.some(t=>t.isEqualTo(e))))(e)||y(e.date)}}}var ep;function tp(e){return!e[su.disabled]&&!e[su.hidden]&&!e[su.outside]}function np(e,t,n,o,r,a,i,s=0){if(s>365)return;const l=function(e,t,n,o,r,a,i){const{ISOWeek:s,broadcastCalendar:l}=a,{addDays:c,addMonths:d,addWeeks:u,addYears:p,endOfBroadcastWeek:f,endOfISOWeek:m,endOfWeek:h,max:g,min:v,startOfBroadcastWeek:y,startOfISOWeek:b,startOfWeek:x}=i;let w={day:c,week:u,month:d,year:p,startOfWeek:e=>l?y(e,i):s?b(e):x(e),endOfWeek:e=>l?f(e):s?m(e):h(e)}[e](n,"after"===t?1:-1);return"before"===t&&o?w=g([o,w]):"after"===t&&r&&(w=v([r,w])),w}(e,t,n.date,o,r,a,i),c=Boolean(a.disabled&&xu(l,a.disabled,i)),d=Boolean(a.hidden&&xu(l,a.hidden,i)),u=new ou(l,l,i);return c||d?np(e,t,u,o,r,a,i,s+1):u}function op(e,t,n,o,r){const{autoFocus:a}=e,[i,s]=d(),l=function(e,t,n,o){let r,a=-1;for(const i of e){const e=t(i);tp(e)&&(e[su.focused]&&a<ep.FocusedModifier?(r=i,a=ep.FocusedModifier):o?.isEqualTo(i)&&a<ep.LastFocused?(r=i,a=ep.LastFocused):n(i.date)&&a<ep.Selected?(r=i,a=ep.Selected):e[su.today]&&a<ep.Today&&(r=i,a=ep.Today))}return r||(r=e.find(e=>tp(t(e)))),r}(t.days,n,o||(()=>!1),i),[c,u]=d(a?l:void 0);return{isFocusTarget:e=>Boolean(l?.isEqualTo(e)),setFocused:u,focused:c,blur:()=>{s(c),u(void 0)},moveFocus:(n,o)=>{if(!c)return;const a=np(n,o,c,t.navStart,t.navEnd,e,r);if(a){if(e.disableNavigation){if(!t.days.some(e=>e.isEqualTo(a)))return}t.goToDay(a),u(a)}}}}function rp(e,t,n=nu){return fu(e,t.from,!1,n)||fu(e,t.to,!1,n)||fu(t,e.from,!1,n)||fu(t,e.to,!1,n)}function ap(e,t,n=nu){const o=Array.isArray(t)?t:[t];if(o.filter(e=>"function"!=typeof e).some(t=>{if("boolean"==typeof t)return t;if(n.isDate(t))return fu(e,t,!1,n);if(bu(t,n))return t.some(t=>fu(e,t,!1,n));if(hu(t))return!(!t.from||!t.to)&&rp(e,{from:t.from,to:t.to},n);if(yu(t))return function(e,t,n=nu){const o=Array.isArray(t)?t:[t];let r=e.from;const a=n.differenceInCalendarDays(e.to,e.from),i=Math.min(a,6);for(let e=0;e<=i;e++){if(o.includes(r.getDay()))return!0;r=n.addDays(r,1)}return!1}(e,t.dayOfWeek,n);if(mu(t)){return n.isAfter(t.before,t.after)?rp(e,{from:n.addDays(t.after,1),to:n.addDays(t.before,-1)},n):xu(e.from,t,n)||xu(e.to,t,n)}return!(!gu(t)&&!vu(t))&&(xu(e.from,t,n)||xu(e.to,t,n))}))return!0;const r=o.filter(e=>"function"==typeof e);if(r.length){let t=e.from;const o=n.differenceInCalendarDays(e.to,e.from);for(let e=0;e<=o;e++){if(r.some(e=>e(t)))return!0;t=n.addDays(t,1)}}return!1}function ip(e,t){const{disabled:n,excludeDisabled:o,selected:r,required:a,onSelect:i}=e,[s,l]=Qu(r,i?r:void 0),c=i?r:s;return{selected:c,select:(r,s,d)=>{const{min:u,max:p}=e,f=r?function(e,t,n=0,o=0,r=!1,a=nu){const{from:i,to:s}=t||{},{isSameDay:l,isAfter:c,isBefore:d}=a;let u;if(i||s){if(i&&!s)u=l(i,e)?0===n?{from:i,to:e}:r?{from:i,to:void 0}:void 0:d(e,i)?{from:e,to:i}:{from:i,to:e};else if(i&&s)if(l(i,e)&&l(s,e))u=r?{from:i,to:s}:void 0;else if(l(i,e))u={from:i,to:n>0?void 0:e};else if(l(s,e))u={from:e,to:n>0?void 0:e};else if(d(e,i))u={from:e,to:s};else if(c(e,i))u={from:i,to:e};else{if(!c(e,s))throw new Error("Invalid range");u={from:i,to:e}}}else u={from:e,to:n>0?void 0:e};if(u?.from&&u?.to){const t=a.differenceInCalendarDays(u.to,u.from);(o>0&&t>o||n>1&&t<n)&&(u={from:e,to:void 0})}return u}(r,c,u,p,a,t):void 0;return o&&n&&f?.from&&f.to&&ap({from:f.from,to:f.to},n,t)&&(f.from=r,f.to=void 0),i||l(f),i?.(f,r,s,d),f},isSelected:e=>c&&fu(c,e,!1,t)}}function sp(e,t){const n=function(e,t){const{selected:n,required:o,onSelect:r}=e,[a,i]=Qu(n,r?n:void 0),s=r?n:a,{isSameDay:l}=t;return{selected:s,select:(e,t,n)=>{let a=e;return!o&&s&&s&&l(e,s)&&(a=void 0),r||i(a),r?.(a,e,t,n),a},isSelected:e=>!!s&&l(s,e)}}(e,t),o=function(e,t){const{selected:n,required:o,onSelect:r}=e,[a,i]=Qu(n,r?n:void 0),s=r?n:a,{isSameDay:l}=t,c=e=>s?.some(t=>l(t,e))??!1,{min:d,max:u}=e;return{selected:s,select:(e,t,n)=>{let a=[...s??[]];if(c(e)){if(s?.length===d)return;if(o&&1===s?.length)return;a=s?.filter(t=>!l(t,e))}else a=s?.length===u?[e]:[...a,e];return r||i(a),r?.(a,e,t,n),a},isSelected:c}}(e,t),r=ip(e,t);switch(e.mode){case"single":return n;case"multiple":return o;case"range":return r;default:return}}function lp(e,t){return e instanceof Qd&&e.timeZone===t?e:new Qd(e,t)}function cp(e,t,n){return lp(e,t)}function dp(e,t,n){return"boolean"==typeof e||"function"==typeof e?e:e instanceof Date?cp(e,t):Array.isArray(e)?e.map(e=>e instanceof Date?cp(e,t):e):hu(e)?{...e,from:e.from?lp(e.from,t):e.from,to:e.to?lp(e.to,t):e.to}:mu(e)?{before:cp(e.before,t),after:cp(e.after,t)}:gu(e)?{after:cp(e.after,t)}:vu(e)?{before:cp(e.before,t)}:e}function up(e,t,n){return e?Array.isArray(e)?e.map(e=>dp(e,t)):dp(e,t):e}function pp(e){let n=e;const a=n.timeZone;if(a&&(n={...e,timeZone:a},n.today&&(n.today=lp(n.today,a)),n.month&&(n.month=lp(n.month,a)),n.defaultMonth&&(n.defaultMonth=lp(n.defaultMonth,a)),n.startMonth&&(n.startMonth=lp(n.startMonth,a)),n.endMonth&&(n.endMonth=lp(n.endMonth,a)),"single"===n.mode&&n.selected?n.selected=lp(n.selected,a):"multiple"===n.mode&&n.selected?n.selected=n.selected?.map(e=>lp(e,a)):"range"===n.mode&&n.selected&&(n.selected={from:n.selected.from?lp(n.selected.from,a):n.selected.from,to:n.selected.to?lp(n.selected.to,a):n.selected.to}),void 0!==n.disabled&&(n.disabled=up(n.disabled,a)),void 0!==n.hidden&&(n.hidden=up(n.hidden,a)),n.modifiers)){const e={};Object.keys(n.modifiers).forEach(t=>{e[t]=up(n.modifiers?.[t],a)}),n.modifiers=e}const{components:i,formatters:l,labels:c,dateLib:d,locale:u,classNames:p}=o(()=>{const e={...eu,...n.locale},t=n.broadcastCalendar?1:n.weekStartsOn,o=n.noonSafe&&n.timeZone?function(e,t={}){const{weekStartsOn:n,locale:o}=t,r=n??o?.options?.weekStartsOn??0,a=t=>{const n="number"==typeof t||"string"==typeof t?new Date(t):t;return new Qd(n.getFullYear(),n.getMonth(),n.getDate(),12,0,0,e)},i=e=>{const t=a(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)};return{today:()=>a(Qd.tz(e)),newDate:(t,n,o)=>new Qd(t,n,o,12,0,0,e),startOfDay:e=>a(e),startOfWeek:(e,t)=>{const n=a(e),o=t?.weekStartsOn??r,i=(n.getDay()-o+7)%7;return n.setDate(n.getDate()-i),n},startOfISOWeek:e=>{const t=a(e),n=(t.getDay()-1+7)%7;return t.setDate(t.getDate()-n),t},startOfMonth:e=>{const t=a(e);return t.setDate(1),t},startOfYear:e=>{const t=a(e);return t.setMonth(0,1),t},endOfWeek:(e,t)=>{const n=a(e),o=(((t?.weekStartsOn??r)+6)%7-n.getDay()+7)%7;return n.setDate(n.getDate()+o),n},endOfISOWeek:e=>{const t=a(e),n=(7-t.getDay())%7;return t.setDate(t.getDate()+n),t},endOfMonth:e=>{const t=a(e);return t.setMonth(t.getMonth()+1,0),t},endOfYear:e=>{const t=a(e);return t.setMonth(11,31),t},eachMonthOfInterval:t=>{const n=a(t.start),o=a(t.end),r=[],i=new Qd(n.getFullYear(),n.getMonth(),1,12,0,0,e),s=12*o.getFullYear()+o.getMonth();for(;12*i.getFullYear()+i.getMonth()<=s;)r.push(new Qd(i,e)),i.setMonth(i.getMonth()+1,1);return r},addDays:(e,t)=>{const n=a(e);return n.setDate(n.getDate()+t),n},addWeeks:(e,t)=>{const n=a(e);return n.setDate(n.getDate()+7*t),n},addMonths:(e,t)=>{const n=a(e);return n.setMonth(n.getMonth()+t),n},addYears:(e,t)=>{const n=a(e);return n.setFullYear(n.getFullYear()+t),n},eachYearOfInterval:t=>{const n=a(t.start),o=a(t.end),r=[],i=new Qd(n.getFullYear(),0,1,12,0,0,e);for(;i.getFullYear()<=o.getFullYear();)r.push(new Qd(i,e)),i.setFullYear(i.getFullYear()+1,0,1);return r},getWeek:(e,t)=>gd(i(e),{weekStartsOn:t?.weekStartsOn??r,firstWeekContainsDate:t?.firstWeekContainsDate??o?.options?.firstWeekContainsDate??1}),getISOWeek:e=>md(i(e)),differenceInCalendarDays:(e,t)=>Qc(i(e),i(t)),differenceInCalendarMonths:(e,t)=>ed(i(e),i(t))}}(n.timeZone,{weekStartsOn:t,locale:e}):void 0,r=n.dateLib&&o?{...o,...n.dateLib}:n.dateLib??o,a=new tu({locale:e,weekStartsOn:t,firstWeekContainsDate:n.firstWeekContainsDate,useAdditionalWeekYearTokens:n.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:n.useAdditionalDayOfYearTokens,timeZone:n.timeZone,numerals:n.numerals},r);return{dateLib:a,components:wu(n.components),formatters:(i=n.formatters,i?.formatMonthCaption&&!i.formatCaption&&(i.formatCaption=i.formatMonthCaption),i?.formatYearCaption&&!i.formatYearDropdown&&(i.formatYearDropdown=i.formatYearCaption),{...Su,...i}),labels:qu(n.labels,a.options),locale:e,classNames:{...ku(),...n.classNames}};var i},[n.locale,n.broadcastCalendar,n.weekStartsOn,n.firstWeekContainsDate,n.useAdditionalWeekYearTokens,n.useAdditionalDayOfYearTokens,n.timeZone,n.numerals,n.dateLib,n.noonSafe,n.components,n.formatters,n.labels,n.classNames]);n.today||(n={...n,today:d.today()});const{captionLayout:f,mode:m,navLayout:h,numberOfMonths:g=1,onDayBlur:v,onDayClick:y,onDayFocus:b,onDayKeyDown:x,onDayMouseEnter:w,onDayMouseLeave:k,onNextClick:N,onPrevClick:C,showWeekNumber:_,styles:D}=n,{formatCaption:S,formatDay:E,formatMonthDropdown:M,formatWeekNumber:O,formatWeekNumberHeader:T,formatWeekdayName:R,formatYearDropdown:P}=l,A=Ju(n,d),{days:I,months:j,navStart:F,navEnd:L,previousMonth:z,nextMonth:W,goToMonth:$}=A,B=function(e,t,n,o,r){const{disabled:a,hidden:i,modifiers:s,showOutsideDays:l,broadcastCalendar:c,today:d=r.today()}=t,{isSameDay:u,isSameMonth:p,startOfMonth:f,isBefore:m,endOfMonth:h,isAfter:g}=r,v=n&&f(n),y=o&&h(o),b={[su.focused]:[],[su.outside]:[],[su.disabled]:[],[su.hidden]:[],[su.today]:[]},x={};for(const t of e){const{date:e,displayMonth:n}=t,o=Boolean(n&&!p(e,n)),f=Boolean(v&&m(e,v)),h=Boolean(y&&g(e,y)),w=Boolean(a&&xu(e,a,r)),k=Boolean(i&&xu(e,i,r))||f||h||!c&&!l&&o||c&&!1===l&&o,N=u(e,d);o&&b.outside.push(t),w&&b.disabled.push(t),k&&b.hidden.push(t),N&&b.today.push(t),s&&Object.keys(s).forEach(n=>{const o=s?.[n];o&&xu(e,o,r)&&(x[n]?x[n].push(t):x[n]=[t])})}return e=>{const t={[su.focused]:!1,[su.disabled]:!1,[su.hidden]:!1,[su.outside]:!1,[su.today]:!1},n={};for(const n in b){const o=b[n];t[n]=o.some(t=>t===e)}for(const t in x)n[t]=x[t].some(t=>t===e);return{...t,...n}}}(I,n,F,L,d),{isSelected:q,select:H,selected:Y}=sp(n,d)??{},{blur:V,focused:U,isFocusTarget:K,moveFocus:G,setFocused:Z}=op(n,A,B,q??(()=>!1),d),{labelDayButton:X,labelGridcell:Q,labelGrid:J,labelMonthDropdown:ee,labelNav:te,labelPrevious:ne,labelNext:oe,labelWeekday:re,labelWeekNumber:ae,labelWeekNumberHeader:ie,labelYearDropdown:se}=c,le=o(()=>function(e,t,n,o){const r=o??e.today(),a=n?e.startOfBroadcastWeek(r,e):t?e.startOfISOWeek(r):e.startOfWeek(r),i=[];for(let t=0;t<7;t++){const n=e.addDays(a,t);i.push(n)}return i}(d,n.ISOWeek,n.broadcastCalendar,n.today),[d,n.ISOWeek,n.broadcastCalendar,n.today]),ce=void 0!==m||void 0!==y,de=s(()=>{z&&($(z),C?.(z))},[z,$,C]),ue=s(()=>{W&&($(W),N?.(W))},[$,W,N]),pe=s((e,t)=>n=>{n.preventDefault(),n.stopPropagation(),Z(e),t.disabled||(H?.(e.date,t,n),y?.(e.date,t,n))},[H,y,Z]),fe=s((e,t)=>n=>{Z(e),b?.(e.date,t,n)},[b,Z]),me=s((e,t)=>n=>{V(),v?.(e.date,t,n)},[V,v]),he=s((e,t)=>o=>{const r={ArrowLeft:[o.shiftKey?"month":"day","rtl"===n.dir?"after":"before"],ArrowRight:[o.shiftKey?"month":"day","rtl"===n.dir?"before":"after"],ArrowDown:[o.shiftKey?"year":"week","after"],ArrowUp:[o.shiftKey?"year":"week","before"],PageUp:[o.shiftKey?"year":"month","before"],PageDown:[o.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(r[o.key]){o.preventDefault(),o.stopPropagation();const[e,t]=r[o.key];G(e,t)}x?.(e.date,t,o)},[G,x,n.dir]),ge=s((e,t)=>n=>{w?.(e.date,t,n)},[w]),ve=s((e,t)=>n=>{k?.(e.date,t,n)},[k]),ye=s(e=>t=>{const n=Number(t.target.value),o=d.setMonth(d.startOfMonth(e),n);$(o)},[d,$]),be=s(e=>t=>{const n=Number(t.target.value),o=d.setYear(d.startOfMonth(e),n);$(o)},[d,$]),{className:xe,style:we}=o(()=>({className:[p[iu.Root],n.className].filter(Boolean).join(" "),style:{...D?.[iu.Root],...n.style}}),[p,n.className,n.style,D]),ke=function(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([e,n])=>{e.startsWith("data-")&&(t[e]=n)}),t}(n),Ne=r(null);Zu(Ne,Boolean(n.animate),{classNames:p,months:j,focused:U,dateLib:d});const Ce={dayPickerProps:n,selected:Y,select:H,isSelected:q,months:j,nextMonth:W,previousMonth:z,goToMonth:$,getModifiers:B,components:i,classNames:p,styles:D,labels:c,formatters:l};return t.createElement(du.Provider,{value:Ce},t.createElement(i.Root,{rootRef:n.animate?Ne:void 0,className:xe,style:we,dir:n.dir,id:n.id,lang:n.lang,nonce:n.nonce,title:n.title,role:n.role,"aria-label":n["aria-label"],"aria-labelledby":n["aria-labelledby"],...ke},t.createElement(i.Months,{className:p[iu.Months],style:D?.[iu.Months]},!n.hideNavigation&&!h&&t.createElement(i.Nav,{"data-animated-nav":n.animate?"true":void 0,className:p[iu.Nav],style:D?.[iu.Nav],"aria-label":te(),onPreviousClick:de,onNextClick:ue,previousMonth:z,nextMonth:W}),j.map((e,o)=>t.createElement(i.Month,{"data-animated-month":n.animate?"true":void 0,className:p[iu.Month],style:D?.[iu.Month],key:o,displayIndex:o,calendarMonth:e},"around"===h&&!n.hideNavigation&&0===o&&t.createElement(i.PreviousMonthButton,{type:"button",className:p[iu.PreviousMonthButton],tabIndex:z?void 0:-1,"aria-disabled":!z||void 0,"aria-label":ne(z),onClick:de,"data-animated-button":n.animate?"true":void 0},t.createElement(i.Chevron,{disabled:!z||void 0,className:p[iu.Chevron],orientation:"rtl"===n.dir?"right":"left"})),t.createElement(i.MonthCaption,{"data-animated-caption":n.animate?"true":void 0,className:p[iu.MonthCaption],style:D?.[iu.MonthCaption],calendarMonth:e,displayIndex:o},f?.startsWith("dropdown")?t.createElement(i.DropdownNav,{className:p[iu.Dropdowns],style:D?.[iu.Dropdowns]},(()=>{const o="dropdown"===f||"dropdown-months"===f?t.createElement(i.MonthsDropdown,{key:"month",className:p[iu.MonthsDropdown],"aria-label":ee(),classNames:p,components:i,disabled:Boolean(n.disableNavigation),onChange:ye(e.date),options:Hu(e.date,F,L,l,d),style:D?.[iu.Dropdown],value:d.getMonth(e.date)}):t.createElement("span",{key:"month"},M(e.date,d)),r="dropdown"===f||"dropdown-years"===f?t.createElement(i.YearsDropdown,{key:"year",className:p[iu.YearsDropdown],"aria-label":se(d.options),classNames:p,components:i,disabled:Boolean(n.disableNavigation),onChange:be(e.date),options:Yu(F,L,l,d,Boolean(n.reverseYears)),style:D?.[iu.Dropdown],value:d.getYear(e.date)}):t.createElement("span",{key:"year"},P(e.date,d));return"year-first"===d.getMonthYearOrder()?[r,o]:[o,r]})(),t.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},S(e.date,d.options,d))):t.createElement(i.CaptionLabel,{className:p[iu.CaptionLabel],role:"status","aria-live":"polite"},S(e.date,d.options,d))),"around"===h&&!n.hideNavigation&&o===g-1&&t.createElement(i.NextMonthButton,{type:"button",className:p[iu.NextMonthButton],tabIndex:W?void 0:-1,"aria-disabled":!W||void 0,"aria-label":oe(W),onClick:ue,"data-animated-button":n.animate?"true":void 0},t.createElement(i.Chevron,{disabled:!W||void 0,className:p[iu.Chevron],orientation:"rtl"===n.dir?"left":"right"})),o===g-1&&"after"===h&&!n.hideNavigation&&t.createElement(i.Nav,{"data-animated-nav":n.animate?"true":void 0,className:p[iu.Nav],style:D?.[iu.Nav],"aria-label":te(),onPreviousClick:de,onNextClick:ue,previousMonth:z,nextMonth:W}),t.createElement(i.MonthGrid,{role:"grid","aria-multiselectable":"multiple"===m||"range"===m,"aria-label":J(e.date,d.options,d)||void 0,className:p[iu.MonthGrid],style:D?.[iu.MonthGrid]},!n.hideWeekdays&&t.createElement(i.Weekdays,{"data-animated-weekdays":n.animate?"true":void 0,className:p[iu.Weekdays],style:D?.[iu.Weekdays]},_&&t.createElement(i.WeekNumberHeader,{"aria-label":ie(d.options),className:p[iu.WeekNumberHeader],style:D?.[iu.WeekNumberHeader],scope:"col"},T()),le.map(e=>t.createElement(i.Weekday,{"aria-label":re(e,d.options,d),className:p[iu.Weekday],key:String(e),style:D?.[iu.Weekday],scope:"col"},R(e,d.options,d)))),t.createElement(i.Weeks,{"data-animated-weeks":n.animate?"true":void 0,className:p[iu.Weeks],style:D?.[iu.Weeks]},e.weeks.map(e=>t.createElement(i.Week,{className:p[iu.Week],key:e.weekNumber,style:D?.[iu.Week],week:e},_&&t.createElement(i.WeekNumber,{week:e,style:D?.[iu.WeekNumber],"aria-label":ae(e.weekNumber,{locale:u}),className:p[iu.WeekNumber],scope:"row",role:"rowheader"},O(e.weekNumber,d)),e.days.map(e=>{const{date:o}=e,r=B(e);if(r[su.focused]=!r.hidden&&Boolean(U?.isEqualTo(e)),r[lu.selected]=q?.(o)||r.selected,hu(Y)){const{from:e,to:t}=Y;r[lu.range_start]=Boolean(e&&t&&d.isSameDay(o,e)),r[lu.range_end]=Boolean(e&&t&&d.isSameDay(o,t)),r[lu.range_middle]=fu(Y,o,!0,d)}const a=function(e,t={},n={}){let o={...t?.[iu.Day]};return Object.entries(e).filter(([,e])=>!0===e).forEach(([e])=>{o={...o,...n?.[e]}}),o}(r,D,n.modifiersStyles),s=function(e,t,n={}){return Object.entries(e).filter(([,e])=>!0===e).reduce((e,[o])=>(n[o]?e.push(n[o]):t[su[o]]?e.push(t[su[o]]):t[lu[o]]&&e.push(t[lu[o]]),e),[t[iu.Day]])}(r,p,n.modifiersClassNames),l=ce||r.hidden?void 0:Q(o,r,d.options,d);return t.createElement(i.Day,{key:`${e.isoDate}_${e.displayMonthId}`,day:e,modifiers:r,className:s.join(" "),style:a,role:"gridcell","aria-selected":r.selected||void 0,"aria-label":l,"data-day":e.isoDate,"data-month":e.outside?e.dateMonthId:void 0,"data-selected":r.selected||void 0,"data-disabled":r.disabled||void 0,"data-hidden":r.hidden||void 0,"data-outside":e.outside||void 0,"data-focused":r.focused||void 0,"data-today":r.today||void 0},!r.hidden&&ce?t.createElement(i.DayButton,{className:p[iu.DayButton],style:D?.[iu.DayButton],type:"button",day:e,modifiers:r,disabled:!r.focused&&r.disabled||void 0,"aria-disabled":r.focused&&r.disabled||void 0,tabIndex:K(e)?0:-1,"aria-label":X(o,r,d.options,d),onClick:pe(e,r),onBlur:me(e,r),onFocus:fe(e,r),onKeyDown:he(e,r),onMouseEnter:ge(e,r),onMouseLeave:ve(e,r)},E(o,d.options,d)):!r.hidden&&E(e.date,d.options,d))})))))))),n.footer&&t.createElement(i.Footer,{className:p[iu.Footer],style:D?.[iu.Footer],role:"status","aria-live":"polite"},n.footer)))}function fp({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:o="label",buttonVariant:r="ghost",formatters:a,components:i,...s}){const l=ku();return v(pp,{showOutsideDays:n,className:Je("bg-background group/calendar p-3 [--cell-size:2rem]",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:o,formatters:{formatMonthDropdown:e=>e.toLocaleString("default",{month:"short"}),...a},classNames:{root:Je("w-fit",l.root),months:Je("relative flex flex-col gap-4 md:flex-row",l.months),month:Je("flex w-full flex-col gap-4",l.month),nav:Je("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",l.nav),button_previous:Je(et({variant:r}),"size-[--cell-size] select-none p-0 aria-disabled:opacity-50",l.button_previous),button_next:Je(et({variant:r}),"size-[--cell-size] select-none p-0 aria-disabled:opacity-50",l.button_next),month_caption:Je("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",l.month_caption),dropdowns:Je("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",l.dropdowns),dropdown_root:Je("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",l.dropdown_root),dropdown:Je("bg-popover absolute inset-0 opacity-0",l.dropdown),caption_label:Je("select-none font-medium","label"===o?"text-sm":"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",l.caption_label),table:"w-full border-collapse",weekdays:Je("flex",l.weekdays),weekday:Je("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",l.weekday),week:Je("mt-2 flex w-full",l.week),week_number_header:Je("w-[--cell-size] select-none",l.week_number_header),week_number:Je("text-muted-foreground select-none text-[0.8rem]",l.week_number),day:Je("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",l.day),range_start:Je("bg-accent rounded-l-md",l.range_start),range_middle:Je("rounded-none",l.range_middle),range_end:Je("bg-accent rounded-r-md",l.range_end),today:Je("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",l.today),outside:Je("text-muted-foreground aria-selected:text-muted-foreground",l.outside),disabled:Je("text-muted-foreground opacity-50",l.disabled),hidden:Je("invisible",l.hidden),...t},components:{Root:({className:e,rootRef:t,...n})=>v("div",{"data-slot":"calendar",ref:t,className:Je(e),...n}),Chevron:({className:e,orientation:t,...n})=>v("left"===t?Ci:"right"===t?_i:Ni,{className:Je("size-4",e),...n}),DayButton:mp,WeekNumber:({children:e,...t})=>v("td",{...t,children:v("div",{className:"flex size-[--cell-size] items-center justify-center text-center",children:e})}),...i},...s})}function mp({className:t,day:n,modifiers:o,...r}){const a=ku(),i=e.useRef(null);return e.useEffect(()=>{o.focused&&i.current?.focus()},[o.focused]),v(tt,{ref:i,variant:"ghost",size:"icon","data-day":n.date.toLocaleDateString(),"data-selected-single":o.selected&&!o.range_start&&!o.range_end&&!o.range_middle,"data-range-start":o.range_start,"data-range-end":o.range_end,"data-range-middle":o.range_middle,className:Je("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70",a.day,t),...r})}!function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"}(ep||(ep={}));const hp=["top","right","bottom","left"],gp=Math.min,vp=Math.max,yp=Math.round,bp=Math.floor,xp=e=>({x:e,y:e}),wp={left:"right",right:"left",bottom:"top",top:"bottom"},kp={start:"end",end:"start"};function Np(e,t,n){return vp(e,gp(t,n))}function Cp(e,t){return"function"==typeof e?e(t):e}function _p(e){return e.split("-")[0]}function Dp(e){return e.split("-")[1]}function Sp(e){return"x"===e?"y":"x"}function Ep(e){return"y"===e?"height":"width"}const Mp=new Set(["top","bottom"]);function Op(e){return Mp.has(_p(e))?"y":"x"}function Tp(e){return Sp(Op(e))}function Rp(e){return e.replace(/start|end/g,e=>kp[e])}const Pp=["left","right"],Ap=["right","left"],Ip=["top","bottom"],jp=["bottom","top"];function Fp(e,t,n,o){const r=Dp(e);let a=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Ap:Pp:t?Pp:Ap;case"left":case"right":return t?Ip:jp;default:return[]}}(_p(e),"start"===n,o);return r&&(a=a.map(e=>e+"-"+r),t&&(a=a.concat(a.map(Rp)))),a}function Lp(e){return e.replace(/left|right|bottom|top/g,e=>wp[e])}function zp(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 Wp(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function $p(e,t,n){let{reference:o,floating:r}=e;const a=Op(t),i=Tp(t),s=Ep(i),l=_p(t),c="y"===a,d=o.x+o.width/2-r.width/2,u=o.y+o.height/2-r.height/2,p=o[s]/2-r[s]/2;let f;switch(l){case"top":f={x:d,y:o.y-r.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-r.width,y:u};break;default:f={x:o.x,y:o.y}}switch(Dp(t)){case"start":f[i]-=p*(n&&c?-1:1);break;case"end":f[i]+=p*(n&&c?-1:1)}return f}async function Bp(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:f=0}=Cp(t,e),m=zp(f),h=s[p?"floating"===u?"reference":"floating":u],g=Wp(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(h)))||n?h:h.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),v="floating"===u?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,y=await(null==a.getOffsetParent?void 0:a.getOffsetParent(s.floating)),b=await(null==a.isElement?void 0:a.isElement(y))&&await(null==a.getScale?void 0:a.getScale(y))||{x:1,y:1},x=Wp(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:y,strategy:l}):v);return{top:(g.top-x.top+m.top)/b.y,bottom:(x.bottom-g.bottom+m.bottom)/b.y,left:(g.left-x.left+m.left)/b.x,right:(x.right-g.right+m.right)/b.x}}function qp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Hp(e){return hp.some(t=>e[t]>=0)}const Yp=new Set(["left","top"]);function Vp(){return"undefined"!=typeof window}function Up(e){return Zp(e)?(e.nodeName||"").toLowerCase():"#document"}function Kp(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Gp(e){var t;return null==(t=(Zp(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Zp(e){return!!Vp()&&(e instanceof Node||e instanceof Kp(e).Node)}function Xp(e){return!!Vp()&&(e instanceof Element||e instanceof Kp(e).Element)}function Qp(e){return!!Vp()&&(e instanceof HTMLElement||e instanceof Kp(e).HTMLElement)}function Jp(e){return!(!Vp()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Kp(e).ShadowRoot)}const ef=new Set(["inline","contents"]);function tf(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=mf(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!ef.has(r)}const nf=new Set(["table","td","th"]);function of(e){return nf.has(Up(e))}const rf=[":popover-open",":modal"];function af(e){return rf.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const sf=["transform","translate","scale","rotate","perspective"],lf=["transform","translate","scale","rotate","perspective","filter"],cf=["paint","layout","strict","content"];function df(e){const t=uf(),n=Xp(e)?mf(e):e;return sf.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||lf.some(e=>(n.willChange||"").includes(e))||cf.some(e=>(n.contain||"").includes(e))}function uf(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const pf=new Set(["html","body","#document"]);function ff(e){return pf.has(Up(e))}function mf(e){return Kp(e).getComputedStyle(e)}function hf(e){return Xp(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function gf(e){if("html"===Up(e))return e;const t=e.assignedSlot||e.parentNode||Jp(e)&&e.host||Gp(e);return Jp(t)?t.host:t}function vf(e){const t=gf(e);return ff(t)?e.ownerDocument?e.ownerDocument.body:e.body:Qp(t)&&tf(t)?t:vf(t)}function yf(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=vf(e),a=r===(null==(o=e.ownerDocument)?void 0:o.body),i=Kp(r);if(a){const e=bf(i);return t.concat(i,i.visualViewport||[],tf(r)?r:[],e&&n?yf(e):[])}return t.concat(r,yf(r,[],n))}function bf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xf(e){const t=mf(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Qp(e),a=r?e.offsetWidth:n,i=r?e.offsetHeight:o,s=yp(n)!==a||yp(o)!==i;return s&&(n=a,o=i),{width:n,height:o,$:s}}function wf(e){return Xp(e)?e:e.contextElement}function kf(e){const t=wf(e);if(!Qp(t))return xp(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:a}=xf(t);let i=(a?yp(n.width):n.width)/o,s=(a?yp(n.height):n.height)/r;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const Nf=xp(0);function Cf(e){const t=Kp(e);return uf()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Nf}function _f(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),a=wf(e);let i=xp(1);t&&(o?Xp(o)&&(i=kf(o)):i=kf(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Kp(e))&&t}(a,n,o)?Cf(a):xp(0);let l=(r.left+s.x)/i.x,c=(r.top+s.y)/i.y,d=r.width/i.x,u=r.height/i.y;if(a){const e=Kp(a),t=o&&Xp(o)?Kp(o):o;let n=e,r=bf(n);for(;r&&o&&t!==n;){const e=kf(r),t=r.getBoundingClientRect(),o=mf(r),a=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,u*=e.y,l+=a,c+=i,n=Kp(r),r=bf(n)}}return Wp({width:d,height:u,x:l,y:c})}function Df(e,t){const n=hf(e).scrollLeft;return t?t.left+n:_f(Gp(e)).left+n}function Sf(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Df(e,n),y:n.top+t.scrollTop}}const Ef=new Set(["absolute","fixed"]);function Mf(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=Kp(e),o=Gp(e),r=n.visualViewport;let a=o.clientWidth,i=o.clientHeight,s=0,l=0;if(r){a=r.width,i=r.height;const e=uf();(!e||e&&"fixed"===t)&&(s=r.offsetLeft,l=r.offsetTop)}const c=Df(o);if(c<=0){const e=o.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(o.clientWidth-t.clientWidth-r);i<=25&&(a-=i)}else c<=25&&(a+=c);return{width:a,height:i,x:s,y:l}}(e,n);else if("document"===t)o=function(e){const t=Gp(e),n=hf(e),o=e.ownerDocument.body,r=vp(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=vp(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+Df(e);const s=-n.scrollTop;return"rtl"===mf(o).direction&&(i+=vp(t.clientWidth,o.clientWidth)-r),{width:r,height:a,x:i,y:s}}(Gp(e));else if(Xp(t))o=function(e,t){const n=_f(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,a=Qp(e)?kf(e):xp(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:r*a.x,y:o*a.y}}(t,n);else{const n=Cf(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Wp(o)}function Of(e,t){const n=gf(e);return!(n===t||!Xp(n)||ff(n))&&("fixed"===mf(n).position||Of(n,t))}function Tf(e,t,n){const o=Qp(t),r=Gp(t),a="fixed"===n,i=_f(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=xp(0);function c(){l.x=Df(r)}if(o||!o&&!a)if(("body"!==Up(t)||tf(r))&&(s=hf(t)),o){const e=_f(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else r&&c();a&&!o&&r&&c();const d=!r||o||a?xp(0):Sf(r,s);return{x:i.left+s.scrollLeft-l.x-d.x,y:i.top+s.scrollTop-l.y-d.y,width:i.width,height:i.height}}function Rf(e){return"static"===mf(e).position}function Pf(e,t){if(!Qp(e)||"fixed"===mf(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Gp(e)===n&&(n=n.ownerDocument.body),n}function Af(e,t){const n=Kp(e);if(af(e))return n;if(!Qp(e)){let t=gf(e);for(;t&&!ff(t);){if(Xp(t)&&!Rf(t))return t;t=gf(t)}return n}let o=Pf(e,t);for(;o&&of(o)&&Rf(o);)o=Pf(o,t);return o&&ff(o)&&Rf(o)&&!df(o)?n:o||function(e){let t=gf(e);for(;Qp(t)&&!ff(t);){if(df(t))return t;if(af(t))return null;t=gf(t)}return null}(e)||n}const If={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const a="fixed"===r,i=Gp(o),s=!!t&&af(t.floating);if(o===i||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=xp(1);const d=xp(0),u=Qp(o);if((u||!u&&!a)&&(("body"!==Up(o)||tf(i))&&(l=hf(o)),Qp(o))){const e=_f(o);c=kf(o),d.x=e.x+o.clientLeft,d.y=e.y+o.clientTop}const p=!i||u||a?xp(0):Sf(i,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+p.x,y:n.y*c.y-l.scrollTop*c.y+d.y+p.y}},getDocumentElement:Gp,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[..."clippingAncestors"===n?af(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let o=yf(e,[],!1).filter(e=>Xp(e)&&"body"!==Up(e)),r=null;const a="fixed"===mf(e).position;let i=a?gf(e):e;for(;Xp(i)&&!ff(i);){const t=mf(i),n=df(i);n||"fixed"!==t.position||(r=null),(a?!n&&!r:!n&&"static"===t.position&&r&&Ef.has(r.position)||tf(i)&&!n&&Of(e,i))?o=o.filter(e=>e!==i):r=t,i=gf(i)}return t.set(e,o),o}(t,this._c):[].concat(n),o],i=a[0],s=a.reduce((e,n)=>{const o=Mf(t,n,r);return e.top=vp(o.top,e.top),e.right=gp(o.right,e.right),e.bottom=gp(o.bottom,e.bottom),e.left=vp(o.left,e.left),e},Mf(t,i,r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Af,getElementRects:async function(e){const t=this.getOffsetParent||Af,n=this.getDimensions,o=await n(e.floating);return{reference:Tf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=xf(e);return{width:t,height:n}},getScale:kf,isElement:Xp,isRTL:function(e){return"rtl"===mf(e).direction}};function jf(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ff(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=o,c=wf(e),d=r||a?[...c?yf(c):[],...yf(t)]:[];d.forEach(e=>{r&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)});const u=c&&s?function(e,t){let n,o=null;const r=Gp(e);function a(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function i(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),a();const c=e.getBoundingClientRect(),{left:d,top:u,width:p,height:f}=c;if(s||t(),!p||!f)return;const m={rootMargin:-bp(u)+"px "+-bp(r.clientWidth-(d+p))+"px "+-bp(r.clientHeight-(u+f))+"px "+-bp(d)+"px",threshold:vp(0,gp(1,l))||1};let h=!0;function g(t){const o=t[0].intersectionRatio;if(o!==l){if(!h)return i();o?i(!1,o):n=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==o||jf(c,e.getBoundingClientRect())||i(),h=!1}try{o=new IntersectionObserver(g,{...m,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(g,m)}o.observe(e)}(!0),a}(c,n):null;let p,f=-1,m=null;i&&(m=new ResizeObserver(e=>{let[o]=e;o&&o.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),c&&!l&&m.observe(c),m.observe(t));let h=l?_f(e):null;return l&&function t(){const o=_f(e);h&&!jf(h,o)&&n();h=o,p=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach(e=>{r&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),null==u||u(),null==(e=m)||e.disconnect(),m=null,l&&cancelAnimationFrame(p)}}const Lf=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:a,placement:i,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:o,elements:r}=e,a=await(null==o.isRTL?void 0:o.isRTL(r.floating)),i=_p(n),s=Dp(n),l="y"===Op(n),c=Yp.has(i)?-1:1,d=a&&l?-1:1,u=Cp(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&"number"==typeof m&&(f="end"===s?-1*m:m),l?{x:f*d,y:p*c}:{x:p*c,y:f*d}}(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(o=s.arrow)&&o.alignmentOffset?{}:{x:r+l.x,y:a+l.y,data:{...l,placement:i}}}}},zf=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Cp(e,t),c={x:n,y:o},d=await Bp(t,l),u=Op(_p(r)),p=Sp(u);let f=c[p],m=c[u];if(a){const e="y"===p?"bottom":"right";f=Np(f+d["y"===p?"top":"left"],f,f-d[e])}if(i){const e="y"===u?"bottom":"right";m=Np(m+d["y"===u?"top":"left"],m,m-d[e])}const h=s.fn({...t,[p]:f,[u]:m});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[p]:a,[u]:i}}}}}},Wf=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=Cp(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const v=_p(r),y=Op(s),b=_p(s)===s,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=p||(b||!h?[Lp(s)]:function(e){const t=Lp(e);return[Rp(e),t,Rp(t)]}(s)),k="none"!==m;!p&&k&&w.push(...Fp(s,h,m,x));const N=[s,...w],C=await Bp(t,g),_=[];let D=(null==(o=a.flip)?void 0:o.overflows)||[];if(d&&_.push(C[v]),u){const e=function(e,t,n){void 0===n&&(n=!1);const o=Dp(e),r=Tp(e),a=Ep(r);let i="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Lp(i)),[i,Lp(i)]}(r,i,x);_.push(C[e[0]],C[e[1]])}if(D=[...D,{placement:r,overflows:_}],!_.every(e=>e<=0)){var S,E;const e=((null==(S=a.flip)?void 0:S.index)||0)+1,t=N[e];if(t){if(!("alignment"===u&&y!==Op(t))||D.every(e=>Op(e.placement)!==y||e.overflows[0]>0))return{data:{index:e,overflows:D},reset:{placement:t}}}let n=null==(E=D.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:E.placement;if(!n)switch(f){case"bestFit":{var M;const e=null==(M=D.filter(e=>{if(k){const t=Op(e.placement);return t===y||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:M[0];e&&(n=e);break}case"initialPlacement":n=s}if(r!==n)return{reset:{placement:n}}}return{}}}},$f=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...c}=Cp(e,t),d=await Bp(t,c),u=_p(r),p=Dp(r),f="y"===Op(r),{width:m,height:h}=a.floating;let g,v;"top"===u||"bottom"===u?(g=u,v=p===(await(null==i.isRTL?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(v=u,g="end"===p?"top":"bottom");const y=h-d.top-d.bottom,b=m-d.left-d.right,x=gp(h-d[g],y),w=gp(m-d[v],b),k=!t.middlewareData.shift;let N=x,C=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(C=b),null!=(o=t.middlewareData.shift)&&o.enabled.y&&(N=y),k&&!p){const e=vp(d.left,0),t=vp(d.right,0),n=vp(d.top,0),o=vp(d.bottom,0);f?C=m-2*(0!==e||0!==t?e+t:vp(d.left,d.right)):N=h-2*(0!==n||0!==o?n+o:vp(d.top,d.bottom))}await l({...t,availableWidth:C,availableHeight:N});const _=await i.getDimensions(s.floating);return m!==_.width||h!==_.height?{reset:{rects:!0}}:{}}}},Bf=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=Cp(e,t);switch(o){case"referenceHidden":{const e=qp(await Bp(t,{...r,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Hp(e)}}}case"escaped":{const e=qp(await Bp(t,{...r,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Hp(e)}}}default:return{}}}}},qf=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:d=0}=Cp(e,t)||{};if(null==c)return{};const u=zp(d),p={x:n,y:o},f=Tp(r),m=Ep(f),h=await i.getDimensions(c),g="y"===f,v=g?"top":"left",y=g?"bottom":"right",b=g?"clientHeight":"clientWidth",x=a.reference[m]+a.reference[f]-p[f]-a.floating[m],w=p[f]-a.reference[f],k=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let N=k?k[b]:0;N&&await(null==i.isElement?void 0:i.isElement(k))||(N=s.floating[b]||a.floating[m]);const C=x/2-w/2,_=N/2-h[m]/2-1,D=gp(u[v],_),S=gp(u[y],_),E=D,M=N-h[m]-S,O=N/2-h[m]/2+C,T=Np(E,O,M),R=!l.arrow&&null!=Dp(r)&&O!==T&&a.reference[m]/2-(O<E?D:S)-h[m]/2<0,P=R?O<E?O-E:O-M:0;return{[f]:p[f]+P,data:{[f]:T,centerOffset:O-T-P,...R&&{alignmentOffset:P}},reset:R}}}),Hf=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Cp(e,t),d={x:n,y:o},u=Op(r),p=Sp(u);let f=d[p],m=d[u];const h=Cp(s,t),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const e="y"===p?"height":"width",t=a.reference[p]-a.floating[e]+g.mainAxis,n=a.reference[p]+a.reference[e]-g.mainAxis;f<t?f=t:f>n&&(f=n)}if(c){var v,y;const e="y"===p?"width":"height",t=Yp.has(_p(r)),n=a.reference[u]-a.floating[e]+(t&&(null==(v=i.offset)?void 0:v[u])||0)+(t?0:g.crossAxis),o=a.reference[u]+a.reference[e]+(t?0:(null==(y=i.offset)?void 0:y[u])||0)-(t?g.crossAxis:0);m<n?m=n:m>o&&(m=o)}return{[p]:f,[u]:m}}}},Yf=(e,t,n)=>{const o=new Map,r={platform:If,...n},a={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:a=[],platform:i}=n,s=a.filter(Boolean),l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:u}=$p(c,o,l),p=o,f={},m=0;for(let n=0;n<s.length;n++){const{name:a,fn:h}=s[n],{x:g,y:v,data:y,reset:b}=await h({x:d,y:u,initialPlacement:o,placement:p,strategy:r,middlewareData:f,rects:c,platform:i,elements:{reference:e,floating:t}});d=null!=g?g:d,u=null!=v?v:u,f={...f,[a]:{...f[a],...y}},b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(p=b.placement),b.rects&&(c=!0===b.rects?await i.getElementRects({reference:e,floating:t,strategy:r}):b.rects),({x:d,y:u}=$p(c,p,l))),n=-1)}return{x:d,y:u,placement:p,strategy:r,middlewareData:f}})(e,t,{...r,platform:a})};var Vf="undefined"!=typeof document?h:function(){};function Uf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;0!==o--;)if(!Uf(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;0!==o--;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;0!==o--;){const n=r[o];if(("_owner"!==n||!e.$$typeof)&&!Uf(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Kf(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gf(e,t){const n=Kf(e);return Math.round(t*n)/n}function Zf(t){const n=e.useRef(t);return Vf(()=>{n.current=t}),n}function Xf(t){void 0===t&&(t={});const{placement:n="bottom",strategy:o="absolute",middleware:r=[],platform:a,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:c,open:d}=t,[u,p]=e.useState({x:0,y:0,strategy:o,placement:n,middlewareData:{},isPositioned:!1}),[f,m]=e.useState(r);Uf(f,r)||m(r);const[h,g]=e.useState(null),[v,y]=e.useState(null),b=e.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),w=e.useCallback(e=>{e!==_.current&&(_.current=e,y(e))},[]),k=i||h,N=s||v,C=e.useRef(null),_=e.useRef(null),D=e.useRef(u),S=null!=c,E=Zf(c),M=Zf(a),O=Zf(d),T=e.useCallback(()=>{if(!C.current||!_.current)return;const e={placement:n,strategy:o,middleware:f};M.current&&(e.platform=M.current),Yf(C.current,_.current,e).then(e=>{const t={...e,isPositioned:!1!==O.current};R.current&&!Uf(D.current,t)&&(D.current=t,x.flushSync(()=>{p(t)}))})},[f,n,o,M,O]);Vf(()=>{!1===d&&D.current.isPositioned&&(D.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);const R=e.useRef(!1);Vf(()=>(R.current=!0,()=>{R.current=!1}),[]),Vf(()=>{if(k&&(C.current=k),N&&(_.current=N),k&&N){if(E.current)return E.current(k,N,T);T()}},[k,N,T,E,S]);const P=e.useMemo(()=>({reference:C,floating:_,setReference:b,setFloating:w}),[b,w]),A=e.useMemo(()=>({reference:k,floating:N}),[k,N]),I=e.useMemo(()=>{const e={position:o,left:0,top:0};if(!A.floating)return e;const t=Gf(A.floating,u.x),n=Gf(A.floating,u.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...Kf(A.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:t,top:n}},[o,l,A.floating,u.x,u.y]);return e.useMemo(()=>({...u,update:T,refs:P,elements:A,floatingStyles:I}),[u,T,P,A,I])}const Qf=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:o}="function"==typeof e?e(t):e;return n&&(r=n,{}.hasOwnProperty.call(r,"current"))?null!=n.current?qf({element:n.current,padding:o}).fn(t):{}:n?qf({element:n,padding:o}).fn(t):{};var r}}),Jf=(e,t)=>({...Lf(e),options:[e,t]}),em=(e,t)=>({...zf(e),options:[e,t]}),tm=(e,t)=>({...Hf(e),options:[e,t]}),nm=(e,t)=>({...Wf(e),options:[e,t]}),om=(e,t)=>({...$f(e),options:[e,t]}),rm=(e,t)=>({...Bf(e),options:[e,t]}),am=(e,t)=>({...Qf(e),options:[e,t]});var im=e.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...a}=e;return v(ao.svg,{...a,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:v("polygon",{points:"0,0 30,0 15,10"})})});im.displayName="Arrow";var sm=im;var lm="Popper",[cm,dm]=Vn(lm),[um,pm]=cm(lm),fm=t=>{const{__scopePopper:n,children:o}=t,[r,a]=e.useState(null);return v(um,{scope:n,anchor:r,onAnchorChange:a,children:o})};fm.displayName=lm;var mm="PopperAnchor",hm=e.forwardRef((t,n)=>{const{__scopePopper:o,virtualRef:r,...a}=t,i=pm(mm,o),s=e.useRef(null),l=_(n,s),c=e.useRef(null);return e.useEffect(()=>{const e=c.current;c.current=r?.current||s.current,e!==c.current&&i.onAnchorChange(c.current)}),r?null:v(ao.div,{...a,ref:l})});hm.displayName=mm;var gm="PopperContent",[vm,ym]=cm(gm),bm=e.forwardRef((t,n)=>{const{__scopePopper:o,side:r="bottom",sideOffset:a=0,align:i="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:p="partial",hideWhenDetached:f=!1,updatePositionStrategy:m="optimized",onPlaced:h,...g}=t,y=pm(gm,o),[b,x]=e.useState(null),w=_(n,e=>x(e)),[k,N]=e.useState(null),C=function(t){const[n,o]=e.useState(void 0);return Gn(()=>{if(t){o({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver(e=>{if(!Array.isArray(e))return;if(!e.length)return;const n=e[0];let r,a;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,a=t.blockSize}else r=t.offsetWidth,a=t.offsetHeight;o({width:r,height:a})});return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}o(void 0)},[t]),n}(k),D=C?.width??0,S=C?.height??0,E=r+("center"!==i?"-"+i:""),M="number"==typeof u?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(d)?d:[d],T=O.length>0,R={padding:M,boundary:O.filter(Nm),altBoundary:T},{refs:P,floatingStyles:A,placement:I,isPositioned:j,middlewareData:F}=Xf({strategy:"fixed",placement:E,whileElementsMounted:(...e)=>Ff(...e,{animationFrame:"always"===m}),elements:{reference:y.anchor},middleware:[Jf({mainAxis:a+S,alignmentAxis:s}),c&&em({mainAxis:!0,crossAxis:!1,limiter:"partial"===p?tm():void 0,...R}),c&&nm({...R}),om({...R,apply:({elements:e,rects:t,availableWidth:n,availableHeight:o})=>{const{width:r,height:a}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${o}px`),i.setProperty("--radix-popper-anchor-width",`${r}px`),i.setProperty("--radix-popper-anchor-height",`${a}px`)}}),k&&am({element:k,padding:l}),Cm({arrowWidth:D,arrowHeight:S}),f&&rm({strategy:"referenceHidden",...R})]}),[L,z]=_m(I),W=io(h);Gn(()=>{j&&W?.()},[j,W]);const $=F.arrow?.x,B=F.arrow?.y,q=0!==F.arrow?.centerOffset,[H,Y]=e.useState();return Gn(()=>{b&&Y(window.getComputedStyle(b).zIndex)},[b]),v("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...A,transform:j?A.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(" "),...F.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:v(vm,{scope:o,placedSide:L,onArrowChange:N,arrowX:$,arrowY:B,shouldHideArrow:q,children:v(ao.div,{"data-side":L,"data-align":z,...g,ref:w,style:{...g.style,animation:j?void 0:"none"}})})})});bm.displayName=gm;var xm="PopperArrow",wm={top:"bottom",right:"left",bottom:"top",left:"right"},km=e.forwardRef(function(e,t){const{__scopePopper:n,...o}=e,r=ym(xm,n),a=wm[r.placedSide];return v("span",{ref:r.onArrowChange,style:{position:"absolute",left:r.arrowX,top:r.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[r.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[r.placedSide],visibility:r.shouldHideArrow?"hidden":void 0},children:v(sm,{...o,ref:t,style:{...o.style,display:"block"}})})});function Nm(e){return null!==e}km.displayName=xm;var Cm=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,a=0!==r.arrow?.centerOffset,i=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[l,c]=_m(n),d={start:"0%",center:"50%",end:"100%"}[c],u=(r.arrow?.x??0)+i/2,p=(r.arrow?.y??0)+s/2;let f="",m="";return"bottom"===l?(f=a?d:`${u}px`,m=-s+"px"):"top"===l?(f=a?d:`${u}px`,m=`${o.floating.height+s}px`):"right"===l?(f=-s+"px",m=a?d:`${p}px`):"left"===l&&(f=`${o.floating.width+s}px`,m=a?d:`${p}px`),{data:{x:f,y:m}}}});function _m(e){const[t,n="center"]=e.split("-");return[t,n]}var Dm=fm,Sm=hm,Em=bm,Mm=km,Om="Popover",[Tm]=Vn(Om,[dm]),Rm=dm(),[Pm,Am]=Tm(Om),Im=t=>{const{__scopePopover:n,children:o,open:r,defaultOpen:a,onOpenChange:i,modal:s=!1}=t,l=Rm(n),c=e.useRef(null),[d,u]=e.useState(!1),[p,f]=eo({prop:r,defaultProp:a??!1,onChange:i,caller:Om});return v(Dm,{...l,children:v(Pm,{scope:n,contentId:Qn(),triggerRef:c,open:p,onOpenChange:f,onOpenToggle:e.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:d,onCustomAnchorAdd:e.useCallback(()=>u(!0),[]),onCustomAnchorRemove:e.useCallback(()=>u(!1),[]),modal:s,children:o})})};Im.displayName=Om;var jm="PopoverAnchor";e.forwardRef((t,n)=>{const{__scopePopover:o,...r}=t,a=Am(jm,o),i=Rm(o),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=a;return e.useEffect(()=>(s(),()=>l()),[s,l]),v(Sm,{...i,...r,ref:n})}).displayName=jm;var Fm="PopoverTrigger",Lm=e.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Am(Fm,n),a=Rm(n),i=_(t,r.triggerRef),s=v(ao.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Zm(r.open),...o,ref:i,onClick:Kn(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?s:v(Sm,{asChild:!0,...a,children:s})});Lm.displayName=Fm;var zm="PopoverPortal",[Wm,$m]=Tm(zm,{forceMount:void 0}),Bm=e=>{const{__scopePopover:t,forceMount:n,children:o,container:r}=e,a=Am(zm,t);return v(Wm,{scope:t,forceMount:n,children:v(So,{present:n||a.open,children:v(Do,{asChild:!0,container:r,children:o})})})};Bm.displayName=zm;var qm="PopoverContent",Hm=e.forwardRef((e,t)=>{const n=$m(qm,e.__scopePopover),{forceMount:o=n.forceMount,...r}=e,a=Am(qm,e.__scopePopover);return v(So,{present:o||a.open,children:a.modal?v(Vm,{...r,ref:t}):v(Um,{...r,ref:t})})});Hm.displayName=qm;var Ym=to("PopoverContent.RemoveScroll"),Vm=e.forwardRef((t,n)=>{const o=Am(qm,t.__scopePopover),r=e.useRef(null),a=_(n,r),i=e.useRef(!1);return e.useEffect(()=>{const e=r.current;if(e)return Nr(e)},[]),v(gr,{as:Ym,allowPinchZoom:!0,children:v(Km,{...t,ref:a,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Kn(t.onCloseAutoFocus,e=>{e.preventDefault(),i.current||o.triggerRef.current?.focus()}),onPointerDownOutside:Kn(t.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,o=2===t.button||n;i.current=o},{checkForDefaultPrevented:!1}),onFocusOutside:Kn(t.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),Um=e.forwardRef((t,n)=>{const o=Am(qm,t.__scopePopover),r=e.useRef(!1),a=e.useRef(!1);return v(Km,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(r.current||o.triggerRef.current?.focus(),e.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(r.current=!0,"pointerdown"===e.detail.originalEvent.type&&(a.current=!0));const n=e.target,i=o.triggerRef.current?.contains(n);i&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&a.current&&e.preventDefault()}})}),Km=e.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:d,...u}=e,p=Am(qm,n),f=Rm(n);return Oo(),v(bo,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:a,children:v(fo,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:d,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1),children:v(Em,{"data-state":Zm(p.open),role:"dialog",id:p.contentId,...f,...u,ref:t,style:{...u.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)"}})})})}),Gm="PopoverClose";e.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Am(Gm,n);return v(ao.button,{type:"button",...o,ref:t,onClick:Kn(e.onClick,()=>r.onOpenChange(!1))})}).displayName=Gm;function Zm(e){return e?"open":"closed"}e.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Rm(n);return v(Mm,{...r,...o,ref:t})}).displayName="PopoverArrow";var Xm=Bm,Qm=Hm;const Jm=Im,eh=Lm,th=e.forwardRef(({className:e,align:t="center",sideOffset:n=4,...o},r)=>v(Xm,{children:v(Qm,{ref:r,align:t,sideOffset:n,"data-slot":"popover-content",className:Je("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),...o})}));th.displayName=Qm.displayName;const nh=({startDate:e,endDate:t,onStartDateChange:n,onEndDateChange:o,startLabel:r="Start date",endLabel:a="End date",className:i})=>v("div",{className:Je("flex flex-col gap-2",i),children:y("div",{className:"flex flex-row gap-2 items-center",children:[y(Jm,{children:[v(eh,{asChild:!0,children:y("button",{type:"button",className:Je(nt,"justify-start text-left w-[240px]",!e&&ot),children:[v(xi,{className:Je("mr-2",rt)}),e?Wd(e,"PPP"):r]})}),v(th,{className:"w-fit p-0",align:"start",children:v(fp,{mode:"single",selected:e,onSelect:n,initialFocus:!0})})]}),y(Jm,{children:[v(eh,{asChild:!0,children:y("button",{type:"button",className:Je(nt,"justify-start text-left w-[240px]",!t&&ot),children:[v(xi,{className:Je("mr-2",rt)}),t?Wd(t,"PPP"):a]})}),v(th,{className:"w-fit p-0",align:"start",children:v(fp,{mode:"single",selected:t,onSelect:o,initialFocus:!0})})]})]})});var oh=.999,rh=/[\\\/_+.#"@\[\(\{&]/,ah=/[\\\/_+.#"@\[\(\{&]/g,ih=/[\s-]/,sh=/[\s-]/g;function lh(e,t,n,o,r,a,i){if(a===t.length)return r===e.length?1:.99;var s=`${r},${a}`;if(void 0!==i[s])return i[s];for(var l,c,d,u,p=o.charAt(a),f=n.indexOf(p,r),m=0;f>=0;)(l=lh(e,t,n,o,f+1,a+1,i))>m&&(f===r?l*=1:rh.test(e.charAt(f-1))?(l*=.8,(d=e.slice(r,f-1).match(ah))&&r>0&&(l*=Math.pow(oh,d.length))):ih.test(e.charAt(f-1))?(l*=.9,(u=e.slice(r,f-1).match(sh))&&r>0&&(l*=Math.pow(oh,u.length))):(l*=.17,r>0&&(l*=Math.pow(oh,f-r))),e.charAt(f)!==t.charAt(a)&&(l*=.9999)),(l<.1&&n.charAt(f-1)===o.charAt(a+1)||o.charAt(a+1)===o.charAt(a)&&n.charAt(f-1)!==o.charAt(a))&&(.1*(c=lh(e,t,n,o,f+1,a+2,i))>l&&(l=.1*c)),l>m&&(m=l),f=n.indexOf(p,f+1);return i[s]=m,m}function ch(e){return e.toLowerCase().replace(sh," ")}function dh(e,t,n){return lh(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,ch(e),ch(t),0,0,{})}var uh='[cmdk-group=""]',ph='[cmdk-group-items=""]',fh='[cmdk-item=""]',mh=`${fh}:not([aria-disabled="true"])`,hh="cmdk-item-select",gh="data-value",vh=(e,t,n)=>dh(e,t,n),yh=e.createContext(void 0),bh=()=>e.useContext(yh),xh=e.createContext(void 0),wh=()=>e.useContext(xh),kh=e.createContext(void 0),Nh=e.forwardRef((t,n)=>{let o=Fh(()=>{var e,n;return{search:"",value:null!=(n=null!=(e=t.value)?e:t.defaultValue)?n:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Fh(()=>new Set),a=Fh(()=>new Map),i=Fh(()=>new Map),s=Fh(()=>new Set),l=Ih(t),{label:c,children:d,value:u,onValueChange:p,filter:f,shouldFilter:m,loop:h,disablePointerSelection:g=!1,vimBindings:v=!0,...y}=t,b=Qn(),x=Qn(),w=Qn(),k=e.useRef(null),N=Wh();jh(()=>{if(void 0!==u){let e=u.trim();o.current.value=e,C.emit()}},[u]),jh(()=>{N(6,O)},[]);let C=e.useMemo(()=>({subscribe:e=>(s.current.add(e),()=>s.current.delete(e)),snapshot:()=>o.current,setState:(e,t,n)=>{var r,a,i,s;if(!Object.is(o.current[e],t)){if(o.current[e]=t,"search"===e)M(),S(),N(1,E);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(w);e?e.focus():null==(r=document.getElementById(b))||r.focus()}if(N(7,()=>{var e;o.current.selectedItemId=null==(e=T())?void 0:e.id,C.emit()}),n||N(5,O),void 0!==(null==(a=l.current)?void 0:a.value)){let e=null!=t?t:"";return void(null==(s=(i=l.current).onValueChange)||s.call(i,e))}}C.emit()}},emit:()=>{s.current.forEach(e=>e())}}),[]),_=e.useMemo(()=>({value:(e,t,n)=>{var r;t!==(null==(r=i.current.get(e))?void 0:r.value)&&(i.current.set(e,{value:t,keywords:n}),o.current.filtered.items.set(e,D(t,n)),N(2,()=>{S(),C.emit()}))},item:(e,t)=>(r.current.add(e),t&&(a.current.has(t)?a.current.get(t).add(e):a.current.set(t,new Set([e]))),N(3,()=>{M(),S(),o.current.value||E(),C.emit()}),()=>{i.current.delete(e),r.current.delete(e),o.current.filtered.items.delete(e);let t=T();N(4,()=>{M(),(null==t?void 0:t.getAttribute("id"))===e&&E(),C.emit()})}),group:e=>(a.current.has(e)||a.current.set(e,new Set),()=>{i.current.delete(e),a.current.delete(e)}),filter:()=>l.current.shouldFilter,label:c||t["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:b,inputId:w,labelId:x,listInnerRef:k}),[]);function D(e,t){var n,r;let a=null!=(r=null==(n=l.current)?void 0:n.filter)?r:vh;return e?a(e,o.current.search,t):0}function S(){if(!o.current.search||!1===l.current.shouldFilter)return;let e=o.current.filtered.items,t=[];o.current.filtered.groups.forEach(n=>{let o=a.current.get(n),r=0;o.forEach(t=>{let n=e.get(t);r=Math.max(n,r)}),t.push([n,r])});let n=k.current;R().sort((t,n)=>{var o,r;let a=t.getAttribute("id"),i=n.getAttribute("id");return(null!=(o=e.get(i))?o:0)-(null!=(r=e.get(a))?r:0)}).forEach(e=>{let t=e.closest(ph);t?t.appendChild(e.parentElement===t?e:e.closest(`${ph} > *`)):n.appendChild(e.parentElement===n?e:e.closest(`${ph} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let n=null==(t=k.current)?void 0:t.querySelector(`${uh}[${gh}="${encodeURIComponent(e[0])}"]`);null==n||n.parentElement.appendChild(n)})}function E(){let e=R().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(gh);C.setState("value",t||void 0)}function M(){var e,t,n,s;if(!o.current.search||!1===l.current.shouldFilter)return void(o.current.filtered.count=r.current.size);o.current.filtered.groups=new Set;let c=0;for(let a of r.current){let r=D(null!=(t=null==(e=i.current.get(a))?void 0:e.value)?t:"",null!=(s=null==(n=i.current.get(a))?void 0:n.keywords)?s:[]);o.current.filtered.items.set(a,r),r>0&&c++}for(let[e,t]of a.current)for(let n of t)if(o.current.filtered.items.get(n)>0){o.current.filtered.groups.add(e);break}o.current.filtered.count=c}function O(){var e,t,n;let o=T();o&&((null==(e=o.parentElement)?void 0:e.firstChild)===o&&(null==(n=null==(t=o.closest(uh))?void 0:t.querySelector('[cmdk-group-heading=""]'))||n.scrollIntoView({block:"nearest"})),o.scrollIntoView({block:"nearest"}))}function T(){var e;return null==(e=k.current)?void 0:e.querySelector(`${fh}[aria-selected="true"]`)}function R(){var e;return Array.from((null==(e=k.current)?void 0:e.querySelectorAll(mh))||[])}function P(e){let t=R()[e];t&&C.setState("value",t.getAttribute(gh))}function A(e){var t;let n=T(),o=R(),r=o.findIndex(e=>e===n),a=o[r+e];null!=(t=l.current)&&t.loop&&(a=r+e<0?o[o.length-1]:r+e===o.length?o[0]:o[r+e]),a&&C.setState("value",a.getAttribute(gh))}function I(e){let t,n=T(),o=null==n?void 0:n.closest(uh);for(;o&&!t;)o=e>0?Ph(o,uh):Ah(o,uh),t=null==o?void 0:o.querySelector(mh);t?C.setState("value",t.getAttribute(gh)):A(e)}let j=()=>P(R().length-1),F=e=>{e.preventDefault(),e.metaKey?j():e.altKey?I(1):A(1)},L=e=>{e.preventDefault(),e.metaKey?P(0):e.altKey?I(-1):A(-1)};return e.createElement(ao.div,{ref:n,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=y.onKeyDown)||t.call(y,e);let n=e.nativeEvent.isComposing||229===e.keyCode;if(!e.defaultPrevented&&!n)switch(e.key){case"n":case"j":v&&e.ctrlKey&&F(e);break;case"ArrowDown":F(e);break;case"p":case"k":v&&e.ctrlKey&&L(e);break;case"ArrowUp":L(e);break;case"Home":e.preventDefault(),P(0);break;case"End":e.preventDefault(),j();break;case"Enter":{e.preventDefault();let t=T();if(t){let e=new Event(hh);t.dispatchEvent(e)}}}}},e.createElement("label",{"cmdk-label":"",htmlFor:_.inputId,id:_.labelId,style:Bh},c),$h(t,t=>e.createElement(xh.Provider,{value:C},e.createElement(yh.Provider,{value:_},t))))}),Ch=e.forwardRef((t,n)=>{var o,r;let a=Qn(),i=e.useRef(null),s=e.useContext(kh),l=bh(),c=Ih(t),d=null!=(r=null==(o=c.current)?void 0:o.forceMount)?r:null==s?void 0:s.forceMount;jh(()=>{if(!d)return l.item(a,null==s?void 0:s.id)},[d]);let u=zh(a,i,[t.value,t.children,i],t.keywords),p=wh(),f=Lh(e=>e.value&&e.value===u.current),m=Lh(e=>!(!d&&!1!==l.filter())||(!e.search||e.filtered.items.get(a)>0));function h(){var e,t;g(),null==(t=(e=c.current).onSelect)||t.call(e,u.current)}function g(){p.setState("value",u.current,!0)}if(e.useEffect(()=>{let e=i.current;if(e&&!t.disabled)return e.addEventListener(hh,h),()=>e.removeEventListener(hh,h)},[m,t.onSelect,t.disabled]),!m)return null;let{disabled:v,value:y,onSelect:b,forceMount:x,keywords:w,...k}=t;return e.createElement(ao.div,{ref:C(i,n),...k,id:a,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!f,"data-disabled":!!v,"data-selected":!!f,onPointerMove:v||l.getDisablePointerSelection()?void 0:g,onClick:v?void 0:h},t.children)}),_h=e.forwardRef((t,n)=>{let{heading:o,children:r,forceMount:a,...i}=t,s=Qn(),l=e.useRef(null),c=e.useRef(null),d=Qn(),u=bh(),p=Lh(e=>!(!a&&!1!==u.filter())||(!e.search||e.filtered.groups.has(s)));jh(()=>u.group(s),[]),zh(s,l,[t.value,t.heading,c]);let f=e.useMemo(()=>({id:s,forceMount:a}),[a]);return e.createElement(ao.div,{ref:C(l,n),...i,"cmdk-group":"",role:"presentation",hidden:!p||void 0},o&&e.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:d},o),$h(t,t=>e.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":o?d:void 0},e.createElement(kh.Provider,{value:f},t))))}),Dh=e.forwardRef((t,n)=>{let{alwaysRender:o,...r}=t,a=e.useRef(null),i=Lh(e=>!e.search);return o||i?e.createElement(ao.div,{ref:C(a,n),...r,"cmdk-separator":"",role:"separator"}):null}),Sh=e.forwardRef((t,n)=>{let{onValueChange:o,...r}=t,a=null!=t.value,i=wh(),s=Lh(e=>e.search),l=Lh(e=>e.selectedItemId),c=bh();return e.useEffect(()=>{null!=t.value&&i.setState("search",t.value)},[t.value]),e.createElement(ao.input,{ref:n,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":l,id:c.inputId,type:"text",value:a?t.value:s,onChange:e=>{a||i.setState("search",e.target.value),null==o||o(e.target.value)}})}),Eh=e.forwardRef((t,n)=>{let{children:o,label:r="Suggestions",...a}=t,i=e.useRef(null),s=e.useRef(null),l=Lh(e=>e.selectedItemId),c=bh();return e.useEffect(()=>{if(s.current&&i.current){let e,t=s.current,n=i.current,o=new ResizeObserver(()=>{e=requestAnimationFrame(()=>{let e=t.offsetHeight;n.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")})});return o.observe(t),()=>{cancelAnimationFrame(e),o.unobserve(t)}}},[]),e.createElement(ao.div,{ref:C(i,n),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":r,id:c.listId},$h(t,t=>e.createElement("div",{ref:C(s,c.listInnerRef),"cmdk-list-sizer":""},t)))}),Mh=e.forwardRef((t,n)=>{let{open:o,onOpenChange:r,overlayClassName:a,contentClassName:i,container:s,...l}=t;return e.createElement(oa,{open:o,onOpenChange:r},e.createElement(aa,{container:s},e.createElement(ia,{"cmdk-overlay":"",className:a}),e.createElement(sa,{"aria-label":t.label,"cmdk-dialog":"",className:i},e.createElement(Nh,{ref:n,...l}))))}),Oh=e.forwardRef((t,n)=>Lh(e=>0===e.filtered.count)?e.createElement(ao.div,{ref:n,...t,"cmdk-empty":"",role:"presentation"}):null),Th=e.forwardRef((t,n)=>{let{progress:o,children:r,label:a="Loading...",...i}=t;return e.createElement(ao.div,{ref:n,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},$h(t,t=>e.createElement("div",{"aria-hidden":!0},t)))}),Rh=Object.assign(Nh,{List:Eh,Item:Ch,Input:Sh,Group:_h,Separator:Dh,Dialog:Mh,Empty:Oh,Loading:Th});function Ph(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Ah(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Ih(t){let n=e.useRef(t);return jh(()=>{n.current=t}),n}var jh="undefined"==typeof window?e.useEffect:e.useLayoutEffect;function Fh(t){let n=e.useRef();return void 0===n.current&&(n.current=t()),n}function Lh(t){let n=wh(),o=()=>t(n.snapshot());return e.useSyncExternalStore(n.subscribe,o,o)}function zh(t,n,o,r=[]){let a=e.useRef(),i=bh();return jh(()=>{var e;let s=(()=>{var e;for(let t of o){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():a.current}})(),l=r.map(e=>e.trim());i.value(t,s,l),null==(e=n.current)||e.setAttribute(gh,s),a.current=s}),a}var Wh=()=>{let[t,n]=e.useState(),o=Fh(()=>new Map);return jh(()=>{o.current.forEach(e=>e()),o.current=new Map},[t]),(e,t)=>{o.current.set(e,t),n({})}};function $h({asChild:t,children:n},o){return t&&e.isValidElement(n)?e.cloneElement(function(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}(n),{ref:n.ref},o(n.props.children)):o(n)}var Bh={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const qh=oa,Hh=ra,Yh=({className:e,...t})=>v(aa,{...t});Yh.displayName=aa.displayName;const Vh=e.forwardRef(({className:e,...t},n)=>v(ia,{ref:n,className:Je("fixed inset-0 z-50 overlay-dialog data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Vh.displayName=ia.displayName;const Uh=e.forwardRef(({className:e,children:t,showCloseButton:n=!0,...o},r)=>y(Yh,{children:[v(Vh,{}),y(sa,{ref:r,className:Je("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-2xl md:w-full",e),...o,children:[t,n&&y(da,{type:"button",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:[v(Yi,{className:"h-4 w-4"}),v("span",{className:"sr-only",children:"Close"})]})]})]}));Uh.displayName=sa.displayName;const Kh=({className:e,...t})=>v("div",{className:Je("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Kh.displayName="DialogHeader";const Gh=({className:e,...t})=>v("div",{className:Je("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Gh.displayName="DialogFooter";const Zh=e.forwardRef(({className:e,...t},n)=>v(la,{ref:n,className:Je("text-lg font-semibold leading-none tracking-tight",e),...t}));Zh.displayName=la.displayName;const Xh=e.forwardRef(({className:e,...t},n)=>v(ca,{ref:n,className:Je("text-sm text-muted-foreground",e),...t}));function Qh({className:e,...t}){return v(Rh,{"data-slot":"command",className:Je("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function Jh({title:e="Command Palette",description:t="Search for a command to run...",children:n,className:o,showCloseButton:r=!0,...a}){return y(qh,{...a,children:[y(Kh,{className:"sr-only",children:[v(Zh,{children:e}),v(Xh,{children:t})]}),v(Uh,{className:Je("overflow-hidden p-0",o),children:v(Qh,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:n})})]})}function eg({className:e,...t}){return y("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[v(Bi,{className:"size-4 shrink-0 opacity-50"}),v(Rh.Input,{"data-slot":"command-input",className:Je("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function tg({className:e,...t}){return v(Rh.List,{"data-slot":"command-list",className:Je("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function ng({...e}){return v(Rh.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function og({className:e,...t}){return v(Rh.Group,{"data-slot":"command-group",className:Je("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function rg({className:e,...t}){return v(Rh.Separator,{"data-slot":"command-separator",className:Je("bg-border -mx-1 h-px",e),...t})}function ag({className:e,...t}){return v(Rh.Item,{"data-slot":"command-item",className:Je("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function ig({className:e,...t}){return v("span",{"data-slot":"command-shortcut",className:Je("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}function sg({items:t,value:n,onChange:o,placeholder:r="Select an option...",emptyMessage:a="No items found.",className:i,searchPlaceholder:s="Search...",onSearchChange:l,filterLocally:c=!0,loading:d=!1,displayLabel:u,disabled:p=!1}){const[f,m]=e.useState(!1),[h,g]=e.useState(""),[b,x]=e.useState(null);e.useEffect(()=>{if(!n||""===n)return void x(null);const e=t?.find(e=>String(e.value)===String(n));e&&x(e)},[n,t]);const w=c&&h?t?.filter(e=>e.label.toLowerCase().includes(h.toLowerCase())):t,k=u??b?.label??r;return y(Jm,{open:f,onOpenChange:m,children:[v(eh,{asChild:!0,children:y("button",{type:"button","data-cy":"combobox-trigger",disabled:p,"aria-expanded":f,className:Je(nt,"justify-between truncate",!u&&!b&&ot,i),children:[v("span",{className:"truncate",children:k}),v(Si,{className:"ml-2 size-4 shrink-0 opacity-50"})]})}),v(th,{className:"max-w-[700px] p-0 w-full min-w-(--radix-popover-trigger-width)",children:y(Qh,{shouldFilter:!1,children:[v(eg,{"data-cy":"combobox-input",placeholder:s,value:h,onValueChange:e=>{g(e),l?.(e)},className:"h-9 focus:ring-0 focus:outline-none focus-visible:ring-0 focus-visible:ring-offset-0"}),y(tg,{"data-cy":"combobox-list",children:[v(ng,{children:d?"Loading...":a}),v(og,{children:w?.map(e=>y(ag,{value:String(e?.value??""),onSelect:t=>((e,t)=>{const r=e===n?null:t;o(r?.value??"",r),m(!1),g(""),x(r)})(t,e),className:Je("cursor-pointer",at),children:[e.label,v(ki,{className:Je("ml-auto size-4",String(n)===String(e.value)?"opacity-100":"opacity-0")})]},e?.value))})]})]})})]})}Xh.displayName=ca.displayName;const lg={},cg=({id:e,fetcher:t,resolveValue:n,modelClass:r,labelName:a,valueField:l="pk",placeholder:c="Select item...",emptyMessage:u="No items found",value:p,onChange:f,additionalFilters:m=lg,fields:h,className:g,debounceWait:y=300})=>{const b=o(()=>m??lg,[m]),[x,w]=d([]),[k,N]=d(""),[C,_]=d(""),[D,S]=d(!1),[E,M]=d();i(()=>{const e=setTimeout(()=>{_(k)},y);return()=>clearTimeout(e)},[k,y]);const O=s(async()=>{S(!0);try{const e=await t({search:C,modelClass:r,labelName:a,additionalFilters:b,fields:h});w(((e,t,n)=>e.map(e=>({value:e[n]??e.id??e.pk,label:String(e[t]??e.name??e.pk??""),...e})))(e,a,l))}catch(e){console.error("FKSelect fetch error:",e),w([])}finally{S(!1)}},[t,C,r,a,b,h,l]);i(()=>{O()},[O]);const T=x.find(e=>String(e.value)===String(p))?.label;i(()=>{if(!p)return void M(void 0);if(T)return void M(T);if(!n)return void M(void 0);let e=!0;return n({modelClass:r,value:p}).then(t=>{if(!e||!t)return;const n=String(t[a]??t.name??p);M(n)}).catch(e=>{console.error("FKSelect resolve error:",e)}),()=>{e=!1}},[p,T,n,r,a]);return v("div",{"data-testid":e,className:Je("inline-flex w-fit shrink-0",g),children:v(sg,{items:x,placeholder:c,emptyMessage:u,value:p?String(p):null,onChange:(e,t)=>{t&&f(e,t)},onSearchChange:N,filterLocally:!1,loading:D,displayLabel:E,className:"w-full"})})},dg=({value:e,onChange:t,fetcher:n,className:o})=>v(cg,{fetcher:n,modelClass:"User",className:Je("max-w-36 h-10",o),placeholder:"Creator user",emptyMessage:"No user found",labelName:"username",value:e,onChange:t});function ug(e,[t,n]){return Math.min(n,Math.max(t,e))}function pg(t){const n=e.useRef(t);return e.useEffect(()=>{n.current=t}),e.useMemo(()=>(...e)=>n.current?.(...e),[])}var fg,mg="dismissableLayer.update",hg="dismissableLayer.pointerDownOutside",gg="dismissableLayer.focusOutside",vg=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),yg=e.forwardRef((t,n)=>{const{disableOutsidePointerEvents:o=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...d}=t,u=e.useContext(vg),[p,f]=e.useState(null),m=p?.ownerDocument??globalThis?.document,[,h]=e.useState({}),g=cl(n,e=>f(e)),y=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=y.indexOf(b),w=p?y.indexOf(p):-1,k=u.layersWithOutsidePointerEventsDisabled.size>0,N=w>=x,C=e.useRef(!1),_=function(t,n){const{ownerDocument:o=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:i}=n,s=pg(t),l=e.useRef(!1),c=e.useRef(!1),d=e.useRef(new Map),u=e.useRef(()=>{});return e.useEffect(()=>{function e(){c.current=!1,a.current=!1,d.current.clear()}function t(){return Array.from(d.current.values()).some(Boolean)}function n(e){if(!c.current)return;const t=e.target;t instanceof Node&&[...i].some(e=>e.contains(t))||d.current.set(e.type,!0),"click"===e.type&&window.setTimeout(()=>{c.current&&u.current()},0)}function p(e){c.current&&d.current.set(e.type,!1)}const f=n=>{if(n.target&&!l.current){let i=function(){o.removeEventListener("click",u.current);const n=t();e(),n||xg(hg,s,l,{discrete:!0})};const l={originalEvent:n};c.current=!0,a.current=r&&0===n.button,d.current.clear(),r&&0===n.button?(o.removeEventListener("click",u.current),u.current=i,o.addEventListener("click",u.current,{once:!0})):i()}else o.removeEventListener("click",u.current),e();l.current=!1},m=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const e of m)o.addEventListener(e,n,!0),o.addEventListener(e,p);const h=window.setTimeout(()=>{o.addEventListener("pointerdown",f)},0);return()=>{window.clearTimeout(h),o.removeEventListener("pointerdown",f),o.removeEventListener("click",u.current);for(const e of m)o.removeEventListener(e,n,!0),o.removeEventListener(e,p)}},[o,s,r,a,i]),{onPointerDownCapture:()=>l.current=!0}}(e=>{const t=e.target;if(!(t instanceof Node))return;const n=[...u.branches].some(e=>e.contains(t));N&&!n&&(i?.(e),l?.(e),e.defaultPrevented||c?.())},{ownerDocument:m,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:u.dismissableSurfaces}),D=function(t,n=globalThis?.document){const o=pg(t),r=e.useRef(!1);return e.useEffect(()=>{const e=e=>{if(e.target&&!r.current){xg(gg,o,{originalEvent:e},{discrete:!1})}};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)},[n,o]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{if(r&&C.current)return;const t=e.target;[...u.branches].some(e=>e.contains(t))||(s?.(e),l?.(e),e.defaultPrevented||c?.())},m);return function(t,n=globalThis?.document){const o=pg(t);e.useEffect(()=>{const e=e=>{"Escape"===e.key&&o(e)};return n.addEventListener("keydown",e,{capture:!0}),()=>n.removeEventListener("keydown",e,{capture:!0})},[o,n])}(e=>{w===u.layers.size-1&&(a?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))},m),e.useEffect(()=>{if(p)return o&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(fg=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),bg(),()=>{o&&(u.layersWithOutsidePointerEventsDisabled.delete(p),0===u.layersWithOutsidePointerEventsDisabled.size&&(m.body.style.pointerEvents=fg))}},[p,m,o,u]),e.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),bg())},[p,u]),e.useEffect(()=>{const e=()=>h({});return document.addEventListener(mg,e),()=>document.removeEventListener(mg,e)},[]),v(Nl.div,{...d,ref:g,style:{pointerEvents:k?N?"auto":"none":void 0,...t.style},onFocusCapture:bl(t.onFocusCapture,D.onFocusCapture),onBlurCapture:bl(t.onBlurCapture,D.onBlurCapture),onPointerDownCapture:bl(t.onPointerDownCapture,_.onPointerDownCapture)})});yg.displayName="DismissableLayer";function bg(){const e=new CustomEvent(mg);document.dispatchEvent(e)}function xg(e,t,n,{discrete:o}){const r=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Cl(r,a):r.dispatchEvent(a)}e.forwardRef((t,n)=>{const o=e.useContext(vg),r=e.useRef(null),a=cl(n,r);return e.useEffect(()=>{const e=r.current;if(e)return o.branches.add(e),()=>{o.branches.delete(e)}},[o.branches]),v(Nl.div,{...t,ref:a})}).displayName="DismissableLayerBranch";var wg=0,kg=null;function Ng(){e.useEffect(()=>{kg||(kg={start:Cg(),end:Cg()});const{start:e,end:t}=kg;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),wg++,()=>{1===wg&&(kg?.start.remove(),kg?.end.remove(),kg=null),wg=Math.max(0,wg-1)}},[])}function Cg(){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 _g="focusScope.autoFocusOnMount",Dg="focusScope.autoFocusOnUnmount",Sg={bubbles:!1,cancelable:!0},Eg=e.forwardRef((t,n)=>{const{loop:o=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...s}=t,[l,c]=e.useState(null),d=pg(a),u=pg(i),p=e.useRef(null),f=cl(n,e=>c(e)),m=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect(()=>{if(r){let e=function(e){if(m.paused||!l)return;const t=e.target;l.contains(t)?p.current=t:Rg(p.current,{select:!0})},t=function(e){if(m.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||Rg(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Rg(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const o=new MutationObserver(n);return l&&o.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),o.disconnect()}}},[r,l,m.paused]),e.useEffect(()=>{if(l){Pg.add(m);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(_g,Sg);l.addEventListener(_g,d),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Rg(o,{select:t}),document.activeElement!==n)return}((e=Mg(l),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&Rg(l))}return()=>{l.removeEventListener(_g,d),setTimeout(()=>{const e=new CustomEvent(Dg,Sg);l.addEventListener(Dg,u),l.dispatchEvent(e),e.defaultPrevented||Rg(t??document.body,{select:!0}),l.removeEventListener(Dg,u),Pg.remove(m)},0)}}var e},[l,d,u,m]);const h=e.useCallback(e=>{if(!o&&!r)return;if(m.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[r,a]=function(e){const t=Mg(e),n=Og(t,e),o=Og(t.reverse(),e);return[n,o]}(t);r&&a?e.shiftKey||n!==a?e.shiftKey&&n===r&&(e.preventDefault(),o&&Rg(a,{select:!0})):(e.preventDefault(),o&&Rg(r,{select:!0})):n===t&&e.preventDefault()}},[o,r,m.paused]);return v(Nl.div,{tabIndex:-1,...s,ref:f,onKeyDown:h})});function Mg(e){const t=[],n=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(;n.nextNode();)t.push(n.currentNode);return t}function Og(e,t){for(const n of e)if(!Tg(n,{upTo:t}))return n}function Tg(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 Rg(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}Eg.displayName="FocusScope";var Pg=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Ag(e,t),e.unshift(t)},remove(t){e=Ag(e,t),e[0]?.resume()}}}();function Ag(e,t){const n=[...e],o=n.indexOf(t);return-1!==o&&n.splice(o,1),n}var Ig=e.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...a}=e;return v(Nl.svg,{...a,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:v("polygon",{points:"0,0 30,0 15,10"})})});Ig.displayName="Arrow";var jg=Ig;function Fg(t){const[n,o]=e.useState(void 0);return xl(()=>{if(t){o({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver(e=>{if(!Array.isArray(e))return;if(!e.length)return;const n=e[0];let r,a;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,a=t.blockSize}else r=t.offsetWidth,a=t.offsetHeight;o({width:r,height:a})});return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}o(void 0)},[t]),n}var Lg="Popper",[zg,Wg]=al(Lg),[$g,Bg]=zg(Lg),qg=t=>{const{__scopePopper:n,children:o}=t,[r,a]=e.useState(null),[i,s]=e.useState(void 0);return v($g,{scope:n,anchor:r,onAnchorChange:a,placementState:i,setPlacementState:s,children:o})};qg.displayName=Lg;var Hg="PopperAnchor",Yg=e.forwardRef((t,n)=>{const{__scopePopper:o,virtualRef:r,...a}=t,i=Bg(Hg,o),s=e.useRef(null),l=i.onAnchorChange,c=cl(n,e.useCallback(e=>{s.current=e,e&&l(e)},[l])),d=e.useRef(null);e.useEffect(()=>{if(!r)return;const e=d.current;d.current=r.current,e!==d.current&&l(d.current)});const u=i.placementState&&tv(i.placementState),p=u?.[0],f=u?.[1];return r?null:v(Nl.div,{"data-radix-popper-side":p,"data-radix-popper-align":f,...a,ref:c})});Yg.displayName=Hg;var Vg="PopperContent",[Ug,Kg]=zg(Vg),Gg=e.forwardRef((t,n)=>{const{__scopePopper:o,side:r="bottom",sideOffset:a=0,align:i="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:p="partial",hideWhenDetached:f=!1,updatePositionStrategy:m="optimized",onPlaced:h,...g}=t,y=Bg(Vg,o),[b,x]=e.useState(null),w=cl(n,e=>x(e)),[k,N]=e.useState(null),C=Fg(k),_=C?.width??0,D=C?.height??0,S=r+("center"!==i?"-"+i:""),E="number"==typeof u?u:{top:0,right:0,bottom:0,left:0,...u},M=Array.isArray(d)?d:[d],O=M.length>0,T={padding:E,boundary:M.filter(Jg),altBoundary:O},{refs:R,floatingStyles:P,placement:A,isPositioned:I,middlewareData:j}=Xf({strategy:"fixed",placement:S,whileElementsMounted:(...e)=>Ff(...e,{animationFrame:"always"===m}),elements:{reference:y.anchor},middleware:[Jf({mainAxis:a+D,alignmentAxis:s}),c&&em({mainAxis:!0,crossAxis:!1,limiter:"partial"===p?tm():void 0,...T}),c&&nm({...T}),om({...T,apply:({elements:e,rects:t,availableWidth:n,availableHeight:o})=>{const{width:r,height:a}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${o}px`),i.setProperty("--radix-popper-anchor-width",`${r}px`),i.setProperty("--radix-popper-anchor-height",`${a}px`)}}),k&&am({element:k,padding:l}),ev({arrowWidth:_,arrowHeight:D}),f&&rm({strategy:"referenceHidden",...T,boundary:O?T.boundary:void 0})]}),F=y.setPlacementState;xl(()=>(F(A),()=>{F(void 0)}),[A,F]);const[L,z]=tv(A),W=pg(h);xl(()=>{I&&W?.()},[I,W]);const $=j.arrow?.x,B=j.arrow?.y,q=0!==j.arrow?.centerOffset,[H,Y]=e.useState();return xl(()=>{b&&Y(window.getComputedStyle(b).zIndex)},[b]),v("div",{ref:R.setFloating,"data-radix-popper-content-wrapper":"",style:{...P,transform:I?P.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[j.transformOrigin?.x,j.transformOrigin?.y].join(" "),...j.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:v(Ug,{scope:o,placedSide:L,placedAlign:z,onArrowChange:N,arrowX:$,arrowY:B,shouldHideArrow:q,children:v(Nl.div,{"data-side":L,"data-align":z,...g,ref:w,style:{...g.style,animation:I?void 0:"none"}})})})});Gg.displayName=Vg;var Zg="PopperArrow",Xg={top:"bottom",right:"left",bottom:"top",left:"right"},Qg=e.forwardRef(function(e,t){const{__scopePopper:n,...o}=e,r=Kg(Zg,n),a=Xg[r.placedSide];return v("span",{ref:r.onArrowChange,style:{position:"absolute",left:r.arrowX,top:r.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[r.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[r.placedSide],visibility:r.shouldHideArrow?"hidden":void 0},children:v(jg,{...o,ref:t,style:{...o.style,display:"block"}})})});function Jg(e){return null!==e}Qg.displayName=Zg;var ev=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,a=0!==r.arrow?.centerOffset,i=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[l,c]=tv(n),d={start:"0%",center:"50%",end:"100%"}[c],u=(r.arrow?.x??0)+i/2,p=(r.arrow?.y??0)+s/2;let f="",m="";return"bottom"===l?(f=a?d:`${u}px`,m=-s+"px"):"top"===l?(f=a?d:`${u}px`,m=`${o.floating.height+s}px`):"right"===l?(f=-s+"px",m=a?d:`${p}px`):"left"===l&&(f=`${o.floating.width+s}px`,m=a?d:`${p}px`),{data:{x:f,y:m}}}});function tv(e){const[t,n="center"]=e.split("-");return[t,n]}var nv=qg,ov=Yg,rv=Gg,av=Qg,iv=e.forwardRef((t,n)=>{const{container:o,...r}=t,[a,i]=e.useState(!1);xl(()=>i(!0),[]);const s=o||a&&globalThis?.document?.body;return s?x.createPortal(v(Nl.div,{...r,ref:n}),s):null});function sv(t){const n=e.useRef({value:t,previous:t});return e.useMemo(()=>(n.current.value!==t&&(n.current.previous=n.current.value,n.current.value=t),n.current.previous),[t])}iv.displayName="Portal";var lv=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),cv=e.forwardRef((e,t)=>v(Nl.span,{...e,ref:t,style:{...lv,...e.style}}));cv.displayName="VisuallyHidden";var dv=cv,uv=[" ","Enter","ArrowUp","ArrowDown"],pv=[" ","Enter"],fv="Select",[mv,hv,gv]=yl(fv),[vv]=al(fv,[gv,Wg]),yv=Wg(),[bv,xv]=vv(fv),[wv,kv]=vv(fv);function Nv(t){const{__scopeSelect:n,children:o,open:r,defaultOpen:a,onOpenChange:i,value:s,defaultValue:l,onValueChange:c,dir:d,name:u,autoComplete:p,disabled:f,required:m,form:h,internal_do_not_use_render:g}=t,y=yv(n),[b,x]=e.useState(null),[w,k]=e.useState(null),[N,C]=e.useState(!1),_=Ul(d),[D,S]=kl({prop:r,defaultProp:a??!1,onChange:i,caller:fv}),[E,M]=kl({prop:s,defaultProp:l,onChange:c,caller:fv}),O=e.useRef(null),T=!b||(!!h||!!b.closest("form")),[R,P]=e.useState(new Set),A=Ol(),I=Array.from(R).map(e=>e.props.value).join(";"),j=e.useCallback(e=>{P(t=>new Set(t).add(e))},[]),F=e.useCallback(e=>{P(t=>{const n=new Set(t);return n.delete(e),n})},[]),L={required:m,trigger:b,onTriggerChange:x,valueNode:w,onValueNodeChange:k,valueNodeHasChildren:N,onValueNodeHasChildrenChange:C,contentId:A,value:E,onValueChange:M,open:D,onOpenChange:S,dir:_,triggerPointerDownPosRef:O,disabled:f,name:u,autoComplete:p,form:h,nativeOptions:R,nativeSelectKey:I,isFormControl:T};return v(nv,{...y,children:v(bv,{scope:n,...L,children:v(mv.Provider,{scope:n,children:v(wv,{scope:n,onNativeOptionAdd:j,onNativeOptionRemove:F,children:vy(g)?g(L):o})})})})}Nv.displayName="SelectProvider";var Cv=e=>{const{__scopeSelect:t,children:n,...o}=e;return v(Nv,{__scopeSelect:t,...o,internal_do_not_use_render:({isFormControl:e})=>y(b,{children:[n,e?v(gy,{__scopeSelect:t}):null]})})};Cv.displayName=fv;var _v="SelectTrigger",Dv=e.forwardRef((t,n)=>{const{__scopeSelect:o,disabled:r=!1,...a}=t,i=yv(o),s=xv(_v,o),l=s.disabled||r,c=cl(n,s.onTriggerChange),d=hv(o),u=e.useRef("touch"),[p,f,m]=by(e=>{const t=d().filter(e=>!e.disabled),n=t.find(e=>e.value===s.value),o=xy(t,e,n);void 0!==o&&s.onValueChange(o.value)}),h=e=>{l||(s.onOpenChange(!0),m()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return v(ov,{asChild:!0,...i,children:v(Nl.button,{type:"button",role:"combobox","aria-controls":s.open?s.contentId:void 0,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":yy(s.value)?"":void 0,...a,ref:c,onClick:bl(a.onClick,e=>{e.currentTarget.focus(),"mouse"!==u.current&&h(e)}),onPointerDown:bl(a.onPointerDown,e=>{u.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(h(e),e.preventDefault())}),onKeyDown:bl(a.onKeyDown,e=>{const t=""!==p.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||f(e.key),t&&" "===e.key||uv.includes(e.key)&&(h(),e.preventDefault())})})})});Dv.displayName=_v;var Sv="SelectValue",Ev=e.forwardRef((t,n)=>{const{__scopeSelect:o,className:r,style:a,children:i,placeholder:s="",...l}=t,c=xv(Sv,o),{onValueNodeHasChildrenChange:d}=c,u=void 0!==i,p=cl(n,c.onValueNodeChange);xl(()=>{d(u)},[d,u]);const f=yy(c.value);return v(Nl.span,{...l,asChild:!f&&l.asChild,ref:p,style:{pointerEvents:"none"},children:v(e.Fragment,{children:f?s:i},f?"placeholder":"value")})});Ev.displayName=Sv;var Mv=e.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return v(Nl.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});Mv.displayName="SelectIcon";var Ov="SelectPortal",[Tv,Rv]=vv(Ov,{forceMount:void 0}),Pv=e=>{const{__scopeSelect:t,forceMount:n,...o}=e;return v(Tv,{scope:e.__scopeSelect,forceMount:n,children:v(iv,{asChild:!0,...o})})};Pv.displayName=Ov;var Av="SelectContent",Iv=e.forwardRef((t,n)=>{const o=Rv(Av,t.__scopeSelect),{forceMount:r=o.forceMount,...a}=t,i=xv(Av,t.__scopeSelect),[s,l]=e.useState();return xl(()=>{l(new DocumentFragment)},[]),v(_l,{present:r||i.open,children:({present:e})=>e?v($v,{...a,ref:n}):v(jv,{...a,fragment:s})})});Iv.displayName=Av;var jv=e.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,fragment:r}=e;return r?x.createPortal(v(Lv,{scope:n,children:v(mv.Slot,{scope:n,children:v("div",{ref:t,children:o})})}),r):null});jv.displayName="SelectContentFragment";var Fv=10,[Lv,zv]=vv(Av),Wv=dl("SelectContent.RemoveScroll"),$v=e.forwardRef((t,n)=>{const{__scopeSelect:o}=t,{position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:i,onPointerDownOutside:s,side:l,sideOffset:c,align:d,alignOffset:u,arrowPadding:p,collisionBoundary:f,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:y,...b}=t,x=xv(Av,o),[w,k]=e.useState(null),[N,C]=e.useState(null),_=cl(n,e=>k(e)),[D,S]=e.useState(null),[E,M]=e.useState(null),O=hv(o),[T,R]=e.useState(!1),P=e.useRef(!1);e.useEffect(()=>{if(w)return Nr(w)},[w]),Ng();const A=e.useCallback(e=>{const[t,...n]=O().map(e=>e.ref.current),[o]=n.slice(-1),r=document.activeElement;for(const n of e){if(n===r)return;if(n?.scrollIntoView({block:"nearest"}),n===t&&N&&(N.scrollTop=0),n===o&&N&&(N.scrollTop=N.scrollHeight),n?.focus(),document.activeElement!==r)return}},[O,N]),I=e.useCallback(()=>A([D,w]),[A,D,w]);e.useEffect(()=>{T&&I()},[T,I]);const{onOpenChange:j,triggerPointerDownPosRef:F}=x;e.useEffect(()=>{if(w){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(F.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(w)||j(!1),document.removeEventListener("pointermove",t),F.current=null};return null!==F.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[w,j,F]),e.useEffect(()=>{const e=()=>j(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[j]);const[L,z]=by(e=>{const t=O().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),o=xy(t,e,n);o&&setTimeout(()=>o.ref.current?.focus())}),W=e.useCallback((e,t,n)=>{const o=!P.current&&!n;(void 0!==x.value&&x.value===t||o)&&(S(e),o&&(P.current=!0))},[x.value]),$=e.useCallback(()=>w?.focus(),[w]),B=e.useCallback((e,t,n)=>{const o=!P.current&&!n;(void 0!==x.value&&x.value===t||o)&&M(e)},[x.value]),q="popper"===r?qv:Bv,H=q===qv?{side:l,sideOffset:c,align:d,alignOffset:u,arrowPadding:p,collisionBoundary:f,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:y}:{};return v(Lv,{scope:o,content:w,viewport:N,onViewportChange:C,itemRefCallback:W,selectedItem:D,onItemLeave:$,itemTextRefCallback:B,focusSelectedItem:I,selectedItemText:E,position:r,isPositioned:T,searchRef:L,children:v(gr,{as:Wv,allowPinchZoom:!0,children:v(Eg,{asChild:!0,trapped:x.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:bl(a,e=>{x.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:v(yg,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:v(q,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:e=>e.preventDefault(),...b,...H,onPlaced:()=>R(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:bl(b.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||z(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=O().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,o=t.indexOf(n);t=t.slice(o+1)}setTimeout(()=>A(t)),e.preventDefault()}})})})})})})});$v.displayName="SelectContentImpl";var Bv=e.forwardRef((t,n)=>{const{__scopeSelect:o,onPlaced:r,...a}=t,i=xv(Av,o),s=zv(Av,o),[l,c]=e.useState(null),[d,u]=e.useState(null),p=cl(n,e=>u(e)),f=hv(o),m=e.useRef(!1),h=e.useRef(!0),{viewport:g,selectedItem:y,selectedItemText:b,focusSelectedItem:x}=s,w=e.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&d&&g&&y&&b){const e=i.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=i.valueNode.getBoundingClientRect(),o=b.getBoundingClientRect();if("rtl"!==i.dir){const r=o.left-t.left,a=n.left-r,i=e.left-a,s=e.width+i,c=Math.max(s,t.width),d=window.innerWidth-Fv,u=ug(a,[Fv,Math.max(Fv,d-c)]);l.style.minWidth=s+"px",l.style.left=u+"px"}else{const r=t.right-o.right,a=window.innerWidth-n.right-r,i=window.innerWidth-e.right-a,s=e.width+i,c=Math.max(s,t.width),d=window.innerWidth-Fv,u=ug(a,[Fv,Math.max(Fv,d-c)]);l.style.minWidth=s+"px",l.style.right=u+"px"}const a=f(),s=window.innerHeight-2*Fv,c=g.scrollHeight,u=window.getComputedStyle(d),p=parseInt(u.borderTopWidth,10),h=parseInt(u.paddingTop,10),v=parseInt(u.borderBottomWidth,10),x=p+h+c+parseInt(u.paddingBottom,10)+v,w=Math.min(5*y.offsetHeight,x),k=window.getComputedStyle(g),N=parseInt(k.paddingTop,10),C=parseInt(k.paddingBottom,10),_=e.top+e.height/2-Fv,D=s-_,S=y.offsetHeight/2,E=p+h+(y.offsetTop+S),M=x-E;if(E<=_){const e=a.length>0&&y===a[a.length-1].ref.current;l.style.bottom="0px";const t=d.clientHeight-g.offsetTop-g.offsetHeight,n=E+Math.max(D,S+(e?C:0)+t+v);l.style.height=n+"px"}else{const e=a.length>0&&y===a[0].ref.current;l.style.top="0px";const t=Math.max(_,p+g.offsetTop+(e?N:0)+S)+M;l.style.height=t+"px",g.scrollTop=E-_+g.offsetTop}l.style.margin=`${Fv}px 0`,l.style.minHeight=w+"px",l.style.maxHeight=s+"px",r?.(),requestAnimationFrame(()=>m.current=!0)}},[f,i.trigger,i.valueNode,l,d,g,y,b,i.dir,r]);xl(()=>w(),[w]);const[k,N]=e.useState();xl(()=>{d&&N(window.getComputedStyle(d).zIndex)},[d]);const C=e.useCallback(e=>{e&&!0===h.current&&(w(),x?.(),h.current=!1)},[w,x]);return v(Hv,{scope:o,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:C,children:v("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:v(Nl.div,{...a,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});Bv.displayName="SelectItemAlignedPosition";var qv=e.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=Fv,...a}=e,i=yv(n);return v(rv,{...i,...a,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});qv.displayName="SelectPopperPosition";var[Hv,Yv]=vv(Av,{}),Vv="SelectViewport",Uv=e.forwardRef((t,n)=>{const{__scopeSelect:o,nonce:r,...a}=t,i=zv(Vv,o),s=Yv(Vv,o),l=cl(n,i.onViewportChange),c=e.useRef(0);return y(b,{children:[v("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),v(mv.Slot,{scope:o,children:v(Nl.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:bl(a.onScroll,e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:o}=s;if(o?.current&&n){const e=Math.abs(c.current-t.scrollTop);if(e>0){const o=window.innerHeight-2*Fv,r=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),i=Math.max(r,a);if(i<o){const r=i+e,a=Math.min(o,r),s=r-a;n.style.height=a+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}c.current=t.scrollTop})})})]})});Uv.displayName=Vv;var Kv="SelectGroup",[Gv,Zv]=vv(Kv),Xv=e.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Ol();return v(Gv,{scope:n,id:r,children:v(Nl.div,{role:"group","aria-labelledby":r,...o,ref:t})})});Xv.displayName=Kv;var Qv="SelectLabel",Jv=e.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Zv(Qv,n);return v(Nl.div,{id:r.id,...o,ref:t})});Jv.displayName=Qv;var ey="SelectItem",[ty,ny]=vv(ey),oy=e.forwardRef((t,n)=>{const{__scopeSelect:o,value:r,disabled:a=!1,textValue:i,...s}=t,l=xv(ey,o),c=zv(ey,o),d=l.value===r,[u,p]=e.useState(i??""),[f,m]=e.useState(!1),h=cl(n,e=>c.itemRefCallback?.(e,r,a)),g=Ol(),y=e.useRef("touch"),b=()=>{a||(l.onValueChange(r),l.onOpenChange(!1))};return v(ty,{scope:o,value:r,disabled:a,textId:g,isSelected:d,onItemTextChange:e.useCallback(e=>{p(t=>t||(e?.textContent??"").trim())},[]),children:v(mv.ItemSlot,{scope:o,value:r,disabled:a,textValue:u,children:v(Nl.div,{role:"option","aria-labelledby":g,"data-highlighted":f?"":void 0,"aria-selected":d&&f,"data-state":d?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...s,ref:h,onFocus:bl(s.onFocus,()=>m(!0)),onBlur:bl(s.onBlur,()=>m(!1)),onClick:bl(s.onClick,()=>{"mouse"!==y.current&&b()}),onPointerUp:bl(s.onPointerUp,()=>{"mouse"===y.current&&b()}),onPointerDown:bl(s.onPointerDown,e=>{y.current=e.pointerType}),onPointerMove:bl(s.onPointerMove,e=>{y.current=e.pointerType,a?c.onItemLeave?.():"mouse"===y.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:bl(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:bl(s.onKeyDown,e=>{""!==c.searchRef?.current&&" "===e.key||(pv.includes(e.key)&&b()," "===e.key&&e.preventDefault())})})})})});oy.displayName=ey;var ry="SelectItemText",ay=e.forwardRef((t,n)=>{const{__scopeSelect:o,className:r,style:a,...i}=t,s=xv(ry,o),l=zv(ry,o),c=ny(ry,o),d=kv(ry,o),[u,p]=e.useState(null),f=cl(n,e=>p(e),c.onItemTextChange,e=>l.itemTextRefCallback?.(e,c.value,c.disabled)),m=u?.textContent,h=e.useMemo(()=>v("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:w}=d;return xl(()=>(g(h),()=>w(h)),[g,w,h]),y(b,{children:[v(Nl.span,{id:c.textId,...i,ref:f}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren&&!yy(s.value)?x.createPortal(i.children,s.valueNode):null]})});ay.displayName=ry;var iy="SelectItemIndicator",sy=e.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return ny(iy,n).isSelected?v(Nl.span,{"aria-hidden":!0,...o,ref:t}):null});sy.displayName=iy;var ly="SelectScrollUpButton",cy=e.forwardRef((t,n)=>{const o=zv(ly,t.__scopeSelect),r=Yv(ly,t.__scopeSelect),[a,i]=e.useState(!1),s=cl(n,r.onScrollButtonChange);return xl(()=>{if(o.viewport&&o.isPositioned){let e=function(){const e=t.scrollTop>0;i(e)};const t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),a?v(py,{...t,ref:s,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});cy.displayName=ly;var dy="SelectScrollDownButton",uy=e.forwardRef((t,n)=>{const o=zv(dy,t.__scopeSelect),r=Yv(dy,t.__scopeSelect),[a,i]=e.useState(!1),s=cl(n,r.onScrollButtonChange);return xl(()=>{if(o.viewport&&o.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;i(n)};const t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),a?v(py,{...t,ref:s,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});uy.displayName=dy;var py=e.forwardRef((t,n)=>{const{__scopeSelect:o,onAutoScroll:r,...a}=t,i=zv("SelectScrollButton",o),s=e.useRef(null),l=hv(o),c=e.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return e.useEffect(()=>()=>c(),[c]),xl(()=>{const e=l().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[l]),v(Nl.div,{"aria-hidden":!0,...a,ref:n,style:{flexShrink:0,...a.style},onPointerDown:bl(a.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(r,50))}),onPointerMove:bl(a.onPointerMove,()=>{i.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(r,50))}),onPointerLeave:bl(a.onPointerLeave,()=>{c()})})}),fy=e.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return v(Nl.div,{"aria-hidden":!0,...o,ref:t})});fy.displayName="SelectSeparator";var my="SelectArrow";e.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=yv(n);return"popper"===zv(my,n).position?v(av,{...r,...o,ref:t}):null}).displayName=my;var hy="SelectBubbleInput",gy=e.forwardRef(({__scopeSelect:t,...n},o)=>{const r=xv(hy,t),{value:a,onValueChange:i,required:s,disabled:l,name:c,autoComplete:d,form:u}=r,{nativeOptions:p,nativeSelectKey:f}=r,m=e.useRef(null),h=cl(o,m),g=a??"",b=sv(g),x=Array.from(p).some(e=>""===(e.props.value??""));return e.useEffect(()=>{const e=m.current;if(!e)return;const t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(b!==g&&n){const t=new Event("change",{bubbles:!0});n.call(e,g),e.dispatchEvent(t)}},[b,g]),y(Nl.select,{"aria-hidden":!0,required:s,tabIndex:-1,name:c,autoComplete:d,disabled:l,form:u,onChange:e=>i(e.target.value),...n,style:{...lv,...n.style},ref:h,defaultValue:g,children:[yy(a)&&!x?v("option",{value:""}):null,Array.from(p)]},f)});function vy(e){return"function"==typeof e}function yy(e){return""===e||void 0===e}function by(t){const n=pg(t),o=e.useRef(""),r=e.useRef(0),a=e.useCallback(e=>{const t=o.current+e;n(t),function e(t){o.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(t)},[n]),i=e.useCallback(()=>{o.current="",window.clearTimeout(r.current)},[]);return e.useEffect(()=>()=>window.clearTimeout(r.current),[]),[o,a,i]}function xy(e,t,n){const o=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,r=n?e.indexOf(n):-1;let a=(i=e,s=Math.max(r,0),i.map((e,t)=>i[(s+t)%i.length]));var i,s;1===o.length&&(a=a.filter(e=>e!==n));const l=a.find(e=>e.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}gy.displayName=hy;const wy=Cv,ky=Xv,Ny=Ev,Cy=e.forwardRef(({className:e,children:t,...n},o)=>y(Dv,{ref:o,"data-slot":"select-trigger",className:Je(nt,"justify-between whitespace-nowrap data-[placeholder]:text-muted-foreground [&>span]:line-clamp-1",e),...n,children:[t,v(Mv,{asChild:!0,children:v(Ni,{className:"h-4 w-4 opacity-50"})})]}));Cy.displayName=Dv.displayName;const _y=e.forwardRef(({className:e,...t},n)=>v(cy,{ref:n,"data-slot":"select-scroll-up-button",className:Je("flex cursor-default items-center justify-center py-1",e),...t,children:v(Di,{className:"h-4 w-4"})}));_y.displayName=cy.displayName;const Dy=e.forwardRef(({className:e,...t},n)=>v(uy,{ref:n,"data-slot":"select-scroll-down-button",className:Je("flex cursor-default items-center justify-center py-1",e),...t,children:v(Ni,{className:"h-4 w-4"})}));Dy.displayName=uy.displayName;const Sy=e.forwardRef(({className:e,children:t,position:n="popper",...o},r)=>v(Pv,{children:y(Iv,{ref:r,"data-slot":"select-content",className:Je("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...o,children:[v(_y,{}),v(Uv,{className:Je("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),v(Dy,{})]})}));Sy.displayName=Iv.displayName;const Ey=e.forwardRef(({className:e,...t},n)=>v(Jv,{ref:n,"data-slot":"select-label",className:Je("px-2 py-1.5 text-sm font-semibold",e),...t}));Ey.displayName=Jv.displayName;const My=e.forwardRef(({className:e,children:t,...n},o)=>y(oy,{ref:o,"data-slot":"select-item",className:Je("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[v("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:v(sy,{children:v(ki,{className:"h-4 w-4"})})}),v(ay,{children:t})]}));My.displayName=oy.displayName;const Oy=e.forwardRef(({className:e,...t},n)=>v(fy,{ref:n,"data-slot":"select-separator",className:Je("-mx-1 my-1 h-px bg-muted",e),...t}));Oy.displayName=fy.displayName;const Ty=({id:e,placeholder:t,options:n,className:o,value:r,onValueChange:a,required:s,name:l})=>{const[c,u]=d(r||"");i(()=>{u(r||"")},[r]);const p=r??c;return y(b,{children:[l?v("input",{type:"hidden",name:l,value:p,required:s}):null,v("div",{className:Je("inline-flex w-fit shrink-0",o),children:y(wy,{value:p||void 0,onValueChange:e=>{u(e),a?.(e)},children:[v(Cy,{"data-testid":e,className:"w-full",children:v(Ny,{placeholder:t})}),v(Sy,{children:n.map(e=>v(My,{"data-testid":e.value,value:e.value,className:Je("cursor-pointer",at,c===e.value?"bg-accent text-accent-foreground":""),children:e.label},e.value))})]})})]})},Ry=e=>{if("fk"===e.variant){const{variant:t,...n}=e;return v(cg,{...n})}return v(Ty,{...e})},Py=e=>{if(!e)return;const t=new Date(e);return Number.isNaN(t.getTime())?void 0:t},Ay=({id:e,placeholder:t,value:n,onValueChange:o,className:r,boundary:a="start",dateFormat:i="dd/MM/yyyy"})=>{const s=Py(n),l=((e,t)=>{const n=Py(e);return n?Wd(n,t):null})(n,i);return v("div",{className:Je("inline-flex w-fit shrink-0",r),children:y(Jm,{children:[v(eh,{asChild:!0,children:y("button",{type:"button","data-testid":e,className:Je(nt,"justify-start text-left",!l&&ot),children:[v(xi,{className:Je("mr-2",rt)}),l??t]})}),v(th,{className:"w-fit p-0",align:"start",children:v(fp,{mode:"single",selected:s,onSelect:e=>{if(!e)return void o?.("");const t="end"===a?function(e,t){const n=$c(e,t?.in);return n.setHours(23,59,59,999),n}(e):Xc(e);o?.(t.toISOString())},initialFocus:!0})})]})})};function Iy({title:e="Nenhum resultado",description:t="Nenhum dado encontrado."}){return v(Fc,{title:e,description:t})}const jy=e.forwardRef(({className:e,...t},n)=>v("div",{className:"w-full overflow-auto",children:v("table",{ref:n,className:Je("w-full caption-bottom text-sm",e),...t})}));jy.displayName="Table";const Fy=e.forwardRef(({className:e,...t},n)=>v("thead",{ref:n,className:Je("rounded-md bg-[#0E2B63] h-[36px]",e),...t}));Fy.displayName="TableHeader";const Ly=e.forwardRef(({className:e,...t},n)=>v("tbody",{ref:n,className:Je("[&_tr:last-child]:border-0",e),...t}));Ly.displayName="TableBody";const zy=e.forwardRef(({className:e,...t},n)=>v("tfoot",{ref:n,className:Je("bg-primary font-medium text-primary-foreground",e),...t}));zy.displayName="TableFooter";const Wy=e.forwardRef(({className:e,...t},n)=>v("tr",{ref:n,className:Je("text-sm text-fontcolor-secondary transition-colors data-[state=selected]:bg-muted",e),...t}));Wy.displayName="TableRow";const $y=e.forwardRef(({className:e,...t},n)=>v("th",{ref:n,className:Je("text-left px-4 align-middle text-[12px] text-[#FFFFFF] font-medium [&:has([role=checkbox])]:pr-0 first:rounded-l-lg last:rounded-r-lg",e),...t}));$y.displayName="TableHead";const By=e.forwardRef(({className:e,...t},n)=>v("td",{ref:n,className:Je("px-4 py-2 align-middle text-[12px] text-[#333333] [&:has([role=checkbox])]:pr-0",e),...t}));By.displayName="TableCell";const qy=e.forwardRef(({className:e,...t},n)=>v("caption",{ref:n,className:Je("mt-4 text-sm text-muted-foreground",e),...t}));function Hy({className:e,...t}){return v("div",{className:Je("animate-pulse rounded-md bg-muted",e),...t})}function Yy({columns:e,rows:t=5}){const n=function(e){return"number"==typeof e?Array.from({length:e},()=>({})):e}(e),o=Array.from({length:t},(e,t)=>"row-".concat(String(t)));return v(b,{children:o.map(e=>v(Wy,{children:n.map((t,n)=>v(By,{className:Je(t.width,t.cellClassName,"px-2 py-2"),children:v(Hy,{className:"block h-4 w-full"})},e.concat("-col-",String(n))))},e))})}qy.displayName="TableCaption";const Vy={Root:jy,Body:Ly,Cell:By,Head:$y,Header:Fy,Row:Wy};function Uy({data:e,columns:t,getRowKey:n,ordering:o,onSort:r,onRowClick:a,isLoading:i,hasMore:s,onLoadMore:l,className:c}){const d=Boolean(i&&0===e.length);return v("div",{className:Je("flex-1 overflow-auto mt-4",c),children:i||0!==e.length?y(jy,{className:"table-auto w-full",children:[v(Fy,{className:"sticky top-0 bg-primary text-white z-10",children:v(Ky,{columns:t,ordering:o,onSort:r})}),y(Ly,{children:[d?v(Yy,{columns:t.map(e=>({width:e.width,cellClassName:e.cellClassName}))}):e.map(e=>v(Gy,{item:e,columns:t,onClick:a?()=>a(e):void 0},n(e))),s&&l&&!d&&v(Wy,{children:v(By,{colSpan:t.length,className:"text-center py-6",children:v(tt,{onClick:l,disabled:i,variant:"outline",children:i?"Carregando...":"Carregar Mais"})})})]})]}):v("div",{className:"py-20",children:v(Iy,{})})})}function Ky({columns:e,ordering:t,onSort:n}){return v(Wy,{children:e.map(e=>{const o=Boolean(e.sortable),r=t===e.key,a=t==="-".concat(e.key),i=r||a;return v($y,{className:Je(e.width,e.className,o?"cursor-pointer":""),onClick:o&&n?()=>n(e.key):void 0,children:y(dt,{direction:"row",gap:1,children:[e.label,o&&i&&v(r?yi:gi,{size:16})]})},e.key)})})}function Gy({item:e,columns:t,onClick:n}){return v(Wy,{className:Je(n?"hover:bg-secondary cursor-pointer":""),onClick:n,children:t.map(t=>{const n=e[t.key];return v(By,{className:Je(t.width,t.cellClassName),children:t.render?t.render(n,e):String(n??"N/D")},t.key)})})}const Zy=()=>{const[e,t]=d(),[n,o]=d(),[r,a]=d(null),i=[{pk:1,description:"Maintenance Task A",created_at:"2023-10-01",status:"Open",user_id:1,username:"admin"},{pk:2,description:"Inspection B",created_at:"2023-10-05",status:"Closed",user_id:2,username:"jdoe"},{pk:3,description:"Repair C",created_at:"2023-10-10",status:"In Progress",user_id:1,username:"admin"},{pk:4,description:"Log Analysis",created_at:"2023-10-15",status:"Open",user_id:3,username:"guest"},{pk:5,description:"System Update",created_at:"2023-11-01",status:"Pending",user_id:2,username:"jdoe"}],s=i.filter(t=>{let o=!0;const a=new Date(t.created_at);return e&&a<e&&(o=!1),n&&a>n&&(o=!1),r&&t.user_id!==Number(r)&&(o=!1),o});return y("div",{className:"flex flex-col gap-6 p-4 border rounded-lg bg-white",children:[v("h2",{className:"text-xl font-bold",children:"Combined Filter & Table Demo"}),y("div",{className:"flex flex-wrap gap-4 items-end",children:[v(nh,{startDate:e,endDate:n,onStartDateChange:t,onEndDateChange:o}),v(dg,{fetcher:async({search:e,modelClass:t,limit:n,offset:o})=>{await new Promise(e=>setTimeout(e,300));const r=[{pk:1,username:"admin"},{pk:2,username:"jdoe"},{pk:3,username:"guest"}];return e?r.filter(t=>t.username.toLowerCase().includes(e.toLowerCase())):r},value:r,onChange:e=>a(e)}),v(tt,{variant:"outline",className:"h-full",onClick:()=>{t(void 0),o(void 0),a(null)},children:"Clear Filters"})]}),v("div",{className:"border rounded-md overflow-hidden",children:y(Vy.Root,{children:[v(Vy.Header,{children:y(Vy.Row,{children:[v(Vy.Head,{children:"ID"}),v(Vy.Head,{children:"Description"}),v(Vy.Head,{children:"Created At"}),v(Vy.Head,{children:"Created By"}),v(Vy.Head,{children:"Status"})]})}),v(Vy.Body,{children:s.length>0?s.map(e=>y(Vy.Row,{children:[v(Vy.Cell,{children:e.pk}),v(Vy.Cell,{children:e.description}),v(Vy.Cell,{children:Wd(new Date(e.created_at),"PPP")}),v(Vy.Cell,{children:e.username}),v(Vy.Cell,{children:e.status})]},e.pk)):v(Vy.Row,{children:v(Vy.Cell,{colSpan:5,children:v(Fc,{title:"No results found",description:"No data was found for the selected filters."})})})})]})}),y("div",{className:"text-xs text-gray-400",children:["Showing ",s.length," of ",i.length," records."]})]})};var Xy="Checkbox",[Qy]=al(Xy),[Jy,eb]=Qy(Xy);function tb(t){const{__scopeCheckbox:n,checked:o,children:r,defaultChecked:a,disabled:i,form:s,name:l,onCheckedChange:c,required:d,value:u="on",internal_do_not_use_render:p}=t,[f,m]=kl({prop:o,defaultProp:a??!1,onChange:c,caller:Xy}),[h,g]=e.useState(null),[y,b]=e.useState(null),x=e.useRef(!1),w=!h||(!!s||!!h.closest("form")),k={checked:f,disabled:i,setChecked:m,control:h,setControl:g,name:l,form:s,value:u,hasConsumerStoppedPropagationRef:x,required:d,defaultChecked:!db(a)&&a,isFormControl:w,bubbleInput:y,setBubbleInput:b};return v(Jy,{scope:n,...k,children:cb(p)?p(k):r})}var nb="CheckboxTrigger",ob=e.forwardRef(({__scopeCheckbox:t,onKeyDown:n,onClick:o,...r},a)=>{const{control:i,value:s,disabled:l,checked:c,required:d,setControl:u,setChecked:p,hasConsumerStoppedPropagationRef:f,isFormControl:m,bubbleInput:h}=eb(nb,t),g=cl(a,u),y=e.useRef(c);return e.useEffect(()=>{const e=i?.form;if(e){const t=()=>p(y.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[i,p]),v(Nl.button,{type:"button",role:"checkbox","aria-checked":db(c)?"mixed":c,"aria-required":d,"data-state":ub(c),"data-disabled":l?"":void 0,disabled:l,value:s,...r,ref:g,onKeyDown:bl(n,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:bl(o,e=>{p(e=>!!db(e)||!e),h&&m&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});ob.displayName=nb;var rb=e.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:o,checked:r,defaultChecked:a,required:i,disabled:s,value:l,onCheckedChange:c,form:d,...u}=e;return v(tb,{__scopeCheckbox:n,checked:r,defaultChecked:a,disabled:s,required:i,onCheckedChange:c,name:o,form:d,value:l,internal_do_not_use_render:({isFormControl:e})=>y(b,{children:[v(ob,{...u,ref:t,__scopeCheckbox:n}),e&&v(lb,{__scopeCheckbox:n})]})})});rb.displayName=Xy;var ab="CheckboxIndicator",ib=e.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:o,...r}=e,a=eb(ab,n);return v(_l,{present:o||db(a.checked)||!0===a.checked,children:v(Nl.span,{"data-state":ub(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});ib.displayName=ab;var sb="CheckboxBubbleInput",lb=e.forwardRef(({__scopeCheckbox:t,...n},o)=>{const{control:r,hasConsumerStoppedPropagationRef:a,checked:i,defaultChecked:s,required:l,disabled:c,name:d,value:u,form:p,bubbleInput:f,setBubbleInput:m}=eb(sb,t),h=cl(o,m),g=sv(i),y=Fg(r);e.useEffect(()=>{const e=f;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set,o=!a.current;if(g!==i&&n){const t=new Event("click",{bubbles:o});e.indeterminate=db(i),n.call(e,!db(i)&&i),e.dispatchEvent(t)}},[f,g,i,a]);const b=e.useRef(!db(i)&&i);return v(Nl.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??b.current,required:l,disabled:c,name:d,value:u,form:p,...n,tabIndex:-1,ref:h,style:{...n.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function cb(e){return"function"==typeof e}function db(e){return"indeterminate"===e}function ub(e){return db(e)?"indeterminate":e?"checked":"unchecked"}lb.displayName=sb;const pb=e.forwardRef(({className:e,...t},n)=>v(rb,{ref:n,className:Je("bg-white peer w-[18px] h-[18px] shrink-0 rounded-md border-gray-300 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:input-data-checked data-[state=checked]:border-none data-[state=checked]:text-primary-foreground",e),...t,children:v(ib,{className:Je("flex items-center justify-center text-current"),children:v(ki,{className:"h-4 w-4"})})}));pb.displayName=rb.displayName;var fb=e.forwardRef((e,t)=>v(Nl.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));fb.displayName="Label";var mb=fb;const hb=L("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),gb=e.forwardRef(({className:e,...t},n)=>v(mb,{ref:n,className:Je(hb(),e),...t}));gb.displayName=mb.displayName;var[vb]=al("Tooltip",[Wg]),yb=Wg(),bb="TooltipProvider",xb=700,wb="tooltip.open",[kb,Nb]=vb(bb),Cb=t=>{const{__scopeTooltip:n,delayDuration:o=xb,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:i}=t,s=e.useRef(!0),l=e.useRef(!1),c=e.useRef(0);return e.useEffect(()=>{const e=c.current;return()=>window.clearTimeout(e)},[]),v(kb,{scope:n,isOpenDelayedRef:s,delayDuration:o,onOpen:e.useCallback(()=>{r<=0||(window.clearTimeout(c.current),s.current=!1)},[r]),onClose:e.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.current=!0,r))},[r]),isPointerInTransitRef:l,onPointerInTransitChange:e.useCallback(e=>{l.current=e},[]),disableHoverableContent:a,children:i})};Cb.displayName=bb;var _b="Tooltip",[Db,Sb]=vb(_b),Eb=t=>{const{__scopeTooltip:n,children:o,open:r,defaultOpen:a,onOpenChange:i,disableHoverableContent:s,delayDuration:l}=t,c=Nb(_b,t.__scopeTooltip),d=yb(n),[u,p]=e.useState(null),f=Ol(),m=e.useRef(0),h=s??c.disableHoverableContent,g=l??c.delayDuration,y=e.useRef(!1),[b,x]=kl({prop:r,defaultProp:a??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(wb))):c.onClose(),i?.(e)},caller:_b}),w=e.useMemo(()=>b?y.current?"delayed-open":"instant-open":"closed",[b]),k=e.useCallback(()=>{window.clearTimeout(m.current),m.current=0,y.current=!1,x(!0)},[x]),N=e.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x(!1)},[x]),C=e.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{y.current=!0,x(!0),m.current=0},g)},[g,x]);return e.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),v(nv,{...d,children:v(Db,{scope:n,contentId:f,open:b,stateAttribute:w,trigger:u,onTriggerChange:p,onTriggerEnter:e.useCallback(()=>{c.isOpenDelayedRef.current?C():k()},[c.isOpenDelayedRef,C,k]),onTriggerLeave:e.useCallback(()=>{h?N():(window.clearTimeout(m.current),m.current=0)},[N,h]),onOpen:k,onClose:N,disableHoverableContent:h,children:o})})};Eb.displayName=_b;var Mb="TooltipTrigger",Ob=e.forwardRef((t,n)=>{const{__scopeTooltip:o,...r}=t,a=Sb(Mb,o),i=Nb(Mb,o),s=yb(o),l=cl(n,e.useRef(null),a.onTriggerChange),c=e.useRef(!1),d=e.useRef(!1),u=e.useCallback(()=>c.current=!1,[]);return e.useEffect(()=>()=>document.removeEventListener("pointerup",u),[u]),v(ov,{asChild:!0,...s,children:v(Nl.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:l,onPointerMove:bl(t.onPointerMove,e=>{"touch"!==e.pointerType&&(d.current||i.isPointerInTransitRef.current||(a.onTriggerEnter(),d.current=!0))}),onPointerLeave:bl(t.onPointerLeave,()=>{a.onTriggerLeave(),d.current=!1}),onPointerDown:bl(t.onPointerDown,()=>{a.open&&a.onClose(),c.current=!0,document.addEventListener("pointerup",u,{once:!0})}),onFocus:bl(t.onFocus,()=>{c.current||a.onOpen()}),onBlur:bl(t.onBlur,a.onClose),onClick:bl(t.onClick,a.onClose)})})});Ob.displayName=Mb;var[Tb,Rb]=vb("TooltipPortal",{forceMount:void 0}),Pb="TooltipContent",Ab=e.forwardRef((e,t)=>{const n=Rb(Pb,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...a}=e,i=Sb(Pb,e.__scopeTooltip);return v(_l,{present:o||i.open,children:i.disableHoverableContent?v(zb,{side:r,...a,ref:t}):v(Ib,{side:r,...a,ref:t})})}),Ib=e.forwardRef((t,n)=>{const o=Sb(Pb,t.__scopeTooltip),r=Nb(Pb,t.__scopeTooltip),a=e.useRef(null),i=cl(n,a),[s,l]=e.useState(null),{trigger:c,onClose:d}=o,u=a.current,{onPointerInTransitChange:p}=r,f=e.useCallback(()=>{l(null),p(!1)},[p]),m=e.useCallback((e,t)=>{const n=e.currentTarget,o={x:e.clientX,y:e.clientY},r=function(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return o}(o,function(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,o,r,a)){case a:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}(o,n.getBoundingClientRect())),a=function(e){const t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),function(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(o.y-n.y)>=(e.y-n.y)*(o.x-n.x)))break;t.pop()}t.push(o)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const o=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(o.y-t.y)>=(e.y-t.y)*(o.x-t.x)))break;n.pop()}n.push(o)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...r,...function(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}(t.getBoundingClientRect())]);l(a),p(!0)},[p]);return e.useEffect(()=>()=>f(),[f]),e.useEffect(()=>{if(c&&u){const e=e=>m(e,u),t=e=>m(e,c);return c.addEventListener("pointerleave",e),u.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),u.removeEventListener("pointerleave",t)}}},[c,u,m,f]),e.useEffect(()=>{if(s){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},o=c?.contains(t)||u?.contains(t),r=!function(e,t){const{x:n,y:o}=e;let r=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){const i=t[e],s=t[a],l=i.x,c=i.y,d=s.x,u=s.y;c>o!=u>o&&n<(d-l)*(o-c)/(u-c)+l&&(r=!r)}return r}(n,s);o?f():r&&(f(),d())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[c,u,s,d,f]),v(zb,{...t,ref:i})}),[jb,Fb]=vb(_b,{isInside:!1}),Lb=function(e){const t=e=>"child"in e?e.children(e.child):e.children;return t.displayName=`${e}.Slottable`,t.__radixId=ul,t}("TooltipContent"),zb=e.forwardRef((t,n)=>{const{__scopeTooltip:o,children:r,"aria-label":a,onEscapeKeyDown:i,onPointerDownOutside:s,...l}=t,c=Sb(Pb,o),d=yb(o),{onClose:u}=c;return e.useEffect(()=>(document.addEventListener(wb,u),()=>document.removeEventListener(wb,u)),[u]),e.useEffect(()=>{if(c.trigger){const e=e=>{e.target instanceof Node&&e.target.contains(c.trigger)&&u()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[c.trigger,u]),v(yg,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:y(rv,{"data-state":c.stateAttribute,...d,...l,ref:n,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[v(Lb,{children:r}),v(jb,{scope:o,isInside:!0,children:v(dv,{id:c.contentId,role:"tooltip",children:a||r})})]})})});Ab.displayName=Pb;var Wb="TooltipArrow";e.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=yb(n);return Fb(Wb,n).isInside?null:v(av,{...r,...o,ref:t})}).displayName=Wb;var $b=Ab;const Bb=Cb,qb=Eb,Hb=Ob,Yb=e.forwardRef(({className:e,sideOffset:t=4,...n},o)=>v($b,{ref:o,sideOffset:t,className:Je("border border-body rounded-md z-50 overflow-hidden bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));Yb.displayName=$b.displayName;const Vb=L("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Ub=e.forwardRef(({className:e,variant:t,...n},o)=>v("div",{ref:o,role:"alert",className:Je(Vb({variant:t}),e),...n}));Ub.displayName="Alert";const Kb=e.forwardRef(({className:e,...t},n)=>v("h5",{ref:n,className:Je("mb-1 font-medium leading-none tracking-tight",e),...t}));Kb.displayName="AlertTitle";const Gb=e.forwardRef(({className:e,...t},n)=>v("div",{ref:n,className:Je("text-sm [&_p]:leading-relaxed",e),...t}));function Zb({...e}){return v("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}function Xb({className:e,...t}){return v("ol",{"data-slot":"breadcrumb-list",className:Je("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",e),...t})}function Qb({className:e,...t}){return v("li",{"data-slot":"breadcrumb-item",className:Je("inline-flex items-center gap-1.5",e),...t})}function Jb({asChild:e,className:t,...n}){return v(e?O:"a",{"data-slot":"breadcrumb-link",className:Je("hover:text-foreground transition-colors",t),...n})}function ex({className:e,...t}){return v("span",{"data-slot":"breadcrumb-page","aria-disabled":"true","aria-current":"page",className:Je("text-foreground font-normal",e),...t})}function tx({children:e,className:t,...n}){return v("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:Je("[&>svg]:size-3.5",t),...n,children:e??v(_i,{})})}function nx({className:e,...t}){return y("span",{"data-slot":"breadcrumb-ellipsis",role:"presentation","aria-hidden":"true",className:Je("flex size-9 items-center justify-center",e),...t,children:[v(Ai,{className:"size-4"}),v("span",{className:"sr-only",children:"More"})]})}Gb.displayName="AlertDescription";var ox="rovingFocusGroup.onEntryFocus",rx={bubbles:!1,cancelable:!0},ax="RovingFocusGroup",[ix,sx,lx]=yl(ax),[cx,dx]=al(ax,[lx]),[ux,px]=cx(ax),fx=e.forwardRef((e,t)=>v(ix.Provider,{scope:e.__scopeRovingFocusGroup,children:v(ix.Slot,{scope:e.__scopeRovingFocusGroup,children:v(mx,{...e,ref:t})})}));fx.displayName=ax;var mx=e.forwardRef((t,n)=>{const{__scopeRovingFocusGroup:o,orientation:r,loop:a=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:u=!1,...p}=t,f=e.useRef(null),m=cl(n,f),h=Ul(i),[g,y]=kl({prop:s,defaultProp:l??null,onChange:c,caller:ax}),[b,x]=e.useState(!1),w=pg(d),k=sx(o),N=e.useRef(!1),[C,_]=e.useState(0);return e.useEffect(()=>{const e=f.current;if(e)return e.addEventListener(ox,w),()=>e.removeEventListener(ox,w)},[w]),v(ux,{scope:o,orientation:r,dir:h,loop:a,currentTabStopId:g,onItemFocus:e.useCallback(e=>y(e),[y]),onItemShiftTab:e.useCallback(()=>x(!0),[]),onFocusableItemAdd:e.useCallback(()=>_(e=>e+1),[]),onFocusableItemRemove:e.useCallback(()=>_(e=>e-1),[]),children:v(Nl.div,{tabIndex:b||0===C?-1:0,"data-orientation":r,...p,ref:m,style:{outline:"none",...t.style},onMouseDown:bl(t.onMouseDown,()=>{N.current=!0}),onFocus:bl(t.onFocus,e=>{const t=!N.current;if(e.target===e.currentTarget&&t&&!b){const t=new CustomEvent(ox,rx);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=k().filter(e=>e.focusable);yx([e.find(e=>e.active),e.find(e=>e.id===g),...e].filter(Boolean).map(e=>e.ref.current),u)}}N.current=!1}),onBlur:bl(t.onBlur,()=>x(!1))})})}),hx="RovingFocusGroupItem",gx=e.forwardRef((t,n)=>{const{__scopeRovingFocusGroup:o,focusable:r=!0,active:a=!1,tabStopId:i,children:s,...l}=t,c=Ol(),d=i||c,u=px(hx,o),p=u.currentTabStopId===d,f=sx(o),{onFocusableItemAdd:m,onFocusableItemRemove:h,currentTabStopId:g}=u;return e.useEffect(()=>{if(r)return m(),()=>h()},[r,m,h]),v(ix.ItemSlot,{scope:o,id:d,focusable:r,active:a,children:v(Nl.span,{tabIndex:p?0:-1,"data-orientation":u.orientation,...l,ref:n,onMouseDown:bl(t.onMouseDown,e=>{r?u.onItemFocus(d):e.preventDefault()}),onFocus:bl(t.onFocus,()=>u.onItemFocus(d)),onKeyDown:bl(t.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const o=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(o)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(o)?void 0:vx[o]}(e,u.orientation,u.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let r=f().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)r.reverse();else if("prev"===t||"next"===t){"prev"===t&&r.reverse();const a=r.indexOf(e.currentTarget);r=u.loop?(o=a+1,(n=r).map((e,t)=>n[(o+t)%n.length])):r.slice(a+1)}setTimeout(()=>yx(r))}var n,o}),children:"function"==typeof s?s({isCurrentTabStop:p,hasTabStop:null!=g}):s})})});gx.displayName=hx;var vx={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function yx(e,t=!1){const n=document.activeElement;for(const o of e){if(o===n)return;if(o.focus({preventScroll:t}),document.activeElement!==n)return}}var bx=fx,xx=gx,wx=["Enter"," "],kx=["ArrowUp","PageDown","End"],Nx=["ArrowDown","PageUp","Home",...kx],Cx={ltr:[...wx,"ArrowRight"],rtl:[...wx,"ArrowLeft"]},_x={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Dx="Menu",[Sx,Ex,Mx]=yl(Dx),[Ox,Tx]=al(Dx,[Mx,Wg,dx]),Rx=Wg(),Px=dx(),[Ax,Ix]=Ox(Dx),[jx,Fx]=Ox(Dx),Lx=t=>{const{__scopeMenu:n,open:o=!1,children:r,dir:a,onOpenChange:i,modal:s=!0}=t,l=Rx(n),[c,d]=e.useState(null),u=e.useRef(!1),p=pg(i),f=Ul(a);return e.useEffect(()=>{const e=()=>{u.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),e.useEffect(()=>{if(!o)return;const e=()=>p(!1);return window.addEventListener("blur",e),()=>window.removeEventListener("blur",e)},[o,p]),v(nv,{...l,children:v(Ax,{scope:n,open:o,onOpenChange:p,content:c,onContentChange:d,children:v(jx,{scope:n,onClose:e.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:u,dir:f,modal:s,children:r})})})};Lx.displayName=Dx;var zx=e.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Rx(n);return v(ov,{...r,...o,ref:t})});zx.displayName="MenuAnchor";var Wx="MenuPortal",[$x,Bx]=Ox(Wx,{forceMount:void 0}),qx=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,a=Ix(Wx,t);return v($x,{scope:t,forceMount:n,children:v(_l,{present:n||a.open,children:v(iv,{asChild:!0,container:r,children:o})})})};qx.displayName=Wx;var Hx="MenuContent",[Yx,Vx]=Ox(Hx),Ux=e.forwardRef((e,t)=>{const n=Bx(Hx,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,a=Ix(Hx,e.__scopeMenu),i=Fx(Hx,e.__scopeMenu);return v(Sx.Provider,{scope:e.__scopeMenu,children:v(_l,{present:o||a.open,children:v(Sx.Slot,{scope:e.__scopeMenu,children:i.modal?v(Kx,{...r,ref:t}):v(Gx,{...r,ref:t})})})})}),Kx=e.forwardRef((t,n)=>{const o=Ix(Hx,t.__scopeMenu),r=e.useRef(null),a=cl(n,r);return e.useEffect(()=>{const e=r.current;if(e)return Nr(e)},[]),v(Xx,{...t,ref:a,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:bl(t.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),Gx=e.forwardRef((e,t)=>{const n=Ix(Hx,e.__scopeMenu);return v(Xx,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Zx=dl("MenuContent.ScrollLock"),Xx=e.forwardRef((t,n)=>{const{__scopeMenu:o,loop:r=!1,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:d,onPointerDownOutside:u,onFocusOutside:p,onInteractOutside:f,onDismiss:m,disableOutsideScroll:h,...g}=t,y=Ix(Hx,o),b=Fx(Hx,o),x=Rx(o),w=Px(o),k=Ex(o),[N,C]=e.useState(null),_=e.useRef(null),D=cl(n,_,y.onContentChange),S=e.useRef(0),E=e.useRef(""),M=e.useRef(0),O=e.useRef(null),T=e.useRef("right"),R=e.useRef(0),P=h?gr:e.Fragment,A=h?{as:Zx,allowPinchZoom:!0}:void 0,I=e=>{const t=E.current+e,n=k().filter(e=>!e.disabled),o=document.activeElement,r=n.find(e=>e.ref.current===o)?.textValue,a=function(e,t,n){const o=t.length>1&&Array.from(t).every(e=>e===t[0]),r=o?t[0]:t,a=n?e.indexOf(n):-1;let i=(s=e,l=Math.max(a,0),s.map((e,t)=>s[(l+t)%s.length]));var s,l;1===r.length&&(i=i.filter(e=>e!==n));const c=i.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return c!==n?c:void 0}(n.map(e=>e.textValue),t,r),i=n.find(e=>e.textValue===a)?.ref.current;!function e(t){E.current=t,window.clearTimeout(S.current),""!==t&&(S.current=window.setTimeout(()=>e(""),1e3))}(t),i&&setTimeout(()=>i.focus())};e.useEffect(()=>()=>window.clearTimeout(S.current),[]),Ng();const j=e.useCallback(e=>T.current===O.current?.side&&function(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return function(e,t){const{x:n,y:o}=e;let r=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){const i=t[e],s=t[a],l=i.x,c=i.y,d=s.x,u=s.y;c>o!=u>o&&n<(d-l)*(o-c)/(u-c)+l&&(r=!r)}return r}(n,t)}(e,O.current?.area),[]);return v(Yx,{scope:o,searchRef:E,onItemEnter:e.useCallback(e=>{j(e)&&e.preventDefault()},[j]),onItemLeave:e.useCallback(e=>{j(e)||(_.current?.focus(),C(null))},[j]),onTriggerLeave:e.useCallback(e=>{j(e)&&e.preventDefault()},[j]),pointerGraceTimerRef:M,onPointerGraceIntentChange:e.useCallback(e=>{O.current=e},[]),children:v(P,{...A,children:v(Eg,{asChild:!0,trapped:a,onMountAutoFocus:bl(i,e=>{e.preventDefault(),_.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:v(yg,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:u,onFocusOutside:p,onInteractOutside:f,onDismiss:m,children:v(bx,{asChild:!0,...w,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:N,onCurrentTabStopIdChange:C,onEntryFocus:bl(c,e=>{b.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:v(rv,{role:"menu","aria-orientation":"vertical","data-state":_w(y.open),"data-radix-menu-content":"",dir:b.dir,...x,...g,ref:D,style:{outline:"none",...g.style},onKeyDown:bl(g.onKeyDown,e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,o=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&o&&I(e.key));const r=_.current;if(e.target!==r)return;if(!Nx.includes(e.key))return;e.preventDefault();const a=k().filter(e=>!e.disabled).map(e=>e.ref.current);kx.includes(e.key)&&a.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(a)}),onBlur:bl(t.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(S.current),E.current="")}),onPointerMove:bl(t.onPointerMove,Ew(e=>{const t=e.target,n=R.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>R.current?"right":"left";T.current=t,R.current=e.clientX}}))})})})})})})});Ux.displayName=Hx;var Qx=e.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return v(Nl.div,{role:"group",...o,ref:t})});Qx.displayName="MenuGroup";var Jx=e.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return v(Nl.div,{...o,ref:t})});Jx.displayName="MenuLabel";var ew="MenuItem",tw="menu.itemSelect",nw=e.forwardRef((t,n)=>{const{disabled:o=!1,onSelect:r,...a}=t,i=e.useRef(null),s=Fx(ew,t.__scopeMenu),l=Vx(ew,t.__scopeMenu),c=cl(n,i),d=e.useRef(!1);return v(ow,{...a,ref:c,disabled:o,onClick:bl(t.onClick,()=>{const e=i.current;if(!o&&e){const t=new CustomEvent(tw,{bubbles:!0,cancelable:!0});e.addEventListener(tw,e=>r?.(e),{once:!0}),Cl(e,t),t.defaultPrevented?d.current=!1:s.onClose()}}),onPointerDown:e=>{t.onPointerDown?.(e),d.current=!0},onPointerUp:bl(t.onPointerUp,e=>{d.current||e.currentTarget?.click()}),onKeyDown:bl(t.onKeyDown,e=>{const t=""!==l.searchRef.current;o||t&&" "===e.key||wx.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});nw.displayName=ew;var ow=e.forwardRef((t,n)=>{const{__scopeMenu:o,disabled:r=!1,textValue:a,...i}=t,s=Vx(ew,o),l=Px(o),c=e.useRef(null),d=cl(n,c),[u,p]=e.useState(!1),[f,m]=e.useState("");return e.useEffect(()=>{const e=c.current;e&&m((e.textContent??"").trim())},[i.children]),v(Sx.ItemSlot,{scope:o,disabled:r,textValue:a??f,children:v(xx,{asChild:!0,...l,focusable:!r,children:v(Nl.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:d,onPointerMove:bl(t.onPointerMove,Ew(e=>{if(r)s.onItemLeave(e);else if(s.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}})),onPointerLeave:bl(t.onPointerLeave,Ew(e=>s.onItemLeave(e))),onFocus:bl(t.onFocus,()=>p(!0)),onBlur:bl(t.onBlur,()=>p(!1))})})})}),rw=e.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return v(pw,{scope:e.__scopeMenu,checked:n,children:v(nw,{role:"menuitemcheckbox","aria-checked":Dw(n)?"mixed":n,...r,ref:t,"data-state":Sw(n),onSelect:bl(r.onSelect,()=>o?.(!!Dw(n)||!n),{checkForDefaultPrevented:!1})})})});rw.displayName="MenuCheckboxItem";var aw="MenuRadioGroup",[iw,sw]=Ox(aw,{value:void 0,onValueChange:()=>{}}),lw=e.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,a=pg(o);return v(iw,{scope:e.__scopeMenu,value:n,onValueChange:a,children:v(Qx,{...r,ref:t})})});lw.displayName=aw;var cw="MenuRadioItem",dw=e.forwardRef((e,t)=>{const{value:n,...o}=e,r=sw(cw,e.__scopeMenu),a=n===r.value;return v(pw,{scope:e.__scopeMenu,checked:a,children:v(nw,{role:"menuitemradio","aria-checked":a,...o,ref:t,"data-state":Sw(a),onSelect:bl(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});dw.displayName=cw;var uw="MenuItemIndicator",[pw,fw]=Ox(uw,{checked:!1}),mw=e.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,a=fw(uw,n);return v(_l,{present:o||Dw(a.checked)||!0===a.checked,children:v(Nl.span,{...r,ref:t,"data-state":Sw(a.checked)})})});mw.displayName=uw;var hw=e.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return v(Nl.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});hw.displayName="MenuSeparator";var gw=e.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Rx(n);return v(av,{...r,...o,ref:t})});gw.displayName="MenuArrow";var vw="MenuSub",[yw,bw]=Ox(vw),xw=t=>{const{__scopeMenu:n,children:o,open:r=!1,onOpenChange:a}=t,i=Ix(vw,n),s=Rx(n),[l,c]=e.useState(null),[d,u]=e.useState(null),p=pg(a);return e.useEffect(()=>(!1===i.open&&p(!1),()=>p(!1)),[i.open,p]),v(nv,{...s,children:v(Ax,{scope:n,open:r,onOpenChange:p,content:d,onContentChange:u,children:v(yw,{scope:n,contentId:Ol(),triggerId:Ol(),trigger:l,onTriggerChange:c,children:o})})})};xw.displayName=vw;var ww="MenuSubTrigger",kw=e.forwardRef((t,n)=>{const o=Ix(ww,t.__scopeMenu),r=Fx(ww,t.__scopeMenu),a=bw(ww,t.__scopeMenu),i=Vx(ww,t.__scopeMenu),s=e.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=i,d={__scopeMenu:t.__scopeMenu},u=e.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return e.useEffect(()=>u,[u]),e.useEffect(()=>{const e=l.current;return()=>{window.clearTimeout(e),c(null)}},[l,c]),v(zx,{asChild:!0,...d,children:v(ow,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?a.contentId:void 0,"data-state":_w(o.open),...t,ref:ll(n,a.onTriggerChange),onClick:e=>{t.onClick?.(e),t.disabled||e.defaultPrevented||(e.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:bl(t.onPointerMove,Ew(e=>{i.onItemEnter(e),e.defaultPrevented||t.disabled||o.open||s.current||(i.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{o.onOpenChange(!0),u()},100))})),onPointerLeave:bl(t.onPointerLeave,Ew(e=>{u();const t=o.content?.getBoundingClientRect();if(t){const n=o.content?.dataset.side,r="right"===n,a=r?-5:5,s=t[r?"left":"right"],c=t[r?"right":"left"];i.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:s,y:t.top},{x:c,y:t.top},{x:c,y:t.bottom},{x:s,y:t.bottom}],side:n}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(e),e.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:bl(t.onKeyDown,e=>{const n=""!==i.searchRef.current;t.disabled||n&&" "===e.key||Cx[r.dir].includes(e.key)&&(o.onOpenChange(!0),o.content?.focus(),e.preventDefault())})})})});kw.displayName=ww;var Nw="MenuSubContent",Cw=e.forwardRef((t,n)=>{const o=Bx(Hx,t.__scopeMenu),{forceMount:r=o.forceMount,align:a="start",...i}=t,s=Ix(Hx,t.__scopeMenu),l=Fx(Hx,t.__scopeMenu),c=bw(Nw,t.__scopeMenu),d=e.useRef(null),u=cl(n,d);return v(Sx.Provider,{scope:t.__scopeMenu,children:v(_l,{present:r||s.open,children:v(Sx.Slot,{scope:t.__scopeMenu,children:v(Xx,{id:c.contentId,"aria-labelledby":c.triggerId,...i,ref:u,align:a,side:"rtl"===l.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{l.isUsingKeyboardRef.current&&d.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:bl(t.onFocusOutside,e=>{e.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:bl(t.onEscapeKeyDown,e=>{l.onClose(),e.preventDefault()}),onKeyDown:bl(t.onKeyDown,e=>{const t=e.currentTarget.contains(e.target),n=_x[l.dir].includes(e.key);t&&n&&(s.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});function _w(e){return e?"open":"closed"}function Dw(e){return"indeterminate"===e}function Sw(e){return Dw(e)?"indeterminate":e?"checked":"unchecked"}function Ew(e){return t=>"mouse"===t.pointerType?e(t):void 0}Cw.displayName=Nw;var Mw=Lx,Ow=zx,Tw=qx,Rw=Ux,Pw=Qx,Aw=Jx,Iw=nw,jw=rw,Fw=lw,Lw=dw,zw=mw,Ww=hw,$w=gw,Bw=xw,qw=kw,Hw=Cw,Yw="DropdownMenu",[Vw]=al(Yw,[Tx]),Uw=Tx(),[Kw,Gw]=Vw(Yw),Zw=t=>{const{__scopeDropdownMenu:n,children:o,dir:r,open:a,defaultOpen:i,onOpenChange:s,modal:l=!0}=t,c=Uw(n),d=e.useRef(null),[u,p]=kl({prop:a,defaultProp:i??!1,onChange:s,caller:Yw});return v(Kw,{scope:n,triggerId:Ol(),triggerRef:d,contentId:Ol(),open:u,onOpenChange:p,onOpenToggle:e.useCallback(()=>p(e=>!e),[p]),modal:l,children:v(Mw,{...c,open:u,onOpenChange:p,dir:r,modal:l,children:o})})};Zw.displayName=Yw;var Xw="DropdownMenuTrigger",Qw=e.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,a=Gw(Xw,n),i=Uw(n);return v(Ow,{asChild:!0,...i,children:v(Nl.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:ll(t,a.triggerRef),onPointerDown:bl(e.onPointerDown,e=>{o||0!==e.button||!1!==e.ctrlKey||(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:bl(e.onKeyDown,e=>{o||(["Enter"," "].includes(e.key)&&a.onOpenToggle(),"ArrowDown"===e.key&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});Qw.displayName=Xw;var Jw=e=>{const{__scopeDropdownMenu:t,...n}=e,o=Uw(t);return v(Tw,{...o,...n})};Jw.displayName="DropdownMenuPortal";var ek="DropdownMenuContent",tk=e.forwardRef((t,n)=>{const{__scopeDropdownMenu:o,...r}=t,a=Gw(ek,o),i=Uw(o),s=e.useRef(!1);return v(Rw,{id:a.contentId,"aria-labelledby":a.triggerId,...i,...r,ref:n,onCloseAutoFocus:bl(t.onCloseAutoFocus,e=>{s.current||a.triggerRef.current?.focus(),s.current=!1,e.preventDefault()}),onInteractOutside:bl(t.onInteractOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,o=2===t.button||n;a.modal&&!o||(s.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});tk.displayName=ek;var nk=e.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Uw(n);return v(Pw,{...r,...o,ref:t})});nk.displayName="DropdownMenuGroup";var ok=e.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Uw(n);return v(Aw,{...r,...o,ref:t})});ok.displayName="DropdownMenuLabel";var rk=e.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Uw(n);return v(Iw,{...r,...o,ref:t})});rk.displayName="DropdownMenuItem";var ak=e.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Uw(n);return v(jw,{...r,...o,ref:t})});ak.displayName="DropdownMenuCheckboxItem";var ik=e.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Uw(n);return v(Fw,{...r,...o,ref:t})});ik.displayName="DropdownMenuRadioGroup";var sk=e.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Uw(n);return v(Lw,{...r,...o,ref:t})});sk.displayName="DropdownMenuRadioItem";var lk=e.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Uw(n);return v(zw,{...r,...o,ref:t})});lk.displayName="DropdownMenuItemIndicator";var ck=e.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Uw(n);return v(Ww,{...r,...o,ref:t})});ck.displayName="DropdownMenuSeparator";e.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Uw(n);return v($w,{...r,...o,ref:t})}).displayName="DropdownMenuArrow";var dk=e.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Uw(n);return v(qw,{...r,...o,ref:t})});dk.displayName="DropdownMenuSubTrigger";var uk=e.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Uw(n);return v(Hw,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});uk.displayName="DropdownMenuSubContent";var pk=Jw,fk=tk,mk=ok,hk=rk,gk=ak,vk=sk,yk=lk,bk=ck,xk=dk,wk=uk;const kk=Zw,Nk=Qw,Ck=nk,_k=pk,Dk=e=>{const{__scopeDropdownMenu:t,children:n,open:o,onOpenChange:r,defaultOpen:a}=e,i=Uw(t),[s,l]=kl({prop:o,defaultProp:a??!1,onChange:r,caller:"DropdownMenuSub"});return v(Bw,{...i,open:s,onOpenChange:l,children:n})},Sk=ik,Ek=e.forwardRef(({className:e,inset:t,children:n,...o},r)=>y(xk,{ref:r,className:Je("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...o,children:[n,v(_i,{className:"ml-auto h-4 w-4"})]}));Ek.displayName=xk.displayName;const Mk=e.forwardRef(({className:e,...t},n)=>v(wk,{ref:n,className:Je("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Mk.displayName=wk.displayName;const Ok=e.forwardRef(({className:e,sideOffset:t=4,...n},o)=>v(pk,{children:v(fk,{ref:o,sideOffset:t,className:Je("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Ok.displayName=fk.displayName;const Tk=e.forwardRef(({className:e,inset:t,...n},o)=>v(hk,{ref:o,className:Je("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));Tk.displayName=hk.displayName;const Rk=e.forwardRef(({className:e,children:t,checked:n,...o},r)=>y(gk,{ref:r,className:Je("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...o,children:[v("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:v(yk,{children:v(ki,{className:"h-4 w-4"})})}),t]}));Rk.displayName=gk.displayName;const Pk=e.forwardRef(({className:e,children:t,...n},o)=>y(vk,{ref:o,className:Je("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[v("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:v(yk,{children:v(Mi,{className:"h-2 w-2 fill-current"})})}),t]}));Pk.displayName=vk.displayName;const Ak=e.forwardRef(({className:e,inset:t,...n},o)=>v(mk,{ref:o,className:Je("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Ak.displayName=mk.displayName;const Ik=e.forwardRef(({className:e,...t},n)=>v(bk,{ref:n,className:Je("-mx-1 my-1 h-px bg-muted",e),...t}));Ik.displayName=bk.displayName;const jk=({className:e,...t})=>v("span",{className:Je("ml-auto text-xs tracking-widest opacity-60",e),...t});jk.displayName="DropdownMenuShortcut";const Fk=e.forwardRef(({className:e,...t},n)=>v("input",{type:"radio",className:Je("h-4 w-4 cursor-pointer accent-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));Fk.displayName="Radio";const Lk=({size:e=8})=>y("output",{children:[y("svg",{width:4*e,height:4*e,viewBox:"0 0 78 78",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"animate-spin",role:"img","aria-labelledby":"spinnerTitle",children:[v("title",{id:"spinnerTitle",children:"Loading..."}),v("path",{d:"M13.2131 9.74186C7.6162 14.6748 3.55158 21.1095 1.50144 28.2828L9.89497 30.6817C11.4862 25.114 14.641 20.1196 18.9852 16.2909L13.2131 9.74186Z",fill:"#0d406e"}),v("path",{d:"M55.2865 74.4365C62.0653 71.321 67.8083 66.3265 71.8342 60.0455L64.4847 55.3347C61.36 60.2099 56.9025 64.0864 51.641 66.5046L55.2865 74.4365Z",fill:"#0d406e"}),v("path",{d:"M71.8342 60.0455C75.8601 53.7645 78 46.4605 78 39H69.2704C69.2704 44.7906 67.6095 50.4596 64.4847 55.3347L71.8342 60.0455Z",fill:"#0d406e"}),v("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.2131 9.74186C20.1094 4.11892 24.5245 2.24347 33.0785 0.452148C25.7044 1.58491 18.8101 4.80896 13.2131 9.74186Z",fill:"#0d406e"}),v("path",{d:"M33.5891 77.6228C40.9774 78.6579 48.5077 77.5521 55.2865 74.4365L51.641 66.5046C46.3795 68.9227 40.5348 69.781 34.8002 68.9776L33.5891 77.6228Z",fill:"#0d406e"}),v("path",{d:"M13.6026 68.5968C19.2643 73.4552 26.2007 76.5877 33.5891 77.6228L34.8002 68.9776C29.0657 68.1742 23.6818 65.7429 19.2874 61.9719L13.6026 68.5968Z",fill:"#0d406e"}),v("path",{d:"M1.50144 28.2828C-0.548705 35.4561 -0.498346 43.0669 1.64654 50.2124L10.0076 47.7027C8.34281 42.1566 8.30373 36.2493 9.89497 30.6817L1.50144 28.2828Z",fill:"#0d406e"}),v("path",{d:"M1.64654 50.2124C3.79143 57.358 7.94084 63.7384 13.6026 68.5968L19.2874 61.9719C14.893 58.201 11.6724 53.2488 10.0076 47.7027L1.64654 50.2124Z",fill:"#0d406e"}),v("path",{d:"M34.4039 9.08055L33.0785 0.452148C24.5245 2.24347 20.1094 4.11892 13.2131 9.74186L18.9852 16.2909C23.3293 12.4621 28.6805 9.95976 34.4039 9.08055Z",fill:"#0d406e"})]}),v("span",{className:"sr-only",children:"Loading..."})]}),zk=({error:e})=>v(b,{children:e&&v("span",{className:"text-red-500 text-xs",children:e?.message})}),Wk=({message:e,error:t})=>{const[n,o]=d(!1),r=JSON.stringify(t,null,2);return y(dt,{children:[v("p",{children:e}),v(Dc,{type:"single",collapsible:!0,className:"max-w-60",children:y(Sc,{value:"error-details",className:"border-none",children:[v(Ec,{className:"text-sm py-2 hover:no-underline text-red-100",children:"View Error Details"}),v(Mc,{children:v("pre",{className:"text-xs bg-red-950 p-3 rounded overflow-x-auto max-h-40 overflow-y-auto",children:v("code",{className:"text-red-100",children:r})})})]})}),v("button",{type:"button",onClick:()=>{const e=JSON.stringify(t,null,2);navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)},className:"flex items-center justify-center gap-2 px-3 py-2 bg-red-600 hover:bg-red-700 text-white text-xs font-medium rounded transition-colors",children:y(b,n?{children:[v(ki,{size:14}),v("span",{children:"Copied!"})]}:{children:[v(Ri,{size:14}),v("span",{children:"Copy Error JSON"})]})})]})};function $k({data:e}){return v(dt,{direction:"row",gap:2,className:"flex-wrap",children:Object.entries(e).map(([e,t])=>v(dt,{direction:"row",gap:1,className:"bg-muted px-3 py-1.5 rounded-md text-sm",children:y("span",{className:"font-medium text-foreground",children:[e," : ",String(t)]})},e))})}function Bk({icon:e,title:t,description:n,variant:o="default",className:r}){return y(Ub,{variant:o,className:r??"w-auto h-auto m-4",children:[e,v(Kb,{children:t}),v(Gb,{children:n})]})}const qk=({href:e,className:t,children:n})=>v("a",{href:e,className:t,children:n});function Hk({onLogin:e,onSuccess:t,onError:n,sessionExpired:o=!1,sessionExpiredAlert:r,forgotPasswordHref:a="/",forgotPasswordLabel:i="Esqueci a senha",usernameLabel:s="Usuario",passwordLabel:l="Senha",submitLabel:c="Entrar",loginErrorMessage:u="Login error!",LinkComponent:p=qk,className:f}){const[m,h]=d(""),[g,b]=d(""),[x,w]=d(!1);return y(dt,{gap:4,children:[o&&r?.icon&&v(Bk,{variant:"destructive",icon:r.icon,title:r.title??"Sessão expirada",description:r.description??"Faça login novamente para continuar"}),y(Ja,{className:f??"bg-white w-[400px] h-[457px] rounded-[30px] shadow-lg",children:[v(ei,{className:"items-center"}),v(oi,{children:v("form",{onSubmit:e=>e.preventDefault(),children:y("div",{className:"grid w-full items-center gap-4 mt-6",children:[y(dt,{gap:4,children:[v(gb,{className:"text-primary",htmlFor:"username",children:s}),v(lt,{id:"username",type:"text",placeholder:"Seu nome de usuário",value:m,onChange:e=>h(e.target.value)})]}),y(dt,{gap:4,children:[v(gb,{className:"text-primary",htmlFor:"password",children:l}),v(lt,{id:"password",type:"password",placeholder:"Sua senha de acesso",value:g,onChange:e=>b(e.target.value)})]})]})})}),v(ri,{className:"justify-center items-center",children:y(dt,{gap:4,className:"justify-center items-center mt-10",children:[v(tt,{className:"w-full",onClick:async()=>{w(!0);try{const{error:o}=await e({username:m,password:g});if(o)return void n?.(u,String(o));t?.()}finally{w(!1)}},disabled:x,children:c}),v(p,{href:a,className:"text-primary text-xs",children:i})]})})]})]})}const Yk=({href:e,className:t,children:n})=>v("a",{href:e,className:t,children:n});function Vk({onLoginSSO:e,onRedirect:t,onError:n,sessionExpired:o=!1,sessionExpiredAlert:r,forgotPasswordHref:a="/",forgotPasswordLabel:i="Esqueci a senha",emailLabel:s="Email",submitLabel:l="Entrar com SSO",unauthorizedMessage:c="Usuario nao autorizado",genericErrorMessage:u="Erro ao fazer login",LinkComponent:p=Yk,className:f}){const[m,h]=d(""),[g,b]=d(!1);return y(dt,{gap:4,children:[o&&r?.icon&&v(Bk,{variant:"destructive",icon:r.icon,title:r.title??"Sessão expirada",description:r.description??"Faça login novamente para continuar"}),y(Ja,{className:f??"bg-white w-[400px] h-[457px] rounded-[30px] shadow-lg",children:[v(ei,{className:"items-center mt-4"}),v(oi,{children:v("form",{onSubmit:async o=>{o.preventDefault(),b(!0);try{const{redirect_url:o,error:r}=await e(m);if(o)return void t?.(o);const a=r?.includes("401")?c:u;n?.(a,String(r))}finally{b(!1)}},children:y("div",{className:"grid w-full items-center gap-4 mt-6",children:[y(dt,{gap:4,children:[v(gb,{className:"text-primary",htmlFor:"email",children:s}),v(lt,{id:"email",type:"email",placeholder:"Seu email de acesso",value:m,onChange:e=>h(e.target.value),pattern:"^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}$",required:!0})]}),v(tt,{className:"w-full",type:"submit",disabled:g,children:l})]})})}),v(ri,{className:"flex-col justify-center items-center",children:v(dt,{gap:4,className:"justify-start items-center mb-7",children:v(p,{href:a,className:"text-primary text-xs",children:i})})})]})]})}const Uk=({href:e,className:t,children:n})=>v("a",{href:e,className:t,children:n});function Kk({redirectHref:e,redirectDelayMs:t=3e3,onRedirect:n,title:o="Autenticado com sucesso! Redirecionado automaticamente",fallbackLinkLabel:r="Caso nao seja redirecionado automaticamente, clique aqui",LinkComponent:a=Uk,className:s}){return i(()=>{const o=setTimeout(()=>{n?.(e)},t);return()=>clearTimeout(o)},[e,t,n]),v("div",{className:"flex justify-center items-center h-screen",children:y(Ja,{className:s??"bg-white w-[400px] h-[457px] rounded-[30px] shadow-lg",children:[v(ei,{className:"items-center mt-4"}),y(oi,{className:"flex flex-col gap-4",children:[v(Lk,{}),v("h4",{className:"text-center",children:o}),v(a,{href:e,className:"w-full text-sm underline text-accent text-center",children:r})]})]})})}const Gk=({href:e,className:t,children:n})=>v("a",{href:e,className:t,children:n});function Zk({error:e,loginHref:t,title:n="Erro ao autenticar!",description:o="Verifique suas informações de SSO ou converse com o administrador do sistema.",fallbackLinkLabel:r="Caso não seja redirecionado automaticamente, clique aqui",errorDetailsLabel:a="Detalhes para os Nerds",copyLabel:i="Copiar",copiedLabel:s="Copiado!",LinkComponent:l=Gk,className:c}){const[u,p]=d(!1),f="string"==typeof e?e:JSON.stringify(e,null,2);return v(dt,{className:"justify-center items-center h-screen",children:y(Ja,{className:c??"w-[400px] h-[457px] rounded-[30px] shadow-lg bg-red-50",children:[v(ei,{className:"items-center"}),y(oi,{className:"flex flex-col items-center gap-2",children:[v(Ei,{size:48,className:"text-red-700"}),v("h4",{className:"text-center",children:n}),v("p",{className:"text-sm text-center",children:o}),v(l,{href:t,className:"w-full text-sm underline text-accent text-center",children:r}),v(Dc,{type:"single",collapsible:!0,className:"w-full",children:y(Sc,{value:"error-details",children:[v(Ec,{children:a}),y(Mc,{className:"max-w-80",children:[v("div",{className:"flex justify-end mb-1",children:v("button",{type:"button",onClick:async()=>{if(e)try{await navigator.clipboard.writeText("string"==typeof e?e:JSON.stringify(e,null,2)),p(!0),setTimeout(()=>p(!1),2e3)}catch(e){console.error("Failed to copy:",e)}},className:"text-xs text-accent hover:underline flex items-center gap-1",children:y(b,u?{children:[v(ki,{size:14,className:"text-green-600"})," ",s]}:{children:[v(Oi,{size:14})," ",i]})})}),v("div",{className:"max-h-24 overflow-y-auto overflow-x-hidden",children:v("pre",{className:"bg-gray-100 p-4 rounded-md",children:v("code",{className:"text-sm text-red-600 dark:text-red-400 whitespace-pre-wrap break-words",children:f})})})]})]})})]})]})})}const Xk={created_at:"Criado em",start_processing_at:"Início do Processamento",finished_processing_at:"Fim do Processamento",field_delimiter:"Delimitador de Campo",decimal_delimiter:"Delimitador Decimal",ignore_locked:"Ignorar Bloqueados",lock_data:"Bloquear Dados",origin:"Origem",format_type:"Tipo de Formato",process_status:"Status",description:"Descrição",row_permission:"Row Permission",created_by:"Created By",modeling_unit:"Modeling Unit",attribute:"Attribute",geoarea:"Geoarea"},Qk=e=>{if(!e)return"";return new Date(e).toLocaleString("pt-BR",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})},Jk=(e,t)=>({...Xk,...t}[e]||e.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")),eN=(e,t,n={})=>{if(null==e||""===e)return"N/A";if("process_status"===t&&n.statusLabels)return n.statusLabels[String(e)]??String(e);if(t.endsWith("_at")||t.includes("date")||t.includes("_time")){return(n.formatDate??Qk)(String(e))||"N/A"}if("boolean"==typeof e){const t=n.booleanLabels??{true:"Sim",false:"Não"};return e?t.true:t.false}return"object"==typeof e?"N/A":String(e)},tN=(e,t)=>{const n=e[t];return n&&"object"==typeof n&&null!==n&&"__display_field__"in n?n.__display_field__:n},nN=["description","notes"],oN=[{title:"Informações Gerais",fields:["description","row_permission","origin","created_by","process_status","msg"],cols:4},{title:"Datas de Processamento",fields:["created_at","start_processing_at","finished_processing_at"],cols:3},{title:"Proteção dos Dados",fields:["ignore_locked","lock_data"],cols:4},{title:"Carregamento Manual",fields:["format_type","field_delimiter","decimal_delimiter","modeling_unit","attribute","geoarea"],cols:4}];function rN({data:e,config:t,formatters:n,wrapperElements:o,statusLabels:r,formatDate:a}){const i=t?.sections||oN,s={statusLabels:r,formatDate:a},l=r=>{if(!(r in e))return null;const a=t?.labels?.[r]||Jk(r,t?.labels),i=(n||[]).find(e=>e.key===r)?.formatter||t?.formatters?.[r],l=tN(e,r),c=i?i(l):eN(l,r,s),d=nN.includes(r),u=o?.find(e=>e.keys.includes(r));if(u?.element){const t=u.element({key:r,label:a,fieldValue:l,isFullWidth:d,data:e});return v(dt,{direction:"col",className:d?"col-span-full min-w-0":"min-w-0",children:t},r)}return y(dt,{direction:"col",className:d?"col-span-full min-w-0":"min-w-0",children:[v("p",{className:"text-sm font-medium text-muted-foreground",children:a}),v("p",{className:"text-base break-words whitespace-pre-wrap",children:c})]},r)},c=e.results;return y(dt,{direction:"col",gap:6,children:[i.map(t=>{const n=t.fields.filter(t=>t in e);return 0===n.length?null:t.isFullWidth?y(dt,{direction:"col",gap:3,children:[v("h3",{className:"text-sm font-semibold text-foreground",children:t.title}),v("div",{className:"grid grid-cols-1 sm:grid-cols-1 lg:grid-cols-1 xl:grid-cols-1 gap-x-6 gap-y-4",children:n.map(e=>l(e))})]},t.title):y(dt,{direction:"col",gap:3,children:[v("h3",{className:"text-sm font-semibold text-foreground",children:t.title}),v("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-x-6 gap-y-4",children:n.map(e=>l(e))})]},t.title)}),Boolean(e.dimensions&&"object"==typeof e.dimensions&&Object.keys(e.dimensions).length>0)&&y(dt,{direction:"col",gap:3,children:[v("h3",{className:"text-sm font-semibold text-foreground",children:"Tags"}),v($k,{data:e.dimensions})]}),Boolean(e.extra_info&&"object"==typeof e.extra_info&&Object.keys(e.extra_info).length>0)&&y(dt,{direction:"col",gap:3,children:[v("h3",{className:"text-sm font-semibold text-foreground",children:"Informações Extras"}),v($k,{data:e.extra_info})]}),c?.processing_results&&v(Dc,{type:"single",collapsible:!0,children:y(Sc,{value:"processing-results",className:"border-b-0",children:[v(Ec,{className:"text-sm font-semibold text-foreground hover:no-underline py-2",children:"Resultados do Processamento"}),v(Mc,{children:y(dt,{direction:"col",gap:4,children:[v("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-6",children:[{label:"Adicionados",value:c.processing_results.count__added,color:"text-green-600"},{label:"Atualizados",value:c.processing_results.count__updated,color:"text-blue-600"},{label:"Sem Alteração",value:c.processing_results.count__no_change,color:"text-gray-600"}].map(e=>y(dt,{direction:"col",children:[v("p",{className:"text-sm font-medium text-muted-foreground",children:e.label}),v("p",{className:`text-2xl font-bold ${e.color}`,children:e.value})]},e.label))}),c.processing_results.details&&c.processing_results.details.length>0&&y(dt,{direction:"col",gap:2,children:[v("p",{className:"text-sm font-medium text-muted-foreground",children:"Detalhes"}),v(dt,{direction:"col",gap:2,children:c.processing_results.details.map((e,n)=>{const o=`detail-${n}-${Object.values(e).join("-")}`;return v(dt,{className:"border rounded-lg p-3",children:v(dt,{className:"grid grid-cols-4 gap-2",children:Object.entries(e).map(([e,n])=>y(dt,{direction:"col",children:[v("p",{className:"text-xs text-muted-foreground",children:Jk(e,t?.labels)}),v("p",{className:"text-sm font-medium",children:eN(n,e,s)})]},e))})},o)})})]})]})})]})})]})}function aN({title:e,titleAddon:t,isLoading:n=!1,error:o=null,onBack:r,actions:a,sections:i=[],children:s,loadingComponent:l,errorComponent:c,backButtonLabel:d="Voltar"}){return n?l??v(dt,{className:"justify-center items-center p-8",children:v(Lk,{})}):o?c??v(dt,{className:"justify-center items-center p-8",children:v("p",{className:"text-destructive",children:o.message})}):y(dt,{direction:"col",gap:4,children:[y(dt,{direction:"row",gap:4,className:"justify-between items-center",children:[y(dt,{direction:"row",gap:4,className:"items-center",children:[r&&v(tt,{variant:"ghost",size:"icon",onClick:r,title:d,children:v(vi,{className:"size-4"})}),v("h1",{className:"text-2xl font-semibold text-surface-secondary",children:e}),t]}),a&&v(dt,{direction:"row",gap:2,children:a})]}),i.map((e,t)=>{const n=e.id??`section-${t}`;return v(Dc,{type:"single",collapsible:!0,defaultValue:e.defaultOpen?n:void 0,className:"w-full",children:y(Sc,{value:n,className:"border-b",children:[v(Ec,{className:"hover:no-underline text-base font-normal text-surface-secondary",children:e.title}),v(Mc,{className:"pt-4",children:e.content})]})},n)}),s]})}const iN=async(e,{search:t,modelClass:n,labelName:o,additionalFilters:r={},fields:a})=>{const i={...t?{[`${o}__icontains`]:t}:{},...r},s=a?.length?[o,...a]:[],[l,c]=await e(n,i,s);if(c)throw new Error(c.message);return l??[]},sN=(e,t,n={})=>o=>iN(e,{...o,labelName:t,additionalFilters:n.additionalFilters,fields:n.fields});function lN({value:e,onChange:t,placeholder:n,error:o,disabled:a,className:s}){const l=r(null),[c,u]=d(null);return i(()=>{let e=!0;return Promise.all([import("@toast-ui/react-editor"),import("@toast-ui/editor/dist/toastui-editor.css")]).then(([t])=>{e&&u(()=>t.Editor)}),()=>{e=!1}},[]),c?y(dt,{direction:"col",gap:2,className:s??"w-full",children:[v(c,{initialValue:e,placeholder:n,usageStatistics:!1,autofocus:!1,initialEditType:"wysiwyg",previewStyle:"disabled",useCommandShortcut:!0,hideModeSwitch:a,onChange:()=>t(l.current?.getMarkdown()||""),ref:l}),o&&v("p",{className:"text-sm text-destructive",children:o})]}):v(dt,{direction:"col",gap:2,className:s??"w-full min-h-[200px]",children:v("span",{})})}function cN(){return y("div",{className:"flex flex-col items-center justify-center mx-auto",children:[v(Lk,{size:12}),v("p",{className:"mt-2 text-sm text-gray-500",children:"Loading..."})]})}const dN=({children:e,hasError:t,message:n="Um erro inesperado ocorreu."})=>t?v(Ub,{variant:"destructive",className:"my-2",children:n}):v(b,{children:e}),uN=({openDialog:e,setOpenDialog:t,handleDelete:n,count:o})=>{const r=void 0!==o&&o>1;return v(dt,{direction:"row",children:v(qh,{open:e,onOpenChange:t,children:y(Uh,{className:"max-w-[513px] rounded-xl px-8 py-6 gap-4",children:[y(Kh,{children:[v(Zh,{className:"pb-0 border-none",children:r?`Deseja apagar ${o} registros selecionados?`:"Deseja apagar registro atual?"}),v(Xh,{})]}),v("form",{onSubmit:e=>{e.preventDefault(),n()},children:y(dt,{gap:2,children:[v("p",{className:"text-fontcolor-secondary font-medium text-sm",children:r?`Essa ação não poderá ser desfeita e os ${o} registros serão removidos permanentemente. Tem certeza de que deseja continuar?`:"Essa ação não poderá ser desfeita e o registro será removido permanentemente. Tem certeza de que deseja continuar?"}),y(Gh,{className:"mt-4",children:[v(Zr,{asChild:!0,children:v(tt,{variant:"ghost",type:"button",children:"Cancelar"})}),v(tt,{type:"submit",variant:"default",children:r?`Deletar ${o}`:"Deletar"})]})]})})]})})})},pN=({handleClear:e})=>v("button",{type:"button",className:"h-9 p-2 mt-1 text-xs bg-white",onClick:e,children:y(dt,{direction:"row",gap:2,className:"items-center",children:["Limpar filtros ",v(Yi,{size:16})]})}),fN=({triggerClassName:e,className:t,trigger:n,children:o})=>{const r=g();return v(Bb,{children:y(qb,{children:[v(Hb,{asChild:!0,children:v("div",{className:e,children:n})}),v(Yb,{className:t,children:o})]})},r)},mN=({startRecord:e,endRecord:t,hasValidSearchValues:n,tabCount:o,disabledLoadBackButton:r,disabledLoadMoreButton:a,loadBack:i,loadMore:s})=>y("div",{className:"flex items-center gap-2 text-fontcolor-secondary",children:[v("div",{className:"text-sm",children:y("p",{children:[e," - ",t," de"," ",n?t:o]})}),y("div",{className:"h-[32px] flex items-center",children:[v(fN,{className:"bg-zinc-900 text-white",trigger:v(tt,{variant:"ghost",disabled:r,onClick:()=>i(),type:"button",className:"bg-transparent p-0 text-fontcolor-secondary hover:bg-transparent",children:v("div",{className:"w-[32px] h-[32px] bg-transparent flex items-center justify-center cursor-pointer rounded-md hover:bg-tablerow-hoverlink",children:v(Ci,{size:16})})}),children:"Anteriores"}),v(fN,{className:"bg-zinc-900 text-white",trigger:v(tt,{variant:"ghost",disabled:a,onClick:()=>s(),className:"bg-transparent p-0 text-fontcolor-secondary hover:bg-transparent",children:v("div",{className:"w-[32px] h-[32px] bg-transparent flex items-center justify-center cursor-pointer rounded-md hover:bg-tablerow-hoverlink",children:v(_i,{size:16})})}),children:"Próximos"})]})]});function hN({value:e=[],onChange:t,keyPlaceholder:n="Chave",valuePlaceholder:o="Valor",disabled:r=!1}){const[a,i]=d(""),[s,l]=d(""),c=()=>{const n=a.trim(),o=s.trim();if(n&&o){e.some(e=>e.key===n)||(t([...e,{key:n,value:o}]),i(""),l(""))}},u=e=>{"Enter"===e.key&&(e.preventDefault(),c())};return y(dt,{direction:"col",gap:3,children:[y(dt,{direction:"row",gap:2,children:[v(lt,{value:a,onChange:e=>i(e.target.value),onKeyDown:u,placeholder:n,disabled:r,className:"flex-1"}),v(lt,{value:s,onChange:e=>l(e.target.value),onKeyDown:u,placeholder:o,disabled:r,className:"flex-1"}),v(tt,{type:"button",onClick:c,disabled:!a.trim()||!s.trim()||r,variant:"outline",children:"Adicionar"})]}),e.length>0&&v(dt,{direction:"row",gap:2,className:"flex-wrap",children:e.map(n=>y(dt,{direction:"row",gap:1,className:"items-center px-3 py-1 bg-secondary text-secondary-foreground rounded-md text-sm",children:[y("span",{className:"font-medium",children:[n.key,":"]}),v("span",{children:n.value}),v(tt,{type:"button",onClick:()=>{return o=n.key,void t(e.filter(e=>e.key!==o));var o},disabled:r,variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-secondary-foreground/10 rounded-full","aria-label":`Remover tag ${n.key}`,children:v(Yi,{className:"h-3 w-3"})})]},n.key))})]})}const gN=wy,vN={description:"Descrição",code:"Código",notes:"Notas",force_temperature:"Temperatura Forçada",dimensions:"Tags",extra_info:"Informações extras"},yN=(e,t)=>t?.[e]?t[e]:vN[e]?vN[e]:e.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");function bN({value:e={},onChange:t,name:n,placeholderKey:o="Chave",placeholderValue:r="Valor",disabled:a=!1}){const[i,s]=d({key:"",value:""});return y(dt,{direction:"col",gap:2,children:[y("div",{className:"flex gap-2",children:[v(lt,{type:"text",name:`${n}_key`,placeholder:o,value:i.key,disabled:a,onChange:e=>s(t=>({...t,key:e.target.value})),className:"flex-1"}),v(lt,{type:"text",name:`${n}_value`,placeholder:r,value:i.value,disabled:a,onChange:e=>s(t=>({...t,value:e.target.value})),className:"flex-1"}),v(tt,{type:"button",variant:"default",className:"px-4 py-2 shrink-0",id:`${n}_add`,onClick:()=>{const e=i.key.trim(),n=i.value.trim();e&&(t(t=>({...t&&"object"==typeof t?t:{},[e]:n})),s({key:"",value:""}))},disabled:a||!i.key.trim(),children:"Adicionar"})]}),Object.entries(e).length>0&&v(dt,{direction:"row",gap:2,className:"flex-wrap",children:Object.entries(e).map(([e,n])=>y(dt,{direction:"row",gap:1,className:"bg-muted px-3 py-1.5 rounded-md text-sm",children:[y("span",{className:"font-medium text-foreground",children:[e," : ",String(n)]}),!a&&v("button",{type:"button",onClick:()=>{return n=e,void t(e=>{const t={...e&&"object"==typeof e?e:{}};return delete t[n],t});var n},className:"rounded-full p-0 hover:bg-muted-foreground/20 hover:text-destructive hover:backgro transition-colors",children:"×"})]},e))})]})}function xN({fields:e,values:t,defaultValue:n={},onChange:o,errors:r={},config:a,customFields:s}){const[l,c]=d(n),u=t??l,p=(e,t)=>{o?o(n=>{const o=n&&"object"==typeof n?n:u,r=o[e],a="function"==typeof t?t(r):t;return{...o,[e]:a}}):c(n=>{const o=n[e],r="function"==typeof t?t(o):t;return{...n,[e]:r}})};i(()=>{Object.keys(n).length>0&&0===Object.keys(u).length&&c(n)},[n,u]);const f=Object.keys(e).filter(e=>!a?.exclude?.includes(e)),m=(e,t)=>{const n=u[e]??"",o=r[e],i=t.disabled;if(s?.[e])return s[e]({value:n,onChange:t=>p(e,t),error:o,disabled:i,fieldKey:e});switch(t.type){case"textarea":return v(ct,{id:e,name:e,placeholder:t.placeholder,value:n,onChange:t=>p(e,t.target.value),required:t.required,disabled:i,className:Je("min-h-[120px] w-full",o&&"border-destructive")});case"checkbox":return y("div",{className:"flex items-center gap-2 py-2",children:[v(pb,{id:e,name:e,checked:!!n,onCheckedChange:t=>p(e,!!t),disabled:i}),v("label",{htmlFor:e,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:yN(e,a?.labels)})]});case"select":return y(gN,{name:e,value:n,onValueChange:t=>p(e,t),disabled:i,children:[v(Cy,{"data-testid":`${e}-select-trigger`,children:v(Ny,{placeholder:t.placeholder||"Selecione..."})}),v(Sy,{children:t.options?.map(t=>v(My,{"data-testid":`${e}-select-item-${t.value}`,value:t.value,children:t.label},t.value))})]},n?"loaded":"empty");case"key-value":return y(b,{children:[v(bN,{value:n||{},name:e,onChange:t=>p(e,t),placeholderKey:"Chave",placeholderValue:"Valor",disabled:i}),v("input",{type:"hidden",name:e,value:JSON.stringify(n||{})})]});case"number":return v(lt,{type:"number",id:e,name:e,placeholder:t.placeholder,value:n,onChange:t=>{const n=""===t.target.value?"":Number(t.target.value);p(e,n)},required:t.required,disabled:i,className:Je("w-full",o&&"border-destructive")});case"date":return v(lt,{type:"date",id:e,name:e,placeholder:t.placeholder,value:n,onChange:t=>p(e,t.target.value),required:t.required,disabled:i,className:Je("w-full",o&&"border-destructive")});default:return v(lt,{type:t.type,id:e,name:e,placeholder:t.placeholder,value:n,onChange:t=>p(e,t.target.value),required:t.required,disabled:i,className:Je("w-full",o&&"border-destructive")})}};return v(dt,{direction:"col",gap:6,className:"w-full",children:(a?.sections||[{title:"Dados do Formulário",fields:f,cols:1}]).map(t=>{const n=t.fields.filter(t=>t in e&&!a?.exclude?.includes(t));if(0===n.length)return null;const o=1===t.cols?"grid-cols-1":2===t.cols?"grid-cols-1 sm:grid-cols-2":3===t.cols?"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3":"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4";return y(dt,{direction:"col",gap:3,className:"w-full",children:[v("h3",{className:"text-sm font-semibold text-foreground",children:t.title}),v("div",{className:Je("grid gap-x-6 gap-y-4 w-full",o),children:n.map(n=>{const o=e[n],i=t.isFullWidth||"textarea"===o.type||"key-value"===o.type||4===o.cols,s=r[n],l="checkbox"!==o.type;return y(dt,{direction:"col",gap:1.5,className:Je(i?"col-span-full":"",o.className),children:[l&&y("label",{htmlFor:n,className:"text-fontcolor-secondary font-bold text-sm",children:[yN(n,a?.labels),o.required&&v("span",{className:"text-destructive ml-0.5",children:"*"})]}),m(n,o),s&&v("span",{className:"text-xs text-destructive font-medium mt-0.5",children:s})]},n)})})]},t.title)})})}const wN=({open:e,onOpenChange:t,targetModelClass:n,relationName:o,handleCreateNew:r,mutate:a,fkFetcher:i})=>{const[s,l]=d("");return v(qh,{open:e,onOpenChange:t,children:v(Uh,{className:"max-w-3xl centered p-0 border-none bg-transparent shadow-none",children:v(dt,{gap:3,direction:"row",className:"w-full items-center justify-center",children:y("div",{className:"flex flex-col gap-4 p-6 border border-gray-200 bg-white rounded-lg shadow-sm",children:[v(cg,{fetcher:i,modelClass:n,labelName:"description",placeholder:`Selecione um(a) ${o.toLocaleLowerCase()}`,emptyMessage:`Nenhum(a) ${o.toLocaleLowerCase()} encontrado(a)`,value:s,onChange:e=>{l(String(e))}}),v(tt,{onClick:async()=>{await r(s),t(!1),l(""),a()},children:"Salvar"}),v(tt,{variant:"secondary",onClick:()=>{t(!1),l("")},children:"Cancelar"})]})})})})},kN=({modelClass:e,targetModelClass:t,targetField:n,filterDict:o,relationName:r,fields:a,displayFields:i,handleCreateNew:s,handleDeleteItem:l,listFn:c,fkFetcher:u})=>{const[p,f]=d(!1),[m,h]=d(!1),g=e?{modelClass:e,filterDict:o,fields:a}:null,{data:b,error:x,mutate:w}=k(g,async({modelClass:e,fields:t})=>{const[r,a]=await c(e,o,[...t,"pk"]);if(a&&console.error("==> ERROR m2m table: ",a),n&&Array.isArray(r)&&r.length>0){return r?.map(e=>({...e[n],m2m:e.pk}))??[]}return[]},{revalidateOnFocus:!1,revalidateOnReconnect:!0,errorRetryCount:3,errorRetryInterval:1e3}),[N,C]=d(null);return y(dN,{hasError:!!x,children:[v(Dc,{type:"multiple",className:"w-full",children:y(Sc,{value:"details",className:"border-b",children:[y(Ec,{className:"text-base font-normal text-surface-secondary hover:no-underline",children:[r," (",b?.length||0,")"]}),y(Mc,{className:"px-4 pt-4",children:[v(dt,{direction:"row",className:"justify-end mb-4",children:y(tt,{onClick:()=>f(!0),children:["Adicionar ",r.toLowerCase()]})}),b&&b.length>0?y(jy,{className:"table-auto w-full",children:[v(Fy,{className:"sticky top-0 bg-primary text-white z-10",children:y(Wy,{children:[v($y,{className:"px-2 py-4",children:"Id"},"pk"),i.map(e=>v($y,{className:"px-2 py-2",children:e.name},e.field)),v($y,{className:"px-2 py-4 text-end",children:v("div",{className:"mr-6",children:"Opções"})})]})}),y(Ly,{children:[b?.map((e,t)=>y(Wy,{className:"cursor-pointer hover:bg-secondary",children:[v(By,{className:"px-2",children:e.pk??"N/A"},"pk"),i.map(t=>v(By,{className:"px-2",children:e[t.field]??"N/A"},t.field)),v(By,{className:"px-2 justify-end flex",children:v(tt,{variant:"ghost",size:"icon",className:"border text-muted-foreground mr-6",onClick:()=>{C(e.m2m),h(!0)},children:v(Hi,{className:"size-4"})})})]},t)),v(Wy,{children:v(By,{colSpan:i.length,className:"text-center py-6"})})]})]}):v(Iy,{})]})]})}),v(wN,{open:p,onOpenChange:f,targetModelClass:t,relationName:r,handleCreateNew:s,mutate:w,fkFetcher:u}),v(uN,{handleDelete:async()=>{N&&(await l(N),h(!1),C(null),w())},openDialog:m,setOpenDialog:h,count:1})]})},NN=({item:e,modelClass:t,propertyName:n,retrieveFile:o})=>{const[r,a]=d(!1);return v(tt,{variant:"outline",size:"icon",disabled:r,onClick:async()=>{a(!0);try{const[r,a]=await o(t,Number(e[n]));if(a)return void ls.error(`Houve algum problema: ${a.message}`);if(!r)return void ls.error("Nenhum arquivo encontrado");const i=new Blob([new Uint8Array(r.data)],{type:r.contentType}),s=URL.createObjectURL(i),l=document.createElement("a");l.href=s,l.download=e.file.split(/[\\/]/).pop()??e.file,document.body.appendChild(l);try{l.click()}finally{document.body.removeChild(l),URL.revokeObjectURL(s)}ls.success("Arquivo baixado com sucesso!")}finally{a(!1)}},children:r?v(Li,{className:"animate-spin"}):v(Pi,{})})};function CN({options:t,selected:n,onChange:o,placeholder:r="Select items...",className:a,maxDisplay:i=3}){const[s,l]=e.useState(!1),c=n.length===t.length&&t.length>0;return y(wy,{open:s,onOpenChange:l,children:[v(Cy,{className:Je("w-full",a),children:v("span",{className:Je("truncate flex-1 text-left",0===n.length&&"text-muted-foreground"),children:(()=>{if(0===n.length)return r;if(n.length>i)return`${n.length} items selected`;const e=n.map(e=>t.find(t=>t.value===e)?.label).join(", ");return e.length>80?`${n.length} item${1!==n.length?"s":""} selected`:e})()})}),y(Sy,{children:[t.length>0&&v("div",{className:"border-b border-border",children:y("div",{className:"flex items-center space-x-2 cursor-pointer p-2 hover:bg-accent hover:text-accent-foreground rounded-sm w-full text-left font-medium",children:[v(pb,{checked:c,onCheckedChange:()=>{o(c?[]:t.map(e=>e.value))}}),v("span",{className:"text-sm",children:c?"Unselect All":"Select All"})]})}),v("div",{className:"p-1 space-y-1",children:t.map(e=>y("div",{className:"flex items-center space-x-2 cursor-pointer p-2 hover:bg-accent hover:text-accent-foreground rounded-sm w-full text-left",children:[v(pb,{checked:n.includes(e.value),onCheckedChange:()=>(e=>{const t=n.includes(e)?n.filter(t=>t!==e):[...n,e];o(t)})(e.value)}),v("span",{className:"text-sm",children:e.label})]},e.value))}),n.length>0&&v("div",{className:"border-t border-border p-2 bg-muted",children:y("div",{className:"text-xs text-muted-foreground",children:[n.length," item",1!==n.length?"s":""," selected"]})})]})]})}function _N({label:e,steps:t=[]}){return v(Zb,{className:"mb-6",children:y(Xb,{children:[v(Qb,{children:v(ex,{className:"text-primary font-medium",children:e})}),t.map(e=>y(c,{children:[v(tx,{}),v(Qb,{children:v(ex,{className:"text-muted-foreground",children:e})})]},`step-fragment-${e}`))]})})}const DN=(e,t)=>{const n=document.createElement("a");n.href=e,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)},SN=({fileUrl:e,fileName:t,isLoading:n=!1,getFileType:o,ImageComponent:r})=>{if(n)return v(dt,{direction:"col",className:"bg-secondary border border-border rounded-lg min-h-[600px] items-center justify-center",children:v(cN,{})});if(!e||!t)return y(dt,{direction:"col",className:"bg-secondary border border-border rounded-lg min-h-[600px] items-center justify-center",children:[v(Fi,{className:"w-16 h-16 text-muted-foreground"}),v("p",{className:"text-sm text-muted-foreground mt-4",children:"No file available"})]});const a=o(t);return v(dt,{direction:"col",className:"bg-secondary border border-border rounded-lg min-h-[600px] h-full overflow-hidden relative",children:(()=>{switch(a){case"image":return v(dt,{direction:"col",className:"w-full h-full items-center justify-center relative",children:r?v(r,{src:e,alt:t,fill:!0,className:"object-contain"}):v("img",{src:e,alt:t,className:"max-w-full max-h-full object-contain"})});case"video":return v(dt,{direction:"col",className:"w-full h-full items-center justify-center relative",children:y("video",{src:e,controls:!0,className:"w-full h-full object-contain",children:[v("track",{kind:"captions"}),"Your browser does not support the video tag."]})});case"pdf":return v(dt,{direction:"col",className:"w-full h-full items-center justify-center relative",children:v("iframe",{src:e,className:"w-full h-full border-0",title:t})});case"doc":case"excel":case"ppt":return y(dt,{direction:"col",gap:4,className:"items-center justify-center h-full p-8",children:[v(Ii,{className:"w-20 h-20 text-muted-foreground"}),y(dt,{direction:"col",gap:1,className:"text-center",children:[v("p",{className:"text-sm font-medium text-foreground",children:t}),y("p",{className:"text-xs text-muted-foreground uppercase",children:[a," Document"]})]}),y(tt,{variant:"outline",size:"default",className:"mt-4",onClick:()=>DN(e,t),children:[v(Pi,{className:"w-4 h-4 mr-2"}),"Download"]})]});default:return y(dt,{direction:"col",gap:4,className:"items-center justify-center h-full p-8",children:[v(ji,{className:"w-16 h-16 text-muted-foreground"}),v("p",{className:"text-sm text-muted-foreground",children:t}),y(tt,{variant:"outline",size:"sm",onClick:()=>DN(e,t),children:[v(Pi,{className:"w-4 h-4 mr-2"}),"Download"]})]})}})()})};export{Dc as Accordion,Mc as AccordionContent,Sc as AccordionItem,Ec as AccordionTrigger,Ub as Alert,Gb as AlertDescription,Wa as AlertDialog,Ga as AlertDialogAction,Za as AlertDialogCancel,Ha as AlertDialogContent,Ka as AlertDialogDescription,Va as AlertDialogFooter,Ya as AlertDialogHeader,qa as AlertDialogOverlay,Ba as AlertDialogPortal,Ua as AlertDialogTitle,$a as AlertDialogTrigger,Kb as AlertTitle,Bk as AlertWithIcon,Kk as AuthenticatedView,rN as AutoDetailContent,xN as AutoFormContent,si as Badge,Zb as Breadcrumb,nx as BreadcrumbEllipsis,Qb as BreadcrumbItem,Jb as BreadcrumbLink,Xb as BreadcrumbList,ex as BreadcrumbPage,tx as BreadcrumbSeparator,tt as Button,fp as Calendar,Ja as Card,oi as CardContent,ni as CardDescription,ri as CardFooter,ei as CardHeader,ti as CardTitle,pb as Checkbox,pN as ClearButton,Zy as CombinedFilterTable,sg as Combobox,Qh as Command,Jh as CommandDialog,ng as CommandEmpty,og as CommandGroup,eg as CommandInput,ag as CommandItem,tg as CommandList,rg as CommandSeparator,ig as CommandShortcut,Xa as ConfirmationDialog,dg as CreatedByUserFilter,_N as CustomBreadcrumb,Ay as DatePicker,nh as DateRangeFilter,uN as DeleteDialog,aN as DetailPage,qh as Dialog,Uh as DialogContent,Xh as DialogDescription,Gh as DialogFooter,Kh as DialogHeader,Zh as DialogTitle,Hh as DialogTrigger,NN as DownloadButton,kk as DropdownMenu,Rk as DropdownMenuCheckboxItem,Ok as DropdownMenuContent,Ck as DropdownMenuGroup,Tk as DropdownMenuItem,Ak as DropdownMenuLabel,_k as DropdownMenuPortal,Sk as DropdownMenuRadioGroup,Pk as DropdownMenuRadioItem,Ik as DropdownMenuSeparator,jk as DropdownMenuShortcut,Dk as DropdownMenuSub,Mk as DropdownMenuSubContent,Ek as DropdownMenuSubTrigger,Nk as DropdownMenuTrigger,Yn as Dropzone,Oc as Empty,Fc as EmptyContainer,jc as EmptyContent,Ic as EmptyDescription,Tc as EmptyHeader,Pc as EmptyMedia,Ac as EmptyTitle,dN as ErrorBoundary,zk as ErrorMessage,Wk as ErrorToastContent,cg as FKSelect,nN as FULL_WIDTH_DETAIL_FIELDS,ds as FileDropzone,SN as FilePreview,lt as Input,$k as KeyValueContent,gb as Label,cN as Loading,Hk as LoginCard,Vk as LoginCardSSO,wN as M2MCreateDialog,kN as M2MTable,lN as MarkdownEditor,CN as MultiSelectDropdown,vs as NavigationSidebar,Iy as NoResult,Zk as NotAuthenticatedView,mN as Pagination,Jm as Popover,th as PopoverContent,eh as PopoverTrigger,ci as PumpwoodBadge,ai as PumpwoodCard,Fk as Radio,Ry as Select,Sy as SelectContent,ky as SelectGroup,My as SelectItem,Ey as SelectLabel,wy as SelectPrimitive,Dy as SelectScrollDownButton,_y as SelectScrollUpButton,Oy as SelectSeparator,Cy as SelectTrigger,Ny as SelectValue,gs as Sidebar,Hy as Skeleton,Lk as Spinner,dt as Stack,Uy as Table,Ly as TableBody,qy as TableCaption,By as TableCell,zy as TableFooter,$y as TableHead,Fy as TableHeader,jy as TablePrimitive,Wy as TableRow,Yy as TableSkeleton,tl as Tabs,rl as TabsContent,nl as TabsList,ol as TabsTrigger,hN as TagInput,ct as Textarea,qb as Tooltip,fN as TooltipComponent,Yb as TooltipContent,Bb as TooltipProvider,Hb as TooltipTrigger,Qa as Typography,ii as badgeVariants,sN as createFKSelectFetcher,iN as fkSelectFetcher,Jk as formatDetailLabel,eN as formatDetailValue,tN as getDetailFieldValue,li as pumpwoodBadgeVariants,fs as useSidebarCollapse};
|