dccxx-s3-explorer 1.0.52 → 1.0.54

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.
@@ -1,4 +1,4 @@
1
- (function(dt,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],l):(dt=typeof globalThis<"u"?globalThis:dt||self,l(dt.S3Explorer={},dt.jsxRuntime,dt.React,dt.ReactDOM))})(this,function(dt,l,_,ai){"use strict";function $s(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const p=$s(_),Ir=$s(ai);function jp({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"}))}const Ls=p.forwardRef(jp);function zp({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"}))}const si=p.forwardRef(zp);function Bp({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"}))}const Hp=p.forwardRef(Bp);function Up({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 10.5v6m3-3H9m4.06-7.19-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"}))}const Wp=p.forwardRef(Up);function qp({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"}))}const li=p.forwardRef(qp);function Gp({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418"}))}const Kp=p.forwardRef(Gp);function Yp({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"}))}const Xp=p.forwardRef(Yp);function Jp({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 0 1 7.5 5.25h9a2.25 2.25 0 0 1 2.25 2.25v9a2.25 2.25 0 0 1-2.25 2.25h-9a2.25 2.25 0 0 1-2.25-2.25v-9Z"}))}const Zp=p.forwardRef(Jp);function Qp({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const Rs=p.forwardRef(Qp);function eg(e={}){const{nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r}=e,[o,i]=_.useState(!1),a=_.useRef(n);a.current=n;const s=_.useRef(r);return s.current=r,_.useEffect(()=>{const u=document.createElement("script");return u.src="https://accounts.google.com/gsi/client",u.async=!0,u.defer=!0,u.nonce=t,u.onload=()=>{var c;i(!0),(c=a.current)===null||c===void 0||c.call(a)},u.onerror=()=>{var c;i(!1),(c=s.current)===null||c===void 0||c.call(s)},document.body.appendChild(u),()=>{document.body.removeChild(u)}},[t]),o}const Vs=_.createContext(null);function tg({clientId:e,nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r,children:o}){const i=eg({nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r}),a=_.useMemo(()=>({clientId:e,scriptLoadedSuccessfully:i}),[e,i]);return _.createElement(Vs.Provider,{value:a},o)}function ng(){const e=_.useContext(Vs);if(!e)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return e}function rg({flow:e="implicit",scope:t="",onSuccess:n,onError:r,onNonOAuthError:o,overrideScope:i,state:a,...s}){const{clientId:u,scriptLoadedSuccessfully:c}=ng(),d=_.useRef(),g=_.useRef(n);g.current=n;const m=_.useRef(r);m.current=r;const f=_.useRef(o);f.current=o,_.useEffect(()=>{var y,b;if(!c)return;const w=e==="implicit"?"initTokenClient":"initCodeClient",C=(b=(y=window==null?void 0:window.google)===null||y===void 0?void 0:y.accounts)===null||b===void 0?void 0:b.oauth2[w]({client_id:u,scope:i?t:`openid profile email ${t}`,callback:E=>{var x,O;if(E.error)return(x=m.current)===null||x===void 0?void 0:x.call(m,E);(O=g.current)===null||O===void 0||O.call(g,E)},error_callback:E=>{var x;(x=f.current)===null||x===void 0||x.call(f,E)},state:a,...s});d.current=C},[u,c,e,t,a]);const v=_.useCallback(y=>{var b;return(b=d.current)===null||b===void 0?void 0:b.requestAccessToken(y)},[]),h=_.useCallback(()=>{var y;return(y=d.current)===null||y===void 0?void 0:y.requestCode()},[]);return e==="implicit"?v:h}/**
1
+ (function(dt,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],l):(dt=typeof globalThis<"u"?globalThis:dt||self,l(dt.S3Explorer={},dt.jsxRuntime,dt.React,dt.ReactDOM))})(this,function(dt,l,_,ai){"use strict";function Rs(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const p=Rs(_),Ir=Rs(ai);function zp({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"}))}const Vs=p.forwardRef(zp);function Bp({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"}))}const si=p.forwardRef(Bp);function Hp({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"}))}const Up=p.forwardRef(Hp);function Wp({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 10.5v6m3-3H9m4.06-7.19-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"}))}const qp=p.forwardRef(Wp);function Gp({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"}))}const li=p.forwardRef(Gp);function Kp({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418"}))}const Yp=p.forwardRef(Kp);function Xp({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"}))}const Jp=p.forwardRef(Xp);function Zp({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 0 1 7.5 5.25h9a2.25 2.25 0 0 1 2.25 2.25v9a2.25 2.25 0 0 1-2.25 2.25h-9a2.25 2.25 0 0 1-2.25-2.25v-9Z"}))}const Qp=p.forwardRef(Zp);function eg({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const js=p.forwardRef(eg);function tg(e={}){const{nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r}=e,[o,i]=_.useState(!1),a=_.useRef(n);a.current=n;const s=_.useRef(r);return s.current=r,_.useEffect(()=>{const u=document.createElement("script");return u.src="https://accounts.google.com/gsi/client",u.async=!0,u.defer=!0,u.nonce=t,u.onload=()=>{var c;i(!0),(c=a.current)===null||c===void 0||c.call(a)},u.onerror=()=>{var c;i(!1),(c=s.current)===null||c===void 0||c.call(s)},document.body.appendChild(u),()=>{document.body.removeChild(u)}},[t]),o}const zs=_.createContext(null);function ng({clientId:e,nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r,children:o}){const i=tg({nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r}),a=_.useMemo(()=>({clientId:e,scriptLoadedSuccessfully:i}),[e,i]);return _.createElement(zs.Provider,{value:a},o)}function rg(){const e=_.useContext(zs);if(!e)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return e}function og({flow:e="implicit",scope:t="",onSuccess:n,onError:r,onNonOAuthError:o,overrideScope:i,state:a,...s}){const{clientId:u,scriptLoadedSuccessfully:c}=rg(),d=_.useRef(),g=_.useRef(n);g.current=n;const m=_.useRef(r);m.current=r;const f=_.useRef(o);f.current=o,_.useEffect(()=>{var y,b;if(!c)return;const w=e==="implicit"?"initTokenClient":"initCodeClient",C=(b=(y=window==null?void 0:window.google)===null||y===void 0?void 0:y.accounts)===null||b===void 0?void 0:b.oauth2[w]({client_id:u,scope:i?t:`openid profile email ${t}`,callback:E=>{var x,O;if(E.error)return(x=m.current)===null||x===void 0?void 0:x.call(m,E);(O=g.current)===null||O===void 0||O.call(g,E)},error_callback:E=>{var x;(x=f.current)===null||x===void 0||x.call(f,E)},state:a,...s});d.current=C},[u,c,e,t,a]);const v=_.useCallback(y=>{var b;return(b=d.current)===null||b===void 0?void 0:b.requestAccessToken(y)},[]),h=_.useCallback(()=>{var y;return(y=d.current)===null||y===void 0?void 0:y.requestCode()},[]);return e==="implicit"?v:h}/**
2
2
  * table-core
3
3
  *
4
4
  * Copyright (c) TanStack
@@ -7,10 +7,10 @@
7
7
  * LICENSE.md file in the root directory of this source tree.
8
8
  *
9
9
  * @license MIT
10
- */function qt(e,t){return typeof e=="function"?e(t):e}function nt(e,t){return n=>{t.setState(r=>({...r,[e]:qt(n,r[e])}))}}function Mr(e){return e instanceof Function}function og(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function ig(e,t){const n=[],r=o=>{o.forEach(i=>{n.push(i);const a=t(i);a!=null&&a.length&&r(a)})};return r(e),n}function fe(e,t,n){let r=[],o;return i=>{let a;n.key&&n.debug&&(a=Date.now());const s=e(i);if(!(s.length!==r.length||s.some((d,g)=>r[g]!==d)))return o;r=s;let c;if(n.key&&n.debug&&(c=Date.now()),o=t(...s),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const d=Math.round((Date.now()-a)*100)/100,g=Math.round((Date.now()-c)*100)/100,m=g/16,f=(v,h)=>{for(v=String(v);v.length<h;)v=" "+v;return v};console.info(`%c⏱ ${f(g,5)} /${f(d,5)} ms`,`
10
+ */function qt(e,t){return typeof e=="function"?e(t):e}function nt(e,t){return n=>{t.setState(r=>({...r,[e]:qt(n,r[e])}))}}function Mr(e){return e instanceof Function}function ig(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function ag(e,t){const n=[],r=o=>{o.forEach(i=>{n.push(i);const a=t(i);a!=null&&a.length&&r(a)})};return r(e),n}function fe(e,t,n){let r=[],o;return i=>{let a;n.key&&n.debug&&(a=Date.now());const s=e(i);if(!(s.length!==r.length||s.some((d,g)=>r[g]!==d)))return o;r=s;let c;if(n.key&&n.debug&&(c=Date.now()),o=t(...s),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const d=Math.round((Date.now()-a)*100)/100,g=Math.round((Date.now()-c)*100)/100,m=g/16,f=(v,h)=>{for(v=String(v);v.length<h;)v=" "+v;return v};console.info(`%c⏱ ${f(g,5)} /${f(d,5)} ms`,`
11
11
  font-size: .6rem;
12
12
  font-weight: bold;
13
- color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,n==null?void 0:n.key)}return o}}function pe(e,t,n,r){return{debug:()=>{var o;return(o=e==null?void 0:e.debugAll)!=null?o:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:r}}function ag(e,t,n,r){const o=()=>{var a;return(a=i.getValue())!=null?a:e.options.renderFallbackValue},i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:o,getContext:fe(()=>[e,n,t,i],(a,s,u,c)=>({table:a,column:s,row:u,cell:c,getValue:c.getValue,renderValue:c.renderValue}),pe(e.options,"debugCells","cell.getContext"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(i,n,t,e)},{}),i}function sg(e,t,n,r){var o,i;const s={...e._getDefaultColumnDef(),...t},u=s.accessorKey;let c=(o=(i=s.id)!=null?i:u?typeof String.prototype.replaceAll=="function"?u.replaceAll(".","_"):u.replace(/\./g,"_"):void 0)!=null?o:typeof s.header=="string"?s.header:void 0,d;if(s.accessorFn?d=s.accessorFn:u&&(u.includes(".")?d=m=>{let f=m;for(const h of u.split(".")){var v;f=(v=f)==null?void 0:v[h],process.env.NODE_ENV!=="production"&&f===void 0&&console.warn(`"${h}" in deeply nested key "${u}" returned undefined.`)}return f}:d=m=>m[s.accessorKey]),!c)throw process.env.NODE_ENV!=="production"?new Error(s.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let g={id:`${String(c)}`,accessorFn:d,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:fe(()=>[!0],()=>{var m;return[g,...(m=g.columns)==null?void 0:m.flatMap(f=>f.getFlatColumns())]},pe(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:fe(()=>[e._getOrderColumnsFn()],m=>{var f;if((f=g.columns)!=null&&f.length){let v=g.columns.flatMap(h=>h.getLeafColumns());return m(v)}return[g]},pe(e.options,"debugColumns","column.getLeafColumns"))};for(const m of e._features)m.createColumn==null||m.createColumn(g,e);return g}const He="debugHeaders";function js(e,t,n){var r;let i={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],s=u=>{u.subHeaders&&u.subHeaders.length&&u.subHeaders.map(s),a.push(u)};return s(i),a},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(i,e)}),i}const lg={createTable:e=>{e.getHeaderGroups=fe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var i,a;const s=(i=r==null?void 0:r.map(g=>n.find(m=>m.id===g)).filter(Boolean))!=null?i:[],u=(a=o==null?void 0:o.map(g=>n.find(m=>m.id===g)).filter(Boolean))!=null?a:[],c=n.filter(g=>!(r!=null&&r.includes(g.id))&&!(o!=null&&o.includes(g.id)));return $r(t,[...s,...c,...u],e)},pe(e.options,He,"getHeaderGroups")),e.getCenterHeaderGroups=fe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>(n=n.filter(i=>!(r!=null&&r.includes(i.id))&&!(o!=null&&o.includes(i.id))),$r(t,n,e,"center")),pe(e.options,He,"getCenterHeaderGroups")),e.getLeftHeaderGroups=fe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;const i=(o=r==null?void 0:r.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?o:[];return $r(t,i,e,"left")},pe(e.options,He,"getLeftHeaderGroups")),e.getRightHeaderGroups=fe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;const i=(o=r==null?void 0:r.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?o:[];return $r(t,i,e,"right")},pe(e.options,He,"getRightHeaderGroups")),e.getFooterGroups=fe(()=>[e.getHeaderGroups()],t=>[...t].reverse(),pe(e.options,He,"getFooterGroups")),e.getLeftFooterGroups=fe(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),pe(e.options,He,"getLeftFooterGroups")),e.getCenterFooterGroups=fe(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),pe(e.options,He,"getCenterFooterGroups")),e.getRightFooterGroups=fe(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),pe(e.options,He,"getRightFooterGroups")),e.getFlatHeaders=fe(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),pe(e.options,He,"getFlatHeaders")),e.getLeftFlatHeaders=fe(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),pe(e.options,He,"getLeftFlatHeaders")),e.getCenterFlatHeaders=fe(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),pe(e.options,He,"getCenterFlatHeaders")),e.getRightFlatHeaders=fe(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),pe(e.options,He,"getRightFlatHeaders")),e.getCenterLeafHeaders=fe(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),pe(e.options,He,"getCenterLeafHeaders")),e.getLeftLeafHeaders=fe(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),pe(e.options,He,"getLeftLeafHeaders")),e.getRightLeafHeaders=fe(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),pe(e.options,He,"getRightLeafHeaders")),e.getLeafHeaders=fe(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var o,i,a,s,u,c;return[...(o=(i=t[0])==null?void 0:i.headers)!=null?o:[],...(a=(s=n[0])==null?void 0:s.headers)!=null?a:[],...(u=(c=r[0])==null?void 0:c.headers)!=null?u:[]].map(d=>d.getLeafHeaders()).flat()},pe(e.options,He,"getLeafHeaders"))}};function $r(e,t,n,r){var o,i;let a=0;const s=function(m,f){f===void 0&&(f=1),a=Math.max(a,f),m.filter(v=>v.getIsVisible()).forEach(v=>{var h;(h=v.columns)!=null&&h.length&&s(v.columns,f+1)},0)};s(e);let u=[];const c=(m,f)=>{const v={depth:f,id:[r,`${f}`].filter(Boolean).join("_"),headers:[]},h=[];m.forEach(y=>{const b=[...h].reverse()[0],w=y.column.depth===v.depth;let C,E=!1;if(w&&y.column.parent?C=y.column.parent:(C=y.column,E=!0),b&&(b==null?void 0:b.column)===C)b.subHeaders.push(y);else{const x=js(n,C,{id:[r,f,C.id,y==null?void 0:y.id].filter(Boolean).join("_"),isPlaceholder:E,placeholderId:E?`${h.filter(O=>O.column===C).length}`:void 0,depth:f,index:h.length});x.subHeaders.push(y),h.push(x)}v.headers.push(y),y.headerGroup=v}),u.push(v),f>0&&c(h,f-1)},d=t.map((m,f)=>js(n,m,{depth:a,index:f}));c(d,a-1),u.reverse();const g=m=>m.filter(v=>v.column.getIsVisible()).map(v=>{let h=0,y=0,b=[0];v.subHeaders&&v.subHeaders.length?(b=[],g(v.subHeaders).forEach(C=>{let{colSpan:E,rowSpan:x}=C;h+=E,b.push(x)})):h=1;const w=Math.min(...b);return y=y+w,v.colSpan=h,v.rowSpan=y,{colSpan:h,rowSpan:y}});return g((o=(i=u[0])==null?void 0:i.headers)!=null?o:[]),u}const ci=(e,t,n,r,o,i,a)=>{let s={id:t,index:r,original:n,depth:o,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:u=>{if(s._valuesCache.hasOwnProperty(u))return s._valuesCache[u];const c=e.getColumn(u);if(c!=null&&c.accessorFn)return s._valuesCache[u]=c.accessorFn(s.original,r),s._valuesCache[u]},getUniqueValues:u=>{if(s._uniqueValuesCache.hasOwnProperty(u))return s._uniqueValuesCache[u];const c=e.getColumn(u);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(s._uniqueValuesCache[u]=c.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[u]):(s._uniqueValuesCache[u]=[s.getValue(u)],s._uniqueValuesCache[u])},renderValue:u=>{var c;return(c=s.getValue(u))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>ig(s.subRows,u=>u.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let u=[],c=s;for(;;){const d=c.getParentRow();if(!d)break;u.push(d),c=d}return u.reverse()},getAllCells:fe(()=>[e.getAllLeafColumns()],u=>u.map(c=>ag(e,s,c,c.id)),pe(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:fe(()=>[s.getAllCells()],u=>u.reduce((c,d)=>(c[d.column.id]=d,c),{}),pe(e.options,"debugRows","getAllCellsByColumnId"))};for(let u=0;u<e._features.length;u++){const c=e._features[u];c==null||c.createRow==null||c.createRow(s,e)}return s},cg={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},zs=(e,t,n)=>{var r,o;const i=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((o=e.getValue(t))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(i))};zs.autoRemove=e=>ft(e);const Bs=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};Bs.autoRemove=e=>ft(e);const Hs=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};Hs.autoRemove=e=>ft(e);const Us=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};Us.autoRemove=e=>ft(e)||!(e!=null&&e.length);const Ws=(e,t,n)=>!n.some(r=>{var o;return!((o=e.getValue(t))!=null&&o.includes(r))});Ws.autoRemove=e=>ft(e)||!(e!=null&&e.length);const qs=(e,t,n)=>n.some(r=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)});qs.autoRemove=e=>ft(e)||!(e!=null&&e.length);const Gs=(e,t,n)=>e.getValue(t)===n;Gs.autoRemove=e=>ft(e);const Ks=(e,t,n)=>e.getValue(t)==n;Ks.autoRemove=e=>ft(e);const ui=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};ui.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,i=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(o)?1/0:o;if(i>a){const s=i;i=a,a=s}return[i,a]},ui.autoRemove=e=>ft(e)||ft(e[0])&&ft(e[1]);const Rt={includesString:zs,includesStringSensitive:Bs,equalsString:Hs,arrIncludes:Us,arrIncludesAll:Ws,arrIncludesSome:qs,equals:Gs,weakEquals:Ks,inNumberRange:ui};function ft(e){return e==null||e===""}const ug={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:nt("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?Rt.includesString:typeof r=="number"?Rt.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Rt.equals:Array.isArray(r)?Rt.arrIncludes:Rt.weakEquals},e.getFilterFn=()=>{var n,r;return Mr(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Rt[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const o=e.getFilterFn(),i=r==null?void 0:r.find(d=>d.id===e.id),a=qt(n,i?i.value:void 0);if(Ys(o,a,e)){var s;return(s=r==null?void 0:r.filter(d=>d.id!==e.id))!=null?s:[]}const u={id:e.id,value:a};if(i){var c;return(c=r==null?void 0:r.map(d=>d.id===e.id?u:d))!=null?c:[]}return r!=null&&r.length?[...r,u]:[u]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=o=>{var i;return(i=qt(t,o))==null?void 0:i.filter(a=>{const s=n.find(u=>u.id===a.id);if(s){const u=s.getFilterFn();if(Ys(u,a.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Ys(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const di={sum:(e,t,n)=>n.reduce((r,o)=>{const i=o.getValue(e);return r+(typeof i=="number"?i:0)},0),min:(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}),r},max:(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}),r},extent:(e,t,n)=>{let r,o;return n.forEach(i=>{const a=i.getValue(e);a!=null&&(r===void 0?a>=a&&(r=o=a):(r>a&&(r=a),o<a&&(o=a)))}),[r,o]},mean:(e,t)=>{let n=0,r=0;if(t.forEach(o=>{let i=o.getValue(e);i!=null&&(i=+i)>=i&&(++n,r+=i)}),n)return r/n},median:(e,t)=>{if(!t.length)return;const n=t.map(i=>i.getValue(e));if(!og(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((i,a)=>i-a);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},unique:(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),uniqueCount:(e,t)=>new Set(t.map(n=>n.getValue(e))).size,count:(e,t)=>t.length},dg={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:nt("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return di.sum;if(Object.prototype.toString.call(r)==="[object Date]")return di.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Mr(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:di[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function fg(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(i=>!t.includes(i.id));return n==="remove"?r:[...t.map(i=>e.find(a=>a.id===i)).filter(Boolean),...r]}const pg={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:nt("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=fe(n=>[Qn(t,n)],n=>n.findIndex(r=>r.id===e.id),pe(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return((r=Qn(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=Qn(t,n);return((r=o[o.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=fe(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>o=>{let i=[];if(!(t!=null&&t.length))i=o;else{const a=[...t],s=[...o];for(;s.length&&a.length;){const u=a.shift(),c=s.findIndex(d=>d.id===u);c>-1&&i.push(s.splice(c,1)[0])}i=[...i,...s]}return fg(i,n,r)},pe(e.options,"debugTable","_getOrderColumnsFn"))}},fi=()=>({left:[],right:[]}),gg={getInitialState:e=>({columnPinning:fi(),...e}),getDefaultOptions:e=>({onColumnPinningChange:nt("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var i,a;if(n==="right"){var s,u;return{left:((s=o==null?void 0:o.left)!=null?s:[]).filter(g=>!(r!=null&&r.includes(g))),right:[...((u=o==null?void 0:o.right)!=null?u:[]).filter(g=>!(r!=null&&r.includes(g))),...r]}}if(n==="left"){var c,d;return{left:[...((c=o==null?void 0:o.left)!=null?c:[]).filter(g=>!(r!=null&&r.includes(g))),...r],right:((d=o==null?void 0:o.right)!=null?d:[]).filter(g=>!(r!=null&&r.includes(g)))}}return{left:((i=o==null?void 0:o.left)!=null?i:[]).filter(g=>!(r!=null&&r.includes(g))),right:((a=o==null?void 0:o.right)!=null?a:[]).filter(g=>!(r!=null&&r.includes(g)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,i,a;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((i=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(s=>s.id),{left:r,right:o}=t.getState().columnPinning,i=n.some(s=>r==null?void 0:r.includes(s)),a=n.some(s=>o==null?void 0:o.includes(s));return i?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?(n=(r=t.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=fe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,o)=>{const i=[...r??[],...o??[]];return n.filter(a=>!i.includes(a.column.id))},pe(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=fe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(i=>n.find(a=>a.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),pe(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=fe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(i=>n.find(a=>a.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),pe(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?fi():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:fi())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var o,i;return!!((o=r.left)!=null&&o.length||(i=r.right)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=fe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),pe(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=fe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),pe(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=fe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const o=[...n??[],...r??[]];return t.filter(i=>!o.includes(i.id))},pe(e.options,"debugColumns","getCenterLeafColumns"))}},Lr={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},pi=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),mg={getDefaultColumnDef:()=>Lr,getInitialState:e=>({columnSizing:{},columnSizingInfo:pi(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:nt("columnSizing",e),onColumnSizingInfoChange:nt("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Lr.minSize,(r=i??e.columnDef.size)!=null?r:Lr.size),(o=e.columnDef.maxSize)!=null?o:Lr.maxSize)},e.getStart=fe(n=>[n,Qn(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((o,i)=>o+i.getSize(),0),pe(t.options,"debugColumns","getStart")),e.getAfter=fe(n=>[n,Qn(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((o,i)=>o+i.getSize(),0),pe(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...o}=n;return o})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var i;n+=(i=o.column.getSize())!=null?i:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=r==null?void 0:r.getCanResize();return i=>{if(!r||!o||(i.persist==null||i.persist(),gi(i)&&i.touches&&i.touches.length>1))return;const a=e.getSize(),s=e?e.getLeafHeaders().map(b=>[b.column.id,b.column.getSize()]):[[r.id,r.getSize()]],u=gi(i)?Math.round(i.touches[0].clientX):i.clientX,c={},d=(b,w)=>{typeof w=="number"&&(t.setColumnSizingInfo(C=>{var E,x;const O=t.options.columnResizeDirection==="rtl"?-1:1,I=(w-((E=C==null?void 0:C.startOffset)!=null?E:0))*O,L=Math.max(I/((x=C==null?void 0:C.startSize)!=null?x:0),-.999999);return C.columnSizingStart.forEach(H=>{let[D,G]=H;c[D]=Math.round(Math.max(G+G*L,0)*100)/100}),{...C,deltaOffset:I,deltaPercentage:L}}),(t.options.columnResizeMode==="onChange"||b==="end")&&t.setColumnSizing(C=>({...C,...c})))},g=b=>d("move",b),m=b=>{d("end",b),t.setColumnSizingInfo(w=>({...w,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},f=n||typeof document<"u"?document:null,v={moveHandler:b=>g(b.clientX),upHandler:b=>{f==null||f.removeEventListener("mousemove",v.moveHandler),f==null||f.removeEventListener("mouseup",v.upHandler),m(b.clientX)}},h={moveHandler:b=>(b.cancelable&&(b.preventDefault(),b.stopPropagation()),g(b.touches[0].clientX),!1),upHandler:b=>{var w;f==null||f.removeEventListener("touchmove",h.moveHandler),f==null||f.removeEventListener("touchend",h.upHandler),b.cancelable&&(b.preventDefault(),b.stopPropagation()),m((w=b.touches[0])==null?void 0:w.clientX)}},y=hg()?{passive:!1}:!1;gi(i)?(f==null||f.addEventListener("touchmove",h.moveHandler,y),f==null||f.addEventListener("touchend",h.upHandler,y)):(f==null||f.addEventListener("mousemove",v.moveHandler,y),f==null||f.addEventListener("mouseup",v.upHandler,y)),t.setColumnSizingInfo(b=>({...b,startOffset:u,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?pi():(n=e.initialState.columnSizingInfo)!=null?n:pi())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0}}};let Rr=null;function hg(){if(typeof Rr=="boolean")return Rr;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return Rr=e,Rr}function gi(e){return e.type==="touchstart"}const vg={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:nt("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const o=e.columns;return(n=o.length?o.some(i=>i.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=fe(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),pe(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=fe(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],pe(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,r)=>fe(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),pe(e.options,"debugColumns",n));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,i)=>({...o,[i.id]:n||!(i.getCanHide!=null&&i.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function Qn(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const yg={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},xg={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:nt("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,o,i;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Rt.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Mr(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Rt[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},bg={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:nt("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var o,i;e.setExpanded(r?{}:(o=(i=e.initialState)==null?void 0:i.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const a=i.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var o;const i=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{a[s]=!0}):a=r,n=(o=n)!=null?o:!i,!i&&n)return{...a,[e.id]:!0};if(i&&!n){const{[e.id]:s,...u}=a;return u}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,o;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},mi=0,hi=10,vi=()=>({pageIndex:mi,pageSize:hi}),wg={getInitialState:e=>({...e,pagination:{...vi(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:nt("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const o=i=>qt(r,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?vi():(o=e.initialState.pagination)!=null?o:vi())},e.setPageIndex=r=>{e.setPagination(o=>{let i=qt(r,o.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,a)),{...o,pageIndex:i}})},e.resetPageIndex=r=>{var o,i;e.setPageIndex(r?mi:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?o:mi)},e.resetPageSize=r=>{var o,i;e.setPageSize(r?hi:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?o:hi)},e.setPageSize=r=>{e.setPagination(o=>{const i=Math.max(1,qt(r,o.pageSize)),a=o.pageSize*o.pageIndex,s=Math.floor(a/i);return{...o,pageIndex:s,pageSize:i}})},e.setPageCount=r=>e.setPagination(o=>{var i;let a=qt(r,(i=e.options.pageCount)!=null?i:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...o,pageCount:a}}),e.getPageOptions=fe(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((i,a)=>a)),o},pe(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:r<o-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},yi=()=>({top:[],bottom:[]}),Cg={getInitialState:e=>({rowPinning:yi(),...e}),getDefaultOptions:e=>({onRowPinningChange:nt("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const i=r?e.getLeafRows().map(u=>{let{id:c}=u;return c}):[],a=o?e.getParentRows().map(u=>{let{id:c}=u;return c}):[],s=new Set([...a,e.id,...i]);t.setRowPinning(u=>{var c,d;if(n==="bottom"){var g,m;return{top:((g=u==null?void 0:u.top)!=null?g:[]).filter(h=>!(s!=null&&s.has(h))),bottom:[...((m=u==null?void 0:u.bottom)!=null?m:[]).filter(h=>!(s!=null&&s.has(h))),...Array.from(s)]}}if(n==="top"){var f,v;return{top:[...((f=u==null?void 0:u.top)!=null?f:[]).filter(h=>!(s!=null&&s.has(h))),...Array.from(s)],bottom:((v=u==null?void 0:u.bottom)!=null?v:[]).filter(h=>!(s!=null&&s.has(h)))}}return{top:((c=u==null?void 0:u.top)!=null?c:[]).filter(h=>!(s!=null&&s.has(h))),bottom:((d=u==null?void 0:u.bottom)!=null?d:[]).filter(h=>!(s!=null&&s.has(h)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return typeof r=="function"?r(e):(n=r??o)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,i=n.some(s=>r==null?void 0:r.includes(s)),a=n.some(s=>o==null?void 0:o.includes(s));return i?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const i=(n=o==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:s}=a;return s});return(r=i==null?void 0:i.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?yi():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:yi())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var o,i;return!!((o=r.top)!=null&&o.length||(i=r.bottom)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(n??[]).map(a=>{const s=e.getRow(a,!0);return s.getIsAllParentsExpanded()?s:null}):(n??[]).map(a=>t.find(s=>s.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=fe(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),pe(e.options,"debugRows","getTopRows")),e.getBottomRows=fe(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),pe(e.options,"debugRows","getBottomRows")),e.getCenterRows=fe(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const o=new Set([...n??[],...r??[]]);return t.filter(i=>!o.has(i.id))},pe(e.options,"debugRows","getCenterRows"))}},Sg={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:nt("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(i=>{i.getCanSelect()&&(r[i.id]=!0)}):o.forEach(i=>{delete r[i.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(i=>{xi(o,i.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=fe(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?bi(e,n):{rows:[],flatRows:[],rowsById:{}},pe(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=fe(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?bi(e,n):{rows:[],flatRows:[],rowsById:{}},pe(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=fe(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?bi(e,n):{rows:[],flatRows:[],rowsById:{}},pe(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(o=>o.getCanSelect()&&!n[o.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(o=>!n[o.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection(i=>{var a;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return i;const s={...i};return xi(s,e.id,n,(a=r==null?void 0:r.selectChildren)!=null?a:!0,t),s})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return wi(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Ci(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Ci(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var o;n&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},xi=(e,t,n,r,o)=>{var i;const a=o.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(i=a.subRows)!=null&&i.length&&a.getCanSelectSubRows()&&a.subRows.forEach(s=>xi(e,s.id,n,r,o))};function bi(e,t){const n=e.getState().rowSelection,r=[],o={},i=function(a,s){return a.map(u=>{var c;const d=wi(u,n);if(d&&(r.push(u),o[u.id]=u),(c=u.subRows)!=null&&c.length&&(u={...u,subRows:i(u.subRows)}),d)return u}).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:o}}function wi(e,t){var n;return(n=t[e.id])!=null?n:!1}function Ci(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let o=!0,i=!1;return e.subRows.forEach(a=>{if(!(i&&!o)&&(a.getCanSelect()&&(wi(a,t)?i=!0:o=!1),a.subRows&&a.subRows.length)){const s=Ci(a,t);s==="all"?i=!0:(s==="some"&&(i=!0),o=!1)}}),o?"all":i?"some":!1}const Si=/([0-9]+)/gm,Eg=(e,t,n)=>Xs(Gt(e.getValue(n)).toLowerCase(),Gt(t.getValue(n)).toLowerCase()),_g=(e,t,n)=>Xs(Gt(e.getValue(n)),Gt(t.getValue(n))),Tg=(e,t,n)=>Ei(Gt(e.getValue(n)).toLowerCase(),Gt(t.getValue(n)).toLowerCase()),Ag=(e,t,n)=>Ei(Gt(e.getValue(n)),Gt(t.getValue(n))),Pg=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},Ng=(e,t,n)=>Ei(e.getValue(n),t.getValue(n));function Ei(e,t){return e===t?0:e>t?1:-1}function Gt(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Xs(e,t){const n=e.split(Si).filter(Boolean),r=t.split(Si).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),i=r.shift(),a=parseInt(o,10),s=parseInt(i,10),u=[a,s].sort();if(isNaN(u[0])){if(o>i)return 1;if(i>o)return-1;continue}if(isNaN(u[1]))return isNaN(a)?-1:1;if(a>s)return 1;if(s>a)return-1}return n.length-r.length}const er={alphanumeric:Eg,alphanumericCaseSensitive:_g,text:Tg,textCaseSensitive:Ag,datetime:Pg,basic:Ng},kg=[lg,vg,pg,gg,cg,ug,yg,xg,{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:nt("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of n){const i=o==null?void 0:o.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return er.datetime;if(typeof i=="string"&&(r=!0,i.split(Si).length>1))return er.alphanumeric}return r?er.text:er.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return Mr(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:er[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),i=typeof n<"u"&&n!==null;t.setSorting(a=>{const s=a==null?void 0:a.find(f=>f.id===e.id),u=a==null?void 0:a.findIndex(f=>f.id===e.id);let c=[],d,g=i?n:o==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?s?d="toggle":d="add":a!=null&&a.length&&u!==a.length-1?d="replace":s?d="toggle":d="replace",d==="toggle"&&(i||o||(d="remove")),d==="add"){var m;c=[...a,{id:e.id,desc:g}],c.splice(0,c.length-((m=t.options.maxMultiSortColCount)!=null?m:Number.MAX_SAFE_INTEGER))}else d==="toggle"?c=a.map(f=>f.id===e.id?{...f,desc:g}:f):d==="remove"?c=a.filter(f=>f.id!==e.id):c=[{id:e.id,desc:g}];return c})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const i=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==i&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?!1:a==="desc"?"asc":"desc":i},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(o=>o.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},dg,bg,wg,Cg,Sg,mg];function Og(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...kg,...(t=e._features)!=null?t:[]];let o={_features:r};const i=o._features.reduce((m,f)=>Object.assign(m,f.getDefaultOptions==null?void 0:f.getDefaultOptions(o)),{}),a=m=>o.options.mergeOptions?o.options.mergeOptions(i,m):{...i,...m};let u={...{},...(n=e.initialState)!=null?n:{}};o._features.forEach(m=>{var f;u=(f=m.getInitialState==null?void 0:m.getInitialState(u))!=null?f:u});const c=[];let d=!1;const g={_features:r,options:{...i,...e},initialState:u,_queue:m=>{c.push(m),d||(d=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();d=!1}).catch(f=>setTimeout(()=>{throw f})))},reset:()=>{o.setState(o.initialState)},setOptions:m=>{const f=qt(m,o.options);o.options=a(f)},getState:()=>o.options.state,setState:m=>{o.options.onStateChange==null||o.options.onStateChange(m)},_getRowId:(m,f,v)=>{var h;return(h=o.options.getRowId==null?void 0:o.options.getRowId(m,f,v))!=null?h:`${v?[v.id,f].join("."):f}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(m,f)=>{let v=(f?o.getPrePaginationRowModel():o.getRowModel()).rowsById[m];if(!v&&(v=o.getCoreRowModel().rowsById[m],!v))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${m}`):new Error;return v},_getDefaultColumnDef:fe(()=>[o.options.defaultColumn],m=>{var f;return m=(f=m)!=null?f:{},{header:v=>{const h=v.header.column.columnDef;return h.accessorKey?h.accessorKey:h.accessorFn?h.id:null},cell:v=>{var h,y;return(h=(y=v.renderValue())==null||y.toString==null?void 0:y.toString())!=null?h:null},...o._features.reduce((v,h)=>Object.assign(v,h.getDefaultColumnDef==null?void 0:h.getDefaultColumnDef()),{}),...m}},pe(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>o.options.columns,getAllColumns:fe(()=>[o._getColumnDefs()],m=>{const f=function(v,h,y){return y===void 0&&(y=0),v.map(b=>{const w=sg(o,b,y,h),C=b;return w.columns=C.columns?f(C.columns,w,y+1):[],w})};return f(m)},pe(e,"debugColumns","getAllColumns")),getAllFlatColumns:fe(()=>[o.getAllColumns()],m=>m.flatMap(f=>f.getFlatColumns()),pe(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:fe(()=>[o.getAllFlatColumns()],m=>m.reduce((f,v)=>(f[v.id]=v,f),{}),pe(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:fe(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(m,f)=>{let v=m.flatMap(h=>h.getLeafColumns());return f(v)},pe(e,"debugColumns","getAllLeafColumns")),getColumn:m=>{const f=o._getAllFlatColumnsById()[m];return process.env.NODE_ENV!=="production"&&!f&&console.error(`[Table] Column with id '${m}' does not exist.`),f}};Object.assign(o,g);for(let m=0;m<o._features.length;m++){const f=o._features[m];f==null||f.createTable==null||f.createTable(o)}return o}function Js(){return e=>fe(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,i,a){i===void 0&&(i=0);const s=[];for(let c=0;c<o.length;c++){const d=ci(e,e._getRowId(o[c],c,a),o[c],c,i,void 0,a==null?void 0:a.id);if(n.flatRows.push(d),n.rowsById[d.id]=d,s.push(d),e.options.getSubRows){var u;d.originalSubRows=e.options.getSubRows(o[c],c),(u=d.originalSubRows)!=null&&u.length&&(d.subRows=r(d.originalSubRows,i+1,d))}}return s};return n.rows=r(t),n},pe(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function Fg(e,t,n){return n.options.filterFromLeafRows?Dg(e,t,n):Ig(e,t,n)}function Dg(e,t,n){var r;const o=[],i={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,s=function(u,c){c===void 0&&(c=0);const d=[];for(let m=0;m<u.length;m++){var g;let f=u[m];const v=ci(n,f.id,f.original,f.index,f.depth,void 0,f.parentId);if(v.columnFilters=f.columnFilters,(g=f.subRows)!=null&&g.length&&c<a){if(v.subRows=s(f.subRows,c+1),f=v,t(f)&&!v.subRows.length){d.push(f),i[f.id]=f,o.push(f);continue}if(t(f)||v.subRows.length){d.push(f),i[f.id]=f,o.push(f);continue}}else f=v,t(f)&&(d.push(f),i[f.id]=f,o.push(f))}return d};return{rows:s(e),flatRows:o,rowsById:i}}function Ig(e,t,n){var r;const o=[],i={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,s=function(u,c){c===void 0&&(c=0);const d=[];for(let m=0;m<u.length;m++){let f=u[m];if(t(f)){var g;if((g=f.subRows)!=null&&g.length&&c<a){const h=ci(n,f.id,f.original,f.index,f.depth,void 0,f.parentId);h.subRows=s(f.subRows,c+1),f=h}d.push(f),o.push(f),i[f.id]=f}}return d};return{rows:s(e),flatRows:o,rowsById:i}}function Mg(){return e=>fe(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let m=0;m<t.flatRows.length;m++)t.flatRows[m].columnFilters={},t.flatRows[m].columnFiltersMeta={};return t}const o=[],i=[];(n??[]).forEach(m=>{var f;const v=e.getColumn(m.id);if(!v)return;const h=v.getFilterFn();if(!h){process.env.NODE_ENV!=="production"&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${v.id}.`);return}o.push({id:m.id,filterFn:h,resolvedValue:(f=h.resolveFilterValue==null?void 0:h.resolveFilterValue(m.value))!=null?f:m.value})});const a=(n??[]).map(m=>m.id),s=e.getGlobalFilterFn(),u=e.getAllLeafColumns().filter(m=>m.getCanGlobalFilter());r&&s&&u.length&&(a.push("__global__"),u.forEach(m=>{var f;i.push({id:m.id,filterFn:s,resolvedValue:(f=s.resolveFilterValue==null?void 0:s.resolveFilterValue(r))!=null?f:r})}));let c,d;for(let m=0;m<t.flatRows.length;m++){const f=t.flatRows[m];if(f.columnFilters={},o.length)for(let v=0;v<o.length;v++){c=o[v];const h=c.id;f.columnFilters[h]=c.filterFn(f,h,c.resolvedValue,y=>{f.columnFiltersMeta[h]=y})}if(i.length){for(let v=0;v<i.length;v++){d=i[v];const h=d.id;if(d.filterFn(f,h,d.resolvedValue,y=>{f.columnFiltersMeta[h]=y})){f.columnFilters.__global__=!0;break}}f.columnFilters.__global__!==!0&&(f.columnFilters.__global__=!1)}}const g=m=>{for(let f=0;f<a.length;f++)if(m.columnFilters[a[f]]===!1)return!1;return!0};return Fg(t.rows,g,e)},pe(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function $g(){return e=>fe(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,o=[],i=r.filter(u=>{var c;return(c=e.getColumn(u.id))==null?void 0:c.getCanSort()}),a={};i.forEach(u=>{const c=e.getColumn(u.id);c&&(a[u.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const s=u=>{const c=u.map(d=>({...d}));return c.sort((d,g)=>{for(let f=0;f<i.length;f+=1){var m;const v=i[f],h=a[v.id],y=h.sortUndefined,b=(m=v==null?void 0:v.desc)!=null?m:!1;let w=0;if(y){const C=d.getValue(v.id),E=g.getValue(v.id),x=C===void 0,O=E===void 0;if(x||O){if(y==="first")return x?-1:1;if(y==="last")return x?1:-1;w=x&&O?0:x?y:-y}}if(w===0&&(w=h.sortingFn(d,g,v.id)),w!==0)return b&&(w*=-1),h.invertSorting&&(w*=-1),w}return d.index-g.index}),c.forEach(d=>{var g;o.push(d),(g=d.subRows)!=null&&g.length&&(d.subRows=s(d.subRows))}),c};return{rows:s(n.rows),flatRows:o,rowsById:n.rowsById}},pe(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
13
+ color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,n==null?void 0:n.key)}return o}}function pe(e,t,n,r){return{debug:()=>{var o;return(o=e==null?void 0:e.debugAll)!=null?o:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:r}}function sg(e,t,n,r){const o=()=>{var a;return(a=i.getValue())!=null?a:e.options.renderFallbackValue},i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:o,getContext:fe(()=>[e,n,t,i],(a,s,u,c)=>({table:a,column:s,row:u,cell:c,getValue:c.getValue,renderValue:c.renderValue}),pe(e.options,"debugCells","cell.getContext"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(i,n,t,e)},{}),i}function lg(e,t,n,r){var o,i;const s={...e._getDefaultColumnDef(),...t},u=s.accessorKey;let c=(o=(i=s.id)!=null?i:u?typeof String.prototype.replaceAll=="function"?u.replaceAll(".","_"):u.replace(/\./g,"_"):void 0)!=null?o:typeof s.header=="string"?s.header:void 0,d;if(s.accessorFn?d=s.accessorFn:u&&(u.includes(".")?d=m=>{let f=m;for(const h of u.split(".")){var v;f=(v=f)==null?void 0:v[h],process.env.NODE_ENV!=="production"&&f===void 0&&console.warn(`"${h}" in deeply nested key "${u}" returned undefined.`)}return f}:d=m=>m[s.accessorKey]),!c)throw process.env.NODE_ENV!=="production"?new Error(s.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let g={id:`${String(c)}`,accessorFn:d,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:fe(()=>[!0],()=>{var m;return[g,...(m=g.columns)==null?void 0:m.flatMap(f=>f.getFlatColumns())]},pe(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:fe(()=>[e._getOrderColumnsFn()],m=>{var f;if((f=g.columns)!=null&&f.length){let v=g.columns.flatMap(h=>h.getLeafColumns());return m(v)}return[g]},pe(e.options,"debugColumns","column.getLeafColumns"))};for(const m of e._features)m.createColumn==null||m.createColumn(g,e);return g}const He="debugHeaders";function Bs(e,t,n){var r;let i={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],s=u=>{u.subHeaders&&u.subHeaders.length&&u.subHeaders.map(s),a.push(u)};return s(i),a},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(i,e)}),i}const cg={createTable:e=>{e.getHeaderGroups=fe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var i,a;const s=(i=r==null?void 0:r.map(g=>n.find(m=>m.id===g)).filter(Boolean))!=null?i:[],u=(a=o==null?void 0:o.map(g=>n.find(m=>m.id===g)).filter(Boolean))!=null?a:[],c=n.filter(g=>!(r!=null&&r.includes(g.id))&&!(o!=null&&o.includes(g.id)));return $r(t,[...s,...c,...u],e)},pe(e.options,He,"getHeaderGroups")),e.getCenterHeaderGroups=fe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>(n=n.filter(i=>!(r!=null&&r.includes(i.id))&&!(o!=null&&o.includes(i.id))),$r(t,n,e,"center")),pe(e.options,He,"getCenterHeaderGroups")),e.getLeftHeaderGroups=fe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;const i=(o=r==null?void 0:r.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?o:[];return $r(t,i,e,"left")},pe(e.options,He,"getLeftHeaderGroups")),e.getRightHeaderGroups=fe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;const i=(o=r==null?void 0:r.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?o:[];return $r(t,i,e,"right")},pe(e.options,He,"getRightHeaderGroups")),e.getFooterGroups=fe(()=>[e.getHeaderGroups()],t=>[...t].reverse(),pe(e.options,He,"getFooterGroups")),e.getLeftFooterGroups=fe(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),pe(e.options,He,"getLeftFooterGroups")),e.getCenterFooterGroups=fe(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),pe(e.options,He,"getCenterFooterGroups")),e.getRightFooterGroups=fe(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),pe(e.options,He,"getRightFooterGroups")),e.getFlatHeaders=fe(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),pe(e.options,He,"getFlatHeaders")),e.getLeftFlatHeaders=fe(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),pe(e.options,He,"getLeftFlatHeaders")),e.getCenterFlatHeaders=fe(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),pe(e.options,He,"getCenterFlatHeaders")),e.getRightFlatHeaders=fe(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),pe(e.options,He,"getRightFlatHeaders")),e.getCenterLeafHeaders=fe(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),pe(e.options,He,"getCenterLeafHeaders")),e.getLeftLeafHeaders=fe(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),pe(e.options,He,"getLeftLeafHeaders")),e.getRightLeafHeaders=fe(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),pe(e.options,He,"getRightLeafHeaders")),e.getLeafHeaders=fe(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var o,i,a,s,u,c;return[...(o=(i=t[0])==null?void 0:i.headers)!=null?o:[],...(a=(s=n[0])==null?void 0:s.headers)!=null?a:[],...(u=(c=r[0])==null?void 0:c.headers)!=null?u:[]].map(d=>d.getLeafHeaders()).flat()},pe(e.options,He,"getLeafHeaders"))}};function $r(e,t,n,r){var o,i;let a=0;const s=function(m,f){f===void 0&&(f=1),a=Math.max(a,f),m.filter(v=>v.getIsVisible()).forEach(v=>{var h;(h=v.columns)!=null&&h.length&&s(v.columns,f+1)},0)};s(e);let u=[];const c=(m,f)=>{const v={depth:f,id:[r,`${f}`].filter(Boolean).join("_"),headers:[]},h=[];m.forEach(y=>{const b=[...h].reverse()[0],w=y.column.depth===v.depth;let C,E=!1;if(w&&y.column.parent?C=y.column.parent:(C=y.column,E=!0),b&&(b==null?void 0:b.column)===C)b.subHeaders.push(y);else{const x=Bs(n,C,{id:[r,f,C.id,y==null?void 0:y.id].filter(Boolean).join("_"),isPlaceholder:E,placeholderId:E?`${h.filter(O=>O.column===C).length}`:void 0,depth:f,index:h.length});x.subHeaders.push(y),h.push(x)}v.headers.push(y),y.headerGroup=v}),u.push(v),f>0&&c(h,f-1)},d=t.map((m,f)=>Bs(n,m,{depth:a,index:f}));c(d,a-1),u.reverse();const g=m=>m.filter(v=>v.column.getIsVisible()).map(v=>{let h=0,y=0,b=[0];v.subHeaders&&v.subHeaders.length?(b=[],g(v.subHeaders).forEach(C=>{let{colSpan:E,rowSpan:x}=C;h+=E,b.push(x)})):h=1;const w=Math.min(...b);return y=y+w,v.colSpan=h,v.rowSpan=y,{colSpan:h,rowSpan:y}});return g((o=(i=u[0])==null?void 0:i.headers)!=null?o:[]),u}const ci=(e,t,n,r,o,i,a)=>{let s={id:t,index:r,original:n,depth:o,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:u=>{if(s._valuesCache.hasOwnProperty(u))return s._valuesCache[u];const c=e.getColumn(u);if(c!=null&&c.accessorFn)return s._valuesCache[u]=c.accessorFn(s.original,r),s._valuesCache[u]},getUniqueValues:u=>{if(s._uniqueValuesCache.hasOwnProperty(u))return s._uniqueValuesCache[u];const c=e.getColumn(u);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(s._uniqueValuesCache[u]=c.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[u]):(s._uniqueValuesCache[u]=[s.getValue(u)],s._uniqueValuesCache[u])},renderValue:u=>{var c;return(c=s.getValue(u))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>ag(s.subRows,u=>u.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let u=[],c=s;for(;;){const d=c.getParentRow();if(!d)break;u.push(d),c=d}return u.reverse()},getAllCells:fe(()=>[e.getAllLeafColumns()],u=>u.map(c=>sg(e,s,c,c.id)),pe(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:fe(()=>[s.getAllCells()],u=>u.reduce((c,d)=>(c[d.column.id]=d,c),{}),pe(e.options,"debugRows","getAllCellsByColumnId"))};for(let u=0;u<e._features.length;u++){const c=e._features[u];c==null||c.createRow==null||c.createRow(s,e)}return s},ug={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},Hs=(e,t,n)=>{var r,o;const i=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((o=e.getValue(t))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(i))};Hs.autoRemove=e=>ft(e);const Us=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};Us.autoRemove=e=>ft(e);const Ws=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};Ws.autoRemove=e=>ft(e);const qs=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};qs.autoRemove=e=>ft(e)||!(e!=null&&e.length);const Gs=(e,t,n)=>!n.some(r=>{var o;return!((o=e.getValue(t))!=null&&o.includes(r))});Gs.autoRemove=e=>ft(e)||!(e!=null&&e.length);const Ks=(e,t,n)=>n.some(r=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)});Ks.autoRemove=e=>ft(e)||!(e!=null&&e.length);const Ys=(e,t,n)=>e.getValue(t)===n;Ys.autoRemove=e=>ft(e);const Xs=(e,t,n)=>e.getValue(t)==n;Xs.autoRemove=e=>ft(e);const ui=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};ui.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,i=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(o)?1/0:o;if(i>a){const s=i;i=a,a=s}return[i,a]},ui.autoRemove=e=>ft(e)||ft(e[0])&&ft(e[1]);const Rt={includesString:Hs,includesStringSensitive:Us,equalsString:Ws,arrIncludes:qs,arrIncludesAll:Gs,arrIncludesSome:Ks,equals:Ys,weakEquals:Xs,inNumberRange:ui};function ft(e){return e==null||e===""}const dg={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:nt("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?Rt.includesString:typeof r=="number"?Rt.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Rt.equals:Array.isArray(r)?Rt.arrIncludes:Rt.weakEquals},e.getFilterFn=()=>{var n,r;return Mr(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Rt[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const o=e.getFilterFn(),i=r==null?void 0:r.find(d=>d.id===e.id),a=qt(n,i?i.value:void 0);if(Js(o,a,e)){var s;return(s=r==null?void 0:r.filter(d=>d.id!==e.id))!=null?s:[]}const u={id:e.id,value:a};if(i){var c;return(c=r==null?void 0:r.map(d=>d.id===e.id?u:d))!=null?c:[]}return r!=null&&r.length?[...r,u]:[u]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=o=>{var i;return(i=qt(t,o))==null?void 0:i.filter(a=>{const s=n.find(u=>u.id===a.id);if(s){const u=s.getFilterFn();if(Js(u,a.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Js(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const di={sum:(e,t,n)=>n.reduce((r,o)=>{const i=o.getValue(e);return r+(typeof i=="number"?i:0)},0),min:(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}),r},max:(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}),r},extent:(e,t,n)=>{let r,o;return n.forEach(i=>{const a=i.getValue(e);a!=null&&(r===void 0?a>=a&&(r=o=a):(r>a&&(r=a),o<a&&(o=a)))}),[r,o]},mean:(e,t)=>{let n=0,r=0;if(t.forEach(o=>{let i=o.getValue(e);i!=null&&(i=+i)>=i&&(++n,r+=i)}),n)return r/n},median:(e,t)=>{if(!t.length)return;const n=t.map(i=>i.getValue(e));if(!ig(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((i,a)=>i-a);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},unique:(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),uniqueCount:(e,t)=>new Set(t.map(n=>n.getValue(e))).size,count:(e,t)=>t.length},fg={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:nt("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return di.sum;if(Object.prototype.toString.call(r)==="[object Date]")return di.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Mr(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:di[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function pg(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(i=>!t.includes(i.id));return n==="remove"?r:[...t.map(i=>e.find(a=>a.id===i)).filter(Boolean),...r]}const gg={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:nt("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=fe(n=>[Qn(t,n)],n=>n.findIndex(r=>r.id===e.id),pe(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return((r=Qn(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=Qn(t,n);return((r=o[o.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=fe(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>o=>{let i=[];if(!(t!=null&&t.length))i=o;else{const a=[...t],s=[...o];for(;s.length&&a.length;){const u=a.shift(),c=s.findIndex(d=>d.id===u);c>-1&&i.push(s.splice(c,1)[0])}i=[...i,...s]}return pg(i,n,r)},pe(e.options,"debugTable","_getOrderColumnsFn"))}},fi=()=>({left:[],right:[]}),mg={getInitialState:e=>({columnPinning:fi(),...e}),getDefaultOptions:e=>({onColumnPinningChange:nt("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var i,a;if(n==="right"){var s,u;return{left:((s=o==null?void 0:o.left)!=null?s:[]).filter(g=>!(r!=null&&r.includes(g))),right:[...((u=o==null?void 0:o.right)!=null?u:[]).filter(g=>!(r!=null&&r.includes(g))),...r]}}if(n==="left"){var c,d;return{left:[...((c=o==null?void 0:o.left)!=null?c:[]).filter(g=>!(r!=null&&r.includes(g))),...r],right:((d=o==null?void 0:o.right)!=null?d:[]).filter(g=>!(r!=null&&r.includes(g)))}}return{left:((i=o==null?void 0:o.left)!=null?i:[]).filter(g=>!(r!=null&&r.includes(g))),right:((a=o==null?void 0:o.right)!=null?a:[]).filter(g=>!(r!=null&&r.includes(g)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,i,a;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((i=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(s=>s.id),{left:r,right:o}=t.getState().columnPinning,i=n.some(s=>r==null?void 0:r.includes(s)),a=n.some(s=>o==null?void 0:o.includes(s));return i?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?(n=(r=t.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=fe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,o)=>{const i=[...r??[],...o??[]];return n.filter(a=>!i.includes(a.column.id))},pe(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=fe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(i=>n.find(a=>a.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),pe(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=fe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(i=>n.find(a=>a.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),pe(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?fi():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:fi())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var o,i;return!!((o=r.left)!=null&&o.length||(i=r.right)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=fe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),pe(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=fe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),pe(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=fe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const o=[...n??[],...r??[]];return t.filter(i=>!o.includes(i.id))},pe(e.options,"debugColumns","getCenterLeafColumns"))}},Lr={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},pi=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),hg={getDefaultColumnDef:()=>Lr,getInitialState:e=>({columnSizing:{},columnSizingInfo:pi(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:nt("columnSizing",e),onColumnSizingInfoChange:nt("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Lr.minSize,(r=i??e.columnDef.size)!=null?r:Lr.size),(o=e.columnDef.maxSize)!=null?o:Lr.maxSize)},e.getStart=fe(n=>[n,Qn(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((o,i)=>o+i.getSize(),0),pe(t.options,"debugColumns","getStart")),e.getAfter=fe(n=>[n,Qn(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((o,i)=>o+i.getSize(),0),pe(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...o}=n;return o})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var i;n+=(i=o.column.getSize())!=null?i:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=r==null?void 0:r.getCanResize();return i=>{if(!r||!o||(i.persist==null||i.persist(),gi(i)&&i.touches&&i.touches.length>1))return;const a=e.getSize(),s=e?e.getLeafHeaders().map(b=>[b.column.id,b.column.getSize()]):[[r.id,r.getSize()]],u=gi(i)?Math.round(i.touches[0].clientX):i.clientX,c={},d=(b,w)=>{typeof w=="number"&&(t.setColumnSizingInfo(C=>{var E,x;const O=t.options.columnResizeDirection==="rtl"?-1:1,I=(w-((E=C==null?void 0:C.startOffset)!=null?E:0))*O,$=Math.max(I/((x=C==null?void 0:C.startSize)!=null?x:0),-.999999);return C.columnSizingStart.forEach(H=>{let[D,G]=H;c[D]=Math.round(Math.max(G+G*$,0)*100)/100}),{...C,deltaOffset:I,deltaPercentage:$}}),(t.options.columnResizeMode==="onChange"||b==="end")&&t.setColumnSizing(C=>({...C,...c})))},g=b=>d("move",b),m=b=>{d("end",b),t.setColumnSizingInfo(w=>({...w,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},f=n||typeof document<"u"?document:null,v={moveHandler:b=>g(b.clientX),upHandler:b=>{f==null||f.removeEventListener("mousemove",v.moveHandler),f==null||f.removeEventListener("mouseup",v.upHandler),m(b.clientX)}},h={moveHandler:b=>(b.cancelable&&(b.preventDefault(),b.stopPropagation()),g(b.touches[0].clientX),!1),upHandler:b=>{var w;f==null||f.removeEventListener("touchmove",h.moveHandler),f==null||f.removeEventListener("touchend",h.upHandler),b.cancelable&&(b.preventDefault(),b.stopPropagation()),m((w=b.touches[0])==null?void 0:w.clientX)}},y=vg()?{passive:!1}:!1;gi(i)?(f==null||f.addEventListener("touchmove",h.moveHandler,y),f==null||f.addEventListener("touchend",h.upHandler,y)):(f==null||f.addEventListener("mousemove",v.moveHandler,y),f==null||f.addEventListener("mouseup",v.upHandler,y)),t.setColumnSizingInfo(b=>({...b,startOffset:u,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?pi():(n=e.initialState.columnSizingInfo)!=null?n:pi())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0}}};let Rr=null;function vg(){if(typeof Rr=="boolean")return Rr;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return Rr=e,Rr}function gi(e){return e.type==="touchstart"}const yg={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:nt("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const o=e.columns;return(n=o.length?o.some(i=>i.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=fe(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),pe(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=fe(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],pe(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,r)=>fe(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),pe(e.options,"debugColumns",n));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,i)=>({...o,[i.id]:n||!(i.getCanHide!=null&&i.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function Qn(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const xg={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},bg={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:nt("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,o,i;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Rt.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Mr(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Rt[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},wg={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:nt("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var o,i;e.setExpanded(r?{}:(o=(i=e.initialState)==null?void 0:i.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const a=i.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var o;const i=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{a[s]=!0}):a=r,n=(o=n)!=null?o:!i,!i&&n)return{...a,[e.id]:!0};if(i&&!n){const{[e.id]:s,...u}=a;return u}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,o;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},mi=0,hi=10,vi=()=>({pageIndex:mi,pageSize:hi}),Cg={getInitialState:e=>({...e,pagination:{...vi(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:nt("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const o=i=>qt(r,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?vi():(o=e.initialState.pagination)!=null?o:vi())},e.setPageIndex=r=>{e.setPagination(o=>{let i=qt(r,o.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,a)),{...o,pageIndex:i}})},e.resetPageIndex=r=>{var o,i;e.setPageIndex(r?mi:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?o:mi)},e.resetPageSize=r=>{var o,i;e.setPageSize(r?hi:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?o:hi)},e.setPageSize=r=>{e.setPagination(o=>{const i=Math.max(1,qt(r,o.pageSize)),a=o.pageSize*o.pageIndex,s=Math.floor(a/i);return{...o,pageIndex:s,pageSize:i}})},e.setPageCount=r=>e.setPagination(o=>{var i;let a=qt(r,(i=e.options.pageCount)!=null?i:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...o,pageCount:a}}),e.getPageOptions=fe(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((i,a)=>a)),o},pe(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:r<o-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},yi=()=>({top:[],bottom:[]}),Sg={getInitialState:e=>({rowPinning:yi(),...e}),getDefaultOptions:e=>({onRowPinningChange:nt("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const i=r?e.getLeafRows().map(u=>{let{id:c}=u;return c}):[],a=o?e.getParentRows().map(u=>{let{id:c}=u;return c}):[],s=new Set([...a,e.id,...i]);t.setRowPinning(u=>{var c,d;if(n==="bottom"){var g,m;return{top:((g=u==null?void 0:u.top)!=null?g:[]).filter(h=>!(s!=null&&s.has(h))),bottom:[...((m=u==null?void 0:u.bottom)!=null?m:[]).filter(h=>!(s!=null&&s.has(h))),...Array.from(s)]}}if(n==="top"){var f,v;return{top:[...((f=u==null?void 0:u.top)!=null?f:[]).filter(h=>!(s!=null&&s.has(h))),...Array.from(s)],bottom:((v=u==null?void 0:u.bottom)!=null?v:[]).filter(h=>!(s!=null&&s.has(h)))}}return{top:((c=u==null?void 0:u.top)!=null?c:[]).filter(h=>!(s!=null&&s.has(h))),bottom:((d=u==null?void 0:u.bottom)!=null?d:[]).filter(h=>!(s!=null&&s.has(h)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return typeof r=="function"?r(e):(n=r??o)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,i=n.some(s=>r==null?void 0:r.includes(s)),a=n.some(s=>o==null?void 0:o.includes(s));return i?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const i=(n=o==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:s}=a;return s});return(r=i==null?void 0:i.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?yi():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:yi())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var o,i;return!!((o=r.top)!=null&&o.length||(i=r.bottom)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(n??[]).map(a=>{const s=e.getRow(a,!0);return s.getIsAllParentsExpanded()?s:null}):(n??[]).map(a=>t.find(s=>s.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=fe(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),pe(e.options,"debugRows","getTopRows")),e.getBottomRows=fe(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),pe(e.options,"debugRows","getBottomRows")),e.getCenterRows=fe(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const o=new Set([...n??[],...r??[]]);return t.filter(i=>!o.has(i.id))},pe(e.options,"debugRows","getCenterRows"))}},Eg={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:nt("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(i=>{i.getCanSelect()&&(r[i.id]=!0)}):o.forEach(i=>{delete r[i.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(i=>{xi(o,i.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=fe(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?bi(e,n):{rows:[],flatRows:[],rowsById:{}},pe(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=fe(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?bi(e,n):{rows:[],flatRows:[],rowsById:{}},pe(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=fe(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?bi(e,n):{rows:[],flatRows:[],rowsById:{}},pe(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(o=>o.getCanSelect()&&!n[o.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(o=>!n[o.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection(i=>{var a;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return i;const s={...i};return xi(s,e.id,n,(a=r==null?void 0:r.selectChildren)!=null?a:!0,t),s})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return wi(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Ci(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Ci(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var o;n&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},xi=(e,t,n,r,o)=>{var i;const a=o.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(i=a.subRows)!=null&&i.length&&a.getCanSelectSubRows()&&a.subRows.forEach(s=>xi(e,s.id,n,r,o))};function bi(e,t){const n=e.getState().rowSelection,r=[],o={},i=function(a,s){return a.map(u=>{var c;const d=wi(u,n);if(d&&(r.push(u),o[u.id]=u),(c=u.subRows)!=null&&c.length&&(u={...u,subRows:i(u.subRows)}),d)return u}).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:o}}function wi(e,t){var n;return(n=t[e.id])!=null?n:!1}function Ci(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let o=!0,i=!1;return e.subRows.forEach(a=>{if(!(i&&!o)&&(a.getCanSelect()&&(wi(a,t)?i=!0:o=!1),a.subRows&&a.subRows.length)){const s=Ci(a,t);s==="all"?i=!0:(s==="some"&&(i=!0),o=!1)}}),o?"all":i?"some":!1}const Si=/([0-9]+)/gm,_g=(e,t,n)=>Zs(Gt(e.getValue(n)).toLowerCase(),Gt(t.getValue(n)).toLowerCase()),Tg=(e,t,n)=>Zs(Gt(e.getValue(n)),Gt(t.getValue(n))),Ag=(e,t,n)=>Ei(Gt(e.getValue(n)).toLowerCase(),Gt(t.getValue(n)).toLowerCase()),Pg=(e,t,n)=>Ei(Gt(e.getValue(n)),Gt(t.getValue(n))),Ng=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},kg=(e,t,n)=>Ei(e.getValue(n),t.getValue(n));function Ei(e,t){return e===t?0:e>t?1:-1}function Gt(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Zs(e,t){const n=e.split(Si).filter(Boolean),r=t.split(Si).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),i=r.shift(),a=parseInt(o,10),s=parseInt(i,10),u=[a,s].sort();if(isNaN(u[0])){if(o>i)return 1;if(i>o)return-1;continue}if(isNaN(u[1]))return isNaN(a)?-1:1;if(a>s)return 1;if(s>a)return-1}return n.length-r.length}const er={alphanumeric:_g,alphanumericCaseSensitive:Tg,text:Ag,textCaseSensitive:Pg,datetime:Ng,basic:kg},Og=[cg,yg,gg,mg,ug,dg,xg,bg,{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:nt("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of n){const i=o==null?void 0:o.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return er.datetime;if(typeof i=="string"&&(r=!0,i.split(Si).length>1))return er.alphanumeric}return r?er.text:er.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return Mr(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:er[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),i=typeof n<"u"&&n!==null;t.setSorting(a=>{const s=a==null?void 0:a.find(f=>f.id===e.id),u=a==null?void 0:a.findIndex(f=>f.id===e.id);let c=[],d,g=i?n:o==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?s?d="toggle":d="add":a!=null&&a.length&&u!==a.length-1?d="replace":s?d="toggle":d="replace",d==="toggle"&&(i||o||(d="remove")),d==="add"){var m;c=[...a,{id:e.id,desc:g}],c.splice(0,c.length-((m=t.options.maxMultiSortColCount)!=null?m:Number.MAX_SAFE_INTEGER))}else d==="toggle"?c=a.map(f=>f.id===e.id?{...f,desc:g}:f):d==="remove"?c=a.filter(f=>f.id!==e.id):c=[{id:e.id,desc:g}];return c})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const i=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==i&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?!1:a==="desc"?"asc":"desc":i},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(o=>o.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},fg,wg,Cg,Sg,Eg,hg];function Fg(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...Og,...(t=e._features)!=null?t:[]];let o={_features:r};const i=o._features.reduce((m,f)=>Object.assign(m,f.getDefaultOptions==null?void 0:f.getDefaultOptions(o)),{}),a=m=>o.options.mergeOptions?o.options.mergeOptions(i,m):{...i,...m};let u={...{},...(n=e.initialState)!=null?n:{}};o._features.forEach(m=>{var f;u=(f=m.getInitialState==null?void 0:m.getInitialState(u))!=null?f:u});const c=[];let d=!1;const g={_features:r,options:{...i,...e},initialState:u,_queue:m=>{c.push(m),d||(d=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();d=!1}).catch(f=>setTimeout(()=>{throw f})))},reset:()=>{o.setState(o.initialState)},setOptions:m=>{const f=qt(m,o.options);o.options=a(f)},getState:()=>o.options.state,setState:m=>{o.options.onStateChange==null||o.options.onStateChange(m)},_getRowId:(m,f,v)=>{var h;return(h=o.options.getRowId==null?void 0:o.options.getRowId(m,f,v))!=null?h:`${v?[v.id,f].join("."):f}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(m,f)=>{let v=(f?o.getPrePaginationRowModel():o.getRowModel()).rowsById[m];if(!v&&(v=o.getCoreRowModel().rowsById[m],!v))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${m}`):new Error;return v},_getDefaultColumnDef:fe(()=>[o.options.defaultColumn],m=>{var f;return m=(f=m)!=null?f:{},{header:v=>{const h=v.header.column.columnDef;return h.accessorKey?h.accessorKey:h.accessorFn?h.id:null},cell:v=>{var h,y;return(h=(y=v.renderValue())==null||y.toString==null?void 0:y.toString())!=null?h:null},...o._features.reduce((v,h)=>Object.assign(v,h.getDefaultColumnDef==null?void 0:h.getDefaultColumnDef()),{}),...m}},pe(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>o.options.columns,getAllColumns:fe(()=>[o._getColumnDefs()],m=>{const f=function(v,h,y){return y===void 0&&(y=0),v.map(b=>{const w=lg(o,b,y,h),C=b;return w.columns=C.columns?f(C.columns,w,y+1):[],w})};return f(m)},pe(e,"debugColumns","getAllColumns")),getAllFlatColumns:fe(()=>[o.getAllColumns()],m=>m.flatMap(f=>f.getFlatColumns()),pe(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:fe(()=>[o.getAllFlatColumns()],m=>m.reduce((f,v)=>(f[v.id]=v,f),{}),pe(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:fe(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(m,f)=>{let v=m.flatMap(h=>h.getLeafColumns());return f(v)},pe(e,"debugColumns","getAllLeafColumns")),getColumn:m=>{const f=o._getAllFlatColumnsById()[m];return process.env.NODE_ENV!=="production"&&!f&&console.error(`[Table] Column with id '${m}' does not exist.`),f}};Object.assign(o,g);for(let m=0;m<o._features.length;m++){const f=o._features[m];f==null||f.createTable==null||f.createTable(o)}return o}function Qs(){return e=>fe(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,i,a){i===void 0&&(i=0);const s=[];for(let c=0;c<o.length;c++){const d=ci(e,e._getRowId(o[c],c,a),o[c],c,i,void 0,a==null?void 0:a.id);if(n.flatRows.push(d),n.rowsById[d.id]=d,s.push(d),e.options.getSubRows){var u;d.originalSubRows=e.options.getSubRows(o[c],c),(u=d.originalSubRows)!=null&&u.length&&(d.subRows=r(d.originalSubRows,i+1,d))}}return s};return n.rows=r(t),n},pe(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function Dg(e,t,n){return n.options.filterFromLeafRows?Ig(e,t,n):Mg(e,t,n)}function Ig(e,t,n){var r;const o=[],i={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,s=function(u,c){c===void 0&&(c=0);const d=[];for(let m=0;m<u.length;m++){var g;let f=u[m];const v=ci(n,f.id,f.original,f.index,f.depth,void 0,f.parentId);if(v.columnFilters=f.columnFilters,(g=f.subRows)!=null&&g.length&&c<a){if(v.subRows=s(f.subRows,c+1),f=v,t(f)&&!v.subRows.length){d.push(f),i[f.id]=f,o.push(f);continue}if(t(f)||v.subRows.length){d.push(f),i[f.id]=f,o.push(f);continue}}else f=v,t(f)&&(d.push(f),i[f.id]=f,o.push(f))}return d};return{rows:s(e),flatRows:o,rowsById:i}}function Mg(e,t,n){var r;const o=[],i={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,s=function(u,c){c===void 0&&(c=0);const d=[];for(let m=0;m<u.length;m++){let f=u[m];if(t(f)){var g;if((g=f.subRows)!=null&&g.length&&c<a){const h=ci(n,f.id,f.original,f.index,f.depth,void 0,f.parentId);h.subRows=s(f.subRows,c+1),f=h}d.push(f),o.push(f),i[f.id]=f}}return d};return{rows:s(e),flatRows:o,rowsById:i}}function $g(){return e=>fe(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let m=0;m<t.flatRows.length;m++)t.flatRows[m].columnFilters={},t.flatRows[m].columnFiltersMeta={};return t}const o=[],i=[];(n??[]).forEach(m=>{var f;const v=e.getColumn(m.id);if(!v)return;const h=v.getFilterFn();if(!h){process.env.NODE_ENV!=="production"&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${v.id}.`);return}o.push({id:m.id,filterFn:h,resolvedValue:(f=h.resolveFilterValue==null?void 0:h.resolveFilterValue(m.value))!=null?f:m.value})});const a=(n??[]).map(m=>m.id),s=e.getGlobalFilterFn(),u=e.getAllLeafColumns().filter(m=>m.getCanGlobalFilter());r&&s&&u.length&&(a.push("__global__"),u.forEach(m=>{var f;i.push({id:m.id,filterFn:s,resolvedValue:(f=s.resolveFilterValue==null?void 0:s.resolveFilterValue(r))!=null?f:r})}));let c,d;for(let m=0;m<t.flatRows.length;m++){const f=t.flatRows[m];if(f.columnFilters={},o.length)for(let v=0;v<o.length;v++){c=o[v];const h=c.id;f.columnFilters[h]=c.filterFn(f,h,c.resolvedValue,y=>{f.columnFiltersMeta[h]=y})}if(i.length){for(let v=0;v<i.length;v++){d=i[v];const h=d.id;if(d.filterFn(f,h,d.resolvedValue,y=>{f.columnFiltersMeta[h]=y})){f.columnFilters.__global__=!0;break}}f.columnFilters.__global__!==!0&&(f.columnFilters.__global__=!1)}}const g=m=>{for(let f=0;f<a.length;f++)if(m.columnFilters[a[f]]===!1)return!1;return!0};return Dg(t.rows,g,e)},pe(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function Lg(){return e=>fe(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,o=[],i=r.filter(u=>{var c;return(c=e.getColumn(u.id))==null?void 0:c.getCanSort()}),a={};i.forEach(u=>{const c=e.getColumn(u.id);c&&(a[u.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const s=u=>{const c=u.map(d=>({...d}));return c.sort((d,g)=>{for(let f=0;f<i.length;f+=1){var m;const v=i[f],h=a[v.id],y=h.sortUndefined,b=(m=v==null?void 0:v.desc)!=null?m:!1;let w=0;if(y){const C=d.getValue(v.id),E=g.getValue(v.id),x=C===void 0,O=E===void 0;if(x||O){if(y==="first")return x?-1:1;if(y==="last")return x?1:-1;w=x&&O?0:x?y:-y}}if(w===0&&(w=h.sortingFn(d,g,v.id)),w!==0)return b&&(w*=-1),h.invertSorting&&(w*=-1),w}return d.index-g.index}),c.forEach(d=>{var g;o.push(d),(g=d.subRows)!=null&&g.length&&(d.subRows=s(d.subRows))}),c};return{rows:s(n.rows),flatRows:o,rowsById:n.rowsById}},pe(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
14
14
  * react-table
15
15
  *
16
16
  * Copyright (c) TanStack
@@ -19,32 +19,32 @@
19
19
  * LICENSE.md file in the root directory of this source tree.
20
20
  *
21
21
  * @license MIT
22
- */function Vr(e,t){return e?Lg(e)?p.createElement(e,t):e:null}function Lg(e){return Rg(e)||typeof e=="function"||Vg(e)}function Rg(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Vg(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Zs(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=p.useState(()=>({current:Og(t)})),[r,o]=p.useState(()=>n.current.initialState);return n.current.setOptions(i=>({...i,...e,state:{...r,...e.state},onStateChange:a=>{o(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}function Qs(e,t){return function(){return e.apply(t,arguments)}}const{toString:jg}=Object.prototype,{getPrototypeOf:_i}=Object,jr=(e=>t=>{const n=jg.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),pt=e=>(e=e.toLowerCase(),t=>jr(t)===e),zr=e=>t=>typeof t===e,{isArray:Tn}=Array,tr=zr("undefined");function zg(e){return e!==null&&!tr(e)&&e.constructor!==null&&!tr(e.constructor)&&rt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const el=pt("ArrayBuffer");function Bg(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&el(e.buffer),t}const Hg=zr("string"),rt=zr("function"),tl=zr("number"),Br=e=>e!==null&&typeof e=="object",Ug=e=>e===!0||e===!1,Hr=e=>{if(jr(e)!=="object")return!1;const t=_i(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Wg=pt("Date"),qg=pt("File"),Gg=pt("Blob"),Kg=pt("FileList"),Yg=e=>Br(e)&&rt(e.pipe),Xg=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||rt(e.append)&&((t=jr(e))==="formdata"||t==="object"&&rt(e.toString)&&e.toString()==="[object FormData]"))},Jg=pt("URLSearchParams"),[Zg,Qg,em,tm]=["ReadableStream","Request","Response","Headers"].map(pt),nm=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function nr(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Tn(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let s;for(r=0;r<a;r++)s=i[r],t.call(null,e[s],s,e)}}function nl(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const dn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,rl=e=>!tr(e)&&e!==dn;function Ti(){const{caseless:e}=rl(this)&&this||{},t={},n=(r,o)=>{const i=e&&nl(t,o)||o;Hr(t[i])&&Hr(r)?t[i]=Ti(t[i],r):Hr(r)?t[i]=Ti({},r):Tn(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&nr(arguments[r],n);return t}const rm=(e,t,n,{allOwnKeys:r}={})=>(nr(t,(o,i)=>{n&&rt(o)?e[i]=Qs(o,n):e[i]=o},{allOwnKeys:r}),e),om=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),im=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},am=(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&_i(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},sm=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},lm=e=>{if(!e)return null;if(Tn(e))return e;let t=e.length;if(!tl(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},cm=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&_i(Uint8Array)),um=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},dm=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},fm=pt("HTMLFormElement"),pm=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),ol=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),gm=pt("RegExp"),il=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};nr(n,(o,i)=>{let a;(a=t(o,i,e))!==!1&&(r[i]=a||o)}),Object.defineProperties(e,r)},mm=e=>{il(e,(t,n)=>{if(rt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(rt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},hm=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Tn(e)?r(e):r(String(e).split(t)),n},vm=()=>{},ym=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Ai="abcdefghijklmnopqrstuvwxyz",al="0123456789",sl={DIGIT:al,ALPHA:Ai,ALPHA_DIGIT:Ai+Ai.toUpperCase()+al},xm=(e=16,t=sl.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function bm(e){return!!(e&&rt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const wm=e=>{const t=new Array(10),n=(r,o)=>{if(Br(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=Tn(r)?[]:{};return nr(r,(a,s)=>{const u=n(a,o+1);!tr(u)&&(i[s]=u)}),t[o]=void 0,i}}return r};return n(e,0)},Cm=pt("AsyncFunction"),Sm=e=>e&&(Br(e)||rt(e))&&rt(e.then)&&rt(e.catch),ll=((e,t)=>e?setImmediate:t?((n,r)=>(dn.addEventListener("message",({source:o,data:i})=>{o===dn&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),dn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",rt(dn.postMessage)),Em=typeof queueMicrotask<"u"?queueMicrotask.bind(dn):typeof process<"u"&&process.nextTick||ll,R={isArray:Tn,isArrayBuffer:el,isBuffer:zg,isFormData:Xg,isArrayBufferView:Bg,isString:Hg,isNumber:tl,isBoolean:Ug,isObject:Br,isPlainObject:Hr,isReadableStream:Zg,isRequest:Qg,isResponse:em,isHeaders:tm,isUndefined:tr,isDate:Wg,isFile:qg,isBlob:Gg,isRegExp:gm,isFunction:rt,isStream:Yg,isURLSearchParams:Jg,isTypedArray:cm,isFileList:Kg,forEach:nr,merge:Ti,extend:rm,trim:nm,stripBOM:om,inherits:im,toFlatObject:am,kindOf:jr,kindOfTest:pt,endsWith:sm,toArray:lm,forEachEntry:um,matchAll:dm,isHTMLForm:fm,hasOwnProperty:ol,hasOwnProp:ol,reduceDescriptors:il,freezeMethods:mm,toObjectSet:hm,toCamelCase:pm,noop:vm,toFiniteNumber:ym,findKey:nl,global:dn,isContextDefined:rl,ALPHABET:sl,generateString:xm,isSpecCompliantForm:bm,toJSONObject:wm,isAsyncFn:Cm,isThenable:Sm,setImmediate:ll,asap:Em};function ye(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}R.inherits(ye,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:R.toJSONObject(this.config),code:this.code,status:this.status}}});const cl=ye.prototype,ul={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{ul[e]={value:e}}),Object.defineProperties(ye,ul),Object.defineProperty(cl,"isAxiosError",{value:!0}),ye.from=(e,t,n,r,o,i)=>{const a=Object.create(cl);return R.toFlatObject(e,a,function(u){return u!==Error.prototype},s=>s!=="isAxiosError"),ye.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const _m=null;function Pi(e){return R.isPlainObject(e)||R.isArray(e)}function dl(e){return R.endsWith(e,"[]")?e.slice(0,-2):e}function fl(e,t,n){return e?e.concat(t).map(function(o,i){return o=dl(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function Tm(e){return R.isArray(e)&&!e.some(Pi)}const Am=R.toFlatObject(R,{},null,function(t){return/^is[A-Z]/.test(t)});function Ur(e,t,n){if(!R.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=R.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,y){return!R.isUndefined(y[h])});const r=n.metaTokens,o=n.visitor||d,i=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&R.isSpecCompliantForm(t);if(!R.isFunction(o))throw new TypeError("visitor must be a function");function c(v){if(v===null)return"";if(R.isDate(v))return v.toISOString();if(!u&&R.isBlob(v))throw new ye("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(v)||R.isTypedArray(v)?u&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function d(v,h,y){let b=v;if(v&&!y&&typeof v=="object"){if(R.endsWith(h,"{}"))h=r?h:h.slice(0,-2),v=JSON.stringify(v);else if(R.isArray(v)&&Tm(v)||(R.isFileList(v)||R.endsWith(h,"[]"))&&(b=R.toArray(v)))return h=dl(h),b.forEach(function(C,E){!(R.isUndefined(C)||C===null)&&t.append(a===!0?fl([h],E,i):a===null?h:h+"[]",c(C))}),!1}return Pi(v)?!0:(t.append(fl(y,h,i),c(v)),!1)}const g=[],m=Object.assign(Am,{defaultVisitor:d,convertValue:c,isVisitable:Pi});function f(v,h){if(!R.isUndefined(v)){if(g.indexOf(v)!==-1)throw Error("Circular reference detected in "+h.join("."));g.push(v),R.forEach(v,function(b,w){(!(R.isUndefined(b)||b===null)&&o.call(t,b,R.isString(w)?w.trim():w,h,m))===!0&&f(b,h?h.concat(w):[w])}),g.pop()}}if(!R.isObject(e))throw new TypeError("data must be an object");return f(e),t}function pl(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ni(e,t){this._pairs=[],e&&Ur(e,this,t)}const gl=Ni.prototype;gl.append=function(t,n){this._pairs.push([t,n])},gl.toString=function(t){const n=t?function(r){return t.call(this,r,pl)}:pl;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Pm(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ml(e,t,n){if(!t)return e;const r=n&&n.encode||Pm;R.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(t,n):i=R.isURLSearchParams(t)?t.toString():new Ni(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class hl{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){R.forEach(this.handlers,function(r){r!==null&&t(r)})}}const vl={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Nm={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ni,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},ki=typeof window<"u"&&typeof document<"u",Oi=typeof navigator=="object"&&navigator||void 0,km=ki&&(!Oi||["ReactNative","NativeScript","NS"].indexOf(Oi.product)<0),Om=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Fm=ki&&window.location.href||"http://localhost",Ue={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ki,hasStandardBrowserEnv:km,hasStandardBrowserWebWorkerEnv:Om,navigator:Oi,origin:Fm},Symbol.toStringTag,{value:"Module"})),...Nm};function Dm(e,t){return Ur(e,new Ue.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return Ue.isNode&&R.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Im(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Mm(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function yl(e){function t(n,r,o,i){let a=n[i++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),u=i>=n.length;return a=!a&&R.isArray(o)?o.length:a,u?(R.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!s):((!o[a]||!R.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],i)&&R.isArray(o[a])&&(o[a]=Mm(o[a])),!s)}if(R.isFormData(e)&&R.isFunction(e.entries)){const n={};return R.forEachEntry(e,(r,o)=>{t(Im(r),o,n,0)}),n}return null}function $m(e,t,n){if(R.isString(e))try{return(t||JSON.parse)(e),R.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const rr={transitional:vl,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=R.isObject(t);if(i&&R.isHTMLForm(t)&&(t=new FormData(t)),R.isFormData(t))return o?JSON.stringify(yl(t)):t;if(R.isArrayBuffer(t)||R.isBuffer(t)||R.isStream(t)||R.isFile(t)||R.isBlob(t)||R.isReadableStream(t))return t;if(R.isArrayBufferView(t))return t.buffer;if(R.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Dm(t,this.formSerializer).toString();if((s=R.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Ur(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),$m(t)):t}],transformResponse:[function(t){const n=this.transitional||rr.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(R.isResponse(t)||R.isReadableStream(t))return t;if(t&&R.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?ye.from(s,ye.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ue.classes.FormData,Blob:Ue.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};R.forEach(["delete","get","head","post","put","patch"],e=>{rr.headers[e]={}});const Lm=R.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Rm=e=>{const t={};let n,r,o;return e&&e.split(`
23
- `).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&Lm[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},xl=Symbol("internals");function or(e){return e&&String(e).trim().toLowerCase()}function Wr(e){return e===!1||e==null?e:R.isArray(e)?e.map(Wr):String(e)}function Vm(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const jm=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Fi(e,t,n,r,o){if(R.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!R.isString(t)){if(R.isString(r))return t.indexOf(r)!==-1;if(R.isRegExp(r))return r.test(t)}}function zm(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Bm(e,t){const n=R.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,a){return this[r].call(this,t,o,i,a)},configurable:!0})})}class Je{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(s,u,c){const d=or(u);if(!d)throw new Error("header name must be a non-empty string");const g=R.findKey(o,d);(!g||o[g]===void 0||c===!0||c===void 0&&o[g]!==!1)&&(o[g||u]=Wr(s))}const a=(s,u)=>R.forEach(s,(c,d)=>i(c,d,u));if(R.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(R.isString(t)&&(t=t.trim())&&!jm(t))a(Rm(t),n);else if(R.isHeaders(t))for(const[s,u]of t.entries())i(u,s,r);else t!=null&&i(n,t,r);return this}get(t,n){if(t=or(t),t){const r=R.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Vm(o);if(R.isFunction(n))return n.call(this,o,r);if(R.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=or(t),t){const r=R.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Fi(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=or(a),a){const s=R.findKey(r,a);s&&(!n||Fi(r,r[s],s,n))&&(delete r[s],o=!0)}}return R.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||Fi(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return R.forEach(this,(o,i)=>{const a=R.findKey(r,i);if(a){n[a]=Wr(o),delete n[i];return}const s=t?zm(i):String(i).trim();s!==i&&delete n[i],n[s]=Wr(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return R.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&R.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
24
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[xl]=this[xl]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=or(a);r[s]||(Bm(o,a),r[s]=!0)}return R.isArray(t)?t.forEach(i):i(t),this}}Je.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),R.reduceDescriptors(Je.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),R.freezeMethods(Je);function Di(e,t){const n=this||rr,r=t||n,o=Je.from(r.headers);let i=r.data;return R.forEach(e,function(s){i=s.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function bl(e){return!!(e&&e.__CANCEL__)}function An(e,t,n){ye.call(this,e??"canceled",ye.ERR_CANCELED,t,n),this.name="CanceledError"}R.inherits(An,ye,{__CANCEL__:!0});function wl(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ye("Request failed with status code "+n.status,[ye.ERR_BAD_REQUEST,ye.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Hm(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Um(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(u){const c=Date.now(),d=r[i];a||(a=c),n[o]=u,r[o]=c;let g=i,m=0;for(;g!==o;)m+=n[g++],g=g%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-a<t)return;const f=d&&c-d;return f?Math.round(m*1e3/f):void 0}}function Wm(e,t){let n=0,r=1e3/t,o,i;const a=(c,d=Date.now())=>{n=d,o=null,i&&(clearTimeout(i),i=null),e.apply(null,c)};return[(...c)=>{const d=Date.now(),g=d-n;g>=r?a(c,d):(o=c,i||(i=setTimeout(()=>{i=null,a(o)},r-g)))},()=>o&&a(o)]}const qr=(e,t,n=3)=>{let r=0;const o=Um(50,250);return Wm(i=>{const a=i.loaded,s=i.lengthComputable?i.total:void 0,u=a-r,c=o(u),d=a<=s;r=a;const g={loaded:a,total:s,progress:s?a/s:void 0,bytes:u,rate:c||void 0,estimated:c&&s&&d?(s-a)/c:void 0,event:i,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(g)},n)},Cl=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Sl=e=>(...t)=>R.asap(()=>e(...t)),qm=Ue.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ue.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ue.origin),Ue.navigator&&/(msie|trident)/i.test(Ue.navigator.userAgent)):()=>!0,Gm=Ue.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];R.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),R.isString(r)&&a.push("path="+r),R.isString(o)&&a.push("domain="+o),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Km(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ym(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function El(e,t){return e&&!Km(t)?Ym(e,t):t}const _l=e=>e instanceof Je?{...e}:e;function fn(e,t){t=t||{};const n={};function r(c,d,g,m){return R.isPlainObject(c)&&R.isPlainObject(d)?R.merge.call({caseless:m},c,d):R.isPlainObject(d)?R.merge({},d):R.isArray(d)?d.slice():d}function o(c,d,g,m){if(R.isUndefined(d)){if(!R.isUndefined(c))return r(void 0,c,g,m)}else return r(c,d,g,m)}function i(c,d){if(!R.isUndefined(d))return r(void 0,d)}function a(c,d){if(R.isUndefined(d)){if(!R.isUndefined(c))return r(void 0,c)}else return r(void 0,d)}function s(c,d,g){if(g in t)return r(c,d);if(g in e)return r(void 0,c)}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(c,d,g)=>o(_l(c),_l(d),g,!0)};return R.forEach(Object.keys(Object.assign({},e,t)),function(d){const g=u[d]||o,m=g(e[d],t[d],d);R.isUndefined(m)&&g!==s||(n[d]=m)}),n}const Tl=e=>{const t=fn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;t.headers=a=Je.from(a),t.url=ml(El(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let u;if(R.isFormData(n)){if(Ue.hasStandardBrowserEnv||Ue.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){const[c,...d]=u?u.split(";").map(g=>g.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...d].join("; "))}}if(Ue.hasStandardBrowserEnv&&(r&&R.isFunction(r)&&(r=r(t)),r||r!==!1&&qm(t.url))){const c=o&&i&&Gm.read(i);c&&a.set(o,c)}return t},Xm=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=Tl(e);let i=o.data;const a=Je.from(o.headers).normalize();let{responseType:s,onUploadProgress:u,onDownloadProgress:c}=o,d,g,m,f,v;function h(){f&&f(),v&&v(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let y=new XMLHttpRequest;y.open(o.method.toUpperCase(),o.url,!0),y.timeout=o.timeout;function b(){if(!y)return;const C=Je.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),x={data:!s||s==="text"||s==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:C,config:e,request:y};wl(function(I){n(I),h()},function(I){r(I),h()},x),y=null}"onloadend"in y?y.onloadend=b:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(b)},y.onabort=function(){y&&(r(new ye("Request aborted",ye.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new ye("Network Error",ye.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let E=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const x=o.transitional||vl;o.timeoutErrorMessage&&(E=o.timeoutErrorMessage),r(new ye(E,x.clarifyTimeoutError?ye.ETIMEDOUT:ye.ECONNABORTED,e,y)),y=null},i===void 0&&a.setContentType(null),"setRequestHeader"in y&&R.forEach(a.toJSON(),function(E,x){y.setRequestHeader(x,E)}),R.isUndefined(o.withCredentials)||(y.withCredentials=!!o.withCredentials),s&&s!=="json"&&(y.responseType=o.responseType),c&&([m,v]=qr(c,!0),y.addEventListener("progress",m)),u&&y.upload&&([g,f]=qr(u),y.upload.addEventListener("progress",g),y.upload.addEventListener("loadend",f)),(o.cancelToken||o.signal)&&(d=C=>{y&&(r(!C||C.type?new An(null,e,y):C),y.abort(),y=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const w=Hm(o.url);if(w&&Ue.protocols.indexOf(w)===-1){r(new ye("Unsupported protocol "+w+":",ye.ERR_BAD_REQUEST,e));return}y.send(i||null)})},Jm=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(c){if(!o){o=!0,s();const d=c instanceof Error?c:this.reason;r.abort(d instanceof ye?d:new An(d instanceof Error?d.message:d))}};let a=t&&setTimeout(()=>{a=null,i(new ye(`timeout ${t} of ms exceeded`,ye.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));const{signal:u}=r;return u.unsubscribe=()=>R.asap(s),u}},Zm=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Qm=async function*(e,t){for await(const n of eh(e))yield*Zm(n,t)},eh=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Al=(e,t,n,r)=>{const o=Qm(e,t);let i=0,a,s=u=>{a||(a=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:c,value:d}=await o.next();if(c){s(),u.close();return}let g=d.byteLength;if(n){let m=i+=g;n(m)}u.enqueue(new Uint8Array(d))}catch(c){throw s(c),c}},cancel(u){return s(u),o.return()}},{highWaterMark:2})},Gr=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Pl=Gr&&typeof ReadableStream=="function",th=Gr&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Nl=(e,...t)=>{try{return!!e(...t)}catch{return!1}},nh=Pl&&Nl(()=>{let e=!1;const t=new Request(Ue.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),kl=64*1024,Ii=Pl&&Nl(()=>R.isReadableStream(new Response("").body)),Kr={stream:Ii&&(e=>e.body)};Gr&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Kr[t]&&(Kr[t]=R.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new ye(`Response type '${t}' is not supported`,ye.ERR_NOT_SUPPORT,r)})})})(new Response);const rh=async e=>{if(e==null)return 0;if(R.isBlob(e))return e.size;if(R.isSpecCompliantForm(e))return(await new Request(Ue.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(R.isArrayBufferView(e)||R.isArrayBuffer(e))return e.byteLength;if(R.isURLSearchParams(e)&&(e=e+""),R.isString(e))return(await th(e)).byteLength},oh=async(e,t)=>{const n=R.toFiniteNumber(e.getContentLength());return n??rh(t)},Mi={http:_m,xhr:Xm,fetch:Gr&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:u,responseType:c,headers:d,withCredentials:g="same-origin",fetchOptions:m}=Tl(e);c=c?(c+"").toLowerCase():"text";let f=Jm([o,i&&i.toAbortSignal()],a),v;const h=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let y;try{if(u&&nh&&n!=="get"&&n!=="head"&&(y=await oh(d,r))!==0){let x=new Request(t,{method:"POST",body:r,duplex:"half"}),O;if(R.isFormData(r)&&(O=x.headers.get("content-type"))&&d.setContentType(O),x.body){const[I,L]=Cl(y,qr(Sl(u)));r=Al(x.body,kl,I,L)}}R.isString(g)||(g=g?"include":"omit");const b="credentials"in Request.prototype;v=new Request(t,{...m,signal:f,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:b?g:void 0});let w=await fetch(v);const C=Ii&&(c==="stream"||c==="response");if(Ii&&(s||C&&h)){const x={};["status","statusText","headers"].forEach(H=>{x[H]=w[H]});const O=R.toFiniteNumber(w.headers.get("content-length")),[I,L]=s&&Cl(O,qr(Sl(s),!0))||[];w=new Response(Al(w.body,kl,I,()=>{L&&L(),h&&h()}),x)}c=c||"text";let E=await Kr[R.findKey(Kr,c)||"text"](w,e);return!C&&h&&h(),await new Promise((x,O)=>{wl(x,O,{data:E,headers:Je.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:v})})}catch(b){throw h&&h(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new ye("Network Error",ye.ERR_NETWORK,e,v),{cause:b.cause||b}):ye.from(b,b&&b.code,e,v)}})};R.forEach(Mi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ol=e=>`- ${e}`,ih=e=>R.isFunction(e)||e===null||e===!1,Fl={getAdapter:e=>{e=R.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){n=e[i];let a;if(r=n,!ih(n)&&(r=Mi[(a=String(n)).toLowerCase()],r===void 0))throw new ye(`Unknown adapter '${a}'`);if(r)break;o[a||"#"+i]=r}if(!r){const i=Object.entries(o).map(([s,u])=>`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since :
25
- `+i.map(Ol).join(`
26
- `):" "+Ol(i[0]):"as no adapter specified";throw new ye("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Mi};function $i(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new An(null,e)}function Dl(e){return $i(e),e.headers=Je.from(e.headers),e.data=Di.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Fl.getAdapter(e.adapter||rr.adapter)(e).then(function(r){return $i(e),r.data=Di.call(e,e.transformResponse,r),r.headers=Je.from(r.headers),r},function(r){return bl(r)||($i(e),r&&r.response&&(r.response.data=Di.call(e,e.transformResponse,r.response),r.response.headers=Je.from(r.response.headers))),Promise.reject(r)})}const Il="1.7.9",Yr={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Yr[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ml={};Yr.transitional=function(t,n,r){function o(i,a){return"[Axios v"+Il+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,s)=>{if(t===!1)throw new ye(o(a," has been removed"+(n?" in "+n:"")),ye.ERR_DEPRECATED);return n&&!Ml[a]&&(Ml[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,s):!0}},Yr.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function ah(e,t,n){if(typeof e!="object")throw new ye("options must be an object",ye.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const s=e[i],u=s===void 0||a(s,i,e);if(u!==!0)throw new ye("option "+i+" must be "+u,ye.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ye("Unknown option "+i,ye.ERR_BAD_OPTION)}}const Xr={assertOptions:ah,validators:Yr},bt=Xr.validators;class pn{constructor(t){this.defaults=t,this.interceptors={request:new hl,response:new hl}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
27
- `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=fn(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&Xr.assertOptions(r,{silentJSONParsing:bt.transitional(bt.boolean),forcedJSONParsing:bt.transitional(bt.boolean),clarifyTimeoutError:bt.transitional(bt.boolean)},!1),o!=null&&(R.isFunction(o)?n.paramsSerializer={serialize:o}:Xr.assertOptions(o,{encode:bt.function,serialize:bt.function},!0)),Xr.assertOptions(n,{baseUrl:bt.spelling("baseURL"),withXsrfToken:bt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&R.merge(i.common,i[n.method]);i&&R.forEach(["delete","get","head","post","put","patch","common"],v=>{delete i[v]}),n.headers=Je.concat(a,i);const s=[];let u=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(u=u&&h.synchronous,s.unshift(h.fulfilled,h.rejected))});const c=[];this.interceptors.response.forEach(function(h){c.push(h.fulfilled,h.rejected)});let d,g=0,m;if(!u){const v=[Dl.bind(this),void 0];for(v.unshift.apply(v,s),v.push.apply(v,c),m=v.length,d=Promise.resolve(n);g<m;)d=d.then(v[g++],v[g++]);return d}m=s.length;let f=n;for(g=0;g<m;){const v=s[g++],h=s[g++];try{f=v(f)}catch(y){h.call(this,y);break}}try{d=Dl.call(this,f)}catch(v){return Promise.reject(v)}for(g=0,m=c.length;g<m;)d=d.then(c[g++],c[g++]);return d}getUri(t){t=fn(this.defaults,t);const n=El(t.baseURL,t.url);return ml(n,t.params,t.paramsSerializer)}}R.forEach(["delete","get","head","options"],function(t){pn.prototype[t]=function(n,r){return this.request(fn(r||{},{method:t,url:n,data:(r||{}).data}))}}),R.forEach(["post","put","patch"],function(t){function n(r){return function(i,a,s){return this.request(fn(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}pn.prototype[t]=n(),pn.prototype[t+"Form"]=n(!0)});class Li{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,s){r.reason||(r.reason=new An(i,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Li(function(o){t=o}),cancel:t}}}function sh(e){return function(n){return e.apply(null,n)}}function lh(e){return R.isObject(e)&&e.isAxiosError===!0}const Ri={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ri).forEach(([e,t])=>{Ri[t]=e});function $l(e){const t=new pn(e),n=Qs(pn.prototype.request,t);return R.extend(n,pn.prototype,t,{allOwnKeys:!0}),R.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return $l(fn(e,o))},n}const me=$l(rr);me.Axios=pn,me.CanceledError=An,me.CancelToken=Li,me.isCancel=bl,me.VERSION=Il,me.toFormData=Ur,me.AxiosError=ye,me.Cancel=me.CanceledError,me.all=function(t){return Promise.all(t)},me.spread=sh,me.isAxiosError=lh,me.mergeConfig=fn,me.AxiosHeaders=Je,me.formToJSON=e=>yl(R.isHTMLForm(e)?new FormData(e):e),me.getAdapter=Fl.getAdapter,me.HttpStatusCode=Ri,me.default=me;var ir=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Jr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const ch=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);var uh=e=>!ch.has(e&&e.code);const dh=Jr(uh),Vi="axios-retry";function Ll(e){const t=["ERR_CANCELED","ECONNABORTED"];return e.response||!e.code||t.includes(e.code)?!1:dh(e)}const Rl=["get","head","options"],fh=Rl.concat(["put","delete"]);function ji(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status===429||e.response.status>=500&&e.response.status<=599)}function ph(e){var t;return(t=e.config)!=null&&t.method?ji(e)&&Rl.indexOf(e.config.method)!==-1:!1}function Vl(e){var t;return(t=e.config)!=null&&t.method?ji(e)&&fh.indexOf(e.config.method)!==-1:!1}function jl(e){return Ll(e)||Vl(e)}function zi(e=void 0){var r;const t=(r=e==null?void 0:e.response)==null?void 0:r.headers["retry-after"];if(!t)return 0;let n=(Number(t)||0)*1e3;return n===0&&(n=(new Date(t).valueOf()||0)-Date.now()),Math.max(0,n)}function gh(e=0,t=void 0){return Math.max(0,zi(t))}function mh(e=0,t=void 0,n=100){const r=2**e*n,o=Math.max(r,zi(t)),i=o*.2*Math.random();return o+i}function hh(e=100){return(t=0,n=void 0)=>{const r=t*e;return Math.max(r,zi(n))}}const vh={retries:3,retryCondition:jl,retryDelay:gh,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function yh(e,t){return{...vh,...t,...e[Vi]}}function zl(e,t,n=!1){const r=yh(e,t||{});return r.retryCount=r.retryCount||0,(!r.lastRequestTime||n)&&(r.lastRequestTime=Date.now()),e[Vi]=r,r}function xh(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}async function bh(e,t){const{retries:n,retryCondition:r}=e,o=(e.retryCount||0)<n&&r(t);if(typeof o=="object")try{return await o!==!1}catch{return!1}return o}async function wh(e,t,n,r){var u;t.retryCount+=1;const{retryDelay:o,shouldResetTimeout:i,onRetry:a}=t,s=o(t.retryCount,n);if(xh(e,r),!i&&r.timeout&&t.lastRequestTime){const c=Date.now()-t.lastRequestTime,d=r.timeout-c-s;if(d<=0)return Promise.reject(n);r.timeout=d}return r.transformRequest=[c=>c],await a(t.retryCount,n,r),(u=r.signal)!=null&&u.aborted?Promise.resolve(e(r)):new Promise(c=>{var m;const d=()=>{clearTimeout(g),c(e(r))},g=setTimeout(()=>{var f;c(e(r)),(f=r.signal)!=null&&f.removeEventListener&&r.signal.removeEventListener("abort",d)},s);(m=r.signal)!=null&&m.addEventListener&&r.signal.addEventListener("abort",d,{once:!0})})}async function Ch(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}const Kt=(e,t)=>{const n=e.interceptors.request.use(o=>{var i;return zl(o,t,!0),(i=o[Vi])!=null&&i.validateResponse&&(o.validateStatus=()=>!1),o}),r=e.interceptors.response.use(null,async o=>{var s;const{config:i}=o;if(!i)return Promise.reject(o);const a=zl(i,t);return o.response&&((s=a.validateResponse)!=null&&s.call(a,o.response))?o.response:await bh(a,o)?wh(e,a,o,i):(await Ch(a,o),Promise.reject(o))});return{requestInterceptorId:n,responseInterceptorId:r}};Kt.isNetworkError=Ll,Kt.isSafeRequestError=ph,Kt.isIdempotentRequestError=Vl,Kt.isNetworkOrIdempotentRequestError=jl,Kt.exponentialDelay=mh,Kt.linearDelay=hh,Kt.isRetryableError=ji;var Bl={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ir,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",a="second",s="minute",u="hour",c="day",d="week",g="month",m="quarter",f="year",v="date",h="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(k){var $=["th","st","nd","rd"],F=k%100;return"["+k+($[(F-20)%10]||$[F]||$[0])+"]"}},C=function(k,$,F){var q=String(k);return!q||q.length>=$?k:""+Array($+1-q.length).join(F)+k},E={s:C,z:function(k){var $=-k.utcOffset(),F=Math.abs($),q=Math.floor(F/60),P=F%60;return($<=0?"+":"-")+C(q,2,"0")+":"+C(P,2,"0")},m:function k($,F){if($.date()<F.date())return-k(F,$);var q=12*(F.year()-$.year())+(F.month()-$.month()),P=$.clone().add(q,g),j=F-P<0,A=$.clone().add(q+(j?-1:1),g);return+(-(q+(F-P)/(j?P-A:A-P))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:g,y:f,w:d,d:c,D:v,h:u,m:s,s:a,ms:i,Q:m}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},x="en",O={};O[x]=w;var I="$isDayjsObject",L=function(k){return k instanceof U||!(!k||!k[I])},H=function k($,F,q){var P;if(!$)return x;if(typeof $=="string"){var j=$.toLowerCase();O[j]&&(P=j),F&&(O[j]=F,P=j);var A=$.split("-");if(!P&&A.length>1)return k(A[0])}else{var B=$.name;O[B]=$,P=B}return!q&&P&&(x=P),P||!q&&x},D=function(k,$){if(L(k))return k.clone();var F=typeof $=="object"?$:{};return F.date=k,F.args=arguments,new U(F)},G=E;G.l=H,G.i=L,G.w=function(k,$){return D(k,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var U=function(){function k(F){this.$L=H(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[I]=!0}var $=k.prototype;return $.parse=function(F){this.$d=function(q){var P=q.date,j=q.utc;if(P===null)return new Date(NaN);if(G.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var A=P.match(y);if(A){var B=A[2]-1||0,Q=(A[7]||"0").substring(0,3);return j?new Date(Date.UTC(A[1],B,A[3]||1,A[4]||0,A[5]||0,A[6]||0,Q)):new Date(A[1],B,A[3]||1,A[4]||0,A[5]||0,A[6]||0,Q)}}return new Date(P)}(F),this.init()},$.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},$.$utils=function(){return G},$.isValid=function(){return this.$d.toString()!==h},$.isSame=function(F,q){var P=D(F);return this.startOf(q)<=P&&P<=this.endOf(q)},$.isAfter=function(F,q){return D(F)<this.startOf(q)},$.isBefore=function(F,q){return this.endOf(q)<D(F)},$.$g=function(F,q,P){return G.u(F)?this[q]:this.set(P,F)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(F,q){var P=this,j=!!G.u(q)||q,A=G.p(F),B=function(ue,le){var Ce=G.w(P.$u?Date.UTC(P.$y,le,ue):new Date(P.$y,le,ue),P);return j?Ce:Ce.endOf(c)},Q=function(ue,le){return G.w(P.toDate()[ue].apply(P.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(le)),P)},re=this.$W,ee=this.$M,ce=this.$D,oe="set"+(this.$u?"UTC":"");switch(A){case f:return j?B(1,0):B(31,11);case g:return j?B(1,ee):B(0,ee+1);case d:var ae=this.$locale().weekStart||0,de=(re<ae?re+7:re)-ae;return B(j?ce-de:ce+(6-de),ee);case c:case v:return Q(oe+"Hours",0);case u:return Q(oe+"Minutes",1);case s:return Q(oe+"Seconds",2);case a:return Q(oe+"Milliseconds",3);default:return this.clone()}},$.endOf=function(F){return this.startOf(F,!1)},$.$set=function(F,q){var P,j=G.p(F),A="set"+(this.$u?"UTC":""),B=(P={},P[c]=A+"Date",P[v]=A+"Date",P[g]=A+"Month",P[f]=A+"FullYear",P[u]=A+"Hours",P[s]=A+"Minutes",P[a]=A+"Seconds",P[i]=A+"Milliseconds",P)[j],Q=j===c?this.$D+(q-this.$W):q;if(j===g||j===f){var re=this.clone().set(v,1);re.$d[B](Q),re.init(),this.$d=re.set(v,Math.min(this.$D,re.daysInMonth())).$d}else B&&this.$d[B](Q);return this.init(),this},$.set=function(F,q){return this.clone().$set(F,q)},$.get=function(F){return this[G.p(F)]()},$.add=function(F,q){var P,j=this;F=Number(F);var A=G.p(q),B=function(ee){var ce=D(j);return G.w(ce.date(ce.date()+Math.round(ee*F)),j)};if(A===g)return this.set(g,this.$M+F);if(A===f)return this.set(f,this.$y+F);if(A===c)return B(1);if(A===d)return B(7);var Q=(P={},P[s]=r,P[u]=o,P[a]=n,P)[A]||1,re=this.$d.getTime()+F*Q;return G.w(re,this)},$.subtract=function(F,q){return this.add(-1*F,q)},$.format=function(F){var q=this,P=this.$locale();if(!this.isValid())return P.invalidDate||h;var j=F||"YYYY-MM-DDTHH:mm:ssZ",A=G.z(this),B=this.$H,Q=this.$m,re=this.$M,ee=P.weekdays,ce=P.months,oe=P.meridiem,ae=function(le,Ce,K,Ee){return le&&(le[Ce]||le(q,j))||K[Ce].slice(0,Ee)},de=function(le){return G.s(B%12||12,le,"0")},ue=oe||function(le,Ce,K){var Ee=le<12?"AM":"PM";return K?Ee.toLowerCase():Ee};return j.replace(b,function(le,Ce){return Ce||function(K){switch(K){case"YY":return String(q.$y).slice(-2);case"YYYY":return G.s(q.$y,4,"0");case"M":return re+1;case"MM":return G.s(re+1,2,"0");case"MMM":return ae(P.monthsShort,re,ce,3);case"MMMM":return ae(ce,re);case"D":return q.$D;case"DD":return G.s(q.$D,2,"0");case"d":return String(q.$W);case"dd":return ae(P.weekdaysMin,q.$W,ee,2);case"ddd":return ae(P.weekdaysShort,q.$W,ee,3);case"dddd":return ee[q.$W];case"H":return String(B);case"HH":return G.s(B,2,"0");case"h":return de(1);case"hh":return de(2);case"a":return ue(B,Q,!0);case"A":return ue(B,Q,!1);case"m":return String(Q);case"mm":return G.s(Q,2,"0");case"s":return String(q.$s);case"ss":return G.s(q.$s,2,"0");case"SSS":return G.s(q.$ms,3,"0");case"Z":return A}return null}(le)||A.replace(":","")})},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(F,q,P){var j,A=this,B=G.p(q),Q=D(F),re=(Q.utcOffset()-this.utcOffset())*r,ee=this-Q,ce=function(){return G.m(A,Q)};switch(B){case f:j=ce()/12;break;case g:j=ce();break;case m:j=ce()/3;break;case d:j=(ee-re)/6048e5;break;case c:j=(ee-re)/864e5;break;case u:j=ee/o;break;case s:j=ee/r;break;case a:j=ee/n;break;default:j=ee}return P?j:G.a(j)},$.daysInMonth=function(){return this.endOf(g).$D},$.$locale=function(){return O[this.$L]},$.locale=function(F,q){if(!F)return this.$L;var P=this.clone(),j=H(F,q,!0);return j&&(P.$L=j),P},$.clone=function(){return G.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},k}(),Z=U.prototype;return D.prototype=Z,[["$ms",i],["$s",a],["$m",s],["$H",u],["$W",c],["$M",g],["$y",f],["$D",v]].forEach(function(k){Z[k[1]]=function($){return this.$g($,k[0],k[1])}}),D.extend=function(k,$){return k.$i||(k($,U,D),k.$i=!0),D},D.locale=H,D.isDayjs=L,D.unix=function(k){return D(1e3*k)},D.en=O[x],D.Ls=O,D.p={},D})})(Bl);var Sh=Bl.exports;const Hl=Jr(Sh);/**
22
+ */function Vr(e,t){return e?Rg(e)?p.createElement(e,t):e:null}function Rg(e){return Vg(e)||typeof e=="function"||jg(e)}function Vg(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function jg(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function el(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=p.useState(()=>({current:Fg(t)})),[r,o]=p.useState(()=>n.current.initialState);return n.current.setOptions(i=>({...i,...e,state:{...r,...e.state},onStateChange:a=>{o(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}function tl(e,t){return function(){return e.apply(t,arguments)}}const{toString:zg}=Object.prototype,{getPrototypeOf:_i}=Object,jr=(e=>t=>{const n=zg.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),pt=e=>(e=e.toLowerCase(),t=>jr(t)===e),zr=e=>t=>typeof t===e,{isArray:Tn}=Array,tr=zr("undefined");function Bg(e){return e!==null&&!tr(e)&&e.constructor!==null&&!tr(e.constructor)&&rt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const nl=pt("ArrayBuffer");function Hg(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&nl(e.buffer),t}const Ug=zr("string"),rt=zr("function"),rl=zr("number"),Br=e=>e!==null&&typeof e=="object",Wg=e=>e===!0||e===!1,Hr=e=>{if(jr(e)!=="object")return!1;const t=_i(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},qg=pt("Date"),Gg=pt("File"),Kg=pt("Blob"),Yg=pt("FileList"),Xg=e=>Br(e)&&rt(e.pipe),Jg=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||rt(e.append)&&((t=jr(e))==="formdata"||t==="object"&&rt(e.toString)&&e.toString()==="[object FormData]"))},Zg=pt("URLSearchParams"),[Qg,em,tm,nm]=["ReadableStream","Request","Response","Headers"].map(pt),rm=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function nr(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Tn(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let s;for(r=0;r<a;r++)s=i[r],t.call(null,e[s],s,e)}}function ol(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const dn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,il=e=>!tr(e)&&e!==dn;function Ti(){const{caseless:e}=il(this)&&this||{},t={},n=(r,o)=>{const i=e&&ol(t,o)||o;Hr(t[i])&&Hr(r)?t[i]=Ti(t[i],r):Hr(r)?t[i]=Ti({},r):Tn(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&nr(arguments[r],n);return t}const om=(e,t,n,{allOwnKeys:r}={})=>(nr(t,(o,i)=>{n&&rt(o)?e[i]=tl(o,n):e[i]=o},{allOwnKeys:r}),e),im=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),am=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},sm=(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&_i(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},lm=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},cm=e=>{if(!e)return null;if(Tn(e))return e;let t=e.length;if(!rl(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},um=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&_i(Uint8Array)),dm=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},fm=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},pm=pt("HTMLFormElement"),gm=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),al=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),mm=pt("RegExp"),sl=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};nr(n,(o,i)=>{let a;(a=t(o,i,e))!==!1&&(r[i]=a||o)}),Object.defineProperties(e,r)},hm=e=>{sl(e,(t,n)=>{if(rt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(rt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},vm=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Tn(e)?r(e):r(String(e).split(t)),n},ym=()=>{},xm=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Ai="abcdefghijklmnopqrstuvwxyz",ll="0123456789",cl={DIGIT:ll,ALPHA:Ai,ALPHA_DIGIT:Ai+Ai.toUpperCase()+ll},bm=(e=16,t=cl.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function wm(e){return!!(e&&rt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Cm=e=>{const t=new Array(10),n=(r,o)=>{if(Br(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=Tn(r)?[]:{};return nr(r,(a,s)=>{const u=n(a,o+1);!tr(u)&&(i[s]=u)}),t[o]=void 0,i}}return r};return n(e,0)},Sm=pt("AsyncFunction"),Em=e=>e&&(Br(e)||rt(e))&&rt(e.then)&&rt(e.catch),ul=((e,t)=>e?setImmediate:t?((n,r)=>(dn.addEventListener("message",({source:o,data:i})=>{o===dn&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),dn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",rt(dn.postMessage)),_m=typeof queueMicrotask<"u"?queueMicrotask.bind(dn):typeof process<"u"&&process.nextTick||ul,R={isArray:Tn,isArrayBuffer:nl,isBuffer:Bg,isFormData:Jg,isArrayBufferView:Hg,isString:Ug,isNumber:rl,isBoolean:Wg,isObject:Br,isPlainObject:Hr,isReadableStream:Qg,isRequest:em,isResponse:tm,isHeaders:nm,isUndefined:tr,isDate:qg,isFile:Gg,isBlob:Kg,isRegExp:mm,isFunction:rt,isStream:Xg,isURLSearchParams:Zg,isTypedArray:um,isFileList:Yg,forEach:nr,merge:Ti,extend:om,trim:rm,stripBOM:im,inherits:am,toFlatObject:sm,kindOf:jr,kindOfTest:pt,endsWith:lm,toArray:cm,forEachEntry:dm,matchAll:fm,isHTMLForm:pm,hasOwnProperty:al,hasOwnProp:al,reduceDescriptors:sl,freezeMethods:hm,toObjectSet:vm,toCamelCase:gm,noop:ym,toFiniteNumber:xm,findKey:ol,global:dn,isContextDefined:il,ALPHABET:cl,generateString:bm,isSpecCompliantForm:wm,toJSONObject:Cm,isAsyncFn:Sm,isThenable:Em,setImmediate:ul,asap:_m};function ye(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}R.inherits(ye,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:R.toJSONObject(this.config),code:this.code,status:this.status}}});const dl=ye.prototype,fl={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{fl[e]={value:e}}),Object.defineProperties(ye,fl),Object.defineProperty(dl,"isAxiosError",{value:!0}),ye.from=(e,t,n,r,o,i)=>{const a=Object.create(dl);return R.toFlatObject(e,a,function(u){return u!==Error.prototype},s=>s!=="isAxiosError"),ye.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const Tm=null;function Pi(e){return R.isPlainObject(e)||R.isArray(e)}function pl(e){return R.endsWith(e,"[]")?e.slice(0,-2):e}function gl(e,t,n){return e?e.concat(t).map(function(o,i){return o=pl(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function Am(e){return R.isArray(e)&&!e.some(Pi)}const Pm=R.toFlatObject(R,{},null,function(t){return/^is[A-Z]/.test(t)});function Ur(e,t,n){if(!R.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=R.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,y){return!R.isUndefined(y[h])});const r=n.metaTokens,o=n.visitor||d,i=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&R.isSpecCompliantForm(t);if(!R.isFunction(o))throw new TypeError("visitor must be a function");function c(v){if(v===null)return"";if(R.isDate(v))return v.toISOString();if(!u&&R.isBlob(v))throw new ye("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(v)||R.isTypedArray(v)?u&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function d(v,h,y){let b=v;if(v&&!y&&typeof v=="object"){if(R.endsWith(h,"{}"))h=r?h:h.slice(0,-2),v=JSON.stringify(v);else if(R.isArray(v)&&Am(v)||(R.isFileList(v)||R.endsWith(h,"[]"))&&(b=R.toArray(v)))return h=pl(h),b.forEach(function(C,E){!(R.isUndefined(C)||C===null)&&t.append(a===!0?gl([h],E,i):a===null?h:h+"[]",c(C))}),!1}return Pi(v)?!0:(t.append(gl(y,h,i),c(v)),!1)}const g=[],m=Object.assign(Pm,{defaultVisitor:d,convertValue:c,isVisitable:Pi});function f(v,h){if(!R.isUndefined(v)){if(g.indexOf(v)!==-1)throw Error("Circular reference detected in "+h.join("."));g.push(v),R.forEach(v,function(b,w){(!(R.isUndefined(b)||b===null)&&o.call(t,b,R.isString(w)?w.trim():w,h,m))===!0&&f(b,h?h.concat(w):[w])}),g.pop()}}if(!R.isObject(e))throw new TypeError("data must be an object");return f(e),t}function ml(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ni(e,t){this._pairs=[],e&&Ur(e,this,t)}const hl=Ni.prototype;hl.append=function(t,n){this._pairs.push([t,n])},hl.toString=function(t){const n=t?function(r){return t.call(this,r,ml)}:ml;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Nm(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function vl(e,t,n){if(!t)return e;const r=n&&n.encode||Nm;R.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(t,n):i=R.isURLSearchParams(t)?t.toString():new Ni(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class yl{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){R.forEach(this.handlers,function(r){r!==null&&t(r)})}}const xl={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},km={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ni,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},ki=typeof window<"u"&&typeof document<"u",Oi=typeof navigator=="object"&&navigator||void 0,Om=ki&&(!Oi||["ReactNative","NativeScript","NS"].indexOf(Oi.product)<0),Fm=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Dm=ki&&window.location.href||"http://localhost",Ue={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ki,hasStandardBrowserEnv:Om,hasStandardBrowserWebWorkerEnv:Fm,navigator:Oi,origin:Dm},Symbol.toStringTag,{value:"Module"})),...km};function Im(e,t){return Ur(e,new Ue.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return Ue.isNode&&R.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Mm(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function $m(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function bl(e){function t(n,r,o,i){let a=n[i++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),u=i>=n.length;return a=!a&&R.isArray(o)?o.length:a,u?(R.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!s):((!o[a]||!R.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],i)&&R.isArray(o[a])&&(o[a]=$m(o[a])),!s)}if(R.isFormData(e)&&R.isFunction(e.entries)){const n={};return R.forEachEntry(e,(r,o)=>{t(Mm(r),o,n,0)}),n}return null}function Lm(e,t,n){if(R.isString(e))try{return(t||JSON.parse)(e),R.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const rr={transitional:xl,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=R.isObject(t);if(i&&R.isHTMLForm(t)&&(t=new FormData(t)),R.isFormData(t))return o?JSON.stringify(bl(t)):t;if(R.isArrayBuffer(t)||R.isBuffer(t)||R.isStream(t)||R.isFile(t)||R.isBlob(t)||R.isReadableStream(t))return t;if(R.isArrayBufferView(t))return t.buffer;if(R.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Im(t,this.formSerializer).toString();if((s=R.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Ur(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),Lm(t)):t}],transformResponse:[function(t){const n=this.transitional||rr.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(R.isResponse(t)||R.isReadableStream(t))return t;if(t&&R.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?ye.from(s,ye.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ue.classes.FormData,Blob:Ue.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};R.forEach(["delete","get","head","post","put","patch"],e=>{rr.headers[e]={}});const Rm=R.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Vm=e=>{const t={};let n,r,o;return e&&e.split(`
23
+ `).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&Rm[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},wl=Symbol("internals");function or(e){return e&&String(e).trim().toLowerCase()}function Wr(e){return e===!1||e==null?e:R.isArray(e)?e.map(Wr):String(e)}function jm(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const zm=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Fi(e,t,n,r,o){if(R.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!R.isString(t)){if(R.isString(r))return t.indexOf(r)!==-1;if(R.isRegExp(r))return r.test(t)}}function Bm(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Hm(e,t){const n=R.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,a){return this[r].call(this,t,o,i,a)},configurable:!0})})}class Je{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(s,u,c){const d=or(u);if(!d)throw new Error("header name must be a non-empty string");const g=R.findKey(o,d);(!g||o[g]===void 0||c===!0||c===void 0&&o[g]!==!1)&&(o[g||u]=Wr(s))}const a=(s,u)=>R.forEach(s,(c,d)=>i(c,d,u));if(R.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(R.isString(t)&&(t=t.trim())&&!zm(t))a(Vm(t),n);else if(R.isHeaders(t))for(const[s,u]of t.entries())i(u,s,r);else t!=null&&i(n,t,r);return this}get(t,n){if(t=or(t),t){const r=R.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return jm(o);if(R.isFunction(n))return n.call(this,o,r);if(R.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=or(t),t){const r=R.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Fi(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=or(a),a){const s=R.findKey(r,a);s&&(!n||Fi(r,r[s],s,n))&&(delete r[s],o=!0)}}return R.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||Fi(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return R.forEach(this,(o,i)=>{const a=R.findKey(r,i);if(a){n[a]=Wr(o),delete n[i];return}const s=t?Bm(i):String(i).trim();s!==i&&delete n[i],n[s]=Wr(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return R.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&R.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
24
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[wl]=this[wl]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=or(a);r[s]||(Hm(o,a),r[s]=!0)}return R.isArray(t)?t.forEach(i):i(t),this}}Je.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),R.reduceDescriptors(Je.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),R.freezeMethods(Je);function Di(e,t){const n=this||rr,r=t||n,o=Je.from(r.headers);let i=r.data;return R.forEach(e,function(s){i=s.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Cl(e){return!!(e&&e.__CANCEL__)}function An(e,t,n){ye.call(this,e??"canceled",ye.ERR_CANCELED,t,n),this.name="CanceledError"}R.inherits(An,ye,{__CANCEL__:!0});function Sl(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ye("Request failed with status code "+n.status,[ye.ERR_BAD_REQUEST,ye.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Um(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Wm(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(u){const c=Date.now(),d=r[i];a||(a=c),n[o]=u,r[o]=c;let g=i,m=0;for(;g!==o;)m+=n[g++],g=g%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-a<t)return;const f=d&&c-d;return f?Math.round(m*1e3/f):void 0}}function qm(e,t){let n=0,r=1e3/t,o,i;const a=(c,d=Date.now())=>{n=d,o=null,i&&(clearTimeout(i),i=null),e.apply(null,c)};return[(...c)=>{const d=Date.now(),g=d-n;g>=r?a(c,d):(o=c,i||(i=setTimeout(()=>{i=null,a(o)},r-g)))},()=>o&&a(o)]}const qr=(e,t,n=3)=>{let r=0;const o=Wm(50,250);return qm(i=>{const a=i.loaded,s=i.lengthComputable?i.total:void 0,u=a-r,c=o(u),d=a<=s;r=a;const g={loaded:a,total:s,progress:s?a/s:void 0,bytes:u,rate:c||void 0,estimated:c&&s&&d?(s-a)/c:void 0,event:i,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(g)},n)},El=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},_l=e=>(...t)=>R.asap(()=>e(...t)),Gm=Ue.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ue.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ue.origin),Ue.navigator&&/(msie|trident)/i.test(Ue.navigator.userAgent)):()=>!0,Km=Ue.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];R.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),R.isString(r)&&a.push("path="+r),R.isString(o)&&a.push("domain="+o),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ym(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Xm(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Tl(e,t){return e&&!Ym(t)?Xm(e,t):t}const Al=e=>e instanceof Je?{...e}:e;function fn(e,t){t=t||{};const n={};function r(c,d,g,m){return R.isPlainObject(c)&&R.isPlainObject(d)?R.merge.call({caseless:m},c,d):R.isPlainObject(d)?R.merge({},d):R.isArray(d)?d.slice():d}function o(c,d,g,m){if(R.isUndefined(d)){if(!R.isUndefined(c))return r(void 0,c,g,m)}else return r(c,d,g,m)}function i(c,d){if(!R.isUndefined(d))return r(void 0,d)}function a(c,d){if(R.isUndefined(d)){if(!R.isUndefined(c))return r(void 0,c)}else return r(void 0,d)}function s(c,d,g){if(g in t)return r(c,d);if(g in e)return r(void 0,c)}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(c,d,g)=>o(Al(c),Al(d),g,!0)};return R.forEach(Object.keys(Object.assign({},e,t)),function(d){const g=u[d]||o,m=g(e[d],t[d],d);R.isUndefined(m)&&g!==s||(n[d]=m)}),n}const Pl=e=>{const t=fn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;t.headers=a=Je.from(a),t.url=vl(Tl(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let u;if(R.isFormData(n)){if(Ue.hasStandardBrowserEnv||Ue.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){const[c,...d]=u?u.split(";").map(g=>g.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...d].join("; "))}}if(Ue.hasStandardBrowserEnv&&(r&&R.isFunction(r)&&(r=r(t)),r||r!==!1&&Gm(t.url))){const c=o&&i&&Km.read(i);c&&a.set(o,c)}return t},Jm=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=Pl(e);let i=o.data;const a=Je.from(o.headers).normalize();let{responseType:s,onUploadProgress:u,onDownloadProgress:c}=o,d,g,m,f,v;function h(){f&&f(),v&&v(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let y=new XMLHttpRequest;y.open(o.method.toUpperCase(),o.url,!0),y.timeout=o.timeout;function b(){if(!y)return;const C=Je.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),x={data:!s||s==="text"||s==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:C,config:e,request:y};Sl(function(I){n(I),h()},function(I){r(I),h()},x),y=null}"onloadend"in y?y.onloadend=b:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(b)},y.onabort=function(){y&&(r(new ye("Request aborted",ye.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new ye("Network Error",ye.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let E=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const x=o.transitional||xl;o.timeoutErrorMessage&&(E=o.timeoutErrorMessage),r(new ye(E,x.clarifyTimeoutError?ye.ETIMEDOUT:ye.ECONNABORTED,e,y)),y=null},i===void 0&&a.setContentType(null),"setRequestHeader"in y&&R.forEach(a.toJSON(),function(E,x){y.setRequestHeader(x,E)}),R.isUndefined(o.withCredentials)||(y.withCredentials=!!o.withCredentials),s&&s!=="json"&&(y.responseType=o.responseType),c&&([m,v]=qr(c,!0),y.addEventListener("progress",m)),u&&y.upload&&([g,f]=qr(u),y.upload.addEventListener("progress",g),y.upload.addEventListener("loadend",f)),(o.cancelToken||o.signal)&&(d=C=>{y&&(r(!C||C.type?new An(null,e,y):C),y.abort(),y=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const w=Um(o.url);if(w&&Ue.protocols.indexOf(w)===-1){r(new ye("Unsupported protocol "+w+":",ye.ERR_BAD_REQUEST,e));return}y.send(i||null)})},Zm=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(c){if(!o){o=!0,s();const d=c instanceof Error?c:this.reason;r.abort(d instanceof ye?d:new An(d instanceof Error?d.message:d))}};let a=t&&setTimeout(()=>{a=null,i(new ye(`timeout ${t} of ms exceeded`,ye.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));const{signal:u}=r;return u.unsubscribe=()=>R.asap(s),u}},Qm=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},eh=async function*(e,t){for await(const n of th(e))yield*Qm(n,t)},th=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Nl=(e,t,n,r)=>{const o=eh(e,t);let i=0,a,s=u=>{a||(a=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:c,value:d}=await o.next();if(c){s(),u.close();return}let g=d.byteLength;if(n){let m=i+=g;n(m)}u.enqueue(new Uint8Array(d))}catch(c){throw s(c),c}},cancel(u){return s(u),o.return()}},{highWaterMark:2})},Gr=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",kl=Gr&&typeof ReadableStream=="function",nh=Gr&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Ol=(e,...t)=>{try{return!!e(...t)}catch{return!1}},rh=kl&&Ol(()=>{let e=!1;const t=new Request(Ue.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Fl=64*1024,Ii=kl&&Ol(()=>R.isReadableStream(new Response("").body)),Kr={stream:Ii&&(e=>e.body)};Gr&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Kr[t]&&(Kr[t]=R.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new ye(`Response type '${t}' is not supported`,ye.ERR_NOT_SUPPORT,r)})})})(new Response);const oh=async e=>{if(e==null)return 0;if(R.isBlob(e))return e.size;if(R.isSpecCompliantForm(e))return(await new Request(Ue.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(R.isArrayBufferView(e)||R.isArrayBuffer(e))return e.byteLength;if(R.isURLSearchParams(e)&&(e=e+""),R.isString(e))return(await nh(e)).byteLength},ih=async(e,t)=>{const n=R.toFiniteNumber(e.getContentLength());return n??oh(t)},Mi={http:Tm,xhr:Jm,fetch:Gr&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:u,responseType:c,headers:d,withCredentials:g="same-origin",fetchOptions:m}=Pl(e);c=c?(c+"").toLowerCase():"text";let f=Zm([o,i&&i.toAbortSignal()],a),v;const h=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let y;try{if(u&&rh&&n!=="get"&&n!=="head"&&(y=await ih(d,r))!==0){let x=new Request(t,{method:"POST",body:r,duplex:"half"}),O;if(R.isFormData(r)&&(O=x.headers.get("content-type"))&&d.setContentType(O),x.body){const[I,$]=El(y,qr(_l(u)));r=Nl(x.body,Fl,I,$)}}R.isString(g)||(g=g?"include":"omit");const b="credentials"in Request.prototype;v=new Request(t,{...m,signal:f,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:b?g:void 0});let w=await fetch(v);const C=Ii&&(c==="stream"||c==="response");if(Ii&&(s||C&&h)){const x={};["status","statusText","headers"].forEach(H=>{x[H]=w[H]});const O=R.toFiniteNumber(w.headers.get("content-length")),[I,$]=s&&El(O,qr(_l(s),!0))||[];w=new Response(Nl(w.body,Fl,I,()=>{$&&$(),h&&h()}),x)}c=c||"text";let E=await Kr[R.findKey(Kr,c)||"text"](w,e);return!C&&h&&h(),await new Promise((x,O)=>{Sl(x,O,{data:E,headers:Je.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:v})})}catch(b){throw h&&h(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new ye("Network Error",ye.ERR_NETWORK,e,v),{cause:b.cause||b}):ye.from(b,b&&b.code,e,v)}})};R.forEach(Mi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Dl=e=>`- ${e}`,ah=e=>R.isFunction(e)||e===null||e===!1,Il={getAdapter:e=>{e=R.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){n=e[i];let a;if(r=n,!ah(n)&&(r=Mi[(a=String(n)).toLowerCase()],r===void 0))throw new ye(`Unknown adapter '${a}'`);if(r)break;o[a||"#"+i]=r}if(!r){const i=Object.entries(o).map(([s,u])=>`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since :
25
+ `+i.map(Dl).join(`
26
+ `):" "+Dl(i[0]):"as no adapter specified";throw new ye("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Mi};function $i(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new An(null,e)}function Ml(e){return $i(e),e.headers=Je.from(e.headers),e.data=Di.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Il.getAdapter(e.adapter||rr.adapter)(e).then(function(r){return $i(e),r.data=Di.call(e,e.transformResponse,r),r.headers=Je.from(r.headers),r},function(r){return Cl(r)||($i(e),r&&r.response&&(r.response.data=Di.call(e,e.transformResponse,r.response),r.response.headers=Je.from(r.response.headers))),Promise.reject(r)})}const $l="1.7.9",Yr={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Yr[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ll={};Yr.transitional=function(t,n,r){function o(i,a){return"[Axios v"+$l+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,s)=>{if(t===!1)throw new ye(o(a," has been removed"+(n?" in "+n:"")),ye.ERR_DEPRECATED);return n&&!Ll[a]&&(Ll[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,s):!0}},Yr.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function sh(e,t,n){if(typeof e!="object")throw new ye("options must be an object",ye.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const s=e[i],u=s===void 0||a(s,i,e);if(u!==!0)throw new ye("option "+i+" must be "+u,ye.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ye("Unknown option "+i,ye.ERR_BAD_OPTION)}}const Xr={assertOptions:sh,validators:Yr},bt=Xr.validators;class pn{constructor(t){this.defaults=t,this.interceptors={request:new yl,response:new yl}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
27
+ `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=fn(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&Xr.assertOptions(r,{silentJSONParsing:bt.transitional(bt.boolean),forcedJSONParsing:bt.transitional(bt.boolean),clarifyTimeoutError:bt.transitional(bt.boolean)},!1),o!=null&&(R.isFunction(o)?n.paramsSerializer={serialize:o}:Xr.assertOptions(o,{encode:bt.function,serialize:bt.function},!0)),Xr.assertOptions(n,{baseUrl:bt.spelling("baseURL"),withXsrfToken:bt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&R.merge(i.common,i[n.method]);i&&R.forEach(["delete","get","head","post","put","patch","common"],v=>{delete i[v]}),n.headers=Je.concat(a,i);const s=[];let u=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(u=u&&h.synchronous,s.unshift(h.fulfilled,h.rejected))});const c=[];this.interceptors.response.forEach(function(h){c.push(h.fulfilled,h.rejected)});let d,g=0,m;if(!u){const v=[Ml.bind(this),void 0];for(v.unshift.apply(v,s),v.push.apply(v,c),m=v.length,d=Promise.resolve(n);g<m;)d=d.then(v[g++],v[g++]);return d}m=s.length;let f=n;for(g=0;g<m;){const v=s[g++],h=s[g++];try{f=v(f)}catch(y){h.call(this,y);break}}try{d=Ml.call(this,f)}catch(v){return Promise.reject(v)}for(g=0,m=c.length;g<m;)d=d.then(c[g++],c[g++]);return d}getUri(t){t=fn(this.defaults,t);const n=Tl(t.baseURL,t.url);return vl(n,t.params,t.paramsSerializer)}}R.forEach(["delete","get","head","options"],function(t){pn.prototype[t]=function(n,r){return this.request(fn(r||{},{method:t,url:n,data:(r||{}).data}))}}),R.forEach(["post","put","patch"],function(t){function n(r){return function(i,a,s){return this.request(fn(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}pn.prototype[t]=n(),pn.prototype[t+"Form"]=n(!0)});class Li{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,s){r.reason||(r.reason=new An(i,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Li(function(o){t=o}),cancel:t}}}function lh(e){return function(n){return e.apply(null,n)}}function ch(e){return R.isObject(e)&&e.isAxiosError===!0}const Ri={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ri).forEach(([e,t])=>{Ri[t]=e});function Rl(e){const t=new pn(e),n=tl(pn.prototype.request,t);return R.extend(n,pn.prototype,t,{allOwnKeys:!0}),R.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Rl(fn(e,o))},n}const me=Rl(rr);me.Axios=pn,me.CanceledError=An,me.CancelToken=Li,me.isCancel=Cl,me.VERSION=$l,me.toFormData=Ur,me.AxiosError=ye,me.Cancel=me.CanceledError,me.all=function(t){return Promise.all(t)},me.spread=lh,me.isAxiosError=ch,me.mergeConfig=fn,me.AxiosHeaders=Je,me.formToJSON=e=>bl(R.isHTMLForm(e)?new FormData(e):e),me.getAdapter=Il.getAdapter,me.HttpStatusCode=Ri,me.default=me;var ir=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Jr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const uh=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);var dh=e=>!uh.has(e&&e.code);const fh=Jr(dh),Vi="axios-retry";function Vl(e){const t=["ERR_CANCELED","ECONNABORTED"];return e.response||!e.code||t.includes(e.code)?!1:fh(e)}const jl=["get","head","options"],ph=jl.concat(["put","delete"]);function ji(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status===429||e.response.status>=500&&e.response.status<=599)}function gh(e){var t;return(t=e.config)!=null&&t.method?ji(e)&&jl.indexOf(e.config.method)!==-1:!1}function zl(e){var t;return(t=e.config)!=null&&t.method?ji(e)&&ph.indexOf(e.config.method)!==-1:!1}function Bl(e){return Vl(e)||zl(e)}function zi(e=void 0){var r;const t=(r=e==null?void 0:e.response)==null?void 0:r.headers["retry-after"];if(!t)return 0;let n=(Number(t)||0)*1e3;return n===0&&(n=(new Date(t).valueOf()||0)-Date.now()),Math.max(0,n)}function mh(e=0,t=void 0){return Math.max(0,zi(t))}function hh(e=0,t=void 0,n=100){const r=2**e*n,o=Math.max(r,zi(t)),i=o*.2*Math.random();return o+i}function vh(e=100){return(t=0,n=void 0)=>{const r=t*e;return Math.max(r,zi(n))}}const yh={retries:3,retryCondition:Bl,retryDelay:mh,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function xh(e,t){return{...yh,...t,...e[Vi]}}function Hl(e,t,n=!1){const r=xh(e,t||{});return r.retryCount=r.retryCount||0,(!r.lastRequestTime||n)&&(r.lastRequestTime=Date.now()),e[Vi]=r,r}function bh(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}async function wh(e,t){const{retries:n,retryCondition:r}=e,o=(e.retryCount||0)<n&&r(t);if(typeof o=="object")try{return await o!==!1}catch{return!1}return o}async function Ch(e,t,n,r){var u;t.retryCount+=1;const{retryDelay:o,shouldResetTimeout:i,onRetry:a}=t,s=o(t.retryCount,n);if(bh(e,r),!i&&r.timeout&&t.lastRequestTime){const c=Date.now()-t.lastRequestTime,d=r.timeout-c-s;if(d<=0)return Promise.reject(n);r.timeout=d}return r.transformRequest=[c=>c],await a(t.retryCount,n,r),(u=r.signal)!=null&&u.aborted?Promise.resolve(e(r)):new Promise(c=>{var m;const d=()=>{clearTimeout(g),c(e(r))},g=setTimeout(()=>{var f;c(e(r)),(f=r.signal)!=null&&f.removeEventListener&&r.signal.removeEventListener("abort",d)},s);(m=r.signal)!=null&&m.addEventListener&&r.signal.addEventListener("abort",d,{once:!0})})}async function Sh(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}const Kt=(e,t)=>{const n=e.interceptors.request.use(o=>{var i;return Hl(o,t,!0),(i=o[Vi])!=null&&i.validateResponse&&(o.validateStatus=()=>!1),o}),r=e.interceptors.response.use(null,async o=>{var s;const{config:i}=o;if(!i)return Promise.reject(o);const a=Hl(i,t);return o.response&&((s=a.validateResponse)!=null&&s.call(a,o.response))?o.response:await wh(a,o)?Ch(e,a,o,i):(await Sh(a,o),Promise.reject(o))});return{requestInterceptorId:n,responseInterceptorId:r}};Kt.isNetworkError=Vl,Kt.isSafeRequestError=gh,Kt.isIdempotentRequestError=zl,Kt.isNetworkOrIdempotentRequestError=Bl,Kt.exponentialDelay=hh,Kt.linearDelay=vh,Kt.isRetryableError=ji;var Ul={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ir,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",a="second",s="minute",u="hour",c="day",d="week",g="month",m="quarter",f="year",v="date",h="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(k){var M=["th","st","nd","rd"],F=k%100;return"["+k+(M[(F-20)%10]||M[F]||M[0])+"]"}},C=function(k,M,F){var q=String(k);return!q||q.length>=M?k:""+Array(M+1-q.length).join(F)+k},E={s:C,z:function(k){var M=-k.utcOffset(),F=Math.abs(M),q=Math.floor(F/60),P=F%60;return(M<=0?"+":"-")+C(q,2,"0")+":"+C(P,2,"0")},m:function k(M,F){if(M.date()<F.date())return-k(F,M);var q=12*(F.year()-M.year())+(F.month()-M.month()),P=M.clone().add(q,g),j=F-P<0,A=M.clone().add(q+(j?-1:1),g);return+(-(q+(F-P)/(j?P-A:A-P))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:g,y:f,w:d,d:c,D:v,h:u,m:s,s:a,ms:i,Q:m}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},x="en",O={};O[x]=w;var I="$isDayjsObject",$=function(k){return k instanceof U||!(!k||!k[I])},H=function k(M,F,q){var P;if(!M)return x;if(typeof M=="string"){var j=M.toLowerCase();O[j]&&(P=j),F&&(O[j]=F,P=j);var A=M.split("-");if(!P&&A.length>1)return k(A[0])}else{var B=M.name;O[B]=M,P=B}return!q&&P&&(x=P),P||!q&&x},D=function(k,M){if($(k))return k.clone();var F=typeof M=="object"?M:{};return F.date=k,F.args=arguments,new U(F)},G=E;G.l=H,G.i=$,G.w=function(k,M){return D(k,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var U=function(){function k(F){this.$L=H(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[I]=!0}var M=k.prototype;return M.parse=function(F){this.$d=function(q){var P=q.date,j=q.utc;if(P===null)return new Date(NaN);if(G.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var A=P.match(y);if(A){var B=A[2]-1||0,Q=(A[7]||"0").substring(0,3);return j?new Date(Date.UTC(A[1],B,A[3]||1,A[4]||0,A[5]||0,A[6]||0,Q)):new Date(A[1],B,A[3]||1,A[4]||0,A[5]||0,A[6]||0,Q)}}return new Date(P)}(F),this.init()},M.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},M.$utils=function(){return G},M.isValid=function(){return this.$d.toString()!==h},M.isSame=function(F,q){var P=D(F);return this.startOf(q)<=P&&P<=this.endOf(q)},M.isAfter=function(F,q){return D(F)<this.startOf(q)},M.isBefore=function(F,q){return this.endOf(q)<D(F)},M.$g=function(F,q,P){return G.u(F)?this[q]:this.set(P,F)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(F,q){var P=this,j=!!G.u(q)||q,A=G.p(F),B=function(ue,le){var Ce=G.w(P.$u?Date.UTC(P.$y,le,ue):new Date(P.$y,le,ue),P);return j?Ce:Ce.endOf(c)},Q=function(ue,le){return G.w(P.toDate()[ue].apply(P.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(le)),P)},re=this.$W,ee=this.$M,ce=this.$D,oe="set"+(this.$u?"UTC":"");switch(A){case f:return j?B(1,0):B(31,11);case g:return j?B(1,ee):B(0,ee+1);case d:var ae=this.$locale().weekStart||0,de=(re<ae?re+7:re)-ae;return B(j?ce-de:ce+(6-de),ee);case c:case v:return Q(oe+"Hours",0);case u:return Q(oe+"Minutes",1);case s:return Q(oe+"Seconds",2);case a:return Q(oe+"Milliseconds",3);default:return this.clone()}},M.endOf=function(F){return this.startOf(F,!1)},M.$set=function(F,q){var P,j=G.p(F),A="set"+(this.$u?"UTC":""),B=(P={},P[c]=A+"Date",P[v]=A+"Date",P[g]=A+"Month",P[f]=A+"FullYear",P[u]=A+"Hours",P[s]=A+"Minutes",P[a]=A+"Seconds",P[i]=A+"Milliseconds",P)[j],Q=j===c?this.$D+(q-this.$W):q;if(j===g||j===f){var re=this.clone().set(v,1);re.$d[B](Q),re.init(),this.$d=re.set(v,Math.min(this.$D,re.daysInMonth())).$d}else B&&this.$d[B](Q);return this.init(),this},M.set=function(F,q){return this.clone().$set(F,q)},M.get=function(F){return this[G.p(F)]()},M.add=function(F,q){var P,j=this;F=Number(F);var A=G.p(q),B=function(ee){var ce=D(j);return G.w(ce.date(ce.date()+Math.round(ee*F)),j)};if(A===g)return this.set(g,this.$M+F);if(A===f)return this.set(f,this.$y+F);if(A===c)return B(1);if(A===d)return B(7);var Q=(P={},P[s]=r,P[u]=o,P[a]=n,P)[A]||1,re=this.$d.getTime()+F*Q;return G.w(re,this)},M.subtract=function(F,q){return this.add(-1*F,q)},M.format=function(F){var q=this,P=this.$locale();if(!this.isValid())return P.invalidDate||h;var j=F||"YYYY-MM-DDTHH:mm:ssZ",A=G.z(this),B=this.$H,Q=this.$m,re=this.$M,ee=P.weekdays,ce=P.months,oe=P.meridiem,ae=function(le,Ce,K,Ee){return le&&(le[Ce]||le(q,j))||K[Ce].slice(0,Ee)},de=function(le){return G.s(B%12||12,le,"0")},ue=oe||function(le,Ce,K){var Ee=le<12?"AM":"PM";return K?Ee.toLowerCase():Ee};return j.replace(b,function(le,Ce){return Ce||function(K){switch(K){case"YY":return String(q.$y).slice(-2);case"YYYY":return G.s(q.$y,4,"0");case"M":return re+1;case"MM":return G.s(re+1,2,"0");case"MMM":return ae(P.monthsShort,re,ce,3);case"MMMM":return ae(ce,re);case"D":return q.$D;case"DD":return G.s(q.$D,2,"0");case"d":return String(q.$W);case"dd":return ae(P.weekdaysMin,q.$W,ee,2);case"ddd":return ae(P.weekdaysShort,q.$W,ee,3);case"dddd":return ee[q.$W];case"H":return String(B);case"HH":return G.s(B,2,"0");case"h":return de(1);case"hh":return de(2);case"a":return ue(B,Q,!0);case"A":return ue(B,Q,!1);case"m":return String(Q);case"mm":return G.s(Q,2,"0");case"s":return String(q.$s);case"ss":return G.s(q.$s,2,"0");case"SSS":return G.s(q.$ms,3,"0");case"Z":return A}return null}(le)||A.replace(":","")})},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(F,q,P){var j,A=this,B=G.p(q),Q=D(F),re=(Q.utcOffset()-this.utcOffset())*r,ee=this-Q,ce=function(){return G.m(A,Q)};switch(B){case f:j=ce()/12;break;case g:j=ce();break;case m:j=ce()/3;break;case d:j=(ee-re)/6048e5;break;case c:j=(ee-re)/864e5;break;case u:j=ee/o;break;case s:j=ee/r;break;case a:j=ee/n;break;default:j=ee}return P?j:G.a(j)},M.daysInMonth=function(){return this.endOf(g).$D},M.$locale=function(){return O[this.$L]},M.locale=function(F,q){if(!F)return this.$L;var P=this.clone(),j=H(F,q,!0);return j&&(P.$L=j),P},M.clone=function(){return G.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},k}(),Z=U.prototype;return D.prototype=Z,[["$ms",i],["$s",a],["$m",s],["$H",u],["$W",c],["$M",g],["$y",f],["$D",v]].forEach(function(k){Z[k[1]]=function(M){return this.$g(M,k[0],k[1])}}),D.extend=function(k,M){return k.$i||(k(M,U,D),k.$i=!0),D},D.locale=H,D.isDayjs=$,D.unix=function(k){return D(1e3*k)},D.en=O[x],D.Ls=O,D.p={},D})})(Ul);var Eh=Ul.exports;const Wl=Jr(Eh);/**
28
28
  * @license lucide-react v0.468.0 - ISC
29
29
  *
30
30
  * This source code is licensed under the ISC license.
31
31
  * See the LICENSE file in the root directory of this source tree.
32
- */const Eh=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ul=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
32
+ */const _h=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ql=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
33
33
  * @license lucide-react v0.468.0 - ISC
34
34
  *
35
35
  * This source code is licensed under the ISC license.
36
36
  * See the LICENSE file in the root directory of this source tree.
37
- */var _h={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"};/**
37
+ */var Th={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"};/**
38
38
  * @license lucide-react v0.468.0 - ISC
39
39
  *
40
40
  * This source code is licensed under the ISC license.
41
41
  * See the LICENSE file in the root directory of this source tree.
42
- */const Th=_.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},u)=>_.createElement("svg",{ref:u,..._h,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ul("lucide",o),...s},[...a.map(([c,d])=>_.createElement(c,d)),...Array.isArray(i)?i:[i]]));/**
42
+ */const Ah=_.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},u)=>_.createElement("svg",{ref:u,...Th,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ql("lucide",o),...s},[...a.map(([c,d])=>_.createElement(c,d)),...Array.isArray(i)?i:[i]]));/**
43
43
  * @license lucide-react v0.468.0 - ISC
44
44
  *
45
45
  * This source code is licensed under the ISC license.
46
46
  * See the LICENSE file in the root directory of this source tree.
47
- */const lt=(e,t)=>{const n=_.forwardRef(({className:r,...o},i)=>_.createElement(Th,{ref:i,iconNode:t,className:Ul(`lucide-${Eh(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
47
+ */const lt=(e,t)=>{const n=_.forwardRef(({className:r,...o},i)=>_.createElement(Ah,{ref:i,iconNode:t,className:ql(`lucide-${_h(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
48
48
  * @license lucide-react v0.468.0 - ISC
49
49
  *
50
50
  * This source code is licensed under the ISC license.
@@ -54,32 +54,32 @@
54
54
  *
55
55
  * This source code is licensed under the ISC license.
56
56
  * See the LICENSE file in the root directory of this source tree.
57
- */const Ah=lt("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/**
57
+ */const Ph=lt("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/**
58
58
  * @license lucide-react v0.468.0 - ISC
59
59
  *
60
60
  * This source code is licensed under the ISC license.
61
61
  * See the LICENSE file in the root directory of this source tree.
62
- */const Ph=lt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
62
+ */const Nh=lt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
63
63
  * @license lucide-react v0.468.0 - ISC
64
64
  *
65
65
  * This source code is licensed under the ISC license.
66
66
  * See the LICENSE file in the root directory of this source tree.
67
- */const Nh=lt("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
67
+ */const kh=lt("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
68
68
  * @license lucide-react v0.468.0 - ISC
69
69
  *
70
70
  * This source code is licensed under the ISC license.
71
71
  * See the LICENSE file in the root directory of this source tree.
72
- */const Wl=lt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
72
+ */const Gl=lt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
73
73
  * @license lucide-react v0.468.0 - ISC
74
74
  *
75
75
  * This source code is licensed under the ISC license.
76
76
  * See the LICENSE file in the root directory of this source tree.
77
- */const kh=lt("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"}]]);/**
77
+ */const Oh=lt("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"}]]);/**
78
78
  * @license lucide-react v0.468.0 - ISC
79
79
  *
80
80
  * This source code is licensed under the ISC license.
81
81
  * See the LICENSE file in the root directory of this source tree.
82
- */const Oh=lt("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
82
+ */const Fh=lt("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
83
83
  * @license lucide-react v0.468.0 - ISC
84
84
  *
85
85
  * This source code is licensed under the ISC license.
@@ -89,24 +89,24 @@
89
89
  *
90
90
  * This source code is licensed under the ISC license.
91
91
  * See the LICENSE file in the root directory of this source tree.
92
- */const Fh=lt("MoveUpRight",[["path",{d:"M13 5H19V11",key:"1n1gyv"}],["path",{d:"M19 5L5 19",key:"72u4yj"}]]);/**
92
+ */const Dh=lt("MoveUpRight",[["path",{d:"M13 5H19V11",key:"1n1gyv"}],["path",{d:"M19 5L5 19",key:"72u4yj"}]]);/**
93
93
  * @license lucide-react v0.468.0 - ISC
94
94
  *
95
95
  * This source code is licensed under the ISC license.
96
96
  * See the LICENSE file in the root directory of this source tree.
97
- */const Dh=lt("PenOff",[["path",{d:"m10 10-6.157 6.162a2 2 0 0 0-.5.833l-1.322 4.36a.5.5 0 0 0 .622.624l4.358-1.323a2 2 0 0 0 .83-.5L14 13.982",key:"bjo8r8"}],["path",{d:"m12.829 7.172 4.359-4.346a1 1 0 1 1 3.986 3.986l-4.353 4.353",key:"16h5ne"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
97
+ */const Ih=lt("PenOff",[["path",{d:"m10 10-6.157 6.162a2 2 0 0 0-.5.833l-1.322 4.36a.5.5 0 0 0 .622.624l4.358-1.323a2 2 0 0 0 .83-.5L14 13.982",key:"bjo8r8"}],["path",{d:"m12.829 7.172 4.359-4.346a1 1 0 1 1 3.986 3.986l-4.353 4.353",key:"16h5ne"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
98
98
  * @license lucide-react v0.468.0 - ISC
99
99
  *
100
100
  * This source code is licensed under the ISC license.
101
101
  * See the LICENSE file in the root directory of this source tree.
102
- */const Ih=lt("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
102
+ */const Mh=lt("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
103
103
  * @license lucide-react v0.468.0 - ISC
104
104
  *
105
105
  * This source code is licensed under the ISC license.
106
106
  * See the LICENSE file in the root directory of this source tree.
107
- */const Hi=lt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function ql(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=ql(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Gl(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=ql(e))&&(r&&(r+=" "),r+=t);return r}function Mh(e){if(typeof document>"u")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))}Mh(`: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)}}
108
- `);var Ui=e=>typeof e=="number"&&!isNaN(e),ar=e=>typeof e=="string",Kl=e=>typeof e=="function",$h=e=>ar(e)||Ui(e),Lh=e=>_.isValidElement(e)||ar(e)||Kl(e)||Ui(e),Rh=1,Yl=()=>`${Rh++}`,wt=new Map,Wi=[],Xl=new Set,Jl=()=>wt.size>0,Vh=(e,{containerId:t})=>{var n;return(n=wt.get(t||1))==null?void 0:n.toasts.get(e)};function jh(e,t){var n;if(t)return!!((n=wt.get(t))!=null&&n.isToastActive(e));let r=!1;return wt.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function zh(e){if(!Jl()){Wi=Wi.filter(t=>e!=null&&t.options.toastId!==e);return}if(e==null||$h(e))wt.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=wt.get(e.containerId);t?t.removeToast(e.id):wt.forEach(n=>{n.removeToast(e.id)})}}var Bh=(e={})=>{wt.forEach(t=>{t.props.limit&&(!e.containerId||t.id===e.containerId)&&t.clearQueue()})};function Hh(e,t){Lh(e)&&(Jl()||Wi.push({content:e,options:t}),wt.forEach(n=>{n.buildToast(e,t)}))}function Zl(e,t){wt.forEach(n=>{(t==null||!(t!=null&&t.containerId)||(t==null?void 0:t.containerId)===n.id)&&n.toggle(e,t==null?void 0:t.id)})}function Uh(e){return Xl.add(e),()=>{Xl.delete(e)}}function Wh(e){return e&&(ar(e.toastId)||Ui(e.toastId))?e.toastId:Yl()}function sr(e,t){return Hh(e,t),t.toastId}function Zr(e,t){return{...t,type:t&&t.type||e,toastId:Wh(t)}}function Qr(e){return(t,n)=>sr(t,Zr(e,n))}function Pe(e,t){return sr(e,Zr("default",t))}Pe.loading=(e,t)=>sr(e,Zr("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t}));function qh(e,{pending:t,error:n,success:r},o){let i;t&&(i=ar(t)?Pe.loading(t,o):Pe.loading(t.render,{...o,...t}));let a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},s=(c,d,g)=>{if(d==null){Pe.dismiss(i);return}let m={type:c,...a,...o,data:g},f=ar(d)?{render:d}:d;return i?Pe.update(i,{...m,...f}):Pe(f.render,{...m,...f}),g},u=Kl(e)?e():e;return u.then(c=>s("success",r,c)).catch(c=>s("error",n,c)),u}Pe.promise=qh,Pe.success=Qr("success"),Pe.info=Qr("info"),Pe.error=Qr("error"),Pe.warning=Qr("warning"),Pe.warn=Pe.warning,Pe.dark=(e,t)=>sr(e,Zr("default",{theme:"dark",...t}));function Gh(e){zh(e)}Pe.dismiss=Gh,Pe.clearWaitingQueue=Bh,Pe.isActive=jh,Pe.update=(e,t={})=>{let n=Vh(e,t);if(n){let{props:r,content:o}=n,i={delay:100,...r,...t,toastId:t.toastId||e,updateId:Yl()};i.toastId!==e&&(i.staleId=e);let a=i.render||o;delete i.render,sr(a,i)}},Pe.done=e=>{Pe.update(e,{progress:1})},Pe.onChange=Uh,Pe.play=e=>Zl(!0,e),Pe.pause=e=>Zl(!1,e);const Kh={category:"Thư mục gốc",fileName:"Tên tệp",fullPath:"Đường dẫn đầy đủ",createAt:"Ngày tạo",creator:"Người tạo",creatorId:"ID người tạo",DataSource:"Nguồn dữ liệu",SuggestedAICategories:"Danh mục AI gợi ý",KeywordAISuggestion:"Từ khóa AI gợi ý",SummaryOfSuggestedAI:"Tóm tắt AI gợi ý",AccessLevel:"Cấp độ truy cập"},Yh=e=>e==="SummaryOfSuggestedAI"||e==="KeywordAISuggestion"||e==="SuggestedAICategories",qi=e=>e==="fullPath"||e==="createAt"||e==="creator"||e==="creatorId"||e==="DataSource"||e==="AccessLevel"||e==="category"||e==="fileName";function Ql(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Xh(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Ql(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Ql(e[o],null)}}}}var Pn=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(Jh);if(i){const a=i.props.children,s=o.map(u=>u===i?p.Children.count(a)>1?p.Children.only(null):p.isValidElement(a)?a.props.children:null:u);return l.jsx(Gi,{...r,ref:t,children:p.isValidElement(a)?p.cloneElement(a,void 0,s):null})}return l.jsx(Gi,{...r,ref:t,children:n})});Pn.displayName="Slot";var Gi=p.forwardRef((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const o=Qh(n);return p.cloneElement(n,{...Zh(r,n.props),ref:t?Xh(t,o):o})}return p.Children.count(n)>1?p.Children.only(null):null});Gi.displayName="SlotClone";var ec=({children:e})=>l.jsx(l.Fragment,{children:e});function Jh(e){return p.isValidElement(e)&&e.type===ec}function Zh(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Qh(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Ki="-",ev=e=>{const t=nv(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(Ki);return s[0]===""&&s.length!==1&&s.shift(),tc(s,t)||tv(a)},getConflictingClassGroupIds:(a,s)=>{const u=n[a]||[];return s&&r[a]?[...u,...r[a]]:u}}},tc=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?tc(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Ki);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},nc=/^\[(.+)\]$/,tv=e=>{if(nc.test(e)){const t=nc.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},nv=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return ov(Object.entries(e.classGroups),n).forEach(([i,a])=>{Yi(a,r,i,t)}),r},Yi=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:rc(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(rv(o)){Yi(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{Yi(a,rc(t,i),n,r)})})},rc=(e,t)=>{let n=e;return t.split(Ki).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},rv=e=>e.isThemeGetter,ov=(e,t)=>t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,s])=>[t+a,s])):i);return[n,o]}):e,iv=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},oc="!",av=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,a=s=>{const u=[];let c=0,d=0,g;for(let y=0;y<s.length;y++){let b=s[y];if(c===0){if(b===o&&(r||s.slice(y,y+i)===t)){u.push(s.slice(d,y)),d=y+i;continue}if(b==="/"){g=y;continue}}b==="["?c++:b==="]"&&c--}const m=u.length===0?s:s.substring(d),f=m.startsWith(oc),v=f?m.substring(1):m,h=g&&g>d?g-d:void 0;return{modifiers:u,hasImportantModifier:f,baseClassName:v,maybePostfixModifierPosition:h}};return n?s=>n({className:s,parseClassName:a}):a},sv=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},lv=e=>({cache:iv(e.cacheSize),parseClassName:av(e),...ev(e)}),cv=/\s+/,uv=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split(cv);let s="";for(let u=a.length-1;u>=0;u-=1){const c=a[u],{modifiers:d,hasImportantModifier:g,baseClassName:m,maybePostfixModifierPosition:f}=n(c);let v=!!f,h=r(v?m.substring(0,f):m);if(!h){if(!v){s=c+(s.length>0?" "+s:s);continue}if(h=r(m),!h){s=c+(s.length>0?" "+s:s);continue}v=!1}const y=sv(d).join(":"),b=g?y+oc:y,w=b+h;if(i.includes(w))continue;i.push(w);const C=o(h,v);for(let E=0;E<C.length;++E){const x=C[E];i.push(b+x)}s=c+(s.length>0?" "+s:s)}return s};function dv(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ic(t))&&(r&&(r+=" "),r+=n);return r}const ic=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ic(e[r]))&&(n&&(n+=" "),n+=t);return n};function fv(e,...t){let n,r,o,i=a;function a(u){const c=t.reduce((d,g)=>g(d),e());return n=lv(c),r=n.cache.get,o=n.cache.set,i=s,s(u)}function s(u){const c=r(u);if(c)return c;const d=uv(u,n);return o(u,d),d}return function(){return i(dv.apply(null,arguments))}}const ke=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},ac=/^\[(?:([a-z-]+):)?(.+)\]$/i,pv=/^\d+\/\d+$/,gv=new Set(["px","full","screen"]),mv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hv=/\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$/,vv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,yv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,xv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vt=e=>Nn(e)||gv.has(e)||pv.test(e),Yt=e=>kn(e,"length",Av),Nn=e=>!!e&&!Number.isNaN(Number(e)),Xi=e=>kn(e,"number",Nn),lr=e=>!!e&&Number.isInteger(Number(e)),bv=e=>e.endsWith("%")&&Nn(e.slice(0,-1)),be=e=>ac.test(e),Xt=e=>mv.test(e),wv=new Set(["length","size","percentage"]),Cv=e=>kn(e,wv,sc),Sv=e=>kn(e,"position",sc),Ev=new Set(["image","url"]),_v=e=>kn(e,Ev,Nv),Tv=e=>kn(e,"",Pv),cr=()=>!0,kn=(e,t,n)=>{const r=ac.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Av=e=>hv.test(e)&&!vv.test(e),sc=()=>!1,Pv=e=>yv.test(e),Nv=e=>xv.test(e),kv=fv(()=>{const e=ke("colors"),t=ke("spacing"),n=ke("blur"),r=ke("brightness"),o=ke("borderColor"),i=ke("borderRadius"),a=ke("borderSpacing"),s=ke("borderWidth"),u=ke("contrast"),c=ke("grayscale"),d=ke("hueRotate"),g=ke("invert"),m=ke("gap"),f=ke("gradientColorStops"),v=ke("gradientColorStopPositions"),h=ke("inset"),y=ke("margin"),b=ke("opacity"),w=ke("padding"),C=ke("saturate"),E=ke("scale"),x=ke("sepia"),O=ke("skew"),I=ke("space"),L=ke("translate"),H=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto",be,t],U=()=>[be,t],Z=()=>["",Vt,Yt],k=()=>["auto",Nn,be],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],j=()=>["","0",be],A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[Nn,be];return{cacheSize:500,separator:":",theme:{colors:[cr],spacing:[Vt,Yt],blur:["none","",Xt,be],brightness:B(),borderColor:[e],borderRadius:["none","","full",Xt,be],borderSpacing:U(),borderWidth:Z(),contrast:B(),grayscale:j(),hueRotate:B(),invert:j(),gap:U(),gradientColorStops:[e],gradientColorStopPositions:[bv,Yt],inset:G(),margin:G(),opacity:B(),padding:U(),saturate:B(),scale:B(),sepia:j(),skew:B(),space:U(),translate:U()},classGroups:{aspect:[{aspect:["auto","square","video",be]}],container:["container"],columns:[{columns:[Xt]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"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"],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:[...$(),be]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",lr,be]}],basis:[{basis:G()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",be]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",lr,be]}],"grid-cols":[{"grid-cols":[cr]}],"col-start-end":[{col:["auto",{span:["full",lr,be]},be]}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":[cr]}],"row-start-end":[{row:["auto",{span:[lr,be]},be]}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",be]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",be]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[I]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[I]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",be,t]}],"min-w":[{"min-w":[be,t,"min","max","fit"]}],"max-w":[{"max-w":[be,t,"none","full","min","max","fit","prose",{screen:[Xt]},Xt]}],h:[{h:[be,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[be,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[be,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[be,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Xt,Yt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Xi]}],"font-family":[{font:[cr]}],"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:["tighter","tight","normal","wide","wider","widest",be]}],"line-clamp":[{"line-clamp":["none",Nn,Xi]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Vt,be]}],"list-image":[{"list-image":["none",be]}],"list-style-type":[{list:["none","disc","decimal",be]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Vt,Yt]}],"underline-offset":[{"underline-offset":["auto",Vt,be]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$(),Sv]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Cv]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},_v]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:F()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[Vt,be]}],"outline-w":[{outline:[Vt,Yt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Vt,Yt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Xt,Tv]}],"shadow-color":[{shadow:[cr]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Xt,be]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[g]}],saturate:[{saturate:[C]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",be]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",be]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",be]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[lr,be]}],"translate-x":[{"translate-x":[L]}],"translate-y":[{"translate-y":[L]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",be]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",be]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"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",be]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Vt,Yt,Xi]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}});function he(...e){return kv(Gl(e))}const Ov=e=>{if(e===0)return"0 Bytes";const t=1024,n=["Bytes","KB","MB","GB","TB"],r=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/Math.pow(t,r)).toFixed(2))} ${n[r]}`},lc=p.forwardRef(({className:e,...t},n)=>l.jsx("nav",{ref:n,"aria-label":"breadcrumb",className:he("s3-explr-ui-breadcrumb",e),...t}));lc.displayName="Breadcrumb";const cc=p.forwardRef(({className:e,...t},n)=>l.jsx("ol",{ref:n,className:he("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5","s3-explr-ui-breadcrumb-list",e),...t}));cc.displayName="BreadcrumbList";const Ji=p.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:he("inline-flex items-center gap-1.5","s3-explr-ui-breadcrumb-item",e),...t}));Ji.displayName="BreadcrumbItem";const Zi=p.forwardRef(({asChild:e,className:t,...n},r)=>{const o=e?Pn:"a";return l.jsx(o,{ref:r,className:he("transition-colors hover:text-foreground","s3-explr-ui-breadcrumb-link",t),...n})});Zi.displayName="BreadcrumbLink";const Fv=p.forwardRef(({className:e,...t},n)=>l.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:he("font-normal text-foreground","s3-explr-ui-breadcrumb-page",e),...t}));Fv.displayName="BreadcrumbPage";const uc=({children:e,className:t,...n})=>l.jsx("li",{role:"presentation","aria-hidden":"true",className:he("[&>svg]:w-3.5 [&>svg]:h-3.5","s3-explr-ui-breadcrumb-separator",t),...n,children:e??l.jsx(Wl,{})});uc.displayName="BreadcrumbSeparator";const dc=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,fc=Gl,Qi=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return fc(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const d=n==null?void 0:n[c],g=i==null?void 0:i[c];if(d===null)return null;const m=dc(d)||dc(g);return o[c][m]}),s=n&&Object.entries(n).reduce((c,d)=>{let[g,m]=d;return m===void 0||(c[g]=m),c},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:g,className:m,...f}=d;return Object.entries(f).every(v=>{let[h,y]=v;return Array.isArray(y)?y.includes({...i,...s}[h]):{...i,...s}[h]===y})?[...c,g,m]:c},[]);return fc(e,a,u,n==null?void 0:n.class,n==null?void 0:n.className)},pc=Qi("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 s3-explr-ui-button",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90 s3-explr-ui-button-default",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90 s3-explr-ui-button-destructive",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground s3-explr-ui-button-outline",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80 s3-explr-ui-button-secondary",ghost:"hover:bg-accent hover:text-accent-foreground s3-explr-ui-button-ghost",link:"text-primary underline-offset-4 hover:underline s3-explr-ui-button-link"},size:{default:"h-9 px-4 py-2 s3-explr-ui-button-size-default",sm:"h-8 rounded-md px-3 text-xs s3-explr-ui-button-size-sm",lg:"h-10 rounded-md px-8 s3-explr-ui-button-size-lg",icon:"h-9 w-9 s3-explr-ui-button-size-icon"}},defaultVariants:{variant:"default",size:"default"}}),ve=p.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const a=r?Pn:"button";return l.jsx(a,{className:he(pc({variant:t,size:n,className:e})),ref:i,...o})});ve.displayName="Button";function Dv(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function eo(...e){return t=>e.forEach(n=>Dv(n,t))}function ct(...e){return p.useCallback(eo(...e),e)}function Iv(e,t){const n=p.createContext(t),r=i=>{const{children:a,...s}=i,u=p.useMemo(()=>s,Object.values(s));return l.jsx(n.Provider,{value:u,children:a})};r.displayName=e+"Provider";function o(i){const a=p.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function Jt(e,t=[]){let n=[];function r(i,a){const s=p.createContext(a),u=n.length;n=[...n,a];const c=g=>{var b;const{scope:m,children:f,...v}=g,h=((b=m==null?void 0:m[e])==null?void 0:b[u])||s,y=p.useMemo(()=>v,Object.values(v));return l.jsx(h.Provider,{value:y,children:f})};c.displayName=i+"Provider";function d(g,m){var h;const f=((h=m==null?void 0:m[e])==null?void 0:h[u])||s,v=p.useContext(f);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${i}\``)}return[c,d]}const o=()=>{const i=n.map(a=>p.createContext(a));return function(s){const u=(s==null?void 0:s[e])||i;return p.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return o.scopeName=e,[r,Mv(o,...t)]}function Mv(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:u,scopeName:c})=>{const g=u(i)[`__scope${c}`];return{...s,...g}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Le(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Ge(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function On({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=$v({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Ge(n),u=p.useCallback(c=>{if(i){const g=typeof c=="function"?c(e):c;g!==e&&s(g)}else o(c)},[i,e,o,s]);return[a,u]}function $v({defaultProp:e,onChange:t}){const n=p.useState(e),[r]=n,o=p.useRef(r),i=Ge(t);return p.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function Lv(e){const t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var ot=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{};function gc(e){const[t,n]=p.useState(void 0);return ot(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const u=i.borderBoxSize,c=Array.isArray(u)?u[0]:u;a=c.inlineSize,s=c.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function Rv(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var Fn=e=>{const{present:t,children:n}=e,r=Vv(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),i=ct(r.ref,jv(o));return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:i}):null};Fn.displayName="Presence";function Vv(e){const[t,n]=p.useState(),r=p.useRef({}),o=p.useRef(e),i=p.useRef("none"),a=e?"mounted":"unmounted",[s,u]=Rv(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const c=to(r.current);i.current=s==="mounted"?c:"none"},[s]),ot(()=>{const c=r.current,d=o.current;if(d!==e){const m=i.current,f=to(c);e?u("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(d&&m!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),ot(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,g=f=>{const h=to(r.current).includes(f.animationName);if(f.target===t&&h&&(u("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},m=f=>{f.target===t&&(i.current=to(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:p.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function to(e){return(e==null?void 0:e.animationName)||"none"}function jv(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var mc=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(Bv);if(i){const a=i.props.children,s=o.map(u=>u===i?p.Children.count(a)>1?p.Children.only(null):p.isValidElement(a)?a.props.children:null:u);return l.jsx(ea,{...r,ref:t,children:p.isValidElement(a)?p.cloneElement(a,void 0,s):null})}return l.jsx(ea,{...r,ref:t,children:n})});mc.displayName="Slot";var ea=p.forwardRef((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const o=Uv(n);return p.cloneElement(n,{...Hv(r,n.props),ref:t?eo(t,o):o})}return p.Children.count(n)>1?p.Children.only(null):null});ea.displayName="SlotClone";var zv=({children:e})=>l.jsx(l.Fragment,{children:e});function Bv(e){return p.isValidElement(e)&&e.type===zv}function Hv(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Uv(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Wv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ve=Wv.reduce((e,t)=>{const n=p.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?mc:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function hc(e,t){e&&Ir.flushSync(()=>e.dispatchEvent(t))}var ta="Checkbox",[qv,f_]=Jt(ta),[Gv,Kv]=qv(ta),vc=p.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:u="on",onCheckedChange:c,form:d,...g}=e,[m,f]=p.useState(null),v=ct(t,E=>f(E)),h=p.useRef(!1),y=m?d||!!m.closest("form"):!0,[b=!1,w]=On({prop:o,defaultProp:i,onChange:c}),C=p.useRef(b);return p.useEffect(()=>{const E=m==null?void 0:m.form;if(E){const x=()=>w(C.current);return E.addEventListener("reset",x),()=>E.removeEventListener("reset",x)}},[m,w]),l.jsxs(Gv,{scope:n,state:b,disabled:s,children:[l.jsx(Ve.button,{type:"button",role:"checkbox","aria-checked":Zt(b)?"mixed":b,"aria-required":a,"data-state":bc(b),"data-disabled":s?"":void 0,disabled:s,value:u,...g,ref:v,onKeyDown:Le(e.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:Le(e.onClick,E=>{w(x=>Zt(x)?!0:!x),y&&(h.current=E.isPropagationStopped(),h.current||E.stopPropagation())})}),y&&l.jsx(Yv,{control:m,bubbles:!h.current,name:r,value:u,checked:b,required:a,disabled:s,form:d,style:{transform:"translateX(-100%)"},defaultChecked:Zt(i)?!1:i})]})});vc.displayName=ta;var yc="CheckboxIndicator",xc=p.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=Kv(yc,n);return l.jsx(Fn,{present:r||Zt(i.state)||i.state===!0,children:l.jsx(Ve.span,{"data-state":bc(i.state),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});xc.displayName=yc;var Yv=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:o,...i}=e,a=p.useRef(null),s=Lv(n),u=gc(t);p.useEffect(()=>{const d=a.current,g=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(g,"checked").set;if(s!==n&&f){const v=new Event("click",{bubbles:r});d.indeterminate=Zt(n),f.call(d,Zt(n)?!1:n),d.dispatchEvent(v)}},[s,n,r]);const c=p.useRef(Zt(n)?!1:n);return l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o??c.current,...i,tabIndex:-1,ref:a,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Zt(e){return e==="indeterminate"}function bc(e){return Zt(e)?"indeterminate":e?"checked":"unchecked"}var wc=vc,Xv=xc;const na=p.forwardRef(({className:e,...t},n)=>l.jsx(wc,{ref:n,className:he("s3-explr-ui-checkbox peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:l.jsx(Xv,{className:he("s3-explr-ui-checkbox-indicator flex items-center justify-center text-current"),children:l.jsx(Ph,{className:"s3-explr-ui-checkbox-check h-4 w-4"})})}));na.displayName=wc.displayName;var Jv=p.useId||(()=>{}),Zv=0;function Dn(e){const[t,n]=p.useState(Jv());return ot(()=>{e||n(r=>r??String(Zv++))},[e]),e||(t?`radix-${t}`:"")}function Cc(e,t=globalThis==null?void 0:globalThis.document){const n=Ge(e);p.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Qv="DismissableLayer",ra="dismissableLayer.update",ey="dismissableLayer.pointerDownOutside",ty="dismissableLayer.focusOutside",Sc,Ec=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),oa=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...u}=e,c=p.useContext(Ec),[d,g]=p.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=p.useState({}),v=ct(t,I=>g(I)),h=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=h.indexOf(y),w=d?h.indexOf(d):-1,C=c.layersWithOutsidePointerEventsDisabled.size>0,E=w>=b,x=ry(I=>{const L=I.target,H=[...c.branches].some(D=>D.contains(L));!E||H||(o==null||o(I),a==null||a(I),I.defaultPrevented||s==null||s())},m),O=oy(I=>{const L=I.target;[...c.branches].some(D=>D.contains(L))||(i==null||i(I),a==null||a(I),I.defaultPrevented||s==null||s())},m);return Cc(I=>{w===c.layers.size-1&&(r==null||r(I),!I.defaultPrevented&&s&&(I.preventDefault(),s()))},m),p.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Sc=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),Tc(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Sc)}},[d,m,n,c]),p.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),Tc())},[d,c]),p.useEffect(()=>{const I=()=>f({});return document.addEventListener(ra,I),()=>document.removeEventListener(ra,I)},[]),l.jsx(Ve.div,{...u,ref:v,style:{pointerEvents:C?E?"auto":"none":void 0,...e.style},onFocusCapture:Le(e.onFocusCapture,O.onFocusCapture),onBlurCapture:Le(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Le(e.onPointerDownCapture,x.onPointerDownCapture)})});oa.displayName=Qv;var ny="DismissableLayerBranch",_c=p.forwardRef((e,t)=>{const n=p.useContext(Ec),r=p.useRef(null),o=ct(t,r);return p.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),l.jsx(Ve.div,{...e,ref:o})});_c.displayName=ny;function ry(e,t=globalThis==null?void 0:globalThis.document){const n=Ge(e),r=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let u=function(){Ac(ey,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function oy(e,t=globalThis==null?void 0:globalThis.document){const n=Ge(e),r=p.useRef(!1);return p.useEffect(()=>{const o=i=>{i.target&&!r.current&&Ac(ty,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Tc(){const e=new CustomEvent(ra);document.dispatchEvent(e)}function Ac(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?hc(o,i):o.dispatchEvent(i)}var iy=oa,ay=_c,ia="focusScope.autoFocusOnMount",aa="focusScope.autoFocusOnUnmount",Pc={bubbles:!1,cancelable:!0},sy="FocusScope",Nc=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,u]=p.useState(null),c=Ge(o),d=Ge(i),g=p.useRef(null),m=ct(t,h=>u(h)),f=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let h=function(C){if(f.paused||!s)return;const E=C.target;s.contains(E)?g.current=E:Qt(g.current,{select:!0})},y=function(C){if(f.paused||!s)return;const E=C.relatedTarget;E!==null&&(s.contains(E)||Qt(g.current,{select:!0}))},b=function(C){if(document.activeElement===document.body)for(const x of C)x.removedNodes.length>0&&Qt(s)};document.addEventListener("focusin",h),document.addEventListener("focusout",y);const w=new MutationObserver(b);return s&&w.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",y),w.disconnect()}}},[r,s,f.paused]),p.useEffect(()=>{if(s){Fc.add(f);const h=document.activeElement;if(!s.contains(h)){const b=new CustomEvent(ia,Pc);s.addEventListener(ia,c),s.dispatchEvent(b),b.defaultPrevented||(ly(py(kc(s)),{select:!0}),document.activeElement===h&&Qt(s))}return()=>{s.removeEventListener(ia,c),setTimeout(()=>{const b=new CustomEvent(aa,Pc);s.addEventListener(aa,d),s.dispatchEvent(b),b.defaultPrevented||Qt(h??document.body,{select:!0}),s.removeEventListener(aa,d),Fc.remove(f)},0)}}},[s,c,d,f]);const v=p.useCallback(h=>{if(!n&&!r||f.paused)return;const y=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,b=document.activeElement;if(y&&b){const w=h.currentTarget,[C,E]=cy(w);C&&E?!h.shiftKey&&b===E?(h.preventDefault(),n&&Qt(C,{select:!0})):h.shiftKey&&b===C&&(h.preventDefault(),n&&Qt(E,{select:!0})):b===w&&h.preventDefault()}},[n,r,f.paused]);return l.jsx(Ve.div,{tabIndex:-1,...a,ref:m,onKeyDown:v})});Nc.displayName=sy;function ly(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Qt(r,{select:t}),document.activeElement!==n)return}function cy(e){const t=kc(e),n=Oc(t,e),r=Oc(t.reverse(),e);return[n,r]}function kc(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Oc(e,t){for(const n of e)if(!uy(n,{upTo:t}))return n}function uy(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function dy(e){return e instanceof HTMLInputElement&&"select"in e}function Qt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&dy(e)&&t&&e.select()}}var Fc=fy();function fy(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Dc(e,t),e.unshift(t)},remove(t){var n;e=Dc(e,t),(n=e[0])==null||n.resume()}}}function Dc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function py(e){return e.filter(t=>t.tagName!=="A")}var gy="Portal",sa=p.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=p.useState(!1);ot(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?ai.createPortal(l.jsx(Ve.div,{...r,ref:t}),a):null});sa.displayName=gy;var la=0;function my(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ic()),document.body.insertAdjacentElement("beforeend",e[1]??Ic()),la++,()=>{la===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),la--}},[])}function Ic(){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 Ct=function(){return Ct=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Ct.apply(this,arguments)};function Mc(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function gn(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(g){a(g)}}function u(d){try{c(r.throw(d))}catch(g){a(g)}}function c(d){d.done?i(d.value):o(d.value).then(s,u)}c((r=r.apply(e,t||[])).next())})}function $c(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function Lc(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var no="right-scroll-bar-position",ro="width-before-scroll-bar",hy="with-scroll-bars-hidden",vy="--removed-body-scroll-bar-size";function ca(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function yy(e,t){var n=_.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var xy=typeof window<"u"?p.useLayoutEffect:p.useEffect,Rc=new WeakMap;function by(e,t){var n=yy(null,function(r){return e.forEach(function(o){return ca(o,r)})});return xy(function(){var r=Rc.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(s){i.has(s)||ca(s,null)}),i.forEach(function(s){o.has(s)||ca(s,a)})}Rc.set(n,e)},[e]),n}function wy(e){return e}function Cy(e,t){t===void 0&&(t=wy);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var u=function(){var d=a;a=[],d.forEach(i)},c=function(){return Promise.resolve().then(u)};c(),n={push:function(d){a.push(d),c()},filter:function(d){return a=a.filter(d),n}}}};return o}function Sy(e){e===void 0&&(e={});var t=Cy(null);return t.options=Ct({async:!0,ssr:!1},e),t}var Vc=function(e){var t=e.sideCar,n=Mc(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return p.createElement(r,Ct({},n))};Vc.isSideCarExport=!0;function Ey(e,t){return e.useMedium(t),Vc}var jc=Sy(),ua=function(){},oo=p.forwardRef(function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:ua,onWheelCapture:ua,onTouchMoveCapture:ua}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,u=e.className,c=e.removeScrollBar,d=e.enabled,g=e.shards,m=e.sideCar,f=e.noIsolation,v=e.inert,h=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,w=e.gapMode,C=Mc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=m,x=by([n,t]),O=Ct(Ct({},C),o);return p.createElement(p.Fragment,null,d&&p.createElement(E,{sideCar:jc,removeScrollBar:c,shards:g,noIsolation:f,inert:v,setCallbacks:i,allowPinchZoom:!!h,lockRef:n,gapMode:w}),a?p.cloneElement(p.Children.only(s),Ct(Ct({},O),{ref:x})):p.createElement(b,Ct({},O,{className:u,ref:x}),s))});oo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},oo.classNames={fullWidth:ro,zeroRight:no};var _y=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ty(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=_y();return t&&e.setAttribute("nonce",t),e}function Ay(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Py(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ny=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Ty())&&(Ay(t,n),Py(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ky=function(){var e=Ny();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},zc=function(){var e=ky(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Oy={left:0,top:0,right:0,gap:0},da=function(e){return parseInt(e||"",10)||0},Fy=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[da(n),da(r),da(o)]},Dy=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Oy;var t=Fy(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Iy=zc(),In="data-scroll-locked",My=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
109
- .`.concat(hy,` {
107
+ */const Hi=lt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Kl(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Kl(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Yl(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Kl(e))&&(r&&(r+=" "),r+=t);return r}function $h(e){if(typeof document>"u")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))}$h(`: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)}}
108
+ `);var Ui=e=>typeof e=="number"&&!isNaN(e),ar=e=>typeof e=="string",Xl=e=>typeof e=="function",Lh=e=>ar(e)||Ui(e),Rh=e=>_.isValidElement(e)||ar(e)||Xl(e)||Ui(e),Vh=1,Jl=()=>`${Vh++}`,wt=new Map,Wi=[],Zl=new Set,Ql=()=>wt.size>0,jh=(e,{containerId:t})=>{var n;return(n=wt.get(t||1))==null?void 0:n.toasts.get(e)};function zh(e,t){var n;if(t)return!!((n=wt.get(t))!=null&&n.isToastActive(e));let r=!1;return wt.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function Bh(e){if(!Ql()){Wi=Wi.filter(t=>e!=null&&t.options.toastId!==e);return}if(e==null||Lh(e))wt.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=wt.get(e.containerId);t?t.removeToast(e.id):wt.forEach(n=>{n.removeToast(e.id)})}}var Hh=(e={})=>{wt.forEach(t=>{t.props.limit&&(!e.containerId||t.id===e.containerId)&&t.clearQueue()})};function Uh(e,t){Rh(e)&&(Ql()||Wi.push({content:e,options:t}),wt.forEach(n=>{n.buildToast(e,t)}))}function ec(e,t){wt.forEach(n=>{(t==null||!(t!=null&&t.containerId)||(t==null?void 0:t.containerId)===n.id)&&n.toggle(e,t==null?void 0:t.id)})}function Wh(e){return Zl.add(e),()=>{Zl.delete(e)}}function qh(e){return e&&(ar(e.toastId)||Ui(e.toastId))?e.toastId:Jl()}function sr(e,t){return Uh(e,t),t.toastId}function Zr(e,t){return{...t,type:t&&t.type||e,toastId:qh(t)}}function Qr(e){return(t,n)=>sr(t,Zr(e,n))}function Pe(e,t){return sr(e,Zr("default",t))}Pe.loading=(e,t)=>sr(e,Zr("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t}));function Gh(e,{pending:t,error:n,success:r},o){let i;t&&(i=ar(t)?Pe.loading(t,o):Pe.loading(t.render,{...o,...t}));let a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},s=(c,d,g)=>{if(d==null){Pe.dismiss(i);return}let m={type:c,...a,...o,data:g},f=ar(d)?{render:d}:d;return i?Pe.update(i,{...m,...f}):Pe(f.render,{...m,...f}),g},u=Xl(e)?e():e;return u.then(c=>s("success",r,c)).catch(c=>s("error",n,c)),u}Pe.promise=Gh,Pe.success=Qr("success"),Pe.info=Qr("info"),Pe.error=Qr("error"),Pe.warning=Qr("warning"),Pe.warn=Pe.warning,Pe.dark=(e,t)=>sr(e,Zr("default",{theme:"dark",...t}));function Kh(e){Bh(e)}Pe.dismiss=Kh,Pe.clearWaitingQueue=Hh,Pe.isActive=zh,Pe.update=(e,t={})=>{let n=jh(e,t);if(n){let{props:r,content:o}=n,i={delay:100,...r,...t,toastId:t.toastId||e,updateId:Jl()};i.toastId!==e&&(i.staleId=e);let a=i.render||o;delete i.render,sr(a,i)}},Pe.done=e=>{Pe.update(e,{progress:1})},Pe.onChange=Wh,Pe.play=e=>ec(!0,e),Pe.pause=e=>ec(!1,e);const Yh={category:"Thư mục gốc",fileName:"Tên tệp",fullPath:"Đường dẫn đầy đủ",createAt:"Ngày tạo",creator:"Người tạo",creatorId:"ID người tạo",DataSource:"Nguồn dữ liệu",SuggestedAICategories:"Danh mục AI gợi ý",KeywordAISuggestion:"Từ khóa AI gợi ý",SummaryOfSuggestedAI:"Tóm tắt AI gợi ý",AccessLevel:"Cấp độ truy cập"},Xh=e=>e==="SummaryOfSuggestedAI"||e==="KeywordAISuggestion"||e==="SuggestedAICategories",qi=e=>e==="fullPath"||e==="createAt"||e==="creator"||e==="creatorId"||e==="DataSource"||e==="AccessLevel"||e==="category"||e==="fileName";function tc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Jh(...e){return t=>{let n=!1;const r=e.map(o=>{const i=tc(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():tc(e[o],null)}}}}var Pn=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(Zh);if(i){const a=i.props.children,s=o.map(u=>u===i?p.Children.count(a)>1?p.Children.only(null):p.isValidElement(a)?a.props.children:null:u);return l.jsx(Gi,{...r,ref:t,children:p.isValidElement(a)?p.cloneElement(a,void 0,s):null})}return l.jsx(Gi,{...r,ref:t,children:n})});Pn.displayName="Slot";var Gi=p.forwardRef((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const o=ev(n);return p.cloneElement(n,{...Qh(r,n.props),ref:t?Jh(t,o):o})}return p.Children.count(n)>1?p.Children.only(null):null});Gi.displayName="SlotClone";var nc=({children:e})=>l.jsx(l.Fragment,{children:e});function Zh(e){return p.isValidElement(e)&&e.type===nc}function Qh(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function ev(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Ki="-",tv=e=>{const t=rv(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(Ki);return s[0]===""&&s.length!==1&&s.shift(),rc(s,t)||nv(a)},getConflictingClassGroupIds:(a,s)=>{const u=n[a]||[];return s&&r[a]?[...u,...r[a]]:u}}},rc=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?rc(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Ki);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},oc=/^\[(.+)\]$/,nv=e=>{if(oc.test(e)){const t=oc.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},rv=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return iv(Object.entries(e.classGroups),n).forEach(([i,a])=>{Yi(a,r,i,t)}),r},Yi=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:ic(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(ov(o)){Yi(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{Yi(a,ic(t,i),n,r)})})},ic=(e,t)=>{let n=e;return t.split(Ki).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},ov=e=>e.isThemeGetter,iv=(e,t)=>t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,s])=>[t+a,s])):i);return[n,o]}):e,av=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},ac="!",sv=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,a=s=>{const u=[];let c=0,d=0,g;for(let y=0;y<s.length;y++){let b=s[y];if(c===0){if(b===o&&(r||s.slice(y,y+i)===t)){u.push(s.slice(d,y)),d=y+i;continue}if(b==="/"){g=y;continue}}b==="["?c++:b==="]"&&c--}const m=u.length===0?s:s.substring(d),f=m.startsWith(ac),v=f?m.substring(1):m,h=g&&g>d?g-d:void 0;return{modifiers:u,hasImportantModifier:f,baseClassName:v,maybePostfixModifierPosition:h}};return n?s=>n({className:s,parseClassName:a}):a},lv=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},cv=e=>({cache:av(e.cacheSize),parseClassName:sv(e),...tv(e)}),uv=/\s+/,dv=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split(uv);let s="";for(let u=a.length-1;u>=0;u-=1){const c=a[u],{modifiers:d,hasImportantModifier:g,baseClassName:m,maybePostfixModifierPosition:f}=n(c);let v=!!f,h=r(v?m.substring(0,f):m);if(!h){if(!v){s=c+(s.length>0?" "+s:s);continue}if(h=r(m),!h){s=c+(s.length>0?" "+s:s);continue}v=!1}const y=lv(d).join(":"),b=g?y+ac:y,w=b+h;if(i.includes(w))continue;i.push(w);const C=o(h,v);for(let E=0;E<C.length;++E){const x=C[E];i.push(b+x)}s=c+(s.length>0?" "+s:s)}return s};function fv(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=sc(t))&&(r&&(r+=" "),r+=n);return r}const sc=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=sc(e[r]))&&(n&&(n+=" "),n+=t);return n};function pv(e,...t){let n,r,o,i=a;function a(u){const c=t.reduce((d,g)=>g(d),e());return n=cv(c),r=n.cache.get,o=n.cache.set,i=s,s(u)}function s(u){const c=r(u);if(c)return c;const d=dv(u,n);return o(u,d),d}return function(){return i(fv.apply(null,arguments))}}const ke=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},lc=/^\[(?:([a-z-]+):)?(.+)\]$/i,gv=/^\d+\/\d+$/,mv=new Set(["px","full","screen"]),hv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vv=/\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$/,yv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,xv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vt=e=>Nn(e)||mv.has(e)||gv.test(e),Yt=e=>kn(e,"length",Pv),Nn=e=>!!e&&!Number.isNaN(Number(e)),Xi=e=>kn(e,"number",Nn),lr=e=>!!e&&Number.isInteger(Number(e)),wv=e=>e.endsWith("%")&&Nn(e.slice(0,-1)),be=e=>lc.test(e),Xt=e=>hv.test(e),Cv=new Set(["length","size","percentage"]),Sv=e=>kn(e,Cv,cc),Ev=e=>kn(e,"position",cc),_v=new Set(["image","url"]),Tv=e=>kn(e,_v,kv),Av=e=>kn(e,"",Nv),cr=()=>!0,kn=(e,t,n)=>{const r=lc.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Pv=e=>vv.test(e)&&!yv.test(e),cc=()=>!1,Nv=e=>xv.test(e),kv=e=>bv.test(e),Ov=pv(()=>{const e=ke("colors"),t=ke("spacing"),n=ke("blur"),r=ke("brightness"),o=ke("borderColor"),i=ke("borderRadius"),a=ke("borderSpacing"),s=ke("borderWidth"),u=ke("contrast"),c=ke("grayscale"),d=ke("hueRotate"),g=ke("invert"),m=ke("gap"),f=ke("gradientColorStops"),v=ke("gradientColorStopPositions"),h=ke("inset"),y=ke("margin"),b=ke("opacity"),w=ke("padding"),C=ke("saturate"),E=ke("scale"),x=ke("sepia"),O=ke("skew"),I=ke("space"),$=ke("translate"),H=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto",be,t],U=()=>[be,t],Z=()=>["",Vt,Yt],k=()=>["auto",Nn,be],M=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],j=()=>["","0",be],A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[Nn,be];return{cacheSize:500,separator:":",theme:{colors:[cr],spacing:[Vt,Yt],blur:["none","",Xt,be],brightness:B(),borderColor:[e],borderRadius:["none","","full",Xt,be],borderSpacing:U(),borderWidth:Z(),contrast:B(),grayscale:j(),hueRotate:B(),invert:j(),gap:U(),gradientColorStops:[e],gradientColorStopPositions:[wv,Yt],inset:G(),margin:G(),opacity:B(),padding:U(),saturate:B(),scale:B(),sepia:j(),skew:B(),space:U(),translate:U()},classGroups:{aspect:[{aspect:["auto","square","video",be]}],container:["container"],columns:[{columns:[Xt]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"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"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...M(),be]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",lr,be]}],basis:[{basis:G()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",be]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",lr,be]}],"grid-cols":[{"grid-cols":[cr]}],"col-start-end":[{col:["auto",{span:["full",lr,be]},be]}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":[cr]}],"row-start-end":[{row:["auto",{span:[lr,be]},be]}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",be]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",be]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[I]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[I]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",be,t]}],"min-w":[{"min-w":[be,t,"min","max","fit"]}],"max-w":[{"max-w":[be,t,"none","full","min","max","fit","prose",{screen:[Xt]},Xt]}],h:[{h:[be,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[be,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[be,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[be,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Xt,Yt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Xi]}],"font-family":[{font:[cr]}],"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:["tighter","tight","normal","wide","wider","widest",be]}],"line-clamp":[{"line-clamp":["none",Nn,Xi]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Vt,be]}],"list-image":[{"list-image":["none",be]}],"list-style-type":[{list:["none","disc","decimal",be]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Vt,Yt]}],"underline-offset":[{"underline-offset":["auto",Vt,be]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...M(),Ev]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Sv]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Tv]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:F()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[Vt,be]}],"outline-w":[{outline:[Vt,Yt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Vt,Yt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Xt,Av]}],"shadow-color":[{shadow:[cr]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Xt,be]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[g]}],saturate:[{saturate:[C]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",be]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",be]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",be]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[lr,be]}],"translate-x":[{"translate-x":[$]}],"translate-y":[{"translate-y":[$]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",be]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",be]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"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",be]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Vt,Yt,Xi]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}});function he(...e){return Ov(Yl(e))}const Fv=e=>{if(e===0)return"0 Bytes";const t=1024,n=["Bytes","KB","MB","GB","TB"],r=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/Math.pow(t,r)).toFixed(2))} ${n[r]}`},uc=p.forwardRef(({className:e,...t},n)=>l.jsx("nav",{ref:n,"aria-label":"breadcrumb",className:he("s3-explr-ui-breadcrumb",e),...t}));uc.displayName="Breadcrumb";const dc=p.forwardRef(({className:e,...t},n)=>l.jsx("ol",{ref:n,className:he("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5","s3-explr-ui-breadcrumb-list",e),...t}));dc.displayName="BreadcrumbList";const Ji=p.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:he("inline-flex items-center gap-1.5","s3-explr-ui-breadcrumb-item",e),...t}));Ji.displayName="BreadcrumbItem";const Zi=p.forwardRef(({asChild:e,className:t,...n},r)=>{const o=e?Pn:"a";return l.jsx(o,{ref:r,className:he("transition-colors hover:text-foreground","s3-explr-ui-breadcrumb-link",t),...n})});Zi.displayName="BreadcrumbLink";const Dv=p.forwardRef(({className:e,...t},n)=>l.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:he("font-normal text-foreground","s3-explr-ui-breadcrumb-page",e),...t}));Dv.displayName="BreadcrumbPage";const fc=({children:e,className:t,...n})=>l.jsx("li",{role:"presentation","aria-hidden":"true",className:he("[&>svg]:w-3.5 [&>svg]:h-3.5","s3-explr-ui-breadcrumb-separator",t),...n,children:e??l.jsx(Gl,{})});fc.displayName="BreadcrumbSeparator";const pc=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,gc=Yl,Qi=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return gc(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const d=n==null?void 0:n[c],g=i==null?void 0:i[c];if(d===null)return null;const m=pc(d)||pc(g);return o[c][m]}),s=n&&Object.entries(n).reduce((c,d)=>{let[g,m]=d;return m===void 0||(c[g]=m),c},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:g,className:m,...f}=d;return Object.entries(f).every(v=>{let[h,y]=v;return Array.isArray(y)?y.includes({...i,...s}[h]):{...i,...s}[h]===y})?[...c,g,m]:c},[]);return gc(e,a,u,n==null?void 0:n.class,n==null?void 0:n.className)},mc=Qi("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 s3-explr-ui-button",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90 s3-explr-ui-button-default",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90 s3-explr-ui-button-destructive",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground s3-explr-ui-button-outline",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80 s3-explr-ui-button-secondary",ghost:"hover:bg-accent hover:text-accent-foreground s3-explr-ui-button-ghost",link:"text-primary underline-offset-4 hover:underline s3-explr-ui-button-link"},size:{default:"h-9 px-4 py-2 s3-explr-ui-button-size-default",sm:"h-8 rounded-md px-3 text-xs s3-explr-ui-button-size-sm",lg:"h-10 rounded-md px-8 s3-explr-ui-button-size-lg",icon:"h-9 w-9 s3-explr-ui-button-size-icon"}},defaultVariants:{variant:"default",size:"default"}}),ve=p.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const a=r?Pn:"button";return l.jsx(a,{className:he(mc({variant:t,size:n,className:e})),ref:i,...o})});ve.displayName="Button";function Iv(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function eo(...e){return t=>e.forEach(n=>Iv(n,t))}function ct(...e){return p.useCallback(eo(...e),e)}function Mv(e,t){const n=p.createContext(t),r=i=>{const{children:a,...s}=i,u=p.useMemo(()=>s,Object.values(s));return l.jsx(n.Provider,{value:u,children:a})};r.displayName=e+"Provider";function o(i){const a=p.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function Jt(e,t=[]){let n=[];function r(i,a){const s=p.createContext(a),u=n.length;n=[...n,a];const c=g=>{var b;const{scope:m,children:f,...v}=g,h=((b=m==null?void 0:m[e])==null?void 0:b[u])||s,y=p.useMemo(()=>v,Object.values(v));return l.jsx(h.Provider,{value:y,children:f})};c.displayName=i+"Provider";function d(g,m){var h;const f=((h=m==null?void 0:m[e])==null?void 0:h[u])||s,v=p.useContext(f);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${i}\``)}return[c,d]}const o=()=>{const i=n.map(a=>p.createContext(a));return function(s){const u=(s==null?void 0:s[e])||i;return p.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return o.scopeName=e,[r,$v(o,...t)]}function $v(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:u,scopeName:c})=>{const g=u(i)[`__scope${c}`];return{...s,...g}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Le(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Ge(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function On({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Lv({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Ge(n),u=p.useCallback(c=>{if(i){const g=typeof c=="function"?c(e):c;g!==e&&s(g)}else o(c)},[i,e,o,s]);return[a,u]}function Lv({defaultProp:e,onChange:t}){const n=p.useState(e),[r]=n,o=p.useRef(r),i=Ge(t);return p.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function Rv(e){const t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var ot=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{};function hc(e){const[t,n]=p.useState(void 0);return ot(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const u=i.borderBoxSize,c=Array.isArray(u)?u[0]:u;a=c.inlineSize,s=c.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function Vv(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var Fn=e=>{const{present:t,children:n}=e,r=jv(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),i=ct(r.ref,zv(o));return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:i}):null};Fn.displayName="Presence";function jv(e){const[t,n]=p.useState(),r=p.useRef({}),o=p.useRef(e),i=p.useRef("none"),a=e?"mounted":"unmounted",[s,u]=Vv(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const c=to(r.current);i.current=s==="mounted"?c:"none"},[s]),ot(()=>{const c=r.current,d=o.current;if(d!==e){const m=i.current,f=to(c);e?u("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(d&&m!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),ot(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,g=f=>{const h=to(r.current).includes(f.animationName);if(f.target===t&&h&&(u("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},m=f=>{f.target===t&&(i.current=to(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:p.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function to(e){return(e==null?void 0:e.animationName)||"none"}function zv(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var vc=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(Hv);if(i){const a=i.props.children,s=o.map(u=>u===i?p.Children.count(a)>1?p.Children.only(null):p.isValidElement(a)?a.props.children:null:u);return l.jsx(ea,{...r,ref:t,children:p.isValidElement(a)?p.cloneElement(a,void 0,s):null})}return l.jsx(ea,{...r,ref:t,children:n})});vc.displayName="Slot";var ea=p.forwardRef((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const o=Wv(n);return p.cloneElement(n,{...Uv(r,n.props),ref:t?eo(t,o):o})}return p.Children.count(n)>1?p.Children.only(null):null});ea.displayName="SlotClone";var Bv=({children:e})=>l.jsx(l.Fragment,{children:e});function Hv(e){return p.isValidElement(e)&&e.type===Bv}function Uv(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Wv(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var qv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ve=qv.reduce((e,t)=>{const n=p.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?vc:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function yc(e,t){e&&Ir.flushSync(()=>e.dispatchEvent(t))}var ta="Checkbox",[Gv,p_]=Jt(ta),[Kv,Yv]=Gv(ta),xc=p.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:u="on",onCheckedChange:c,form:d,...g}=e,[m,f]=p.useState(null),v=ct(t,E=>f(E)),h=p.useRef(!1),y=m?d||!!m.closest("form"):!0,[b=!1,w]=On({prop:o,defaultProp:i,onChange:c}),C=p.useRef(b);return p.useEffect(()=>{const E=m==null?void 0:m.form;if(E){const x=()=>w(C.current);return E.addEventListener("reset",x),()=>E.removeEventListener("reset",x)}},[m,w]),l.jsxs(Kv,{scope:n,state:b,disabled:s,children:[l.jsx(Ve.button,{type:"button",role:"checkbox","aria-checked":Zt(b)?"mixed":b,"aria-required":a,"data-state":Cc(b),"data-disabled":s?"":void 0,disabled:s,value:u,...g,ref:v,onKeyDown:Le(e.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:Le(e.onClick,E=>{w(x=>Zt(x)?!0:!x),y&&(h.current=E.isPropagationStopped(),h.current||E.stopPropagation())})}),y&&l.jsx(Xv,{control:m,bubbles:!h.current,name:r,value:u,checked:b,required:a,disabled:s,form:d,style:{transform:"translateX(-100%)"},defaultChecked:Zt(i)?!1:i})]})});xc.displayName=ta;var bc="CheckboxIndicator",wc=p.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=Yv(bc,n);return l.jsx(Fn,{present:r||Zt(i.state)||i.state===!0,children:l.jsx(Ve.span,{"data-state":Cc(i.state),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});wc.displayName=bc;var Xv=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:o,...i}=e,a=p.useRef(null),s=Rv(n),u=hc(t);p.useEffect(()=>{const d=a.current,g=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(g,"checked").set;if(s!==n&&f){const v=new Event("click",{bubbles:r});d.indeterminate=Zt(n),f.call(d,Zt(n)?!1:n),d.dispatchEvent(v)}},[s,n,r]);const c=p.useRef(Zt(n)?!1:n);return l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o??c.current,...i,tabIndex:-1,ref:a,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Zt(e){return e==="indeterminate"}function Cc(e){return Zt(e)?"indeterminate":e?"checked":"unchecked"}var Sc=xc,Jv=wc;const na=p.forwardRef(({className:e,...t},n)=>l.jsx(Sc,{ref:n,className:he("s3-explr-ui-checkbox peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:l.jsx(Jv,{className:he("s3-explr-ui-checkbox-indicator flex items-center justify-center text-current"),children:l.jsx(Nh,{className:"s3-explr-ui-checkbox-check h-4 w-4"})})}));na.displayName=Sc.displayName;var Zv=p.useId||(()=>{}),Qv=0;function Dn(e){const[t,n]=p.useState(Zv());return ot(()=>{e||n(r=>r??String(Qv++))},[e]),e||(t?`radix-${t}`:"")}function Ec(e,t=globalThis==null?void 0:globalThis.document){const n=Ge(e);p.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var ey="DismissableLayer",ra="dismissableLayer.update",ty="dismissableLayer.pointerDownOutside",ny="dismissableLayer.focusOutside",_c,Tc=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),oa=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...u}=e,c=p.useContext(Tc),[d,g]=p.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=p.useState({}),v=ct(t,I=>g(I)),h=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=h.indexOf(y),w=d?h.indexOf(d):-1,C=c.layersWithOutsidePointerEventsDisabled.size>0,E=w>=b,x=oy(I=>{const $=I.target,H=[...c.branches].some(D=>D.contains($));!E||H||(o==null||o(I),a==null||a(I),I.defaultPrevented||s==null||s())},m),O=iy(I=>{const $=I.target;[...c.branches].some(D=>D.contains($))||(i==null||i(I),a==null||a(I),I.defaultPrevented||s==null||s())},m);return Ec(I=>{w===c.layers.size-1&&(r==null||r(I),!I.defaultPrevented&&s&&(I.preventDefault(),s()))},m),p.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(_c=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),Pc(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=_c)}},[d,m,n,c]),p.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),Pc())},[d,c]),p.useEffect(()=>{const I=()=>f({});return document.addEventListener(ra,I),()=>document.removeEventListener(ra,I)},[]),l.jsx(Ve.div,{...u,ref:v,style:{pointerEvents:C?E?"auto":"none":void 0,...e.style},onFocusCapture:Le(e.onFocusCapture,O.onFocusCapture),onBlurCapture:Le(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Le(e.onPointerDownCapture,x.onPointerDownCapture)})});oa.displayName=ey;var ry="DismissableLayerBranch",Ac=p.forwardRef((e,t)=>{const n=p.useContext(Tc),r=p.useRef(null),o=ct(t,r);return p.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),l.jsx(Ve.div,{...e,ref:o})});Ac.displayName=ry;function oy(e,t=globalThis==null?void 0:globalThis.document){const n=Ge(e),r=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let u=function(){Nc(ty,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function iy(e,t=globalThis==null?void 0:globalThis.document){const n=Ge(e),r=p.useRef(!1);return p.useEffect(()=>{const o=i=>{i.target&&!r.current&&Nc(ny,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Pc(){const e=new CustomEvent(ra);document.dispatchEvent(e)}function Nc(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?yc(o,i):o.dispatchEvent(i)}var ay=oa,sy=Ac,ia="focusScope.autoFocusOnMount",aa="focusScope.autoFocusOnUnmount",kc={bubbles:!1,cancelable:!0},ly="FocusScope",Oc=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,u]=p.useState(null),c=Ge(o),d=Ge(i),g=p.useRef(null),m=ct(t,h=>u(h)),f=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let h=function(C){if(f.paused||!s)return;const E=C.target;s.contains(E)?g.current=E:Qt(g.current,{select:!0})},y=function(C){if(f.paused||!s)return;const E=C.relatedTarget;E!==null&&(s.contains(E)||Qt(g.current,{select:!0}))},b=function(C){if(document.activeElement===document.body)for(const x of C)x.removedNodes.length>0&&Qt(s)};document.addEventListener("focusin",h),document.addEventListener("focusout",y);const w=new MutationObserver(b);return s&&w.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",y),w.disconnect()}}},[r,s,f.paused]),p.useEffect(()=>{if(s){Ic.add(f);const h=document.activeElement;if(!s.contains(h)){const b=new CustomEvent(ia,kc);s.addEventListener(ia,c),s.dispatchEvent(b),b.defaultPrevented||(cy(gy(Fc(s)),{select:!0}),document.activeElement===h&&Qt(s))}return()=>{s.removeEventListener(ia,c),setTimeout(()=>{const b=new CustomEvent(aa,kc);s.addEventListener(aa,d),s.dispatchEvent(b),b.defaultPrevented||Qt(h??document.body,{select:!0}),s.removeEventListener(aa,d),Ic.remove(f)},0)}}},[s,c,d,f]);const v=p.useCallback(h=>{if(!n&&!r||f.paused)return;const y=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,b=document.activeElement;if(y&&b){const w=h.currentTarget,[C,E]=uy(w);C&&E?!h.shiftKey&&b===E?(h.preventDefault(),n&&Qt(C,{select:!0})):h.shiftKey&&b===C&&(h.preventDefault(),n&&Qt(E,{select:!0})):b===w&&h.preventDefault()}},[n,r,f.paused]);return l.jsx(Ve.div,{tabIndex:-1,...a,ref:m,onKeyDown:v})});Oc.displayName=ly;function cy(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Qt(r,{select:t}),document.activeElement!==n)return}function uy(e){const t=Fc(e),n=Dc(t,e),r=Dc(t.reverse(),e);return[n,r]}function Fc(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Dc(e,t){for(const n of e)if(!dy(n,{upTo:t}))return n}function dy(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function fy(e){return e instanceof HTMLInputElement&&"select"in e}function Qt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&fy(e)&&t&&e.select()}}var Ic=py();function py(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Mc(e,t),e.unshift(t)},remove(t){var n;e=Mc(e,t),(n=e[0])==null||n.resume()}}}function Mc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function gy(e){return e.filter(t=>t.tagName!=="A")}var my="Portal",sa=p.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=p.useState(!1);ot(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?ai.createPortal(l.jsx(Ve.div,{...r,ref:t}),a):null});sa.displayName=my;var la=0;function hy(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??$c()),document.body.insertAdjacentElement("beforeend",e[1]??$c()),la++,()=>{la===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),la--}},[])}function $c(){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 Ct=function(){return Ct=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Ct.apply(this,arguments)};function Lc(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function gn(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(g){a(g)}}function u(d){try{c(r.throw(d))}catch(g){a(g)}}function c(d){d.done?i(d.value):o(d.value).then(s,u)}c((r=r.apply(e,t||[])).next())})}function Rc(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function Vc(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var no="right-scroll-bar-position",ro="width-before-scroll-bar",vy="with-scroll-bars-hidden",yy="--removed-body-scroll-bar-size";function ca(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function xy(e,t){var n=_.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var by=typeof window<"u"?p.useLayoutEffect:p.useEffect,jc=new WeakMap;function wy(e,t){var n=xy(null,function(r){return e.forEach(function(o){return ca(o,r)})});return by(function(){var r=jc.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(s){i.has(s)||ca(s,null)}),i.forEach(function(s){o.has(s)||ca(s,a)})}jc.set(n,e)},[e]),n}function Cy(e){return e}function Sy(e,t){t===void 0&&(t=Cy);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var u=function(){var d=a;a=[],d.forEach(i)},c=function(){return Promise.resolve().then(u)};c(),n={push:function(d){a.push(d),c()},filter:function(d){return a=a.filter(d),n}}}};return o}function Ey(e){e===void 0&&(e={});var t=Sy(null);return t.options=Ct({async:!0,ssr:!1},e),t}var zc=function(e){var t=e.sideCar,n=Lc(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return p.createElement(r,Ct({},n))};zc.isSideCarExport=!0;function _y(e,t){return e.useMedium(t),zc}var Bc=Ey(),ua=function(){},oo=p.forwardRef(function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:ua,onWheelCapture:ua,onTouchMoveCapture:ua}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,u=e.className,c=e.removeScrollBar,d=e.enabled,g=e.shards,m=e.sideCar,f=e.noIsolation,v=e.inert,h=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,w=e.gapMode,C=Lc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=m,x=wy([n,t]),O=Ct(Ct({},C),o);return p.createElement(p.Fragment,null,d&&p.createElement(E,{sideCar:Bc,removeScrollBar:c,shards:g,noIsolation:f,inert:v,setCallbacks:i,allowPinchZoom:!!h,lockRef:n,gapMode:w}),a?p.cloneElement(p.Children.only(s),Ct(Ct({},O),{ref:x})):p.createElement(b,Ct({},O,{className:u,ref:x}),s))});oo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},oo.classNames={fullWidth:ro,zeroRight:no};var Ty=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ay(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ty();return t&&e.setAttribute("nonce",t),e}function Py(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ny(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ky=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Ay())&&(Py(t,n),Ny(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Oy=function(){var e=ky();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Hc=function(){var e=Oy(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Fy={left:0,top:0,right:0,gap:0},da=function(e){return parseInt(e||"",10)||0},Dy=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[da(n),da(r),da(o)]},Iy=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Fy;var t=Dy(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},My=Hc(),In="data-scroll-locked",$y=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
109
+ .`.concat(vy,` {
110
110
  overflow: hidden `).concat(r,`;
111
111
  padding-right: `).concat(s,"px ").concat(r,`;
112
112
  }
@@ -140,38 +140,38 @@
140
140
  }
141
141
 
142
142
  body[`).concat(In,`] {
143
- `).concat(vy,": ").concat(s,`px;
143
+ `).concat(yy,": ").concat(s,`px;
144
144
  }
145
- `)},Bc=function(){var e=parseInt(document.body.getAttribute(In)||"0",10);return isFinite(e)?e:0},$y=function(){p.useEffect(function(){return document.body.setAttribute(In,(Bc()+1).toString()),function(){var e=Bc()-1;e<=0?document.body.removeAttribute(In):document.body.setAttribute(In,e.toString())}},[])},Ly=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;$y();var i=p.useMemo(function(){return Dy(o)},[o]);return p.createElement(Iy,{styles:My(i,!t,o,n?"":"!important")})},fa=!1;if(typeof window<"u")try{var io=Object.defineProperty({},"passive",{get:function(){return fa=!0,!0}});window.addEventListener("test",io,io),window.removeEventListener("test",io,io)}catch{fa=!1}var Mn=fa?{passive:!1}:!1,Ry=function(e){return e.tagName==="TEXTAREA"},Hc=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Ry(e)&&n[t]==="visible")},Vy=function(e){return Hc(e,"overflowY")},jy=function(e){return Hc(e,"overflowX")},Uc=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Wc(e,r);if(o){var i=qc(e,r),a=i[1],s=i[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},zy=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},By=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Wc=function(e,t){return e==="v"?Vy(t):jy(t)},qc=function(e,t){return e==="v"?zy(t):By(t)},Hy=function(e,t){return e==="h"&&t==="rtl"?-1:1},Uy=function(e,t,n,r,o){var i=Hy(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,u=t.contains(s),c=!1,d=a>0,g=0,m=0;do{var f=qc(e,s),v=f[0],h=f[1],y=f[2],b=h-y-i*v;(v||b)&&Wc(e,s)&&(g+=b,m+=v),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(d&&(Math.abs(g)<1||!o)||!d&&(Math.abs(m)<1||!o))&&(c=!0),c},ao=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Gc=function(e){return[e.deltaX,e.deltaY]},Kc=function(e){return e&&"current"in e?e.current:e},Wy=function(e,t){return e[0]===t[0]&&e[1]===t[1]},qy=function(e){return`
145
+ `)},Uc=function(){var e=parseInt(document.body.getAttribute(In)||"0",10);return isFinite(e)?e:0},Ly=function(){p.useEffect(function(){return document.body.setAttribute(In,(Uc()+1).toString()),function(){var e=Uc()-1;e<=0?document.body.removeAttribute(In):document.body.setAttribute(In,e.toString())}},[])},Ry=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Ly();var i=p.useMemo(function(){return Iy(o)},[o]);return p.createElement(My,{styles:$y(i,!t,o,n?"":"!important")})},fa=!1;if(typeof window<"u")try{var io=Object.defineProperty({},"passive",{get:function(){return fa=!0,!0}});window.addEventListener("test",io,io),window.removeEventListener("test",io,io)}catch{fa=!1}var Mn=fa?{passive:!1}:!1,Vy=function(e){return e.tagName==="TEXTAREA"},Wc=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Vy(e)&&n[t]==="visible")},jy=function(e){return Wc(e,"overflowY")},zy=function(e){return Wc(e,"overflowX")},qc=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Gc(e,r);if(o){var i=Kc(e,r),a=i[1],s=i[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},By=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Hy=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Gc=function(e,t){return e==="v"?jy(t):zy(t)},Kc=function(e,t){return e==="v"?By(t):Hy(t)},Uy=function(e,t){return e==="h"&&t==="rtl"?-1:1},Wy=function(e,t,n,r,o){var i=Uy(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,u=t.contains(s),c=!1,d=a>0,g=0,m=0;do{var f=Kc(e,s),v=f[0],h=f[1],y=f[2],b=h-y-i*v;(v||b)&&Gc(e,s)&&(g+=b,m+=v),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(d&&(Math.abs(g)<1||!o)||!d&&(Math.abs(m)<1||!o))&&(c=!0),c},ao=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Yc=function(e){return[e.deltaX,e.deltaY]},Xc=function(e){return e&&"current"in e?e.current:e},qy=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Gy=function(e){return`
146
146
  .block-interactivity-`.concat(e,` {pointer-events: none;}
147
147
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
148
- `)},Gy=0,$n=[];function Ky(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),o=p.useState(Gy++)[0],i=p.useState(zc)[0],a=p.useRef(e);p.useEffect(function(){a.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Lc([e.lockRef.current],(e.shards||[]).map(Kc),!0).filter(Boolean);return h.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=p.useCallback(function(h,y){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!a.current.allowPinchZoom;var b=ao(h),w=n.current,C="deltaX"in h?h.deltaX:w[0]-b[0],E="deltaY"in h?h.deltaY:w[1]-b[1],x,O=h.target,I=Math.abs(C)>Math.abs(E)?"h":"v";if("touches"in h&&I==="h"&&O.type==="range")return!1;var L=Uc(I,O);if(!L)return!0;if(L?x=I:(x=I==="v"?"h":"v",L=Uc(I,O)),!L)return!1;if(!r.current&&"changedTouches"in h&&(C||E)&&(r.current=x),!x)return!0;var H=r.current||x;return Uy(H,y,h,H==="h"?C:E,!0)},[]),u=p.useCallback(function(h){var y=h;if(!(!$n.length||$n[$n.length-1]!==i)){var b="deltaY"in y?Gc(y):ao(y),w=t.current.filter(function(x){return x.name===y.type&&(x.target===y.target||y.target===x.shadowParent)&&Wy(x.delta,b)})[0];if(w&&w.should){y.cancelable&&y.preventDefault();return}if(!w){var C=(a.current.shards||[]).map(Kc).filter(Boolean).filter(function(x){return x.contains(y.target)}),E=C.length>0?s(y,C[0]):!a.current.noIsolation;E&&y.cancelable&&y.preventDefault()}}},[]),c=p.useCallback(function(h,y,b,w){var C={name:h,delta:y,target:b,should:w,shadowParent:Yy(b)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(E){return E!==C})},1)},[]),d=p.useCallback(function(h){n.current=ao(h),r.current=void 0},[]),g=p.useCallback(function(h){c(h.type,Gc(h),h.target,s(h,e.lockRef.current))},[]),m=p.useCallback(function(h){c(h.type,ao(h),h.target,s(h,e.lockRef.current))},[]);p.useEffect(function(){return $n.push(i),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",u,Mn),document.addEventListener("touchmove",u,Mn),document.addEventListener("touchstart",d,Mn),function(){$n=$n.filter(function(h){return h!==i}),document.removeEventListener("wheel",u,Mn),document.removeEventListener("touchmove",u,Mn),document.removeEventListener("touchstart",d,Mn)}},[]);var f=e.removeScrollBar,v=e.inert;return p.createElement(p.Fragment,null,v?p.createElement(i,{styles:qy(o)}):null,f?p.createElement(Ly,{gapMode:e.gapMode}):null)}function Yy(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Xy=Ey(jc,Ky);var Yc=p.forwardRef(function(e,t){return p.createElement(oo,Ct({},e,{ref:t,sideCar:Xy}))});Yc.classNames=oo.classNames;var Jy=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ln=new WeakMap,so=new WeakMap,lo={},pa=0,Xc=function(e){return e&&(e.host||Xc(e.parentNode))},Zy=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Xc(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Qy=function(e,t,n,r){var o=Zy(t,Array.isArray(e)?e:[e]);lo[n]||(lo[n]=new WeakMap);var i=lo[n],a=[],s=new Set,u=new Set(o),c=function(g){!g||s.has(g)||(s.add(g),c(g.parentNode))};o.forEach(c);var d=function(g){!g||u.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))d(m);else try{var f=m.getAttribute(r),v=f!==null&&f!=="false",h=(Ln.get(m)||0)+1,y=(i.get(m)||0)+1;Ln.set(m,h),i.set(m,y),a.push(m),h===1&&v&&so.set(m,!0),y===1&&m.setAttribute(n,"true"),v||m.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",m,b)}})};return d(t),s.clear(),pa++,function(){a.forEach(function(g){var m=Ln.get(g)-1,f=i.get(g)-1;Ln.set(g,m),i.set(g,f),m||(so.has(g)||g.removeAttribute(r),so.delete(g)),f||g.removeAttribute(n)}),pa--,pa||(Ln=new WeakMap,Ln=new WeakMap,so=new WeakMap,lo={})}},ex=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Jy(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Qy(r,o,n,"aria-hidden")):function(){return null}},Jc=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(nx);if(i){const a=i.props.children,s=o.map(u=>u===i?p.Children.count(a)>1?p.Children.only(null):p.isValidElement(a)?a.props.children:null:u);return l.jsx(ga,{...r,ref:t,children:p.isValidElement(a)?p.cloneElement(a,void 0,s):null})}return l.jsx(ga,{...r,ref:t,children:n})});Jc.displayName="Slot";var ga=p.forwardRef((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const o=ox(n);return p.cloneElement(n,{...rx(r,n.props),ref:t?eo(t,o):o})}return p.Children.count(n)>1?p.Children.only(null):null});ga.displayName="SlotClone";var tx=({children:e})=>l.jsx(l.Fragment,{children:e});function nx(e){return p.isValidElement(e)&&e.type===tx}function rx(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function ox(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ma="Dialog",[Zc,p_]=Jt(ma),[ix,gt]=Zc(ma),Qc=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=p.useRef(null),u=p.useRef(null),[c=!1,d]=On({prop:r,defaultProp:o,onChange:i});return l.jsx(ix,{scope:t,triggerRef:s,contentRef:u,contentId:Dn(),titleId:Dn(),descriptionId:Dn(),open:c,onOpenChange:d,onOpenToggle:p.useCallback(()=>d(g=>!g),[d]),modal:a,children:n})};Qc.displayName=ma;var eu="DialogTrigger",tu=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=gt(eu,n),i=ct(t,o.triggerRef);return l.jsx(Ve.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ya(o.open),...r,ref:i,onClick:Le(e.onClick,o.onOpenToggle)})});tu.displayName=eu;var ha="DialogPortal",[ax,nu]=Zc(ha,{forceMount:void 0}),ru=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=gt(ha,t);return l.jsx(ax,{scope:t,forceMount:n,children:p.Children.map(r,a=>l.jsx(Fn,{present:n||i.open,children:l.jsx(sa,{asChild:!0,container:o,children:a})}))})};ru.displayName=ha;var co="DialogOverlay",ou=p.forwardRef((e,t)=>{const n=nu(co,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=gt(co,e.__scopeDialog);return i.modal?l.jsx(Fn,{present:r||i.open,children:l.jsx(sx,{...o,ref:t})}):null});ou.displayName=co;var sx=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=gt(co,n);return l.jsx(Yc,{as:Jc,allowPinchZoom:!0,shards:[o.contentRef],children:l.jsx(Ve.div,{"data-state":ya(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),mn="DialogContent",iu=p.forwardRef((e,t)=>{const n=nu(mn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=gt(mn,e.__scopeDialog);return l.jsx(Fn,{present:r||i.open,children:i.modal?l.jsx(lx,{...o,ref:t}):l.jsx(cx,{...o,ref:t})})});iu.displayName=mn;var lx=p.forwardRef((e,t)=>{const n=gt(mn,e.__scopeDialog),r=p.useRef(null),o=ct(t,n.contentRef,r);return p.useEffect(()=>{const i=r.current;if(i)return ex(i)},[]),l.jsx(au,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Le(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Le(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Le(e.onFocusOutside,i=>i.preventDefault())})}),cx=p.forwardRef((e,t)=>{const n=gt(mn,e.__scopeDialog),r=p.useRef(!1),o=p.useRef(!1);return l.jsx(au,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,s;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var u,c;(u=e.onInteractOutside)==null||u.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;((c=n.triggerRef.current)==null?void 0:c.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),au=p.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=gt(mn,n),u=p.useRef(null),c=ct(t,u);return my(),l.jsxs(l.Fragment,{children:[l.jsx(Nc,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:l.jsx(oa,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ya(s.open),...a,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(ux,{titleId:s.titleId}),l.jsx(fx,{contentRef:u,descriptionId:s.descriptionId})]})]})}),va="DialogTitle",su=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=gt(va,n);return l.jsx(Ve.h2,{id:o.titleId,...r,ref:t})});su.displayName=va;var lu="DialogDescription",cu=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=gt(lu,n);return l.jsx(Ve.p,{id:o.descriptionId,...r,ref:t})});cu.displayName=lu;var uu="DialogClose",du=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=gt(uu,n);return l.jsx(Ve.button,{type:"button",...r,ref:t,onClick:Le(e.onClick,()=>o.onOpenChange(!1))})});du.displayName=uu;function ya(e){return e?"open":"closed"}var fu="DialogTitleWarning",[g_,pu]=Iv(fu,{contentName:mn,titleName:va,docsSlug:"dialog"}),ux=({titleId:e})=>{const t=pu(fu),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
148
+ `)},Ky=0,$n=[];function Yy(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),o=p.useState(Ky++)[0],i=p.useState(Hc)[0],a=p.useRef(e);p.useEffect(function(){a.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Vc([e.lockRef.current],(e.shards||[]).map(Xc),!0).filter(Boolean);return h.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=p.useCallback(function(h,y){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!a.current.allowPinchZoom;var b=ao(h),w=n.current,C="deltaX"in h?h.deltaX:w[0]-b[0],E="deltaY"in h?h.deltaY:w[1]-b[1],x,O=h.target,I=Math.abs(C)>Math.abs(E)?"h":"v";if("touches"in h&&I==="h"&&O.type==="range")return!1;var $=qc(I,O);if(!$)return!0;if($?x=I:(x=I==="v"?"h":"v",$=qc(I,O)),!$)return!1;if(!r.current&&"changedTouches"in h&&(C||E)&&(r.current=x),!x)return!0;var H=r.current||x;return Wy(H,y,h,H==="h"?C:E,!0)},[]),u=p.useCallback(function(h){var y=h;if(!(!$n.length||$n[$n.length-1]!==i)){var b="deltaY"in y?Yc(y):ao(y),w=t.current.filter(function(x){return x.name===y.type&&(x.target===y.target||y.target===x.shadowParent)&&qy(x.delta,b)})[0];if(w&&w.should){y.cancelable&&y.preventDefault();return}if(!w){var C=(a.current.shards||[]).map(Xc).filter(Boolean).filter(function(x){return x.contains(y.target)}),E=C.length>0?s(y,C[0]):!a.current.noIsolation;E&&y.cancelable&&y.preventDefault()}}},[]),c=p.useCallback(function(h,y,b,w){var C={name:h,delta:y,target:b,should:w,shadowParent:Xy(b)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(E){return E!==C})},1)},[]),d=p.useCallback(function(h){n.current=ao(h),r.current=void 0},[]),g=p.useCallback(function(h){c(h.type,Yc(h),h.target,s(h,e.lockRef.current))},[]),m=p.useCallback(function(h){c(h.type,ao(h),h.target,s(h,e.lockRef.current))},[]);p.useEffect(function(){return $n.push(i),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",u,Mn),document.addEventListener("touchmove",u,Mn),document.addEventListener("touchstart",d,Mn),function(){$n=$n.filter(function(h){return h!==i}),document.removeEventListener("wheel",u,Mn),document.removeEventListener("touchmove",u,Mn),document.removeEventListener("touchstart",d,Mn)}},[]);var f=e.removeScrollBar,v=e.inert;return p.createElement(p.Fragment,null,v?p.createElement(i,{styles:Gy(o)}):null,f?p.createElement(Ry,{gapMode:e.gapMode}):null)}function Xy(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Jy=_y(Bc,Yy);var Jc=p.forwardRef(function(e,t){return p.createElement(oo,Ct({},e,{ref:t,sideCar:Jy}))});Jc.classNames=oo.classNames;var Zy=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ln=new WeakMap,so=new WeakMap,lo={},pa=0,Zc=function(e){return e&&(e.host||Zc(e.parentNode))},Qy=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Zc(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ex=function(e,t,n,r){var o=Qy(t,Array.isArray(e)?e:[e]);lo[n]||(lo[n]=new WeakMap);var i=lo[n],a=[],s=new Set,u=new Set(o),c=function(g){!g||s.has(g)||(s.add(g),c(g.parentNode))};o.forEach(c);var d=function(g){!g||u.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))d(m);else try{var f=m.getAttribute(r),v=f!==null&&f!=="false",h=(Ln.get(m)||0)+1,y=(i.get(m)||0)+1;Ln.set(m,h),i.set(m,y),a.push(m),h===1&&v&&so.set(m,!0),y===1&&m.setAttribute(n,"true"),v||m.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",m,b)}})};return d(t),s.clear(),pa++,function(){a.forEach(function(g){var m=Ln.get(g)-1,f=i.get(g)-1;Ln.set(g,m),i.set(g,f),m||(so.has(g)||g.removeAttribute(r),so.delete(g)),f||g.removeAttribute(n)}),pa--,pa||(Ln=new WeakMap,Ln=new WeakMap,so=new WeakMap,lo={})}},tx=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Zy(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),ex(r,o,n,"aria-hidden")):function(){return null}},Qc=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(rx);if(i){const a=i.props.children,s=o.map(u=>u===i?p.Children.count(a)>1?p.Children.only(null):p.isValidElement(a)?a.props.children:null:u);return l.jsx(ga,{...r,ref:t,children:p.isValidElement(a)?p.cloneElement(a,void 0,s):null})}return l.jsx(ga,{...r,ref:t,children:n})});Qc.displayName="Slot";var ga=p.forwardRef((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const o=ix(n);return p.cloneElement(n,{...ox(r,n.props),ref:t?eo(t,o):o})}return p.Children.count(n)>1?p.Children.only(null):null});ga.displayName="SlotClone";var nx=({children:e})=>l.jsx(l.Fragment,{children:e});function rx(e){return p.isValidElement(e)&&e.type===nx}function ox(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function ix(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ma="Dialog",[eu,g_]=Jt(ma),[ax,gt]=eu(ma),tu=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=p.useRef(null),u=p.useRef(null),[c=!1,d]=On({prop:r,defaultProp:o,onChange:i});return l.jsx(ax,{scope:t,triggerRef:s,contentRef:u,contentId:Dn(),titleId:Dn(),descriptionId:Dn(),open:c,onOpenChange:d,onOpenToggle:p.useCallback(()=>d(g=>!g),[d]),modal:a,children:n})};tu.displayName=ma;var nu="DialogTrigger",ru=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=gt(nu,n),i=ct(t,o.triggerRef);return l.jsx(Ve.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ya(o.open),...r,ref:i,onClick:Le(e.onClick,o.onOpenToggle)})});ru.displayName=nu;var ha="DialogPortal",[sx,ou]=eu(ha,{forceMount:void 0}),iu=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=gt(ha,t);return l.jsx(sx,{scope:t,forceMount:n,children:p.Children.map(r,a=>l.jsx(Fn,{present:n||i.open,children:l.jsx(sa,{asChild:!0,container:o,children:a})}))})};iu.displayName=ha;var co="DialogOverlay",au=p.forwardRef((e,t)=>{const n=ou(co,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=gt(co,e.__scopeDialog);return i.modal?l.jsx(Fn,{present:r||i.open,children:l.jsx(lx,{...o,ref:t})}):null});au.displayName=co;var lx=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=gt(co,n);return l.jsx(Jc,{as:Qc,allowPinchZoom:!0,shards:[o.contentRef],children:l.jsx(Ve.div,{"data-state":ya(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),mn="DialogContent",su=p.forwardRef((e,t)=>{const n=ou(mn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=gt(mn,e.__scopeDialog);return l.jsx(Fn,{present:r||i.open,children:i.modal?l.jsx(cx,{...o,ref:t}):l.jsx(ux,{...o,ref:t})})});su.displayName=mn;var cx=p.forwardRef((e,t)=>{const n=gt(mn,e.__scopeDialog),r=p.useRef(null),o=ct(t,n.contentRef,r);return p.useEffect(()=>{const i=r.current;if(i)return tx(i)},[]),l.jsx(lu,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Le(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Le(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Le(e.onFocusOutside,i=>i.preventDefault())})}),ux=p.forwardRef((e,t)=>{const n=gt(mn,e.__scopeDialog),r=p.useRef(!1),o=p.useRef(!1);return l.jsx(lu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,s;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var u,c;(u=e.onInteractOutside)==null||u.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;((c=n.triggerRef.current)==null?void 0:c.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),lu=p.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=gt(mn,n),u=p.useRef(null),c=ct(t,u);return hy(),l.jsxs(l.Fragment,{children:[l.jsx(Oc,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:l.jsx(oa,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ya(s.open),...a,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(dx,{titleId:s.titleId}),l.jsx(px,{contentRef:u,descriptionId:s.descriptionId})]})]})}),va="DialogTitle",cu=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=gt(va,n);return l.jsx(Ve.h2,{id:o.titleId,...r,ref:t})});cu.displayName=va;var uu="DialogDescription",du=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=gt(uu,n);return l.jsx(Ve.p,{id:o.descriptionId,...r,ref:t})});du.displayName=uu;var fu="DialogClose",pu=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=gt(fu,n);return l.jsx(Ve.button,{type:"button",...r,ref:t,onClick:Le(e.onClick,()=>o.onOpenChange(!1))})});pu.displayName=fu;function ya(e){return e?"open":"closed"}var gu="DialogTitleWarning",[m_,mu]=Mv(gu,{contentName:mn,titleName:va,docsSlug:"dialog"}),dx=({titleId:e})=>{const t=mu(gu),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
149
149
 
150
150
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
151
151
 
152
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return p.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},dx="DialogDescriptionWarning",fx=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${pu(dx).contentName}}.`;return p.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},px=Qc,gx=tu,mx=ru,gu=ou,mu=iu,hu=su,vu=cu,hx=du;const jt=px,uo=gx,vx=mx,yu=p.forwardRef(({className:e,...t},n)=>l.jsx(gu,{ref:n,className:he("s3-explr-ui-dialog-overlay fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));yu.displayName=gu.displayName;const St=p.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(vx,{children:[l.jsx(yu,{}),l.jsxs(mu,{ref:r,className:he("s3-explr-ui-dialog-content fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,l.jsxs(hx,{className:he("s3-explr-ui-dialog-close 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:[l.jsx(Hi,{className:"s3-explr-ui-dialog-close-icon h-4 w-4"}),l.jsx("span",{className:"s3-explr-ui-dialog-close-text sr-only",children:"Close"})]})]})]}));St.displayName=mu.displayName;const Et=({className:e,...t})=>l.jsx("div",{className:he("s3-explr-ui-dialog-header flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Et.displayName="DialogHeader";const hn=({className:e,...t})=>l.jsx("div",{className:he("s3-explr-ui-dialog-footer flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});hn.displayName="DialogFooter";const _t=p.forwardRef(({className:e,...t},n)=>l.jsx(hu,{ref:n,className:he("s3-explr-ui-dialog-title text-lg font-semibold leading-none tracking-tight",e),...t}));_t.displayName=hu.displayName;const Rn=p.forwardRef(({className:e,...t},n)=>l.jsx(vu,{ref:n,className:he("s3-explr-ui-dialog-description text-sm text-muted-foreground",e),...t}));Rn.displayName=vu.displayName;const en=p.forwardRef(({className:e,type:t,...n},r)=>l.jsx("input",{type:t,className:he("s3-explr-ui-input","flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground 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:r,...n}));en.displayName="Input";var yx="Label",xu=p.forwardRef((e,t)=>l.jsx(Ve.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));xu.displayName=yx;var bu=xu;const xx=Qi("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 s3-explr-ui-label",{variants:{variant:{default:"s3-explr-ui-label-default",required:"s3-explr-ui-label-required",disabled:"s3-explr-ui-label-disabled"},size:{default:"s3-explr-ui-label-size-default",sm:"s3-explr-ui-label-size-sm",lg:"s3-explr-ui-label-size-lg"}},defaultVariants:{variant:"default",size:"default"}}),vn=p.forwardRef(({className:e,variant:t,size:n,...r},o)=>l.jsx(bu,{ref:o,className:he(xx({variant:t,size:n}),e),...r}));vn.displayName=bu.displayName;const fo=({className:e,...t})=>l.jsx("nav",{role:"navigation","aria-label":"pagination",className:he("mx-auto flex w-full justify-center",e),...t});fo.displayName="Pagination";const po=p.forwardRef(({className:e,...t},n)=>l.jsx("ul",{ref:n,className:he("flex flex-row items-center gap-1",e),...t}));po.displayName="PaginationContent";const mt=p.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:he("",e),...t}));mt.displayName="PaginationItem";const Vn=({className:e,isActive:t,size:n="icon",...r})=>l.jsx("a",{"aria-current":t?"page":void 0,className:he(pc({variant:t?"outline":"ghost",size:n}),e),...r});Vn.displayName="PaginationLink";const go=({className:e,...t})=>l.jsxs(Vn,{"aria-label":"Go to previous page",size:"default",className:he("gap-1 pl-2.5",e),...t,children:[l.jsx(Nh,{className:"h-4 w-4"}),l.jsx("span",{children:"Previous"})]});go.displayName="PaginationPrevious";const mo=({className:e,...t})=>l.jsxs(Vn,{"aria-label":"Go to next page",size:"default",className:he("gap-1 pr-2.5",e),...t,children:[l.jsx("span",{children:"Next"}),l.jsx(Wl,{className:"h-4 w-4"})]});mo.displayName="PaginationNext";const ho=({className:e,...t})=>l.jsxs("span",{"aria-hidden":!0,className:he("flex h-9 w-9 items-center justify-center",e),...t,children:[l.jsx(kh,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"More pages"})]});ho.displayName="PaginationEllipsis";const vo=p.forwardRef(({className:e,...t},n)=>l.jsx("div",{className:he("relative w-full overflow-auto","s3-explr-ui-table-container"),children:l.jsx("table",{ref:n,className:he("w-full caption-bottom text-sm","s3-explr-ui-table",e),...t})}));vo.displayName="Table";const yo=p.forwardRef(({className:e,...t},n)=>l.jsx("thead",{ref:n,className:he("[&_tr]:border-b","s3-explr-ui-table-header",e),...t}));yo.displayName="TableHeader";const xo=p.forwardRef(({className:e,...t},n)=>l.jsx("tbody",{ref:n,className:he("[&_tr:last-child]:border-0","s3-explr-ui-table-body",e),...t}));xo.displayName="TableBody";const bx=p.forwardRef(({className:e,...t},n)=>l.jsx("tfoot",{ref:n,className:he("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0","s3-explr-ui-table-footer",e),...t}));bx.displayName="TableFooter";const ht=p.forwardRef(({className:e,...t},n)=>l.jsx("tr",{ref:n,className:he("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted","s3-explr-ui-table-row",e),...t}));ht.displayName="TableRow";const Tt=p.forwardRef(({className:e,...t},n)=>l.jsx("th",{ref:n,className:he("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]","s3-explr-ui-table-head",e),...t}));Tt.displayName="TableHead";const Ze=p.forwardRef(({className:e,...t},n)=>l.jsx("td",{ref:n,className:he("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]","s3-explr-ui-table-cell",e),...t}));Ze.displayName="TableCell";const wx=p.forwardRef(({className:e,...t},n)=>l.jsx("caption",{ref:n,className:he("mt-4 text-sm text-muted-foreground","s3-explr-ui-table-caption",e),...t}));wx.displayName="TableCaption";function xa(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function jn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function wu(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ba(...e){return t=>{let n=!1;const r=e.map(o=>{const i=wu(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():wu(e[o],null)}}}}function wa(...e){return p.useCallback(ba(...e),e)}var Ca=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(Sx);if(i){const a=i.props.children,s=o.map(u=>u===i?p.Children.count(a)>1?p.Children.only(null):p.isValidElement(a)?a.props.children:null:u);return l.jsx(Sa,{...r,ref:t,children:p.isValidElement(a)?p.cloneElement(a,void 0,s):null})}return l.jsx(Sa,{...r,ref:t,children:n})});Ca.displayName="Slot";var Sa=p.forwardRef((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const o=_x(n);return p.cloneElement(n,{...Ex(r,n.props),ref:t?ba(t,o):o})}return p.Children.count(n)>1?p.Children.only(null):null});Sa.displayName="SlotClone";var Cx=({children:e})=>l.jsx(l.Fragment,{children:e});function Sx(e){return p.isValidElement(e)&&e.type===Cx}function Ex(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function _x(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Tx(e){const t=e+"CollectionProvider",[n,r]=Jt(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:v,children:h}=f,y=_.useRef(null),b=_.useRef(new Map).current;return l.jsx(o,{scope:v,itemMap:b,collectionRef:y,children:h})};a.displayName=t;const s=e+"CollectionSlot",u=_.forwardRef((f,v)=>{const{scope:h,children:y}=f,b=i(s,h),w=wa(v,b.collectionRef);return l.jsx(Ca,{ref:w,children:y})});u.displayName=s;const c=e+"CollectionItemSlot",d="data-radix-collection-item",g=_.forwardRef((f,v)=>{const{scope:h,children:y,...b}=f,w=_.useRef(null),C=wa(v,w),E=i(c,h);return _.useEffect(()=>(E.itemMap.set(w,{ref:w,...b}),()=>void E.itemMap.delete(w))),l.jsx(Ca,{[d]:"",ref:C,children:y})});g.displayName=c;function m(f){const v=i(e+"CollectionConsumer",f);return _.useCallback(()=>{const y=v.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((E,x)=>b.indexOf(E.ref.current)-b.indexOf(x.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:a,Slot:u,ItemSlot:g},m,r]}var Cu=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(Px);if(i){const a=i.props.children,s=o.map(u=>u===i?p.Children.count(a)>1?p.Children.only(null):p.isValidElement(a)?a.props.children:null:u);return l.jsx(Ea,{...r,ref:t,children:p.isValidElement(a)?p.cloneElement(a,void 0,s):null})}return l.jsx(Ea,{...r,ref:t,children:n})});Cu.displayName="Slot";var Ea=p.forwardRef((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const o=kx(n);return p.cloneElement(n,{...Nx(r,n.props),ref:t?ba(t,o):o})}return p.Children.count(n)>1?p.Children.only(null):null});Ea.displayName="SlotClone";var Ax=({children:e})=>l.jsx(l.Fragment,{children:e});function Px(e){return p.isValidElement(e)&&e.type===Ax}function Nx(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function kx(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ox=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Su=Ox.reduce((e,t)=>{const n=p.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Cu:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Fx=p.createContext(void 0);function Eu(e){const t=p.useContext(Fx);return e||t||"ltr"}var _a="rovingFocusGroup.onEntryFocus",Dx={bubbles:!1,cancelable:!0},bo="RovingFocusGroup",[Ta,_u,Ix]=Tx(bo),[Mx,Tu]=Jt(bo,[Ix]),[$x,Lx]=Mx(bo),Au=p.forwardRef((e,t)=>l.jsx(Ta.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Ta.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Rx,{...e,ref:t})})}));Au.displayName=bo;var Rx=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...g}=e,m=p.useRef(null),f=wa(t,m),v=Eu(i),[h=null,y]=On({prop:a,defaultProp:s,onChange:u}),[b,w]=p.useState(!1),C=Ge(c),E=_u(n),x=p.useRef(!1),[O,I]=p.useState(0);return p.useEffect(()=>{const L=m.current;if(L)return L.addEventListener(_a,C),()=>L.removeEventListener(_a,C)},[C]),l.jsx($x,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:h,onItemFocus:p.useCallback(L=>y(L),[y]),onItemShiftTab:p.useCallback(()=>w(!0),[]),onFocusableItemAdd:p.useCallback(()=>I(L=>L+1),[]),onFocusableItemRemove:p.useCallback(()=>I(L=>L-1),[]),children:l.jsx(Su.div,{tabIndex:b||O===0?-1:0,"data-orientation":r,...g,ref:f,style:{outline:"none",...e.style},onMouseDown:jn(e.onMouseDown,()=>{x.current=!0}),onFocus:jn(e.onFocus,L=>{const H=!x.current;if(L.target===L.currentTarget&&H&&!b){const D=new CustomEvent(_a,Dx);if(L.currentTarget.dispatchEvent(D),!D.defaultPrevented){const G=E().filter(F=>F.focusable),U=G.find(F=>F.active),Z=G.find(F=>F.id===h),$=[U,Z,...G].filter(Boolean).map(F=>F.ref.current);ku($,d)}}x.current=!1}),onBlur:jn(e.onBlur,()=>w(!1))})})}),Pu="RovingFocusGroupItem",Nu=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,s=Dn(),u=i||s,c=Lx(Pu,n),d=c.currentTabStopId===u,g=_u(n),{onFocusableItemAdd:m,onFocusableItemRemove:f}=c;return p.useEffect(()=>{if(r)return m(),()=>f()},[r,m,f]),l.jsx(Ta.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:l.jsx(Su.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...a,ref:t,onMouseDown:jn(e.onMouseDown,v=>{r?c.onItemFocus(u):v.preventDefault()}),onFocus:jn(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:jn(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){c.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const h=zx(v,c.orientation,c.dir);if(h!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let b=g().filter(w=>w.focusable).map(w=>w.ref.current);if(h==="last")b.reverse();else if(h==="prev"||h==="next"){h==="prev"&&b.reverse();const w=b.indexOf(v.currentTarget);b=c.loop?Bx(b,w+1):b.slice(w+1)}setTimeout(()=>ku(b))}})})})});Nu.displayName=Pu;var Vx={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function jx(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function zx(e,t,n){const r=jx(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Vx[r]}function ku(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Bx(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Hx=Au,Ux=Nu;function Ou(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Wx(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Ou(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Ou(e[o],null)}}}}function qx(...e){return p.useCallback(Wx(...e),e)}function Gx(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var Fu=e=>{const{present:t,children:n}=e,r=Kx(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),i=qx(r.ref,Yx(o));return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:i}):null};Fu.displayName="Presence";function Kx(e){const[t,n]=p.useState(),r=p.useRef({}),o=p.useRef(e),i=p.useRef("none"),a=e?"mounted":"unmounted",[s,u]=Gx(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const c=wo(r.current);i.current=s==="mounted"?c:"none"},[s]),ot(()=>{const c=r.current,d=o.current;if(d!==e){const m=i.current,f=wo(c);e?u("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(d&&m!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),ot(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,g=f=>{const h=wo(r.current).includes(f.animationName);if(f.target===t&&h&&(u("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},m=f=>{f.target===t&&(i.current=wo(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:p.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function wo(e){return(e==null?void 0:e.animationName)||"none"}function Yx(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Du(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Xx(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Du(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Du(e[o],null)}}}}var Iu=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(Zx);if(i){const a=i.props.children,s=o.map(u=>u===i?p.Children.count(a)>1?p.Children.only(null):p.isValidElement(a)?a.props.children:null:u);return l.jsx(Aa,{...r,ref:t,children:p.isValidElement(a)?p.cloneElement(a,void 0,s):null})}return l.jsx(Aa,{...r,ref:t,children:n})});Iu.displayName="Slot";var Aa=p.forwardRef((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const o=eb(n);return p.cloneElement(n,{...Qx(r,n.props),ref:t?Xx(t,o):o})}return p.Children.count(n)>1?p.Children.only(null):null});Aa.displayName="SlotClone";var Jx=({children:e})=>l.jsx(l.Fragment,{children:e});function Zx(e){return p.isValidElement(e)&&e.type===Jx}function Qx(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function eb(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var tb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Co=tb.reduce((e,t)=>{const n=p.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Iu:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Pa="Tabs",[nb,m_]=Jt(Pa,[Tu]),Mu=Tu(),[rb,Na]=nb(Pa),$u=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:a="horizontal",dir:s,activationMode:u="automatic",...c}=e,d=Eu(s),[g,m]=On({prop:r,onChange:o,defaultProp:i});return l.jsx(rb,{scope:n,baseId:Dn(),value:g,onValueChange:m,orientation:a,dir:d,activationMode:u,children:l.jsx(Co.div,{dir:d,"data-orientation":a,...c,ref:t})})});$u.displayName=Pa;var Lu="TabsList",Ru=p.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=Na(Lu,n),a=Mu(n);return l.jsx(Hx,{asChild:!0,...a,orientation:i.orientation,dir:i.dir,loop:r,children:l.jsx(Co.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});Ru.displayName=Lu;var Vu="TabsTrigger",ju=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,a=Na(Vu,n),s=Mu(n),u=Hu(a.baseId,r),c=Uu(a.baseId,r),d=r===a.value;return l.jsx(Ux,{asChild:!0,...s,focusable:!o,active:d,children:l.jsx(Co.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":c,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u,...i,ref:t,onMouseDown:xa(e.onMouseDown,g=>{!o&&g.button===0&&g.ctrlKey===!1?a.onValueChange(r):g.preventDefault()}),onKeyDown:xa(e.onKeyDown,g=>{[" ","Enter"].includes(g.key)&&a.onValueChange(r)}),onFocus:xa(e.onFocus,()=>{const g=a.activationMode!=="manual";!d&&!o&&g&&a.onValueChange(r)})})})});ju.displayName=Vu;var zu="TabsContent",Bu=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...a}=e,s=Na(zu,n),u=Hu(s.baseId,r),c=Uu(s.baseId,r),d=r===s.value,g=p.useRef(d);return p.useEffect(()=>{const m=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(m)},[]),l.jsx(Fu,{present:o||d,children:({present:m})=>l.jsx(Co.div,{"data-state":d?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":u,hidden:!m,id:c,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:g.current?"0s":void 0},children:m&&i})})});Bu.displayName=zu;function Hu(e,t){return`${e}-trigger-${t}`}function Uu(e,t){return`${e}-content-${t}`}var ob=$u,Wu=Ru,qu=ju,Gu=Bu;const ib=ob,Ku=p.forwardRef(({className:e,...t},n)=>l.jsx(Wu,{ref:n,className:he("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Ku.displayName=Wu.displayName;const So=p.forwardRef(({className:e,...t},n)=>l.jsx(qu,{ref:n,className:he("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-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));So.displayName=qu.displayName;const Eo=p.forwardRef(({className:e,...t},n)=>l.jsx(Gu,{ref:n,className:he("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Eo.displayName=Gu.displayName;const ur=p.forwardRef(({className:e,...t},n)=>l.jsx("textarea",{className:he("flex min-h-[60px] 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}));ur.displayName="Textarea";function ab(e,t=[]){let n=[];function r(i,a){const s=p.createContext(a),u=n.length;n=[...n,a];function c(g){const{scope:m,children:f,...v}=g,h=(m==null?void 0:m[e][u])||s,y=p.useMemo(()=>v,Object.values(v));return l.jsx(h.Provider,{value:y,children:f})}function d(g,m){const f=(m==null?void 0:m[e][u])||s,v=p.useContext(f);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,d]}const o=()=>{const i=n.map(a=>p.createContext(a));return function(s){const u=(s==null?void 0:s[e])||i;return p.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return o.scopeName=e,[r,sb(o,...t)]}function sb(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:u,scopeName:c})=>{const g=u(i)[`__scope${c}`];return{...s,...g}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var ka=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(cb);if(i){const a=i.props.children,s=o.map(u=>u===i?p.Children.count(a)>1?p.Children.only(null):p.isValidElement(a)?a.props.children:null:u);return l.jsx(Oa,{...r,ref:t,children:p.isValidElement(a)?p.cloneElement(a,void 0,s):null})}return l.jsx(Oa,{...r,ref:t,children:n})});ka.displayName="Slot";var Oa=p.forwardRef((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const o=db(n);return p.cloneElement(n,{...ub(r,n.props),ref:t?eo(t,o):o})}return p.Children.count(n)>1?p.Children.only(null):null});Oa.displayName="SlotClone";var lb=({children:e})=>l.jsx(l.Fragment,{children:e});function cb(e){return p.isValidElement(e)&&e.type===lb}function ub(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function db(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function fb(e){const t=e+"CollectionProvider",[n,r]=ab(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:v,children:h}=f,y=_.useRef(null),b=_.useRef(new Map).current;return l.jsx(o,{scope:v,itemMap:b,collectionRef:y,children:h})};a.displayName=t;const s=e+"CollectionSlot",u=_.forwardRef((f,v)=>{const{scope:h,children:y}=f,b=i(s,h),w=ct(v,b.collectionRef);return l.jsx(ka,{ref:w,children:y})});u.displayName=s;const c=e+"CollectionItemSlot",d="data-radix-collection-item",g=_.forwardRef((f,v)=>{const{scope:h,children:y,...b}=f,w=_.useRef(null),C=ct(v,w),E=i(c,h);return _.useEffect(()=>(E.itemMap.set(w,{ref:w,...b}),()=>void E.itemMap.delete(w))),l.jsx(ka,{[d]:"",ref:C,children:y})});g.displayName=c;function m(f){const v=i(e+"CollectionConsumer",f);return _.useCallback(()=>{const y=v.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((E,x)=>b.indexOf(E.ref.current)-b.indexOf(x.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:a,Slot:u,ItemSlot:g},m,r]}var pb="VisuallyHidden",Fa=p.forwardRef((e,t)=>l.jsx(Ve.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Fa.displayName=pb;var Da="ToastProvider",[Ia,gb,mb]=fb("Toast"),[Yu,h_]=Jt("Toast",[mb]),[hb,_o]=Yu(Da),Xu=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,u]=p.useState(null),[c,d]=p.useState(0),g=p.useRef(!1),m=p.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Da}\`. Expected non-empty \`string\`.`),l.jsx(Ia.Provider,{scope:t,children:l.jsx(hb,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:u,onToastAdd:p.useCallback(()=>d(f=>f+1),[]),onToastRemove:p.useCallback(()=>d(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:g,isClosePausedRef:m,children:a})})};Xu.displayName=Da;var Ju="ToastViewport",vb=["F8"],Ma="toast.viewportPause",$a="toast.viewportResume",Zu=p.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=vb,label:o="Notifications ({hotkey})",...i}=e,a=_o(Ju,n),s=gb(n),u=p.useRef(null),c=p.useRef(null),d=p.useRef(null),g=p.useRef(null),m=ct(t,g,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=a.toastCount>0;p.useEffect(()=>{const y=b=>{var C;r.length!==0&&r.every(E=>b[E]||b.code===E)&&((C=g.current)==null||C.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),p.useEffect(()=>{const y=u.current,b=g.current;if(v&&y&&b){const w=()=>{if(!a.isClosePausedRef.current){const O=new CustomEvent(Ma);b.dispatchEvent(O),a.isClosePausedRef.current=!0}},C=()=>{if(a.isClosePausedRef.current){const O=new CustomEvent($a);b.dispatchEvent(O),a.isClosePausedRef.current=!1}},E=O=>{!y.contains(O.relatedTarget)&&C()},x=()=>{y.contains(document.activeElement)||C()};return y.addEventListener("focusin",w),y.addEventListener("focusout",E),y.addEventListener("pointermove",w),y.addEventListener("pointerleave",x),window.addEventListener("blur",w),window.addEventListener("focus",C),()=>{y.removeEventListener("focusin",w),y.removeEventListener("focusout",E),y.removeEventListener("pointermove",w),y.removeEventListener("pointerleave",x),window.removeEventListener("blur",w),window.removeEventListener("focus",C)}}},[v,a.isClosePausedRef]);const h=p.useCallback(({tabbingDirection:y})=>{const w=s().map(C=>{const E=C.ref.current,x=[E,...kb(E)];return y==="forwards"?x:x.reverse()});return(y==="forwards"?w.reverse():w).flat()},[s]);return p.useEffect(()=>{const y=g.current;if(y){const b=w=>{var x,O,I;const C=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!C){const L=document.activeElement,H=w.shiftKey;if(w.target===y&&H){(x=c.current)==null||x.focus();return}const U=h({tabbingDirection:H?"backwards":"forwards"}),Z=U.findIndex(k=>k===L);Va(U.slice(Z+1))?w.preventDefault():H?(O=c.current)==null||O.focus():(I=d.current)==null||I.focus()}};return y.addEventListener("keydown",b),()=>y.removeEventListener("keydown",b)}},[s,h]),l.jsxs(ay,{ref:u,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&l.jsx(La,{ref:c,onFocusFromOutsideViewport:()=>{const y=h({tabbingDirection:"forwards"});Va(y)}}),l.jsx(Ia.Slot,{scope:n,children:l.jsx(Ve.ol,{tabIndex:-1,...i,ref:m})}),v&&l.jsx(La,{ref:d,onFocusFromOutsideViewport:()=>{const y=h({tabbingDirection:"backwards"});Va(y)}})]})});Zu.displayName=Ju;var Qu="ToastFocusProxy",La=p.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=_o(Qu,n);return l.jsx(Fa,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var c;const s=a.relatedTarget;!((c=i.viewport)!=null&&c.contains(s))&&r()}})});La.displayName=Qu;var To="Toast",yb="toast.swipeStart",xb="toast.swipeMove",bb="toast.swipeCancel",wb="toast.swipeEnd",ed=p.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,u]=On({prop:r,defaultProp:o,onChange:i});return l.jsx(Fn,{present:n||s,children:l.jsx(Eb,{open:s,...a,ref:t,onClose:()=>u(!1),onPause:Ge(e.onPause),onResume:Ge(e.onResume),onSwipeStart:Le(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Le(e.onSwipeMove,c=>{const{x:d,y:g}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${g}px`)}),onSwipeCancel:Le(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Le(e.onSwipeEnd,c=>{const{x:d,y:g}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${g}px`),u(!1)})})})});ed.displayName=To;var[Cb,Sb]=Yu(To,{onClose(){}}),Eb=p.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:u,onResume:c,onSwipeStart:d,onSwipeMove:g,onSwipeCancel:m,onSwipeEnd:f,...v}=e,h=_o(To,n),[y,b]=p.useState(null),w=ct(t,k=>b(k)),C=p.useRef(null),E=p.useRef(null),x=o||h.duration,O=p.useRef(0),I=p.useRef(x),L=p.useRef(0),{onToastAdd:H,onToastRemove:D}=h,G=Ge(()=>{var $;(y==null?void 0:y.contains(document.activeElement))&&(($=h.viewport)==null||$.focus()),a()}),U=p.useCallback(k=>{!k||k===1/0||(window.clearTimeout(L.current),O.current=new Date().getTime(),L.current=window.setTimeout(G,k))},[G]);p.useEffect(()=>{const k=h.viewport;if(k){const $=()=>{U(I.current),c==null||c()},F=()=>{const q=new Date().getTime()-O.current;I.current=I.current-q,window.clearTimeout(L.current),u==null||u()};return k.addEventListener(Ma,F),k.addEventListener($a,$),()=>{k.removeEventListener(Ma,F),k.removeEventListener($a,$)}}},[h.viewport,x,u,c,U]),p.useEffect(()=>{i&&!h.isClosePausedRef.current&&U(x)},[i,x,h.isClosePausedRef,U]),p.useEffect(()=>(H(),()=>D()),[H,D]);const Z=p.useMemo(()=>y?sd(y):null,[y]);return h.viewport?l.jsxs(l.Fragment,{children:[Z&&l.jsx(_b,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:Z}),l.jsx(Cb,{scope:n,onClose:G,children:Ir.createPortal(l.jsx(Ia.ItemSlot,{scope:n,children:l.jsx(iy,{asChild:!0,onEscapeKeyDown:Le(s,()=>{h.isFocusedToastEscapeKeyDownRef.current||G(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(Ve.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":h.swipeDirection,...v,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Le(e.onKeyDown,k=>{k.key==="Escape"&&(s==null||s(k.nativeEvent),k.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,G()))}),onPointerDown:Le(e.onPointerDown,k=>{k.button===0&&(C.current={x:k.clientX,y:k.clientY})}),onPointerMove:Le(e.onPointerMove,k=>{if(!C.current)return;const $=k.clientX-C.current.x,F=k.clientY-C.current.y,q=!!E.current,P=["left","right"].includes(h.swipeDirection),j=["left","up"].includes(h.swipeDirection)?Math.min:Math.max,A=P?j(0,$):0,B=P?0:j(0,F),Q=k.pointerType==="touch"?10:2,re={x:A,y:B},ee={originalEvent:k,delta:re};q?(E.current=re,Ao(xb,g,ee,{discrete:!1})):ld(re,h.swipeDirection,Q)?(E.current=re,Ao(yb,d,ee,{discrete:!1}),k.target.setPointerCapture(k.pointerId)):(Math.abs($)>Q||Math.abs(F)>Q)&&(C.current=null)}),onPointerUp:Le(e.onPointerUp,k=>{const $=E.current,F=k.target;if(F.hasPointerCapture(k.pointerId)&&F.releasePointerCapture(k.pointerId),E.current=null,C.current=null,$){const q=k.currentTarget,P={originalEvent:k,delta:$};ld($,h.swipeDirection,h.swipeThreshold)?Ao(wb,f,P,{discrete:!0}):Ao(bb,m,P,{discrete:!0}),q.addEventListener("click",j=>j.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),_b=e=>{const{__scopeToast:t,children:n,...r}=e,o=_o(To,t),[i,a]=p.useState(!1),[s,u]=p.useState(!1);return Pb(()=>a(!0)),p.useEffect(()=>{const c=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:l.jsx(sa,{asChild:!0,children:l.jsx(Fa,{...r,children:i&&l.jsxs(l.Fragment,{children:[o.label," ",n]})})})},Tb="ToastTitle",td=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return l.jsx(Ve.div,{...r,ref:t})});td.displayName=Tb;var Ab="ToastDescription",nd=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return l.jsx(Ve.div,{...r,ref:t})});nd.displayName=Ab;var rd="ToastAction",od=p.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?l.jsx(ad,{altText:n,asChild:!0,children:l.jsx(Ra,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${rd}\`. Expected non-empty \`string\`.`),null)});od.displayName=rd;var id="ToastClose",Ra=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=Sb(id,n);return l.jsx(ad,{asChild:!0,children:l.jsx(Ve.button,{type:"button",...r,ref:t,onClick:Le(e.onClick,o.onClose)})})});Ra.displayName=id;var ad=p.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return l.jsx(Ve.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function sd(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Nb(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...sd(r))}}),t}function Ao(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?hc(o,i):o.dispatchEvent(i)}var ld=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function Pb(e=()=>{}){const t=Ge(e);ot(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function Nb(e){return e.nodeType===e.ELEMENT_NODE}function kb(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Va(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Ob=Xu,cd=Zu,ud=ed,dd=td,fd=nd,pd=od,gd=Ra;const Fb=Ob,md=p.forwardRef(({className:e,...t},n)=>l.jsx(cd,{ref:n,className:he("s3-explr-ui-toast-viewport fixed top-0 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px] z-[10000]",e),...t}));md.displayName=cd.displayName;const Db=Qi("s3-explr-ui-toast group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"s3-explr-ui-toast-default border bg-background text-foreground",destructive:"s3-explr-ui-toast-destructive destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),hd=p.forwardRef(({className:e,variant:t,...n},r)=>l.jsx(ud,{ref:r,className:he(Db({variant:t}),e),...n}));hd.displayName=ud.displayName;const Ib=p.forwardRef(({className:e,...t},n)=>l.jsx(pd,{ref:n,className:he("s3-explr-ui-toast-action inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));Ib.displayName=pd.displayName;const vd=p.forwardRef(({className:e,...t},n)=>l.jsx(gd,{ref:n,className:he("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity duration-200 ease-in-out hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600 font-bold",e),"toast-close":"",...t,children:l.jsx(Hi,{className:"s3-explr-ui-toast-close-icon h-4 w-4"})}));vd.displayName=gd.displayName;const yd=p.forwardRef(({className:e,...t},n)=>l.jsx(dd,{ref:n,className:he("s3-explr-ui-toast-title text-sm font-semibold [&+div]:text-xs",e),...t}));yd.displayName=dd.displayName;const xd=p.forwardRef(({className:e,...t},n)=>l.jsx(fd,{ref:n,className:he("text-sm opacity-90 font-bold",e),...t}));xd.displayName=fd.displayName;const Mb=1,$b=1e6;let ja=0;function Lb(){return ja=(ja+1)%Number.MAX_SAFE_INTEGER,ja.toString()}const za=new Map,bd=e=>{if(za.has(e))return;const t=setTimeout(()=>{za.delete(e),dr({type:"REMOVE_TOAST",toastId:e})},$b);za.set(e,t)},Rb=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Mb)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?bd(n):e.toasts.forEach(r=>{bd(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Po=[];let No={toasts:[]};function dr(e){No=Rb(No,e),Po.forEach(t=>{t(No)})}function Vb({...e}){const t=Lb(),n=o=>dr({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>dr({type:"DISMISS_TOAST",toastId:t});return dr({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function ko(){const[e,t]=p.useState(No);return p.useEffect(()=>(Po.push(t),()=>{const n=Po.indexOf(t);n>-1&&Po.splice(n,1)}),[e]),{...e,toast:Vb,dismiss:n=>dr({type:"DISMISS_TOAST",toastId:n})}}function wd(){const{toasts:e}=ko();return l.jsxs(Fb,{children:[e.map(function({id:t,title:n,description:r,action:o,...i}){return l.jsxs(hd,{...i,className:`s3-explr-ui-toast ${i.className||""}`,children:[l.jsxs("div",{className:"s3-explr-ui-toast-content grid gap-1",children:[n&&l.jsx(yd,{className:"s3-explr-ui-toast-title",children:n}),r&&l.jsx(xd,{className:"s3-explr-ui-toast-description",children:r})]}),o&&l.jsx("div",{className:"s3-explr-ui-toast-action",children:o}),l.jsx(vd,{className:"s3-explr-ui-toast-close"})]},t)}),l.jsx(md,{className:"s3-explr-ui-toast-viewport"})]})}function zt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Cd(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function jb(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Cd(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Cd(e[o],null)}}}}function fr(...e){return p.useCallback(jb(...e),e)}var zb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],pr=zb.reduce((e,t)=>{const n=p.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Pn:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Bb(e,t){e&&Ir.flushSync(()=>e.dispatchEvent(t))}var Hb="DismissableLayer",Ba="dismissableLayer.update",Ub="dismissableLayer.pointerDownOutside",Wb="dismissableLayer.focusOutside",Sd,Ed=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_d=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...u}=e,c=p.useContext(Ed),[d,g]=p.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=p.useState({}),v=fr(t,I=>g(I)),h=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=h.indexOf(y),w=d?h.indexOf(d):-1,C=c.layersWithOutsidePointerEventsDisabled.size>0,E=w>=b,x=Kb(I=>{const L=I.target,H=[...c.branches].some(D=>D.contains(L));!E||H||(o==null||o(I),a==null||a(I),I.defaultPrevented||s==null||s())},m),O=Yb(I=>{const L=I.target;[...c.branches].some(D=>D.contains(L))||(i==null||i(I),a==null||a(I),I.defaultPrevented||s==null||s())},m);return Cc(I=>{w===c.layers.size-1&&(r==null||r(I),!I.defaultPrevented&&s&&(I.preventDefault(),s()))},m),p.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Sd=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),Td(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Sd)}},[d,m,n,c]),p.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),Td())},[d,c]),p.useEffect(()=>{const I=()=>f({});return document.addEventListener(Ba,I),()=>document.removeEventListener(Ba,I)},[]),l.jsx(pr.div,{...u,ref:v,style:{pointerEvents:C?E?"auto":"none":void 0,...e.style},onFocusCapture:zt(e.onFocusCapture,O.onFocusCapture),onBlurCapture:zt(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:zt(e.onPointerDownCapture,x.onPointerDownCapture)})});_d.displayName=Hb;var qb="DismissableLayerBranch",Gb=p.forwardRef((e,t)=>{const n=p.useContext(Ed),r=p.useRef(null),o=fr(t,r);return p.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),l.jsx(pr.div,{...e,ref:o})});Gb.displayName=qb;function Kb(e,t=globalThis==null?void 0:globalThis.document){const n=Ge(e),r=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let u=function(){Ad(Ub,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Yb(e,t=globalThis==null?void 0:globalThis.document){const n=Ge(e),r=p.useRef(!1);return p.useEffect(()=>{const o=i=>{i.target&&!r.current&&Ad(Wb,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Td(){const e=new CustomEvent(Ba);document.dispatchEvent(e)}function Ad(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Bb(o,i):o.dispatchEvent(i)}const Xb=["top","right","bottom","left"],tn=Math.min,it=Math.max,Oo=Math.round,Fo=Math.floor,At=e=>({x:e,y:e}),Jb={left:"right",right:"left",bottom:"top",top:"bottom"},Zb={start:"end",end:"start"};function Ha(e,t,n){return it(e,tn(t,n))}function Bt(e,t){return typeof e=="function"?e(t):e}function Ht(e){return e.split("-")[0]}function zn(e){return e.split("-")[1]}function Ua(e){return e==="x"?"y":"x"}function Wa(e){return e==="y"?"height":"width"}function nn(e){return["top","bottom"].includes(Ht(e))?"y":"x"}function qa(e){return Ua(nn(e))}function Qb(e,t,n){n===void 0&&(n=!1);const r=zn(e),o=qa(e),i=Wa(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Do(a)),[a,Do(a)]}function ew(e){const t=Do(e);return[Ga(e),t,Ga(t)]}function Ga(e){return e.replace(/start|end/g,t=>Zb[t])}function tw(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function nw(e,t,n,r){const o=zn(e);let i=tw(Ht(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Ga)))),i}function Do(e){return e.replace(/left|right|bottom|top/g,t=>Jb[t])}function rw(e){return{top:0,right:0,bottom:0,left:0,...e}}function Pd(e){return typeof e!="number"?rw(e):{top:e,right:e,bottom:e,left:e}}function Io(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Nd(e,t,n){let{reference:r,floating:o}=e;const i=nn(t),a=qa(t),s=Wa(a),u=Ht(t),c=i==="y",d=r.x+r.width/2-o.width/2,g=r.y+r.height/2-o.height/2,m=r[s]/2-o[s]/2;let f;switch(u){case"top":f={x:d,y:r.y-o.height};break;case"bottom":f={x:d,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:g};break;case"left":f={x:r.x-o.width,y:g};break;default:f={x:r.x,y:r.y}}switch(zn(t)){case"start":f[a]-=m*(n&&c?-1:1);break;case"end":f[a]+=m*(n&&c?-1:1);break}return f}const ow=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:g}=Nd(c,r,u),m=r,f={},v=0;for(let h=0;h<s.length;h++){const{name:y,fn:b}=s[h],{x:w,y:C,data:E,reset:x}=await b({x:d,y:g,initialPlacement:r,placement:m,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});d=w??d,g=C??g,f={...f,[y]:{...f[y],...E}},x&&v<=50&&(v++,typeof x=="object"&&(x.placement&&(m=x.placement),x.rects&&(c=x.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:d,y:g}=Nd(c,m,u)),h=-1)}return{x:d,y:g,placement:m,strategy:o,middlewareData:f}};async function gr(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:g="floating",altBoundary:m=!1,padding:f=0}=Bt(t,e),v=Pd(f),y=s[m?g==="floating"?"reference":"floating":g],b=Io(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:u})),w=g==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),E=await(i.isElement==null?void 0:i.isElement(C))?await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1}:{x:1,y:1},x=Io(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:C,strategy:u}):w);return{top:(b.top-x.top+v.top)/E.y,bottom:(x.bottom-b.bottom+v.bottom)/E.y,left:(b.left-x.left+v.left)/E.x,right:(x.right-b.right+v.right)/E.x}}const iw=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:u}=t,{element:c,padding:d=0}=Bt(e,t)||{};if(c==null)return{};const g=Pd(d),m={x:n,y:r},f=qa(o),v=Wa(f),h=await a.getDimensions(c),y=f==="y",b=y?"top":"left",w=y?"bottom":"right",C=y?"clientHeight":"clientWidth",E=i.reference[v]+i.reference[f]-m[f]-i.floating[v],x=m[f]-i.reference[f],O=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let I=O?O[C]:0;(!I||!await(a.isElement==null?void 0:a.isElement(O)))&&(I=s.floating[C]||i.floating[v]);const L=E/2-x/2,H=I/2-h[v]/2-1,D=tn(g[b],H),G=tn(g[w],H),U=D,Z=I-h[v]-G,k=I/2-h[v]/2+L,$=Ha(U,k,Z),F=!u.arrow&&zn(o)!=null&&k!==$&&i.reference[v]/2-(k<U?D:G)-h[v]/2<0,q=F?k<U?k-U:k-Z:0;return{[f]:m[f]+q,data:{[f]:$,centerOffset:k-$-q,...F&&{alignmentOffset:q}},reset:F}}}),aw=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:u,elements:c}=t,{mainAxis:d=!0,crossAxis:g=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:h=!0,...y}=Bt(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const b=Ht(o),w=nn(s),C=Ht(s)===s,E=await(u.isRTL==null?void 0:u.isRTL(c.floating)),x=m||(C||!h?[Do(s)]:ew(s)),O=v!=="none";!m&&O&&x.push(...nw(s,h,v,E));const I=[s,...x],L=await gr(t,y),H=[];let D=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&H.push(L[b]),g){const k=Qb(o,a,E);H.push(L[k[0]],L[k[1]])}if(D=[...D,{placement:o,overflows:H}],!H.every(k=>k<=0)){var G,U;const k=(((G=i.flip)==null?void 0:G.index)||0)+1,$=I[k];if($)return{data:{index:k,overflows:D},reset:{placement:$}};let F=(U=D.filter(q=>q.overflows[0]<=0).sort((q,P)=>q.overflows[1]-P.overflows[1])[0])==null?void 0:U.placement;if(!F)switch(f){case"bestFit":{var Z;const q=(Z=D.filter(P=>{if(O){const j=nn(P.placement);return j===w||j==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(j=>j>0).reduce((j,A)=>j+A,0)]).sort((P,j)=>P[1]-j[1])[0])==null?void 0:Z[0];q&&(F=q);break}case"initialPlacement":F=s;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function kd(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Od(e){return Xb.some(t=>e[t]>=0)}const sw=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Bt(e,t);switch(r){case"referenceHidden":{const i=await gr(t,{...o,elementContext:"reference"}),a=kd(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Od(a)}}}case"escaped":{const i=await gr(t,{...o,altBoundary:!0}),a=kd(i,n.floating);return{data:{escapedOffsets:a,escaped:Od(a)}}}default:return{}}}}};async function lw(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Ht(n),s=zn(n),u=nn(n)==="y",c=["left","top"].includes(a)?-1:1,d=i&&u?-1:1,g=Bt(t,e);let{mainAxis:m,crossAxis:f,alignmentAxis:v}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return s&&typeof v=="number"&&(f=s==="end"?v*-1:v),u?{x:f*d,y:m*c}:{x:m*c,y:f*d}}const cw=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,u=await lw(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:a}}}}},uw=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x:b,y:w}=y;return{x:b,y:w}}},...u}=Bt(e,t),c={x:n,y:r},d=await gr(t,u),g=nn(Ht(o)),m=Ua(g);let f=c[m],v=c[g];if(i){const y=m==="y"?"top":"left",b=m==="y"?"bottom":"right",w=f+d[y],C=f-d[b];f=Ha(w,f,C)}if(a){const y=g==="y"?"top":"left",b=g==="y"?"bottom":"right",w=v+d[y],C=v-d[b];v=Ha(w,v,C)}const h=s.fn({...t,[m]:f,[g]:v});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[m]:i,[g]:a}}}}}},dw=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:u=!0,crossAxis:c=!0}=Bt(e,t),d={x:n,y:r},g=nn(o),m=Ua(g);let f=d[m],v=d[g];const h=Bt(s,t),y=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const C=m==="y"?"height":"width",E=i.reference[m]-i.floating[C]+y.mainAxis,x=i.reference[m]+i.reference[C]-y.mainAxis;f<E?f=E:f>x&&(f=x)}if(c){var b,w;const C=m==="y"?"width":"height",E=["top","left"].includes(Ht(o)),x=i.reference[g]-i.floating[C]+(E&&((b=a.offset)==null?void 0:b[g])||0)+(E?0:y.crossAxis),O=i.reference[g]+i.reference[C]+(E?0:((w=a.offset)==null?void 0:w[g])||0)-(E?y.crossAxis:0);v<x?v=x:v>O&&(v=O)}return{[m]:f,[g]:v}}}},fw=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:u=()=>{},...c}=Bt(e,t),d=await gr(t,c),g=Ht(o),m=zn(o),f=nn(o)==="y",{width:v,height:h}=i.floating;let y,b;g==="top"||g==="bottom"?(y=g,b=m===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(b=g,y=m==="end"?"top":"bottom");const w=h-d.top-d.bottom,C=v-d.left-d.right,E=tn(h-d[y],w),x=tn(v-d[b],C),O=!t.middlewareData.shift;let I=E,L=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(L=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(I=w),O&&!m){const D=it(d.left,0),G=it(d.right,0),U=it(d.top,0),Z=it(d.bottom,0);f?L=v-2*(D!==0||G!==0?D+G:it(d.left,d.right)):I=h-2*(U!==0||Z!==0?U+Z:it(d.top,d.bottom))}await u({...t,availableWidth:L,availableHeight:I});const H=await a.getDimensions(s.floating);return v!==H.width||h!==H.height?{reset:{rects:!0}}:{}}}};function Mo(){return typeof window<"u"}function Bn(e){return Fd(e)?(e.nodeName||"").toLowerCase():"#document"}function at(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pt(e){var t;return(t=(Fd(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Fd(e){return Mo()?e instanceof Node||e instanceof at(e).Node:!1}function vt(e){return Mo()?e instanceof Element||e instanceof at(e).Element:!1}function Nt(e){return Mo()?e instanceof HTMLElement||e instanceof at(e).HTMLElement:!1}function Dd(e){return!Mo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof at(e).ShadowRoot}function mr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=yt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function pw(e){return["table","td","th"].includes(Bn(e))}function $o(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ka(e){const t=Ya(),n=vt(e)?yt(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function gw(e){let t=rn(e);for(;Nt(t)&&!Hn(t);){if(Ka(t))return t;if($o(t))return null;t=rn(t)}return null}function Ya(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Hn(e){return["html","body","#document"].includes(Bn(e))}function yt(e){return at(e).getComputedStyle(e)}function Lo(e){return vt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function rn(e){if(Bn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Dd(e)&&e.host||Pt(e);return Dd(t)?t.host:t}function Id(e){const t=rn(e);return Hn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Nt(t)&&mr(t)?t:Id(t)}function hr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Id(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=at(o);if(i){const s=Xa(a);return t.concat(a,a.visualViewport||[],mr(o)?o:[],s&&n?hr(s):[])}return t.concat(o,hr(o,[],n))}function Xa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Md(e){const t=yt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Nt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Oo(n)!==i||Oo(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Ja(e){return vt(e)?e:e.contextElement}function Un(e){const t=Ja(e);if(!Nt(t))return At(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Md(t);let a=(i?Oo(n.width):n.width)/r,s=(i?Oo(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const mw=At(0);function $d(e){const t=at(e);return!Ya()||!t.visualViewport?mw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function hw(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==at(e)?!1:t}function yn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ja(e);let a=At(1);t&&(r?vt(r)&&(a=Un(r)):a=Un(e));const s=hw(i,n,r)?$d(i):At(0);let u=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,d=o.width/a.x,g=o.height/a.y;if(i){const m=at(i),f=r&&vt(r)?at(r):r;let v=m,h=Xa(v);for(;h&&r&&f!==v;){const y=Un(h),b=h.getBoundingClientRect(),w=yt(h),C=b.left+(h.clientLeft+parseFloat(w.paddingLeft))*y.x,E=b.top+(h.clientTop+parseFloat(w.paddingTop))*y.y;u*=y.x,c*=y.y,d*=y.x,g*=y.y,u+=C,c+=E,v=at(h),h=Xa(v)}}return Io({width:d,height:g,x:u,y:c})}function Za(e,t){const n=Lo(e).scrollLeft;return t?t.left+n:yn(Pt(e)).left+n}function Ld(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Za(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function vw(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Pt(r),s=t?$o(t.floating):!1;if(r===a||s&&i)return n;let u={scrollLeft:0,scrollTop:0},c=At(1);const d=At(0),g=Nt(r);if((g||!g&&!i)&&((Bn(r)!=="body"||mr(a))&&(u=Lo(r)),Nt(r))){const f=yn(r);c=Un(r),d.x=f.x+r.clientLeft,d.y=f.y+r.clientTop}const m=a&&!g&&!i?Ld(a,u,!0):At(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+d.x+m.x,y:n.y*c.y-u.scrollTop*c.y+d.y+m.y}}function yw(e){return Array.from(e.getClientRects())}function xw(e){const t=Pt(e),n=Lo(e),r=e.ownerDocument.body,o=it(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=it(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Za(e);const s=-n.scrollTop;return yt(r).direction==="rtl"&&(a+=it(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function bw(e,t){const n=at(e),r=Pt(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,u=0;if(o){i=o.width,a=o.height;const c=Ya();(!c||c&&t==="fixed")&&(s=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:s,y:u}}function ww(e,t){const n=yn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Nt(e)?Un(e):At(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,u=o*i.x,c=r*i.y;return{width:a,height:s,x:u,y:c}}function Rd(e,t,n){let r;if(t==="viewport")r=bw(e,n);else if(t==="document")r=xw(Pt(e));else if(vt(t))r=ww(t,n);else{const o=$d(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Io(r)}function Vd(e,t){const n=rn(e);return n===t||!vt(n)||Hn(n)?!1:yt(n).position==="fixed"||Vd(n,t)}function Cw(e,t){const n=t.get(e);if(n)return n;let r=hr(e,[],!1).filter(s=>vt(s)&&Bn(s)!=="body"),o=null;const i=yt(e).position==="fixed";let a=i?rn(e):e;for(;vt(a)&&!Hn(a);){const s=yt(a),u=Ka(a);!u&&s.position==="fixed"&&(o=null),(i?!u&&!o:!u&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||mr(a)&&!u&&Vd(e,a))?r=r.filter(d=>d!==a):o=s,a=rn(a)}return t.set(e,r),r}function Sw(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?$o(t)?[]:Cw(t,this._c):[].concat(n),r],s=a[0],u=a.reduce((c,d)=>{const g=Rd(t,d,o);return c.top=it(g.top,c.top),c.right=tn(g.right,c.right),c.bottom=tn(g.bottom,c.bottom),c.left=it(g.left,c.left),c},Rd(t,s,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Ew(e){const{width:t,height:n}=Md(e);return{width:t,height:n}}function _w(e,t,n){const r=Nt(t),o=Pt(t),i=n==="fixed",a=yn(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const u=At(0);if(r||!r&&!i)if((Bn(t)!=="body"||mr(o))&&(s=Lo(t)),r){const m=yn(t,!0,i,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else o&&(u.x=Za(o));const c=o&&!r&&!i?Ld(o,s):At(0),d=a.left+s.scrollLeft-u.x-c.x,g=a.top+s.scrollTop-u.y-c.y;return{x:d,y:g,width:a.width,height:a.height}}function Qa(e){return yt(e).position==="static"}function jd(e,t){if(!Nt(e)||yt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Pt(e)===n&&(n=n.ownerDocument.body),n}function zd(e,t){const n=at(e);if($o(e))return n;if(!Nt(e)){let o=rn(e);for(;o&&!Hn(o);){if(vt(o)&&!Qa(o))return o;o=rn(o)}return n}let r=jd(e,t);for(;r&&pw(r)&&Qa(r);)r=jd(r,t);return r&&Hn(r)&&Qa(r)&&!Ka(r)?n:r||gw(e)||n}const Tw=async function(e){const t=this.getOffsetParent||zd,n=this.getDimensions,r=await n(e.floating);return{reference:_w(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Aw(e){return yt(e).direction==="rtl"}const Pw={convertOffsetParentRelativeRectToViewportRelativeRect:vw,getDocumentElement:Pt,getClippingRect:Sw,getOffsetParent:zd,getElementRects:Tw,getClientRects:yw,getDimensions:Ew,getScale:Un,isElement:vt,isRTL:Aw};function Nw(e,t){let n=null,r;const o=Pt(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),i();const{left:c,top:d,width:g,height:m}=e.getBoundingClientRect();if(s||t(),!g||!m)return;const f=Fo(d),v=Fo(o.clientWidth-(c+g)),h=Fo(o.clientHeight-(d+m)),y=Fo(c),w={rootMargin:-f+"px "+-v+"px "+-h+"px "+-y+"px",threshold:it(0,tn(1,u))||1};let C=!0;function E(x){const O=x[0].intersectionRatio;if(O!==u){if(!C)return a();O?a(!1,O):r=setTimeout(()=>{a(!1,1e-7)},1e3)}C=!1}try{n=new IntersectionObserver(E,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,w)}n.observe(e)}return a(!0),i}function kw(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=Ja(e),d=o||i?[...c?hr(c):[],...hr(t)]:[];d.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),i&&b.addEventListener("resize",n)});const g=c&&s?Nw(c,n):null;let m=-1,f=null;a&&(f=new ResizeObserver(b=>{let[w]=b;w&&w.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var C;(C=f)==null||C.observe(t)})),n()}),c&&!u&&f.observe(c),f.observe(t));let v,h=u?yn(e):null;u&&y();function y(){const b=yn(e);h&&(b.x!==h.x||b.y!==h.y||b.width!==h.width||b.height!==h.height)&&n(),h=b,v=requestAnimationFrame(y)}return n(),()=>{var b;d.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),g==null||g(),(b=f)==null||b.disconnect(),f=null,u&&cancelAnimationFrame(v)}}const Ow=cw,Fw=uw,Dw=aw,Iw=fw,Mw=sw,Bd=iw,$w=dw,Lw=(e,t,n)=>{const r=new Map,o={platform:Pw,...n},i={...o.platform,_c:r};return ow(e,t,{...o,platform:i})};var Ro=typeof document<"u"?_.useLayoutEffect:_.useEffect;function Vo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Vo(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Vo(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Hd(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ud(e,t){const n=Hd(e);return Math.round(t*n)/n}function es(e){const t=p.useRef(e);return Ro(()=>{t.current=e}),t}function Rw(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:u,open:c}=e,[d,g]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,f]=p.useState(r);Vo(m,r)||f(r);const[v,h]=p.useState(null),[y,b]=p.useState(null),w=p.useCallback(P=>{P!==O.current&&(O.current=P,h(P))},[]),C=p.useCallback(P=>{P!==I.current&&(I.current=P,b(P))},[]),E=i||v,x=a||y,O=p.useRef(null),I=p.useRef(null),L=p.useRef(d),H=u!=null,D=es(u),G=es(o),U=es(c),Z=p.useCallback(()=>{if(!O.current||!I.current)return;const P={placement:t,strategy:n,middleware:m};G.current&&(P.platform=G.current),Lw(O.current,I.current,P).then(j=>{const A={...j,isPositioned:U.current!==!1};k.current&&!Vo(L.current,A)&&(L.current=A,Ir.flushSync(()=>{g(A)}))})},[m,t,n,G,U]);Ro(()=>{c===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,g(P=>({...P,isPositioned:!1})))},[c]);const k=p.useRef(!1);Ro(()=>(k.current=!0,()=>{k.current=!1}),[]),Ro(()=>{if(E&&(O.current=E),x&&(I.current=x),E&&x){if(D.current)return D.current(E,x,Z);Z()}},[E,x,Z,D,H]);const $=p.useMemo(()=>({reference:O,floating:I,setReference:w,setFloating:C}),[w,C]),F=p.useMemo(()=>({reference:E,floating:x}),[E,x]),q=p.useMemo(()=>{const P={position:n,left:0,top:0};if(!F.floating)return P;const j=Ud(F.floating,d.x),A=Ud(F.floating,d.y);return s?{...P,transform:"translate("+j+"px, "+A+"px)",...Hd(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:A}},[n,s,F.floating,d.x,d.y]);return p.useMemo(()=>({...d,update:Z,refs:$,elements:F,floatingStyles:q}),[d,Z,$,F,q])}const Vw=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Bd({element:r.current,padding:o}).fn(n):{}:r?Bd({element:r,padding:o}).fn(n):{}}}},jw=(e,t)=>({...Ow(e),options:[e,t]}),zw=(e,t)=>({...Fw(e),options:[e,t]}),Bw=(e,t)=>({...$w(e),options:[e,t]}),Hw=(e,t)=>({...Dw(e),options:[e,t]}),Uw=(e,t)=>({...Iw(e),options:[e,t]}),Ww=(e,t)=>({...Mw(e),options:[e,t]}),qw=(e,t)=>({...Vw(e),options:[e,t]});var Gw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Kw=Gw.reduce((e,t)=>{const n=p.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Pn:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Yw="Arrow",Wd=p.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return l.jsx(Kw.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});Wd.displayName=Yw;var Xw=Wd;function qd(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Jw(...e){return t=>{let n=!1;const r=e.map(o=>{const i=qd(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():qd(e[o],null)}}}}function Gd(...e){return p.useCallback(Jw(...e),e)}var Zw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Kd=Zw.reduce((e,t)=>{const n=p.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Pn:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),ts="Popper",[Yd,Xd]=Jt(ts),[Qw,Jd]=Yd(ts),Zd=e=>{const{__scopePopper:t,children:n}=e,[r,o]=p.useState(null);return l.jsx(Qw,{scope:t,anchor:r,onAnchorChange:o,children:n})};Zd.displayName=ts;var Qd="PopperAnchor",ef=p.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Jd(Qd,n),a=p.useRef(null),s=Gd(t,a);return p.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:l.jsx(Kd.div,{...o,ref:s})});ef.displayName=Qd;var ns="PopperContent",[e0,t0]=Yd(ns),tf=p.forwardRef((e,t)=>{var ae,de,ue,le,Ce,K;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:u=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:g="partial",hideWhenDetached:m=!1,updatePositionStrategy:f="optimized",onPlaced:v,...h}=e,y=Jd(ns,n),[b,w]=p.useState(null),C=Gd(t,Ee=>w(Ee)),[E,x]=p.useState(null),O=gc(E),I=(O==null?void 0:O.width)??0,L=(O==null?void 0:O.height)??0,H=r+(i!=="center"?"-"+i:""),D=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},G=Array.isArray(c)?c:[c],U=G.length>0,Z={padding:D,boundary:G.filter(r0),altBoundary:U},{refs:k,floatingStyles:$,placement:F,isPositioned:q,middlewareData:P}=Rw({strategy:"fixed",placement:H,whileElementsMounted:(...Ee)=>kw(...Ee,{animationFrame:f==="always"}),elements:{reference:y.anchor},middleware:[jw({mainAxis:o+L,alignmentAxis:a}),u&&zw({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?Bw():void 0,...Z}),u&&Hw({...Z}),Uw({...Z,apply:({elements:Ee,rects:We,availableWidth:qe,availableHeight:It})=>{const{width:st,height:S}=We.reference,N=Ee.floating.style;N.setProperty("--radix-popper-available-width",`${qe}px`),N.setProperty("--radix-popper-available-height",`${It}px`),N.setProperty("--radix-popper-anchor-width",`${st}px`),N.setProperty("--radix-popper-anchor-height",`${S}px`)}}),E&&qw({element:E,padding:s}),o0({arrowWidth:I,arrowHeight:L}),m&&Ww({strategy:"referenceHidden",...Z})]}),[j,A]=of(F),B=Ge(v);ot(()=>{q&&(B==null||B())},[q,B]);const Q=(ae=P.arrow)==null?void 0:ae.x,re=(de=P.arrow)==null?void 0:de.y,ee=((ue=P.arrow)==null?void 0:ue.centerOffset)!==0,[ce,oe]=p.useState();return ot(()=>{b&&oe(window.getComputedStyle(b).zIndex)},[b]),l.jsx("div",{ref:k.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:q?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[(le=P.transformOrigin)==null?void 0:le.x,(Ce=P.transformOrigin)==null?void 0:Ce.y].join(" "),...((K=P.hide)==null?void 0:K.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(e0,{scope:n,placedSide:j,onArrowChange:x,arrowX:Q,arrowY:re,shouldHideArrow:ee,children:l.jsx(Kd.div,{"data-side":j,"data-align":A,...h,ref:C,style:{...h.style,animation:q?void 0:"none"}})})})});tf.displayName=ns;var nf="PopperArrow",n0={top:"bottom",right:"left",bottom:"top",left:"right"},rf=p.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=t0(nf,r),a=n0[i.placedSide];return l.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:l.jsx(Xw,{...o,ref:n,style:{...o.style,display:"block"}})})});rf.displayName=nf;function r0(e){return e!==null}var o0=e=>({name:"transformOrigin",options:e,fn(t){var y,b,w;const{placement:n,rects:r,middlewareData:o}=t,a=((y=o.arrow)==null?void 0:y.centerOffset)!==0,s=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[c,d]=of(n),g={start:"0%",center:"50%",end:"100%"}[d],m=(((b=o.arrow)==null?void 0:b.x)??0)+s/2,f=(((w=o.arrow)==null?void 0:w.y)??0)+u/2;let v="",h="";return c==="bottom"?(v=a?g:`${m}px`,h=`${-u}px`):c==="top"?(v=a?g:`${m}px`,h=`${r.floating.height+u}px`):c==="right"?(v=`${-u}px`,h=a?g:`${f}px`):c==="left"&&(v=`${r.floating.width+u}px`,h=a?g:`${f}px`),{data:{x:v,y:h}}}});function of(e){const[t,n="center"]=e.split("-");return[t,n]}var i0=Zd,a0=ef,s0=tf,l0=rf,c0="Portal",af=p.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=p.useState(!1);ot(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?ai.createPortal(l.jsx(pr.div,{...r,ref:t}),a):null});af.displayName=c0;function u0(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var rs=e=>{const{present:t,children:n}=e,r=d0(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),i=fr(r.ref,f0(o));return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:i}):null};rs.displayName="Presence";function d0(e){const[t,n]=p.useState(),r=p.useRef({}),o=p.useRef(e),i=p.useRef("none"),a=e?"mounted":"unmounted",[s,u]=u0(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const c=jo(r.current);i.current=s==="mounted"?c:"none"},[s]),ot(()=>{const c=r.current,d=o.current;if(d!==e){const m=i.current,f=jo(c);e?u("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(d&&m!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),ot(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,g=f=>{const h=jo(r.current).includes(f.animationName);if(f.target===t&&h&&(u("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},m=f=>{f.target===t&&(i.current=jo(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:p.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function jo(e){return(e==null?void 0:e.animationName)||"none"}function f0(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var p0="VisuallyHidden",sf=p.forwardRef((e,t)=>l.jsx(pr.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));sf.displayName=p0;var g0=sf,[zo,v_]=Jt("Tooltip",[Xd]),Bo=Xd(),lf="TooltipProvider",m0=700,os="tooltip.open",[h0,is]=zo(lf),cf=e=>{const{__scopeTooltip:t,delayDuration:n=m0,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,s]=p.useState(!0),u=p.useRef(!1),c=p.useRef(0);return p.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),l.jsx(h0,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:p.useCallback(()=>{window.clearTimeout(c.current),s(!1)},[]),onClose:p.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:p.useCallback(d=>{u.current=d},[]),disableHoverableContent:o,children:i})};cf.displayName=lf;var Ho="Tooltip",[v0,vr]=zo(Ho),uf=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,u=is(Ho,e.__scopeTooltip),c=Bo(t),[d,g]=p.useState(null),m=Dn(),f=p.useRef(0),v=a??u.disableHoverableContent,h=s??u.delayDuration,y=p.useRef(!1),[b=!1,w]=On({prop:r,defaultProp:o,onChange:I=>{I?(u.onOpen(),document.dispatchEvent(new CustomEvent(os))):u.onClose(),i==null||i(I)}}),C=p.useMemo(()=>b?y.current?"delayed-open":"instant-open":"closed",[b]),E=p.useCallback(()=>{window.clearTimeout(f.current),f.current=0,y.current=!1,w(!0)},[w]),x=p.useCallback(()=>{window.clearTimeout(f.current),f.current=0,w(!1)},[w]),O=p.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{y.current=!0,w(!0),f.current=0},h)},[h,w]);return p.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),l.jsx(i0,{...c,children:l.jsx(v0,{scope:t,contentId:m,open:b,stateAttribute:C,trigger:d,onTriggerChange:g,onTriggerEnter:p.useCallback(()=>{u.isOpenDelayed?O():E()},[u.isOpenDelayed,O,E]),onTriggerLeave:p.useCallback(()=>{v?x():(window.clearTimeout(f.current),f.current=0)},[x,v]),onOpen:E,onClose:x,disableHoverableContent:v,children:n})})};uf.displayName=Ho;var as="TooltipTrigger",df=p.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=vr(as,n),i=is(as,n),a=Bo(n),s=p.useRef(null),u=fr(t,s,o.onTriggerChange),c=p.useRef(!1),d=p.useRef(!1),g=p.useCallback(()=>c.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),l.jsx(a0,{asChild:!0,...a,children:l.jsx(pr.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:zt(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:zt(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:zt(e.onPointerDown,()=>{c.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:zt(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:zt(e.onBlur,o.onClose),onClick:zt(e.onClick,o.onClose)})})});df.displayName=as;var ss="TooltipPortal",[y0,x0]=zo(ss,{forceMount:void 0}),ff=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=vr(ss,t);return l.jsx(y0,{scope:t,forceMount:n,children:l.jsx(rs,{present:n||i.open,children:l.jsx(af,{asChild:!0,container:o,children:r})})})};ff.displayName=ss;var Wn="TooltipContent",pf=p.forwardRef((e,t)=>{const n=x0(Wn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=vr(Wn,e.__scopeTooltip);return l.jsx(rs,{present:r||a.open,children:a.disableHoverableContent?l.jsx(gf,{side:o,...i,ref:t}):l.jsx(b0,{side:o,...i,ref:t})})}),b0=p.forwardRef((e,t)=>{const n=vr(Wn,e.__scopeTooltip),r=is(Wn,e.__scopeTooltip),o=p.useRef(null),i=fr(t,o),[a,s]=p.useState(null),{trigger:u,onClose:c}=n,d=o.current,{onPointerInTransitChange:g}=r,m=p.useCallback(()=>{s(null),g(!1)},[g]),f=p.useCallback((v,h)=>{const y=v.currentTarget,b={x:v.clientX,y:v.clientY},w=E0(b,y.getBoundingClientRect()),C=_0(b,w),E=T0(h.getBoundingClientRect()),x=P0([...C,...E]);s(x),g(!0)},[g]);return p.useEffect(()=>()=>m(),[m]),p.useEffect(()=>{if(u&&d){const v=y=>f(y,d),h=y=>f(y,u);return u.addEventListener("pointerleave",v),d.addEventListener("pointerleave",h),()=>{u.removeEventListener("pointerleave",v),d.removeEventListener("pointerleave",h)}}},[u,d,f,m]),p.useEffect(()=>{if(a){const v=h=>{const y=h.target,b={x:h.clientX,y:h.clientY},w=(u==null?void 0:u.contains(y))||(d==null?void 0:d.contains(y)),C=!A0(b,a);w?m():C&&(m(),c())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[u,d,a,c,m]),l.jsx(gf,{...e,ref:i})}),[w0,C0]=zo(Ho,{isInside:!1}),gf=p.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,u=vr(Wn,n),c=Bo(n),{onClose:d}=u;return p.useEffect(()=>(document.addEventListener(os,d),()=>document.removeEventListener(os,d)),[d]),p.useEffect(()=>{if(u.trigger){const g=m=>{const f=m.target;f!=null&&f.contains(u.trigger)&&d()};return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[u.trigger,d]),l.jsx(_d,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:g=>g.preventDefault(),onDismiss:d,children:l.jsxs(s0,{"data-state":u.stateAttribute,...c,...s,ref:t,style:{...s.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:[l.jsx(ec,{children:r}),l.jsx(w0,{scope:n,isInside:!0,children:l.jsx(g0,{id:u.contentId,role:"tooltip",children:o||r})})]})})});pf.displayName=Wn;var mf="TooltipArrow",S0=p.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Bo(n);return C0(mf,n).isInside?null:l.jsx(l0,{...o,...r,ref:t})});S0.displayName=mf;function E0(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function _0(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function T0(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function A0(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i].x,u=t[i].y,c=t[a].x,d=t[a].y;u>r!=d>r&&n<(c-s)*(r-u)/(d-u)+s&&(o=!o)}return o}function P0(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),N0(t)}function N0(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var k0=cf,O0=uf,F0=df,D0=ff,hf=pf;const xn=k0,bn=O0,wn=F0,on=p.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(D0,{children:l.jsx(hf,{ref:r,sideOffset:t,className:he("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground 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})}));on.displayName=hf.displayName;function I0({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const M0=p.forwardRef(I0);var $0=function(e){return function(t,n){var r=_.useRef(!1);e(function(){return function(){r.current=!1}},[]),e(function(){if(!r.current)r.current=!0;else return t()},n)}},vf=function(e){return typeof e=="function"},yf=process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test";const L0=$0(_.useEffect);function xf(e){var t=_.useRef(e);return t.current=e,t}var R0=function(e){yf&&(vf(e)||console.error("useUnmount expected parameter is a function, got ".concat(typeof e)));var t=xf(e);_.useEffect(function(){return function(){t.current()}},[])};function V0(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var bf=V0,j0=typeof ir=="object"&&ir&&ir.Object===Object&&ir,z0=j0,B0=z0,H0=typeof self=="object"&&self&&self.Object===Object&&self,U0=B0||H0||Function("return this")(),wf=U0,W0=wf,q0=function(){return W0.Date.now()},G0=q0,K0=/\s/;function Y0(e){for(var t=e.length;t--&&K0.test(e.charAt(t)););return t}var X0=Y0,J0=X0,Z0=/^\s+/;function Q0(e){return e&&e.slice(0,J0(e)+1).replace(Z0,"")}var eC=Q0,tC=wf,nC=tC.Symbol,Cf=nC,Sf=Cf,Ef=Object.prototype,rC=Ef.hasOwnProperty,oC=Ef.toString,yr=Sf?Sf.toStringTag:void 0;function iC(e){var t=rC.call(e,yr),n=e[yr];try{e[yr]=void 0;var r=!0}catch{}var o=oC.call(e);return r&&(t?e[yr]=n:delete e[yr]),o}var aC=iC,sC=Object.prototype,lC=sC.toString;function cC(e){return lC.call(e)}var uC=cC,_f=Cf,dC=aC,fC=uC,pC="[object Null]",gC="[object Undefined]",Tf=_f?_f.toStringTag:void 0;function mC(e){return e==null?e===void 0?gC:pC:Tf&&Tf in Object(e)?dC(e):fC(e)}var hC=mC;function vC(e){return e!=null&&typeof e=="object"}var yC=vC,xC=hC,bC=yC,wC="[object Symbol]";function CC(e){return typeof e=="symbol"||bC(e)&&xC(e)==wC}var SC=CC,EC=eC,Af=bf,_C=SC,Pf=NaN,TC=/^[-+]0x[0-9a-f]+$/i,AC=/^0b[01]+$/i,PC=/^0o[0-7]+$/i,NC=parseInt;function kC(e){if(typeof e=="number")return e;if(_C(e))return Pf;if(Af(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Af(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=EC(e);var n=AC.test(e);return n||PC.test(e)?NC(e.slice(2),n?2:8):TC.test(e)?Pf:+e}var OC=kC,FC=bf,ls=G0,Nf=OC,DC="Expected a function",IC=Math.max,MC=Math.min;function $C(e,t,n){var r,o,i,a,s,u,c=0,d=!1,g=!1,m=!0;if(typeof e!="function")throw new TypeError(DC);t=Nf(t)||0,FC(n)&&(d=!!n.leading,g="maxWait"in n,i=g?IC(Nf(n.maxWait)||0,t):i,m="trailing"in n?!!n.trailing:m);function f(O){var I=r,L=o;return r=o=void 0,c=O,a=e.apply(L,I),a}function v(O){return c=O,s=setTimeout(b,t),d?f(O):a}function h(O){var I=O-u,L=O-c,H=t-I;return g?MC(H,i-L):H}function y(O){var I=O-u,L=O-c;return u===void 0||I>=t||I<0||g&&L>=i}function b(){var O=ls();if(y(O))return w(O);s=setTimeout(b,h(O))}function w(O){return s=void 0,m&&r?f(O):(r=o=void 0,a)}function C(){s!==void 0&&clearTimeout(s),c=0,r=u=o=s=void 0}function E(){return s===void 0?a:w(ls())}function x(){var O=ls(),I=y(O);if(r=arguments,o=this,u=O,I){if(s===void 0)return v(u);if(g)return clearTimeout(s),s=setTimeout(b,t),f(u)}return s===void 0&&(s=setTimeout(b,t)),a}return x.cancel=C,x.flush=E,x}var LC=$C;const RC=Jr(LC);function VC(){var e=(typeof global>"u"?"undefined":typeof global)=="object"&&global&&global.Object===Object&&global,t=typeof self=="object"&&self&&self.Object===Object&&self;return e||t}VC()||(global.Date=Date);function jC(e,t){var n;yf&&(vf(e)||console.error("useDebounceFn expected parameter is a function, got ".concat(typeof e)));var r=xf(e),o=(n=t==null?void 0:t.wait)!==null&&n!==void 0?n:1e3,i=_.useMemo(function(){return RC(function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return r.current.apply(r,Lc([],$c(a),!1))},o,t)},[]);return R0(function(){i.cancel()}),{run:i,cancel:i.cancel,flush:i.flush}}function zC(e,t,n){var r=$c(_.useState({}),2),o=r[0],i=r[1],a=jC(function(){i({})},n).run;_.useEffect(function(){return a()},t),L0(e,[o])}const BC=_.forwardRef(({onChange:e},t)=>{const n=_.useRef(null),[r,o]=_.useState("");return _.useImperativeHandle(t,()=>({setValue:i=>{var a;o(i),(a=n.current)==null||a.focus()}})),zC(()=>{e==null||e(r)},[r],{wait:300}),l.jsxs(l.Fragment,{children:[l.jsx(en,{ref:n,type:"text",placeholder:"Search files...",value:r,onChange:i=>o(i.target.value),className:"pr-8"}),r&&l.jsx("button",{onClick:()=>{var i;o(""),(i=n.current)==null||i.focus()},className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700",children:l.jsx(M0,{className:"h-5 w-5"})})]})});var cs={exports:{}},Uo={exports:{}},Te={};/** @license React v16.13.1
152
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return p.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},fx="DialogDescriptionWarning",px=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${mu(fx).contentName}}.`;return p.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},gx=tu,mx=ru,hx=iu,hu=au,vu=su,yu=cu,xu=du,vx=pu;const jt=gx,uo=mx,yx=hx,bu=p.forwardRef(({className:e,...t},n)=>l.jsx(hu,{ref:n,className:he("s3-explr-ui-dialog-overlay fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));bu.displayName=hu.displayName;const St=p.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(yx,{children:[l.jsx(bu,{}),l.jsxs(vu,{ref:r,className:he("s3-explr-ui-dialog-content fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,l.jsxs(vx,{className:he("s3-explr-ui-dialog-close 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:[l.jsx(Hi,{className:"s3-explr-ui-dialog-close-icon h-4 w-4"}),l.jsx("span",{className:"s3-explr-ui-dialog-close-text sr-only",children:"Close"})]})]})]}));St.displayName=vu.displayName;const Et=({className:e,...t})=>l.jsx("div",{className:he("s3-explr-ui-dialog-header flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Et.displayName="DialogHeader";const hn=({className:e,...t})=>l.jsx("div",{className:he("s3-explr-ui-dialog-footer flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});hn.displayName="DialogFooter";const _t=p.forwardRef(({className:e,...t},n)=>l.jsx(yu,{ref:n,className:he("s3-explr-ui-dialog-title text-lg font-semibold leading-none tracking-tight",e),...t}));_t.displayName=yu.displayName;const Rn=p.forwardRef(({className:e,...t},n)=>l.jsx(xu,{ref:n,className:he("s3-explr-ui-dialog-description text-sm text-muted-foreground",e),...t}));Rn.displayName=xu.displayName;const en=p.forwardRef(({className:e,type:t,...n},r)=>l.jsx("input",{type:t,className:he("s3-explr-ui-input","flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground 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:r,...n}));en.displayName="Input";var xx="Label",wu=p.forwardRef((e,t)=>l.jsx(Ve.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));wu.displayName=xx;var Cu=wu;const bx=Qi("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 s3-explr-ui-label",{variants:{variant:{default:"s3-explr-ui-label-default",required:"s3-explr-ui-label-required",disabled:"s3-explr-ui-label-disabled"},size:{default:"s3-explr-ui-label-size-default",sm:"s3-explr-ui-label-size-sm",lg:"s3-explr-ui-label-size-lg"}},defaultVariants:{variant:"default",size:"default"}}),vn=p.forwardRef(({className:e,variant:t,size:n,...r},o)=>l.jsx(Cu,{ref:o,className:he(bx({variant:t,size:n}),e),...r}));vn.displayName=Cu.displayName;const fo=({className:e,...t})=>l.jsx("nav",{role:"navigation","aria-label":"pagination",className:he("mx-auto flex w-full justify-center",e),...t});fo.displayName="Pagination";const po=p.forwardRef(({className:e,...t},n)=>l.jsx("ul",{ref:n,className:he("flex flex-row items-center gap-1",e),...t}));po.displayName="PaginationContent";const mt=p.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:he("",e),...t}));mt.displayName="PaginationItem";const Vn=({className:e,isActive:t,size:n="icon",...r})=>l.jsx("a",{"aria-current":t?"page":void 0,className:he(mc({variant:t?"outline":"ghost",size:n}),e),...r});Vn.displayName="PaginationLink";const go=({className:e,...t})=>l.jsxs(Vn,{"aria-label":"Go to previous page",size:"default",className:he("gap-1 pl-2.5",e),...t,children:[l.jsx(kh,{className:"h-4 w-4"}),l.jsx("span",{children:"Previous"})]});go.displayName="PaginationPrevious";const mo=({className:e,...t})=>l.jsxs(Vn,{"aria-label":"Go to next page",size:"default",className:he("gap-1 pr-2.5",e),...t,children:[l.jsx("span",{children:"Next"}),l.jsx(Gl,{className:"h-4 w-4"})]});mo.displayName="PaginationNext";const ho=({className:e,...t})=>l.jsxs("span",{"aria-hidden":!0,className:he("flex h-9 w-9 items-center justify-center",e),...t,children:[l.jsx(Oh,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"More pages"})]});ho.displayName="PaginationEllipsis";const vo=p.forwardRef(({className:e,...t},n)=>l.jsx("div",{className:he("relative w-full overflow-auto","s3-explr-ui-table-container"),children:l.jsx("table",{ref:n,className:he("w-full caption-bottom text-sm","s3-explr-ui-table",e),...t})}));vo.displayName="Table";const yo=p.forwardRef(({className:e,...t},n)=>l.jsx("thead",{ref:n,className:he("[&_tr]:border-b","s3-explr-ui-table-header",e),...t}));yo.displayName="TableHeader";const xo=p.forwardRef(({className:e,...t},n)=>l.jsx("tbody",{ref:n,className:he("[&_tr:last-child]:border-0","s3-explr-ui-table-body",e),...t}));xo.displayName="TableBody";const wx=p.forwardRef(({className:e,...t},n)=>l.jsx("tfoot",{ref:n,className:he("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0","s3-explr-ui-table-footer",e),...t}));wx.displayName="TableFooter";const ht=p.forwardRef(({className:e,...t},n)=>l.jsx("tr",{ref:n,className:he("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted","s3-explr-ui-table-row",e),...t}));ht.displayName="TableRow";const Tt=p.forwardRef(({className:e,...t},n)=>l.jsx("th",{ref:n,className:he("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]","s3-explr-ui-table-head",e),...t}));Tt.displayName="TableHead";const Ze=p.forwardRef(({className:e,...t},n)=>l.jsx("td",{ref:n,className:he("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]","s3-explr-ui-table-cell",e),...t}));Ze.displayName="TableCell";const Cx=p.forwardRef(({className:e,...t},n)=>l.jsx("caption",{ref:n,className:he("mt-4 text-sm text-muted-foreground","s3-explr-ui-table-caption",e),...t}));Cx.displayName="TableCaption";function xa(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function jn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Su(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ba(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Su(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Su(e[o],null)}}}}function wa(...e){return p.useCallback(ba(...e),e)}var Ca=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(Ex);if(i){const a=i.props.children,s=o.map(u=>u===i?p.Children.count(a)>1?p.Children.only(null):p.isValidElement(a)?a.props.children:null:u);return l.jsx(Sa,{...r,ref:t,children:p.isValidElement(a)?p.cloneElement(a,void 0,s):null})}return l.jsx(Sa,{...r,ref:t,children:n})});Ca.displayName="Slot";var Sa=p.forwardRef((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const o=Tx(n);return p.cloneElement(n,{..._x(r,n.props),ref:t?ba(t,o):o})}return p.Children.count(n)>1?p.Children.only(null):null});Sa.displayName="SlotClone";var Sx=({children:e})=>l.jsx(l.Fragment,{children:e});function Ex(e){return p.isValidElement(e)&&e.type===Sx}function _x(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Tx(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Ax(e){const t=e+"CollectionProvider",[n,r]=Jt(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:v,children:h}=f,y=_.useRef(null),b=_.useRef(new Map).current;return l.jsx(o,{scope:v,itemMap:b,collectionRef:y,children:h})};a.displayName=t;const s=e+"CollectionSlot",u=_.forwardRef((f,v)=>{const{scope:h,children:y}=f,b=i(s,h),w=wa(v,b.collectionRef);return l.jsx(Ca,{ref:w,children:y})});u.displayName=s;const c=e+"CollectionItemSlot",d="data-radix-collection-item",g=_.forwardRef((f,v)=>{const{scope:h,children:y,...b}=f,w=_.useRef(null),C=wa(v,w),E=i(c,h);return _.useEffect(()=>(E.itemMap.set(w,{ref:w,...b}),()=>void E.itemMap.delete(w))),l.jsx(Ca,{[d]:"",ref:C,children:y})});g.displayName=c;function m(f){const v=i(e+"CollectionConsumer",f);return _.useCallback(()=>{const y=v.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((E,x)=>b.indexOf(E.ref.current)-b.indexOf(x.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:a,Slot:u,ItemSlot:g},m,r]}var Eu=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(Nx);if(i){const a=i.props.children,s=o.map(u=>u===i?p.Children.count(a)>1?p.Children.only(null):p.isValidElement(a)?a.props.children:null:u);return l.jsx(Ea,{...r,ref:t,children:p.isValidElement(a)?p.cloneElement(a,void 0,s):null})}return l.jsx(Ea,{...r,ref:t,children:n})});Eu.displayName="Slot";var Ea=p.forwardRef((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const o=Ox(n);return p.cloneElement(n,{...kx(r,n.props),ref:t?ba(t,o):o})}return p.Children.count(n)>1?p.Children.only(null):null});Ea.displayName="SlotClone";var Px=({children:e})=>l.jsx(l.Fragment,{children:e});function Nx(e){return p.isValidElement(e)&&e.type===Px}function kx(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Ox(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Fx=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],_u=Fx.reduce((e,t)=>{const n=p.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Eu:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Dx=p.createContext(void 0);function Tu(e){const t=p.useContext(Dx);return e||t||"ltr"}var _a="rovingFocusGroup.onEntryFocus",Ix={bubbles:!1,cancelable:!0},bo="RovingFocusGroup",[Ta,Au,Mx]=Ax(bo),[$x,Pu]=Jt(bo,[Mx]),[Lx,Rx]=$x(bo),Nu=p.forwardRef((e,t)=>l.jsx(Ta.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Ta.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Vx,{...e,ref:t})})}));Nu.displayName=bo;var Vx=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...g}=e,m=p.useRef(null),f=wa(t,m),v=Tu(i),[h=null,y]=On({prop:a,defaultProp:s,onChange:u}),[b,w]=p.useState(!1),C=Ge(c),E=Au(n),x=p.useRef(!1),[O,I]=p.useState(0);return p.useEffect(()=>{const $=m.current;if($)return $.addEventListener(_a,C),()=>$.removeEventListener(_a,C)},[C]),l.jsx(Lx,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:h,onItemFocus:p.useCallback($=>y($),[y]),onItemShiftTab:p.useCallback(()=>w(!0),[]),onFocusableItemAdd:p.useCallback(()=>I($=>$+1),[]),onFocusableItemRemove:p.useCallback(()=>I($=>$-1),[]),children:l.jsx(_u.div,{tabIndex:b||O===0?-1:0,"data-orientation":r,...g,ref:f,style:{outline:"none",...e.style},onMouseDown:jn(e.onMouseDown,()=>{x.current=!0}),onFocus:jn(e.onFocus,$=>{const H=!x.current;if($.target===$.currentTarget&&H&&!b){const D=new CustomEvent(_a,Ix);if($.currentTarget.dispatchEvent(D),!D.defaultPrevented){const G=E().filter(F=>F.focusable),U=G.find(F=>F.active),Z=G.find(F=>F.id===h),M=[U,Z,...G].filter(Boolean).map(F=>F.ref.current);Fu(M,d)}}x.current=!1}),onBlur:jn(e.onBlur,()=>w(!1))})})}),ku="RovingFocusGroupItem",Ou=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,s=Dn(),u=i||s,c=Rx(ku,n),d=c.currentTabStopId===u,g=Au(n),{onFocusableItemAdd:m,onFocusableItemRemove:f}=c;return p.useEffect(()=>{if(r)return m(),()=>f()},[r,m,f]),l.jsx(Ta.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:l.jsx(_u.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...a,ref:t,onMouseDown:jn(e.onMouseDown,v=>{r?c.onItemFocus(u):v.preventDefault()}),onFocus:jn(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:jn(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){c.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const h=Bx(v,c.orientation,c.dir);if(h!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let b=g().filter(w=>w.focusable).map(w=>w.ref.current);if(h==="last")b.reverse();else if(h==="prev"||h==="next"){h==="prev"&&b.reverse();const w=b.indexOf(v.currentTarget);b=c.loop?Hx(b,w+1):b.slice(w+1)}setTimeout(()=>Fu(b))}})})})});Ou.displayName=ku;var jx={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function zx(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Bx(e,t,n){const r=zx(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return jx[r]}function Fu(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Hx(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ux=Nu,Wx=Ou;function Du(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function qx(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Du(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Du(e[o],null)}}}}function Gx(...e){return p.useCallback(qx(...e),e)}function Kx(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var Iu=e=>{const{present:t,children:n}=e,r=Yx(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),i=Gx(r.ref,Xx(o));return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:i}):null};Iu.displayName="Presence";function Yx(e){const[t,n]=p.useState(),r=p.useRef({}),o=p.useRef(e),i=p.useRef("none"),a=e?"mounted":"unmounted",[s,u]=Kx(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const c=wo(r.current);i.current=s==="mounted"?c:"none"},[s]),ot(()=>{const c=r.current,d=o.current;if(d!==e){const m=i.current,f=wo(c);e?u("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(d&&m!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),ot(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,g=f=>{const h=wo(r.current).includes(f.animationName);if(f.target===t&&h&&(u("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},m=f=>{f.target===t&&(i.current=wo(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:p.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function wo(e){return(e==null?void 0:e.animationName)||"none"}function Xx(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Mu(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Jx(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Mu(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Mu(e[o],null)}}}}var $u=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(Qx);if(i){const a=i.props.children,s=o.map(u=>u===i?p.Children.count(a)>1?p.Children.only(null):p.isValidElement(a)?a.props.children:null:u);return l.jsx(Aa,{...r,ref:t,children:p.isValidElement(a)?p.cloneElement(a,void 0,s):null})}return l.jsx(Aa,{...r,ref:t,children:n})});$u.displayName="Slot";var Aa=p.forwardRef((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const o=tb(n);return p.cloneElement(n,{...eb(r,n.props),ref:t?Jx(t,o):o})}return p.Children.count(n)>1?p.Children.only(null):null});Aa.displayName="SlotClone";var Zx=({children:e})=>l.jsx(l.Fragment,{children:e});function Qx(e){return p.isValidElement(e)&&e.type===Zx}function eb(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function tb(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var nb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Co=nb.reduce((e,t)=>{const n=p.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?$u:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Pa="Tabs",[rb,h_]=Jt(Pa,[Pu]),Lu=Pu(),[ob,Na]=rb(Pa),Ru=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:a="horizontal",dir:s,activationMode:u="automatic",...c}=e,d=Tu(s),[g,m]=On({prop:r,onChange:o,defaultProp:i});return l.jsx(ob,{scope:n,baseId:Dn(),value:g,onValueChange:m,orientation:a,dir:d,activationMode:u,children:l.jsx(Co.div,{dir:d,"data-orientation":a,...c,ref:t})})});Ru.displayName=Pa;var Vu="TabsList",ju=p.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=Na(Vu,n),a=Lu(n);return l.jsx(Ux,{asChild:!0,...a,orientation:i.orientation,dir:i.dir,loop:r,children:l.jsx(Co.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});ju.displayName=Vu;var zu="TabsTrigger",Bu=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,a=Na(zu,n),s=Lu(n),u=Wu(a.baseId,r),c=qu(a.baseId,r),d=r===a.value;return l.jsx(Wx,{asChild:!0,...s,focusable:!o,active:d,children:l.jsx(Co.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":c,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u,...i,ref:t,onMouseDown:xa(e.onMouseDown,g=>{!o&&g.button===0&&g.ctrlKey===!1?a.onValueChange(r):g.preventDefault()}),onKeyDown:xa(e.onKeyDown,g=>{[" ","Enter"].includes(g.key)&&a.onValueChange(r)}),onFocus:xa(e.onFocus,()=>{const g=a.activationMode!=="manual";!d&&!o&&g&&a.onValueChange(r)})})})});Bu.displayName=zu;var Hu="TabsContent",Uu=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...a}=e,s=Na(Hu,n),u=Wu(s.baseId,r),c=qu(s.baseId,r),d=r===s.value,g=p.useRef(d);return p.useEffect(()=>{const m=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(m)},[]),l.jsx(Iu,{present:o||d,children:({present:m})=>l.jsx(Co.div,{"data-state":d?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":u,hidden:!m,id:c,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:g.current?"0s":void 0},children:m&&i})})});Uu.displayName=Hu;function Wu(e,t){return`${e}-trigger-${t}`}function qu(e,t){return`${e}-content-${t}`}var ib=Ru,Gu=ju,Ku=Bu,Yu=Uu;const ab=ib,Xu=p.forwardRef(({className:e,...t},n)=>l.jsx(Gu,{ref:n,className:he("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Xu.displayName=Gu.displayName;const So=p.forwardRef(({className:e,...t},n)=>l.jsx(Ku,{ref:n,className:he("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-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));So.displayName=Ku.displayName;const Eo=p.forwardRef(({className:e,...t},n)=>l.jsx(Yu,{ref:n,className:he("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Eo.displayName=Yu.displayName;const ur=p.forwardRef(({className:e,...t},n)=>l.jsx("textarea",{className:he("flex min-h-[60px] 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}));ur.displayName="Textarea";function sb(e,t=[]){let n=[];function r(i,a){const s=p.createContext(a),u=n.length;n=[...n,a];function c(g){const{scope:m,children:f,...v}=g,h=(m==null?void 0:m[e][u])||s,y=p.useMemo(()=>v,Object.values(v));return l.jsx(h.Provider,{value:y,children:f})}function d(g,m){const f=(m==null?void 0:m[e][u])||s,v=p.useContext(f);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,d]}const o=()=>{const i=n.map(a=>p.createContext(a));return function(s){const u=(s==null?void 0:s[e])||i;return p.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return o.scopeName=e,[r,lb(o,...t)]}function lb(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:u,scopeName:c})=>{const g=u(i)[`__scope${c}`];return{...s,...g}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var ka=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(ub);if(i){const a=i.props.children,s=o.map(u=>u===i?p.Children.count(a)>1?p.Children.only(null):p.isValidElement(a)?a.props.children:null:u);return l.jsx(Oa,{...r,ref:t,children:p.isValidElement(a)?p.cloneElement(a,void 0,s):null})}return l.jsx(Oa,{...r,ref:t,children:n})});ka.displayName="Slot";var Oa=p.forwardRef((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const o=fb(n);return p.cloneElement(n,{...db(r,n.props),ref:t?eo(t,o):o})}return p.Children.count(n)>1?p.Children.only(null):null});Oa.displayName="SlotClone";var cb=({children:e})=>l.jsx(l.Fragment,{children:e});function ub(e){return p.isValidElement(e)&&e.type===cb}function db(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function fb(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function pb(e){const t=e+"CollectionProvider",[n,r]=sb(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:v,children:h}=f,y=_.useRef(null),b=_.useRef(new Map).current;return l.jsx(o,{scope:v,itemMap:b,collectionRef:y,children:h})};a.displayName=t;const s=e+"CollectionSlot",u=_.forwardRef((f,v)=>{const{scope:h,children:y}=f,b=i(s,h),w=ct(v,b.collectionRef);return l.jsx(ka,{ref:w,children:y})});u.displayName=s;const c=e+"CollectionItemSlot",d="data-radix-collection-item",g=_.forwardRef((f,v)=>{const{scope:h,children:y,...b}=f,w=_.useRef(null),C=ct(v,w),E=i(c,h);return _.useEffect(()=>(E.itemMap.set(w,{ref:w,...b}),()=>void E.itemMap.delete(w))),l.jsx(ka,{[d]:"",ref:C,children:y})});g.displayName=c;function m(f){const v=i(e+"CollectionConsumer",f);return _.useCallback(()=>{const y=v.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((E,x)=>b.indexOf(E.ref.current)-b.indexOf(x.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:a,Slot:u,ItemSlot:g},m,r]}var gb="VisuallyHidden",Fa=p.forwardRef((e,t)=>l.jsx(Ve.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Fa.displayName=gb;var Da="ToastProvider",[Ia,mb,hb]=pb("Toast"),[Ju,v_]=Jt("Toast",[hb]),[vb,_o]=Ju(Da),Zu=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,u]=p.useState(null),[c,d]=p.useState(0),g=p.useRef(!1),m=p.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Da}\`. Expected non-empty \`string\`.`),l.jsx(Ia.Provider,{scope:t,children:l.jsx(vb,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:u,onToastAdd:p.useCallback(()=>d(f=>f+1),[]),onToastRemove:p.useCallback(()=>d(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:g,isClosePausedRef:m,children:a})})};Zu.displayName=Da;var Qu="ToastViewport",yb=["F8"],Ma="toast.viewportPause",$a="toast.viewportResume",ed=p.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=yb,label:o="Notifications ({hotkey})",...i}=e,a=_o(Qu,n),s=mb(n),u=p.useRef(null),c=p.useRef(null),d=p.useRef(null),g=p.useRef(null),m=ct(t,g,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=a.toastCount>0;p.useEffect(()=>{const y=b=>{var C;r.length!==0&&r.every(E=>b[E]||b.code===E)&&((C=g.current)==null||C.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),p.useEffect(()=>{const y=u.current,b=g.current;if(v&&y&&b){const w=()=>{if(!a.isClosePausedRef.current){const O=new CustomEvent(Ma);b.dispatchEvent(O),a.isClosePausedRef.current=!0}},C=()=>{if(a.isClosePausedRef.current){const O=new CustomEvent($a);b.dispatchEvent(O),a.isClosePausedRef.current=!1}},E=O=>{!y.contains(O.relatedTarget)&&C()},x=()=>{y.contains(document.activeElement)||C()};return y.addEventListener("focusin",w),y.addEventListener("focusout",E),y.addEventListener("pointermove",w),y.addEventListener("pointerleave",x),window.addEventListener("blur",w),window.addEventListener("focus",C),()=>{y.removeEventListener("focusin",w),y.removeEventListener("focusout",E),y.removeEventListener("pointermove",w),y.removeEventListener("pointerleave",x),window.removeEventListener("blur",w),window.removeEventListener("focus",C)}}},[v,a.isClosePausedRef]);const h=p.useCallback(({tabbingDirection:y})=>{const w=s().map(C=>{const E=C.ref.current,x=[E,...Ob(E)];return y==="forwards"?x:x.reverse()});return(y==="forwards"?w.reverse():w).flat()},[s]);return p.useEffect(()=>{const y=g.current;if(y){const b=w=>{var x,O,I;const C=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!C){const $=document.activeElement,H=w.shiftKey;if(w.target===y&&H){(x=c.current)==null||x.focus();return}const U=h({tabbingDirection:H?"backwards":"forwards"}),Z=U.findIndex(k=>k===$);Va(U.slice(Z+1))?w.preventDefault():H?(O=c.current)==null||O.focus():(I=d.current)==null||I.focus()}};return y.addEventListener("keydown",b),()=>y.removeEventListener("keydown",b)}},[s,h]),l.jsxs(sy,{ref:u,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&l.jsx(La,{ref:c,onFocusFromOutsideViewport:()=>{const y=h({tabbingDirection:"forwards"});Va(y)}}),l.jsx(Ia.Slot,{scope:n,children:l.jsx(Ve.ol,{tabIndex:-1,...i,ref:m})}),v&&l.jsx(La,{ref:d,onFocusFromOutsideViewport:()=>{const y=h({tabbingDirection:"backwards"});Va(y)}})]})});ed.displayName=Qu;var td="ToastFocusProxy",La=p.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=_o(td,n);return l.jsx(Fa,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var c;const s=a.relatedTarget;!((c=i.viewport)!=null&&c.contains(s))&&r()}})});La.displayName=td;var To="Toast",xb="toast.swipeStart",bb="toast.swipeMove",wb="toast.swipeCancel",Cb="toast.swipeEnd",nd=p.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,u]=On({prop:r,defaultProp:o,onChange:i});return l.jsx(Fn,{present:n||s,children:l.jsx(_b,{open:s,...a,ref:t,onClose:()=>u(!1),onPause:Ge(e.onPause),onResume:Ge(e.onResume),onSwipeStart:Le(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Le(e.onSwipeMove,c=>{const{x:d,y:g}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${g}px`)}),onSwipeCancel:Le(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Le(e.onSwipeEnd,c=>{const{x:d,y:g}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${g}px`),u(!1)})})})});nd.displayName=To;var[Sb,Eb]=Ju(To,{onClose(){}}),_b=p.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:u,onResume:c,onSwipeStart:d,onSwipeMove:g,onSwipeCancel:m,onSwipeEnd:f,...v}=e,h=_o(To,n),[y,b]=p.useState(null),w=ct(t,k=>b(k)),C=p.useRef(null),E=p.useRef(null),x=o||h.duration,O=p.useRef(0),I=p.useRef(x),$=p.useRef(0),{onToastAdd:H,onToastRemove:D}=h,G=Ge(()=>{var M;(y==null?void 0:y.contains(document.activeElement))&&((M=h.viewport)==null||M.focus()),a()}),U=p.useCallback(k=>{!k||k===1/0||(window.clearTimeout($.current),O.current=new Date().getTime(),$.current=window.setTimeout(G,k))},[G]);p.useEffect(()=>{const k=h.viewport;if(k){const M=()=>{U(I.current),c==null||c()},F=()=>{const q=new Date().getTime()-O.current;I.current=I.current-q,window.clearTimeout($.current),u==null||u()};return k.addEventListener(Ma,F),k.addEventListener($a,M),()=>{k.removeEventListener(Ma,F),k.removeEventListener($a,M)}}},[h.viewport,x,u,c,U]),p.useEffect(()=>{i&&!h.isClosePausedRef.current&&U(x)},[i,x,h.isClosePausedRef,U]),p.useEffect(()=>(H(),()=>D()),[H,D]);const Z=p.useMemo(()=>y?cd(y):null,[y]);return h.viewport?l.jsxs(l.Fragment,{children:[Z&&l.jsx(Tb,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:Z}),l.jsx(Sb,{scope:n,onClose:G,children:Ir.createPortal(l.jsx(Ia.ItemSlot,{scope:n,children:l.jsx(ay,{asChild:!0,onEscapeKeyDown:Le(s,()=>{h.isFocusedToastEscapeKeyDownRef.current||G(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(Ve.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":h.swipeDirection,...v,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Le(e.onKeyDown,k=>{k.key==="Escape"&&(s==null||s(k.nativeEvent),k.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,G()))}),onPointerDown:Le(e.onPointerDown,k=>{k.button===0&&(C.current={x:k.clientX,y:k.clientY})}),onPointerMove:Le(e.onPointerMove,k=>{if(!C.current)return;const M=k.clientX-C.current.x,F=k.clientY-C.current.y,q=!!E.current,P=["left","right"].includes(h.swipeDirection),j=["left","up"].includes(h.swipeDirection)?Math.min:Math.max,A=P?j(0,M):0,B=P?0:j(0,F),Q=k.pointerType==="touch"?10:2,re={x:A,y:B},ee={originalEvent:k,delta:re};q?(E.current=re,Ao(bb,g,ee,{discrete:!1})):ud(re,h.swipeDirection,Q)?(E.current=re,Ao(xb,d,ee,{discrete:!1}),k.target.setPointerCapture(k.pointerId)):(Math.abs(M)>Q||Math.abs(F)>Q)&&(C.current=null)}),onPointerUp:Le(e.onPointerUp,k=>{const M=E.current,F=k.target;if(F.hasPointerCapture(k.pointerId)&&F.releasePointerCapture(k.pointerId),E.current=null,C.current=null,M){const q=k.currentTarget,P={originalEvent:k,delta:M};ud(M,h.swipeDirection,h.swipeThreshold)?Ao(Cb,f,P,{discrete:!0}):Ao(wb,m,P,{discrete:!0}),q.addEventListener("click",j=>j.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),Tb=e=>{const{__scopeToast:t,children:n,...r}=e,o=_o(To,t),[i,a]=p.useState(!1),[s,u]=p.useState(!1);return Nb(()=>a(!0)),p.useEffect(()=>{const c=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:l.jsx(sa,{asChild:!0,children:l.jsx(Fa,{...r,children:i&&l.jsxs(l.Fragment,{children:[o.label," ",n]})})})},Ab="ToastTitle",rd=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return l.jsx(Ve.div,{...r,ref:t})});rd.displayName=Ab;var Pb="ToastDescription",od=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return l.jsx(Ve.div,{...r,ref:t})});od.displayName=Pb;var id="ToastAction",ad=p.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?l.jsx(ld,{altText:n,asChild:!0,children:l.jsx(Ra,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${id}\`. Expected non-empty \`string\`.`),null)});ad.displayName=id;var sd="ToastClose",Ra=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=Eb(sd,n);return l.jsx(ld,{asChild:!0,children:l.jsx(Ve.button,{type:"button",...r,ref:t,onClick:Le(e.onClick,o.onClose)})})});Ra.displayName=sd;var ld=p.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return l.jsx(Ve.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function cd(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),kb(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...cd(r))}}),t}function Ao(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?yc(o,i):o.dispatchEvent(i)}var ud=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function Nb(e=()=>{}){const t=Ge(e);ot(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function kb(e){return e.nodeType===e.ELEMENT_NODE}function Ob(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Va(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Fb=Zu,dd=ed,fd=nd,pd=rd,gd=od,md=ad,hd=Ra;const Db=Fb,vd=p.forwardRef(({className:e,...t},n)=>l.jsx(dd,{ref:n,className:he("s3-explr-ui-toast-viewport fixed top-0 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px] z-[10000]",e),...t}));vd.displayName=dd.displayName;const Ib=Qi("s3-explr-ui-toast group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"s3-explr-ui-toast-default border bg-background text-foreground",destructive:"s3-explr-ui-toast-destructive destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),yd=p.forwardRef(({className:e,variant:t,...n},r)=>l.jsx(fd,{ref:r,className:he(Ib({variant:t}),e),...n}));yd.displayName=fd.displayName;const Mb=p.forwardRef(({className:e,...t},n)=>l.jsx(md,{ref:n,className:he("s3-explr-ui-toast-action inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));Mb.displayName=md.displayName;const xd=p.forwardRef(({className:e,...t},n)=>l.jsx(hd,{ref:n,className:he("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity duration-200 ease-in-out hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600 font-bold",e),"toast-close":"",...t,children:l.jsx(Hi,{className:"s3-explr-ui-toast-close-icon h-4 w-4"})}));xd.displayName=hd.displayName;const bd=p.forwardRef(({className:e,...t},n)=>l.jsx(pd,{ref:n,className:he("s3-explr-ui-toast-title text-sm font-semibold [&+div]:text-xs",e),...t}));bd.displayName=pd.displayName;const wd=p.forwardRef(({className:e,...t},n)=>l.jsx(gd,{ref:n,className:he("text-sm opacity-90 font-bold",e),...t}));wd.displayName=gd.displayName;const $b=1,Lb=1e6;let ja=0;function Rb(){return ja=(ja+1)%Number.MAX_SAFE_INTEGER,ja.toString()}const za=new Map,Cd=e=>{if(za.has(e))return;const t=setTimeout(()=>{za.delete(e),dr({type:"REMOVE_TOAST",toastId:e})},Lb);za.set(e,t)},Vb=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,$b)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Cd(n):e.toasts.forEach(r=>{Cd(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Po=[];let No={toasts:[]};function dr(e){No=Vb(No,e),Po.forEach(t=>{t(No)})}function jb({...e}){const t=Rb(),n=o=>dr({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>dr({type:"DISMISS_TOAST",toastId:t});return dr({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function ko(){const[e,t]=p.useState(No);return p.useEffect(()=>(Po.push(t),()=>{const n=Po.indexOf(t);n>-1&&Po.splice(n,1)}),[e]),{...e,toast:jb,dismiss:n=>dr({type:"DISMISS_TOAST",toastId:n})}}function Sd(){const{toasts:e}=ko();return l.jsxs(Db,{children:[e.map(function({id:t,title:n,description:r,action:o,...i}){return l.jsxs(yd,{...i,className:`s3-explr-ui-toast ${i.className||""}`,children:[l.jsxs("div",{className:"s3-explr-ui-toast-content grid gap-1",children:[n&&l.jsx(bd,{className:"s3-explr-ui-toast-title",children:n}),r&&l.jsx(wd,{className:"s3-explr-ui-toast-description",children:r})]}),o&&l.jsx("div",{className:"s3-explr-ui-toast-action",children:o}),l.jsx(xd,{className:"s3-explr-ui-toast-close"})]},t)}),l.jsx(vd,{className:"s3-explr-ui-toast-viewport"})]})}function zt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Ed(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function zb(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Ed(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Ed(e[o],null)}}}}function fr(...e){return p.useCallback(zb(...e),e)}var Bb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],pr=Bb.reduce((e,t)=>{const n=p.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Pn:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Hb(e,t){e&&Ir.flushSync(()=>e.dispatchEvent(t))}var Ub="DismissableLayer",Ba="dismissableLayer.update",Wb="dismissableLayer.pointerDownOutside",qb="dismissableLayer.focusOutside",_d,Td=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ad=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...u}=e,c=p.useContext(Td),[d,g]=p.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=p.useState({}),v=fr(t,I=>g(I)),h=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=h.indexOf(y),w=d?h.indexOf(d):-1,C=c.layersWithOutsidePointerEventsDisabled.size>0,E=w>=b,x=Yb(I=>{const $=I.target,H=[...c.branches].some(D=>D.contains($));!E||H||(o==null||o(I),a==null||a(I),I.defaultPrevented||s==null||s())},m),O=Xb(I=>{const $=I.target;[...c.branches].some(D=>D.contains($))||(i==null||i(I),a==null||a(I),I.defaultPrevented||s==null||s())},m);return Ec(I=>{w===c.layers.size-1&&(r==null||r(I),!I.defaultPrevented&&s&&(I.preventDefault(),s()))},m),p.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(_d=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),Pd(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=_d)}},[d,m,n,c]),p.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),Pd())},[d,c]),p.useEffect(()=>{const I=()=>f({});return document.addEventListener(Ba,I),()=>document.removeEventListener(Ba,I)},[]),l.jsx(pr.div,{...u,ref:v,style:{pointerEvents:C?E?"auto":"none":void 0,...e.style},onFocusCapture:zt(e.onFocusCapture,O.onFocusCapture),onBlurCapture:zt(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:zt(e.onPointerDownCapture,x.onPointerDownCapture)})});Ad.displayName=Ub;var Gb="DismissableLayerBranch",Kb=p.forwardRef((e,t)=>{const n=p.useContext(Td),r=p.useRef(null),o=fr(t,r);return p.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),l.jsx(pr.div,{...e,ref:o})});Kb.displayName=Gb;function Yb(e,t=globalThis==null?void 0:globalThis.document){const n=Ge(e),r=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let u=function(){Nd(Wb,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Xb(e,t=globalThis==null?void 0:globalThis.document){const n=Ge(e),r=p.useRef(!1);return p.useEffect(()=>{const o=i=>{i.target&&!r.current&&Nd(qb,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Pd(){const e=new CustomEvent(Ba);document.dispatchEvent(e)}function Nd(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Hb(o,i):o.dispatchEvent(i)}const Jb=["top","right","bottom","left"],tn=Math.min,it=Math.max,Oo=Math.round,Fo=Math.floor,At=e=>({x:e,y:e}),Zb={left:"right",right:"left",bottom:"top",top:"bottom"},Qb={start:"end",end:"start"};function Ha(e,t,n){return it(e,tn(t,n))}function Bt(e,t){return typeof e=="function"?e(t):e}function Ht(e){return e.split("-")[0]}function zn(e){return e.split("-")[1]}function Ua(e){return e==="x"?"y":"x"}function Wa(e){return e==="y"?"height":"width"}function nn(e){return["top","bottom"].includes(Ht(e))?"y":"x"}function qa(e){return Ua(nn(e))}function ew(e,t,n){n===void 0&&(n=!1);const r=zn(e),o=qa(e),i=Wa(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Do(a)),[a,Do(a)]}function tw(e){const t=Do(e);return[Ga(e),t,Ga(t)]}function Ga(e){return e.replace(/start|end/g,t=>Qb[t])}function nw(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function rw(e,t,n,r){const o=zn(e);let i=nw(Ht(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Ga)))),i}function Do(e){return e.replace(/left|right|bottom|top/g,t=>Zb[t])}function ow(e){return{top:0,right:0,bottom:0,left:0,...e}}function kd(e){return typeof e!="number"?ow(e):{top:e,right:e,bottom:e,left:e}}function Io(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Od(e,t,n){let{reference:r,floating:o}=e;const i=nn(t),a=qa(t),s=Wa(a),u=Ht(t),c=i==="y",d=r.x+r.width/2-o.width/2,g=r.y+r.height/2-o.height/2,m=r[s]/2-o[s]/2;let f;switch(u){case"top":f={x:d,y:r.y-o.height};break;case"bottom":f={x:d,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:g};break;case"left":f={x:r.x-o.width,y:g};break;default:f={x:r.x,y:r.y}}switch(zn(t)){case"start":f[a]-=m*(n&&c?-1:1);break;case"end":f[a]+=m*(n&&c?-1:1);break}return f}const iw=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:g}=Od(c,r,u),m=r,f={},v=0;for(let h=0;h<s.length;h++){const{name:y,fn:b}=s[h],{x:w,y:C,data:E,reset:x}=await b({x:d,y:g,initialPlacement:r,placement:m,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});d=w??d,g=C??g,f={...f,[y]:{...f[y],...E}},x&&v<=50&&(v++,typeof x=="object"&&(x.placement&&(m=x.placement),x.rects&&(c=x.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:d,y:g}=Od(c,m,u)),h=-1)}return{x:d,y:g,placement:m,strategy:o,middlewareData:f}};async function gr(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:g="floating",altBoundary:m=!1,padding:f=0}=Bt(t,e),v=kd(f),y=s[m?g==="floating"?"reference":"floating":g],b=Io(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:u})),w=g==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),E=await(i.isElement==null?void 0:i.isElement(C))?await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1}:{x:1,y:1},x=Io(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:C,strategy:u}):w);return{top:(b.top-x.top+v.top)/E.y,bottom:(x.bottom-b.bottom+v.bottom)/E.y,left:(b.left-x.left+v.left)/E.x,right:(x.right-b.right+v.right)/E.x}}const aw=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:u}=t,{element:c,padding:d=0}=Bt(e,t)||{};if(c==null)return{};const g=kd(d),m={x:n,y:r},f=qa(o),v=Wa(f),h=await a.getDimensions(c),y=f==="y",b=y?"top":"left",w=y?"bottom":"right",C=y?"clientHeight":"clientWidth",E=i.reference[v]+i.reference[f]-m[f]-i.floating[v],x=m[f]-i.reference[f],O=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let I=O?O[C]:0;(!I||!await(a.isElement==null?void 0:a.isElement(O)))&&(I=s.floating[C]||i.floating[v]);const $=E/2-x/2,H=I/2-h[v]/2-1,D=tn(g[b],H),G=tn(g[w],H),U=D,Z=I-h[v]-G,k=I/2-h[v]/2+$,M=Ha(U,k,Z),F=!u.arrow&&zn(o)!=null&&k!==M&&i.reference[v]/2-(k<U?D:G)-h[v]/2<0,q=F?k<U?k-U:k-Z:0;return{[f]:m[f]+q,data:{[f]:M,centerOffset:k-M-q,...F&&{alignmentOffset:q}},reset:F}}}),sw=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:u,elements:c}=t,{mainAxis:d=!0,crossAxis:g=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:h=!0,...y}=Bt(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const b=Ht(o),w=nn(s),C=Ht(s)===s,E=await(u.isRTL==null?void 0:u.isRTL(c.floating)),x=m||(C||!h?[Do(s)]:tw(s)),O=v!=="none";!m&&O&&x.push(...rw(s,h,v,E));const I=[s,...x],$=await gr(t,y),H=[];let D=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&H.push($[b]),g){const k=ew(o,a,E);H.push($[k[0]],$[k[1]])}if(D=[...D,{placement:o,overflows:H}],!H.every(k=>k<=0)){var G,U;const k=(((G=i.flip)==null?void 0:G.index)||0)+1,M=I[k];if(M)return{data:{index:k,overflows:D},reset:{placement:M}};let F=(U=D.filter(q=>q.overflows[0]<=0).sort((q,P)=>q.overflows[1]-P.overflows[1])[0])==null?void 0:U.placement;if(!F)switch(f){case"bestFit":{var Z;const q=(Z=D.filter(P=>{if(O){const j=nn(P.placement);return j===w||j==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(j=>j>0).reduce((j,A)=>j+A,0)]).sort((P,j)=>P[1]-j[1])[0])==null?void 0:Z[0];q&&(F=q);break}case"initialPlacement":F=s;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function Fd(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Dd(e){return Jb.some(t=>e[t]>=0)}const lw=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Bt(e,t);switch(r){case"referenceHidden":{const i=await gr(t,{...o,elementContext:"reference"}),a=Fd(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Dd(a)}}}case"escaped":{const i=await gr(t,{...o,altBoundary:!0}),a=Fd(i,n.floating);return{data:{escapedOffsets:a,escaped:Dd(a)}}}default:return{}}}}};async function cw(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Ht(n),s=zn(n),u=nn(n)==="y",c=["left","top"].includes(a)?-1:1,d=i&&u?-1:1,g=Bt(t,e);let{mainAxis:m,crossAxis:f,alignmentAxis:v}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return s&&typeof v=="number"&&(f=s==="end"?v*-1:v),u?{x:f*d,y:m*c}:{x:m*c,y:f*d}}const uw=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,u=await cw(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:a}}}}},dw=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x:b,y:w}=y;return{x:b,y:w}}},...u}=Bt(e,t),c={x:n,y:r},d=await gr(t,u),g=nn(Ht(o)),m=Ua(g);let f=c[m],v=c[g];if(i){const y=m==="y"?"top":"left",b=m==="y"?"bottom":"right",w=f+d[y],C=f-d[b];f=Ha(w,f,C)}if(a){const y=g==="y"?"top":"left",b=g==="y"?"bottom":"right",w=v+d[y],C=v-d[b];v=Ha(w,v,C)}const h=s.fn({...t,[m]:f,[g]:v});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[m]:i,[g]:a}}}}}},fw=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:u=!0,crossAxis:c=!0}=Bt(e,t),d={x:n,y:r},g=nn(o),m=Ua(g);let f=d[m],v=d[g];const h=Bt(s,t),y=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const C=m==="y"?"height":"width",E=i.reference[m]-i.floating[C]+y.mainAxis,x=i.reference[m]+i.reference[C]-y.mainAxis;f<E?f=E:f>x&&(f=x)}if(c){var b,w;const C=m==="y"?"width":"height",E=["top","left"].includes(Ht(o)),x=i.reference[g]-i.floating[C]+(E&&((b=a.offset)==null?void 0:b[g])||0)+(E?0:y.crossAxis),O=i.reference[g]+i.reference[C]+(E?0:((w=a.offset)==null?void 0:w[g])||0)-(E?y.crossAxis:0);v<x?v=x:v>O&&(v=O)}return{[m]:f,[g]:v}}}},pw=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:u=()=>{},...c}=Bt(e,t),d=await gr(t,c),g=Ht(o),m=zn(o),f=nn(o)==="y",{width:v,height:h}=i.floating;let y,b;g==="top"||g==="bottom"?(y=g,b=m===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(b=g,y=m==="end"?"top":"bottom");const w=h-d.top-d.bottom,C=v-d.left-d.right,E=tn(h-d[y],w),x=tn(v-d[b],C),O=!t.middlewareData.shift;let I=E,$=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&($=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(I=w),O&&!m){const D=it(d.left,0),G=it(d.right,0),U=it(d.top,0),Z=it(d.bottom,0);f?$=v-2*(D!==0||G!==0?D+G:it(d.left,d.right)):I=h-2*(U!==0||Z!==0?U+Z:it(d.top,d.bottom))}await u({...t,availableWidth:$,availableHeight:I});const H=await a.getDimensions(s.floating);return v!==H.width||h!==H.height?{reset:{rects:!0}}:{}}}};function Mo(){return typeof window<"u"}function Bn(e){return Id(e)?(e.nodeName||"").toLowerCase():"#document"}function at(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pt(e){var t;return(t=(Id(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Id(e){return Mo()?e instanceof Node||e instanceof at(e).Node:!1}function vt(e){return Mo()?e instanceof Element||e instanceof at(e).Element:!1}function Nt(e){return Mo()?e instanceof HTMLElement||e instanceof at(e).HTMLElement:!1}function Md(e){return!Mo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof at(e).ShadowRoot}function mr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=yt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function gw(e){return["table","td","th"].includes(Bn(e))}function $o(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ka(e){const t=Ya(),n=vt(e)?yt(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function mw(e){let t=rn(e);for(;Nt(t)&&!Hn(t);){if(Ka(t))return t;if($o(t))return null;t=rn(t)}return null}function Ya(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Hn(e){return["html","body","#document"].includes(Bn(e))}function yt(e){return at(e).getComputedStyle(e)}function Lo(e){return vt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function rn(e){if(Bn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Md(e)&&e.host||Pt(e);return Md(t)?t.host:t}function $d(e){const t=rn(e);return Hn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Nt(t)&&mr(t)?t:$d(t)}function hr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=$d(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=at(o);if(i){const s=Xa(a);return t.concat(a,a.visualViewport||[],mr(o)?o:[],s&&n?hr(s):[])}return t.concat(o,hr(o,[],n))}function Xa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ld(e){const t=yt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Nt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Oo(n)!==i||Oo(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Ja(e){return vt(e)?e:e.contextElement}function Un(e){const t=Ja(e);if(!Nt(t))return At(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Ld(t);let a=(i?Oo(n.width):n.width)/r,s=(i?Oo(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const hw=At(0);function Rd(e){const t=at(e);return!Ya()||!t.visualViewport?hw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vw(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==at(e)?!1:t}function yn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ja(e);let a=At(1);t&&(r?vt(r)&&(a=Un(r)):a=Un(e));const s=vw(i,n,r)?Rd(i):At(0);let u=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,d=o.width/a.x,g=o.height/a.y;if(i){const m=at(i),f=r&&vt(r)?at(r):r;let v=m,h=Xa(v);for(;h&&r&&f!==v;){const y=Un(h),b=h.getBoundingClientRect(),w=yt(h),C=b.left+(h.clientLeft+parseFloat(w.paddingLeft))*y.x,E=b.top+(h.clientTop+parseFloat(w.paddingTop))*y.y;u*=y.x,c*=y.y,d*=y.x,g*=y.y,u+=C,c+=E,v=at(h),h=Xa(v)}}return Io({width:d,height:g,x:u,y:c})}function Za(e,t){const n=Lo(e).scrollLeft;return t?t.left+n:yn(Pt(e)).left+n}function Vd(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Za(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function yw(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Pt(r),s=t?$o(t.floating):!1;if(r===a||s&&i)return n;let u={scrollLeft:0,scrollTop:0},c=At(1);const d=At(0),g=Nt(r);if((g||!g&&!i)&&((Bn(r)!=="body"||mr(a))&&(u=Lo(r)),Nt(r))){const f=yn(r);c=Un(r),d.x=f.x+r.clientLeft,d.y=f.y+r.clientTop}const m=a&&!g&&!i?Vd(a,u,!0):At(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+d.x+m.x,y:n.y*c.y-u.scrollTop*c.y+d.y+m.y}}function xw(e){return Array.from(e.getClientRects())}function bw(e){const t=Pt(e),n=Lo(e),r=e.ownerDocument.body,o=it(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=it(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Za(e);const s=-n.scrollTop;return yt(r).direction==="rtl"&&(a+=it(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function ww(e,t){const n=at(e),r=Pt(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,u=0;if(o){i=o.width,a=o.height;const c=Ya();(!c||c&&t==="fixed")&&(s=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:s,y:u}}function Cw(e,t){const n=yn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Nt(e)?Un(e):At(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,u=o*i.x,c=r*i.y;return{width:a,height:s,x:u,y:c}}function jd(e,t,n){let r;if(t==="viewport")r=ww(e,n);else if(t==="document")r=bw(Pt(e));else if(vt(t))r=Cw(t,n);else{const o=Rd(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Io(r)}function zd(e,t){const n=rn(e);return n===t||!vt(n)||Hn(n)?!1:yt(n).position==="fixed"||zd(n,t)}function Sw(e,t){const n=t.get(e);if(n)return n;let r=hr(e,[],!1).filter(s=>vt(s)&&Bn(s)!=="body"),o=null;const i=yt(e).position==="fixed";let a=i?rn(e):e;for(;vt(a)&&!Hn(a);){const s=yt(a),u=Ka(a);!u&&s.position==="fixed"&&(o=null),(i?!u&&!o:!u&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||mr(a)&&!u&&zd(e,a))?r=r.filter(d=>d!==a):o=s,a=rn(a)}return t.set(e,r),r}function Ew(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?$o(t)?[]:Sw(t,this._c):[].concat(n),r],s=a[0],u=a.reduce((c,d)=>{const g=jd(t,d,o);return c.top=it(g.top,c.top),c.right=tn(g.right,c.right),c.bottom=tn(g.bottom,c.bottom),c.left=it(g.left,c.left),c},jd(t,s,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function _w(e){const{width:t,height:n}=Ld(e);return{width:t,height:n}}function Tw(e,t,n){const r=Nt(t),o=Pt(t),i=n==="fixed",a=yn(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const u=At(0);if(r||!r&&!i)if((Bn(t)!=="body"||mr(o))&&(s=Lo(t)),r){const m=yn(t,!0,i,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else o&&(u.x=Za(o));const c=o&&!r&&!i?Vd(o,s):At(0),d=a.left+s.scrollLeft-u.x-c.x,g=a.top+s.scrollTop-u.y-c.y;return{x:d,y:g,width:a.width,height:a.height}}function Qa(e){return yt(e).position==="static"}function Bd(e,t){if(!Nt(e)||yt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Pt(e)===n&&(n=n.ownerDocument.body),n}function Hd(e,t){const n=at(e);if($o(e))return n;if(!Nt(e)){let o=rn(e);for(;o&&!Hn(o);){if(vt(o)&&!Qa(o))return o;o=rn(o)}return n}let r=Bd(e,t);for(;r&&gw(r)&&Qa(r);)r=Bd(r,t);return r&&Hn(r)&&Qa(r)&&!Ka(r)?n:r||mw(e)||n}const Aw=async function(e){const t=this.getOffsetParent||Hd,n=this.getDimensions,r=await n(e.floating);return{reference:Tw(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Pw(e){return yt(e).direction==="rtl"}const Nw={convertOffsetParentRelativeRectToViewportRelativeRect:yw,getDocumentElement:Pt,getClippingRect:Ew,getOffsetParent:Hd,getElementRects:Aw,getClientRects:xw,getDimensions:_w,getScale:Un,isElement:vt,isRTL:Pw};function kw(e,t){let n=null,r;const o=Pt(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),i();const{left:c,top:d,width:g,height:m}=e.getBoundingClientRect();if(s||t(),!g||!m)return;const f=Fo(d),v=Fo(o.clientWidth-(c+g)),h=Fo(o.clientHeight-(d+m)),y=Fo(c),w={rootMargin:-f+"px "+-v+"px "+-h+"px "+-y+"px",threshold:it(0,tn(1,u))||1};let C=!0;function E(x){const O=x[0].intersectionRatio;if(O!==u){if(!C)return a();O?a(!1,O):r=setTimeout(()=>{a(!1,1e-7)},1e3)}C=!1}try{n=new IntersectionObserver(E,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,w)}n.observe(e)}return a(!0),i}function Ow(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=Ja(e),d=o||i?[...c?hr(c):[],...hr(t)]:[];d.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),i&&b.addEventListener("resize",n)});const g=c&&s?kw(c,n):null;let m=-1,f=null;a&&(f=new ResizeObserver(b=>{let[w]=b;w&&w.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var C;(C=f)==null||C.observe(t)})),n()}),c&&!u&&f.observe(c),f.observe(t));let v,h=u?yn(e):null;u&&y();function y(){const b=yn(e);h&&(b.x!==h.x||b.y!==h.y||b.width!==h.width||b.height!==h.height)&&n(),h=b,v=requestAnimationFrame(y)}return n(),()=>{var b;d.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),g==null||g(),(b=f)==null||b.disconnect(),f=null,u&&cancelAnimationFrame(v)}}const Fw=uw,Dw=dw,Iw=sw,Mw=pw,$w=lw,Ud=aw,Lw=fw,Rw=(e,t,n)=>{const r=new Map,o={platform:Nw,...n},i={...o.platform,_c:r};return iw(e,t,{...o,platform:i})};var Ro=typeof document<"u"?_.useLayoutEffect:_.useEffect;function Vo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Vo(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Vo(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Wd(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function qd(e,t){const n=Wd(e);return Math.round(t*n)/n}function es(e){const t=p.useRef(e);return Ro(()=>{t.current=e}),t}function Vw(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:u,open:c}=e,[d,g]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,f]=p.useState(r);Vo(m,r)||f(r);const[v,h]=p.useState(null),[y,b]=p.useState(null),w=p.useCallback(P=>{P!==O.current&&(O.current=P,h(P))},[]),C=p.useCallback(P=>{P!==I.current&&(I.current=P,b(P))},[]),E=i||v,x=a||y,O=p.useRef(null),I=p.useRef(null),$=p.useRef(d),H=u!=null,D=es(u),G=es(o),U=es(c),Z=p.useCallback(()=>{if(!O.current||!I.current)return;const P={placement:t,strategy:n,middleware:m};G.current&&(P.platform=G.current),Rw(O.current,I.current,P).then(j=>{const A={...j,isPositioned:U.current!==!1};k.current&&!Vo($.current,A)&&($.current=A,Ir.flushSync(()=>{g(A)}))})},[m,t,n,G,U]);Ro(()=>{c===!1&&$.current.isPositioned&&($.current.isPositioned=!1,g(P=>({...P,isPositioned:!1})))},[c]);const k=p.useRef(!1);Ro(()=>(k.current=!0,()=>{k.current=!1}),[]),Ro(()=>{if(E&&(O.current=E),x&&(I.current=x),E&&x){if(D.current)return D.current(E,x,Z);Z()}},[E,x,Z,D,H]);const M=p.useMemo(()=>({reference:O,floating:I,setReference:w,setFloating:C}),[w,C]),F=p.useMemo(()=>({reference:E,floating:x}),[E,x]),q=p.useMemo(()=>{const P={position:n,left:0,top:0};if(!F.floating)return P;const j=qd(F.floating,d.x),A=qd(F.floating,d.y);return s?{...P,transform:"translate("+j+"px, "+A+"px)",...Wd(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:A}},[n,s,F.floating,d.x,d.y]);return p.useMemo(()=>({...d,update:Z,refs:M,elements:F,floatingStyles:q}),[d,Z,M,F,q])}const jw=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ud({element:r.current,padding:o}).fn(n):{}:r?Ud({element:r,padding:o}).fn(n):{}}}},zw=(e,t)=>({...Fw(e),options:[e,t]}),Bw=(e,t)=>({...Dw(e),options:[e,t]}),Hw=(e,t)=>({...Lw(e),options:[e,t]}),Uw=(e,t)=>({...Iw(e),options:[e,t]}),Ww=(e,t)=>({...Mw(e),options:[e,t]}),qw=(e,t)=>({...$w(e),options:[e,t]}),Gw=(e,t)=>({...jw(e),options:[e,t]});var Kw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Yw=Kw.reduce((e,t)=>{const n=p.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Pn:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Xw="Arrow",Gd=p.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return l.jsx(Yw.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});Gd.displayName=Xw;var Jw=Gd;function Kd(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Zw(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Kd(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Kd(e[o],null)}}}}function Yd(...e){return p.useCallback(Zw(...e),e)}var Qw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Xd=Qw.reduce((e,t)=>{const n=p.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Pn:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),ts="Popper",[Jd,Zd]=Jt(ts),[e0,Qd]=Jd(ts),ef=e=>{const{__scopePopper:t,children:n}=e,[r,o]=p.useState(null);return l.jsx(e0,{scope:t,anchor:r,onAnchorChange:o,children:n})};ef.displayName=ts;var tf="PopperAnchor",nf=p.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Qd(tf,n),a=p.useRef(null),s=Yd(t,a);return p.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:l.jsx(Xd.div,{...o,ref:s})});nf.displayName=tf;var ns="PopperContent",[t0,n0]=Jd(ns),rf=p.forwardRef((e,t)=>{var ae,de,ue,le,Ce,K;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:u=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:g="partial",hideWhenDetached:m=!1,updatePositionStrategy:f="optimized",onPlaced:v,...h}=e,y=Qd(ns,n),[b,w]=p.useState(null),C=Yd(t,Ee=>w(Ee)),[E,x]=p.useState(null),O=hc(E),I=(O==null?void 0:O.width)??0,$=(O==null?void 0:O.height)??0,H=r+(i!=="center"?"-"+i:""),D=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},G=Array.isArray(c)?c:[c],U=G.length>0,Z={padding:D,boundary:G.filter(o0),altBoundary:U},{refs:k,floatingStyles:M,placement:F,isPositioned:q,middlewareData:P}=Vw({strategy:"fixed",placement:H,whileElementsMounted:(...Ee)=>Ow(...Ee,{animationFrame:f==="always"}),elements:{reference:y.anchor},middleware:[zw({mainAxis:o+$,alignmentAxis:a}),u&&Bw({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?Hw():void 0,...Z}),u&&Uw({...Z}),Ww({...Z,apply:({elements:Ee,rects:We,availableWidth:qe,availableHeight:It})=>{const{width:st,height:S}=We.reference,N=Ee.floating.style;N.setProperty("--radix-popper-available-width",`${qe}px`),N.setProperty("--radix-popper-available-height",`${It}px`),N.setProperty("--radix-popper-anchor-width",`${st}px`),N.setProperty("--radix-popper-anchor-height",`${S}px`)}}),E&&Gw({element:E,padding:s}),i0({arrowWidth:I,arrowHeight:$}),m&&qw({strategy:"referenceHidden",...Z})]}),[j,A]=sf(F),B=Ge(v);ot(()=>{q&&(B==null||B())},[q,B]);const Q=(ae=P.arrow)==null?void 0:ae.x,re=(de=P.arrow)==null?void 0:de.y,ee=((ue=P.arrow)==null?void 0:ue.centerOffset)!==0,[ce,oe]=p.useState();return ot(()=>{b&&oe(window.getComputedStyle(b).zIndex)},[b]),l.jsx("div",{ref:k.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:q?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[(le=P.transformOrigin)==null?void 0:le.x,(Ce=P.transformOrigin)==null?void 0:Ce.y].join(" "),...((K=P.hide)==null?void 0:K.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(t0,{scope:n,placedSide:j,onArrowChange:x,arrowX:Q,arrowY:re,shouldHideArrow:ee,children:l.jsx(Xd.div,{"data-side":j,"data-align":A,...h,ref:C,style:{...h.style,animation:q?void 0:"none"}})})})});rf.displayName=ns;var of="PopperArrow",r0={top:"bottom",right:"left",bottom:"top",left:"right"},af=p.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=n0(of,r),a=r0[i.placedSide];return l.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:l.jsx(Jw,{...o,ref:n,style:{...o.style,display:"block"}})})});af.displayName=of;function o0(e){return e!==null}var i0=e=>({name:"transformOrigin",options:e,fn(t){var y,b,w;const{placement:n,rects:r,middlewareData:o}=t,a=((y=o.arrow)==null?void 0:y.centerOffset)!==0,s=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[c,d]=sf(n),g={start:"0%",center:"50%",end:"100%"}[d],m=(((b=o.arrow)==null?void 0:b.x)??0)+s/2,f=(((w=o.arrow)==null?void 0:w.y)??0)+u/2;let v="",h="";return c==="bottom"?(v=a?g:`${m}px`,h=`${-u}px`):c==="top"?(v=a?g:`${m}px`,h=`${r.floating.height+u}px`):c==="right"?(v=`${-u}px`,h=a?g:`${f}px`):c==="left"&&(v=`${r.floating.width+u}px`,h=a?g:`${f}px`),{data:{x:v,y:h}}}});function sf(e){const[t,n="center"]=e.split("-");return[t,n]}var a0=ef,s0=nf,l0=rf,c0=af,u0="Portal",lf=p.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=p.useState(!1);ot(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?ai.createPortal(l.jsx(pr.div,{...r,ref:t}),a):null});lf.displayName=u0;function d0(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var rs=e=>{const{present:t,children:n}=e,r=f0(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),i=fr(r.ref,p0(o));return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:i}):null};rs.displayName="Presence";function f0(e){const[t,n]=p.useState(),r=p.useRef({}),o=p.useRef(e),i=p.useRef("none"),a=e?"mounted":"unmounted",[s,u]=d0(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const c=jo(r.current);i.current=s==="mounted"?c:"none"},[s]),ot(()=>{const c=r.current,d=o.current;if(d!==e){const m=i.current,f=jo(c);e?u("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(d&&m!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),ot(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,g=f=>{const h=jo(r.current).includes(f.animationName);if(f.target===t&&h&&(u("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},m=f=>{f.target===t&&(i.current=jo(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:p.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function jo(e){return(e==null?void 0:e.animationName)||"none"}function p0(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var g0="VisuallyHidden",cf=p.forwardRef((e,t)=>l.jsx(pr.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));cf.displayName=g0;var m0=cf,[zo,y_]=Jt("Tooltip",[Zd]),Bo=Zd(),uf="TooltipProvider",h0=700,os="tooltip.open",[v0,is]=zo(uf),df=e=>{const{__scopeTooltip:t,delayDuration:n=h0,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,s]=p.useState(!0),u=p.useRef(!1),c=p.useRef(0);return p.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),l.jsx(v0,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:p.useCallback(()=>{window.clearTimeout(c.current),s(!1)},[]),onClose:p.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:p.useCallback(d=>{u.current=d},[]),disableHoverableContent:o,children:i})};df.displayName=uf;var Ho="Tooltip",[y0,vr]=zo(Ho),ff=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,u=is(Ho,e.__scopeTooltip),c=Bo(t),[d,g]=p.useState(null),m=Dn(),f=p.useRef(0),v=a??u.disableHoverableContent,h=s??u.delayDuration,y=p.useRef(!1),[b=!1,w]=On({prop:r,defaultProp:o,onChange:I=>{I?(u.onOpen(),document.dispatchEvent(new CustomEvent(os))):u.onClose(),i==null||i(I)}}),C=p.useMemo(()=>b?y.current?"delayed-open":"instant-open":"closed",[b]),E=p.useCallback(()=>{window.clearTimeout(f.current),f.current=0,y.current=!1,w(!0)},[w]),x=p.useCallback(()=>{window.clearTimeout(f.current),f.current=0,w(!1)},[w]),O=p.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{y.current=!0,w(!0),f.current=0},h)},[h,w]);return p.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),l.jsx(a0,{...c,children:l.jsx(y0,{scope:t,contentId:m,open:b,stateAttribute:C,trigger:d,onTriggerChange:g,onTriggerEnter:p.useCallback(()=>{u.isOpenDelayed?O():E()},[u.isOpenDelayed,O,E]),onTriggerLeave:p.useCallback(()=>{v?x():(window.clearTimeout(f.current),f.current=0)},[x,v]),onOpen:E,onClose:x,disableHoverableContent:v,children:n})})};ff.displayName=Ho;var as="TooltipTrigger",pf=p.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=vr(as,n),i=is(as,n),a=Bo(n),s=p.useRef(null),u=fr(t,s,o.onTriggerChange),c=p.useRef(!1),d=p.useRef(!1),g=p.useCallback(()=>c.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),l.jsx(s0,{asChild:!0,...a,children:l.jsx(pr.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:zt(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:zt(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:zt(e.onPointerDown,()=>{c.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:zt(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:zt(e.onBlur,o.onClose),onClick:zt(e.onClick,o.onClose)})})});pf.displayName=as;var ss="TooltipPortal",[x0,b0]=zo(ss,{forceMount:void 0}),gf=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=vr(ss,t);return l.jsx(x0,{scope:t,forceMount:n,children:l.jsx(rs,{present:n||i.open,children:l.jsx(lf,{asChild:!0,container:o,children:r})})})};gf.displayName=ss;var Wn="TooltipContent",mf=p.forwardRef((e,t)=>{const n=b0(Wn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=vr(Wn,e.__scopeTooltip);return l.jsx(rs,{present:r||a.open,children:a.disableHoverableContent?l.jsx(hf,{side:o,...i,ref:t}):l.jsx(w0,{side:o,...i,ref:t})})}),w0=p.forwardRef((e,t)=>{const n=vr(Wn,e.__scopeTooltip),r=is(Wn,e.__scopeTooltip),o=p.useRef(null),i=fr(t,o),[a,s]=p.useState(null),{trigger:u,onClose:c}=n,d=o.current,{onPointerInTransitChange:g}=r,m=p.useCallback(()=>{s(null),g(!1)},[g]),f=p.useCallback((v,h)=>{const y=v.currentTarget,b={x:v.clientX,y:v.clientY},w=_0(b,y.getBoundingClientRect()),C=T0(b,w),E=A0(h.getBoundingClientRect()),x=N0([...C,...E]);s(x),g(!0)},[g]);return p.useEffect(()=>()=>m(),[m]),p.useEffect(()=>{if(u&&d){const v=y=>f(y,d),h=y=>f(y,u);return u.addEventListener("pointerleave",v),d.addEventListener("pointerleave",h),()=>{u.removeEventListener("pointerleave",v),d.removeEventListener("pointerleave",h)}}},[u,d,f,m]),p.useEffect(()=>{if(a){const v=h=>{const y=h.target,b={x:h.clientX,y:h.clientY},w=(u==null?void 0:u.contains(y))||(d==null?void 0:d.contains(y)),C=!P0(b,a);w?m():C&&(m(),c())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[u,d,a,c,m]),l.jsx(hf,{...e,ref:i})}),[C0,S0]=zo(Ho,{isInside:!1}),hf=p.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,u=vr(Wn,n),c=Bo(n),{onClose:d}=u;return p.useEffect(()=>(document.addEventListener(os,d),()=>document.removeEventListener(os,d)),[d]),p.useEffect(()=>{if(u.trigger){const g=m=>{const f=m.target;f!=null&&f.contains(u.trigger)&&d()};return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[u.trigger,d]),l.jsx(Ad,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:g=>g.preventDefault(),onDismiss:d,children:l.jsxs(l0,{"data-state":u.stateAttribute,...c,...s,ref:t,style:{...s.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:[l.jsx(nc,{children:r}),l.jsx(C0,{scope:n,isInside:!0,children:l.jsx(m0,{id:u.contentId,role:"tooltip",children:o||r})})]})})});mf.displayName=Wn;var vf="TooltipArrow",E0=p.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Bo(n);return S0(vf,n).isInside?null:l.jsx(c0,{...o,...r,ref:t})});E0.displayName=vf;function _0(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function T0(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function A0(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function P0(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i].x,u=t[i].y,c=t[a].x,d=t[a].y;u>r!=d>r&&n<(c-s)*(r-u)/(d-u)+s&&(o=!o)}return o}function N0(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),k0(t)}function k0(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var O0=df,F0=ff,D0=pf,I0=gf,yf=mf;const xn=O0,bn=F0,wn=D0,on=p.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(I0,{children:l.jsx(yf,{ref:r,sideOffset:t,className:he("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground 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})}));on.displayName=yf.displayName;function M0({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const $0=p.forwardRef(M0);var L0=function(e){return function(t,n){var r=_.useRef(!1);e(function(){return function(){r.current=!1}},[]),e(function(){if(!r.current)r.current=!0;else return t()},n)}},xf=function(e){return typeof e=="function"},bf=process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test";const R0=L0(_.useEffect);function wf(e){var t=_.useRef(e);return t.current=e,t}var V0=function(e){bf&&(xf(e)||console.error("useUnmount expected parameter is a function, got ".concat(typeof e)));var t=wf(e);_.useEffect(function(){return function(){t.current()}},[])};function j0(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Cf=j0,z0=typeof ir=="object"&&ir&&ir.Object===Object&&ir,B0=z0,H0=B0,U0=typeof self=="object"&&self&&self.Object===Object&&self,W0=H0||U0||Function("return this")(),Sf=W0,q0=Sf,G0=function(){return q0.Date.now()},K0=G0,Y0=/\s/;function X0(e){for(var t=e.length;t--&&Y0.test(e.charAt(t)););return t}var J0=X0,Z0=J0,Q0=/^\s+/;function eC(e){return e&&e.slice(0,Z0(e)+1).replace(Q0,"")}var tC=eC,nC=Sf,rC=nC.Symbol,Ef=rC,_f=Ef,Tf=Object.prototype,oC=Tf.hasOwnProperty,iC=Tf.toString,yr=_f?_f.toStringTag:void 0;function aC(e){var t=oC.call(e,yr),n=e[yr];try{e[yr]=void 0;var r=!0}catch{}var o=iC.call(e);return r&&(t?e[yr]=n:delete e[yr]),o}var sC=aC,lC=Object.prototype,cC=lC.toString;function uC(e){return cC.call(e)}var dC=uC,Af=Ef,fC=sC,pC=dC,gC="[object Null]",mC="[object Undefined]",Pf=Af?Af.toStringTag:void 0;function hC(e){return e==null?e===void 0?mC:gC:Pf&&Pf in Object(e)?fC(e):pC(e)}var vC=hC;function yC(e){return e!=null&&typeof e=="object"}var xC=yC,bC=vC,wC=xC,CC="[object Symbol]";function SC(e){return typeof e=="symbol"||wC(e)&&bC(e)==CC}var EC=SC,_C=tC,Nf=Cf,TC=EC,kf=NaN,AC=/^[-+]0x[0-9a-f]+$/i,PC=/^0b[01]+$/i,NC=/^0o[0-7]+$/i,kC=parseInt;function OC(e){if(typeof e=="number")return e;if(TC(e))return kf;if(Nf(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Nf(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=_C(e);var n=PC.test(e);return n||NC.test(e)?kC(e.slice(2),n?2:8):AC.test(e)?kf:+e}var FC=OC,DC=Cf,ls=K0,Of=FC,IC="Expected a function",MC=Math.max,$C=Math.min;function LC(e,t,n){var r,o,i,a,s,u,c=0,d=!1,g=!1,m=!0;if(typeof e!="function")throw new TypeError(IC);t=Of(t)||0,DC(n)&&(d=!!n.leading,g="maxWait"in n,i=g?MC(Of(n.maxWait)||0,t):i,m="trailing"in n?!!n.trailing:m);function f(O){var I=r,$=o;return r=o=void 0,c=O,a=e.apply($,I),a}function v(O){return c=O,s=setTimeout(b,t),d?f(O):a}function h(O){var I=O-u,$=O-c,H=t-I;return g?$C(H,i-$):H}function y(O){var I=O-u,$=O-c;return u===void 0||I>=t||I<0||g&&$>=i}function b(){var O=ls();if(y(O))return w(O);s=setTimeout(b,h(O))}function w(O){return s=void 0,m&&r?f(O):(r=o=void 0,a)}function C(){s!==void 0&&clearTimeout(s),c=0,r=u=o=s=void 0}function E(){return s===void 0?a:w(ls())}function x(){var O=ls(),I=y(O);if(r=arguments,o=this,u=O,I){if(s===void 0)return v(u);if(g)return clearTimeout(s),s=setTimeout(b,t),f(u)}return s===void 0&&(s=setTimeout(b,t)),a}return x.cancel=C,x.flush=E,x}var RC=LC;const VC=Jr(RC);function jC(){var e=(typeof global>"u"?"undefined":typeof global)=="object"&&global&&global.Object===Object&&global,t=typeof self=="object"&&self&&self.Object===Object&&self;return e||t}jC()||(global.Date=Date);function zC(e,t){var n;bf&&(xf(e)||console.error("useDebounceFn expected parameter is a function, got ".concat(typeof e)));var r=wf(e),o=(n=t==null?void 0:t.wait)!==null&&n!==void 0?n:1e3,i=_.useMemo(function(){return VC(function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return r.current.apply(r,Vc([],Rc(a),!1))},o,t)},[]);return V0(function(){i.cancel()}),{run:i,cancel:i.cancel,flush:i.flush}}function BC(e,t,n){var r=Rc(_.useState({}),2),o=r[0],i=r[1],a=zC(function(){i({})},n).run;_.useEffect(function(){return a()},t),R0(e,[o])}const HC=_.forwardRef(({onChange:e},t)=>{const n=_.useRef(null),[r,o]=_.useState("");return _.useImperativeHandle(t,()=>({setValue:i=>{var a;o(i),(a=n.current)==null||a.focus()}})),BC(()=>{e==null||e(r)},[r],{wait:300}),l.jsxs(l.Fragment,{children:[l.jsx(en,{ref:n,type:"text",placeholder:"Search files...",value:r,onChange:i=>o(i.target.value),className:"pr-8"}),r&&l.jsx("button",{onClick:()=>{var i;o(""),(i=n.current)==null||i.focus()},className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700",children:l.jsx($0,{className:"h-5 w-5"})})]})});var cs={exports:{}},Uo={exports:{}},Te={};/** @license React v16.13.1
153
153
  * react-is.production.min.js
154
154
  *
155
155
  * Copyright (c) Facebook, Inc. and its affiliates.
156
156
  *
157
157
  * This source code is licensed under the MIT license found in the
158
158
  * LICENSE file in the root directory of this source tree.
159
- */var kf;function HC(){if(kf)return Te;kf=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function C(x){if(typeof x=="object"&&x!==null){var O=x.$$typeof;switch(O){case t:switch(x=x.type,x){case u:case c:case r:case i:case o:case g:return x;default:switch(x=x&&x.$$typeof,x){case s:case d:case v:case f:case a:return x;default:return O}}case n:return O}}}function E(x){return C(x)===c}return Te.AsyncMode=u,Te.ConcurrentMode=c,Te.ContextConsumer=s,Te.ContextProvider=a,Te.Element=t,Te.ForwardRef=d,Te.Fragment=r,Te.Lazy=v,Te.Memo=f,Te.Portal=n,Te.Profiler=i,Te.StrictMode=o,Te.Suspense=g,Te.isAsyncMode=function(x){return E(x)||C(x)===u},Te.isConcurrentMode=E,Te.isContextConsumer=function(x){return C(x)===s},Te.isContextProvider=function(x){return C(x)===a},Te.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===t},Te.isForwardRef=function(x){return C(x)===d},Te.isFragment=function(x){return C(x)===r},Te.isLazy=function(x){return C(x)===v},Te.isMemo=function(x){return C(x)===f},Te.isPortal=function(x){return C(x)===n},Te.isProfiler=function(x){return C(x)===i},Te.isStrictMode=function(x){return C(x)===o},Te.isSuspense=function(x){return C(x)===g},Te.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===r||x===c||x===i||x===o||x===g||x===m||typeof x=="object"&&x!==null&&(x.$$typeof===v||x.$$typeof===f||x.$$typeof===a||x.$$typeof===s||x.$$typeof===d||x.$$typeof===y||x.$$typeof===b||x.$$typeof===w||x.$$typeof===h)},Te.typeOf=C,Te}var Ae={};/** @license React v16.13.1
159
+ */var Ff;function UC(){if(Ff)return Te;Ff=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function C(x){if(typeof x=="object"&&x!==null){var O=x.$$typeof;switch(O){case t:switch(x=x.type,x){case u:case c:case r:case i:case o:case g:return x;default:switch(x=x&&x.$$typeof,x){case s:case d:case v:case f:case a:return x;default:return O}}case n:return O}}}function E(x){return C(x)===c}return Te.AsyncMode=u,Te.ConcurrentMode=c,Te.ContextConsumer=s,Te.ContextProvider=a,Te.Element=t,Te.ForwardRef=d,Te.Fragment=r,Te.Lazy=v,Te.Memo=f,Te.Portal=n,Te.Profiler=i,Te.StrictMode=o,Te.Suspense=g,Te.isAsyncMode=function(x){return E(x)||C(x)===u},Te.isConcurrentMode=E,Te.isContextConsumer=function(x){return C(x)===s},Te.isContextProvider=function(x){return C(x)===a},Te.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===t},Te.isForwardRef=function(x){return C(x)===d},Te.isFragment=function(x){return C(x)===r},Te.isLazy=function(x){return C(x)===v},Te.isMemo=function(x){return C(x)===f},Te.isPortal=function(x){return C(x)===n},Te.isProfiler=function(x){return C(x)===i},Te.isStrictMode=function(x){return C(x)===o},Te.isSuspense=function(x){return C(x)===g},Te.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===r||x===c||x===i||x===o||x===g||x===m||typeof x=="object"&&x!==null&&(x.$$typeof===v||x.$$typeof===f||x.$$typeof===a||x.$$typeof===s||x.$$typeof===d||x.$$typeof===y||x.$$typeof===b||x.$$typeof===w||x.$$typeof===h)},Te.typeOf=C,Te}var Ae={};/** @license React v16.13.1
160
160
  * react-is.development.js
161
161
  *
162
162
  * Copyright (c) Facebook, Inc. and its affiliates.
163
163
  *
164
164
  * This source code is licensed under the MIT license found in the
165
165
  * LICENSE file in the root directory of this source tree.
166
- */var Of;function UC(){return Of||(Of=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function C(K){return typeof K=="string"||typeof K=="function"||K===r||K===c||K===i||K===o||K===g||K===m||typeof K=="object"&&K!==null&&(K.$$typeof===v||K.$$typeof===f||K.$$typeof===a||K.$$typeof===s||K.$$typeof===d||K.$$typeof===y||K.$$typeof===b||K.$$typeof===w||K.$$typeof===h)}function E(K){if(typeof K=="object"&&K!==null){var Ee=K.$$typeof;switch(Ee){case t:var We=K.type;switch(We){case u:case c:case r:case i:case o:case g:return We;default:var qe=We&&We.$$typeof;switch(qe){case s:case d:case v:case f:case a:return qe;default:return Ee}}case n:return Ee}}}var x=u,O=c,I=s,L=a,H=t,D=d,G=r,U=v,Z=f,k=n,$=i,F=o,q=g,P=!1;function j(K){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(K)||E(K)===u}function A(K){return E(K)===c}function B(K){return E(K)===s}function Q(K){return E(K)===a}function re(K){return typeof K=="object"&&K!==null&&K.$$typeof===t}function ee(K){return E(K)===d}function ce(K){return E(K)===r}function oe(K){return E(K)===v}function ae(K){return E(K)===f}function de(K){return E(K)===n}function ue(K){return E(K)===i}function le(K){return E(K)===o}function Ce(K){return E(K)===g}Ae.AsyncMode=x,Ae.ConcurrentMode=O,Ae.ContextConsumer=I,Ae.ContextProvider=L,Ae.Element=H,Ae.ForwardRef=D,Ae.Fragment=G,Ae.Lazy=U,Ae.Memo=Z,Ae.Portal=k,Ae.Profiler=$,Ae.StrictMode=F,Ae.Suspense=q,Ae.isAsyncMode=j,Ae.isConcurrentMode=A,Ae.isContextConsumer=B,Ae.isContextProvider=Q,Ae.isElement=re,Ae.isForwardRef=ee,Ae.isFragment=ce,Ae.isLazy=oe,Ae.isMemo=ae,Ae.isPortal=de,Ae.isProfiler=ue,Ae.isStrictMode=le,Ae.isSuspense=Ce,Ae.isValidElementType=C,Ae.typeOf=E}()),Ae}var Ff;function Df(){return Ff||(Ff=1,process.env.NODE_ENV==="production"?Uo.exports=HC():Uo.exports=UC()),Uo.exports}/*
166
+ */var Df;function WC(){return Df||(Df=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function C(K){return typeof K=="string"||typeof K=="function"||K===r||K===c||K===i||K===o||K===g||K===m||typeof K=="object"&&K!==null&&(K.$$typeof===v||K.$$typeof===f||K.$$typeof===a||K.$$typeof===s||K.$$typeof===d||K.$$typeof===y||K.$$typeof===b||K.$$typeof===w||K.$$typeof===h)}function E(K){if(typeof K=="object"&&K!==null){var Ee=K.$$typeof;switch(Ee){case t:var We=K.type;switch(We){case u:case c:case r:case i:case o:case g:return We;default:var qe=We&&We.$$typeof;switch(qe){case s:case d:case v:case f:case a:return qe;default:return Ee}}case n:return Ee}}}var x=u,O=c,I=s,$=a,H=t,D=d,G=r,U=v,Z=f,k=n,M=i,F=o,q=g,P=!1;function j(K){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(K)||E(K)===u}function A(K){return E(K)===c}function B(K){return E(K)===s}function Q(K){return E(K)===a}function re(K){return typeof K=="object"&&K!==null&&K.$$typeof===t}function ee(K){return E(K)===d}function ce(K){return E(K)===r}function oe(K){return E(K)===v}function ae(K){return E(K)===f}function de(K){return E(K)===n}function ue(K){return E(K)===i}function le(K){return E(K)===o}function Ce(K){return E(K)===g}Ae.AsyncMode=x,Ae.ConcurrentMode=O,Ae.ContextConsumer=I,Ae.ContextProvider=$,Ae.Element=H,Ae.ForwardRef=D,Ae.Fragment=G,Ae.Lazy=U,Ae.Memo=Z,Ae.Portal=k,Ae.Profiler=M,Ae.StrictMode=F,Ae.Suspense=q,Ae.isAsyncMode=j,Ae.isConcurrentMode=A,Ae.isContextConsumer=B,Ae.isContextProvider=Q,Ae.isElement=re,Ae.isForwardRef=ee,Ae.isFragment=ce,Ae.isLazy=oe,Ae.isMemo=ae,Ae.isPortal=de,Ae.isProfiler=ue,Ae.isStrictMode=le,Ae.isSuspense=Ce,Ae.isValidElementType=C,Ae.typeOf=E}()),Ae}var If;function Mf(){return If||(If=1,process.env.NODE_ENV==="production"?Uo.exports=UC():Uo.exports=WC()),Uo.exports}/*
167
167
  object-assign
168
168
  (c) Sindre Sorhus
169
169
  @license MIT
170
- */var us,If;function WC(){if(If)return us;If=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var u=Object.getOwnPropertyNames(a).map(function(d){return a[d]});if(u.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(d){c[d]=d}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return us=o()?Object.assign:function(i,a){for(var s,u=r(i),c,d=1;d<arguments.length;d++){s=Object(arguments[d]);for(var g in s)t.call(s,g)&&(u[g]=s[g]);if(e){c=e(s);for(var m=0;m<c.length;m++)n.call(s,c[m])&&(u[c[m]]=s[c[m]])}}return u},us}var ds,Mf;function fs(){if(Mf)return ds;Mf=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ds=e,ds}var ps,$f;function Lf(){return $f||($f=1,ps=Function.call.bind(Object.prototype.hasOwnProperty)),ps}var gs,Rf;function qC(){if(Rf)return gs;Rf=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=fs(),n={},r=Lf();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,u,c){if(process.env.NODE_ENV!=="production"){for(var d in i)if(r(i,d)){var g;try{if(typeof i[d]!="function"){var m=Error((u||"React class")+": "+s+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}g=i[d](a,d,u,s,null,t)}catch(v){g=v}if(g&&!(g instanceof Error)&&e((u||"React class")+": type specification of "+s+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof g+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),g instanceof Error&&!(g.message in n)){n[g.message]=!0;var f=c?c():"";e("Failed "+s+" type: "+g.message+(f??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},gs=o,gs}var ms,Vf;function GC(){if(Vf)return ms;Vf=1;var e=Df(),t=WC(),n=fs(),r=Lf(),o=qC(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var u="Warning: "+s;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function a(){return null}return ms=function(s,u){var c=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function g(A){var B=A&&(c&&A[c]||A[d]);if(typeof B=="function")return B}var m="<<anonymous>>",f={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:w(),arrayOf:C,element:E(),elementType:x(),instanceOf:O,node:D(),objectOf:L,oneOf:I,oneOfType:H,shape:U,exact:Z};function v(A,B){return A===B?A!==0||1/A===1/B:A!==A&&B!==B}function h(A,B){this.message=A,this.data=B&&typeof B=="object"?B:{},this.stack=""}h.prototype=Error.prototype;function y(A){if(process.env.NODE_ENV!=="production")var B={},Q=0;function re(ce,oe,ae,de,ue,le,Ce){if(de=de||m,le=le||ae,Ce!==n){if(u){var K=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 K.name="Invariant Violation",K}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ee=de+":"+ae;!B[Ee]&&Q<3&&(i("You are manually calling a React.PropTypes validation function for the `"+le+"` prop on `"+de+"`. 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."),B[Ee]=!0,Q++)}}return oe[ae]==null?ce?oe[ae]===null?new h("The "+ue+" `"+le+"` is marked as required "+("in `"+de+"`, but its value is `null`.")):new h("The "+ue+" `"+le+"` is marked as required in "+("`"+de+"`, but its value is `undefined`.")):null:A(oe,ae,de,ue,le)}var ee=re.bind(null,!1);return ee.isRequired=re.bind(null,!0),ee}function b(A){function B(Q,re,ee,ce,oe,ae){var de=Q[re],ue=F(de);if(ue!==A){var le=q(de);return new h("Invalid "+ce+" `"+oe+"` of type "+("`"+le+"` supplied to `"+ee+"`, expected ")+("`"+A+"`."),{expectedType:A})}return null}return y(B)}function w(){return y(a)}function C(A){function B(Q,re,ee,ce,oe){if(typeof A!="function")return new h("Property `"+oe+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var ae=Q[re];if(!Array.isArray(ae)){var de=F(ae);return new h("Invalid "+ce+" `"+oe+"` of type "+("`"+de+"` supplied to `"+ee+"`, expected an array."))}for(var ue=0;ue<ae.length;ue++){var le=A(ae,ue,ee,ce,oe+"["+ue+"]",n);if(le instanceof Error)return le}return null}return y(B)}function E(){function A(B,Q,re,ee,ce){var oe=B[Q];if(!s(oe)){var ae=F(oe);return new h("Invalid "+ee+" `"+ce+"` of type "+("`"+ae+"` supplied to `"+re+"`, expected a single ReactElement."))}return null}return y(A)}function x(){function A(B,Q,re,ee,ce){var oe=B[Q];if(!e.isValidElementType(oe)){var ae=F(oe);return new h("Invalid "+ee+" `"+ce+"` of type "+("`"+ae+"` supplied to `"+re+"`, expected a single ReactElement type."))}return null}return y(A)}function O(A){function B(Q,re,ee,ce,oe){if(!(Q[re]instanceof A)){var ae=A.name||m,de=j(Q[re]);return new h("Invalid "+ce+" `"+oe+"` of type "+("`"+de+"` supplied to `"+ee+"`, expected ")+("instance of `"+ae+"`."))}return null}return y(B)}function I(A){if(!Array.isArray(A))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("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])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function B(Q,re,ee,ce,oe){for(var ae=Q[re],de=0;de<A.length;de++)if(v(ae,A[de]))return null;var ue=JSON.stringify(A,function(Ce,K){var Ee=q(K);return Ee==="symbol"?String(K):K});return new h("Invalid "+ce+" `"+oe+"` of value `"+String(ae)+"` "+("supplied to `"+ee+"`, expected one of "+ue+"."))}return y(B)}function L(A){function B(Q,re,ee,ce,oe){if(typeof A!="function")return new h("Property `"+oe+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var ae=Q[re],de=F(ae);if(de!=="object")return new h("Invalid "+ce+" `"+oe+"` of type "+("`"+de+"` supplied to `"+ee+"`, expected an object."));for(var ue in ae)if(r(ae,ue)){var le=A(ae,ue,ee,ce,oe+"."+ue,n);if(le instanceof Error)return le}return null}return y(B)}function H(A){if(!Array.isArray(A))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var B=0;B<A.length;B++){var Q=A[B];if(typeof Q!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+P(Q)+" at index "+B+"."),a}function re(ee,ce,oe,ae,de){for(var ue=[],le=0;le<A.length;le++){var Ce=A[le],K=Ce(ee,ce,oe,ae,de,n);if(K==null)return null;K.data&&r(K.data,"expectedType")&&ue.push(K.data.expectedType)}var Ee=ue.length>0?", expected one of type ["+ue.join(", ")+"]":"";return new h("Invalid "+ae+" `"+de+"` supplied to "+("`"+oe+"`"+Ee+"."))}return y(re)}function D(){function A(B,Q,re,ee,ce){return k(B[Q])?null:new h("Invalid "+ee+" `"+ce+"` supplied to "+("`"+re+"`, expected a ReactNode."))}return y(A)}function G(A,B,Q,re,ee){return new h((A||"React class")+": "+B+" type `"+Q+"."+re+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function U(A){function B(Q,re,ee,ce,oe){var ae=Q[re],de=F(ae);if(de!=="object")return new h("Invalid "+ce+" `"+oe+"` of type `"+de+"` "+("supplied to `"+ee+"`, expected `object`."));for(var ue in A){var le=A[ue];if(typeof le!="function")return G(ee,ce,oe,ue,q(le));var Ce=le(ae,ue,ee,ce,oe+"."+ue,n);if(Ce)return Ce}return null}return y(B)}function Z(A){function B(Q,re,ee,ce,oe){var ae=Q[re],de=F(ae);if(de!=="object")return new h("Invalid "+ce+" `"+oe+"` of type `"+de+"` "+("supplied to `"+ee+"`, expected `object`."));var ue=t({},Q[re],A);for(var le in ue){var Ce=A[le];if(r(A,le)&&typeof Ce!="function")return G(ee,ce,oe,le,q(Ce));if(!Ce)return new h("Invalid "+ce+" `"+oe+"` key `"+le+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(Q[re],null," ")+`
171
- Valid keys: `+JSON.stringify(Object.keys(A),null," "));var K=Ce(ae,le,ee,ce,oe+"."+le,n);if(K)return K}return null}return y(B)}function k(A){switch(typeof A){case"number":case"string":case"undefined":return!0;case"boolean":return!A;case"object":if(Array.isArray(A))return A.every(k);if(A===null||s(A))return!0;var B=g(A);if(B){var Q=B.call(A),re;if(B!==A.entries){for(;!(re=Q.next()).done;)if(!k(re.value))return!1}else for(;!(re=Q.next()).done;){var ee=re.value;if(ee&&!k(ee[1]))return!1}}else return!1;return!0;default:return!1}}function $(A,B){return A==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function F(A){var B=typeof A;return Array.isArray(A)?"array":A instanceof RegExp?"object":$(B,A)?"symbol":B}function q(A){if(typeof A>"u"||A===null)return""+A;var B=F(A);if(B==="object"){if(A instanceof Date)return"date";if(A instanceof RegExp)return"regexp"}return B}function P(A){var B=q(A);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function j(A){return!A.constructor||!A.constructor.name?m:A.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},ms}var hs,jf;function KC(){if(jf)return hs;jf=1;var e=fs();function t(){}function n(){}return n.resetWarningCache=t,hs=function(){function r(a,s,u,c,d,g){if(g!==e){var m=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 m.name="Invariant Violation",m}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},hs}if(process.env.NODE_ENV!=="production"){var YC=Df(),XC=!0;cs.exports=GC()(YC.isElement,XC)}else cs.exports=KC()();var JC=cs.exports;const Ne=Jr(JC),ZC=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 qn(e,t,n){const r=QC(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&zf(r,"path",i),zf(r,"relativePath",i),r}function QC(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=ZC.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function zf(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const eS=[".DS_Store","Thumbs.db"];function tS(e){return gn(this,void 0,void 0,function*(){return Wo(e)&&nS(e.dataTransfer)?aS(e.dataTransfer,e.type):rS(e)?oS(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?iS(e):[]})}function nS(e){return Wo(e)}function rS(e){return Wo(e)&&Wo(e.target)}function Wo(e){return typeof e=="object"&&e!==null}function oS(e){return vs(e.target.files).map(t=>qn(t))}function iS(e){return gn(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>qn(n))})}function aS(e,t){return gn(this,void 0,void 0,function*(){if(e.items){const n=vs(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(sS));return Bf(Hf(r))}return Bf(vs(e.files).map(n=>qn(n)))})}function Bf(e){return e.filter(t=>eS.indexOf(t.name)===-1)}function vs(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function sS(e){if(typeof e.webkitGetAsEntry!="function")return Uf(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Wf(t):Uf(e,t)}function Hf(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?Hf(n):[n]],[])}function Uf(e,t){return gn(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const i=yield e.getAsFileSystemHandle();if(i===null)throw new Error(`${e} is not a File`);if(i!==void 0){const a=yield i.getFile();return a.handle=i,qn(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return qn(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function lS(e){return gn(this,void 0,void 0,function*(){return e.isDirectory?Wf(e):cS(e)})}function Wf(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>gn(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(lS));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function cS(e){return gn(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=qn(r,e.fullPath);t(o)},r=>{n(r)})})})}var ys=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?i===s.replace(/\/.*$/,""):o===s})}return!0};function qf(e){return fS(e)||dS(e)||Xf(e)||uS()}function uS(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
172
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dS(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function fS(e){if(Array.isArray(e))return xs(e)}function Gf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Kf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gf(Object(n),!0).forEach(function(r){Yf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xr(e,t){return mS(e)||gS(e,t)||Xf(e,t)||pS()}function pS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
173
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xf(e,t){if(e){if(typeof e=="string")return xs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xs(e,t)}}function xs(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gS(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(u){i=!0,s=u}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function mS(e){if(Array.isArray(e))return e}var hS=typeof ys=="function"?ys:ys.default,vS="file-invalid-type",yS="file-too-large",xS="file-too-small",bS="too-many-files",wS=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:vS,message:"File type must be ".concat(r)}},Jf=function(t){return{code:yS,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Zf=function(t){return{code:xS,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},CS={code:bS,message:"Too many files"};function Qf(e,t){var n=e.type==="application/x-moz-file"||hS(e,t);return[n,n?null:wS(t)]}function ep(e,t,n){if(Cn(e.size))if(Cn(t)&&Cn(n)){if(e.size>n)return[!1,Jf(n)];if(e.size<t)return[!1,Zf(t)]}else{if(Cn(t)&&e.size<t)return[!1,Zf(t)];if(Cn(n)&&e.size>n)return[!1,Jf(n)]}return[!0,null]}function Cn(e){return e!=null}function SS(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&a>=1&&t.length>a?!1:t.every(function(u){var c=Qf(u,n),d=xr(c,1),g=d[0],m=ep(u,r,o),f=xr(m,1),v=f[0],h=s?s(u):null;return g&&v&&!h})}function qo(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Go(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function tp(e){e.preventDefault()}function ES(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function _S(e){return e.indexOf("Edge/")!==-1}function TS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return ES(e)||_S(e)}function kt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return!qo(r)&&s&&s.apply(void 0,[r].concat(i)),qo(r)})}}function AS(){return"showOpenFilePicker"in window}function PS(e){if(Cn(e)){var t=Object.entries(e).filter(function(n){var r=xr(n,2),o=r[0],i=r[1],a=!0;return np(o)||(console.warn('Skipped "'.concat(o,'" 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.')),a=!1),(!Array.isArray(i)||!i.every(rp))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=xr(r,2),i=o[0],a=o[1];return Kf(Kf({},n),{},Yf({},i,a))},{});return[{description:"Files",accept:t}]}return e}function NS(e){if(Cn(e))return Object.entries(e).reduce(function(t,n){var r=xr(n,2),o=r[0],i=r[1];return[].concat(qf(t),[o],qf(i))},[]).filter(function(t){return np(t)||rp(t)}).join(",")}function kS(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function OS(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function np(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function rp(e){return/^.*\.[\w]+$/.test(e)}var FS=["children"],DS=["open"],IS=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],MS=["refKey","onChange","onClick"];function $S(e){return VS(e)||RS(e)||op(e)||LS()}function LS(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
174
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RS(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function VS(e){if(Array.isArray(e))return ws(e)}function bs(e,t){return BS(e)||zS(e,t)||op(e,t)||jS()}function jS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
175
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function op(e,t){if(e){if(typeof e=="string")return ws(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ws(e,t)}}function ws(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zS(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(u){i=!0,s=u}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function BS(e){if(Array.isArray(e))return e}function ip(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function De(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ip(Object(n),!0).forEach(function(r){Cs(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ip(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ko(e,t){if(e==null)return{};var n=HS(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function HS(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Ss=_.forwardRef(function(e,t){var n=e.children,r=Ko(e,FS),o=sp(r),i=o.open,a=Ko(o,DS);return _.useImperativeHandle(t,function(){return{open:i}},[i]),_.createElement(_.Fragment,null,n(De(De({},a),{},{open:i})))});Ss.displayName="Dropzone";var ap={disabled:!1,getFilesFromEvent:tS,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};Ss.defaultProps=ap,Ss.propTypes={children:Ne.func,accept:Ne.objectOf(Ne.arrayOf(Ne.string)),multiple:Ne.bool,preventDropOnDocument:Ne.bool,noClick:Ne.bool,noKeyboard:Ne.bool,noDrag:Ne.bool,noDragEventsBubbling:Ne.bool,minSize:Ne.number,maxSize:Ne.number,maxFiles:Ne.number,disabled:Ne.bool,getFilesFromEvent:Ne.func,onFileDialogCancel:Ne.func,onFileDialogOpen:Ne.func,useFsAccessApi:Ne.bool,autoFocus:Ne.bool,onDragEnter:Ne.func,onDragLeave:Ne.func,onDragOver:Ne.func,onDrop:Ne.func,onDropAccepted:Ne.func,onDropRejected:Ne.func,onError:Ne.func,validator:Ne.func};var Es={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function sp(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=De(De({},ap),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,u=t.maxFiles,c=t.onDragEnter,d=t.onDragLeave,g=t.onDragOver,m=t.onDrop,f=t.onDropAccepted,v=t.onDropRejected,h=t.onFileDialogCancel,y=t.onFileDialogOpen,b=t.useFsAccessApi,w=t.autoFocus,C=t.preventDropOnDocument,E=t.noClick,x=t.noKeyboard,O=t.noDrag,I=t.noDragEventsBubbling,L=t.onError,H=t.validator,D=_.useMemo(function(){return NS(n)},[n]),G=_.useMemo(function(){return PS(n)},[n]),U=_.useMemo(function(){return typeof y=="function"?y:lp},[y]),Z=_.useMemo(function(){return typeof h=="function"?h:lp},[h]),k=_.useRef(null),$=_.useRef(null),F=_.useReducer(US,Es),q=bs(F,2),P=q[0],j=q[1],A=P.isFocused,B=P.isFileDialogActive,Q=_.useRef(typeof window<"u"&&window.isSecureContext&&b&&AS()),re=function(){!Q.current&&B&&setTimeout(function(){if($.current){var Y=$.current.files;Y.length||(j({type:"closeDialog"}),Z())}},300)};_.useEffect(function(){return window.addEventListener("focus",re,!1),function(){window.removeEventListener("focus",re,!1)}},[$,B,Z,Q]);var ee=_.useRef([]),ce=function(Y){k.current&&k.current.contains(Y.target)||(Y.preventDefault(),ee.current=[])};_.useEffect(function(){return C&&(document.addEventListener("dragover",tp,!1),document.addEventListener("drop",ce,!1)),function(){C&&(document.removeEventListener("dragover",tp),document.removeEventListener("drop",ce))}},[k,C]),_.useEffect(function(){return!r&&w&&k.current&&k.current.focus(),function(){}},[k,w,r]);var oe=_.useCallback(function(z){L?L(z):console.error(z)},[L]),ae=_.useCallback(function(z){z.preventDefault(),z.persist(),V(z),ee.current=[].concat($S(ee.current),[z.target]),Go(z)&&Promise.resolve(o(z)).then(function(Y){if(!(qo(z)&&!I)){var xe=Y.length,we=xe>0&&SS({files:Y,accept:D,minSize:a,maxSize:i,multiple:s,maxFiles:u,validator:H}),Fe=xe>0&&!we;j({isDragAccept:we,isDragReject:Fe,isDragActive:!0,type:"setDraggedFiles"}),c&&c(z)}}).catch(function(Y){return oe(Y)})},[o,c,oe,I,D,a,i,s,u,H]),de=_.useCallback(function(z){z.preventDefault(),z.persist(),V(z);var Y=Go(z);if(Y&&z.dataTransfer)try{z.dataTransfer.dropEffect="copy"}catch{}return Y&&g&&g(z),!1},[g,I]),ue=_.useCallback(function(z){z.preventDefault(),z.persist(),V(z);var Y=ee.current.filter(function(we){return k.current&&k.current.contains(we)}),xe=Y.indexOf(z.target);xe!==-1&&Y.splice(xe,1),ee.current=Y,!(Y.length>0)&&(j({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Go(z)&&d&&d(z))},[k,d,I]),le=_.useCallback(function(z,Y){var xe=[],we=[];z.forEach(function(Fe){var sn=Qf(Fe,D),Re=bs(sn,2),Mt=Re[0],En=Re[1],Be=ep(Fe,a,i),$t=bs(Be,2),Wt=$t[0],Yn=$t[1],_e=H?H(Fe):null;if(Mt&&Wt&&!_e)xe.push(Fe);else{var ln=[En,Yn];_e&&(ln=ln.concat(_e)),we.push({file:Fe,errors:ln.filter(function(ni){return ni})})}}),(!s&&xe.length>1||s&&u>=1&&xe.length>u)&&(xe.forEach(function(Fe){we.push({file:Fe,errors:[CS]})}),xe.splice(0)),j({acceptedFiles:xe,fileRejections:we,isDragReject:we.length>0,type:"setFiles"}),m&&m(xe,we,Y),we.length>0&&v&&v(we,Y),xe.length>0&&f&&f(xe,Y)},[j,s,D,a,i,u,m,f,v,H]),Ce=_.useCallback(function(z){z.preventDefault(),z.persist(),V(z),ee.current=[],Go(z)&&Promise.resolve(o(z)).then(function(Y){qo(z)&&!I||le(Y,z)}).catch(function(Y){return oe(Y)}),j({type:"reset"})},[o,le,oe,I]),K=_.useCallback(function(){if(Q.current){j({type:"openDialog"}),U();var z={multiple:s,types:G};window.showOpenFilePicker(z).then(function(Y){return o(Y)}).then(function(Y){le(Y,null),j({type:"closeDialog"})}).catch(function(Y){kS(Y)?(Z(Y),j({type:"closeDialog"})):OS(Y)?(Q.current=!1,$.current?($.current.value=null,$.current.click()):oe(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."))):oe(Y)});return}$.current&&(j({type:"openDialog"}),U(),$.current.value=null,$.current.click())},[j,U,Z,b,le,oe,G,s]),Ee=_.useCallback(function(z){!k.current||!k.current.isEqualNode(z.target)||(z.key===" "||z.key==="Enter"||z.keyCode===32||z.keyCode===13)&&(z.preventDefault(),K())},[k,K]),We=_.useCallback(function(){j({type:"focus"})},[]),qe=_.useCallback(function(){j({type:"blur"})},[]),It=_.useCallback(function(){E||(TS()?setTimeout(K,0):K())},[E,K]),st=function(Y){return r?null:Y},S=function(Y){return x?null:st(Y)},N=function(Y){return O?null:st(Y)},V=function(Y){I&&Y.stopPropagation()},ne=_.useMemo(function(){return function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Y=z.refKey,xe=Y===void 0?"ref":Y,we=z.role,Fe=z.onKeyDown,sn=z.onFocus,Re=z.onBlur,Mt=z.onClick,En=z.onDragEnter,Be=z.onDragOver,$t=z.onDragLeave,Wt=z.onDrop,Yn=Ko(z,IS);return De(De(Cs({onKeyDown:S(kt(Fe,Ee)),onFocus:S(kt(sn,We)),onBlur:S(kt(Re,qe)),onClick:st(kt(Mt,It)),onDragEnter:N(kt(En,ae)),onDragOver:N(kt(Be,de)),onDragLeave:N(kt($t,ue)),onDrop:N(kt(Wt,Ce)),role:typeof we=="string"&&we!==""?we:"presentation"},xe,k),!r&&!x?{tabIndex:0}:{}),Yn)}},[k,Ee,We,qe,It,ae,de,ue,Ce,x,O,r]),J=_.useCallback(function(z){z.stopPropagation()},[]),X=_.useMemo(function(){return function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Y=z.refKey,xe=Y===void 0?"ref":Y,we=z.onChange,Fe=z.onClick,sn=Ko(z,MS),Re=Cs({accept:D,multiple:s,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:st(kt(we,Ce)),onClick:st(kt(Fe,J)),tabIndex:-1},xe,$);return De(De({},Re),sn)}},[$,n,s,Ce,r]);return De(De({},P),{},{isFocused:A&&!r,getRootProps:ne,getInputProps:X,rootRef:k,inputRef:$,open:st(K)})}function US(e,t){switch(t.type){case"focus":return De(De({},e),{},{isFocused:!0});case"blur":return De(De({},e),{},{isFocused:!1});case"openDialog":return De(De({},Es),{},{isFileDialogActive:!0});case"closeDialog":return De(De({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return De(De({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return De(De({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return De({},Es);default:return e}}function lp(){}const WS=({onFilesSelected:e,children:t})=>{const[n,r]=_.useState(!1),{getRootProps:o,getInputProps:i}=sp({noClick:!0,onDrop:a=>{if(a&&a.length>0)if(a[0].path.split("/").length>2){const u=a.map(c=>{const g=(c.path||c.relativePath||"").split("/").slice(1).join("/");return(!c.webkitRelativePath||c.webkitRelativePath==="")&&Object.defineProperty(c,"webkitRelativePath",{writable:!0,value:g,enumerable:!0,configurable:!0}),c});e(u,"folder")}else e(a,"files");r(!1)},onDragOver:a=>{a.preventDefault(),n||r(!0)},multiple:!0});return _.useEffect(()=>{const a=s=>{s.clientX===0&&s.clientY===0&&r(!1)};return document.addEventListener("dragleave",a),()=>{document.removeEventListener("dragleave",a)}},[]),l.jsxs("div",{...o(),className:"transition-opacity min-h-[600px]",children:[n?l.jsx("div",{className:"flex flex-col items-center justify-center p-4 border-2 border-dashed border-gray-300 rounded-lg bg-gray-50 h-screen"}):t,l.jsx("input",{...i()})]})},qS=({openDialogRename:e,setOpenDialogRename:t,apiBaseUrl:n,setFileToMove:r,fileToMove:o,refreshFiles:i,ignoreCache:a})=>{var w;const[s,u]=_.useState({}),[c,d]=_.useState(!1),[g,m]=_.useState(!1),[f,v]=_.useState(""),{toast:h}=ko();_.useEffect(()=>{e&&y(f)},[f,e]);const y=async C=>{try{m(!0);const E=await me.get(`${n}/api/list-s3-folders?prefix=${C}`);u(E==null?void 0:E.data)}catch{h({title:"Error",description:"Unable to load S3 folder list",variant:"destructive"})}finally{m(!1)}},b=async()=>{d(!0);try{const C=o.key,E=C.endsWith("/")?C:`${C}/`,x=f.endsWith("/")?f:`${f}/`;if(E===x||C===f){h({title:"Lỗi",description:"Không thể di chuyển file đến cùng vị trí",variant:"destructive"}),d(!1);return}await me.post(`${n}/api/move`,{oldPath:C,newPath:f}),a.current=!0,await i(),h({title:"Đã di chuyển",description:`Đã di chuyển thành công "${o.name}" đến "${f}"`}),t(!1),r(null),v("")}catch(C){console.error("Error renaming item:",C),h({title:"Lỗi",description:"Không thể đổi tên",variant:"destructive"})}finally{d(!1)}};return l.jsx(jt,{open:e,onOpenChange:C=>{C||(t(!1),r(null),v(""))},children:l.jsxs(St,{className:"max-h-[700px] pb-3 px-1 s3-explr-input-group max-w-5xl w-[90%] p-6 bg-white rounded-lg shadow-lg",children:[l.jsxs(Et,{className:"mb-4 w-full h-full",children:[l.jsx("nav",{className:"mb-4",children:l.jsxs("ul",{className:"flex items-center space-x-2 text-sm text-gray-600",children:[l.jsx("li",{className:"cursor-pointer hover:text-blue-600 transition-colors",onClick:()=>v(""),children:"Root"}),f.split("/").map((C,E,x)=>l.jsx("li",{className:"cursor-pointer hover:text-blue-600 transition-colors",onClick:()=>v(C==="Root"?"":x.slice(0,E+1).join("/")+"/"),children:C},E))]})}),l.jsxs(_t,{className:"text-xl font-semibold text-gray-800",children:["Di chuyển"," ",l.jsxs("span",{className:"text-sm text-gray-500",children:["( file Hoặc folder sẽ được di chuyển đến thư mục"," ",f===""?"Root":f," )"]})]}),l.jsx(Rn,{className:"text-gray-600 w-full h-[50dvh] max-h-[500px] overflow-hidden overflow-y-auto",children:g?l.jsx("div",{className:"flex justify-center items-center py-4",children:l.jsx("div",{className:"loader ease-linear rounded-full border-4 border-t-4 border-gray-200 h-12 w-12"})}):l.jsx("ul",{className:"space-y-2",children:(w=Object.keys(s))==null?void 0:w.map(C=>l.jsx("li",{className:"cursor-pointer hover:bg-gray-100 p-2 rounded transition-colors",onClick:()=>v(C),children:C},C))})})]}),l.jsxs(hn,{className:"flex justify-end space-x-2",children:[l.jsx(ve,{variant:"outline",onClick:()=>t(!1),className:"px-4 py-2 rounded border border-gray-300 text-gray-700 hover:bg-gray-100 transition-colors",children:"Cancel"}),l.jsx(ve,{onClick:b,disabled:c,className:"s3-explr-crawl-btn",children:"Move"})]})]})})},GS="AIzaSyBI8KiTWudkw8iR5cjH7ZsA4JBN1NqJw8A",KS="726815747852-5deq413t8kd8j3mgj48d46eatjauapq5.apps.googleusercontent.com",YS="https://www.googleapis.com/auth/drive";Kt(me,{retries:3});const Qe={current:!1},cp="crawl:jobs",Gn="crawl:current_job",XS=e=>{const[t,n]=_.useState(null),[r,o]=_.useState(0);return _.useEffect(()=>{const i=localStorage.getItem(Gn);if(i){const a=JSON.parse(i);n(a),a!=null&&a.startTime&&o(Math.floor((Date.now()-a.startTime)/1e3))}},[]),_.useEffect(()=>{if(!(t!=null&&t.startTime))return;const i=setInterval(()=>{o(Math.floor((Date.now()-t.startTime)/1e3))},1e3);return()=>clearInterval(i)},[t==null?void 0:t.startTime]),_.useEffect(()=>{if(!(t!=null&&t.id))return;const i=async()=>{try{const u=(await me.get(`${e}/api/crawl/${t.id}?taskId=${t.taskId}`)).data;n(c=>{if(!c)return null;const d={...c,status:u};return localStorage.setItem(Gn,JSON.stringify(d)),(u.status==="completed"||u.status==="failed")&&setTimeout(()=>{n(null),localStorage.removeItem(Gn)},100),d})}catch(s){console.error("Error polling job status:",s)}},a=setInterval(i,3e3);return i(),()=>clearInterval(a)},[t==null?void 0:t.id,e]),{currentJob:t,elapsedTime:r,setCurrentJob:i=>{i&&!i.startTime&&(i.startTime=Date.now()),n(i),i?localStorage.setItem(Gn,JSON.stringify(i)):localStorage.removeItem(Gn)}}},Yo=(e,t)=>{const n=[],r=o=>{(e[o]||[]).forEach(a=>{n.push(a.key),a.isFolder&&r(a.key)})};return r(t),n},JS=(e,t)=>{const n=[];return(e[t]||[]).forEach(o=>{n.push(o.key),o.isFolder&&n.push(...Yo(e,o.key))}),n},ZS=(e,t,n=[],r,o,i)=>{const[a,s]=_.useState({}),[u,c]=_.useState(!1),[d,g]=_.useState(null),[m,f]=_.useState(0),v=_.useRef(t);_.useEffect(()=>{v.current=t},[t]);const h=async()=>{c(!0);try{const b=await me.get(`${e}/api/files`,{params:{cache:!1,displayPrefixes:JSON.stringify(n),prefix:v.current},timeout:3e5});s(b.data),g(null)}catch(b){g(b instanceof Error?b:new Error("Failed to fetch files"))}finally{c(!1),f(0),i("")}},y=async b=>{var w,C;try{if(!b)return;c(!0);const E=await me.get(`${e}/api/search-db?query=${b}&rootPrefix=${t}&offset=${(o-1)*20}&limit=20`,{timeout:3e5});return s({[t]:((w=E==null?void 0:E.data)==null?void 0:w.result)||[]}),f(((C=E==null?void 0:E.data)==null?void 0:C.estimatedTotalHits)||0),E}catch(E){g(E instanceof Error?E:new Error("Failed to fetch files"))}finally{c(!1)}};return _.useEffect(()=>{!r&&!u&&h(),r&&!u&&y(r)},[r,o]),{data:a,isLoading:u,error:d,estimatedTotalHits:m,refetch:h}},br=e=>{var r,o,i;const t=((i=(o=(r=e==null?void 0:e.name)==null?void 0:r.split("."))==null?void 0:o.pop())==null?void 0:i.toLowerCase())??"";return["txt","md","json","js","ts","jsx","tsx","css","html","xml","yaml","yml"].includes(t||"")},QS=_.memo(({homeLabel:e="Kho tài liệu",apiBaseUrl:t="https://cdct-s3-explorer.cagent.cmcts.ai",rootPrefix:n="",asSelector:r=!1,onSelected:o=s=>console.log("Đã chọn:",s),displayPrefixes:i,preSelectedFiles:a})=>{var $p;const[s,u]=_.useState([]),[c,d]=_.useState(""),[g,m]=_.useState(new Set(a)),[f,v]=_.useState(n),[h,y]=_.useState(""),[b,w]=_.useState(!1),[C,E]=_.useState(""),[x,O]=_.useState(!1),[I,L]=_.useState(null),[H,D]=_.useState(null),[G,U]=_.useState(!1),[Z,k]=_.useState(!1),[$,F]=_.useState(null),q=_.useRef(null),{toast:P}=ko(),[j,A]=_.useState(null),[B,Q]=_.useState(null),[re,ee]=_.useState(""),[ce,oe]=_.useState(!1),[ae,de]=_.useState(!1),[ue,le]=_.useState(new Set),[Ce,K]=_.useState(""),[Ee,We]=_.useState(!1),[qe,It]=_.useState(!1),[st,S]=_.useState("rename"),[N,V]=_.useState(!1),[ne,J]=_.useState(""),[X,z]=_.useState("1"),[Y,xe]=_.useState(!1),[we,Fe]=_.useState(!1),[sn,Re]=_.useState(!1),[Mt,En]=_.useState(!1),[Be,$t]=_.useState(1),[Wt,Yn]=_.useState(!1),{currentJob:_e,elapsedTime:ln,setCurrentJob:ni}=XS(t),[cn,_r]=_.useState(null),[Tr,ri]=_.useState(""),[_E,Ar]=_.useState(!1),[Ds,kp]=_.useState(!1),[TE,AE]=_.useState(""),PE=new URL(window.location.href).searchParams.get("prefix")||""||h||n,[b_,NE]=_.useState(null),{data:Lt,isLoading:Pr,error:kE,estimatedTotalHits:Nr,refetch:tt}=ZS(t,PE,i,c,Be,d),OE=rg({onSuccess:T=>{NE(T.access_token),localStorage.setItem("google_access_token",T.access_token),FE(T.access_token)},onError:()=>{console.log("Đăng nhập thất bại!")},scope:YS}),FE=T=>{const M=document.createElement("script");M.src="https://apis.google.com/js/api.js",M.onload=()=>{window.gapi.load("picker",()=>DE(T))},document.body.appendChild(M)},DE=T=>{const M=new window.google.picker.DocsView(window.google.picker.ViewId.DOCS).setIncludeFolders(!0).setSelectFolderEnabled(!0).setOwnedByMe(!1),W=new window.google.picker.DocsView(window.google.picker.ViewId.DRIVE).setIncludeFolders(!0).setSelectFolderEnabled(!0);new window.google.picker.PickerBuilder().setDeveloperKey(GS).setOAuthToken(T).enableFeature(window.google.picker.Feature.MULTISELECT_ENABLED).setLocale("vi").addView(M).addView(W).setCallback(async ie=>{if(ie.action===window.google.picker.Action.PICKED){const ge=ie.docs.map(Se=>({id:Se.id,name:Se.name,mimeType:Se.mimeType}));await IE(ge,f)}}).build().setVisible(!0)},IE=async(T,M="")=>{const W=localStorage.getItem("google_access_token");if(!W){console.error("❌ Không tìm thấy access token. Vui lòng đăng nhập lại."),Pe.error("Không tìm thấy access token. Vui lòng đăng nhập lại.",{position:"bottom-right"});return}const te=Pe.loading("Đang đồng bộ...",{position:"bottom-right",autoClose:!1});try{const ie={prefix:M,folders:[],files:[]};T.forEach(Se=>{Se.mimeType==="application/vnd.google-apps.folder"?ie.folders.push({id:Se.id,name:Se.name}):ie.files.push({id:Se.id,name:Se.name})});const ge=await me.post(`${t}/api/sync-drive-to-s3`,ie,{headers:{Authorization:`Bearer ${W}`}});Qe.current=!0,tt(),Pe.update(te,{render:`Đồng bộ thành công! Đã tải lên ${ge.data.uploadedKeys.length} file.`,type:"success",isLoading:!1,autoClose:3e3,position:"bottom-right"})}catch(ie){console.error("❌ Lỗi khi đồng bộ file từ Google Drive:",ie),Pe.update(te,{render:"Không thể đồng bộ file từ Google Drive.",type:"error",isLoading:!1,autoClose:3e3,position:"bottom-right"})}};_.useEffect(()=>{const T=M=>{if(M.data.action==="logout"){const W=document.createElement("iframe");W.style.display="none",W.src="https://accounts.google.com/Logout",document.body.appendChild(W),setTimeout(()=>document.body.removeChild(W),2e3)}};return window.addEventListener("message",T),()=>window.removeEventListener("message",T)},[]),_.useEffect(()=>{const T=new Set(a);m(T)},[]),_.useEffect(()=>{_e!=null&&_e.status&&(_e.status.status==="completed"?(P({title:"Thu thập website hoàn tất",description:`Đã thu thập thành công ${_e.url} với ${_e.status.completed} trang`}),Qe.current=!0,tt()):_e.status.status==="failed"&&P({title:"Thu thập website thất bại",description:`Không thể thu thập ${_e.url}. Vui lòng thử lại.`,variant:"destructive"}))},[($p=_e==null?void 0:_e.status)==null?void 0:$p.status]);const Op=_.useMemo(()=>Lt[f]||[],[Lt,f]),un=_.useMemo(()=>Op,[Op,f,Lt]),kr=_.useMemo(()=>{const T={};return un.forEach((M,W)=>{g.has(M.key)&&(T[W]=!0)}),T},[g,un]),ME=T=>{const M=Yo(Lt,T);if(M.length===0)return g.has(T)?"all":"none";const W=M.filter(te=>g.has(te)).length;return W===0?"none":W===M.length?"all":"partial"},Xn=(T,M=!0)=>{if(console.log("🚀 ~ Home.tsx:620 ~ handleFolderClick ~ currentPrefix:",{currentPrefix:f,prefix:T,forcePrefix:h}),f!==T&&(Yn(!0),y(T),v(T),a||m(new Set),M)){const W=window.location.pathname==="/"?"":window.location.pathname,te=T?`${window.location.origin}${W}?prefix=${encodeURIComponent(T)}`:`${window.location.origin}${W}`;window.history.pushState({path:te},"",te)}};_.useEffect(()=>{Wt&&(Qe.current=!0,tt().finally(()=>Yn(!1)))},[Wt]);const $E=async(T,M)=>{var W,te;O(!0);try{if(un.some(Ye=>Ye.isFolder&&Ye.name.toLowerCase()===T.toLowerCase())){P({title:"Lỗi",description:`Thư mục "${T}" đã tồn tại trong thư mục hiện tại.`,variant:"destructive"}),O(!1);return}const ge=`${M}${T}/`;if((await me.post(`${t}/api/create-folder`,{prefix:ge})).status!==200){P({title:"Lỗi",description:"Không thể tạo thư mục",variant:"destructive"});return}Qe.current=!0,await tt(),P({title:"Đã tạo thư mục",description:`Đã tạo thành công thư mục "${T}"`}),E(""),w(!1)}catch(ie){console.error("Error creating folder:",ie);const ge=((te=(W=ie==null?void 0:ie.response)==null?void 0:W.data)==null?void 0:te.error)||"Không thể tạo thư mục";P({title:"Lỗi",description:ge,variant:"destructive"})}finally{O(!1)}},Is=async(T,M,W)=>{var te,ie,ge,Se,Ye,Jn,Lp,Rp,Vp;F(W),Re(!0);try{if(Array.from(T).reduce((Xe,Dr)=>Xe+Dr.size,0)>=100*1024*1024){P({title:"Lỗi",description:"Tổng kích thước các tập tin vượt quá 100 MB",variant:"destructive"}),F(null),Re(!1);return}const ii=Array.from(T).filter(Xe=>Xe.size===0);if(ii.length>0){const Xe=ii.map(Dr=>Dr.name).join(", ");P({title:"Lỗi tải lên",description:`Không thể tải lên tập tin rỗng: ${Xe}`,variant:"destructive"}),Re(!1),F(null);return}let Fr=localStorage.getItem("dataLogin"),Zn;try{Fr&&(Fr=JSON.parse(Fr),Zn=Fr.user)}catch{Fr=null}const _n=new FormData;if(Zn!=null&&Zn.id&&_n.append("metadata",JSON.stringify({creator:Zn.username,creatorId:Zn.id,DataSource:"Tệp tải lên"})),W==="folder"&&T[0]){const Xe=T[0].webkitRelativePath.split("/")[0];Xe&&_n.append("folderName",Xe)}_n.append("prefix",M),Array.from(T).forEach(Xe=>W==="folder"?_n.append("files",Xe,Xe.webkitRelativePath):_n.append("files",Xe)),Qe.current=!0;const ze=await me.post(`${t}/api/check-files-existed`,_n,{headers:{"Content-Type":"multipart/form-data"}});if(((te=ze==null?void 0:ze.data)==null?void 0:te.status)===200)await me.post(`${t}/api/upload`,_n,{headers:{"Content-Type":"multipart/form-data"}}),d(""),y(M),setTimeout(async()=>{F(null),await tt(),Re(!1)},500);else{if(((ge=(ie=ze==null?void 0:ze.data)==null?void 0:ie.names)==null?void 0:ge.length)>0&&!((Se=ze==null?void 0:ze.data)!=null&&Se.isFolder)){const Xe=Array.from(T).filter(Dr=>ze.data.names.includes(Dr.name));_r(Xe),Ar(!0)}(Ye=ze==null?void 0:ze.data)!=null&&Ye.isFolder&&((Jn=ze==null?void 0:ze.data)!=null&&Jn.name)&&(ri((Lp=ze==null?void 0:ze.data)==null?void 0:Lp.name),_r(T),Ar(!0))}}catch(Or){console.error("Lỗi tải lên:",Or);const ii=((Vp=(Rp=Or==null?void 0:Or.response)==null?void 0:Rp.data)==null?void 0:Vp.error)||"Không thể tải lên tập tin";P({title:"Lỗi",description:ii,variant:"destructive"}),F(null),Re(!1)}},LE=async()=>{var T,M;try{Re(!0);const W=new FormData;if(cn){F(Tr?"folder":"files"),Ar(!1);let te=localStorage.getItem("dataLogin"),ie;try{te&&(te=JSON.parse(te),ie=te.user)}catch{te=null}if(ie!=null&&ie.id&&(console.log("🚀 ~ uploadFiles ~ user:",ie),W.append("metadata",JSON.stringify({creator:ie.username,creatorId:ie.id,DataSource:"Tệp tải lên"}))),Tr&&cn[0]){const ge=cn[0].webkitRelativePath.split("/")[0];ge&&W.append("folderName",ge)}W.append("prefix",f),Array.from(cn).forEach(ge=>Tr&&cn[0]?W.append("files",ge,ge.webkitRelativePath):W.append("files",ge)),ie!=null&&ie.id&&W.append("metadata",JSON.stringify({creator:ie.username,creatorId:ie.id,DataSource:"Tệp tải lên"})),await me.post(`${t}/api/upload`,W,{headers:{"Content-Type":"multipart/form-data"}}),d(""),y(f),Qe.current=!0}}catch(W){console.error("Lỗi tải lên:",W);const te=((M=(T=W==null?void 0:W.response)==null?void 0:T.data)==null?void 0:M.error)||"Không thể tải lên tập tin";P({title:"Lỗi",description:te,variant:"destructive"})}finally{setTimeout(async()=>{F(null),await tt(),Re(!1),ri(""),_r(null)},500)}},RE=async T=>{var M;try{if(await me.delete(`${t}/api/files`,{data:{paths:[T.key]}}),g.has(T.key)){const te=new Set(g);te.delete(T.key),m(te)}const W=((M=T.key)==null?void 0:M.replace(/^(.*?)(\/.*)?$/,(te,ie,ge)=>!ge||ge==="/"?"":ie+"/"))||"";y(W),Qe.current=!0,P({title:"Đã xóa tập tin",description:`Đã xóa thành công "${T.name}"`}),L(null)}catch(W){console.error("Error deleting file:",W),P({title:"Lỗi",description:"Không thể xóa tập tin",variant:"destructive"})}finally{En(!1),await tt()}},oi=T=>{const M=new Set(g),W=typeof T=="function"?T(kr):T;new Set(Object.keys(kr).map(Number)).forEach(ie=>{const ge=un[ie];ge&&(W[ie]||(M.delete(ge.key),ge.isFolder&&Yo(Lt,ge.key).forEach(Se=>M.delete(Se))))}),Object.entries(W).forEach(([ie,ge])=>{const Se=parseInt(ie),Ye=un[Se];Ye&&ge&&(M.add(Ye.key),Ye.isFolder&&Yo(Lt,Ye.key).forEach(Jn=>M.add(Jn)))}),m(M)},VE=async()=>{var T;U(!0);try{const M=Array.from(g),W=M.map(ie=>Object.values(Lt).flat().find(ge=>ge.key===ie)).filter(ie=>ie!==void 0);if(W.length===0){P({title:"Lỗi",description:"Không có tập tin nào được chọn để xóa",variant:"destructive"});return}await me.delete(`${t}/api/files`,{data:{paths:M}});const te=((T=W[0])==null?void 0:T.key.replace(/^(.*?)(\/.*)?$/,(ie,ge,Se)=>!Se||Se==="/"?"":ge+"/"))||"";y(te),Qe.current=!0,tt(),P({title:"Đã xóa tập tin",description:`Đã xóa thành công ${W.length} mục`}),k(!1),m(new Set)}catch(M){console.error("Error deleting files:",M),P({title:"Lỗi",description:"Không thể xóa các tập tin đã chọn",variant:"destructive"})}finally{U(!1)}},jE=async(T,M)=>{if(!f.trim()){P({title:"Lỗi",description:"Không thể đổi tên tập tin hoặc thư mục ở thư mục gốc. Chỉ có thể xóa.",variant:"destructive"});return}de(!0);try{const W=T.key;let te;T.isFolder?te=W.split("/").slice(0,-2).join("/")+"/":te=W.substring(0,W.lastIndexOf("/")+1);const ie=te+M+(T.isFolder?"/":"");await me.post(`${t}/api/rename`,{oldPath:W,newPath:ie}),Qe.current=!0,await tt(),P({title:"Đã đổi tên",description:`Đã đổi tên thành công "${T.name}" thành "${M}"`}),A(null),ee(""),Q(null)}catch(W){console.error("Error renaming item:",W),P({title:"Lỗi",description:"Không thể đổi tên",variant:"destructive"})}finally{de(!1)}},Fp=async T=>{le(M=>new Set([...M,...T]));try{const M=await me.post(`${t}/api/download`,{paths:T},{responseType:"blob"}),W=window.URL.createObjectURL(M.data),te=document.createElement("a");te.href=W;const ie=M.headers["Content-Disposition"]||M.headers["content-disposition"],ge=ie==null?void 0:ie.match(/filename="(.+)"/),Se=ge?decodeURIComponent(ge[1]):"download.zip";te.setAttribute("download",Se),document.body.appendChild(te),te.click(),document.body.removeChild(te),window.URL.revokeObjectURL(W),P({title:"Bắt đầu tải xuống",description:`Đã bắt đầu tải xuống ${T.length} mục${T.length>1,""}`})}catch(M){console.error("Error downloading files:",M),P({title:"Lỗi",description:"Không thể tải xuống tập tin",variant:"destructive"})}finally{le(M=>{const W=new Set(M);return T.forEach(te=>W.delete(te)),W})}},Dp=f?f.replace(n,"").split("/").filter(Boolean):[],zE=()=>Array.from(g).map(T=>{var M;for(const W in Lt){const te=(M=Lt[W])==null?void 0:M.find(ie=>ie.key===T);if(te)return te}return null}).filter(T=>T!==null),Ip=_.useMemo(()=>{const T=[{id:"select",header:()=>{const M=JS(Lt,f),W=M.length>0&&M.every(ie=>g.has(ie)),te=M.some(ie=>g.has(ie));return l.jsx(na,{checked:W?!0:te?"indeterminate":!1,onCheckedChange:ie=>{if(ie){const ge=un.reduce((Se,Ye,Jn)=>(Se[Jn]=!0,Se),{});oi(ge)}else oi({})},"aria-label":"Chọn tất cả"})},cell:({row:M})=>{const W=M.original,ie=W.isFolder?ME(W.key):g.has(W.key)?"all":"none";return l.jsx("div",{className:"flex items-center",children:l.jsx(na,{checked:ie==="partial"?"indeterminate":ie==="all",onCheckedChange:ge=>{const Se={...kr};ge?Se[M.index]=!0:delete Se[M.index],oi(Se)},"aria-label":"Chọn dòng"})})},enableSorting:!1},{id:"fileName",header:({column:M})=>l.jsxs(ve,{variant:"ghost",onClick:()=>M.toggleSorting(M.getIsSorted()==="asc"),children:["Tên tập tin",l.jsx(Bi,{})]}),accessorKey:"name",cell:({row:M})=>{const W=M.original,te=W.key.substring(0,W.key.lastIndexOf("/"))||"/",ie=c.trim()!==""&&te!==f,ge=te.split("/").filter(Boolean);return l.jsxs("div",{className:"flex flex-col",children:[l.jsxs("div",{className:`flex items-center gap-2 ${W.isFolder?"cursor-pointer hover:text-blue-600":""}`,onClick:()=>{W.isFolder&&(a||m(new Set),Xn(W.key))},children:[W.isFolder?l.jsx(li,{className:"h-5 w-5 text-blue-500"}):null,W.name]}),ie&&l.jsxs("div",{className:"text-sm text-gray-500 flex items-center",children:[l.jsx(li,{className:"h-4 w-4 text-gray-500 my-auto"}),l.jsxs("span",{className:"flex items-center ml-1",children:[l.jsx("span",{className:"cursor-pointer hover:text-blue-600",onClick:()=>{Xn("")},children:"/"}),ge.map((Se,Ye)=>l.jsxs("span",{className:"flex items-center",children:[l.jsx("span",{className:"cursor-pointer hover:text-blue-600",onClick:()=>{Xn(ge.slice(0,Ye+1).join("/")+"/")},children:Se}),Ye<ge.length-1&&l.jsx("span",{children:"/"})]},Ye))]})]})]})}}];return r||T.push({id:"size",header:({column:M})=>l.jsxs(ve,{variant:"ghost",onClick:()=>M.toggleSorting(M.getIsSorted()==="asc"),children:["Kích thước",l.jsx(Bi,{})]}),accessorKey:"size",cell:({getValue:M,row:W})=>{const te=M();return l.jsx("span",{children:W.original.isFolder?"-":Ov(te)})}},{id:"lastModified",header:({column:M})=>l.jsxs(ve,{variant:"ghost",onClick:()=>M.toggleSorting(M.getIsSorted()==="asc"),className:"px-0 w-full flex-row justify-end",children:["Sửa đổi lần cuối",l.jsx(Bi,{})]}),accessorKey:"lastModified",cell:({row:M})=>{const W=M.original.lastModified;return l.jsx("div",{className:"w-full flex-row justify-end items-center text-right",children:l.jsx("span",{children:W&&Hl(W).isValid()?Hl(W).format("DD/MM/YYYY HH:mm"):"-"})})},size:200},{id:"actions",header:()=>l.jsx("span",{children:"Hành động"}),accessorKey:"key",cell:({row:M})=>l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(xn,{children:l.jsxs(bn,{children:[l.jsx(wn,{asChild:!0,children:l.jsx(ve,{variant:"ghost",size:"icon",onClick:()=>Fp([M.original.key]),className:"h-8 w-8 p-0",disabled:ue.has(M.original.key),children:ue.has(M.original.key)?l.jsx($e,{className:"h-4 w-4 animate-spin"}):l.jsx(Ls,{className:"h-4 w-4"})})}),l.jsx(on,{children:"Tải xuống"})]})}),f.trim()!==""&&l.jsx(xn,{children:l.jsxs(bn,{children:[l.jsx(wn,{asChild:!0,children:l.jsx(ve,{variant:"ghost",size:"icon",onClick:()=>{A(M.original),ee(M.original.name)},className:"h-8 w-8 p-0",children:l.jsx(Xp,{className:"h-4 w-4"})})}),l.jsx(on,{children:"Đổi tên"})]})}),l.jsx(xn,{children:l.jsxs(bn,{children:[l.jsx(wn,{asChild:!0,children:l.jsx(ve,{variant:"ghost",size:"icon",onClick:()=>{oe(!0),D(M.original)},className:"h-8 w-8 p-0",children:l.jsx(Fh,{className:"h-4 w-4"})})}),l.jsx(on,{children:"Di chuyển"})]})}),l.jsx(xn,{children:l.jsxs(bn,{children:[l.jsx(wn,{asChild:!0,children:l.jsx(ve,{variant:"ghost",size:"icon",onClick:()=>L(M.original),className:"h-8 w-8 p-0",children:l.jsx(Rs,{className:"h-4 w-4"})})}),l.jsx(on,{children:"Xóa"})]})})]})}),T},[g,un,kr,ue,r]),Ms=Zs({data:un,columns:Ip,state:{rowSelection:kr,sorting:s},onSortingChange:u,enableRowSelection:!0,onRowSelectionChange:oi,getCoreRowModel:Js(),getSortedRowModel:$g()}),BE=async T=>{var M,W;We(!0);try{if(br(T)){const te=await me.get(`${t}/api/read-text`,{params:{path:T.key}});K(te.data.content)}try{const te=await me.get(`${t}/api/read-json`,{params:{path:T.key+".metadata.json"}}),ie=((W=(M=te==null?void 0:te.data)==null?void 0:M.content)==null?void 0:W.metadataAttributes)||null;return Q({fullPath:j==null?void 0:j.key,...ie})}catch{return Q("Lỗi phân tích siêu dữ liệu")}}catch(te){console.error("Error loading file content:",te),P({title:"Lỗi",description:"Không thể tải nội dung tập tin",variant:"destructive"})}finally{We(!1)}},HE=async(T,M)=>{It(!0);try{await me.post(`${t}/api/modify-text`,{path:T.key,content:M}),P({title:"Đã lưu tập tin",description:"Nội dung tập tin đã được cập nhật thành công"}),Qe.current=!0,await tt(),A(null),K(""),S("rename")}catch(W){console.error("Error saving file content:",W),P({title:"Lỗi",description:"Không thể lưu nội dung tập tin",variant:"destructive"})}finally{It(!1)}},UE=async T=>{It(!0);try{console.log("🚀 ~ saveJsonFile ~ metadataForEdit:",B),await me.post(`${t}/api/modify-json`,{path:T.key+".metadata.json",content:{metadataAttributes:B}}),P({title:"Đã lưu tập tin",description:"Nội dung tập tin đã được cập nhật thành công"}),Qe.current=!0,await tt(),A(null),K(""),S("rename")}catch(M){console.error("Error saving file content:",M),P({title:"Lỗi",description:"Không thể lưu nội dung tập tin",variant:"destructive"})}finally{It(!1)}};_.useEffect(()=>{j&&(j.isFolder||BE(j),S("rename"))},[j]);const WE=async(T,M)=>{var W;if(_e){P({title:"Đang thu thập website",description:"Vui lòng đợi cho công việc thu thập hiện tại hoàn thành.",variant:"destructive"});return}xe(!0);try{const{data:te}=await me.post(`${t}/api/crawl`,{url:T,limit:M,prefix:f});if(te.id){ni({id:te.id,url:T,limit:M,prefix:f,taskId:((W=te.task)==null?void 0:W.id)||""});const ie=localStorage.getItem(cp),ge=ie?JSON.parse(ie):[];ge.some(Se=>Se.id===te.id)||(ge.unshift({url:T,id:te.id,limit:M,prefix:f,timestamp:Date.now()}),ge.length>20&&(ge.length=20),localStorage.setItem(cp,JSON.stringify(ge))),P({title:"Bắt đầu thu thập website",description:`Đã thêm nhiệm vụ thu thập ${T} với giới hạn ${M}. Dữ liệu sẽ có sẵn sau khi thu thập hoàn tất.`}),V(!1),J(""),z("1")}}catch(te){console.error("Error crawling website:",te),P({title:"Lỗi",description:"Không thể bắt đầu thu thập website",variant:"destructive"})}finally{xe(!1)}},qE=async()=>{try{if(!(_e!=null&&_e.id))return;ni(null),localStorage.removeItem(Gn),P({title:"Đã dừng thu thập",description:`Đã dừng thu thập website ${_e.url}`})}catch(T){console.error("Error stopping job:",T),P({title:"Lỗi",description:"Không thể dừng thu thập website",variant:"destructive"})}};_.useEffect(()=>{const T=(M=!0)=>{const te=new URL(window.location.href).searchParams.get("prefix")||"";te?Xn(te,!1):(M&&!a&&m(new Set),y(n),v(n),Qe.current=!0,setTimeout(()=>{tt()},0))};return T(!1),window.addEventListener("popstate",()=>T(!0)),()=>{window.removeEventListener("popstate",()=>T(!0))}},[]);const GE=async()=>{kp(!0);try{const T=await me.post(`${t}/api/prediction-report`);console.log("🚀 ~ Home.tsx:1585 ~ handleExportReport ~ response:",T),P({title:"Xuất báo cáo thành công",description:"Báo cáo dự đoán đã được xuất"})}catch(T){console.error("Error exporting report:",T),P({title:"Lỗi",description:"Không thể xuất báo cáo dự đoán",variant:"destructive"})}finally{kp(!1)}},KE=async()=>{try{const T=await me.post(`${t}/api/start-ingestion-job`,{prefix:f});T.status===200&&(console.log("🚀 ~ Home.tsx:1744 ~ handleSyncKnowledgeBase ~ response:",T),await Mp())}catch(T){console.log(T)}},Mp=async()=>{try{const T=await me.post(`${t}/api/get-ingestion-job-status`,{prefix:f});let M;T.data,Fe(!1),M&&clearInterval(M)}catch(T){console.log(T)}};return _.useEffect(()=>{const T=f==null?void 0:f.split("/")[0];return T&&(AE(T),f&&Mp()),()=>{}},[TE,f]),l.jsxs("div",{className:"space-y-4 s3-explr-container",children:[l.jsx(wd,{}),l.jsx(jt,{open:_E,onOpenChange:T=>{Ar(T),T||(ri(""),_r(null),Re(!1),F(null))},children:l.jsxs(St,{children:[l.jsxs(Et,{children:[l.jsx(_t,{children:"Cảnh báo trùng lặp"}),l.jsxs(Rn,{children:[Tr&&l.jsxs(l.Fragment,{children:["Folder $",Tr," đã có."]}),cn&&cn.length>0&&l.jsxs(l.Fragment,{children:["Những tệp sau bị lặp:",l.jsx("ul",{className:"mt-2 list-disc pl-5 text-sm text-red-600",children:Array.from(cn).map((T,M)=>l.jsx("li",{children:T.name},M))})]})]})]}),l.jsxs(hn,{children:[l.jsx(ve,{variant:"outline",onClick:()=>{Ar(!1),ri(""),_r(null),Re(!1),F(null)},children:"Bỏ qua"}),l.jsx(ve,{variant:"destructive",onClick:()=>LE(),children:"Ghi đè"})]})]})}),l.jsx(lc,{className:"s3-explr-breadcrumb",children:l.jsxs(cc,{className:"s3-explr-breadcrumb-list",children:[l.jsx(Ji,{className:"s3-explr-breadcrumb-item",children:l.jsx(Zi,{onClick:()=>Xn(n),className:"flex items-center gap-1 cursor-pointer s3-explr-breadcrumb-home",children:e})}),Dp.map((T,M)=>l.jsxs("div",{className:"flex items-center",children:[l.jsx(uc,{className:"s3-explr-breadcrumb-separator"},`sep-${M}`),l.jsx(Ji,{className:"s3-explr-breadcrumb-item",children:l.jsx(Zi,{onClick:()=>Xn(n+Dp.slice(0,M+1).join("/")+"/"),className:"cursor-pointer s3-explr-breadcrumb-link",children:T})},`item-${T}`)]},M))]})}),l.jsxs("div",{className:"flex items-center space-x-4 s3-explr-toolbar",children:[l.jsx("div",{className:"relative max-w-sm w-full s3-explr-search-container",children:l.jsx(BC,{ref:q,onChange:T=>d(T)})}),l.jsxs(ve,{variant:"outline",size:"sm",onClick:()=>{y(f),Qe.current=!0,tt()},disabled:Pr,className:"flex items-center gap-2 s3-explr-refresh-btn",children:[l.jsx(si,{className:`h-4 w-4 s3-explr-refresh-icon ${Pr?"animate-spin":""}`}),"Làm mới"]}),f&&f!=="/"&&l.jsxs(ve,{variant:"outline",size:"sm",onClick:()=>{Fe(!0),KE()},disabled:Pr||we,className:"flex items-center gap-2 s3-explr-refresh-btn",children:[l.jsx(si,{className:`h-4 w-4 s3-explr-refresh-icon ${Pr||we?"animate-spin":""}`}),"Đồng bộ KB"]}),!r&&l.jsxs(l.Fragment,{children:[g.size>0&&l.jsxs(l.Fragment,{children:[l.jsxs(ve,{variant:"outline",size:"sm",onClick:()=>Fp(Array.from(g)),disabled:Array.from(g).some(T=>ue.has(T)),className:"flex items-center gap-2 s3-explr-download-selected-btn",children:[Array.from(g).some(T=>ue.has(T))?l.jsx($e,{className:"h-4 w-4 animate-spin mr-2 s3-explr-loader"}):l.jsx(Ls,{className:"h-4 w-4 s3-explr-download-icon"}),"Tải xuống đã chọn (",g.size,")"]}),l.jsxs(jt,{open:Z,onOpenChange:k,children:[l.jsx(uo,{asChild:!0,children:l.jsxs(ve,{variant:"destructive",size:"sm",className:"flex items-center gap-2 s3-explr-bulk-delete-btn",children:[l.jsx(Rs,{className:"h-4 w-4 s3-explr-trash-icon"}),"Xóa đã chọn (",g.size,")"]})}),l.jsxs(St,{className:"s3-explr-dialog-content",children:[l.jsxs(Et,{className:"s3-explr-dialog-header",children:[l.jsx(_t,{className:"s3-explr-dialog-title",children:"Xác nhận xóa hàng loạt"}),l.jsxs(Rn,{className:"s3-explr-dialog-description",children:["Bạn có chắc chắn muốn xóa ",g.size," mục đã chọn? Hành động này không thể hoàn tác."]})]}),l.jsxs(hn,{className:"s3-explr-dialog-footer",children:[l.jsx(ve,{variant:"outline",onClick:()=>k(!1),className:"s3-explr-cancel-btn",children:"Hủy"}),l.jsx(ve,{variant:"destructive",onClick:VE,disabled:G,className:"s3-explr-confirm-delete-btn",children:G?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang xóa..."]}):"Xóa đã chọn"})]})]})]})]}),l.jsxs(jt,{open:b,onOpenChange:w,children:[l.jsx(uo,{asChild:!0,children:l.jsxs(ve,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-new-folder-btn",disabled:!!i&&!f,children:[l.jsx(Wp,{className:"h-4 w-4 s3-explr-folder-plus-icon"}),"Thư mục mới"]})}),l.jsxs(St,{className:"s3-explr-dialog-content",children:[l.jsx(Et,{className:"s3-explr-dialog-header",children:l.jsx(_t,{className:"s3-explr-dialog-title",children:"Tạo thư mục mới"})}),l.jsxs("div",{className:"space-y-4 py-4 s3-explr-dialog-body",children:[l.jsxs("div",{className:"space-y-2 s3-explr-input-group",children:[l.jsx(vn,{htmlFor:"name",className:"s3-explr-label",children:"Tên thư mục"}),l.jsx(en,{disabled:x,id:"name",value:C,onChange:T=>E(T.target.value),placeholder:"Nhập tên thư mục",className:"s3-explr-input"})]}),l.jsxs(ve,{onClick:()=>{C.trim()&&$E(C,f)},disabled:x,className:"s3-explr-create-btn",children:[x&&l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),x?"Đang tạo...":"Tạo"]})]})]})]}),l.jsxs("div",{className:"flex items-center gap-2 s3-explr-upload-group",children:[l.jsx(ve,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-upload-files-btn",onClick:()=>{const T=document.createElement("input");T.type="file",T.multiple=!0,T.onchange=M=>{const W=M.target.files;W&&Is(W,f,"files")},T.click()},disabled:$!==null||!!i&&!f,children:$==="files"?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"h-4 w-4 animate-spin mr-2 s3-explr-loader"}),"Đang tải lên..."]}):l.jsxs(l.Fragment,{children:[l.jsx(Hp,{className:"h-4 w-4 s3-explr-upload-icon"}),"Tải lên tập tin"]})}),l.jsx(ve,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-upload-folder-btn",onClick:()=>{const T=document.createElement("input");T.type="file",T.multiple=!0,T.webkitdirectory=!0,T.onchange=M=>{const W=M.target.files;W&&Is(W,f,"folder")},T.click()},disabled:$!==null||!!i&&!f,children:$==="folder"?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"h-4 w-4 animate-spin mr-2 s3-explr-loader"}),"Đang tải lên..."]}):l.jsxs(l.Fragment,{children:[l.jsx(li,{className:"h-4 w-4 s3-explr-folder-icon"}),"Tải lên thư mục"]})}),_e?l.jsx(xn,{delayDuration:0,children:l.jsxs(bn,{children:[l.jsx(wn,{asChild:!0,children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs(ve,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-add-website-btn",disabled:!0,children:[l.jsx($e,{className:"h-4 w-4 animate-spin s3-explr-loader"}),_e.status?l.jsxs(l.Fragment,{children:[_e.status.isProcessing?"Đang thu thập ":"Đang quét sitemap ","(",_e.status.completed,"/",_e.status.total,") -"," ",Math.floor(ln/60),":",String(ln%60).padStart(2,"0")]}):"Đang thu thập..."]}),l.jsxs(ve,{variant:"destructive",size:"sm",onClick:()=>void qE(),className:"flex items-center gap-2",children:[l.jsx("span",{className:"sr-only",children:"Dừng thu thập"}),l.jsx(Zp,{className:"h-4 w-4"})]})]})}),_e.status&&l.jsx(on,{side:"right",sideOffset:5,children:l.jsxs("div",{className:"space-y-1 p-2",children:[l.jsxs("p",{className:"font-semibold",children:["Đang thu thập ",_e.url]}),l.jsxs("p",{children:["Tiến độ: ",_e.status.completed,"/",_e.status.total," trang"]}),l.jsxs("p",{children:["Thời gian: ",Math.floor(ln/60),":",String(ln%60).padStart(2,"0")]}),l.jsxs("p",{children:["Trạng thái:"," ",_e.status.status==="scraping"?"Đang thu thập":_e.status.status==="completed"?"Hoàn thành":"Thất bại"]})]})})]})}):l.jsxs(jt,{open:N,onOpenChange:V,children:[l.jsx(uo,{asChild:!0,children:l.jsxs(ve,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-add-website-btn",disabled:!!i&&!f,children:[l.jsx(Kp,{className:"h-4 w-4 s3-explr-globe-icon"}),"Thêm website"]})}),l.jsxs(St,{className:"s3-explr-dialog-content",children:[l.jsxs(Et,{className:"s3-explr-dialog-header",children:[l.jsx(_t,{className:"s3-explr-dialog-title",children:"Thêm website"}),l.jsx(Rn,{className:"s3-explr-dialog-description",children:"Nhập URL website để thu thập và thêm vào S3."})]}),l.jsxs("div",{className:"space-y-4 py-4 s3-explr-dialog-body",children:[l.jsxs("div",{className:"space-y-2 s3-explr-input-group",children:[l.jsx(vn,{htmlFor:"websiteUrl",className:"s3-explr-label",children:"URL Website"}),l.jsx(en,{id:"websiteUrl",value:ne,onChange:T=>J(T.target.value),placeholder:"https://example.com",type:"url",disabled:Y,className:"s3-explr-input"})]}),l.jsxs("div",{className:"space-y-2 s3-explr-input-group",children:[l.jsx(vn,{htmlFor:"crawlLimit",className:"s3-explr-label",children:"Giới hạn thu thập"}),l.jsx(en,{id:"crawlLimit",value:X,onChange:T=>{const M=T.target.value;/^\d*$/.test(M)&&z(M)},placeholder:"1",type:"text",disabled:Y,className:"s3-explr-input"}),l.jsx("p",{className:"text-sm text-gray-500",children:"Số lượng liên kết cần thu thập (mặc định: 1)"})]})]}),l.jsxs(hn,{className:"s3-explr-dialog-footer",children:[l.jsx(ve,{variant:"outline",onClick:()=>{V(!1),J(""),z("1")},disabled:Y,className:"s3-explr-cancel-btn",children:"Hủy"}),l.jsx(ve,{onClick:()=>{ne.trim()&&WE(ne.trim(),parseInt(X)||1)},disabled:Y||!ne.trim(),className:"s3-explr-crawl-btn",children:Y?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang thu thập..."]}):"Bắt đầu thu thập"})]})]})]}),f.startsWith("BKTTW/")&&l.jsx(xn,{delayDuration:0,children:l.jsxs(bn,{children:[l.jsx(wn,{asChild:!0,children:l.jsxs(ve,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-add-website-btn",disabled:!!i&&!f,onClick:GE,children:[Ds&&l.jsx(si,{className:`h-4 w-4 s3-explr-refresh-icon ${Ds?"animate-spin":""}`}),"Xuất báo cáo"]})}),Ds&&l.jsx(on,{sideOffset:5,children:"Đang xuất báo cáo"})]})})]}),l.jsx("div",{className:"flex items-center gap-4",children:l.jsxs(ve,{variant:"outline",size:"sm",onClick:()=>OE(),className:"flex items-center gap-2",children:[l.jsxs("svg",{viewBox:"0 0 87.3 78",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{d:"m6.6 66.85 3.85 6.65c.8 1.4 1.95 2.5 3.3 3.3l13.75-23.8h-27.5c0 1.55.4 3.1 1.2 4.5z",fill:"#0066da"}),l.jsx("path",{d:"m43.65 25-13.75-23.8c-1.35.8-2.5 1.9-3.3 3.3l-25.4 44a9.06 9.06 0 0 0 -1.2 4.5h27.5z",fill:"#00ac47"}),l.jsx("path",{d:"m73.55 76.8c1.35-.8 2.5-1.9 3.3-3.3l1.6-2.75 7.65-13.25c.8-1.4 1.2-2.95 1.2-4.5h-27.502l5.852 11.5z",fill:"#ea4335"}),l.jsx("path",{d:"m43.65 25 13.75-23.8c-1.35-.8-2.9-1.2-4.5-1.2h-18.5c-1.6 0-3.15.45-4.5 1.2z",fill:"#00832d"}),l.jsx("path",{d:"m59.8 53h-32.3l-13.75 23.8c1.35.8 2.9 1.2 4.5 1.2h50.8c1.6 0 3.15-.45 4.5-1.2z",fill:"#2684fc"}),l.jsx("path",{d:"m73.4 26.5-12.7-22c-.8-1.4-1.95-2.5-3.3-3.3l-13.75 23.8 16.15 28h27.45c0-1.55-.4-3.1-1.2-4.5z",fill:"#ffba00"})]}),"Đồng bộ Google Drive"]})}),l.jsx(jt,{open:!!I,onOpenChange:T=>!T&&L(null),children:l.jsxs(St,{className:"s3-explr-dialog-content",children:[l.jsxs(Et,{className:"s3-explr-dialog-header",children:[l.jsx(_t,{className:"s3-explr-dialog-title",children:"Xác nhận xóa"}),l.jsxs(Rn,{className:"s3-explr-dialog-description",children:["Bạn có chắc chắn muốn xóa ",I==null?void 0:I.name,"? Hành động này không thể hoàn tác."]})]}),l.jsxs(hn,{className:"s3-explr-dialog-footer",children:[l.jsx(ve,{variant:"outline",onClick:()=>L(null),className:"s3-explr-cancel-btn",children:"Hủy"}),l.jsx(ve,{variant:"destructive",onClick:()=>RE(I),disabled:Mt,className:"s3-explr-confirm-delete-btn",children:Mt?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang xóa..."]}):"Xóa"})]})]})}),l.jsx(jt,{open:!!j,onOpenChange:T=>{T||(A(null),Q(null),ee(""),K(""),S("rename"))},children:l.jsxs(St,{className:"s3-explr-dialog-content max-w-5xl w-[90%]",children:[l.jsx(Et,{className:"s3-explr-dialog-header",children:l.jsx(_t,{className:"s3-explr-dialog-title",children:j!=null&&j.isFolder?"Đổi tên thư mục":br(j)?"Quản lý tập tin":"Đổi tên tập tin"})}),j&&l.jsxs(ib,{value:st,onValueChange:T=>S(T),children:[l.jsxs(Ku,{"aria-checked":!br(j),"aria-disabled":j.isFolder,className:"grid w-full grid-cols-3 aria-checked:grid-cols-2 aria-disabled:grid-cols-1",children:[l.jsx(So,{value:"rename",children:"Đổi tên"}),!j.isFolder&&l.jsxs(l.Fragment,{children:[br(j)&&l.jsx(So,{value:"edit",children:"Sửa nội dung"}),l.jsx(So,{value:"edit-metadata",children:"Sửa metadata file"})]})]}),l.jsx(Eo,{value:"rename",children:l.jsx("div",{className:"space-y-4 py-4 s3-explr-dialog-body",children:l.jsxs("div",{className:"h-[70dvh] min-h-[500px] overflow-hidden overflow-y-auto pb-3 px-1 s3-explr-input-group",children:[l.jsx(vn,{htmlFor:"newName",className:"s3-explr-label",children:"Tên mới"}),l.jsx(en,{id:"newName",value:re,onChange:T=>ee(T.target.value),placeholder:"Nhập tên mới",disabled:ae,className:"s3-explr-input"})]})})}),!j.isFolder&&l.jsxs(l.Fragment,{children:[br(j)&&l.jsx(Eo,{value:"edit",children:l.jsx("div",{className:"space-y-4 py-4",children:Ee?l.jsx("div",{className:"flex items-center justify-center py-4",children:l.jsx($e,{className:"h-6 w-6 animate-spin"})}):l.jsxs("div",{className:"h-[70dvh] min-h-[500px] overflow-hidden overflow-y-auto pb-3 px-1",children:[l.jsx(vn,{htmlFor:"content",className:"s3-explr-label",children:"Nội dung tập tin"}),l.jsx(ur,{id:"content",value:Ce,onChange:T=>K(T.target.value),placeholder:"Nhập nội dung tập tin",className:"min-h-[200px] font-mono",disabled:qe})]})})}),l.jsx(Eo,{value:"edit-metadata",children:l.jsx("div",{className:"space-y-4 py-4",children:Ee?l.jsx("div",{className:"flex items-center justify-center py-4",children:l.jsx($e,{className:"h-6 w-6 animate-spin"})}):l.jsx("div",{className:"h-[70dvh] min-h-[500px] overflow-hidden overflow-y-auto pb-3 px-1",children:B&&typeof B=="object"&&Object.entries(B).map(([T,M],W)=>l.jsxs("div",{className:"pb-3 flex flex-col gap-2",children:[l.jsxs(vn,{htmlFor:T,className:"s3-explr-label flex items-center gap-1",children:[Kh[T]||T,qi(T)&&l.jsx(Dh,{className:"h-[12px] w-[12px] text-red-500"})]}),Yh(T)?l.jsx(ur,{id:T,value:typeof M=="string"?M:JSON.stringify(M),onChange:te=>{const ie={...B,[T]:te.target.value};Q(ie)},placeholder:"Nhập nội dung tập tin",className:"min-h-[200px] font-mono",disabled:qe||qi(T)}):l.jsx(en,{id:T,value:typeof M=="string"?M:JSON.stringify(M),onChange:te=>{const ie={...B,[T]:te.target.value};Q(ie)},placeholder:"Nhập nội dung",className:"s3-explr-input",disabled:qe||qi(T)})]},W))})})})]})]}),l.jsxs(hn,{className:"s3-explr-dialog-footer",children:[l.jsx(ve,{variant:"outline",onClick:()=>{A(null),Q(null),ee(""),K("")},className:"s3-explr-cancel-btn",children:"Hủy"}),st==="edit"?l.jsx(ve,{onClick:()=>j&&HE(j,Ce),disabled:qe||Ee,className:"s3-explr-save-btn",children:qe?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang lưu..."]}):"Lưu thay đổi"}):st==="edit-metadata"?l.jsx(ve,{onClick:()=>B&&typeof B=="object"&&j&&UE(j),disabled:qe||Ee,className:"s3-explr-save-btn",children:qe?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang lưu..."]}):"Lưu thay đổi"}):l.jsx(ve,{onClick:()=>{re.trim()&&j&&jE(j,re.trim())},disabled:ae||!re.trim()||re.trim()===(j==null?void 0:j.name),className:"s3-explr-rename-btn",children:ae?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang đổi tên..."]}):"Đổi tên"})]})]})}),H&&ce&&l.jsx(qS,{openDialogRename:ce,setOpenDialogRename:oe,apiBaseUrl:t,setFileToMove:D,fileToMove:H,refreshFiles:tt,ignoreCache:Qe})]})]}),kE&&l.jsx("div",{className:"bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative s3-explr-error",children:"Đã xảy ra lỗi khi tải danh sách tập tin"}),l.jsx(WS,{onFilesSelected:(T,M)=>Is(T,f,M),children:l.jsx("div",{className:"rounded-md border s3-explr-table-container",children:l.jsxs(vo,{className:"s3-explr-table",children:[l.jsx(yo,{className:"s3-explr-table-header",children:Ms.getHeaderGroups().map(T=>l.jsx(ht,{className:"hover:bg-transparent s3-explr-header-row",children:T.headers.map(M=>l.jsx(Tt,{className:"s3-explr-header-cell",children:M.isPlaceholder?null:Vr(M.column.columnDef.header,M.getContext())},M.id))},T.id))}),l.jsx(xo,{className:"s3-explr-table-body",children:Ms.getRowModel().rows.length===0?l.jsx(ht,{className:"s3-explr-empty-row",children:l.jsx(Ze,{colSpan:Ip.length,className:"h-24 text-center s3-explr-empty-cell",children:c?l.jsxs("div",{className:"text-gray-500 s3-explr-no-results",children:['Không tìm thấy tập tin hoặc thư mục nào khớp với "',c,'"']}):l.jsx("div",{className:"text-gray-500 s3-explr-empty-message",children:Pr?"Đang tải nội dung thư mục... Vui lòng đợi":"Thư mục này không chứa tập tin hoặc thư mục con nào"})})}):Ms.getRowModel().rows.map(T=>l.jsx(ht,{className:"h-12 s3-explr-row",children:T.getVisibleCells().map(M=>l.jsx(Ze,{className:"align-middle s3-explr-cell",children:Vr(M.column.columnDef.cell,M.getContext())},M.id))},T.id))})]})})}),c&&Nr!==0&&l.jsx(l.Fragment,{children:l.jsx(fo,{children:l.jsxs(po,{children:[l.jsx(go,{onClick:()=>$t(T=>Math.max(T-1,1)),"aria-disabled":Be===1,className:"cursor-pointer aria-disabled:pointer-events-none"}),Array.from({length:Math.ceil(Nr/20)},(T,M)=>{const W=M+1,te=Math.ceil(Nr/20);return te>7&&!(W===1||W===te||W>=Be-1&&W<=Be+1)?W===Be-2&&Be>4||W===Be+2&&Be<te-3?l.jsx(ho,{className:"pointer-events-none",children:"..."},M):null:l.jsx(mt,{className:"cursor-pointer",children:l.jsx(Vn,{isActive:Be===W,onClick:()=>$t(W),className:`${Be===W?"bg-blue-500 text-white":"bg-white text-black"} hover:bg-blue-100`,children:W})},M)}),l.jsx(mt,{children:l.jsx(mo,{onClick:()=>$t(T=>Math.min(T+1,Math.ceil(Nr/20))),"aria-disabled":Be===Math.ceil(Nr/20),className:"cursor-pointer aria-disabled:pointer-events-none"})})]})})}),r&&o&&l.jsxs("div",{className:"flex justify-between items-center mt-4 s3-explr-selector-footer",children:[l.jsxs("div",{className:"text-sm text-gray-500 s3-explr-selection-count",children:[g.size," ",(g.size===1,"tập tin")," đã chọn"]}),l.jsx(ve,{variant:"default",onClick:()=>o(zE()),disabled:g.size===0,className:"s3-explr-ok-btn",children:"OK"})]})]})}),eE=e=>l.jsx(tg,{clientId:KS,children:l.jsx(QS,{...e})});var wr=e=>e.type==="checkbox",Sn=e=>e instanceof Date,Ke=e=>e==null;const up=e=>typeof e=="object";var Me=e=>!Ke(e)&&!Array.isArray(e)&&up(e)&&!Sn(e),tE=e=>Me(e)&&e.target?wr(e.target)?e.target.checked:e.target.value:e,nE=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,rE=(e,t)=>e.has(nE(t)),oE=e=>{const t=e.constructor&&e.constructor.prototype;return Me(t)&&t.hasOwnProperty("isPrototypeOf")},_s=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ut(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(_s&&(e instanceof Blob||r))&&(n||Me(e)))if(t=n?[]:{},!n&&!oE(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=ut(e[o]));else return e;return t}var Xo=e=>Array.isArray(e)?e.filter(Boolean):[],Ie=e=>e===void 0,se=(e,t,n)=>{if(!t||!Me(e))return n;const r=Xo(t.split(/[,[\].]+?/)).reduce((o,i)=>Ke(o)?o:o[i],e);return Ie(r)||r===e?Ie(e[t])?n:e[t]:r},Ot=e=>typeof e=="boolean",Ts=e=>/^\w*$/.test(e),dp=e=>Xo(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Oe=(e,t,n)=>{let r=-1;const o=Ts(t)?[t]:dp(t),i=o.length,a=i-1;for(;++r<i;){const s=o[r];let u=n;if(r!==a){const c=e[s];u=Me(c)||Array.isArray(c)?c:isNaN(+o[r+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=u,e=e[s]}return e};const fp={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},xt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ut={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};_.createContext(null);var iE=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const a=i;return t._proxyFormState[a]!==xt.all&&(t._proxyFormState[a]=!r||xt.all),e[a]}});return o},et=e=>Me(e)&&!Object.keys(e).length,aE=(e,t,n,r)=>{n(e);const{name:o,...i}=e;return et(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(a=>t[a]===xt.all)},Jo=e=>Array.isArray(e)?e:[e];function sE(e){const t=_.useRef(e);t.current=e,_.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var Ft=e=>typeof e=="string",lE=(e,t,n,r,o)=>Ft(e)?(r&&t.watch.add(e),se(n,e,o)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),se(n,i))):(r&&(t.watchAll=!0),n),cE=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},pp=e=>({isOnSubmit:!e||e===xt.onSubmit,isOnBlur:e===xt.onBlur,isOnChange:e===xt.onChange,isOnAll:e===xt.all,isOnTouch:e===xt.onTouched}),gp=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Cr=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const i=se(e,o);if(i){const{_f:a,...s}=i;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],o)&&!r)return!0;if(a.ref&&t(a.ref,a.name)&&!r)return!0;if(Cr(s,t))break}else if(Me(s)&&Cr(s,t))break}}};var uE=(e,t,n)=>{const r=Jo(se(e,n));return Oe(r,"root",t[n]),Oe(e,n,r),e},As=e=>e.type==="file",Dt=e=>typeof e=="function",Zo=e=>{if(!_s)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Qo=e=>Ft(e),Ps=e=>e.type==="radio",ei=e=>e instanceof RegExp;const mp={value:!1,isValid:!1},hp={value:!0,isValid:!0};var vp=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ie(e[0].attributes.value)?Ie(e[0].value)||e[0].value===""?hp:{value:e[0].value,isValid:!0}:hp:mp}return mp};const yp={isValid:!1,value:null};var xp=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,yp):yp;function bp(e,t,n="validate"){if(Qo(e)||Array.isArray(e)&&e.every(Qo)||Ot(e)&&!e)return{type:n,message:Qo(e)?e:"",ref:t}}var Kn=e=>Me(e)&&!ei(e)?e:{value:e,message:""},wp=async(e,t,n,r,o)=>{const{ref:i,refs:a,required:s,maxLength:u,minLength:c,min:d,max:g,pattern:m,validate:f,name:v,valueAsNumber:h,mount:y,disabled:b}=e._f,w=se(t,v);if(!y||b)return{};const C=a?a[0]:i,E=U=>{r&&C.reportValidity&&(C.setCustomValidity(Ot(U)?"":U||""),C.reportValidity())},x={},O=Ps(i),I=wr(i),L=O||I,H=(h||As(i))&&Ie(i.value)&&Ie(w)||Zo(i)&&i.value===""||w===""||Array.isArray(w)&&!w.length,D=cE.bind(null,v,n,x),G=(U,Z,k,$=Ut.maxLength,F=Ut.minLength)=>{const q=U?Z:k;x[v]={type:U?$:F,message:q,ref:i,...D(U?$:F,q)}};if(o?!Array.isArray(w)||!w.length:s&&(!L&&(H||Ke(w))||Ot(w)&&!w||I&&!vp(a).isValid||O&&!xp(a).isValid)){const{value:U,message:Z}=Qo(s)?{value:!!s,message:s}:Kn(s);if(U&&(x[v]={type:Ut.required,message:Z,ref:C,...D(Ut.required,Z)},!n))return E(Z),x}if(!H&&(!Ke(d)||!Ke(g))){let U,Z;const k=Kn(g),$=Kn(d);if(!Ke(w)&&!isNaN(w)){const F=i.valueAsNumber||w&&+w;Ke(k.value)||(U=F>k.value),Ke($.value)||(Z=F<$.value)}else{const F=i.valueAsDate||new Date(w),q=A=>new Date(new Date().toDateString()+" "+A),P=i.type=="time",j=i.type=="week";Ft(k.value)&&w&&(U=P?q(w)>q(k.value):j?w>k.value:F>new Date(k.value)),Ft($.value)&&w&&(Z=P?q(w)<q($.value):j?w<$.value:F<new Date($.value))}if((U||Z)&&(G(!!U,k.message,$.message,Ut.max,Ut.min),!n))return E(x[v].message),x}if((u||c)&&!H&&(Ft(w)||o&&Array.isArray(w))){const U=Kn(u),Z=Kn(c),k=!Ke(U.value)&&w.length>+U.value,$=!Ke(Z.value)&&w.length<+Z.value;if((k||$)&&(G(k,U.message,Z.message),!n))return E(x[v].message),x}if(m&&!H&&Ft(w)){const{value:U,message:Z}=Kn(m);if(ei(U)&&!w.match(U)&&(x[v]={type:Ut.pattern,message:Z,ref:i,...D(Ut.pattern,Z)},!n))return E(Z),x}if(f){if(Dt(f)){const U=await f(w,t),Z=bp(U,C);if(Z&&(x[v]={...Z,...D(Ut.validate,Z.message)},!n))return E(Z.message),x}else if(Me(f)){let U={};for(const Z in f){if(!et(U)&&!n)break;const k=bp(await f[Z](w,t),C,Z);k&&(U={...k,...D(Z,k.message)},E(k.message),n&&(x[v]=U))}if(!et(U)&&(x[v]={ref:C,...U},!n))return x}}return E(!0),x};function dE(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Ie(e)?r++:e[t[r++]];return e}function fE(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ie(e[t]))return!1;return!0}function je(e,t){const n=Array.isArray(t)?t:Ts(t)?[t]:dp(t),r=n.length===1?e:dE(e,n),o=n.length-1,i=n[o];return r&&delete r[i],o!==0&&(Me(r)&&et(r)||Array.isArray(r)&&fE(r))&&je(e,n.slice(0,-1)),e}var Ns=()=>{let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}},ks=e=>Ke(e)||!up(e);function an(e,t){if(ks(e)||ks(t))return e===t;if(Sn(e)&&Sn(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const i=e[o];if(!r.includes(o))return!1;if(o!=="ref"){const a=t[o];if(Sn(i)&&Sn(a)||Me(i)&&Me(a)||Array.isArray(i)&&Array.isArray(a)?!an(i,a):i!==a)return!1}}return!0}var Cp=e=>e.type==="select-multiple",pE=e=>Ps(e)||wr(e),Os=e=>Zo(e)&&e.isConnected,Sp=e=>{for(const t in e)if(Dt(e[t]))return!0;return!1};function ti(e,t={}){const n=Array.isArray(e);if(Me(e)||n)for(const r in e)Array.isArray(e[r])||Me(e[r])&&!Sp(e[r])?(t[r]=Array.isArray(e[r])?[]:{},ti(e[r],t[r])):Ke(e[r])||(t[r]=!0);return t}function Ep(e,t,n){const r=Array.isArray(e);if(Me(e)||r)for(const o in e)Array.isArray(e[o])||Me(e[o])&&!Sp(e[o])?Ie(t)||ks(n[o])?n[o]=Array.isArray(e[o])?ti(e[o],[]):{...ti(e[o])}:Ep(e[o],Ke(t)?{}:t[o],n[o]):n[o]=!an(e[o],t[o]);return n}var Sr=(e,t)=>Ep(e,t,ti(t)),_p=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Ie(e)?e:t?e===""?NaN:e&&+e:n&&Ft(e)?new Date(e):r?r(e):e;function Fs(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return As(t)?t.files:Ps(t)?xp(e.refs).value:Cp(t)?[...t.selectedOptions].map(({value:n})=>n):wr(t)?vp(e.refs).value:_p(Ie(t.value)?e.ref.value:t.value,e)}var gE=(e,t,n,r)=>{const o={};for(const i of e){const a=se(t,i);a&&Oe(o,i,a._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},Er=e=>Ie(e)?e:ei(e)?e.source:Me(e)?ei(e.value)?e.value.source:e.value:e;const Tp="AsyncFunction";var mE=e=>!!e&&!!e.validate&&!!(Dt(e.validate)&&e.validate.constructor.name===Tp||Me(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Tp)),hE=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Ap(e,t,n){const r=se(e,n);if(r||Ts(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const i=o.join("."),a=se(t,i),s=se(e,i);if(a&&!Array.isArray(a)&&n!==i)return{name:n};if(s&&s.type)return{name:i,error:s};o.pop()}return{name:n}}var vE=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,yE=(e,t)=>!Xo(se(e,t)).length&&je(e,t);const xE={mode:xt.onSubmit,reValidateMode:xt.onChange,shouldFocusError:!0};function bE(e={}){let t={...xE,...e},n={submitCount:0,isDirty:!1,isLoading:Dt(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},o=Me(t.defaultValues)||Me(t.values)?ut(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:ut(o),a={action:!1,mount:!1,watch:!1},s={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,c=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},g={values:Ns(),array:Ns(),state:Ns()},m=pp(t.mode),f=pp(t.reValidateMode),v=t.criteriaMode===xt.all,h=S=>N=>{clearTimeout(c),c=setTimeout(S,N)},y=async S=>{if(!t.disabled&&(d.isValid||S)){const N=t.resolver?et((await L()).errors):await D(r,!0);N!==n.isValid&&g.state.next({isValid:N})}},b=(S,N)=>{!t.disabled&&(d.isValidating||d.validatingFields)&&((S||Array.from(s.mount)).forEach(V=>{V&&(N?Oe(n.validatingFields,V,N):je(n.validatingFields,V))}),g.state.next({validatingFields:n.validatingFields,isValidating:!et(n.validatingFields)}))},w=(S,N=[],V,ne,J=!0,X=!0)=>{if(ne&&V&&!t.disabled){if(a.action=!0,X&&Array.isArray(se(r,S))){const z=V(se(r,S),ne.argA,ne.argB);J&&Oe(r,S,z)}if(X&&Array.isArray(se(n.errors,S))){const z=V(se(n.errors,S),ne.argA,ne.argB);J&&Oe(n.errors,S,z),yE(n.errors,S)}if(d.touchedFields&&X&&Array.isArray(se(n.touchedFields,S))){const z=V(se(n.touchedFields,S),ne.argA,ne.argB);J&&Oe(n.touchedFields,S,z)}d.dirtyFields&&(n.dirtyFields=Sr(o,i)),g.state.next({name:S,isDirty:U(S,N),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Oe(i,S,N)},C=(S,N)=>{Oe(n.errors,S,N),g.state.next({errors:n.errors})},E=S=>{n.errors=S,g.state.next({errors:n.errors,isValid:!1})},x=(S,N,V,ne)=>{const J=se(r,S);if(J){const X=se(i,S,Ie(V)?se(o,S):V);Ie(X)||ne&&ne.defaultChecked||N?Oe(i,S,N?X:Fs(J._f)):$(S,X),a.mount&&y()}},O=(S,N,V,ne,J)=>{let X=!1,z=!1;const Y={name:S};if(!t.disabled){const xe=!!(se(r,S)&&se(r,S)._f&&se(r,S)._f.disabled);if(!V||ne){d.isDirty&&(z=n.isDirty,n.isDirty=Y.isDirty=U(),X=z!==Y.isDirty);const we=xe||an(se(o,S),N);z=!!(!xe&&se(n.dirtyFields,S)),we||xe?je(n.dirtyFields,S):Oe(n.dirtyFields,S,!0),Y.dirtyFields=n.dirtyFields,X=X||d.dirtyFields&&z!==!we}if(V){const we=se(n.touchedFields,S);we||(Oe(n.touchedFields,S,V),Y.touchedFields=n.touchedFields,X=X||d.touchedFields&&we!==V)}X&&J&&g.state.next(Y)}return X?Y:{}},I=(S,N,V,ne)=>{const J=se(n.errors,S),X=d.isValid&&Ot(N)&&n.isValid!==N;if(t.delayError&&V?(u=h(()=>C(S,V)),u(t.delayError)):(clearTimeout(c),u=null,V?Oe(n.errors,S,V):je(n.errors,S)),(V?!an(J,V):J)||!et(ne)||X){const z={...ne,...X&&Ot(N)?{isValid:N}:{},errors:n.errors,name:S};n={...n,...z},g.state.next(z)}},L=async S=>{b(S,!0);const N=await t.resolver(i,t.context,gE(S||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return b(S),N},H=async S=>{const{errors:N}=await L(S);if(S)for(const V of S){const ne=se(N,V);ne?Oe(n.errors,V,ne):je(n.errors,V)}else n.errors=N;return N},D=async(S,N,V={valid:!0})=>{for(const ne in S){const J=S[ne];if(J){const{_f:X,...z}=J;if(X){const Y=s.array.has(X.name),xe=J._f&&mE(J._f);xe&&d.validatingFields&&b([ne],!0);const we=await wp(J,i,v,t.shouldUseNativeValidation&&!N,Y);if(xe&&d.validatingFields&&b([ne]),we[X.name]&&(V.valid=!1,N))break;!N&&(se(we,X.name)?Y?uE(n.errors,we,X.name):Oe(n.errors,X.name,we[X.name]):je(n.errors,X.name))}!et(z)&&await D(z,N,V)}}return V.valid},G=()=>{for(const S of s.unMount){const N=se(r,S);N&&(N._f.refs?N._f.refs.every(V=>!Os(V)):!Os(N._f.ref))&&oe(S)}s.unMount=new Set},U=(S,N)=>!t.disabled&&(S&&N&&Oe(i,S,N),!an(B(),o)),Z=(S,N,V)=>lE(S,s,{...a.mount?i:Ie(N)?o:Ft(S)?{[S]:N}:N},V,N),k=S=>Xo(se(a.mount?i:o,S,t.shouldUnregister?se(o,S,[]):[])),$=(S,N,V={})=>{const ne=se(r,S);let J=N;if(ne){const X=ne._f;X&&(!X.disabled&&Oe(i,S,_p(N,X)),J=Zo(X.ref)&&Ke(N)?"":N,Cp(X.ref)?[...X.ref.options].forEach(z=>z.selected=J.includes(z.value)):X.refs?wr(X.ref)?X.refs.length>1?X.refs.forEach(z=>(!z.defaultChecked||!z.disabled)&&(z.checked=Array.isArray(J)?!!J.find(Y=>Y===z.value):J===z.value)):X.refs[0]&&(X.refs[0].checked=!!J):X.refs.forEach(z=>z.checked=z.value===J):As(X.ref)?X.ref.value="":(X.ref.value=J,X.ref.type||g.values.next({name:S,values:{...i}})))}(V.shouldDirty||V.shouldTouch)&&O(S,J,V.shouldTouch,V.shouldDirty,!0),V.shouldValidate&&A(S)},F=(S,N,V)=>{for(const ne in N){const J=N[ne],X=`${S}.${ne}`,z=se(r,X);(s.array.has(S)||Me(J)||z&&!z._f)&&!Sn(J)?F(X,J,V):$(X,J,V)}},q=(S,N,V={})=>{const ne=se(r,S),J=s.array.has(S),X=ut(N);Oe(i,S,X),J?(g.array.next({name:S,values:{...i}}),(d.isDirty||d.dirtyFields)&&V.shouldDirty&&g.state.next({name:S,dirtyFields:Sr(o,i),isDirty:U(S,X)})):ne&&!ne._f&&!Ke(X)?F(S,X,V):$(S,X,V),gp(S,s)&&g.state.next({...n}),g.values.next({name:a.mount?S:void 0,values:{...i}})},P=async S=>{a.mount=!0;const N=S.target;let V=N.name,ne=!0;const J=se(r,V),X=()=>N.type?Fs(J._f):tE(S),z=Y=>{ne=Number.isNaN(Y)||Sn(Y)&&isNaN(Y.getTime())||an(Y,se(i,V,Y))};if(J){let Y,xe;const we=X(),Fe=S.type===fp.BLUR||S.type===fp.FOCUS_OUT,sn=!hE(J._f)&&!t.resolver&&!se(n.errors,V)&&!J._f.deps||vE(Fe,se(n.touchedFields,V),n.isSubmitted,f,m),Re=gp(V,s,Fe);Oe(i,V,we),Fe?(J._f.onBlur&&J._f.onBlur(S),u&&u(0)):J._f.onChange&&J._f.onChange(S);const Mt=O(V,we,Fe,!1),En=!et(Mt)||Re;if(!Fe&&g.values.next({name:V,type:S.type,values:{...i}}),sn)return d.isValid&&(t.mode==="onBlur"?Fe&&y():y()),En&&g.state.next({name:V,...Re?{}:Mt});if(!Fe&&Re&&g.state.next({...n}),t.resolver){const{errors:Be}=await L([V]);if(z(we),ne){const $t=Ap(n.errors,r,V),Wt=Ap(Be,r,$t.name||V);Y=Wt.error,V=Wt.name,xe=et(Be)}}else b([V],!0),Y=(await wp(J,i,v,t.shouldUseNativeValidation))[V],b([V]),z(we),ne&&(Y?xe=!1:d.isValid&&(xe=await D(r,!0)));ne&&(J._f.deps&&A(J._f.deps),I(V,xe,Y,Mt))}},j=(S,N)=>{if(se(n.errors,N)&&S.focus)return S.focus(),1},A=async(S,N={})=>{let V,ne;const J=Jo(S);if(t.resolver){const X=await H(Ie(S)?S:J);V=et(X),ne=S?!J.some(z=>se(X,z)):V}else S?(ne=(await Promise.all(J.map(async X=>{const z=se(r,X);return await D(z&&z._f?{[X]:z}:z)}))).every(Boolean),!(!ne&&!n.isValid)&&y()):ne=V=await D(r);return g.state.next({...!Ft(S)||d.isValid&&V!==n.isValid?{}:{name:S},...t.resolver||!S?{isValid:V}:{},errors:n.errors}),N.shouldFocus&&!ne&&Cr(r,j,S?J:s.mount),ne},B=S=>{const N={...a.mount?i:o};return Ie(S)?N:Ft(S)?se(N,S):S.map(V=>se(N,V))},Q=(S,N)=>({invalid:!!se((N||n).errors,S),isDirty:!!se((N||n).dirtyFields,S),error:se((N||n).errors,S),isValidating:!!se(n.validatingFields,S),isTouched:!!se((N||n).touchedFields,S)}),re=S=>{S&&Jo(S).forEach(N=>je(n.errors,N)),g.state.next({errors:S?n.errors:{}})},ee=(S,N,V)=>{const ne=(se(r,S,{_f:{}})._f||{}).ref,J=se(n.errors,S)||{},{ref:X,message:z,type:Y,...xe}=J;Oe(n.errors,S,{...xe,...N,ref:ne}),g.state.next({name:S,errors:n.errors,isValid:!1}),V&&V.shouldFocus&&ne&&ne.focus&&ne.focus()},ce=(S,N)=>Dt(S)?g.values.subscribe({next:V=>S(Z(void 0,N),V)}):Z(S,N,!0),oe=(S,N={})=>{for(const V of S?Jo(S):s.mount)s.mount.delete(V),s.array.delete(V),N.keepValue||(je(r,V),je(i,V)),!N.keepError&&je(n.errors,V),!N.keepDirty&&je(n.dirtyFields,V),!N.keepTouched&&je(n.touchedFields,V),!N.keepIsValidating&&je(n.validatingFields,V),!t.shouldUnregister&&!N.keepDefaultValue&&je(o,V);g.values.next({values:{...i}}),g.state.next({...n,...N.keepDirty?{isDirty:U()}:{}}),!N.keepIsValid&&y()},ae=({disabled:S,name:N,field:V,fields:ne,value:J})=>{if(Ot(S)&&a.mount||S){const X=S?void 0:Ie(J)?Fs(V?V._f:se(ne,N)._f):J;(S||!S&&!Ie(X))&&Oe(i,N,X),O(N,X,!1,!1,!0)}},de=(S,N={})=>{let V=se(r,S);const ne=Ot(N.disabled)||Ot(t.disabled);return Oe(r,S,{...V||{},_f:{...V&&V._f?V._f:{ref:{name:S}},name:S,mount:!0,...N}}),s.mount.add(S),V?ae({field:V,disabled:Ot(N.disabled)?N.disabled:t.disabled,name:S,value:N.value}):x(S,!0,N.value),{...ne?{disabled:N.disabled||t.disabled}:{},...t.progressive?{required:!!N.required,min:Er(N.min),max:Er(N.max),minLength:Er(N.minLength),maxLength:Er(N.maxLength),pattern:Er(N.pattern)}:{},name:S,onChange:P,onBlur:P,ref:J=>{if(J){de(S,N),V=se(r,S);const X=Ie(J.value)&&J.querySelectorAll&&J.querySelectorAll("input,select,textarea")[0]||J,z=pE(X),Y=V._f.refs||[];if(z?Y.find(xe=>xe===X):X===V._f.ref)return;Oe(r,S,{_f:{...V._f,...z?{refs:[...Y.filter(Os),X,...Array.isArray(se(o,S))?[{}]:[]],ref:{type:X.type,name:S}}:{ref:X}}}),x(S,!1,void 0,X)}else V=se(r,S,{}),V._f&&(V._f.mount=!1),(t.shouldUnregister||N.shouldUnregister)&&!(rE(s.array,S)&&a.action)&&s.unMount.add(S)}}},ue=()=>t.shouldFocusError&&Cr(r,j,s.mount),le=S=>{Ot(S)&&(g.state.next({disabled:S}),Cr(r,(N,V)=>{const ne=se(r,V);ne&&(N.disabled=ne._f.disabled||S,Array.isArray(ne._f.refs)&&ne._f.refs.forEach(J=>{J.disabled=ne._f.disabled||S}))},0,!1))},Ce=(S,N)=>async V=>{let ne;if(V&&(V.preventDefault&&V.preventDefault(),V.persist&&V.persist()),t.disabled){N&&await N({...n.errors},V);return}let J=ut(i);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:X,values:z}=await L();n.errors=X,J=z}else await D(r);if(je(n.errors,"root"),et(n.errors)){g.state.next({errors:{}});try{await S(J,V)}catch(X){ne=X}}else N&&await N({...n.errors},V),ue(),setTimeout(ue);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:et(n.errors)&&!ne,submitCount:n.submitCount+1,errors:n.errors}),ne)throw ne},K=(S,N={})=>{se(r,S)&&(Ie(N.defaultValue)?q(S,ut(se(o,S))):(q(S,N.defaultValue),Oe(o,S,ut(N.defaultValue))),N.keepTouched||je(n.touchedFields,S),N.keepDirty||(je(n.dirtyFields,S),n.isDirty=N.defaultValue?U(S,ut(se(o,S))):U()),N.keepError||(je(n.errors,S),d.isValid&&y()),g.state.next({...n}))},Ee=(S,N={})=>{const V=S?ut(S):o,ne=ut(V),J=et(S),X=J?o:ne;if(N.keepDefaultValues||(o=V),!N.keepValues){if(N.keepDirtyValues){const z=new Set([...s.mount,...Object.keys(Sr(o,i))]);for(const Y of Array.from(z))se(n.dirtyFields,Y)?Oe(X,Y,se(i,Y)):q(Y,se(X,Y))}else{if(_s&&Ie(S))for(const z of s.mount){const Y=se(r,z);if(Y&&Y._f){const xe=Array.isArray(Y._f.refs)?Y._f.refs[0]:Y._f.ref;if(Zo(xe)){const we=xe.closest("form");if(we){we.reset();break}}}}r={}}i=t.shouldUnregister?N.keepDefaultValues?ut(o):{}:ut(X),g.array.next({values:{...X}}),g.values.next({values:{...X}})}s={mount:N.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!d.isValid||!!N.keepIsValid||!!N.keepDirtyValues,a.watch=!!t.shouldUnregister,g.state.next({submitCount:N.keepSubmitCount?n.submitCount:0,isDirty:J?!1:N.keepDirty?n.isDirty:!!(N.keepDefaultValues&&!an(S,o)),isSubmitted:N.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:J?{}:N.keepDirtyValues?N.keepDefaultValues&&i?Sr(o,i):n.dirtyFields:N.keepDefaultValues&&S?Sr(o,S):N.keepDirty?n.dirtyFields:{},touchedFields:N.keepTouched?n.touchedFields:{},errors:N.keepErrors?n.errors:{},isSubmitSuccessful:N.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},We=(S,N)=>Ee(Dt(S)?S(i):S,N);return{control:{register:de,unregister:oe,getFieldState:Q,handleSubmit:Ce,setError:ee,_executeSchema:L,_getWatch:Z,_getDirty:U,_updateValid:y,_removeUnmounted:G,_updateFieldArray:w,_updateDisabledField:ae,_getFieldArray:k,_reset:Ee,_resetDefaultValues:()=>Dt(t.defaultValues)&&t.defaultValues().then(S=>{We(S,t.resetOptions),g.state.next({isLoading:!1})}),_updateFormState:S=>{n={...n,...S}},_disableForm:le,_subjects:g,_proxyFormState:d,_setErrors:E,get _fields(){return r},get _formValues(){return i},get _state(){return a},set _state(S){a=S},get _defaultValues(){return o},get _names(){return s},set _names(S){s=S},get _formState(){return n},set _formState(S){n=S},get _options(){return t},set _options(S){t={...t,...S}}},trigger:A,register:de,handleSubmit:Ce,watch:ce,setValue:q,getValues:B,reset:We,resetField:K,clearErrors:re,unregister:oe,setError:ee,setFocus:(S,N={})=>{const V=se(r,S),ne=V&&V._f;if(ne){const J=ne.refs?ne.refs[0]:ne.ref;J.focus&&(J.focus(),N.shouldSelect&&Dt(J.select)&&J.select())}},getFieldState:Q}}function wE(e={}){const t=_.useRef(),n=_.useRef(),[r,o]=_.useState({isDirty:!1,isValidating:!1,isLoading:Dt(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Dt(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...bE(e),formState:r});const i=t.current.control;return i._options=e,sE({subject:i._subjects.state,next:a=>{aE(a,i._proxyFormState,i._updateFormState)&&o({...i._formState})}}),_.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),_.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==r.isDirty&&i._subjects.state.next({isDirty:a})}},[i,r.isDirty]),_.useEffect(()=>{e.values&&!an(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,o(a=>({...a}))):i._resetDefaultValues()},[e.values,i]),_.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),_.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),_.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),_.useMemo(()=>({...t.current,formState:iE(r,i)}),[r,i])}const Pp=({className:e,children:t,content:n,side:r})=>{const[o,i]=_.useState(!1);return l.jsx(xn,{delayDuration:0,children:l.jsxs(bn,{open:o,children:[l.jsx(wn,{asChild:!0,children:l.jsx("button",{type:"button",className:he("cursor-pointer",e),onClick:()=>i(!o),onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onTouchStart:()=>i(!o),onKeyDown:a=>{a.preventDefault(),a.key==="Enter"&&i(!o)},children:t})}),l.jsx(on,{side:r,className:n?"":"hidden",children:l.jsx("span",{className:"inline-block",children:n})})]})})},CE=(e,t)=>{const[n,r]=_.useState(e);return _.useEffect(()=>{const o=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(o)}},[e,t]),n},SE=({apiBaseUrl:e="https://cdct-s3-explorer.cagent.cmcts.ai"})=>{var O,I;const[t,n]=_.useState([]),[r,o]=_.useState(!1),[i,a]=_.useState([]),[s,u]=_.useState(1),[c,d]=_.useState(1),[g,m]=_.useState(null),[f,v]=_.useState(""),h=CE(f,500),y=L=>{const H=L.match(/\d{6}/);if(!H)return{month:"",year:""};const D=H[0],G=D.substring(0,2),U=D.substring(2);return{month:G,year:U}},b=L=>L.map(D=>{let G=(D==null?void 0:D.month)||"",U=(D==null?void 0:D.year)||"";if((!G||!U)&&(D!=null&&D.file_name)){const Z=y(D.file_name);G=G||Z.month,U=U||Z.year}return{id:D==null?void 0:D.id,prefix:(D==null?void 0:D.prefix)||"",model:(D==null?void 0:D.model)||"",fileName:(D==null?void 0:D.file_name)||"",code:(D==null?void 0:D.stock_id)||"",month:G,year:U,content:(D==null?void 0:D.text_summary)||"",status:(D==null?void 0:D.status)||"",note:(D==null?void 0:D.note)||"",lastUpdate:D==null?void 0:D.updated_at,stock_id:D==null?void 0:D.stock_id}}),w=L=>{if(!(L!=null&&L.data))return[];const H=b(L==null?void 0:L.data);n(H),d(L.pagination.totalPages)},C=async(L=1,H=15)=>{m(L),o(!0);try{const D=await me.get(`${e}/api/latest-summaries`,{params:{page:L,limit:H,search:f}});(D==null?void 0:D.status)===200?w(D.data):console.error(D)}catch(D){console.error("Error fetching data:",D)}finally{m(null),o(!1)}};_.useEffect(()=>{h&&u(1),C(s)},[s,h]);const E=_.useMemo(()=>[{id:"code",header:"Mã",accessorKey:"code",cell:({row:H})=>l.jsx("span",{className:"flex flex-col",children:H.original.code})},{id:"month",header:"Tháng",accessorKey:"month",cell:({row:H})=>{const D=H.original.month,G=H.original.year;return l.jsx("span",{className:"flex flex-col",children:`${D.toString().padStart(2,"0")}/${G}`})}},{id:"content",header:"Nội dung",accessorKey:"content",cell:({row:H})=>{const D=H.getValue("content");return l.jsx("div",{className:"text-start truncate text-ellipsis overflow-hidden whitespace-nowrap max-w-[30dvw]",children:D})}},{id:"status",header:"Trạng thái",accessorKey:"status",cell:({row:H})=>{const G=H.original.status!=="unpublish";return l.jsx("span",{className:`inline-flex items-center rounded-full px-2 py-0 text-[10px] font-bold ${G?"bg-green-50 text-green-700 ring-1 ring-inset ring-green-600/20":"bg-gray-50 text-gray-600 ring-1 ring-inset ring-gray-500/20"}`,children:G?"PUBLISHED":"UNPUBLISHED"})}},{id:"note",header:"Ghi chú",accessorKey:"note",cell:({row:H})=>l.jsx(Pp,{content:l.jsx("div",{className:"font-medium text-[16px] max-w-[90dvw]",children:H.original.note}),children:l.jsx("div",{className:"text-start truncate text-ellipsis overflow-hidden whitespace-nowrap max-w-[20dvw]",children:H.original.note})})},{id:"last-update",header:"Cập nhật",accessorKey:"last-update",cell:({row:H})=>{const D=new Date(H.original.lastUpdate),G=D.getDate(),U=D.getMonth()+1,Z=`ngày ${G} tháng ${U}`;return l.jsx("span",{className:"flex flex-col",children:Z})}},{accessorKey:"actions",header:()=>l.jsx("div",{className:"font-medium text-right",children:"Hành động"}),cell:({row:H})=>{const[D,G]=_.useState(!1),[U,Z]=_.useState(!1),[k,$]=_.useState(!1),{handleSubmit:F,register:q,reset:P}=wE(),j=H.original.id,A=H.getValue("status"),B=H.getValue("content"),[Q,re]=_.useState(!1),ee=async()=>{try{re(!0);const oe=A==="unpublish"?"published":"unpublish",ae=await me.patch(`${e}/api/toggle-publish/${j}`,{id:j,typeAction:"update",status:A,idInput:j,stock_id:H.original.stock_id,prefix:H.original.prefix,model:H.original.model,summary_result:H.original.content,note:H.original.note});ae.status===200?n(de=>de.map(ue=>ue.id===j?{...ue,status:oe}:ue)):console.error("Failed to toggle publish status:",ae)}catch(oe){console.error("Error toggling publish status:",oe)}finally{re(!1)}},ce=async oe=>{G(!0);try{const ae=await me.patch(`${e}/api/update-summary`,{note:oe.note,text_summary:oe.content,id:j});ae.status===200?(await C(s),Z(!1)):console.error("Failed to update summary:",ae)}catch(ae){console.error("Error updating summary:",ae)}return G(!1)};return l.jsxs("div",{className:"flex items-center justify-end gap-2",children:[l.jsx(ve,{variant:"outline",size:"sm",onClick:()=>$(!0),className:"px-2 py-0.5 h-7",children:l.jsx(Oh,{className:"h-4 w-4"})}),l.jsx(jt,{open:k,onOpenChange:$,children:l.jsxs(St,{className:"max-w-3xl max-h-[80vh]",children:[l.jsx(Et,{children:l.jsx(_t,{children:"Nội dung chi tiết"})}),l.jsx("div",{className:"mt-4 overflow-y-auto max-h-[60vh]",children:l.jsx("div",{className:"whitespace-pre-wrap text-[16px] leading-relaxed",children:B})})]})}),l.jsxs(jt,{open:U,onOpenChange:oe=>{Z(oe),oe?P({content:H.original.content,note:H.original.note}):P()},children:[l.jsx(uo,{asChild:!0,children:l.jsx(ve,{variant:"outline",size:"sm",onClick:()=>Z(!0),className:"px-2 py-0.5 h-7",children:"Sửa"})}),l.jsx(St,{className:"rounded-lg sm:px-3 h-[calc(100dvh-200px)] min-w-[calc(100dvw-112px)]",children:l.jsxs(Et,{className:"flex flex-col gap-3",children:[l.jsx(_t,{className:"max-sm:hidden text-center",children:"Sửa summary"}),l.jsxs("form",{className:"flex flex-col gap-3 h-full justify-between",onSubmit:F(ce),children:[l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsxs("div",{className:"flex flex-col items-start",children:[l.jsx("span",{children:"Nội dung:"}),l.jsx(ur,{placeholder:"Nội dung",className:"w-full input-scroll-bar",defaultValue:H.original.answer||"",rows:10,...q("content")})]}),l.jsxs("div",{className:"flex flex-col items-start",children:[l.jsx("span",{children:"Ghi chú:"}),l.jsx(ur,{placeholder:"Nội dung",className:"w-full input-scroll-bar",defaultValue:H.original.note||"",rows:1,...q("note")})]})]}),l.jsx("div",{className:"flex justify-end",children:l.jsx(ve,{disabled:D,type:"submit",variant:"default",children:D?l.jsx($e,{className:"h-4 w-4 animate-spin"}):"Ok"})})]})]})})]}),l.jsx(ve,{variant:"outline",size:"sm",onClick:ee,disabled:Q,className:"w-[70px] px-2 py-0.5 h-7",children:Q?l.jsx($e,{className:"h-4 w-4 animate-spin"}):A==="unpublish"?"Publish":"Unpublish"})]})}}],[]),x=Zs({data:t,columns:E,state:{columnFilters:i},enableRowSelection:!0,onColumnFiltersChange:a,getFilteredRowModel:Mg(),getCoreRowModel:Js()});return l.jsxs("div",{className:"space-y-4 s3-explr-container",children:[l.jsx("div",{className:"flex items-center space-x-4 s3-explr-toolbar",children:l.jsxs("div",{className:"relative max-w-sm",children:[l.jsx(en,{placeholder:"Tìm kiếm theo mã...",value:f,onChange:L=>v(L.target.value),className:"pr-8"}),f&&l.jsx(ve,{variant:"ghost",size:"sm",className:"absolute right-1 top-1/2 -translate-y-1/2 h-6 w-6 p-0",onClick:()=>v(""),children:l.jsx(Hi,{className:"h-4 w-4"})})]})}),l.jsx("div",{className:"rounded-md border s3-explr-table-container",children:l.jsxs(vo,{className:"s3-explr-table",children:[l.jsx(yo,{className:"s3-explr-table-header",children:x.getHeaderGroups().map(L=>l.jsx(ht,{className:"hover:bg-transparent s3-explr-header-row",children:L.headers.map(H=>l.jsx(Tt,{className:"s3-explr-header-cell",children:H.isPlaceholder?null:Vr(H.column.columnDef.header,H.getContext())},H.id))},L.id))}),l.jsx(xo,{className:"s3-explr-table-body",children:r?l.jsx(ht,{children:l.jsx(Ze,{colSpan:E.length,className:"h-24 text-center",children:"Đang tải dữ liệu..."})}):(O=x.getRowModel().rows)!=null&&O.length?(I=x.getRowModel().rows)==null?void 0:I.map(L=>l.jsx(ht,{className:"h-12 s3-explr-row",children:L.getVisibleCells().map(H=>l.jsx(Ze,{className:"align-middle s3-explr-cell",children:Vr(H.column.columnDef.cell,H.getContext())},H.id))},L.id)):l.jsx(ht,{children:l.jsx(Ze,{colSpan:E.length,className:"h-24 text-center",children:"Không có kết quả."})})})]})}),l.jsx("div",{className:"mt-4",children:l.jsx(fo,{children:l.jsxs(po,{children:[l.jsx(mt,{children:l.jsx(go,{onClick:()=>u(L=>Math.max(1,L-1)),className:s===1?"pointer-events-none opacity-50":"cursor-pointer"})}),Array.from({length:c},(L,H)=>H+1).filter(L=>L===1||L===c||Math.abs(L-s)<=1).map((L,H,D)=>l.jsxs(l.Fragment,{children:[H>0&&D[H-1]!==L-1&&l.jsx(mt,{children:l.jsx(ho,{})},L+"..."),l.jsx(mt,{children:l.jsx(Vn,{onClick:()=>u(L),isActive:s===L,className:`cursor-pointer ${r?"pointer-events-none":""}`,children:g===L?l.jsx($e,{className:"h-4 w-4 animate-spin"}):L})},L)]})),l.jsx(mt,{children:l.jsx(mo,{onClick:()=>u(L=>Math.min(c,L+1)),className:s===c||g!==null?"pointer-events-none opacity-50":"cursor-pointer"})})]})})})]})},Np=10,EE=_.memo(({apiBaseUrl:e="https://cdct-s3-explorer.cagent.cmcts.ai"})=>{const[t,n]=_.useState(1),[r,o]=_.useState([]),[i,a]=_.useState({total:0,page:1,limit:Np,totalPages:1}),[s,u]=_.useState(!0),[c,d]=_.useState(null),[g,m]=_.useState(new Set),{toast:f}=ko(),[v,h]=_.useState(!1),y=async x=>{try{d(x);const O=await me.get(`${e}/api/jobs`,{params:{page:x.toString(),limit:Np.toString()}});o(O.data.data),a(O.data.pagination)}catch{f({variant:"destructive",title:"Error",description:"Failed to fetch jobs. Please try again."})}finally{d(null),u(!1)}};_.useEffect(()=>{y(t)},[t,e]);const b=async x=>{m(O=>new Set(O).add(x.toString()));try{await me.post(`${e}/api/retry-job`,{jobId:x}),f({title:"Job Restarted",description:`Job ${x} has been successfully restarted.`}),y(t)}catch{f({variant:"destructive",title:"Retry Failed",description:`Failed to restart job ${x}. Please try again.`})}finally{m(O=>{const I=new Set(O);return I.delete(x.toString()),I})}},w=async()=>{h(!0),n(1),await y(1),h(!1)},C=x=>new Date(x).toLocaleString(),E=x=>{if(x=parseFloat(x),x<60)return`${x.toFixed(2)}s`;const O=Math.floor(x/60),I=(x%60).toFixed(0);return`${O}m ${I}s`};return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[l.jsx(Ah,{className:"w-8 h-8 text-primary"}),l.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Job Management"}),l.jsx(ve,{variant:"outline",size:"icon",onClick:w,disabled:v||s,className:"ml-2",children:l.jsx(Ih,{className:`h-4 w-4 ${v?"animate-spin":""}`})})]}),l.jsx("div",{className:"rounded-md border",children:l.jsxs(vo,{children:[l.jsx(yo,{children:l.jsxs(ht,{children:[l.jsx(Tt,{children:"ID"}),l.jsx(Tt,{children:"Tên Công Việc"}),l.jsx(Tt,{children:"Thời Gian Bắt Đầu"}),l.jsx(Tt,{children:"Thời Gian Cập Nhật"}),l.jsx(Tt,{children:"Thời Gian Thực Thi"}),l.jsx(Tt,{children:"Trạng Thái"}),l.jsx(Tt,{children:"Thao Tác"})]})}),l.jsx(xo,{children:s&&r.length===0?l.jsx(ht,{children:l.jsx(Ze,{colSpan:7,className:"text-center py-4",children:l.jsx($e,{className:"w-6 h-6 animate-spin mx-auto"})})}):r.map(x=>{var O,I;return l.jsxs(ht,{children:[l.jsx(Ze,{className:"!w-[100px]",children:x.id}),l.jsx(Ze,{className:"font-medium",children:(O=x.job_name)==null?void 0:O.replace("Upload file","Summary")}),l.jsx(Ze,{className:"!w-[200px]",children:C(x.created_at)}),l.jsx(Ze,{className:"!w-[200px]",children:C(x.updated_at)}),l.jsx(Ze,{className:"!w-[150px]",children:E(x.execution_time_seconds)}),l.jsx(Ze,{className:"!w-[200px]",children:l.jsx(Pp,{content:x.status==="fail"&&x.error?l.jsx("div",{className:"font-medium text-[16px] max-w-[90dvw]",children:x.error}):null,children:l.jsx("div",{className:`inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium truncate text-ellipsis overflow-hidden whitespace-nowrap max-w-[30dvw]
176
- ${x.status==="done"?"bg-green-100 text-green-800":x.status==="fail"?"bg-red-100 text-red-800":"bg-yellow-100 text-yellow-800"}`,children:x.status==="fail"?"FAILED":(I=x.status)==null?void 0:I.toUpperCase()})})}),l.jsx(Ze,{className:"!w-[200px]",children:x.status==="fail"?l.jsx(ve,{variant:"outline",size:"sm",onClick:()=>b(x.id),disabled:g.has(x.id.toString()),className:"h-[32px]",children:g.has(x.id.toString())?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin"}),"Đang thử lại..."]}):"Thử Lại"}):l.jsx("div",{className:"h-[32px]"})})]},x.id)})})]})}),l.jsx("div",{className:"mt-4",children:l.jsx(fo,{children:l.jsxs(po,{children:[l.jsx(mt,{children:l.jsx(go,{onClick:()=>n(x=>Math.max(1,x-1)),className:t===1?"pointer-events-none opacity-50":"cursor-pointer"})}),Array.from({length:i.totalPages},(x,O)=>O+1).filter(x=>x===1||x===i.totalPages||Math.abs(x-t)<=1).map((x,O,I)=>l.jsxs(l.Fragment,{children:[O>0&&I[O-1]!==x-1&&l.jsx(mt,{children:l.jsx(ho,{})},x+"..."),l.jsx(mt,{children:l.jsx(Vn,{onClick:()=>n(x),isActive:t===x,className:`cursor-pointer ${c!==null?"pointer-events-none":""}`,children:c===x?l.jsx($e,{className:"h-4 w-4 animate-spin"}):x})},x)]})),l.jsx(mt,{children:l.jsx(mo,{onClick:()=>n(x=>Math.min(i.totalPages,x+1)),className:t===i.totalPages||c!==null?"pointer-events-none opacity-50":"cursor-pointer"})})]})})}),l.jsx(wd,{})]})});dt.Job=EE,dt.S3Explorer=eE,dt.Summary=SE,Object.defineProperty(dt,Symbol.toStringTag,{value:"Module"})});
170
+ */var us,$f;function qC(){if($f)return us;$f=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var u=Object.getOwnPropertyNames(a).map(function(d){return a[d]});if(u.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(d){c[d]=d}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return us=o()?Object.assign:function(i,a){for(var s,u=r(i),c,d=1;d<arguments.length;d++){s=Object(arguments[d]);for(var g in s)t.call(s,g)&&(u[g]=s[g]);if(e){c=e(s);for(var m=0;m<c.length;m++)n.call(s,c[m])&&(u[c[m]]=s[c[m]])}}return u},us}var ds,Lf;function fs(){if(Lf)return ds;Lf=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ds=e,ds}var ps,Rf;function Vf(){return Rf||(Rf=1,ps=Function.call.bind(Object.prototype.hasOwnProperty)),ps}var gs,jf;function GC(){if(jf)return gs;jf=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=fs(),n={},r=Vf();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,u,c){if(process.env.NODE_ENV!=="production"){for(var d in i)if(r(i,d)){var g;try{if(typeof i[d]!="function"){var m=Error((u||"React class")+": "+s+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}g=i[d](a,d,u,s,null,t)}catch(v){g=v}if(g&&!(g instanceof Error)&&e((u||"React class")+": type specification of "+s+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof g+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),g instanceof Error&&!(g.message in n)){n[g.message]=!0;var f=c?c():"";e("Failed "+s+" type: "+g.message+(f??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},gs=o,gs}var ms,zf;function KC(){if(zf)return ms;zf=1;var e=Mf(),t=qC(),n=fs(),r=Vf(),o=GC(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var u="Warning: "+s;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function a(){return null}return ms=function(s,u){var c=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function g(A){var B=A&&(c&&A[c]||A[d]);if(typeof B=="function")return B}var m="<<anonymous>>",f={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:w(),arrayOf:C,element:E(),elementType:x(),instanceOf:O,node:D(),objectOf:$,oneOf:I,oneOfType:H,shape:U,exact:Z};function v(A,B){return A===B?A!==0||1/A===1/B:A!==A&&B!==B}function h(A,B){this.message=A,this.data=B&&typeof B=="object"?B:{},this.stack=""}h.prototype=Error.prototype;function y(A){if(process.env.NODE_ENV!=="production")var B={},Q=0;function re(ce,oe,ae,de,ue,le,Ce){if(de=de||m,le=le||ae,Ce!==n){if(u){var K=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 K.name="Invariant Violation",K}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ee=de+":"+ae;!B[Ee]&&Q<3&&(i("You are manually calling a React.PropTypes validation function for the `"+le+"` prop on `"+de+"`. 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."),B[Ee]=!0,Q++)}}return oe[ae]==null?ce?oe[ae]===null?new h("The "+ue+" `"+le+"` is marked as required "+("in `"+de+"`, but its value is `null`.")):new h("The "+ue+" `"+le+"` is marked as required in "+("`"+de+"`, but its value is `undefined`.")):null:A(oe,ae,de,ue,le)}var ee=re.bind(null,!1);return ee.isRequired=re.bind(null,!0),ee}function b(A){function B(Q,re,ee,ce,oe,ae){var de=Q[re],ue=F(de);if(ue!==A){var le=q(de);return new h("Invalid "+ce+" `"+oe+"` of type "+("`"+le+"` supplied to `"+ee+"`, expected ")+("`"+A+"`."),{expectedType:A})}return null}return y(B)}function w(){return y(a)}function C(A){function B(Q,re,ee,ce,oe){if(typeof A!="function")return new h("Property `"+oe+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var ae=Q[re];if(!Array.isArray(ae)){var de=F(ae);return new h("Invalid "+ce+" `"+oe+"` of type "+("`"+de+"` supplied to `"+ee+"`, expected an array."))}for(var ue=0;ue<ae.length;ue++){var le=A(ae,ue,ee,ce,oe+"["+ue+"]",n);if(le instanceof Error)return le}return null}return y(B)}function E(){function A(B,Q,re,ee,ce){var oe=B[Q];if(!s(oe)){var ae=F(oe);return new h("Invalid "+ee+" `"+ce+"` of type "+("`"+ae+"` supplied to `"+re+"`, expected a single ReactElement."))}return null}return y(A)}function x(){function A(B,Q,re,ee,ce){var oe=B[Q];if(!e.isValidElementType(oe)){var ae=F(oe);return new h("Invalid "+ee+" `"+ce+"` of type "+("`"+ae+"` supplied to `"+re+"`, expected a single ReactElement type."))}return null}return y(A)}function O(A){function B(Q,re,ee,ce,oe){if(!(Q[re]instanceof A)){var ae=A.name||m,de=j(Q[re]);return new h("Invalid "+ce+" `"+oe+"` of type "+("`"+de+"` supplied to `"+ee+"`, expected ")+("instance of `"+ae+"`."))}return null}return y(B)}function I(A){if(!Array.isArray(A))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("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])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function B(Q,re,ee,ce,oe){for(var ae=Q[re],de=0;de<A.length;de++)if(v(ae,A[de]))return null;var ue=JSON.stringify(A,function(Ce,K){var Ee=q(K);return Ee==="symbol"?String(K):K});return new h("Invalid "+ce+" `"+oe+"` of value `"+String(ae)+"` "+("supplied to `"+ee+"`, expected one of "+ue+"."))}return y(B)}function $(A){function B(Q,re,ee,ce,oe){if(typeof A!="function")return new h("Property `"+oe+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var ae=Q[re],de=F(ae);if(de!=="object")return new h("Invalid "+ce+" `"+oe+"` of type "+("`"+de+"` supplied to `"+ee+"`, expected an object."));for(var ue in ae)if(r(ae,ue)){var le=A(ae,ue,ee,ce,oe+"."+ue,n);if(le instanceof Error)return le}return null}return y(B)}function H(A){if(!Array.isArray(A))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var B=0;B<A.length;B++){var Q=A[B];if(typeof Q!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+P(Q)+" at index "+B+"."),a}function re(ee,ce,oe,ae,de){for(var ue=[],le=0;le<A.length;le++){var Ce=A[le],K=Ce(ee,ce,oe,ae,de,n);if(K==null)return null;K.data&&r(K.data,"expectedType")&&ue.push(K.data.expectedType)}var Ee=ue.length>0?", expected one of type ["+ue.join(", ")+"]":"";return new h("Invalid "+ae+" `"+de+"` supplied to "+("`"+oe+"`"+Ee+"."))}return y(re)}function D(){function A(B,Q,re,ee,ce){return k(B[Q])?null:new h("Invalid "+ee+" `"+ce+"` supplied to "+("`"+re+"`, expected a ReactNode."))}return y(A)}function G(A,B,Q,re,ee){return new h((A||"React class")+": "+B+" type `"+Q+"."+re+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function U(A){function B(Q,re,ee,ce,oe){var ae=Q[re],de=F(ae);if(de!=="object")return new h("Invalid "+ce+" `"+oe+"` of type `"+de+"` "+("supplied to `"+ee+"`, expected `object`."));for(var ue in A){var le=A[ue];if(typeof le!="function")return G(ee,ce,oe,ue,q(le));var Ce=le(ae,ue,ee,ce,oe+"."+ue,n);if(Ce)return Ce}return null}return y(B)}function Z(A){function B(Q,re,ee,ce,oe){var ae=Q[re],de=F(ae);if(de!=="object")return new h("Invalid "+ce+" `"+oe+"` of type `"+de+"` "+("supplied to `"+ee+"`, expected `object`."));var ue=t({},Q[re],A);for(var le in ue){var Ce=A[le];if(r(A,le)&&typeof Ce!="function")return G(ee,ce,oe,le,q(Ce));if(!Ce)return new h("Invalid "+ce+" `"+oe+"` key `"+le+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(Q[re],null," ")+`
171
+ Valid keys: `+JSON.stringify(Object.keys(A),null," "));var K=Ce(ae,le,ee,ce,oe+"."+le,n);if(K)return K}return null}return y(B)}function k(A){switch(typeof A){case"number":case"string":case"undefined":return!0;case"boolean":return!A;case"object":if(Array.isArray(A))return A.every(k);if(A===null||s(A))return!0;var B=g(A);if(B){var Q=B.call(A),re;if(B!==A.entries){for(;!(re=Q.next()).done;)if(!k(re.value))return!1}else for(;!(re=Q.next()).done;){var ee=re.value;if(ee&&!k(ee[1]))return!1}}else return!1;return!0;default:return!1}}function M(A,B){return A==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function F(A){var B=typeof A;return Array.isArray(A)?"array":A instanceof RegExp?"object":M(B,A)?"symbol":B}function q(A){if(typeof A>"u"||A===null)return""+A;var B=F(A);if(B==="object"){if(A instanceof Date)return"date";if(A instanceof RegExp)return"regexp"}return B}function P(A){var B=q(A);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function j(A){return!A.constructor||!A.constructor.name?m:A.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},ms}var hs,Bf;function YC(){if(Bf)return hs;Bf=1;var e=fs();function t(){}function n(){}return n.resetWarningCache=t,hs=function(){function r(a,s,u,c,d,g){if(g!==e){var m=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 m.name="Invariant Violation",m}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},hs}if(process.env.NODE_ENV!=="production"){var XC=Mf(),JC=!0;cs.exports=KC()(XC.isElement,JC)}else cs.exports=YC()();var ZC=cs.exports;const Ne=Jr(ZC),QC=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 qn(e,t,n){const r=eS(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&Hf(r,"path",i),Hf(r,"relativePath",i),r}function eS(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=QC.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function Hf(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const tS=[".DS_Store","Thumbs.db"];function nS(e){return gn(this,void 0,void 0,function*(){return Wo(e)&&rS(e.dataTransfer)?sS(e.dataTransfer,e.type):oS(e)?iS(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?aS(e):[]})}function rS(e){return Wo(e)}function oS(e){return Wo(e)&&Wo(e.target)}function Wo(e){return typeof e=="object"&&e!==null}function iS(e){return vs(e.target.files).map(t=>qn(t))}function aS(e){return gn(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>qn(n))})}function sS(e,t){return gn(this,void 0,void 0,function*(){if(e.items){const n=vs(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(lS));return Uf(Wf(r))}return Uf(vs(e.files).map(n=>qn(n)))})}function Uf(e){return e.filter(t=>tS.indexOf(t.name)===-1)}function vs(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function lS(e){if(typeof e.webkitGetAsEntry!="function")return qf(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Gf(t):qf(e,t)}function Wf(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?Wf(n):[n]],[])}function qf(e,t){return gn(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const i=yield e.getAsFileSystemHandle();if(i===null)throw new Error(`${e} is not a File`);if(i!==void 0){const a=yield i.getFile();return a.handle=i,qn(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return qn(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function cS(e){return gn(this,void 0,void 0,function*(){return e.isDirectory?Gf(e):uS(e)})}function Gf(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>gn(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(cS));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function uS(e){return gn(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=qn(r,e.fullPath);t(o)},r=>{n(r)})})})}var ys=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?i===s.replace(/\/.*$/,""):o===s})}return!0};function Kf(e){return pS(e)||fS(e)||Zf(e)||dS()}function dS(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
172
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fS(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pS(e){if(Array.isArray(e))return xs(e)}function Yf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Xf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Yf(Object(n),!0).forEach(function(r){Jf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xr(e,t){return hS(e)||mS(e,t)||Zf(e,t)||gS()}function gS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
173
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zf(e,t){if(e){if(typeof e=="string")return xs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xs(e,t)}}function xs(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mS(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(u){i=!0,s=u}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function hS(e){if(Array.isArray(e))return e}var vS=typeof ys=="function"?ys:ys.default,yS="file-invalid-type",xS="file-too-large",bS="file-too-small",wS="too-many-files",CS=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:yS,message:"File type must be ".concat(r)}},Qf=function(t){return{code:xS,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},ep=function(t){return{code:bS,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},SS={code:wS,message:"Too many files"};function tp(e,t){var n=e.type==="application/x-moz-file"||vS(e,t);return[n,n?null:CS(t)]}function np(e,t,n){if(Cn(e.size))if(Cn(t)&&Cn(n)){if(e.size>n)return[!1,Qf(n)];if(e.size<t)return[!1,ep(t)]}else{if(Cn(t)&&e.size<t)return[!1,ep(t)];if(Cn(n)&&e.size>n)return[!1,Qf(n)]}return[!0,null]}function Cn(e){return e!=null}function ES(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&a>=1&&t.length>a?!1:t.every(function(u){var c=tp(u,n),d=xr(c,1),g=d[0],m=np(u,r,o),f=xr(m,1),v=f[0],h=s?s(u):null;return g&&v&&!h})}function qo(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Go(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function rp(e){e.preventDefault()}function _S(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function TS(e){return e.indexOf("Edge/")!==-1}function AS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return _S(e)||TS(e)}function kt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return!qo(r)&&s&&s.apply(void 0,[r].concat(i)),qo(r)})}}function PS(){return"showOpenFilePicker"in window}function NS(e){if(Cn(e)){var t=Object.entries(e).filter(function(n){var r=xr(n,2),o=r[0],i=r[1],a=!0;return op(o)||(console.warn('Skipped "'.concat(o,'" 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.')),a=!1),(!Array.isArray(i)||!i.every(ip))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=xr(r,2),i=o[0],a=o[1];return Xf(Xf({},n),{},Jf({},i,a))},{});return[{description:"Files",accept:t}]}return e}function kS(e){if(Cn(e))return Object.entries(e).reduce(function(t,n){var r=xr(n,2),o=r[0],i=r[1];return[].concat(Kf(t),[o],Kf(i))},[]).filter(function(t){return op(t)||ip(t)}).join(",")}function OS(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function FS(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function op(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function ip(e){return/^.*\.[\w]+$/.test(e)}var DS=["children"],IS=["open"],MS=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],$S=["refKey","onChange","onClick"];function LS(e){return jS(e)||VS(e)||ap(e)||RS()}function RS(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
174
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VS(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jS(e){if(Array.isArray(e))return ws(e)}function bs(e,t){return HS(e)||BS(e,t)||ap(e,t)||zS()}function zS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
175
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ap(e,t){if(e){if(typeof e=="string")return ws(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ws(e,t)}}function ws(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function BS(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(u){i=!0,s=u}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function HS(e){if(Array.isArray(e))return e}function sp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function De(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sp(Object(n),!0).forEach(function(r){Cs(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ko(e,t){if(e==null)return{};var n=US(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function US(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Ss=_.forwardRef(function(e,t){var n=e.children,r=Ko(e,DS),o=cp(r),i=o.open,a=Ko(o,IS);return _.useImperativeHandle(t,function(){return{open:i}},[i]),_.createElement(_.Fragment,null,n(De(De({},a),{},{open:i})))});Ss.displayName="Dropzone";var lp={disabled:!1,getFilesFromEvent:nS,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};Ss.defaultProps=lp,Ss.propTypes={children:Ne.func,accept:Ne.objectOf(Ne.arrayOf(Ne.string)),multiple:Ne.bool,preventDropOnDocument:Ne.bool,noClick:Ne.bool,noKeyboard:Ne.bool,noDrag:Ne.bool,noDragEventsBubbling:Ne.bool,minSize:Ne.number,maxSize:Ne.number,maxFiles:Ne.number,disabled:Ne.bool,getFilesFromEvent:Ne.func,onFileDialogCancel:Ne.func,onFileDialogOpen:Ne.func,useFsAccessApi:Ne.bool,autoFocus:Ne.bool,onDragEnter:Ne.func,onDragLeave:Ne.func,onDragOver:Ne.func,onDrop:Ne.func,onDropAccepted:Ne.func,onDropRejected:Ne.func,onError:Ne.func,validator:Ne.func};var Es={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function cp(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=De(De({},lp),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,u=t.maxFiles,c=t.onDragEnter,d=t.onDragLeave,g=t.onDragOver,m=t.onDrop,f=t.onDropAccepted,v=t.onDropRejected,h=t.onFileDialogCancel,y=t.onFileDialogOpen,b=t.useFsAccessApi,w=t.autoFocus,C=t.preventDropOnDocument,E=t.noClick,x=t.noKeyboard,O=t.noDrag,I=t.noDragEventsBubbling,$=t.onError,H=t.validator,D=_.useMemo(function(){return kS(n)},[n]),G=_.useMemo(function(){return NS(n)},[n]),U=_.useMemo(function(){return typeof y=="function"?y:up},[y]),Z=_.useMemo(function(){return typeof h=="function"?h:up},[h]),k=_.useRef(null),M=_.useRef(null),F=_.useReducer(WS,Es),q=bs(F,2),P=q[0],j=q[1],A=P.isFocused,B=P.isFileDialogActive,Q=_.useRef(typeof window<"u"&&window.isSecureContext&&b&&PS()),re=function(){!Q.current&&B&&setTimeout(function(){if(M.current){var Y=M.current.files;Y.length||(j({type:"closeDialog"}),Z())}},300)};_.useEffect(function(){return window.addEventListener("focus",re,!1),function(){window.removeEventListener("focus",re,!1)}},[M,B,Z,Q]);var ee=_.useRef([]),ce=function(Y){k.current&&k.current.contains(Y.target)||(Y.preventDefault(),ee.current=[])};_.useEffect(function(){return C&&(document.addEventListener("dragover",rp,!1),document.addEventListener("drop",ce,!1)),function(){C&&(document.removeEventListener("dragover",rp),document.removeEventListener("drop",ce))}},[k,C]),_.useEffect(function(){return!r&&w&&k.current&&k.current.focus(),function(){}},[k,w,r]);var oe=_.useCallback(function(z){$?$(z):console.error(z)},[$]),ae=_.useCallback(function(z){z.preventDefault(),z.persist(),V(z),ee.current=[].concat(LS(ee.current),[z.target]),Go(z)&&Promise.resolve(o(z)).then(function(Y){if(!(qo(z)&&!I)){var xe=Y.length,we=xe>0&&ES({files:Y,accept:D,minSize:a,maxSize:i,multiple:s,maxFiles:u,validator:H}),Fe=xe>0&&!we;j({isDragAccept:we,isDragReject:Fe,isDragActive:!0,type:"setDraggedFiles"}),c&&c(z)}}).catch(function(Y){return oe(Y)})},[o,c,oe,I,D,a,i,s,u,H]),de=_.useCallback(function(z){z.preventDefault(),z.persist(),V(z);var Y=Go(z);if(Y&&z.dataTransfer)try{z.dataTransfer.dropEffect="copy"}catch{}return Y&&g&&g(z),!1},[g,I]),ue=_.useCallback(function(z){z.preventDefault(),z.persist(),V(z);var Y=ee.current.filter(function(we){return k.current&&k.current.contains(we)}),xe=Y.indexOf(z.target);xe!==-1&&Y.splice(xe,1),ee.current=Y,!(Y.length>0)&&(j({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Go(z)&&d&&d(z))},[k,d,I]),le=_.useCallback(function(z,Y){var xe=[],we=[];z.forEach(function(Fe){var sn=tp(Fe,D),Re=bs(sn,2),Mt=Re[0],En=Re[1],Be=np(Fe,a,i),$t=bs(Be,2),Wt=$t[0],Yn=$t[1],_e=H?H(Fe):null;if(Mt&&Wt&&!_e)xe.push(Fe);else{var ln=[En,Yn];_e&&(ln=ln.concat(_e)),we.push({file:Fe,errors:ln.filter(function(ni){return ni})})}}),(!s&&xe.length>1||s&&u>=1&&xe.length>u)&&(xe.forEach(function(Fe){we.push({file:Fe,errors:[SS]})}),xe.splice(0)),j({acceptedFiles:xe,fileRejections:we,isDragReject:we.length>0,type:"setFiles"}),m&&m(xe,we,Y),we.length>0&&v&&v(we,Y),xe.length>0&&f&&f(xe,Y)},[j,s,D,a,i,u,m,f,v,H]),Ce=_.useCallback(function(z){z.preventDefault(),z.persist(),V(z),ee.current=[],Go(z)&&Promise.resolve(o(z)).then(function(Y){qo(z)&&!I||le(Y,z)}).catch(function(Y){return oe(Y)}),j({type:"reset"})},[o,le,oe,I]),K=_.useCallback(function(){if(Q.current){j({type:"openDialog"}),U();var z={multiple:s,types:G};window.showOpenFilePicker(z).then(function(Y){return o(Y)}).then(function(Y){le(Y,null),j({type:"closeDialog"})}).catch(function(Y){OS(Y)?(Z(Y),j({type:"closeDialog"})):FS(Y)?(Q.current=!1,M.current?(M.current.value=null,M.current.click()):oe(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."))):oe(Y)});return}M.current&&(j({type:"openDialog"}),U(),M.current.value=null,M.current.click())},[j,U,Z,b,le,oe,G,s]),Ee=_.useCallback(function(z){!k.current||!k.current.isEqualNode(z.target)||(z.key===" "||z.key==="Enter"||z.keyCode===32||z.keyCode===13)&&(z.preventDefault(),K())},[k,K]),We=_.useCallback(function(){j({type:"focus"})},[]),qe=_.useCallback(function(){j({type:"blur"})},[]),It=_.useCallback(function(){E||(AS()?setTimeout(K,0):K())},[E,K]),st=function(Y){return r?null:Y},S=function(Y){return x?null:st(Y)},N=function(Y){return O?null:st(Y)},V=function(Y){I&&Y.stopPropagation()},ne=_.useMemo(function(){return function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Y=z.refKey,xe=Y===void 0?"ref":Y,we=z.role,Fe=z.onKeyDown,sn=z.onFocus,Re=z.onBlur,Mt=z.onClick,En=z.onDragEnter,Be=z.onDragOver,$t=z.onDragLeave,Wt=z.onDrop,Yn=Ko(z,MS);return De(De(Cs({onKeyDown:S(kt(Fe,Ee)),onFocus:S(kt(sn,We)),onBlur:S(kt(Re,qe)),onClick:st(kt(Mt,It)),onDragEnter:N(kt(En,ae)),onDragOver:N(kt(Be,de)),onDragLeave:N(kt($t,ue)),onDrop:N(kt(Wt,Ce)),role:typeof we=="string"&&we!==""?we:"presentation"},xe,k),!r&&!x?{tabIndex:0}:{}),Yn)}},[k,Ee,We,qe,It,ae,de,ue,Ce,x,O,r]),J=_.useCallback(function(z){z.stopPropagation()},[]),X=_.useMemo(function(){return function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Y=z.refKey,xe=Y===void 0?"ref":Y,we=z.onChange,Fe=z.onClick,sn=Ko(z,$S),Re=Cs({accept:D,multiple:s,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:st(kt(we,Ce)),onClick:st(kt(Fe,J)),tabIndex:-1},xe,M);return De(De({},Re),sn)}},[M,n,s,Ce,r]);return De(De({},P),{},{isFocused:A&&!r,getRootProps:ne,getInputProps:X,rootRef:k,inputRef:M,open:st(K)})}function WS(e,t){switch(t.type){case"focus":return De(De({},e),{},{isFocused:!0});case"blur":return De(De({},e),{},{isFocused:!1});case"openDialog":return De(De({},Es),{},{isFileDialogActive:!0});case"closeDialog":return De(De({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return De(De({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return De(De({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return De({},Es);default:return e}}function up(){}const qS=({onFilesSelected:e,children:t})=>{const[n,r]=_.useState(!1),{getRootProps:o,getInputProps:i}=cp({noClick:!0,onDrop:a=>{if(a&&a.length>0)if(a[0].path.split("/").length>2){const u=a.map(c=>{const g=(c.path||c.relativePath||"").split("/").slice(1).join("/");return(!c.webkitRelativePath||c.webkitRelativePath==="")&&Object.defineProperty(c,"webkitRelativePath",{writable:!0,value:g,enumerable:!0,configurable:!0}),c});e(u,"folder")}else e(a,"files");r(!1)},onDragOver:a=>{a.preventDefault(),n||r(!0)},multiple:!0});return _.useEffect(()=>{const a=s=>{s.clientX===0&&s.clientY===0&&r(!1)};return document.addEventListener("dragleave",a),()=>{document.removeEventListener("dragleave",a)}},[]),l.jsxs("div",{...o(),className:"transition-opacity min-h-[600px]",children:[n?l.jsx("div",{className:"flex flex-col items-center justify-center p-4 border-2 border-dashed border-gray-300 rounded-lg bg-gray-50 h-screen"}):t,l.jsx("input",{...i()})]})},GS=({openDialogRename:e,setOpenDialogRename:t,apiBaseUrl:n,setFileToMove:r,fileToMove:o,refreshFiles:i,ignoreCache:a})=>{var w;const[s,u]=_.useState({}),[c,d]=_.useState(!1),[g,m]=_.useState(!1),[f,v]=_.useState(""),{toast:h}=ko();_.useEffect(()=>{e&&y(f)},[f,e]);const y=async C=>{try{m(!0);const E=await me.get(`${n}/api/list-s3-folders?prefix=${C}`);u(E==null?void 0:E.data)}catch{h({title:"Error",description:"Unable to load S3 folder list",variant:"destructive"})}finally{m(!1)}},b=async()=>{d(!0);try{const C=o.key,E=C.endsWith("/")?C:`${C}/`,x=f.endsWith("/")?f:`${f}/`;if(E===x||C===f){h({title:"Lỗi",description:"Không thể di chuyển file đến cùng vị trí",variant:"destructive"}),d(!1);return}await me.post(`${n}/api/move`,{oldPath:C,newPath:f}),a.current=!0,await i(),h({title:"Đã di chuyển",description:`Đã di chuyển thành công "${o.name}" đến "${f}"`}),t(!1),r(null),v("")}catch(C){console.error("Error renaming item:",C),h({title:"Lỗi",description:"Không thể đổi tên",variant:"destructive"})}finally{d(!1)}};return l.jsx(jt,{open:e,onOpenChange:C=>{C||(t(!1),r(null),v(""))},children:l.jsxs(St,{className:"max-h-[700px] pb-3 px-1 s3-explr-input-group max-w-5xl w-[90%] p-6 bg-white rounded-lg shadow-lg",children:[l.jsxs(Et,{className:"mb-4 w-full h-full",children:[l.jsx("nav",{className:"mb-4",children:l.jsxs("ul",{className:"flex items-center space-x-2 text-sm text-gray-600",children:[l.jsx("li",{className:"cursor-pointer hover:text-blue-600 transition-colors",onClick:()=>v(""),children:"Root"}),f.split("/").map((C,E,x)=>l.jsx("li",{className:"cursor-pointer hover:text-blue-600 transition-colors",onClick:()=>v(C==="Root"?"":x.slice(0,E+1).join("/")+"/"),children:C},E))]})}),l.jsxs(_t,{className:"text-xl font-semibold text-gray-800",children:["Di chuyển"," ",l.jsxs("span",{className:"text-sm text-gray-500",children:["( file Hoặc folder sẽ được di chuyển đến thư mục"," ",f===""?"Root":f," )"]})]}),l.jsx(Rn,{className:"text-gray-600 w-full h-[50dvh] max-h-[500px] overflow-hidden overflow-y-auto",children:g?l.jsx("div",{className:"flex justify-center items-center py-4",children:l.jsx("div",{className:"loader ease-linear rounded-full border-4 border-t-4 border-gray-200 h-12 w-12"})}):l.jsx("ul",{className:"space-y-2",children:(w=Object.keys(s))==null?void 0:w.map(C=>l.jsx("li",{className:"cursor-pointer hover:bg-gray-100 p-2 rounded transition-colors",onClick:()=>v(C),children:C},C))})})]}),l.jsxs(hn,{className:"flex justify-end space-x-2",children:[l.jsx(ve,{variant:"outline",onClick:()=>t(!1),className:"px-4 py-2 rounded border border-gray-300 text-gray-700 hover:bg-gray-100 transition-colors",children:"Cancel"}),l.jsx(ve,{onClick:b,disabled:c,className:"s3-explr-crawl-btn",children:"Move"})]})]})})},KS="AIzaSyBI8KiTWudkw8iR5cjH7ZsA4JBN1NqJw8A",YS="726815747852-5deq413t8kd8j3mgj48d46eatjauapq5.apps.googleusercontent.com",XS="https://www.googleapis.com/auth/drive";Kt(me,{retries:3});const Qe={current:!1},dp="crawl:jobs",Gn="crawl:current_job",JS=e=>{const[t,n]=_.useState(null),[r,o]=_.useState(0);return _.useEffect(()=>{const i=localStorage.getItem(Gn);if(i){const a=JSON.parse(i);n(a),a!=null&&a.startTime&&o(Math.floor((Date.now()-a.startTime)/1e3))}},[]),_.useEffect(()=>{if(!(t!=null&&t.startTime))return;const i=setInterval(()=>{o(Math.floor((Date.now()-t.startTime)/1e3))},1e3);return()=>clearInterval(i)},[t==null?void 0:t.startTime]),_.useEffect(()=>{if(!(t!=null&&t.id))return;const i=async()=>{try{const u=(await me.get(`${e}/api/crawl/${t.id}?taskId=${t.taskId}`)).data;n(c=>{if(!c)return null;const d={...c,status:u};return localStorage.setItem(Gn,JSON.stringify(d)),(u.status==="completed"||u.status==="failed")&&setTimeout(()=>{n(null),localStorage.removeItem(Gn)},100),d})}catch(s){console.error("Error polling job status:",s)}},a=setInterval(i,3e3);return i(),()=>clearInterval(a)},[t==null?void 0:t.id,e]),{currentJob:t,elapsedTime:r,setCurrentJob:i=>{i&&!i.startTime&&(i.startTime=Date.now()),n(i),i?localStorage.setItem(Gn,JSON.stringify(i)):localStorage.removeItem(Gn)}}},Yo=(e,t)=>{const n=[],r=o=>{(e[o]||[]).forEach(a=>{n.push(a.key),a.isFolder&&r(a.key)})};return r(t),n},ZS=(e,t)=>{const n=[];return(e[t]||[]).forEach(o=>{n.push(o.key),o.isFolder&&n.push(...Yo(e,o.key))}),n},QS=(e,t,n=[],r,o,i)=>{const[a,s]=_.useState({}),[u,c]=_.useState(!1),[d,g]=_.useState(null),[m,f]=_.useState(0),v=_.useRef(t);_.useEffect(()=>{v.current=t},[t]);const h=async()=>{c(!0);try{const b=await me.get(`${e}/api/files`,{params:{cache:!1,displayPrefixes:JSON.stringify(n),prefix:v.current},timeout:3e5});s(b.data),g(null)}catch(b){g(b instanceof Error?b:new Error("Failed to fetch files"))}finally{c(!1),f(0),i("")}},y=async b=>{var w,C;try{if(!b)return;c(!0);const E=await me.get(`${e}/api/search-db?query=${b}&rootPrefix=${t}&offset=${(o-1)*20}&limit=20`,{timeout:3e5});return s({[t]:((w=E==null?void 0:E.data)==null?void 0:w.result)||[]}),f(((C=E==null?void 0:E.data)==null?void 0:C.estimatedTotalHits)||0),E}catch(E){g(E instanceof Error?E:new Error("Failed to fetch files"))}finally{c(!1)}};return _.useEffect(()=>{!r&&!u&&h(),r&&!u&&y(r)},[r,o]),{data:a,isLoading:u,error:d,estimatedTotalHits:m,refetch:h}},br=e=>{var r,o,i;const t=((i=(o=(r=e==null?void 0:e.name)==null?void 0:r.split("."))==null?void 0:o.pop())==null?void 0:i.toLowerCase())??"";return["txt","md","json","js","ts","jsx","tsx","css","html","xml","yaml","yml"].includes(t||"")},eE=_.memo(({homeLabel:e="Kho tài liệu",apiBaseUrl:t="https://vib-s3-explorer.cmcts1.studio.ai.vn",rootPrefix:n="",asSelector:r=!1,onSelected:o=s=>console.log("Đã chọn:",s),displayPrefixes:i,preSelectedFiles:a})=>{var Lp;const[s,u]=_.useState([]),[c,d]=_.useState(""),[g,m]=_.useState(new Set(a)),[f,v]=_.useState(n),[h,y]=_.useState(""),[b,w]=_.useState(!1),[C,E]=_.useState(""),[x,O]=_.useState(!1),[I,$]=_.useState(null),[H,D]=_.useState(null),[G,U]=_.useState(!1),[Z,k]=_.useState(!1),[M,F]=_.useState(null),q=_.useRef(null),{toast:P}=ko(),[j,A]=_.useState(null),[B,Q]=_.useState(null),[re,ee]=_.useState(""),[ce,oe]=_.useState(!1),[ae,de]=_.useState(!1),[ue,le]=_.useState(new Set),[Ce,K]=_.useState(""),[Ee,We]=_.useState(!1),[qe,It]=_.useState(!1),[st,S]=_.useState("rename"),[N,V]=_.useState(!1),[ne,J]=_.useState(""),[X,z]=_.useState("1"),[Y,xe]=_.useState(!1),[we,Fe]=_.useState(!1),[sn,Re]=_.useState(!1),[Mt,En]=_.useState(!1),[Be,$t]=_.useState(1),[Wt,Yn]=_.useState(!1),{currentJob:_e,elapsedTime:ln,setCurrentJob:ni}=JS(t),[cn,_r]=_.useState(null),[Tr,ri]=_.useState(""),[TE,Ar]=_.useState(!1),[Ds,Fp]=_.useState(!1),[AE,PE]=_.useState(""),NE=new URL(window.location.href).searchParams.get("prefix")||""||h||n,[w_,kE]=_.useState(null),{data:Lt,isLoading:Pr,error:OE,estimatedTotalHits:Nr,refetch:tt}=QS(t,NE,i,c,Be,d),FE=og({onSuccess:T=>{kE(T.access_token),localStorage.setItem("google_access_token",T.access_token),DE(T.access_token)},onError:()=>{console.log("Đăng nhập thất bại!")},scope:XS}),DE=T=>{const L=document.createElement("script");L.src="https://apis.google.com/js/api.js",L.onload=()=>{window.gapi.load("picker",()=>IE(T))},document.body.appendChild(L)},IE=T=>{const L=new window.google.picker.DocsView(window.google.picker.ViewId.DOCS).setIncludeFolders(!0).setSelectFolderEnabled(!0).setOwnedByMe(!1),W=new window.google.picker.DocsView(window.google.picker.ViewId.DRIVE).setIncludeFolders(!0).setSelectFolderEnabled(!0);new window.google.picker.PickerBuilder().setDeveloperKey(KS).setOAuthToken(T).enableFeature(window.google.picker.Feature.MULTISELECT_ENABLED).setLocale("vi").addView(L).addView(W).setCallback(async ie=>{if(ie.action===window.google.picker.Action.PICKED){const ge=ie.docs.map(Se=>({id:Se.id,name:Se.name,mimeType:Se.mimeType}));await ME(ge,f)}}).build().setVisible(!0)},ME=async(T,L="")=>{const W=localStorage.getItem("google_access_token");if(!W){console.error("❌ Không tìm thấy access token. Vui lòng đăng nhập lại."),Pe.error("Không tìm thấy access token. Vui lòng đăng nhập lại.",{position:"bottom-right"});return}const te=Pe.loading("Đang đồng bộ...",{position:"bottom-right",autoClose:!1});try{const ie={prefix:L,folders:[],files:[]};T.forEach(Se=>{Se.mimeType==="application/vnd.google-apps.folder"?ie.folders.push({id:Se.id,name:Se.name}):ie.files.push({id:Se.id,name:Se.name})});const ge=await me.post(`${t}/api/sync-drive-to-s3`,ie,{headers:{Authorization:`Bearer ${W}`}});Qe.current=!0,tt(),Pe.update(te,{render:`Đồng bộ thành công! Đã tải lên ${ge.data.uploadedKeys.length} file.`,type:"success",isLoading:!1,autoClose:3e3,position:"bottom-right"})}catch(ie){console.error("❌ Lỗi khi đồng bộ file từ Google Drive:",ie),Pe.update(te,{render:"Không thể đồng bộ file từ Google Drive.",type:"error",isLoading:!1,autoClose:3e3,position:"bottom-right"})}};_.useEffect(()=>{const T=L=>{if(L.data.action==="logout"){const W=document.createElement("iframe");W.style.display="none",W.src="https://accounts.google.com/Logout",document.body.appendChild(W),setTimeout(()=>document.body.removeChild(W),2e3)}};return window.addEventListener("message",T),()=>window.removeEventListener("message",T)},[]),_.useEffect(()=>{const T=new Set(a);m(T)},[]),_.useEffect(()=>{_e!=null&&_e.status&&(_e.status.status==="completed"?(P({title:"Thu thập website hoàn tất",description:`Đã thu thập thành công ${_e.url} với ${_e.status.completed} trang`}),Qe.current=!0,tt()):_e.status.status==="failed"&&P({title:"Thu thập website thất bại",description:`Không thể thu thập ${_e.url}. Vui lòng thử lại.`,variant:"destructive"}))},[(Lp=_e==null?void 0:_e.status)==null?void 0:Lp.status]);const Dp=_.useMemo(()=>Lt[f]||[],[Lt,f]),un=_.useMemo(()=>Dp,[Dp,f,Lt]),kr=_.useMemo(()=>{const T={};return un.forEach((L,W)=>{g.has(L.key)&&(T[W]=!0)}),T},[g,un]),$E=T=>{const L=Yo(Lt,T);if(L.length===0)return g.has(T)?"all":"none";const W=L.filter(te=>g.has(te)).length;return W===0?"none":W===L.length?"all":"partial"},Xn=(T,L=!0)=>{if(console.log("🚀 ~ Home.tsx:620 ~ handleFolderClick ~ currentPrefix:",{currentPrefix:f,prefix:T,forcePrefix:h}),f!==T&&(Yn(!0),y(T),v(T),a||m(new Set),L)){const W=window.location.pathname==="/"?"":window.location.pathname,te=T?`${window.location.origin}${W}?prefix=${encodeURIComponent(T)}`:`${window.location.origin}${W}`;window.history.pushState({path:te},"",te)}};_.useEffect(()=>{Wt&&(Qe.current=!0,tt().finally(()=>Yn(!1)))},[Wt]);const LE=async(T,L)=>{var W,te;O(!0);try{if(un.some(Ye=>Ye.isFolder&&Ye.name.toLowerCase()===T.toLowerCase())){P({title:"Lỗi",description:`Thư mục "${T}" đã tồn tại trong thư mục hiện tại.`,variant:"destructive"}),O(!1);return}const ge=`${L}${T}/`;if((await me.post(`${t}/api/create-folder`,{prefix:ge})).status!==200){P({title:"Lỗi",description:"Không thể tạo thư mục",variant:"destructive"});return}Qe.current=!0,await tt(),P({title:"Đã tạo thư mục",description:`Đã tạo thành công thư mục "${T}"`}),E(""),w(!1)}catch(ie){console.error("Error creating folder:",ie);const ge=((te=(W=ie==null?void 0:ie.response)==null?void 0:W.data)==null?void 0:te.error)||"Không thể tạo thư mục";P({title:"Lỗi",description:ge,variant:"destructive"})}finally{O(!1)}},Is=async(T,L,W)=>{var te,ie,ge,Se,Ye,Jn,Rp,Vp,jp;F(W),Re(!0);try{if(Array.from(T).reduce((Xe,Dr)=>Xe+Dr.size,0)>=100*1024*1024){P({title:"Lỗi",description:"Tổng kích thước các tập tin vượt quá 100 MB",variant:"destructive"}),F(null),Re(!1);return}const ii=Array.from(T).filter(Xe=>Xe.size===0);if(ii.length>0){const Xe=ii.map(Dr=>Dr.name).join(", ");P({title:"Lỗi tải lên",description:`Không thể tải lên tập tin rỗng: ${Xe}`,variant:"destructive"}),Re(!1),F(null);return}let Fr=localStorage.getItem("dataLogin"),Zn;try{Fr&&(Fr=JSON.parse(Fr),Zn=Fr.user)}catch{Fr=null}const _n=new FormData;if(Zn!=null&&Zn.id&&_n.append("metadata",JSON.stringify({creator:Zn.username,creatorId:Zn.id,DataSource:"Tệp tải lên"})),W==="folder"&&T[0]){const Xe=T[0].webkitRelativePath.split("/")[0];Xe&&_n.append("folderName",Xe)}_n.append("prefix",L),Array.from(T).forEach(Xe=>W==="folder"?_n.append("files",Xe,Xe.webkitRelativePath):_n.append("files",Xe)),Qe.current=!0;const ze=await me.post(`${t}/api/check-files-existed`,_n,{headers:{"Content-Type":"multipart/form-data"}});if(((te=ze==null?void 0:ze.data)==null?void 0:te.status)===200)await me.post(`${t}/api/upload`,_n,{headers:{"Content-Type":"multipart/form-data"}}),d(""),y(L),setTimeout(async()=>{F(null),await tt(),Re(!1)},500);else{if(((ge=(ie=ze==null?void 0:ze.data)==null?void 0:ie.names)==null?void 0:ge.length)>0&&!((Se=ze==null?void 0:ze.data)!=null&&Se.isFolder)){const Xe=Array.from(T).filter(Dr=>ze.data.names.includes(Dr.name));_r(Xe),Ar(!0)}(Ye=ze==null?void 0:ze.data)!=null&&Ye.isFolder&&((Jn=ze==null?void 0:ze.data)!=null&&Jn.name)&&(ri((Rp=ze==null?void 0:ze.data)==null?void 0:Rp.name),_r(T),Ar(!0))}}catch(Or){console.error("Lỗi tải lên:",Or);const ii=((jp=(Vp=Or==null?void 0:Or.response)==null?void 0:Vp.data)==null?void 0:jp.error)||"Không thể tải lên tập tin";P({title:"Lỗi",description:ii,variant:"destructive"}),F(null),Re(!1)}},RE=async()=>{var T,L;try{Re(!0);const W=new FormData;if(cn){F(Tr?"folder":"files"),Ar(!1);let te=localStorage.getItem("dataLogin"),ie;try{te&&(te=JSON.parse(te),ie=te.user)}catch{te=null}if(ie!=null&&ie.id&&(console.log("🚀 ~ uploadFiles ~ user:",ie),W.append("metadata",JSON.stringify({creator:ie.username,creatorId:ie.id,DataSource:"Tệp tải lên"}))),Tr&&cn[0]){const ge=cn[0].webkitRelativePath.split("/")[0];ge&&W.append("folderName",ge)}W.append("prefix",f),Array.from(cn).forEach(ge=>Tr&&cn[0]?W.append("files",ge,ge.webkitRelativePath):W.append("files",ge)),ie!=null&&ie.id&&W.append("metadata",JSON.stringify({creator:ie.username,creatorId:ie.id,DataSource:"Tệp tải lên"})),await me.post(`${t}/api/upload`,W,{headers:{"Content-Type":"multipart/form-data"}}),d(""),y(f),Qe.current=!0}}catch(W){console.error("Lỗi tải lên:",W);const te=((L=(T=W==null?void 0:W.response)==null?void 0:T.data)==null?void 0:L.error)||"Không thể tải lên tập tin";P({title:"Lỗi",description:te,variant:"destructive"})}finally{setTimeout(async()=>{F(null),await tt(),Re(!1),ri(""),_r(null)},500)}},VE=async T=>{var L;try{if(await me.delete(`${t}/api/files`,{data:{paths:[T.key]}}),g.has(T.key)){const te=new Set(g);te.delete(T.key),m(te)}const W=((L=T.key)==null?void 0:L.replace(/^(.*?)(\/.*)?$/,(te,ie,ge)=>!ge||ge==="/"?"":ie+"/"))||"";y(W),Qe.current=!0,P({title:"Đã xóa tập tin",description:`Đã xóa thành công "${T.name}"`}),$(null)}catch(W){console.error("Error deleting file:",W),P({title:"Lỗi",description:"Không thể xóa tập tin",variant:"destructive"})}finally{En(!1),await tt()}},oi=T=>{const L=new Set(g),W=typeof T=="function"?T(kr):T;new Set(Object.keys(kr).map(Number)).forEach(ie=>{const ge=un[ie];ge&&(W[ie]||(L.delete(ge.key),ge.isFolder&&Yo(Lt,ge.key).forEach(Se=>L.delete(Se))))}),Object.entries(W).forEach(([ie,ge])=>{const Se=parseInt(ie),Ye=un[Se];Ye&&ge&&(L.add(Ye.key),Ye.isFolder&&Yo(Lt,Ye.key).forEach(Jn=>L.add(Jn)))}),m(L)},jE=async()=>{var T;U(!0);try{const L=Array.from(g),W=L.map(ie=>Object.values(Lt).flat().find(ge=>ge.key===ie)).filter(ie=>ie!==void 0);if(W.length===0){P({title:"Lỗi",description:"Không có tập tin nào được chọn để xóa",variant:"destructive"});return}await me.delete(`${t}/api/files`,{data:{paths:L}});const te=((T=W[0])==null?void 0:T.key.replace(/^(.*?)(\/.*)?$/,(ie,ge,Se)=>!Se||Se==="/"?"":ge+"/"))||"";y(te),Qe.current=!0,tt(),P({title:"Đã xóa tập tin",description:`Đã xóa thành công ${W.length} mục`}),k(!1),m(new Set)}catch(L){console.error("Error deleting files:",L),P({title:"Lỗi",description:"Không thể xóa các tập tin đã chọn",variant:"destructive"})}finally{U(!1)}},zE=async(T,L)=>{if(!f.trim()){P({title:"Lỗi",description:"Không thể đổi tên tập tin hoặc thư mục ở thư mục gốc. Chỉ có thể xóa.",variant:"destructive"});return}de(!0);try{const W=T.key;let te;T.isFolder?te=W.split("/").slice(0,-2).join("/")+"/":te=W.substring(0,W.lastIndexOf("/")+1);const ie=te+L+(T.isFolder?"/":"");await me.post(`${t}/api/rename`,{oldPath:W,newPath:ie}),Qe.current=!0,await tt(),P({title:"Đã đổi tên",description:`Đã đổi tên thành công "${T.name}" thành "${L}"`}),A(null),ee(""),Q(null)}catch(W){console.error("Error renaming item:",W),P({title:"Lỗi",description:"Không thể đổi tên",variant:"destructive"})}finally{de(!1)}},Ip=async T=>{le(L=>new Set([...L,...T]));try{const L=await me.post(`${t}/api/download`,{paths:T},{responseType:"blob"}),W=window.URL.createObjectURL(L.data),te=document.createElement("a");te.href=W;const ie=L.headers["Content-Disposition"]||L.headers["content-disposition"],ge=ie==null?void 0:ie.match(/filename="(.+)"/),Se=ge?decodeURIComponent(ge[1]):"download.zip";te.setAttribute("download",Se),document.body.appendChild(te),te.click(),document.body.removeChild(te),window.URL.revokeObjectURL(W),P({title:"Bắt đầu tải xuống",description:`Đã bắt đầu tải xuống ${T.length} mục${T.length>1,""}`})}catch(L){console.error("Error downloading files:",L),P({title:"Lỗi",description:"Không thể tải xuống tập tin",variant:"destructive"})}finally{le(L=>{const W=new Set(L);return T.forEach(te=>W.delete(te)),W})}},Mp=f?f.replace(n,"").split("/").filter(Boolean):[],BE=()=>Array.from(g).map(T=>{var L;for(const W in Lt){const te=(L=Lt[W])==null?void 0:L.find(ie=>ie.key===T);if(te)return te}return null}).filter(T=>T!==null),$p=_.useMemo(()=>{const T=[{id:"select",header:()=>{const L=ZS(Lt,f),W=L.length>0&&L.every(ie=>g.has(ie)),te=L.some(ie=>g.has(ie));return l.jsx(na,{checked:W?!0:te?"indeterminate":!1,onCheckedChange:ie=>{if(ie){const ge=un.reduce((Se,Ye,Jn)=>(Se[Jn]=!0,Se),{});oi(ge)}else oi({})},"aria-label":"Chọn tất cả"})},cell:({row:L})=>{const W=L.original,ie=W.isFolder?$E(W.key):g.has(W.key)?"all":"none";return l.jsx("div",{className:"flex items-center",children:l.jsx(na,{checked:ie==="partial"?"indeterminate":ie==="all",onCheckedChange:ge=>{const Se={...kr};ge?Se[L.index]=!0:delete Se[L.index],oi(Se)},"aria-label":"Chọn dòng"})})},enableSorting:!1},{id:"fileName",header:({column:L})=>l.jsxs(ve,{variant:"ghost",onClick:()=>L.toggleSorting(L.getIsSorted()==="asc"),children:["Tên tập tin",l.jsx(Bi,{})]}),accessorKey:"name",cell:({row:L})=>{const W=L.original,te=W.key.substring(0,W.key.lastIndexOf("/"))||"/",ie=c.trim()!==""&&te!==f,ge=te.split("/").filter(Boolean);return l.jsxs("div",{className:"flex flex-col",children:[l.jsxs("div",{className:`flex items-center gap-2 ${W.isFolder?"cursor-pointer hover:text-blue-600":""}`,onClick:()=>{W.isFolder&&(a||m(new Set),Xn(W.key))},children:[W.isFolder?l.jsx(li,{className:"h-5 w-5 text-blue-500"}):null,W.name]}),ie&&l.jsxs("div",{className:"text-sm text-gray-500 flex items-center",children:[l.jsx(li,{className:"h-4 w-4 text-gray-500 my-auto"}),l.jsxs("span",{className:"flex items-center ml-1",children:[l.jsx("span",{className:"cursor-pointer hover:text-blue-600",onClick:()=>{Xn("")},children:"/"}),ge.map((Se,Ye)=>l.jsxs("span",{className:"flex items-center",children:[l.jsx("span",{className:"cursor-pointer hover:text-blue-600",onClick:()=>{Xn(ge.slice(0,Ye+1).join("/")+"/")},children:Se}),Ye<ge.length-1&&l.jsx("span",{children:"/"})]},Ye))]})]})]})}}];return r||T.push({id:"size",header:({column:L})=>l.jsxs(ve,{variant:"ghost",onClick:()=>L.toggleSorting(L.getIsSorted()==="asc"),children:["Kích thước",l.jsx(Bi,{})]}),accessorKey:"size",cell:({getValue:L,row:W})=>{const te=L();return l.jsx("span",{children:W.original.isFolder?"-":Fv(te)})}},{id:"lastModified",header:({column:L})=>l.jsxs(ve,{variant:"ghost",onClick:()=>L.toggleSorting(L.getIsSorted()==="asc"),className:"px-0 w-full flex-row justify-end",children:["Sửa đổi lần cuối",l.jsx(Bi,{})]}),accessorKey:"lastModified",cell:({row:L})=>{const W=L.original.lastModified;return l.jsx("div",{className:"w-full flex-row justify-end items-center text-right",children:l.jsx("span",{children:W&&Wl(W).isValid()?Wl(W).format("DD/MM/YYYY HH:mm"):"-"})})},size:200},{id:"actions",header:()=>l.jsx("span",{children:"Hành động"}),accessorKey:"key",cell:({row:L})=>l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(xn,{children:l.jsxs(bn,{children:[l.jsx(wn,{asChild:!0,children:l.jsx(ve,{variant:"ghost",size:"icon",onClick:()=>Ip([L.original.key]),className:"h-8 w-8 p-0",disabled:ue.has(L.original.key),children:ue.has(L.original.key)?l.jsx($e,{className:"h-4 w-4 animate-spin"}):l.jsx(Vs,{className:"h-4 w-4"})})}),l.jsx(on,{children:"Tải xuống"})]})}),f.trim()!==""&&l.jsx(xn,{children:l.jsxs(bn,{children:[l.jsx(wn,{asChild:!0,children:l.jsx(ve,{variant:"ghost",size:"icon",onClick:()=>{A(L.original),ee(L.original.name)},className:"h-8 w-8 p-0",children:l.jsx(Jp,{className:"h-4 w-4"})})}),l.jsx(on,{children:"Đổi tên"})]})}),l.jsx(xn,{children:l.jsxs(bn,{children:[l.jsx(wn,{asChild:!0,children:l.jsx(ve,{variant:"ghost",size:"icon",onClick:()=>{oe(!0),D(L.original)},className:"h-8 w-8 p-0",children:l.jsx(Dh,{className:"h-4 w-4"})})}),l.jsx(on,{children:"Di chuyển"})]})}),l.jsx(xn,{children:l.jsxs(bn,{children:[l.jsx(wn,{asChild:!0,children:l.jsx(ve,{variant:"ghost",size:"icon",onClick:()=>$(L.original),className:"h-8 w-8 p-0",children:l.jsx(js,{className:"h-4 w-4"})})}),l.jsx(on,{children:"Xóa"})]})})]})}),T},[g,un,kr,ue,r]),Ms=el({data:un,columns:$p,state:{rowSelection:kr,sorting:s},onSortingChange:u,enableRowSelection:!0,onRowSelectionChange:oi,getCoreRowModel:Qs(),getSortedRowModel:Lg()}),HE=async T=>{var L,W;We(!0);try{if(br(T)){const te=await me.get(`${t}/api/read-text`,{params:{path:T.key}});K(te.data.content)}try{const te=await me.get(`${t}/api/read-json`,{params:{path:T.key+".metadata.json"}}),ie=((W=(L=te==null?void 0:te.data)==null?void 0:L.content)==null?void 0:W.metadataAttributes)||null;return Q({fullPath:j==null?void 0:j.key,...ie})}catch{return Q("Lỗi phân tích siêu dữ liệu")}}catch(te){console.error("Error loading file content:",te),P({title:"Lỗi",description:"Không thể tải nội dung tập tin",variant:"destructive"})}finally{We(!1)}},UE=async(T,L)=>{It(!0);try{await me.post(`${t}/api/modify-text`,{path:T.key,content:L}),P({title:"Đã lưu tập tin",description:"Nội dung tập tin đã được cập nhật thành công"}),Qe.current=!0,await tt(),A(null),K(""),S("rename")}catch(W){console.error("Error saving file content:",W),P({title:"Lỗi",description:"Không thể lưu nội dung tập tin",variant:"destructive"})}finally{It(!1)}},WE=async T=>{It(!0);try{console.log("🚀 ~ saveJsonFile ~ metadataForEdit:",B),await me.post(`${t}/api/modify-json`,{path:T.key+".metadata.json",content:{metadataAttributes:B}}),P({title:"Đã lưu tập tin",description:"Nội dung tập tin đã được cập nhật thành công"}),Qe.current=!0,await tt(),A(null),K(""),S("rename")}catch(L){console.error("Error saving file content:",L),P({title:"Lỗi",description:"Không thể lưu nội dung tập tin",variant:"destructive"})}finally{It(!1)}};_.useEffect(()=>{j&&(j.isFolder||HE(j),S("rename"))},[j]);const qE=async(T,L)=>{var W;if(_e){P({title:"Đang thu thập website",description:"Vui lòng đợi cho công việc thu thập hiện tại hoàn thành.",variant:"destructive"});return}xe(!0);try{const{data:te}=await me.post(`${t}/api/crawl`,{url:T,limit:L,prefix:f});if(te.id){ni({id:te.id,url:T,limit:L,prefix:f,taskId:((W=te.task)==null?void 0:W.id)||""});const ie=localStorage.getItem(dp),ge=ie?JSON.parse(ie):[];ge.some(Se=>Se.id===te.id)||(ge.unshift({url:T,id:te.id,limit:L,prefix:f,timestamp:Date.now()}),ge.length>20&&(ge.length=20),localStorage.setItem(dp,JSON.stringify(ge))),P({title:"Bắt đầu thu thập website",description:`Đã thêm nhiệm vụ thu thập ${T} với giới hạn ${L}. Dữ liệu sẽ có sẵn sau khi thu thập hoàn tất.`}),V(!1),J(""),z("1")}}catch(te){console.error("Error crawling website:",te),P({title:"Lỗi",description:"Không thể bắt đầu thu thập website",variant:"destructive"})}finally{xe(!1)}},GE=async()=>{try{if(!(_e!=null&&_e.id))return;ni(null),localStorage.removeItem(Gn),P({title:"Đã dừng thu thập",description:`Đã dừng thu thập website ${_e.url}`})}catch(T){console.error("Error stopping job:",T),P({title:"Lỗi",description:"Không thể dừng thu thập website",variant:"destructive"})}};_.useEffect(()=>{const T=(L=!0)=>{const te=new URL(window.location.href).searchParams.get("prefix")||"";te?Xn(te,!1):(L&&!a&&m(new Set),y(n),v(n),Qe.current=!0,setTimeout(()=>{tt()},0))};return T(!1),window.addEventListener("popstate",()=>T(!0)),()=>{window.removeEventListener("popstate",()=>T(!0))}},[]);const KE=async()=>{Fp(!0);try{const T=await me.post(`${t}/api/prediction-report`);console.log("🚀 ~ Home.tsx:1585 ~ handleExportReport ~ response:",T),P({title:"Xuất báo cáo thành công",description:"Báo cáo dự đoán đã được xuất"})}catch(T){console.error("Error exporting report:",T),P({title:"Lỗi",description:"Không thể xuất báo cáo dự đoán",variant:"destructive"})}finally{Fp(!1)}},YE=async()=>{try{const T=await me.post(`${t}/api/start-ingestion-job`,{prefix:f});T.status===200&&(console.log("🚀 ~ Home.tsx:1744 ~ handleSyncKnowledgeBase ~ response:",T),await Ls())}catch(T){console.log(T)}},$s=_.useRef(),Ls=async()=>{try{const T=await me.post(`${t}/api/get-ingestion-job-status`,{prefix:f});T.data==="FAILED"||T.data==="COMPLETE"||T.data==="STOPPED"||T.data==="STOPPING"?(Fe(!1),$s.current&&clearInterval($s.current)):(Fe(!0),$s.current=setInterval(()=>Ls(),5e3))}catch(T){console.log(T)}};return _.useEffect(()=>{const T=f==null?void 0:f.split("/")[0];return T&&(PE(T),f&&Ls()),()=>{}},[AE,f]),l.jsxs("div",{className:"space-y-4 s3-explr-container",children:[l.jsx(Sd,{}),l.jsx(jt,{open:TE,onOpenChange:T=>{Ar(T),T||(ri(""),_r(null),Re(!1),F(null))},children:l.jsxs(St,{children:[l.jsxs(Et,{children:[l.jsx(_t,{children:"Cảnh báo trùng lặp"}),l.jsxs(Rn,{children:[Tr&&l.jsxs(l.Fragment,{children:["Folder $",Tr," đã có."]}),cn&&cn.length>0&&l.jsxs(l.Fragment,{children:["Những tệp sau bị lặp:",l.jsx("ul",{className:"mt-2 list-disc pl-5 text-sm text-red-600",children:Array.from(cn).map((T,L)=>l.jsx("li",{children:T.name},L))})]})]})]}),l.jsxs(hn,{children:[l.jsx(ve,{variant:"outline",onClick:()=>{Ar(!1),ri(""),_r(null),Re(!1),F(null)},children:"Bỏ qua"}),l.jsx(ve,{variant:"destructive",onClick:()=>RE(),children:"Ghi đè"})]})]})}),l.jsx(uc,{className:"s3-explr-breadcrumb",children:l.jsxs(dc,{className:"s3-explr-breadcrumb-list",children:[l.jsx(Ji,{className:"s3-explr-breadcrumb-item",children:l.jsx(Zi,{onClick:()=>Xn(n),className:"flex items-center gap-1 cursor-pointer s3-explr-breadcrumb-home",children:e})}),Mp.map((T,L)=>l.jsxs("div",{className:"flex items-center",children:[l.jsx(fc,{className:"s3-explr-breadcrumb-separator"},`sep-${L}`),l.jsx(Ji,{className:"s3-explr-breadcrumb-item",children:l.jsx(Zi,{onClick:()=>Xn(n+Mp.slice(0,L+1).join("/")+"/"),className:"cursor-pointer s3-explr-breadcrumb-link",children:T})},`item-${T}`)]},L))]})}),l.jsxs("div",{className:"flex items-center space-x-4 s3-explr-toolbar",children:[l.jsx("div",{className:"relative max-w-sm w-full s3-explr-search-container",children:l.jsx(HC,{ref:q,onChange:T=>d(T)})}),l.jsxs(ve,{variant:"outline",size:"sm",onClick:()=>{y(f),Qe.current=!0,tt()},disabled:Pr,className:"flex items-center gap-2 s3-explr-refresh-btn",children:[l.jsx(si,{className:`h-4 w-4 s3-explr-refresh-icon ${Pr?"animate-spin":""}`}),"Làm mới"]}),f&&f!=="/"&&l.jsxs(ve,{variant:"outline",size:"sm",onClick:()=>{Fe(!0),YE()},disabled:Pr||we,className:"flex items-center gap-2 s3-explr-refresh-btn",children:[l.jsx(si,{className:`h-4 w-4 s3-explr-refresh-icon ${Pr||we?"animate-spin":""}`}),"Đồng bộ KB"]}),!r&&l.jsxs(l.Fragment,{children:[g.size>0&&l.jsxs(l.Fragment,{children:[l.jsxs(ve,{variant:"outline",size:"sm",onClick:()=>Ip(Array.from(g)),disabled:Array.from(g).some(T=>ue.has(T)),className:"flex items-center gap-2 s3-explr-download-selected-btn",children:[Array.from(g).some(T=>ue.has(T))?l.jsx($e,{className:"h-4 w-4 animate-spin mr-2 s3-explr-loader"}):l.jsx(Vs,{className:"h-4 w-4 s3-explr-download-icon"}),"Tải xuống đã chọn (",g.size,")"]}),l.jsxs(jt,{open:Z,onOpenChange:k,children:[l.jsx(uo,{asChild:!0,children:l.jsxs(ve,{variant:"destructive",size:"sm",className:"flex items-center gap-2 s3-explr-bulk-delete-btn",children:[l.jsx(js,{className:"h-4 w-4 s3-explr-trash-icon"}),"Xóa đã chọn (",g.size,")"]})}),l.jsxs(St,{className:"s3-explr-dialog-content",children:[l.jsxs(Et,{className:"s3-explr-dialog-header",children:[l.jsx(_t,{className:"s3-explr-dialog-title",children:"Xác nhận xóa hàng loạt"}),l.jsxs(Rn,{className:"s3-explr-dialog-description",children:["Bạn có chắc chắn muốn xóa ",g.size," mục đã chọn? Hành động này không thể hoàn tác."]})]}),l.jsxs(hn,{className:"s3-explr-dialog-footer",children:[l.jsx(ve,{variant:"outline",onClick:()=>k(!1),className:"s3-explr-cancel-btn",children:"Hủy"}),l.jsx(ve,{variant:"destructive",onClick:jE,disabled:G,className:"s3-explr-confirm-delete-btn",children:G?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang xóa..."]}):"Xóa đã chọn"})]})]})]})]}),l.jsxs(jt,{open:b,onOpenChange:w,children:[l.jsx(uo,{asChild:!0,children:l.jsxs(ve,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-new-folder-btn",disabled:!!i&&!f,children:[l.jsx(qp,{className:"h-4 w-4 s3-explr-folder-plus-icon"}),"Thư mục mới"]})}),l.jsxs(St,{className:"s3-explr-dialog-content",children:[l.jsx(Et,{className:"s3-explr-dialog-header",children:l.jsx(_t,{className:"s3-explr-dialog-title",children:"Tạo thư mục mới"})}),l.jsxs("div",{className:"space-y-4 py-4 s3-explr-dialog-body",children:[l.jsxs("div",{className:"space-y-2 s3-explr-input-group",children:[l.jsx(vn,{htmlFor:"name",className:"s3-explr-label",children:"Tên thư mục"}),l.jsx(en,{disabled:x,id:"name",value:C,onChange:T=>E(T.target.value),placeholder:"Nhập tên thư mục",className:"s3-explr-input"})]}),l.jsxs(ve,{onClick:()=>{C.trim()&&LE(C,f)},disabled:x,className:"s3-explr-create-btn",children:[x&&l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),x?"Đang tạo...":"Tạo"]})]})]})]}),l.jsxs("div",{className:"flex items-center gap-2 s3-explr-upload-group",children:[l.jsx(ve,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-upload-files-btn",onClick:()=>{const T=document.createElement("input");T.type="file",T.multiple=!0,T.onchange=L=>{const W=L.target.files;W&&Is(W,f,"files")},T.click()},disabled:M!==null||!!i&&!f,children:M==="files"?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"h-4 w-4 animate-spin mr-2 s3-explr-loader"}),"Đang tải lên..."]}):l.jsxs(l.Fragment,{children:[l.jsx(Up,{className:"h-4 w-4 s3-explr-upload-icon"}),"Tải lên tập tin"]})}),l.jsx(ve,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-upload-folder-btn",onClick:()=>{const T=document.createElement("input");T.type="file",T.multiple=!0,T.webkitdirectory=!0,T.onchange=L=>{const W=L.target.files;W&&Is(W,f,"folder")},T.click()},disabled:M!==null||!!i&&!f,children:M==="folder"?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"h-4 w-4 animate-spin mr-2 s3-explr-loader"}),"Đang tải lên..."]}):l.jsxs(l.Fragment,{children:[l.jsx(li,{className:"h-4 w-4 s3-explr-folder-icon"}),"Tải lên thư mục"]})}),_e?l.jsx(xn,{delayDuration:0,children:l.jsxs(bn,{children:[l.jsx(wn,{asChild:!0,children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs(ve,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-add-website-btn",disabled:!0,children:[l.jsx($e,{className:"h-4 w-4 animate-spin s3-explr-loader"}),_e.status?l.jsxs(l.Fragment,{children:[_e.status.isProcessing?"Đang thu thập ":"Đang quét sitemap ","(",_e.status.completed,"/",_e.status.total,") -"," ",Math.floor(ln/60),":",String(ln%60).padStart(2,"0")]}):"Đang thu thập..."]}),l.jsxs(ve,{variant:"destructive",size:"sm",onClick:()=>void GE(),className:"flex items-center gap-2",children:[l.jsx("span",{className:"sr-only",children:"Dừng thu thập"}),l.jsx(Qp,{className:"h-4 w-4"})]})]})}),_e.status&&l.jsx(on,{side:"right",sideOffset:5,children:l.jsxs("div",{className:"space-y-1 p-2",children:[l.jsxs("p",{className:"font-semibold",children:["Đang thu thập ",_e.url]}),l.jsxs("p",{children:["Tiến độ: ",_e.status.completed,"/",_e.status.total," trang"]}),l.jsxs("p",{children:["Thời gian: ",Math.floor(ln/60),":",String(ln%60).padStart(2,"0")]}),l.jsxs("p",{children:["Trạng thái:"," ",_e.status.status==="scraping"?"Đang thu thập":_e.status.status==="completed"?"Hoàn thành":"Thất bại"]})]})})]})}):l.jsxs(jt,{open:N,onOpenChange:V,children:[l.jsx(uo,{asChild:!0,children:l.jsxs(ve,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-add-website-btn",disabled:!!i&&!f,children:[l.jsx(Yp,{className:"h-4 w-4 s3-explr-globe-icon"}),"Thêm website"]})}),l.jsxs(St,{className:"s3-explr-dialog-content",children:[l.jsxs(Et,{className:"s3-explr-dialog-header",children:[l.jsx(_t,{className:"s3-explr-dialog-title",children:"Thêm website"}),l.jsx(Rn,{className:"s3-explr-dialog-description",children:"Nhập URL website để thu thập và thêm vào S3."})]}),l.jsxs("div",{className:"space-y-4 py-4 s3-explr-dialog-body",children:[l.jsxs("div",{className:"space-y-2 s3-explr-input-group",children:[l.jsx(vn,{htmlFor:"websiteUrl",className:"s3-explr-label",children:"URL Website"}),l.jsx(en,{id:"websiteUrl",value:ne,onChange:T=>J(T.target.value),placeholder:"https://example.com",type:"url",disabled:Y,className:"s3-explr-input"})]}),l.jsxs("div",{className:"space-y-2 s3-explr-input-group",children:[l.jsx(vn,{htmlFor:"crawlLimit",className:"s3-explr-label",children:"Giới hạn thu thập"}),l.jsx(en,{id:"crawlLimit",value:X,onChange:T=>{const L=T.target.value;/^\d*$/.test(L)&&z(L)},placeholder:"1",type:"text",disabled:Y,className:"s3-explr-input"}),l.jsx("p",{className:"text-sm text-gray-500",children:"Số lượng liên kết cần thu thập (mặc định: 1)"})]})]}),l.jsxs(hn,{className:"s3-explr-dialog-footer",children:[l.jsx(ve,{variant:"outline",onClick:()=>{V(!1),J(""),z("1")},disabled:Y,className:"s3-explr-cancel-btn",children:"Hủy"}),l.jsx(ve,{onClick:()=>{ne.trim()&&qE(ne.trim(),parseInt(X)||1)},disabled:Y||!ne.trim(),className:"s3-explr-crawl-btn",children:Y?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang thu thập..."]}):"Bắt đầu thu thập"})]})]})]}),f.startsWith("BKTTW/")&&l.jsx(xn,{delayDuration:0,children:l.jsxs(bn,{children:[l.jsx(wn,{asChild:!0,children:l.jsxs(ve,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-add-website-btn",disabled:!!i&&!f,onClick:KE,children:[Ds&&l.jsx(si,{className:`h-4 w-4 s3-explr-refresh-icon ${Ds?"animate-spin":""}`}),"Xuất báo cáo"]})}),Ds&&l.jsx(on,{sideOffset:5,children:"Đang xuất báo cáo"})]})})]}),l.jsx("div",{className:"flex items-center gap-4",children:l.jsxs(ve,{variant:"outline",size:"sm",onClick:()=>FE(),className:"flex items-center gap-2",children:[l.jsxs("svg",{viewBox:"0 0 87.3 78",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{d:"m6.6 66.85 3.85 6.65c.8 1.4 1.95 2.5 3.3 3.3l13.75-23.8h-27.5c0 1.55.4 3.1 1.2 4.5z",fill:"#0066da"}),l.jsx("path",{d:"m43.65 25-13.75-23.8c-1.35.8-2.5 1.9-3.3 3.3l-25.4 44a9.06 9.06 0 0 0 -1.2 4.5h27.5z",fill:"#00ac47"}),l.jsx("path",{d:"m73.55 76.8c1.35-.8 2.5-1.9 3.3-3.3l1.6-2.75 7.65-13.25c.8-1.4 1.2-2.95 1.2-4.5h-27.502l5.852 11.5z",fill:"#ea4335"}),l.jsx("path",{d:"m43.65 25 13.75-23.8c-1.35-.8-2.9-1.2-4.5-1.2h-18.5c-1.6 0-3.15.45-4.5 1.2z",fill:"#00832d"}),l.jsx("path",{d:"m59.8 53h-32.3l-13.75 23.8c1.35.8 2.9 1.2 4.5 1.2h50.8c1.6 0 3.15-.45 4.5-1.2z",fill:"#2684fc"}),l.jsx("path",{d:"m73.4 26.5-12.7-22c-.8-1.4-1.95-2.5-3.3-3.3l-13.75 23.8 16.15 28h27.45c0-1.55-.4-3.1-1.2-4.5z",fill:"#ffba00"})]}),"Đồng bộ Google Drive"]})}),l.jsx(jt,{open:!!I,onOpenChange:T=>!T&&$(null),children:l.jsxs(St,{className:"s3-explr-dialog-content",children:[l.jsxs(Et,{className:"s3-explr-dialog-header",children:[l.jsx(_t,{className:"s3-explr-dialog-title",children:"Xác nhận xóa"}),l.jsxs(Rn,{className:"s3-explr-dialog-description",children:["Bạn có chắc chắn muốn xóa ",I==null?void 0:I.name,"? Hành động này không thể hoàn tác."]})]}),l.jsxs(hn,{className:"s3-explr-dialog-footer",children:[l.jsx(ve,{variant:"outline",onClick:()=>$(null),className:"s3-explr-cancel-btn",children:"Hủy"}),l.jsx(ve,{variant:"destructive",onClick:()=>VE(I),disabled:Mt,className:"s3-explr-confirm-delete-btn",children:Mt?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang xóa..."]}):"Xóa"})]})]})}),l.jsx(jt,{open:!!j,onOpenChange:T=>{T||(A(null),Q(null),ee(""),K(""),S("rename"))},children:l.jsxs(St,{className:"s3-explr-dialog-content max-w-5xl w-[90%]",children:[l.jsx(Et,{className:"s3-explr-dialog-header",children:l.jsx(_t,{className:"s3-explr-dialog-title",children:j!=null&&j.isFolder?"Đổi tên thư mục":br(j)?"Quản lý tập tin":"Đổi tên tập tin"})}),j&&l.jsxs(ab,{value:st,onValueChange:T=>S(T),children:[l.jsxs(Xu,{"aria-checked":!br(j),"aria-disabled":j.isFolder,className:"grid w-full grid-cols-3 aria-checked:grid-cols-2 aria-disabled:grid-cols-1",children:[l.jsx(So,{value:"rename",children:"Đổi tên"}),!j.isFolder&&l.jsxs(l.Fragment,{children:[br(j)&&l.jsx(So,{value:"edit",children:"Sửa nội dung"}),l.jsx(So,{value:"edit-metadata",children:"Sửa metadata file"})]})]}),l.jsx(Eo,{value:"rename",children:l.jsx("div",{className:"space-y-4 py-4 s3-explr-dialog-body",children:l.jsxs("div",{className:"h-[70dvh] min-h-[500px] overflow-hidden overflow-y-auto pb-3 px-1 s3-explr-input-group",children:[l.jsx(vn,{htmlFor:"newName",className:"s3-explr-label",children:"Tên mới"}),l.jsx(en,{id:"newName",value:re,onChange:T=>ee(T.target.value),placeholder:"Nhập tên mới",disabled:ae,className:"s3-explr-input"})]})})}),!j.isFolder&&l.jsxs(l.Fragment,{children:[br(j)&&l.jsx(Eo,{value:"edit",children:l.jsx("div",{className:"space-y-4 py-4",children:Ee?l.jsx("div",{className:"flex items-center justify-center py-4",children:l.jsx($e,{className:"h-6 w-6 animate-spin"})}):l.jsxs("div",{className:"h-[70dvh] min-h-[500px] overflow-hidden overflow-y-auto pb-3 px-1",children:[l.jsx(vn,{htmlFor:"content",className:"s3-explr-label",children:"Nội dung tập tin"}),l.jsx(ur,{id:"content",value:Ce,onChange:T=>K(T.target.value),placeholder:"Nhập nội dung tập tin",className:"min-h-[200px] font-mono",disabled:qe})]})})}),l.jsx(Eo,{value:"edit-metadata",children:l.jsx("div",{className:"space-y-4 py-4",children:Ee?l.jsx("div",{className:"flex items-center justify-center py-4",children:l.jsx($e,{className:"h-6 w-6 animate-spin"})}):l.jsx("div",{className:"h-[70dvh] min-h-[500px] overflow-hidden overflow-y-auto pb-3 px-1",children:B&&typeof B=="object"&&Object.entries(B).map(([T,L],W)=>l.jsxs("div",{className:"pb-3 flex flex-col gap-2",children:[l.jsxs(vn,{htmlFor:T,className:"s3-explr-label flex items-center gap-1",children:[Yh[T]||T,qi(T)&&l.jsx(Ih,{className:"h-[12px] w-[12px] text-red-500"})]}),Xh(T)?l.jsx(ur,{id:T,value:typeof L=="string"?L:JSON.stringify(L),onChange:te=>{const ie={...B,[T]:te.target.value};Q(ie)},placeholder:"Nhập nội dung tập tin",className:"min-h-[200px] font-mono",disabled:qe||qi(T)}):l.jsx(en,{id:T,value:typeof L=="string"?L:JSON.stringify(L),onChange:te=>{const ie={...B,[T]:te.target.value};Q(ie)},placeholder:"Nhập nội dung",className:"s3-explr-input",disabled:qe||qi(T)})]},W))})})})]})]}),l.jsxs(hn,{className:"s3-explr-dialog-footer",children:[l.jsx(ve,{variant:"outline",onClick:()=>{A(null),Q(null),ee(""),K("")},className:"s3-explr-cancel-btn",children:"Hủy"}),st==="edit"?l.jsx(ve,{onClick:()=>j&&UE(j,Ce),disabled:qe||Ee,className:"s3-explr-save-btn",children:qe?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang lưu..."]}):"Lưu thay đổi"}):st==="edit-metadata"?l.jsx(ve,{onClick:()=>B&&typeof B=="object"&&j&&WE(j),disabled:qe||Ee,className:"s3-explr-save-btn",children:qe?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang lưu..."]}):"Lưu thay đổi"}):l.jsx(ve,{onClick:()=>{re.trim()&&j&&zE(j,re.trim())},disabled:ae||!re.trim()||re.trim()===(j==null?void 0:j.name),className:"s3-explr-rename-btn",children:ae?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang đổi tên..."]}):"Đổi tên"})]})]})}),H&&ce&&l.jsx(GS,{openDialogRename:ce,setOpenDialogRename:oe,apiBaseUrl:t,setFileToMove:D,fileToMove:H,refreshFiles:tt,ignoreCache:Qe})]})]}),OE&&l.jsx("div",{className:"bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative s3-explr-error",children:"Đã xảy ra lỗi khi tải danh sách tập tin"}),l.jsx(qS,{onFilesSelected:(T,L)=>Is(T,f,L),children:l.jsx("div",{className:"rounded-md border s3-explr-table-container",children:l.jsxs(vo,{className:"s3-explr-table",children:[l.jsx(yo,{className:"s3-explr-table-header",children:Ms.getHeaderGroups().map(T=>l.jsx(ht,{className:"hover:bg-transparent s3-explr-header-row",children:T.headers.map(L=>l.jsx(Tt,{className:"s3-explr-header-cell",children:L.isPlaceholder?null:Vr(L.column.columnDef.header,L.getContext())},L.id))},T.id))}),l.jsx(xo,{className:"s3-explr-table-body",children:Ms.getRowModel().rows.length===0?l.jsx(ht,{className:"s3-explr-empty-row",children:l.jsx(Ze,{colSpan:$p.length,className:"h-24 text-center s3-explr-empty-cell",children:c?l.jsxs("div",{className:"text-gray-500 s3-explr-no-results",children:['Không tìm thấy tập tin hoặc thư mục nào khớp với "',c,'"']}):l.jsx("div",{className:"text-gray-500 s3-explr-empty-message",children:Pr?"Đang tải nội dung thư mục... Vui lòng đợi":"Thư mục này không chứa tập tin hoặc thư mục con nào"})})}):Ms.getRowModel().rows.map(T=>l.jsx(ht,{className:"h-12 s3-explr-row",children:T.getVisibleCells().map(L=>l.jsx(Ze,{className:"align-middle s3-explr-cell",children:Vr(L.column.columnDef.cell,L.getContext())},L.id))},T.id))})]})})}),c&&Nr!==0&&l.jsx(l.Fragment,{children:l.jsx(fo,{children:l.jsxs(po,{children:[l.jsx(go,{onClick:()=>$t(T=>Math.max(T-1,1)),"aria-disabled":Be===1,className:"cursor-pointer aria-disabled:pointer-events-none"}),Array.from({length:Math.ceil(Nr/20)},(T,L)=>{const W=L+1,te=Math.ceil(Nr/20);return te>7&&!(W===1||W===te||W>=Be-1&&W<=Be+1)?W===Be-2&&Be>4||W===Be+2&&Be<te-3?l.jsx(ho,{className:"pointer-events-none",children:"..."},L):null:l.jsx(mt,{className:"cursor-pointer",children:l.jsx(Vn,{isActive:Be===W,onClick:()=>$t(W),className:`${Be===W?"bg-blue-500 text-white":"bg-white text-black"} hover:bg-blue-100`,children:W})},L)}),l.jsx(mt,{children:l.jsx(mo,{onClick:()=>$t(T=>Math.min(T+1,Math.ceil(Nr/20))),"aria-disabled":Be===Math.ceil(Nr/20),className:"cursor-pointer aria-disabled:pointer-events-none"})})]})})}),r&&o&&l.jsxs("div",{className:"flex justify-between items-center mt-4 s3-explr-selector-footer",children:[l.jsxs("div",{className:"text-sm text-gray-500 s3-explr-selection-count",children:[g.size," ",(g.size===1,"tập tin")," đã chọn"]}),l.jsx(ve,{variant:"default",onClick:()=>o(BE()),disabled:g.size===0,className:"s3-explr-ok-btn",children:"OK"})]})]})}),tE=e=>l.jsx(ng,{clientId:YS,children:l.jsx(eE,{...e})});var wr=e=>e.type==="checkbox",Sn=e=>e instanceof Date,Ke=e=>e==null;const fp=e=>typeof e=="object";var Me=e=>!Ke(e)&&!Array.isArray(e)&&fp(e)&&!Sn(e),nE=e=>Me(e)&&e.target?wr(e.target)?e.target.checked:e.target.value:e,rE=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,oE=(e,t)=>e.has(rE(t)),iE=e=>{const t=e.constructor&&e.constructor.prototype;return Me(t)&&t.hasOwnProperty("isPrototypeOf")},_s=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ut(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(_s&&(e instanceof Blob||r))&&(n||Me(e)))if(t=n?[]:{},!n&&!iE(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=ut(e[o]));else return e;return t}var Xo=e=>Array.isArray(e)?e.filter(Boolean):[],Ie=e=>e===void 0,se=(e,t,n)=>{if(!t||!Me(e))return n;const r=Xo(t.split(/[,[\].]+?/)).reduce((o,i)=>Ke(o)?o:o[i],e);return Ie(r)||r===e?Ie(e[t])?n:e[t]:r},Ot=e=>typeof e=="boolean",Ts=e=>/^\w*$/.test(e),pp=e=>Xo(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Oe=(e,t,n)=>{let r=-1;const o=Ts(t)?[t]:pp(t),i=o.length,a=i-1;for(;++r<i;){const s=o[r];let u=n;if(r!==a){const c=e[s];u=Me(c)||Array.isArray(c)?c:isNaN(+o[r+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=u,e=e[s]}return e};const gp={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},xt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ut={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};_.createContext(null);var aE=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const a=i;return t._proxyFormState[a]!==xt.all&&(t._proxyFormState[a]=!r||xt.all),e[a]}});return o},et=e=>Me(e)&&!Object.keys(e).length,sE=(e,t,n,r)=>{n(e);const{name:o,...i}=e;return et(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(a=>t[a]===xt.all)},Jo=e=>Array.isArray(e)?e:[e];function lE(e){const t=_.useRef(e);t.current=e,_.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var Ft=e=>typeof e=="string",cE=(e,t,n,r,o)=>Ft(e)?(r&&t.watch.add(e),se(n,e,o)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),se(n,i))):(r&&(t.watchAll=!0),n),uE=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},mp=e=>({isOnSubmit:!e||e===xt.onSubmit,isOnBlur:e===xt.onBlur,isOnChange:e===xt.onChange,isOnAll:e===xt.all,isOnTouch:e===xt.onTouched}),hp=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Cr=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const i=se(e,o);if(i){const{_f:a,...s}=i;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],o)&&!r)return!0;if(a.ref&&t(a.ref,a.name)&&!r)return!0;if(Cr(s,t))break}else if(Me(s)&&Cr(s,t))break}}};var dE=(e,t,n)=>{const r=Jo(se(e,n));return Oe(r,"root",t[n]),Oe(e,n,r),e},As=e=>e.type==="file",Dt=e=>typeof e=="function",Zo=e=>{if(!_s)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Qo=e=>Ft(e),Ps=e=>e.type==="radio",ei=e=>e instanceof RegExp;const vp={value:!1,isValid:!1},yp={value:!0,isValid:!0};var xp=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ie(e[0].attributes.value)?Ie(e[0].value)||e[0].value===""?yp:{value:e[0].value,isValid:!0}:yp:vp}return vp};const bp={isValid:!1,value:null};var wp=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,bp):bp;function Cp(e,t,n="validate"){if(Qo(e)||Array.isArray(e)&&e.every(Qo)||Ot(e)&&!e)return{type:n,message:Qo(e)?e:"",ref:t}}var Kn=e=>Me(e)&&!ei(e)?e:{value:e,message:""},Sp=async(e,t,n,r,o)=>{const{ref:i,refs:a,required:s,maxLength:u,minLength:c,min:d,max:g,pattern:m,validate:f,name:v,valueAsNumber:h,mount:y,disabled:b}=e._f,w=se(t,v);if(!y||b)return{};const C=a?a[0]:i,E=U=>{r&&C.reportValidity&&(C.setCustomValidity(Ot(U)?"":U||""),C.reportValidity())},x={},O=Ps(i),I=wr(i),$=O||I,H=(h||As(i))&&Ie(i.value)&&Ie(w)||Zo(i)&&i.value===""||w===""||Array.isArray(w)&&!w.length,D=uE.bind(null,v,n,x),G=(U,Z,k,M=Ut.maxLength,F=Ut.minLength)=>{const q=U?Z:k;x[v]={type:U?M:F,message:q,ref:i,...D(U?M:F,q)}};if(o?!Array.isArray(w)||!w.length:s&&(!$&&(H||Ke(w))||Ot(w)&&!w||I&&!xp(a).isValid||O&&!wp(a).isValid)){const{value:U,message:Z}=Qo(s)?{value:!!s,message:s}:Kn(s);if(U&&(x[v]={type:Ut.required,message:Z,ref:C,...D(Ut.required,Z)},!n))return E(Z),x}if(!H&&(!Ke(d)||!Ke(g))){let U,Z;const k=Kn(g),M=Kn(d);if(!Ke(w)&&!isNaN(w)){const F=i.valueAsNumber||w&&+w;Ke(k.value)||(U=F>k.value),Ke(M.value)||(Z=F<M.value)}else{const F=i.valueAsDate||new Date(w),q=A=>new Date(new Date().toDateString()+" "+A),P=i.type=="time",j=i.type=="week";Ft(k.value)&&w&&(U=P?q(w)>q(k.value):j?w>k.value:F>new Date(k.value)),Ft(M.value)&&w&&(Z=P?q(w)<q(M.value):j?w<M.value:F<new Date(M.value))}if((U||Z)&&(G(!!U,k.message,M.message,Ut.max,Ut.min),!n))return E(x[v].message),x}if((u||c)&&!H&&(Ft(w)||o&&Array.isArray(w))){const U=Kn(u),Z=Kn(c),k=!Ke(U.value)&&w.length>+U.value,M=!Ke(Z.value)&&w.length<+Z.value;if((k||M)&&(G(k,U.message,Z.message),!n))return E(x[v].message),x}if(m&&!H&&Ft(w)){const{value:U,message:Z}=Kn(m);if(ei(U)&&!w.match(U)&&(x[v]={type:Ut.pattern,message:Z,ref:i,...D(Ut.pattern,Z)},!n))return E(Z),x}if(f){if(Dt(f)){const U=await f(w,t),Z=Cp(U,C);if(Z&&(x[v]={...Z,...D(Ut.validate,Z.message)},!n))return E(Z.message),x}else if(Me(f)){let U={};for(const Z in f){if(!et(U)&&!n)break;const k=Cp(await f[Z](w,t),C,Z);k&&(U={...k,...D(Z,k.message)},E(k.message),n&&(x[v]=U))}if(!et(U)&&(x[v]={ref:C,...U},!n))return x}}return E(!0),x};function fE(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Ie(e)?r++:e[t[r++]];return e}function pE(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ie(e[t]))return!1;return!0}function je(e,t){const n=Array.isArray(t)?t:Ts(t)?[t]:pp(t),r=n.length===1?e:fE(e,n),o=n.length-1,i=n[o];return r&&delete r[i],o!==0&&(Me(r)&&et(r)||Array.isArray(r)&&pE(r))&&je(e,n.slice(0,-1)),e}var Ns=()=>{let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}},ks=e=>Ke(e)||!fp(e);function an(e,t){if(ks(e)||ks(t))return e===t;if(Sn(e)&&Sn(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const i=e[o];if(!r.includes(o))return!1;if(o!=="ref"){const a=t[o];if(Sn(i)&&Sn(a)||Me(i)&&Me(a)||Array.isArray(i)&&Array.isArray(a)?!an(i,a):i!==a)return!1}}return!0}var Ep=e=>e.type==="select-multiple",gE=e=>Ps(e)||wr(e),Os=e=>Zo(e)&&e.isConnected,_p=e=>{for(const t in e)if(Dt(e[t]))return!0;return!1};function ti(e,t={}){const n=Array.isArray(e);if(Me(e)||n)for(const r in e)Array.isArray(e[r])||Me(e[r])&&!_p(e[r])?(t[r]=Array.isArray(e[r])?[]:{},ti(e[r],t[r])):Ke(e[r])||(t[r]=!0);return t}function Tp(e,t,n){const r=Array.isArray(e);if(Me(e)||r)for(const o in e)Array.isArray(e[o])||Me(e[o])&&!_p(e[o])?Ie(t)||ks(n[o])?n[o]=Array.isArray(e[o])?ti(e[o],[]):{...ti(e[o])}:Tp(e[o],Ke(t)?{}:t[o],n[o]):n[o]=!an(e[o],t[o]);return n}var Sr=(e,t)=>Tp(e,t,ti(t)),Ap=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Ie(e)?e:t?e===""?NaN:e&&+e:n&&Ft(e)?new Date(e):r?r(e):e;function Fs(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return As(t)?t.files:Ps(t)?wp(e.refs).value:Ep(t)?[...t.selectedOptions].map(({value:n})=>n):wr(t)?xp(e.refs).value:Ap(Ie(t.value)?e.ref.value:t.value,e)}var mE=(e,t,n,r)=>{const o={};for(const i of e){const a=se(t,i);a&&Oe(o,i,a._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},Er=e=>Ie(e)?e:ei(e)?e.source:Me(e)?ei(e.value)?e.value.source:e.value:e;const Pp="AsyncFunction";var hE=e=>!!e&&!!e.validate&&!!(Dt(e.validate)&&e.validate.constructor.name===Pp||Me(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Pp)),vE=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Np(e,t,n){const r=se(e,n);if(r||Ts(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const i=o.join("."),a=se(t,i),s=se(e,i);if(a&&!Array.isArray(a)&&n!==i)return{name:n};if(s&&s.type)return{name:i,error:s};o.pop()}return{name:n}}var yE=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,xE=(e,t)=>!Xo(se(e,t)).length&&je(e,t);const bE={mode:xt.onSubmit,reValidateMode:xt.onChange,shouldFocusError:!0};function wE(e={}){let t={...bE,...e},n={submitCount:0,isDirty:!1,isLoading:Dt(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},o=Me(t.defaultValues)||Me(t.values)?ut(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:ut(o),a={action:!1,mount:!1,watch:!1},s={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,c=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},g={values:Ns(),array:Ns(),state:Ns()},m=mp(t.mode),f=mp(t.reValidateMode),v=t.criteriaMode===xt.all,h=S=>N=>{clearTimeout(c),c=setTimeout(S,N)},y=async S=>{if(!t.disabled&&(d.isValid||S)){const N=t.resolver?et((await $()).errors):await D(r,!0);N!==n.isValid&&g.state.next({isValid:N})}},b=(S,N)=>{!t.disabled&&(d.isValidating||d.validatingFields)&&((S||Array.from(s.mount)).forEach(V=>{V&&(N?Oe(n.validatingFields,V,N):je(n.validatingFields,V))}),g.state.next({validatingFields:n.validatingFields,isValidating:!et(n.validatingFields)}))},w=(S,N=[],V,ne,J=!0,X=!0)=>{if(ne&&V&&!t.disabled){if(a.action=!0,X&&Array.isArray(se(r,S))){const z=V(se(r,S),ne.argA,ne.argB);J&&Oe(r,S,z)}if(X&&Array.isArray(se(n.errors,S))){const z=V(se(n.errors,S),ne.argA,ne.argB);J&&Oe(n.errors,S,z),xE(n.errors,S)}if(d.touchedFields&&X&&Array.isArray(se(n.touchedFields,S))){const z=V(se(n.touchedFields,S),ne.argA,ne.argB);J&&Oe(n.touchedFields,S,z)}d.dirtyFields&&(n.dirtyFields=Sr(o,i)),g.state.next({name:S,isDirty:U(S,N),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Oe(i,S,N)},C=(S,N)=>{Oe(n.errors,S,N),g.state.next({errors:n.errors})},E=S=>{n.errors=S,g.state.next({errors:n.errors,isValid:!1})},x=(S,N,V,ne)=>{const J=se(r,S);if(J){const X=se(i,S,Ie(V)?se(o,S):V);Ie(X)||ne&&ne.defaultChecked||N?Oe(i,S,N?X:Fs(J._f)):M(S,X),a.mount&&y()}},O=(S,N,V,ne,J)=>{let X=!1,z=!1;const Y={name:S};if(!t.disabled){const xe=!!(se(r,S)&&se(r,S)._f&&se(r,S)._f.disabled);if(!V||ne){d.isDirty&&(z=n.isDirty,n.isDirty=Y.isDirty=U(),X=z!==Y.isDirty);const we=xe||an(se(o,S),N);z=!!(!xe&&se(n.dirtyFields,S)),we||xe?je(n.dirtyFields,S):Oe(n.dirtyFields,S,!0),Y.dirtyFields=n.dirtyFields,X=X||d.dirtyFields&&z!==!we}if(V){const we=se(n.touchedFields,S);we||(Oe(n.touchedFields,S,V),Y.touchedFields=n.touchedFields,X=X||d.touchedFields&&we!==V)}X&&J&&g.state.next(Y)}return X?Y:{}},I=(S,N,V,ne)=>{const J=se(n.errors,S),X=d.isValid&&Ot(N)&&n.isValid!==N;if(t.delayError&&V?(u=h(()=>C(S,V)),u(t.delayError)):(clearTimeout(c),u=null,V?Oe(n.errors,S,V):je(n.errors,S)),(V?!an(J,V):J)||!et(ne)||X){const z={...ne,...X&&Ot(N)?{isValid:N}:{},errors:n.errors,name:S};n={...n,...z},g.state.next(z)}},$=async S=>{b(S,!0);const N=await t.resolver(i,t.context,mE(S||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return b(S),N},H=async S=>{const{errors:N}=await $(S);if(S)for(const V of S){const ne=se(N,V);ne?Oe(n.errors,V,ne):je(n.errors,V)}else n.errors=N;return N},D=async(S,N,V={valid:!0})=>{for(const ne in S){const J=S[ne];if(J){const{_f:X,...z}=J;if(X){const Y=s.array.has(X.name),xe=J._f&&hE(J._f);xe&&d.validatingFields&&b([ne],!0);const we=await Sp(J,i,v,t.shouldUseNativeValidation&&!N,Y);if(xe&&d.validatingFields&&b([ne]),we[X.name]&&(V.valid=!1,N))break;!N&&(se(we,X.name)?Y?dE(n.errors,we,X.name):Oe(n.errors,X.name,we[X.name]):je(n.errors,X.name))}!et(z)&&await D(z,N,V)}}return V.valid},G=()=>{for(const S of s.unMount){const N=se(r,S);N&&(N._f.refs?N._f.refs.every(V=>!Os(V)):!Os(N._f.ref))&&oe(S)}s.unMount=new Set},U=(S,N)=>!t.disabled&&(S&&N&&Oe(i,S,N),!an(B(),o)),Z=(S,N,V)=>cE(S,s,{...a.mount?i:Ie(N)?o:Ft(S)?{[S]:N}:N},V,N),k=S=>Xo(se(a.mount?i:o,S,t.shouldUnregister?se(o,S,[]):[])),M=(S,N,V={})=>{const ne=se(r,S);let J=N;if(ne){const X=ne._f;X&&(!X.disabled&&Oe(i,S,Ap(N,X)),J=Zo(X.ref)&&Ke(N)?"":N,Ep(X.ref)?[...X.ref.options].forEach(z=>z.selected=J.includes(z.value)):X.refs?wr(X.ref)?X.refs.length>1?X.refs.forEach(z=>(!z.defaultChecked||!z.disabled)&&(z.checked=Array.isArray(J)?!!J.find(Y=>Y===z.value):J===z.value)):X.refs[0]&&(X.refs[0].checked=!!J):X.refs.forEach(z=>z.checked=z.value===J):As(X.ref)?X.ref.value="":(X.ref.value=J,X.ref.type||g.values.next({name:S,values:{...i}})))}(V.shouldDirty||V.shouldTouch)&&O(S,J,V.shouldTouch,V.shouldDirty,!0),V.shouldValidate&&A(S)},F=(S,N,V)=>{for(const ne in N){const J=N[ne],X=`${S}.${ne}`,z=se(r,X);(s.array.has(S)||Me(J)||z&&!z._f)&&!Sn(J)?F(X,J,V):M(X,J,V)}},q=(S,N,V={})=>{const ne=se(r,S),J=s.array.has(S),X=ut(N);Oe(i,S,X),J?(g.array.next({name:S,values:{...i}}),(d.isDirty||d.dirtyFields)&&V.shouldDirty&&g.state.next({name:S,dirtyFields:Sr(o,i),isDirty:U(S,X)})):ne&&!ne._f&&!Ke(X)?F(S,X,V):M(S,X,V),hp(S,s)&&g.state.next({...n}),g.values.next({name:a.mount?S:void 0,values:{...i}})},P=async S=>{a.mount=!0;const N=S.target;let V=N.name,ne=!0;const J=se(r,V),X=()=>N.type?Fs(J._f):nE(S),z=Y=>{ne=Number.isNaN(Y)||Sn(Y)&&isNaN(Y.getTime())||an(Y,se(i,V,Y))};if(J){let Y,xe;const we=X(),Fe=S.type===gp.BLUR||S.type===gp.FOCUS_OUT,sn=!vE(J._f)&&!t.resolver&&!se(n.errors,V)&&!J._f.deps||yE(Fe,se(n.touchedFields,V),n.isSubmitted,f,m),Re=hp(V,s,Fe);Oe(i,V,we),Fe?(J._f.onBlur&&J._f.onBlur(S),u&&u(0)):J._f.onChange&&J._f.onChange(S);const Mt=O(V,we,Fe,!1),En=!et(Mt)||Re;if(!Fe&&g.values.next({name:V,type:S.type,values:{...i}}),sn)return d.isValid&&(t.mode==="onBlur"?Fe&&y():y()),En&&g.state.next({name:V,...Re?{}:Mt});if(!Fe&&Re&&g.state.next({...n}),t.resolver){const{errors:Be}=await $([V]);if(z(we),ne){const $t=Np(n.errors,r,V),Wt=Np(Be,r,$t.name||V);Y=Wt.error,V=Wt.name,xe=et(Be)}}else b([V],!0),Y=(await Sp(J,i,v,t.shouldUseNativeValidation))[V],b([V]),z(we),ne&&(Y?xe=!1:d.isValid&&(xe=await D(r,!0)));ne&&(J._f.deps&&A(J._f.deps),I(V,xe,Y,Mt))}},j=(S,N)=>{if(se(n.errors,N)&&S.focus)return S.focus(),1},A=async(S,N={})=>{let V,ne;const J=Jo(S);if(t.resolver){const X=await H(Ie(S)?S:J);V=et(X),ne=S?!J.some(z=>se(X,z)):V}else S?(ne=(await Promise.all(J.map(async X=>{const z=se(r,X);return await D(z&&z._f?{[X]:z}:z)}))).every(Boolean),!(!ne&&!n.isValid)&&y()):ne=V=await D(r);return g.state.next({...!Ft(S)||d.isValid&&V!==n.isValid?{}:{name:S},...t.resolver||!S?{isValid:V}:{},errors:n.errors}),N.shouldFocus&&!ne&&Cr(r,j,S?J:s.mount),ne},B=S=>{const N={...a.mount?i:o};return Ie(S)?N:Ft(S)?se(N,S):S.map(V=>se(N,V))},Q=(S,N)=>({invalid:!!se((N||n).errors,S),isDirty:!!se((N||n).dirtyFields,S),error:se((N||n).errors,S),isValidating:!!se(n.validatingFields,S),isTouched:!!se((N||n).touchedFields,S)}),re=S=>{S&&Jo(S).forEach(N=>je(n.errors,N)),g.state.next({errors:S?n.errors:{}})},ee=(S,N,V)=>{const ne=(se(r,S,{_f:{}})._f||{}).ref,J=se(n.errors,S)||{},{ref:X,message:z,type:Y,...xe}=J;Oe(n.errors,S,{...xe,...N,ref:ne}),g.state.next({name:S,errors:n.errors,isValid:!1}),V&&V.shouldFocus&&ne&&ne.focus&&ne.focus()},ce=(S,N)=>Dt(S)?g.values.subscribe({next:V=>S(Z(void 0,N),V)}):Z(S,N,!0),oe=(S,N={})=>{for(const V of S?Jo(S):s.mount)s.mount.delete(V),s.array.delete(V),N.keepValue||(je(r,V),je(i,V)),!N.keepError&&je(n.errors,V),!N.keepDirty&&je(n.dirtyFields,V),!N.keepTouched&&je(n.touchedFields,V),!N.keepIsValidating&&je(n.validatingFields,V),!t.shouldUnregister&&!N.keepDefaultValue&&je(o,V);g.values.next({values:{...i}}),g.state.next({...n,...N.keepDirty?{isDirty:U()}:{}}),!N.keepIsValid&&y()},ae=({disabled:S,name:N,field:V,fields:ne,value:J})=>{if(Ot(S)&&a.mount||S){const X=S?void 0:Ie(J)?Fs(V?V._f:se(ne,N)._f):J;(S||!S&&!Ie(X))&&Oe(i,N,X),O(N,X,!1,!1,!0)}},de=(S,N={})=>{let V=se(r,S);const ne=Ot(N.disabled)||Ot(t.disabled);return Oe(r,S,{...V||{},_f:{...V&&V._f?V._f:{ref:{name:S}},name:S,mount:!0,...N}}),s.mount.add(S),V?ae({field:V,disabled:Ot(N.disabled)?N.disabled:t.disabled,name:S,value:N.value}):x(S,!0,N.value),{...ne?{disabled:N.disabled||t.disabled}:{},...t.progressive?{required:!!N.required,min:Er(N.min),max:Er(N.max),minLength:Er(N.minLength),maxLength:Er(N.maxLength),pattern:Er(N.pattern)}:{},name:S,onChange:P,onBlur:P,ref:J=>{if(J){de(S,N),V=se(r,S);const X=Ie(J.value)&&J.querySelectorAll&&J.querySelectorAll("input,select,textarea")[0]||J,z=gE(X),Y=V._f.refs||[];if(z?Y.find(xe=>xe===X):X===V._f.ref)return;Oe(r,S,{_f:{...V._f,...z?{refs:[...Y.filter(Os),X,...Array.isArray(se(o,S))?[{}]:[]],ref:{type:X.type,name:S}}:{ref:X}}}),x(S,!1,void 0,X)}else V=se(r,S,{}),V._f&&(V._f.mount=!1),(t.shouldUnregister||N.shouldUnregister)&&!(oE(s.array,S)&&a.action)&&s.unMount.add(S)}}},ue=()=>t.shouldFocusError&&Cr(r,j,s.mount),le=S=>{Ot(S)&&(g.state.next({disabled:S}),Cr(r,(N,V)=>{const ne=se(r,V);ne&&(N.disabled=ne._f.disabled||S,Array.isArray(ne._f.refs)&&ne._f.refs.forEach(J=>{J.disabled=ne._f.disabled||S}))},0,!1))},Ce=(S,N)=>async V=>{let ne;if(V&&(V.preventDefault&&V.preventDefault(),V.persist&&V.persist()),t.disabled){N&&await N({...n.errors},V);return}let J=ut(i);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:X,values:z}=await $();n.errors=X,J=z}else await D(r);if(je(n.errors,"root"),et(n.errors)){g.state.next({errors:{}});try{await S(J,V)}catch(X){ne=X}}else N&&await N({...n.errors},V),ue(),setTimeout(ue);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:et(n.errors)&&!ne,submitCount:n.submitCount+1,errors:n.errors}),ne)throw ne},K=(S,N={})=>{se(r,S)&&(Ie(N.defaultValue)?q(S,ut(se(o,S))):(q(S,N.defaultValue),Oe(o,S,ut(N.defaultValue))),N.keepTouched||je(n.touchedFields,S),N.keepDirty||(je(n.dirtyFields,S),n.isDirty=N.defaultValue?U(S,ut(se(o,S))):U()),N.keepError||(je(n.errors,S),d.isValid&&y()),g.state.next({...n}))},Ee=(S,N={})=>{const V=S?ut(S):o,ne=ut(V),J=et(S),X=J?o:ne;if(N.keepDefaultValues||(o=V),!N.keepValues){if(N.keepDirtyValues){const z=new Set([...s.mount,...Object.keys(Sr(o,i))]);for(const Y of Array.from(z))se(n.dirtyFields,Y)?Oe(X,Y,se(i,Y)):q(Y,se(X,Y))}else{if(_s&&Ie(S))for(const z of s.mount){const Y=se(r,z);if(Y&&Y._f){const xe=Array.isArray(Y._f.refs)?Y._f.refs[0]:Y._f.ref;if(Zo(xe)){const we=xe.closest("form");if(we){we.reset();break}}}}r={}}i=t.shouldUnregister?N.keepDefaultValues?ut(o):{}:ut(X),g.array.next({values:{...X}}),g.values.next({values:{...X}})}s={mount:N.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!d.isValid||!!N.keepIsValid||!!N.keepDirtyValues,a.watch=!!t.shouldUnregister,g.state.next({submitCount:N.keepSubmitCount?n.submitCount:0,isDirty:J?!1:N.keepDirty?n.isDirty:!!(N.keepDefaultValues&&!an(S,o)),isSubmitted:N.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:J?{}:N.keepDirtyValues?N.keepDefaultValues&&i?Sr(o,i):n.dirtyFields:N.keepDefaultValues&&S?Sr(o,S):N.keepDirty?n.dirtyFields:{},touchedFields:N.keepTouched?n.touchedFields:{},errors:N.keepErrors?n.errors:{},isSubmitSuccessful:N.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},We=(S,N)=>Ee(Dt(S)?S(i):S,N);return{control:{register:de,unregister:oe,getFieldState:Q,handleSubmit:Ce,setError:ee,_executeSchema:$,_getWatch:Z,_getDirty:U,_updateValid:y,_removeUnmounted:G,_updateFieldArray:w,_updateDisabledField:ae,_getFieldArray:k,_reset:Ee,_resetDefaultValues:()=>Dt(t.defaultValues)&&t.defaultValues().then(S=>{We(S,t.resetOptions),g.state.next({isLoading:!1})}),_updateFormState:S=>{n={...n,...S}},_disableForm:le,_subjects:g,_proxyFormState:d,_setErrors:E,get _fields(){return r},get _formValues(){return i},get _state(){return a},set _state(S){a=S},get _defaultValues(){return o},get _names(){return s},set _names(S){s=S},get _formState(){return n},set _formState(S){n=S},get _options(){return t},set _options(S){t={...t,...S}}},trigger:A,register:de,handleSubmit:Ce,watch:ce,setValue:q,getValues:B,reset:We,resetField:K,clearErrors:re,unregister:oe,setError:ee,setFocus:(S,N={})=>{const V=se(r,S),ne=V&&V._f;if(ne){const J=ne.refs?ne.refs[0]:ne.ref;J.focus&&(J.focus(),N.shouldSelect&&Dt(J.select)&&J.select())}},getFieldState:Q}}function CE(e={}){const t=_.useRef(),n=_.useRef(),[r,o]=_.useState({isDirty:!1,isValidating:!1,isLoading:Dt(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Dt(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...wE(e),formState:r});const i=t.current.control;return i._options=e,lE({subject:i._subjects.state,next:a=>{sE(a,i._proxyFormState,i._updateFormState)&&o({...i._formState})}}),_.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),_.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==r.isDirty&&i._subjects.state.next({isDirty:a})}},[i,r.isDirty]),_.useEffect(()=>{e.values&&!an(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,o(a=>({...a}))):i._resetDefaultValues()},[e.values,i]),_.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),_.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),_.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),_.useMemo(()=>({...t.current,formState:aE(r,i)}),[r,i])}const kp=({className:e,children:t,content:n,side:r})=>{const[o,i]=_.useState(!1);return l.jsx(xn,{delayDuration:0,children:l.jsxs(bn,{open:o,children:[l.jsx(wn,{asChild:!0,children:l.jsx("button",{type:"button",className:he("cursor-pointer",e),onClick:()=>i(!o),onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onTouchStart:()=>i(!o),onKeyDown:a=>{a.preventDefault(),a.key==="Enter"&&i(!o)},children:t})}),l.jsx(on,{side:r,className:n?"":"hidden",children:l.jsx("span",{className:"inline-block",children:n})})]})})},SE=(e,t)=>{const[n,r]=_.useState(e);return _.useEffect(()=>{const o=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(o)}},[e,t]),n},EE=({apiBaseUrl:e="https://vib-s3-explorer.cmcts1.studio.ai.vn"})=>{var O,I;const[t,n]=_.useState([]),[r,o]=_.useState(!1),[i,a]=_.useState([]),[s,u]=_.useState(1),[c,d]=_.useState(1),[g,m]=_.useState(null),[f,v]=_.useState(""),h=SE(f,500),y=$=>{const H=$.match(/\d{6}/);if(!H)return{month:"",year:""};const D=H[0],G=D.substring(0,2),U=D.substring(2);return{month:G,year:U}},b=$=>$.map(D=>{let G=(D==null?void 0:D.month)||"",U=(D==null?void 0:D.year)||"";if((!G||!U)&&(D!=null&&D.file_name)){const Z=y(D.file_name);G=G||Z.month,U=U||Z.year}return{id:D==null?void 0:D.id,prefix:(D==null?void 0:D.prefix)||"",model:(D==null?void 0:D.model)||"",fileName:(D==null?void 0:D.file_name)||"",code:(D==null?void 0:D.stock_id)||"",month:G,year:U,content:(D==null?void 0:D.text_summary)||"",status:(D==null?void 0:D.status)||"",note:(D==null?void 0:D.note)||"",lastUpdate:D==null?void 0:D.updated_at,stock_id:D==null?void 0:D.stock_id}}),w=$=>{if(!($!=null&&$.data))return[];const H=b($==null?void 0:$.data);n(H),d($.pagination.totalPages)},C=async($=1,H=15)=>{m($),o(!0);try{const D=await me.get(`${e}/api/latest-summaries`,{params:{page:$,limit:H,search:f}});(D==null?void 0:D.status)===200?w(D.data):console.error(D)}catch(D){console.error("Error fetching data:",D)}finally{m(null),o(!1)}};_.useEffect(()=>{h&&u(1),C(s)},[s,h]);const E=_.useMemo(()=>[{id:"code",header:"Mã",accessorKey:"code",cell:({row:H})=>l.jsx("span",{className:"flex flex-col",children:H.original.code})},{id:"month",header:"Tháng",accessorKey:"month",cell:({row:H})=>{const D=H.original.month,G=H.original.year;return l.jsx("span",{className:"flex flex-col",children:`${D.toString().padStart(2,"0")}/${G}`})}},{id:"content",header:"Nội dung",accessorKey:"content",cell:({row:H})=>{const D=H.getValue("content");return l.jsx("div",{className:"text-start truncate text-ellipsis overflow-hidden whitespace-nowrap max-w-[30dvw]",children:D})}},{id:"status",header:"Trạng thái",accessorKey:"status",cell:({row:H})=>{const G=H.original.status!=="unpublish";return l.jsx("span",{className:`inline-flex items-center rounded-full px-2 py-0 text-[10px] font-bold ${G?"bg-green-50 text-green-700 ring-1 ring-inset ring-green-600/20":"bg-gray-50 text-gray-600 ring-1 ring-inset ring-gray-500/20"}`,children:G?"PUBLISHED":"UNPUBLISHED"})}},{id:"note",header:"Ghi chú",accessorKey:"note",cell:({row:H})=>l.jsx(kp,{content:l.jsx("div",{className:"font-medium text-[16px] max-w-[90dvw]",children:H.original.note}),children:l.jsx("div",{className:"text-start truncate text-ellipsis overflow-hidden whitespace-nowrap max-w-[20dvw]",children:H.original.note})})},{id:"last-update",header:"Cập nhật",accessorKey:"last-update",cell:({row:H})=>{const D=new Date(H.original.lastUpdate),G=D.getDate(),U=D.getMonth()+1,Z=`ngày ${G} tháng ${U}`;return l.jsx("span",{className:"flex flex-col",children:Z})}},{accessorKey:"actions",header:()=>l.jsx("div",{className:"font-medium text-right",children:"Hành động"}),cell:({row:H})=>{const[D,G]=_.useState(!1),[U,Z]=_.useState(!1),[k,M]=_.useState(!1),{handleSubmit:F,register:q,reset:P}=CE(),j=H.original.id,A=H.getValue("status"),B=H.getValue("content"),[Q,re]=_.useState(!1),ee=async()=>{try{re(!0);const oe=A==="unpublish"?"published":"unpublish",ae=await me.patch(`${e}/api/toggle-publish/${j}`,{id:j,typeAction:"update",status:A,idInput:j,stock_id:H.original.stock_id,prefix:H.original.prefix,model:H.original.model,summary_result:H.original.content,note:H.original.note});ae.status===200?n(de=>de.map(ue=>ue.id===j?{...ue,status:oe}:ue)):console.error("Failed to toggle publish status:",ae)}catch(oe){console.error("Error toggling publish status:",oe)}finally{re(!1)}},ce=async oe=>{G(!0);try{const ae=await me.patch(`${e}/api/update-summary`,{note:oe.note,text_summary:oe.content,id:j});ae.status===200?(await C(s),Z(!1)):console.error("Failed to update summary:",ae)}catch(ae){console.error("Error updating summary:",ae)}return G(!1)};return l.jsxs("div",{className:"flex items-center justify-end gap-2",children:[l.jsx(ve,{variant:"outline",size:"sm",onClick:()=>M(!0),className:"px-2 py-0.5 h-7",children:l.jsx(Fh,{className:"h-4 w-4"})}),l.jsx(jt,{open:k,onOpenChange:M,children:l.jsxs(St,{className:"max-w-3xl max-h-[80vh]",children:[l.jsx(Et,{children:l.jsx(_t,{children:"Nội dung chi tiết"})}),l.jsx("div",{className:"mt-4 overflow-y-auto max-h-[60vh]",children:l.jsx("div",{className:"whitespace-pre-wrap text-[16px] leading-relaxed",children:B})})]})}),l.jsxs(jt,{open:U,onOpenChange:oe=>{Z(oe),oe?P({content:H.original.content,note:H.original.note}):P()},children:[l.jsx(uo,{asChild:!0,children:l.jsx(ve,{variant:"outline",size:"sm",onClick:()=>Z(!0),className:"px-2 py-0.5 h-7",children:"Sửa"})}),l.jsx(St,{className:"rounded-lg sm:px-3 h-[calc(100dvh-200px)] min-w-[calc(100dvw-112px)]",children:l.jsxs(Et,{className:"flex flex-col gap-3",children:[l.jsx(_t,{className:"max-sm:hidden text-center",children:"Sửa summary"}),l.jsxs("form",{className:"flex flex-col gap-3 h-full justify-between",onSubmit:F(ce),children:[l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsxs("div",{className:"flex flex-col items-start",children:[l.jsx("span",{children:"Nội dung:"}),l.jsx(ur,{placeholder:"Nội dung",className:"w-full input-scroll-bar",defaultValue:H.original.answer||"",rows:10,...q("content")})]}),l.jsxs("div",{className:"flex flex-col items-start",children:[l.jsx("span",{children:"Ghi chú:"}),l.jsx(ur,{placeholder:"Nội dung",className:"w-full input-scroll-bar",defaultValue:H.original.note||"",rows:1,...q("note")})]})]}),l.jsx("div",{className:"flex justify-end",children:l.jsx(ve,{disabled:D,type:"submit",variant:"default",children:D?l.jsx($e,{className:"h-4 w-4 animate-spin"}):"Ok"})})]})]})})]}),l.jsx(ve,{variant:"outline",size:"sm",onClick:ee,disabled:Q,className:"w-[70px] px-2 py-0.5 h-7",children:Q?l.jsx($e,{className:"h-4 w-4 animate-spin"}):A==="unpublish"?"Publish":"Unpublish"})]})}}],[]),x=el({data:t,columns:E,state:{columnFilters:i},enableRowSelection:!0,onColumnFiltersChange:a,getFilteredRowModel:$g(),getCoreRowModel:Qs()});return l.jsxs("div",{className:"space-y-4 s3-explr-container",children:[l.jsx("div",{className:"flex items-center space-x-4 s3-explr-toolbar",children:l.jsxs("div",{className:"relative max-w-sm",children:[l.jsx(en,{placeholder:"Tìm kiếm theo mã...",value:f,onChange:$=>v($.target.value),className:"pr-8"}),f&&l.jsx(ve,{variant:"ghost",size:"sm",className:"absolute right-1 top-1/2 -translate-y-1/2 h-6 w-6 p-0",onClick:()=>v(""),children:l.jsx(Hi,{className:"h-4 w-4"})})]})}),l.jsx("div",{className:"rounded-md border s3-explr-table-container",children:l.jsxs(vo,{className:"s3-explr-table",children:[l.jsx(yo,{className:"s3-explr-table-header",children:x.getHeaderGroups().map($=>l.jsx(ht,{className:"hover:bg-transparent s3-explr-header-row",children:$.headers.map(H=>l.jsx(Tt,{className:"s3-explr-header-cell",children:H.isPlaceholder?null:Vr(H.column.columnDef.header,H.getContext())},H.id))},$.id))}),l.jsx(xo,{className:"s3-explr-table-body",children:r?l.jsx(ht,{children:l.jsx(Ze,{colSpan:E.length,className:"h-24 text-center",children:"Đang tải dữ liệu..."})}):(O=x.getRowModel().rows)!=null&&O.length?(I=x.getRowModel().rows)==null?void 0:I.map($=>l.jsx(ht,{className:"h-12 s3-explr-row",children:$.getVisibleCells().map(H=>l.jsx(Ze,{className:"align-middle s3-explr-cell",children:Vr(H.column.columnDef.cell,H.getContext())},H.id))},$.id)):l.jsx(ht,{children:l.jsx(Ze,{colSpan:E.length,className:"h-24 text-center",children:"Không có kết quả."})})})]})}),l.jsx("div",{className:"mt-4",children:l.jsx(fo,{children:l.jsxs(po,{children:[l.jsx(mt,{children:l.jsx(go,{onClick:()=>u($=>Math.max(1,$-1)),className:s===1?"pointer-events-none opacity-50":"cursor-pointer"})}),Array.from({length:c},($,H)=>H+1).filter($=>$===1||$===c||Math.abs($-s)<=1).map(($,H,D)=>l.jsxs(l.Fragment,{children:[H>0&&D[H-1]!==$-1&&l.jsx(mt,{children:l.jsx(ho,{})},$+"..."),l.jsx(mt,{children:l.jsx(Vn,{onClick:()=>u($),isActive:s===$,className:`cursor-pointer ${r?"pointer-events-none":""}`,children:g===$?l.jsx($e,{className:"h-4 w-4 animate-spin"}):$})},$)]})),l.jsx(mt,{children:l.jsx(mo,{onClick:()=>u($=>Math.min(c,$+1)),className:s===c||g!==null?"pointer-events-none opacity-50":"cursor-pointer"})})]})})})]})},Op=10,_E=_.memo(({apiBaseUrl:e="https://vib-s3-explorer.cmcts1.studio.ai.vn"})=>{const[t,n]=_.useState(1),[r,o]=_.useState([]),[i,a]=_.useState({total:0,page:1,limit:Op,totalPages:1}),[s,u]=_.useState(!0),[c,d]=_.useState(null),[g,m]=_.useState(new Set),{toast:f}=ko(),[v,h]=_.useState(!1),y=async x=>{try{d(x);const O=await me.get(`${e}/api/jobs`,{params:{page:x.toString(),limit:Op.toString()}});o(O.data.data),a(O.data.pagination)}catch{f({variant:"destructive",title:"Error",description:"Failed to fetch jobs. Please try again."})}finally{d(null),u(!1)}};_.useEffect(()=>{y(t)},[t,e]);const b=async x=>{m(O=>new Set(O).add(x.toString()));try{await me.post(`${e}/api/retry-job`,{jobId:x}),f({title:"Job Restarted",description:`Job ${x} has been successfully restarted.`}),y(t)}catch{f({variant:"destructive",title:"Retry Failed",description:`Failed to restart job ${x}. Please try again.`})}finally{m(O=>{const I=new Set(O);return I.delete(x.toString()),I})}},w=async()=>{h(!0),n(1),await y(1),h(!1)},C=x=>new Date(x).toLocaleString(),E=x=>{if(x=parseFloat(x),x<60)return`${x.toFixed(2)}s`;const O=Math.floor(x/60),I=(x%60).toFixed(0);return`${O}m ${I}s`};return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[l.jsx(Ph,{className:"w-8 h-8 text-primary"}),l.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Job Management"}),l.jsx(ve,{variant:"outline",size:"icon",onClick:w,disabled:v||s,className:"ml-2",children:l.jsx(Mh,{className:`h-4 w-4 ${v?"animate-spin":""}`})})]}),l.jsx("div",{className:"rounded-md border",children:l.jsxs(vo,{children:[l.jsx(yo,{children:l.jsxs(ht,{children:[l.jsx(Tt,{children:"ID"}),l.jsx(Tt,{children:"Tên Công Việc"}),l.jsx(Tt,{children:"Thời Gian Bắt Đầu"}),l.jsx(Tt,{children:"Thời Gian Cập Nhật"}),l.jsx(Tt,{children:"Thời Gian Thực Thi"}),l.jsx(Tt,{children:"Trạng Thái"}),l.jsx(Tt,{children:"Thao Tác"})]})}),l.jsx(xo,{children:s&&r.length===0?l.jsx(ht,{children:l.jsx(Ze,{colSpan:7,className:"text-center py-4",children:l.jsx($e,{className:"w-6 h-6 animate-spin mx-auto"})})}):r.map(x=>{var O,I;return l.jsxs(ht,{children:[l.jsx(Ze,{className:"!w-[100px]",children:x.id}),l.jsx(Ze,{className:"font-medium",children:(O=x.job_name)==null?void 0:O.replace("Upload file","Summary")}),l.jsx(Ze,{className:"!w-[200px]",children:C(x.created_at)}),l.jsx(Ze,{className:"!w-[200px]",children:C(x.updated_at)}),l.jsx(Ze,{className:"!w-[150px]",children:E(x.execution_time_seconds)}),l.jsx(Ze,{className:"!w-[200px]",children:l.jsx(kp,{content:x.status==="fail"&&x.error?l.jsx("div",{className:"font-medium text-[16px] max-w-[90dvw]",children:x.error}):null,children:l.jsx("div",{className:`inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium truncate text-ellipsis overflow-hidden whitespace-nowrap max-w-[30dvw]
176
+ ${x.status==="done"?"bg-green-100 text-green-800":x.status==="fail"?"bg-red-100 text-red-800":"bg-yellow-100 text-yellow-800"}`,children:x.status==="fail"?"FAILED":(I=x.status)==null?void 0:I.toUpperCase()})})}),l.jsx(Ze,{className:"!w-[200px]",children:x.status==="fail"?l.jsx(ve,{variant:"outline",size:"sm",onClick:()=>b(x.id),disabled:g.has(x.id.toString()),className:"h-[32px]",children:g.has(x.id.toString())?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin"}),"Đang thử lại..."]}):"Thử Lại"}):l.jsx("div",{className:"h-[32px]"})})]},x.id)})})]})}),l.jsx("div",{className:"mt-4",children:l.jsx(fo,{children:l.jsxs(po,{children:[l.jsx(mt,{children:l.jsx(go,{onClick:()=>n(x=>Math.max(1,x-1)),className:t===1?"pointer-events-none opacity-50":"cursor-pointer"})}),Array.from({length:i.totalPages},(x,O)=>O+1).filter(x=>x===1||x===i.totalPages||Math.abs(x-t)<=1).map((x,O,I)=>l.jsxs(l.Fragment,{children:[O>0&&I[O-1]!==x-1&&l.jsx(mt,{children:l.jsx(ho,{})},x+"..."),l.jsx(mt,{children:l.jsx(Vn,{onClick:()=>n(x),isActive:t===x,className:`cursor-pointer ${c!==null?"pointer-events-none":""}`,children:c===x?l.jsx($e,{className:"h-4 w-4 animate-spin"}):x})},x)]})),l.jsx(mt,{children:l.jsx(mo,{onClick:()=>n(x=>Math.min(i.totalPages,x+1)),className:t===i.totalPages||c!==null?"pointer-events-none opacity-50":"cursor-pointer"})})]})})}),l.jsx(Sd,{})]})});dt.Job=_E,dt.S3Explorer=tE,dt.Summary=EE,Object.defineProperty(dt,Symbol.toStringTag,{value:"Module"})});
177
177
  //# sourceMappingURL=s3-explorer.umd.cjs.map